:root{font-family:ui-rounded,"Trebuchet MS",Arial,sans-serif;color:#24382f;background:#f5f8f7;font-synthesis:none;letter-spacing:0;--green:#21765b;--ink:#24382f;--line:#d7e2dc}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}[hidden]{display:none!important}a{color:var(--green)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:4px solid #dc9623;outline-offset:4px}button{border:0}svg{width:22px;height:22px;flex:none}.top{display:flex;justify-content:space-between;align-items:center;padding:18px 5%;border-bottom:1px solid var(--line);background:white}.brand{font-size:19px;font-weight:800;color:var(--ink);text-decoration:none}.brand span{display:block;font-size:13px;font-weight:400;margin-top:4px}.top-actions{display:flex;align-items:center;gap:18px}.age{font-size:14px}.icon{width:44px;height:44px;display:grid;place-items:center;background:#ecf3f0;border-radius:8px}main{max-width:1160px;margin:auto;padding:35px 28px 20px;min-height:calc(100vh - 150px)}h1{font-size:38px;line-height:1.15;margin:10px 0 14px}h2{font-size:26px}.eyebrow{font-size:13px;font-weight:800;color:#346d59;letter-spacing:0}.subtitle{font-size:19px;color:#5b6c62;margin:0}.intro{display:flex;align-items:center;justify-content:space-between;gap:20px}.preview{display:flex;gap:12px}.preview img{width:105px;height:125px;object-fit:contain;transform:rotate(-5deg)}.preview img:nth-child(2){transform:rotate(6deg)}#connection{font-size:14px;color:#536b60;min-height:22px;margin:25px 0 16px}.settings-grid{display:grid;grid-template-columns:1fr .8fr 1.2fr;border-block:1px solid var(--line);padding:24px 0;gap:28px}fieldset{border:0;padding:0;margin:0;min-width:0}legend{font-weight:800;font-size:16px;margin-bottom:15px}label{font-size:15px}.radio{display:flex;align-items:center;gap:8px;margin-bottom:14px}input{accent-color:var(--green)}input[type=radio],input[type=checkbox]{width:20px;height:20px}.segments{display:flex;gap:8px}.segments label{position:relative}.segments input{position:absolute;opacity:0;width:100%;height:100%;margin:0}.segments span{display:grid;place-items:center;width:52px;height:48px;border:2px solid var(--line);border-radius:8px;background:white;font-size:20px;font-weight:800}.segments input:checked+span{background:#d9eee3;border-color:var(--green)}.segments input:focus-visible+span{outline:3px solid #dc9623}select{display:block;width:100%;max-width:100%;padding:9px;margin-top:7px;border:1px solid #99b2a4;border-radius:6px;background:white}.speed{display:flex;align-items:center;gap:12px;margin:12px 0}.speed input{min-width:0;width:100%}.themes{margin:24px 0}#groups{display:flex;gap:10px 25px;flex-wrap:wrap}#groups label{display:flex;align-items:center;gap:7px}.start-row{display:flex;align-items:center;gap:22px;margin:30px 0}#available{font-size:14px;color:#5b6c62}.primary,.secondary{display:inline-flex;justify-content:center;align-items:center;gap:9px;min-height:44px;border-radius:8px;padding:11px 18px;font-weight:700;text-decoration:none}.primary{color:white;background:var(--green)}.primary:hover{background:#185e48}.secondary{background:white;color:var(--ink);border:1px solid #a8bdb2}.large{min-height:62px;font-size:23px;min-width:215px;background:#e4b334;color:#25372f}.large:hover{background:#efc24a}.play-top{display:flex;align-items:center;gap:20px}.play-top .secondary{margin-left:auto}#stars{color:#926605;font-weight:800;font-size:21px}.listen-row{display:flex;justify-content:center;align-items:center;gap:24px;margin:18px 0 27px}.listen-row h1{font-size:32px;margin:0}.listen{width:88px;height:88px;border-radius:50%;background:#e5b53f;color:#27382f;box-shadow:0 5px 0 #bd8d22;display:grid;place-items:center}.listen svg{width:39px;height:39px}.listen.speaking{animation:pulse 1.2s ease-in-out infinite}.board{display:grid;grid-template-columns:repeat(var(--choices,3),minmax(0,1fr));gap:22px}.choice{position:relative;background:white;border:3px solid #dce4df;border-radius:8px;aspect-ratio:1;display:grid;place-items:center;padding:20px;box-shadow:0 5px 0 #e1e8e3;transition:border-color .15s,transform .15s;min-width:0}.choice:hover:not(:disabled){border-color:#e5b53f;transform:translateY(-3px)}.choice:disabled{opacity:1}.choice img{width:100%;height:100%;max-height:285px;min-height:0;object-fit:contain;pointer-events:none}.choice.correct{border-color:#21765b;background:#eaf7ef}.choice.correct:after{content:'✓';position:absolute;top:8px;right:12px;background:#21765b;color:white;border-radius:50%;width:36px;height:36px;display:grid;place-items:center;font-size:23px}.choice.retry{animation:nudge .3s ease}.choice.tried{border-color:#e8bd76}.feedback-row{display:flex;justify-content:center;align-items:center;gap:22px;min-height:95px}#feedback{font-size:22px;font-weight:700;margin:0}.summary{display:grid;grid-template-columns:repeat(4,1fr);border-block:1px solid var(--line);margin:28px 0;padding:24px 0;gap:22px}.summary strong{display:block;font-size:35px;color:var(--green);margin-bottom:8px}.summary span{font-size:15px}.result-actions{display:flex;gap:10px;flex-wrap:wrap;margin:24px 0}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px}caption{text-align:left;font-weight:bold;margin:15px 0}td,th{padding:12px;text-align:left;border-bottom:1px solid var(--line)}th{background:#e9f0ec}footer{padding:18px 5%;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;color:#63766b;font-size:13px}.text-button{color:var(--green);background:transparent;padding:8px}dialog{border:1px solid #a6b9ae;border-radius:8px;max-width:540px;width:calc(100% - 36px);padding:26px;color:var(--ink)}dialog::backdrop{background:#152b24a6}.dialog-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:25px}#teacher-prompt{font-size:22px;line-height:1.5}#credits{max-height:55vh;overflow:auto}#credits p{font-size:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}#audio-warning{padding:14px;background:#fff0c8;border-left:4px solid #d79c21;font-size:15px}body.playing .age{display:none}body.playing main{padding-top:22px}@keyframes pulse{50%{transform:scale(1.045)}}@keyframes nudge{30%{transform:translateX(-5px)}70%{transform:translateX(5px)}}@media(max-width:700px){main{padding:23px 16px 15px}.top{padding:13px 16px}.intro{align-items:flex-start;flex-direction:column}h1{font-size:31px}.preview{position:absolute;right:18px;top:114px;opacity:.17;pointer-events:none;z-index:-1}.preview img{width:72px;height:95px}.settings-grid{grid-template-columns:1fr 1fr;gap:22px}.settings-grid fieldset:last-child{grid-column:1/-1}.settings-grid fieldset:last-child select{max-width:100%}.themes{margin:21px 0}.start-row{align-items:flex-start;flex-direction:column;gap:12px}.large{width:100%}.listen-row{margin:22px 0}.listen{width:70px;height:70px}.board{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.board[data-count="3"] .choice:last-child{grid-column:1/-1;width:calc(50% - 6px);justify-self:center}.choice{padding:12px}.listen-row h1{font-size:28px}.feedback-row{gap:12px;min-height:90px;flex-wrap:wrap;padding:16px 0}#feedback{font-size:18px}.summary{grid-template-columns:1fr 1fr}.play-top{gap:9px}.play-top .eyebrow{font-size:12px}#stars{font-size:17px}#pause{padding:9px 12px}.result-actions>*{flex:1;white-space:nowrap}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}@media print{.top,footer,.result-actions,#setup,#play,dialog,#audio-warning{display:none!important}main{padding:0;max-width:none}.screen[hidden]{display:none!important}body{background:white;color:black}.summary{margin:10px 0;padding:12px 0}h1{font-size:24px}td,th{font-size:10px;padding:7px}tr{break-inside:avoid}thead{display:table-header-group}@page{size:A4;margin:14mm}}
:root .spoken-prompt{max-width:800px;margin:0 auto 24px;text-align:center;font-size:22px;line-height:1.45;color:#24382f;overflow-wrap:break-word}
@media(max-width:700px){:root .spoken-prompt{font-size:18px;margin-bottom:20px}}
.celebration { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 20; }
.celebration span { position: absolute; top: -32px; width: 9px; height: 26px; border-radius: 2px; animation: streamer-fall 1500ms ease-in var(--delay) both; }
.board { position: relative; }
.board.celebrating .choice { opacity: 0; pointer-events: none; transition: opacity 300ms; }
.winner-image { position: absolute; inset: 0; margin: auto; width: 95%; height: 95%; object-fit: contain; pointer-events: none; animation: happy-turn 1600ms ease-in-out both; }
@keyframes streamer-fall {
  0% { transform: translate3d(0, -30px, 0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate3d(var(--drift), 105vh, 0) rotate(var(--turn)); opacity: 0; }
}
@keyframes happy-turn {
  0% { transform: rotate(0) scale(.3); }
  20% { transform: rotate(90deg) scale(.4); }
  80% { transform: rotate(630deg) scale(.7); }
  100% { transform: rotate(720deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .celebration { display: none; } }
@media print { .celebration { display: none; } }
