/* Playful Classroom theme — see /DESIGN.md (root, not served). Light, chunky, Duolingo-inspired. */
:root{
  --paper:#FFF9F0; --card:#FFFFFF; --ink:#3C3C3C; --muted:#777777; --line:#E5E5E5;
  --green:#58CC02; --green-d:#46A302; --green-t:#EAFBDD;
  --blue:#1CB0F6; --blue-d:#1899D6; --blue-t:#DDF4FF;
  --yellow:#FFC800; --yellow-d:#C79400; --yellow-t:#FFF4CC;
  --red:#FF4B4B; --red-d:#D33131; --red-t:#FFE9E9;
  --purple:#CE82FF; --purple-d:#9B5BD6; --purple-t:#F4E8FF;
  --orange:#FF9600; --orange-d:#D97A00; --orange-t:#FFF0DB;
  --r-sm:10px; --r-md:14px; --r-lg:18px; --r-pill:9999px;
  --font-d:'Fredoka','Nunito',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --font-b:'Nunito',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --shadow-card:0 2px 0 rgba(60,60,60,.06);
  --maxw:960px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; padding:0 0 72px; color:var(--ink); background:var(--paper);
  background-image:radial-gradient(rgba(60,60,60,.055) 1.2px, transparent 1.2px);
  background-size:22px 22px;
  font-family:var(--font-b); font-size:16px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{font-family:var(--font-d); line-height:1.2; margin:0 0 8px; letter-spacing:-.01em}
h1{font-size:clamp(26px,4vw,34px)}
h2{font-size:22px}
h3{font-size:17px}
p{margin:8px 0}
a{color:var(--blue-d)}
::selection{background:var(--yellow-t)}
:focus{outline:none}
:focus-visible{outline:3px solid var(--blue); outline-offset:2px; border-radius:6px}
header{background:var(--card); border-bottom:2px solid var(--line); position:sticky; top:0; z-index:20}
header .wrap{max-width:var(--maxw); margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink); margin-right:auto}
.brand-mark{width:38px; height:38px; border-radius:12px; background:var(--green); border:2px solid var(--green-d); display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 3px 0 var(--green-d)}
.brand-mark svg{width:22px; height:22px; fill:#fff}
.brand-name{font-family:var(--font-d); font-weight:700; font-size:19px}
.brand-name small{display:block; font-family:var(--font-b); font-weight:700; font-size:11px; color:var(--muted); letter-spacing:.08em; text-transform:uppercase}
nav.links{display:flex; gap:6px; align-items:center; flex-wrap:wrap}
nav.links a.pill{display:inline-flex; align-items:center; gap:7px; text-decoration:none; color:var(--muted); font-weight:800; font-size:14px; padding:9px 14px; border-radius:var(--r-pill); border:2px solid transparent; min-height:44px}
nav.links a.pill svg{width:17px; height:17px; fill:currentColor}
nav.links a.pill:hover{background:#F4F4F4; color:var(--ink)}
nav.links a.pill.on{background:var(--blue-t); border-color:var(--blue); color:var(--blue-d)}
.avatar{width:36px; height:36px; border-radius:50%; background:var(--purple); border:2px solid var(--purple-d); color:#fff; font-family:var(--font-d); font-weight:700; font-size:16px; display:inline-flex; align-items:center; justify-content:center; text-transform:uppercase}
.lang-toggle{display:inline-flex; border:2px solid var(--line); border-radius:var(--r-pill); overflow:hidden; background:var(--card)}
.lang-toggle button{border:none; background:transparent; color:var(--muted); font-family:var(--font-d); font-weight:600; font-size:13px; min-height:44px; padding:8px 13px; cursor:pointer}
.lang-toggle button.on{background:var(--blue-t); color:var(--blue-d)}
.lang-toggle button + button{border-left:2px solid var(--line)}
.icon-btn{width:44px; height:44px; border-radius:50%; border:2px solid var(--line); background:var(--card); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; color:var(--muted)}
.icon-btn:hover{border-color:var(--red); color:var(--red-d); background:var(--red-t)}
.icon-btn svg{width:18px; height:18px; fill:currentColor}
main{max-width:var(--maxw); margin:0 auto; padding:0 16px}
.card{background:var(--card); border:2px solid var(--line); border-radius:var(--r-lg); padding:18px; margin:14px 0; box-shadow:var(--shadow-card)}
.card.hi{border-color:var(--green)}
section.head{padding:26px 4px 6px}
.eyebrow{display:inline-block; font-size:12px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--blue-d); background:var(--blue-t); border-radius:var(--r-pill); padding:5px 13px; margin-bottom:10px}
.lead{color:var(--muted); font-size:17px; max-width:60ch}
footer.site{max-width:var(--maxw); margin:26px auto 0; padding:0 16px; color:var(--muted); font-size:13px; text-align:center}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:12px 24px; border:none; border-radius:var(--r-md); background:var(--green); color:#fff; font-family:var(--font-d); font-weight:600; font-size:16px; letter-spacing:.02em; cursor:pointer; text-decoration:none; box-shadow:0 4px 0 var(--green-d); margin:8px 8px 8px 0; transition:transform .06s, box-shadow .06s}
.btn:hover{filter:brightness(1.04)}
.btn:active{transform:translateY(4px); box-shadow:0 0 0 var(--green-d)}
.btn svg{width:18px; height:18px; fill:currentColor}
.btn.blue{background:var(--blue); box-shadow:0 4px 0 var(--blue-d)}
.btn.blue:active{box-shadow:0 0 0 var(--blue-d)}
.btn.outline{background:var(--card); color:var(--blue-d); border:2px solid var(--line); box-shadow:0 4px 0 var(--line)}
.btn.outline:active{box-shadow:0 0 0 var(--line)}
.btn.sec{background:#F1F1F1; color:var(--ink); box-shadow:0 4px 0 #D5D5D5}
.btn.sec:active{box-shadow:0 0 0 #D5D5D5}
.btn.sm{min-height:44px; padding:8px 16px; font-size:14px; box-shadow:0 3px 0 var(--green-d)}
.btn.sm:active{transform:translateY(3px); box-shadow:none}
.btn.blue.sm{box-shadow:0 3px 0 var(--blue-d)}
.btn.blue.sm:active{box-shadow:none}
.btn.outline.sm,.btn.sec.sm{box-shadow:0 3px 0 var(--line)}
.btn.outline.sm:active,.btn.sec.sm:active{box-shadow:none}
.btn.block{width:100%; margin-right:0}
.btn:disabled{opacity:.45; cursor:default; transform:none}
label.f{display:block; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin:14px 0 8px}
input[type=text],input[type=password],input[type=url],select{width:100%; min-height:48px; padding:12px 14px; border:2px solid var(--line); border-radius:var(--r-md); background:#FAFAFA; color:var(--ink); font-family:var(--font-b); font-size:16px; font-weight:600}
input:focus,select:focus{border-color:var(--blue); background:#fff}
select{appearance:none; -webkit-appearance:none; padding-right:38px; cursor:pointer; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23777777' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:20px}
.name-row{display:flex; gap:10px; margin-top:12px}
.name-row input{flex:1}
.name-row .btn{margin:0; white-space:nowrap}
.pick-group{display:grid; gap:10px; margin:4px 0 6px}
.pick-group.cols-2{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.pick-group.cols-3{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.pick{position:relative; display:block; cursor:pointer}
.pick input{position:absolute; opacity:0; pointer-events:none}
.pick .box{display:flex; gap:12px; align-items:flex-start; background:var(--card); border:2px solid var(--line); border-radius:var(--r-md); padding:13px 14px; min-height:56px; transition:border-color .12s, background .12s}
.pick:hover .box{border-color:#C9C9C9}
.pick input:checked + .box{border-color:var(--blue); background:var(--blue-t); box-shadow:0 3px 0 var(--blue-d)}
.pick input:focus-visible + .box{outline:3px solid var(--blue); outline-offset:2px}
.pick .t{font-family:var(--font-d); font-weight:600; font-size:15px; display:block}
.pick .d{font-size:13px; color:var(--muted); display:block; margin-top:2px}
.pick input:checked + .box .d{color:#0F6DA3}
.pick .dot{width:22px; height:22px; border-radius:50%; border:2px solid #CFCFCF; background:#fff; flex-shrink:0; margin-top:2px; position:relative}
.pick input:checked + .box .dot{border-color:var(--blue-d)}
.pick input:checked + .box .dot::after{content:""; position:absolute; inset:4px; border-radius:50%; background:var(--blue)}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip-pick{position:relative; cursor:pointer}
.chip-pick input{position:absolute; opacity:0; pointer-events:none}
.chip-pick span{display:inline-flex; align-items:center; min-height:44px; padding:9px 16px; border-radius:var(--r-pill); border:2px solid var(--line); background:var(--card); font-weight:800; font-size:14px; color:var(--muted)}
.chip-pick input:checked + span{border-color:var(--blue); background:var(--blue-t); color:var(--blue-d)}
.chip-pick input:focus-visible + span{outline:3px solid var(--blue); outline-offset:2px}
.q{margin:0 0 10px; font-weight:700; font-size:16px}
.qslide{min-height:120px}
.qnum{display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 6px; border-radius:9px; background:var(--yellow); border:2px solid var(--yellow-d); color:#5c4300; font-family:var(--font-d); font-size:14px; margin-right:8px; vertical-align:1px}
label.opt{display:flex; align-items:center; gap:12px; padding:12px 14px; margin:8px 0; min-height:52px; border:2px solid var(--line); border-radius:var(--r-md); cursor:pointer; font-size:16px; font-weight:600; background:#fff}
label.opt:hover{border-color:var(--blue); background:var(--blue-t)}
label.opt input{appearance:none; -webkit-appearance:none; width:22px; height:22px; margin:0; flex-shrink:0; border:2px solid #CFCFCF; border-radius:50%; background:#fff; cursor:pointer; position:relative}
label.opt input:checked{border-color:var(--blue-d)}
label.opt input:checked::after{content:""; position:absolute; inset:4px; border-radius:50%; background:var(--blue)}
label.opt:has(input:checked){border-color:var(--blue); background:var(--blue-t)}
label.opt:has(input:focus-visible){outline:3px solid var(--blue); outline-offset:2px}
.sticky-bar{position:sticky; bottom:12px; z-index:15; background:var(--card); border:2px solid var(--line); border-radius:var(--r-lg); padding:10px 14px; margin-top:14px; box-shadow:0 4px 14px rgba(60,60,60,.12)}
.sticky-bar .btn{margin:0; width:100%}
#pbar{height:14px; background:#EFEFEF; border-radius:var(--r-pill); overflow:hidden; margin:10px 0 6px; border:2px solid var(--line)}
#pfill{height:100%; width:0; background:linear-gradient(90deg,var(--green),#7FE62E); border-radius:var(--r-pill); transition:width .25s}
.score-hero{text-align:center; padding:8px 0 4px}
.score-hero .num{font-family:var(--font-d); font-weight:700; font-size:64px; line-height:1; color:var(--green-d)}
.band{display:inline-block; padding:6px 18px; border-radius:var(--r-pill); color:#fff; font-family:var(--font-d); font-weight:600; font-size:15px; margin:10px 0 4px; background:var(--blue); border:2px solid var(--blue-d)}
.band.b-a{background:var(--orange); border-color:var(--orange-d)}
.band.b-b1{background:var(--blue); border-color:var(--blue-d)}
.band.b-b2{background:var(--green); border-color:var(--green-d)}
.band.b-c{background:var(--purple); border-color:var(--purple-d)}
.bar{display:flex; align-items:center; gap:10px; margin:9px 0; font-size:14px}
.bar .lbl{width:190px; flex-shrink:0; color:var(--ink); font-weight:700}
.bar .track{flex:1; height:14px; background:#EFEFEF; border:2px solid var(--line); border-radius:var(--r-pill); overflow:hidden}
.bar .fill{height:100%; background:linear-gradient(90deg,var(--blue),#6FD3FA); display:block; border-radius:var(--r-pill)}
.rev{border-top:2px solid var(--line); padding:12px 0; font-size:15px}
.rev-head{display:flex; gap:10px; align-items:flex-start}
.badge{width:26px; height:26px; border-radius:50%; color:#fff; font-weight:800; font-size:15px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center}
.badge.good{background:var(--green); border:2px solid var(--green-d)}
.badge.bad{background:var(--red); border:2px solid var(--red-d)}
.rev-good{background:linear-gradient(0deg,var(--green-t),var(--green-t)) padding-box; border-radius:var(--r-sm)}
.rev-bad{background:linear-gradient(0deg,var(--red-t),var(--red-t)) padding-box; border-radius:var(--r-sm)}
.why{color:#5b5b5b; font-size:14px; margin-top:6px; background:#FAFAFA; border:2px dashed var(--line); border-radius:var(--r-sm); padding:8px 10px}
.rev-status{font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase}
.rev-status.good{color:var(--green-d)} .rev-status.bad{color:var(--red-d)} .rev-status.skip{color:var(--muted)}
.spinner{display:inline-block; width:16px; height:16px; border:3px solid var(--line); border-top-color:var(--blue); border-radius:50%; animation:spin .8s linear infinite; vertical-align:-3px; margin-right:8px}
@keyframes spin{to{transform:rotate(360deg)}}
.one-exp{margin-top:8px}
.one-exp .analysis{margin-top:8px}
.linklike{background:none; border:none; color:var(--blue-d); font-family:var(--font-b); font-size:13px; font-weight:700; cursor:pointer; padding:8px 0; margin-top:4px; min-height:44px; text-decoration:underline; text-underline-offset:3px}
.chip{display:inline-flex; align-items:center; gap:6px; padding:9px 16px; margin:4px 8px 4px 0; min-height:44px; border:2px solid var(--blue); color:var(--blue-d); background:var(--blue-t); border-radius:var(--r-pill); font-size:14px; font-weight:800; text-decoration:none}
.chip:hover{background:#C4E9FD}
.analysis{white-space:pre-wrap; font-size:15px; line-height:1.65; background:#FAFAFA; border:2px solid var(--line); border-radius:var(--r-md); padding:14px}
.muted{color:var(--muted); font-size:14px}
.ok{color:var(--green-d); font-weight:800}.no{color:var(--red-d); font-weight:800}
code{background:#F1F1F1; padding:1px 7px; border-radius:6px; font-size:13px; color:#8a5a00; border:1px solid var(--line)}
.hero{display:grid; grid-template-columns:1.2fr .8fr; gap:18px; align-items:center}
.hero h1{font-size:clamp(30px,5vw,44px)}
.hero-art{background:var(--card); border:2px solid var(--line); border-radius:var(--r-lg); padding:22px; text-align:center; box-shadow:var(--shadow-card)}
.hero-art .big{font-family:var(--font-d); font-weight:700; font-size:76px; line-height:1; color:var(--green)}
.hero-art .cap{font-weight:800; color:var(--muted); font-size:13px; letter-spacing:.08em; text-transform:uppercase; margin-top:6px}
.stat-grid{display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin:14px 0}
.stat{background:var(--card); border:2px solid var(--line); border-radius:var(--r-md); padding:14px; display:flex; gap:12px; align-items:center; box-shadow:var(--shadow-card)}
.stat .ic{width:46px; height:46px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center}
.stat .ic svg{width:24px; height:24px; fill:#fff}
.stat .ic.g{background:var(--green); border:2px solid var(--green-d)}
.stat .ic.b{background:var(--blue); border:2px solid var(--blue-d)}
.stat .ic.y{background:var(--yellow); border:2px solid var(--yellow-d)}
.stat .ic.p{background:var(--purple); border:2px solid var(--purple-d)}
.stat .n{font-family:var(--font-d); font-weight:700; font-size:24px; line-height:1.1}
.stat .l{font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--muted)}
.start-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px}
.start-card{background:var(--card); border:2px solid var(--line); border-radius:var(--r-md); padding:18px; text-decoration:none; color:var(--ink); display:block; box-shadow:var(--shadow-card)}
.start-card:hover{border-color:var(--green); transform:translateY(-2px)}
.start-card .ic{width:48px; height:48px; border-radius:15px; display:flex; align-items:center; justify-content:center; margin-bottom:10px}
.start-card .ic svg{width:25px; height:25px; fill:#fff}
.start-card b{font-family:var(--font-d); font-size:17px; display:block}
.start-card span{font-size:14px; color:var(--muted)}
.feat{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:14px}
.feat div{background:var(--card); border:2px solid var(--line); border-radius:var(--r-md); padding:14px; font-size:14px}
.feat b{font-family:var(--font-d); display:flex; align-items:center; gap:8px; font-size:15px; margin-bottom:4px}
.feat .cdot{width:12px; height:12px; border-radius:50%; display:inline-block; flex-shrink:0}
.track-pills{display:flex; gap:8px; flex-wrap:wrap; margin-top:6px}
.track-pills button{min-height:48px; padding:10px 20px; border-radius:var(--r-pill); border:2px solid var(--line); background:var(--card); font-family:var(--font-d); font-weight:600; font-size:15px; color:var(--muted); cursor:pointer}
.track-pills button.on{border-color:var(--green); background:var(--green-t); color:var(--green-d)}
.lesson-row{display:flex; gap:14px; align-items:center; background:var(--card); border:2px solid var(--line); border-radius:var(--r-md); padding:14px; margin:10px 0; box-shadow:var(--shadow-card)}
.lesson-row:hover{border-color:var(--green)}
.lnum{width:52px; height:52px; border-radius:16px; background:var(--yellow); border:2px solid var(--yellow-d); color:#5c4300; font-family:var(--font-d); font-weight:700; font-size:21px; display:flex; align-items:center; justify-content:center; flex-shrink:0}
.lesson-row.done .lnum{background:var(--green); border-color:var(--green-d); color:#fff}
.lesson-row .lt{flex:1}
.lesson-row .lt b{font-family:var(--font-d); font-size:16px}
.done-tag{display:inline-block; font-size:12px; font-weight:800; color:var(--green-d); background:var(--green-t); border-radius:var(--r-pill); padding:3px 11px; margin-left:8px; letter-spacing:.04em; text-transform:uppercase}
.trap{border-left:5px solid var(--orange); padding:10px 14px; background:var(--orange-t); border-radius:0 var(--r-md) var(--r-md) 0; margin:12px 0; font-size:15px}
.ex{margin:8px 0; padding-left:22px}
.ex li{margin:7px 0; font-size:15px}
.fb{font-size:14px; margin:4px 0 10px 4px; font-weight:700}
table{width:100%; border-collapse:collapse; font-size:14px}
th,td{padding:10px 8px; border-bottom:2px solid var(--line); text-align:left}
th{color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.07em}
tr:last-child td{border-bottom:none}
.kind{display:inline-block; font-size:12px; font-weight:800; background:#F1F1F1; border-radius:var(--r-pill); padding:3px 11px; text-transform:capitalize}
.cat-dot{display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:0}
.cat-A{background:var(--blue)} .cat-S{background:var(--green)} .cat-T{background:var(--orange)} .cat-P{background:var(--purple)} .cat-C{background:var(--red)}
#chart{width:100%; height:auto; background:#FAFAFA; border:2px solid var(--line); border-radius:var(--r-md)}
.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
h2 .sub{font-family:var(--font-b); font-weight:700; font-size:13px; color:var(--muted)}
.empty{text-align:center; padding:26px 10px; color:var(--muted)}
.empty .big{font-family:var(--font-d); font-size:40px; display:block; margin-bottom:6px}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
@media (max-width:720px){
  .hero{grid-template-columns:1fr}
  .hero-art{order:-1; padding:14px}
  .hero-art .big{font-size:54px}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .start-grid,.feat{grid-template-columns:1fr}
  .bar .lbl{width:130px; font-size:13px}
  .name-row{flex-direction:column}
  .name-row .btn{width:100%}
  nav.links a.pill{padding:9px 11px; font-size:13px}
  .brand-name small{display:none}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none !important; animation:none !important}
}
