/* Floating toy-world HUD shared by the 3D classroom games (the kart race keeps its own). */
.fun-room{max-width:none;padding:0;margin:0;min-height:100dvh;font-family:class,'Noto Sans CJK SC','PingFang SC','Microsoft YaHei',sans-serif}
.fun-stage{position:relative;width:100%;height:100dvh;min-height:420px;overflow:hidden;background:#bfe9ff;touch-action:none;user-select:none;-webkit-user-select:none}
.fun-stage>canvas{display:block;width:100%;height:100%;touch-action:none}
.fun-hud{position:absolute;top:16px;left:16px;right:16px;display:flex;align-items:center;gap:12px;pointer-events:none}
.fun-pill{background:#ffffffed;border:3px solid #fff;border-radius:32px;box-shadow:0 5px 0 #95b5d5;padding:9px 16px;white-space:nowrap;font-weight:bold;color:#223979;font-size:20px;line-height:1.2}
.fun-chip{background:#4687f6;color:#fff;font-size:18px}
.fun-progress{position:relative;flex:1;min-width:80px;height:26px;border-radius:20px;background:#5a7fa2a0;border:3px solid #fff;box-shadow:0 4px 0 #95b5d5}
.fun-progress>span{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,#ffe34c,#ff9160,#ff5f9e);transition:width .3s}
.fun-progress>b{position:absolute;top:-10px;transform:translateX(-100%);font-size:24px;white-space:nowrap}
.fun-progress>b.done{filter:drop-shadow(0 0 6px #ffe34c)}
.fun-streak{position:absolute;top:74px;left:16px;font-size:22px}
.fun-streak small{margin-left:6px;color:#e2570f;font-size:16px}
.fun-status{position:absolute;top:74px;right:16px;font-size:16px;max-width:calc(50% - 110px);white-space:normal;text-align:center;line-height:1.25}
.fun-status:empty{display:none}
.fun-coins.pop{animation:fun-pop .3s}
@keyframes fun-pop{40%{transform:scale(1.22)}}
.fun-prompt{position:absolute;top:100px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px)}
.fun-prompt:empty{display:none}
.fun-prompt .prompt{min-height:0;gap:10px;background:#ffffffed;border:3px solid #fff;border-radius:26px;padding:6px 14px;box-shadow:0 5px 0 #95b5d5}
.fun-prompt .prompt:has(>button:only-child){background:transparent;border-color:transparent;box-shadow:none;padding:0}
.fun-prompt button{border-radius:50%;background:#2c9cfa;border:4px solid #fff;box-shadow:0 6px 0 #3f81c4,0 0 0 10px #ffffff55;width:84px;min-width:84px;height:84px;min-height:0;font-size:34px;margin:0;padding:0}
.fun-prompt .prompt:not(:has(>button:only-child)) button{width:54px;min-width:54px;height:54px;font-size:22px;box-shadow:0 4px 0 #3f81c4}
.fun-prompt button:disabled{opacity:.4;cursor:default}
.fun-prompt .picture{font-size:56px;line-height:1.1}
.fun-prompt .text-card{font-size:28px;font-weight:bold;color:#223979;max-width:300px;overflow-wrap:anywhere;text-align:center;line-height:1.25}
.fun-recap{font-family:'LXGW WenKai',class,'Noto Sans CJK SC',sans-serif;position:absolute;left:50%;bottom:108px;transform:translate(-50%,10px);background:#fff8d9;border:3px solid #fff;border-radius:22px;padding:8px 18px;font-size:24px;font-weight:bold;color:#5a3d00;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;box-shadow:0 5px 0 #d8c08a;white-space:nowrap;max-width:94%;overflow:hidden;text-overflow:ellipsis}
.fun-recap.on{opacity:1;transform:translate(-50%,0)}
.fun-controls{position:absolute;left:16px;right:16px;bottom:16px;display:flex;align-items:flex-end;justify-content:space-between;gap:8px;pointer-events:none}
.fun-controls:empty{display:none}
.fun-pad{display:flex;gap:12px;pointer-events:auto}
.fun-btn{width:76px;height:76px;min-height:0;border-radius:50%;font-size:36px;font-weight:bold;line-height:1;background:#ffffffee;border:4px solid #fff;color:#223979;box-shadow:0 6px 0 #869cb9;margin:0;padding:0;touch-action:none}
.fun-btn:active{transform:translateY(4px);box-shadow:0 2px 0 #869cb9}
.fun-jump{background:#ffdc67}
.fun-hint{background:#ffffffd0;border-radius:18px;padding:6px 14px;font-size:16px;color:#223979;margin-bottom:6px;text-align:center}
.fun-host{position:absolute;top:74px;right:16px;display:flex;gap:8px;align-items:center}
.fun-host:empty{display:none}
.fun-host .race-code{background:#fff;border-radius:22px;padding:10px 16px;font-weight:bold;color:#223979}
.fun-host button{min-height:48px;margin:0}
.fun-fallback{position:absolute;inset:150px 16px auto;background:#ffffffee;border-radius:24px;padding:18px;text-align:center}
.fun-fallback-choices{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.fun-fallback-choices button{width:200px;height:110px;font-size:34px;font-family:'LXGW WenKai',class,sans-serif}
.game-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.game-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;margin:0;padding:14px 16px;border-radius:20px}
.game-card strong{font-size:24px}.game-card small{font-size:14px;line-height:1.3;color:#6a5a4a}
.game-card[aria-pressed=true]{background:#ffdc67;border-color:#e9a400;box-shadow:0 3px 0 #c98b00}
@media(max-width:600px){
.fun-hud{top:10px;left:8px;right:8px;gap:6px;flex-wrap:wrap;justify-content:space-between}
.fun-pill{font-size:16px;padding:6px 10px}.fun-chip{font-size:14px}
.fun-progress{order:5;flex-basis:100%;height:20px}.fun-progress>b{font-size:19px;top:-8px}
.fun-streak{top:94px;left:8px;font-size:17px}.fun-status{top:94px;right:8px;font-size:14px;max-width:58%;padding:5px 10px}.fun-host{top:94px;right:8px}
.fun-prompt{top:178px}.fun-prompt button{width:68px;min-width:68px;height:68px;font-size:28px}.fun-prompt .picture{font-size:44px}.fun-prompt .text-card{font-size:22px}
.fun-btn{width:64px;height:64px;font-size:30px}.fun-pad{gap:8px}.fun-hint{display:none}.fun-recap{font-size:19px;bottom:92px}
.fun-controls{left:8px;right:8px;bottom:10px}
}
.fun-stage::after{content:'';position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .25s;background:radial-gradient(ellipse at 50% 60%,transparent 55%,#ff8a1a55 82%,#ff5a1a88 100%)}
.fun-stage.fire::after{opacity:1}
.fun-host-view .fun-hearts,.fun-host-view .fun-coins,.fun-host-view .fun-streak{display:none}
/* FX-1: the first-try streak badge under the streak pill. Gold and cream only, gone after about 2 s. FX-MOTION-1: no pop
   animation when the device asks for reduced motion. */
.fun-cheer{position:absolute;top:130px;left:16px;padding:6px 14px;border-radius:22px;background:#fffbeb;border:3px solid #ffe89a;box-shadow:0 4px 0 #ecca6b;color:#7a5400;font-weight:bold;font-size:18px;white-space:nowrap;pointer-events:none;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}
.fun-cheer.on{opacity:1;transform:scale(1);animation:fun-cheer-pop .45s}
.fun-cheer.level2{background:#fff3c4;border-color:#ffd23f;font-size:20px}
@keyframes fun-cheer-pop{0%{transform:scale(.6)}55%{transform:scale(1.18)}100%{transform:scale(1)}}
@media(max-width:600px){.fun-cheer{top:132px;left:8px;font-size:15px;padding:4px 10px}.fun-cheer.level2{font-size:16px}}
@media(prefers-reduced-motion:reduce){.fun-cheer,.fun-cheer.on{animation:none;transition:none;transform:none}.fun-coins.pop{animation:none}}
/* Lobby backdrop for the 3D games: a plain sunny sky, so no other game's art shows through. */
.lobby.fun-sky{background:linear-gradient(#8fd3ff,#d9f3ff 52%,#c8f2a8 52%,#9fe37a);max-width:none;padding:24px max(24px,calc(50vw - 560px))}
.fun-sprint{background:#c9f2ff}

/* 一笔冲刺: the writing board sits exactly on the gate's 田字格; the prompt moves beside it */
.stroke-board{position:absolute;touch-action:none;border-radius:6px;box-shadow:0 8px 0 #b9783f,0 0 0 6px #b9783f;z-index:2}
.stroke-board canvas{position:static;display:block;width:100%;height:100%;touch-action:none;cursor:crosshair;border-radius:6px}
.stroke-board[hidden]{display:none}
.stroke-board-flat{left:50%!important;top:200px!important;transform:translateX(-50%);width:min(60vh,86vw,420px);height:min(60vh,86vw,420px)}
.stroke-room .fun-fallback{inset:120px 16px auto;padding:8px 18px}
.stroke-room .fun-prompt{top:50%;left:auto;right:max(16px,calc(25% - 26vh - 60px));transform:translateY(-50%)}
.stroke-room .fun-prompt .prompt{flex-direction:column}
.stroke-room .fun-recap{z-index:3}
.stroke-room .fun-status{max-width:calc(50% - 25vh - 28px)}
@media (max-width:700px){.stroke-room .fun-status{max-width:54%}.stroke-room .fun-prompt{top:134px;right:auto;left:8px;transform:none}.stroke-room .fun-prompt .prompt{flex-direction:row}}
/* STROKE-TABLET-1: a tablet held upright has no room beside the board, so the status spans the band above it and the prompt sits below it */
@media (min-width:701px) and (orientation:portrait){.stroke-room .fun-status{max-width:calc(100% - 170px)}.stroke-room .fun-prompt{top:auto;bottom:112px;right:16px;transform:none}.stroke-room .fun-prompt .prompt{flex-direction:row}}

/* 大声冲呀: say-it prompt, quiet classroom chip */
/* 大声冲呀: additions to fun3d.css */
.fun-prompt .shout-prompt{flex-direction:column;gap:4px;padding:6px 16px 8px;align-items:center;display:flex}
.fun-prompt .shout-hanzi{font-family:'LXGW WenKai',class,'Noto Sans CJK SC',sans-serif;font-size:56px;font-weight:900;line-height:1.1;color:#1b2a6e;white-space:nowrap}
.fun-prompt .shout-say{font-size:17px;font-weight:bold;color:#223979;background:#eaf3ff;border-radius:16px;padding:3px 12px;white-space:nowrap}
.fun-prompt .shout-say.on{background:#ffe1ef;color:#c2185b;animation:shout-pulse .6s ease-in-out infinite alternate}
@keyframes shout-pulse{to{transform:scale(1.08)}}
.fun-fire{background:#ffb04a}
.shout-quiet{position:absolute;top:132px;left:16px;font-size:16px;white-space:normal;max-width:calc(100% - 32px)}
.shout-room .fun-recap{bottom:auto;top:236px}
@media (max-width:600px){.fun-prompt .shout-hanzi{font-size:42px}.fun-prompt .shout-say{font-size:13px;padding:2px 8px}.fun-prompt .shout-prompt{padding:4px 10px 6px}.shout-room .fun-recap{top:300px}.shout-quiet{top:150px;left:8px;font-size:13px}}
@media (prefers-reduced-motion:reduce){.fun-prompt .shout-say.on{animation:none}}
.shout-room .fun-status{max-width:calc(50% - 232px)}
/* SHOUT-PILL-1: the say-it panel keeps clear of the status pill: the pill's left edge is never nearer the middle than 216px, so the panel is at most 416px wide and its line wraps */
.shout-room .fun-prompt{max-width:min(416px,calc(100% - 24px))}.fun-prompt .shout-say{white-space:normal;text-align:center;max-width:100%}
@media (max-width:600px){.shout-room .fun-status{max-width:58%}}

/* 全班喂小龙: the class tummy bar (empty bowl to sleeping moon) and the dragon's wish bubble */
.dragon-room .fun-hearts,.dragon-room .fun-coins,.dragon-room .fun-streak{display:none}
.dragon-room .fun-progress.dragon-bar{height:34px;border-radius:22px;background:#ffffffd8;border:4px solid #fff;box-shadow:0 5px 0 #95b5d5;margin:0 44px 0 50px}
.dragon-room .dragon-fill{display:block;height:100%;border-radius:18px;background:linear-gradient(#ffe56e,#ffc21a);box-shadow:inset 0 -6px 0 #f0a20033;transition:width .6s cubic-bezier(.3,1.4,.5,1)}
.dragon-room .fun-progress>b.dragon-bowl,.dragon-room .fun-progress>b.dragon-moon{top:50%;transform:translateY(-50%);font-size:36px;line-height:1;filter:drop-shadow(0 2px 0 #fff)}
.dragon-room .fun-progress>b.dragon-bowl{left:-50px}.dragon-room .fun-progress>b.dragon-moon{left:auto;right:-46px}
.dragon-room .fun-chip{background:#ff8a3d}
.dragon-room .fun-prompt{top:84px;z-index:1}
.dragon-room .fun-prompt.beside{transform:none}
.dragon-room .fun-prompt .prompt,.dragon-room .fun-prompt .prompt:has(>button:only-child){position:relative;background:#fff;border:4px solid #fff;border-radius:30px;padding:10px 18px;box-shadow:0 6px 0 #95b5d5}
.dragon-room .fun-prompt.beside .prompt::before{content:'';position:absolute;left:-20px;top:26px;border-style:solid;border-width:12px 22px 12px 0;border-color:transparent #fff transparent transparent}
.dragon-room .fun-prompt .picture{font-size:64px}
.dragon-room .fun-prompt .text-card{font-size:30px;max-width:240px}
.dragon-room .fun-recap{bottom:auto;top:84px;left:16px;transform:translateY(10px);background:#fff3c4;max-width:calc(50% - 150px)}
.dragon-room .fun-recap.on{transform:none}
.dragon-room .fun-status{top:84px;left:16px;right:auto;max-width:calc(50% - 150px)}
.dragon-room .fun-fallback{inset:120px 16px auto}
@media (max-width:600px){
.dragon-room .fun-progress.dragon-bar{height:24px;margin:0 36px 0 40px}
.dragon-room .fun-progress>b.dragon-bowl,.dragon-room .fun-progress>b.dragon-moon{font-size:26px}
.dragon-room .fun-progress>b.dragon-bowl{left:-38px}.dragon-room .fun-progress>b.dragon-moon{right:-34px}
.dragon-room .fun-prompt{top:96px}.dragon-room .fun-prompt .picture{font-size:46px}.dragon-room .fun-prompt .prompt{padding:6px 12px}
.dragon-room .fun-recap,.dragon-room .fun-status{top:auto;bottom:18px;left:50%;transform:translateX(-50%);max-width:92%}.dragon-room .fun-recap{bottom:64px}.dragon-room .fun-recap.on{transform:translateX(-50%)}
}
/* 全班喂小龙: the projector's class count under the bar, the share-fed cheer, and the cooperative end (no places, no steps) */
.dragon-room.fun-host-view .fun-chip{position:absolute;top:60px;left:0;font-size:22px;padding:8px 20px;white-space:nowrap}
.dragon-room.fun-host-view .fun-status{top:134px}
.dragon-room .fun-status.share{top:auto;bottom:34%;left:50%;right:auto;transform:translateX(-50%);max-width:min(86%,620px);font-size:26px;text-align:center;background:#fff7d6;border:4px solid #fff;box-shadow:0 6px 0 #e7c25a;padding:14px 24px}
.podium:has(.coop-end)>.coop-end{position:absolute;top:10px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;background:#ffffffee;border:4px solid #fff;border-radius:30px;padding:10px 26px;box-shadow:0 6px 0 #95b5d5;white-space:nowrap;max-width:94%}
.coop-end strong{font-size:30px;color:#2b4a8a}.coop-end .coop-count{font-size:20px;color:#8a5a00}
.podium:has(.coop-end)>button{margin-top:128px}
.podium:has(.coop-end)>.review-link{margin-top:128px;background:#ffffffe8;padding:8px 12px;border-radius:14px}
.podium:has(.coop-end)>.coop-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:6px;width:min(1240px,97%);max-height:44vh;background:#ffffffc8;border-radius:22px;padding:8px}
.podium:has(.coop-end) .coop-results .player{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;min-width:0;min-height:0;padding:3px 8px;flex-basis:auto;order:0;background:#fffaf1;border-radius:16px}
.podium:has(.coop-end) .coop-results .player strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.podium:has(.coop-end) .coop-results .avatar{width:32px;height:32px;font-size:21px;flex:none}
.podium:has(.coop-end) .coop-results .player>span:last-child{margin-left:auto;font-size:15px;white-space:nowrap}
.podium:has(.coop-end)>.coop-mine{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:16px;margin:0;padding:12px 26px;background:#ffffffee;border:4px solid #fff;border-radius:30px;box-shadow:0 6px 0 #95b5d5;white-space:nowrap}
.coop-mine>span:not(.avatar){font-size:34px}.coop-mine .coop-own{font-size:22px;color:#2b4a8a;font-weight:bold}
@media (max-width:600px){
.dragon-room.fun-host-view .fun-chip{top:44px;font-size:16px}
.dragon-room.fun-host-view .fun-status{top:auto}
.dragon-room .fun-status.share{font-size:20px;bottom:40%}
.coop-end strong{font-size:21px}.coop-end .coop-count{font-size:16px}.podium:has(.coop-end)>.coop-end{white-space:normal;text-align:center;padding:8px 16px}
.podium:has(.coop-end)>.coop-mine{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:4px 12px;padding:8px 14px;white-space:normal;text-align:center;width:92%}.coop-mine .avatar{width:48px;height:48px;font-size:30px}.coop-mine .coop-own{flex-basis:100%}.podium:has(.coop-end)>.coop-end{width:92%}.podium:has(.coop-end)>button{margin-top:150px}.coop-mine>span:not(.avatar){font-size:28px}.coop-mine .coop-own{font-size:19px}
}
/* the cooperative end keeps its layout and a plain meadow sky even without WebGL (never the podium picture) */
.podium:has(.coop-end){position:relative;max-width:none;padding:16px;min-height:100dvh;isolation:isolate;background:linear-gradient(#9fdcff,#e3f6ff 58%,#c8f2a8 58%,#9fe37a)}
.podium:has(.coop-end)>h1,.podium:has(.coop-end)>p{display:none}
.podium:has(.coop-end)>.podium-steps{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);margin:0;box-shadow:none}
.podium:has(.coop-end)>.race-code{position:absolute;top:16px;left:12px;background:white;border-radius:24px}
.dragon-room .fun-fallback{inset:200px 16px auto}
@media (max-width:600px){.dragon-room .fun-fallback{inset:170px 8px auto}.dragon-room .fun-fallback-choices button{width:30%;min-width:96px}}
/* projector: the class count sits under the bar on the left; room code, Pause class and End round sit at the bottom right, clear of the dragon */
.dragon-room.fun-host-view .fun-host{top:auto;bottom:16px;right:16px;background:#ffffffb0;border-radius:28px;padding:6px}
/* END-CONFIRM-1: End round asks in place, no dialog; Pause stays usable beside it */
.fun-host .end-confirm{display:flex;gap:6px;align-items:center;background:#fff;border-radius:26px;padding:4px 4px 4px 14px;box-shadow:0 4px 0 #95b5d5}
.fun-host .end-confirm-ask{font-weight:bold;color:#223979;white-space:nowrap}
.fun-host .end-confirm-yes{background:#e8503a;border-color:#e8503a;color:#fff}
.fun-host .end-confirm-no{background:#2c9cfa;border-color:#2c9cfa;color:#fff}
@media (max-width:700px){.fun-host{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 16px)}.fun-host .end-confirm{flex-wrap:wrap;justify-content:flex-end;padding:4px}.fun-host .end-confirm-ask{white-space:normal;padding:0 6px}}
/* LISTEN-MUTE-1: a small kind reminder beside the 🔊 button, on the sky side, never over the signs; it never carries the word */
.fun-prompt .listen-mute-hint{position:absolute;right:calc(100% + 14px);top:50%;transform:translateY(-50%);width:max-content;max-width:220px;background:#fff8d9;color:#7a4b00;border:3px solid #fff;border-radius:18px;padding:3px 12px;font-size:14px;font-weight:bold;line-height:1.3;text-align:center;box-shadow:0 3px 0 #e7c25a;pointer-events:none}
@media (max-width:600px){.fun-prompt .listen-mute-hint{font-size:12px;max-width:128px;padding:2px 8px;right:calc(100% + 8px)}}
.stroke-room .fun-prompt .listen-mute-hint{position:static;transform:none;margin:10px auto 0;max-width:200px}
@media (max-width:700px){.stroke-room .fun-prompt .listen-mute-hint{position:absolute;left:calc(100% + 10px);right:auto;top:auto;bottom:-12px;transform:none;margin:0;max-width:min(270px,calc(100vw - 110px))}}
@media (min-width:701px) and (orientation:portrait){.stroke-room .fun-prompt .listen-mute-hint{position:absolute;left:auto;right:calc(100% + 14px);top:50%;bottom:auto;transform:translateY(-50%);margin:0;max-width:220px}}
.dragon-room .fun-prompt .listen-mute-hint{position:static;transform:none;margin:8px auto 0;max-width:200px}
/* GUESS-1: the right choice after a wrong pick, a bar that runs down for the lock, and the coins that fly off. */
.fun-reveal{position:absolute;left:50%;top:96px;transform:translateX(-50%) scale(.9);display:flex;flex-direction:column;align-items:center;gap:2px;background:#fffdf3;border:4px solid #fff;border-radius:26px;padding:10px 26px 14px;box-shadow:0 6px 0 #7fbf8a,0 0 0 6px #49b36b55;color:#1f5c2e;opacity:0;pointer-events:none;transition:opacity .2s;z-index:4;max-width:calc(100% - 24px);overflow:hidden}
.fun-reveal.on{transition:none;opacity:1;transform:translateX(-50%) scale(1)}
@media(max-width:600px){.fun-reveal{top:136px;padding:6px 18px 10px}.fun-reveal-word{font-size:36px}}
.fun-reveal-say{font-size:16px;font-weight:bold}
.fun-reveal-word{font-family:'LXGW WenKai',class,'Noto Sans CJK SC',sans-serif;font-size:46px;line-height:1.15;overflow-wrap:anywhere;text-align:center}
.fun-reveal-bar{position:absolute;left:0;bottom:0;height:6px;width:100%;background:#49b36b;transform-origin:left;animation:fun-lock linear forwards}
@keyframes fun-lock{to{transform:scaleX(0)}}
.fun-locked .fun-controls{opacity:.45;filter:grayscale(.6)}
.fun-coins{position:relative}
.fun-coin-loss{position:absolute;bottom:-10px;left:-22px;padding:1px 7px;border-radius:12px;background:#fff;border:2px solid #f4b5ad;font-size:16px;line-height:1.2;font-weight:bold;color:#c0392b;text-shadow:0 2px 0 #fff;animation:fun-coins-off 1.1s ease-out forwards;pointer-events:none}
@keyframes fun-coins-off{0%{opacity:1;transform:translate(0,0) scale(1.15)}70%{opacity:1}100%{opacity:0;transform:translate(-34px,-8px) scale(.9) rotate(-12deg)}}
.fun-streak.tired span{opacity:.3!important}
.fun-streak.tired small{color:#5b6b8a}
/* CLASSVIEW-1: the projector's class meter, a string of ten lanterns lit by class totals only. Unlit lanterns are ice blue,
   lit ones warm gold with a soft glow; no names, no per-child marks. In the 3D games it is its own band between the game
   view and the strip of children, so it never covers the course, the room code or Pause and End. In Word Kart it sits at
   the bottom left of the track view, where the projector has no controls. */
.class-meter{flex:none;display:flex;align-items:center;gap:6px 18px;flex-wrap:wrap;padding:8px 16px;background:#fffbebf2;border-top:3px solid #fff;box-shadow:0 -4px 0 #95b5d5;color:#223979;pointer-events:none;font-family:class,'Noto Sans CJK SC','PingFang SC',sans-serif}
.class-meter[hidden]{display:none}
.fun-host-view>.fun-stage:not(:has(>.fun-kids:not(:empty)))>.class-meter{position:absolute;left:0;right:0;bottom:0}
.class-meter-title{font-size:17px;line-height:1.2;white-space:nowrap}
.class-meter-row{position:relative;display:flex;gap:8px;padding:8px 2px 2px}
.class-meter-row::before{content:'';position:absolute;left:0;right:0;top:3px;height:3px;border-radius:2px;background:#b2bec3}
.class-lantern{position:relative;flex:none;width:26px;height:32px;border-radius:12px/15px;background:#e8f4fd;border:2px solid #9fb6c6;box-shadow:inset 0 -5px 0 #cfe4f3;transition:background .3s,box-shadow .3s}
.class-lantern::before,.class-lantern::after{content:'';position:absolute;left:6px;width:10px;height:4px;border-radius:2px;background:#9fb6c6}
.class-lantern::before{top:-6px}.class-lantern::after{bottom:-6px}
.class-lantern.on{background:radial-gradient(circle at 50% 40%,#fffbeb,#ffe89a 45%,#ffd23f);border-color:#e0a800;box-shadow:0 0 12px 3px #ffe89acc,inset 0 -5px 0 #f5c400}
.class-lantern.on::before,.class-lantern.on::after{background:#e0a800}
.class-lantern.pop{animation:class-lantern-pop .5s}
@keyframes class-lantern-pop{40%{transform:scale(1.25) translateY(-3px)}}
.class-meter-line{font-size:15px;line-height:1.3;font-weight:bold;color:#3c5a8a;flex:1 1 260px}
.class-meter-line[hidden]{display:none}
.kart-room .class-meter{position:absolute;left:18px;bottom:18px;z-index:3;max-width:min(620px,calc(100% - 36px));border-radius:24px;border:3px solid #fff;box-shadow:0 5px 0 #95b5d5}
@media(max-width:600px){.class-meter{padding:6px 8px;gap:4px 10px}.class-meter-title{font-size:15px;white-space:normal}.class-lantern{width:20px;height:26px}.class-meter-row{gap:6px}.class-meter-line{font-size:13px}.kart-room .class-meter{left:8px;bottom:8px;max-width:calc(100% - 16px)}}
@media(prefers-reduced-motion:reduce){.class-lantern.pop{animation:none}.class-lantern{transition:none}}
/* MISS-TEACH-1: the gentle nudge for an idle child (a bouncing hand, never a penalty) and the "practise it later" reveal */
.fun-nudge,.kart-nudge{position:absolute;left:50%;bottom:112px;transform:translateX(-50%);z-index:7;display:flex;align-items:center;gap:10px;background:#fff8d9;border:4px solid #fff;border-radius:26px;padding:8px 18px;box-shadow:0 5px 0 #d8c08a;color:#5a3d00;font-size:20px;font-weight:bold;pointer-events:none;max-width:calc(100% - 24px)}
.fun-nudge[hidden],.kart-nudge[hidden]{display:none}
.fun-nudge-hand,.kart-nudge-hand{font-size:34px;animation:nudge-bounce .7s ease-in-out infinite alternate}
@keyframes nudge-bounce{to{transform:translateY(-10px)}}
@media (prefers-reduced-motion:reduce){.fun-nudge-hand,.kart-nudge-hand{animation:none}}
.fun-reveal.last{box-shadow:0 6px 0 #7fbf8a,0 0 0 10px #49b36b88}
/* PROJECTOR-SAFE-1: class totals on the projector, and the teacher-only switch for each child's progress */
.fun-class-count{background:#fff;font-size:18px}
.fun-class-count[hidden]{display:none}
.fun-kids-toggle{font-size:15px;background:#f3f0ff;border-color:#cfc6ff}
/* SIDEWAYS-1: a phone held sideways (844x390 and similar). The stage is the screen height (no 420px floor pushing the
   controls off the bottom); the prompt card moves to the left column under the streak, the status to the right column,
   so the answer signs in the middle stay clear; the controls shrink and the long hint goes. */
@media (orientation:landscape) and (max-height:500px){
.fun-stage{min-height:0}
.fun-hud{top:6px;left:8px;right:8px;gap:6px}
.fun-pill{font-size:14px;padding:4px 10px;border-width:2px;box-shadow:0 3px 0 #95b5d5}.fun-chip{font-size:13px}
.fun-progress{height:18px}.fun-progress>b{font-size:17px;top:-6px}
.fun-streak{top:46px;left:8px;font-size:15px}
.fun-status{top:46px;right:8px;font-size:13px;max-width:30%;padding:4px 10px}
.fun-prompt{top:90px;left:8px;transform:none;max-width:24%}
.fun-prompt .prompt{flex-direction:column;padding:4px 8px;gap:4px}
.fun-prompt .picture{font-size:40px}.fun-prompt .text-card{font-size:20px;max-width:100%}
.fun-prompt button{width:56px;min-width:56px;height:56px;font-size:24px}
.fun-btn{width:52px;height:52px;font-size:24px}.fun-pad{gap:8px}.fun-hint{display:none}
.fun-controls{left:8px;right:8px;bottom:8px}
.fun-recap{bottom:68px;font-size:18px}
.fun-reveal{top:44px;padding:4px 16px 8px}.fun-reveal-word{font-size:30px}
.fun-nudge,.kart-nudge{top:44px;bottom:auto;font-size:14px;padding:4px 12px;max-width:40%;border-width:2px}.fun-nudge-hand,.kart-nudge-hand{font-size:22px}
.fun-host{top:46px;right:8px}.fun-host button{min-height:36px;font-size:13px;padding:4px 10px}
.shout-room .fun-prompt{max-width:26%}.fun-prompt .shout-hanzi{font-size:36px}.fun-prompt .shout-say{font-size:12px}
.shout-quiet{top:46px;font-size:12px;max-width:40%}
.shout-room .fun-recap{top:auto;bottom:68px}
.shout-room .fun-status{max-width:30%}
}
/* SIDEWAYS-1: on an upright phone the nudge sits over the lower road, above the controls. */
@media (max-width:600px){.fun-nudge,.kart-nudge{bottom:92px;font-size:15px;padding:6px 12px}.fun-nudge-hand,.kart-nudge-hand{font-size:26px}}
.fun-controls[hidden]{display:none}
/* S6: in Stroke Sprint the word's recap sits under the top pills, never on Momo (it sat on the runner at the bottom). */
.fun-room.stroke-room .fun-recap{bottom:auto;top:104px}
@media (max-width:600px){.fun-room.stroke-room .fun-recap{top:216px}}
