/* REBOT vezérlő v2 — Irányítás (D-pad, Saját gombok, edit mode, auto overlay) + its sheets
   (Gomb beállítása = .bind-sheet, Gyors kezdés = .qs-sheet). Tokens only; shared components live in base.css.
   Layouts: phone portrait (stacked), short phones ≤700 px tall (final-spec §5 #9), ≥900 px gamepad card,
   landscape phones = gamepad over the whole view (UI §11.3). */

/* Pull-to-refresh would reload the page and drop the Bluetooth link (UX §8.2). */
html:has([data-view="drive"]:not([hidden])),
html:has([data-view="drive"]:not([hidden])) body { overscroll-behavior-y: contain; }

[data-view="drive"] {
  --cell: var(--pad-cell);
  --face: var(--face-btn);
  --pad-gap: 10px;
}

.drive-wrap { max-width: 1040px; margin-inline: auto; }

/* ------------------------------------------------------------- head + hint */

.drive-head { margin-bottom: var(--sp-2); }
.drive-edit .lbl-short { display: none; }
@media (max-width: 399px) {
  .drive-edit .lbl-long { display: none; }
  .drive-edit .lbl-short { display: inline; }
}

.drive-note { display: flex; justify-content: center; margin-bottom: var(--sp-3); }
.drive-hint { color: var(--ink-2); font-size: var(--fs-sm); font-weight: var(--fw-label); line-height: 1.35; text-align: center; }
.drive-hint .icon { width: 20px; height: 20px; margin-right: 6px; vertical-align: -5px; color: var(--brand); }
.drive-editbar {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 48px; padding: var(--sp-2) var(--sp-4);
  border: var(--bw) dashed var(--brand); border-radius: var(--r-md); background: var(--brand-tint); color: var(--brand-ink);
  font-weight: var(--fw-label); line-height: 1.35;
}
.drive-editbar .icon { width: 22px; height: 22px; }

/* ------------------------------------------------------- empty state (M4) */

.drive-empty { margin-bottom: var(--sp-4); }
.drive-empty .empty-state { padding: var(--sp-2) 0; }
@media (min-width: 900px) {
  .drive-empty .empty-state {
    grid-template-columns: auto minmax(0, 1fr) minmax(240px, 320px); grid-template-areas: "m t a" "m x a";
    justify-items: start; align-items: center; column-gap: var(--sp-6); row-gap: var(--sp-1); text-align: left;
  }
  .drive-empty .mascot { grid-area: m; width: 88px; height: 88px; }
  .drive-empty .empty-title { grid-area: t; align-self: end; font-size: var(--fs-xl); max-width: none; }
  .drive-empty .empty-text { grid-area: x; align-self: start; max-width: none; }
  .drive-empty .empty-actions { grid-area: a; margin: 0; }
}
/* Faded pad behind the onboarding (it still works: empty buttons open their settings). STOP stays vivid. */
[data-view="drive"].is-empty .pad:not(.pad-stop),
[data-view="drive"].is-empty .face-group { opacity: .6; transition: opacity var(--dur-2); }
[data-view="drive"].is-empty .drive-ctrl:hover .pad,
[data-view="drive"].is-empty .drive-ctrl:hover .face-group,
[data-view="drive"].is-empty .drive-ctrl:focus-within .pad,
[data-view="drive"].is-empty .drive-ctrl:focus-within .face-group { opacity: 1; }

/* -------------------------------------------------------------- controller */

.drive-ctrl {
  position: relative; display: grid; justify-items: center; gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-3); border-radius: var(--r-xl);
}

