@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fredoka:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#231831;--ink:#fff5de;--muted:#bdafc9;--orange:#ffac62;--purple:#c3a4f0}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:5px}button:disabled{cursor:default}.shell{max-width:1250px;padding:0 48px;margin:auto}header{height:103px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #49394f}.brand{font-family:Fredoka,ui-rounded,sans-serif;font-size:27px;font-weight:500;color:var(--ink);text-decoration:none;letter-spacing:-.8px}.brand>span:first-child{color:var(--orange);margin-right:10px}.brand-dot{color:var(--orange)}.header-right{display:flex;gap:24px;align-items:center}.season,.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px}.season{color:var(--muted)}.icon-button{border:1px solid #68546e;background:transparent;color:var(--ink);height:44px;min-width:44px;border-radius:50%;font-size:20px}.hero{display:grid;grid-template-columns:1fr 1fr;align-items:center;min-height:340px;gap:20px}.eyebrow{color:var(--orange);margin-bottom:19px;display:flex;align-items:center;gap:9px}.eyebrow:before{content:'';width:7px;height:7px;border-radius:50%;background:var(--orange)}h1,h2,h3{font-family:Fredoka,ui-rounded,system-ui,sans-serif;font-weight:500}h1{font-size:clamp(40px,5.5vw,66px);line-height:1.04;letter-spacing:-1.5px;margin:0 0 20px}h1 em{font-style:normal;color:var(--orange)}.hero p{font-size:15px;line-height:1.8;color:var(--muted);margin:0;max-width:375px}.hero-art{width:100%;height:310px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:13px 0 20px}.section-heading h2{font-size:23px;margin:0}.section-heading>span{font-size:12px;color:var(--muted)}.games{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.game-card{overflow:hidden;border:1px solid #59445f;border-radius:20px;background:#302239;transition:transform .2s}.game-card:hover{transform:translateY(-5px)}.card-art{height:167px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.card-art svg{width:100%;height:100%}.card-number{position:absolute;top:13px;left:15px;font-size:10px;letter-spacing:1px;color:#3b293c;opacity:.65}.card-body{padding:20px}.card-body h3{font-size:23px;margin:0 0 7px}.card-body p{font-size:12px;color:var(--muted);line-height:1.6;min-height:39px;margin:0 0 18px}.tag{font-size:9px;letter-spacing:1.5px;text-transform:uppercase;color:#d6c3e4;display:block;margin-bottom:10px}.play-button{border:0;border-radius:10px;background:var(--card-color,var(--orange));color:#2b2032;min-height:44px;padding:10px 16px;font-weight:700;width:100%;display:flex;justify-content:space-between;align-items:center}.progress-strip{margin:27px 0 35px;border:1px dashed #68506d;border-radius:14px;padding:17px 22px;display:flex;justify-content:space-between;align-items:center;gap:16px;font-size:12px;color:var(--muted)}.progress-strip strong{color:var(--ink);font-weight:500}.stars{font-size:22px;letter-spacing:5px;color:#695373}.stars .earned{color:var(--orange)}footer{border-top:1px solid #49394f;display:flex;justify-content:space-between;padding:24px 0;font-size:10px;color:#a998b5}.orange{color:var(--orange)}.game-top{display:flex;align-items:center;justify-content:space-between;margin:30px 0 15px;gap:12px}.plain{background:#392943;border:1px solid #695073;border-radius:12px;color:var(--ink);padding:12px 18px;min-height:44px}.game-intro{text-align:center}.game-intro h1{font-size:39px;margin:15px 0 10px}.game-intro p{color:var(--muted);margin:0 0 20px;line-height:1.6}.status{color:var(--orange);text-align:center;min-height:28px;font-size:14px;margin:15px 0}.word-layout{display:flex;gap:35px;justify-content:center;align-items:center}.word-grid{display:grid;grid-template-columns:repeat(9,1fr);width:min(65vw,495px);gap:5px;touch-action:none}.letter{aspect-ratio:1;border:1px solid #594061;background:#382841;border-radius:8px;color:var(--ink);font-weight:700;font-size:20px;padding:0}.letter.selected{background:#926cb1}.letter.found{background:#738d61;color:white}.word-list{display:flex;flex-direction:column;gap:12px;min-width:135px}.word-list span{background:#392943;padding:12px 18px;border-radius:9px;font-size:13px;letter-spacing:1px}.word-list span.done{text-decoration:line-through;color:#c5dea8}.pairs-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;max-width:630px;margin:auto}.pair{height:105px;border:2px solid #6c5278;border-radius:16px;background:linear-gradient(140deg,#4c355d,#382641);font-size:36px;color:#c5a5e8}.pair.revealed{background:#f4d9ac}.pair.matched{background:#bad5a3;border-color:#bad5a3}.scene-wrap{max-width:880px;margin:auto;position:relative;background:#392e51;border-radius:20px;overflow:hidden}.scene-wrap svg{width:100%;display:block}.object{cursor:pointer;outline:none}.object:focus-visible{filter:drop-shadow(0 0 7px white)}.object.found{opacity:.3;pointer-events:none}.object.found .marker{display:block}.find-list{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:18px 0}.find-list span{padding:10px 15px;border-radius:20px;background:#3e2c49;font-size:13px}.find-list .done{color:#c5dea8;text-decoration:line-through}.canvas-wrap{max-width:920px;margin:auto;position:relative}canvas{width:100%;border-radius:18px;display:block;touch-action:none;background:#342847}.controls{display:flex;justify-content:space-between;margin:14px auto;max-width:920px;gap:12px}.controls>div{display:flex;gap:12px}.control{min-width:78px;min-height:58px;font-size:23px;touch-action:none;user-select:none;-webkit-user-select:none}.jump{background:var(--orange);color:#2a2031;min-width:140px}.hud{font-size:14px;color:var(--orange)}dialog{background:#37263f;color:var(--ink);border:1px solid #82618d;border-radius:24px;padding:36px;max-width:460px;width:90%;text-align:center;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#140d20cc}.close{position:absolute;right:12px;top:12px}dialog h2{font-size:32px}dialog p{color:#d4c5de;line-height:1.7}.modal-icon{font-size:55px;margin:12px}.install{font-size:12px}.reduced{animation:none}@media(max-width:850px){.shell{padding:0 25px}.games{grid-template-columns:repeat(2,1fr)}.hero{min-height:315px}.hero-art{height:270px}.card-art{height:170px}.season{display:none}.hero h1{font-size:48px}.word-grid{width:min(65vw,450px)}.letter{font-size:17px}}@media(max-width:520px){.shell{padding:0 18px}header{height:80px}.brand{font-size:23px}.hero{grid-template-columns:1fr;gap:0;padding-top:30px}.hero-art{height:210px}.hero h1{font-size:45px}.hero p{font-size:14px}.games{gap:12px}.card-body{padding:14px}.card-body h3{font-size:20px}.card-art{height:140px}.card-body p{min-height:58px}.section-heading>span{font-size:10px}.progress-strip{padding:15px;font-size:11px}.word-layout{flex-direction:column;gap:18px}.word-grid{width:100%;gap:4px}.word-list{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:6px}.word-list span{padding:9px}.pair{height:80px}.game-intro h1{font-size:32px}.game-top .plain{padding:10px}.hud{font-size:12px}footer{font-size:9px}.stars{font-size:17px;letter-spacing:2px}}
main:has(canvas) .game-top{margin-top:16px;margin-bottom:8px}main:has(canvas) .game-intro .eyebrow{display:none}main:has(canvas) .game-intro h1{font-size:30px;margin:8px 0}main:has(canvas) .game-intro p{font-size:13px;margin-bottom:12px}main:has(canvas) .canvas-wrap,main:has(canvas) .controls{max-width:min(920px,calc((100dvh - 295px)*2.2857))}@media(max-height:600px){main:has(canvas) .game-intro{display:none}body:has(canvas) header{height:60px}main:has(canvas) .canvas-wrap,main:has(canvas) .controls{max-width:min(920px,calc((100dvh - 205px)*2.2857))}}

