/* Voice course — studio theme. RTL Hebrew, mobile-first. */
@font-face { font-family: 'Heebo'; src: url(../fonts/heebo-hebrew.woff2) format('woff2'); font-weight: 300 800; font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; src: url(../fonts/heebo-latin.woff2) format('woff2'); font-weight: 300 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Secular One'; src: url(../fonts/secular-hebrew.woff2) format('woff2'); font-display: swap; unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Secular One'; src: url(../fonts/secular-latin.woff2) format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  /* Theme colours live in css/styles.css (data-style="glass" is always set); only layout tokens here */
  --radius: 22px; --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Hebrew', 'Heebo', system-ui, 'Segoe UI', Arial, sans-serif; --display: var(--font);
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6;
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.2; margin: 0 0 .45em; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; } h2 { font-size: 1.3rem; font-weight: 750; } h3 { font-size: 1.06rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .875rem; } .center { text-align: center; }
.hidden { display: none !important; }
/* the hidden attribute always wins: a component's own display (grid, flex) must not bring it back */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* visually hidden, still read by screen readers (and still in textContent) */
.sr-only, .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Safety net: an icon without a size rule stays icon-sized instead of filling its container.
   Placed first so every specific rule below overrides it. */
svg[viewBox="0 0 24 24"] { width: 1.25em; height: 1.25em; flex: none; stroke-width: 1.85; }
/* icon() glyphs: the stroke weight comes from here (not an attribute), so WebKit's page zoom does not
   double it; places that need another weight set stroke-width on their own svg rule */
svg.ic { stroke-width: 1.85; overflow: visible; }
svg.ic .ic-cut { stroke-width: 2.2; }
svg.chev { width: 20px; height: 20px; color: var(--faint); transform: scaleX(-1); }

/* Layout */
.app-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-name { font-weight: 700; white-space: nowrap; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--text); font-weight: 700; padding: 6px 10px 6px 4px; border-radius: 12px; }
.back-btn svg { width: 22px; height: 22px; transform: scaleX(-1); }
.stats { display: flex; gap: 8px; }

main#view { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 40px); }
/* the app coming back from a reload for the status bar: the same screen, with nothing moving */
.quick-boot *, .quick-boot *::before, .quick-boot *::after { animation: none !important; transition: none !important; }
.view-enter { animation: viewIn .32s cubic-bezier(.2,.8,.2,1) both; }
.view-enter.fwd { animation-name: viewFwd; } .view-enter.back { animation-name: viewBack; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* RTL: going deeper slides in from the left (the reading direction), going back from the right */
@keyframes viewFwd { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes viewBack { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

.bottom-nav {
  position: fixed; inset-inline: 12px; bottom: calc(10px + var(--safe-b)); z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: var(--nav-h); max-width: 560px; margin: 0 auto; padding: 6px; border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: 0 14px 40px rgba(5,6,20,.35);
}
.bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--faint); font-size: .72rem; font-weight: 700; border-radius: 18px; transition: color .2s, background .25s; }
.bottom-nav a svg { width: 23px; height: 23px; }
.bottom-nav a.active { color: var(--accent); background: var(--accent-soft); }

/* Surfaces */
.card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 55%, transparent); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card.flat { background: var(--surface-2); border-color: transparent; }
.card.accent { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.card h2, .card h3 { margin-top: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
@media (max-width: 420px) { .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  border-radius: 16px; border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; transition: transform .08s ease, background .2s, border-color .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; border-radius: 11px; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.mic-wrap { flex: 1 1 100%; text-align: center; }
.btn-row > .btn { flex: 1 1 auto; }

.mic-btn {
  width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; margin: 8px auto;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px var(--accent-soft), 0 0 0 22px color-mix(in srgb, var(--accent) 6%, transparent); transition: transform .12s ease;
}
.mic-btn svg { width: 46px; height: 46px; }
.mic-btn:active { transform: scale(.96); }
.mic-btn.live { background: var(--coral); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 10px rgba(255,138,101,.18), 0 14px 30px rgba(0,0,0,.35); } 50% { box-shadow: 0 0 0 22px rgba(255,138,101,.06), 0 14px 30px rgba(0,0,0,.35); } }

/* Pills & badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.accent { background: var(--accent-soft); color: var(--accent); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill svg { width: 14px; height: 14px; }

/* Module & lesson lists */
.module-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.module-card h3 { margin: 2px 0 4px; }
.module-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff; }
.module-icon svg { width: 28px; height: 28px; }
.lesson-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid transparent; text-decoration: none; color: inherit; margin-bottom: 10px; }
.lesson-item.locked { opacity: .55; }
.lesson-item .num { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; }
.lesson-item .num svg { width: 16px; height: 16px; stroke-width: 2.6; }
.lesson-item.done .num { background: var(--ok); color: #05261c; }
.lesson-item .grow { flex: 1; min-width: 0; }
.lesson-item .title { font-weight: 700; }
.lesson-item svg.chev { width: 20px; height: 20px; color: var(--faint); transform: scaleX(-1); }

/* Progress ring */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }

