/* Page 12 · Instrument setup (/setup). Phone-first, one column; a sub-page (back arrow), no tab bar. */

.s-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(250, 247, 242, 0.95); backdrop-filter: blur(10px); }
.s-row { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 var(--pad); max-width: 620px; margin: 0 auto; }
.s-row h1 { flex: 1; font-size: 1.15rem; }
.icon-btn { width: 44px; height: 44px; margin-left: -10px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--muted); }
@media (max-width: 419px) { .s-top .lang-switch button { min-width: 30px; padding: 4px 6px; } }

.setup { max-width: 620px; margin: 0 auto; padding: 4px var(--pad) calc(32px + env(safe-area-inset-bottom)); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }

section[role="tabpanel"] > * + * { margin-top: 10px; }
section[role="tabpanel"] { margin-top: 12px; }
.card { box-shadow: none; padding: 12px 14px; }
.status { display: flex; align-items: flex-start; gap: 10px; }
.dot { width: 12px; height: 12px; margin-top: 5px; flex: none; border-radius: 50%; background: #c9cbe0; }
.dot.ready { background: var(--ok); }
.dot.wait { background: var(--gold); }
.dot.bad { background: var(--bad); }
.status-text { display: grid; }
.status-text span { font-size: 0.85rem; color: var(--muted); }
.lbl { font-size: 0.78rem; font-weight: 700; color: var(--muted); }

.meter { height: 12px; margin-top: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.1s; }
.hint { margin-top: 4px; font-size: 0.8rem; color: var(--muted); min-height: 1.2em; }
.hint.low { color: var(--accent-ink); font-weight: 700; }
.tuner-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.heard { min-width: 72px; text-align: center; }
.heard b { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.tuner { flex: 1; max-width: 200px; }
#needle { transition: transform 0.12s; transform-origin: 70px 72px; }
.tune-text { font-size: 0.85rem; font-weight: 700; min-height: 1.3em; }
.tune-text.ok { color: #2e7d4b; }
.tune-text.off { color: var(--bad); }

.test-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.steps { display: inline-flex; gap: 4px; }
.steps i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 0.75rem; font-weight: 800; border: 1.5px solid #d8d2c6; color: #9a9fb8; }
.steps i.now { border: 2px solid var(--accent); color: var(--accent); }
.steps i.ok { border: 0; background: var(--ok); color: #fff; }
.test-staff svg { display: block; width: 100%; height: auto; color: var(--ink); margin-top: 6px; }
.test-staff.hit svg .tn { color: var(--ok); }
.test-ask { text-align: center; font-size: 0.95rem; }
.test-done { text-align: center; }
.test-done p { font-weight: 800; color: #2e7d4b; }
.test-done .btn { margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.kbd { position: relative; display: flex; height: 84px; margin-top: 6px; }
.kbd .w { flex: 1; background: #fff; border: 1px solid var(--line); border-left-width: 0; border-radius: 0 0 6px 6px; }
.kbd .w:first-child { border-left-width: 1px; }
.kbd .b { position: absolute; top: 0; height: 58%; transform: translateX(-50%); background: var(--ink); border-radius: 0 0 4px 4px; z-index: 1; }
.kbd .on { background: var(--ok) !important; }
.last-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.last-row b { font-size: 1.4rem; }
.last-row span { font-size: 0.8rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips span { padding: 6px 12px; border-radius: 999px; border: 1.5px solid #d8d2c6; color: var(--muted); font-weight: 800; font-size: 0.88rem; }
.chips span.ok { border-color: var(--ok); background: var(--ok); color: #fff; }

.toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background 0.2s; }
.track span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.toggle input:checked + .track { background: var(--ok); }
.toggle input:checked + .track span { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggle .sub { display: block; font-size: 0.8rem; color: var(--muted); }
.tips { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 0.85rem; color: var(--ink-2); }
.note { font-size: 0.82rem; color: var(--muted); }

.plus-lock { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; gap: 6px; }
.plus-lock p { color: var(--ink-2); font-size: 0.88rem; margin-bottom: 4px; }
.proto-states { margin-top: 24px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.proto-states button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 0.82rem; font-weight: 600; }
.proto-states button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
