/* Strum & Sing — Song Coach. Palette taken from the Strum & Sing app + site. */
:root {
  --ink: #141417;
  --text: #fbf8f1;
  --muted: rgba(251, 248, 241, 0.72);
  --line: rgba(251, 248, 241, 0.16);
  --glass: rgba(20, 24, 38, 0.62);
  --paper: #f7efe2;
  --paper-2: #fffaf1;
  --paper-line: rgba(20, 20, 23, 0.1);
  --ink-soft: #5d5a55;
  --clay: #cc5b2b;
  --clay-hi: #d86531;
  --clay-dark: #9e3f20;
  --teal: #245f73;
  --teal-dark: #113242;
  --navy: #18233a;
  --plum: #2b172e;
  --gold: #e8bc72;
  --green: #2f7a4f;
  --radius: 26px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(160deg, #101713 0%, #18233a 36%, #245f73 72%, #cc5b2b 118%) fixed;
  background-color: #18233a;
  line-height: 1.45;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 70%);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: rgba(16, 20, 30, 0.72);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.topbar { gap: 10px; }
.pick { width: 34px; height: 34px; filter: drop-shadow(0 4px 10px rgba(204,91,43,.45)); }
.brand-name { font-weight: 900; font-size: 18px; letter-spacing: -.01em; line-height: 1.05; }
.brand-sub { font-size: 12px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.07);
  display: grid; place-items: center;
}
.icon-btn svg, .send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── lesson progress ── */
.progress { position: sticky; top: 78px; z-index: 15; padding: 8px 16px 0; }
.progress-inner {
  width: 100%; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(16, 20, 30, 0.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  text-align: left;
}
.progress-song { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.progress-dots { flex: 1; display: flex; gap: 4px; min-width: 0; }
.progress-dots i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); }
.progress-dots i.done { background: var(--gold); }
.progress-dots i.now { background: var(--clay); box-shadow: 0 0 0 2px rgba(204,91,43,.35); }
.progress-count { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }

