:root{font-family:'Trebuchet MS',system-ui,sans-serif;color:#273746;background:#142238;--gold:#f4cc7b;--paper:#fbf4e3;--ink:#28394b;--muted:#697789;--orange:#cc623b}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 50% 0,#344c68,transparent 65%),#142238}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #18a5cb;outline-offset:3px}button{transition:transform .15s,filter .15s}button:hover:not(:disabled){filter:brightness(1.05);transform:translateY(-1px)}header{max-width:1260px;margin:auto;padding:17px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{display:flex;align-items:center;gap:16px;color:var(--gold);text-decoration:none;font-size:17px;font-weight:900;letter-spacing:2px}.brand img{width:110px;height:auto}.brand small{display:block;font-size:9px;letter-spacing:3px;color:#a9bccd;margin-top:5px}.utilities{display:flex;gap:8px;align-items:center}.utilities button,.utilities a{border:1px solid #60758f;color:#f1f6fc;background:#243b53;border-radius:9px;padding:9px 12px;text-decoration:none;font-size:13px}.utilities .exit{background:#a64643;border-color:#c3786c}main{max-width:1212px;padding:0 20px 22px;margin:auto}.arena{height:220px;border:1px solid #718095;border-bottom:0;border-radius:22px 22px 0 0;position:relative;overflow:hidden;background:linear-gradient(#243854,#6b7b8b 85%);isolation:isolate}.moon{position:absolute;width:65px;height:65px;border-radius:50%;background:#ffe3aa;box-shadow:0 0 70px #f5d68d75;left:66%;top:18px}.mountain{position:absolute;bottom:19%;width:100%;height:120px;background:#233c50;clip-path:polygon(0 100%,0 66%,12% 22%,23% 66%,35% 6%,50% 70%,64% 26%,78% 63%,90% 5%,100% 63%,100% 100%)}.mountain.far{opacity:.4;transform:translateY(-27px) scaleX(-1)}.ground{position:absolute;bottom:0;left:0;right:0;height:23%;background:linear-gradient(#566344 0 10%,#2c3d33 10% 35%,#23362f 35%)}.castle{position:absolute;right:24%;bottom:18%;font-size:120px;color:#253142;line-height:1;text-shadow:2px -2px #435468}.hud{position:absolute;top:15px;left:22px;right:22px;display:flex;justify-content:space-between;color:#fff4d8;font-size:11px;font-weight:900;letter-spacing:1px;z-index:3}#lives{font-size:21px;letter-spacing:2px;margin-top:6px;max-width:240px}.guardian{text-align:right}.health{width:160px;height:8px;border:1px solid #98a6b1;background:#213443;margin-top:9px}.health span{display:block;width:100%;height:100%;background:#e49c8e;transition:width .4s}canvas{image-rendering:pixelated;position:absolute;bottom:18px;width:125px;height:125px;filter:drop-shadow(0 8px #0003);transition:left .6s ease,opacity .4s}#hero{left:12%}#monster{left:76%;width:145px;height:145px}#speech{position:absolute;bottom:148px;left:12%;background:#fff5d8;color:#a43c36;padding:8px 12px;border-radius:10px;font-weight:900;opacity:0;z-index:4;pointer-events:none}#speech.show{opacity:1}.arena-title{position:absolute;bottom:6px;left:0;right:0;text-align:center;color:#a2b6b1;font-size:8px;letter-spacing:3px}.questbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 20px;background:#192c40;color:#d7e4ee;border-left:1px solid #718095;border-right:1px solid #718095;font-size:11px;font-weight:900;letter-spacing:.8px}.progress{height:4px;background:#2d435a}.progress div{height:100%;width:0;background:var(--gold);transition:width .3s}.parchment{background:var(--paper);padding:26px 30px;border-radius:0 0 22px 22px;box-shadow:0 18px 35px #0003}.setup-title{display:flex;justify-content:space-between;align-items:center;margin:0 0 20px}.eyebrow{font-size:10px;font-weight:900;color:#9a6740;letter-spacing:2px}h1{font-size:clamp(26px,3.7vw,42px);line-height:1.1;margin:8px 0 10px;color:#23384a}h2{font-size:21px;margin:0 0 13px}.setup-title p{color:var(--muted);margin:0;font-size:14px}.crystal{font-size:75px;filter:drop-shadow(0 9px #1e47551a);padding:0 30px;animation:bob 3s infinite}.tabs{display:flex;gap:5px;border-bottom:1px solid #d7ceba;margin-bottom:22px;flex-wrap:wrap}.tabs button{border:0;background:none;color:#71808a;font-size:13px;font-weight:900;padding:12px 15px;border-bottom:3px solid transparent}.tabs button.active{border-color:var(--orange);color:#a95435;background:#f0e5ce}.tabs span{background:#ddd1b8;border-radius:30px;padding:2px 6px;font-size:10px}.settings-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:24px}.settings-card,.round-card,.question-card{padding:19px;background:#fff;border:1px solid #dbd0b7;border-radius:14px}.settings-card{align-self:start}.round-card{margin-bottom:12px}.round-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.round-top h3{margin:0;font-size:16px}.round-top label{display:flex;align-items:center;gap:10px;margin:0;font-size:12px}.round-top input{width:75px}.types{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0 10px}.types label{display:flex;align-items:center;gap:6px;background:#edf3f1;border:1px solid #cfdfd9;padding:8px 10px;border-radius:8px;margin:0;font-size:12px;font-weight:750}.types input{width:auto;margin:0;accent-color:#317f86}label{display:block;font-size:12px;font-weight:850;margin:15px 0 7px}input,select,textarea{width:100%;background:white;color:#263d4d;border:1px solid #c8c5b9;border-radius:8px;padding:10px 11px;min-height:40px}textarea{resize:vertical;line-height:1.5}.inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.inline-fields label select{margin-top:7px}.note,.round-note{color:var(--muted);font-size:12px;line-height:1.6;margin:10px 0 0}.selection-note{display:flex;flex-direction:column;padding:14px 16px;background:#e5ede5;border-radius:12px;color:#446455;font-size:12px}.selection-note p{line-height:1.6;margin:6px 0 0}.primary,.secondary{font-weight:850;border-radius:8px;padding:11px 16px;min-height:42px}.primary{color:white;background:var(--orange);border:1px solid #b44d2c;box-shadow:0 4px #a8472b}.secondary{color:#3c5968;background:#f5eedf;border:1px solid #c9bea6;box-shadow:0 2px #ddd2be}.danger{color:#ac3e3e}.setup-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid #d9ceba;margin-top:24px;padding-top:18px}.setup-footer p{margin:0 0 6px;font-size:13px;font-weight:850}.setup-footer #storageStatus{font-size:11px;color:#617b69}#setupError{color:#ad3635;line-height:1.6;font-size:13px;font-weight:800}.start{white-space:nowrap;padding:14px 20px;letter-spacing:.4px}.editor-heading{display:flex;justify-content:space-between;gap:18px;align-items:start;margin-bottom:18px}.editor-heading p{margin:0}.add-question{display:flex;gap:6px}.add-question select{min-width:170px;font-size:12px}.add-question button{white-space:nowrap}.bulk-box{background:#eaf7ff;border:1px solid #d7e6f2;border-radius:12px;padding:14px 17px;margin-bottom:16px;font-size:12px;line-height:1.6}.bulk-box summary{font-weight:850;cursor:pointer}.bulk-box pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:11px;background:#fff;border-radius:8px;color:#536575;font-size:11px}.bulk-box button{margin-top:7px}.check{display:flex;gap:7px;align-items:center}.check input{width:auto;min-height:0}.question-card{margin-top:12px}.question-head{display:flex;align-items:center;gap:10px}.question-head strong{white-space:nowrap;font-size:13px}.question-head select{width:auto;flex:1;max-width:250px;font-size:12px}.question-head button{margin-left:auto;padding:7px 11px;min-height:34px}.question-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.question-fields label{margin-top:12px}.question-fields .wide{grid-column:1/-1}.image-picker{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}.image-picker img{width:60px;height:60px;object-fit:contain;background:white;border-radius:8px}.image-picker input{max-width:260px;font-size:11px;padding:7px}.empty-bank{padding:35px;border:2px dashed #d7e6f2;border-radius:13px;text-align:center;color:#71808a}.library-controls{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}#libraryTab>select{max-width:660px}.question-meta{display:flex;justify-content:space-between;align-items:center;color:#85663d;font-size:11px;font-weight:900;letter-spacing:1px;margin-bottom:14px}.timer{font-size:14px;letter-spacing:0;color:#54687b}.question-title{white-space:pre-line;line-height:1.4;font-size:clamp(22px,3vw,30px);margin:6px 0 17px}.question-layout{display:grid;grid-template-columns:200px 1fr;gap:26px;align-items:center}.illustration{width:200px;height:200px;padding:15px;background:#fff;border:1px solid #d7e6f2;border-radius:14px;display:flex;justify-content:center;align-items:center}.illustration img{max-width:100%;max-height:100%;object-fit:contain}.answer{min-height:65px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;border:2px dashed #baa987;border-radius:10px;padding:12px;background:#eee5d1;font-size:22px;font-weight:900;color:#354b59;margin:10px 0}.answer button{border:0;padding:5px 7px;background:#fff9ec;border-radius:5px;color:#354b59;font-weight:900}.bank{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;min-height:90px;padding:18px 0}.tile{border:1px solid #749595;border-bottom:4px solid #4c7378;border-radius:8px;background:#e7f2ed;padding:11px 14px;min-width:44px;color:#244954;font-size:18px;font-weight:850;animation:float 3s ease-in-out infinite;animation-delay:var(--delay)}.tile:disabled{opacity:.25;animation:none}.play-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px}.choices{display:grid;gap:12px;margin:15px 0}.choice{text-align:left;display:flex;align-items:center;gap:15px;background:#fffaf1;border:1px solid #cec1a6;border-bottom:4px solid #cbbda0;border-radius:10px;padding:15px 18px;color:#293e4c;font-size:17px;white-space:pre-line;animation:float 4s ease-in-out infinite;animation-delay:var(--delay)}.choice b{color:#ac6941}.feedback{min-height:30px;text-align:center;font-weight:850;margin:16px 0 4px;color:#9b4b37}.play-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:#7a7c7a;margin-top:20px}.skip{border:0;background:transparent;text-decoration:underline;color:#6f7c88;font-size:12px}.intro{text-align:center;padding:15px 10px 30px;max-width:650px;margin:auto}.intro p{color:#667583;line-height:1.8}.win{font-size:65px;margin:10px}.end-stat{display:flex;justify-content:center;gap:20px;margin:20px 0;font-size:14px}.end-stat strong{font-size:23px;display:block}.end-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}footer{text-align:center;color:#9baec0;letter-spacing:3px;font-size:9px;margin-top:18px}.hit{animation:hit .4s!important}@keyframes bob{50%{transform:translateY(-5px)}}@keyframes float{50%{transform:translateY(-5px)}}@keyframes hit{25%,75%{transform:translateX(8px);filter:brightness(1.8)}50%{transform:translateX(-8px)}}@media(max-width:800px){.settings-grid{grid-template-columns:1fr}.setup-title .crystal{font-size:55px;padding:0}.setup-title h1{font-size:31px}.editor-heading{flex-direction:column}.setup-footer{align-items:start;flex-direction:column}.start{width:100%}.question-layout{grid-template-columns:150px 1fr;gap:16px}.illustration{width:150px;height:150px}header .brand small{display:none}.arena{height:190px}canvas{width:105px;height:105px}#monster{width:120px;height:120px}#speech{bottom:125px}}@media(max-width:540px){header{padding:12px}.brand{font-size:12px;gap:9px;letter-spacing:1px}.brand img{width:75px}.utilities{gap:5px}.utilities button,.utilities a{font-size:11px;padding:8px}.utilities #setupBtn{font-size:0}.utilities #setupBtn:first-letter{font-size:14px}main{padding:0 8px 20px}.parchment{padding:20px 15px}.questbar{font-size:9px;padding:11px 12px}.hud{left:13px;right:13px;font-size:9px}.health{width:115px}.arena-title{font-size:6px}.castle{right:20%;font-size:95px}.moon{left:58%;width:45px;height:45px}.tabs button{font-size:10px;padding:11px 7px}.tabs{gap:2px}.settings-card,.round-card,.question-card{padding:15px}.question-fields{grid-template-columns:1fr}.question-fields .wide{grid-column:auto}.question-layout{grid-template-columns:1fr}.illustration{margin:auto}.question-title{font-size:22px}.round-top label{font-size:10px}.types{gap:5px}.types label{font-size:10px;padding:8px}.setup-title p{font-size:12px}.setup-title .crystal{font-size:40px}.add-question{width:100%}.add-question select{flex:1;min-width:0}.question-head{flex-wrap:wrap}.question-head select{max-width:none;font-size:11px}.choice{font-size:15px}.question-meta{font-size:9px}.play-bottom{align-items:start}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* BLOOMTools brand: shared Nunito typography and blue / white palette. */
:root{font-family:Nunito,system-ui,-apple-system,sans-serif;color:#18334b;background:#f7fbff;--gold:#ffbd16;--paper:#fff;--ink:#18334b;--muted:#60778c;--orange:#087fc2;--blue:#159fe0;--line:#e4edf5}
body{background:#f7fbff}header{max-width:none;padding:16px max(24px,calc((100vw - 1212px)/2));background:white;border-bottom:1px solid var(--line);margin-bottom:24px}.brand{color:#087fc2;letter-spacing:.5px;font-weight:900}.brand img{width:150px;height:62px;object-fit:contain}.brand small{color:#60778c;letter-spacing:2px}.utilities button,.utilities a{background:#eaf7ff;border:1px solid #d7e6f2;color:#123b63;border-radius:14px;font-weight:900}.utilities .exit{background:#f02d24;border-color:#f02d24;color:white}
.arena{border-color:#d7e6f2;background:linear-gradient(115deg,#148fd0,#37b5e6 56%,#79d8e6);border-radius:24px 24px 0 0}.moon{background:#ffda65;box-shadow:0 0 45px #fff6}.mountain{background:#248abe}.mountain.far{background:#a7e2f2;opacity:.6}.ground{background:linear-gradient(#a9dc6b 0 10%,#81bb55 10% 35%,#68a64a 35%)}.castle{color:#367caf;text-shadow:2px -2px #a0d9ef}.hud{color:white}.arena-title{color:white;font-family:inherit}.health{border-color:white;background:#fff5}.health span{background:#ffbd16}.questbar{background:#eaf7ff;color:#087fc2;border-color:#d7e6f2}.progress{background:#d9edf9}.progress div{background:#159fe0}.parchment{box-shadow:0 16px 36px rgba(21,87,139,.11);border:1px solid #e4edf5;border-top:0}.eyebrow{color:#087fc2}h1,h2,h3{color:#18334b}h1{font-weight:900;line-height:1.2}.tabs{border-color:#e4edf5}.tabs button{color:#60778c;border-radius:12px 12px 0 0}.tabs button.active{background:#eaf7ff;color:#087fc2;border-color:#159fe0}.tabs span{background:#d9effd;color:#087fc2}.settings-card,.round-card,.question-card{background:white;border-color:#d7e6f2;border-radius:20px}.types label{background:#f4fbff;border-color:#d7e6f2;border-radius:12px}.types input{accent-color:#087fc2}input,select,textarea{color:#18334b;border-color:#d7e6f2;border-radius:12px}.selection-note{background:#eaf7ff;color:#31536d}.bulk-box{background:#f4fbff;border-color:#d7e6f2}.bulk-box pre{background:white;color:#31536d}.empty-bank{border-color:#c4e0f4;color:#60778c}.question-meta{color:#087fc2}.illustration{border-color:#d7e6f2}.answer{background:#f4fbff;border-color:#8dcdf2;color:#18334b}.answer button{background:white;color:#087fc2}.tile{background:#eaf7ff;color:#087fc2;border-color:#9cd4f2;border-bottom-color:#159fe0}.choice{background:white;border-color:#d7e6f2;border-bottom-color:#9cd4f2;color:#18334b}.choice b{color:#087fc2}.feedback{color:#c63b30}footer{color:#60778c}.timer{color:#31536d}
button.primary,.primary,.start{background:#087fc2;color:white;border-color:#087fc2;border-radius:14px;font-weight:900}.secondary{background:#eaf7ff;color:#087fc2;border-color:#d7e6f2;border-radius:14px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:#159fe0}
@media(max-width:540px){header{padding:12px;margin-bottom:14px}.brand img{width:92px;height:42px}.brand{font-size:11px}.brand small{display:none}}

.primary{box-shadow:0 4px #076da5}.secondary{box-shadow:0 2px #d7e6f2}

@media(max-width:540px){header{flex-wrap:wrap}.utilities{margin-left:auto;flex-wrap:wrap}.utilities #soundBtn{font-size:11px}}
/* Story scene is contained within the arena; BLOOMTools controls stay consistent. */
.arena canvas{z-index:2;width:140px;height:150px;bottom:14px}#monster{width:155px;height:160px}.arena.night-scene{height:330px;background:#0c1535 url('assets/rescue/night.png') center 63%/cover no-repeat;border-color:#798ed0;transition:background-color .8s}.night-scene>.moon,.night-scene>.mountain,.night-scene>.ground,.night-scene>.castle{display:none}.night-scene .hud{color:#fff;text-shadow:2px 2px #080d27}.night-scene .arena-title{color:#b0f7ec}.night-scene canvas{bottom:23px;width:155px;height:175px}.night-scene #monster{width:170px;height:185px}.night-scene #speech{bottom:200px}#princessScene{position:absolute;right:1.5%;bottom:20px;width:120px;height:160px;z-index:1}#princessScene>img{position:absolute;bottom:0;width:100%;height:140px;object-fit:contain}#princessSpeech{position:absolute;bottom:145px;right:0;min-width:90px;max-width:150px;width:max-content;background:#fff8e9;color:#543377;border:3px solid #6a4096;box-shadow:4px 4px #0006;padding:10px 8px;line-height:0}#princessSpeech:after{content:'';position:absolute;right:24px;bottom:-10px;width:9px;height:10px;background:#fff8e9;border-bottom:3px solid #6a4096;border-right:3px solid #6a4096}#princessSpeech svg{width:100%;height:14px;min-width:70px}#roundCurtain{position:fixed;inset:0;z-index:1000;background:#050819;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:35px;color:#b1fff1;text-align:center;animation:nightfall .85s ease-out}#roundPixelTitle{width:min(78vw,850px);filter:drop-shadow(7px 7px #6544a2)}#roundPixelTitle svg{display:block;width:100%}#roundCurtain p{font-family:monospace;font-weight:900;font-size:clamp(12px,2vw,22px);letter-spacing:4px;color:#fff}.princess-rescued #princessSpeech{color:#08774e;border-color:#08774e}.princess-rescued #princessScene{filter:drop-shadow(0 0 12px #a6fff0)}@keyframes nightfall{from{opacity:0}to{opacity:1}}
@media(max-width:540px){.arena canvas{width:95px;height:120px}#monster{width:110px;height:130px}.arena.night-scene{height:285px}.night-scene canvas{width:105px;height:145px;bottom:20px}.night-scene #monster{width:115px;height:150px}#princessScene{width:75px;height:130px;right:0;bottom:20px}#princessScene>img{height:110px}#princessSpeech{bottom:118px;min-width:68px;padding:7px 5px;max-width:105px}#princessSpeech svg{height:10px;min-width:50px}.night-scene #speech{bottom:165px}}
.arena.night-scene{background-position:center top}
.arena.night-scene{height:auto;aspect-ratio:1672/941;min-height:330px;background-position:center;background-size:cover}
@media(max-width:540px){.arena.night-scene{height:310px;aspect-ratio:auto;background-size:100% 100%}}
/* Round 2: question UI shares one viewport with the battle scene. */
.night-play{overflow:hidden}.night-play header{height:76px;margin:0;padding-top:8px;padding-bottom:8px}.night-play header .brand img{height:52px}.night-play main{position:relative;max-width:none;height:calc(100dvh - 76px);padding:0 14px 12px}.night-play .arena.night-scene{height:100%;min-height:0;aspect-ratio:auto;background-size:100% 100%;border-radius:0;border:0}.night-play footer{display:none}.night-play .questbar{position:absolute;bottom:12px;left:14px;right:14px;z-index:4;background:#101d3ce8;color:#b7fff5;padding:9px 15px;font-size:12px;border:0}.night-play .progress{position:absolute;bottom:12px;left:14px;right:14px;z-index:5;height:3px}.night-play .hud{top:14px}.night-play .arena-title{display:none}
.night-play #play{position:absolute;top:65px;bottom:190px;left:19%;right:19%;z-index:3;padding:12px 16px;background:#13234bd9;color:#fff;border:4px solid #90e8e5;border-radius:0;box-shadow:0 -5px #36577c,0 5px #36577c,5px 0 #36577c,-5px 0 #36577c;overflow:auto;scrollbar-width:thin;scrollbar-color:#88e5dd #162143;display:flex;flex-direction:column;gap:8px}.night-play #play[hidden]{display:none!important}.night-play .question-meta{color:#a9fff0;font-size:11px;margin:0}.night-play .timer{color:#fff;font-size:17px;font-weight:900}.night-play .question-title{color:#18334b;background:#fffdf4;padding:12px 16px;border:3px solid #93d4db;box-shadow:3px 3px #42617b;border-radius:0;margin:0;font-size:clamp(19px,2vw,28px);line-height:1.35;white-space:pre-line;font-family:Nunito,system-ui,sans-serif}.night-play .choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:6px 3px}.night-play .choice{font-family:Nunito,system-ui,sans-serif;font-size:clamp(17px,1.65vw,23px);font-weight:800;min-height:58px;padding:10px 14px;animation:none;border:3px solid #9edce6;border-radius:0;background:#f6fdff;box-shadow:4px 4px #426182}.night-play .choice:hover{background:#dcf7ff}.night-play .choice b{background:#087fc2;color:white;padding:3px 8px;font-size:16px}.night-play .feedback{color:#fff!important;margin:0;min-height:22px;font-size:14px}.night-play .play-bottom{margin:auto 0 0;color:#d3e6f4;font-size:10px;gap:8px}.night-play .skip{color:white;font-size:12px;font-weight:900;white-space:nowrap;padding:6px}.night-play .question-layout{grid-template-columns:115px 1fr;gap:12px}.night-play .illustration{width:115px;height:115px;border-radius:0;border:3px solid #8cdddd}.night-play .answer{margin:2px 0;min-height:48px;padding:8px;border:3px solid #81cfd6;border-radius:0;background:#fffdf4;font-size:20px}.night-play .answer button{border-radius:0}.night-play .bank{min-height:0;padding:10px 0;gap:8px}.night-play .tile{animation:none;border-radius:0;font-family:Nunito,system-ui,sans-serif;font-size:18px;padding:8px 12px;box-shadow:2px 2px #426182}.night-play .play-actions button{border-radius:0;padding:7px 12px;min-height:36px}.night-play .note{color:#cfe8f8;font-size:11px;margin:6px 0}.night-play .intro{padding:10px}.night-play .intro h1{color:white}.night-play .intro p{color:#d3e6f4}.night-play .end-stat{margin:10px 0}.night-play .win{font-size:38px}
@media(max-height:720px) and (min-width:701px){.night-play header{height:62px}.night-play main{height:calc(100dvh - 62px)}.night-play #play{top:54px;bottom:140px;gap:6px;padding:10px 13px}.night-play .night-scene canvas{height:125px;width:115px}.night-play .night-scene #monster{height:135px;width:145px}.night-play #princessScene{height:110px;width:90px;bottom:36px}.night-play #princessScene>img{height:100px}.night-play #princessSpeech{bottom:108px}.night-play .question-title{font-size:20px;padding:8px 12px}.night-play .choice{font-size:18px;min-height:48px;padding:8px 12px}.night-play .question-meta{font-size:10px}}
@media(max-width:700px){.night-play header{height:64px;flex-wrap:nowrap;padding:8px}.night-play header .brand{font-size:10px;gap:5px}.night-play header .brand img{width:75px;height:38px}.night-play header .brand small{display:none}.night-play header .utilities{gap:4px;flex-wrap:nowrap}.night-play header .utilities button,.night-play header .utilities a{padding:7px 6px;font-size:10px}.night-play header .utilities #setupBtn{font-size:0}.night-play main{height:calc(100dvh - 64px);padding:0 6px 6px}.night-play #play{top:64px;bottom:154px;left:18px;right:18px;padding:10px;gap:7px}.night-play .questbar,.night-play .progress{left:6px;right:6px;bottom:6px}.night-play .questbar{font-size:9px}.night-play .question-title{font-size:18px;padding:9px 10px}.night-play .choices{gap:9px}.night-play .choice{font-size:16px;min-height:50px;gap:8px;padding:8px}.night-play .choice b{font-size:13px;padding:2px 5px}.night-play .question-layout{grid-template-columns:75px 1fr}.night-play .illustration{width:75px;height:90px;padding:4px}.night-play .night-scene canvas{height:115px;width:90px;bottom:35px}.night-play .night-scene #monster{height:120px;width:115px}.night-play #princessScene{bottom:35px;width:70px;height:100px}.night-play #princessScene>img{height:95px}.night-play #princessSpeech{bottom:102px}.night-play .play-bottom>span{display:none}.night-play .bank{gap:5px}.night-play .tile{font-size:16px;padding:6px 8px}.night-play .feedback{font-size:12px}.night-play .hud{left:12px;right:12px}.night-play .end-stat{gap:12px}}
@media(max-height:500px) and (orientation:landscape){.night-play #play{top:48px;bottom:40px;left:21%;right:21%}.night-play .night-scene canvas{width:75px;height:90px;bottom:35px}.night-play .night-scene #monster{width:85px;height:95px}.night-play #princessScene{display:none}.night-play .question-title{font-size:16px}.night-play .choice{font-size:15px;min-height:40px}.night-play .question-meta{font-size:9px}.night-play .play-bottom{margin:0}}
.night-play #play{bottom:auto;max-height:calc(100% - 265px)}.night-play .play-bottom{margin:8px 0 0}.night-play .question-title,.night-play .choice{clip-path:polygon(0 6px,6px 6px,6px 0,calc(100% - 6px) 0,calc(100% - 6px) 6px,100% 6px,100% calc(100% - 6px),calc(100% - 6px) calc(100% - 6px),calc(100% - 6px) 100%,6px 100%,6px calc(100% - 6px),0 calc(100% - 6px))}
@media(max-height:720px) and (min-width:701px){.night-play #play{max-height:calc(100% - 200px)}}
@media(max-width:700px){.night-play #play{max-height:calc(100% - 218px)}}
@media(max-height:500px) and (orientation:landscape){.night-play #play{max-height:calc(100% - 100px)}}
#languageBtn{font-weight:900;white-space:nowrap;background:#eaf7ff;color:#087fc2;border-color:#c6e4f7}
@media(max-width:540px){header{flex-wrap:wrap}.utilities{flex-wrap:wrap}.night-play header .brand span{display:none}.night-play header .utilities #soundBtn{max-width:80px;overflow:hidden}.night-play #languageBtn{font-size:10px;padding:7px 5px}}

.add-question{flex-wrap:wrap;align-items:flex-end}.quick-question-count{display:flex;flex-direction:column;gap:5px;font-size:12px;min-width:125px}.quick-question-count select{width:100%}.question-fields>.image-picker{margin:0 0 14px;display:flex;gap:16px;flex-wrap:wrap;align-items:center}.quick-question-note{margin:12px 0}.quick-question-count select{min-height:44px}@media(max-width:540px){.add-question>select{flex-basis:100%}.quick-question-count{flex:1}}

.editor-section{border-top:2px solid #dcecf6;margin-top:28px;padding-top:28px}.save-question-bank{padding:22px 0 6px}.saved-set-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.saved-set-card{border:2px solid #dcecf6;border-radius:22px;background:#f7fbff;padding:22px;overflow-wrap:anywhere}.save-dialog{width:min(480px,92vw);border:2px solid #d3e9f7;border-radius:24px;padding:28px;background:white;color:#19364f}.save-dialog::backdrop{background:#19364f99}.save-dialog input{width:100%;margin:10px 0 20px}.save-dialog .library-controls{justify-content:flex-end}#saveDialogError{color:#ad3635}

.retry-overlay{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:#07182b77;pointer-events:auto}.retry-pixel{color:#ff303d;width:min(85vw,850px);padding:30px 24px;background:#fff8ed;border:6px solid #b71e2e;box-shadow:8px 8px 0 #4c1425;image-rendering:pixelated}.retry-pixel svg{display:block;width:100%;height:auto;filter:drop-shadow(2px 2px 0 #7b1124)}
/* Crystal Quest welcome and shared teacher panel */
body.home{background:#10b9ec;overflow:hidden}body.home>main{display:none}body.home>header{position:fixed;inset:0 0 auto;z-index:10;max-width:none;background:#10365396;border-bottom:1px solid #b8edff55;padding:14px 3vw}body.home header .brand span{display:none}#welcome{display:none}.home #welcome{display:flex;position:fixed;inset:0;background:linear-gradient(90deg,#0b315e28,transparent 70%),url('assets/landing.png') center/cover no-repeat;align-items:center;padding:90px 7vw 70px}.welcome-content{width:min(690px,55vw);position:relative;z-index:1}.welcome-kicker{color:#fff;letter-spacing:4px;font-size:13px;font-weight:900;text-shadow:2px 2px #164b72}#welcomeTitle{margin:25px 0;color:#fff4b0;filter:drop-shadow(5px 5px 0 #173a66) drop-shadow(-2px -2px 0 #173a66)}#welcomeTitle span{display:block;margin:16px 0}#welcomeTitle svg{display:block;width:100%;max-height:115px;overflow:visible}#titleLine2{max-width:85%}.welcome-desc{font-size:clamp(17px,1.5vw,23px);font-weight:900;line-height:1.5;color:white;max-width:500px;text-shadow:2px 2px 2px #164b72}.welcome-actions{display:flex;flex-direction:column;align-items:flex-start;gap:14px;margin-top:24px}.welcome-actions button{font-size:19px;padding:13px 28px;border:3px solid white;box-shadow:0 5px 0 #164b7266}.welcome-actions .primary{background:linear-gradient(#ffe996,#ffc52c);color:#25425c;min-width:210px;font-size:25px}.welcome-actions .secondary{background:#e7f6ff;color:#1a5b87}.welcome-gem{position:absolute;right:19%;top:26%;font-size:55px;color:#fff9b8;text-shadow:0 0 30px white;animation:gemfloat 3s ease-in-out infinite}@keyframes gemfloat{50%{transform:translateY(-13px);opacity:.6}}
.settings-open{overflow:hidden}.teacher-panel{position:fixed;inset:18px;z-index:1000;overflow:auto;border:5px solid #ffd459!important;border-radius:32px!important;background:linear-gradient(120deg,#fffdf4,#eef9ff)!important;padding:30px!important;box-shadow:0 0 0 50vmax #03182bd9!important;max-width:1600px;margin:auto;color:#193f65;overscroll-behavior:contain}.teacher-panel .setup-title{padding-right:50px}.teacher-panel .setup-title h1{font-size:36px;color:#173e6a}.teacher-panel .setup-title p{font-size:16px}.close-settings{position:absolute;top:16px;right:18px;border:0;border-radius:50%;width:44px;height:44px;background:#dff1ff;color:#173e6a;font-size:30px;z-index:2}.teacher-panel .settings-grid{grid-template-columns:1fr 2fr;gap:20px;margin-top:18px}.teacher-panel #roundRows{display:grid;grid-template-columns:1fr 1fr;gap:18px}.teacher-panel .settings-card,.teacher-panel .round-card{background:#f7fcff;border-color:#c7e6f9;padding:18px;border-radius:18px}.teacher-panel .round-card{margin:0}.teacher-panel .types{gap:8px;flex-wrap:wrap}.teacher-panel .types label{padding:8px}.teacher-panel .round-top input{width:75px}.teacher-panel .editor-section{margin-top:0;padding-top:18px;border-top:0}.teacher-panel .round-tabs{margin-top:20px}.teacher-panel .set-toolbar{display:flex;justify-content:flex-end;margin:16px 0}.teacher-panel .tabs button{font-size:16px}.teacher-panel .question-card{background:#f7fcff}.teacher-panel .setup-footer{position:sticky;bottom:-30px;background:#eef9fff5;padding:16px 0 8px;z-index:3;gap:15px}.teacher-panel .setup-footer #startQuest{font-size:18px;padding:18px}.teacher-panel .bulk-box{margin-bottom:18px}.teacher-panel .save-question-bank{display:flex;align-items:center;gap:20px} .teacher-panel #roundCount{display:none}
@media(max-width:900px){.teacher-panel .settings-grid{grid-template-columns:1fr}.teacher-panel .setup-title h1{font-size:30px}.teacher-panel .setup-footer{flex-wrap:wrap}.welcome-content{width:65vw}.home #welcome{padding-left:6vw}.home header .utilities{gap:4px}.home header .utilities button,.home header .utilities a{font-size:11px;padding:8px}.home .brand img{width:85px}}
@media(max-width:600px){.home #welcome{background-position:60% center;align-items:center}.welcome-content{width:88vw}#welcomeTitle{max-width:85%}.welcome-desc{font-size:16px;max-width:300px}.welcome-kicker{font-size:10px;letter-spacing:2px}.welcome-actions button{font-size:16px;padding:10px 18px}.welcome-actions .primary{font-size:21px}.teacher-panel{inset:7px;padding:18px!important;border-radius:20px!important}.teacher-panel #roundRows{grid-template-columns:1fr}.teacher-panel .setup-title h1{font-size:27px}.teacher-panel .setup-footer{bottom:-18px}.teacher-panel .save-question-bank{display:block}.home header{flex-wrap:nowrap}.home header .brand{gap:0}.home header #setupBtn{display:none}}
.teacher-panel .set-toolbar{display:flex;align-items:flex-end;gap:10px;justify-content:stretch}.set-name-label,.set-list-label{flex:1;min-width:150px}.set-toolbar input,.set-toolbar select{width:100%;margin-top:6px}.set-toolbar button{white-space:nowrap;min-height:48px}@media(max-width:800px){.teacher-panel .set-toolbar{flex-wrap:wrap}.set-name-label,.set-list-label{flex-basis:40%}}
@media(max-height:760px) and (min-width:601px){.home #welcome{padding-top:85px;padding-bottom:28px}.welcome-content{width:min(630px,52vw)}#welcomeTitle{margin:12px 0}#welcomeTitle svg{max-height:78px}#welcomeTitle span{margin:12px 0}.welcome-kicker{margin:0}.welcome-desc{font-size:18px;margin:16px 0}.welcome-actions{gap:10px;margin-top:15px}.welcome-actions button{padding:9px 23px}.welcome-actions .primary{font-size:22px}.welcome-actions .secondary{font-size:16px}}
.teacher-panel .question-head,.teacher-panel .question-fields label{font-size:15px}.teacher-panel .question-fields input,.teacher-panel .question-fields textarea,.teacher-panel .question-fields select{font-size:17px}.teacher-panel .eyebrow{font-size:13px}
