﻿/* Active presentation layout. Layers: board 0, effects 3, foreground 40, drag 50. */
:root{--brass:#c8a66c;--navy:#0c1d30;--parchment:#efe0bc;--safe: max(12px,env(safe-area-inset-bottom))}
[hidden]{display:none!important}button,summary{touch-action:manipulation}button:focus-visible,summary:focus-visible{outline:3px solid #8df0dc;outline-offset:2px}
body{background:linear-gradient(#071528dd,#071528ed),url('assets/art/knight-tutorial-courtyard-v1.webp') center/cover fixed}
body.in-game{height:100dvh;overflow:hidden;display:grid;grid-template-rows:0 0 minmax(0,1fr)}body.in-game>header{display:none}body.in-game main{grid-row:3;grid-column:1;height:100%;width:100%;min-height:0;max-width:none;padding:10px}
body.in-game #journey-nav{position:fixed;z-index:20;right:max(26px,env(safe-area-inset-right));top:24px;display:flex;gap:6px;margin:0;padding:0;background:none;border:0;width:auto}
body.in-game #journey-nav button{display:none;min-height:44px;font:13px Georgia;padding:8px 12px;flex:none;background:#112238e8;border-color:#9b8155}
body.in-game #journey-nav button:first-child,body.in-game #journey-nav button:nth-child(4),body.in-game #journey-nav .skip-tutorial{display:block}
body:has(#play-screen[data-presentation="post_combat_dialogue"]) #journey-nav,body:has(#play-screen[data-presentation="star_reveal"]) #journey-nav,body:has(#play-screen[data-presentation="result_actions"]) #journey-nav{visibility:hidden}
#play-screen.game-shell{position:relative;isolation:isolate;height:100%;min-height:0;max-width:1520px;margin:auto;display:grid;grid-template-columns:minmax(0,1fr) 245px;grid-template-rows:56px auto minmax(0,1fr);gap:8px;padding:0 22px 16px;border:2px solid #9c8155;border-radius:20px;overflow:hidden;background:linear-gradient(#0b203362,#0b203388),url('assets/art/knight-tutorial-courtyard-v1.webp') center/cover;box-shadow:inset 0 0 0 4px #081525,inset 0 0 0 6px #b89a5a44;--board-size:min(calc(100dvh - 310px),calc(100vw - 375px),740px)}
.game-shell .slice-brand{position:absolute;left:24px;top:17px;display:flex;flex-direction:column;align-items:center;color:#f1d390;line-height:1;font-family:Georgia;pointer-events:none}.slice-brand span{font-size:11px;letter-spacing:5px}.slice-brand strong{font-size:24px;letter-spacing:2px}.slice-brand small{font:6px system-ui;letter-spacing:1.5px;margin-top:5px}
.game-shell .play-topbar{grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:center;padding:0 230px 0 150px;min-width:0;border-bottom:1px solid #c5a66b33}
.game-shell #title{font:clamp(17px,2vw,25px) Georgia;color:#f0d6a7;margin:0;text-align:center;overflow-wrap:anywhere}.game-shell #level{display:none}.game-shell .daily-notice{font-size:11px;padding:5px;max-width:200px}
.game-shell .mastery-dock{grid-column:2;grid-row:1/3;align-self:start;z-index:2;padding:12px 14px;border:1px solid #b39460;border-radius:7px;background:linear-gradient(150deg,#20364aeb,#0d1e30f5);min-width:0;max-height:100%;overflow:auto}
.mastery-summary{min-height:44px;display:flex;flex-direction:column;justify-content:center;gap:4px;cursor:pointer;list-style:none;font:13px Georgia}.mastery-summary span{font-size:22px;letter-spacing:3px;color:#e4c283}.mastery-summary strong:after{content:' ▾';color:#be9f65}.game-shell #objectives{display:block;margin:8px 0;padding-left:20px;font:13px/1.3 Georgia}.game-shell #objectives li{padding:5px 0;margin:0;overflow-wrap:anywhere;border-color:#a58a5522}.mastery-rule{display:block;font:11px/1.4 system-ui;color:#b8cbd1}
.game-shell .play-stage{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:minmax(0,1fr) 245px;grid-template-rows:minmax(0,1fr) 116px;gap:12px;min-height:0}
.game-shell .arena{grid-row:1;grid-column:1;display:grid;grid-template-rows:minmax(0,1fr) 22px;align-items:center;justify-items:center;min-height:0;padding:0;background:none}
.game-shell #mission,.game-shell .coordinates{display:none}.game-shell #notice{grid-row:2;min-height:0;margin:0;padding:0;max-height:22px;font-size:11px;line-height:1.4;overflow:auto;text-align:center;width:100%;color:#e7d7b5}
.game-shell #board{position:relative;grid-row:1;width:var(--board-size);height:var(--board-size);max-width:100%;max-height:100%;margin:0;padding:9px;gap:4px;border:8px solid #5e655d;border-bottom:11px solid #2d3e46;border-radius:8px;background:linear-gradient(135deg,#8f907a,#334a55);box-shadow:0 0 0 2px #bd9e62,0 9px 0 2px #1a303c,10px 19px 22px #020b1699;overflow:visible;transform:perspective(1400px) rotateX(5deg);transform-origin:center}
.game-shell #board:after{content:'';position:absolute;inset:0;pointer-events:none;background:url('assets/art/stone-courtyard-board-border.svg') center/100% 100%}
.game-shell .tile{min-height:0;min-width:0;padding:0;aspect-ratio:auto;border-radius:4px;background:#63717a url('assets/art/tutorial-diorama-stone-v2-0.webp') center/100% 100%;border:1px solid #a0aaa177;border-bottom:3px solid #253847;overflow:visible;box-shadow:2px 3px 3px #071a2b88}
.game-shell .tile:nth-child(4n+1){background-image:url('assets/art/tutorial-diorama-stone-v2-1.webp')}.game-shell .tile:nth-child(4n+2){background-image:url('assets/art/tutorial-diorama-stone-v2-2.webp')}.game-shell .tile:nth-child(4n+3){background-image:url('assets/art/tutorial-diorama-stone-v2-3.webp')}
.game-shell .tile.deploy{outline:1px solid #85bcb0;outline-offset:-3px}.game-shell .tile.enemy{box-shadow:inset 0 0 0 1px #dc927344,2px 3px 3px #071a2b88}.game-shell .tile .coord{display:none}.game-shell:has(.reference-drawer[open]) .coord{display:block}.game-shell .tile .unit{inset:1% 5% 12%;pointer-events:none;filter:drop-shadow(2px 5px 3px #06142399)}
.token-art{width:100%;height:100%;object-fit:contain}.game-shell .tile .unit{line-height:0}.game-shell .tile .unit>svg,.game-shell .tile .unit>img{display:block}.game-shell .tile .unit:before{content:'';position:absolute;bottom:-1%;left:4%;right:4%;height:17%;background:url('assets/art/stone-courtyard-base-friendly.svg') center/100% 100%;z-index:-1}.game-shell .tile.enemy .unit:before{background-image:url('assets/art/stone-courtyard-base-enemy.svg')}.game-shell .hp,.game-shell .hptext{pointer-events:none}.game-shell .hp{z-index:5}.game-shell .hptext{z-index:5;font-size:11px}
.game-shell .tile.friendly{touch-action:none}.game-shell[data-presentation=deployment] .tile.friendly{cursor:grab}.game-shell .tile.legal-placement,.game-shell .tile.drag-legal{outline:2px solid #b2f0ce;outline-offset:-4px}.game-shell .tile.drag-source .unit{opacity:.3}
.game-shell .command-deck{position:relative;grid-column:1;grid-row:2;display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,260px) 180px;grid-template-rows:minmax(0,1fr) 28px;gap:5px 18px;align-items:center;min-height:0;max-width:1060px;width:100%;justify-self:center;padding:10px 18px;border:2px solid #987a48;border-radius:8px;background:linear-gradient(120deg,#14273bea,#081523fa);box-shadow:inset 0 0 0 3px #081725,0 8px 18px #0008}
.game-shell .context-slot{grid-column:1;grid-row:1/3;min-width:0;max-height:100%;overflow:auto}.game-shell .tutorial-instruction{margin:0;padding:0;border:0;background:none}.game-shell .tutorial-instruction>strong{display:none}.game-shell #tutorial-tools p{font:15px/1.3 Georgia;margin:0 0 5px;color:#eadbbb}.game-shell #tutorial-tools p+p{font:11px/1.4 system-ui;color:#c4d5d7}.game-shell .deployment-tray{grid-column:2;grid-row:1/3;min-width:0}.game-shell .economy{display:none}.game-shell #roster{display:flex;gap:7px}.game-shell .recruit{touch-action:none;position:relative;display:flex;align-items:end;justify-content:center;flex:1;min-width:0;min-height:90px;margin:0;padding:60px 4px 5px;border-color:#a99059;background:radial-gradient(ellipse at 50% 40%,#2d4c5f,#102138 80%);text-align:center;gap:0;overflow:visible}.game-shell .recruit img,.game-shell .recruit svg{position:absolute;left:50%;top:-4px;transform:translateX(-50%);width:68px;height:68px;object-fit:contain;filter:drop-shadow(0 4px 2px #0008)}.game-shell .recruit>span{font:14px Georgia;overflow-wrap:anywhere}.game-shell .recruit small,.game-shell .recruit b{display:none}
.game-shell .action-dock{grid-column:3;grid-row:1;min-width:0}.game-shell #battle{min-height:56px;letter-spacing:1px;font:bold 22px Georgia;background:linear-gradient(#f4daa0,#bd9454);color:#172a3a;border-color:#efd19a;box-shadow:inset 0 0 0 2px #967343}.game-shell #battle span{display:none}
.game-shell .reference-drawer{grid-column:3;grid-row:2;min-width:0}.reference-drawer>summary{min-height:28px;cursor:pointer;font:11px Georgia;color:#deca9e;padding:3px 0;text-align:right}.game-shell .reference-drawer[open]{position:absolute;inset:auto 0 0;z-index:12;background:#12253a;border:1px solid #b59560;border-radius:8px;padding:12px;max-height:min(60dvh,420px);overflow:auto}.game-shell .reference-body{padding:8px}.game-shell .reference-body button{min-height:40px}.game-shell #inspect{margin:0;max-height:none}.game-shell #verification{font-size:11px}.game-shell .show-saved-result{min-height:44px;margin-top:5px;width:100%}
.game-shell[data-battle=replay] .deployment-tray,.game-shell[data-battle=replay] .context-slot{display:none}.game-shell[data-battle=replay] .command-deck{display:block;width:min(900px,100%)}.game-shell[data-battle=replay] .action-dock{width:100%}.game-shell[data-battle=replay] .reference-drawer{position:absolute;bottom:8px;right:12px}.game-shell #replay .toolbar{margin:0;gap:5px;flex-wrap:nowrap}.game-shell #replay .toolbar button,.game-shell #replay .toolbar select{min-width:0;flex:1;min-height:40px;padding:5px;font-size:12px}.game-shell #replay #explanation{font-size:12px;line-height:1.35;max-height:34px;overflow:auto;margin:0;max-width:80%}.game-shell #replay>details{display:none}.game-shell #scrub{min-height:20px;margin:0}
.game-shell .presentation-layer{position:relative;grid-column:1/-1;grid-row:1/-1;z-index:40;display:grid;grid-template-columns:subgrid;grid-template-rows:subgrid;padding:0;background:#05132488;overflow:hidden}.game-shell .presentation-layer:has(.cinematic-stage:not([hidden])){padding:0;background:linear-gradient(#07142533,#07142522 65%,#06132299)}
.game-shell .cinematic-stage{grid-column:1/-1;grid-row:-2/-1;position:relative;align-self:stretch;justify-self:stretch;pointer-events:none}
.game-shell .cinematic-cast{position:absolute;inset:12px 4% 190px;display:flex;align-items:end;justify-content:center;gap:0;pointer-events:none}.game-shell .cinematic-hero{position:relative;width:62%;height:100%;filter:brightness(.85) drop-shadow(0 15px 18px #0009);animation:cast-entrance 500ms ease-out both}.game-shell .cinematic-reaction{position:relative;width:35%;height:80%;opacity:0;transform:translateX(60px);filter:brightness(.75) drop-shadow(0 12px 16px #0008);transition:transform .3s,opacity .3s,filter .2s}.game-shell .cinematic-reaction.entered{opacity:1;transform:none}.game-shell .cinematic-hero.speaking,.game-shell .cinematic-reaction.speaking{filter:brightness(1.05) drop-shadow(0 12px 16px #0008)}
.game-shell .cinematic-hero img,.game-shell .cinematic-reaction img{width:100%;height:100%;object-fit:contain}.game-shell .art-status{position:absolute;bottom:178px;left:30px;right:30px;text-align:center;font:11px system-ui;color:#e8d7b4}
.game-shell #character-dialogue{position:relative;grid-column:1/-1;grid-row:-2/-1;align-self:end;justify-self:center;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) 145px;gap:20px;width:min(920px,calc(100% - 52px));padding:22px;min-height:124px;margin:0 0 28px;border:2px solid #b99559;border-radius:6px;background:linear-gradient(115deg,#f0dfba,#e7d3ac);box-shadow:inset 0 0 0 3px #f6e9cb77,0 0 0 4px #102235,0 10px 30px #0007;color:#302d28}.game-shell #character-dialogue .character-portrait{display:none}.game-shell .dialogue-copy strong{font:bold 18px Georgia;color:#304858;letter-spacing:.5px}.game-shell .dialogue-copy p{font:22px/1.3 Georgia;color:#302d28;margin:6px 0}.game-shell .dialogue-copy small{font-size:11px;color:#695e47}.game-shell .dialogue-controls{display:grid;gap:6px;align-content:center;width:auto}.game-shell .dialogue-controls button{min-height:44px;font:14px Georgia;background:linear-gradient(#f6dda3,#cba263);color:#27323b;border-color:#a4824e;padding:8px}.game-shell .dialogue-controls button:nth-child(2){background:transparent;text-decoration:underline;font-size:12px}
.character-art-pending{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;border:1px solid #bd9e66;border-radius:45% 45% 12px 12px;background:linear-gradient(135deg,#1b3149ef,#0b1d30e8);max-width:380px;margin:auto;padding:18px;text-align:center;color:#dbc48d;box-shadow:inset 0 0 0 5px #102335}.character-art-pending>span{font:60px Georgia;opacity:.45}.character-art-pending strong{font:24px Georgia}.character-art-pending small{font:13px system-ui;color:#b9cbd0}
.game-shell .result-dock{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(640px,100%);max-height:100%;overflow:auto;min-height:0;padding:24px;border:2px solid #c4a15f;border-radius:16px;background:radial-gradient(ellipse at 50% 0,#304c64,#102339 75%);box-shadow:inset 0 0 0 4px #0b192c,0 18px 50px #0009;color:#eddfbc}
.game-shell #result{display:contents;margin:0;border:0}.game-shell #result h2{grid-column:1/-1;font:30px Georgia;color:#edcf91;text-align:center;margin:0}.game-shell .battle-stars{grid-column:1/-1;display:flex;justify-content:center;gap:12px;font:42px Georgia;color:#efd091}.game-shell .rating-label{grid-column:1/-1;text-align:center;font:16px Georgia;color:#d4c9b5;margin:0}.earned-star{animation:star-earn 350ms both;animation-delay:var(--star-delay)}.reveal-pending .earned-star{animation-play-state:paused}.game-shell .skip-star-reveal{grid-column:1/-1;background:transparent;color:#dac591;border-color:#8f7955;min-height:40px;font:13px Georgia}
.game-shell #journey-outcome{display:contents;margin:0;padding:0;border:0;background:none}.game-shell #journey-outcome h2{grid-column:1/-1;font:17px/1.25 Georgia;text-align:center;margin:0;color:#e5d0a5}.game-shell .result-dock button{width:100%;min-width:0;min-height:46px;margin:0!important;font:15px/1.25 Georgia;padding:10px;white-space:normal;overflow-wrap:normal}.game-shell .result-dock .next-challenge{grid-column:1/-1;background:linear-gradient(#f4dba2,#bc934f);color:#172b3a;border-color:#efd194;font-weight:bold}.game-shell .score-details{grid-column:1/-1;min-width:0;font:13px/1.4 system-ui;max-height:min(29dvh,225px);overflow:auto;border-top:1px solid #b99a5f77}.score-details summary{font:14px Georgia;cursor:pointer;min-height:36px;padding:8px 0;color:#e4ce9d;position:sticky;top:0;background:#142a40}.score-details p{margin:7px 0;overflow-wrap:anywhere}.score-details .objective-met{color:#aee2bc}.score-details .objective-missed{color:#f3b4a2}.game-shell .mastery{grid-column:1/-1;text-align:center;font:12px Georgia;color:#dec38e;margin:0}
.portrait-flight{z-index:50;pointer-events:none}.portrait-flight img{width:100%;height:100%;object-fit:contain}.recruit-drag-ghost{position:fixed;width:76px;height:90px;z-index:50;pointer-events:none;filter:drop-shadow(0 16px 8px #0009);transform:translateY(-8px)}.recruit-drag-ghost img,.recruit-drag-ghost svg{width:100%;height:100%;object-fit:contain}.drop-target{outline:3px solid #ffdfa3!important;outline-offset:1px}.guided-action{outline:2px solid #f3d184}.guide-target{box-shadow:inset 0 0 0 2px #ffe1a4,0 0 18px #edc56888}.drag-demo{position:absolute;width:34px;height:44px;left:30%;top:20%;z-index:5;pointer-events:none;animation:drag-hint 3s ease-in-out infinite}.drag-demo svg{width:100%;height:100%}.dragging-recruit .drag-demo{visibility:hidden}
#home-screen,#campaign-screen,#help-screen,#access-screen{max-width:1120px;padding:30px;margin:28px auto;background:linear-gradient(145deg,#14283eed,#08192df5);border:1px solid #a08450;border-radius:14px;box-shadow:inset 0 0 0 4px #091827,0 20px 60px #0008}#home-screen{text-align:center}#home-screen h1{font-size:clamp(30px,4vw,48px);color:#eed6a1}#home-screen>button{min-height:48px;margin:6px;font:16px Georgia}#home-screen .entry-choices{text-align:left;gap:18px;margin:24px 0}.entry-choice{font:26px Georgia;min-height:150px;border:1px solid #bd9d60;background:linear-gradient(135deg,#3b566a,#12283c);box-shadow:inset 0 0 0 4px #0a1c30}.entry-choice span{font:14px/1.45 system-ui;color:#cddbdc}.entry-choice:first-child{background:linear-gradient(135deg,#345566,#132b3b)}.entry-choice:nth-child(2){background:linear-gradient(135deg,#6a5634,#263547)}#campaign-screen h1{color:#eed6a1}.chapter-cards{gap:18px}.chapter-card{background:linear-gradient(130deg,#263f53,#102339);border-color:#937849;box-shadow:inset 0 0 0 3px #0b1c2f}.chapter-card h2{font:25px Georgia;color:#e6c98c}.chapter-card button{font:14px/1.4 Georgia;min-height:48px;border-color:#526373;padding:12px}.chapter-card button[data-puzzle]{display:flex;align-items:center;text-align:left}.recommended-next{font:17px Georgia;background:#294754;color:#f3dca6;border-color:#ae955b}
@keyframes star-earn{from{opacity:.15;transform:translateY(12px) scale(.5)}to{opacity:1;transform:none}}@keyframes cast-entrance{from{opacity:0;translate:0 35px}to{opacity:1;translate:0 0}}@keyframes drag-hint{0%,15%{translate:var(--guide-x,0) var(--guide-y,30px);opacity:.2}55%,80%{translate:0 0;opacity:.8}100%{opacity:.2}}
@media(max-width:700px) and (min-height:501px){
 body.in-game main{padding:5px}body.in-game #journey-nav{top:16px;right:15px;gap:4px}body.in-game #journey-nav button{font-size:12px;padding:6px 9px;min-height:44px}
 #play-screen.game-shell{grid-template-columns:1fr;grid-template-rows:78px auto minmax(0,1fr);gap:8px;padding:0 12px 12px;border-radius:15px;--board-size:min(calc(100vw - 48px),calc(100dvh - 460px))}
 #play-screen.game-shell:has(.mastery-dock:not([open])){--board-size:min(calc(100vw - 48px),calc(100dvh - 345px))}
 .game-shell .slice-brand{left:15px;top:16px;align-items:start}.slice-brand span{font-size:8px;letter-spacing:4px}.slice-brand strong{font-size:19px}.slice-brand small{font-size:5px;letter-spacing:.5px}
 .game-shell .play-topbar{grid-row:1;padding:54px 0 0;align-items:start}.game-shell #title{font-size:16px;line-height:1.2}.game-shell .mastery-dock{grid-column:1;grid-row:1;padding:6px 10px;max-height:180px}.mastery-summary{flex-direction:row;justify-content:space-between;align-items:center;min-height:32px;font-size:12px;gap:8px}.mastery-summary span{font-size:17px;letter-spacing:0}.game-shell #objectives{font-size:12px;line-height:1.25;margin:3px 0}.game-shell #objectives li{padding:3px 0}.mastery-rule{font-size:10px}
 .game-shell .play-stage{grid-column:1;grid-row:3;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) max-content;gap:8px}.game-shell .arena{grid-column:1;grid-row:2;grid-template-rows:minmax(0,1fr) 22px}.game-shell #board{padding:6px;gap:3px;border-width:6px;border-bottom-width:9px}.game-shell #notice{font-size:10px;line-height:1.25;max-height:24px}.game-shell .hptext{font-size:10px}
 .game-shell .command-deck{grid-column:1;grid-row:3;grid-template-columns:minmax(0,1fr) minmax(108px,max-content);grid-template-rows:auto minmax(64px,1fr) 24px;gap:4px 8px;padding:7px 9px;min-height:146px}.game-shell .context-slot{grid-column:1/-1;grid-row:1;overflow:auto}.game-shell #tutorial-tools p{font-size:13px;margin:0 0 2px}.game-shell #tutorial-tools p+p{font-size:10px}.game-shell .deployment-tray{grid-column:1;grid-row:2}.game-shell .action-dock{grid-column:2;grid-row:2}.game-shell .recruit{min-height:64px;padding:44px 2px 3px}.game-shell .recruit img,.game-shell .recruit svg{height:50px;width:50px;top:-4px}.game-shell .recruit>span{font-size:12px}.game-shell #battle{font-size:18px;min-height:52px;padding:10px 8px}.game-shell .reference-drawer{grid-column:1/-1;grid-row:3}.reference-drawer>summary{font-size:11px;min-height:24px;padding:3px 0}
 .game-shell[data-battle=replay] .command-deck{padding:8px}.game-shell #replay .toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.game-shell #replay .toolbar button,.game-shell #replay .toolbar select{min-height:36px;font-size:11px;padding:4px}.game-shell #replay #explanation{max-width:100%;max-height:29px;font-size:10px}.game-shell[data-battle=replay] .reference-drawer{display:none}
 .game-shell .presentation-layer{padding:12px}.game-shell .cinematic-cast{inset:12px 3% 210px;gap:0}.game-shell .cinematic-hero{width:67%}.game-shell .cinematic-reaction{width:40%;height:76%;margin-left:-7%}.game-shell .art-status{left:18px;right:18px;bottom:194px;font-size:10px}.character-art-pending{padding:12px;gap:8px}.character-art-pending>span{font-size:32px}.character-art-pending strong{font-size:18px}.character-art-pending small{font-size:12px}
 .game-shell #character-dialogue{width:calc(100% - 30px);margin-bottom:20px;grid-template-columns:1fr;min-height:150px;padding:15px;gap:8px}.game-shell .dialogue-copy strong{font-size:17px}.game-shell .dialogue-copy p{font-size:18px;line-height:1.25}.game-shell .dialogue-controls{display:flex;gap:8px;width:100%}.game-shell .dialogue-controls button{flex:1;min-width:0;min-height:44px}.game-shell .dialogue-controls button:nth-child(2){font-size:13px}
 .game-shell .result-dock{padding:16px;gap:8px;border-radius:12px}.game-shell #result h2{font-size:27px}.game-shell .battle-stars{font-size:34px;gap:9px}.game-shell .rating-label{font-size:15px}.game-shell .result-dock button{font-size:14px;padding:9px;min-height:44px}.game-shell .score-details{font-size:12px;max-height:min(28dvh,215px)}.score-details summary{font-size:13px}.game-shell #journey-outcome h2{font-size:16px}.game-shell .mastery{font-size:11px}
 #home-screen,#campaign-screen,#help-screen,#access-screen{padding:20px 16px;margin:10px auto 24px;border-radius:10px}.entry-choices{grid-template-columns:1fr!important}.entry-choice{min-height:126px;font-size:24px}.entry-choice span{font-size:14px}.chapter-cards{grid-template-columns:1fr}.chapter-card{padding:18px}body:not(.in-game)>header{padding:14px;gap:10px}body:not(.in-game)>header .brand{font-size:24px}body:not(.in-game)>header>.eyebrow{display:none}body:not(.in-game) #journey-nav{padding:10px;display:flex;flex-wrap:wrap;gap:6px}body:not(.in-game) #journey-nav button{flex:1 1 40%;min-height:44px;font-size:13px}
}
@media(max-height:500px){
 #play-screen.game-shell{grid-template-rows:56px auto minmax(0,1fr);grid-template-columns:minmax(0,1fr) 210px;--board-size:min(calc(100dvh - 160px),calc(100vw - 520px))}.game-shell .play-stage{grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:minmax(0,1fr) 110px}.game-shell .mastery-dock{padding:6px 10px}.game-shell #objectives{font-size:11px}.game-shell #objectives li{padding:2px 0}.mastery-summary{min-height:30px;font-size:12px}.mastery-summary span{font-size:17px}.game-shell .command-deck{grid-template-columns:minmax(170px,1fr) minmax(130px,180px) 140px;grid-template-rows:minmax(0,1fr) 24px;padding:5px 12px}.game-shell .context-slot{grid-row:1}.game-shell .deployment-tray{grid-row:1}.game-shell .recruit{min-height:58px;padding:40px 4px 2px}.game-shell .recruit img,.game-shell .recruit svg{height:44px;width:44px}.game-shell #battle{font-size:18px;min-height:44px}.game-shell .reference-drawer{position:static;grid-column:3;grid-row:2}.game-shell #tutorial-tools p{font-size:12px}.game-shell #tutorial-tools p+p{font-size:10px}.game-shell .play-topbar{padding-right:220px}.game-shell #title{font-size:16px}.game-shell .slice-brand{top:12px}.slice-brand strong{font-size:20px}.slice-brand small{display:none}
 .game-shell .cinematic-cast{inset:12px 44% 25px 1%}.game-shell #character-dialogue{justify-self:end;margin:0 22px 30px 0;width:43%;grid-template-columns:1fr;padding:15px;gap:8px}.game-shell .dialogue-copy p{font-size:17px}.game-shell .dialogue-controls{display:flex;gap:8px}.game-shell .dialogue-controls button{flex:1}.game-shell .art-status{bottom:10px;font-size:10px}.game-shell .result-dock{max-width:680px;max-height:100%;padding:14px;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.game-shell #result h2{font-size:24px}.game-shell .battle-stars{font-size:28px}.game-shell #result h2,.game-shell .battle-stars,.game-shell .rating-label,.game-shell .score-details,.game-shell .skip-star-reveal,.game-shell .mastery,.game-shell #journey-outcome h2{grid-column:1/-1}.game-shell .result-dock .next-challenge{grid-column:1/-1}.game-shell .score-details{max-height:100px}.game-shell .result-dock button{min-height:40px;font-size:13px;padding:6px}
}
@media(prefers-reduced-motion:reduce){.earned-star,.cinematic-hero,.drag-demo{animation:none!important}.game-shell #board{transform:none}.cinematic-reaction{transition:none}.portrait-flight{display:none}}

.game-shell .arena{container-type:size;container-name:arena}
.game-shell #board{width:min(calc(100cqw - 24px),calc(100cqh - 26px));height:min(calc(100cqw - 24px),calc(100cqh - 48px))}

.game-shell .context-slot:has(.show-saved-result:not([hidden])) .tutorial-instruction{display:none}
.game-shell .tile.friendly .unit:has(img.guardian-approved):before{display:none}
.game-shell .show-saved-result{margin:0;min-height:44px;font:15px Georgia}
.game-shell .reference-body #level{display:block;width:100%;min-height:44px;font-size:13px;margin-bottom:12px}


/* Allocated chapter and live-status regions share a wrapping row, never an overlay. */
.game-shell .lesson-band{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:8px 20px;padding:5px 8px;border-bottom:1px solid #b69b6533;min-width:0}
.game-shell .scene-kicker{position:static;min-width:0;max-width:none;margin:0;font:13px/1.35 Georgia;letter-spacing:.8px;color:#f0d598;overflow-wrap:anywhere}
.game-shell .lesson-band .boardtop{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0;min-width:0;font:12px/1.35 system-ui;letter-spacing:.8px;color:#dec68e}
.game-shell .result-dock{grid-column:1/-1;grid-row:1/-1;align-self:center;justify-self:center;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:12px;max-height:calc(100% - 32px);overflow:hidden}
.game-shell #result{display:flex;flex-direction:column;gap:8px;min-height:0;overflow:hidden}
.game-shell .result-header{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;flex:none}
.game-shell #result h2{grid-column:1/-1;margin:0}.game-shell .battle-stars{grid-column:1/-1;margin:0}.game-shell .rating-label{grid-column:1/-1;margin:0}
.game-shell .result-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.game-shell .result-actions-pending .result-navigation{visibility:hidden;pointer-events:none}
.game-shell .score-details{order:1;flex:0 1 auto;min-height:0;max-height:min(29dvh,225px)}.game-shell #result .mastery{order:2;flex:none}
.game-shell .battle-stars .star-slot{position:relative;color:transparent;display:inline-block;line-height:1.15}
.game-shell .battle-stars .star-slot:before{content:'\2606';position:absolute;inset:0;color:#efd091}
.game-shell .battle-stars .earned-star{animation:none}
.game-shell .battle-stars .earned-star:after{content:'\2605';position:absolute;inset:0;color:#ffdb85;animation:star-fill 350ms both;animation-delay:var(--star-delay);transform-origin:50% 50%}
.game-shell .reveal-pending .earned-star:after{animation-play-state:paused}
.game-shell .battle-stars[data-reveal=complete] .earned-star:after{animation:none;opacity:1;transform:none;filter:drop-shadow(0 0 3px #f2cb7c66)}
.game-shell .skip-star-reveal.reveal-completed{visibility:hidden;pointer-events:none}
@keyframes star-fill{0%{opacity:0;transform:scale(.4);filter:drop-shadow(0 0 0 #f5cb70)}65%{opacity:1;transform:scale(1.12);filter:drop-shadow(0 0 10px #ffdc89)}100%{opacity:1;transform:scale(1);filter:drop-shadow(0 0 3px #f2cb7c66)}}
@media(max-width:700px) and (min-height:501px){.game-shell .lesson-band{grid-template-columns:minmax(0,1fr);gap:4px;padding:3px 2px}.game-shell .scene-kicker{font-size:12px}.game-shell .lesson-band .boardtop{font-size:11px}.game-shell .result-header{gap:6px}.game-shell .result-dock{padding:16px;max-height:calc(100% - 24px)}.game-shell .score-details{max-height:min(26dvh,185px)}}
@media(max-height:500px){.game-shell .result-dock{grid-template-columns:minmax(0,1fr);max-height:calc(100% - 20px)}.game-shell .result-navigation{grid-template-columns:repeat(4,minmax(0,1fr))}.game-shell .result-header{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.game-shell .result-header h2{grid-column:1;grid-row:1;text-align:left}.game-shell .result-header .battle-stars{grid-column:2;grid-row:1}.game-shell .result-header .rating-label,.game-shell .result-header .skip-star-reveal{grid-column:1/-1}.game-shell .score-details{max-height:80px}.game-shell .context-slot,.game-shell .deployment-tray{grid-row:1/3}}
@media(prefers-reduced-motion:reduce){.game-shell .battle-stars .earned-star:after{animation:none;opacity:1;transform:none}}

/* Modular Stone Courtyard art. Existing tile boxes and hit-testing are unchanged. */
.game-shell #board{background-image:linear-gradient(135deg,#bca37a55,#29313799),var(--courtyard-stone);background-size:auto,180px 180px;border-color:#a99a7d #766c58 #49463c #bcae91;box-shadow:inset 0 0 0 2px #e2d0a355,0 0 0 2px #bca16b,0 10px 0 2px #313c3c,10px 20px 24px #020b1699}
.game-shell .tile:nth-child(n){background-image:linear-gradient(135deg,#fff3d51c,#16252d22),var(--courtyard-stone);background-size:auto,var(--stone-size);background-position:0 0,var(--stone-x) var(--stone-y);border-color:#d7c5a1 #8b836e #4d534b #bdb395;box-shadow:inset 1px 2px 2px #fff0c777,inset -1px -2px 2px #252f3377,2px 4px 3px #091923aa}
.game-shell #board:before{content:'';position:absolute;left:0;right:0;bottom:100%;height:22px;margin-bottom:3px;background:var(--courtyard-wall) left bottom/44px 29px repeat-x;pointer-events:none;opacity:.85;filter:drop-shadow(0 3px 2px #08152399)}
.game-shell .tile.obstacle:nth-child(n){background-image:var(--courtyard-wall),var(--courtyard-stone);background-size:95% auto,200% 200%;background-position:center;background-repeat:no-repeat,repeat}
.game-shell .tile.cover:nth-child(n){background-image:var(--courtyard-cover),var(--courtyard-stone);background-size:48% auto,200% 200%;background-position:right top,center;background-repeat:no-repeat,repeat}
.game-shell .tile .unit:has(>.based-miniature):before{display:none}
.game-shell .tile .unit:has(>.based-miniature){filter:drop-shadow(1px 4px 2px #10191caa)}
.game-shell .tile.friendly:has(.based-miniature){border-left-color:#92d4c6;border-right-color:#548e85}
.game-shell .tile.enemy:has(.based-miniature){border-left-color:#b87365;border-right-color:#b87365}

/* Tactical identity and attached HUD. */
.game-shell .unit-assembly{position:absolute;inset:0;pointer-events:none;z-index:3}
.game-shell .tile{--team:#64e3ff}.game-shell .tile.enemy{--team:#ff806c}
.game-shell .tile .unit:before,.game-shell .tile .unit:has(>.based-miniature):before,.game-shell .tile.friendly .unit:has(img.guardian-approved):before{display:block;background:none;z-index:0;border:3px solid var(--team);border-radius:50%;bottom:0;height:15%;box-shadow:0 0 0 2px #10212b}
.game-shell .team-marker{position:absolute;top:2%;left:0;background:#10212b;color:var(--team);border:1px solid var(--team);border-radius:3px;padding:2px;font:bold clamp(7px,1.2vw,10px)/1 system-ui;z-index:6}
.game-shell .hp i{background:var(--team)}.game-shell .hp{border:1px solid var(--team);background:#10212b}.game-shell .hptext{background:#10212b;color:white;border-radius:3px;padding:1px 3px}
.game-shell .tile.selected{outline:3px solid var(--team);outline-offset:-4px}.game-shell .tile.deploy{outline:2px dashed #70cfff;outline-offset:-4px}.game-shell .tile.drag-legal{outline:3px solid #7df5c6}.game-shell .tile.drop-invalid{outline:4px solid #ff655c;background:#721d29!important}.game-shell .tile.drop-invalid:after{content:'?';font:bold 28px system-ui;color:white;position:absolute;inset:0;z-index:9}
.game-shell #board:after{display:none}.game-shell .combat-bubble{position:absolute;left:0;bottom:90%;z-index:10;background:#fff7df;color:#172734;border-radius:8px;padding:4px;font:11px system-ui;pointer-events:none;animation:bubble-fade 2s forwards}@keyframes bubble-fade{0%,70%{opacity:1}100%{opacity:0}}
.settings{position:relative;margin-left:auto}.settings[open]{z-index:30;background:#152736;padding:8px}.settings summary,.result-options summary{cursor:pointer;min-height:36px;padding:8px}.result-options{grid-column:1/-1}.result-options button{margin:4px}.rating-label[hidden]{display:none!important}

.game-shell .recruit>span{white-space:nowrap;overflow-wrap:normal;font-size:clamp(10px,1.4vw,14px)}
.game-shell[data-battle=replay] .reference-drawer{display:block}.game-shell[data-battle=replay] .command-deck{padding-bottom:32px}.game-shell[data-battle=replay] .reference-drawer:not([open]){position:absolute;bottom:3px;right:12px}
.game-shell #retry:only-of-type{border-color:#efd19a}.game-shell #journey-outcome:not(:has(.next-challenge))>#retry{background:linear-gradient(#f4daa0,#bd9454);color:#172a3a;font-weight:bold}

/* Inspection floats above the command deck so playback and result controls remain usable. */
.game-shell .reference-drawer[open],.game-shell[data-battle=replay] .reference-drawer[open]{inset:auto 0 calc(100% + 8px);max-height:min(55dvh,420px)}

.game-shell .reference-drawer[open],.game-shell[data-battle=replay] .reference-drawer[open]{grid-area:auto}
@media(max-height:500px){.game-shell .reference-drawer[open],.game-shell[data-battle=replay] .reference-drawer[open]{position:fixed;inset:12px auto 12px 12px;width:48vw;max-height:calc(100dvh - 24px)}}
/* Independent mastery: keep rules beside the battlefield, never over deployment. */
.game-shell .tactical-rail{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:10px;min-height:0;overflow:auto}
.game-shell .tactical-rail .mastery-dock{flex:0 1 auto;max-height:52%;width:100%;overflow:auto}
.game-shell .context-inspector{min-height:0;max-height:100%;overflow:auto;border:1px solid #8db8bc;background:#10263bef;border-radius:8px;padding:8px}
.game-shell .context-inspector .close-inspector{display:block;margin-left:auto;min-height:32px;padding:4px 8px;font:11px system-ui}
.game-shell .context-inspector #inspect{padding:8px 0 0;margin:0;font:12px/1.4 system-ui;background:none}
.game-shell #inspect strong{display:block;font:16px Georgia;color:#fff1ca}.game-shell #inspect strong small{display:block;font:12px system-ui;margin-top:4px;color:#aee9ed}
.game-shell #inspect p{margin:6px 0;color:#d4e3e8}.game-shell #inspect .unit-numbers{color:#f5dca5;font-weight:600}.game-shell #inspect .next-action{color:#e4f3f3;border-left:2px solid #8de7da;padding-left:6px}
.game-shell .unit-rules>summary,.game-shell .precision>summary{cursor:pointer;min-height:32px;padding:5px 0;color:#e4cf9c}
.game-shell .mastery-rule{font-size:11px}.game-shell .recruit b{display:block;position:absolute;top:2px;right:2px;font:10px system-ui;background:#10212be8;border-radius:3px;padding:2px;color:#ffe0a4;z-index:2}
.game-shell .economy{display:block;padding:0;margin:0;border:0}.game-shell .economy>span,.game-shell .economy>small{display:none}.game-shell .economy strong{font:12px system-ui;color:#ffe0a4}
.game-shell .tile.attack-range{outline:1px dashed #f5cf70;outline-offset:-6px}.game-shell .tile.attack-lane{background-image:linear-gradient(90deg,#e6ce6822,#e6ce6855,#e6ce6822),var(--courtyard-stone)}
.game-shell .tile.lane-blocker:after{content:'STOP';position:absolute;left:0;bottom:3px;color:#fff0e4;background:#743c28;font:bold 7px system-ui;padding:1px;z-index:8}
.game-shell .tile.pass-through:after{content:'OVER';position:absolute;right:0;top:20%;color:#ffe9b0;background:#10212b;font:7px system-ui;z-index:8}
.game-shell .tile.protected-ally{outline:2px double #8df0dd;outline-offset:-5px;background-image:repeating-linear-gradient(45deg,#56e0ce22 0 3px,transparent 3px 7px),var(--courtyard-stone)}
.game-shell .tile.assigned-companion{border-top:3px solid #c3ffff}.game-shell .tile.next-step:after{content:'NEXT';position:absolute;bottom:3px;right:1px;font:bold 7px system-ui;color:#0d2433;background:#b2defe;padding:2px;z-index:7}
.game-shell .tile.next-target{outline:3px dashed #ffd46c;outline-offset:-3px}.game-shell .tile.splash-zone{box-shadow:inset 0 0 0 2px #c1a1f066}.game-shell .tile.splash-recipient:after{content:'SPLASH';position:absolute;left:1px;bottom:3px;color:#fff;background:#673c86;font:bold 7px system-ui;padding:1px;z-index:8}
.game-shell .overlay-legend{font:10px/1.5 system-ui;color:#d4e5e8;padding:4px 0}.game-shell .overlay-legend span{display:inline-block;margin-right:8px}
.game-shell .score-details small{display:block;color:#c4d8e2;font:11px/1.4 system-ui}
@media(min-width:701px) and (min-height:501px){.game-shell .play-stage{grid-template-columns:minmax(0,1fr) 264px;grid-template-rows:minmax(0,1fr) 132px}.game-shell .mastery-dock{padding:8px 10px}.game-shell #objectives li{font-size:12px;padding:4px 0}}
@media(max-width:700px) and (min-height:501px){
 .game-shell .tactical-rail{display:contents}.game-shell .tactical-rail .mastery-dock{grid-column:1;grid-row:1;max-height:190px;overflow:auto}
 .game-shell .context-inspector{max-height:140px;padding:5px 7px;display:grid;grid-template-columns:1fr auto;gap:0 5px}
 .game-shell .context-inspector .close-inspector{grid-column:2;grid-row:1;font-size:10px;min-height:28px;margin:0;padding:3px 5px}
 .game-shell .context-inspector #inspect{grid-column:1/-1;grid-row:2;font-size:11px;padding-top:3px}.game-shell #inspect strong{font-size:14px}.game-shell #inspect strong small{display:inline;margin-left:6px;font-size:11px}
 .game-shell #inspect p{margin:3px 0}.game-shell #inspect .unit-numbers{font-size:11px}.game-shell .unit-rules>summary{min-height:28px;padding:3px 0;font-size:10px}
 .game-shell.inspecting-unit .context-slot{display:block;max-height:140px;overflow:auto}.game-shell .context-slot:has(.context-inspector:not([hidden])) #tutorial-instruction{display:none}
 .game-shell[data-battle=replay].inspecting-unit .context-slot{display:block}.game-shell .play-stage{grid-template-rows:auto minmax(0,1fr) auto}
 .game-shell .command-deck{min-height:0}.game-shell.inspecting-unit .deployment-tray{display:none}.game-shell.inspecting-unit .action-dock{grid-column:1/-1;grid-row:2}.game-shell.inspecting-unit #battle{min-height:40px;padding:6px}
 .game-shell.inspecting-unit .command-deck{grid-template-rows:auto auto 24px}.game-shell[data-battle=replay] .command-deck{max-height:46dvh;overflow:auto;padding-bottom:30px}
 .game-shell .overlay-legend{font-size:9px;line-height:1.3}
}
@media(max-height:500px){.game-shell .tactical-rail{grid-column:2;grid-row:1;max-height:100%;overflow:auto}.game-shell .context-inspector{font-size:11px}.game-shell .tactical-rail .mastery-dock{max-height:45%}}

@media(max-width:700px) and (min-height:501px){.game-shell.inspecting-unit.recruiting-unit .deployment-tray{display:block}.game-shell.inspecting-unit.recruiting-unit .action-dock{grid-column:2;grid-row:2}.game-shell.inspecting-unit.recruiting-unit .command-deck{grid-template-rows:auto minmax(64px,1fr) 24px}}

.game-shell .close-inspector{position:sticky;top:0;z-index:2;background:#142d40}.game-shell .overlay-legend summary{cursor:pointer;min-height:28px;padding:4px 0}.game-shell .overlay-legend p{margin:3px 0}

@media(min-height:501px){.game-shell .tactical-rail .mastery-dock{max-height:none;flex:0 0 auto}}
@media(max-height:500px){.game-shell .tactical-rail{grid-row:1/3}.game-shell .tactical-rail .mastery-dock{max-height:none;flex:0 0 auto}}

.game-shell .tile.arrow-screen:after{content:'SCREENS';position:absolute;left:0;bottom:3px;color:#fff0e4;background:#743c28;font:bold 6px system-ui;padding:1px;z-index:8}.game-shell .tile.next-target:before{content:'TARGET';position:absolute;right:1px;top:20%;font:bold 7px system-ui;background:#5b4220;color:#fff2c7;padding:1px;z-index:7}

.game-shell .result-options[open]{max-height:30dvh;overflow:auto}.game-shell .result-options>summary{position:sticky;top:0;background:#142a40;z-index:1}

.game-shell .mastery-summary>span{white-space:nowrap;flex-shrink:0}.game-shell .economy{display:none!important}.game-shell .boardtop #gold{font:12px system-ui;color:#ffe2a5;white-space:nowrap}.game-shell .tile.next-target:before{top:42%;font-size:6px}
@media(max-width:700px) and (min-height:501px){.game-shell .mastery-summary{gap:6px}.game-shell .mastery-summary>span{font-size:16px;letter-spacing:0}.game-shell .mastery-summary strong{font-size:11px}.game-shell #objectives li{font-size:11px;padding:2px 0}.game-shell .mastery-rule{font-size:9px;line-height:1.3}.game-shell .lesson-band .boardtop{gap:5px}.game-shell .boardtop #gold{font-size:10px}.game-shell:not(.inspecting-unit) .context-slot{max-height:36px}}
/* Tutorial 5: prominent board-local rule coverage and exact next-action plan. */
.game-shell .tactical-coverage,.game-shell .tactical-plan{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.game-shell .tactical-coverage{z-index:2}.game-shell .tactical-plan{z-index:6}
.game-shell .tile.selected{outline:4px solid #fff6cb;outline-offset:-3px}.game-shell .tile.attack-range,.game-shell .tile.attack-lane{outline:none}.game-shell .tile.next-target:before,.game-shell .tile.next-step:after,.game-shell .tile.protected-ally:after{display:none}
.game-shell .board-preview-legend{grid-row:2;display:flex;justify-content:center;gap:8px;align-items:center;min-height:22px;font:10px system-ui;color:#f3ebd2;flex-wrap:wrap}.game-shell .board-preview-legend span:before{content:'';display:inline-block;width:9px;height:9px;margin-right:3px;vertical-align:middle}.key-attack:before{border:2px dashed #f6cf70}.key-move:before{border:2px dotted #91ddff;border-radius:50%}.key-guard:before{border:2px solid #b2ffed;border-radius:0 0 50% 50%;background:#3f887d}.key-splash:before{background:repeating-linear-gradient(45deg,#d1a1ff 0 2px,transparent 2px 4px);border:1px solid #d1a1ff}.key-next:before{background:#d4f4ff;clip-path:polygon(0 35%,55% 35%,55% 0,100% 50%,55% 100%,55% 65%,0 65%)}
.game-shell .arena{grid-template-rows:minmax(0,1fr) auto 24px}.game-shell #notice{grid-row:3}.game-shell .remove-from-board{min-height:34px;padding:5px 8px;border-color:#e1b38b;background:#3a2c26;font:12px system-ui}.game-shell .context-inspector .close-inspector{min-height:30px}.game-shell .context-inspector #inspect .unit-capability{color:#f0e4c7}.game-shell .plain-why{color:#bde8df}.game-shell .tray-return-ready{outline:3px solid #b2ffdd;outline-offset:3px;background:repeating-linear-gradient(45deg,#5ee1bb44 0 6px,#10263b 6px 12px)}
.game-shell .recruit small{display:block;font:9px/1.1 system-ui;color:#d5e6e9}.game-shell .recruit{min-height:96px}.game-shell .unit-rules{font-size:11px}
@media(max-width:700px) and (min-height:501px){.game-shell .context-inspector{max-height:160px}.game-shell .context-inspector .close-inspector{grid-column:2;grid-row:1}.game-shell .remove-from-board{grid-column:1;grid-row:1;justify-self:start;font-size:11px;min-height:30px}.game-shell .context-inspector #inspect{grid-row:2}.game-shell.inspecting-unit .deployment-tray{display:block}.game-shell.inspecting-unit .action-dock{grid-column:2;grid-row:2}.game-shell.inspecting-unit .command-deck{grid-template-rows:auto minmax(70px,1fr) 24px}.game-shell .recruit{min-height:70px}.game-shell .recruit small{font-size:8px}.game-shell .board-preview-legend{font-size:9px;gap:6px}.game-shell .context-inspector .unit-numbers{font-size:10px}}
.game-shell .tile.selected{z-index:4}.game-shell .unit-assembly{pointer-events:none}.game-shell .tile.splash-recipient:after{z-index:7}
.game-shell .board-preview-legend{position:relative;z-index:8;min-height:34px;padding-top:12px}
@media(max-width:700px) and (min-height:501px){.game-shell.inspecting-unit .context-slot{max-height:172px}.game-shell .context-inspector{max-height:172px}.game-shell.inspecting-unit:not(.recruiting-unit) .recruit{min-height:34px;padding:2px}.game-shell.inspecting-unit:not(.recruiting-unit) .recruit img,.game-shell.inspecting-unit:not(.recruiting-unit) .recruit svg{display:none}.game-shell.inspecting-unit:not(.recruiting-unit) .command-deck{grid-template-rows:auto minmax(40px,1fr) 24px}.game-shell .context-inspector #inspect{line-height:1.28}.game-shell .context-inspector #inspect p{margin:3px 0}.game-shell .remove-from-board,.game-shell .context-inspector .close-inspector{min-height:28px}}
.game-shell .lesson-band{position:relative}.game-shell .permanent-mission{margin:2px 8px;font:12px/1.3 Georgia;color:#fff0ce;max-width:100%;grid-column:1/-1}.game-shell .enemy-plans-control{font-size:11px;display:inline-flex;align-items:center;gap:5px;margin:3px 8px}.game-shell .enemy-plan-mode{padding:2px;max-width:150px;font-size:11px;min-height:26px}.game-shell .plan-note{font-size:10px;margin:3px 8px}.enemy-plans-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5}.enemy-costume{display:block;position:relative;width:100%;height:100%}.enemy-costume .enemy-accessory{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;filter:drop-shadow(0 2px 2px #140e19)}.enemy-banner{position:absolute;bottom:14%;right:0;background:#5f2118;color:#ffe0b6;border:1px solid #ffe0b6;font:bold 7px sans-serif;padding:1px 2px;transform:rotate(-8deg)}.defeat-coach{padding:8px;border-left:3px solid #ee9a77;background:#291d24;font-size:14px}.defeat-coach p{margin:0 0 6px}.defeat-coach button{min-height:32px}@media(max-width:700px){.game-shell .plan-note{display:none}.game-shell .permanent-mission{font-size:10px;line-height:1.1;margin:1px 5px}.game-shell .enemy-plans-control{margin:1px 5px}.game-shell .scene-kicker{font-size:10px}.game-shell .lesson-band{flex-wrap:wrap;gap:0}.game-shell .lesson-band .permanent-mission{flex-basis:100%}.game-shell .enemy-plan-mode{min-height:23px;font-size:10px}.enemy-banner{font-size:6px}}
@media(max-width:700px){.game-shell .plan-note{display:block;font-size:9px;line-height:1.1;flex-basis:100%;margin:1px 5px}.game-shell .plan-note{max-height:22px;overflow:hidden}}
.game-shell #board{width:min(calc(100cqw - 24px),calc(100cqh - 48px));height:min(calc(100cqw - 24px),calc(100cqh - 48px))}.game-shell .plan-note{line-height:1.1}.game-shell .lesson-band{gap:3px 12px}.game-shell .enemy-plans-control{grid-column:1}.game-shell .lesson-band .plan-note{grid-column:2;grid-row:3}.game-shell .permanent-mission{grid-row:2}.game-shell .board-preview-legend:before{content:'↗ Enemy plan';color:#ffb09b;border-bottom:2px dashed #ffb09b;margin-right:5px;font-size:inherit}@media(max-width:700px){.game-shell .lesson-band .plan-note{grid-column:1;grid-row:5}.game-shell .permanent-mission{grid-row:3}.game-shell .enemy-plans-control{grid-row:4}.game-shell .lesson-band .boardtop{grid-row:2}.game-shell .board-preview-legend{font-size:8px;gap:4px;flex-wrap:wrap;padding-top:4px}}
.game-shell .reference-drawer[open],.game-shell[data-battle=replay] .reference-drawer[open]{max-height:min(35dvh,320px);scroll-padding-top:40px}.game-shell .reference-drawer[open]>summary{position:sticky;top:-12px;z-index:4;background:#12253a;padding:8px 3px;min-height:36px;border-bottom:1px solid #b59560}.game-shell .equipped-spell{display:flex;flex-wrap:wrap;align-items:center;gap:3px;margin:5px 0;padding:5px;border:1px solid #b5956044}.game-shell #spells p{font-size:12px;line-height:1.3}.game-shell #spells>button{width:100%}.game-shell #spells details{font-size:11px}.game-shell .spell-options h3{margin:5px 0;font-size:14px}
.game-shell .board-preview-legend{pointer-events:none;min-height:0;height:24px;padding-top:3px;overflow:hidden;position:static;z-index:auto}.game-shell .arena{grid-template-rows:minmax(0,1fr) 24px 24px}.game-shell[data-mode=cinematic] .permanent-mission,.game-shell[data-mode=cinematic] .enemy-plans-control,.game-shell[data-mode=cinematic] .plan-note{display:none}
.game-shell .result-options[open]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.game-shell .result-options>summary{grid-column:1/-1}.game-shell .result-options[open] button{min-height:38px;padding:6px;font-size:12px}.game-shell .result-navigation{align-content:start}
@media(max-height:500px){#play-screen.game-shell{grid-template-rows:44px auto minmax(0,1fr)}.game-shell .lesson-band{display:flex;flex-wrap:wrap;gap:1px;padding:0 4px}.game-shell .lesson-band .scene-kicker{display:none}.game-shell .lesson-band .permanent-mission{order:0;width:100%;flex-basis:100%;font-size:10px;margin:0}.game-shell .lesson-band .boardtop{order:1;width:55%;font-size:9px;gap:4px}.game-shell .enemy-plans-control{order:2;margin:0;font-size:9px}.game-shell .enemy-plan-mode{min-height:20px;font-size:9px}.game-shell .lesson-band .plan-note{order:3;flex-basis:100%;font-size:8px;margin:0}.game-shell .play-stage{grid-template-columns:minmax(0,1fr) 245px;grid-template-rows:minmax(0,1fr);gap:10px}.game-shell .arena{grid-column:1;grid-row:1;grid-template-rows:minmax(0,1fr) 20px 20px}.game-shell .command-deck{grid-column:2;grid-row:1;align-self:end;grid-template-columns:minmax(0,1fr) 90px;grid-template-rows:auto 24px;min-height:96px;max-height:120px;padding:4px;gap:3px}.game-shell .deployment-tray{grid-column:1;grid-row:1}.game-shell .action-dock{grid-column:2;grid-row:1}.game-shell .command-deck .reference-drawer{grid-column:1/-1;grid-row:2}.game-shell .context-slot{display:none}.game-shell .tactical-rail{grid-column:2;grid-row:1;align-self:start;max-height:calc(100% - 126px);overflow:auto}.game-shell .context-inspector{max-height:100%;font-size:10px}.game-shell .recruit{min-height:62px;padding:38px 2px 2px}.game-shell .recruit img,.game-shell .recruit svg{width:34px;height:38px}.game-shell .recruit span{font-size:9px}.game-shell .recruit b{font-size:8px}.game-shell #battle{font-size:16px;min-height:44px;padding:5px}.game-shell .board-preview-legend{font-size:8px;height:20px;padding:0}.game-shell #notice{font-size:9px;max-height:20px}.game-shell .result-options[open]{grid-template-columns:repeat(3,minmax(0,1fr))}.game-shell .result-dock{gap:6px}.game-shell .score-details{max-height:60px}}
@media(max-height:500px){.game-shell .context-slot:has(.show-saved-result:not([hidden])){display:block;position:absolute;left:0;right:0;bottom:calc(100% + 4px);height:44px;overflow:visible}.game-shell .show-saved-result{min-height:40px;margin:0}.game-shell .command-deck:has(.show-saved-result:not([hidden])) .tutorial-instruction{display:none}}
.game-shell .result-options-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.game-shell .result-dock .result-options-items>button{grid-area:auto!important;order:0;min-height:38px!important;padding:5px!important;font-size:12px!important;width:100%}.game-shell .result-options[open]{display:block}@media(max-height:500px){.game-shell .result-options-items{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px) and (min-height:501px){.game-shell .lesson-band .scene-kicker{display:none}.game-shell .lesson-band{gap:1px;padding-top:0;padding-bottom:0}.game-shell.inspecting-unit .context-slot{max-height:132px}.game-shell .context-inspector{max-height:132px}.game-shell .context-inspector #inspect{font-size:11px;line-height:1.2}.game-shell #inspect strong{font-size:14px}.game-shell #inspect strong small{display:inline;font-size:10px;margin-left:5px}.game-shell .context-inspector #inspect p{margin:3px 0}}
@media(max-width:700px) and (min-height:501px){.game-shell #roster:has(.recruit:nth-child(4)){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.game-shell #roster:has(.recruit:nth-child(4)) .recruit{min-width:0;min-height:42px;padding:3px 2px 3px 25px;margin:0}.game-shell #roster:has(.recruit:nth-child(4)) .recruit img,.game-shell #roster:has(.recruit:nth-child(4)) .recruit svg{left:1px;top:5px;width:24px;height:30px}.game-shell #roster:has(.recruit:nth-child(4)) .recruit>span{font-size:10px;white-space:normal}.game-shell #roster:has(.recruit:nth-child(4)) .recruit small{font-size:8px}.game-shell.inspecting-unit:not(.recruiting-unit) #roster:has(.recruit:nth-child(4)) .recruit{padding:2px;min-height:28px}}
/* Lesson 1 warning built from the real simulation (non-blocking). */
.lesson-warning{margin:6px auto;max-width:36em;padding:6px 10px;border:1px solid #f3c272;border-radius:6px;background:#3a2410e6;color:#ffe3b0;font:600 14px/1.35 system-ui;text-align:center}
/* Team identity without text banners: enemy Rogue/Mage take the enemy miniatures'
   darker, muted palette on the red enemy base; heroes keep full colour on the cyan base. */
.tile .enemy-costume .enemy-banner{display:none}
.tile .enemy-costume>.token-art{filter:saturate(.5) brightness(.74) contrast(1.12) sepia(.18)}
/* Dense boards on phones: a shape marker (circle = ally, diamond = foe) keeps the art visible. */
@media (max-width:520px){
 #board:has(>.tile:nth-child(36)) .team-marker{font-size:0;line-height:0;width:9px;height:9px;padding:0;border-radius:50%;background:var(--team);border:1.5px solid #10212b;top:4%;left:4%}
 #board:has(>.tile:nth-child(36)) .tile.enemy .team-marker{border-radius:1px;transform:rotate(45deg)}
}
/* Sound toggle: visible in game, and three buttons per row on phones. */
body.in-game #journey-nav .sound-toggle{display:block}
@media(max-width:620px){body:not(.in-game) #journey-nav button{flex:1 1 28%}}
/* Daily result: compact, readable on phones. */
.daily-result{margin:0 0 10px;padding:10px 12px;border:1px solid #c9a35f;border-radius:8px;background:#0f1d2ee8;color:#f2e6cc;text-align:center}
.daily-result h2{margin:0 0 4px;font:700 18px Georgia,serif;color:#f0cb8b}
.daily-result p{margin:3px 0;font:14px/1.35 system-ui}
.daily-countdown time{font-variant-numeric:tabular-nums;font-weight:700}
.daily-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:6px}
.daily-actions button{min-height:44px;padding:8px 16px}
.daily-actions .daily-share{background:#f0cb8b;color:#1a1408;font-weight:700}
.daily-actions textarea{width:100%;font:13px system-ui}
#journey-outcome .daily-result{grid-column:1/-1;flex:1 1 100%;width:100%;box-sizing:border-box;order:-1}
#journey-outcome .daily-result p{font-size:13px;margin:2px 0}