/* Lesson player */
.stepper { display: flex; gap: 6px; margin: 4px 0 16px; }
.stepper span { flex: 1; height: 5px; border-radius: 4px; background: var(--surface-3); }
.stepper span.on { background: var(--accent); }
.section { margin-bottom: 14px; }
.section.tip { border-inline-start: 4px solid var(--accent); }
.section.warn { border-inline-start: 4px solid var(--bad); background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.section.why { border-inline-start: 4px solid var(--info); }
.section.mistakes { border-inline-start: 4px solid var(--coral); }
.section .label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.section .label svg { width: 16px; height: 16px; }
.section ul, .section ol { margin: 0; padding-inline-start: 1.3em; }
.section li { margin-bottom: 6px; }
.speak-btn { display: inline-flex; align-items: center; gap: 6px; }
.teacher { display: flex; gap: 12px; align-items: flex-start; }
.teacher .avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.teacher .avatar svg { width: 24px; height: 24px; }
.teacher .bubble { background: var(--surface-2); border-radius: 16px; border-start-start-radius: 4px; padding: 12px 14px; flex: 1; }
.teacher .bubble.speaking { box-shadow: 0 0 0 2px var(--accent-soft); }

/* Exercise widgets */
.exercise { text-align: center; }
.exercise .ex-title { font-weight: 800; font-size: 1.15rem; }
/* the title and its read-aloud button share a line while the title's longest word and the button fit;
   otherwise the button goes under the title (large text: "דקרשנדו:" and the button were wider than the
   card, and the button ran off the screen; outside audit, finding 40) */
.ex-head { flex-wrap: wrap; row-gap: 6px; }
.ex-head > .ex-title { flex: 1 1 0; min-width: min-content; }
.big-number { font-weight: 800; font-size: 3.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
/* the onset exercise: three starts to hear, the steps, and the cue that leads each try */
.onset-lead { text-align: start; margin: 12px 0 6px; }
.onset-kinds { display: grid; gap: 8px; }
.onset-kind { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.onset-kind:active { transform: scale(.98); }
.onset-kind.balanced { border-color: var(--ok); background: var(--ok-soft); }
.onset-kind > svg { width: 20px; height: 20px; flex: none; color: var(--accent-strong); }
.onset-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
/* the name and its "המטרה" mark may take two lines: on one unbreakable line, at large text, they made each
   start wider than the card and pushed its play sign off the screen (outside audit, finding 35) */
.onset-text b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.onset-text .small { color: var(--muted); }
.onset-wave { flex: none; width: 48px; height: 28px; }
/* where a third of the room is not enough for the words (large text on a narrow screen, measured in the
   text's own size), the drawing and the play sign share the top line and the words take the full width */
.onset-kinds { container-type: inline-size; }
@container (max-width: 13em) {
  .onset-kind { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "art . play" "text text text"; row-gap: 6px; }
  .onset-kind > .onset-wave { grid-area: art; } .onset-kind > .onset-text { grid-area: text; } .onset-kind > svg { grid-area: play; }
}
.onset-wave svg { width: 100%; height: 100%; } .onset-wave path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke: var(--muted); }
.onset-kind.balanced .onset-wave path { stroke: var(--ok); } .onset-kind.hard .onset-wave path { stroke: var(--bad); } .onset-kind.breathy .onset-wave path { stroke: var(--accent); }
.onset-steps { margin: 0 0 6px; padding-inline-start: 22px; text-align: start; display: grid; gap: 4px; }
.onset-cue { --p: 0; width: 148px; height: 148px; margin: 14px auto 4px; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 2px;
  background: radial-gradient(closest-side, var(--surface) 86%, transparent 87% 100%), conic-gradient(var(--muted) calc(var(--p) * 1%), var(--surface-3) 0); color: var(--muted); }
.onset-cue .cue-main { font-weight: 800; font-size: 2rem; line-height: 1.1; } .onset-cue .cue-sub { font-size: .85rem; min-height: 1.2em; }
.onset-cue.idle { color: inherit; }
.onset-cue.go { background: var(--ok); color: #fff; animation: onsetGo 1s ease-in-out infinite; }
.onset-cue.hear { background: var(--surface-3); color: inherit; }
.onset-cue.heard { color: #fff; background: var(--ok); } .onset-cue.heard.hard { background: var(--bad); } .onset-cue.heard.breathy { background: var(--accent); }
.onset-cue.heard .cue-main, .onset-cue.unclear .cue-main { font-size: 1.5rem; }
.onset-cue.unclear { background: var(--surface-3); color: inherit; }
@keyframes onsetGo { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .onset-cue.go { animation: none; } }
.big-note { font-weight: 800; font-size: 2.6rem; line-height: 1.1; }
.meter { height: 12px; border-radius: 8px; background: var(--surface-3); overflow: hidden; position: relative; }
.meter { container-type: inline-size; }
/* a level meter: quiet (green) at the start, where the fill grows from, to loud (orange) at the end.
   The gradient is laid over the whole track (100cqw) so a colour always means the same level. */
.meter > i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: linear-gradient(to left, var(--ok), var(--accent), var(--coral)); background-size: 100cqw 100%; background-position: right center; background-repeat: no-repeat; border-radius: 8px; transition: width .08s linear; }
:root[dir="ltr"] .meter > i { background-image: linear-gradient(to right, var(--ok), var(--accent), var(--coral)); background-position: left center; }
.meter-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 4px; }
canvas.lane { width: 100%; height: 190px; display: block; border-radius: 14px; background: var(--bg-2); }
.status-line { min-height: 1.6em; font-weight: 700; color: var(--accent); }
.status-line.ok { color: var(--ok); } .status-line.bad { color: var(--bad); }
.result { margin-top: 12px; }
.metric-rows { display: grid; gap: 8px; margin: 12px 0; text-align: start; }
.metric-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
/* label and value never touch: the label keeps its width, a long value wraps inside its own column */
.metric-rows > div > span:first-child { flex: none; max-width: 50%; }
.metric-rows > div > b { font-weight: 600; text-align: end; min-width: 0; }
/* a question with its answer picker (#/bridge, how the voice feels): the picker is as wide as its longest
   answer, beside the question while both fit and on a line of its own, full width, when they do not. At half
   the row it showed "0 – ב…" at large text (outside audit, finding 33) */
.metric-rows > div.ease-row { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.metric-rows > div.ease-row > span:first-child { flex: 999 1 auto; max-width: none; }
.metric-rows > div.ease-row > select { flex: 1 0 auto; width: auto; max-width: 100%; }
.breath-orb { width: 200px; height: 200px; margin: 10px auto; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 1.15rem;
  background: radial-gradient(circle at 40% 35%, var(--orb-1), var(--orb-2) 70%);
  box-shadow: 0 0 60px var(--orb-glow); transform: scale(.55); }
.start-note { margin: 0 0 14px; padding: 12px; border-radius: 14px; background: var(--surface-2); text-align: start; transition: background .2s; }
.start-note .sn-note { font-size: 1.35rem; }
.start-note .sn-arrow { font-size: 1.4rem; min-width: 1.4em; text-align: center; color: var(--accent); }
.start-note .sn-hint { font-weight: 400; color: var(--muted); }
.start-note .sn-arrow:empty { display: none; }
.start-note .sn-arrow svg { width: 22px; height: 22px; }
.start-note .sn-gauge { margin-top: 8px; }
.start-note.near { background: var(--accent-soft); }
.start-note.ok, .start-note.found { background: var(--ok-soft); }
.start-note.ok .sn-arrow, .start-note.found .sn-arrow { color: var(--ok); }
.start-note.far .sn-arrow { color: var(--coral); }
.demo-row { margin: 10px 0 14px; }
.coach-note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); text-align: start; }
.coach-note .label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; color: var(--accent-strong); margin-bottom: 4px; }
.coach-note .label svg { width: 16px; height: 16px; }
.sync-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--muted); }
.sync-chip svg { width: 16px; height: 16px; }
.sync-chip.ok { color: var(--ok); } .sync-chip.wait { color: var(--accent); } .sync-chip.bad { color: var(--bad); }
.sync-chip .txt { display: none; }
@media (min-width: 560px) { .sync-chip .txt { display: inline; } }
.sync-chip .n { font-variant-numeric: tabular-nums; }
@media (min-width: 560px) { .sync-chip .n { display: none; } }
@media (max-width: 440px) {
  .app-header { gap: 6px; padding-inline: 12px; }
  .brand { gap: 8px; }
  .brand-name { font-size: .95rem; }
  .brand-mark { width: 30px; height: 30px; }
  .stats { gap: 5px; }
  .stat-chip { padding: 5px 8px; font-size: .82rem; gap: 4px; }
  .stat-chip svg { width: 16px; height: 16px; }
  .sync-chip { padding: 5px 7px; }
}

