/* Taal. Layout idea: left-aligned editorial sections on alternating bands; the player is the centrepiece. */
:root {
  --bg: #f1f4fb;
  --band: #e4e9f8;
  --surface: #ffffff;
  --ink: #1b2140;
  --muted: #5b6386;
  --line: #d0d7ee;
  --accent: #3b46c4;
  --turn: #e5487a;
  --note-c: #e5487a;
  --note-d: #e69a00;
  --note-e: #0e9c8a;
  --note-f: #2f7fd6;
  --note-g: #8a55d6;
  --note-a: #4f9d2d;
  --note-b: #6b7280;
  --on-note: #ffffff;
  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111427; --band: #171b36; --surface: #1d2245; --ink: #eef0fb; --muted: #a3abd0; --line: #343b66;
    --accent: #8f99ff; --turn: #ff7aa3; --note-c: #f0608d; --note-d: #f2b02e; --note-e: #2fc4b0;
    --note-f: #5aa2f0; --note-g: #a97bf0; --note-a: #76c152; --note-b: #9aa1ad; --on-note: #111427;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; max-width: 22ch; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; max-width: 65ch; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
section { padding: 64px 0; scroll-margin-top: 70px; }
.band { background: var(--band); }
.eyebrow { font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.lead.small { font-size: 1.05rem; }
.muted { color: var(--muted); font-size: .95rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 20; border-radius: 8px; }

.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 10px 20px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 6px 2px; }
.top nav a.cta { background: var(--accent); color: var(--surface); padding: 6px 16px; border-radius: 999px; }

.hero { max-width: 1040px; margin: 0 auto; padding: 56px 20px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--muted); font-size: .95rem; }
.stats strong { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-art { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mascot { width: min(260px, 60vw); height: auto; }
.pulse { display: flex; gap: 12px; }
.pulse i { width: 18px; height: 18px; border-radius: 50%; background: var(--line); animation: beat 2.5s infinite; }
.pulse i:nth-child(1) { background: var(--note-c); }
.pulse i:nth-child(2) { animation-delay: .625s; }
.pulse i:nth-child(3) { animation-delay: 1.25s; }
.pulse i:nth-child(4) { animation-delay: 1.875s; }
@keyframes beat { 0%, 20%, 100% { transform: scale(1); } 8% { transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .pulse i { animation: none; } }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; padding-top: 36px; } .hero-art { order: -1; } .mascot { width: 150px; } }

.btn { display: inline-block; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 10px 22px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.btn.big { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; min-width: 130px; padding: 8px 26px; }
.btn:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
#now { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
#now.turn { color: var(--turn); }
#clock { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.beat { width: 16px; height: 16px; border-radius: 50%; background: var(--line); }
.beat.on { background: var(--accent); }
.timeline { position: relative; display: flex; gap: 4px; }
.sec { flex-grow: var(--bars); flex-basis: 0; min-width: 0; border-radius: 10px; padding: 8px; font-size: .8rem; font-weight: 700; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; }
.sec small { display: block; font-weight: 400; color: var(--muted); }
.sec.turn { border-color: var(--turn); color: var(--turn); }
.sec.active { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.sec.active small { color: var(--surface); }
.sec.turn.active { background: var(--turn); border-color: var(--turn); }
#head { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); left: 0; pointer-events: none; }
.roll { display: grid; grid-template-columns: repeat(var(--beats, 16), 1fr); gap: 3px; }
.cell { height: 34px; border-radius: 7px; background: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--on-note); }
.cell.bar { margin-left: 5px; }
.cell.now { outline: 3px solid var(--ink); outline-offset: 1px; }
.keys { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; }
.key { border: 0; border-radius: 16px; height: clamp(110px, 24vw, 170px); color: var(--on-note); font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12px; opacity: .55; cursor: pointer; transition: transform .06s, opacity .06s; touch-action: manipulation; }
.key small { font-family: var(--font-body); font-size: .8rem; font-weight: 700; }
.key.due, .key.down { opacity: 1; transform: translateY(4px) scale(1.02); }
.key.due { outline: 4px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .key { transition: none; } .key.due, .key.down { transform: none; } }
[data-n="C"] { background: var(--note-c); } [data-n="D"] { background: var(--note-d); } [data-n="E"] { background: var(--note-e); }
[data-n="F"] { background: var(--note-f); } [data-n="G"] { background: var(--note-g); } [data-n="A"] { background: var(--note-a); } [data-n="B"] { background: var(--note-b); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps .n { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--accent); }
.steps p, .why p { color: var(--muted); font-size: .98rem; }
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 24px; }
.why div { display: flex; flex-direction: column; gap: 6px; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; align-items: center; }
.two > div { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.kinds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.kinds li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--muted); font-size: .98rem; }
.kinds strong { color: var(--ink); }
.chip { flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--c, var(--line)); border: 1px solid var(--line); }

