/* board.css — Garage Screen Lab · Visual + Sound Mixing Board (0.2.0; from the supplied mixing-board.css)
   Phone-first. Big touch targets (≥ 48px). Status never shown by color alone. */

:root {
  --bg: #0f1011;
  --panel: #191b1d;
  --panel-2: #222529;
  --line: #5b616a;          /* 0.3.2: was #34383e — control edges now ≥ 3:1 on the panel */
  --text: #f3f1e8;
  --muted: #c9cbc3;         /* 0.3.2: was #a7aaa2 — hints read in a bright garage */
  --accent: #f2e35b;       /* lemon */
  --accent-ink: #1b1900;
  --stop: #ff6b57;
  --radius: 14px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- board ---------- */
.gs-root { max-width: 640px; margin: 0 auto; padding: var(--gutter) var(--gutter) 0; }
.gs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.gs-head h1 { margin: 0; font-size: 22px; letter-spacing: .06em; font-weight: 900; }
.gs-sub { margin: 0; color: var(--muted); font-size: 13px; }

.gs-sec { margin: 0 0 14px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.gs-sec h2, .gs-h2 { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 900; letter-spacing: .12em; color: var(--text); }
.gs-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gs-sec-head h2 { margin: 0; }
.gs-scene-name { font-weight: 800; font-size: 15px; }
.gs-note { margin: 10px 0 0; font-size: 14px; }
.gs-alert { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border-left: 4px solid var(--accent); }
.gs-hint { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.35; }

/* buttons */
.gs-btn { min-height: 52px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel-2);
  font-weight: 800; letter-spacing: .05em; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.gs-btn:active { transform: translateY(1px); }
.gs-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gs-btn:disabled { opacity: .45; cursor: not-allowed; }
.gs-small { min-height: 40px; padding: 6px 12px; font-size: 13px; }

/* hot buttons */
.gs-hot { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gs-hot-btn { min-width: 0; min-height: 64px; padding: 6px 2px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel-2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: manipulation; }
.gs-hot-n { font-size: 12px; color: var(--muted); font-weight: 700; }
.gs-hot-l { font-size: clamp(10px, 2.8vw, 13px); font-weight: 900; letter-spacing: 0; text-align: center; line-height: 1.15; overflow-wrap: normal; word-break: normal; hyphens: none; max-width: 100%; }
.gs-hot-btn.empty { border-style: dashed; }
.gs-hot-btn.empty .gs-hot-l { font-size: 22px; line-height: 1; }
.gs-hot.saving .gs-hot-btn { border-color: var(--accent); border-style: dashed; }

/* categories */
.gs-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gs-cat { min-height: 60px; font-size: 15px; }
.gs-cats .gs-cat:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* scene select */
.gs-select { width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel-2); font-size: 17px; font-weight: 700; }

/* controls */
.gs-ctls { display: grid; gap: 14px; }
.gs-ctl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.gs-label { font-weight: 800; letter-spacing: .06em; font-size: 14px; }
.gs-val { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; touch-action: pan-y; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 999px; background: var(--line); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); }

.gs-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-seg-btn { flex: 1 1 auto; min-height: 46px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel-2);
  font-weight: 800; font-size: 14px; letter-spacing: .04em; cursor: pointer; touch-action: manipulation; }
.gs-seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gs-seg-btn[aria-pressed="true"]::before { content: "● "; }

.gs-text { width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #0b0c0d; font-size: 20px; font-weight: 800; letter-spacing: .04em; }

.gs-pad { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 2px dashed var(--line); border-radius: 12px; touch-action: none; cursor: crosshair;
  background: repeating-linear-gradient(0deg, transparent 0 24px, rgba(255,255,255,.04) 24px 25px), repeating-linear-gradient(90deg, transparent 0 24px, rgba(255,255,255,.04) 24px 25px), #0b0c0d; }
.gs-pad-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent); pointer-events: none; }
.gs-pad-dot[hidden] { display: none; }

