/* Play shell: one scene, one immediate decision, optional detail. */
body{scrollbar-color:var(--line) var(--bg)}
.topbar{max-width:1440px;margin-inline:auto;padding-inline:32px;height:76px;border:0;gap:24px}
.topbar .brand img{width:40px;height:40px}.topbar .brand>span{font-size:22px}.brand small{font-size:10px}
.topbar nav{width:auto;margin:0 0 0 auto}.topbar nav button{font-size:13px;min-height:44px}.topbar .studio-link{display:block}
main{max-width:1440px;padding:0 32px}.play-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.hero-strip{display:flex;align-items:center;gap:32px;min-width:0;padding:15px 0;border-block:1px solid var(--line)}
#hero-identity{display:flex;align-items:center;gap:20px;text-align:left;border:0;background:transparent;padding:0;min-width:0;flex:1;min-height:48px}
#hero-summary{display:block;min-width:0}#hero-summary strong{font-size:17px;line-height:1.35;display:block;overflow-wrap:anywhere}#hero-summary small{color:var(--muted);font-size:12px;display:block;margin-top:3px}
.hero-strip-link{font-size:12px;color:var(--gold);white-space:nowrap}.hero-vitals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;width:36%;max-width:440px}.hero-vitals .hero-bar{margin:0;font-size:12px}.hero-wallet{display:flex;flex-direction:column;min-width:100px;font-size:12px;font-variant-numeric:tabular-nums}.hero-wallet strong{color:var(--gold);font-weight:600}.hero-wallet>span{color:var(--muted)}
.play-nav{display:flex;justify-content:flex-start;gap:28px;margin:0 0 24px;border-bottom:1px solid var(--line)}
.play-nav button{display:flex;align-items:center;gap:8px;min-height:56px;border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 0;background:transparent;color:var(--muted);font-size:13px}
.play-nav button[aria-current]{color:var(--gold);border-bottom-color:var(--gold)}.play-nav button:hover:not(:disabled){background:transparent;color:var(--ink)}.play-nav svg{width:18px;height:18px}
.game-center{display:grid;grid-template-columns:minmax(0,1fr) 326px;gap:0 28px;align-items:start;order:initial}
.location-heading{grid-column:1/-1;min-height:0;margin-bottom:20px}.location-heading h1{font-size:30px}.location-heading p{font-size:12px;margin-top:5px}
.game-center .battle-stage{grid-column:1;grid-row:2;aspect-ratio:auto;height:440px;min-width:0;border-radius:12px}
.game-center .action-desk{grid-column:2;grid-row:2/4;align-self:stretch;border-radius:12px;padding:24px;background:var(--surface);min-width:0}
.action-desk>h2{font-size:22px;line-height:1.3;margin:0 0 10px}.action-desk>p:not([hidden]){font-size:13px;line-height:1.7;color:var(--muted)}
.action-desk .battle-controls{margin:24px 0 0}.action-desk .tier-pick{display:block;font-size:12px;margin-bottom:16px}.tier-pick select{width:100%;max-width:none;margin-top:7px;font-size:13px;min-height:44px}
.action-desk .camp-actions{display:flex;flex-direction:column;gap:10px}.camp-actions button{min-height:48px;font-size:13px;display:flex;align-items:center;justify-content:space-between;text-align:left}
.action-desk .objective-note{border-top:1px solid var(--line);padding-top:18px;margin-top:24px;font-size:12px}.action-help{font-size:12px;min-height:44px;margin-top:10px}
.game-center .world-tools{grid-column:1;grid-row:3;display:flex;justify-content:space-between;align-items:center;margin:0;padding:8px 0;min-height:48px;gap:20px;font-size:12px}
.scene-options{position:relative}.scene-options summary{cursor:pointer;color:var(--muted);min-height:44px;display:flex;align-items:center;gap:8px}.scene-options summary::after{content:'+';font-size:18px}.scene-options[open] summary::after{content:'−'}.scene-options>div{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 12px}.scene-options button{font-size:12px;min-height:44px;padding:8px 10px}.world-tools:has(.scene-options[open]){align-items:flex-start}
.game-center .stage-caption{top:20px;left:20px;right:20px}.stage-caption h2{font-size:19px}.stage-caption p{font-size:12px}.stage-caption .intent{font-size:12px;line-height:1.6;max-width:100%}
.game-center .fighters{inset:30% 0 8%;padding:0 5%}.game-center .fighter .sprite{width:250px;max-width:100%}.game-center .fighter.enemy .sprite{width:270px}.game-center .fighter-name{font-size:11px}.game-center .allies:has(.fighter:nth-child(3)) .sprite{width:180px}.game-center .allies:has(.fighter:nth-child(4)) .sprite{width:150px}
.action-desk .stage-result{position:static;inset:auto;padding:0;align-items:stretch;text-align:left;background:transparent;gap:12px}.action-desk .stage-result h2{font:26px/1.25 Liberterra,Georgia,serif;margin:0}.action-desk .stage-result p{font-size:13px;color:var(--muted);line-height:1.7}.action-desk .reward-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0;font-size:12px}.action-desk .stage-result button{margin:0;min-height:48px}.action-desk .stage-result .primary{display:flex;justify-content:space-between;align-items:center}
.action-desk .battle-actions{grid-template-columns:1fr 1fr;gap:9px}.battle-actions button{min-height:70px;font-size:13px;padding:10px 6px}.battle-actions button span{font-size:10px}.action-desk .skill-choice{display:block;margin-bottom:14px}.skill-choice select{display:block;width:100%;margin:6px 0;min-height:44px}.skill-choice>span{font-size:11px}.action-desk .turn-status{align-items:flex-start;flex-direction:column;font-size:12px;gap:6px}.turn-status button{font-size:11px;padding:6px 0;background:transparent;border:0;color:var(--muted);min-height:36px}.party-health{margin-bottom:14px}.party-health>div{font-size:11px}
.chronicle{display:block;order:initial;grid-column:auto;border:0;border-block:1px solid var(--line);padding:0;margin-top:24px}
.world-progress{padding:22px 0;gap:40px}.world-progress h2{font-size:14px}.world-progress p{font-size:12px}.world-meter{max-width:400px}.world-meter>div{font-size:11px}.world-progress progress{height:3px}
body[data-play-state="battle"] .world-progress{display:none}footer{max-width:1440px;margin:auto;padding:12px 32px 24px;font-size:11px;gap:20px}
.hub-links{margin-top:20px}.hub-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:20px;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 0;background:transparent;text-align:left;text-decoration:none}.hub-row:hover:not(:disabled){background:transparent}.hub-row:hover strong{text-decoration:underline;text-underline-offset:4px}.hub-row>span{min-width:0}.hub-row strong{display:block;font-size:16px;font-weight:600}.hub-row small{display:block;font-size:13px;color:var(--muted);margin-top:3px}.hub-row svg{flex-shrink:0;color:var(--gold)}.hub-heading{font-size:15px;margin:28px 0 -8px}.hero-sheet-art .sprite{width:160px;max-width:100%;height:180px;object-fit:contain}.hero-sheet-art .enchantment{width:100%}
@media(max-width:1100px){.topbar{padding-inline:24px}main{padding-inline:24px}.game-center{grid-template-columns:minmax(0,1fr) 300px;gap:0 20px}.game-center .battle-stage{height:400px}.action-desk{padding:20px!important}.hero-strip{gap:24px}.hero-strip-link{display:none}.hero-vitals{width:42%;gap:20px}.play-nav{gap:24px}.game-center .fighter .sprite{width:220px}}
@media(max-width:767px){.topbar{min-height:64px;height:64px;margin:0;padding:0 16px;flex-wrap:nowrap;gap:8px}.topbar .brand{gap:8px}.topbar .brand img{width:32px;height:32px}.topbar .brand>span{font-size:18px}.topbar .brand small{display:none}.topbar nav{width:auto;margin:0 0 0 auto}.topbar nav button{font-size:12px;padding:10px 4px}.topbar .studio-link{display:none}main{padding-inline:16px}.play-layout{display:grid;gap:0}
.hero-strip{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 16px;padding:12px 0;margin-bottom:18px}.hero-strip #hero-identity{min-height:0;padding:0}.hero-strip #hero-summary strong{font-size:15px}.hero-strip #hero-summary small{font-size:11px}.hero-wallet{grid-column:2;grid-row:1;min-width:0;font-size:11px;text-align:right}.hero-vitals{grid-column:1/-1;grid-row:2;max-width:none;width:100%;gap:20px}.hero-vitals .hero-bar{font-size:11px}.hero-bar>div{margin-bottom:4px}.hero-vitals progress{height:4px}
.play-nav{position:fixed;bottom:0;left:0;right:0;margin:0;padding:0 8px max(4px,env(safe-area-inset-bottom));background:var(--bg);border:0;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;z-index:20}.play-nav button{min-height:62px;padding:8px 0 5px;flex-direction:column;justify-content:center;gap:3px;font-size:10px;line-height:1.2;border:0;border-top:2px solid transparent}.play-nav button[aria-current]{border-top-color:var(--gold)}.play-nav svg{width:20px;height:20px}
.game-center{display:grid;grid-template-columns:minmax(0,1fr);gap:0}.location-heading{grid-column:1;margin:0 0 12px}.location-heading h1{font-size:24px}.location-heading p{font-size:11px;margin-top:3px}.game-center .battle-stage{grid-column:1;grid-row:2;height:220px;border-radius:10px}.game-center .action-desk{grid-column:1;grid-row:3;background:transparent;border-radius:0;padding:18px 0 0!important;align-self:auto}.action-desk>h2{font-size:20px;margin-bottom:6px}.action-desk>p:not([hidden]){font-size:12px;line-height:1.65}.action-desk .battle-controls{margin-top:14px}.action-desk .tier-pick{margin-bottom:12px}.tier-pick select{margin-top:5px;font-size:12px}.action-desk .camp-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.camp-actions .primary,.camp-actions [data-action="breach"]{grid-column:1/-1}.camp-actions button{min-height:46px;font-size:12px;padding:10px 12px}.action-desk .objective-note{display:none}.action-help{margin-top:6px;font-size:11px;min-height:36px}.game-center .world-tools{grid-column:1;grid-row:4;font-size:11px;min-height:44px;padding:0}.world-tools button{font-size:11px}.scene-options button{font-size:11px}
.game-center .stage-caption{top:12px;left:12px;right:12px}.stage-caption h2{font-size:16px}.stage-caption progress{max-width:200px}.stage-caption p{font-size:10px}.stage-caption .intent{margin-top:5px;font-size:10px;padding:3px 6px}.game-center .fighters{inset:32% 0 9%;padding:0 4%}.game-center .fighter .sprite{width:160px}.game-center .fighter.enemy .sprite{width:170px}.game-center .fighter-name{font-size:9px;max-width:125px}.game-center .allies:has(.fighter:nth-child(3)) .sprite{width:110px}.game-center .allies:has(.fighter:nth-child(4)) .sprite{width:95px}.scene-signature{font-size:9px}
.action-desk .turn-status{flex-direction:row;align-items:center;margin:0 0 8px}.turn-status button{min-height:32px;padding:4px 0;font-size:10px}.action-desk .skill-choice{font-size:11px;display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;margin-bottom:12px}.skill-choice select{min-height:40px;font-size:12px;margin:0}.skill-choice>span{grid-column:1/-1;font-size:10px}.battle-actions button{min-height:58px;font-size:12px}.action-desk .battle-actions{gap:8px}.action-desk .stage-result h2{font-size:24px}.action-desk .reward-list{gap:8px}.party-health{display:none}
.chronicle{margin-top:16px}.world-progress{display:block;padding:18px 0}.world-progress p{font-size:11px}.world-meter{max-width:none;margin-top:12px}.world-progress h2{font-size:13px}footer{font-size:10px;flex-wrap:wrap;padding:12px 16px 90px;gap:8px 20px}.notice{bottom:82px}.hero-sheet-art .sprite{width:100px;height:140px}.hub-row strong{font-size:15px}.hub-row small{font-size:12px}.hub-row{padding:14px 0}
}
@media(max-width:360px){.play-nav button{font-size:9px}.topbar .brand>span{font-size:16px}.game-center .battle-stage{height:196px}.hero-strip #hero-summary strong{font-size:14px}.location-heading h1{font-size:22px}}
@media(prefers-reduced-motion:reduce){.play-nav button,.hub-row{transition:none}}

#panel-back{min-height:36px;font-size:12px;margin-bottom:8px}#panel-back::before{content:'‹';font-size:20px;margin-right:8px}
@media(max-width:767px){body[data-play-state="battle"] .location-heading{display:none}body[data-play-state="battle"] .game-center .battle-stage{height:200px}body[data-play-state="battle"] #next-copy{display:none}body[data-play-state="battle"] .action-desk{padding-top:14px!important}.game-center .fighter-name{margin-bottom:8px}.scene-signature{bottom:8px}}

/* Readable combat information is independent of the illustration below it. */
.game-center .stage-caption{left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:10px 16px;background:#0a1925f2;border-radius:8px;text-shadow:none}
.game-center .stage-caption progress{width:min(260px,58vw)}.game-center .stage-caption .intent{background:transparent;padding:0;margin-top:6px}
.game-center .stage-caption p{color:var(--ink)}.game-center .stage-caption .intent{color:var(--gold)}
@media(max-width:767px){
 .game-center .stage-caption{top:8px;padding:8px 12px;max-width:calc(100% - 24px)}.game-center .stage-caption h2{line-height:1.25}.game-center .stage-caption progress{height:4px;margin:5px auto}.game-center .stage-caption p{line-height:1.3}.game-center .stage-caption .intent{margin-top:4px;line-height:1.35}
 .game-center .allies:has(.fighter:nth-child(2)){width:56%;justify-content:space-around}
 .game-center .allies:has(.fighter:nth-child(2)) .fighter{flex:1 1 0;width:0;margin-right:0}
 .game-center .allies:has(.fighter:nth-child(2)) .enchantment{max-width:none}
 .game-center .allies:has(.fighter:nth-child(2)) .sprite{width:112px;max-width:none}
 .game-center .allies:has(.fighter:nth-child(3)) .sprite{width:94px}
 .game-center .allies:has(.fighter:nth-child(4)) .sprite{width:82px}
 .game-center .allies:has(.fighter:nth-child(2)) .fighter-name{display:none}
 .game-center .allies:has(.fighter:nth-child(2))~.enemy .sprite{width:145px}
 .action-desk .party-health{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin:0 0 10px;padding:0 0 8px}
 .action-desk .party-health>div{min-width:0}.action-desk .party-health strong{font-size:10px;line-height:1.3}.action-desk .party-health span{font-size:10px;line-height:1.2;margin:2px 0 3px}.action-desk .party-health progress{height:2px}
}
/* Reserve the left side for a solo hero's face and upper body on phones. */
@media(max-width:767px){
 .game-center .stage-caption{left:auto;right:10px;transform:none;width:62%;max-width:none;padding:8px}
 .game-center .allies:not(:has(.fighter:nth-child(2))){width:34%}
}

/* The world earns more room; the hero scales with the scene rather than a thumbnail. */
.topbar,main,footer{max-width:1800px}
.topbar{height:64px}.hero-strip{padding-block:12px}.play-nav{margin-bottom:18px}.play-nav button{min-height:48px}.location-heading{margin-bottom:16px}
.game-center .battle-stage{container-type:size;height:clamp(440px,58svh,680px)}
.game-center .fighter .sprite{width:350px;max-width:none;width:72cqh}
.game-center .fighter.enemy .sprite{width:370px;width:76cqh}
.game-center .allies:has(.fighter:nth-child(2)) .sprite{width:290px;width:59cqh}
.game-center .allies:has(.fighter:nth-child(3)) .sprite{width:235px;width:48cqh}
.game-center .allies:has(.fighter:nth-child(4)) .sprite{width:210px;width:43cqh}
.game-center .allies:has(.fighter:nth-child(2)){width:56%;justify-content:space-around}
.game-center .allies:has(.fighter:nth-child(2)) .fighter{flex:1 1 0;width:0;margin-right:0}
.game-center .allies:has(.fighter:nth-child(2)) .fighter-name{max-width:100%;font-size:10px;padding:3px 5px}
.scene-expand{position:absolute;z-index:6;top:12px;left:12px;width:44px;height:44px;padding:10px;background:#0a1925ed;border-color:#8fa5b566;display:grid;place-items:center}
.scene-expand:hover:not(:disabled){background:var(--surface)}.scene-expand svg{width:22px;height:22px}
body[data-scene-expanded="true"]{overflow:hidden}
#play.scene-expanded{position:fixed;inset:0;z-index:80;background:var(--bg);padding:16px 24px;width:100%;height:100dvh;overflow:auto;display:flex;flex-direction:column}
.scene-expanded .hero-strip{flex-shrink:0;padding:8px 0;margin:0 0 14px;min-height:64px}
.scene-expanded .play-nav,.scene-expanded .chronicle{display:none}
.scene-expanded .game-center{flex:1;min-height:0;grid-template-rows:auto minmax(360px,1fr) auto;grid-template-columns:minmax(0,1fr) 326px}
.scene-expanded .location-heading h1{font-size:24px}.scene-expanded .location-heading p{display:none}.scene-expanded .location-heading{margin-bottom:12px}
.scene-expanded .game-center .battle-stage{height:100%;min-height:360px}
.scene-expanded .action-desk{align-self:stretch;overflow:visible}
.scene-expanded .world-tools{min-height:44px;padding-block:0}
@media(min-width:768px) and (max-height:820px){.topbar{height:56px}.hero-strip{padding-block:8px}.play-nav{margin-bottom:14px}.play-nav button{min-height:44px}.location-heading h1{font-size:27px}.location-heading{margin-bottom:12px}.game-center .battle-stage{height:420px}.game-center .action-desk{padding:18px}.action-desk .battle-controls{margin-top:16px}.action-desk>h2{font-size:20px}}
@media(max-width:1100px) and (min-width:768px){.game-center .battle-stage{height:clamp(400px,56svh,580px)}}
@media(max-width:767px){
 .topbar{height:64px}.hero-strip{padding-block:12px}.location-heading{margin-bottom:12px}
 .game-center .battle-stage{height:250px}
 .game-center .fighter .sprite{width:180px;width:76cqh}
 .game-center .fighter.enemy .sprite{width:170px;width:76cqh}
 .game-center .allies:has(.fighter:nth-child(2)) .sprite{width:112px;width:56cqh}
 .game-center .allies:has(.fighter:nth-child(3)) .sprite{width:94px;width:47cqh}
 .game-center .allies:has(.fighter:nth-child(4)) .sprite{width:82px;width:41cqh}
 .game-center .allies:has(.fighter:nth-child(2))~.enemy .sprite{width:145px;width:72.5cqh}
 .game-center .allies:has(.fighter:nth-child(2)) .fighter-name{display:none}
 .game-center .allies:not(:has(.fighter:nth-child(2))){width:34%}
 .scene-expand{top:8px;left:8px}
 #play.scene-expanded{padding:max(12px,env(safe-area-inset-top)) 16px max(12px,env(safe-area-inset-bottom))}
 .scene-expanded .hero-strip{min-height:0;margin-bottom:12px;padding:0 0 10px}
 .scene-expanded .game-center{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto;flex:0}
 .scene-expanded .location-heading{grid-row:1}
 .scene-expanded .game-center .battle-stage{grid-column:1;grid-row:2;height:clamp(250px,38svh,420px);min-height:0}
 body[data-play-state="battle"] .scene-expanded .game-center .battle-stage{height:240px;min-height:0}
 .scene-expanded .game-center .action-desk{grid-column:1;grid-row:3}
 .scene-expanded .game-center .world-tools{grid-column:1;grid-row:4}
}
@media(max-height:560px){.scene-expanded .game-center{flex:0}.scene-expanded .game-center .battle-stage{height:360px;min-height:360px}}
@media(max-width:767px){.play-nav{margin-bottom:0}.play-nav button{min-height:62px}}
/* Keep enlarged silhouettes inside the image, including short and narrow screens. */
.game-center .fighter .sprite{width:min(72cqh,44cqw)}
.game-center .fighter.enemy .sprite{width:min(76cqh,42cqw)}
@media(max-width:767px){
 .scene-expanded .game-center{flex:none;min-height:auto}
 .game-center .allies:not(:has(.fighter:nth-child(2))){width:44%}
 .game-center .fighter .sprite{width:min(76cqh,48cqw)}
 .game-center .fighter.enemy .sprite{width:min(76cqh,46cqw)}
 .game-center .battle-stage[data-scene="camp"] .allies:not(:has(.fighter:nth-child(2))){width:64%}
 .game-center .battle-stage[data-scene="camp"] .allies:not(:has(.fighter:nth-child(2))) .sprite{width:min(76cqh,62cqw)}
 .game-center .allies:has(.fighter:nth-child(2))~.enemy .sprite{width:min(72.5cqh,44cqw)}
}
@media(max-height:560px){.scene-expanded .game-center{flex:none;min-height:auto}}
/* Cross-device play stays findable beside the current hero. */
.hero-telegram{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:44px;padding:10px 14px;font-size:13px;line-height:1.4;white-space:nowrap;color:var(--gold);background:transparent;border:1px solid var(--line)}
.hero-telegram svg{width:18px;height:18px;flex-shrink:0}.hero-telegram[data-linked="true"]{color:var(--teal)}
.hero-telegram:hover:not(:disabled){background:var(--surface);border-color:var(--gold)}
@media(min-width:768px) and (max-width:1100px){.hero-strip{flex-wrap:wrap;gap:12px 24px}.hero-strip #hero-identity{flex:1 1 calc(100% - 240px)}.hero-vitals{width:auto;max-width:none;flex:1}.hero-telegram{margin-left:auto}}
@media(max-width:767px){.hero-telegram{grid-column:1/-1;grid-row:3;width:100%;font-size:12px}body[data-play-state="battle"] .hero-telegram{display:none}}
/* Camp: canvases in the wallet, natural recovery and the 30% battle threshold. */
.wallet-canvas{display:flex;gap:6px;align-items:center;min-height:0;padding:0;border:0;background:none;color:var(--muted);font-size:inherit;text-align:left;cursor:pointer}
.wallet-canvas:hover:not(:disabled){background:none;color:var(--ink)}
.wallet-canvas svg{width:16px;height:16px;color:var(--gold)}
.vitals-eta{grid-column:1/-1;display:flex;align-items:center;gap:6px;margin:-16px 0 0;font-size:11px;color:var(--muted)}
.vitals-eta svg{width:14px;height:14px;flex:none}
.camp-hint{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;font-size:12px;line-height:1.5;color:var(--muted)}
.camp-hint svg{width:16px;height:16px;flex:none;margin-top:1px;color:var(--red)}
@media(max-width:767px){.vitals-eta{margin-top:-12px}.wallet-canvas{justify-content:flex-end}}
