:root {
  --bg: #15171a; --surface: #24272b; --surface2: #2d3136; --edge: #3a3f45; --text: #e6e9ed; --muted: #8d96a1;
  --screen: #0b1118; --screen2: #121c27; --accent: #3fb6ff; --accent2: #7fd4ff; --good: #3ddc97; --bad: #ff5d6c; --warn: #ffb547;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
button, select { font: inherit; color: inherit; }
b { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- power overlay ---------- */
.power { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at center, #1d2733 0%, #0b0d10 70%); transition: opacity .5s; }
.power.off { opacity: 0; pointer-events: none; }
.power-card { max-width: 520px; padding: 32px; text-align: center; }
.power-card ul { text-align: left; color: var(--muted); }
.power-btn { margin-top: 18px; padding: 14px 34px; border-radius: 40px; border: 1px solid #2f8fd0; background: linear-gradient(#1e6ea6, #134b74); font-size: 18px; cursor: pointer; box-shadow: 0 0 24px rgba(63,182,255,.35); }
.power-btn:hover { box-shadow: 0 0 34px rgba(63,182,255,.6); }

.brand { font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.brand span { color: var(--accent); font-weight: 500; }
.brand.big { font-size: 28px; margin-bottom: 8px; }

/* ---------- layout ---------- */
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid #000; background: linear-gradient(#202328, #1a1c20); }
.topbar-note { color: var(--muted); font-size: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 14px; padding: 14px; align-items: start; }
@media (max-width: 1180px) { .layout { grid-template-columns: 1fr; } }

/* ---------- console surface ---------- */
.console { display: grid; grid-template-columns: 158px minmax(0, 1fr) 128px; gap: 10px; padding: 12px; border-radius: 10px;
  background: linear-gradient(180deg, #2b2f34, #202327); border: 1px solid #3a3f45; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.45); min-height: 680px; }
.strip { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; background: linear-gradient(#26292e, #1d2024); border: 1px solid #33383e; }
.strip-foot { margin-top: auto; width: 100%; text-align: center; padding: 4px; border-radius: 4px; background: #e9edf2; color: #111; font-weight: 700; font-size: 12px; }
.lcd { width: 100%; padding: 6px 8px; border-radius: 5px; background: linear-gradient(#0d2236, #0a1826); border: 1px solid #000; box-shadow: inset 0 0 10px rgba(63,182,255,.25); color: #bfe6ff; }
.lcd b { display: block; font-size: 15px; color: #fff; }
.lcd-src { font-size: 11px; color: var(--accent2); }
.lcd.lr { box-shadow: inset 0 0 10px rgba(255,181,71,.25); }
.lcd.lr .lcd-src { color: var(--warn); }
.src-box { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.src-box label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.src-select, .ex-src { width: 100%; padding: 5px; border-radius: 5px; background: #121417; border: 1px solid var(--edge); }
.src-row { display: flex; gap: 6px; }
.play-btn { flex: 1; padding: 7px; border-radius: 5px; border: 1px solid #2c6b3f; background: linear-gradient(#24402e, #1a2e21); cursor: pointer; font-weight: 600; }
.play-btn.on { border-color: #8a2b33; background: linear-gradient(#4a2328, #321619); }
.src-note { font-size: 11px; color: var(--warn); min-height: 0; }
.tone-wrap { display: flex; justify-content: center; }
.btn-col { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.fader-area { display: flex; gap: 8px; align-items: stretch; justify-content: center; height: 300px; width: 100%; }
.meter-pair { display: flex; gap: 3px; }

/* LED buttons */
.tog { padding: 6px 10px; border-radius: 5px; border: 1px solid #111; background: linear-gradient(#3a3f46, #2c3036); cursor: pointer; font-weight: 600; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); transition: background .1s, box-shadow .1s; }
.tog:hover { filter: brightness(1.1); }
.tog.on { background: linear-gradient(#2a83c6, #1a5f94); box-shadow: 0 0 10px rgba(63,182,255,.5), inset 0 1px 0 rgba(255,255,255,.25); color: #fff; }
.tog.mute.on { background: linear-gradient(#d8424f, #a52832); box-shadow: 0 0 12px rgba(255,80,90,.55); }
.tog.pafl.on { background: linear-gradient(#36b36d, #227d4a); box-shadow: 0 0 12px rgba(61,220,151,.5); }
.tog.sel.on { background: linear-gradient(#e9edf2, #b9c0c9); color: #111; box-shadow: 0 0 10px rgba(255,255,255,.35); }
.tog.phantom.on { background: linear-gradient(#d14b4b, #9e2d2d); box-shadow: 0 0 12px rgba(255,80,80,.5); }
.tog.in.on { background: linear-gradient(#2fbf7f, #1f8a5a); box-shadow: 0 0 10px rgba(61,220,151,.5); }
.tog.small { padding: 3px 8px; font-size: 11px; }

/* Fader */
.fader { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.fbody { position: relative; flex: 1; display: flex; gap: 4px; }
.fscale { position: relative; width: 22px; font-size: 9px; color: var(--muted); }
.fscale span { position: absolute; right: 0; transform: translateY(50%); }
.ftrack { position: relative; width: 34px; cursor: ns-resize; touch-action: none; }
.ftrack::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%); background: #0a0b0d; border-radius: 3px; box-shadow: inset 0 0 3px #000; }
.fcap { position: absolute; left: 0; right: 0; height: 28px; border-radius: 4px; background: linear-gradient(#5a6068 0%, #8e959e 45%, #3d4248 52%, #6c737b 100%); box-shadow: 0 3px 6px rgba(0,0,0,.6); pointer-events: none; }
.fcap::after { content: ''; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; background: #fff; transform: translateY(-50%); }
.fread { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--accent2); background: #0a0f14; padding: 1px 6px; border-radius: 3px; min-width: 44px; text-align: center; }

/* Meter */
.meter { position: relative; width: 10px; height: 100%; background: #08090b; border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 3px #000; }
.meter .mfill { position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: linear-gradient(to top, #2ecc71 0%, #2ecc71 62%, #f1c40f 62%, #f1c40f 85%, #e74c3c 85%);
  background-size: 100% calc(var(--full, 1) * 100%); background-position: bottom; }
.meter .mpeak { position: absolute; left: 0; right: 0; height: 2px; background: #fff; bottom: 0; opacity: .8; }
.meter .mpeak.clip { background: #ff3b3b; }
.meter.horiz { width: 100%; height: 14px; }
.meter.horiz .mfill { top: 0; bottom: 0; right: auto; width: 0; height: auto; background: linear-gradient(to right, #2ecc71 0%, #2ecc71 70%, #f1c40f 70%, #f1c40f 90%, #e74c3c 90%); background-size: calc(var(--full, 1) * 100%) 100%; background-position: left; }
.meter.horiz .mpeak { top: 0; bottom: 0; width: 2px; height: auto; }
.meter.gr .mfill { top: 0; bottom: auto; background: #ffb547; }
.meter.gr .mpeak { display: none; }
.meter.horiz.gr .mfill { left: auto; right: 0; top: 0; bottom: 0; background: #ffb547; }

/* Knob */
.knob { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 82px; user-select: none; --kc: var(--accent); }
.knob.small { width: 70px; }
.klabel { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); white-space: nowrap; }
.dial { position: relative; width: 46px; height: 46px; border-radius: 50%; cursor: ns-resize; touch-action: none;
  background: conic-gradient(from -135deg, transparent 0turn, transparent calc(var(--a0) * .75turn), var(--kc) calc(var(--a0) * .75turn), var(--kc) calc(var(--a1) * .75turn), #1a1e23 calc(var(--a1) * .75turn), #1a1e23 .75turn, transparent .75turn); padding: 4px; }
.knob.small .dial { width: 38px; height: 38px; }
.dial::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5d646d, #2a2e33 70%); box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.15); }
.dial .ind { position: absolute; inset: 4px; transform: rotate(var(--rot)); }
.dial .ind::after { content: ''; position: absolute; left: 50%; top: 3px; width: 3px; height: 32%; margin-left: -1.5px; background: #fff; border-radius: 2px; }
.kval { font-size: 11px; font-variant-numeric: tabular-nums; color: #d9ecff; white-space: nowrap; text-align: center; min-height: 16px; }
.knob.tt-sel .dial { box-shadow: 0 0 0 2px #fff, 0 0 14px var(--kc); border-radius: 50%; }
.knob.tt-sel .klabel { color: #fff; }
.knob.disabled { opacity: .35; }
.knob.disabled .dial { cursor: default; }

/* ---------- touchscreen ---------- */
.screen-area { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.screen { flex: 1; display: flex; flex-direction: column; border-radius: 8px; border: 8px solid #0c0d0f; background: linear-gradient(var(--screen2), var(--screen)); box-shadow: 0 0 0 1px #444a51, inset 0 0 30px rgba(0,0,0,.6); overflow: hidden; min-height: 560px; }
.proc-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px; background: #0a0f15; border-bottom: 1px solid #1d2a38; }
.pt { text-align: left; padding: 6px 8px; border-radius: 5px; border: 1px solid #1f3042; background: #101a24; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.pt:hover { background: #142231; }
.pt.active { background: linear-gradient(#1b4f7a, #133a5a); border-color: var(--accent); }
.pt-name { font-weight: 700; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.pt-led { width: 7px; height: 7px; border-radius: 50%; background: #34414f; display: inline-block; }
.pt-led.on { background: var(--good); box-shadow: 0 0 6px var(--good); }
.pt-status { font-size: 10px; color: #9fbcd6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { display: none; flex: 1; flex-direction: column; gap: 10px; padding: 10px; min-height: 0; }
.page.active { display: flex; }
.graph { width: 100%; display: block; border-radius: 6px; background: #070c11; border: 1px solid #1a2836; touch-action: none; }
.graph.big { height: 290px; }
.graph.small { height: 200px; }
.prow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.psec { flex: 1; min-width: 220px; border: 1px solid #1d2a38; border-radius: 6px; background: rgba(16,26,36,.6); }
.psec-t { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent2); padding: 5px 8px; border-bottom: 1px solid #1d2a38; }
.psec-b { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; }
.tog-col { display: flex; flex-direction: column; gap: 6px; }
.hmeter-wrap { width: 100%; }
.hscale { position: relative; height: 14px; font-size: 9px; color: var(--muted); }
.hscale span { position: absolute; transform: translateX(-50%); }
.readout { font-variant-numeric: tabular-nums; color: var(--accent2); font-size: 12px; }
.tip { color: #9fb2c4; font-size: 13px; margin: 4px 0 0; }
.tip.small { font-size: 12px; }
.led-big { padding: 6px 14px; border-radius: 5px; background: #3a1a1e; color: #ff8a94; font-weight: 800; letter-spacing: .1em; }
.led-big.open { background: #173a2a; color: var(--good); }
.grbox { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 140px; font-size: 11px; color: var(--muted); }
.peq-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 11px; }
.bands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.band { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 6px; border: 1px solid #1d2a38; border-top: 3px solid var(--bc); background: rgba(16,26,36,.6); }
.band-h { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0 6px; }
.band-h b { color: var(--bc); }
.seg { display: inline-flex; border: 1px solid #1f3042; border-radius: 6px; overflow: hidden; background: #0d151d; flex-wrap: wrap; }
.seg button { padding: 5px 10px; border: 0; background: transparent; cursor: pointer; font-size: 12px; color: #a9bccd; }
.seg button + button { border-left: 1px solid #1f3042; }
.seg button.on { background: linear-gradient(#2a83c6, #1a5f94); color: #fff; }
.seg.mini button { padding: 3px 8px; font-size: 11px; }
.seg.fixed { opacity: .5; pointer-events: none; }
.comp-vis { display: flex; gap: 8px; }
.transfer { width: 220px; height: 220px; border-radius: 6px; background: #070c11; border: 1px solid #1a2836; }
.grcol { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); height: 220px; }
.grcol .meter { width: 14px; flex: 1; }

/* Touch & Turn */
.tt-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 16px; border-radius: 8px; background: linear-gradient(#26292e, #1d2024); border: 1px solid #33383e; }
.tt-text small { display: block; font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.tt-label { font-weight: 700; }
.tt-val { color: var(--accent2); font-variant-numeric: tabular-nums; font-size: 16px; }
.tt-dial { position: relative; width: 74px; height: 74px; border-radius: 50%; cursor: ns-resize; touch-action: none; background: radial-gradient(circle at 35% 30%, #6a717a, #24282d 70%); box-shadow: 0 0 0 3px #111, 0 0 0 5px #3fb6ff55, 0 6px 12px rgba(0,0,0,.6); }
.tt-ind { position: absolute; left: 50%; top: 6px; width: 4px; height: 16px; margin-left: -2px; background: #fff; border-radius: 2px; }
.tt-help { font-size: 11px; color: var(--muted); }

/* ---------- lab / tabs ---------- */
.lab { background: var(--surface); border: 1px solid var(--edge); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 80px); position: sticky; top: 14px; }
@media (max-width: 1180px) { .lab { max-height: none; position: static; } }
.lab-tabs { display: grid; grid-template-columns: repeat(4, 1fr); background: #1b1e22; border-bottom: 1px solid #000; }
.lab-tabs button { padding: 11px 6px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.lab-tabs button.on { color: #fff; border-bottom-color: var(--accent); background: var(--surface); }
.tab { display: none; padding: 14px; overflow-y: auto; }
.tab.active { display: block; }
.lead { color: #c2cad3; margin-top: 0; }
.cards { display: grid; gap: 8px; }
.card { display: flex; gap: 12px; text-align: left; padding: 12px; border-radius: 8px; border: 1px solid var(--edge); background: var(--surface2); cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card p { margin: 2px 0 4px; color: #b7c0ca; font-size: 13px; }
.card small { color: var(--muted); }
.card-i { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #16324a; color: var(--accent2); font-size: 20px; }
.btn { padding: 7px 14px; border-radius: 6px; border: 1px solid var(--edge); background: var(--surface2); cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(#2a83c6, #1a5f94); border-color: #2a83c6; color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.ex-head { display: flex; align-items: center; gap: 12px; }
.ex-head h3 { margin: 0; }
.ex-desc { color: #b7c0ca; font-size: 13px; }
.ex-settings { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 8px; background: #1e2125; border: 1px solid var(--edge); margin-bottom: 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.fld > span:empty { display: none; }
.ex-stage { display: flex; flex-direction: column; gap: 10px; }
.ex-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg.ab button { padding: 9px 16px; font-size: 13px; font-weight: 600; }
.seg.ab button.on { background: linear-gradient(#e0a33a, #b97c18); color: #111; }
.ans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ans { padding: 9px 4px; border-radius: 6px; border: 1px solid var(--edge); background: var(--surface2); cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.ans:hover { border-color: var(--accent); }
.ans.right { background: #1d5a3e; border-color: var(--good); }
.ans.wrong { background: #5a1d24; border-color: var(--bad); }
.ex-feedback { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #1c2025; border-left: 3px solid var(--accent); min-height: 40px; }
.ex-feedback.good { border-left-color: var(--good); }
.ex-feedback.bad { border-left-color: var(--bad); }
.ex-feedback.ok { border-left-color: var(--warn); }
.ex-feedback .zone { margin: 6px 0; }
.score { font-size: 34px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.score small { font-size: 14px; color: var(--muted); font-weight: 500; }
.ex-stats { margin-top: 10px; font-size: 12px; color: var(--muted); }
.ring-status { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.ring { padding: 3px 8px; border-radius: 12px; background: #5a1d24; animation: pulse 0.8s infinite alternate; }
.ring.tamed { background: #1d5a3e; animation: none; }
@keyframes pulse { to { background: #8a2b36; } }

/* Pitch */
.pitch-modes { margin-bottom: 4px; }
.pitch-area { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.piano { position: relative; height: 130px; margin-top: 6px; user-select: none; }
.wk { position: absolute; top: 0; bottom: 0; background: linear-gradient(#fdfdfd, #dfe3e8); border: 1px solid #555; border-radius: 0 0 5px 5px; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; }
.wk span { font-size: 9px; color: #555; padding-bottom: 4px; }
.bk { position: absolute; top: 0; height: 62%; background: linear-gradient(#333, #0b0b0b); border-radius: 0 0 4px 4px; z-index: 2; cursor: pointer; border: 1px solid #000; }
.wk.lit, .bk.lit { background: var(--accent); }
.wk.right, .bk.right { background: var(--good); }
.wk.wrong, .bk.wrong { background: var(--bad); }
.mini-ref summary { cursor: pointer; color: var(--accent2); }
.ftable, .ptable { border-collapse: collapse; width: 100%; font-size: 12px; margin: 6px 0; }
.ftable td, .ftable th, .ptable td, .ptable th { padding: 4px 6px; border-bottom: 1px solid var(--edge); text-align: left; }
.spark { display: flex; align-items: flex-end; gap: 1px; height: 22px; width: 100px; }
.spark i { flex: 1; background: var(--good); min-width: 2px; }
.spark i.w { background: var(--bad); }

/* Study */
.st-sec { margin-bottom: 22px; }
.st-sec h3 { margin: 0 0 8px; color: var(--accent2); font-size: 15px; }
.st-sec ul, .st-sec ol { padding-left: 20px; margin: 6px 0; }
.st-sec li { margin: 3px 0; }
.zones { display: flex; flex-direction: column; gap: 4px; }
.zone-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; background: var(--surface2); font-size: 12px; }
.zr-f { font-weight: 700; color: var(--accent2); font-variant-numeric: tabular-nums; }
.zr-b { display: flex; flex-direction: column; gap: 3px; }
.presets { display: grid; gap: 8px; }
.preset { padding: 8px 10px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--edge); font-size: 12px; }
.pr-h { display: flex; justify-content: space-between; align-items: center; }
.preset ul { color: #b7c0ca; }
.circle { position: relative; width: 220px; height: 220px; margin: 10px auto; border-radius: 50%; border: 1px dashed var(--edge); }
.cof { position: absolute; left: 50%; top: 50%; width: 40px; margin: -18px 0 0 -20px; text-align: center; transform: rotate(calc(var(--i) * 30deg)) translateY(-90px) rotate(calc(var(--i) * -30deg)); }
.cof b { display: block; font-size: 13px; }
.cof small { color: var(--muted); font-size: 10px; }
.flow li { margin: 4px 0; }

/* ===================== SQ-style touchscreen ===================== */
.screen { display: grid; grid-template-columns: 96px minmax(0, 1fr) 62px; grid-template-rows: 34px 1fr; gap: 0;
  border: 8px solid #0c0d0f; border-radius: 8px; overflow: hidden; min-height: 600px;
  background: linear-gradient(160deg, #1f8f95 0%, #146a74 45%, #0d4b57 100%); box-shadow: 0 0 0 1px #444a51; }
.sq-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 8px; background: linear-gradient(#f3f5f7, #cfd5da); color: #111; font-size: 12px; }
.sq-title { background: #fff; border: 1px solid #8a949c; padding: 2px 14px; font-weight: 800; font-size: 13px; min-width: 110px; }
.sq-tag { background: #f3e45a; color: #333; font-size: 9px; line-height: 1.1; padding: 2px 10px; text-align: center; font-weight: 700; }
.sq-scene { display: flex; flex-direction: column; font-size: 11px; line-height: 1.1; min-width: 80px; }
.sq-scene small { color: #555; }
.sq-head-r { margin-left: auto; font-weight: 700; background: #2d3e4a; color: #fff; padding: 2px 10px; border-radius: 3px; }
.sq-side { display: flex; flex-direction: column; gap: 4px; padding: 6px 5px; background: rgba(0,30,40,.35); border-right: 1px solid rgba(255,255,255,.15); }
.sq-blk { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px; border-radius: 3px; border: 1px solid rgba(255,255,255,.25); background: rgba(10,40,52,.75); cursor: pointer; text-align: left; color: #e9f6f8; }
.sq-blk:hover { border-color: #fff; }
.sq-blk.active { outline: 2px solid #fff; background: rgba(20,70,90,.9); }
.sq-blk.static { cursor: default; }
.sq-blk-t { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #cdeff2; }
.sq-name { background: #3fbf4f; color: #08210d; font-weight: 800; text-align: center; border-radius: 2px; font-size: 13px; }
.sq-local { font-size: 9px; text-align: center; color: #e6fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-gainrow { display: flex; align-items: center; justify-content: space-between; }
.sq-gain { display: flex; align-items: baseline; gap: 2px; font-weight: 700; font-size: 13px; }
.sq-gain small { font-size: 8px; }
.sq-gdial { width: 20px; height: 20px; border-radius: 50%; align-self: center; background: conic-gradient(from -135deg, #ff4a4a calc(var(--n, .33) * .75turn), #e9eef2 0 .75turn, transparent 0); }
.sq-48 { font-size: 9px; font-weight: 800; padding: 1px 3px; border-radius: 2px; background: #3a4650; color: #9aa6b0; }
.sq-48.on { background: #d43b3b; color: #fff; }
.sq-mini { width: 100%; height: 34px; display: block; border-radius: 2px; }
.sq-pan { position: relative; height: 6px; background: #0b1a28; border-radius: 3px; margin: 3px 2px; }
.sq-pan i { position: absolute; top: -2px; width: 4px; height: 10px; margin-left: -2px; background: #fff; border-radius: 1px; }
.sq-main { position: relative; min-width: 0; display: flex; flex-direction: column; }
.sq-main .page { padding: 8px; }
.sq-rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px; border-left: 1px solid rgba(255,255,255,.15); }
.sq-rail .meter { width: 12px; flex: 1; min-height: 140px; }
.sq-rta { width: 52px; padding: 2px 0 6px; border: 1px solid #fff; border-radius: 3px; background: #2a3b48; color: #fff; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.sq-rta small { font-size: 9px; background: #3bb34a; width: 100%; margin-bottom: 4px; }
.sq-rta:not(.on) small { background: #5a6670; }
.sq-in { width: 50px; height: 50px; border-radius: 50%; border: 2px solid #e9f6f8; background: radial-gradient(circle at 40% 35%, #5ed08b, #2a8f54); color: #08210d; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; }
.sq-in i { width: 22px; height: 6px; border-radius: 3px; background: #0d3a20; }
.sq-in:not(.on) { background: radial-gradient(circle at 40% 35%, #6c7a84, #3b464e); color: #d9e2e8; }
.sq-in:not(.on) i { background: #222; }
.screen .graph { background: #0a1a29; border: 1px solid rgba(255,255,255,.35); border-radius: 2px; }
.screen .graph.big { height: 300px; }
.sq-bands { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1.25fr; gap: 6px; }
.sq-band { border: 1px solid rgba(255,255,255,.35); background: rgba(5,30,40,.55); border-radius: 2px; }
.sq-band-h { text-align: center; font-weight: 800; font-size: 13px; color: var(--bc); background: linear-gradient(rgba(255,255,255,.9), rgba(220,230,235,.9)); border-bottom: 2px solid var(--bc); }
.sq-band-b { display: flex; gap: 6px; padding: 6px; justify-content: center; }
.sq-vals { display: flex; flex-direction: column; gap: 6px; flex: 1; max-width: 110px; }
.sq-modes { display: flex; flex-direction: column; gap: 6px; }
.sq-mode { width: 38px; height: 30px; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; background: #0b2533; cursor: pointer; padding: 3px; }
.sq-mode svg { width: 100%; height: 100%; fill: none; stroke: #cfe9ee; stroke-width: 2; }
.sq-mode.on { border-color: #fff; box-shadow: 0 0 0 1px var(--bc) inset; background: #123d50; }
.sq-mode.on svg { stroke: #fff; }
.peq-hint { font-size: 10px; color: #cdeff2; opacity: .8; }
.sq-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sq-grp { flex: 1; min-width: 200px; border: 1px solid rgba(255,255,255,.35); background: rgba(5,30,40,.55); border-radius: 2px; }
.sq-grp-t { font-size: 11px; font-weight: 800; color: #0d3442; background: linear-gradient(rgba(255,255,255,.9), rgba(220,230,235,.9)); padding: 1px 8px; }
.sq-grp-b { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 8px; }
.screen .tip { color: #d8f1f4; }
.screen .muted { color: #b5d6dc; }

/* value box (SQ touch field) */
.vbox { display: flex; flex-direction: column; gap: 2px; min-width: 84px; user-select: none; --kc: #8fd3ff; }
.vlabel { font-size: 10px; color: #cdeff2; text-transform: uppercase; letter-spacing: .05em; }
.vfield { background: #051520; border: 1px solid rgba(255,255,255,.75); border-radius: 2px; padding: 3px 6px 4px; cursor: ns-resize; touch-action: none; }
.vtext { color: #fff; font-weight: 700; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vbar { position: relative; height: 4px; margin-top: 3px; background: #23343f; }
.vbar i { position: absolute; top: 0; bottom: 0; left: calc(var(--a0, 0) * 100%); width: calc((var(--a1, 0) - var(--a0, 0)) * 100%); background: var(--kc); }
.vbox.tt-sel .vfield { border-color: #f3e45a; box-shadow: 0 0 0 2px #f3e45a, 0 0 10px rgba(243,228,90,.5); }
.vbox.disabled { opacity: .35; }
.vbox.disabled .vfield { cursor: default; }
.screen .tog { border-color: rgba(255,255,255,.5); }
.screen .seg { border-color: rgba(255,255,255,.4); }
.screen .readout { color: #fff; }
.screen .transfer { background: #0a1a29; border: 1px solid rgba(255,255,255,.35); }
.coach-btn { display: block; margin-bottom: 6px; }

/* ===================== Coach ===================== */
.coach-modal { position: fixed; inset: 0; z-index: 40; background: rgba(5,8,12,.6); display: flex; justify-content: flex-end; }
.coach-card { width: min(560px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--edge); display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.5); }
.coach-head, .coach-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--edge); }
.coach-foot { border-top: 1px solid var(--edge); border-bottom: 0; justify-content: flex-start; }
.coach-head h3 { margin: 0; }
.coach-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.coach-wait { padding: 40px 0; text-align: center; color: var(--accent2); animation: pulse2 1s infinite alternate; }
@keyframes pulse2 { to { opacity: .4; } }
.coach-top { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.coach-area { margin-bottom: 12px; }
.coach-area-t { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent2); margin-bottom: 4px; }
.coach-item { display: flex; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--surface2); margin-bottom: 5px; border-left: 3px solid var(--accent); font-size: 13px; }
.coach-item.good { border-left-color: var(--good); } .coach-item.warn { border-left-color: var(--warn); } .coach-item.bad { border-left-color: var(--bad); }
.ci-icon { font-weight: 800; width: 14px; flex: none; }
.coach-item.good .ci-icon { color: var(--good); } .coach-item.warn .ci-icon { color: var(--warn); } .coach-item.bad .ci-icon { color: var(--bad); } .coach-item.info .ci-icon { color: var(--accent2); }
.ci-why, .ci-tip { color: #c2cad3; margin-top: 2px; }
.ci-why em, .ci-tip em { color: var(--muted); font-style: normal; font-weight: 700; }
.ci-tip { color: #e6d9a8; }
.coach-break { margin: 8px 0; padding: 8px 10px; background: #15181c; border-radius: 6px; font-size: 13px; line-height: 1.6; }
.coach-tip { margin-top: 6px; color: #e6d9a8; }

/* ===== SQ screen, round 2: matched to the hardware photo ===== */
.screen { grid-template-columns: 84px minmax(0, 1fr) 70px; background: linear-gradient(180deg, #3f8fc4 0%, #347fb5 55%, #2b6d9e 100%); border-color: #050607; }
.sq-head { background: linear-gradient(#e9edf1, #c9d1d8); }
.sq-title { background: #f7f9fb; border: 1px solid #6d7a85; font-weight: 600; font-size: 14px; }
.sq-tag { background: #ede25b; color: #4b4b22; font-weight: 500; }
.sq-side { background: transparent; border-right: 0; padding: 6px 4px; gap: 6px; }
.sq-id { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.sq-name { background: linear-gradient(#e3f6f4, #b9e3df); color: #0c2c36; font-weight: 700; border: 1px solid #fff; border-radius: 2px; padding: 1px 0; }
.sq-local { color: #fff; font-weight: 700; font-size: 10px; }
.sq-unassigned { color: #fff; font-weight: 700; font-size: 10px; }
.sq-insert { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 4px; border-radius: 3px; background: rgba(150,180,200,.45); color: #e8f0f5; font-size: 11px; border: 1px solid rgba(255,255,255,.35); }
.sq-insert i { width: 9px; height: 9px; border-radius: 50%; background: #7aa7c7; }
.sq-blk { background: #0e2142; border: 2px solid rgba(255,255,255,.55); border-radius: 2px; padding: 2px; }
.sq-blk.active { outline: 0; border-color: #fff; box-shadow: 0 0 0 1px #fff; background: #0e2142; }
.sq-blk-t { color: #fff; font-size: 9px; }
.sq-mini { height: 30px; }
.sq-rail { border-left: 0; padding: 6px 4px 10px; gap: 8px; }
.sq-rmeter { position: relative; display: flex; justify-content: flex-end; width: 100%; height: 300px; }
.sq-rmeter .meter { width: 9px; height: 100%; min-height: 0; }
.sq-rscale { position: absolute; right: 13px; top: 0; bottom: 0; font-size: 8px; color: #fff; }
.sq-rscale span { position: absolute; right: 0; transform: translateY(-50%); }
.sq-rta { width: 54px; height: 40px; padding: 0; justify-content: center; border: 2px solid #fff; border-radius: 3px; background: #2b6a98; font-size: 12px; margin-top: 30px; }
.sq-rta.on { background: #1c4c74; box-shadow: inset 0 0 0 2px #4ea3dc; }
.sq-in-l { color: #fff; font-weight: 700; font-size: 13px; margin-top: 6px; }
.sq-in { width: 46px; height: 46px; border: 3px solid #fff; margin-top: -4px; }
.sq-in i { width: 18px; height: 5px; background: #cfeedd; opacity: .85; }
.sq-in.on { background: radial-gradient(circle at 40% 35%, #a6f088, #4cc25a 60%, #2f9a43); }
.screen .graph { background: #0e2142; border: 2px solid rgba(255,255,255,.85); border-radius: 0; }
.screen .graph.big { height: 300px; }
.sq-bands { grid-template-columns: 1.45fr 1fr 1fr 1.45fr; gap: 10px; }
.sq-band { background: transparent; border: 1px solid rgba(10,30,60,.6); border-radius: 0; }
.sq-band-h { background: #0e2142; color: var(--bc); border-bottom: 0; font-size: 14px; padding: 1px 0; }
.sq-band-b { padding: 6px 4px; gap: 8px; background: rgba(20,60,100,.25); }
.sq-vals { max-width: 96px; gap: 8px; }
.sq-modes { gap: 8px; }
.sq-mode { width: 46px; height: 34px; border: 2px solid var(--bc); border-radius: 3px; background: #0e2142; padding: 4px 6px; }
.sq-mode svg { stroke: #fff; stroke-width: 1.8; }
.sq-mode.on { background: #0e2142; box-shadow: none; border-color: var(--bc); }
.sq-mode.on svg { stroke: var(--bc); stroke-width: 2.2; }
.sq-mode:not(.on) { border-color: #fff; }
.vfield { background: #0e2142; border: 2px solid var(--kc); border-radius: 3px; padding: 4px 6px 5px; }
.vtext { font-size: 14px; font-weight: 600; }
.vbar { height: 5px; background: rgba(255,255,255,.16); margin-top: 4px; }
.vbar i { background: #ffffff; }
.vbox.tt-sel .vfield { border-color: #ffffff; box-shadow: 0 0 0 2px #f3e45a; }
.peq-hint { color: #eaf4fb; }
.sq-grp { background: rgba(14,33,66,.35); border-color: rgba(255,255,255,.4); }
.sq-grp-t { background: #0e2142; color: #fff; }
/* hardware keys under the screen */
.sq-keys { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; padding: 6px 10px 2px; background: #101113; border-radius: 0 0 8px 8px; margin-top: -10px; }
.sq-key { display: flex; flex-direction: column; align-items: center; gap: 4px; background: transparent; border: 0; cursor: pointer; color: #e8eaed; font-size: 12px; font-weight: 600; }
.sq-key i { width: 100%; max-width: 64px; height: 22px; border-radius: 4px; background: linear-gradient(#9d5a63, #7b3f48); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 3px rgba(0,0,0,.6); }
.sq-key.on i { background: linear-gradient(#5f7d62, #3e5a42); position: relative; }
.sq-key.on i::after { content: ''; position: absolute; left: 50%; top: 7px; width: 22px; height: 8px; margin-left: -11px; border-radius: 4px; background: #6dff6a; box-shadow: 0 0 10px #6dff6a; }
.sq-rmeter .meter { flex: none; }
.sq-main { overflow: hidden; }
.sq-bands { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 6px; }
.sq-bands .vbox { min-width: 0; }
.sq-band-b { gap: 5px; padding: 6px 4px; }
.sq-mode { width: 38px; height: 30px; padding: 3px 4px; }
.vtext { font-size: 13px; }
.ans.letter { font-size: 16px; padding: 12px 4px; }
.ans.letter.acc { font-size: 13px; background: #1f2328; }