.gs-action { width: 100%; min-height: 64px; font-size: 18px; background: #3a2a18; border-color: #8a6236; }

.gs-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; }
.gs-t-state { font-size: 12px; padding: 2px 7px; border-radius: 999px; border: 1.5px solid currentColor; }

/* sound */
.gs-pill { font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--muted); white-space: nowrap; }
.gs-pill.on { color: var(--accent); border-color: var(--accent); }
.gs-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.gs-big { min-height: 64px; font-size: 15px; }
.gs-sound-body { margin-top: 12px; display: grid; gap: 12px; }
.gs-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gs-tab { min-height: 46px; font-size: 13px; }
.gs-live { font-weight: 900; }
.gs-start { width: 100%; min-height: 60px; font-size: 17px; }
.gs-readout { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; padding: 12px 14px; border-radius: 12px; background: #0b0c0d;
  font: 700 18px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.gs-readout dt { color: var(--muted); }
.gs-readout dt::after { content: " —"; }
.gs-readout dd { margin: 0; }
.gs-banks .gs-seg-btn { font-size: 13px; }
.gs-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gs-padbtn { min-height: 96px; font-size: 18px; border-radius: 16px; background: #26222e; border-color: #4a4358; }
.gs-padbtn.hit { background: var(--accent); color: var(--accent-ink); transition: background .25s ease, color .25s ease; }
.gs-stop { border-color: var(--stop); color: var(--stop); }

/* next experiments */
.gs-next { border-style: dashed; background: transparent; }
.gs-badge { font-size: 11px; font-weight: 900; letter-spacing: .08em; padding: 4px 8px; border-radius: 6px; border: 1.5px dashed var(--muted); color: var(--muted); white-space: nowrap; }
.gs-map { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.gs-map li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 14px; }
.gs-map-c { font-weight: 800; min-width: 74px; }
.gs-map-p { font-weight: 700; }
.gs-map code { color: var(--muted); font-size: 12px; margin-left: auto; }
.gs-flow { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.gs-signal { margin: 0 0 10px; padding: 0 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.gs-signal span { font-weight: 800; letter-spacing: .08em; }

/* global bar: always reachable */
.gs-bar { position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(15,16,17,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gs-bar .gs-btn { min-width: 0; min-height: 58px; font-size: 13px; padding: 6px 4px; }
.gs-bar .gs-toggle { flex-direction: column; gap: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 0.2.0: page, status, notices, QR ---------- */
.hidden { display: none !important; }
body.gs-board-page { min-height: 100vh; }
.gs-local { position: sticky; top: 0; z-index: 10; background: #f2c14e; color: #1a1200; font-weight: 700; font-size: 14px; text-align: center; padding: 6px var(--gutter); }
.gs-pair form { display: flex; gap: 8px; }
.gs-pair form .gs-text { flex: 1; text-transform: uppercase; letter-spacing: .12em; }
.gs-pair form .gs-btn { min-width: 96px; }

.gs-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.gs-status .gs-hint { grid-column: 1 / -1; margin: 0; }
.gs-spill { padding: 7px 8px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel); min-width: 0; }
.gs-spill b { display: block; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.gs-spill span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .03em; overflow-wrap: anywhere; }
.gs-spill[data-tone="ok"] { border-color: #7fd69a; }
.gs-spill[data-tone="ok"] span { color: #9fe8b4; }
.gs-spill[data-tone="bad"] { border-color: var(--stop); }
.gs-spill[data-tone="bad"] span { color: #ffb0a5; }
.gs-spill[data-tone="warn"] span { color: #f2d27a; }
.gs-notice { margin: 0 0 12px; }
.gs-notice[data-tone="bad"] { border-left-color: var(--stop); }

.gs-text-sm { font-size: 16px; min-height: 46px; margin-bottom: 8px; }
.gs-qr-row { display: flex; gap: 12px; align-items: flex-start; }
.gs-qr-pick { flex: 1; min-width: 0; }
.gs-qr-pick .gs-label { display: block; margin-bottom: 4px; }
.gs-qr-value { font: 12px/1.3 ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }
.gs-qr-preview { width: 112px; flex: none; background: #fff; border-radius: 10px; padding: 4px; text-align: center; }
.gs-qr-preview svg { width: 100%; height: auto; display: block; }
.gs-qr-plabel { margin: 2px 0 0; color: #000; font-size: 10px; font-weight: 800; letter-spacing: .04em; overflow-wrap: anywhere; }
.gs-qr-new { margin-top: 12px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 12px; }
.gs-qr-new summary { cursor: pointer; font-weight: 800; letter-spacing: .06em; min-height: 32px; }
.gs-qr-new .gs-label { display: block; margin: 8px 0 4px; font-size: 12px; }
.gs-qr-draft { margin: 8px 0; }
.gs-qr .gs-ctl { margin-top: 12px; }
#gs-qr-pos .gs-seg-btn { font-size: 12px; padding: 8px 8px; }

/* ---------- 0.3.0 global Timer ---------- */
.gs-timer { container-type: inline-size; }
.gs-timer-clock { display: block; margin: 4px 0 8px; font: 800 clamp(44px, 18cqi, 88px)/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .02em; font-variant-numeric: tabular-nums; text-align: center; }
.gs-timer-clock[data-due="1"] { color: var(--accent); }
.gs-timer-bar { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.gs-timer-bar > span { display: block; height: 100%; background: var(--accent); }
.gs-timer-min { width: 6.5em; text-align: right; }
#gs-timer-presets .gs-seg-btn { flex: 1 0 3.2em; font-variant-numeric: tabular-nums; }
#gs-timer-action .gs-seg-btn { font-size: 13px; }
@container (min-width: 460px) { #gs-timer-presets { flex-wrap: nowrap; } }
.gs-seg-btn:disabled { opacity: .45; border-style: dashed; cursor: not-allowed; }

/* ---------- 0.3.0 games: Full-Field Control ---------- */
.gs-field { position: relative; height: min(56vh, 460px); min-height: 240px; border: 2px solid #8b8680; border-radius: var(--radius);
  background: #1a1c1e; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.gs-field-paddle { background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(139,134,128,.45) calc(50% - 1px), rgba(139,134,128,.45) calc(50% + 1px), transparent calc(50% + 1px)), #1a1c1e; }
.gs-field-label { position: absolute; left: 10px; bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #8b8680; pointer-events: none; }
.gs-field-mark { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 2px solid #4ecdc4; border-radius: 50%; pointer-events: none; }
.gs-field-paddle .gs-field-mark { width: 64px; height: 14px; margin: -7px 0 0 -32px; border-radius: 4px; }
/* 0.3.0 games: Industrial Playground palette (lemon = primary action, no orange) */
.gs-action[data-action="game.start"] { background: #f0e040; color: #1a1c1e; border-color: #f0e040; }
.gs-action[data-action="game.reset"] { background: #222528; color: #e8e4df; border-color: #8b8680; }

/* ---------- 0.3.0 information architecture ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.gs-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.gs-nav-link { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--text); text-decoration: none; }
.gs-nav-global { border-style: dashed; color: var(--accent); border-color: var(--accent); }
.gs-nav-sep { color: var(--muted); padding: 0 2px; }
.gs-cats-own { margin-top: 12px; }
.gs-cat-group h2 { margin: 0 0 8px; }


/* ---------- 0.3.2 garage usability pass ----------
   PHONE = DARK / REFLECTIVE / PORTRAIT. Status is shape + words, never colour alone. */
.gs-head { align-items: flex-end; scroll-margin-top: 12px; }
.gs-head:focus { outline: none; }
.gs-role { margin: 0 0 2px; font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--accent); }
.gs-sub { color: var(--muted); }

.gs-conn { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; padding: 12px 14px; border-radius: var(--radius);
  border: 2px solid var(--stop); background: #2a1715; }
.gs-conn[data-up="true"] { border-color: #7fd69a; background: #13261a; }
.gs-conn-mark { font-size: 26px; line-height: 1; color: #ffb0a5; }
.gs-conn[data-up="true"] .gs-conn-mark { color: #9fe8b4; }
.gs-conn-text { display: grid; gap: 2px; min-width: 0; }
.gs-conn-text b { font-size: 17px; letter-spacing: .08em; }
.gs-conn-text span { font-size: 14px; color: var(--text); opacity: .9; }

.gs-now { border-width: 2px; border-color: #6d7178; }
.gs-now .gs-sec-head { margin-bottom: 4px; }
.gs-now .gs-toggle { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.gs-now-scene { margin: 0; font-size: clamp(20px, 6vw, 28px); font-weight: 900; letter-spacing: .02em; overflow-wrap: anywhere; }
.gs-confirm { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #0b0c0d; border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 800; letter-spacing: .04em; overflow-wrap: anywhere; }
.gs-confirm[data-stage="sending"] { border-style: dashed; color: #f2d27a; }
.gs-confirm[data-stage="sent"], .gs-confirm[data-stage="delivered"] { color: #cfe9d6; border-color: #7fd69a; }
.gs-confirm[data-stage="shown"] { color: #9fe8b4; border-color: #7fd69a; border-width: 2px; }
.gs-confirm[data-stage="refused"], .gs-confirm[data-stage="dark"] { color: #ffb0a5; border-color: var(--stop); }
.gs-confirm[data-stage="idle"] { color: var(--muted); font-weight: 600; }

.gs-legend { margin: 0 0 14px; padding: 4px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.gs-legend summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.gs-grammar { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.gs-grammar li { display: grid; grid-template-columns: 4.2em auto 1fr; gap: 8px; align-items: baseline; font-size: 14px; }
.gs-g-icon { font-weight: 900; color: var(--accent); text-align: center; }
.gs-explain { margin: -4px 0 10px; }

.gs-more { margin-top: 12px; border-top: 1.5px dashed var(--line); padding-top: 4px; }
.gs-more summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 900; letter-spacing: .08em; font-size: 14px; }
.gs-more > .gs-ctls { margin-top: 8px; }

/* Ripple Stamp TOUCH PAD */
.gs-stamp { height: auto; min-height: 200px; aspect-ratio: 16 / 10; cursor: pointer; background: radial-gradient(circle at 50% 50%, #26240f 0, #121210 70%); border-color: var(--accent); }
.gs-stamp:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gs-stamp-marks { position: absolute; inset: 0; pointer-events: none; }
.gs-stamp-mark { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 3px solid var(--accent); border-radius: 50%;
  animation: gs-stamp 0.8s ease-out forwards; }
@keyframes gs-stamp { to { transform: scale(4); opacity: 0; } }
.gs-stamp-cursor { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px dashed var(--muted); border-radius: 50%; pointer-events: none; opacity: .7; }
.gs-stamp .gs-field-label { color: var(--accent); }

/* Recovery bar: HOME · RESET SCREEN · BLACKOUT · STOP SOUND */
.gs-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gs-bar .gs-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px;
  font-size: 12px; line-height: 1.1; text-align: center; text-decoration: none; color: var(--text); padding: 6px 2px; }
.gs-bar-icon { font-size: 18px; line-height: 1; }
.gs-bar .gs-reset { border-color: #f2d27a; }
#gs-blackout { background: #000; border-color: #f3f1e8; }
#gs-blackout[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* COMING SOON / PRESETS: visible, dim, not interactive */
.gs-soon-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gs-soon-item { padding: 8px 10px; border: 1.5px dashed #6d7178; border-radius: 10px; color: #a9aba4; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  cursor: default; user-select: none; -webkit-user-select: none; }
.gs-soon-item::after { content: " · soon"; font-weight: 600; color: #8d8f89; }
.gs-cat-group .gs-hint { margin-top: 6px; }
@media (max-width: 360px) { .gs-bar .gs-btn { font-size: 11px; } .gs-grammar li { grid-template-columns: 3.6em auto; } .gs-grammar li > span:last-child { grid-column: 2; } }
