:root {
  --ink: #25204d;
  --muted: #716e91;
  --purple: #6757e8;
  --purple-dark: #4435b4;
  --cyan: #2ec5ce;
  --yellow: #ffc84a;
  --pink: #ff6a94;
  --green: #38c98c;
  --red: #ee5472;
  --paper: #fffdf7;
  --line: #e9e6f3;
  --shadow: 0 20px 50px rgba(38, 29, 100, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 200, 74, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 88% 30%, rgba(46, 197, 206, 0.18) 0 3px, transparent 4px),
    linear-gradient(145deg, #f3efff 0%, #eefaff 46%, #fff8e9 100%);
  overflow-x: hidden;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.stars::before, .stars::after {
  content: "✦   ·   ✧   ·   ✦";
  position: fixed;
  color: rgba(103, 87, 232, 0.19);
  font-size: 28px;
  letter-spacing: 34px;
  transform: rotate(-12deg);
  pointer-events: none;
}
.stars::before { top: 16%; left: -3%; }
.stars::after { right: -5%; bottom: 14%; transform: rotate(10deg); }

.app-shell { width: min(1160px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 38px; }

.brand { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand-mark {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 17px;
  color: white; background: linear-gradient(145deg, var(--purple), var(--purple-dark));
  font: 800 28px "Baloo 2", sans-serif; transform: rotate(-6deg); box-shadow: 0 8px 18px rgba(103,87,232,.28);
}
.brand h1 { margin: -2px 0 0; font: 800 27px/1 "Baloo 2", sans-serif; letter-spacing: -.4px; }
.eyebrow { margin: 0; color: var(--purple); font-size: 11px; font-weight: 900; letter-spacing: 1.8px; }
.header-actions { margin-left:auto; display:flex; align-items:center; gap:9px; }
.map-button { min-height:42px; padding:0 15px; border:1px solid #d9d3f2; border-radius:999px; color:var(--purple-dark); background:rgba(255,255,255,.82); cursor:pointer; font-size:12px; font-weight:900; box-shadow:0 5px 14px rgba(37,32,77,.08); }
.map-button:hover { transform:translateY(-1px); border-color:var(--purple); }
.icon-button { border: 1px solid var(--line); background: rgba(255,255,255,.72); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; box-shadow: 0 5px 14px rgba(37,32,77,.08); }
.icon-button:hover { transform: translateY(-1px); }

.screen { display: none; animation: screen-in .42s ease both; }
.screen.active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }

.journey-hero { display:flex; align-items:center; justify-content:space-between; gap:30px; padding:38px 18px 22px; }
.journey-hero h2 { margin:4px 0 5px; font:800 clamp(42px,6vw,68px)/1 "Baloo 2",sans-serif; letter-spacing:-1.5px; }
.journey-hero p:not(.eyebrow) { max-width:650px; margin:0; color:var(--muted); font-size:17px; line-height:1.5; }
.journey-progress-ring { flex:0 0 126px; height:126px; display:grid; place-content:center; text-align:center; border-radius:50%; color:white; background:conic-gradient(var(--cyan) var(--journey-progress,0%),#7770a0 0); border:9px solid rgba(255,255,255,.75); box-shadow:0 12px 28px rgba(37,32,77,.18); position:relative; }
.journey-progress-ring::after { content:""; position:absolute; inset:10px; border-radius:50%; background:var(--purple-dark); z-index:0; }
.journey-progress-ring>* { position:relative; z-index:1; }
.journey-progress-ring strong { font:800 30px/1 "Baloo 2",sans-serif; }
.journey-progress-ring span { margin-top:3px; font-size:7px; font-weight:900; letter-spacing:1px; }
.board-toolbar { display:grid; grid-template-columns:1fr 205px 140px; align-items:center; gap:10px; margin:0 18px 16px; padding:13px 15px; border-radius:18px; background:rgba(255,255,255,.78); border:1px solid rgba(103,87,232,.12); box-shadow:0 7px 22px rgba(37,32,77,.07); }
.board-toolbar>div strong,.board-toolbar>div span { display:block; }
.board-toolbar>div strong { font-size:14px; }
.board-toolbar>div span { color:var(--muted); font-size:11px; }
.board-toolbar button { min-height:43px; }
.board-practice { padding:0 13px; }
.journey-map { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:18px; min-height:445px; padding:20px; border:4px solid white; border-radius:34px; background:linear-gradient(155deg,#dff6ed,#eef1ff 47%,#fff1d1); box-shadow:var(--shadow); position:relative; overflow:hidden; }
.journey-map::before { content:""; position:absolute; inset:0; opacity:.18; pointer-events:none; background-image:radial-gradient(circle at 15% 25%,#2e9d73 0 3px,transparent 4px),radial-gradient(circle at 70% 62%,#6757e8 0 2px,transparent 3px),radial-gradient(circle at 87% 20%,#d49d2d 0 4px,transparent 5px); background-size:95px 87px,120px 105px,155px 135px; }
.board-stage { position:relative; z-index:1; display:flex; flex-direction:column; min-width:0; padding:18px 16px 16px; border:2px solid rgba(255,255,255,.85); border-radius:26px; background:rgba(255,255,255,.54); backdrop-filter:blur(4px); }
.board-stage.stage-1,.board-stage.stage-2,.board-stage.stage-3 { transform:none; }
.stage-heading { display:flex; align-items:center; gap:10px; min-height:42px; margin-bottom:14px; }
.stage-heading>div { min-width:0; }
.stage-number { flex:0 0 40px; height:40px; display:grid; place-items:center; border-radius:14px; color:white; background:var(--purple); font:800 21px "Baloo 2",sans-serif; box-shadow:0 6px 14px rgba(103,87,232,.22); }
.stage-heading h3,.stage-heading p { margin:0; }
.stage-heading h3 { overflow:hidden; font:800 19px/1 "Baloo 2",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.stage-heading p { margin-top:2px; color:var(--muted); font-size:9px; text-transform:uppercase; font-weight:900; letter-spacing:.8px; }
.stage-badge { margin-left:auto; filter:grayscale(1); opacity:.34; font-size:27px; }
.board-stage.complete .stage-badge { filter:none; opacity:1; animation:badge-pop .5s ease; }
@keyframes badge-pop { 50% { transform:scale(1.3) rotate(8deg); } }
.stage-path { display:grid; grid-auto-rows:72px; gap:17px; position:relative; }
.stage-path::before { content:""; position:absolute; left:27px; top:31px; bottom:31px; border-left:4px dotted rgba(103,87,232,.3); }
.checkpoint { position:relative; display:grid; grid-template-columns:54px minmax(0,1fr); align-items:center; gap:10px; width:100%; height:72px; min-height:72px; padding:8px 10px 8px 7px; border:2px solid rgba(103,87,232,.15); border-radius:19px; color:var(--ink); background:rgba(255,255,255,.92); text-align:left; cursor:pointer; transition:.2s ease; box-shadow:0 7px 18px rgba(37,32,77,.07); }
.checkpoint:hover:not(:disabled) { transform:translateY(-3px) scale(1.01); border-color:var(--purple); box-shadow:0 12px 23px rgba(37,32,77,.12); }
.checkpoint:disabled { cursor:not-allowed; opacity:.57; filter:grayscale(.75); }
.checkpoint.current { border-color:var(--yellow); box-shadow:0 0 0 4px rgba(255,200,74,.22),0 10px 23px rgba(37,32,77,.1); animation:current-node 1.1s ease-in-out infinite alternate; }
@keyframes current-node { to { transform:translateY(-2px); box-shadow:0 0 0 7px rgba(255,200,74,.13),0 12px 25px rgba(37,32,77,.12); } }
.checkpoint.complete { border-color:var(--green); background:#effcf6; }
.checkpoint-node { position:relative; z-index:1; display:grid; place-items:center; width:52px; height:52px; border-radius:50%; color:white; background:#aaa7be; border:4px solid white; font-size:22px; box-shadow:0 4px 11px rgba(37,32,77,.2); }
.checkpoint.current .checkpoint-node { color:#6d4700; background:var(--yellow); }
.checkpoint.complete .checkpoint-node { background:var(--green); }
.checkpoint-copy { min-width:0; }
.checkpoint-copy strong,.checkpoint-copy small,.checkpoint-copy em { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.checkpoint-copy strong { font-size:12px; }
.checkpoint-copy small { margin-top:2px; color:var(--muted); font-size:9px; line-height:1.2; }
.checkpoint-copy em { margin-top:4px; color:var(--purple); font-size:8px; font-style:normal; font-weight:900; text-transform:uppercase; letter-spacing:.5px; }
.checkpoint.complete .checkpoint-copy em { color:#138158; }
.stage-reward { display:flex; align-items:center; justify-content:center; gap:6px; min-height:25px; margin:auto 0 0; padding-top:12px; color:#8a6a24; font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.6px; }
.stage-reward span { font-size:17px; filter:grayscale(1); }
.board-stage.complete .stage-reward span { filter:none; }
.journey-insights { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:16px 18px 30px; }
.journey-insights>div { display:grid; grid-template-columns:36px 1fr; column-gap:9px; padding:13px; border-radius:17px; background:rgba(255,255,255,.76); border:1px solid rgba(103,87,232,.1); }
.journey-insights>div>span { grid-row:1/3; display:grid; place-items:center; font-size:24px; }
.journey-insights small,.journey-insights strong { display:block; }
.journey-insights small { color:var(--muted); font-size:8px; font-weight:900; letter-spacing:.7px; text-transform:uppercase; }
.journey-insights strong { margin-top:2px; font-size:11px; }
.map-back { margin:0 0 13px; padding:0; border:0; color:var(--purple); background:transparent; cursor:pointer; font-size:11px; font-weight:900; }
.hidden { display:none !important; }

.start-grid { min-height: calc(100vh - 135px); display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 70px; padding: 28px 20px 30px; }
.hero-copy { position: relative; padding: 24px 0; }
.mascot { position: relative; width: 116px; height: 116px; margin: 0 0 25px 16px; border-radius: 52% 52% 48% 48%; background: linear-gradient(145deg,#fff,#dcd7ff); border: 5px solid var(--purple); transform: rotate(6deg); box-shadow: 0 18px 35px rgba(76,54,180,.18); }
.mascot::before, .mascot::after { content:""; position:absolute; z-index:-1; top:36px; width:40px; height:50px; background:var(--cyan); border:4px solid var(--ink); }
.mascot::before { left:-28px; border-radius:50% 10px 10px 50%; transform:rotate(-15deg); }
.mascot::after { right:-28px; border-radius:10px 50% 50% 10px; transform:rotate(15deg); }
.rocket-window { position:absolute; display:grid; place-items:center; inset:20px; border-radius:50%; background:var(--cyan); border:5px solid var(--ink); font-size:34px; color:white; }
.rocket-flame { position:absolute; left:43px; bottom:-34px; width:28px; height:44px; border-radius:50% 50% 65% 65%; background:linear-gradient(var(--yellow),var(--pink)); z-index:-2; animation: flame .7s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scaleY(.78); } }
.mission-pill { display:inline-block; margin:0 0 12px; padding:8px 13px; border-radius:999px; color:#8b5c00; background:#fff1bd; font-size:13px; font-weight:900; text-transform:uppercase; letter-spacing:.8px; }
.hero-copy h2 { max-width:580px; margin:0; font:800 clamp(48px,6vw,78px)/.94 "Baloo 2",sans-serif; letter-spacing:-2px; }
.intro { max-width:560px; margin:20px 0 24px; color:var(--muted); font-size:19px; line-height:1.55; }
.rhythm-preview { display:flex; flex-wrap:wrap; gap:8px; }
.rhythm-preview span { padding:7px 11px; color:#544c7d; background:rgba(255,255,255,.7); border:1px solid rgba(103,87,232,.12); border-radius:10px; font-size:12px; font-weight:800; }

.mission-card { background:rgba(255,253,247,.95); border:1px solid rgba(255,255,255,.8); border-radius:30px; padding:30px; box-shadow:var(--shadow); backdrop-filter:blur(12px); }
fieldset { border:0; padding:0; margin:0 0 24px; }
legend { margin-bottom:11px; font:800 18px "Baloo 2",sans-serif; }
.choice-stack { display:grid; gap:9px; }
.radio-card { display:grid; grid-template-columns:42px 1fr 28px; align-items:center; gap:12px; padding:12px 14px; border:2px solid var(--line); border-radius:16px; cursor:pointer; transition:.18s ease; }
.radio-card:hover { border-color:#bdb5f6; transform:translateY(-1px); }
.radio-card.selected { border-color:var(--purple); background:#f4f1ff; box-shadow:0 6px 18px rgba(103,87,232,.1); }
.measure-mode-card { position:relative; }
.measure-mode-card .level-tag { position:absolute; top:8px; right:10px; padding:3px 7px; border-radius:999px; color:#805000; background:var(--yellow); font-size:7px; font-weight:900; letter-spacing:.7px; }
.measure-mode-card.selected .level-tag { display:none; }
.radio-card input, .segmented input { position:absolute; opacity:0; pointer-events:none; }
.radio-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:white; font-size:21px; }
.radio-card strong { display:block; font-size:15px; }
.radio-card small { display:block; color:var(--muted); margin-top:2px; font-size:12px; }
.check { display:none; place-items:center; width:24px; height:24px; border-radius:50%; color:white; background:var(--purple); font-weight:900; }
.selected .check { display:grid; }
.segmented { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:5px; border-radius:14px; background:#f0edf7; }
.segmented label { padding:9px; border-radius:10px; text-align:center; cursor:pointer; color:var(--muted); font-size:13px; font-weight:900; }
.segmented label.selected { color:var(--purple-dark); background:white; box-shadow:0 3px 10px rgba(37,32,77,.08); }
.primary-button, .secondary-button { min-height:54px; border-radius:15px; border:0; font-weight:900; cursor:pointer; transition:.18s ease; }
.primary-button { width:100%; color:white; background:linear-gradient(135deg,var(--purple),#7b68ee); box-shadow:0 10px 20px rgba(103,87,232,.25); }
.primary-button:hover { transform:translateY(-2px); box-shadow:0 14px 25px rgba(103,87,232,.3); }
.primary-button:active { transform:translateY(0); }
.keyboard-hint { margin:11px 0 0; color:#9995ad; font-size:11px; text-align:center; }
.flight-log { margin-top:18px; padding:14px; border:1px solid #e6e1f2; border-radius:17px; background:#f8f6fd; }
.flight-log-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.flight-log-heading>div { display:flex; align-items:center; gap:7px; font-size:13px; }
.log-export { padding:5px 9px; color:var(--purple-dark); background:white; border:1px solid #dcd6f6; border-radius:8px; cursor:pointer; font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.45px; }
.log-export:hover { border-color:var(--purple); }
.log-stats { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; }
.log-stats span { padding:7px 3px; border-radius:9px; background:white; text-align:center; }
.log-stats strong,.log-stats small { display:block; }
.log-stats strong { color:var(--purple-dark); font-size:15px; }
.log-stats small { color:var(--muted); font-size:7px; font-weight:900; text-transform:uppercase; letter-spacing:.35px; }
.flight-log>p { margin:8px 0 0; color:#9691aa; font-size:9px; text-align:center; }

.tutorial-shell { max-width:940px; margin:34px auto 0; padding:28px 32px 30px; border:2px solid rgba(255,255,255,.9); border-radius:32px; background:rgba(255,253,247,.96); box-shadow:var(--shadow); }
.tutorial-top { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; }
.tutorial-top h2 { margin:3px 0 0; font:800 clamp(34px,5vw,50px)/1 "Baloo 2",sans-serif; }
.tutorial-top>span { flex:0 0 auto; padding:7px 11px; border-radius:999px; color:var(--purple-dark); background:#eeeaff; font-size:11px; font-weight:900; }
.tutorial-progress { height:8px; margin:18px 0 24px; border-radius:999px; background:#e9e5f3; overflow:hidden; }
.tutorial-progress>div { height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--cyan),var(--purple)); transition:width .3s ease; }
.tutorial-card { display:grid; grid-template-columns:minmax(280px,.9fr) minmax(340px,1.1fr); gap:30px; align-items:center; min-height:370px; padding:27px; border-radius:25px; background:linear-gradient(145deg,#f1f8ff,#fff8e6); border:1px solid #e6e1f2; }
.tutorial-visual { min-height:295px; display:grid; place-items:center; align-content:center; border-radius:22px; background:white; box-shadow:0 12px 28px rgba(37,32,77,.09); }
.tutorial-visual svg { width:min(88%,280px); height:205px; }
.tutorial-visual svg>line { stroke:#6757e8; stroke-width:2; opacity:.15; }
.tutorial-visual strong { margin-top:-13px; color:var(--purple-dark); font:800 19px "Baloo 2",sans-serif; }
.tutorial-rule { margin:0 0 7px; color:var(--purple); font-size:10px; font-weight:900; letter-spacing:1.5px; }
.tutorial-copy h3 { margin:0; font:800 30px/1.12 "Baloo 2",sans-serif; }
.tutorial-copy>p:not(.tutorial-rule) { margin:12px 0 18px; color:var(--muted); font-size:15px; line-height:1.55; }
.beat-equation { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:2px 0 16px; }
.beat-equation span { padding:9px 11px; border-radius:11px; color:var(--purple-dark); background:white; border:1px solid #ded8f4; font-size:15px; font-weight:900; box-shadow:0 4px 9px rgba(37,32,77,.05); }
.beat-equation .operator { padding:4px; border:0; background:transparent; box-shadow:none; color:#a29db6; font-size:19px; }
.tutorial-tip { padding:12px 14px; border-left:4px solid var(--yellow); border-radius:5px 12px 12px 5px; color:#6f5620; background:#fff5d4; font-size:12px; font-weight:800; line-height:1.45; }
.tutorial-nav { display:grid; grid-template-columns:130px 1fr 240px; align-items:center; gap:15px; margin-top:20px; }
.tutorial-nav .primary-button,.tutorial-nav .secondary-button { width:100%; }
.tutorial-dots { display:flex; justify-content:center; gap:8px; }
.tutorial-dots span { width:9px; height:9px; border-radius:50%; background:#d6d0e7; transition:.2s ease; }
.tutorial-dots span.active { width:26px; border-radius:999px; background:var(--purple); }
.tutorial-nav button:disabled { opacity:.35; cursor:not-allowed; }

.preflight-card { max-width:560px; margin:65px auto 0; padding:40px 55px 36px; text-align:center; background:rgba(255,253,247,.97); border-radius:32px; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.preflight-card::before { content:""; position:absolute; width:260px; height:260px; top:-180px; left:-90px; border-radius:50%; background:rgba(46,197,206,.11); }
.preflight-card::after { content:""; position:absolute; width:220px; height:220px; right:-145px; bottom:-130px; border-radius:50%; background:rgba(103,87,232,.1); }
.preflight-rocket { font-size:52px; margin-bottom:8px; animation:rocket-ready 1.4s ease-in-out infinite alternate; }
@keyframes rocket-ready { to { transform:translateY(-7px) rotate(4deg); } }
.preflight-card h2 { margin:4px 0 4px; font:800 42px "Baloo 2",sans-serif; }
.preflight-card>p:not(.eyebrow) { margin:0 auto; max-width:390px; color:var(--muted); line-height:1.5; }
.prep-countdown { position:relative; width:190px; height:190px; margin:22px auto 20px; }
.prep-countdown svg { width:100%; height:100%; transform:rotate(-90deg); }
.prep-bg,.prep-progress { fill:none; stroke-width:8; }
.prep-bg { stroke:#ebe7f5; }
.prep-progress { stroke:var(--cyan); stroke-linecap:round; stroke-dasharray:326.73; stroke-dashoffset:0; }
.prep-countdown>div { position:absolute; inset:0; display:grid; place-content:center; }
.prep-countdown strong { font:800 64px/1 "Baloo 2",sans-serif; color:var(--purple-dark); }
.prep-countdown span { color:var(--muted); font-size:9px; font-weight:900; letter-spacing:1.5px; }
.ready-button { max-width:310px; position:relative; z-index:1; }
.preflight-card .preflight-note { margin-top:12px !important; font-size:11px; }

.quiz-topbar { max-width:920px; margin:28px auto 0; }
.progress-copy { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; color:var(--muted); font-size:13px; font-weight:800; }
.progress-copy strong { color:var(--purple); }
.live-stats { display:flex; align-items:center; gap:8px; }
.live-stats strong { padding:5px 9px; border-radius:999px; background:rgba(255,255,255,.72); }
.live-stats .streak-chip { color:#a35c00; background:#fff2c8; transition:.2s ease; }
.live-stats .streak-chip.on-fire { color:#b82e46; background:#ffe6eb; animation:streak-pulse .55s ease-in-out infinite alternate; }
@keyframes streak-pulse { to { transform:scale(1.06); } }
.progress-track { height:10px; border-radius:999px; background:#e5e0f3; overflow:hidden; }
#progress-fill { width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--cyan),var(--purple)); transition:width .35s ease; }
.quiz-layout { display:grid; grid-template-columns:170px minmax(0,690px); justify-content:center; gap:42px; padding:38px 0 20px; }
.timer-card { text-align:center; padding-top:72px; }
.timer-ring { position:relative; width:132px; height:132px; margin:auto; }
.timer-ring svg { transform:rotate(-90deg); }
.timer-bg,.timer-progress { fill:none; stroke-width:8; }
.timer-bg { stroke:#e8e4f2; }
.timer-progress { stroke:var(--cyan); stroke-linecap:round; stroke-dasharray:270.18; stroke-dashoffset:0; transition:stroke .25s linear; }
.timer-value { position:absolute; inset:0; display:grid; place-content:center; }
.timer-value strong { font:800 46px/1 "Baloo 2",sans-serif; }
.timer-value span { margin-top:3px; color:var(--muted); font-size:8px; font-weight:900; letter-spacing:1.2px; }
.timer-card p { color:var(--muted); font-size:13px; font-weight:800; }
.timer-ring.urgent { animation:pulse .55s ease-in-out infinite alternate; }
.timer-ring.urgent .timer-progress { stroke:var(--red); }
@keyframes pulse { to { transform:scale(1.045); } }
.question-area { text-align:center; }
.question-kicker { margin:0 0 5px; color:var(--purple); font-size:11px; font-weight:900; letter-spacing:2px; }
.question-area h2 { margin:0 0 17px; font:800 clamp(27px,4vw,38px) "Baloo 2",sans-serif; }
.notation-card { min-height:205px; display:grid; place-items:center; padding:18px; border:2px solid white; border-radius:25px; background:var(--paper); box-shadow:var(--shadow); position:relative; overflow:hidden; }
.notation-card::before { content:""; position:absolute; inset:0; opacity:.055; background:repeating-linear-gradient(0deg,transparent 0 26px,var(--ink) 27px 28px); }
.notation-card svg { position:relative; width:min(100%,410px); height:165px; filter:drop-shadow(0 4px 1px rgba(37,32,77,.06)); }
.notation-card svg.measure-notation { width:min(100%,610px); }
.answer-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:17px; }
.answer-button { min-height:65px; display:flex; align-items:center; gap:12px; padding:10px 15px; color:var(--ink); background:white; border:2px solid var(--line); border-radius:16px; cursor:pointer; text-align:left; font-weight:900; transition:.16s ease; }
.answer-button:hover:not(:disabled) { border-color:var(--purple); transform:translateY(-2px); box-shadow:0 7px 18px rgba(37,32,77,.08); }
.answer-key { flex:0 0 31px; display:grid; place-items:center; height:31px; border-radius:9px; color:var(--purple); background:#f0edff; font-size:12px; }
.answer-button.correct { color:#116543; border-color:var(--green); background:#eafaf3; animation:answer-pop .3s ease; }
.answer-button.wrong { color:#9c2541; border-color:var(--red); background:#fff0f3; animation:shake .3s ease; }
.answer-button:disabled { cursor:default; }
@keyframes answer-pop { 50% { transform:scale(1.025); } }
@keyframes shake { 33% { transform:translateX(-4px); } 66% { transform:translateX(4px); } }
.feedback { min-height:35px; padding-top:10px; font-size:15px; font-weight:900; }
.feedback.good { color:#16845a; }
.feedback.bad { color:#bd3454; }

.result-card { max-width:680px; margin:55px auto 0; padding:35px 45px 39px; text-align:center; background:rgba(255,253,247,.96); border-radius:32px; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.result-card::before,.result-card::after { content:"✦  ·  ★  ·  ✦"; position:absolute; color:rgba(103,87,232,.15); font-size:24px; letter-spacing:14px; }
.result-card::before { left:-30px; top:80px; transform:rotate(-25deg); }
.result-card::after { right:-45px; top:120px; transform:rotate(25deg); }
.result-burst { width:64px; height:64px; display:grid; place-items:center; margin:0 auto 12px; border-radius:22px; color:white; background:linear-gradient(145deg,var(--yellow),#ff9d45); font-size:29px; transform:rotate(8deg); box-shadow:0 10px 24px rgba(255,173,50,.3); }
.result-card h2 { margin:5px 0 3px; font:800 40px "Baloo 2",sans-serif; }
.result-card>p:not(.eyebrow) { margin:0; color:var(--muted); }
.score-orbit { margin:25px auto; width:162px; height:162px; display:grid; place-items:center; border-radius:50%; border:2px dashed rgba(103,87,232,.25); animation:orbit 18s linear infinite; }
.score-circle { width:135px; height:135px; display:grid; place-content:center; border-radius:50%; color:white; background:linear-gradient(145deg,var(--purple),var(--purple-dark)); box-shadow:0 15px 28px rgba(68,53,180,.28); animation:orbit 18s linear infinite reverse; }
.score-circle strong { font:800 35px/1 "Baloo 2",sans-serif; }
.score-circle span { margin-top:5px; font-size:12px; font-weight:900; opacity:.8; }
@keyframes orbit { to { transform:rotate(360deg); } }
.result-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:0 0 20px; }
.result-stats div { padding:13px 8px; border-radius:15px; background:#f6f3fc; }
.result-stats span { display:block; color:var(--purple); font-size:16px; }
.result-stats strong { display:block; font-size:20px; }
.result-stats small { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.7px; }
.achievement-shelf { margin:0 0 24px; padding:15px; border-radius:18px; background:#fffae9; border:1px solid #f2e5b5; }
.achievement-shelf h3 { margin:0 0 10px; font:800 16px "Baloo 2",sans-serif; }
.achievement-list { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.achievement-badge { display:flex; align-items:center; gap:6px; padding:7px 10px; border-radius:999px; color:#76520b; background:white; border:1px solid #f0ddb1; font-size:11px; font-weight:900; }
.achievement-empty { color:var(--muted); font-size:12px; }
.result-log-summary { margin:-10px 0 18px !important; font-size:11px; font-weight:800; }
.journey-result-banner { margin:13px auto -8px; padding:9px 13px; max-width:410px; border-radius:12px; color:#755100; background:#fff1bd; border:1px solid #f1d373; font-size:12px; font-weight:900; }
.skill-insights { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:0 0 20px; }
.skill-insights>div { padding:10px; border-radius:13px; background:#f5f3fb; }
.skill-insights small,.skill-insights strong { display:block; }
.skill-insights small { color:var(--muted); font-size:7px; font-weight:900; letter-spacing:.7px; }
.skill-insights strong { margin-top:3px; font-size:11px; }
.result-actions { display:grid; grid-template-columns:1.2fr 1fr; gap:10px; }
.result-actions.solo { grid-template-columns:1fr; }
.secondary-button { color:var(--purple-dark); background:white; border:2px solid #dcd6f6; }
.secondary-button:hover { background:#f6f3ff; }

.achievement-toast { position:fixed; z-index:20; top:26px; left:50%; display:flex; align-items:center; gap:12px; min-width:270px; padding:12px 18px; color:white; background:linear-gradient(135deg,#2f286a,#6757e8); border:2px solid rgba(255,255,255,.55); border-radius:18px; box-shadow:0 18px 40px rgba(37,32,77,.32); opacity:0; pointer-events:none; transform:translate(-50%,-130%); transition:.36s cubic-bezier(.2,.9,.3,1.25); }
.achievement-toast.show { opacity:1; transform:translate(-50%,0); }
.achievement-toast>span { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:rgba(255,255,255,.15); font-size:24px; }
.achievement-toast small,.achievement-toast strong { display:block; }
.achievement-toast small { color:#d9d4ff; font-size:8px; font-weight:900; letter-spacing:1.2px; }
.achievement-toast strong { font:800 17px "Baloo 2",sans-serif; }

/* Rewards collection */
.rewards-shell { max-width:1040px; margin:34px auto 0; }
.rewards-hero { display:flex; align-items:center; justify-content:space-between; gap:28px; margin-bottom:18px; padding:30px 34px; border:2px solid rgba(255,255,255,.92); border-radius:30px; background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,247,210,.92)); box-shadow:var(--shadow); }
.rewards-hero h2 { margin:4px 0 6px; font:800 clamp(38px,6vw,58px)/1 "Baloo 2",sans-serif; }
.rewards-hero p:not(.eyebrow) { max-width:650px; margin:0; color:var(--muted); font-size:15px; line-height:1.5; }
.collection-ring { flex:0 0 126px; height:126px; display:grid; place-content:center; text-align:center; border:9px solid rgba(255,255,255,.8); border-radius:50%; color:white; background:linear-gradient(145deg,var(--yellow),#ff9d45); box-shadow:0 13px 28px rgba(160,101,17,.2); }
.collection-ring strong { font:800 27px/1 "Baloo 2",sans-serif; }
.collection-ring span { margin-top:4px; font-size:8px; font-weight:900; letter-spacing:1px; }
.rewards-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:11px; margin-bottom:18px; }
.rewards-summary>div { display:grid; grid-template-columns:45px 1fr; align-items:center; min-height:88px; padding:13px 15px; border:2px solid white; border-radius:19px; background:rgba(255,255,255,.82); box-shadow:0 7px 18px rgba(37,32,77,.07); }
.rewards-summary>div>span { grid-row:1/3; display:grid; place-items:center; width:40px; height:40px; border-radius:13px; background:#f1edff; font-size:22px; }
.rewards-summary small,.rewards-summary strong { display:block; }
.rewards-summary small { color:var(--muted); font-size:7px; font-weight:900; letter-spacing:.7px; text-transform:uppercase; }
.rewards-summary strong { font:800 19px/1.1 "Baloo 2",sans-serif; }
.reward-section { margin-bottom:18px; padding:20px; border:2px solid rgba(255,255,255,.92); border-radius:25px; background:rgba(255,255,255,.78); box-shadow:0 10px 26px rgba(37,32,77,.08); }
.reward-section-heading,.reward-section-heading>div { display:flex; align-items:center; }
.reward-section-heading { justify-content:space-between; gap:14px; margin-bottom:15px; }
.reward-section-heading>div { gap:10px; }
.reward-section-heading>div>span { display:grid; place-items:center; width:44px; height:44px; border-radius:14px; background:#fff0be; font-size:24px; }
.reward-section-heading small,.reward-section-heading h3 { display:block; margin:0; }
.reward-section-heading small { color:var(--muted); font-size:7px; font-weight:900; letter-spacing:1px; }
.reward-section-heading h3 { font:800 22px/1 "Baloo 2",sans-serif; }
.reward-section-heading>strong { padding:7px 11px; border-radius:999px; color:var(--purple-dark); background:#eeeaff; font-size:10px; }
.reward-badge-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.reward-badge-card { display:grid; grid-template-columns:50px 1fr auto; align-items:center; gap:10px; min-height:96px; padding:13px; border:2px solid #e6e1f2; border-radius:18px; background:white; }
.reward-badge-card.earned { border-color:#efcf69; background:linear-gradient(145deg,#fffdf4,#fff5c9); box-shadow:0 7px 17px rgba(122,82,0,.08); }
.reward-badge-card.locked { color:#9490a7; background:#f5f3f8; filter:saturate(.25); }
.reward-badge-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:16px; color:white; background:linear-gradient(145deg,var(--purple),var(--purple-dark)); font:800 25px "Baloo 2",sans-serif; box-shadow:0 7px 14px rgba(68,53,180,.18); }
.reward-badge-card.earned .reward-badge-icon { background:linear-gradient(145deg,var(--yellow),#e99920); }
.reward-badge-card.locked .reward-badge-icon { background:#aaa5b7; box-shadow:none; }
.reward-badge-card small,.reward-badge-card strong,.reward-badge-card p { display:block; margin:0; }
.reward-badge-card small { color:var(--purple); font-size:7px; font-weight:900; letter-spacing:.8px; }
.reward-badge-card.earned small { color:#8b620e; }
.reward-badge-card strong { margin-top:2px; font:800 16px/1.05 "Baloo 2",sans-serif; }
.reward-badge-card p { margin-top:3px; color:var(--muted); font-size:9px; line-height:1.25; }
.reward-check { font-size:15px; }
.journey-trophies { background:linear-gradient(135deg,rgba(242,239,255,.9),rgba(231,250,251,.9)); }
.journey-trophy-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }
.journey-trophy { position:relative; min-height:190px; padding:20px 16px 15px; overflow:hidden; border:3px solid rgba(103,87,232,.14); border-radius:22px; text-align:center; background:rgba(255,255,255,.82); }
.journey-trophy.earned { border-color:#e4b438; background:linear-gradient(145deg,#fffdf4,#ffedaa); box-shadow:0 10px 20px rgba(119,78,6,.12); }
.journey-trophy.locked { color:#8d899c; filter:saturate(.3); }
.trophy-icon { width:70px; height:70px; display:grid; place-items:center; margin:0 auto 10px; border:5px solid white; border-radius:24px; background:linear-gradient(145deg,var(--cyan),var(--purple)); font-size:35px; box-shadow:0 9px 18px rgba(68,53,180,.18); }
.journey-trophy.earned .trophy-icon { background:linear-gradient(145deg,var(--yellow),#e69124); }
.journey-trophy small,.journey-trophy strong,.journey-trophy p { display:block; margin:0; }
.journey-trophy small { color:var(--muted); font-size:7px; font-weight:900; letter-spacing:.7px; }
.journey-trophy strong { margin-top:4px; font:800 18px/1.1 "Baloo 2",sans-serif; }
.journey-trophy p { margin-top:3px; color:var(--muted); font-size:10px; }
.journey-trophy b { display:inline-block; margin-top:10px; padding:5px 8px; border-radius:999px; color:var(--purple-dark); background:#eeeaff; font-size:7px; letter-spacing:.7px; }
.journey-trophy.earned b { color:#76520b; background:white; }
.streak-history { background:linear-gradient(135deg,rgba(255,248,224,.93),rgba(255,235,239,.9)); }
.streak-history-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }
.streak-history-grid>div { display:flex; align-items:flex-start; gap:11px; padding:15px; border:1px solid #f1d8c6; border-radius:17px; background:rgba(255,255,255,.8); }
.streak-history-grid>div>span { flex:0 0 42px; height:42px; display:grid; place-items:center; border-radius:13px; background:#fff0d4; font-size:22px; }
.streak-history-grid small,.streak-history-grid strong,.streak-history-grid p { display:block; margin:0; }
.streak-history-grid small { color:#8f6b3d; font-size:7px; font-weight:900; letter-spacing:.7px; }
.streak-history-grid strong { margin-top:3px; font:800 20px/1 "Baloo 2",sans-serif; }
.streak-history-grid p { margin-top:5px; color:var(--muted); font-size:9px; line-height:1.35; }

/* Board-game world */
.game-hud { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:0 18px 14px; }
.hud-card { display:flex; align-items:center; gap:12px; min-height:82px; padding:14px 16px; border:2px solid rgba(255,255,255,.9); border-radius:20px; background:rgba(255,255,255,.82); box-shadow:0 8px 20px rgba(37,32,77,.08); }
.hud-card>span { flex:0 0 48px; height:48px; display:grid; place-items:center; border-radius:15px; background:#f0edff; font-size:26px; }
.streak-hud>span { background:#fff0d2; animation:flame-dance .8s ease-in-out infinite alternate; }
@keyframes flame-dance { to { transform:translateY(-3px) rotate(5deg) scale(1.05); } }
.hud-card small,.hud-card strong,.hud-card em { display:block; }
.hud-card small { color:var(--muted); font-size:8px; font-weight:900; letter-spacing:1px; }
.hud-card strong { margin-top:1px; font:800 20px/1.1 "Baloo 2",sans-serif; }
.hud-card em { margin-top:2px; color:var(--muted); font-size:9px; font-style:normal; font-weight:800; }
.daily-quest-panel { margin:0 18px 14px; padding:15px; border:2px solid #f0d987; border-radius:22px; background:linear-gradient(135deg,#fff9df,#fff1b8); box-shadow:0 8px 20px rgba(115,82,10,.08); }
.daily-quest-heading,.daily-quest-heading>div { display:flex; align-items:center; }
.daily-quest-heading { justify-content:space-between; gap:12px; margin-bottom:11px; }
.daily-quest-heading>div { gap:9px; }
.daily-quest-heading>div>span { font-size:28px; }
.daily-quest-heading small,.daily-quest-heading h3 { display:block; margin:0; }
.daily-quest-heading small { color:#8c6814; font-size:7px; font-weight:900; letter-spacing:1px; }
.daily-quest-heading h3 { font:800 19px/1 "Baloo 2",sans-serif; }
.daily-quest-heading>strong { padding:6px 10px; border-radius:999px; color:#73520d; background:white; font-size:10px; }
.daily-quest-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.daily-quest { display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:8px; min-width:0; padding:10px; border:1px solid #efdd9e; border-radius:14px; background:rgba(255,255,255,.78); }
.quest-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:12px; color:white; background:#b5ad93; font-size:18px; font-weight:900; }
.daily-quest.complete .quest-icon { background:var(--green); }
.daily-quest>div { min-width:0; }
.daily-quest strong,.daily-quest small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.daily-quest strong { font-size:11px; }
.daily-quest small { color:var(--muted); font-size:8px; }
.daily-quest>b { color:#8a681c; font-size:9px; white-space:nowrap; }
.quest-progress { height:5px; margin-top:6px; overflow:hidden; border-radius:99px; background:#e9e2cd; }
.quest-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--yellow),#ff9d45); }
.daily-quest.complete { border-color:#8fdcbd; background:#edfbf5; }

.journey-map { display:block; min-height:1050px; padding:68px 36px 80px; border:6px solid white; background:linear-gradient(180deg,#bfeeff 0 25%,#c9f3d5 25% 57%,#ffe7a9 57% 79%,#d9d0ff 79%); overflow:hidden; }
.journey-map::before { opacity:.25; background-image:radial-gradient(circle at 12% 15%,#fff 0 6px,transparent 7px),radial-gradient(circle at 75% 40%,#2e9d73 0 4px,transparent 5px),radial-gradient(circle at 35% 71%,#d49d2d 0 5px,transparent 6px); background-size:130px 110px,120px 125px,160px 145px; }
.board-sky { position:absolute; inset:12px 0 auto; display:flex; justify-content:space-around; color:rgba(255,255,255,.9); font-size:29px; pointer-events:none; }
.board-sky span:nth-child(1),.board-sky span:nth-child(3) { color:rgba(103,87,232,.3); animation:float-note 2.2s ease-in-out infinite alternate; }
@keyframes float-note { to { transform:translateY(-8px) rotate(8deg); } }
.board-legend { position:absolute; z-index:3; top:15px; left:50%; display:flex; gap:7px; padding:7px; border-radius:999px; background:rgba(255,255,255,.88); transform:translateX(-50%); box-shadow:0 5px 15px rgba(37,32,77,.1); }
.board-legend span { padding:6px 10px; border-radius:999px; font-size:9px; font-weight:900; white-space:nowrap; }
.lesson-key { color:#09737b; background:#dffbfc; }
.practice-key { color:#4735ae; background:#ece8ff; }
.gate-key { color:#7b5400; background:#fff0b9; }
.start-flag,.finish-castle { position:relative; z-index:2; display:flex; align-items:center; justify-content:center; gap:7px; font-weight:900; }
.start-flag { margin:2px 0 12px 3%; justify-content:flex-start; font-size:25px; }
.start-flag span,.finish-castle span { padding:5px 9px; border-radius:8px; color:white; background:var(--purple-dark); font-size:8px; letter-spacing:1px; }
.finish-castle { margin:26px 4% -36px 0; justify-content:flex-end; font-size:48px; animation:castle-glow 1.3s ease-in-out infinite alternate; }
@keyframes castle-glow { to { filter:drop-shadow(0 0 10px rgba(255,200,74,.9)); transform:translateY(-3px); } }
.board-stage { width:88%; min-height:240px; margin:0 auto 36px; padding:20px 22px; border:4px solid rgba(255,255,255,.85); border-radius:40px; background:rgba(255,255,255,.38); box-shadow:inset 0 0 24px rgba(255,255,255,.38),0 12px 30px rgba(37,32,77,.08); backdrop-filter:blur(3px); }
.board-stage.stage-1 { margin-left:1%; }
.board-stage.stage-2 { margin-right:1%; }
.board-stage.stage-3 { margin-left:6%; }
.board-stage::after { content:""; position:absolute; z-index:-1; width:70px; height:62px; right:-52px; bottom:-55px; border-right:7px dotted rgba(103,87,232,.38); border-bottom:7px dotted rgba(103,87,232,.38); border-radius:0 0 45px 0; }
.board-stage.stage-2::after { right:auto; left:-52px; border-right:0; border-left:7px dotted rgba(103,87,232,.38); border-radius:0 0 0 45px; }
.board-stage.stage-3::after { display:none; }
.stage-heading { min-height:46px; margin-bottom:22px; }
.stage-number { width:46px; height:46px; flex-basis:46px; border:4px solid white; border-radius:50%; }
.stage-heading h3 { font-size:22px; }
.stage-heading p { font-size:9px; }
.stage-badge { font-size:34px; }
.stage-path { display:flex; grid-auto-rows:unset; align-items:flex-start; justify-content:space-around; gap:22px; }
.stage-2 .stage-path { flex-direction:row-reverse; }
.stage-path::before { left:8%; right:8%; top:43px; bottom:auto; border-left:0; border-top:7px dotted rgba(103,87,232,.28); }
.checkpoint { display:flex; flex:1 1 0; flex-direction:column; align-items:center; justify-content:flex-start; gap:7px; width:auto; max-width:235px; height:145px; min-height:145px; padding:8px 10px 10px; border:3px solid rgba(103,87,232,.18); border-radius:25px; text-align:center; overflow:visible; }
.stage-2 .checkpoint { direction:ltr; }
.checkpoint:hover:not(:disabled) { transform:translateY(-5px); }
.checkpoint.current { border-color:var(--purple); animation:none; box-shadow:0 0 0 6px rgba(103,87,232,.17),0 14px 25px rgba(37,32,77,.15); }
.checkpoint-node { flex:0 0 67px; width:67px; height:67px; margin-top:-22px; border-width:5px; font-size:27px; }
.checkpoint.practice .checkpoint-node { background:linear-gradient(145deg,#7b68ee,var(--purple-dark)); }
.checkpoint.lesson { border-color:#55cdd3; background:#ecfeff; }
.checkpoint.lesson .checkpoint-node { background:linear-gradient(145deg,#48d6dc,#138e99); }
.checkpoint.gate { border-color:#e6b52f; background:linear-gradient(145deg,#fffdf4,#fff0b6); }
.checkpoint.gate .checkpoint-node { background:linear-gradient(145deg,#ffd85f,#e39a1e); box-shadow:0 0 0 5px rgba(255,216,95,.26),0 5px 13px rgba(113,70,0,.22); }
.checkpoint.complete .checkpoint-node { background:var(--green); }
.checkpoint-copy b { display:inline-block; padding:3px 7px; border-radius:999px; color:white; background:var(--purple); font-size:7px; text-transform:uppercase; letter-spacing:.8px; }
.checkpoint.lesson .checkpoint-copy b { background:#178f98; }
.checkpoint.gate .checkpoint-copy b { color:#704b00; background:var(--yellow); }
.checkpoint-copy strong,.checkpoint-copy small,.checkpoint-copy em { white-space:nowrap; }
.checkpoint-copy strong { margin-top:3px; font:800 14px/1 "Baloo 2",sans-serif; }
.checkpoint-copy small { font-size:8px; }
.checkpoint-copy em { margin-top:2px; font-size:7px; }
.stage-reward { margin:15px 0 0; padding:7px 10px 0; border-top:1px dashed rgba(103,87,232,.2); }
.board-player { position:absolute; z-index:6; top:7px; right:-34px; width:55px; height:55px; display:grid; place-items:center; border:5px solid white; border-radius:20px 20px 24px 24px; color:white; background:linear-gradient(145deg,var(--pink),#b82e6b); box-shadow:0 10px 20px rgba(93,28,91,.28); animation:bot-walk .55s ease-in-out infinite alternate; }
.board-player::before,.board-player::after { content:""; position:absolute; bottom:-10px; width:15px; height:13px; border-radius:0 0 8px 8px; background:#4d3a9d; }
.board-player::before { left:7px; transform:rotate(10deg); }
.board-player::after { right:7px; transform:rotate(-10deg); }
.board-player i { width:30px; height:24px; display:grid; place-items:center; border-radius:10px; color:var(--purple-dark); background:#dffcff; font:900 17px "Baloo 2",sans-serif; font-style:normal; }
@keyframes bot-walk { to { transform:translateY(-7px) rotate(3deg); } }

@media (max-width: 820px) {
  .app-shell { width:min(100% - 24px,700px); }
  .start-grid { grid-template-columns:1fr; gap:28px; padding:42px 8px; }
  .hero-copy { text-align:center; }
  .mascot { margin:0 auto 24px; }
  .intro { margin-left:auto; margin-right:auto; }
  .rhythm-preview { justify-content:center; }
  .quiz-layout { grid-template-columns:1fr; gap:10px; padding-top:22px; }
  .timer-card { padding-top:0; }
  .timer-ring { width:104px; height:104px; }
  .timer-value strong { font-size:37px; }
  .timer-card p { margin:3px 0 8px; }
  .preflight-card { margin-top:40px; }
  .tutorial-card { grid-template-columns:1fr; }
  .tutorial-visual { min-height:230px; }
  .tutorial-visual svg { height:165px; }
  .journey-map { grid-template-columns:1fr; }
  .board-stage.stage-1,.board-stage.stage-2,.board-stage.stage-3 { transform:none; }
  .board-toolbar { grid-template-columns:1fr 1fr; }
  .board-toolbar>div { grid-column:1/-1; }
  .journey-insights { grid-template-columns:1fr; }
  .game-hud { grid-template-columns:1fr 1fr; }
  .streak-hud { grid-column:1/-1; }
  .daily-quest-grid { grid-template-columns:1fr; }
  .rewards-summary { grid-template-columns:1fr 1fr; }
  .reward-badge-grid { grid-template-columns:1fr 1fr; }
  .journey-trophy-grid,.streak-history-grid { grid-template-columns:1fr; }
  .journey-map { min-height:0; padding:65px 18px 70px; }
  .board-stage { width:96%; }
  .checkpoint { min-width:0; }
}

@media (max-width: 540px) {
  .brand h1 { font-size:22px; }
  .brand-mark { width:43px; height:43px; border-radius:14px; }
  .brand .eyebrow { font-size:8px; letter-spacing:1px; }
  .map-button { min-height:38px; padding:0 11px; }
  .start-grid { padding-top:22px; }
  .hero-copy h2 { font-size:49px; }
  .mission-card { padding:21px 17px; border-radius:23px; }
  .rhythm-preview { display:none; }
  .answer-grid { grid-template-columns:1fr; gap:8px; }
  .answer-button { min-height:55px; }
  .notation-card { min-height:165px; }
  .notation-card svg { height:130px; }
  .quiz-topbar { margin-top:16px; }
  .result-card { margin-top:26px; padding:28px 18px; }
  .result-card h2 { font-size:32px; }
  .result-actions { grid-template-columns:1fr; }
  .preflight-card { margin-top:22px; padding:30px 18px; }
  .preflight-card h2 { font-size:34px; }
  .tutorial-shell { margin-top:18px; padding:21px 16px 22px; border-radius:24px; }
  .tutorial-top { align-items:flex-start; }
  .tutorial-top h2 { font-size:31px; }
  .tutorial-top>span { font-size:9px; }
  .tutorial-card { min-height:0; padding:15px; gap:20px; }
  .tutorial-visual { min-height:200px; }
  .tutorial-visual svg { height:145px; }
  .tutorial-copy h3 { font-size:25px; }
  .tutorial-nav { grid-template-columns:90px 1fr; }
  .tutorial-dots { display:none; }
  .tutorial-nav .primary-button { grid-column:2; }
  .prep-countdown { width:165px; height:165px; }
  .progress-copy { align-items:flex-start; }
  .live-stats { flex-wrap:wrap; justify-content:flex-end; max-width:230px; }
  .live-stats strong { font-size:10px; padding:4px 7px; }
  .result-stats { grid-template-columns:1fr 1fr; }
  .log-stats { grid-template-columns:repeat(5,1fr); }
  .log-stats small { font-size:6px; }
  .journey-hero { align-items:flex-start; padding:25px 5px 18px; }
  .journey-hero h2 { font-size:42px; }
  .journey-hero p:not(.eyebrow) { font-size:14px; }
  .journey-progress-ring { flex-basis:91px; height:91px; border-width:6px; }
  .journey-progress-ring strong { font-size:23px; }
  .board-toolbar { margin-left:0; margin-right:0; grid-template-columns:1fr; }
  .board-toolbar>div { grid-column:auto; }
  .journey-map { padding:12px; border-radius:25px; }
  .journey-insights { margin-left:0; margin-right:0; }
  .game-hud { grid-template-columns:1fr; margin-left:0; margin-right:0; }
  .streak-hud { grid-column:auto; }
  .daily-quest-panel { margin-left:0; margin-right:0; }
  .daily-quest-heading { align-items:flex-start; }
  .rewards-shell { margin-top:18px; }
  .rewards-hero { align-items:flex-start; padding:22px 18px; }
  .rewards-hero h2 { font-size:39px; }
  .rewards-hero p:not(.eyebrow) { font-size:12px; }
  .collection-ring { flex-basis:88px; height:88px; border-width:6px; }
  .collection-ring strong { font-size:21px; }
  .rewards-summary,.reward-badge-grid { grid-template-columns:1fr; }
  .reward-section { padding:15px; }
  .reward-section-heading { align-items:flex-start; }
  .journey-map { padding:62px 12px 54px; }
  .board-legend { top:13px; gap:3px; }
  .board-legend span { padding:5px 7px; font-size:7px; }
  .board-stage,.board-stage.stage-1,.board-stage.stage-2,.board-stage.stage-3 { width:100%; min-height:0; margin:0 0 35px; padding:17px 13px; border-radius:28px; }
  .board-stage::after,.board-stage.stage-2::after { left:50%; right:auto; bottom:-35px; width:0; height:35px; border:0; border-left:6px dotted rgba(103,87,232,.35); }
  .stage-heading h3 { font-size:18px; }
  .stage-path,.stage-2 .stage-path { flex-direction:column; align-items:stretch; gap:31px; }
  .stage-path::before { left:32px; right:auto; top:20px; bottom:20px; border-top:0; border-left:6px dotted rgba(103,87,232,.27); }
  .checkpoint { max-width:none; width:100%; height:96px; min-height:96px; display:grid; grid-template-columns:70px 1fr; align-items:center; gap:9px; padding:8px 11px; text-align:left; }
  .checkpoint-node { grid-row:1; margin:0; }
  .checkpoint-copy { text-align:left; }
  .checkpoint-copy strong,.checkpoint-copy small,.checkpoint-copy em { white-space:normal; }
  .board-player { top:-26px; left:auto; right:12px; transform:none; }
  @keyframes bot-walk { to { transform:translateY(-7px) rotate(3deg); } }
  .finish-castle { margin-right:0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
