@font-face { font-family: 'Fredoka'; src: url('../fonts/Fredoka.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/Nunito.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }
:root {
  --ink: #2b2350; --ink-soft: #5d557f; --paper: rgba(255,255,255,.82); --glass: rgba(255,255,255,.16);
  --violet: #6b4fd8; --violet-d: #4a33a8; --pink: #ff7fae; --gold: #ffd36b; --aqua: #5fe0d6; --mint: #7fe6b8;
  --r: 22px; --shadow: 0 18px 50px rgba(30,10,80,.28), 0 2px 6px rgba(30,10,80,.12);
  --fs: 1rem;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Nunito, system-ui, sans-serif; color: #fff; background: #2b1f63; font-size: var(--fs); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.big { --fs: 1.15rem; }
h1, h2, h3, .brand-name, .btn, .pill, .gate-q { font-family: Fredoka, Nunito, sans-serif; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
#app { position: relative; min-height: 100vh; min-height: 100dvh; }
#bg-world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#app::before { content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(43,31,99,.0) 0%, rgba(43,31,99,.0) 55%, rgba(43,31,99,.55) 100%); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(12px, 3vw, 28px); padding-top: max(12px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; filter: drop-shadow(0 2px 8px rgba(40,10,90,.35)); }
.brand-mark { width: 40px; height: 40px; }
.brand-name { font-size: 1.6rem; font-weight: 600; letter-spacing: .5px; background: linear-gradient(90deg, #fff, #fff1c4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(30,18,80,.38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); font-weight: 600; font-size: .95rem; color: #fff; }
.seed-ico, .flame-ico, .gate-ico { width: 16px; height: 16px; display: inline-block; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff, #ffe9a0 35%, #ffb43d); box-shadow: 0 0 10px rgba(255,200,90,.9); }
.flame-ico { border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%; background: radial-gradient(circle at 50% 70%, #fff3b0, #ff9a5a 55%, #ff5f8a); box-shadow: 0 0 10px rgba(255,120,120,.8); }
.gate-ico { border-radius: 4px; transform: rotate(45deg) scale(.8); background: linear-gradient(135deg, #fff, #7ff7ff 50%, #6b4fd8); box-shadow: 0 0 10px rgba(127,247,255,.9); }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; border: 1px solid rgba(255,255,255,.3); background: rgba(30,18,80,.38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 1.3rem; transition: transform .15s; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { transform: translateY(-1px); } .icon-btn.small { width: 36px; height: 36px; border-radius: 12px; }
.calm-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.45); background: linear-gradient(135deg, rgba(127,230,184,.85), rgba(95,190,230,.85)); color: #12385a; font-family: Fredoka, sans-serif; font-weight: 600; box-shadow: 0 6px 18px rgba(40,140,170,.35); }
.calm-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.35); animation: calmPulse 5s ease-in-out infinite; }
@keyframes calmPulse { 0%, 100% { transform: scale(.8); } 45% { transform: scale(1.25); } }
.screen { position: relative; z-index: 5; padding: 8px clamp(14px, 4vw, 48px) 40px; max-width: 1180px; margin: 0 auto; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* home */
.hero { max-width: 640px; padding: clamp(16px, 7vh, 80px) 0 28px; text-shadow: 0 2px 20px rgba(60,20,120,.35); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; opacity: .9; margin: 0 0 8px; }
.title { font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.02; margin: 0 0 16px; font-weight: 700; color: #3b2a6b; text-shadow: 0 2px 0 rgba(255,255,255,.6); }
.glow-text { background: linear-gradient(90deg, #6b4fd8, #ff6fa8 60%, #ffb43d); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 4px 14px rgba(255,140,190,.45)); }
.lede { font-size: 1.12rem; line-height: 1.55; color: #3b2a6b; text-shadow: none; background: rgba(255,255,255,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 14px 18px; border-radius: 18px; margin: 0 0 22px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 16px; padding: 12px 22px; font-weight: 600; font-size: 1.05rem; color: #fff; transition: transform .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: linear-gradient(135deg, #7b5cff, #ff6fa8); box-shadow: 0 10px 26px rgba(123,92,255,.45), inset 0 -3px 0 rgba(0,0,0,.15), inset 0 2px 0 rgba(255,255,255,.35); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(255,111,168,.5), inset 0 -3px 0 rgba(0,0,0,.15), inset 0 2px 0 rgba(255,255,255,.35); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.85); color: var(--violet-d); box-shadow: 0 6px 18px rgba(40,20,100,.18); }
.btn-danger { background: #fff; color: #c2456b; border: 1px solid #f3c0cf; }
.btn-xl { font-size: 1.3rem; padding: 16px 34px; border-radius: 20px; }
.btn-small { padding: 8px 14px; font-size: .95rem; border-radius: 12px; }
.feature-chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.feature-chips li { display: flex; align-items: center; gap: 8px; background: rgba(43,31,99,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.22); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem; }
.chip-ico { width: 14px; height: 14px; border-radius: 50%; } .c1 { background: var(--gold); box-shadow: 0 0 10px var(--gold); } .c2 { background: var(--pink); box-shadow: 0 0 10px var(--pink); } .c3 { background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
/* more fun */
.more-fun { margin-top: clamp(30px, 10vh, 120px); background: rgba(43,31,99,.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.18); border-radius: 26px; padding: 20px; }
.more-fun h2 { margin: 0 0 14px; font-size: 1.35rem; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.mf-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; text-decoration: none; color: var(--ink); background: #fff; box-shadow: var(--shadow); transition: transform .2s; }
.mf-card:hover { transform: translateY(-3px); }
.mf-art { flex: 0 0 72px; height: 72px; border-radius: 18px; position: relative; overflow: hidden; }
.mf-bow .mf-art { background: radial-gradient(circle at 30% 30%, #fff 0 8%, transparent 9%), linear-gradient(135deg, #ffc2dc, #ff8fbf); }
.mf-bow .mf-art::before, .mf-bow .mf-art::after { content: ''; position: absolute; top: 24px; width: 26px; height: 24px; background: #fff; border-radius: 60% 40% 40% 60%; }
.mf-bow .mf-art::before { left: 10px; transform: rotate(-15deg); } .mf-bow .mf-art::after { right: 10px; transform: rotate(15deg) scaleX(-1); }
.mf-bird .mf-art { background: linear-gradient(160deg, #9fe7ff, #5fc48a); }
.mf-bird .mf-art::before { content: ''; position: absolute; left: 18px; top: 20px; width: 36px; height: 30px; background: radial-gradient(circle at 70% 35%, #2b2350 0 3px, transparent 4px), linear-gradient(135deg, #ffd36b, #ff9a5a); border-radius: 50% 60% 45% 55%; }
.mf-bird .mf-art::after { content: ''; position: absolute; left: 50px; top: 30px; border: 6px solid transparent; border-left: 10px solid #e8803a; }
.mf-txt { display: flex; flex-direction: column; gap: 2px; } .mf-txt b { font-family: Fredoka, sans-serif; font-size: 1.12rem; } .mf-txt small { color: var(--ink-soft); } .mf-txt em { font-style: normal; color: var(--violet); font-weight: 800; margin-top: 4px; font-size: .9rem; }
.site-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; font-size: .9rem; opacity: .95; }
.site-foot a { color: #fff; font-weight: 800; }
/* panels */
.panel-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 8px; }
.panel-head h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); flex: 1; text-shadow: 0 2px 12px rgba(40,10,90,.4); }
.back-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,.35); background: rgba(30,18,80,.45); color: #fff; font-size: 1.8rem; line-height: 1; backdrop-filter: blur(10px); }
.sub { margin: 0 0 18px; font-weight: 700; text-shadow: 0 1px 10px rgba(40,10,90,.5); }
/* years */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.year-card { position: relative; border: 0; border-radius: 24px; padding: 18px 16px 16px; min-height: 170px; text-align: left; color: #fff; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; justify-content: flex-end; }
.year-card:hover, .year-card:focus-visible { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 24px 60px rgba(30,10,80,.4); outline: none; }
.year-card .yc-num { position: absolute; top: 10px; right: 14px; font-family: Fredoka; font-size: 3.6rem; font-weight: 700; opacity: .9; line-height: 1; text-shadow: 0 4px 16px rgba(0,0,0,.2); }
.year-card .yc-label { font-family: Fredoka; font-size: 1.3rem; font-weight: 600; }
.year-card .yc-world { font-size: .9rem; opacity: .95; font-weight: 700; }
.year-card .yc-prog { margin-top: 8px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.3); overflow: hidden; } .year-card .yc-prog i { display: block; height: 100%; background: #fff; border-radius: 6px; }
.year-card::before { content: ''; position: absolute; inset: auto -20% -30% -20%; height: 70%; background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.35), transparent 70%); }
.year-card.current { outline: 3px solid #fff; outline-offset: 3px; }
/* map */
.map-wrap { position: relative; height: min(68vh, 620px); min-height: 440px; margin-top: 10px; border-radius: 28px; background: rgba(255,255,255,.12); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.25); overflow: hidden; }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-nodes { position: absolute; inset: 0; }
.node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: #fff; width: 150px; }
.node-orb { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: Fredoka; font-size: 1.6rem; font-weight: 700; color: #3b2a6b; background: radial-gradient(circle at 35% 30%, #fff, #ffe9a0 40%, #ffb43d); box-shadow: 0 0 0 6px rgba(255,255,255,.35), 0 0 30px rgba(255,210,110,.8), 0 10px 20px rgba(40,10,90,.3); transition: transform .2s; }
.node:hover .node-orb { transform: scale(1.08); }
.node.locked .node-orb { background: radial-gradient(circle at 35% 30%, #e9e6f5, #b8b1d6); box-shadow: 0 0 0 6px rgba(255,255,255,.2), 0 10px 20px rgba(40,10,90,.25); color: #7a7299; }
.node.next .node-orb { animation: nodePulse 2.4s ease-in-out infinite; }
@keyframes nodePulse { 50% { box-shadow: 0 0 0 12px rgba(255,255,255,.18), 0 0 46px rgba(255,210,110,1), 0 10px 20px rgba(40,10,90,.3); } }
.node-label { background: rgba(43,31,99,.72); padding: 6px 10px; border-radius: 12px; font-weight: 800; font-size: .9rem; text-align: center; line-height: 1.2; backdrop-filter: blur(8px); }
.node-label small { display: block; font-weight: 700; opacity: .8; font-size: .72rem; }
.node-best { font-size: .78rem; font-weight: 800; background: #fff; color: var(--violet-d); border-radius: 8px; padding: 2px 8px; }
/* play */
.screen-play { position: fixed; inset: 0; max-width: none; padding: 0; z-index: 20; animation: none; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); padding-right: 190px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-level { display: flex; flex-direction: column; background: rgba(30,18,80,.45); backdrop-filter: blur(10px); padding: 6px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.25); }
.hud-level span { font-family: Fredoka; font-weight: 600; } .hud-level small { opacity: .85; font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.hud-stats { display: flex; gap: 6px; flex-wrap: wrap; }
body.playing .topbar { position: fixed; right: 0; top: 0; z-index: 40; background: none; }
body.playing .topbar .brand, body.playing .topbar .pill { display: none; }
.touch-controls { position: absolute; left: 0; right: 0; bottom: 0; display: none; justify-content: space-between; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); pointer-events: none; }
.touch-controls .tc { pointer-events: auto; width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: rgba(30,18,80,.35); color: #fff; font-size: 1.5rem; backdrop-filter: blur(6px); user-select: none; -webkit-user-select: none; touch-action: none; }
.touch-controls .tc.active { background: rgba(255,255,255,.45); }
.tc-left { display: flex; gap: 14px; } .tc-jump { width: 92px !important; height: 92px !important; font-family: Fredoka; font-size: 1.1rem !important; font-weight: 600; }
body.touch .touch-controls { display: flex; } body.touch .help-hint { display: none; }
.help-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); margin: 0; background: rgba(30,18,80,.5); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; backdrop-filter: blur(8px); white-space: nowrap; }
.toast { position: absolute; top: 74px; left: 50%; transform: translate(-50%, -10px); opacity: 0; transition: all .35s; background: #fff; color: var(--violet-d); font-family: Fredoka; font-weight: 600; padding: 10px 18px; border-radius: 16px; box-shadow: var(--shadow); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* gate */
.gate { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(620px, calc(100% - 20px)); z-index: 25; animation: gateIn .4s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes gateIn { from { opacity: 0; transform: translate(-50%, 30px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
.gate-card { background: rgba(255,255,255,.95); color: var(--ink); border-radius: 26px; padding: 16px 18px 14px; box-shadow: 0 24px 60px rgba(30,10,80,.45), 0 0 0 4px rgba(255,255,255,.4); }
.gate-top { display: flex; justify-content: space-between; align-items: center; }
.gate-tag { font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--violet); }
.gate .icon-btn { background: #efeaff; color: var(--violet-d); border-color: #ddd3ff; backdrop-filter: none; }
.gate-q { font-size: calc(var(--fs) * 1.45); font-weight: 600; margin: 6px 0 10px; line-height: 1.25; }
.gate-visual:empty { display: none; }
.gate-visual { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 10px; background: #f6f2ff; border-radius: 16px; margin-bottom: 10px; }
.gate-answer { display: grid; gap: 8px; }
.ans-display { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; border-radius: 16px; background: #fff; border: 2px solid #ddd3ff; font-family: Fredoka; font-size: 2rem; font-weight: 600; color: var(--violet-d); }
.ans-display .caret { width: 3px; height: 30px; background: var(--violet); animation: blink 1s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } }
.ans-display .affix { color: #9a90c4; font-size: 1.4rem; }
.pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pad button { height: 50px; border-radius: 14px; border: 0; background: #efeaff; color: var(--violet-d); font-family: Fredoka; font-size: 1.35rem; font-weight: 600; box-shadow: inset 0 -3px 0 rgba(107,79,216,.18); }
.pad button:active { transform: translateY(2px); box-shadow: none; }
.pad .go { grid-column: span 2; background: linear-gradient(135deg, #7b5cff, #ff6fa8); color: #fff; }
.pad .wide { grid-column: span 1; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choices button { min-height: 58px; border-radius: 16px; border: 2px solid #ddd3ff; background: #fff; color: var(--violet-d); font-family: Fredoka; font-size: 1.5rem; font-weight: 600; box-shadow: 0 4px 0 #ddd3ff; transition: transform .1s; }
.choices button:hover { transform: translateY(-2px); } .choices button.dim { opacity: .4; }
.gate-feedback { min-height: 1.4em; margin: 8px 2px 0; font-weight: 800; color: var(--violet-d); }
.gate-feedback.warm { color: #b4582f; } .gate-feedback.yay { color: #1f8f6a; }
/* visuals */
.v-dots { display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(3, 26px); gap: 6px; padding: 10px; background: #fff; border-radius: 14px; box-shadow: 0 4px 10px rgba(80,60,160,.15); }
.dot { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffe08a 40%, #ff9f3d); box-shadow: 0 0 10px rgba(255,170,60,.6); }
.v-objs { display: flex; flex-wrap: wrap; gap: 6px; max-width: 360px; justify-content: center; } .v-objs .dot { width: 22px; height: 22px; }
.v-row { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .v-row > div { display: flex; gap: 5px; align-items: center; font-weight: 800; }
.dot.empty { background: #fff; border: 2px dashed #c7bdf0; box-shadow: none; } .dot.gone { opacity: .25; filter: grayscale(1); }
.basket { display: inline-flex; min-width: 56px; height: 40px; border: 3px solid #c79a6b; border-top: 0; border-radius: 0 0 18px 18px; background: linear-gradient(#fff7ec, #f4dcc0); margin: 0 4px; }
.mab { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mab .h { width: 44px; height: 44px; background: repeating-linear-gradient(0deg, #7b5cff 0 4px, #9b85ff 4px 4.4px), #7b5cff; border-radius: 4px; background-image: linear-gradient(#ffffff55 1px, transparent 1px), linear-gradient(90deg, #ffffff55 1px, transparent 1px); background-size: 4.4px 4.4px; }
.mab .t { width: 8px; height: 44px; background: #ff6fa8; border-radius: 3px; background-image: linear-gradient(#ffffff77 1px, transparent 1px); background-size: 100% 4.4px; }
.mab .o { width: 8px; height: 8px; background: #ffb43d; border-radius: 2px; }
.mab .grp { display: flex; gap: 3px; align-items: flex-end; flex-wrap: wrap; max-width: 160px; }
.fracbar { display: flex; width: min(360px, 100%); height: 38px; border-radius: 12px; overflow: hidden; border: 3px solid #7b5cff; background: #fff; }
.fracbar i { flex: 1; border-right: 2px solid #7b5cff; } .fracbar i:last-child { border-right: 0; } .fracbar i.on { background: linear-gradient(#b59bff, #7b5cff); }
.track { display: flex; gap: 6px; } .track span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 2px solid #ddd3ff; font-family: Fredoka; font-weight: 600; font-size: 1.2rem; color: var(--violet-d); } .track span.q { background: #ffe9a0; border-color: #ffb43d; }
/* overlays */
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30,15,80,.55); backdrop-filter: blur(6px); z-index: 50; padding: 16px; }
.score-card { position: relative; width: min(460px, 100%); background: #fff; color: var(--ink); border-radius: 30px; padding: 24px 22px 18px; text-align: center; box-shadow: var(--shadow); animation: pop .5s cubic-bezier(.2,.9,.3,1.3) both; overflow: hidden; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.score-card h2 { margin: 0 0 6px; font-size: 2rem; color: var(--violet-d); } .score-card .eyebrow { color: var(--violet); }
.burst { position: absolute; inset: -40% -40% auto; height: 120%; background: conic-gradient(from 0deg, #ffd36b22, #ff7fae22, #7ff7ff22, #b59bff22, #ffd36b22); animation: spin 18s linear infinite; z-index: 0; pointer-events: none; border-radius: 50%; }
.score-card > *:not(.burst) { position: relative; z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.score-ring { position: relative; width: 150px; height: 150px; margin: 6px auto 4px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #efeaff; stroke-width: 12; } .ring-fg { fill: none; stroke: url(#none); stroke: #7b5cff; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; } .ring-txt b { font-family: Fredoka; font-size: 2.3rem; color: var(--violet-d); line-height: 1; } .ring-txt span { font-family: Fredoka; font-weight: 600; color: #ff6fa8; font-size: 1rem; }
.score-sub { margin: 4px 0 12px; font-weight: 700; color: var(--ink-soft); }
.pb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; } .pb-row div { background: #f6f2ff; border-radius: 14px; padding: 8px; } .pb-row small { display: block; color: var(--ink-soft); font-weight: 800; font-size: .75rem; } .pb-row b { font-family: Fredoka; font-size: 1.35rem; color: var(--violet-d); }
.unlock { background: linear-gradient(135deg, #fff3c4, #ffd9ea); border-radius: 14px; padding: 8px; font-weight: 800; color: #8a3d5c; }
.score-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.link-btn { margin-top: 10px; background: none; border: 0; color: var(--violet); font-weight: 800; text-decoration: underline; }
.new-pb { display: inline-block; background: linear-gradient(135deg, #ffd36b, #ff7fae); color: #fff; padding: 4px 12px; border-radius: 999px; font-family: Fredoka; font-weight: 600; animation: pop .6s .6s both; }
/* report */
.report { background: rgba(255,255,255,.95); color: var(--ink); border-radius: 28px; padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); }
.report-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.report-grade { width: 130px; height: 130px; border-radius: 30px; display: grid; place-content: center; text-align: center; background: linear-gradient(135deg, #7b5cff, #ff6fa8); color: #fff; box-shadow: 0 14px 34px rgba(123,92,255,.4); }
.report-grade b { font-family: Fredoka; font-size: 4rem; line-height: 1; } .report-grade span { font-weight: 800; font-size: .9rem; }
.report-main { flex: 1; min-width: 240px; } .report-main .eyebrow { color: var(--violet); }
.rep-pct { margin: 0 0 8px; } .rep-pct b { font-family: Fredoka; font-size: 2.6rem; color: var(--violet-d); } .rep-pct span { font-weight: 800; color: var(--ink-soft); }
.bar { height: 14px; border-radius: 10px; background: #efeaff; overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7b5cff, #ff6fa8); border-radius: 10px; transition: width 1s; }
.rep-note { color: var(--ink-soft); font-weight: 700; margin: 10px 0 0; }
.rep-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rep-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); padding: 8px 6px; border-bottom: 2px solid #efeaff; }
.rep-table td { padding: 10px 6px; border-bottom: 1px solid #f1edff; vertical-align: middle; }
.rep-table td b { font-family: Fredoka; font-size: 1.1rem; } .rep-table code { font-size: .8rem; background: #f6f2ff; padding: 2px 6px; border-radius: 6px; color: var(--violet-d); }
.mini-bar { display: inline-block; width: 70px; height: 8px; border-radius: 6px; background: #efeaff; vertical-align: middle; margin-right: 6px; overflow: hidden; } .mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7b5cff, #ff6fa8); }
.grade-chip { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font-family: Fredoka; font-weight: 700; color: #fff; background: #b8b1d6; } .g-A { background: #6b4fd8; } .g-B { background: #3aa3b8; } .g-C { background: #4fae6d; } .g-D { background: #e3a13a; } .g-E { background: #d9739a; }
.rep-key { color: var(--ink-soft); font-size: .85rem; font-weight: 700; margin: 12px 0 0; }
/* sheets */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(30,15,80,.5); backdrop-filter: blur(6px); padding: 14px; }
.sheet-card { width: min(560px, 100%); max-height: calc(100dvh - 28px); overflow: auto; background: #fff; color: var(--ink); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); animation: pop .35s both; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .sheet-head h2 { margin: 0; color: var(--violet-d); }
.sheet .icon-btn { background: #f1edff; color: var(--violet-d); border-color: #e4dcff; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 4px; border-bottom: 1px solid #f1edff; }
.set-row.col { flex-direction: column; align-items: flex-start; }
.set-row span { display: flex; flex-direction: column; } .set-row small { color: var(--ink-soft); font-weight: 600; }
.set-row select { font: inherit; padding: 8px 10px; border-radius: 12px; border: 2px solid #ddd3ff; color: var(--violet-d); background: #fff; font-weight: 700; }
.set-row input[type=range] { width: 150px; accent-color: var(--violet); }
.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 30px; background: #ddd6f3; position: relative; transition: background .2s; flex: 0 0 auto; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: linear-gradient(135deg, #7b5cff, #ff6fa8); } .switch:checked::after { transform: translateX(22px); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; } .swatch { width: 40px; height: 40px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 0 0 2px #ddd3ff; position: relative; } .swatch.sel { box-shadow: 0 0 0 3px var(--violet); } .swatch.locked { opacity: .35; } .swatch.locked::after { content: attr(data-need); position: absolute; inset: 0; display: grid; place-items: center; font-size: .65rem; font-weight: 900; color: #2b2350; }
.snd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.snd-opt { text-align: left; border: 2px solid #ece6ff; border-radius: 18px; background: #faf8ff; padding: 12px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.snd-opt b { font-family: Fredoka; font-size: 1.05rem; } .snd-opt small { color: var(--ink-soft); font-weight: 700; }
.snd-opt.sel { border-color: var(--violet); background: #f1edff; box-shadow: 0 6px 16px rgba(107,79,216,.2); }
.snd-ico { width: 34px; height: 34px; border-radius: 12px; margin-bottom: 4px; } .snd-ico.brown { background: radial-gradient(circle at 30% 30%, #e7c7a5, #8a5a3c); } .snd-ico.rain { background: radial-gradient(circle at 30% 30%, #d8f1ff, #5f9fd6); } .snd-ico.stream { background: radial-gradient(circle at 30% 30%, #d7fff4, #3fb5a6); } .snd-ico.forest { background: radial-gradient(circle at 30% 30%, #e3ffd2, #4fae6d); }
.fine { font-size: .82rem; color: var(--ink-soft); font-weight: 600; margin: 10px 0 0; }
/* calm corner */
.calm { position: fixed; inset: 0; z-index: 80; color: #fff; animation: fadeIn .8s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
#calm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.calm-ui { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); text-align: center; }
.calm-top h2 { margin: 6px 0 4px; font-size: 2rem; } .calm-top p { margin: 0; font-weight: 700; opacity: .9; }
.breath { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.breath-bubble { width: 210px; height: 210px; border-radius: 50%; display: grid; place-items: center; font-family: Fredoka; font-size: 1.35rem; font-weight: 600; color: #fff; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75), rgba(170,220,255,.35) 40%, rgba(150,130,255,.25) 70%, rgba(255,255,255,.1)); border: 2px solid rgba(255,255,255,.6); box-shadow: 0 0 60px rgba(160,200,255,.55), inset 0 0 40px rgba(255,255,255,.25); transform: scale(.62); transition: transform 4s cubic-bezier(.45,0,.55,1); }
.breath-bubble.in { transform: scale(1); } .breath-bubble.out { transition-duration: 6s; transform: scale(.62); }
.breath-tip { margin: 0; font-weight: 700; opacity: .85; max-width: 320px; }
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fbubble { position: absolute; border-radius: 50%; pointer-events: auto; border: 0; padding: 0; background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.95) 0 8%, rgba(255,255,255,.18) 9%, rgba(200,180,255,.18) 60%, rgba(255,255,255,.55) 100%); box-shadow: inset 0 0 12px rgba(255,255,255,.5); animation: floatUp linear forwards; }
.fbubble.popping { animation: popB .25s ease-out forwards !important; }
@keyframes floatUp { from { transform: translateY(0); } to { transform: translateY(-120vh); } }
@keyframes popB { to { transform: scale(1.6); opacity: 0; } }
.calm-controls { display: flex; flex-direction: column; gap: 12px; align-items: center; position: relative; z-index: 2; }
.calm-sounds { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; background: rgba(20,20,60,.4); padding: 8px; border-radius: 16px; backdrop-filter: blur(8px); font-weight: 800; }
.calm-sounds button { border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; border-radius: 12px; padding: 6px 12px; font-weight: 800; }
.calm-sounds button.on { background: #fff; color: #2b4a7a; }
/* calm mode: softer palette */
body.calm-mode { --pink: #e9a8c4; --gold: #f0d9a0; }
body.calm-mode #bg-world, body.calm-mode #world { filter: saturate(.65) brightness(1.02); }
body.calm-mode .btn-primary { background: linear-gradient(135deg, #8f86d8, #c99ac0); }
body.reduced *, body.reduced *::before, body.reduced *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
body.reduced .breath-bubble { transition-duration: 4s !important; } body.reduced .breath-bubble.out { transition-duration: 6s !important; }
@media (max-width: 640px) {
  .calm-btn { padding: 0 10px; font-size: .9rem; } .calm-btn .calm-dot { display: none; }
  .brand-name { font-size: 1.25rem; } .brand-mark { width: 32px; height: 32px; }
  .topbar-right .pill.streak-pill { display: none; }
  .hud { padding-right: 150px; } .hud-level small { display: none; } .hud-stats .pill { padding: 4px 8px; }
  body.playing .topbar #btn-settings { display: none; }
  .gate-card { padding: 12px; } .gate-q { font-size: calc(var(--fs) * 1.2); } .pad button { height: 44px; }
  .rep-table th:nth-child(2), .rep-table td:nth-child(2), .rep-table th:nth-child(5), .rep-table td:nth-child(5) { display: none; }
  .node { width: 110px; } .node-orb { width: 58px; height: 58px; font-size: 1.3rem; } .node-label { font-size: .78rem; }
  .touch-controls .tc { width: 60px; height: 60px; } .tc-jump { width: 78px !important; height: 78px !important; }
  body.gate-open .touch-controls { display: none; }
}

.score-word { margin: 0; font-weight: 800; color: #ff6fa8; }
.rep-avg { margin: 8px 0 0; font-weight: 800; color: var(--violet); }
body[data-screen=years] #bg-world, body[data-screen=map] #bg-world, body[data-screen=report] #bg-world { filter: blur(3px) saturate(.9); }
.map-wrap { background: linear-gradient(160deg, rgba(43,31,99,.42), rgba(107,79,216,.25)); box-shadow: inset 0 0 80px rgba(255,255,255,.08); }
.node-orb { position: relative; z-index: 1; }
.node::before { content: ''; position: absolute; top: 46px; left: 50%; width: 112px; height: 40px; transform: translateX(-50%); border-radius: 50% 50% 46% 46% / 30% 30% 70% 70%; background: linear-gradient(#9be58a 0 22%, #b0784f 23%, #6e4a30); box-shadow: 0 12px 20px rgba(20,0,60,.3); z-index: 0; }
.node.locked::before { filter: grayscale(.7) brightness(.9); }
.node-label { position: relative; z-index: 1; margin-top: 12px; }
body.gate-open .help-hint { display: none; }
@media (min-width: 900px) {
  .gate { left: auto; right: 24px; top: 84px; bottom: auto; transform: none; width: 420px; animation: gateInSide .4s cubic-bezier(.2,.9,.3,1.2) both; }
  @keyframes gateInSide { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) { .node::before { top: 36px; width: 86px; height: 30px; } }

.hud-level { min-width: 0; max-width: 46vw; } .hud-level span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .hud { gap: 6px; padding-right: 140px; align-items: flex-start; } .hud-level { max-width: 34vw; } .hud-level span { font-size: .85rem; } }

@media (max-width: 640px) { .map-wrap { height: auto; min-height: 700px; } .node-label { margin-top: 8px; } .panel-head h2 { font-size: 1.35rem; } }

/* ===== subjects (maths + English) ===== */
.subject-tabs { display: flex; gap: 8px; margin: 4px 0 0; flex-wrap: wrap; }
.subj-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(30,18,80,.38); color: #fff; font-family: Fredoka; font-weight: 600; font-size: 1.05rem; backdrop-filter: blur(8px); }
.subj-tab small { font-family: Nunito; font-weight: 800; font-size: .75rem; opacity: .8; background: rgba(255,255,255,.18); padding: 1px 7px; border-radius: 99px; }
.subj-tab.sel { background: #fff; color: var(--violet-d); box-shadow: 0 8px 20px rgba(40,10,90,.25); }
.subj-tab.sel small { background: #efeaff; }
.map-wrap[data-subject="english"] { background: linear-gradient(160deg, rgba(31,73,99,.45), rgba(79,184,216,.22)); }
.map-wrap[data-subject="english"] .node-orb { background: radial-gradient(circle at 35% 30%, #fff, #c9f4ff 40%, #5fc8e8); }
/* island card */
.island-card .isl-meta { margin: 0 0 6px; font-weight: 800; color: var(--violet); font-size: .9rem; }
.island-card .isl-cd { margin: 0 0 10px; color: var(--ink-soft); font-size: .92rem; line-height: 1.4; }
.island-card .isl-best { margin: 0 0 14px; font-weight: 700; }
.isl-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
/* English gates */
.gate.wordy .gate-q { font-size: calc(var(--fs) * 1.25); }
.passage { text-align: left; font-size: calc(var(--fs) * 1.08); line-height: 1.5; color: var(--ink); max-height: 30vh; overflow: auto; padding: 2px 4px; font-weight: 600; }
.choices.words button { font-size: 1.2rem; padding: 6px 10px; line-height: 1.2; }
.choices.long { grid-template-columns: 1fr; } .choices.long button { font-size: 1.02rem; text-align: left; padding: 10px 14px; min-height: 48px; }
.hud-btn#btn-hud-lesson { font-size: 1.15rem; }
/* report per subject */
.rep-subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 16px; }
.rep-subj { display: flex; gap: 12px; align-items: center; background: #f6f2ff; border-radius: 18px; padding: 12px 14px; }
.rep-subj[data-subject="english"] { background: #eaf8fd; }
.rep-subj .rs-ico { font-size: 1.8rem; } .rep-subj > div { flex: 1; } .rep-subj .eyebrow { color: var(--violet); margin: 0; }
.rs-pct { margin: 2px 0 6px; font-weight: 800; color: var(--ink-soft); } .rs-pct b { font-family: Fredoka; font-size: 1.8rem; color: var(--violet-d); }
.rep-subj small { color: var(--ink-soft); font-weight: 700; }
.rep-sub-row th { text-align: left; font-family: Fredoka; font-size: 1.05rem; color: var(--violet-d); padding: 14px 6px 6px; text-transform: none; letter-spacing: 0; }

/* ===== lessons ===== */
.lesson { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 12px; background: rgba(30,15,80,.55); backdrop-filter: blur(8px); }
.lesson-card { width: min(720px, 100%); max-height: calc(100dvh - 24px); overflow: auto; background: linear-gradient(180deg, #fffdf6, #fff); color: var(--ink); border-radius: 30px; padding: 16px 18px; box-shadow: var(--shadow); animation: pop .4s both; display: flex; flex-direction: column; gap: 10px; }
.lesson[data-subject="english"] .lesson-card { background: linear-gradient(180deg, #f3fbff, #fff); }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; } .lesson-head h2 { margin: 0; color: var(--violet-d); font-size: 1.6rem; } .lesson-head .eyebrow { color: var(--violet); margin: 0 0 2px; }
.lesson-head-btns { display: flex; gap: 6px; } .lesson .icon-btn { background: #f1edff; color: var(--violet-d); border-color: #e4dcff; backdrop-filter: none; }
.lesson-body { display: flex; align-items: center; gap: 12px; }
.lesson-guide { flex: 0 0 auto; width: 96px; }
.lumi { width: 96px; height: 112px; overflow: visible; }
.lumi-body { animation: lumiBob 3s ease-in-out infinite; transform-origin: 60px 130px; }
.lumi-eyes { animation: lumiBlink 4.5s infinite; transform-origin: 62px 70px; }
.lumi.talk .lumi-mouth { animation: lumiTalk .28s ease-in-out infinite alternate; transform-origin: 62px 83px; }
.lumi-lantern { animation: lumiGlow 2.2s ease-in-out infinite; }
@keyframes lumiBob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes lumiBlink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes lumiTalk { from { transform: scaleY(1); } to { transform: scaleY(2.2) translateY(-1px); } }
@keyframes lumiGlow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.lesson-say { position: relative; flex: 1; margin: 0; background: #fff; border: 2px solid #e8e0ff; border-radius: 20px; padding: 12px 16px; font-family: Fredoka; font-size: calc(var(--fs) * 1.25); line-height: 1.35; color: var(--ink); box-shadow: 0 6px 18px rgba(60,30,140,.08); min-height: 3.4em; }
.lesson-say::before { content: ''; position: absolute; left: -11px; top: 22px; border: 10px solid transparent; border-right-color: #e8e0ff; border-left: 0; }
.lesson-stage { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #f6f2ff; border-radius: 22px; padding: 16px; }
.lesson[data-subject="english"] .lesson-stage { background: #eaf6fb; }
.lesson-stage.in > * { animation: rise .35s ease both; }
.lesson-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lesson-dots { display: flex; gap: 6px; } .lesson-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e4dcff; } .lesson-dots i.done { background: #b9a6ff; } .lesson-dots i.cur { background: var(--violet); transform: scale(1.3); }
.lesson-nav { display: flex; gap: 8px; margin-left: auto; } .lesson-nav .btn[disabled] { opacity: .4; }
.pop { display: inline-block; animation: popIn .45s cubic-bezier(.2,.9,.3,1.4) both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes popIn { from { opacity: 0; transform: scale(.3) translateY(14px); } to { opacity: 1; transform: none; } }
.lv-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.lv-emoji { font-size: 2.6rem; border: 0; background: none; padding: 2px; transition: transform .2s; }
.lv-emoji.counted { transform: scale(1.15) rotate(-6deg); filter: drop-shadow(0 0 8px #ffd36b); }
.lv-count { font-family: Fredoka; font-size: 2rem; color: var(--violet-d); min-width: 1.2em; }
.lv-groups { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lv-group { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; padding: 8px 10px; border-radius: 18px; background: #fff; border: 2px dashed #cbbcff; font-size: 1.7rem; }
.lv-pizza { width: 150px; height: 150px; } .lv-pizza .slice { fill: #ffd98a; stroke: #c9822e; stroke-width: 2; } .lv-pizza .slice.on { fill: #ff8a5c; animation: popIn .4s both; animation-delay: calc(var(--i) * 140ms); transform-origin: 80px 80px; }
.lv-frac { font-family: Fredoka; font-size: 1.8rem; color: var(--violet-d); }
.lv-line { width: min(100%, 520px); } .lv-line .axis { stroke: #6b4fd8; stroke-width: 3; } .lv-line line { stroke: #6b4fd8; stroke-width: 2; } .lv-line text { font: 700 12px Nunito; fill: #4a33a8; text-anchor: middle; }
.lv-line .hop { fill: none; stroke: #ff6fa8; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 200; stroke-dashoffset: 200; animation: hop .7s ease forwards; animation-delay: calc(var(--i) * 450ms + 200ms); }
@keyframes hop { to { stroke-dashoffset: 0; } }
.lv-mab { transform: scale(1.15); }
.lv-big { font-family: Fredoka; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; color: var(--violet-d); text-align: center; line-height: 1.3; }
.lv-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lv-tile { display: inline-grid; place-items: center; min-width: 58px; height: 62px; padding: 0 14px; border-radius: 16px; border: 0; background: #fff; color: var(--violet-d); font-family: Fredoka; font-size: 1.7rem; font-weight: 600; box-shadow: 0 5px 0 #d6cbff, 0 8px 18px rgba(60,30,140,.12); position: relative; }
.lv-tile.hi { background: linear-gradient(135deg, #ffe58a, #ffc15e); color: #5a3a00; box-shadow: 0 5px 0 #e3a43d; }
.lv-tile.boing { animation: boing .45s ease; } @keyframes boing { 30% { transform: translateY(-10px) scale(1.08); } 60% { transform: translateY(2px); } }
.lv-tile.flip { perspective: 400px; cursor: pointer; } .lv-tile.flip .f, .lv-tile.flip .b { transition: transform .5s, opacity .5s; backface-visibility: hidden; } .lv-tile.flip .b { position: absolute; transform: rotateX(180deg); opacity: 0; color: #d0397a; }
.lv-tile.flip.flipped .f { transform: rotateX(180deg); opacity: 0; } .lv-tile.flip.flipped .b { transform: none; opacity: 1; }
.lv-story { background: #fff; border-radius: 16px; padding: 14px 18px; font-size: 1.3rem; font-weight: 700; color: var(--ink); box-shadow: 0 6px 18px rgba(60,30,140,.1); } .lv-story mark { background: #ffe58a; border-radius: 6px; padding: 0 4px; }
.lv-coin { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d9dde3 55%, #a9b0ba); color: #3c4450; font-family: Fredoka; font-weight: 700; border: 3px solid #c3c9d2; }
.lv-coin.gold { background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd36b 55%, #d69a1e); border-color: #e7b84a; color: #6a4300; }
.lv-scene { font-size: clamp(2.4rem, 8vw, 3.6rem); text-align: center; line-height: 1.2; } .lv-scene.big-star { font-size: 5rem; }
.lv-tap { margin: 0; font-weight: 800; color: var(--violet); font-size: .95rem; }
.lv-q { margin: 0; font-family: Fredoka; font-size: 1.4rem; font-weight: 600; text-align: center; color: var(--ink); }
.lv-choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lv-choices button { min-width: 110px; min-height: 54px; padding: 8px 16px; border-radius: 16px; border: 2px solid #ddd3ff; background: #fff; color: var(--violet-d); font-family: Fredoka; font-size: 1.25rem; font-weight: 600; box-shadow: 0 4px 0 #ddd3ff; }
.lv-choices button.right { background: #e3fbef; border-color: #7fe6b8; color: #1f8f6a; box-shadow: 0 4px 0 #7fe6b8; } .lv-choices button.dim { opacity: .4; }
.lv-why { min-height: 1.4em; margin: 0; font-weight: 800; text-align: center; } .lv-why.yay { color: #1f8f6a; } .lv-why.warm { color: #b4582f; }
body.reduced .pop, body.reduced .lumi-body, body.reduced .lumi-eyes, body.reduced .lv-line .hop { animation: none !important; } body.reduced .lv-line .hop { stroke-dashoffset: 0; }
@media (max-width: 560px) { .lesson-guide, .lumi { width: 70px; } .lumi { height: 84px; } .lesson-say { font-size: 1.05rem; } .lesson-card { padding: 12px; border-radius: 24px; } .lesson-stage { min-height: 150px; padding: 12px; } .lv-tile { min-width: 46px; height: 52px; font-size: 1.4rem; } }
/* lessons library */
.lib-years { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.lib-year { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(30,18,80,.38); color: #fff; font-family: Fredoka; font-weight: 600; font-size: 1rem; }
.lib-year.sel { background: #fff; color: var(--violet-d); }
.lib-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lib-col { background: rgba(255,255,255,.95); color: var(--ink); border-radius: 24px; padding: 14px; box-shadow: var(--shadow); }
.lib-col h3 { margin: 2px 4px 10px; color: var(--violet-d); font-size: 1.3rem; }
.lib-card { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; border: 2px solid #efeaff; background: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; color: var(--ink); transition: transform .15s; }
.lib-col[data-subject="english"] .lib-card { border-color: #dff2fa; }
.lib-card:hover { transform: translateY(-2px); } .lib-card b { font-family: Fredoka; font-size: 1.1rem; color: var(--violet-d); } .lib-card span { grid-column: 1; font-size: .85rem; color: var(--ink-soft); font-weight: 700; } .lib-card code { font-size: .75rem; }
.lib-card em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 800; font-size: .8rem; color: var(--violet); background: #f1edff; border-radius: 99px; padding: 3px 9px; } .lib-card.seen em { background: #e3fbef; color: #1f8f6a; }

/* ===== Milestone 2: Science (leafy green) and HASS (sunset orange) ===== */
.map-wrap[data-subject="science"] { background: linear-gradient(160deg, rgba(24,92,64,.45), rgba(127,230,184,.22)); }
.map-wrap[data-subject="science"] .node-orb { background: radial-gradient(circle at 35% 30%, #fff, #d4ffe9 40%, #4fcf96); }
.map-wrap[data-subject="hass"] { background: linear-gradient(160deg, rgba(120,60,20,.45), rgba(255,184,107,.24)); }
.map-wrap[data-subject="hass"] .node-orb { background: radial-gradient(circle at 35% 30%, #fff, #ffe6c7 40%, #ff9f4a); }
.rep-subj[data-subject="science"] { background: #e9fbf2; } .rep-subj[data-subject="hass"] { background: #fff3e6; }
.lesson[data-subject="science"] .lesson-card { background: linear-gradient(180deg, #effff7, #fff); } .lesson[data-subject="science"] .lesson-stage { background: #e6f8ef; }
.lesson[data-subject="hass"] .lesson-card { background: linear-gradient(180deg, #fff7ee, #fff); } .lesson[data-subject="hass"] .lesson-stage { background: #fdf0e1; }
.lib-col[data-subject="science"] .lib-card { border-color: #d8f5e7; } .lib-col[data-subject="hass"] .lib-card { border-color: #fbe6cf; }
.lib-col[data-subject="science"] h3 { color: #1d7a52; } .lib-col[data-subject="hass"] h3 { color: #b4581a; }
@media (min-width: 900px) { .lib-cols { grid-template-columns: repeat(2, 1fr); } }
.subj-tabs, .subject-tabs { flex-wrap: wrap; }

/* shared visuals */
.v-emoji { font-size: 4.2rem; line-height: 1; animation: vbob 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(40,20,90,.18)); }
@keyframes vbob { 50% { transform: translateY(-6px) rotate(-3deg); } }
.v-chain { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; max-width: 560px; }
.ch-item { background: #fff; color: var(--ink); border: 2px solid #d9ccff; border-radius: 14px; padding: 6px 12px; font-weight: 800; box-shadow: 0 3px 8px rgba(60,30,120,.1); }
.ch-arrow { font-weight: 900; color: var(--violet); font-size: 1.2rem; } .ch-loop { font-size: 1.6rem; color: var(--violet); font-weight: 900; }
.pop { animation: vpop .45s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes vpop { from { transform: scale(.3); opacity: 0; } }
.v-graph, .v-scale { margin: 0; background: #fff; border-radius: 16px; padding: 8px 10px 4px; box-shadow: 0 4px 12px rgba(60,30,120,.12); width: min(360px, 100%); }
.v-scale { width: min(280px, 100%); }
.v-graph svg, .v-scale svg { width: 100%; height: auto; display: block; }
.v-graph figcaption, .v-scale figcaption { text-align: center; font-weight: 800; color: var(--ink-soft); font-size: .85rem; padding-bottom: 4px; }
.v-graph .gl { stroke: #ece7fb; } .v-graph .axis { stroke: #4b3d7a; stroke-width: 2; }
.v-graph .ax, .v-scale .ax { font: 700 11px Nunito, sans-serif; fill: #4b3d7a; } .v-graph .lab { font: 800 11px Nunito, sans-serif; fill: #2d2152; }
.v-graph .vbar { fill: #8b6cff; transform-box: fill-box; transform-origin: bottom; animation: vgrow .6s ease-out both; animation-delay: calc(var(--i) * 80ms); }
@keyframes vgrow { from { transform: scaleY(0); } }
.v-graph .ln { fill: none; stroke: #ff7a59; stroke-width: 3; stroke-linejoin: round; } .v-graph .pt { fill: #fff; stroke: #ff7a59; stroke-width: 3; }
.v-scale .tk { stroke: #3a2f63; stroke-width: 1.5; } .v-scale .th { fill: #f4f1ff; stroke: #9b8ccc; stroke-width: 2; }
.v-scale .bulb, .v-scale .merc { fill: #ff5a6e; } .v-scale .cyl { fill: #f2fbff; stroke: #8fb6cc; stroke-width: 2; } .v-scale .liq { fill: #7fd1f5; opacity: .85; }
.v-scale .ruler { fill: #ffe9a8; stroke: #d6b65a; } .v-scale .leaf { fill: #6fd39e; }
.v-particles svg { width: 150px; height: 150px; } .v-particles .box { fill: #fff; stroke: #c9bdf3; stroke-width: 3; }
.v-particles circle { fill: #8b6cff; } .v-particles.liquid circle { fill: #4fb8d8; animation: vjig 1.6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -110ms); }
.v-particles.solid circle { animation: vjig 0.5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -50ms); }
.v-particles.solid circle { --j: 1px; } .v-particles.liquid circle { --j: 4px; } .v-particles.gas circle { fill: #ff9f4a; --j: 14px; animation: vjig 1.2s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -170ms); }
@keyframes vjig { to { transform: translate(var(--j), calc(var(--j) * -1)); } }
.v-gridwrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.v-grid { border-collapse: separate; border-spacing: 4px; background: #e9f7e4; border-radius: 14px; padding: 4px; }
.v-grid td { width: 66px; height: 58px; background: #fff; border-radius: 10px; text-align: center; vertical-align: middle; color: var(--ink); }
.v-grid th { color: var(--violet-d); font-weight: 900; font-size: .9rem; } .v-grid .gc-e { display: block; font-size: 1.5rem; line-height: 1.1; } .v-grid small { display: block; font-size: .66rem; font-weight: 800; line-height: 1.1; }
.v-compass { display: grid; grid-template-columns: repeat(3, 22px); grid-template-rows: repeat(3, 22px); place-items: center; font-weight: 900; color: var(--violet-d); background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 3px 8px rgba(60,30,120,.12); }
.v-compass b:first-child { grid-column: 2; grid-row: 1; } .v-compass span:nth-of-type(1) { grid-column: 1; grid-row: 2; } .v-compass i { grid-column: 2; grid-row: 2; font-style: normal; }
.v-compass span:nth-of-type(2) { grid-column: 3; grid-row: 2; } .v-compass b:last-child { grid-column: 2; grid-row: 3; }
.v-timeline { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 600px; }
.tl-item { background: #fff; border-radius: 14px; padding: 6px 10px; text-align: center; box-shadow: 0 3px 8px rgba(60,30,120,.12); color: var(--ink); }
.tl-item b { display: block; color: #b4581a; } .tl-item span { font-size: .82rem; font-weight: 700; }
.tl-line { width: 18px; height: 4px; background: #ffb46b; border-radius: 2px; display: inline-block; }
.v-pict { background: #fff; border-radius: 16px; padding: 10px 14px; color: var(--ink); box-shadow: 0 4px 12px rgba(60,30,120,.12); }
.v-pict .pc-row { display: flex; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px dashed #e5def9; } .v-pict .pc-row b { min-width: 74px; font-size: .9rem; }
.v-pict i { font-style: normal; font-size: 1.3rem; } .v-pict small { display: block; margin-top: 6px; font-weight: 800; color: var(--ink-soft); }
.lv-try-vis { display: flex; justify-content: center; margin-bottom: 8px; }
@media (max-width: 520px) { .v-grid td { width: 52px; height: 48px; } .v-grid .gc-e { font-size: 1.2rem; } .v-grid small { font-size: .58rem; } .v-emoji { font-size: 3.2rem; } }
@media (prefers-reduced-motion: reduce) { .v-emoji, .v-particles circle, .pop, .v-graph .vbar { animation: none !important; } }
body.reduced .v-emoji, body.reduced .v-particles circle, body.reduced .pop, body.reduced .v-graph .vbar { animation: none !important; }

/* ===== Milestone 3: report notes + print-friendly report ===== */
.rs-note { margin: 4px 0 0; font-size: .82rem; line-height: 1.3; color: var(--ink); } .rs-note b { color: var(--violet-d); }
.print-only { display: none; }
#screen-report .panel-head { flex-wrap: wrap; } #btn-print-report { margin-left: auto; }
@media print {
  @page { size: A4; margin: 12mm; }
  body:not(.parents) { background: #fff !important; color: #000; }
  body:not(.parents) * { visibility: hidden; }
  #screen-report, #screen-report * { visibility: visible; }
  #screen-report { position: absolute; inset: 0 auto auto 0; width: 100%; padding: 0 !important; background: #fff !important; }
  #screen-report .back-btn, #btn-print-report, #screen-report button, #world-canvas, canvas { display: none !important; }
  #report-title { color: #2d2152 !important; text-shadow: none !important; font-size: 20pt; }
  .print-only { display: block; } .print-head { font: 700 9pt Nunito, sans-serif; color: #555; margin: 0 0 6px; }
  .report { box-shadow: none !important; background: #fff !important; padding: 0 !important; }
  .report-grade { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rep-subjects { grid-template-columns: repeat(2, 1fr) !important; } .rep-subj { break-inside: avoid; border: 1px solid #ddd; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar, .mini-bar, .grade-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #screen-report table { font-size: 9pt; } #screen-report tr { break-inside: avoid; } .rep-note { display: none; }
}
