*{box-sizing:border-box} :root{--navy:#142b41;--teal:#087f73;--muted:#52677a;--line:#dce5e3;--paper:#f3f7f4}html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none}body{background:#e4eee8;color:var(--navy);font:16px/1.25 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button,select{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible{outline:3px solid #e9ab3a;outline-offset:2px}[hidden]{display:none!important}.shell{max-width:620px;margin:auto;height:100vh;height:100dvh;display:flex;flex-direction:column;background:var(--paper);overflow:hidden;box-shadow:0 0 60px #142b4118}header{flex:none;background:var(--navy);color:#fff;padding:calc(9px + env(safe-area-inset-top)) 13px 11px;border-radius:0 0 22px 22px}.top,.brand,.actions{display:flex;align-items:center;gap:7px}.top{justify-content:space-between}.brand{min-width:0}.logo{background:#d3f6de;color:#123b32;border-radius:12px;width:34px;height:34px;display:grid;place-items:center;font-size:22px;flex:none}.brand h1{font-size:17px;margin:0;white-space:nowrap;letter-spacing:-.4px}.brand small{font-size:10px;color:#c2d6dc;white-space:nowrap}.actions{flex:none;gap:5px}.headbtn{min-height:40px;padding:5px 8px;border:1px solid #ffffff50;border-radius:11px;color:#fff;background:#ffffff0d;font-size:13px;font-weight:700;white-space:nowrap}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}.stats>div{background:#ffffff0c;border:1px solid #ffffff20;padding:4px 9px;border-radius:12px}.stats small{display:block;color:#d4e3e8;font-size:11px;white-space:nowrap}.stats b{display:block;font-size:23px;line-height:1.1;font-variant-numeric:tabular-nums}.stats>div:nth-child(2) b{color:#ffca70}.stats>div:nth-child(3) b{color:#a1f3c6}main{position:relative;display:flex;flex-direction:column;flex:1;min-height:0;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}.meta{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:11px;font-weight:700;color:var(--muted);flex:none;margin:0 2px 5px}.pill{background:#dceee4;color:#176252;padding:4px 8px;border-radius:18px;white-space:nowrap}.progress{height:5px;border-radius:10px;background:#dce6e0;overflow:hidden;margin:0 2px 7px;flex:none}.progress>div{height:100%;background:#119781;transition:width .2s}.card{flex:1;min-height:0;background:#fff;border:1px solid var(--line);border-radius:20px;padding:12px;display:flex;flex-direction:column;gap:7px;overflow:hidden}.kind{font-size:11px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--teal);flex:none}h2{font-size:clamp(19px,5.1vw,24px);line-height:1.18;margin:0;letter-spacing:-.02em;flex:none}#work{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px;justify-content:center}.visual{background:#eff7f4;border:1px solid #e0ede6;border-radius:13px;min-height:0;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden}.visual svg{height:100%;width:100%;max-height:255px;display:block}.visual svg text{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;fill:#142b41}.options{display:grid;gap:6px;flex:none}.option,.tile{border:1.5px solid #d7e4de;border-radius:12px;background:#fff;text-align:left;min-height:44px;padding:7px 9px;font-size:15px;font-weight:650;display:flex;align-items:center;gap:8px;width:100%;line-height:1.2;overflow-wrap:anywhere}.option .letter{width:25px;height:25px;flex:0 0 25px;border-radius:8px;background:#edf3f0;display:grid;place-items:center;font-size:12px;font-weight:800;color:#526c65}.option:active,.tile:active{transform:scale(.985)}.tile.selected,.tile.paired{border-color:#087f73;background:#e3f5eb}.help{font-size:13px;color:var(--muted);margin:0;line-height:1.25;flex:none}.drag-chip{background:#e2f4ea;border:2px dashed #359986;border-radius:11px;padding:6px 9px;text-align:center;font-weight:800;color:#176252;cursor:grab;touch-action:none;flex:none}.target{cursor:pointer;outline:none}.target .hit{fill:#fff;stroke:#087f73;stroke-width:2}.target text{font-weight:800;pointer-events:none}.target.good .hit{fill:#a8efc7;stroke:#08734e;stroke-width:4}.target.bad .hit{fill:#fbd2cd;stroke:#c65353;stroke-width:4}.target:focus .hit{stroke:#d49200;stroke-width:4}.target .hot{fill:transparent;stroke:transparent;stroke-width:1}.target .pointer{stroke:#365766;stroke-width:1.4;fill:none;pointer-events:none}.sortslots{display:grid;gap:4px;flex:none}.slot{border:1px dashed #c6d6cd;border-radius:9px;min-height:31px;display:flex;align-items:center;padding:3px 7px;color:#52677a;font-size:13px;gap:6px}.slot.filled{background:#edf7f1;border-style:solid;color:#173c32}.slot b{background:#dce9e3;border-radius:6px;padding:3px 6px}.matchgrid{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:none}.matchcol{display:grid;gap:6px;grid-auto-rows:1fr}.matchgrid .tile{min-height:49px;font-size:14px;padding:6px}.minor{border:0;background:none;color:#087f73;font-weight:700;text-decoration:underline;padding:4px;min-height:30px;font-size:13px;flex:none}.feedback{padding:13px;border:1px solid #9fddbd;border-radius:16px;background:#e3f8ec;color:#14583d;display:flex;flex-direction:column;gap:7px;justify-content:center}.feedback.bad{background:#fff4e2;color:#784a1a;border-color:#f1d29a}.feedback strong{font-size:23px;line-height:1.15}.feedback p{margin:0;font-size:15px;line-height:1.25}.feedback .correct{font-weight:750}.next{flex:none;display:block;width:100%;background:#087f73;color:white;border:0;border-radius:13px;padding:10px;font-weight:800;font-size:17px;min-height:45px;box-shadow:0 3px 0 #075e56}.next:active{transform:translateY(2px);box-shadow:none}.resultOnly #work{justify-content:center}.resultOnly #feedback{margin-top:auto}.resultOnly #work:empty{display:none}.resultOnly #feedback:only-child{flex:1}.menuTop{display:flex;align-items:center;justify-content:space-between;gap:8px}.close{border:1px solid #d5e2dc;background:#edf4ef;border-radius:12px;min-width:44px;min-height:44px;font-size:20px;font-weight:800}#menu{position:absolute;inset:0;z-index:5;background:var(--paper);padding:13px 14px calc(12px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;overflow:auto;overscroll-behavior:contain}#menu label{font-size:14px;font-weight:800}#menu select{width:100%;padding:10px 8px;border:1px solid #cedbd3;border-radius:12px;background:white;font-size:15px;min-height:44px}.menuProgress{background:white;border:1px solid var(--line);border-radius:13px;padding:10px;font-size:13px}.menuProgress .progress{margin:7px 0}.menuProgress small{color:var(--muted)}#menu .next{margin-top:auto}.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:99}.confetti i{position:absolute;top:-12px;width:8px;height:14px;border-radius:3px;animation:fall 1s ease-in forwards}@keyframes fall{to{transform:translateY(105vh) rotate(600deg);opacity:.1}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}.confetti{display:none}}@media(max-height:650px){header{padding-top:calc(5px + env(safe-area-inset-top));padding-bottom:7px}.brand small{display:none}.stats{margin-top:5px}.stats>div{padding:3px 7px}.stats b{font-size:20px}main{padding-top:5px}.card{padding:8px;gap:5px}h2{font-size:18px}.options{gap:4px}.option,.tile{font-size:14px;padding:5px 7px;min-height:41px}.slot{min-height:27px;font-size:12px}.matchgrid .tile{min-height:44px;font-size:13px}.feedback{padding:9px;gap:5px}.feedback strong{font-size:20px}.feedback p{font-size:14px}#menu{gap:6px;padding-top:8px}}@media(max-width:350px){.brand small{display:none}.brand h1{font-size:15px}.logo{width:29px;height:29px}.headbtn{font-size:12px;padding:5px 6px}.card{padding:8px}.option{font-size:14px}}.compact .visual svg{max-height:155px}.compact .help{font-size:11px}.compact .option,.compact .tile{font-size:13px;min-height:36px;padding:4px 6px}.compact .slot{min-height:24px;padding:2px 5px}.compact .sortslots,.compact .options{gap:3px}.compact .minor{min-height:25px;padding:2px}.compact h2{font-size:17px}.compact #work{gap:4px}.compact .feedback p{font-size:13px}.compact .feedback strong{font-size:18px}.compact .card{gap:4px}.tiny #work{overflow:auto;justify-content:flex-start}.tiny .card{overflow:auto}

.resultOnly #work:empty + #feedback{flex:1;display:flex;align-items:center;margin-top:0}.resultOnly #work:empty + #feedback .feedback{width:100%}.feedback .correct{overflow-wrap:anywhere}.next:disabled{cursor:not-allowed}.matchgrid .tile:focus-visible{outline-offset:0}
/* V3: compact scoreboard, consistent answer reviews and celebration. */
.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.stats>div{padding:5px 6px;min-width:0;display:flex;flex-direction:column;justify-content:flex-start}.stats small{font-size:10px;letter-spacing:-.2px}.stats b{font-size:21px;line-height:1.15}.stats>div:first-child b{color:#a1f3c6}.stats>div:nth-child(2) b{color:white}.stats>div:nth-child(3) b{color:#ffca70}.statSub{display:block;font-size:9px;line-height:1.15;color:#c5d7e3;margin-top:2px;overflow-wrap:anywhere}.stats [data-status=green] b,.stats [data-status=green] .statSub{color:#a1f3c6}.stats [data-status=amber] b,.stats [data-status=amber] .statSub{color:#ffda78}.stats [data-status=red] b,.stats [data-status=red] .statSub{color:#ff9e9e}.stats [data-status=neutral] b{color:#fff}.stats [data-status=green]{border-color:#70e6ad80}.stats [data-status=red]{border-color:#ff8d8d80}.option:disabled{cursor:default;opacity:1;color:inherit}.option.good,.reviewRow.good{background:#e0f8e9;border-color:#329b64;color:#105436}.option.bad,.reviewRow.bad{background:#ffe8e8;border-color:#ce545b;color:#842b32}.option.good .letter{background:#258450;color:#fff}.option.bad .letter{background:#c44048;color:#fff}.feedback.bad{background:#fff0f0;color:#842b32;border-color:#eaa0a5}.feedback{padding:9px 10px;gap:4px}.feedbackHeading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.feedbackHeading strong{font-size:20px}.successTick{width:30px;height:30px;display:grid;place-items:center;background:#198653;color:white;border-radius:50%;font-size:22px;font-weight:900;flex:none;box-shadow:0 0 0 4px #b8eccf}.earned{margin-left:auto;font-size:12px;font-weight:800;color:#176b44}.milestones{display:flex;flex-wrap:wrap;gap:4px}.milestone{font-size:12px;font-weight:800;background:#fff2cb;color:#72520f;padding:3px 6px;border-radius:8px}.feedback .retryNote{font-size:12px}.pop .successTick{animation:tickPop .48s cubic-bezier(.2,1.6,.5,1) both}.pop .feedback.success{animation:glow .65s ease-out}.pop .milestone{animation:tickPop .45s ease-out both}@keyframes tickPop{0%{transform:scale(.25) rotate(-20deg);opacity:.2}100%{transform:scale(1) rotate(0);opacity:1}}@keyframes glow{0%{box-shadow:0 0 0 0 #3ad78d80}100%{box-shadow:0 0 0 10px #3ad78d00}}.reviewRows{display:grid;gap:4px;flex:none}.reviewRow{display:flex;align-items:center;gap:6px;border:1px solid;border-radius:9px;padding:6px 7px;font-size:13px;line-height:1.2}.reviewRow>span{flex:1}.fix{display:block;color:#176b44;font-weight:800;margin-top:2px}.correctSequence{font-size:12px;color:#176b44;border:1px solid #a7dbc0;background:#edf9f0;border-radius:9px;padding:6px}.resultOnly .visual{min-height:65px}.resultOnly #work{justify-content:center}.results{display:flex;flex-direction:column;gap:9px;text-align:center}.resultHero{display:grid;gap:2px;color:#176b44;background:#e4f8eb;border-radius:16px;padding:12px}.resultTrophy{font-size:42px;line-height:1.05}.resultHero strong{font-size:20px}.resultHero>b{font-size:32px;line-height:1.1}.resultHero p{margin:0;font-size:13px}.resultGrid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.resultGrid>div{border:1px solid #dce5e3;background:#f6faf7;padding:8px 5px;border-radius:11px;display:grid;gap:3px}.resultGrid small{font-size:12px;color:#52677a}.resultGrid b{font-size:23px}.resultNote{padding:9px;background:#e4f8eb;color:#176b44;border-radius:11px;font-size:14px;font-weight:800}.menuActions{display:flex;justify-content:space-between;gap:6px}.menuActions button{min-height:34px}.menuActions .minor{text-align:left}#historyPanel{position:absolute;inset:0;z-index:6;background:var(--paper);padding:12px 14px;display:flex;flex-direction:column;gap:10px;overflow:hidden}#historyBody{overflow:auto;min-height:0;display:grid;gap:10px}.historyChart{border:1px solid var(--line);background:white;border-radius:14px;padding:4px}.historyChart svg{display:block;width:100%}.historyList{display:grid;gap:5px}.historyList>div{display:flex;align-items:center;justify-content:space-between;background:white;border:1px solid var(--line);border-radius:10px;padding:8px;gap:6px}.historyList small{display:block;color:var(--muted);font-size:11px}.historyList>div>b{font-size:19px}.compact .feedback{padding:6px 7px;gap:3px}.compact .feedbackHeading strong{font-size:17px}.compact .successTick{width:24px;height:24px;font-size:17px}.compact .milestone,.compact .earned,.compact .feedback .retryNote{font-size:11px}.compact .reviewRow{font-size:12px;padding:4px}.compact .correctSequence{font-size:11px;padding:4px}.compact .results{gap:5px}.compact .resultHero{padding:7px}.compact .resultTrophy{font-size:30px}.compact .resultHero>b{font-size:27px}.compact .resultGrid>div{padding:5px}.compact .resultGrid b{font-size:20px}.compact .resultGrid small{font-size:11px}.compact .resultNote{padding:6px;font-size:12px}.compact .resultOnly .option{min-height:31px}.compact .resultOnly .option .letter{width:21px;height:21px;flex-basis:21px}.tiny .resultOnly #work{overflow:visible;flex:0 0 auto}.tiny .card{overflow-y:auto}.tiny .resultOnly .visual{flex:none;height:110px}.tiny .resultOnly #feedback{margin-top:0}@media(max-width:350px){.stats{gap:3px}.stats>div{padding:4px 4px}.stats small{font-size:9px}.stats b{font-size:18px}.statSub{font-size:9px}}@media(max-height:650px){.stats>div{padding-top:3px;padding-bottom:3px}.stats b{font-size:19px}.feedbackHeading strong{font-size:18px}.resultOnly .feedback p{font-size:13px}.resultOnly .option{min-height:35px}.resultOnly .option .letter{height:22px;width:22px;flex-basis:22px}}
@media(max-height:600px){.compact header{padding-bottom:5px}.compact .top{gap:4px}.compact .headbtn{min-height:35px}.compact .stats{margin-top:4px}.compact .statSub{font-size:8px}.compact .stats b{font-size:18px}.compact main{padding-top:4px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}.compact .card{padding:7px;gap:3px}.compact h2{font-size:16px}.compact .kind{font-size:10px}.compact .meta{margin-bottom:3px}.compact .progress{margin-bottom:4px}.compact .resultOnly .visual{min-height:52px}.compact .resultOnly .option{min-height:29px;padding:3px 5px;font-size:12px}.compact .resultOnly .option .letter{width:20px;height:20px;flex-basis:20px}.compact .feedback{padding:5px 6px;gap:2px}.compact .feedback p{font-size:12px;line-height:1.18}.compact .feedbackHeading strong{font-size:16px}.compact .feedbackHeading{gap:5px}.compact .feedback .retryNote{font-size:10px}.compact .milestone{font-size:10px;padding:2px 4px}.compact .next{min-height:38px;padding:6px;font-size:15px}.compact .reviewRow{padding:3px 4px}.compact .resultOnly #work{gap:3px}}