.countdown { font-weight: 700; font-size: 4rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.choice-grid .btn { min-height: 56px; }
/* no orphan: three answers sit on one row, an odd last answer spans the row */
.choice-grid:has(> :nth-child(3):last-child) { display: flex; flex-wrap: wrap; }
/* three equal tiles while each one's longest word fits its third; when one does not (large text on a narrow
   screen: "אודישן" ran out of its tile, out of the accent fill of the chosen one), the row breaks to two
   and the third tile takes the row (outside audit, finding 34) */
.choice-grid:has(> :nth-child(3):last-child) > .btn { flex: 1 1 0; min-width: min-content; flex-direction: column; gap: 4px; min-height: 72px; padding: 10px 6px; line-height: 1.2; text-align: center; }
.choice-grid:not(:has(> :nth-child(3):last-child)) > :last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
.choice-grid .btn.correct { border-color: var(--ok); background: var(--ok-soft); }
.choice-grid .btn.wrong { border-color: var(--bad); background: var(--bad-soft); }

/* Quiz */
.quiz-q { font-weight: 700; margin-bottom: 10px; }
.quiz-opt { display: block; width: 100%; text-align: start; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.quiz-opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.quiz-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.quiz-explain { font-size: .9rem; color: var(--muted); margin-top: 6px; }

/* Forms */
.field { display: block; margin-bottom: 12px; text-align: start; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.input, textarea.input, select.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); }
textarea.input { min-height: 96px; resize: vertical; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.toggle { position: relative; width: 52px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(-22px); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; cursor: pointer; text-align: start; }
.check-item input { width: 22px; height: 22px; accent-color: var(--ok); }

/* Login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
.login .logo { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--coral)); color: var(--accent-ink); box-shadow: 0 16px 40px var(--accent-soft); }
.login .logo svg { width: 44px; height: 44px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 22px 0; direction: ltr; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); transition: background .15s, transform .15s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-10px); } 40%,80% { transform: translateX(10px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; direction: ltr; }
.pinpad button { height: 76px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.6rem; font-weight: 700; cursor: pointer; }
.pinpad button:active { background: var(--surface-3); }
.pinpad button.ghost { border: 0; background: transparent; font-size: 1rem; }

/* Toast & modal & banner */
.toast-wrap { position: fixed; inset-inline: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); display: grid; justify-items: center; gap: 8px; z-index: 60; pointer-events: none; padding: 0 16px; }
.toast { background: var(--surface-3); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; animation: viewIn .2s ease both; max-width: 520px; }
.toast.ok { border-inline-start: 4px solid var(--ok); } .toast.bad { border-inline-start: 4px solid var(--bad); }
.modal-back { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: grid; place-items: end center; padding: 16px; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); animation: viewIn .25s ease both; margin-bottom: var(--safe-b); }
@media (min-width: 640px) { .modal-back { place-items: center; } }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); margin-bottom: 14px; font-size: .92rem; }
.banner svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.banner.bad { background: var(--bad-soft); } .banner.bad svg { color: var(--bad); }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-family: var(--font); font-size: calc(11px * var(--ts-art, 1)); } /* text size: css/styles.css "type" */
/* WebKit (iPhone Safari) lays out SVG text glyph by glyph in logical order as soon as letter-spacing is
   not zero, which draws Hebrew backwards. SVG text therefore never inherits the page's letter-spacing. */