/* Original thinkBIG logo from dwls.pl, displayed without altering the artwork. */
.brand{display:flex;align-items:center;gap:20px}.school-logo{display:block;width:160px;height:auto;background:#fff;padding:8px 10px;border-radius:10px}.brand .brand-game{color:var(--ink);margin:0}.brand-game{padding-left:20px;border-left:1px solid #68546e}footer a{color:var(--muted);text-decoration:none}footer a:hover{text-decoration:underline}@media(max-width:850px){.brand{gap:14px}.brand-game{padding-left:14px;font-size:22px}.school-logo{width:145px}}@media(max-width:520px){.brand{gap:10px}.school-logo{width:120px;padding:6px 8px}.brand-game{padding-left:10px;font-size:17px}}@media(max-width:360px){.brand-game{display:none}}@media(max-height:600px){body:has(canvas) .school-logo{width:108px;padding:4px 7px}}
/* More little adventures */
.games{row-gap:24px}.stars{display:flex;flex-wrap:wrap;max-width:250px}.catch-field{height:min(48dvh,380px);min-height:220px;max-width:740px;margin:auto;position:relative;overflow:hidden;border-radius:20px;background:linear-gradient(#3b2b50,#725777);touch-action:none;border-bottom:10px solid #a5b582}.catch-moon{position:absolute;right:9%;top:3%;font-size:75px;color:#ffe8b1}.drop{position:absolute;font-size:34px;transform:translate(-50%,-50%);user-select:none;pointer-events:none}#basket{position:absolute;top:81%;left:50%;font-size:54px;transform:translateX(-50%);user-select:none}#catch-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#21192b70}#catch-overlay[hidden]{display:none}.catch-controls{max-width:740px}.jigsaw-layout{display:grid;grid-template-columns:1fr 1fr;gap:32px;max-width:860px;margin:25px auto}.puzzle-board{display:grid;grid-template-columns:repeat(3,1fr);background:linear-gradient(#4b355e,#69547e);border:3px solid #a995b9;border-radius:8px;aspect-ratio:1;overflow:visible;margin:18px 18px 24px}.puzzle-slot{aspect-ratio:1;position:relative;border:1px dashed #aa93b5;background:transparent;color:#ad96bc;font-size:16px;padding:0;overflow:visible}.puzzle-slot svg{position:absolute;width:130%;height:130%;left:-15%;top:-15%;max-width:none;pointer-events:none}.puzzle-slot.filled{border-color:transparent;z-index:1}.piece-tray{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-content:start;padding:10px;background:#302339;border-radius:16px}.puzzle-piece{padding:0;aspect-ratio:1;border:2px solid transparent;border-radius:12px;background:#45334f}.puzzle-piece svg{width:100%;height:100%;display:block}.piece-selected{border-color:#ffce83;background:#71517d}.puzzle-hint{width:150px;border-radius:10px;display:block;margin:12px 0}.puzzle-hint[hidden]{display:none}.music-toolbar{display:flex;justify-content:center;gap:12px;margin:20px}.ghost-keys{display:flex;justify-content:center;gap:14px;max-width:900px;margin:30px auto}.ghost-key{flex:1;min-width:0;background:#392942;border:2px solid #604569;border-radius:22px;padding:15px 8px;color:var(--ghost-color);transition:background .12s,transform .12s,box-shadow .12s}.ghost-key svg{width:100%;max-height:190px}.ghost-key strong{font-size:12px;color:var(--ink)}.ghost-key:disabled{opacity:.85}.ghost-key.singing{background:#71507b;transform:translateY(-9px);box-shadow:0 0 25px var(--ghost-color);border-color:#fff5d7;opacity:1}.music-tip{text-align:center;color:var(--muted);font-size:13px}.quest-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:22px;max-width:1050px;margin:auto}.quest-map{position:relative;aspect-ratio:20/14;background:#718555;border:5px solid #ab9872;border-radius:8px;overflow:hidden}.quest-tiles{display:grid;grid-template-columns:repeat(20,1fr);height:100%;grid-template-rows:repeat(14,1fr)}.quest-tile{display:flex;align-items:center;justify-content:center;font-family:monospace;font-size:clamp(14px,2.5vw,30px);line-height:1}.tree{background:#394e43;color:#8fba70;text-shadow:1px 2px #23382c}.water{background:#536c96;color:#9cb6cb}.bridge{background:#a7835a;color:#dfbd84}.grass{background:#778b5d;color:#b4c47f}.quest-item,#explorer{position:absolute;width:5%;height:calc(100% / 14);display:flex;align-items:center;justify-content:center;font-size:clamp(12px,2.3vw,27px);line-height:1;z-index:2}.quest-item[hidden]{display:none}#explorer{z-index:3;filter:drop-shadow(0 2px 2px #1d2838);transition:top .08s,left .08s}.quest-sidebar h3{margin:0 0 14px;font-size:23px}.quest-list-item{font-size:13px;padding:10px 12px;margin-bottom:7px;background:#3c2b46;border-radius:8px;display:flex;justify-content:space-between;gap:5px}.quest-list-item.collected{color:#bddaa2;text-decoration:line-through}.dpad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:17px}.dpad .control{min-width:0;min-height:52px;padding:6px}.dpad #up{grid-column:2}.dpad #left{grid-column:1;grid-row:2}.dpad #down{grid-column:2;grid-row:2}.dpad #right{grid-column:3;grid-row:2}@media(max-width:850px){.quest-layout{grid-template-columns:1fr}.quest-map{max-width:660px;width:100%;margin:auto}.quest-sidebar{display:grid;grid-template-columns:1fr 1fr 180px;gap:7px}.quest-sidebar h3{grid-column:1 / 3}.quest-list-item{margin:0}.dpad{grid-column:3;grid-row:1 / 5;align-self:center;margin:0}.ghost-keys{gap:8px}.ghost-key{padding:8px 4px}.jigsaw-layout{gap:18px}.piece-tray{gap:5px;padding:5px}}@media(max-width:520px){.jigsaw-layout{grid-template-columns:1fr}.puzzle-board{max-width:290px;margin:12px auto 18px}.piece-tray{max-width:330px;margin:auto;width:100%}.ghost-keys{flex-wrap:wrap}.ghost-key{flex:0 0 28%;}.ghost-key svg{height:110px}.music-toolbar{margin:14px 0;gap:8px}.music-toolbar button{font-size:12px;padding:10px}.quest-sidebar{grid-template-columns:1fr 1fr}.quest-sidebar h3{grid-column:1 / 3}.dpad{grid-column:1 / 3;grid-row:auto;width:210px;justify-self:center}.stars{max-width:110px;font-size:16px}.progress-strip{gap:8px}}
main:is([data-game="catch"],[data-game="treasure"]) .game-top{margin-top:16px;margin-bottom:8px}main:is([data-game="catch"],[data-game="treasure"]) .game-intro .eyebrow{display:none}main:is([data-game="catch"],[data-game="treasure"]) .game-intro h1{font-size:30px;margin:8px 0}main:is([data-game="catch"],[data-game="treasure"]) .game-intro p{font-size:13px;margin-bottom:12px}@media(min-width:851px){.quest-layout{max-width:min(1050px,calc((100dvh - 290px)*1.42857 + 252px))}}@media(prefers-reduced-motion:reduce){.ghost-key,#explorer{transition:none}.ghost-key.singing{transform:none}}
.avatar-studio{display:grid;grid-template-columns:280px minmax(0,1fr);gap:34px;margin:28px 0 35px;padding:28px;border:1px solid #59445f;border-radius:24px;background:linear-gradient(120deg,#3d2b49,#2e2038)}.avatar-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse,#674b70 0%,#3b2947 60%,transparent 72%);border-radius:20px}.avatar-preview .eyebrow{font-size:9px;margin:0 0 5px}.avatar-stage{width:220px;max-width:100%}.bobble-avatar{display:block;width:100%;height:100%;overflow:visible}.bobble-head{transform-origin:90px 157px}.does-bobble .bobble-head{animation:head-bobble 3.6s ease-in-out infinite}@keyframes head-bobble{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg)}}.avatar-caption{font-size:12px;color:#dfc5e7;margin:12px 0}.avatar-studio h1{font-size:36px;letter-spacing:-.6px;margin:0 0 9px}.avatar-studio p{color:var(--muted);font-size:13px;line-height:1.6;margin:0 0 19px}.avatar-studio fieldset{border:0;padding:0;margin:0 0 16px;min-width:0}.avatar-studio legend{font-size:12px;font-weight:700;color:#f9dfb5;padding:0;margin:0 0 10px}.avatar-studio legend span{font-weight:400;color:var(--muted);font-size:10px;margin-left:8px}.face-choices{display:flex;gap:9px}.face-choice{flex:1;max-width:90px;min-width:0;border:2px solid #65516f;background:#44314f;color:var(--ink);border-radius:12px;padding:6px 5px}.face-choice img{width:100%;max-height:60px;display:block;object-fit:contain}.face-choice span{font-size:10px;display:block;margin-top:4px}.face-choice.chosen,.avatar-option.chosen{border-color:#ffbf78;background:#624457;box-shadow:0 0 0 1px #ffbf7833}.avatar-option-row{display:flex;align-items:flex-start;gap:12px;margin-bottom:9px}.avatar-option-row>span{font-size:11px;color:var(--muted);padding-top:13px;min-width:68px}.avatar-options{display:flex;flex-wrap:wrap;gap:6px}.avatar-option{border:1px solid #70577a;background:#392941;color:var(--ink);border-radius:9px;min-height:44px;padding:8px 10px;font-size:11px;display:inline-flex;align-items:center;gap:6px}.avatar-option span{font-size:16px}.avatar-option i{width:15px;height:15px;border-radius:50%;display:inline-block}.avatar-option:disabled{opacity:.35}.avatar-finish{display:flex;align-items:center;justify-content:space-between;gap:16px}.avatar-finish label{font-size:12px;color:#d8c4df;display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer}.avatar-finish input{width:20px;height:20px;accent-color:#ffb36d}.avatar-finish .play-button{width:150px;flex-shrink:0}.avatar-save-status{min-height:18px;font-size:10px;color:#bcd99e;margin-top:9px}.game-top-right{display:flex;align-items:center;gap:14px}.game-avatar{width:57px;height:65px;flex-shrink:0;overflow:visible}.game-avatar .bobble-avatar{height:78px;margin-top:-10px}.game-top:has(.game-avatar){min-height:65px}.game-top-right .plain{white-space:nowrap}#avatar-editor{align-self:center}@media(max-width:1050px){.avatar-studio{grid-template-columns:220px minmax(0,1fr);gap:24px;padding:22px}.avatar-stage{width:195px}}@media(max-width:850px){.avatar-studio{grid-template-columns:160px minmax(0,1fr);gap:18px;padding:20px}.avatar-stage{width:155px}.avatar-preview .eyebrow{font-size:8px;letter-spacing:1px}.avatar-caption{font-size:10px;text-align:center}.avatar-studio h1{font-size:29px}.avatar-option-row{display:block}.avatar-option-row>span{display:block;padding:0;margin:0 0 5px}.avatar-finish{flex-wrap:wrap}.avatar-finish .play-button{width:100%}}@media(max-width:600px){.avatar-studio{grid-template-columns:1fr;padding:18px}.avatar-preview{flex-direction:row;flex-wrap:wrap;gap:10px}.avatar-preview .eyebrow{width:100%;justify-content:center}.avatar-stage{width:120px}.avatar-caption{max-width:100px;font-size:12px}.avatar-studio h1{font-size:30px}.face-choices{gap:6px}.face-choice span{font-size:9px}.avatar-option{font-size:10px;padding:7px}.game-top-right{gap:6px}.game-avatar{width:42px;height:56px}.game-avatar .bobble-avatar{height:64px}.game-top{gap:6px}.game-top .plain{font-size:11px;padding:9px}.game-top .hud{font-size:11px}.avatar-finish{gap:5px}}@media(prefers-reduced-motion:reduce){.does-bobble .bobble-head{animation:none}}
.difficulty-label{display:flex;align-items:center;gap:9px;color:#dfc5e7;font-size:10px;letter-spacing:1.5px;font-weight:700}.difficulty-label select{color:var(--ink);background:#392943;border:1px solid #82658d;border-radius:11px;padding:11px 28px 11px 12px;min-height:44px;font:600 13px 'DM Sans',system-ui;cursor:pointer;max-width:170px}.difficulty-label select:focus-visible{outline:3px solid var(--orange);outline-offset:3px}.pairs-grid{grid-template-columns:repeat(var(--pair-cols,4),1fr);max-width:760px}.pairs-grid:has(.pair:nth-child(17)) .pair{height:82px}.puzzle-board,.piece-tray{grid-template-columns:repeat(var(--puzzle-cols,3),1fr)}.piece-tray{gap:4px}.puzzle-piece{min-height:44px}.word-grid{width:min(65vw,600px)}.letter{font-size:clamp(13px,2vw,20px)}@media(max-width:850px){.difficulty-label{gap:5px}.header-right{gap:12px}.difficulty-label select{font-size:12px;max-width:145px}.word-layout{align-items:flex-start}.word-list{min-width:100px}.word-list span{font-size:11px;padding:9px 12px}}@media(max-width:600px){.brand-game{display:none}.difficulty-label>span{display:none}.header-right{gap:8px}.difficulty-label select{max-width:135px}.pairs-grid{gap:6px}.pair,.pairs-grid:has(.pair:nth-child(17)) .pair{height:62px;font-size:27px}.word-layout{flex-direction:column;align-items:center}.word-grid{width:100%;gap:3px}.word-list{flex-direction:row;flex-wrap:wrap}.puzzle-board{max-width:100%;width:100%}.piece-tray{max-width:100%;gap:2px}.jigsaw-layout{gap:12px}.puzzle-piece{min-height:38px}}
@media(min-width:851px){.quest-list-item{padding:7px 10px;margin-bottom:5px}.quest-sidebar h3{margin-bottom:10px}.quest-sidebar .dpad{margin-top:10px}}
/* A haunted school crest, drifting mist and moonlit bats. */
.haunted-header{position:relative;isolation:isolate;gap:16px;border-bottom:1px solid #a76c474d;background:linear-gradient(110deg,#35203855,#201729 48%,#43304e77);border-radius:0 0 18px 18px}.header-atmosphere{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:-1}.header-atmosphere::before,.header-atmosphere::after{content:'';position:absolute;inset:-80% -40%;background:radial-gradient(ellipse at 20% 80%,#b094d64a,transparent 40%),radial-gradient(ellipse at 75% 35%,#e9ad6540,transparent 35%);filter:blur(16px);animation:haunted-mist 18s ease-in-out infinite alternate}.header-atmosphere::after{background:radial-gradient(ellipse at 55% 75%,#b6a0d348,transparent 45%);animation-duration:26s;animation-direction:alternate-reverse}.header-moon{position:absolute;right:26%;top:19px;width:53px;height:53px;border-radius:50%;background:#e6c987;opacity:.22;box-shadow:0 0 30px #f3cb7540}.header-moon::after{content:'';position:absolute;inset:-7px -7px 8px 14px;background:#32243f;border-radius:50%}.header-bat{position:absolute;width:34px;fill:#b498cc;opacity:.35;animation:bat-drift 15s ease-in-out infinite alternate}.bat-one{left:56%;top:22px}.bat-two{left:68%;top:62px;width:23px;animation-delay:-8s;animation-duration:21s}.header-spark{position:absolute;color:#efc991;opacity:.45;font-size:12px;animation:ghost-glimmer 7s ease-in-out infinite alternate}.spark-one{left:48%;top:64px}.spark-two{left:77%;top:18px;animation-delay:-3s}.haunted-header .brand,.haunted-header .header-right{position:relative;z-index:1}.haunted-header .brand-game{display:block;color:#ffc27b;font-size:34px;font-weight:600;letter-spacing:.1px;text-shadow:0 2px #181020,0 0 24px #fbac552b;border-left-color:#b77d595c}.haunted-header .difficulty-label select{background:#34243eed;border-color:#a27681}.haunted-header .header-right{padding-right:12px}.haunted-header .brand{padding-left:8px}@keyframes haunted-mist{from{transform:translate(-6%,3%) rotate(-4deg);opacity:.5}to{transform:translate(8%,-5%) rotate(5deg);opacity:1}}@keyframes bat-drift{0%{transform:translate(-16px,6px) rotate(-9deg)}50%{transform:translate(15px,-7px) rotate(6deg)}100%{transform:translate(48px,3px) rotate(-5deg)}}@keyframes ghost-glimmer{from{opacity:.18;transform:scale(.85)}to{opacity:.65;transform:scale(1.15)}}@media(max-width:850px){.haunted-header .brand-game{font-size:29px}.header-moon{right:28%}.bat-one{left:60%}}@media(max-width:600px){.haunted-header .brand{gap:10px;padding-left:3px}.haunted-header .brand-game{font-size:23px;padding-left:10px}.haunted-header .school-logo{width:100px;padding:7px}.haunted-header .header-right{padding-right:3px}.haunted-header .difficulty-label select{max-width:117px;font-size:11px;padding:10px 6px}.haunted-header{gap:8px}.header-bat{opacity:.2}.header-moon{right:23%}}@media(max-width:390px){.haunted-header .brand-game{font-size:20px;padding-left:8px}.haunted-header .school-logo{width:80px}.haunted-header .brand{gap:6px}.haunted-header .difficulty-label select{max-width:105px}}@media(prefers-reduced-motion:reduce){.header-atmosphere::before,.header-atmosphere::after,.header-bat,.header-spark{animation:none}}
/* Illustrated hidden objects: transparent targets remain invisible until found. */
main[data-game="hidden"] .game-top{margin-top:16px;margin-bottom:8px}main[data-game="hidden"] .game-intro .eyebrow{display:none}main[data-game="hidden"] .game-intro h1{font-size:30px;margin:8px 0}main[data-game="hidden"] .game-intro p{font-size:13px;margin-bottom:12px}.manor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px auto;max-width:1100px}.zoom-buttons{display:flex;align-items:center;gap:8px}.zoom-buttons .plain{padding:9px 15px;min-width:44px}.zoom-buttons span{font-size:12px;min-width:43px;text-align:center;color:var(--muted)}.manor-toolbar button:disabled{opacity:.4}.manor-layout{display:grid;grid-template-columns:minmax(0,1fr) 177px;gap:18px;max-width:1100px;margin:auto;align-items:start}.hunt-viewport{overflow:auto;max-height:65dvh;overscroll-behavior:contain;border:3px solid #b3a087;border-radius:16px;background:#fff6e3;scrollbar-color:#ac9173 #e6d9c3;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.hunt-viewport:focus-visible{outline:3px solid var(--orange);outline-offset:3px}.manor-picture{position:relative;width:100%;line-height:0;isolation:isolate}.manor-art{display:block;width:100%;height:auto;max-width:none;user-select:none;-webkit-user-drag:none}.manor-hotspot{position:absolute;transform:translate(-50%,-50%);padding:0;min-width:44px;min-height:44px;background:transparent;border:2px solid transparent;border-radius:45%;color:transparent;cursor:default;touch-action:manipulation}.manor-hotspot span{display:none}.manor-hotspot:focus-visible{outline:3px dashed #8c5cbd;outline-offset:3px}.manor-hotspot.discovered{border-color:#497a43;background:#8dc06c30;color:#23431e;cursor:default;pointer-events:none}.manor-hotspot.discovered span{display:grid;place-items:center;position:absolute;right:-8px;top:-8px;width:21px;height:21px;border-radius:50%;background:#e5f4d5;border:2px solid #497a43;font-size:13px;font-weight:700;line-height:1}.manor-hotspot.hinted{border:3px dashed #ac5d22;background:#f4b94f55;box-shadow:0 0 0 7px #ffca5350}.manor-checklist{padding:13px;background:#33243d;border:1px solid #59455f;border-radius:14px}.manor-checklist h3{margin:0 0 10px;font-size:19px}.manor-clue{display:grid;grid-template-columns:40px 1fr 14px;gap:8px;align-items:center;padding:5px 0;border-top:1px solid #614a692e;color:var(--ink)}.manor-clue svg{display:block;width:40px;height:42px;background:#fff6e3;border:1px solid #ccb89b;border-radius:7px}.manor-clue span{font-size:11px;line-height:1.25}.manor-clue b{font-size:13px;color:#a993b6}.manor-clue.collected{opacity:.6}.manor-clue.collected span{text-decoration:line-through;color:#bcdb9e}.manor-clue.collected b{color:#bcdb9e}@media(max-width:850px){.manor-layout{grid-template-columns:1fr}.manor-checklist{display:grid;grid-template-columns:repeat(3,1fr);gap:0 16px}.manor-checklist h3{grid-column:1/-1}.hunt-viewport{max-height:65dvh}.manor-clue{grid-template-columns:40px 1fr 14px}}@media(max-width:520px){.manor-toolbar{gap:6px}.zoom-buttons{gap:4px}.zoom-buttons .plain{padding:8px 10px;font-size:12px}.manor-toolbar>#hunt-hint{font-size:12px;padding:8px 12px}.manor-checklist{grid-template-columns:repeat(2,1fr)}.manor-clue span{font-size:12px}}
/* Costume atlas: five columns and three rows, cropped in the browser. */
.costume-grid{max-width:820px}.costume-grid .pair,.costume-grid:has(.pair:nth-child(17)) .pair{height:auto;aspect-ratio:1;padding:0;overflow:hidden;position:relative;min-height:44px;transition:border-color .15s}.costume-sprite{display:block;width:100%;height:100%;aspect-ratio:1;background-color:#fffcf0}.costume-grid .pair.revealed{background:#fffcf0}.costume-grid .pair.matched{border:3px solid #a8d284;box-shadow:0 0 0 2px #a8d28444}.costume-grid .pair.matched:after{content:'✓';position:absolute;bottom:3px;right:3px;width:22px;height:22px;background:#466438;color:#fff;border-radius:50%;font-size:15px;line-height:22px}.costume-card-preview{display:flex;align-items:center;justify-content:center;height:100%;padding:20px 12px;background:#ead8ad;gap:8px}.costume-card-preview .costume-sprite{width:31%;height:auto;border-radius:12px;border:3px solid #fff4d6;box-shadow:0 5px 0 #ac896a55}.costume-card-preview .costume-sprite:first-child{transform:rotate(-8deg)}.costume-card-preview .costume-sprite:last-child{transform:rotate(8deg)}main[data-game="pairs"] .game-intro h1{font-size:32px;margin:12px 0}main[data-game="pairs"] .game-intro .eyebrow{display:none}main[data-game="pairs"] .game-intro p{margin-bottom:18px}
[hidden]{display:none!important}.loading-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;background:radial-gradient(ellipse at 50% 35%,#483053 0,#231831 65%)}.loading-screen h1{font-size:clamp(28px,5vw,46px);margin:14px 0}.loading-screen .eyebrow{margin:20px 0 0}.loading-screen p[role=status]{max-width:360px;min-height:48px;color:#dbcce3;font-size:16px;line-height:1.5}.loading-pumpkin{font-size:72px;animation:loading-bob 1.8s ease-in-out infinite}.loading-screen progress{width:min(320px,85vw);height:12px;overflow:hidden;border:0;border-radius:20px;background:#574061;accent-color:#f4b56d;margin:5px 0 24px}.loading-screen progress::-webkit-progress-bar{background:#574061;border-radius:20px}.loading-screen progress::-webkit-progress-value{background:#f4b56d;border-radius:20px;transition:width .2s}.loading-screen progress::-moz-progress-bar{background:#f4b56d;border-radius:20px}.loading-screen button{min-height:44px}@keyframes loading-bob{50%{transform:translateY(-10px) rotate(4deg)}}@media(prefers-reduced-motion:reduce){.loading-pumpkin{animation:none}}

/* Seasonal wordmark: the letterforms and central bulb carry the theme. */
.logo-seasonal{display:block;flex-shrink:0;margin:0!important;border-radius:10px;overflow:hidden;background:transparent}.logo-seasonal .school-logo{width:220px;height:auto;padding:0;background:transparent;border-radius:0;filter:none;mix-blend-mode:normal}@media(max-width:850px){.logo-seasonal .school-logo{width:180px}}@media(max-width:600px){.logo-seasonal .school-logo{width:155px}.haunted-header .brand-game{display:none}}@media(max-height:600px){body:has(canvas) .logo-seasonal .school-logo{width:155px;padding:0}}
.game-time{display:flex;flex-direction:column;align-items:center;min-width:86px;color:#f7c985}.game-time>span{font-size:10px;text-transform:uppercase;letter-spacing:1.3px}.game-time strong{font-size:21px;font-variant-numeric:tabular-nums;white-space:nowrap}.best-time{position:absolute;right:12px;bottom:12px;z-index:1;display:flex;flex-direction:column;gap:3px;padding:9px 12px;border:1px solid #dcb78966;border-radius:12px;background:#231831ed;color:#ffdfa8;box-shadow:0 3px 12px #19102040;pointer-events:none}.best-time span{font-size:9px;letter-spacing:1px}.best-time strong{font-size:23px;line-height:1.1;font-variant-numeric:tabular-nums}.reset-times{text-align:center;margin:35px 0 10px;padding-top:24px;border-top:1px solid #68546e55}.reset-times p{color:var(--muted);font-size:13px}.reset-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:24px}.reset-actions button{min-height:44px}.time-result strong{color:#ffd69a;font-variant-numeric:tabular-nums}@media(max-width:600px){.game-top{flex-wrap:wrap;gap:10px}.game-time{min-width:72px}.game-time strong{font-size:18px}.game-top-right{margin-left:auto}.game-top .hud{font-size:12px}}
.game-high-score strong{font-size:17px}.game-high-score{min-width:110px}#catch-home{margin:12px auto 0;display:block}

.word-grid,.letter{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.letter{touch-action:none}.letter.selected,.letter.found.selected{background:#b18acb;color:#fff;box-shadow:inset 0 0 0 2px #ebd6ff}

/* Keep the selected bobble-head attached to the player as the camera scrolls. */
.dash-stage{overflow:hidden;border-radius:18px}.dash-player{position:absolute;z-index:1;width:5%;aspect-ratio:180/250;transform:translate(-50%,-94.6%);pointer-events:none;user-select:none;-webkit-user-select:none}
@media(min-width:601px){.avatar-studio:has(.avatar-options) .avatar-preview{position:sticky;top:18px;align-self:start;padding:18px 0}}
/* Moonlight Quest: an original storybook overworld. */
.moon-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:22px;align-items:start}.moon-main{min-width:0}.moon-location{display:flex;justify-content:space-between;align-items:center;padding:13px 17px;background:#392d49;border:1px solid #6b557a;border-bottom:0;border-radius:17px 17px 0 0;font-size:13px}.moon-location>span:first-child{font-family:Fredoka,sans-serif;font-size:20px;color:#f5d8a3}#moon-spell{font-size:11px;color:#d6bced}.moon-scene{position:relative;aspect-ratio:15/11;overflow:hidden;background:#48614e;border:3px solid #796584;border-radius:0 0 17px 17px;isolation:isolate}.moon-scene[data-theme="cave"],.moon-scene[data-theme="tower"]{background:#484158}.moon-scene[data-theme="ruins"]{background:#66626b}.moon-scene[data-theme="marsh"]{background:#405d5e}#moon-terrain{position:absolute;inset:0;display:grid;grid-template-columns:repeat(15,1fr);grid-template-rows:repeat(11,1fr)}.moon-tile{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;background-image:radial-gradient(ellipse at 25% 70%,#b9d59d24 0 6%,transparent 8%),radial-gradient(ellipse at 72% 35%,#182d331f 0 8%,transparent 10%);box-shadow:inset 0 0 9px #16253118}.moon-tile svg{width:115%;height:130%;position:absolute;bottom:0}.moon-tile.wall{background-color:#303e47;box-shadow:inset 0 3px #ffffff0b,inset 3px 0 #ffffff07,inset 0 -4px #0003}.moon-tile.water{background-color:#274b69;background-image:repeating-linear-gradient(0deg,transparent 0 9px,#78b6c036 10px 12px,transparent 13px 18px);box-shadow:inset 0 2px 5px #132c4c80}.moon-tile.bridge{background:repeating-linear-gradient(0deg,#a78059 0 6px,#604c44 7px 9px);border-inline:3px solid #c7a074}.moon-tile.door{background:#ab93622b;color:#ffe9a0;text-shadow:0 0 12px #ffef92;font-size:24px}.moon-tile.pillar{background:#93909d;color:#d7cedc;font-size:32px;border:3px solid #4c4759;border-radius:4px;box-shadow:3px 4px #2225}.moon-object{position:absolute;width:6.6667%;height:9.0909%;display:flex;align-items:center;justify-content:center;font-size:clamp(15px,2.5vw,29px);line-height:1;filter:drop-shadow(0 4px 2px #16203170)}.moon-object svg{width:105%;height:105%}.moon-object.chest{color:#efc36d;background:linear-gradient(#d5a05e 0 40%,#70473a 41% 48%,#ae7548 49%);border:3px solid #4d3440;border-radius:6px;width:5.5%;height:6.5%;margin:.7%;font-size:18px;box-shadow:inset 0 0 0 2px #e3b96b}.moon-object.chest.open{background:#453c4b;color:#d0ddb1;box-shadow:none}.moon-object.rune{background:#79737b;border:2px solid #c1b1b6;border-radius:5px;color:#f6dbaa;font-family:serif;text-shadow:0 0 5px #ffc}.moon-object.rune.lit{background:#8b659c;box-shadow:0 0 17px #debcff}.moon-object.switch{color:#ffe38b;background:#504c46;border:2px solid #b99b59;border-radius:50%;transform:scale(.75)}.moon-object.stone{color:#b2afa5;text-shadow:2px 2px #535765;font-size:38px}.moon-object.flower{color:#f7b7d9;text-shadow:0 0 10px #faa;font-size:29px}.moon-object.shrine{background:#596b73;border:2px solid #ccb3db;border-radius:50%;box-shadow:0 0 20px #e3d3ff60}.moon-object.stunned{color:#f3d37e;text-shadow:0 0 14px #fe9}#moon-player{position:absolute;width:7.2%;aspect-ratio:180/250;transform:translate(-50%,-92%);z-index:4;pointer-events:none;filter:drop-shadow(0 3px 2px #17203588)}#moon-ring{position:absolute;width:40%;aspect-ratio:1;border:3px solid #eee1ff;border-radius:50%;transform:translate(-50%,-50%);background:#d6baff18;box-shadow:0 0 18px #e1c3ff;pointer-events:none;z-index:3}.moon-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0}.moon-controls .dpad{margin:0;gap:5px}.moon-controls .control{min-width:52px;min-height:48px;padding:8px}.moon-action{width:165px;min-height:70px;display:flex;flex-direction:column;justify-content:center;gap:6px;background:#d3b8ef;font-size:19px}.moon-action small{font-size:10px;font-weight:500}.moon-message{padding:13px 16px;border-left:3px solid #d8b577;background:#36293f;color:#eedbbb;font-size:13px;line-height:1.6;min-height:68px;margin:0}.moon-sidebar{background:#302539;border:1px solid #66516e;border-radius:17px;padding:16px}.moon-sidebar h3{margin:0 0 12px;font-size:22px}.moon-sidebar p{font-size:12px;line-height:1.6;color:#cbbdd6}.moon-sidebar .plain{font-size:12px;width:100%;margin-top:10px}.moon-sidebar details{margin:15px 0;font-size:12px}.moon-sidebar summary{cursor:pointer;min-height:36px;color:#f0d5a6}.moon-sidebar summary span{float:right}#moon-minimap{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}#moon-minimap span{padding:9px 4px;text-align:center;font-size:9px;line-height:1.4;color:#97899f;border:1px solid #59475f;border-radius:4px;min-height:46px;display:grid;align-content:center}#moon-minimap .visited{background:#4b5250;color:#d4dbc4}#moon-minimap .here{background:#d3b985;color:#302539;border-color:#ffedc2}#moon-satchel>div{display:flex;gap:8px;align-items:center;padding:7px 0;border-bottom:1px solid #4b3b54;color:#bcb0c6}#moon-satchel b{margin-left:auto}#moon-satchel .collected{color:#cbe5ad}#moon-satchel span{font-size:19px}@media(max-width:950px){.moon-layout{grid-template-columns:minmax(0,1fr) 210px;gap:12px}.moon-sidebar{padding:12px}}@media(max-width:700px){.moon-layout{grid-template-columns:1fr}.moon-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px}.moon-sidebar h3,.moon-sidebar #moon-minimap,.moon-sidebar #moon-goal{grid-column:1/-1}.moon-sidebar details{margin:5px 0}.moon-location>span:first-child{font-size:18px}.moon-object{font-size:23px}.moon-controls .control{min-height:48px}#moon-minimap span{min-height:35px}.moon-scene{max-height:none}}
main[data-game="treasure"] .game-top{margin-top:14px;margin-bottom:6px}main[data-game="treasure"] .game-intro .eyebrow{display:none}main[data-game="treasure"] .game-intro h1{font-size:29px;margin:8px 0}main[data-game="treasure"] .game-intro p{font-size:12px;margin:0 0 12px}.moon-tile.path{background-color:#b09d6a24;background-image:radial-gradient(ellipse at 65% 40%,#e9d5a332 0 12%,transparent 14%)}
@media(min-width:701px){.moon-scene{width:min(100%,max(300px,calc((100dvh - 435px)*1.3636)));margin:auto}.moon-location{font-size:11px}.moon-message{min-height:55px;font-size:12px;padding:10px}.moon-controls{margin:10px 0}.moon-sidebar{font-size:11px}.moon-sidebar h3{font-size:19px}#moon-satchel>div{padding:5px 0}}
.moon-tile.house svg{position:absolute;width:170%;height:180%;bottom:0;z-index:1;filter:drop-shadow(3px 5px 2px #18243380)}
@media(min-width:701px){.moon-main{display:flex;flex-direction:column;align-items:center}.moon-location,.moon-controls,.moon-message{width:min(100%,max(300px,calc((100dvh - 435px)*1.3636)))}.moon-location{padding:10px}.moon-location>span:first-child{font-size:17px}}
.arcade-stage{position:relative;margin:auto;overflow:hidden;border-radius:18px;border:1px solid #8a6d95;touch-action:none;user-select:none;-webkit-user-select:none}.arcade-stage canvas{border-radius:0}.breaker-stage{width:min(100%,780px,calc(max(210px,100dvh - 335px)*1.8))}.runner-stage{width:min(100%,960px,calc(max(200px,100dvh - 365px)*2.2857))}.arcade-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#21182e70;z-index:5;backdrop-filter:blur(2px)}.arcade-overlay[hidden]{display:none}.arcade-overlay .play-button{width:auto;min-width:170px;min-height:54px;padding:15px 24px;background:#f6ca8d}.arcade-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:680px;margin:13px auto}.arcade-controls .control{min-height:52px;min-width:84px}.runner-controls{max-width:780px}.runner-controls .play-button{width:190px;min-height:58px;justify-content:center;background:#b4dbc9;font-size:20px;touch-action:none;user-select:none;-webkit-user-select:none}.runner-avatar{position:absolute;width:5%;aspect-ratio:180/250;transform:translate(-50%,-94.6%);pointer-events:none;z-index:2}.run-progress{height:7px;background:#483452;border-radius:9px;overflow:hidden;max-width:780px;margin:13px auto}.run-progress span{display:block;height:100%;background:#b4dbc9;width:0}main[data-game="breaker"] #status,main[data-game="runner"] #status{margin:6px 0;min-height:20px}@media(max-width:520px){.arcade-controls .control{min-width:65px}.runner-controls .play-button{width:160px}.arcade-overlay .play-button{min-width:150px;min-height:48px}}
.school-studio{grid-template-columns:230px minmax(0,1fr);align-items:start}.school-player{text-align:center}.school-player .avatar-stage{width:170px}.school-player .avatar-preview{padding:10px}.school-player #edit-avatar{font-size:12px;width:100%;margin-top:10px}.school-player .avatar-caption{font-size:17px;color:#fce3b5;margin:6px 0}.school-sync{font-size:10px!important;line-height:1.5!important;color:#b9cba9!important;margin:10px 0!important}.choose-person{font-size:100px;min-height:210px;display:grid;place-items:center}.school-studio #avatar-editor{grid-column:1/-1}.school-studio #avatar-editor:empty{display:none}.school-studio:has(.avatar-options) .avatar-preview{position:static}.student-selector{grid-column:1/-1;border-top:1px solid #64496e;padding-top:16px}.student-selector h3{font-size:21px;margin:0 0 12px}.student-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:9px}.student-choice{background:#3b2b45;border:2px solid #685276;border-radius:12px;color:#eee1f4;min-height:115px;padding:8px 4px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:6px}.student-choice img{width:55px;height:55px;object-fit:cover;border-radius:50%;background:#65486f}.student-choice span{font-size:11px;line-height:1.3}.student-choice.chosen{border-color:#ffcf8f;background:#614359}.student-selector #school-status{font-size:11px;margin:12px 0 0}.school-studio #overall-board h2{font-size:27px;margin:8px 0 15px}.school-studio .eyebrow{font-size:9px;margin-bottom:8px}.school-podium{display:grid;grid-template-columns:1fr 1fr;gap:10px;text-align:center;max-width:530px;margin:auto}.podium-place{background:#33263f;border:1px solid #695272;border-radius:16px;padding:10px;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}.podium-place.place-1{grid-column:1/-1;background:radial-gradient(ellipse at top,#725574,#3e2c49);border-color:#caad72}.podium-avatar{width:65px;height:88px}.place-1 .podium-avatar{width:95px;height:130px}.podium-place strong{font-size:14px;overflow-wrap:anywhere}.place-1 strong{font-size:20px;color:#ffe5af}.podium-place>span:last-child{font-size:11px;color:#d6c4de}.podium-medal{font-size:11px;color:#eed29d}.is-you{box-shadow:inset 0 0 0 2px #c4deab}.leaderboard-empty{border:1px dashed #785e84;padding:30px 20px;border-radius:16px;font-size:14px!important;color:#d1c1de;text-align:center}.ranking-details{margin-top:15px;font-size:11px;color:#d5c4df}.ranking-details summary{cursor:pointer;min-height:35px;line-height:1.5}.ranking-details p{font-size:11px}.ranking-details ol{padding-left:22px}.ranking-details li{padding:8px 0;border-top:1px solid #594460}.ranking-details li strong{float:right;margin-left:12px}.result-leaderboard{margin:18px 0 22px;border-top:1px solid #72567d;padding-top:10px}.result-leaderboard h3{font-size:19px}.result-leaderboard .podium-avatar{width:50px;height:67px}.result-leaderboard .place-1 .podium-avatar{width:75px;height:100px}dialog:has(.result-leaderboard){max-width:500px;max-height:90dvh;overflow:auto}.result-leaderboard .podium-place strong{font-size:12px}.result-leaderboard .place-1 strong{font-size:17px}@media(max-width:850px){.school-studio{grid-template-columns:150px minmax(0,1fr);gap:18px}.school-player .avatar-stage{width:140px}.school-player .avatar-caption{font-size:14px}.school-studio #overall-board h2{font-size:22px}}@media(max-width:600px){.school-studio{grid-template-columns:110px minmax(0,1fr);gap:12px;padding:14px}.school-player .avatar-stage{width:105px}.school-player .avatar-preview{padding:0;display:block}.school-player .avatar-caption{display:block}.school-player #edit-avatar{font-size:10px;padding:8px}.school-studio #overall-board h2{font-size:19px}.place-1 .podium-avatar{width:72px;height:100px}.podium-avatar{width:47px;height:66px}.podium-place{padding:7px;gap:3px}.podium-place strong{font-size:10px}.place-1 strong{font-size:15px}.podium-medal{font-size:9px}.school-podium{gap:6px}.choose-person{font-size:70px;min-height:160px}.student-choices{grid-template-columns:repeat(3,1fr)}}
.game-person{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:65px}.game-player-name{font-size:10px;color:#f4d9aa;white-space:nowrap}.game-person .game-avatar{margin:auto}.school-studio #edit-avatar:disabled{opacity:.5}
/* One-screen, touch-friendly wardrobe. */
body.customising-avatar{overflow:hidden}#avatar-customiser{box-sizing:border-box;width:min(980px,calc(100vw - 24px));height:min(700px,calc(100dvh - 24px));max-width:none;max-height:none;margin:auto;padding:22px;border:1px solid #927096;border-radius:26px;background:radial-gradient(ellipse at top left,#51365e,#24182f 75%);color:#f9edff;overflow:hidden}#avatar-customiser[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:18px}#avatar-customiser::backdrop{background:#10091dd9;backdrop-filter:blur(8px)}.wardrobe-header,.wardrobe-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.wardrobe-header h2{margin:4px 0 0;font-size:clamp(20px,3vw,30px)}.wardrobe-header .eyebrow{font-size:10px;margin:0}.wardrobe-header button{min-width:44px;min-height:44px}.wardrobe-content{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.4fr);gap:22px;min-height:0}.wardrobe-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;background:radial-gradient(ellipse,#785a7b66,transparent 72%);border:1px solid #88689155;border-radius:22px;padding:15px}#wardrobe-avatar{height:calc(100% - 45px);max-height:390px;max-width:100%;aspect-ratio:180/250;min-height:0}.wardrobe-preview label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:14px}.wardrobe-preview input{width:22px;height:22px;accent-color:#ffca87}.wardrobe-choices{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:0;gap:18px}.wardrobe-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;background:#20152b;padding:5px;border-radius:14px}.wardrobe-tabs button{border:0;border-radius:10px;background:transparent;color:#dbc9e5;min-height:48px;font:inherit;font-size:12px;padding:6px}.wardrobe-tabs button[aria-selected=true]{background:#ffcf91;color:#302138;font-weight:700}#wardrobe-panel{min-height:0}.wardrobe-navigation{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.wardrobe-navigation span{font-size:12px;color:#cbb8d6}.wardrobe-navigation button{min-width:48px;min-height:44px}.wardrobe-carousel{position:relative;display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#aa819a #302139;padding:4px 3px 14px}.wardrobe-card{flex:0 0 calc((100% - 24px)/3);min-width:115px;display:flex;align-items:center;flex-direction:column;justify-content:space-between;gap:8px;scroll-snap-align:center;background:#402f4e;border:2px solid #735981;border-radius:18px;color:#f8eafa;padding:12px 7px;font:inherit;font-size:12px;min-height:210px}.wardrobe-card.chosen{background:#61475e;border-color:#ffd495;box-shadow:0 0 0 1px #ffd495}.wardrobe-card-art{display:block;width:100%;height:155px}.wardrobe-card small{font-size:10px;color:#ddc7df}.wardrobe-card.chosen small{color:#ffe3af}.wardrobe-footer{border-top:1px solid #715579;padding-top:12px}.wardrobe-footer .play-button{min-width:165px;width:auto;min-height:48px}.wardrobe-footer .avatar-save-status{margin:0;max-width:60%;font-size:12px;color:#c9dfa9}.wardrobe-card:focus-visible,.wardrobe-tabs button:focus-visible{outline:3px solid #fff1c8;outline-offset:2px}@media(max-height:650px){#avatar-customiser{padding:14px}#avatar-customiser[open]{gap:10px}.wardrobe-choices{gap:10px}.wardrobe-card{min-height:165px}.wardrobe-card-art{height:110px}.wardrobe-preview{padding:8px}.wardrobe-header h2{font-size:22px}}@media(max-width:650px){#avatar-customiser{width:100vw;height:100dvh;border-radius:0;padding:12px}.wardrobe-content{grid-template-columns:1fr;grid-template-rows:minmax(100px,1fr) auto;gap:10px}.wardrobe-preview{flex-direction:row;gap:20px}#wardrobe-avatar{height:100%;max-height:220px}.wardrobe-choices{gap:8px}.wardrobe-tabs button{min-height:44px}.wardrobe-navigation{margin-bottom:5px}.wardrobe-card{min-height:145px}.wardrobe-card-art{height:85px}.wardrobe-header h2{font-size:20px}.wardrobe-footer .avatar-save-status{font-size:10px}.wardrobe-footer .play-button{min-width:130px}.wardrobe-preview label{font-size:12px}}@media(prefers-reduced-motion:reduce){.does-bobble .bobble-head{animation:none}.wardrobe-carousel{scroll-behavior:auto}}
/* Welcome: moonlit school entrance, with player selection before the games. */
.welcome-mode{background:#131025}.welcome-mode .shell{max-width:none;padding:0}.welcome-mode .shell>header,.welcome-mode .shell>footer{display:none}.welcome-mode #main{margin:0}.welcome-screen{position:relative;min-height:100dvh;isolation:isolate;display:grid;place-items:center;padding:25px 22px;box-sizing:border-box;overflow:hidden}.welcome-scenery{position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 50% 20%,#72507566,transparent 47%),linear-gradient(#10152f,#332042 60%,#151123)}.welcome-moon{position:absolute;top:6%;right:10%;width:130px;height:130px;border-radius:50%;background:#f5d6a0;box-shadow:0 0 100px #dac9b055;opacity:.8}.welcome-moon:after{content:'';position:absolute;inset:-9px 26px 13px -15px;border-radius:50%;background:#211a36}.welcome-stars{position:absolute;top:9%;left:12%;color:#ecd5b0;font-size:32px;letter-spacing:35px;opacity:.6}.welcome-landscape{position:absolute;inset:auto 0 0;width:100%;height:65%;opacity:.85}.welcome-bat{position:absolute;width:85px;color:#ae8db9}.welcome-bat svg{width:100%;overflow:visible}.bat-a{top:21%;left:8%;animation:welcome-drift 7s ease-in-out infinite}.bat-b{top:13%;right:28%;font-size:24px;animation:welcome-drift 9s ease-in-out infinite reverse}.welcome-fog{position:absolute;inset:55% -40% -15%;background:radial-gradient(ellipse,#b9a3ca22,transparent 63%);animation:welcome-drift 16s ease-in-out infinite}.welcome-content{width:min(1040px,100%);text-align:center}.welcome-logo{display:block;width:min(490px,70vw);height:auto;max-height:200px;object-fit:contain;margin:0 auto;filter:drop-shadow(0 8px 35px #c59bd12e)}.welcome-title{font-size:16px;color:#ebd5f0;letter-spacing:1px;margin:8px 0 23px}.welcome-groups{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin-bottom:20px}.welcome-groups button{min-width:110px;min-height:48px;border-color:#9e78aa;background:#281c36c9}.welcome-groups button.chosen{background:#f4cf99;color:#302136;border-color:#ffe4be}.welcome-content .student-selector{background:#2c203cdb;backdrop-filter:blur(8px);border:1px solid #9771a878;border-radius:24px;padding:22px;box-shadow:0 18px 60px #07061166}.welcome-content .student-selector h2{font-size:26px;margin:0 0 18px}.welcome-content .student-choices{grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px}.welcome-content .student-choice{min-height:125px;transition:transform .2s,background .2s}.welcome-content .student-choice:hover{transform:translateY(-3px);background:#614359}.welcome-content .student-choice img{width:65px;height:65px}.welcome-content .student-choice span{font-size:13px}.welcome-content #school-status{color:#ceb8dc;margin:16px 0 0}.welcome-teacher{margin-top:18px;font-size:12px;min-height:44px}.teacher-panel{text-align:left}.teacher-panel h2{margin:5px 0 15px}.teacher-panel>p{font-size:14px;line-height:1.55}.teacher-panel label{display:block;font-size:13px;margin:16px 0 7px}.teacher-panel input,.teacher-panel select{box-sizing:border-box;width:100%;min-height:48px;padding:10px;border:1px solid #90719a;border-radius:10px;background:#2b2039;color:#fff0dc;font:inherit}.teacher-panel input{font-size:25px;text-align:center;letter-spacing:10px}.teacher-panel [role=alert]{color:#ffc1b6;min-height:18px;font-size:13px}.teacher-actions{display:grid;gap:10px;margin:20px 0}.teacher-actions button{min-height:46px}.teacher-danger{border-color:#e79791!important;background:#79424f!important;color:#fff0e7!important}.teacher-notice{color:#c2dfa7}.teacher-panel .play-button{width:100%}dialog:has(.teacher-panel){width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 28px);overflow:auto;box-sizing:border-box}dialog:has(.teacher-panel) .close{z-index:2}@keyframes welcome-drift{0%,100%{transform:translate(0,0)}50%{transform:translate(25px,-13px)}}@media(max-height:700px) and (min-width:700px){.welcome-screen{padding:15px 22px}.welcome-logo{max-height:130px}.welcome-title{margin:3px 0 12px}.welcome-groups{margin-bottom:12px}.welcome-content .student-selector{padding:15px}.welcome-content .student-choice{min-height:100px}.welcome-content .student-choice img{width:50px;height:50px}.welcome-content .student-selector h2{font-size:22px;margin-bottom:12px}.welcome-content .student-choices{grid-template-columns:repeat(6,minmax(0,1fr))}.welcome-teacher{margin-top:10px}}@media(max-width:600px){.welcome-screen{padding:18px 12px}.welcome-logo{width:82vw}.welcome-groups{gap:6px}.welcome-groups button{min-width:95px;font-size:12px}.welcome-content .student-selector{padding:15px}.welcome-content .student-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.welcome-content .student-choice{min-height:105px}.welcome-moon{width:90px;height:90px;right:3%;top:3%}.welcome-stars{font-size:20px;left:5%;letter-spacing:10px}}@media(prefers-reduced-motion:reduce){.welcome-bat,.welcome-fog{animation:none}}

@media(min-width:700px) and (min-height:701px) and (max-height:850px){.welcome-logo{max-height:160px}.welcome-title{margin-bottom:15px}.welcome-screen{padding-top:18px;padding-bottom:18px}}
/* Bears: roomy targets and calm, short rounds. */
.bears-board{max-width:850px;margin:auto;text-align:center}.bear-pairs{display:grid;grid-template-columns:repeat(var(--pair-columns,3),1fr);gap:14px;max-width:620px;margin:0 auto 18px}.bear-tile{min-height:112px;border:3px solid #ead7b5;border-radius:22px;background:#fff0d4;color:#49345e;font-size:58px;touch-action:manipulation;cursor:pointer;box-shadow:0 5px 0 #a88b69}.bear-tile:focus-visible,.bear-garden-item:focus-visible{outline:4px solid #cf9aff;outline-offset:3px}.bear-tile svg{width:92px;height:92px;vertical-align:middle}.bear-correct{background:#cce6ac!important;border-color:#7aab60!important;opacity:.7}.bear-clue{min-height:120px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:16px;margin:10px auto 22px;font-size:24px}.bear-clue span{font-size:64px}.bear-clue svg{width:135px;height:135px;background:#f6e4c4;border-radius:22px;padding:12px}.bear-choices,.bear-echo{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;max-width:650px;margin:20px auto}.bear-tile strong{display:block}.bear-tile small{display:block;font-size:18px;letter-spacing:4px}.bear-garden{position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:24px 18px;min-height:320px;border-radius:24px;overflow:hidden;background:linear-gradient(180deg,#251b3f99,#59446b33),repeating-linear-gradient(90deg,transparent 0 38px,#21192c80 38px 44px,transparent 44px 82px),linear-gradient(#443354 0 46%,#685271 46% 50%,#394732 50% 100%);border:3px solid #a98ac3;box-shadow:inset 0 0 55px #18102888}.bear-garden-item{position:relative;display:grid;place-items:center;font-size:clamp(40px,5vw,56px);line-height:1;background:#f8e9c522;border:1px solid #f2d5b533;border-radius:18px;min-width:0;min-height:80px;touch-action:manipulation;cursor:pointer;filter:drop-shadow(0 3px 2px #16102066)}.bear-garden-item:nth-child(3n+1){transform:rotate(-5deg)}.bear-garden-item:nth-child(3n+2){transform:rotate(4deg)}.bear-garden-item:hover:not(:disabled){background:#f8e9c544}.bear-garden-item:disabled{filter:none}.bear-garden-item.bear-correct{opacity:.35}.bear-garden-item span{pointer-events:none}@media(max-width:600px){.bear-garden{grid-template-columns:repeat(3,minmax(0,1fr));padding:14px;gap:8px}.bear-garden-item{min-height:72px}}
.bear-note span{display:block;font-size:28px}.bear-note:nth-child(2){background:#c2dcb8}.bear-note:nth-child(3){background:#d5c6ed}.bear-note-lit{background:#ffe87b!important;transform:scale(1.06);box-shadow:0 0 0 6px #ffe87b66}.bear-note:disabled{opacity:1}@media(max-width:600px){.bear-tile{min-height:96px;font-size:45px}.bear-tile svg{width:70px;height:70px}.bear-choices,.bear-echo{gap:10px}.bear-clue span{font-size:48px}.bear-garden-item{font-size:46px}.bear-pairs{gap:10px;grid-template-columns:repeat(3,1fr)}}
/* Apes: a shared tabletop journal, with clear reading and voting phases. */
.apes-board{max-width:1100px;margin:auto}.apes-shell,.apes-entry{background:#182432;border:1px solid #526272;border-radius:22px;padding:clamp(18px,3vw,32px);color:#f3ead9}.apes-entry{max-width:760px;margin:auto;text-align:center}.apes-entry p{line-height:1.7}.apes-seal{border:2px solid #c8ae78;border-radius:50%;width:100px;height:100px;display:grid;place-items:center;margin:auto;color:#e0c68c;font:42px Georgia,serif}.apes-entry-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.apes-board form{display:grid;gap:12px;margin:20px 0}.apes-board input:not([type=checkbox]),.apes-board select{width:100%;min-height:48px;background:#f7efde;color:#203144;border:2px solid #c1ad8c;border-radius:10px;padding:10px;font-size:16px}.apes-board label{font-weight:700;text-align:left}.apes-topline{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;font-size:13px;letter-spacing:.04em;color:#d0bd95}.apes-party{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:22px 0}.apes-member{display:flex;align-items:center;flex-direction:column;border-radius:14px;background:#ffffff08;padding:8px 4px;text-align:center}.apes-member>div{height:95px}.apes-member svg{height:95px;width:75px}.apes-member span,.apes-member small{font-size:12px;line-height:1.5;color:#c4d1db}.apes-member small{color:#f1cf88;min-height:18px}.apes-member.away{opacity:.45}.apes-role{display:flex;gap:12px;flex-wrap:wrap;border-left:4px solid #c7b5e8;background:#d4c2ef12;padding:15px;margin-bottom:15px}.apes-resource{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 25px}.apes-resource span{background:#334354;border:1px solid #566578;border-radius:8px;padding:7px 10px;font-size:13px}.apes-scene-heading{display:flex;align-items:center;gap:20px}.apes-scene-heading h2{margin:5px 0;font:clamp(25px,3vw,36px) Georgia,serif}.apes-room-icon{display:grid;place-items:center;min-width:72px;height:72px;border:1px solid #aa9065;border-radius:18px;color:#dfc286;font-size:44px}.apes-reading{max-width:850px;margin:22px auto;font-size:18px;line-height:1.8}.apes-reading p{margin-bottom:18px}.apes-reading h3{font-family:Georgia,serif;font-size:27px}.apes-clue{border-left:3px solid #b6caaa;background:#b6caaa12;padding:16px 20px;font-size:16px}.apes-clue p{margin:5px 0}.apes-vote{background:#283849;border:1px solid #607084;border-radius:16px;padding:22px;margin:22px 0}.apes-vote h3{font-size:22px}.apes-notice{padding:16px;background:#4b4140;border:1px solid #aa8969;border-radius:10px;line-height:1.6}.apes-code{letter-spacing:.15em;color:#e9cd95}.apes-roll{background:#d6b97a;color:#1e2b3a;border-radius:12px;padding:15px;font-weight:bold}.apes-board details{border-top:1px solid #526272;margin-top:24px;padding-top:16px}.apes-board summary{cursor:pointer;min-height:44px}.apes-host button{margin:5px}.apes-muted{font-size:13px;color:#bbc4ce}.apes-error{color:#ffb5a0}.apes-ending{text-align:center}.apes-ending ol{text-align:left}@media(max-width:700px){.apes-party{grid-template-columns:repeat(3,minmax(0,1fr))}.apes-reading{font-size:17px}.apes-topline{font-size:12px}.apes-scene-heading{gap:10px}}
/* Illustrated, paged tabletop layout: the iPad viewport is the adventure canvas. */
body.apes-mode .shell{height:100dvh;max-width:1500px;padding:0 18px;display:flex;flex-direction:column}body.apes-mode header{height:62px;min-height:62px}body.apes-mode .school-logo{max-height:54px;width:auto}body.apes-mode .logo-seasonal{height:54px}body.apes-mode footer{display:none}body.apes-mode #main{flex:1;min-height:0;display:flex;flex-direction:column;padding:0}body.apes-mode .game-top{margin:4px 0;min-height:44px;gap:8px}body.apes-mode .game-top button{padding:7px 12px;min-height:40px}body.apes-mode .game-person{flex-direction:row;gap:6px}body.apes-mode .game-avatar{height:42px;width:36px}body.apes-mode .game-avatar svg{height:42px;width:36px}body.apes-mode .game-player-name{font-size:12px}body.apes-mode .game-intro{display:none}body.apes-mode .status{font-size:11px;min-height:20px;margin:2px 0;line-height:16px}body.apes-mode #board{flex:1;min-height:0;width:100%;max-width:none;margin:0}
.apes-board .apes-shell{height:100%;padding:12px 16px;display:flex;flex-direction:column;gap:8px;border-color:#8d805f;background:radial-gradient(ellipse at top,#263d49,#121f2b);border-radius:16px}.apes-board .apes-topline{font-size:11px;line-height:16px}.apes-page-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.apes-page-title>span{font-size:10px;color:#cbb780;letter-spacing:.08em}.apes-page-title h2{font:24px Georgia,serif;margin:0;color:#f3e1b8}.apes-tabs{display:flex;gap:6px}.apes-tabs button{flex:1;min-height:40px;border:1px solid #596876;border-radius:8px;background:#21323f;color:#dedacb;font-size:12px;font-weight:600;padding:6px}.apes-tabs button[aria-pressed=true]{background:#e5c486;color:#252b2c;border-color:#f9dd9c;box-shadow:0 2px 9px #0005}.apes-stage{display:grid;grid-template-columns:minmax(0, .85fr) minmax(0,1.15fr);gap:18px;flex:1;min-height:0}.apes-illustration{position:relative;min-height:0;margin:0;border-radius:12px;overflow:hidden;background:#243842;border:1px solid #7c795f}.apes-illustration img{height:100%;width:100%;object-fit:cover;display:block}.apes-illustration figcaption{position:absolute;bottom:0;left:0;right:0;padding:35px 18px 18px;background:linear-gradient(transparent,#091822ed);color:#f6e0b4}.apes-illustration figcaption span{display:block;font-size:9px;letter-spacing:.2em;margin-bottom:8px}.apes-illustration figcaption strong{font:24px Georgia,serif}.apes-pane{min-height:0;display:flex;flex-direction:column;padding:14px 10px;position:relative}.apes-pane h3{font:23px Georgia,serif;margin:0 0 12px}.apes-pane p{font-size:17px;line-height:1.55;margin:0 0 12px}.apes-pane .apes-reader{font-size:12px;color:#e4bf75;letter-spacing:.04em;margin-bottom:18px}.apes-story-page{flex:1}.apes-pane .apes-page-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:10px;font-size:12px}.apes-page-footer button{min-height:42px}.apes-page-footer button:disabled{opacity:.35}.apes-pane>.play-button{margin-top:12px}.apes-pane .apes-reading{margin:0;font-size:16px;line-height:1.5;width:100%;max-width:none}.apes-pane .apes-reading ol{padding-left:22px;font-size:15px;line-height:1.5;margin:10px 0}.apes-pane .apes-reading li{margin-bottom:8px}.apes-pane .apes-reading h2{font:26px Georgia,serif;margin:8px 0 12px}.apes-pane .eyebrow{font-size:10px;margin:0 0 10px}.apes-pane .apes-reading .apes-roll{padding:8px;margin:8px 0}.apes-pane .apes-reading .play-button{margin:10px 0}.apes-pane .apes-reading-hint{font-size:12px;color:#bbcfcd;margin-top:auto}.apes-evidence-note{background:#314953;padding:16px;border-left:3px solid #d1b881;border-radius:4px;line-height:1.65;font-size:16px}.apes-pane .apes-paused{font-size:12px;background:#593c36;color:#ffe9ae;padding:7px;border-radius:6px}
/* Rolled parchment, made from CSS so the voting text stays crisp. */
.parchment-pane{color:#392b21;margin:9px 0;padding:22px 20px;background:radial-gradient(ellipse at 15% 35%,#fff7d99c,transparent 60%),repeating-linear-gradient(7deg,#91662906 0 1px,transparent 1px 4px),linear-gradient(90deg,#bd965a,#f0d7a0 7%,#f4dfb0 88%,#c7a264);border:1px solid #a87e46;border-radius:5px;box-shadow:inset 0 0 25px #93642c55,0 6px 14px #0005}.parchment-pane:before,.parchment-pane:after{content:'';position:absolute;left:-8px;right:-8px;height:16px;border:1px solid #997244;border-radius:10px;background:linear-gradient(#fceac1,#dfbd7c 45%,#9e7541 90%,#e7cb90);box-shadow:0 3px 5px #0004}.parchment-pane:before{top:-8px}.parchment-pane:after{bottom:-8px}.apes-pane .apes-vote{background:none;border:0;margin:0;padding:0;width:100%;height:100%;display:flex;flex-direction:column;color:#392b21}.apes-vote h3{font:600 18px/1.35 Georgia,serif;margin:0 0 10px}.apes-pane .apes-vote>p{font-size:11px;line-height:1.35;margin:8px 0 0}.apes-board .apes-vote form{margin:0;gap:10px;display:flex;flex-direction:column;flex:1;min-height:0}.apes-choice-cards{display:grid;gap:6px}.apes-choice-cards button{display:flex;align-items:center;text-align:left;gap:10px;min-height:48px;padding:8px 10px;color:#3c3024;background:#fff9e88c;border:1px solid #b99b68;border-radius:7px;font-size:13px;line-height:1.3}.apes-choice-cards b{background:#d2b37c;border-radius:50%;width:26px;height:26px;flex:none;display:grid;place-items:center}.apes-choice-cards small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.07em;opacity:.7;margin-top:2px}.apes-choice-cards button[aria-pressed=true]{border:2px solid #5e7050;background:#edf0d1;box-shadow:0 0 0 1px #5e705033}.apes-choice-cards button[aria-pressed=true] b{background:#52674c;color:#fff}.apes-ballot-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.apes-ballot-field{min-width:0}.apes-board .apes-ballot-field label{display:block;font-size:11px;margin-bottom:4px}.apes-board .apes-ballot-field select{font-size:12px;min-height:44px;padding:6px;background:#fff7e3;border:1px solid #b69c70;border-radius:7px}.apes-vote .play-button{background:#344c41;color:#fff2cf;border:1px solid #223b31;margin-top:auto;min-height:44px}.apes-vote button:focus-visible{outline-color:#514329}.apes-vote button:disabled{opacity:.5}.apes-pane .apes-party{margin:6px 0;grid-template-columns:repeat(3,1fr);gap:5px}.apes-pane .apes-member{padding:3px}.apes-pane .apes-member>div,.apes-pane .apes-member svg{height:52px}.apes-pane .apes-member strong{font-size:12px}.apes-pane .apes-member span,.apes-pane .apes-member small{font-size:10px;line-height:1.2}.apes-pane .apes-role{margin:0;padding:8px;font-size:12px;gap:5px}.apes-pane .apes-role span{font-size:11px}.apes-pane .apes-resource{gap:4px;margin:8px 0}.apes-pane .apes-resource span{font-size:11px;padding:4px 6px}.apes-item-descriptions p{font-size:11px;margin:3px 0;line-height:1.35}.apes-pane .apes-host{border:0;padding:0;margin:0}.apes-host button{min-height:44px;font-size:13px}.apes-pane .apes-host p{font-size:14px}.apes-pane .apes-ending h3{font-size:19px}.apes-pane .apes-ending p{font-size:15px}.apes-pane .apes-ending ol{font-size:14px}.apes-board .apes-entry{height:100%;max-width:850px;padding:16px 24px;display:flex;flex-direction:column;justify-content:center}.apes-entry .apes-seal{height:54px;width:54px;font-size:24px}.apes-entry h2{font-size:25px;margin:10px 0}.apes-entry p{font-size:14px;line-height:1.5;margin:6px 0}.apes-entry .eyebrow{justify-content:center}.apes-entry form{margin:12px 0;gap:8px}.apes-entry #apes-join{grid-template-columns:auto 1fr 1fr;align-items:center}.apes-entry details{margin-top:10px;padding-top:8px}.apes-entry summary{font-size:12px;min-height:26px}.apes-entry #apes-recover{grid-template-columns:1fr 1fr;gap:6px}.apes-entry #apes-recover label{font-size:11px}.apes-entry #apes-recover input{min-height:36px;padding:6px}.apes-entry:has(details[open])>.apes-seal,.apes-entry:has(details[open])>h2,.apes-entry:has(details[open])>p{display:none}
@media(orientation:portrait){.apes-stage{grid-template-columns:1fr;grid-template-rows:minmax(140px,.6fr) minmax(0,1.4fr);gap:14px}.apes-illustration img{object-position:center 45%}.apes-illustration figcaption{padding:20px 16px 10px}.apes-illustration figcaption strong{font-size:19px}.apes-illustration figcaption span{display:none}.apes-pane{padding:8px 12px}.parchment-pane{padding:18px 20px}.apes-page-title h2{font-size:20px}.apes-pane .apes-party{grid-template-columns:repeat(6,1fr)}.apes-tabs button{font-size:11px}.apes-pane .apes-reading p{font-size:16px}}
@media(max-height:710px) and (orientation:landscape){body.apes-mode header{height:48px;min-height:48px}body.apes-mode .school-logo{max-height:42px}.apes-board .apes-shell{padding:8px 12px;gap:5px}.apes-page-title h2{font-size:20px}.apes-tabs button{min-height:36px}.apes-pane p{font-size:15px}.apes-choice-cards button{padding:5px 8px;font-size:12px}.apes-vote h3{font-size:16px;margin-bottom:7px}.parchment-pane{padding:15px 15px}.apes-board .apes-vote form{gap:6px}.apes-pane .apes-reading ol{font-size:13px}.apes-pane .apes-reading p{font-size:14px}.apes-pane .apes-party{grid-template-columns:repeat(6,1fr)}.apes-pane .apes-member strong{font-size:10px}}
@media(max-width:600px){body.apes-mode .shell{padding:0 6px}.apes-page-title>span{display:none}.apes-topline span:last-child{display:none}.apes-tabs{gap:3px}.apes-tabs button{font-size:10px;padding:4px}.apes-stage{grid-template-rows:110px minmax(0,1fr)}.apes-pane p{font-size:14px}.apes-pane .apes-party{grid-template-columns:repeat(3,1fr)}.apes-ballot-row{gap:5px}.apes-choice-cards button{font-size:12px}.apes-vote h3{font-size:15px}.apes-entry #apes-join{grid-template-columns:1fr 1fr}.apes-entry #apes-join label{grid-column:1/-1}}
.apes-illustration img{object-fit:contain;background:radial-gradient(ellipse,#354d50,#13232c)}

.apes-restart-control{border-top:1px solid #827154;margin-top:12px;padding-top:10px}.apes-pane .apes-restart-control p{font-size:13px;line-height:1.45}.apes-pane .apes-restart-control h3{font-size:20px}.apes-reset-actions{display:flex;gap:10px}.apes-reset-actions button{flex:1;margin:0}.apes-host:has(#apes-end-confirm)>p,.apes-host:has(#apes-end-confirm)>button{display:none}

.apes-pane .apes-effort{font-size:13px;color:#e6cb94}.apes-route-result{padding:10px;border-left:3px solid #e3c384;background:#d6bc7f15}.apes-fatigue{color:#e5c67f!important}.apes-pane .apes-member small{min-height:12px}.apes-choice-cards:has(button:nth-child(4)){gap:4px}.apes-choice-cards:has(button:nth-child(4)) button{padding:5px 8px;min-height:44px}.apes-choice-cards button:disabled{opacity:.5}.apes-pane .apes-role{font-size:11px}@media(max-height:710px) and (orientation:landscape){.apes-choice-cards:has(button:nth-child(4)) button{min-height:40px}.apes-choice-cards:has(button:nth-child(4)) small{font-size:9px}.apes-vote h3{font-size:15px}}

.bear-echo-stage{position:relative;padding-top:12px}.bear-echo-round{font-weight:800;color:#654b7f;font-size:20px}.bear-echo-banner{position:absolute;z-index:3;inset:50px 0 auto;margin:auto;width:max-content;max-width:95%;padding:20px 28px;border:3px solid #d3b3ed;border-radius:24px;background:#f1e5ff;color:#4e3467;font-size:clamp(24px,4vw,36px);font-weight:900;box-shadow:0 10px 30px #30203a44;pointer-events:none;animation:echo-banner-in .22s ease-out}.bear-echo-banner[data-phase="repeat"]{background:#e1efcc;border-color:#aacb7d;color:#38532c}.bear-echo-banner[hidden]{display:none}@keyframes echo-banner-in{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.bear-echo-banner{animation:none}}

.catch-field-bears .drop.candy{font-size:46px}

.candy-spell{max-width:570px;margin:auto}.candy-spell-progress{display:flex;gap:16px;align-items:center;font-weight:800;margin:0 0 12px}.candy-spell-progress progress{flex:1;width:100%;accent-color:#8b63b3;height:20px}.candy-spell-grid{display:grid;grid-template-columns:repeat(var(--candy-size),minmax(0,1fr));gap:7px;background:linear-gradient(145deg,#342346,#68456b);padding:13px;border-radius:24px;border:3px solid #caa7dc;box-shadow:0 8px 0 #35243e,0 14px 30px #49345e22;touch-action:none;user-select:none}.spell-sweet{aspect-ratio:1;border:2px solid #ffffff99;border-radius:16px;font-size:clamp(25px,4.6vw,44px);display:grid;place-items:center;min-width:0;padding:0;cursor:pointer;touch-action:none;box-shadow:inset 0 -5px 0 #452f5422;transition:transform .16s,opacity .16s;background:#fae2bc}.sweet-1{background:#ffcbd6}.sweet-2{background:#ffd39e}.sweet-3{background:#fff0a9}.sweet-4{background:#bce9ed}.sweet-5{background:#d9c0f4}.spell-sweet:disabled{opacity:1;cursor:default}.spell-sweet span{pointer-events:none;filter:drop-shadow(0 2px 1px #432d4c33)}.spell-selected,.spell-sweet:focus-visible{outline:4px solid #fff;outline-offset:-4px;transform:scale(.93)}.spell-hint{outline:4px dashed #73512a;outline-offset:-5px;background:#fff8b8}.spell-clear:disabled{opacity:.15;transform:scale(.5)}.candy-spell-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;font-size:13px;color:#735f7b}@media(max-width:500px){.candy-spell-grid{gap:4px;padding:8px;border-radius:18px}.spell-sweet{border-radius:11px;font-size:29px}.candy-spell-tools{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){.spell-sweet{transition:none}}

#main[data-game="candy-match"] .game-top{margin:12px 0 6px}#main[data-game="candy-match"] .game-intro .eyebrow{display:none}#main[data-game="candy-match"] .game-intro h1{font-size:28px;margin:5px 0}#main[data-game="candy-match"] .game-intro p{font-size:13px;margin:0 0 10px}#main[data-game="candy-match"] .candy-spell{width:min(570px,calc(100dvh - 350px));min-width:min(340px,100%);max-width:100%}#main[data-game="candy-match"] .spell-sweet{font-size:clamp(25px,4vh,42px)}#main[data-game="candy-match"] .candy-spell-tools{margin-top:12px;flex-wrap:wrap}#main[data-game="candy-match"] .status{margin:10px 0}
.spell-board-wrap{position:relative}.spell-picked{outline:4px solid #fff!important;box-shadow:0 12px 20px #120b2a77!important;cursor:grabbing}.spell-selected{outline:4px solid #fff;box-shadow:0 0 0 3px #e9b2ff,0 0 18px #e9b2ff;transform:scale(1.06);z-index:2}.spell-fall{animation:spell-drop .2s ease-out}.spell-paused{position:absolute;inset:0;z-index:10;display:grid;align-content:center;justify-items:center;gap:20px;border-radius:24px;background:#251833ef;font-size:30px;color:#fff}.spell-paused[hidden]{display:none}.spell-urgent{color:#ff997e}.candy-spell-progress strong{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:23px}@keyframes spell-drop{from{transform:translateY(-22px);opacity:.4}to{transform:translateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.spell-fall{animation:none}}

.snake-game{width:min(560px,calc(100dvh - 400px));min-width:min(300px,100%);max-width:100%;margin:auto}.snake-board{position:relative;aspect-ratio:1;overflow:hidden;border:4px solid #adcf8c;border-radius:20px;background-color:#292337;background-image:linear-gradient(#b9cba812 1px,transparent 1px),linear-gradient(90deg,#b9cba812 1px,transparent 1px);background-size:calc(100% / var(--snake-size)) calc(100% / var(--snake-size));touch-action:none;user-select:none;box-shadow:0 8px 0 #20182d,0 10px 25px #18102144}.snake-walls{border-color:#b994ce}.snake-wrap{border-style:dashed}.snake-segment{position:absolute;width:calc(100% / var(--snake-size));height:calc(100% / var(--snake-size));border:2px solid #292337;border-radius:35%;background:#a2cc79;box-shadow:inset -3px -3px 0 #526b4244}.snake-segment:nth-child(3n){background:#c5df88}.snake-tail{border-radius:50%;transform:scale(.8)}#snake-food{position:absolute;transform:translate(-50%,-50%);width:calc(100% / var(--snake-size));height:calc(100% / var(--snake-size));font-size:clamp(18px,2.8vh,30px);display:grid;place-items:center}#snake-food[hidden]{display:none}#snake-head{position:absolute;width:calc(165% / var(--snake-size));height:calc(165% / var(--snake-size));transform:translate(-50%,-60%);z-index:3;pointer-events:none;filter:drop-shadow(0 2px 2px #0009)}#snake-head .bobble-avatar{width:100%;height:100%;overflow:visible}#snake-head .bobble-head{animation:none!important;transform:none!important}.snake-heading{position:absolute;right:-5px;top:50%;font-size:12px;color:#fff2a5;transform:translateY(-50%)}#snake-head[data-direction="up"] .snake-heading{right:40%;top:0;transform:rotate(-90deg)}#snake-head[data-direction="down"] .snake-heading{right:40%;top:90%;transform:rotate(90deg)}#snake-head[data-direction="left"] .snake-heading{right:auto;left:-5px;transform:rotate(180deg)}#snake-overlay{position:absolute;inset:0;z-index:5;display:grid;align-content:center;justify-items:center;gap:12px;background:#251b38e8;text-align:center;padding:20px;color:#fff0d7}#snake-overlay[hidden]{display:none}#snake-overlay strong{font-size:26px}#snake-overlay p{margin:0 0 8px}.snake-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:17px}.snake-controls>span{font-size:12px;max-width:90px}.snake-pad{display:grid;grid-template-columns:repeat(3,48px);gap:5px}.snake-pad button{min-height:44px;padding:4px;font-size:24px;touch-action:manipulation}.snake-pad button[data-snake-direction="up"]{grid-column:2}.snake-pad button[data-snake-direction="left"]{grid-column:1}.snake-pad button[data-snake-direction="down"]{grid-column:2}.snake-pad button[data-snake-direction="right"]{grid-column:3}#main[data-game="avatar-snake"] .game-top{margin:12px 0 6px}#main[data-game="avatar-snake"] .game-intro .eyebrow{display:none}#main[data-game="avatar-snake"] .game-intro h1{font-size:28px;margin:5px 0}#main[data-game="avatar-snake"] .game-intro p{font-size:13px;margin:0 0 10px}

/* A third-person, three-lane trail with touch controls kept below the scene. */
.midnight-game{max-width:1000px;margin:auto}.midnight-stage{position:relative;overflow:hidden;border-radius:22px;border:2px solid #8d72ac;background:#20182b;aspect-ratio:1000/510;max-height:calc(100dvh - 315px);min-height:230px;touch-action:none;isolation:isolate}.midnight-stage canvas{width:100%;height:100%;display:block}.midnight-player{position:absolute;bottom:4%;left:50%;width:11%;height:31%;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 8px 5px #140d22aa)}.midnight-player svg{width:100%;height:100%;overflow:visible}.midnight-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#170f2ac9;color:#fff2d9;padding:15px;z-index:3}.midnight-overlay[hidden]{display:none}.midnight-overlay h2{margin:6px;font-size:clamp(24px,3vw,38px)}.midnight-overlay>span{font-size:40px}.midnight-overlay p{margin:8px 0 16px}.midnight-distance{position:absolute;left:15px;top:12px;padding:5px 12px;border-radius:20px;background:#180f2ab0;color:#fce5bc;font-size:13px}.midnight-controls{display:flex;justify-content:center;gap:12px;padding:12px 0;touch-action:manipulation}.midnight-controls button{min-height:52px;min-width:100px}.midnight-controls #midnight-pause{min-width:75px}main[data-game="midnight-run"] .game-intro{margin:8px 0 12px}main[data-game="midnight-run"] .game-intro h1{font-size:30px;margin:2px}main[data-game="midnight-run"] .game-intro p{margin:5px}main[data-game="midnight-run"] .game-intro .eyebrow{display:none}main[data-game="midnight-run"] .status{margin-top:4px}@media(max-width:600px){.midnight-controls{gap:6px}.midnight-controls button{min-width:0;flex:1;padding:10px}.midnight-stage{min-height:280px}.midnight-player{width:16%}}

/* Keep the complete school logo visible in either iPad orientation. */
.loading-screen{position:relative;isolation:isolate;min-height:100dvh;padding:0;overflow:hidden;background:#080e18;justify-content:flex-end}
.loading-wallpaper{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;z-index:-1}
.loading-details{width:100%;padding:20px 24px max(20px,env(safe-area-inset-bottom));background:linear-gradient(transparent,#080e18e8 35%);color:#fff3db;display:flex;flex-direction:column;align-items:center;text-shadow:0 2px 5px #000}
.loading-screen h1{font-size:clamp(20px,3vw,28px);margin:12px 0 5px}
.loading-screen p[role=status]{margin:0 0 10px;min-height:24px;max-width:460px;color:#fff0d8;font-size:14px}
.loading-screen progress{margin:4px 0 8px;height:10px}
.loading-screen button{margin-top:8px}
@media(orientation:portrait){.loading-details{padding-bottom:max(40px,env(safe-area-inset-bottom))}}
