:root{color-scheme:dark;--ink:#f2ecdc;--muted:#9aa9b3;--gold:#efc575;--plum:#b5a0e9;--sans:'Inter',sans-serif;--serif:'Kurale',serif;font-family:var(--sans);color:var(--ink);background:#0b1420}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font-family:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid #c0adee;outline-offset:5px}[hidden]{display:none!important}
.scene{position:relative;width:100%;height:100dvh;min-height:540px;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 53%,#243a43 0,#142630 30%,#0c1825 58%,#080f1b 100%)}
.tower-scene{position:absolute;inset:0;z-index:0}#towerCanvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}#towerCanvas:active{cursor:grabbing}
.masthead{position:absolute;z-index:3;top:30px;left:38px;right:38px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.wordmark{width:104px;height:auto;filter:brightness(0) invert(.93)}.edition{font-size:9px;letter-spacing:3px;color:#83989f}
.intro-panel{position:absolute;z-index:2;left:9%;top:43%;transform:translateY(-25%);max-width:260px}.kicker{font-size:9px;letter-spacing:2.8px;font-weight:600;color:var(--gold);margin:0 0 17px}.intro-panel h1{font:400 clamp(46px,5vw,70px)/1.02 var(--serif);letter-spacing:-2px;margin:0 0 22px}.intro-panel h1 em{font-weight:400;color:#c9dbc8}.subcopy{font-size:12px;line-height:1.8;color:#a5b6bd;margin:0 0 22px}.main-button{border:1px solid #d4b57880;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:35px;min-height:44px;padding:0 17px;background:#ebc67f;color:#1a2830;font-size:12px;font-weight:600;transition:background .2s,transform .2s}.main-button:hover{background:#ffdd96;transform:translateY(-1px)}.main-button span{font-size:19px;font-weight:400}.studio-links{display:flex;flex-direction:column;gap:10px;margin-top:24px}.character-link{font-size:10px;color:#829ba3;text-decoration:none}.character-link:hover{color:#d7e4df}
.game-ui{position:absolute;inset:0;z-index:2;pointer-events:none}.game-ui .panel{pointer-events:auto}.round-hud{position:absolute;top:27px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;font-size:11px;color:#c0cbd0;background:#0d1922b8;border:1px solid #acccd21c;border-radius:24px;padding:10px 16px;backdrop-filter:blur(12px)}.hud-track{width:60px;height:2px;background:#92b3b52b}.hud-track span{display:block;height:100%;background:#c1a1ea;transition:width .5s}#knowledgeCount{white-space:nowrap;color:#c5b2ed}.clock{display:flex;align-items:center;gap:6px;border-left:1px solid #647b7d55;padding-left:12px}.clock i{width:6px;height:6px;border-radius:50%;background:var(--gold)}
.tower-view{position:absolute;bottom:28px;right:32px;z-index:4;border:1px solid #9eb9c52c;background:#14232b9c;backdrop-filter:blur(12px);border-radius:22px;padding:11px 18px;color:#c3d2d4;font-size:10px}.tower-view:disabled{opacity:.4;cursor:default}.journey-hint{position:absolute;bottom:35px;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap;color:#c1d4d5;font-size:12px;letter-spacing:.3px;margin:0;padding:12px 18px;border-radius:24px;background:#0d1a24bf;backdrop-filter:blur(8px)}
.panel{background:linear-gradient(140deg,#172932f5,#101e29f7);border:1px solid #b8d6d42c;box-shadow:0 20px 80px #0005;backdrop-filter:blur(20px);border-radius:18px}.question-panel{position:absolute;width:min(520px,calc(100% - 40px));bottom:28px;left:50%;transform:translateX(-50%);padding:22px 25px;max-height:58vh;overflow:auto;animation:questionIn .35s ease-out}.question-meta{display:flex;justify-content:space-between;gap:12px;color:#c6addf;font-size:8px;letter-spacing:1.8px;margin-bottom:12px}.question-meta span+span{color:#839da5}.question-panel h2{font:400 26px/1.2 var(--serif);margin:0 0 17px;letter-spacing:-.4px}.options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.option{display:flex;align-items:center;gap:10px;border:1px solid #bed1d226;border-radius:8px;background:#d5edf007;color:#dfebea;min-height:46px;padding:9px 11px;text-align:left;font-size:12px;transition:background .2s,border-color .2s}.option:hover:not(:disabled){background:#c0dce21c;border-color:#c8b4ec80}.option-letter{color:#8fa9ae;font-size:9px;flex:none}.option.correct{background:#8ab99924;border-color:#a1d6a980;color:#d9f3da}.option.incorrect{background:#c1757f20;border-color:#d9919180}.option:disabled{cursor:default}.feedback{border-top:1px solid #acc3cb24;margin-top:16px;padding-top:13px}.feedback-top{display:flex;align-items:center;gap:8px;font-size:11px}.result-mark{color:#baddaf;font-weight:700}.feedback.wrong .result-mark{color:#ecaaa2}.score-pill{margin-left:auto;font-size:10px;color:#c7afe9}.feedback p{font-size:11px;line-height:1.6;color:#9fb3bc;margin:8px 0 12px}.next-button{margin-left:auto;min-height:34px;font-size:10px;padding:0 12px;background:transparent;color:var(--gold);border-color:#d9b46c44}.next-button:hover{background:#e0bd7920}.finish-panel{position:absolute;bottom:35px;left:50%;transform:translateX(-50%);width:min(390px,calc(100% - 40px));padding:25px 28px;text-align:center}.finish-panel h2{font:400 29px/1.15 var(--serif);margin:0 0 14px}.finish-panel .main-button{width:100%}.finish-panel .subcopy{font-size:11px}
#destinations{position:absolute;inset:0;pointer-events:none;overflow:hidden}.destination{position:absolute;left:0;top:0;width:44px;height:44px;margin:-22px;border:0;border-radius:50%;background:transparent;pointer-events:auto;display:grid;place-items:center;color:#e8d7ff;transition:opacity .25s}.destination:before{content:'';position:absolute;inset:9px;border:1px solid #d3b8ff66;border-radius:50%;box-shadow:0 0 20px #b391ed33;transition:inset .2s,border-color .2s}.destination:hover:before,.destination:focus-visible:before{inset:3px;border-color:#e7d5ffcc}.destination .destination-label{position:absolute;left:40px;white-space:nowrap;background:#10202be8;border:1px solid #c4dcdf26;padding:7px 10px;border-radius:6px;font-size:10px;color:#dbdfeb;opacity:0;transform:translateX(-4px);transition:opacity .2s,transform .2s;pointer-events:none}.destination:hover .destination-label,.destination:focus-visible .destination-label,.destination.suggested .destination-label{opacity:1;transform:none}.destination.suggested:before{animation:beacon 2.4s ease-in-out infinite}.destination:disabled{pointer-events:none;opacity:0}
@keyframes beacon{50%{box-shadow:0 0 28px #b391ed66;border-color:#e5d1ffcc}}@keyframes questionIn{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
@media(max-width:760px){.masthead{left:22px;right:22px;top:22px}.wordmark{width:89px}.edition{font-size:7px;letter-spacing:1.8px}.intro-panel{left:24px;top:auto;bottom:28px;transform:none;max-width:210px}.intro-panel h1{font-size:42px;margin-bottom:12px}.intro-panel .kicker{font-size:8px;margin-bottom:10px}.intro-panel .subcopy{font-size:11px;margin-bottom:14px}.studio-links{display:none}.round-hud{top:65px;padding:8px 13px;font-size:10px}.question-panel{bottom:18px;padding:18px;width:calc(100% - 28px);max-height:55vh}.question-panel h2{font-size:23px;margin-bottom:13px}.option{font-size:11px;min-height:45px;padding:9px}.question-meta{font-size:7px}.tower-view{bottom:20px;right:18px;padding:9px 12px}.journey-hint{bottom:66px;font-size:11px;max-width:90%;white-space:normal;width:max-content}.finish-panel{bottom:24px}.destination .destination-label{font-size:9px;left:37px}.score-pill{font-size:9px}}
@media(max-height:650px) and (min-width:761px){.question-panel{bottom:18px;padding:16px 20px;max-height:58vh}.question-panel h2{font-size:23px;margin-bottom:12px}.option{min-height:37px}.feedback{margin-top:10px;padding-top:9px}.intro-panel{top:30%}.intro-panel h1{font-size:46px}.studio-links{margin-top:15px}}
@media(prefers-reduced-motion:reduce){*,*:before{animation:none!important;transition:none!important}}
.round-hud{width:max-content;max-width:calc(100% - 32px);white-space:nowrap}
.home-button{position:absolute;top:75px;left:36px;pointer-events:auto;border:0;background:transparent;color:#9fb3ba;font-size:10px;padding:10px 0}.home-button:hover{color:#f1dfba}@media(max-width:760px){.home-button{top:69px;left:18px}}
.intro-panel{max-width:340px;top:50%;transform:translateY(-50%)}.intro-panel h1{font-size:clamp(42px,4.5vw,62px)}.intro-panel .subcopy{max-width:290px}.home-progress{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 10px;font-size:12px;color:#d2b7ed}.home-progress button{padding:9px 12px;border:1px solid #b3c8b94a;background:#95bfa815;border-radius:7px;font-size:11px;color:#dce6cd}.home-progress button:disabled{opacity:.45;cursor:default}.home-progress button:not(:disabled):hover{background:#95bfa82d}.home-notice{font-size:10px;line-height:1.6;color:#95a9ad;margin:0 0 20px}.intro-panel .studio-links{margin-top:18px}
@media(max-width:760px){.intro-panel{top:auto;max-width:none;transform:translateX(-50%)}.home-progress{justify-content:center;margin:0 0 8px}.home-notice{font-size:9px;margin-bottom:12px}.scene[data-phase=home] .sound-controls{top:15px;right:15px}.scene[data-phase=home] .masthead{display:flex}}
.mobile-story{display:none}@media(max-width:760px){.mobile-story{display:block;color:#adbdc4;font-size:11px;line-height:1.5;margin:0 auto 14px;max-width:250px}}
.feedback .story-whisper{font:italic 13px/1.4 var(--serif);color:#cfb9e5;margin:0 0 10px}.journey-hint{max-width:min(520px,85%);white-space:normal;line-height:1.6}
.edition{display:none}.sound-controls{position:absolute;z-index:6;top:22px;right:30px;display:flex;align-items:center;gap:4px}.sound-controls button{color:#c3d2d4;background:#14232bd9;border:1px solid #9eb9c52c;backdrop-filter:blur(12px);border-radius:22px;min-height:42px}.sound-toggle{display:flex;align-items:center;gap:8px;padding:0 13px;font-size:10px;min-width:108px;justify-content:center}.sound-toggle[aria-pressed=true]{color:#e6c890;border-color:#c3a96b55}.sound-toggle .sound-waves{display:none}.sound-toggle[aria-pressed=true] .sound-waves{display:block}.sound-toggle[aria-pressed=true] .sound-slash{display:none}#soundSettings{width:42px;font-size:22px}.sound-panel{position:absolute;right:0;top:51px;width:244px;padding:19px;border:1px solid #b8d6d435;border-radius:14px;background:#10202cf5;box-shadow:0 15px 45px #0007;color:#deebe8;backdrop-filter:blur(20px)}.sound-panel strong{font:22px var(--serif)}.sound-panel p{font-size:10px;line-height:1.55;color:#9bb1b8;margin:8px 0 15px}.sound-panel label{display:flex;align-items:center;gap:9px;margin:12px 0;font-size:12px}.sound-panel input{accent-color:#c1a3df}.sound-panel .volume-label{justify-content:space-between;margin:17px 0 6px}.sound-panel input[type=range]{width:100%;height:25px}.sound-panel #testSound{width:100%;min-height:35px;border-radius:7px;font-size:11px;margin-top:10px}.sound-panel #soundStatus{margin:10px 0 0;min-height:30px;font-size:10px}
@media(max-width:760px){.sound-controls{top:15px;right:15px}.sound-toggle{min-width:42px;width:42px;padding:0}.sound-toggle #soundLabel{display:none}.scene:not([data-phase=intro]) .sound-controls{top:67px;right:12px}}
@media(max-width:760px){.scene:not([data-phase=intro]) .masthead{display:none}.round-hud{top:20px}}
@media(max-width:760px){.intro-panel{left:50%;bottom:24px;transform:translateX(-50%);width:100%;max-width:none;text-align:center;padding-top:18px;background:linear-gradient(0deg,#03070bee,transparent)}.intro-panel .kicker,.intro-panel .subcopy{display:none}.intro-panel h1{font-size:29px;letter-spacing:-.8px;margin:0 0 13px}.intro-panel h1 br{display:none}.intro-panel h1 em{margin-left:.22em}.intro-panel .main-button{margin:auto;min-width:180px}.scene[data-phase=home] .sound-controls{top:15px;right:15px}.scene[data-phase=home] .masthead{display:flex}.intro-panel #homeLevel{display:block;font-size:8px;margin-bottom:10px}}

.defense-builder{margin:14px 0;max-height:32vh;overflow:auto;font-size:11px;color:#c3d6d5}.defense-builder>p{color:#bfa5d7;font-size:10px}.defense-builder details{border-top:1px solid #a8c4ca33;padding:9px 0}.defense-builder summary{cursor:pointer;padding:5px 0}.defense-slot{display:flex;gap:6px;margin:7px 0;flex-wrap:wrap}.defense-slot button,.defense-slot select{font:10px var(--sans);color:#e3e9dc;border:1px solid #9fb5ad55;background:#172b34;border-radius:6px;padding:9px}.defense-slot button:disabled{opacity:.45}.scene[data-phase=home] .intro-panel{max-height:85dvh;overflow:auto}@media(max-width:760px){.defense-builder{max-height:24vh;padding:0 20px}.defense-slot{justify-content:center}}
.question-panel[data-urgency=rising]{border-color:#d6b78066}.question-panel[data-urgency=high]{border-color:#e6b694aa;box-shadow:0 0 35px #dba77920,0 20px 80px #0005}.clock{transition:color .4s}.scene[data-phase=question] .clock{color:#e4c79d}

.build-controls{display:none;position:absolute;bottom:24px;left:50%;transform:translateX(-50%);z-index:4;gap:5px;padding:6px;border:1px solid #bad4ce40;border-radius:14px;background:#14232bee;flex-wrap:wrap;justify-content:center}.scene[data-phase=home]:not([data-quick=true]) .build-controls{display:flex}.build-controls button,.defense-builder>button{background:#a6c2b51a;color:#deebe5;border:1px solid #afc9c333;border-radius:8px;padding:10px;font-size:11px}.destination.build-slot:before{border-style:dashed;background:#b9d8bf22}.destination.build-slot:after{content:'+';font-size:22px;color:#deeadb}.scene[data-phase=home] .destination .destination-label{opacity:1;left:30px;font-size:9px}.scene[data-quick=true] #destinations{display:none}@media(max-width:760px){.build-controls{top:76px;bottom:auto;width:max-content;max-width:94%}.build-controls button{font-size:10px;padding:8px}.scene[data-phase=home] .destination .destination-label{opacity:0}.scene[data-phase=home] .destination:focus-visible .destination-label{opacity:1}}

.more-modes{margin-top:16px;font-size:11px;color:#a9bfc0}.more-modes summary{cursor:pointer;padding:8px 0}.more-modes .studio-links{margin-top:8px}.defense-builder{padding:14px;border:1px solid #b4c7c333;border-radius:12px;background:#142731ee}.defense-builder>p{margin-top:0}.scene[data-phase=home] .intro-panel h1{font-size:42px}.scene[data-phase=home] .destination .destination-label{opacity:0}.scene[data-phase=home] .destination:hover .destination-label,.scene[data-phase=home] .destination:focus-visible .destination-label{opacity:1}

/* Gentle interaction feedback without disturbing projected window positions. */
button:not(:disabled), a { transition: filter .32s ease, box-shadow .4s ease; }
@media (hover: hover) {
  button:not(:disabled):hover, a:hover { filter: brightness(1.07); box-shadow: 0 0 22px #c9ad7426; }
}
button:not(:disabled):active { filter: brightness(1.28); }
button:focus-visible, a:focus-visible { outline: 2px solid #d1b0ed; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  button:not(:disabled), a { transition: none; }
}

#questionPanel{bottom:auto;transform:translateX(-50%);width:min(560px,calc(100% - 32px));max-height:calc(100dvh - 125px);overflow:auto}

.defense-builder.tower-editor{position:absolute;z-index:8;width:270px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 110px);margin:0;padding:14px;background:#142731f5;box-shadow:0 12px 40px #0006;backdrop-filter:blur(14px)}
.tower-editor:before{content:'';position:absolute;top:-8px;left:calc(50% - 8px);width:14px;height:14px;transform:rotate(45deg);background:#142731;border-left:1px solid #b4c7c333;border-top:1px solid #b4c7c333}
.scene:not([data-phase=home]) .tower-editor{display:none}

.scene[data-phase=explore] .destination .destination-label{opacity:1;transform:none;border-color:var(--topic-color);color:var(--topic-color);font-size:10px}
.destination:before{border-color:var(--topic-color)}
.knowledge-mote{position:fixed;z-index:50;pointer-events:none;color:#ffe0a0;text-shadow:0 0 16px #c6a2ff;font-size:20px;font-weight:600;white-space:nowrap}
#knowledgeCount{color:#ebce93;font-weight:600;display:inline-block}

.narrator-caption{position:absolute;z-index:9;bottom:75px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(560px,90vw);padding:10px 18px;border-radius:14px;background:#0d1b22e8;color:#e7dbbd;font:italic 15px/1.5 var(--serif);text-align:center;pointer-events:none}

.potions{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}.potions button{border:1px solid #c4a0ff55;border-radius:18px;background:#ad8dd514;color:#d8c5ec;padding:8px 10px;font:10px var(--sans)}.potions button:disabled{opacity:.35}.potion-status{font-size:11px;line-height:1.5;color:#d9c49d;margin:10px 0 0}.option.eliminated{opacity:.18;text-decoration:line-through;pointer-events:none}

.destination-icon{position:relative;display:grid;place-items:center;z-index:1;width:28px;height:28px;font:16px var(--sans);color:var(--topic-color);text-shadow:0 0 10px var(--topic-color);pointer-events:none}
.destination:before{inset:7px;background:#101c24e8;border:1px solid var(--topic-color);box-shadow:0 0 12px color-mix(in srgb,var(--topic-color) 25%,transparent)}
.destination[data-hardness=medium]:before{border-radius:5px}
.destination[data-hardness=expert]:before,.destination[data-hardness=hard]:before{border-radius:4px;transform:rotate(45deg);inset:9px;border-width:2px}
.destination[data-built=false]:before{border-style:dashed;border-radius:50%}
.destination:hover:before,.destination:focus-visible:before{border-color:var(--topic-color)}

.destination-icon{display:none}.destination:before{background:transparent;box-shadow:none}.destination-label{padding-left:10px}
/* Built home windows use the same collectible silhouettes as quest windows. */
.scene[data-phase=home] .destination.has-token:before{border-color:transparent;background:transparent;box-shadow:none}

#destinations[data-overview=true] .destination .destination-label{display:none}

/* Frosted question surface keeps the moving tower soft behind the text. */
#questionPanel{
  background:linear-gradient(140deg,rgba(23,41,50,.714),rgba(16,30,41,.748));
  backdrop-filter:blur(24px) saturate(.75);
  -webkit-backdrop-filter:blur(24px) saturate(.75);
  border:1px solid rgba(190,213,214,.25);
  box-shadow:0 18px 60px #0006,inset 0 1px 0 #ffffff0c;
}

.potions button{display:inline-flex;align-items:center;gap:7px}.potion-icon{width:15px;height:15px;fill:currentColor;flex-shrink:0}

.story-slider{box-sizing:border-box;width:min(520px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;border:1px solid #c9b98555;border-radius:26px;padding:42px 38px 30px;background:radial-gradient(ellipse at top,#254b43,#101c29 70%);color:#f2ecdc;text-align:center;box-shadow:0 30px 100px #0009}
.story-slider::backdrop{background:#060d16bf;backdrop-filter:blur(12px)}
.story-wordmark{font:32px var(--serif);margin:8px 0 28px}.story-skip{position:absolute;top:14px;right:18px;background:none;border:0;color:#b8c5c0;font:11px var(--sans);padding:8px}.story-sigil{font:70px var(--serif);color:#e9cc89;text-shadow:0 0 35px #c4a0ff80;height:100px;display:grid;place-items:center}.story-slider h1{font:32px/1.15 var(--serif);margin:18px 0}.story-copy{font:17px/1.65 var(--serif);color:#e3e4d5;min-height:112px}.story-help{font:12px/1.7 var(--sans);color:#acbeb9;min-height:62px}.story-dots{display:flex;gap:10px;justify-content:center;margin:24px}.story-dots button{width:9px;height:9px;border:1px solid #c6b88e80;background:#b0bab033;border-radius:50%;padding:0}.story-dots button[aria-current=true]{background:#e9cc89;box-shadow:0 0 12px #e9cc8955}.story-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}.story-back{background:none;border:0;color:#c4cec5;padding:12px}.story-back:disabled{opacity:.25}.story-actions .main-button{flex:1;justify-content:center}@media(max-width:500px){.story-slider{padding:40px 24px 24px}.story-slider h1{font-size:28px}.story-copy{font-size:16px}}

/* Keyboard visibility, readable text and comfortable touch targets. */
.skip-link{position:fixed;top:10px;left:10px;z-index:100;background:#f2ecdc;color:#10202b;padding:12px 18px;transform:translateY(-160%)}.skip-link:focus{transform:none}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #ffe1a1;outline-offset:4px;box-shadow:0 0 0 6px #101b28}
.potions button,.defense-slot button,.defense-slot select,.story-back,.story-skip,.sound-controls button{min-height:44px}
.story-dots button{min-width:28px;min-height:28px;border:8px solid #152832;background-clip:padding-box}.story-dots{gap:2px}
.question-meta,.kicker{font-size:11px}.question-meta span+span,.home-notice,.story-help,.sound-panel p{color:#c2d0cb}
.destination .destination-label{font-size:12px!important;background:#10202bf5}
#destinations[data-overview=true] .destination:focus-visible .destination-label{display:block}
.defense-slot small{font-size:12px;line-height:1.5;color:#d0d8ce}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}
@media(forced-colors:active){button,select,input,.panel,.tower-editor{border:1px solid ButtonText}.destination:before{border-color:ButtonText}.destination-label{color:CanvasText!important;background:Canvas!important}}

.story-art{display:block;width:100%;height:190px;object-fit:contain;margin:-10px auto 12px}.story-slider .story-wordmark{margin-bottom:12px}.story-slider .story-sigil[hidden]{display:none}@media(max-height:750px){.story-art{height:125px}.story-slider{padding-top:30px}.story-copy{min-height:0}.story-help{min-height:0}}

/* Home HUD: the tower owns the center; status and actions sit at the edges. */
.scene[data-phase=home] #introPanel{
  position:absolute;inset:0;left:0;top:0;bottom:0;width:100%;max-width:none;max-height:none;
  padding:0;transform:none;background:none;overflow:visible;pointer-events:none;text-align:left;
}
#introPanel[hidden]{display:none}
.scene[data-phase=home] #homeLevel{
  display:block;position:absolute;top:84px;left:30px;max-width:calc(100% - 60px);
  margin:0;font-size:10px;line-height:1.6;letter-spacing:1.4px;color:#d5ddcf;
}
.scene[data-phase=home] .home-progress{display:contents}
.scene[data-phase=home] #homeBalance{
  position:absolute;top:112px;left:30px;padding:10px 15px;border:1px solid #d3ba7d55;
  border-radius:22px;background:#10202bdf;color:#f2db9f;font-size:13px;backdrop-filter:blur(12px);
}
.scene[data-phase=home] #upgradeButton{
  position:absolute;bottom:70px;left:30px;min-height:44px;pointer-events:auto;
  background:#142731ed;border-radius:12px;padding:12px 16px;font-size:12px;
}
.scene[data-phase=home] #homeNotice{
  position:absolute;left:30px;bottom:28px;max-width:260px;margin:0;font-size:11px;
  padding:6px 0;color:#d5ddcf;text-shadow:0 1px 5px #000;
}
.scene[data-phase=home] #startButton{
  position:absolute;bottom:30px;left:50%;transform:translateX(-50%);pointer-events:auto;
  min-height:50px;min-width:220px;margin:0;border-radius:26px;box-shadow:0 8px 30px #0005;
}
.scene[data-phase=home] #introPanel>.defense-builder{
  position:absolute;bottom:126px;left:30px;width:auto;max-width:230px;margin:0;
  padding:0;border:0;background:none;pointer-events:auto;
}
.scene[data-phase=home] #introPanel>.defense-builder button{
  min-height:44px;padding:10px 14px;border:1px solid #c2d2c755;border-radius:12px;
  background:#142731ed;color:#e0e8da;font-size:12px;
}
@media(max-width:760px){
 .scene[data-phase=home] #homeLevel{top:74px;left:18px;font-size:9px;max-width:calc(100% - 36px)}
 .scene[data-phase=home] #homeBalance{top:101px;left:18px}
 .scene[data-phase=home] #upgradeButton{bottom:94px;left:18px;font-size:11px}
 .scene[data-phase=home] #introPanel>.defense-builder{bottom:148px;left:18px;max-width:200px}
 .scene[data-phase=home] #homeNotice{bottom:72px;left:18px;font-size:10px;max-width:calc(100% - 36px)}
 .scene[data-phase=home] #startButton{bottom:14px;min-height:46px;min-width:210px}
 .scene[data-phase=home] .tower-view{bottom:94px;right:18px}
}

.defense-builder.tower-build-prompt{position:absolute;z-index:6;max-width:230px;margin:0;padding:0;border:0;background:none;overflow:visible;pointer-events:auto}
.tower-build-prompt button{min-height:44px;padding:10px 16px;border:1px dashed #dfcb91;border-radius:24px;background:#142731ed;color:#f1dfab;font:12px var(--sans);box-shadow:0 6px 25px #0005}
.scene:not([data-phase=home]) .tower-build-prompt{display:none}
#homeButton{display:inline-flex;align-items:center;gap:10px;top:82px;left:30px;min-height:46px;padding:11px 16px;border:1px solid #b9cbd34a;border-radius:14px;background:linear-gradient(135deg,#20333fee,#10202bef);color:#edf0e6;font:600 13px/1.3 var(--sans);letter-spacing:.15px;box-shadow:0 4px 18px #0003;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);cursor:pointer}
#homeButton svg{flex-shrink:0;color:#e8ce92}
#homeButton:hover{background:#2b414e;border-color:#dbc58b88;color:#fff5df}
@media(max-width:760px){#homeButton{top:78px;left:18px;min-height:44px;padding:10px 13px;font-size:12px}}

/* Quiet question layout: generous rhythm, restrained controls, clear hierarchy. */
#questionPanel{
  width:min(600px,calc(100% - 40px));padding:32px;
  border-radius:24px;border-color:rgba(190,213,214,.18);
  box-shadow:0 20px 64px #0004;
  scrollbar-width:thin;scrollbar-color:#b9cccf50 transparent;
}
#questionPanel .question-meta{
  gap:12px 24px;flex-wrap:wrap;margin:0 0 20px;
  font:500 10px/1.5 var(--sans);letter-spacing:1.1px;
}
#questionPanel .question-meta span+span{color:#bbc9cd;letter-spacing:.5px}
#questionPanel h2{font-size:30px;line-height:1.25;letter-spacing:-.5px;margin:0 0 28px;text-wrap:balance}
#questionPanel .options{gap:12px}
#questionPanel .option{
  min-height:58px;padding:14px 16px;gap:14px;border-radius:12px;
  font-size:14px;line-height:1.45;background:#d5edf006;border-color:#bed1d22e;
}
#questionPanel .option-letter{font:500 10px/1 var(--sans);color:#b3c4c8}
#questionPanel .option:hover:not(:disabled){background:#d5edf014;border-color:#c8b4ec88}
#questionPanel .option.correct{background:#8ab99924;border-color:#a1d6a980}
#questionPanel .option.incorrect{background:#c1757f20;border-color:#d9919180}
#questionPanel .potions{
  margin-top:28px;padding-top:20px;border-top:1px solid #bed1d21c;gap:8px;justify-content:center;
}
#questionPanel .potions button{
  min-height:44px;padding:10px 12px;border-radius:10px;border-color:transparent;
  background:transparent;color:#ddd3eb;font:500 11px/1.4 var(--sans);gap:8px;
}
#questionPanel .potions button:hover:not(:disabled){background:#c4a0ff12;border-color:#c4a0ff35}
#questionPanel .potion-status{margin:12px 0 0;font-size:12px;line-height:1.6}
#questionPanel .potion-status:empty{display:none}
#questionPanel .feedback{margin-top:24px;padding-top:24px}
#questionPanel .feedback-top{gap:10px;flex-wrap:wrap;font-size:13px;line-height:1.5}
#questionPanel .feedback p{font-size:13px;line-height:1.65;margin:12px 0 20px;color:#ced8dc}
#questionPanel .feedback .story-whisper{font-size:12px;color:#c4b6d4;margin:0 0 12px}
#questionPanel .next-button{min-height:44px;padding:12px 16px;border-radius:10px;font-size:12px}
@media(max-width:600px){
 #questionPanel{width:calc(100% - 28px);padding:24px;border-radius:20px}
 #questionPanel h2{font-size:26px;margin-bottom:24px}
 #questionPanel .question-meta{margin-bottom:16px}
 #questionPanel .option{padding:12px;min-height:54px;font-size:13px;gap:10px}
 #questionPanel .potions{margin-top:24px;padding-top:16px;gap:4px}
 #questionPanel .potions button{padding:10px 8px}
}
@media(max-width:360px){#questionPanel .options{grid-template-columns:1fr}}
@media(max-height:700px){
 #questionPanel{padding:20px 24px}
 #questionPanel h2{font-size:25px;margin-bottom:20px}
 #questionPanel .question-meta{margin-bottom:12px}
 #questionPanel .option{min-height:48px;padding:10px 14px}
 #questionPanel .potions{margin-top:20px;padding-top:12px}
}

/* Results replace choices rather than stacking another panel beneath them. */
#questionPanel .options[hidden],#questionPanel .potions[hidden]{display:none}
#questionPanel:has(.feedback:not([hidden])) .story-whisper{display:none}
#questionPanel:has(.feedback:not([hidden])) .feedback{margin-top:0;padding-top:20px}
#questionPanel .feedback .answer-summary{font-size:20px;line-height:1.4;color:#f0f2e9;margin:16px 0 8px}
.keeper-progress{position:absolute;left:30px;top:165px;width:215px;display:grid;gap:8px;padding:16px;border:1px solid #bed1d222;border-radius:16px;background:#10202bd9;font:12px/1.5 var(--sans);color:#e7e9df;backdrop-filter:blur(16px)}
.keeper-progress span,.keeper-progress small{color:#c0cbd0;font-size:11px}.keeper-progress progress{width:100%;height:5px;accent-color:#d5b9ef}.keeper-progress progress::-webkit-progress-bar{background:#ffffff18;border-radius:6px}.keeper-progress progress::-webkit-progress-value{background:#d5b9ef;border-radius:6px}
#keeperSummary{font:13px/1.7 var(--sans);color:#d9c4ee;margin:20px 0}
@media(max-width:760px){.keeper-progress{left:18px;top:155px;width:180px;padding:12px}}
.profile-button{pointer-events:auto;position:fixed;left:30px;top:52px;background:transparent;border:0;color:#d9c5ee;font:12px var(--sans);min-height:44px;padding:8px 0;cursor:pointer}
.knowling-profile{width:min(440px,calc(100vw - 32px));box-sizing:border-box;max-height:calc(100dvh - 40px);overflow:auto;padding:36px;border:1px solid #bed1d233;border-radius:24px;background:#14252df5;color:#ecede5;box-shadow:0 24px 80px #0008}
.knowling-profile::backdrop{background:#020812b8;backdrop-filter:blur(12px)}
.knowling-profile h2{font:30px/1.2 var(--serif);margin:16px 0 28px}.profile-close{position:absolute;right:16px;top:12px;min-width:44px;min-height:44px;background:none;border:0;color:#d8e1e1;font-size:26px;cursor:pointer}
.profile-name{display:grid;gap:10px;font:12px var(--sans);color:#bfcdd0}.profile-name input{min-height:46px;padding:10px 14px;border:1px solid #bed1d23a;border-radius:10px;background:#ffffff06;color:#f1eee4;font:16px var(--sans);box-sizing:border-box;width:100%}
.profile-rank{margin:28px 0 12px;color:#dfc5f5;font:600 15px var(--sans)}.knowling-profile progress{width:100%;height:6px;accent-color:#d5b9ef}.profile-xp,.profile-saved{font:12px/1.6 var(--sans);color:#bccbd0}
.profile-stats{display:grid;gap:16px;margin:28px 0;padding:24px 0;border-block:1px solid #bed1d222}.profile-stats div{display:flex;justify-content:space-between;gap:20px;font:13px var(--sans)}.profile-stats dt{color:#bccbd0}.profile-stats dd{margin:0;color:#f0d597;font-weight:600}
.profile-badges h3{font:600 13px var(--sans)}.profile-badges p{font:14px/1.7 var(--sans);color:#d9c5ee}
@media(max-width:760px){.profile-button{left:18px;top:43px}.knowling-profile{padding:28px}}
.profile-badges .badge-collection{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.collectible-badge{display:flex;flex-direction:column;align-items:center;padding:12px 8px 16px;gap:8px;border:1px solid #d6bbef24;border-radius:16px;background:#ffffff04;color:#ece4f4;text-align:center;cursor:pointer}.badge-art{display:block;width:120px;max-width:100%;aspect-ratio:1;background-image:url('assets/badges/keeper-medallions.webp');background-size:200% 200%;background-repeat:no-repeat}.collectible-badge strong{font:600 12px var(--sans)}.collectible-badge small{font:11px/1.5 var(--sans);color:#c1cbd0}.collectible-badge.locked .badge-art{filter:grayscale(1);opacity:.3}.collectible-badge.earned{border-color:#d6b57955;background:#d6b57908}.collectible-badge:hover{background:#ffffff0b}
.profile-resource{display:flex;align-items:center;gap:16px;margin:24px 0;padding:18px 12px;border:1px solid #c6a1ef35;border-radius:18px;background:radial-gradient(ellipse at left,#9e6cbb18,transparent 80%)}.profile-resource img{width:110px;height:110px;object-fit:contain;flex:none}.profile-resource h3{font:600 14px var(--sans);margin:0 0 8px}.profile-resource strong{color:#f0d597;font:600 18px var(--sans)}.profile-resource p{font:12px/1.5 var(--sans);margin:10px 0;color:#dbd2e9}.profile-resource small{display:block;color:#becbd0;font:11px/1.6 var(--sans)}
@media(max-width:400px){.profile-resource{flex-direction:column;text-align:center}.profile-resource img{width:130px;height:100px}}
.profile-items{margin:28px 0}.profile-items h3{font:600 14px var(--sans)}.supply-grid{display:grid;gap:12px}.supply-card{display:grid;grid-template-columns:85px 1fr;column-gap:14px;padding:14px;border:1px solid #c6a1ef25;border-radius:16px;background:#ffffff03}.supply-art{grid-row:1/4;width:85px;height:100px;background-image:url('assets/badges/magical-supplies.webp');background-size:300% 100%;background-repeat:no-repeat;align-self:center}.supply-card h4{margin:4px 0 8px;font:600 13px var(--sans)}.supply-card strong{font:12px var(--sans);color:#ead19a}.supply-card p{font:11px/1.6 var(--sans);color:#c0cbd0;margin:8px 0 0}
#timePotion .potion-art::before,#eliminatePotion .potion-art::before{content:'';display:block;flex:none;width:30px;height:34px;background-image:url('assets/badges/magical-supplies.webp');background-size:300% 100%;background-repeat:no-repeat}#timePotion .potion-art::before{background-position:50% center}#eliminatePotion .potion-art::before{background-position:100% center}#timePotion .potion-icon,#eliminatePotion .potion-icon{display:none}
/* Profile becomes a dedicated, spacious destination. */
.profile-button{position:fixed;left:auto;top:22px;right:212px;width:46px;height:46px;min-height:46px;padding:0;border:1px solid #dbc58b55;border-radius:50%;background:#12222d;overflow:hidden;z-index:20}
.avatar-art{display:block;width:100%;height:100%;background-image:url('assets/badges/avatar-oracle.webp');background-size:200% 100%;background-position:left center;background-repeat:no-repeat}
.knowling-profile{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;border:0;border-radius:0;padding:64px max(32px,calc((100vw - 1000px)/2));background:radial-gradient(ellipse at 20% 0,#263d3e,#101b27 65%);display:none}
.knowling-profile[open]{display:block}.knowling-profile .profile-close{position:fixed;right:28px;top:24px;border:1px solid #bed1d233;border-radius:50%;background:#14252d;z-index:2}
.profile-portrait{width:112px;height:112px;margin:0 0 28px}.knowling-profile h2{font-size:42px;margin-bottom:32px}.profile-name{max-width:360px}.profile-rank,.profile-xp,.knowling-profile>progress{max-width:460px}.profile-stats{grid-template-columns:1fr 1fr;gap:24px 48px}.profile-resource{padding:24px;max-width:600px}.profile-items .supply-grid{grid-template-columns:repeat(3,1fr)}.profile-items .supply-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:24px 18px}.profile-items .supply-art{width:110px;height:130px}.profile-badges .badge-collection{grid-template-columns:repeat(4,1fr)}.profile-badges .collectible-badge{padding:24px 12px}.profile-badges .badge-art{width:150px}
#averagePotion:before{content:'';display:block;flex:none;width:30px;height:34px;background:url('assets/badges/avatar-oracle.webp') right center/200% 100% no-repeat}#averagePotion .potion-icon{display:none}
@media(max-width:760px){.profile-button{top:22px;right:206px}.knowling-profile{padding:36px 24px}.knowling-profile h2{font-size:32px}.profile-items .supply-grid{grid-template-columns:1fr}.profile-items .supply-card{display:grid;grid-template-columns:85px 1fr;text-align:left;padding:16px}.profile-items .supply-art{width:85px;height:100px}.profile-badges .badge-collection{grid-template-columns:1fr 1fr}.profile-stats{grid-template-columns:1fr;gap:18px}}
@media(max-width:760px){.profile-button{top:15px;right:122px}.scene:not([data-phase=home])~.profile-button{top:67px}}
/* Keep building currency alongside the player identity. */
.scene[data-phase=home] #homeBalance{position:fixed;top:22px;left:auto;right:270px;min-height:46px;box-sizing:border-box;display:flex;align-items:center;margin:0;padding:10px 16px;z-index:10}
@media(max-width:760px){.scene[data-phase=home] #homeBalance{top:70px;right:18px;left:auto;min-height:40px;font-size:12px;padding:8px 12px}}
.scene[data-phase=home] #startButton{left:auto;right:28px;bottom:26px;transform:none;min-width:260px;min-height:68px;padding:18px 30px;border:0;border-radius:0;background:transparent url('assets/badges/gather-button.webp') center/100% 100% no-repeat;color:#202b30;font-weight:650;box-shadow:none;filter:drop-shadow(0 8px 18px #0005);transition:filter .2s,translate .2s}
.scene[data-phase=home] #startButton:hover{filter:brightness(1.12) drop-shadow(0 8px 22px #b69b6340);translate:0 -2px}
.scene[data-phase=home] .tower-view{right:auto;left:50%;bottom:35px;transform:translateX(-50%)}
@media(max-width:760px){.scene[data-phase=home] #startButton{right:14px;bottom:18px;min-width:220px;min-height:60px;padding:16px 24px}.scene[data-phase=home] .tower-view{left:18px;right:auto;bottom:28px;transform:none}.scene[data-phase=home] #upgradeButton{bottom:112px}.scene[data-phase=home] #homeNotice{bottom:88px}}
.scene[data-phase=home] #startButton{background-size:100% 150%}
.defense-builder.tower-editor{width:min(390px,calc(100vw - 32px));max-height:calc(100dvh - 140px);overflow:auto;padding:22px;border-radius:20px;background:#152831f5;backdrop-filter:blur(24px)}.tower-editor .defense-slot{display:block}.tower-editor .defense-slot h3{font:600 12px var(--sans);color:#e5e9df;margin:22px 0 12px}.tower-editor .defense-slot>small{display:block;margin:8px 0 12px}.window-style-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.tower-editor .window-style-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px;min-height:120px;border:1px solid #c7d3ca30;border-radius:12px;background:#ffffff04;color:#e6ece5}.window-style-card strong{font:500 11px var(--sans)}.window-style-card small{font:10px var(--sans);color:#bdcbd0}.window-style-card[aria-pressed=true]{border-color:#ead19a;background:#ead19a10;opacity:1}.window-style-preview{display:block;position:relative;width:30px;height:44px;border:6px solid #a6a28b;border-bottom-width:8px;border-radius:18px 18px 2px 2px;background:linear-gradient(90deg,#335946 44%,#c9ab62 45% 55%,#335946 56%);box-shadow:0 3px 0 #d1b773}.window-style-card[data-style=classic] .window-style-preview{border-color:#eee2c6}.window-style-card[data-style=mint] .window-style-preview{border-color:#8ec6b0}.window-style-card[data-style=royal] .window-style-preview:after{content:'';position:absolute;right:-13px;top:8px;width:9px;height:29px;background:#a73e49;border-bottom:3px solid #dab768}.window-style-card[data-style=garden] .window-style-preview:after{content:'';position:absolute;left:-10px;top:2px;width:8px;height:35px;background:repeating-linear-gradient(35deg,#718f45 0 6px,#a2b572 6px 10px);border-radius:6px}.window-style-card[data-style=sandstone] .window-style-preview{border-color:#d8b684}
/* Generated architectural thumbnails correspond to the six available finishes. */
.window-style-card .window-style-preview{width:82px;max-width:100%;height:82px;border:0;border-radius:0;box-shadow:none;background-image:url('assets/badges/window-styles.webp');background-size:300% 200%;background-repeat:no-repeat;background-position:0 0}
.window-style-card .window-style-preview:after{display:none!important}
.window-style-card[data-style=classic] .window-style-preview{background-position:50% 0}
.window-style-card[data-style=mint] .window-style-preview{background-position:100% 0}
.window-style-card[data-style=royal] .window-style-preview{background-position:0 100%}
.window-style-card[data-style=garden] .window-style-preview{background-position:50% 100%}
.window-style-card[data-style=sandstone] .window-style-preview{background-position:100% 100%}
.tower-editor .window-style-card{min-height:150px;padding:10px 6px}
.window-style-card .window-style-preview.actual-window-preview{background-size:contain;background-position:center!important}
.window-style-carousel{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:12px;margin:12px 0 0}.tower-editor .window-style-carousel button{min-width:44px;min-height:44px;padding:8px;font-size:21px;border-radius:50%;background:#ffffff08;border:1px solid #bed1d233;color:#ead19a}.window-carousel-preview{display:block;width:100%;height:150px;object-fit:contain}.window-style-caption{text-align:center;font:13px/1.5 var(--sans);color:#e3e8df;margin:0 0 14px}.tower-editor .window-style-apply{display:block;width:100%;min-height:44px;border-radius:10px;margin-bottom:20px}
.defense-builder.tower-editor{width:min(330px,calc(100vw - 32px));max-height:calc(100dvh - 140px)}
@media(max-width:759px){.defense-builder.tower-editor{width:calc(100vw - 28px);max-height:42dvh;box-sizing:border-box}.window-carousel-preview{height:100px}}
/* A small in-scene toolbar directly beneath the selected window. */
.defense-builder.tower-editor{width:270px;max-width:calc(100vw - 28px);max-height:55dvh;padding:14px 16px;border-radius:16px;background:#142731e8;box-shadow:0 10px 30px #0004;box-sizing:border-box}
.tower-editor>p{font-size:10px;line-height:1.5;margin:0 34px 10px 0}
.tower-editor>button{position:absolute;right:10px;top:8px;min-height:32px;padding:4px 8px;font-size:10px}
.tower-editor .window-carousel-preview{display:none}
.tower-editor .window-style-carousel{display:flex;justify-content:space-between;margin:8px 0 -36px;pointer-events:none}
.tower-editor .window-style-carousel button{pointer-events:auto;width:36px;min-width:36px;height:36px;min-height:36px;font-size:18px}
.tower-editor .window-style-caption{margin:8px 40px 14px;min-height:36px;display:flex;align-items:center;justify-content:center;font-size:12px}
.tower-editor .window-style-apply{margin:0 0 10px;font-size:11px;min-height:38px}
.window-more{border-top:1px solid #bed1d21c;padding-top:10px}.window-more summary{cursor:pointer;font:12px/1.5 var(--sans);color:#c9d2cf;min-height:28px}.window-more select{max-width:100%}
/* Editing lives on the window; no enclosing floating card. */
.defense-builder.tower-editor{background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;padding:0;overflow:visible;width:270px}
.tower-editor>p{display:none}.tower-editor>button{top:-38px;right:0;border-radius:50%;background:#142731ed;border:1px solid #bed1d233}
.tower-editor .window-style-caption{color:#f1eddf;text-shadow:0 2px 6px #000;font-weight:600}
.tower-editor .window-style-carousel button{background:#142731ed}
.tower-editor .window-style-apply{width:max-content;max-width:100%;margin:0 auto 12px;padding:10px 14px;background:#142731ed;border:1px solid #bed1d233;border-radius:20px}
.window-more{border:0;padding:0}.window-more>summary{display:none}.window-more[open]{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.window-more h3{display:none}.window-more select,.window-more button{background:#142731f5!important;border:1px solid #bed1d244;border-radius:18px!important;padding:10px 12px!important;min-height:44px;color:#e8eee6}.window-more small{flex-basis:100%;text-align:center;color:#e8eee6;text-shadow:0 2px 5px #000}
.scene[data-phase=home] #destinations .destination:focus .destination-label,.scene[data-phase=home] #destinations .destination:hover .destination-label{display:block}
#towerCanvas{touch-action:none;cursor:grab}#towerCanvas:active{cursor:grabbing}
.profile-backup{margin:40px 0;padding-top:24px;border-top:1px solid #bed1d222;font:13px/1.6 var(--sans)}.profile-backup p{color:#bdcbd0}.profile-backup button,.backup-upload{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border:1px solid #bed1d244;border-radius:12px;color:#e8e5ef;background:#ffffff08;cursor:pointer;margin:8px 8px 12px 0;font:13px var(--sans)}.backup-upload input{max-width:180px;margin-left:10px}.backup-confirm{display:block;color:#c9d3d2}
#questionPanel .potions button[hidden]{display:none}
.tower-editor .window-base-shape{display:block;margin:0 auto 12px;max-width:100%;min-height:44px;padding:10px 16px;background:#142731f5;color:#e8eee6;border:1px solid #bed1d244;border-radius:22px;font:12px var(--sans)}

.tower-map{box-sizing:border-box;position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:40px max(28px,calc((100vw - 1100px)/2));border:0;color:#eee9da;background:radial-gradient(ellipse at 50% 110%,#36665e 0,#142d35 42%,#090e20 90%);overflow:auto}
.map-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start}.map-eyebrow{font-size:10px;letter-spacing:.22em;color:#cfba81}.map-header h1{font:42px var(--serif);margin:14px 0}.map-header p,.map-footer p{color:#bacbd0;font-size:14px;line-height:1.6}.map-close{border:1px solid #ffffff30;border-radius:50%;width:44px;height:44px;background:#182b36;color:#eee}
.map-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin:32px 0}.map-island{display:flex;flex-direction:column;align-items:center;gap:8px;border:1px solid transparent;border-radius:24px;background:#ffffff03;padding:12px 12px 22px;color:#eee9da;transition:background .2s,transform .2s}.map-island svg{width:100%;max-width:200px;filter:drop-shadow(0 12px 15px #0004)}.map-island strong{font:20px var(--serif)}.map-island span{font-size:12px;color:#bfced0}.map-island small{font-size:11px;color:#d7c796}.map-island[aria-pressed=true]{border-color:#dec58b;background:#ffffff0b}.map-island:not(:disabled):hover{transform:translateY(-4px);background:#ffffff10}.map-island:disabled{opacity:.38}.map-footer{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 0;border-top:1px solid #ffffff20}.map-sail{background:#e9ca83;color:#15272c;padding:18px 32px;border:0;border-radius:30px;font-weight:650;white-space:nowrap}.map-sail span{margin-left:24px}.tower-map button:focus-visible{outline:3px solid #f8df9f;outline-offset:4px}
@media(max-width:650px){.tower-map{padding:24px 18px}.map-header h1{font-size:30px}.map-grid{grid-template-columns:repeat(2,1fr);gap:10px}.map-footer{position:sticky;bottom:-24px;background:#122832;padding:16px;border-radius:18px}.map-footer p{font-size:11px}.map-island strong{font-size:17px}}
@media(prefers-reduced-motion:reduce){.map-island{transition:none}.map-island:not(:disabled):hover{transform:none}}

/* Anchor labels above the artefact in both building and climbing views. */
#scene #destinations .destination .destination-label{left:50%;right:auto;top:auto;bottom:calc(100% + 8px);transform:translate(-50%,4px);text-align:center;max-width:min(240px,calc(100vw - 32px));white-space:normal;width:max-content;line-height:1.4}
#scene #destinations .destination:hover .destination-label,
#scene #destinations .destination:focus-visible .destination-label,
#scene #destinations .destination.suggested .destination-label,
#scene[data-phase=explore] #destinations .destination .destination-label{transform:translate(-50%,0)}

.campaign-moment{box-sizing:border-box;width:min(520px,calc(100vw - 32px));padding:42px;border:1px solid #cdb88066;border-radius:24px;background:radial-gradient(ellipse at top,#31564f,#101c2c 80%);color:#eee9da;text-align:center;box-shadow:0 30px 100px #0009}
.campaign-moment::backdrop{background:#030812b8;backdrop-filter:blur(8px)}.campaign-moment h2{font:32px/1.2 var(--serif);margin:20px 0}.campaign-copy{font-size:15px;line-height:1.8;color:#cad5d2}.campaign-sigil{font-size:56px;color:#f5d48a;text-shadow:0 0 35px #e7bf66}.campaign-moment button,.beacon-button{border:1px solid #e4c88b;border-radius:26px;background:#e8cd94;color:#15252b;padding:14px 26px;font-weight:600}.campaign-moment button{margin-top:18px}.beacon-button{position:absolute;left:50%;bottom:100px;transform:translateX(-50%);z-index:12}.scene:not([data-phase=home]) .beacon-button{display:none}
.tower-map[data-connected=true] .map-island{border-color:#d8c58c55;box-shadow:0 0 24px #ddbe721a}.tower-map[data-connected=true] .map-grid{background:linear-gradient(25deg,transparent 49.8%,#d7c48a60 50%,transparent 50.2%),linear-gradient(-25deg,transparent 49.8%,#d7c48a60 50%,transparent 50.2%)}

.map-grid{gap:20px}.map-island{position:relative;overflow:hidden;border:1px solid #adc9ca24;background:linear-gradient(160deg,#ffffff0b,#ffffff02);padding:0 14px 24px;cursor:pointer;min-height:300px}.map-tower-image{width:100%;height:220px;object-fit:contain;filter:drop-shadow(0 15px 15px #0005);transition:transform .25s}.map-island:not(:disabled):hover{border-color:#e1c789}.map-island:not(:disabled):hover .map-tower-image{transform:scale(1.06)}.map-island:after{content:'Explore ↗';font-size:12px;letter-spacing:.03em;color:#edcf8b;margin-top:12px}.map-island:disabled:after{content:'Complete your first rescue'}.map-header{margin-bottom:24px}@media(max-width:650px){.map-tower-image{height:180px}.map-island{min-height:270px;padding:0 8px 18px}.map-grid{gap:12px}}@media(prefers-reduced-motion:reduce){.map-tower-image{transition:none}.map-island:not(:disabled):hover .map-tower-image{transform:none}}
.save-controls{display:grid;gap:10px;border-top:1px solid #c4dcdf33;margin-top:18px;padding-top:16px}.save-controls small{color:#b9c6cb;text-transform:uppercase;letter-spacing:.12em}.reset-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.reset-actions [data-cancel]{background:transparent;color:#e8dcc5}.sound-panel{max-height:calc(100dvh - 100px);overflow-y:auto}
.supply-card button{margin-top:16px;padding:12px 18px;border:1px solid #d7bf85;border-radius:24px;background:#e6c98d;color:#15272c;font-weight:600}.supply-card button:disabled{opacity:.45;cursor:not-allowed}.supply-card button:focus-visible{outline:3px solid #f5e2aa;outline-offset:4px}
/* Keep tower expansion visible alongside the home HUD. */
.scene[data-phase=home] #upgradeButton{position:fixed;top:330px;bottom:auto;left:30px;z-index:14;min-width:230px;min-height:50px;background:#e9cc8b;color:#182b30;border:1px solid #f4dda7;border-radius:14px;font-size:15px;font-weight:650;box-shadow:0 8px 25px #0004}
.scene[data-phase=home] #upgradeButton:disabled{opacity:1;background:#243741;color:#e1d8bd;border-color:#bda46d77;cursor:not-allowed}
.storey-requirements{position:fixed;top:390px;left:30px;width:230px;margin:0;padding:12px 14px;box-sizing:border-box;background:#10212bef;border:1px solid #aac5c52a;border-radius:12px;color:#c8d6d8;font:12px/1.6 var(--sans);z-index:14;pointer-events:auto}
@media(max-width:760px){.scene[data-phase=home] #upgradeButton{top:auto;bottom:172px;left:18px;min-width:190px;font-size:13px}.storey-requirements{top:auto;bottom:82px;left:18px;width:210px;font-size:11px;max-height:80px;overflow:auto}.scene[data-phase=home] #homeNotice{display:none}}
#towerAddStorey{position:absolute;z-index:16;max-width:calc(100% - 28px);padding:14px 20px;min-height:48px;border-radius:26px;border:1px solid #ddc48b;background:#152d38f5;color:#f1dcaa;font:600 13px/1.4 var(--sans);box-shadow:0 8px 28px #0005;cursor:pointer;pointer-events:auto}#towerAddStorey[data-ready=true]{background:#ebce8f;color:#172c32}.scene:not([data-phase=home]) #towerAddStorey{display:none}#storeyRequirements:focus{outline:2px solid #e8ca86;outline-offset:4px}
#towerStoreyControl{position:absolute;z-index:15;width:260px;max-width:calc(100vw - 28px);text-align:center;pointer-events:auto}
#scene[data-phase=home] #towerStoreyControl #upgradeButton{position:static;min-width:0;width:100%;min-height:46px;padding:12px 18px;border-radius:24px;background:#e9cc8b;color:#182b30;font-size:14px}
#scene[data-phase=home] #towerStoreyControl #upgradeButton:disabled{background:#223841;color:#ddd5bd;opacity:1}
#towerStoreyControl #storeyRequirements{position:static;width:100%;margin:8px 0 0;font-size:11px;max-height:90px;overflow:auto}
.scene:not([data-phase=home]) #towerStoreyControl{display:none}

/* Readable guidance, with progression tucked into the game menu. */
.scene[data-phase=home] #homeNotice{font-size:16px;line-height:1.6;max-width:340px;color:#f0eee3}
#soundPanel .keeper-progress{position:static;box-sizing:border-box;width:100%;margin:0 0 20px;padding:16px;backdrop-filter:none;font-size:14px}
#soundPanel .keeper-progress span,#soundPanel .keeper-progress small{font-size:13px}

/* Spatial archipelago replaces the destination card gallery. */
.tower-map{width:min(1200px,calc(100vw - 24px));max-width:none;padding:28px;background:radial-gradient(ellipse at 45% 65%,#244743,#111d30 65%,#08121e);overflow:hidden}
.tower-map .map-header h1{font-size:32px;margin:8px 0}
.map-viewport{overflow:auto;max-height:calc(100dvh - 220px);border-radius:24px;background:radial-gradient(circle at 20% 25%,#cfe8ff55 0 1px,transparent 2px),radial-gradient(circle at 70% 75%,#e9daaf66 0 1px,transparent 2px);background-size:149px 137px,193px 167px}
.map-atlas{position:relative;min-width:760px;width:100%;height:640px}
.map-atlas .map-grid{position:absolute;inset:0;display:block;margin:0;background:none!important}
.map-routes{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.map-routes path{fill:none;stroke:#bdd4cf42;stroke-width:1.5;stroke-dasharray:4 8}
.map-routes .restored-route{stroke:#edce87;stroke-dasharray:none}
.map-atlas .map-island{position:absolute;left:var(--map-x);top:var(--map-y);transform:translate(-50%,-50%);width:160px;min-height:0;padding:0 6px 8px;border:0;border-radius:40%;background:none;overflow:visible;gap:4px;box-shadow:none}
.map-atlas .map-island:not(:disabled):hover{transform:translate(-50%,-54%);background:radial-gradient(ellipse,#cbdcab1c,transparent 70%)}
.map-atlas .map-tower-image{width:125px;height:138px;filter:drop-shadow(0 12px 12px #0008)}
.map-atlas .map-island strong{font:600 14px/1.3 var(--sans);text-shadow:0 2px 6px #000}
.map-atlas .map-island span{display:none}
.map-atlas .map-island small{font-size:11px;line-height:1.4;color:#d9d6c3}
.map-atlas .map-island[data-restored=true] small{color:#f5d48e}
.map-atlas .map-island:after{display:none}
.map-atlas .map-island:disabled{opacity:.3}
.map-compass{position:absolute;left:35px;top:25px;text-align:center;color:#dfcf9a;font:24px/1.2 var(--serif);pointer-events:none}
@media(max-width:650px){.tower-map{padding:20px 12px}.tower-map .map-header h1{font-size:25px}.map-viewport{max-height:calc(100dvh - 230px)}.map-atlas{height:600px}.map-atlas .map-island strong{font-size:13px}}

/* Layered diorama: distant landmarks recede; nearby islands occupy the foreground. */
.tower-map{background:radial-gradient(ellipse at 52% 76%,#355750 0, #1a3340 35%,#0c172a 85%)}
.map-viewport{perspective:1200px;isolation:isolate;position:relative;background-color:#111f2a44}
.map-world{position:absolute;inset:15px 0 25px;transform-style:preserve-3d;transform:translate3d(var(--pan-x,0px),var(--pan-y,0px),0) rotateX(calc(7deg + var(--tilt-x,0deg))) rotateY(var(--tilt-y,0deg)) rotateZ(-2deg);transition:transform .35s ease-out}
.map-world .map-grid{transform-style:preserve-3d}
.map-atlas .map-island{transform:translate(-50%,-50%) translate3d(var(--depth-x,0px),var(--depth-y,0px),var(--node-z,0px)) scale(var(--node-scale,1));transition:transform .35s ease-out,opacity .25s;transform-style:preserve-3d}
.map-atlas .map-island:not(:disabled):hover,.map-atlas .map-island:focus-visible{transform:translate(-50%,-54%) translate3d(var(--depth-x,0px),var(--depth-y,0px),20px) scale(var(--node-scale,1));background:radial-gradient(ellipse,#cbdcab20,transparent 70%)}
.map-atlas .map-island::before{content:'';display:block;position:absolute;left:20%;bottom:35px;width:60%;height:18px;border:0;border-radius:50%;background:#02091666;filter:blur(6px);transform:rotate(-8deg);z-index:-1;pointer-events:none}
.map-atlas .map-tower-image{height:160px;width:136px;animation:map-float 7s ease-in-out infinite;animation-delay:var(--float-delay);transform-origin:50% 75%;filter:drop-shadow(5px 15px 9px #0006)}
.map-atlas .map-island strong,.map-atlas .map-island small{transform:rotate(2deg);background:#0b192645;border-radius:6px;padding:2px 6px}
.map-atlas .map-island:disabled{opacity:.45}
.map-scenery{position:absolute;inset:0;pointer-events:none;transform-style:preserve-3d}
.map-prop{position:absolute;width:70px;height:70px;opacity:var(--prop-opacity);transform:translate(-50%,-50%) scale(var(--prop-scale));filter:drop-shadow(5px 16px 8px #0005);animation:map-rock-drift 10s ease-in-out infinite;animation-delay:var(--float-delay)}
.map-orbit{position:absolute;width:72%;height:60%;left:13%;top:23%;border:1px solid #b7d4c510;border-radius:50%;transform:rotate(-18deg);box-shadow:0 0 80px #b0dbbc09,inset 0 0 70px #abd8bf06;pointer-events:none}
.map-world .map-routes{opacity:.7;transform:translateZ(-10px)}
@keyframes map-float{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-7px) rotate(1deg)}}
@keyframes map-rock-drift{50%{transform:translate(-50%,calc(-50% - 8px)) scale(var(--prop-scale)) rotate(5deg)}}
@media(prefers-reduced-motion:reduce){.map-world,.map-atlas .map-island{transition:none}.map-atlas .map-tower-image,.map-prop{animation:none}.map-world{transform:rotateZ(-2deg)}}

.map-atlas .map-tower-image{user-select:none;-webkit-user-drag:none;pointer-events:none}
.map-atlas .map-island:not(:disabled):hover{box-shadow:none}

/* A single quiet row of towers, following the supplied gradient composition. */
.tower-menu{position:fixed;inset:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;padding:0;border:0;color:#fff8ed;background:radial-gradient(ellipse 100% 65% at 50% -10%,#f7e5a3 5%,#ffd2df 52%,transparent 100%),linear-gradient(180deg,#edacc7 0%,#96395e 42%,#280626 69%,#08051d 100%);overflow:hidden}
.tower-menu::backdrop{background:#08051d}
.tower-menu-header{position:absolute;inset:28px 32px auto;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;z-index:2;color:#331b34}
.tower-menu-header img{width:160px;height:auto;filter:brightness(0);opacity:.85}
.tower-menu-header h1{font:500 15px/1.5 var(--sans);margin:12px 0 0}
.tower-menu-close{width:44px;height:44px;min-width:44px;border:1px solid #3c213c55;background:#fff3;color:#3c213c;border-radius:50%;font-size:20px}
.tower-menu-row{position:absolute;inset:145px 0 105px;display:flex;align-items:center;gap:30px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#ffe5d04d transparent;padding:25px max(24px,calc(50vw - 130px));scroll-padding-inline:calc(50vw - 130px)}
.tower-choice{position:relative;flex:0 0 155px;height:min(570px,100%);border-radius:32px;background:transparent;transition:background .35s,flex-basis .35s;overflow:hidden}
.tower-choice[data-selected=true]{flex-basis:260px;background:var(--tower-gradient);box-shadow:0 20px 50px #09031426}
.tower-menu-select{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;position:relative;width:100%;height:100%;padding:28px 8px 42px;border:0;border-radius:32px;background:transparent;color:#fff8ed;box-shadow:none;cursor:pointer}
.tower-menu .tower-menu-select:hover{background:transparent;box-shadow:none;filter:none}
.tower-menu-select img{display:block;width:190px;max-width:none;height:auto;object-fit:contain;pointer-events:none;user-select:none;opacity:.36;transition:opacity .3s,transform .3s;transform:scale(.87);filter:drop-shadow(0 10px 10px #09031433)}
.tower-choice[data-conquered=true] img{opacity:1}
.tower-choice[data-selected=true] img{opacity:1;transform:scale(1);width:240px}
.tower-choice-copy{position:absolute;top:34px;left:24px;right:24px;display:flex;flex-direction:column;gap:12px;text-align:center;visibility:hidden;opacity:0;transition:opacity .25s;font:13px/1.6 var(--sans);color:#f6e7df}
.tower-choice[data-selected=true] .tower-choice-copy{visibility:visible;opacity:1}
.tower-choice-copy strong{font:28px/1.15 var(--serif);color:#fff7e4}
.tower-choice-status{font-size:10px;letter-spacing:.15em;text-transform:uppercase;color:#ecd09b}
.tower-menu-footer{position:absolute;left:24px;right:24px;bottom:28px;display:flex;flex-direction:column;align-items:center;gap:14px}
.tower-menu-hint{font:12px/1.4 var(--sans);color:#d7bbd0}
.tower-menu-enter{min-height:48px;min-width:220px;padding:14px 28px;border:1px solid #f0d49e88;border-radius:26px;background:#eed19b;color:#21182c;font:600 14px var(--sans)}
.tower-menu-enter:disabled{opacity:.55;cursor:default}
.tower-menu button:focus-visible{outline:3px solid #fff1ca;outline-offset:-5px}
@media(max-height:700px){.tower-menu-row{inset:110px 0 90px}.tower-menu-select{padding-bottom:12px}.tower-menu-select img{width:140px}.tower-choice[data-selected=true] img{width:175px}.tower-choice-copy{top:22px;gap:8px}.tower-choice-copy strong{font-size:24px}.tower-menu-footer{bottom:16px;gap:8px}}
@media(max-width:600px){.tower-menu-header{inset:20px 20px auto}.tower-menu-header img{width:135px}.tower-menu-row{gap:20px}.tower-choice{flex-basis:125px}.tower-choice[data-selected=true]{flex-basis:260px}}
@media(prefers-reduced-motion:reduce){.tower-choice,.tower-menu-select img,.tower-choice-copy{transition:none}}

/* Silent-film intertitles: ink, paper and restrained ornamental rules. */
.film-intertitle{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:clamp(20px,5vw,64px);border:0;background:radial-gradient(ellipse at center,#252422,#101010 75%);color:#e9e3d3;overflow:auto;box-sizing:border-box;font-family:var(--serif)}
.film-intertitle::backdrop{background:#101010}
.film-frame{min-height:calc(100dvh - clamp(40px,10vw,128px));padding:clamp(38px,7vh,80px) 24px 36px;border:1px solid #c8bfa255;outline:1px solid #c8bfa222;outline-offset:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.film-chapter{font:11px/1.6 var(--sans);letter-spacing:.2em;color:#c0b79f;margin:0 0 24px}
.film-ornament{font-size:28px;color:#b9ab85}
.film-frame h1{font:400 clamp(30px,4vw,54px)/1.2 var(--serif);margin:22px 0 28px;max-width:750px;outline:none}
.film-copy{max-width:650px;font:italic clamp(18px,2vw,24px)/1.7 var(--serif)}
.film-copy p{margin:0 0 22px}.film-copy p:last-child{font-style:normal;color:#c5bba4;font-size:.82em;margin-top:32px}
.film-rule{width:90px;border-top:1px solid #b7aa7d77;margin:12px 0 30px}
.film-actions{display:flex;gap:24px;align-items:center;justify-content:center;flex-wrap:wrap}
.film-actions button,.film-skip{min-height:44px;padding:10px 20px;border:1px solid #c8bfa244;border-radius:2px;background:transparent;color:#e9e3d3;font:14px var(--sans)}
.film-skip{position:absolute;right:clamp(24px,5vw,68px);top:12px;background:#141414;border:0;color:#b8b2a4;font-size:12px}
.film-intertitle button:focus-visible{outline:2px solid #f2deb0;outline-offset:4px}
.journal-button{width:100%;margin:0 0 18px;padding:12px;font-size:13px;text-align:left}

/* Stable slots keep the active tower centered while only its treatment fades. */
.tower-menu-row{scroll-snap-type:x mandatory}
.tower-menu-row .tower-choice,.tower-menu-row .tower-choice[data-selected=true]{flex-basis:260px;background:transparent;scroll-snap-align:center;scroll-snap-stop:always;transition:none;box-shadow:none}
.tower-choice::before{content:'';position:absolute;inset:0;border-radius:32px;background:var(--tower-gradient);opacity:0;transition:opacity .5s ease;pointer-events:none}
.tower-choice[data-selected=true]::before{opacity:1}
.tower-menu-select{z-index:1}
.tower-choice-copy{transform:translateY(5px);transition:opacity .4s ease,transform .4s ease,visibility 0s .4s}
.tower-choice[data-selected=true] .tower-choice-copy{transform:translateY(0);transition-delay:0s}
@media(prefers-reduced-motion:reduce){.tower-choice::before,.tower-choice-copy{transition:none}}

:root{--motion-ease:cubic-bezier(.45,0,.55,1);--motion-fade:360ms}
.scene-fade-veil{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:radial-gradient(ellipse at 50% 62%,rgb(233 201 151 / 10%),transparent 66%),radial-gradient(ellipse at 72% 82%,rgb(81 148 151 / 8%),transparent 64%),#080b14;opacity:0;pointer-events:auto}
.scene-fade-veil::backdrop{background:transparent}
.tower-menu-highlight{position:absolute;inset:145px 0 105px;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:0}
.tower-menu-card{position:relative;width:260px;height:min(570px,calc(100% - 50px));border-radius:32px;opacity:0}
.tower-menu-highlight .tower-choice-copy{visibility:visible;opacity:1;transform:none;transition:none}
.tower-menu-row{z-index:1}
.tower-menu-row .tower-choice::before{display:none}
.tower-menu-row .tower-choice-copy{display:none}
.tower-menu-select img{transition:opacity 420ms var(--motion-ease),transform 520ms var(--motion-ease),width 520ms var(--motion-ease)}
.tower-menu-select{transition:background var(--motion-fade) var(--motion-ease)}
@media(max-height:700px){.tower-menu-highlight{inset:110px 0 90px}}
@media(prefers-reduced-motion:reduce){.tower-menu-select img{transition:none}}

#questionPanel{animation:none}

/* Illustrated chapter plates, keeping the typography and ornaments quiet. */
.film-intertitle{background:radial-gradient(ellipse at 50% 30%,#29291f,#111513 70%);padding:clamp(18px,3vw,42px)}
.film-frame{position:relative;min-height:calc(100dvh - clamp(36px,6vw,84px));padding:36px 30px 28px;border-color:#b9a27555;outline-color:#8b795033}
.film-frame::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(0deg,#e9deb702 0 1px,transparent 1px 4px);pointer-events:none}
.film-chapter{margin-bottom:12px;font-size:10px;color:#c2ad7e}
.film-art{width:150px;height:115px;object-fit:contain;filter:saturate(.6);margin:0 0 8px}
.film-art-scene{width:min(580px,90%);height:clamp(150px,24vh,260px);object-fit:cover;mask-image:radial-gradient(ellipse 65% 64% at center,#000 50%,transparent 100%);filter:saturate(.65)}
.film-frame .film-ornament{font-size:18px;color:#b7a47a}
.film-frame h1{margin:12px 0 20px;font-size:clamp(30px,3.5vw,46px)}
.film-copy{max-width:660px;font-size:clamp(17px,1.8vw,22px);line-height:1.65}
.film-copy p{margin-bottom:16px}.film-copy p:last-child{margin-top:22px}
.film-rule{margin:6px 0 20px}
.film-corner{position:absolute;width:42px;height:42px;border-top:2px solid #b7a17388;border-left:2px solid #b7a17388;pointer-events:none}
.film-corner::after{content:'';position:absolute;left:7px;top:7px;width:7px;height:7px;background:#88a99399;transform:rotate(45deg);box-shadow:0 0 0 3px #b7a17322}
.film-corner.nw{left:12px;top:12px}.film-corner.ne{right:12px;top:12px;transform:rotate(90deg)}.film-corner.se{right:12px;bottom:12px;transform:rotate(180deg)}.film-corner.sw{left:12px;bottom:12px;transform:rotate(270deg)}
@media(max-height:750px){.film-frame{padding:25px 24px}.film-art{height:80px;width:110px}.film-art-scene{height:140px;width:400px}.film-copy{font-size:17px}.film-frame h1{font-size:30px;margin:8px 0 14px}.film-chapter{margin-bottom:8px}.film-copy p{margin-bottom:10px}.film-rule{margin:5px 0 12px}}
@media(max-width:500px){.film-frame{padding:36px 20px 24px}.film-copy{font-size:17px}.film-corner{width:26px;height:26px}}

/* Shared gradient palette and locally hosted Kurale / Inter typography. */
:root{--ink:#fff4df;--muted:#c3c1d0;--gold:#f3ccaa;--plum:#cf6de0;--gradient-night:#050326;--gradient-plum:#37265a;--gradient-orchid:#cf6de0;--gradient-peach:#f3ccaa;--gradient-mint:#3ed1b6;font-synthesis:none}
body,button,input,select,textarea{font-family:var(--sans)}
h1,h2,.profile-rank,.tower-choice-copy strong{font-family:var(--serif);font-weight:400}
.film-intertitle{font-family:var(--serif);background:linear-gradient(180deg,#05032644,#050326a6),radial-gradient(ellipse 190% 130% at 50% 0%,#050326 0%,#001228 29%,#37265a 57%,#cf6de0 74%,#f3ccaa 87%,#ff9f56 100%);color:#fff4df}
.film-frame{border-color:#f3ccaa66;outline-color:#cf6de02b;background:linear-gradient(150deg,#37265a22,#05032655 65%,#cf6de00c)}
.film-frame::after{opacity:.5}
.film-frame h1{font-family:var(--serif);font-weight:400;color:#fff1dc}
.film-copy{font-family:var(--serif);font-style:normal;letter-spacing:0;line-height:1.65}
.film-copy p:last-child{font-family:var(--sans);font-size:14px;line-height:1.8;color:#eadde8}
.film-chapter{font-family:var(--sans);color:#f3ccaa;letter-spacing:.16em}
.film-ornament{color:#d9a5ea!important}
.film-art{filter:saturate(.95)}
.film-corner{border-color:#f3ccaa99}.film-corner::after{background:#cf6de0aa;box-shadow:0 0 0 3px #f3ccaa22}
.film-rule{border-color:#cf6de077}
.film-actions button{font-family:var(--sans);border-color:#f3ccaa66;border-radius:8px;background:linear-gradient(135deg,#cf6de024,#f3ccaa15);color:#fff1dc;transition:background 520ms var(--motion-ease)}
.film-actions button:hover{background:linear-gradient(135deg,#cf6de03b,#f3ccaa28)}
.film-skip{font-family:var(--sans);color:#e5d5e7;background:#0b0728bb}
.knowling-profile{background:radial-gradient(ellipse at 5% 0%,#37265a,#101d30 55%,#080c20)}
.panel{background:linear-gradient(140deg,#20243dee,#111e2cf2);border-color:#d7b5e333}
.tower-menu-enter,.main-button{font-family:var(--sans)}

/* The selected card is also the entry action; the footer remains an alternative. */
.tower-card-arrow{position:absolute;right:18px;bottom:18px;width:44px;height:44px;border:1px solid #f3ccaa88;border-radius:50%;background:#24132fcc url('assets/tower-enter-arrow.svg') center/38px no-repeat;box-shadow:0 3px 14px #24132f33;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 520ms var(--motion-ease),filter 520ms var(--motion-ease)}
.tower-choice[data-selected=true][data-enterable=true] .tower-card-arrow{opacity:1;visibility:visible}
.tower-choice[data-selected=true] .tower-menu-select:hover .tower-card-arrow,.tower-menu-select:focus-visible .tower-card-arrow{filter:brightness(1.18)}
@media(prefers-reduced-motion:reduce){.tower-card-arrow{transition:none}}

/* The card itself carries navigation, with a quiet rim on hover or focus. */
.tower-menu-select::after{content:'';position:absolute;inset:1px;border-radius:31px;border:1px solid #ffe4b7aa;box-shadow:inset 0 0 28px #f3ccaa12,0 0 24px #cf6de026;opacity:0;pointer-events:none;transition:opacity 620ms var(--motion-ease)}
.tower-menu-select:hover::after,.tower-menu-select:focus-visible::after{opacity:1}
.tower-choice[data-selected=true] .tower-menu-select:hover>img{transform:scale(1.035)}
@media(prefers-reduced-motion:reduce){.tower-menu-select::after{transition:none}.tower-choice[data-selected=true] .tower-menu-select:hover>img{transform:scale(1)}}
/* Reserve breathing room for the copy on shorter desktop windows. */
.tower-menu-select>img{height:min(320px,calc(100% - 175px));object-fit:contain}

.question-close{position:absolute;right:16px;top:12px;z-index:3;width:44px;height:44px;min-width:44px;padding:0;border:1px solid #c4d0d433;border-radius:50%;background:#10232b88;color:#f5e7df;font:400 26px/1 var(--sans);cursor:pointer;transition:background 320ms var(--motion-ease),border-color 320ms var(--motion-ease)}
.question-close:hover{background:#cf6de025;border-color:#f3ccaa88}
.question-close:focus-visible{outline:2px solid #f3ccaa;outline-offset:3px}
#questionPanel .question-meta{padding-right:40px;min-height:32px;align-items:center}

/* Home building stays available while exploration is the primary action. */
.feedback-reading,.answer-help{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}
.feedback-reading button,.answer-help button{min-height:44px;padding:10px 14px;border:1px solid #d6bfeb66;border-radius:12px;background:#d6bfeb12;color:#eee5f7;font:500 13px var(--sans)}
.feedback-reading span,.answer-help small{font:12px/1.5 var(--sans);color:#cad4d4}.answer-help small{flex-basis:100%}
.answer-help:has(button:not([hidden])){border-top:1px solid #cad4d422;padding-top:14px}.answer-help:not(:has(button:not([hidden]))):has(small[hidden]){display:none}
.finish-rewards{font:600 clamp(18px,2vw,24px)/1.5 var(--sans);color:#f3d5a1;margin:18px 0}
.window-purpose{font:12px/1.6 var(--sans);color:#c2cece;max-width:30em}
#question:focus{outline:none}.round-hud #roundCount{font-size:11px;line-height:1.5}
.tower-card-lock{display:none;position:absolute;right:18px;bottom:18px;padding:8px 12px;border:1px solid #efe1cd66;border-radius:20px;background:#24132fcc;color:#f3ccaa;font:12px var(--sans)}
.tower-choice[data-locked=true] .tower-card-lock{display:block}
@media(max-width:600px){.round-hud{max-width:calc(100% - 28px);flex-wrap:wrap;gap:8px}.round-hud #roundCount{font-size:10px}#questionPanel .question-meta{padding-right:44px}}

.scene:not([data-phase=home]) .destination[data-artefact=waiting]::before{box-shadow:none;border-color:#a8bac066}
.scene:not([data-phase=home]) .destination[data-artefact=waiting].suggested::before{animation:none;border-color:#d9c9a188}
#questionPanel h2#question:focus-visible{outline:none;box-shadow:none}

/* Shared action styles across gameplay, story, settings and profile. */
:root{--action-fill:#152b36e8;--action-border:#d7e3e53d;--action-gold:#f0d39a;--action-text:#f4f1e9;--action-radius:14px}
:where(button){font-family:var(--sans);font-size:14px;font-weight:500;min-height:44px;transition:background-color 520ms var(--motion-ease),border-color 520ms var(--motion-ease),box-shadow 520ms var(--motion-ease),filter 520ms var(--motion-ease)}
:is(.home-button,.tower-view,.sound-toggle,.menu-toggle,.next-button,.film-actions button,.film-skip,.settings-panel button,.knowling-profile .profile-backup button,.supply-card button,.answer-help button,.feedback-reading button,.tower-editor button,.tower-build-prompt button){border:1px solid var(--action-border);border-radius:var(--action-radius);background:var(--action-fill);color:var(--action-text);min-height:44px;padding:12px 18px;font:500 14px/1.3 var(--sans);box-shadow:none}
:is(.home-button,.tower-view,.sound-toggle,.menu-toggle,.next-button,.film-actions button,.film-skip,.settings-panel button,.knowling-profile .profile-backup button,.supply-card button,.answer-help button,.feedback-reading button,.tower-editor button,.tower-build-prompt button):hover:not(:disabled){background:#29414c;border-color:#f3ccaa99;box-shadow:0 0 0 1px #f3ccaa22}
:is(.main-button,.film-actions .film-next,#scene[data-phase=home] #startButton,#scene[data-phase=home] #towerStoreyControl #upgradeButton){border:1px solid #ffe4b3;border-radius:var(--action-radius);min-height:48px;background:var(--action-gold);color:#172934;font:600 14px/1.3 var(--sans);padding:14px 22px;box-shadow:0 5px 20px #05032626;filter:none}
:is(.main-button,.film-actions .film-next,#scene[data-phase=home] #startButton,#scene[data-phase=home] #towerStoreyControl #upgradeButton):hover:not(:disabled){background:#ffe2b1;border-color:#fff0d7;box-shadow:0 5px 24px #f3ccaa26;filter:none;transform:none;translate:none}
#scene[data-phase=home] #towerStoreyControl #upgradeButton:disabled{background:var(--action-fill);color:#c5cdd0;border-color:var(--action-border)}
:is(button):focus-visible{outline:2px solid #f3ccaa;outline-offset:4px}
button:disabled{cursor:not-allowed}
:is(.main-button,.film-actions button,.answer-help button,.tower-editor button,.supply-card button):disabled{opacity:.45;box-shadow:none}
:is(.menu-toggle,.profile-avatar,.question-close,.profile-close,.settings-close){border-radius:50%;width:46px;height:46px;min-height:46px;padding:10px;border:1px solid var(--action-border);background:var(--action-fill);color:var(--action-text)}
.film-intertitle[data-chapter=prologue] .film-frame{justify-content:center;gap:0}
.film-intertitle[data-chapter=prologue] .film-art-scene{width:min(800px,100%);height:clamp(180px,34vh,380px);object-fit:contain;mask-image:linear-gradient(transparent,#000 7%,#000 93%,transparent);border-radius:16px;filter:none}
.film-intertitle[data-chapter=prologue] .film-copy{max-width:650px}
.film-intertitle[data-chapter=prologue] .film-copy p:last-child{font:400 clamp(18px,2vw,23px)/1.6 var(--serif);margin:0;color:#fff1dc}
.film-dots{display:flex;justify-content:center;gap:4px;margin:16px 0 8px}
.film-dots button{width:44px;height:44px;min-height:44px;display:grid;place-items:center;padding:0;background:transparent;border:0;border-radius:50%}
.film-dots button::after{content:'';width:7px;height:7px;border-radius:50%;background:#f3ccaa55;transition:background 720ms var(--motion-ease),box-shadow 720ms var(--motion-ease)}
.film-dots button[aria-current=true]::after{background:#f3ccaa;box-shadow:0 0 14px #f3ccaa66}
.film-actions{gap:12px}.film-actions .film-next{min-width:190px}
@media(max-height:750px){.film-intertitle[data-chapter=prologue] .film-art-scene{height:28vh}.film-intertitle[data-chapter=prologue] .film-frame{padding:30px 24px 20px}.film-dots{margin:4px 0}.film-intertitle[data-chapter=prologue] .film-rule{display:none}}
@media(prefers-reduced-motion:reduce){button,.film-dots button::after{transition:none!important}}
:is(.sound-panel button,.supply-grid article button,.profile-backup button,.backup-upload){min-height:44px;padding:12px 18px;border:1px solid var(--action-border);border-radius:var(--action-radius);background:var(--action-fill);color:var(--action-text);font:500 14px/1.3 var(--sans)}
:is(.sound-panel button,.supply-grid article button,.profile-backup button,.backup-upload):hover:not(:disabled){background:#29414c;border-color:#f3ccaa99}
#soundSettings{border-radius:50%;width:46px;height:46px;min-height:46px;border:1px solid var(--action-border);background:var(--action-fill);color:var(--action-text)}

.film-intertitle[data-chapter=prologue] .film-art-scene{height:clamp(280px,46vh,560px);width:min(800px,100%)}
@media(max-height:750px){.film-intertitle[data-chapter=prologue] .film-art-scene{height:38vh;min-height:200px}.film-intertitle[data-chapter=prologue] .film-frame{padding-top:44px}}

/* Compact header: stable icon targets and a separate resource row. */
@media(max-width:760px){
 .scene .masthead,.scene:not([data-phase=intro]) .masthead,.scene[data-phase=home] .masthead{display:flex;top:20px;left:18px;right:auto;height:44px;align-items:center}
 .scene .wordmark{width:clamp(94px,20vw,126px)}
 .scene .sound-controls,.scene:not([data-phase=intro]) .sound-controls,.scene[data-phase=home] .sound-controls{top:20px;right:16px;gap:8px;align-items:center}
 .sound-controls #soundToggle,.sound-controls #soundSettings{width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:0;display:grid;place-items:center;border-radius:50%}
 .sound-toggle svg{width:20px;height:20px;flex:none}.sound-toggle #soundLabel{display:none}
 .profile-button,.scene:not([data-phase=home])~.profile-button{top:20px;right:120px;width:44px;height:44px;min-height:44px}
 .scene[data-phase=home] #homeLevel{top:82px;left:18px;max-width:calc(100% - 36px);text-align:left;font-size:10px;letter-spacing:1.2px;line-height:1.5}
 .scene[data-phase=home] #homeBalance{top:110px;left:18px;right:auto;max-width:calc(100% - 36px);min-height:38px;padding:8px 12px;font-size:12px}
 .sound-controls #soundPanel{top:54px;right:0;width:min(320px,calc(100vw - 32px));max-height:calc(100dvh - 94px);overflow:auto;padding:20px}
 .sound-panel button{width:100%;white-space:normal;text-align:left}.sound-panel strong{font-size:20px}
 .round-hud{top:82px;left:18px;transform:none;max-width:calc(100% - 36px);padding:9px 12px;gap:8px;font-size:11px;flex-wrap:wrap}
 .round-hud .hud-track{width:36px}.round-hud #roundCount{font-size:11px}
 .home-button{top:138px;left:18px;min-height:44px;padding:10px 14px;font-size:13px}
}
@media(max-width:360px){.scene .masthead{left:12px}.scene .wordmark{width:88px}.scene .sound-controls{right:12px;gap:6px}.profile-button,.scene:not([data-phase=home])~.profile-button{right:112px}}
@media(max-width:480px){
 #scene[data-phase=home] #startButton{left:16px;right:16px;width:calc(100% - 32px);min-width:0;min-height:52px;bottom:16px;padding:13px 18px;gap:16px;text-align:left}
 .scene[data-phase=home] .tower-view{bottom:82px;left:16px;right:auto;min-height:44px;padding:10px 14px}
}
.sound-controls:has(.sound-panel:not([hidden])){z-index:50}
.sound-panel{background:#10202c;isolation:isolate}

/* Inline window editor: one appearance action, optional topic and help. */
.defense-builder.tower-editor{width:min(300px,calc(100vw - 32px));max-height:55dvh;margin:0;overflow:auto;scrollbar-width:thin}
.tower-editor .window-editor-header{display:flex;align-items:center;gap:6px;margin-bottom:10px;background:#10232def;border:1px solid var(--action-border);border-radius:14px;padding:4px 6px 4px 12px}
.tower-editor .window-editor-header h3{flex:1;font:500 12px/1.4 var(--sans);margin:0;color:#e8eee6}
.tower-editor .window-editor-header button{width:44px;height:44px;min-width:44px;padding:0;display:grid;place-items:center;border:0;background:transparent;border-radius:50%;font-size:20px}
.tower-editor .window-base-shape{width:100%;margin:0 0 8px;border-radius:12px;font-size:13px}
.tower-editor .window-style-carousel{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;margin:0 0 8px;pointer-events:auto;background:#10232def;border:1px solid var(--action-border);border-radius:14px;padding:2px}
.tower-editor .window-style-carousel button{width:44px;height:44px;min-height:44px;min-width:44px;padding:0;border:0;background:transparent;border-radius:12px;font-size:20px}
.tower-editor .window-style-caption{min-height:44px;margin:0;font:500 12px/1.4 var(--sans);text-shadow:none;color:#f1eddf}
.tower-editor .window-more,.tower-editor .window-more[open]{display:block;border:0;padding:0;margin:8px 0;background:#10232def;border-radius:12px}
.tower-editor .window-more>summary{display:list-item;min-height:44px;box-sizing:border-box;padding:13px 14px;font:500 12px/1.5 var(--sans);color:#e8eee6;list-style-position:inside}
.tower-editor .window-topic-controls{display:flex;gap:6px;padding:0 8px 10px;align-items:center}
.tower-editor .window-topic-controls select{flex:1;min-width:0;width:100%;font-size:14px;border-radius:10px!important}
.tower-editor .window-topic-controls button{flex:none;font-size:12px;padding:10px!important;border-radius:10px!important}
.tower-editor .window-editor-actions{display:flex;justify-content:flex-end;margin-top:8px}
.tower-editor .window-editor-actions .editor-done{position:static;width:100%;min-height:44px;border-radius:12px;background:var(--action-gold);color:#172934;border-color:#ffe4b3;padding:12px 18px;font:600 13px var(--sans)}
.tower-editor .entrance-note{margin:8px 0;font-size:12px;color:#c8d2d4;text-align:center}
#scene[data-phase=home]:has(.tower-editor:not([hidden])) :is(#towerStoreyControl,#startButton,#homeNotice,.tower-build-prompt){display:none!important}

/* Header order: sound, settings, then the Knowling avatar. */
#scene #soundControls{right:90px;gap:8px}
body>.profile-button{left:auto;right:30px;top:22px}
#scene #soundSettings{box-sizing:border-box;flex:0 0 46px;width:46px;height:46px;min-width:46px;max-width:46px;min-height:46px;max-height:46px;padding:0;display:grid;place-items:center;border-radius:50%;aspect-ratio:1}
.round-navigation{display:contents}
.film-logo{display:block;width:clamp(135px,24vw,210px);height:auto;margin:0 0 14px;filter:brightness(0) invert(1)}
@media(max-width:760px){
 #scene #soundControls{right:68px;top:20px;gap:8px}
 body>.profile-button,.scene:not([data-phase=home])~.profile-button{right:16px;left:auto;top:20px}
 #scene #soundSettings{flex-basis:44px;width:44px;height:44px;min-width:44px;max-width:44px;min-height:44px;max-height:44px}
 #gameUI .round-navigation{position:absolute;top:82px;left:18px;right:18px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;pointer-events:none}
 #gameUI .round-navigation #homeButton{position:static;top:auto;left:auto;flex:none;min-height:44px;padding:10px 13px;pointer-events:auto}
 #gameUI .round-navigation .round-hud{position:static;top:auto;left:auto;transform:none;max-width:100%;width:max-content;flex:0 1 auto;margin:0;pointer-events:auto;white-space:normal}
 .film-intertitle[data-chapter=prologue] .film-chapter{margin-bottom:16px}
}
@media(max-height:750px){.film-logo{width:135px;margin-bottom:8px}}
.film-topbar{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:12px;align-items:center;width:100%;max-width:800px;margin:0 0 12px}
.film-topbar .film-logo{grid-column:2;justify-self:center;max-width:100%;margin:0}
.film-topbar .film-skip{position:static;grid-column:3;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid #f3ccaa55;border-radius:50%;background:#f3ccaa0b;display:grid;place-items:center;color:#fff1dc;font:400 25px/1 var(--sans)}
.film-topbar .film-skip:hover{background:#f3ccaa22;border-color:#f3ccaa99}
.scene[data-phase=home] #exploreButton{position:fixed;right:28px;bottom:92px;z-index:12;min-height:44px;padding:10px 16px;border:1px solid var(--action-border);border-radius:14px;background:var(--action-fill);color:var(--action-text);font:500 13px var(--sans)}
#scene[data-phase=home]:has(.tower-editor:not([hidden])) #exploreButton{display:none!important}
@media(max-width:480px){.scene[data-phase=home] #exploreButton{right:16px;bottom:82px}}

/* Temporary guidance and narration share one non-overlapping top stack. */
#sceneMessages{position:absolute;top:90px;left:50%;transform:translateX(-50%);z-index:15;width:min(560px,calc(100% - 32px));display:flex;flex-direction:column;align-items:stretch;gap:8px;pointer-events:none}
#scene #sceneMessages :is(#homeNotice,#journeyHint,.narrator-caption){position:static;inset:auto;transform:none;translate:none!important;display:block;width:100%;max-width:none;box-sizing:border-box;margin:0;padding:12px 16px;border:1px solid #bed1d22b;border-radius:14px;background:#10212deF;backdrop-filter:blur(12px);color:#e7e9e3;text-shadow:none;text-align:center;white-space:normal;font:400 13px/1.6 var(--sans);letter-spacing:0}
#scene:not([data-phase=home]) #sceneMessages #homeNotice{display:none}
#scene #sceneMessages .narrator-caption{color:#f3dbad}
@media(max-width:480px){#sceneMessages{width:calc(100% - 28px)}#scene #sceneMessages :is(#homeNotice,#journeyHint,.narrator-caption){padding:10px 14px;font-size:12px}}
#sceneMessages{left:30px;transform:none;width:min(420px,calc(100% - 60px))}
#scene #sceneMessages :is(#homeNotice,#journeyHint,.narrator-caption){text-align:left}
#scene[data-phase=home] #towerStoreyControl #storeyRequirements{position:static;inset:auto;width:100%;margin:0 0 10px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;font:400 12px/1.65 var(--sans);text-align:left}
#storeyDetails{margin-top:8px;padding:16px;background:#10232df5;border:1px solid var(--action-border);border-radius:14px}
#storeyDetails #confirmStorey{width:100%;min-height:44px;justify-content:center;padding:12px;font-size:13px}
#scene[data-phase=home] #towerStoreyControl #upgradeButton[data-affordable=false]{background:var(--action-fill);color:#d0d9dc;border-color:var(--action-border)}
@media(max-width:760px){#sceneMessages{left:18px;width:min(420px,calc(100% - 36px))}}
#finishPanel .finish-results>.kicker{display:none}
#finishPanel #finishTitle{margin:0 0 14px}
#finishPanel #finishRewards{font-size:18px;line-height:1.5;margin:0 0 12px}
#finishPanel #finishSummary{font:400 13px/1.6 var(--sans);margin:0 0 12px}
#finishPanel #keeperSummary{font:400 12px/1.5 var(--sans);color:#cfbfe2;margin:0 0 20px}
#finishPanel #nextTowerButton{width:100%;justify-content:space-between}
#finishPanel #replayButton.finish-home{width:100%;justify-content:center;min-height:44px;margin-top:8px;padding:10px 16px;background:transparent;color:#e1e7e5;border:1px solid var(--action-border);box-shadow:none;font-size:13px}
#finishPanel #replayButton.finish-home:hover{background:#ffffff0d}
#towerStoreyControl{width:48px;max-width:48px}
#scene[data-phase=home] #towerStoreyControl #upgradeButton{width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border:1px dashed #f3d39a;border-radius:50%;background:#132c37ed;color:#ffe3aa;font:400 28px/1 var(--sans);display:grid;place-items:center;box-shadow:0 0 0 5px #f3d39a0a}
#scene[data-phase=home] #towerStoreyControl #upgradeButton[data-affordable=false]{border-color:#d0d9dc80;background:#132c37ed}
#storeyDetails{position:absolute;top:54px;right:0;width:260px;max-width:calc(100vw - 32px);text-align:left;z-index:1}
.tower-build-prompt{display:none!important}

/* Lightweight player setup, shown before the 3D game is imported. */
.player-setup{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:clamp(24px,5vw,64px) max(24px,calc((100vw - 900px)/2));border:0;background:linear-gradient(155deg,#050326,#162834 70%,#37265a);color:#f6eedc;overflow:auto;font-family:var(--sans)}
.player-setup::backdrop{background:#050326}
.setup-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:32px}.setup-header img{width:clamp(135px,22vw,200px);filter:brightness(0) invert(1)}
.player-setup button,.profile-preferences button{min-height:44px;padding:10px 16px;border:1px solid var(--action-border);border-radius:14px;background:var(--action-fill);color:var(--action-text);font:500 14px var(--sans)}
.player-setup h1{font:400 clamp(32px,5vw,50px)/1.15 var(--serif);margin:0 0 16px}.player-setup h1:focus{outline:none}.setup-help,.setup-note{font:400 14px/1.7 var(--sans);color:#c6d2d5;max-width:620px;margin:0 0 24px}
.player-setup fieldset{border:0;padding:0;margin:24px 0}.player-setup legend,.setup-name{font:500 14px var(--sans);color:#e4e9e4;margin-bottom:12px}
.setup-name{display:flex;flex-direction:column;gap:12px;max-width:440px}.setup-name input{width:100%;min-height:52px;padding:12px 16px;background:#ffffff08;border:1px solid var(--action-border);border-radius:12px;color:#fff1dc;font:400 16px var(--sans)}
.setup-ages,.setup-interests,.setup-towers,.setup-skies{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.setup-interests{grid-template-columns:repeat(3,minmax(0,1fr))}
.setup-choice{position:relative;display:flex;align-items:center;gap:10px;min-height:58px;padding:14px;background:#ffffff05;border:1px solid #bed1d233;border-radius:14px;cursor:pointer;color:#e4ebe8;font:400 13px/1.5 var(--sans)}
.setup-choice input{accent-color:#f0d39a;width:16px;height:16px;flex:none}.setup-choice:has(input:checked){border-color:#f3ccaa;background:#f3ccaa12}.setup-choice:has(input:focus-visible){outline:2px solid #f3ccaa;outline-offset:4px}.setup-choice:has(input:disabled){opacity:.45;cursor:not-allowed}.setup-choice small{position:absolute;bottom:3px;right:10px;color:#d2b4df;font-size:9px}.setup-interests .setup-choice{padding-bottom:20px}
.setup-towers{grid-template-columns:repeat(4,minmax(0,1fr))}.setup-towers .setup-choice{flex-wrap:wrap;justify-content:center;padding:10px;font-size:12px;text-align:center;gap:6px}.setup-towers img{display:block;max-width:100%;width:110px;height:145px;object-fit:contain;flex-basis:100%}
.setup-skies{grid-template-columns:repeat(5,minmax(0,1fr))}.setup-skies .setup-choice{min-height:95px;align-items:flex-end;justify-content:center;padding:10px;background:var(--sky-preview);color:#fff;text-shadow:0 1px 4px #000;border-color:#ffffff33}.setup-skies .setup-choice:has(input:checked){outline:2px solid #f3ccaa;outline-offset:3px}.setup-skies input{position:absolute;top:10px;left:10px}
.player-setup footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:28px}.player-setup footer .main-button{margin-left:auto;background:var(--action-gold);border-color:#ffe4b3;color:#172934;padding:14px 24px;min-width:190px}.setup-status{font:13px/1.6 var(--sans);color:#f3ccaa;min-height:0}
.profile-preferences,.profile-progression,.profile-topic-progress{margin:32px 0;padding-top:24px;border-top:1px solid #bed1d22b}.profile-preferences p,.profile-progression p,.profile-topic-progress p{font:400 14px/1.7 var(--sans);color:#c7d2d3}.profile-preferences small{display:block;margin-top:12px;font:12px/1.6 var(--sans);color:#b9c8cd}.profile-next-unlock{display:block;color:#f3ccaa;font:500 14px/1.6 var(--sans);margin-top:16px}
.profile-topic-progress>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.profile-topic-progress>div>div{padding:16px;border:1px solid var(--action-border);border-radius:14px}.profile-topic-progress strong,.profile-topic-progress small{display:block;font:500 13px/1.6 var(--sans)}.profile-topic-progress small{font-size:12px;color:#c8d1d4;margin:8px 0}.profile-topic-progress progress{width:100%}
#scene #sceneMessages #milestoneNotice{margin:0;padding:12px 16px;border:1px solid #f3ccaa66;border-radius:14px;background:#172632f5;color:#f3dba8;font:500 13px/1.6 var(--sans)}
@media(max-width:600px){.player-setup{padding:24px 20px}.setup-header{margin-bottom:28px}.setup-interests{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-towers{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-towers img{height:125px}.setup-skies{grid-template-columns:repeat(3,minmax(0,1fr))}.profile-topic-progress>div{grid-template-columns:1fr}}

/* Setup uses the island skies, brass details and collectible art of the game. */
.player-setup{background:linear-gradient(#05032655,#05032677),var(--setup-palette,linear-gradient(155deg,#050326,#37265a));transition:background-color 720ms var(--motion-ease)}
.player-setup::before{content:'';position:fixed;inset:12px;border:1px solid #f3ccaa26;border-radius:22px;pointer-events:none;z-index:-1}
.setup-header{margin-bottom:24px}.setup-header>button{background:#ffffff05;border-color:#f3ccaa33;color:#ded5df;border-radius:24px}
.setup-progress{display:flex;align-items:center;gap:12px;margin-bottom:28px;max-width:650px}.setup-progress span{display:flex;align-items:center;gap:8px;color:#b6aabd;font:500 11px/1.5 var(--sans);flex:1}.setup-progress span::before{content:'◇';display:grid;place-items:center;width:26px;height:26px;border:1px solid #f3ccaa33;border-radius:50%;flex:none;color:#cda7de}.setup-progress span[data-active=true]{color:#ffe1ac}.setup-progress span[data-active=true]::before{content:'✦';border-color:#f3ccaa;background:#f3ccaa15;box-shadow:0 0 22px #cf6de024;color:#f3ccaa}.setup-progress span[data-complete=true]::before{content:'✓';color:#9fe0c7;border-color:#9fe0c788}
.setup-introduction{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:20px;align-items:center;margin-bottom:24px}.setup-introduction .kicker{margin-bottom:12px}.setup-introduction .setup-help{margin-bottom:0}.setup-illustration{width:100%;height:190px;object-fit:contain;filter:drop-shadow(0 12px 24px #05032655);animation:setupFloat 7s ease-in-out infinite}
@keyframes setupFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.player-setup .setup-choice{background:linear-gradient(145deg,#f3ccaa0c,#cf6de009);border-color:#f3ccaa33;box-shadow:inset 0 1px 0 #ffffff06;transition:background 520ms var(--motion-ease),border-color 520ms var(--motion-ease),box-shadow 520ms var(--motion-ease)}
.player-setup .setup-choice:has(input:checked){background:linear-gradient(145deg,#f3ccaa20,#cf6de014);border-color:#f3ccaa;box-shadow:0 0 24px #cf6de018,inset 0 1px 0 #f3ccaa22}
.player-setup .setup-choice:hover:not(:has(input:disabled)){border-color:#f3ccaa88;background-color:#f3ccaa0a}
.setup-interests .setup-choice{min-height:76px;border-left:3px solid var(--topic-tint);padding:16px 12px 22px}.setup-interests .setup-choice small{color:var(--topic-tint)}
.setup-towers .setup-choice{background:radial-gradient(ellipse at 50% 40%,#cf6de019,transparent 75%),#05032622}.setup-towers .setup-choice:has(input:checked){background:radial-gradient(ellipse at 50% 40%,#f3ccaa28,transparent 75%),#05032633}
.setup-skies .setup-choice,.setup-skies .setup-choice:has(input:checked){background:var(--sky-preview)}
.player-setup footer .main-button{border-radius:24px;box-shadow:0 5px 24px #f3ccaa18;min-height:50px}.player-setup footer button:not(.main-button){border-radius:24px;background:transparent}
@media(max-width:600px){.setup-progress{gap:8px;margin-bottom:20px}.setup-progress span{font-size:10px;gap:5px}.setup-progress span::before{width:22px;height:22px}.setup-introduction{grid-template-columns:minmax(0,1fr) 115px;gap:10px;margin-bottom:24px}.setup-illustration{height:125px}.player-setup h1{font-size:32px}.setup-help{font-size:13px}.setup-introduction .kicker{font-size:9px;letter-spacing:1.5px}.setup-header{margin-bottom:24px}}
@media(prefers-reduced-motion:reduce){.setup-illustration{animation:none}.player-setup .setup-choice{transition:none}}
/* More breathing room around player choices. */
.setup-header{margin-bottom:32px}.setup-progress{margin-bottom:36px}.setup-introduction{margin-bottom:36px;gap:28px}.setup-introduction .setup-help{line-height:1.8}.setup-body fieldset{margin:30px 0}.setup-ages,.setup-interests,.setup-towers,.setup-skies{gap:16px}.setup-choice{min-height:66px;padding:18px}.setup-name{gap:14px;margin-bottom:28px}.setup-name input{min-height:56px}.player-setup footer{margin-top:36px;padding-top:22px;border-top:1px solid #f3ccaa1c}.setup-interests .setup-choice{min-height:88px;padding:18px 16px 24px}.profile-preferences,.profile-progression,.profile-topic-progress{margin:40px 0;padding-top:32px}
@media(max-width:600px){.setup-header{margin-bottom:28px}.setup-progress{margin-bottom:28px}.setup-introduction{margin-bottom:28px;gap:16px}.setup-ages,.setup-interests,.setup-towers,.setup-skies{gap:12px}.setup-choice{padding:14px;min-height:62px}.setup-interests .setup-choice{padding:16px 12px 22px;min-height:82px}.player-setup footer{margin-top:28px;padding-top:20px}}
/* Favourite topics behave as selectable chips, without checkbox furniture. */
.player-setup .setup-interests{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:22px}
.player-setup .setup-interests .setup-interest-chip{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 18px;border:1px solid #f3ccaa40;border-radius:999px;background:linear-gradient(135deg,#ffffff08,#cf6de008);color:#e9e4ec;font:500 13px/1.5 var(--sans);max-width:100%;text-align:center;box-shadow:none}
.player-setup .setup-interests .setup-interest-chip[aria-pressed=true]{border-color:#f3ccaa;background:linear-gradient(135deg,#f3ccaa28,#cf6de01c);color:#ffe5b9;box-shadow:0 0 20px #cf6de014}
.setup-interest-chip[aria-pressed=true]::after{content:'✓';font-size:12px;color:#f3ccaa}
.player-setup .setup-interests .setup-interest-chip:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:600px){.player-setup .setup-interests{gap:10px}.player-setup .setup-interests .setup-interest-chip{padding:12px 15px;font-size:12px}}

/* Keep the first task focused on the existing doorway, with no paid distractions. */
.scene[data-phase=home][data-onboarding=first-topic] #towerStoreyControl{display:none!important}
.scene[data-phase=home][data-onboarding=first-topic] .destination:not([data-floor="1"][data-slot="1"]){display:none!important}

/* One compact goal above home messages; gameplay keeps the question space free. */
#campaignGoal{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px 14px;margin:0;padding:12px 16px;border:1px solid #f3ccaa44;border-radius:14px;background:linear-gradient(120deg,#37265ae8,#10212df2);color:#fff1dc;font:400 12px/1.4 var(--sans)}
#campaignGoal strong{font-weight:500}#campaignGoal>span:not(.campaign-lights){font-size:11px;color:#e6c9aa;text-align:right}
.campaign-lights{display:flex;grid-column:1/-1;gap:9px}.campaign-lights i{width:7px;height:7px;border-radius:50%;background:#493d55;border:1px solid #b394be55}.campaign-lights i.lit{background:#f3ccaa;border-color:#ffe7bf;box-shadow:0 0 8px #cf6de077}
#campaignGoal[data-complete=true]{border-color:#8ad9c277;background:linear-gradient(120deg,#243e46ed,#37265ae8)}
.scene:not([data-phase=home]) #campaignGoal{display:none}
.profile-campaign{margin:32px 0;padding:24px;border:1px solid #f3ccaa44;border-radius:18px;background:linear-gradient(140deg,#37265a88,#102b3455)}
.profile-campaign strong{font:400 24px/1.3 var(--serif);color:#f3ccaa}.profile-campaign p{font-size:14px;line-height:1.7}.profile-campaign progress{display:block;width:100%;height:6px;margin:18px 0 12px}.profile-campaign small{color:#e6c9aa}
@media(max-width:480px){#campaignGoal{padding:10px 14px;grid-template-columns:1fr}#campaignGoal>span:not(.campaign-lights){text-align:left}.campaign-lights{grid-column:auto}}