svg text, svg tspan, svg textPath { letter-spacing: normal !important; word-spacing: normal !important; }
.legend { display: flex; gap: 14px; justify-content: center; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }

/* Piano */
.piano { position: relative; height: 150px; direction: ltr; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
/* the note name on a white key: the key is light in both appearances, so in the dark one the name has its own dark ink */
.piano .wk { position: absolute; top: 0; bottom: 0; background: var(--key-white); border: 1px solid var(--key-line); border-radius: 0 0 8px 8px; color: var(--key-ink, var(--muted)); font: inherit; font-size: calc(10px * var(--ts-art, 1)); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 6px; margin: 0; cursor: pointer; }
.piano .bk { position: absolute; top: 0; height: 60%; background: var(--key-black); border: 0; padding: 0; margin: 0; border-radius: 0 0 6px 6px; z-index: 2; cursor: pointer; }
.piano button:focus-visible { outline-offset: -3px; z-index: 3; }
.piano .on { background: var(--accent) !important; color: var(--accent-ink); }
.piano .in-range { box-shadow: inset 0 -6px 0 var(--ok); }

/* Tuner */
.tuner-dial { position: relative; height: 120px; overflow: hidden; }
.tuner-dial .needle { position: absolute; bottom: 0; left: 50%; width: 3px; height: 110px; background: var(--accent); transform-origin: bottom center; border-radius: 2px; transition: transform .1s linear; }
.tuner-dial .arc { position: absolute; bottom: -100px; left: 50%; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%; border: 3px solid var(--line); }
.tuner-dial + .meter, .tuner-dial ~ .meter { margin-top: 12px; }
.tuner-dial .zone { position: absolute; bottom: 0; left: 50%; width: 30px; margin-left: -15px; height: 110px; background: linear-gradient(to top, var(--ok-soft), transparent); }

@media (min-width: 900px) {
  main#view { padding-top: 26px; }
  h1 { font-size: 2rem; }
}
/* (the how-to drawings are left out: under Reduce Motion each is held on one frame of its paused animation, see css/styles.css) */
@media (prefers-reduced-motion: reduce) { *:not(.howto-art *), *::before, *::after { animation: none !important; transition: none !important; } }

/* Song step: voice-type table and key-for-a-song range bars */
.vt-table { display: grid; gap: 4px; text-align: start; }
.vt-row { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); }
.vt-row.head { background: none; font-size: .78rem; color: var(--muted); font-weight: 700; padding-block: 2px; }
.vt-row.match { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.vt-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.vt-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.range-bars { display: grid; gap: 6px; margin: 12px 0; }
.rb-line { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: center; direction: rtl; }
.rb-track { position: relative; height: 12px; border-radius: 99px; background: var(--surface-3); direction: ltr; }
.rb-track i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.rb-track i.comfort { background: var(--ok); opacity: .75; }
.rb-track i.orig { background: var(--muted); opacity: .6; }
.rb-track i.moved { background: var(--accent); }
#songkey select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; flex: 1; }
.ear-icon { width: 56px; height: 56px; }

/* Home: "your path" */
.journey-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.journey-list li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.journey-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.journey-list li.now { outline: 2px solid var(--accent); background: var(--accent-soft); }
.journey-list li.now .journey-n { background: var(--accent); color: var(--accent-ink); }
.journey-list li.done .journey-n { background: var(--ok); color: #06210f; }
.journey-list li.done b { color: var(--muted); }
.journey-list li.later { opacity: .7; }

/* Session */
details.why { margin-top: 10px; text-align: start; }
details.why summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--accent); }
details.why ul { margin: 8px 0 0; padding-inline-start: 1.2em; font-size: .92rem; }
details.why li { margin-bottom: 4px; }
.btn.pulse { animation: pulse 1.6s ease-in-out 2; }