/* ── thread ── */
.thread {
  max-width: 720px; margin: 0 auto;
  padding: 18px 16px calc(150px + var(--safe-b));
  display: flex; flex-direction: column; gap: 12px;
}
.msg { display: flex; gap: 10px; align-items: flex-end; animation: rise .35s ease both; }
.msg.user { justify-content: flex-end; }
.avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, var(--clay), var(--clay-dark));
  display: grid; place-items: center; font-weight: 900; font-size: 15px;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.bubble {
  max-width: min(85%, 520px); padding: 11px 15px; border-radius: 20px 20px 20px 6px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 16px; font-weight: 600; white-space: pre-wrap;
}
.msg.user .bubble { background: var(--clay); border-color: transparent; border-radius: 20px 20px 6px 20px; color: #fff; }
.msg.coach + .msg.coach .avatar { visibility: hidden; }
.typing .bubble { display: flex; gap: 5px; padding: 15px 16px; }
.typing .bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.1s infinite; }
.typing .bubble i:nth-child(2) { animation-delay: .15s; }
.typing .bubble i:nth-child(3) { animation-delay: .3s; }
.typing small { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px 44px; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ── cards ── */
.card {
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); animation: rise .4s ease both;
  border: 1px solid rgba(255,255,255,.5);
}
.card.dark { background: rgba(18, 22, 36, 0.78); color: var(--text); border-color: var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.card h3 { margin: 0 0 4px; font-size: 24px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
.card .eyebrow { font-size: 12px; font-weight: 900; color: var(--clay); text-transform: uppercase; letter-spacing: .08em; }
.card.dark .eyebrow { color: var(--gold); }
.card p { margin: 6px 0; color: var(--ink-soft); font-weight: 600; }
.card.dark p { color: var(--muted); }
.card .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.card.collapsed { padding: 12px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; background: rgba(247,239,226,.88); box-shadow: none; }
.card.collapsed .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 14px; flex: none; }
.card.collapsed b { font-weight: 800; }
.card.collapsed span { color: var(--ink-soft); font-size: 14px; font-weight: 700; margin-left: auto; }

.btn {
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 900; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease; min-height: 46px;
}
.btn:active { transform: scale(.97); }
.btn.clay { background: var(--clay); color: #fff; box-shadow: 0 10px 22px rgba(204,91,43,.35); }
.btn.clay:hover { background: var(--clay-hi); }
.btn.ghost { background: rgba(20,20,23,.07); color: var(--ink); }
.card.dark .btn.ghost { background: rgba(255,255,255,.1); color: var(--text); }
.btn.white { background: #fff; color: var(--navy); }
.btn.big { padding: 16px 26px; font-size: 18px; }
.btn.wide { flex: 1; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.chip {
  border: 1.5px solid var(--paper-line); background: var(--paper-2); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: #fff; }
.chip.new { background: #fbe1d3; border-color: transparent; color: var(--clay-dark); }
.chip.known { background: #dcefe2; border-color: transparent; color: var(--green); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: rgba(36,95,115,.12); color: var(--teal-dark); }
.card.dark .pill { background: rgba(255,255,255,.1); color: var(--text); }
.pill.gold { background: rgba(232,188,114,.25); color: #7a5418; }
.card.dark .pill.gold { color: var(--gold); }
.pill.green { background: #dcefe2; color: var(--green); }
.label { font-size: 13px; font-weight: 900; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 8px; }
.card.dark .label { color: var(--muted); }

/* overview */
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.steps-list { list-style: none; padding: 0; margin: 6px 0 0; counter-reset: s; display: grid; gap: 6px; }
.steps-list li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); }
.steps-list li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--text); flex: none; }
.note-small { font-size: 13px !important; opacity: .85; }

/* diagrams */
.diagram { color: var(--ink); display: block; }
.diagram .dot { fill: var(--clay); }
.diagrams { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.dcell { background: var(--paper-2); border-radius: 20px; padding: 10px 12px 12px; text-align: center; border: 2px solid transparent; transition: border-color .15s, transform .15s; }
.dcell .name { font-weight: 900; font-size: 22px; }
.dcell.on { border-color: var(--clay); transform: scale(1.03); }

/* strum grid */
.strum { display: grid; gap: 6px; margin: 8px 0; }
.strum .cell { aspect-ratio: 1 / 1.15; border-radius: 14px; background: var(--paper-2); display: grid; place-items: center; font-weight: 900; font-size: 20px; color: var(--ink); border: 2px solid transparent; transition: background .08s; position: relative; }
.strum .cell small { position: absolute; bottom: 3px; font-size: 10px; color: var(--ink-soft); font-weight: 800; }
.strum .cell.rest { color: rgba(20,20,23,.28); background: rgba(20,20,23,.05); }
.strum .cell.on { background: var(--clay); color: #fff; border-color: var(--clay-dark); }
.strum .cell.on small { color: #fff; }
.strum .cell.on.rest { background: #c9c2b7; color: #fff; }

/* chart */
.chart { max-height: 290px; overflow-y: auto; margin: 10px -4px 0; padding: 0 4px; scroll-behavior: smooth; }
.chart .sec { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; color: var(--clay); margin: 10px 0 6px; }
.chart .bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chart .bar { background: var(--paper-2); border-radius: 14px; padding: 10px 6px; text-align: center; font-weight: 900; font-size: 18px; position: relative; overflow: hidden; border: 2px solid transparent; }
.chart .bar.on { border-color: var(--clay); background: #fff; }
.chart .bar .fill { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--clay); width: 0; }
.chart .bar .two { display: flex; justify-content: space-around; }
.now-line { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; }
.now-chord { font-size: 46px; font-weight: 900; line-height: 1; color: var(--clay); min-width: 1.5em; }
.next-chord { font-weight: 800; color: var(--ink-soft); }
.count-in { font-size: 46px; font-weight: 900; color: var(--teal); }

/* controls */
.controls { display: grid; gap: 12px; margin-top: 14px; }
.tempo { display: flex; align-items: center; gap: 12px; }
.tempo output { font-weight: 900; min-width: 76px; text-align: right; font-size: 15px; }
.tempo .lbl { font-weight: 800; font-size: 14px; color: var(--ink-soft); min-width: 52px; }
.card.dark .tempo .lbl { color: var(--muted); }
input[type=range] { flex: 1; accent-color: var(--clay); height: 30px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 14px; background: rgba(20,20,23,.07); color: var(--ink-soft); min-height: 38px; }
.toggle[aria-pressed="true"] { background: var(--navy); color: #fff; }
.card.dark .toggle { background: rgba(255,255,255,.08); color: var(--muted); }
.card.dark .toggle[aria-pressed="true"] { background: #fff; color: var(--navy); }

/* drill timer */
.timer { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--ink-soft); }
.timer b { font-size: 28px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* hum */
.hum-canvas { width: 100%; height: 220px; display: block; border-radius: 18px; background: linear-gradient(180deg, #1c1022, #2b172e); margin-top: 10px; }
.hum-stats { display: flex; gap: 10px; margin-top: 10px; }
.stat { flex: 1; background: rgba(255,255,255,.07); border-radius: 16px; padding: 10px 12px; }
.stat b { display: block; font-size: 24px; font-weight: 900; }
.stat span { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* lyrics */
.lyrics-edit { width: 100%; min-height: 160px; border-radius: 16px; border: 1.5px solid var(--paper-line); background: var(--paper-2); color: var(--ink); padding: 12px; font-size: 15px; font-weight: 600; resize: vertical; }
.lyrics-view { background: var(--paper-2); border-radius: 16px; padding: 12px 14px; max-height: 300px; overflow-y: auto; font-weight: 700; font-size: 17px; line-height: 2.1; white-space: pre-wrap; }
.lyrics-view .ch { display: inline-block; background: rgba(204,91,43,.14); color: var(--clay-dark); border-radius: 8px; padding: 0 6px; margin-right: 2px; font-size: 14px; font-weight: 900; line-height: 1.6; vertical-align: 2px; }
.lyrics-view .ch.on { background: var(--clay); color: #fff; }
.lyrics-view .hd { display: block; font-size: 12px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--teal); line-height: 2.4; }
.lyrics-view .hd.on { color: var(--clay); }

/* chord picker */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* composer */
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 8px 16px calc(12px + var(--safe-b));
  background: linear-gradient(180deg, rgba(16,20,30,0) 0, rgba(16,20,30,.92) 22px, rgba(16,20,30,.96));
}
.quick { max-width: 720px; margin: 0 auto 8px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick button {
  flex: none; border: 1px solid var(--line); background: rgba(255,255,255,.1); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; white-space: nowrap; min-height: 38px;
}
.input-row {
  max-width: 720px; margin: 0 auto; display: flex; gap: 8px; align-items: center;
  background: rgba(255,255,255,.1); border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 18px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.input-row input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; font-weight: 700; padding: 8px 0; }
.input-row input::placeholder { color: rgba(251,248,241,.55); }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--clay); color: #fff; display: grid; place-items: center; flex: none; }
.send[disabled] { opacity: .5; }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 86dvh; overflow-y: auto;
  max-width: 640px; margin: 0 auto; background: var(--paper); color: var(--ink);
  border-radius: 28px 28px 0 0; padding: 10px 20px calc(24px + var(--safe-b)); animation: up .25s ease both;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(20,20,23,.18); margin: 4px auto 12px; }
.sheet h2 { margin: 0 0 6px; font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.sheet p { color: var(--ink-soft); font-weight: 600; margin: 6px 0; }
.sheet .field { display: grid; gap: 6px; margin: 14px 0; font-weight: 800; }
.sheet .field input { border: 1.5px solid var(--paper-line); background: var(--paper-2); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 16px; }
.song-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--paper-2); border-radius: 18px; margin: 8px 0; width: 100%; border: 0; text-align: left; color: var(--ink); }
.song-row .tile { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(145deg, var(--clay-hi), var(--clay-dark)); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none; }
.song-row .info { flex: 1; min-width: 0; }
.song-row b { display: block; font-weight: 900; }
.song-row small { color: var(--ink-soft); font-weight: 700; }
.song-row .del { border: 0; background: transparent; color: var(--ink-soft); font-size: 20px; padding: 6px 10px; }
.step-jump { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--paper-2); margin: 6px 0; font-weight: 800; text-align: left; color: var(--ink); }
.step-jump .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(20,20,23,.08); font-size: 13px; flex: none; }
.step-jump.done .n { background: var(--green); color: #fff; }
.step-jump.now { outline: 2px solid var(--clay); }
.status { display: flex; align-items: center; gap: 8px; font-weight: 800; padding: 10px 14px; background: var(--paper-2); border-radius: 14px; }
.status i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.status.demo i { background: var(--gold); }

.toast { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 800; z-index: 60; box-shadow: var(--shadow); animation: rise .25s ease both; max-width: calc(100% - 32px); }

@media (min-width: 760px) {
  .thread { padding-top: 26px; }
  .card { padding: 24px; }
  .hum-canvas { height: 260px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.card, .msg { scroll-margin-top: 130px; }

/* ── RaiN stage (header) ── */
.stage { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; color: inherit; }
.stage-face { flex: none; width: 56px; height: 56px; border-radius: 50%; position: relative; box-shadow: 0 0 0 2px rgba(232,188,114,.5), 0 8px 18px rgba(0,0,0,.35); transition: box-shadow .2s; }
.stage-face svg, .splash-face svg { width: 100%; height: 100%; display: block; }
.speaking .stage-face { box-shadow: 0 0 0 3px var(--clay), 0 0 22px rgba(204,91,43,.6); }
.listening .stage-face { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(232,188,114,.6); }
.stage-text { min-width: 0; display: grid; }
.stage-name { font-weight: 900; font-size: 17px; line-height: 1.1; }
.stage-name small { font-size: 11px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .07em; margin-left: 4px; }
.stage-caption { font-size: 13.5px; font-weight: 700; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; margin-top: 2px; }
.icon-btn { flex: none; }
.icon-btn .off { display: none; }
.icon-btn[aria-pressed="false"] .on { display: none; }
.icon-btn[aria-pressed="false"] .off { display: block; }
.rai .rai-body { transform-origin: 100px 200px; animation: bob 4s ease-in-out infinite; }
.rai .rai-eyes { transform-origin: 100px 102px; animation: blink 5s infinite; }
.speaking .rai .rai-brow { animation: brow 1.6s ease-in-out infinite; }
.rai-mouth [data-m]:not([data-m="smile"]) { display: none; }
@keyframes bob { 50% { transform: translateY(1.5px) rotate(.6deg); } }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
@keyframes brow { 50% { transform: translateY(-1.5px); } }
@media (max-width: 420px) { .stage-name small { display: none; } .top-actions { gap: 6px; } .icon-btn { width: 38px; height: 38px; } }

/* ── splash ── */
.splash { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 20px; overflow-y: auto;
  background: linear-gradient(160deg, #101713 0%, #18233a 36%, #245f73 72%, #cc5b2b 118%); }
.splash[hidden] { display: none; }
.splash-inner { max-width: 440px; text-align: center; display: grid; justify-items: center; gap: 12px; animation: rise .5s ease both; }
.splash-face { width: min(210px, 52vw); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 4px rgba(232,188,114,.55), 0 26px 60px rgba(0,0,0,.45); }
.splash-brand { display: flex; align-items: center; gap: 8px; font-weight: 900; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin-top: 8px; }
.splash-brand .pick { width: 22px; height: 22px; }
.splash h1 { margin: 0; font-size: clamp(34px, 9vw, 48px); line-height: 1.02; font-weight: 900; letter-spacing: -.03em; }
.splash h1 em { font-style: normal; color: var(--gold); }
.splash p { margin: 0 0 8px; color: var(--muted); font-weight: 600; font-size: 17px; }
.splash .btn.big { width: 100%; max-width: 320px; }
.btn.link { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }

/* ── mic ── */
.mic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: var(--text); display: grid; place-items: center; flex: none; }
.mic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.mic.on { background: var(--gold); color: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(232,188,114,.25); } }

/* ── choice cards ── */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.choice { border: 2px solid var(--paper-line); background: var(--paper-2); color: var(--ink); border-radius: 20px; padding: 14px 14px; text-align: left; display: grid; gap: 2px; min-height: 64px; transition: border-color .15s, transform .15s; }
.choice:hover { border-color: var(--clay); }
.choice:active { transform: scale(.98); }
.choice b { font-size: 17px; font-weight: 900; }
.choice small { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.choice .ico { font-size: 22px; line-height: 1; margin-bottom: 4px; }

/* ── chord tiles ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.tile-btn { border: 2px solid transparent; background: var(--paper-2); border-radius: 18px; padding: 8px 6px 10px; display: grid; justify-items: center; gap: 2px; color: var(--ink); position: relative; }
.tile-btn .name { font-weight: 900; font-size: 20px; }
.tile-btn .diagram { width: 72px; height: 90px; }
.tile-btn[aria-pressed="true"] { border-color: var(--green); background: #e9f5ec; }
.tile-btn[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.more-toggle { background: none; border: 0; color: var(--teal); font-weight: 900; padding: 10px 0 4px; }
.mini-diagrams { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.mini-diagrams .dcell { padding: 6px 8px 8px; }
.mini-diagrams .diagram { width: 76px; height: 95px; }

/* ── capo ── */
.capo { width: 100%; max-width: 420px; display: block; margin: 8px auto 0; color: var(--ink); }
.card.dark .capo { color: var(--text); }
.capo-banner { display: flex; align-items: center; gap: 12px; background: rgba(232,188,114,.16); border-radius: 18px; padding: 12px 14px; margin-top: 12px; }
.capo-banner b { font-size: 26px; font-weight: 900; color: var(--gold); line-height: 1; }
.capo-banner span { font-weight: 700; color: var(--muted); font-size: 14px; }
.tile-btn .easy { font-size: 11px; font-weight: 900; color: var(--clay-dark); background: #fbe1d3; border-radius: 999px; padding: 1px 8px; margin-top: -2px; }

/* RaiN humming: little notes float up from her */
.stage-face::before, .stage-face::after { content: "♪"; position: absolute; color: var(--gold); font-weight: 900; font-size: 16px; opacity: 0; pointer-events: none; }
.stage-face::before { right: -4px; top: 2px; }
.stage-face::after { right: 6px; top: -6px; content: "♫"; font-size: 13px; }
.humming .stage-face::before { animation: floatnote 1.8s ease-in-out infinite; }
.humming .stage-face::after { animation: floatnote 1.8s ease-in-out .9s infinite; }
.humming .stage-face { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(232,188,114,.5); }
@keyframes floatnote { 0% { opacity: 0; transform: translate(0, 6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -16px); } }

/* ── RaiN, show me ── */
.showme { background: #1d2333; color: var(--text); border-radius: 22px; padding: 12px 12px 14px; margin-top: 10px; }
.showme .eyebrow { color: var(--gold); font-size: 11px; }
.showme-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.showme-count { font-weight: 900; font-size: 13px; color: var(--muted); }
.fretboard { width: 100%; display: block; color: var(--text); }
.fretboard .tip.new { animation: place .5s cubic-bezier(.2,1.4,.4,1) both; }
.fretboard .pulse { animation: pulsering 1.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.fretboard .ring { animation: ringline .45s ease-out; }
@keyframes place { from { opacity: 0; transform: translateY(-14px) scale(.4); } }
@keyframes pulsering { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.5); } }
@keyframes ringline { 0% { stroke-width: 5; } }
.showme-row { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.hand-key { width: 74px; flex: none; color: var(--text); }
.showme-text { margin: 0 !important; color: var(--text) !important; font-weight: 800 !important; font-size: 16px; line-height: 1.35; min-height: 3.9em; }
.showme-controls { display: flex; gap: 8px; margin-top: 10px; }
.showme-controls .btn.clay { flex: 1; }
.showme-controls .btn.ghost { background: rgba(255,255,255,.1); color: var(--text); min-width: 50px; font-size: 22px; padding: 8px 14px; }

[hidden] { display: none !important; }
.hand-video { width: 100%; border-radius: 18px; margin-top: 10px; background: #000; display: block; max-height: 360px; object-fit: contain; }

.rai .rai-glasses { display: none; }
.shades .rai .rai-glasses { display: inline; }

/* ── RaiN on stage (greeting + chord picking) ── */
.scene { position: fixed; left: 0; right: 0; top: var(--top-h, 76px); bottom: 0; z-index: 18; overflow-y: auto;
  padding: 18px 16px calc(120px + var(--safe-b));
  background: linear-gradient(160deg, #101713 0%, #18233a 36%, #245f73 72%, #cc5b2b 118%); background-attachment: fixed;
  animation: sceneIn .45s ease both; }
.scene[hidden] { display: none; }
.scene.leaving { animation: sceneOut .35s ease both; }
@keyframes sceneIn { from { opacity: 0; } }
@keyframes sceneOut { to { opacity: 0; transform: translateY(12px); } }
.scene-inner { max-width: 560px; margin: 0 auto; display: grid; justify-items: center; gap: 14px; }
.scene-face { width: min(190px, 46vw); aspect-ratio: 1; border-radius: 50%; margin-top: 6px;
  box-shadow: 0 0 0 4px rgba(232,188,114,.55), 0 26px 60px rgba(0,0,0,.45);
  transition: width .45s ease, box-shadow .2s; animation: faceUp .6s cubic-bezier(.2,1.3,.4,1) both; }
.scene-face svg { width: 100%; height: 100%; display: block; }
.speaking .scene-face { box-shadow: 0 0 0 5px var(--clay), 0 0 40px rgba(204,91,43,.55), 0 26px 60px rgba(0,0,0,.45); }
.listening .scene-face { box-shadow: 0 0 0 5px var(--gold), 0 0 40px rgba(232,188,114,.55); }
.scene.has-slot .scene-face { width: min(120px, 30vw); }
@keyframes faceUp { from { opacity: 0; transform: translateY(40px) scale(.7); } }
.scene-say { position: relative; max-width: 100%; background: var(--paper-2); color: var(--ink); border-radius: 24px;
  padding: 14px 20px; font-size: clamp(18px, 4.6vw, 21px); font-weight: 800; line-height: 1.35; text-align: center;
  box-shadow: var(--shadow); min-height: 1em; }
.scene-say:empty { visibility: hidden; }
.scene-say::before { content: ""; position: absolute; top: -9px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-top: 0; border-bottom-color: var(--paper-2); }
.scene-say.pop { animation: pop .3s ease both; }
@keyframes pop { from { opacity: .3; transform: translateY(6px) scale(.98); } }
.scene-say .dots { display: inline-flex; gap: 5px; }
.scene-say .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); animation: dot 1.2s infinite; }
.scene-say .dots i:nth-child(2) { animation-delay: .15s; } .scene-say .dots i:nth-child(3) { animation-delay: .3s; }
.scene-slot { width: 100%; }
.scene-slot > .card { animation: rise .4s ease both; margin: 0; }
.scene-slot > .card.collapsed { display: none; }
.in-scene .topbar .stage { opacity: 0; pointer-events: none; }
.in-scene .quick { display: none; }
.song-pick .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.song-pick .chips button { border: 1.5px solid var(--paper-line); background: var(--paper-2); color: var(--ink); border-radius: 999px; padding: 9px 14px; font-weight: 800; font-size: 15px; }
.song-pick .chips button:hover { border-color: var(--clay); }
.song-pick .hint { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin: 12px 0 0; }
.thinking { display: flex; align-items: center; gap: 12px; justify-content: center; font-weight: 800; color: var(--ink-soft); }
.thinking .spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(204,91,43,.25); border-top-color: var(--clay); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.picker-card .answer-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.picker-card .answer-row .btn { padding-left: 8px; padding-right: 8px; }
.picker-card.picking .tile-btn { cursor: pointer; }
.picker-card:not(.picking) .tile-btn { pointer-events: none; }
.scene .tiles { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.scene .tile-btn { padding: 6px 4px 8px; border-radius: 16px; }
.scene .tile-btn .name { font-size: 18px; }
.scene .tile-btn .diagram { width: 56px; height: 70px; }
@media (max-width: 420px) {
  .picker-card .answer-row { grid-template-columns: 1fr 1fr; }
  .picker-card .answer-row [data-all] { grid-column: 1 / -1; }
}
.in-scene .thread { visibility: hidden; }

/* ── voice practice ── */
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.vhome-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vhome-head .vkey { display: block; font-size: 18px; font-weight: 900; margin-top: 2px; }
.vhome-head small { color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.vtoday { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.vtoday span { display: inline-flex; align-items: center; gap: 6px; }
.vtoday i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--paper-line); display: grid; place-items: center; font-style: normal; font-size: 12px; color: #fff; }
.vtoday i.on { background: var(--green); border-color: var(--green); }
.vlist { display: grid; gap: 8px; }
.vrow { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; text-align: left; border: 2px solid var(--paper-line); background: var(--paper-2); color: var(--ink); border-radius: 18px; padding: 12px 14px; }
.vrow:hover { border-color: var(--clay); }
.vrow .ico { font-size: 24px; text-align: center; }
.vrow b { display: block; font-size: 16px; font-weight: 900; }
.vrow small { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); line-height: 1.3; }
.vbig { font-size: 52px; font-weight: 900; color: var(--clay); text-align: center; line-height: 1.1; margin: 6px 0; }
.vkeys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.seg { display: inline-flex; background: rgba(20,20,23,.07); border-radius: 999px; padding: 4px; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--ink-soft); font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.extabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin-top: 8px; scrollbar-width: none; }
.extabs::-webkit-scrollbar { display: none; }
.extabs button { flex: none; text-align: left; border: 2px solid var(--paper-line); background: var(--paper-2); color: var(--ink); border-radius: 16px; padding: 8px 12px; display: grid; }
.extabs button b { font-size: 15px; font-weight: 900; }
.extabs button small { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.extabs button[aria-pressed="true"] { border-color: var(--clay); background: #fff3ec; }
.expurpose { font-size: 14.5px !important; }
.sylls { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-top: 10px; }
.syl { position: relative; overflow: hidden; border: 2px solid transparent; background: var(--paper-2); color: var(--ink); border-radius: 12px; padding: 8px 2px; display: grid; justify-items: center; gap: 1px; transition: background .08s, transform .08s; }
.syl b { font-size: 15px; font-weight: 900; }
.syl small { font-size: 10px; font-weight: 800; color: var(--ink-soft); }
.syl.on { background: var(--clay); color: #fff; transform: translateY(-2px); }
.syl.on small { color: rgba(255,255,255,.8); }
.syl .fill { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--clay); transition: width .1s linear; }
.syl.locked { background: #e9f5ec; border-color: var(--green); }
.syl.locked .fill { display: none; }
.sylls.big .syl { padding: 12px 2px; }
.sylls.big .syl.on { background: #fff3ec; color: var(--ink); border-color: var(--clay); transform: none; }
.sylls.big .syl.on small { color: var(--ink-soft); }
.excap { font-weight: 800; font-size: 14px; color: var(--ink-soft); margin: 10px 0 4px; min-height: 1.4em; }
.vtips { margin: 10px 0 0; padding-left: 22px; color: var(--ink-soft); font-weight: 600; font-size: 14.5px; display: grid; gap: 6px; }
.vtips[hidden] { display: none; }
.hiss .ring { position: relative; width: min(220px, 62vw); aspect-ratio: 1; margin: 6px auto 2px; }
.hiss .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hiss .ring circle { fill: none; }
.hiss .ring .track { stroke: rgba(20,20,23,.08); stroke-width: 14; }
.hiss .ring .lvl { stroke: var(--teal); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .08s linear; }
.hiss .ring .goal { stroke: var(--clay); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-in b { font-size: 46px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-in small { font-weight: 800; color: var(--ink-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.vstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.vstats span { background: var(--paper-2); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.vstats b { display: block; font-size: 20px; color: var(--ink); font-weight: 900; }
.vbadge { margin-top: 10px; background: #fff3ec; border-radius: 14px; padding: 10px 12px; font-weight: 700; color: var(--ink); }
.vbadges { display: flex; gap: 8px; margin-top: 8px; font-size: 22px; }
.vbadges span { filter: grayscale(1); opacity: .35; }
.vbadges span.on { filter: none; opacity: 1; }
.vmeter { margin-top: 12px; background: var(--paper-2); border-radius: 16px; padding: 10px 14px 12px; }
.vm-target { font-weight: 900; font-size: 17px; }
.vm-bar { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #f3d4c4, #e9f5ec 38%, #e9f5ec 62%, #f3d4c4); margin: 8px 0 6px; }
.vm-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--green); }
.vm-bar i { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--clay); opacity: .25; transition: left .08s linear, background .1s; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.vm-bar i.ok { background: var(--green); }
.vm-live { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.phrasepick { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.phrasepick button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--paper-line); background: var(--paper-2); font-weight: 900; color: var(--ink); }
.phrasepick button.done { background: var(--clay); border-color: var(--clay); color: #fff; }
.phrasepick button[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(36,95,115,.25); }
.lnotes { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; }
.lnote { min-width: 40px; border-radius: 12px; background: var(--paper-2); border: 2px solid transparent; padding: 6px 4px; display: grid; justify-items: center; color: var(--ink); }
.lnote b { font-size: 14px; font-weight: 900; }
.lnote small { font-size: 9px; font-weight: 900; color: var(--clay-dark); text-transform: uppercase; }
.lnote.now { border-color: var(--teal); background: #eaf3f5; }
.lnote.hit { background: #e9f5ec; border-color: var(--green); }
.holdbar { height: 8px; border-radius: 999px; background: rgba(20,20,23,.08); overflow: hidden; margin-top: 10px; }
.holdbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .1s linear; }
@media (max-width: 380px) { .syl b { font-size: 13px; } .syl small { font-size: 9px; } }
.scene .tile-btn[aria-pressed="true"]::after { top: -7px; right: -7px; width: 20px; height: 20px; font-size: 11px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