.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.row.between { justify-content: space-between; align-items: center; }
.grow { flex: 1 1 240px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: .95rem; }
input[type="email"], input[type="url"], input:not([type]), select, input[type="file"] { font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .95rem; overflow-wrap: anywhere; }
.list li .grow { flex: 1 1 200px; }
.tag { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--band); color: var(--ink); }
.tag.good { background: var(--note-e); color: var(--on-note); }
.tag.warn { background: var(--note-d); color: var(--on-note); }
.parts { display: flex; flex-wrap: wrap; gap: 4px; }
.parts .chip { margin: 0; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; padding: 0; }
.privacy { margin-top: 4px; }
footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .95rem; }
footer .wrap { flex-direction: row; }

.tracks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tracks button { width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.tracks button b { font-family: var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.tracks button small { display: block; color: var(--muted); }
.tracks button[aria-current="true"] { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.tracks button[aria-current="true"] b, .tracks button[aria-current="true"] small { color: var(--surface); }
.lyrics { min-height: 3.2em; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.3; white-space: pre-line; max-width: none; }
@media (max-width: 560px) {
  .tracks { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tracks button { padding: 7px 10px; font-size: .92rem; }
  .tracks button small { display: none; }
  .sec { font-size: .7rem; padding: 6px 4px; }
  .sec small { display: none; }
}

.album { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.cover { width: min(220px, 40vw); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(27, 33, 64, .18); }
.album-text { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.album-title { font-size: 1.6rem; font-weight: 800; }
.stage { position: relative; height: clamp(150px, 34vw, 240px); border-radius: 14px; overflow: hidden; background: var(--band) center / cover no-repeat; display: flex; align-items: flex-end; justify-content: center; }
.stage.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17, 20, 39, .55), rgba(17, 20, 39, 0) 60%); }
.hopper { position: relative; z-index: 1; width: clamp(84px, 20vw, 130px); height: auto; margin-bottom: 10px; transform-origin: 50% 100%; transition: transform .12s ease-out; }
.hopper.hop { transform: translateY(-16%) scale(1.06, .96); }
.stage.turn .hopper { transform: scale(.85); opacity: .85; }
.dots { position: absolute; z-index: 2; left: 50%; top: 10px; transform: translateX(-50%); display: flex; justify-content: center; gap: 14px; padding: 8px 16px; border-radius: 999px; background: rgba(17, 20, 39, .38); }
.dots:empty { display: none; }
.dots i { width: clamp(22px, 5vw, 34px); aspect-ratio: 1; border-radius: 50%; opacity: .35; transition: transform .1s, opacity .1s; border: 2px solid var(--surface); }
.dots i.on { opacity: 1; transform: scale(1.5); }
@media (prefers-reduced-motion: reduce) { .hopper, .dots i { transition: none; } .hopper.hop { transform: none; } .dots i.on { transform: none; } }

/* Themed stage: backdrop clip behind, cast in front. */
.stage { height: auto; aspect-ratio: 16 / 9; max-height: 420px; width: 100%; align-items: stretch; }
.stagevid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cast { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; top: 0; }
.cast .hopper { position: absolute; left: 50%; bottom: 8%; margin: 0 0 0 calc(clamp(84px, 20vw, 130px) / -2); }
.char { position: absolute; bottom: var(--b, 30%); left: var(--x, 50%); width: var(--w, 17%); height: auto; transform: translateX(-50%); transform-origin: 50% 100%; transition: transform .14s ease-out, filter .2s; filter: drop-shadow(0 6px 6px rgba(17, 20, 39, .35)); animation: breathe 3.2s ease-in-out infinite; }
.char.hop { transform: translateX(-50%) translateY(-7%) scale(1.04, .97); animation: none; }
.char.play { transform: translateX(-50%) translateY(-34%) rotate(-6deg) scale(1.12); animation: none; filter: drop-shadow(0 14px 10px rgba(17, 20, 39, .35)) brightness(1.08); }
.stage.turn .char.friend { transform: translateX(-50%) scale(.9); filter: drop-shadow(0 6px 6px rgba(17, 20, 39, .35)) saturate(.7); }
.stage.turn .char.friend.play { transform: translateX(-50%) translateY(-12%) scale(.95); }
@keyframes breathe { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.03, .98); } }
@media (prefers-reduced-motion: reduce) { .char { transition: none; animation: none; } .char.hop, .char.play { transform: translateX(-50%); } }

.stagevid.film { transition: opacity .15s linear; }
.stage.turn .dots i { opacity: .6; }

.castbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.castlabel { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.casts { display: flex; flex-wrap: wrap; gap: 8px; }
.casts button { display: flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 4px 12px 4px 4px; cursor: pointer; }
.casts button img { width: 64px; height: 36px; object-fit: cover; border-radius: 8px; display: block; background: var(--band); }
.casts button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--surface); }