.dpad {
  display: grid; grid-template-columns: repeat(3, var(--cell)); grid-template-rows: repeat(3, var(--cell));
  gap: var(--pad-gap); padding-bottom: var(--lip-big);
}
.pad, .face {
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.pad {
  position: relative; display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0;
  padding: 4px 6px; border: var(--bw) solid var(--line-2); border-radius: 22px;
  background: var(--surface); color: var(--ink); box-shadow: 0 var(--lip-big) 0 var(--line-2);
  font: inherit; font-weight: var(--fw-button); cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out),
    border-color var(--dur-2), background var(--dur-2), opacity var(--dur-2);
}
.pad-up { grid-area: 1 / 2; }
.pad-left { grid-area: 2 / 1; }
.pad-stop { grid-area: 2 / 2; }
.pad-right { grid-area: 2 / 3; }
.pad-down { grid-area: 3 / 2; }
.pad .pad-icon { width: 40px; height: 40px; }
.pad-name {
  max-width: 100%; padding-block: 1px; color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: var(--fw-label); line-height: 1.25; text-align: center;
  overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (hover: hover) { .pad:not(.pad-stop):not(.is-empty):hover { background: var(--surface-2); } }
.pad.is-pressed, .pad:active { transform: translateY(calc(var(--lip-big) - 1px)); box-shadow: 0 1px 0 var(--line-2); }

.pad-stop {
  border-color: var(--stop); border-radius: 50%; background: var(--stop); color: var(--on-stop);
  box-shadow: 0 var(--lip-big) 0 var(--stop-lip);
}
.pad-stop .pad-icon { width: 34px; height: 34px; }
.pad-stop .pad-name { color: inherit; font-weight: var(--fw-display); letter-spacing: .04em; }
.pad-stop:hover { background: var(--stop-hover); border-color: var(--stop-hover); }
.pad-stop:active { box-shadow: 0 1px 0 var(--stop-lip); }

.pad.is-empty {
  border-style: dashed; border-color: var(--line-strong); background: transparent; color: var(--ink-3); box-shadow: none;
}
.pad.is-empty .pad-name { color: var(--ink-3); }
.pad.is-empty.is-pressed, .pad.is-empty:active { transform: none; box-shadow: none; background: var(--surface-2); }
.pad.is-running {
  border-color: var(--go);
  box-shadow: 0 var(--lip-big) 0 var(--go-lip), 0 0 0 6px color-mix(in srgb, var(--go) 24%, transparent);
}
.pad.is-running.is-pressed { box-shadow: 0 1px 0 var(--go-lip), 0 0 0 6px color-mix(in srgb, var(--go) 24%, transparent); }

/* „▶ fut” badge (running) and ⚙ badge (edit mode) */
.pad-badge { display: none; position: absolute; z-index: 2; top: -11px; right: -9px; pointer-events: none; }
.pad-badge[data-kind="run"] {
  display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px 0 7px; border-radius: var(--r-pill);
  background: var(--go); color: var(--on-go); font-size: var(--fs-xs); font-weight: var(--fw-display); line-height: 1;
}
.pad-badge[data-kind="run"] .icon { width: 12px; height: 12px; }
.pad-badge[data-kind="edit"] {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); box-shadow: var(--sh-1);
}
.pad-badge[data-kind="edit"] .icon { width: 18px; height: 18px; }

/* Sensor-rule mark: this button also starts on its own from an Érzékelő rule. */
.pad-rule {
  display: none; position: absolute; z-index: 2; right: -8px; bottom: -8px; width: 28px; height: 28px; pointer-events: none;
  place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--sensor-a); color: var(--surface); box-shadow: var(--sh-1);
}
.pad-rule .icon { width: 16px; height: 16px; }
.has-rule .pad-rule { display: grid; }
.face .pad-rule { right: -6px; bottom: -6px; }

/* Keycaps (desktop only, UI §8.2; hidden on small cells where they would cover the icon) */
.pad-kbd { display: none; }
@media (pointer: fine) and (min-width: 640px) and (min-height: 521px) {
  .pad-kbd { display: inline-grid; position: absolute; top: 7px; left: 7px; pointer-events: none; }
  .face .pad-kbd { top: -2px; left: -4px; }
}