/* Help */
.help ol, .guide-list { margin: 8px 0; padding-inline-start: 1.3em; }
.help li, .guide-list li { margin-bottom: 8px; line-height: 1.5; }
details.guide-screen summary { cursor: pointer; }
details.guide-screen[open] summary { margin-bottom: 8px; }

/* Session hero: the voice wave */
.hero-wave { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 20px 18px; margin-bottom: 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--surface)), var(--surface) 75%); }
.hero-wave svg.wave { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 90px; opacity: .55; pointer-events: none; }
.hero-wave svg.wave path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.hero-wave svg.wave path.w2 { stroke: var(--ok); opacity: .7; }
.hero-wave .w1 { animation: waveShift 7s linear infinite; } .hero-wave .w2 { animation: waveShift 11s linear infinite reverse; }
@keyframes waveShift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero-wave > *:not(svg) { position: relative; }
.hero-wave h1 { font-size: 2rem; margin-bottom: .2em; }
@media (prefers-reduced-motion: reduce) { .hero-wave .w1, .hero-wave .w2 { animation: none; } }
.head-start { display: flex; align-items: center; min-width: 0; }
.bottom-nav { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .view-enter, .view-enter.fwd, .view-enter.back { animation: none; } .bottom-nav { transition: none; } }
/* Session steps as a compact timeline */
#session-steps { position: relative; margin-bottom: 12px; }
#session-steps::before { content: ''; position: absolute; top: 22px; bottom: 22px; inset-inline-start: 31px; width: 2px; background: var(--line); }
#session-steps .lesson-item { position: relative; margin-bottom: 4px; padding: 9px 12px; background: transparent; }
#session-steps .lesson-item .num { position: relative; z-index: 1; background: var(--surface-3); width: 32px; height: 32px; font-size: .9rem; }
#session-steps .lesson-item.done .num { background: var(--ok); }
#session-steps .lesson-item[style*="accent"] { background: var(--surface); }
#session-steps .title { font-size: .98rem; }