/* Still stage: a small picture of the chosen band, so the keys stay the main thing. */
.stage.still { max-width: 400px; max-height: 225px; margin-inline: auto; }
.stage.still .dots { display: none; }

/* Play on: screen keys or the family's lyre. */
.modebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.modes { display: flex; flex-wrap: wrap; gap: 8px; }
.modes button { font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 6px 16px; cursor: pointer; }
.modes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.lyre { display: flex; flex-direction: column; gap: 0; padding: 8px 16px; border-radius: 18px; background: #efe2c8; }
.string { display: grid; grid-template-columns: 2.2rem 1fr 2.4rem; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px 0; min-height: 30px; cursor: pointer; touch-action: manipulation; font: inherit; color: #8a7a5c; }
.snum { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-align: center; }
.sname { font-weight: 700; font-size: .85rem; text-align: left; }
.sline { display: block; width: var(--len, 100%); height: 2px; border-radius: 3px; background: #b9a888; transition: height .08s; }
.string.used { color: #3a2e1a; }
.string.used .sline { height: 7px; }
.string.due .sline { height: 14px; box-shadow: 0 0 0 3px #fff, 0 0 16px 6px rgba(255,255,255,.85); animation: twang .1s linear infinite alternate; }
.string.due .snum { color: #fff; background: #3a2e1a; border-radius: 999px; }
.string.down .sline { height: 12px; }
@keyframes twang { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .string.due .sline { animation: none; } }
.lyretip { font-size: .9rem; }

/* The hidden attribute always wins over display rules. */
[hidden] { display: none !important; }

/* Strings used by the song take the note's colour. */
.string .sline[data-n="C"] { background: var(--note-c); }
.string .sline[data-n="D"] { background: var(--note-d); }
.string .sline[data-n="E"] { background: var(--note-e); }
.string .sline[data-n="F"] { background: var(--note-f); }
.string .sline[data-n="G"] { background: var(--note-g); }
.string .sline[data-n="A"] { background: var(--note-a); }
.string .sline[data-n="B"] { background: var(--note-b); }

/* Instrument instructions. */
.howto { background: var(--bg); border-radius: 14px; padding: 12px 16px; font-size: .95rem; line-height: 1.5; }
/* Piano: one octave from middle C. */
.piano { position: relative; display: flex; height: clamp(150px, 26vw, 220px); border-radius: 10px; overflow: hidden; background: #222; padding: 6px 6px 8px; gap: 3px; }
.pkey { font: inherit; border: 0; cursor: pointer; touch-action: manipulation; }
.pkey.white { flex: 1; background: #fff; border-radius: 0 0 8px 8px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding-bottom: 10px; color: #555; font-weight: 700; }
.pkey.white.used { color: var(--on-note); }
.pkey.white small { font-size: .7rem; font-weight: 700; }
.pkey .pname { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.pkey .finger { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: rgba(255,255,255,.9); color: #222; display: grid; place-items: center; font-weight: 800; }
.pkey.black { position: absolute; top: 6px; width: 7%; height: 58%; transform: translateX(-50%); background: #1b1b1b; border-radius: 0 0 6px 6px; z-index: 1; box-shadow: inset 0 -6px 0 #444; }
.pkey.white[data-n] { opacity: .75; }
.pkey.due { opacity: 1 !important; box-shadow: inset 0 0 0 5px #111, 0 0 0 3px #fff; transform: translateY(3px); }
.pkey.down { transform: translateY(3px); filter: brightness(.92); }
@media (prefers-reduced-motion: reduce) { .pkey.due, .pkey.down { transform: none; } }
.pkey.white[data-n="C"] { background: var(--note-c); }
.pkey.white[data-n="D"] { background: var(--note-d); }
.pkey.white[data-n="E"] { background: var(--note-e); }
.pkey.white[data-n="F"] { background: var(--note-f); }
.pkey.white[data-n="G"] { background: var(--note-g); }
.pkey.white[data-n="A"] { background: var(--note-a); }
.pkey.white[data-n="B"] { background: var(--note-b); }

/* Toy xylophone: eight bars, longest (C) on the left. */
.xylo { display: flex; align-items: center; gap: 8px; padding: 16px 18px; height: clamp(170px, 28vw, 230px); border-radius: 16px; background: #5b3d24; }
.xbar { flex: 1; height: var(--h, 100%); border: 0; border-radius: 10px; background: #d9d4c7; color: #555; font: inherit; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 10px 0; cursor: pointer; touch-action: manipulation; opacity: .55; }
.xbar.used { opacity: .85; color: var(--on-note); }
.xbar .nail { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.35); }
.xbar.due { opacity: 1; box-shadow: 0 0 0 4px #fff, 0 0 18px 6px rgba(255,255,255,.7); transform: translateY(3px); }
.xbar.down { transform: translateY(3px); filter: brightness(.95); }
.xbar[data-n="C"], .udot[data-n="C"] { background: var(--note-c); }
.xbar[data-n="D"], .udot[data-n="D"] { background: var(--note-d); }
.xbar[data-n="E"], .udot[data-n="E"] { background: var(--note-e); }
.xbar[data-n="F"], .udot[data-n="F"] { background: var(--note-f); }
.xbar[data-n="G"], .udot[data-n="G"] { background: var(--note-g); }
.xbar[data-n="A"], .udot[data-n="A"] { background: var(--note-a); }
.xbar[data-n="B"], .udot[data-n="B"] { background: var(--note-b); }
/* Ukulele: the neck seen while holding it, G string on top. */
.uke { padding: 12px 16px; border-radius: 16px; background: #f1e3c9; }
.ustring, .ufretnums { display: grid; grid-template-columns: 2.4rem 1fr 1.4fr 1.3fr 1.2fr; align-items: center; }
.ustring { height: 46px; }
.uname { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; text-align: center; color: #3a2e1a; }
.ufret { position: relative; height: 100%; display: grid; place-items: center; border-right: 3px solid #a99a7d; }
.ufret::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #8c7b5c; }
.ufret.open { border-right: 7px solid #3a2e1a; }
.udot { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; border: 0; font: inherit; font-weight: 800; font-size: 1.05rem; color: var(--on-note); cursor: pointer; touch-action: manipulation; opacity: .8; }
.udot.due { opacity: 1; box-shadow: 0 0 0 4px #fff, 0 0 16px 6px rgba(255,255,255,.8); transform: scale(1.15); }
.udot.down { transform: scale(.94); }
.ufretnums span { font-size: .75rem; font-weight: 700; color: #6b5a3c; text-align: center; padding-top: 4px; }
@media (prefers-reduced-motion: reduce) { .xbar.due, .xbar.down, .udot.due, .udot.down { transform: none; } }

/* Taal Studio */
textarea { font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0; resize: vertical; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.chips label { flex-direction: row; align-items: center; gap: 6px; font-weight: 700; background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.chips input { accent-color: var(--accent); }
.st-words { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-words b { display: block; font-size: .9rem; margin-bottom: 4px; }
@media (max-width: 640px) { .st-words { grid-template-columns: 1fr; } }

.st-make { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.st-song-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-song-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.st-song-list b { font-family: var(--font-display); font-size: 1.1rem; }

/* Progress and rewards */
.reward { background: #fff6e0; color: #3a2e1a; border: 2px solid #f2c94c; border-radius: 16px; padding: 14px 18px; text-align: center; }
.reward .muted { color: #6b5a3c; }
.reward .levelup { color: #3b44c4 !important; }
.reward .stars { font-size: 2.6rem; letter-spacing: .15em; color: #e6a700; line-height: 1.1; }
.reward .stars .off { color: #e7dcc0; }
.reward p { margin: 6px 0 0; font-weight: 700; }
.reward .levelup { margin-top: 8px; color: var(--accent); font-family: var(--font-display); font-size: 1.3rem; }
.trackstars { display: block; font-size: .95rem; letter-spacing: .1em; color: #e6a700; }
.trackstars .off { color: #d9d4c7; }
.tracks button[aria-current="true"] .trackstars .off { color: rgba(255,255,255,.45); }
.tracks .later small::after { content: " · after 3 songs with 2 stars"; }
.nextup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 2px solid var(--accent); border-radius: 16px; padding: 12px 18px; margin-bottom: 12px; }
.nextup b { font-family: var(--font-display); font-size: 1.2rem; }
.kids { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kids li { background: var(--bg); border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.kids li b { font-family: var(--font-display); font-size: 1.2rem; }
.kids .week { color: var(--muted); font-size: .95rem; }

.albumtabs { margin-bottom: 14px; }

/* Album eight: the grown-up's note. Album nine: the child's own tune. */
.sec.free { border-style: dashed; }
.parentpad { display: grid; justify-items: center; gap: 4px; width: 100%; max-width: 360px; margin: 16px auto 0;
  padding: 16px 20px; border-radius: 28px; border: 3px solid var(--accent); background: var(--surface);
  color: var(--ink); font: inherit; cursor: pointer; transition: transform .08s; }
.parentpad b { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--accent); line-height: 1; }
.parentpad-who { font-weight: 700; }
.parentpad small { color: var(--muted, inherit); opacity: .8; }
.parentpad.due { background: var(--accent); }
.parentpad.due b, .parentpad.due span, .parentpad.due small { color: var(--surface); }
.parentpad.down { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .parentpad { transition: none; } .parentpad.down { transform: none; } }
.mytune { margin-top: 16px; padding: 16px; border-radius: 16px; border: 2px dashed var(--turn); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mytune p { flex-basis: 100%; margin: 0; font-weight: 700; }

/* Series One: nine album cards. */
.series { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.series button { width: 100%; height: 100%; display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 16px; border-radius: 18px;
  border: 2px solid var(--line, rgba(0,0,0,.12)); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.series button:hover { border-color: var(--accent); }
.series .n { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--surface);
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.series b { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.series small { display: block; color: var(--accent); font-weight: 700; margin: 2px 0 6px; }
.series p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Phones: the header stays one slim row; the menu scrolls sideways instead of wrapping onto a second row. */
@media (max-width: 720px) {
  .top { flex-wrap: nowrap; gap: 12px; padding: 8px 12px; }
  .top nav { flex-wrap: nowrap; overflow-x: auto; gap: 4px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; font-size: .9rem; }
}
@media (max-width: 720px) {
  #albumtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  #albumtabs::-webkit-scrollbar { display: none; }
  #albumtabs button { white-space: nowrap; flex: none; }
}
@media (max-width: 720px) {
  /* Keep "Your family" pinned at the right edge while the other menu items scroll under it. */
  .top nav a.cta { position: sticky; right: 0; flex: none; box-shadow: -14px 0 10px 4px var(--bg); }
}
