/* ==================== 10. RIGHT-SIDE INSPECTOR DRAWER ==================== */
#drawer {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  width: 306px;
  max-width: calc(100vw - 32px);
  z-index: 50;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.30s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

#drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.dh {
  padding: 15px 18px;
  border-bottom: 1px solid var(--chrome-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
}

.db {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scrollbar-width: thin;
}

label, .lab {
  display: block;
  font: 600 10.5px var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chrome-mute);
  margin-bottom: 7px;
}

.db input[type="text"] {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--chrome-border-strong);
  background: var(--input-bg);
  color: var(--chrome-text);
  font-size: 13px;
  transition: border-color 0.15s ease;
}

.db input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.opt {
  padding: 8px 8px;
  border-radius: 10px;
  border: 1px solid var(--chrome-border);
  background: var(--btn-bg);
  color: var(--chrome-text);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.opt:hover {
  background: var(--btn-hover);
}

.opt.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.color-dots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 2px;
}

.cdot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 3px;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, border-color 0.14s ease;
}

.cdot:hover {
  transform: scale(1.1);
}

.cdot.on {
  border-color: var(--accent);
}

.cdot span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.18);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.55);
}

.rng {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--chrome-mute);
  margin-bottom: 7px;
}

.rng b {
  font-weight: 600;
  color: var(--chrome-text);
  font-variant-numeric: tabular-nums;
}

.mini-btn {
  background: var(--btn-bg);
  color: var(--chrome-mute);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
}

.mini-btn:hover {
  background: var(--btn-hover);
  color: var(--chrome-text);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--track-bg);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--chrome-solid);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.df {
  padding: 12px 16px;
  border-top: 1px solid var(--chrome-border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--footer-bg);
}

.df button {
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--btn-bg);
  color: var(--chrome-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.14s ease;
}

.df button:hover {
  background: var(--btn-hover);
}

.df .rm {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.df .rm:hover {
  background: rgba(239, 68, 68, 0.22);
}

.x {
  color: var(--chrome-mute);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.x:hover {
  background: var(--chrome-hover);
  color: var(--chrome-text);
}
