:root{--brand:#C8102E;--ink:#1a1a1a;--muted:#555;--bg:#f7f5f2;--card:#fff;--line:#e2ddd6;--ok:#047857;--okbg:#ecfdf5;--bad:#b91c1c;--badbg:#fef2f2;--acc:#0f766e;--acc2:#e6f4f2;--r:16px}
.app.kid{--acc:#6d28d9;--acc2:#f3eefe}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif;font-size:16px;line-height:1.45}
button,input,select{font:inherit;color:inherit}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
#root{max-width:640px;margin:0 auto;min-height:100vh}
.shell{display:flex;flex-direction:column;min-height:100vh}
main{flex:1;padding:16px 16px 96px}
h1{font-size:24px;font-weight:700;line-height:1.2;margin-bottom:6px}
h2{font-size:18px;font-weight:800;margin-bottom:6px}
.sub{color:var(--muted);font-size:14px}.center{text-align:center}
.note{background:#fff7e6;border:1px solid #d97706;border-radius:12px;padding:10px 12px;font-size:14px;margin:8px 0}
.row{display:flex;gap:10px;align-items:center;margin-top:12px}.row.wrap{flex-wrap:wrap}.row.center{justify-content:center}.row.between{justify-content:space-between;margin-top:0}.grow{flex:1;min-width:180px}
.btn{min-height:48px;padding:10px 18px;border-radius:999px;border:2px solid var(--ink);background:#fff;font-weight:800;cursor:pointer}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.primary:disabled{background:#9b9b9b;border-color:#9b9b9b;cursor:not-allowed}
.btn.ghost{background:#fff}.btn.danger{border-color:var(--bad);color:var(--bad)}.btn.wide{width:100%;margin-top:14px}.btn.big{min-height:56px;font-size:17px;flex:1}.btn.sm{min-height:44px;padding:6px 14px;font-size:14px}
.icon-btn{min-width:44px;min-height:44px;border:none;background:none;font-size:20px;cursor:pointer;border-radius:12px}
.inp{width:100%;min-height:48px;border:2px solid #8a8580;border-radius:12px;padding:8px 12px;background:#fff;font-size:17px}
.lbl{display:block;font-weight:700;font-size:14px;margin:12px 0 4px}
.check{display:flex;gap:10px;align-items:center;min-height:44px;margin-top:8px}.check input{width:22px;height:22px}
.toast{position:fixed;top:12px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 18px;border-radius:12px;z-index:60;font-weight:700;max-width:90vw}
/* header */
.hdr{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}
.logo{height:36px}.langs{margin-left:auto;font-size:18px}
.lvl-chip{display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 12px 4px 6px;border:2px solid var(--acc);background:var(--acc2);border-radius:999px;cursor:pointer}
.chip-badge{font-size:22px}.chip-txt{display:flex;flex-direction:column;align-items:flex-start;min-width:84px}.chip-txt b{font-size:14px;line-height:1.1}
.meter .m-bar{height:12px;background:#e7e2db;border-radius:99px;overflow:hidden}.meter .m-bar>div{height:100%;background:var(--acc);border-radius:99px;transition:width .6s}
.meter.compact .m-bar{height:6px;width:80px}.m-txt{font-size:14px;margin-top:6px}
.meter.aura .m-bar>div{background:linear-gradient(90deg,#6d28d9,#db2777,#f59e0b)}
/* tabs */
.tabs{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:center;background:#fff;border-top:1px solid var(--line);z-index:10;padding-bottom:env(safe-area-inset-bottom)}
.tabs button{flex:1;max-width:160px;min-height:60px;border:none;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--muted);cursor:pointer;border-top:3px solid transparent}
.tabs button span{font-size:20px}.tabs button.on{color:var(--ink);border-top-color:var(--brand)}
/* home */
.hero{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:16px;margin-bottom:14px}
.preview-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;background:#fff7e6;border:2px solid #b45309;border-radius:12px;padding:8px 12px;margin-bottom:12px;font-size:14px}
.path,.path ol{list-style:none}
.lv-group{margin:18px 0 6px}.lv-h{display:flex;align-items:center;gap:8px;font-size:16px}.lv-tiers{font-size:13px;color:var(--muted);margin-bottom:8px}
.lock-tag{font-size:12px;font-weight:700;color:var(--muted);background:#ece8e2;border-radius:99px;padding:2px 8px}
.node{position:relative;padding-left:22px}.node:before{content:"";position:absolute;left:8px;top:-8px;bottom:-8px;width:4px;background:var(--line)}
.node.done:before{background:var(--acc)}
.node button{width:100%;display:flex;align-items:center;gap:12px;min-height:64px;margin:6px 0;padding:10px 12px;background:#fff;border:2px solid var(--line);border-radius:var(--r);cursor:pointer;text-align:left}
.node.next button{border-color:var(--brand);box-shadow:0 4px 0 var(--brand)}
.node.locked button{background:#f0ede8;color:#555;cursor:not-allowed;border-style:dashed}
.n-ic{font-size:28px;width:40px;text-align:center}.n-body{flex:1;display:flex;flex-direction:column}.n-sub{display:block;font-size:13px;color:var(--muted)}
.n-bar{display:block;height:6px;background:#ece8e2;border-radius:99px;margin-top:6px;overflow:hidden}.n-bar>span{display:block;height:100%;background:var(--acc)}
.n-next{background:var(--brand);color:#fff;font-weight:700;font-size:13px;border-radius:99px;padding:4px 10px}
/* practice */
.modes{display:grid;gap:10px;margin-top:12px}
.mode{display:flex;gap:12px;align-items:center;min-height:72px;padding:12px;background:#fff;border:2px solid var(--line);border-radius:var(--r);text-align:left;cursor:pointer}
.mode.locked{background:#f0ede8;border-style:dashed}.m-ic{font-size:28px}
/* lesson */
.lesson{display:flex;flex-direction:column;gap:10px}
.l-top{display:flex;align-items:center;gap:10px}.pbar{flex:1;height:12px;background:#e7e2db;border-radius:99px;overflow:hidden}.pbar>div{height:100%;background:var(--ok);transition:width .3s}
.l-xp{font-weight:700;color:var(--acc);min-width:44px;text-align:right}
.l-meta{font-size:13px;color:var(--muted)}.tier{font-weight:800;border-radius:99px;padding:1px 8px;color:#fff}.tier.t1{background:#0f766e}.tier.t2{background:#1d4ed8}.tier.t3{background:#6d28d9}
.q-h{font-size:20px}
.card{background:#fff;border:2px solid var(--line);border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:10px}
.big-word{font-size:32px;font-weight:700;text-align:center;line-height:1.2;word-break:break-word}
.meaning{font-size:20px;text-align:center}
.opts{display:grid;gap:10px;margin-top:6px}
.opt{min-height:56px;padding:10px 14px;border:2px solid #8a8580;border-radius:14px;background:#fff;font-size:18px;font-weight:700;text-align:left;cursor:pointer}
.opt:disabled{cursor:default;color:var(--ink)}.opt.right{border-color:var(--ok);background:var(--okbg)}.opt.wrong{border-color:var(--bad);background:var(--badbg)}
.opt.right:after{content:" ✓";color:var(--ok)}.opt.wrong:after{content:" ✗";color:var(--bad)}
.hint{min-height:20px;font-size:14px;color:#92400e;font-weight:700}
.feedback{position:sticky;bottom:8px;border-radius:18px;padding:14px;border:2px solid}
.feedback.ok{background:var(--okbg);border-color:var(--ok)}.feedback.bad{background:var(--badbg);border-color:var(--bad)}
.fb-head{font-size:20px;font-weight:700}.feedback.ok .fb-head{color:var(--ok)}.feedback.bad .fb-head{color:var(--bad)}
.fb-ans{font-size:17px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:4px}
.results{text-align:center;padding-top:20px}.res-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}
.res-grid div,.kpis div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;display:flex;flex-direction:column}.res-grid b,.kpis b{font-size:24px}.res-grid span,.kpis span{font-size:13px;color:var(--muted)}
/* audio */
.abtn{min-width:44px;min-height:44px;border-radius:50%;border:2px solid var(--line);background:#fff;font-size:18px;cursor:pointer}
.abtn.big{min-width:72px;min-height:72px;font-size:30px;border-color:var(--acc);background:var(--acc2)}.abtn.on{border-color:var(--brand)}
/* library */
.lib{list-style:none;display:grid;gap:8px;margin-top:8px}.lib-row{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px}
.lib-unit{font-size:12px;color:var(--muted);font-weight:700}.lib-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;margin-top:4px}
.lib-cell{display:flex;align-items:center;gap:4px;font-size:15px;color:var(--muted)}.lib-cell.hl{color:var(--ink);font-weight:800}
/* progress */
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:14px;margin:12px 0}
.lvl-panel{display:flex;gap:14px;align-items:center}.lvl-panel>div{flex:1}.lvl-big{font-size:56px}
.ladder{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.ladder li{background:#fff;border:2px dashed var(--line);border-radius:14px;padding:10px;text-align:center;font-weight:800;display:flex;flex-direction:column}
.ladder li.on{border:2px solid var(--acc);background:var(--acc2)}.ladder small{font-weight:600;color:var(--muted)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}
.boxes{list-style:none;display:grid;grid-template-columns:repeat(5,1fr);gap:6px;align-items:end;margin-top:8px}
.boxes li{display:flex;flex-direction:column;align-items:center;font-size:12px;text-align:center}.b-n{font-weight:700;font-size:16px}
.b-bar{width:28px;height:80px;background:#ece8e2;border-radius:8px;display:flex;align-items:flex-end;overflow:hidden}.b-bar span{display:block;width:100%;background:var(--acc)}
.units{list-style:none;display:grid;gap:6px}.units li{display:grid;grid-template-columns:24px 1fr 80px 44px;gap:8px;align-items:center;font-size:14px}
.tbl{width:100%;border-collapse:collapse;font-size:14px}.tbl th,.tbl td{border-bottom:1px solid var(--line);padding:6px;text-align:left}
.custom{list-style:none;margin-top:10px}.custom li{display:flex;align-items:center;gap:8px}.custom li .icon-btn{margin-left:auto}
/* menu */
.scrim{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:40;display:flex;justify-content:flex-end}
.drawer{background:#fff;width:min(380px,92vw);height:100%;overflow:auto;padding:16px}
/* onboarding */
.onb{padding:20px 16px 40px;max-width:560px;margin:0 auto}.onb-logo{height:48px;display:block;margin:0 auto 10px}
.dots{display:flex;gap:6px;justify-content:center;margin-bottom:18px}.dots span{width:28px;height:6px;border-radius:9px;background:#ddd}.dots span.on{background:var(--brand)}
.onb h1{text-align:center;font-size:26px;margin-bottom:12px}.onb .sub{text-align:center;margin-bottom:12px}
.choices{display:grid;gap:10px}.choices.two{grid-template-columns:1fr 1fr}
.choice{min-height:64px;padding:14px;border:2px solid #8a8580;border-radius:18px;background:#fff;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:17px}
.choices:not(.two) .choice{flex-direction:row;justify-content:flex-start;gap:12px}
.choice.soon{cursor:not-allowed;border-style:dashed;background:#f4f2ef;color:#57534e}.choice.soon small{color:#57534e}
.choice.on{border-color:var(--brand);background:#fff1f2;box-shadow:0 0 0 2px var(--brand)}.choice small{color:var(--muted);font-size:13px}.ch-ic{font-size:40px}
.avatars{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.avatars .choice{font-size:28px;min-height:56px}
.onb-nav{display:flex;justify-content:space-between;margin-top:22px;gap:10px}.onb-nav .btn{min-width:120px}
.welcome{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;margin:10px 0 16px;display:flex;flex-direction:column;align-items:center;gap:8px}.wel-text{font-size:20px;font-weight:800;text-align:center}
/* level up */
.levelup{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;overflow:hidden;animation:fadeIn .3s ease}
.levelup.kid{background:radial-gradient(circle at 50% 30%,#7c3aed,#2e1065 75%)}
.levelup.adult{background:#14201f}
.lu-card{position:relative;z-index:2;background:#fff;border-radius:24px;padding:22px 18px;max-width:420px;width:100%;text-align:center;animation:pop .5s cubic-bezier(.2,1.4,.4,1)}
.lu-kicker{font-weight:800;font-size:13px;color:var(--brand)}
.lu-badge{font-size:84px;line-height:1.1;margin:6px 0;display:inline-block;animation:bounce 1.2s ease .3s 2}
.lu-badge.aura,.chip-badge.aura,.lvl-big.aura{filter:drop-shadow(0 0 10px #f59e0b) drop-shadow(0 0 18px #db2777)}
.lu-title{font-size:24px}.lu-level{font-size:15px;margin:4px 0}.lu-body{color:#444;font-size:15px}
.lu-unlocks{text-align:left;background:#f7f5f2;border-radius:14px;padding:10px 14px;margin-top:12px}.lu-unlocks h3{font-size:14px;margin-bottom:4px}.lu-unlocks ul{list-style:none;font-size:15px;display:grid;gap:3px}
.confetti{position:absolute;inset:0;pointer-events:none;z-index:1}.confetti i{position:absolute;top:-20px;border-radius:2px;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
@keyframes pop{from{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes bounce{0%,100%{transform:translateY(0)}40%{transform:translateY(-14px) scale(1.08)}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.confetti{display:none}}
@media (min-width:900px){#root{max-width:720px}.big-word{font-size:40px}}
/* consent pop-up (EU/EEA/UK/CH): bottom sheet, both choices equally prominent */
.cs-scrim{position:fixed;inset:0;background:rgba(26,26,26,.45);display:flex;align-items:flex-end;justify-content:center;z-index:80;padding:12px}
.consent{width:100%;max-width:560px;background:#fff;border-radius:20px;border-top:6px solid var(--brand);padding:18px 18px 16px;box-shadow:0 10px 30px rgba(0,0,0,.25);margin-bottom:env(safe-area-inset-bottom)}
.consent:focus,.consent:focus-visible{outline:none}
.consent h2{font-size:20px;margin-bottom:8px}.consent p{font-size:16px;line-height:1.5}
.cs-more{margin-top:8px}.cs-more a,.an-set a{color:var(--brand);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.cs-btns{display:flex;gap:10px;margin-top:14px}.cs-btn{flex:1;min-height:52px;font-size:17px;background:#fff;border:2px solid var(--ink);color:var(--ink)}
.cs-btn:hover{background:var(--bg)}
@media (min-width:700px){.cs-scrim{align-items:center}}