/* Offline / auto mode: aria-disabled + dimmed (never `disabled`, final-spec §5 #11) */
.pad[aria-disabled="true"], .face[aria-disabled="true"] { cursor: not-allowed; }
.pad[aria-disabled="true"]:not(.is-coached), .face[aria-disabled="true"]:not(.is-coached) { opacity: .5; }
.pad[aria-disabled="true"]:active, .pad[aria-disabled="true"].is-pressed { transform: none; box-shadow: 0 var(--lip-big) 0 var(--line-2); }

/* -------------------------------------------------------- Saját gombok */

.face-group { display: grid; justify-items: center; gap: var(--sp-3); width: 100%; min-width: 0; }
.face-title { color: var(--ink-3); font-size: var(--fs-sm); font-weight: var(--fw-label); line-height: 1.3; }
.face-row { display: flex; justify-content: center; gap: var(--sp-3); max-width: 100%; }
.face {
  --fc: var(--btn1); --fo: var(--on-btn1); --fl: var(--btn1-lip);
  position: relative; display: grid; justify-items: center; align-content: start; gap: var(--sp-2);
  width: calc(var(--face) + 16px); min-width: 0; padding: 0; border: 0; border-radius: var(--r-md);
  background: none; color: var(--ink); font: inherit; cursor: pointer;
}
.face[data-id="user2"] { --fc: var(--btn2); --fo: var(--on-btn2); --fl: var(--btn2-lip); }
.face[data-id="user3"] { --fc: var(--btn3); --fo: var(--on-btn3); --fl: var(--btn3-lip); }
.face:focus-visible { outline: none; }
.face:focus-visible .face-btn { outline: 3px solid var(--focus); outline-offset: 3px; }
.face-btn {
  position: relative; display: grid; place-items: center; width: var(--face); aspect-ratio: 1; margin-bottom: var(--lip-big);
  border-radius: 50%; background: var(--fc); color: var(--fo); box-shadow: 0 var(--lip-big) 0 var(--fl);
  font-size: 2rem; font-weight: var(--fw-display); line-height: 1;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), opacity var(--dur-2);
}
.face.is-pressed .face-btn, .face:active .face-btn { transform: translateY(calc(var(--lip-big) - 1px)); box-shadow: 0 1px 0 var(--fl); }
.face.is-empty .face-btn { border: var(--bw) dashed var(--line-strong); background: transparent; color: var(--ink-3); box-shadow: none; }
.face.is-empty.is-pressed .face-btn, .face.is-empty:active .face-btn { transform: none; background: var(--surface-2); }
.face.is-running .face-btn { box-shadow: 0 var(--lip-big) 0 var(--fl), 0 0 0 7px color-mix(in srgb, var(--go) 32%, transparent); }
.face .pad-badge { top: -8px; right: -12px; }
.face[aria-disabled="true"]:active .face-btn, .face[aria-disabled="true"].is-pressed .face-btn { transform: none; box-shadow: 0 var(--lip-big) 0 var(--fl); }
.face-name {
  max-width: 100%; padding-block: 1px; color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: var(--fw-label); line-height: 1.25; text-align: center; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.face.is-empty .face-name { color: var(--ink-3); }
.face-hint { display: none; }

/* ------------------------------------------------------------- edit mode */

.is-editing .pad:not(.pad-stop) { border: var(--bw) dashed var(--brand); background: var(--surface); box-shadow: none; }
.is-editing .pad:not(.pad-stop) .pad-name { color: var(--ink-2); }
.is-editing .face-btn { outline: var(--bw) dashed var(--brand); outline-offset: 4px; }
.is-editing .pad:not(.pad-stop):active, .is-editing .pad.is-pressed { transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .is-editing .pad:not(.pad-stop), .is-editing .face-btn { animation: drive-wiggle 2.4s ease-in-out infinite; }
  .is-editing .pad-left, .is-editing .pad-down, .is-editing [data-id="user2"] .face-btn { animation-delay: -1.2s; }
  .is-editing .pad-right, .is-editing [data-id="user3"] .face-btn { animation-delay: -.6s; }
}
@keyframes drive-wiggle { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }

/* ------------------------------------------------- auto-mode overlay (M8) */

.auto-overlay {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: var(--sp-4);
  border-radius: inherit; background: color-mix(in srgb, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.auto-card {
  display: grid; justify-items: center; gap: var(--sp-1); max-width: 340px; padding: var(--sp-5);
  border: var(--bw) solid var(--warn-ink); border-radius: var(--r-lg); background: var(--warn-tint); color: var(--warn-ink);
  text-align: center; box-shadow: var(--sh-2);
}
.auto-icon .icon { width: 32px; height: 32px; }
.auto-title { color: var(--ink); font-size: var(--fs-lg); font-weight: var(--fw-title); line-height: 1.3; }
.auto-sub { color: var(--ink-2); font-weight: var(--fw-label); }
.auto-card .btn { margin-top: var(--sp-3); white-space: normal; }

/* ------------------------------------------------------------ coach mark */

.coach {
  position: absolute; z-index: 6; left: 50%; bottom: calc(100% + 14px);
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 12px; border-radius: var(--r-pill);
  background: var(--inverse); color: var(--ink-inverse); box-shadow: var(--sh-2);
  font-size: var(--fs-md); font-weight: var(--fw-button); line-height: 1.25; white-space: nowrap;
  transform: translateX(-50%); pointer-events: none;
}
.coach .icon { width: 20px; height: 20px; }
.coach::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -8px;
  border: 8px solid transparent; border-top-color: var(--inverse);
}
.pad.is-coached, .face.is-coached .face-btn { outline: 3px solid var(--brand); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .coach { animation: drive-coach-bob 900ms var(--ease-out) infinite alternate; }
  .pad.is-coached, .face.is-coached .face-btn { animation: drive-coach-ring 1s ease-out 3; }
}
@keyframes drive-coach-bob { to { transform: translate(-50%, -6px); } }
@keyframes drive-coach-ring { from { outline-offset: 12px; outline-color: transparent; } }

/* ------------------------------------------------------------ key legend */

.drive-keys {
  margin-top: var(--sp-4); color: var(--ink-3); font-size: var(--fs-sm); font-weight: var(--fw-label); line-height: 1.9; text-align: center;
}
.drive-keys > .icon { width: 20px; height: 20px; margin-right: 6px; vertical-align: -5px; }
.drive-keys .kbd { margin-inline: 1px; vertical-align: 1px; }

/* ============================================== short phones (≤760 / ≤700) */

/* final-spec §5 #9, extended to ≤760 px: 1–3 must stay visible above the floating now-playing bar
   (it appears while driving, so the pad must not move then). */
@media (max-height: 760px) and (orientation: portrait) {
  [data-view="drive"] { --cell: clamp(80px, min(24vw, calc((100dvh - 400px) / 3)), 112px); --face: 68px; --pad-gap: 8px; }
  .drive-head { margin-bottom: var(--sp-1); }
  .drive-note { margin-bottom: var(--sp-2); }
  .drive-ctrl { gap: var(--sp-3); padding: var(--sp-4) var(--sp-3) var(--sp-3); }
  .face-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .face { gap: var(--sp-1); }
  .face-btn { font-size: 1.75rem; }
}
/* ≤700 px: the hint moves into the title row (the bottom nav already names the screen; the h1 stays for
   screen readers), so the pad + 1–3 fit above the now-playing bar at 360×640. */
@media (max-height: 700px) and (orientation: portrait) {
  .drive-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--sp-3); row-gap: var(--sp-2); }
  .drive-wrap > * { grid-column: 1 / -1; }
  .drive-head { display: contents; }
  .drive-head .view-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .drive-wrap > .drive-note { grid-column: 1; grid-row: 1; justify-content: flex-start; margin: 0; }
  .drive-wrap .drive-edit { grid-column: 2; grid-row: 1; margin-bottom: var(--lip); }
  .drive-hint { text-align: left; }
  .drive-empty { margin-bottom: 0; }
  .drive-ctrl { gap: var(--sp-2); padding: var(--sp-3) var(--sp-3) var(--sp-2); }
}

