/* Tuner presentation only: audio capture, frequencies and access rules are unchanged. */
.tuner-screen { --tuner-ink:#112238; --tuner-muted:#a6b4c3; width:min(100%,620px); position:relative; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }
.tuner-screen > .lessons-back { position:absolute; top:0; left:0; }
.tuner-screen .tuner-heading { min-height:44px; margin:0 0 16px; padding:8px 90px 0; }
.tuner-screen .tuner-heading h1 { margin:0; font-size:1.45rem; font-weight:650; letter-spacing:-.035em; }
.tuner-screen .tuner-surface { display:block; color:#f6f8fb; background:#112238; border:1px solid #26384c; border-radius:24px; box-shadow:0 14px 40px #1021361c; }
.tuner-instruments { padding:18px 22px 0; }
.tuner-current { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:0 0 14px; color:#f6f8fb; background:none; border:0; border-bottom:1px solid #ffffff14; text-align:left; font:inherit; cursor:pointer; }
.tuner-current__icon { display:grid; place-items:center; flex:none; width:42px; height:42px; background:#ffffff08; border:1px solid #ffffff14; border-radius:12px; }
.tuner-current__icon svg,.tuner-instrument svg { width:28px; height:32px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.5; }
.tuner-current__copy { display:grid; gap:4px; flex:1; }
.tuner-current__copy strong { font-size:1rem; font-weight:600; }
.tuner-current__copy small { color:var(--tuner-muted); font-size:.75rem; }
.tuner-current__chevron { width:20px; height:20px; fill:none; stroke:#b8c7d7; stroke-width:1.5; }
.tuner-tuning-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; }
.tuner-tuning-row > span,.tuner-strings-heading > span { color:var(--tuner-muted); font-size:.75rem; font-weight:500; }
.tuner-segmented { display:flex; gap:4px; padding:3px; border:1px solid #ffffff18; border-radius:11px; }
.tuner-segmented button { min-width:76px; min-height:44px; padding:7px 12px; color:var(--tuner-muted); background:none; border:1px solid transparent; border-radius:8px; font:inherit; font-size:.8rem; font-weight:550; cursor:pointer; }
.tuner-segmented button[aria-pressed="true"] { background:#ffffff0e; border-color:#ffffff22; color:#fff; }
.tuner-screen .tuner-live { display:grid; min-height:0; justify-items:center; padding:12px 22px 22px; }
.tuner-screen .tuner-meter { width:100%; max-width:500px; margin:0; }
.tuner-screen .tuner-meter__needle { filter:drop-shadow(0 2px 5px #0005); }
.tuner-screen .tuner-meter__needle-line { stroke-width:3; }
.tuner-screen .tuner-live[data-tuning-state="no-signal"] .tuner-meter__needle { opacity:.85; }
.tuner-screen .tuner-arc__segment { stroke:#4c6074; opacity:1; stroke-width:4; }
.tuner-screen .tuner-arc__segment--center { stroke:#c9d4df; stroke-width:5; }
.tuner-screen .tuner-arc__segment.is-active { stroke:currentColor; }
.tuner-screen .tuner-meter__labels { margin:2px 2% 0; font-size:.6rem; letter-spacing:.08em; font-weight:500; }
.tuner-screen .tuner-meter__labels strong { font-weight:500; }
.tuner-screen .tuner-note { margin-top:18px; }
.tuner-screen .tuner-note strong { font-size:5.5rem; line-height:.95; font-weight:500; letter-spacing:-.06em; text-shadow:none; }
.tuner-screen .tuner-live[data-tuning-state="no-signal"] .tuner-note strong { color:#c5d1de; font-size:3.8rem; line-height:1; }
.tuner-screen .tuner-note > span { margin-top:8px; font-size:.8rem; font-weight:450; color:var(--tuner-muted); }
.tuner-screen .tuner-live[data-tuning-state="no-signal"] .tuner-note > span { display:none; }
.tuner-screen .tuner-status { min-height:1.5em; margin-top:10px; font-size:1.05rem; font-weight:550; letter-spacing:-.015em; }
.tuner-screen .tuner-secondary-data { margin-top:5px; font-size:.7rem; color:var(--tuner-muted); }
.tuner-screen .tuner-live[data-tuning-state="no-signal"] .tuner-secondary-data { display:none; }
.tuner-targets { width:100%; margin-top:22px; padding-top:16px; border-top:1px solid #ffffff14; }
.tuner-strings-heading { display:flex; align-items:center; justify-content:space-between; min-height:28px; margin-bottom:8px; }
.tuner-auto { min-height:32px; padding:4px 0 4px 12px; color:var(--tuner-muted); background:none; border:0; font:inherit; font-size:.72rem; cursor:pointer; }
.tuner-auto[aria-pressed="true"] { color:#bdebf0; }
.tuner-auto[aria-pressed="true"]::before { content:"●"; font-size:.5rem; margin-right:6px; }
.tuner-strings { display:grid; grid-template-columns:repeat(var(--tuner-string-count,6),minmax(0,1fr)); gap:6px; }
.tuner-string { display:grid; align-content:center; justify-items:center; gap:4px; min-width:0; min-height:54px; padding:6px 0; color:#dce5ee; background:transparent; border:1px solid #ffffff12; border-radius:11px; font:inherit; cursor:pointer; }
.tuner-string small { font-size:.6rem; font-weight:450; color:#96a8bb; }
.tuner-string strong { font-size:1.1rem; font-weight:550; }
.tuner-string[aria-pressed="true"] { background:#ffffff0a; border-color:#d2dfe8; color:#fff; }
.tuner-string[data-heard="true"] { border-color:#69c7a3; background:#69c7a30c; }
.tuner-voices { justify-content:center; margin-top:10px; }
.tuner-voices button { flex:1; min-height:44px; padding-inline:6px; }
.tuner-targets > p { margin:10px 0 0; color:var(--tuner-muted); font-size:.7rem; line-height:1.5; text-align:left; }
.tuner-screen .tuner-intro { width:100%; min-height:0; padding:0; margin-top:18px; }
.tuner-screen .tuner-intro h2 { font-size:1.1rem; }
.tuner-screen .tuner-intro > p:not(.tuner-privacy) { font-size:.82rem; }
.tuner-screen:not([data-state="error"]) .tuner-intro h2,
.tuner-screen:not([data-state="error"]) #tunerIntroDescription { display:none; }
.tuner-screen .tuner-primary-button { width:100%; min-height:48px; margin:0; color:#112238; background:#f1f5f9; border:1px solid #f1f5f9; border-radius:12px; box-shadow:none; font-size:.9rem; font-weight:650; }
.tuner-screen .tuner-primary-button:hover:not(:disabled) { background:#fff; }
.tuner-screen .tuner-privacy { margin:10px 0 0!important; padding:0; color:#8d9fb2; background:none; border:0; font-size:.65rem; line-height:1.5; }
.tuner-screen .tuner-stop-button { width:100%; min-height:46px; margin-top:18px; color:#dce5ee; background:none; border:1px solid #ffffff30; border-radius:12px; font-size:.85rem; font-weight:500; }
.tuner-screen [hidden] { display:none!important; }
.tuner-screen button:focus-visible { outline:2px solid #88d7e5; outline-offset:4px; }
.tuner-screen[data-state="error"] .tuner-meter,
.tuner-screen[data-state="error"] .tuner-note,
.tuner-screen[data-state="error"] .tuner-status { display:none; }
.tuner-picker { box-sizing:border-box; width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:24px; color:#15263a; background:#fcfdff; border:1px solid #dce3eb; border-radius:24px; box-shadow:0 24px 80px #0005; }
.tuner-picker::backdrop { background:#07111fb3; backdrop-filter:blur(5px); }
.tuner-picker header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:22px; }
.tuner-picker header p { margin:0 0 5px; color:#778596; font-size:.65rem; font-weight:600; letter-spacing:.14em; }
.tuner-picker h2 { margin:0; font-size:1.4rem; font-weight:650; letter-spacing:-.035em; }
#tunerPickerClose { flex:none; width:44px; height:44px; color:#526477; background:#f0f3f6; border:0; border-radius:50%; font-size:1.6rem; cursor:pointer; }
.tuner-instrument-grid { display:grid; gap:8px; }
.tuner-instrument { display:grid; grid-template-columns:40px 1fr 20px; grid-template-rows:1fr 1fr; column-gap:12px; min-height:72px; padding:12px 14px; color:#25394e; background:#fff; border:1px solid #e1e7ee; border-radius:14px; text-align:left; font:inherit; cursor:pointer; }
.tuner-instrument svg { grid-column:1; grid-row:1/3; align-self:center; justify-self:center; }
.tuner-instrument > span { align-self:end; font-size:.95rem; font-weight:600; }
.tuner-instrument small { grid-column:2; align-self:start; color:#788595; font-size:.75rem; }
.tuner-instrument:not(:has(small)) > span { grid-row:1/3; align-self:center; }
.tuner-instrument[aria-pressed="true"] { border-color:#34556b; background:#f0f5f7; }
.tuner-instrument[aria-pressed="true"]::after { content:"✓"; grid-column:3; grid-row:1/3; align-self:center; color:#277982; font-weight:700; }
@media(min-width:720px) {
 .tuner-screen .tuner-live { padding-inline:38px; }
 .tuner-instruments { padding-inline:38px; padding-top:24px; }
 .tuner-screen .tuner-meter { max-width:440px; }
}
@media(max-width:520px) {
 body:has(#tunerScreen:not([hidden])) .app-header { display:none; }
 .app-main:has(#tunerScreen:not([hidden])) { padding:8px 8px 110px; }
 .tuner-screen .tuner-heading { padding-inline:100px 0; text-align:right; margin-bottom:14px; }
 .tuner-screen .tuner-surface { border-radius:20px; }
 .tuner-instruments { padding:16px 16px 0; }
 .tuner-screen .tuner-live { padding:10px 16px 18px; }
 .tuner-screen .tuner-note { margin-top:14px; }
 .tuner-screen .tuner-note strong { font-size:4.8rem; }
 .tuner-targets { margin-top:18px; padding-top:12px; }
 .tuner-strings { gap:4px; }
 .tuner-picker { margin:auto 16px 16px; width:calc(100vw - 32px); border-radius:24px; }
}

.tuner-targets { display:block; margin-top:16px; padding:0; border:1px solid #ffffff1a; border-radius:12px; text-align:left; }
.tuner-targets > summary { display:flex; align-items:center; gap:10px; min-height:48px; padding:10px 12px; list-style:none; color:#dce5ee; cursor:pointer; font-size:.8rem; }
.tuner-targets > summary::-webkit-details-marker { display:none; }
#tunerTargetSummaryText { flex:1; }
#tunerTargetSummaryNote { color:#98aabd; font-size:.75rem; }
.tuner-targets > summary svg { width:16px; height:16px; fill:none; stroke:#98aabd; stroke-width:1.5; }
.tuner-targets[open] > summary { border-bottom:1px solid #ffffff14; }
.tuner-targets[open] > summary svg { transform:rotate(180deg); }
.tuner-targets > #tunerStringsPanel { padding:12px; }
.tuner-targets > p { padding:0 12px 12px; margin-top:0; }
.tuner-targets > summary:focus-visible { outline:2px solid #88d7e5; outline-offset:4px; }

.tuner-screen .tuner-live[data-tuning-state="no-signal"] .tuner-note strong { font-size:3.4rem; }

.tuner-screen[data-state="idle"] .tuner-note { display:none; }

.tuner-screen h1,.tuner-screen h2 { font-family:inherit; }

/* Reserve color for the tuning result, keeping the scale quiet. */
.tuner-screen .tuner-arc__segment.is-active { stroke:#4c6074; filter:none; }
.tuner-screen .tuner-live[data-tuning-state="tuned"] .tuner-arc__segment--center { stroke:#7bccab; }
.tuner-screen .tuner-live[data-tuning-state="tuned"] .tuner-meter__needle { color:#7bccab; filter:drop-shadow(0 2px 5px #0003); }
.tuner-screen .tuner-live[data-tuning-state="tuned"] .tuner-status { color:#7bccab; }
.tuner-screen .tuner-live[data-tuning-state="tuned"] .tuner-status::before { background:#7bccab; border:0; }

#tunerScreen { max-width:620px; }
.tuner-screen .tuner-primary-button,.tuner-screen .tuner-stop-button { max-width:340px; }