/* Welcome */
.welcome { min-height: calc(100vh - 120px); min-height: calc(100dvh - 120px); display: flex; flex-direction: column; justify-content: center; max-width: 520px; margin: 0 auto; }
.welcome-slide { text-align: center; padding: 10px 6px 4px; animation: viewIn .35s cubic-bezier(.2,.8,.2,1) both; }
.welcome-slide.fwd { animation-name: viewFwd; } .welcome-slide.back { animation-name: viewBack; }
.welcome-icon { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 32px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.welcome-icon svg { width: 46px; height: 46px; }
.welcome-text { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 40ch; margin: 0 auto; }
.welcome-dots { display: flex; justify-content: center; gap: 8px; margin: 26px 0; }
.welcome-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--surface-3); transition: width .25s, background .25s; }
.welcome-dots span.on { width: 26px; background: var(--accent); }
/* which slide of the tour this is, in words (the dots are only a picture) */
.welcome-count { text-align: center; color: var(--muted); font-size: var(--t-sub, 14px); font-variant-numeric: tabular-nums; margin: -14px 0 18px; }
.welcome-slide h1:focus { outline: none; }
.welcome-actions .btn-row { margin-top: 8px; }

/* Goals */
.goal-grid { display: grid; gap: 8px; margin-top: 10px; }
.goal { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; text-align: start; padding: 12px; border-radius: 18px; border: 1.5px solid transparent; background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.goal.on { border-color: var(--accent); background: var(--accent-soft); }
.goal-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.goal.on .goal-icon { background: var(--accent); color: var(--accent-ink); }
.goal-progress { display: grid; gap: 14px; margin-top: 14px; }
.goal-row .meter { margin-top: 6px; position: relative; }
.goal-row .meter > i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--accent); border-radius: 8px; }

/* How-to animations */
details.howto { margin: 6px 0 12px; border-radius: 18px; background: var(--surface-2); text-align: start; }
details.howto > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; color: var(--accent); }
details.howto > summary::-webkit-details-marker { display: none; }
details.howto > summary svg { width: 18px; height: 18px; }
.howto-body { padding: 0 14px 14px; }
.howto-art svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; direction: ltr; overflow: visible; }
.howto-cap { min-height: 2.8em; font-weight: 600; margin-top: 6px; text-align: center; }
.howto-steps { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.howto-steps span { width: 22px; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .3s; }
.howto-steps span.on { background: var(--accent); }
/* the drawings themselves and their motion: the "how-to animations" block at the end of css/styles.css */
.howto-art.paused * { animation-play-state: paused !important; }
.howto-list { margin: 10px 0 0; padding-inline-start: 1.4em; font-size: var(--t-sub, 14px); }
.howto-list li { margin-bottom: 4px; }

/* Course / library */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); margin: 4px 0 14px; }
.segmented a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; }
.segmented a svg { width: 18px; height: 18px; }
.segmented a.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(5,6,20,.15); }
.topic-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; scrollbar-width: none; }
.topic-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; position: relative; }
.chip svg { width: 17px; height: 17px; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.goal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.drill-list { display: grid; gap: 6px; }
.drill { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 18px; background: var(--surface); text-decoration: none; color: inherit; }
.drill .title { font-weight: 700; }
.drill .grow { flex: 1; min-width: 0; }
.tip-card .label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-strong); margin-bottom: 4px; }
.tip-card .label svg { width: 16px; height: 16px; }
.tip-card ul { margin: 4px 0 0; padding-inline-start: 1.2em; }

/* Live coach */
.live-coach { margin: 10px 0; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); transition: background .3s; text-align: start; }
.live-coach.good { background: var(--ok-soft); }
.live-coach.fix { background: var(--accent-soft); }
.live-coach.warn { background: var(--bad-soft); }
.lc-top { display: flex; align-items: center; gap: 12px; }
.lc-gauge { position: relative; flex: 1; height: 26px; border-radius: 99px; background: var(--surface-3); margin-bottom: 18px; }
.lc-gauge.hidden, .lc-gauge.off { visibility: hidden; height: 0; }
.lc-zone { position: absolute; top: 0; bottom: 0; left: 37.5%; width: 25%; background: color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 99px; }
.lc-dot { position: absolute; top: 3px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: left .12s linear, opacity .2s; opacity: .25; }
.live-coach.good .lc-dot { background: var(--ok); } .live-coach.fix .lc-dot { background: var(--accent); }
/* the end labels sit under the track, where the dot never goes */
.lc-end { position: absolute; top: calc(100% + 3px); font-size: var(--t-cap, 12px); font-weight: 500; line-height: 1.2; color: var(--muted); }
.lc-low { left: 4px; } .lc-high { right: 4px; }
.lc-score { min-width: 2.2ch; font-weight: 700; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.lc-cue { margin-top: 8px; font-weight: 700; min-height: 1.5em; }
.live-coach.idle .lc-cue { color: var(--muted); font-weight: 500; }
.lc-summary { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--surface-2); text-align: start; }
.lc-bars { display: grid; gap: 6px; margin-top: 10px; }
.lc-bar { display: grid; grid-template-columns: 7.5em 1fr 3em; gap: 8px; align-items: center; font-size: .9rem; }
.lc-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.lc-track i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.lc-bar.good .lc-track i { background: var(--ok); } .lc-bar.warn .lc-track i { background: var(--bad); }
.lc-bar b { text-align: end; font-variant-numeric: tabular-nums; }
/* the coach stays in the flow above the lane: a sticky panel covered the sung line while singing */

