/* Matches .sheet-inner's own default max-width (the header's --content-max)
   exactly, rather than a page-specific narrower value -- any narrower
   figure here would leave this page's content column short of the
   header's full width, reading as misaligned/off-balance at wide
   viewports even though its left edge still lined up. The two-column
   split below is capped on its own terms (column width via
   .settings-columns), not by shrinking the outer container. */
.settings-wide { max-width: var(--content-max); }
.settings-columns { display: block; }
.settings-col { min-width: 0; }
@media (min-width: 860px) {
  /* CSS multi-column instead of a manual 2-column split -- the browser
     balances total content height across both columns automatically
     (column-fill: balance is the default for auto-height content), so
     neither side ends up visibly shorter than the other. */
  .settings-columns { column-count: 2; column-gap: 28px; column-fill: balance; }
  .settings-col { display: contents; }
  .settings-section { break-inside: avoid-column; }
}

.settings-section { margin-bottom: 28px; }
.settings-section h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 12px; }
.settings-card { border: 1px solid var(--hair); border-radius: 18px; background: rgba(251,243,233,0.03); padding: 4px 16px; }
.settings-field { padding: 14px 0; border-bottom: 1px solid var(--hair); }
.settings-field:last-child { border-bottom: 0; }
.settings-field > label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.settings-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.settings-plans-link {
  display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; text-transform: none; letter-spacing: normal; transition: color 0.15s ease, gap 0.15s ease;
}
.settings-plans-link:hover { color: var(--accent2); gap: 5px; }
.settings-plans-link .ico { width: 16px; height: 16px; transition: transform 0.15s var(--spring); }
.settings-plans-link:hover .ico { transform: translateX(2px); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hair); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.tlabel { font-size: 14.5px; font-weight: 600; }
.tsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.style-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.style-chip {
  padding: 9px 16px; border-radius: var(--radius-pill); border: 1px solid var(--hair); background: rgba(251,243,233,0.05);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font);
}
.style-chip.active { background: var(--accent); border-color: var(--accent); color: #2a1810; }

.qa-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stepper-bar { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; border: 1px solid var(--hair); background: rgba(251,243,233,0.03); }
.hud-label { font-size: 13.5px; color: var(--text); font-weight: 600; }
.step {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--hair);
  background: rgba(251,243,233,0.05); color: var(--text); padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.step:active { transform: scale(0.94); }
#thr, #rel {
  flex: 1; display: block; -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 0; padding: 0; border: 0;
  border-radius: 999px; cursor: pointer; outline: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--fill, 70%), rgba(251,243,233,0.14) var(--fill, 70%), rgba(251,243,233,0.14) 100%);
}
#thr::-webkit-slider-runnable-track, #rel::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: transparent; }
#thr::-webkit-slider-thumb, #rel::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff8ef; border: none; cursor: pointer;
}
#thr::-moz-range-track, #rel::-moz-range-track { height: 6px; border-radius: 999px; background: transparent; border: none; }
#thr::-moz-range-thumb, #rel::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff8ef; border: none; cursor: pointer;
}
.thr-readout {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; flex: 0 0 auto;
  min-width: 84px; height: 38px; padding: 0 12px; white-space: nowrap;
  background: rgba(251,243,233,0.06); border: 1px solid var(--hair); border-radius: 12px;
}
#thrInput, #relInput {
  flex: 0 0 auto; width: 4ch; padding: 0; border: none; background: transparent; text-align: right;
  font-size: 16px; font-weight: 700; font-family: var(--font); color: var(--text);
}
.save-mode-panel { margin-top: 12px; }

.conn-pill { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.conn-dot.ok { background: var(--good); }
.conn-dot.bad { background: var(--danger); }

.settings-save-state { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.settings-save-state.ok { color: var(--good); }
.settings-save-state.err { color: var(--danger); }