/* ============================================ gamepad card (tablet/desktop) */

@media (min-width: 900px) {
  .drive-ctrl {
    grid-template-columns: auto auto; justify-content: center; align-items: center;
    column-gap: var(--sp-16); padding: var(--sp-10) var(--sp-12);
  }
  .face-group { justify-items: start; width: auto; }
  .face-row { flex-direction: column; gap: var(--sp-4); }
  .face {
    grid-template-columns: var(--face) minmax(0, 220px); justify-items: start; align-items: center;
    column-gap: var(--sp-4); width: auto; text-align: left;
  }
  .face-name { font-size: var(--fs-md); text-align: left; }
  .face-hint {
    display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-1);
    color: var(--ink-3); font-size: var(--fs-sm); font-weight: var(--fw-label); line-height: 1.35;
  }
  .face-hint .icon { width: 18px; height: 18px; color: var(--brand); }
}
@media (min-width: 1024px) {
  [data-view="drive"] { --cell: 124px; --face: 96px; }
  .drive-ctrl { column-gap: 96px; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  [data-view="drive"] { --cell: clamp(96px, calc((100dvh - 340px) / 3), 124px); --face: 84px; }
  .drive-ctrl { padding-block: var(--sp-6); }
  .face-row { gap: var(--sp-3); }
}
/* Desktop onboarding (M4): the faded pad shrinks so the empty-state card + pad fit without scrolling. */
@media (min-width: 1024px) {
  [data-view="drive"].is-empty { --cell: clamp(88px, calc((100dvh - 560px) / 3), 112px); --face: 80px; }
  [data-view="drive"].is-empty .drive-ctrl { padding-block: var(--sp-6); }
  [data-view="drive"].is-empty .face-row { gap: var(--sp-3); }
  [data-view="drive"].is-empty .drive-keys { margin-top: var(--sp-3); }
}

/* ============================================ landscape phone: gamepad view */

@media (orientation: landscape) and (max-height: 520px) and (max-width: 1023px) {
  /* D-pad sized by height, leaving room for the floating now-playing bar (UI §11.3). */
  [data-view="drive"] { --cell: clamp(80px, calc((100dvh - var(--topbar-h) - 90px) / 3), 104px); --face: 60px; --pad-gap: 8px; }
  .drive-wrap {
    position: relative; display: grid; max-width: none;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto auto auto auto 1fr;
    grid-template-areas: "pad . face" "pad head face" "pad note face" "pad empty face" "pad keys face" "pad . face";
    column-gap: var(--sp-5); align-items: center;
  }
  .drive-head { grid-area: head; justify-content: center; margin: 0 0 var(--sp-2); }
  .drive-head .view-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .drive-note { grid-area: note; margin: 0; }
  .drive-empty { grid-area: empty; margin: 0; padding: var(--sp-3); }
  .drive-empty .mascot { display: none; }
  .drive-empty .empty-state { gap: var(--sp-1); padding: 0; }
  .drive-empty .empty-title { font-size: var(--fs-md); }
  .drive-empty .empty-text { font-size: var(--fs-sm); line-height: 1.35; }
  .drive-empty .empty-actions { gap: var(--sp-1); margin-top: var(--sp-1); }
  .drive-empty .btn-lg { min-height: var(--tap); padding-inline: var(--sp-3); font-size: var(--fs-md); white-space: normal; }
  [data-view="drive"].is-empty .drive-keys-wrap { display: none; }
  .drive-keys-wrap { grid-area: keys; }
  .drive-keys { margin-top: var(--sp-2); line-height: 1.8; }
  .drive-ctrl { display: contents; }
  .dpad { grid-area: pad; }
  .face-group { grid-area: face; justify-items: end; width: auto; }
  .face-title, .face-hint { display: none; }
  .face-row { flex-direction: column; gap: var(--sp-2); }
  .face { grid-template-columns: minmax(0, 10ch) var(--face); align-items: center; justify-items: end; column-gap: var(--sp-2); width: auto; }
  .face-name { order: -1; font-size: var(--fs-xs); text-align: right; }
  .face-btn { font-size: 1.5rem; }
  .face .pad-kbd { left: auto; right: calc(var(--face) - 14px); }
  .face .pad-badge { top: -12px; right: auto; left: 50%; transform: translateX(-50%); } /* stays on screen at the right edge */
  .auto-overlay { border-radius: var(--r-lg); }
}

/* ======================================================= Gomb beállítása */

.bind-glyph {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  border: var(--bw) solid var(--line-2); background: var(--surface); color: var(--ink); box-shadow: 0 3px 0 var(--line-2);
}
.sheet-title .bind-glyph .icon { width: 24px; height: 24px; color: inherit; }
.bind-glyph.is-face { border: 0; border-radius: 50%; font-size: var(--fs-lg); font-weight: var(--fw-display); }
.bind-glyph[data-c="btn1"] { background: var(--btn1); color: var(--on-btn1); box-shadow: 0 3px 0 var(--btn1-lip); }
.bind-glyph[data-c="btn2"] { background: var(--btn2); color: var(--on-btn2); box-shadow: 0 3px 0 var(--btn2-lip); }
.bind-glyph[data-c="btn3"] { background: var(--btn3); color: var(--on-btn3); box-shadow: 0 3px 0 var(--btn3-lip); }
.bind-sheet .sheet-title { gap: var(--sp-3); }
.bind-sheet .sheet-section > .sheet-label { margin-bottom: var(--sp-2); }
.bind-what-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2); }
.bind-what-row .select-wrap { flex: 1 1 220px; }
.bind-what-row .btn { flex: none; }
.bind-nomoves { margin-bottom: var(--sp-3); }
.bind-times { margin-top: var(--sp-4); }
.bind-times .sheet-label { margin-bottom: var(--sp-2); }
.bind-adv-body { display: grid; justify-items: start; gap: var(--sp-2); padding-top: var(--sp-1); }
.bind-rule { display: grid; gap: var(--sp-3); width: 100%; }
.bind-rule .switch { font-size: var(--fs-md); }
.bind-rule-detail { display: grid; justify-items: start; gap: var(--sp-2); }
.bind-rule-sentence { color: var(--ink); font-weight: var(--fw-button); line-height: 1.35; }
.bind-rule-detail .btn { margin-bottom: var(--lip); }
.bind-rule-note { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.4; }
.bind-rule-link { margin-left: calc(-1 * var(--sp-3)); color: var(--brand-ink); }

/* ============================================================ Gyors kezdés */

.qs-progress { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.qs-bars { display: flex; flex: 1; gap: 6px; }
.qs-bars i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); }
.qs-bars i.is-on { background: var(--brand); }
.qs-count { color: var(--ink-2); font-size: var(--fs-sm); font-weight: var(--fw-button); }
.qs-q { margin: var(--sp-5) 0 var(--sp-3); font-size: var(--fs-lg); outline: none; }
.qs-progress + .qs-q { margin-top: 0; }
.qs-ports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.qs-lift {
  display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md); background: var(--warn-tint); color: var(--warn-ink); font-weight: var(--fw-label); line-height: 1.4;
}
.qs-lift .icon { width: 22px; height: 22px; margin-top: 1px; }
.qs-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1) var(--sp-3); }
.qs-answers .btn { white-space: normal; padding-inline: var(--sp-3); }
.qs-done { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; text-align: center; }
.qs-done-text { color: var(--ink-2); font-size: var(--fs-lg); font-weight: var(--fw-label); line-height: 1.4; max-width: 34ch; }