/* Voice report & songs */
.big-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; margin: 0; }
.big-link svg { width: 26px; height: 26px; color: var(--accent); }
.meter.m-good > i { background: var(--ok) !important; } .meter.m-weak > i { background: var(--coral) !important; }
.weak-item { padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.weak-item:last-child { border-bottom: 0; }
.song-card { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.song-card .grow { flex: 1; min-width: 0; }
.insight { position: relative; padding-inline-start: 18px; }
.insight::before { content: ''; position: absolute; inset-inline-start: 2px; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.insight.up::before { background: var(--ok); } .insight.down::before { background: var(--coral); } .insight.info::before { background: var(--accent); }
.rec-rows { margin: 8px 0 0; gap: 4px; } .rec-rows div { padding: 5px 10px; font-size: .85rem; }
.diff-good { color: var(--ok); } .diff-bad { color: var(--coral); }

/* Songwriting studio */
#compose .card { margin-bottom: 14px; }
#compose select { font: inherit; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.chord-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.chord-chip { flex: 0 0 calc((100% - 24px) / 4); min-inline-size: min-content; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; min-height: 64px; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.chord-chip.on, .chord-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.chord-chip .roman { font-size: .8rem; color: var(--muted); }
.chord-chip .sym { font-size: 1.15rem; }
.chord-chip.sm { flex-direction: row; padding: 3px 10px; border-radius: 999px; display: inline-flex; }
/* the chord's function is told by its pill (בית / הכנה / מתח), not by a coloured border */
.prog-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; }
.prog-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; border-radius: 14px; background: var(--surface-2); --fn: var(--line); }
.prog-cell::before { content: ''; width: 18px; height: 4px; border-radius: 2px; background: var(--fn); margin-bottom: 4px; }
.prog-cell.fn-tonic { --fn: var(--ok); } .prog-cell.fn-sub { --fn: var(--accent); } .prog-cell.fn-dom { --fn: var(--coral); }
.roll { width: 100%; height: auto; margin-top: 8px; background: var(--surface-2); border-radius: 12px; direction: ltr; }
.roll-band { fill: color-mix(in srgb, var(--ok) 12%, transparent); }
.roll-bar { stroke: var(--line); stroke-width: 1; }
.roll-chord { fill: var(--muted); font-size: calc(11px * var(--ts-art, 1)); font-weight: 700; }
.roll-note { fill: var(--accent); } .roll-note.out { fill: var(--coral); }
.piano .next { background: var(--ok) !important; color: #fff; box-shadow: 0 0 0 2px var(--ok) inset; }
.piano .playing { background: var(--accent) !important; }
.follow { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.follow-seq { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.follow-seq .fs-n { font-size: .78rem; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.follow-seq .fs-n.cur { background: var(--ok); color: var(--on-ok, #fff); font-weight: 600; }
.follow-seq .fs-n.done { color: var(--ok); }
.own-notes { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; min-height: 28px; }
.sugg-list { display: grid; gap: 8px; margin-top: 10px; }
.sugg { padding: 10px; border-radius: 12px; background: var(--surface-2); text-align: start; }

/* Take vs corrected take */
.cmp-audio { width: 100%; height: 38px; margin-top: 4px; }
.cmp-chart { margin-top: 10px; }
.cmp-target { fill: color-mix(in srgb, var(--accent) 35%, transparent); stroke: var(--accent); stroke-width: 1; }
.cmp-sung { fill: none; stroke: var(--coral); stroke-width: 2.2; stroke-linejoin: round; }
.cmp-corr { fill: none; stroke: var(--ok); stroke-width: 2; stroke-dasharray: 5 4; }
.lg { display: inline-block; width: 16px; height: 4px; border-radius: 2px; margin-inline-end: 4px; vertical-align: middle; }
.lg-target { background: var(--accent); height: 8px; } .lg-sung { background: var(--coral); } .lg-corr { background: var(--ok); }
.cmp-miss { padding: 8px 0; border-bottom: 1px solid var(--line); gap: 8px; }

/* Room and microphone check */
.rc-steps { margin: 10px 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.rc-steps li { color: var(--muted); }
.rc-steps li.now { color: var(--text); font-weight: 700; }
.rc-steps li.done { color: var(--ok); }
.rc-steps li.done::after { content: ''; display: inline-block; width: 16px; height: 16px; margin-inline-start: 6px; vertical-align: -3px; background: currentColor; -webkit-mask: var(--mask-check) center / contain no-repeat; mask: var(--mask-check) center / contain no-repeat; }
.rc-steps li.skip { color: var(--faint); text-decoration: line-through; }

/* Smart mirror */
.mirror-frame { position: relative; margin: 12px auto 8px; width: 100%; max-width: 360px; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 0 0 3px transparent; transition: box-shadow .25s; }
.mirror-frame.ok { box-shadow: 0 0 0 3px var(--ok); } .mirror-frame.warn { box-shadow: 0 0 0 3px var(--coral); }
.mirror-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.mirror-note { position: absolute; top: 8px; inset-inline-start: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-weight: 600; }
.mirror-cue { min-height: 3em; font-weight: 700; text-align: center; margin: 6px 0 10px; }

/* Vocal load meter */
.dose-gauge[data-zone="safe"] i { background: var(--ok); }
.dose-gauge[data-zone="caution"] i { background: var(--warn); }
.dose-gauge[data-zone="high"] i { background: var(--bad); }
.dose-card .label { display: flex; align-items: center; gap: 6px; font-size: var(--t-body, 16px); font-weight: 600; margin-bottom: 6px; }
.dose-card .label svg { width: 18px; height: 18px; color: var(--bad); }
.dose-card .btn { margin-top: 8px; }

/* Harmony lab */
.hm-cents { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; margin: 6px 0; }
.hm-cents.ok { color: var(--ok); } .hm-cents.near { color: var(--accent); }
.hm-pulse { width: 64px; height: 64px; margin: 8px auto; border-radius: 50%; background: var(--accent-soft); border: 3px solid var(--accent); animation: hmPulse 1s ease-in-out infinite; animation-duration: 0s; }
.hm-pulse.locked { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
@keyframes hmPulse { 0%, 100% { transform: scale(.85); opacity: .6; } 50% { transform: scale(1.05); opacity: 1; } }
.hm-hold { margin: 8px 0; } .hm-hold i { background: var(--ok); }
.pill.blind { outline: 1px dashed var(--line); }
.tip-box { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-align: start; }

/* Diction studio */
.dx-lyrics { font-size: 1.35rem; line-height: 2.9; white-space: pre-wrap; }
.dx-word { font: inherit; background: none; border: 0; padding: 0 2px; color: var(--text); cursor: pointer; position: relative; border-radius: 6px; }
.dx-word.marked { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.dx-shapes { position: absolute; top: -1em; inset-inline-start: 0; font-size: .6em; line-height: 1; display: flex; gap: 1px; }
.dx-badge { display: inline-flex; gap: 4px; align-items: center; padding: 2px 10px; border: 1.5px solid; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.dx-big { font-size: 2rem; font-weight: 700; }
#dx-text:placeholder-shown { direction: rtl; text-align: right; }
/* Tessituragram */
.tg-chart { display: grid; gap: 2px; margin-top: 10px; }
.tg-row { display: grid; grid-template-columns: 3.2em 1fr 3em; align-items: center; gap: 6px; padding: 1px 4px; border-radius: 6px; }
.tg-row.in { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.tg-row.pass { box-shadow: inset -3px 0 0 var(--coral); }
:root[dir="ltr"] .tg-row.pass { box-shadow: inset 3px 0 0 var(--coral); }
.tg-note { font-size: .8rem; color: var(--muted); }
.tg-track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; direction: rtl; }
.tg-track i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.tg-pct { text-align: start; }
.tg-key { display: inline-block; width: 12px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: middle; }
.tg-key.in { background: color-mix(in srgb, var(--ok) 35%, transparent); }
.tg-key.pass { background: var(--coral); }
#audition input[type=range], #aud-song, #tg-song { width: 100%; }
#checkin summary { cursor: pointer; font-weight: 600; color: var(--accent); }
#checkin .segmented:not(.seg-6) { display: flex; flex-wrap: wrap; }
#checkin .segmented button { min-inline-size: 44px; max-inline-size: 100%; min-block-size: 44px; padding-inline: 4px; }
#checkin .segmented:not(.seg-6) button { flex: 1 0 auto; }
@media (max-width: 360px) {
  #checkin .segmented.seg-6 { grid-template-columns: repeat(3, minmax(44px, 1fr)); }
}
