/* ============================================================
   Tweaks panel — Light theme variant
   ============================================================ */

.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border: 1px solid #e6e3dc;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(20,20,30,.12), 0 4px 14px rgba(20,20,30,.06);
  z-index: 9999;
  font-family: var(--font-jp);
  color: #1a1a1d;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.tweaks-panel.is-open { display: flex; }

.tp__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e6e3dc;
  background: #faf8f3;
}
.tp__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a1a1d;
}
.tp__title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(214,31,31,.15);
}
.tp__close {
  background: transparent;
  border: 1px solid #e6e3dc;
  color: #3b3b40;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  display: grid; place-items: center;
}
.tp__close:hover { background: #f6f5f1; color: #1a1a1d; }

.tp__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.tp__section { display: flex; flex-direction: column; gap: 10px; }
.tp__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3b3b40;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tp__num { color: #1a1a1d; font-weight: 700; font-family: var(--font-mono); font-size: 11px; }

.tp__row { display: flex; gap: 8px; align-items: center; }
.tp__row input[type="color"] {
  width: 38px; height: 32px;
  border: 1px solid #e6e3dc;
  border-radius: 6px;
  background: transparent;
  padding: 2px;
  cursor: pointer;
}
.tp__hex {
  flex: 1;
  background: #faf8f3;
  border: 1px solid #e6e3dc;
  border-radius: 6px;
  color: #1a1a1d;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
}
.tp__hex:focus { border-color: var(--red); }

.tp__swatches { display: flex; gap: 6px; }
.tp__swatch {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1px solid #e6e3dc;
  cursor: pointer;
  padding: 0;
  transition: transform .15s, border-color .15s;
}
.tp__swatch:hover { transform: scale(1.1); border-color: #1a1a1d; }

.tp__radio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.tp__radio--col { grid-template-columns: 1fr; }

.tp__seg {
  background: #fff;
  border: 1px solid #e6e3dc;
  color: #3b3b40;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  text-align: center;
  transition: all .15s;
}
.tp__seg:hover { color: #1a1a1d; border-color: #c9c5bb; background: #faf8f3; }
.tp__seg.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.tp__opt {
  background: #fff;
  border: 1px solid #e6e3dc;
  color: #1a1a1d;
  padding: 10px 12px;
  font-family: inherit;
  border-radius: 6px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all .15s;
  cursor: pointer;
}
.tp__opt:hover { border-color: #c9c5bb; background: #faf8f3; }
.tp__opt.is-active {
  border-color: var(--red);
  background: rgba(214,31,31,0.05);
}
.tp__opt-l { font-size: 13px; font-weight: 700; }
.tp__opt-d { font-size: 11px; color: #6f6f78; font-weight: 500; }

.tp__section input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #e6e3dc;
  border-radius: 2px;
  outline: none;
}
.tp__section input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  background: var(--red);
  border-radius: 50%;
  cursor: pointer;
}
.tp__section input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--red);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

@media (max-width: 480px) {
  .tweaks-panel {
    left: 10px; right: 10px; bottom: 10px;
    width: auto;
    max-height: 70vh;
  }
}
