/* Shared parchment UI. Native text and controls remain separate from artwork. */
:root{--ui-ink:#304b3d;--ui-muted:#71654c;--ui-gold:#b48b43;--ui-line:#d7c69d;--ui-paper:#fff9eb;--ui-sage:#e9eedb}
.ui-illustration{width:112px;height:112px;object-fit:contain;flex:none;pointer-events:none}
button,a,input,select{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #387b70;outline-offset:3px}
/* Flow layout prevents the record, chapter cards and credits from overlapping. */
#home.home{display:grid;grid-template-columns:minmax(430px,.95fr) minmax(0,1.05fr);grid-template-rows:1fr auto auto;gap:14px 0;padding:88px max(5vw,24px) 16px;overflow:auto;pointer-events:auto;align-content:start}
#home[hidden]{display:none!important}
#home .home-copy{position:relative;inset:auto;grid-column:1;grid-row:1;max-width:none;align-self:center;z-index:2;padding:0 0 4px}
#home .hero-art{position:relative;inset:auto;grid-column:2;grid-row:1;height:auto;min-width:0;align-self:stretch;pointer-events:none}
#home .hero-art img{width:125%;max-width:none;max-height:540px;object-fit:contain}
#home h1{font-size:clamp(48px,5.5vw,80px);line-height:1.08;margin:8px 0 12px}
#home .home-copy .eyebrow,#home .home-copy .poem,#home .home-copy .intro,#home .home-actions,#home .ranking-entry,#home .run-meta,#home .best{position:static;inset:auto}
#home .eyebrow{font-size:13px;letter-spacing:2px;margin:0 0 8px}
#home .title-mark{margin:0 0 6px;font-size:12px}
#home .home-copy .poem{font-size:16px;line-height:1.6;margin:8px 0;background:none;padding:0;width:auto}
#home .home-copy .intro{font-size:13px;line-height:1.75;margin:8px 0;color:#716b51;display:block;background:none;width:auto;padding:0}
#home .home-actions{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0 12px;justify-content:flex-start}
#home .home-actions .primary{min-width:176px;padding:14px 19px;font-size:17px}
#home .home-actions .secondary,#home .gallery-button{padding:12px 14px;font-size:14px;min-height:48px}
#home .ranking-entry{display:flex;gap:12px;align-items:center;max-width:100%;margin:8px 0 10px}
#home .rank-art-button{width:170px;min-width:150px;height:auto;flex:none}
#home .rank-art-button img{width:100%;height:auto;display:block}
#home .rank-account{font-size:12px;line-height:1.55;text-align:left;max-width:230px}
#home .run-meta{display:flex;flex-wrap:wrap;gap:5px 12px;margin:6px 0;font-size:12px}
#home .best{display:block;transform:none;margin:7px 0 0;padding:7px 10px;width:fit-content;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:12px;background:#fff8e8c9;border:1px solid #dbcaa3;border-radius:8px;line-height:1.5}
#home .home-bottom{position:static;inset:auto;grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0;border:0}
#home .home-bottom>i{display:none}
#home .home-bottom>span{min-width:0;display:grid;grid-template-columns:40px 1fr;grid-template-rows:25px 22px;gap:0 4px;padding:10px 14px;border:1px solid #c9bf97;border-radius:12px;background-position:center;background-size:cover;box-shadow:0 3px 0 #b7a87919}
#home .home-bottom>span:nth-of-type(1){background-image:linear-gradient(90deg,#fff9e9f5,#fff9e9bf),url('assets/battle/map-lake.webp')}
#home .home-bottom>span:nth-of-type(2){background-image:linear-gradient(90deg,#fff9e9f5,#fff9e9bf),url('assets/battle/map-bamboo.webp')}
#home .home-bottom>span:nth-of-type(3){background-image:linear-gradient(90deg,#fff9e9f5,#fff9e9bf),url('assets/battle/map-manor.webp')}
#home .home-bottom em{grid-row:1/3;width:32px;height:32px;align-self:center;font-size:12px;background:#f7f0d8}
#home .home-bottom b{font-size:15px;color:#445b44;margin:0}
#home .home-bottom small{display:block;font-size:12px;color:#77715b}
#home>footer{position:static;inset:auto;grid-column:1/-1;grid-row:3;width:auto;max-width:none;text-align:center;margin:0;padding:0;font-size:11px;line-height:1.65;color:#7c735c}
#home .hero-sticker{left:4%;right:auto;bottom:auto;top:5%;font-size:12px;width:max-content;max-width:90%}
#home .hero-bubble{left:auto;right:0;bottom:auto;top:20%;font-size:13px;width:max-content;max-width:90%}
#home .hero-caption{bottom:6%;font-size:11px}
/* A compact, consistent shell leaves more room for actual choices. */
#dialog.game-screen{border:1px solid #bca979;box-shadow:0 20px 70px #142c2655;height:min(860px,94dvh)}
.game-screen .screen-header{padding:12px 22px;min-height:76px;border-bottom-width:2px;background:linear-gradient(110deg,#294f43,#456851)}
.screen-identity{gap:12px}.screen-emblem{width:50px;height:50px;background:#f5ebce;border-color:#ddc18b;border-radius:13px;box-shadow:inset 0 0 0 3px #fff9e9}
.ui-emblem-art{width:46px;height:46px;object-fit:contain;pointer-events:none}
.game-screen .screen-header h2{font-size:23px!important}.screen-path{font-size:11px;letter-spacing:1px;margin-bottom:3px}
.screen-steps{padding:4px 22px;gap:14px;background:#ecebd9}.screen-steps span{padding:8px 4px;font-size:13px}
.screen-body{padding:16px 22px;scroll-padding:16px;color:var(--ui-ink)}
.screen-body>.sub{font-size:14px;line-height:1.7;margin:0 0 12px!important;color:#67654f}
.screen-body h3{font-size:18px;color:var(--ui-ink)}
.game-screen .screen-footer{padding:10px 22px max(10px,env(safe-area-inset-bottom));gap:16px}
.screen-footer>p{font-size:13px;line-height:1.6}.screen-footer .primary{min-height:46px;min-width:170px;padding:10px 18px!important;font-size:16px!important}
.screen-footer .secondary{min-height:44px;padding:9px 14px!important;font-size:14px!important}
.game-screen .secondary{border-radius:9px;color:#4b614b;background:#fffaf0;border-color:#bdbb96;line-height:1.5}
.game-screen .secondary:hover:not(:disabled){background:#eaf0de;border-color:#7c9b78}
.game-screen .screen-utility{gap:8px;margin-top:14px;padding-top:12px;border-top:1px dashed #c9bf9c}
.game-screen .screen-utility .secondary{font-size:12px!important;padding:8px 11px!important;min-height:38px}
.game-screen .footnote{font-size:12px;line-height:1.7;color:#756c56}
/* Loadout: concise setup controls and an even grid. */
[data-view=loadout] .character-pick{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px 12px;margin:0 0 10px;background:#eeeeda;border:1px solid #cbd0af;border-radius:10px}
[data-view=loadout] .character-pick label{font-size:13px;white-space:nowrap}[data-view=loadout] .character-pick select{padding:7px 10px;font-size:14px;min-width:175px}
[data-view=loadout] .character-pick small{font-size:12px;flex:1;color:#6b7258;min-width:200px}
[data-view=loadout] .presets{margin:10px 0 16px;gap:7px}[data-view=loadout] .presets span{font-size:12px}[data-view=loadout] .presets button{font-size:12px;padding:7px 12px}
[data-view=loadout] .loadout-groups{gap:20px}[data-view=loadout] .loadout-groups h3{font-size:18px;margin:0 0 10px;padding-bottom:8px;display:flex;align-items:center;justify-content:space-between}
[data-view=loadout] .loadout-groups h3 small{font:700 12px var(--sans);padding:4px 9px;float:none}
[data-view=loadout] .loadout-cards{gap:10px}[data-view=loadout] .loadout-card{padding:13px;min-height:176px;border:1px solid #cabe9c;border-radius:12px;background:#fff9ea;box-shadow:0 3px 0 #b8a87520}
[data-view=loadout] .loadout-card .glyph{width:42px;height:42px;min-width:42px;margin:0 10px 7px 0}
[data-view=loadout] .loadout-card strong{font-size:17px;margin-top:2px}[data-view=loadout] .loadout-card em{font-size:11px;color:#7c744f}
[data-view=loadout] .loadout-card p{font-size:13px;line-height:1.65;margin:9px 0;clear:both;color:#5f634f}[data-view=loadout] .loadout-card small{font-size:11px;color:#7a745d;line-height:1.5}
[data-view=loadout] .loadout-card.picked{background:linear-gradient(145deg,#eff3df,#fbf7df);border-color:#5a8767;box-shadow:inset 0 0 0 1px #5a8767,0 3px 0 #a9b98c30}
[data-view=loadout] .loadout-card .pick-check{width:22px;height:22px;font-size:13px;right:7px;top:7px}
[data-view=loadout] .loadout-combos{margin:14px 0;font-size:13px}[data-view=loadout] .run-settings{border-radius:12px;padding:14px;gap:12px;background:#eeefdc}
.route-pick select,.run-settings select{border:1px solid #b6b99a;background:#fffaf0;color:#34513e;font-size:14px}
/* Inventory navigation and equipment services. */
.screen-tabs.gear-tabs{padding:7px 22px;gap:7px;background:#eeead7}
.screen-tabs.gear-tabs button{display:flex;align-items:center;gap:7px;padding:5px 11px;min-height:43px;font-size:13px;border-radius:9px}
.tab-art{width:30px;height:30px;object-fit:contain;pointer-events:none}
.screen-tabs.gear-tabs button[aria-pressed=true]{color:#fff9e7;background:#45654f;border-color:#45654f;box-shadow:0 2px 0 #283d2f20}
.game-screen .gear-materials{margin:0 0 14px;gap:8px;flex-wrap:wrap;padding:0;background:none;border:0}
.gear-materials>span{border:1px solid #d7c89f;padding:6px 12px;background:#fff8e7;border-radius:8px;font-size:13px;gap:6px}.gear-materials b{font-size:16px;font-variant-numeric:tabular-nums}
.game-screen .equipment-grid{gap:12px}.game-screen .equipment-card{padding:14px;border-radius:12px;background:#fff9e9;border-color:#d6c49c}.equipment-card h3{margin:4px 0;font-size:17px!important}.equipment-card p{font-size:13px;line-height:1.7}
.game-screen .gear-note{font-size:13px;line-height:1.7;border:1px solid #d4d3ad;border-left:3px solid #8a9d6d;background:#eeefdc;padding:10px 13px;margin:12px 0;border-radius:8px}
.game-screen .gear-services{gap:12px}.gear-services>article,.reward-group{border-radius:12px!important;background:#fff9eb!important;border-color:#d5c59f!important;padding:16px!important}
.gear-services h3,.gear-services h4{font-size:17px;margin:9px 0}.gear-services p{font-size:13px;line-height:1.7}.gear-services .secondary{font-size:13px;min-height:40px;padding:8px 12px}
.game-screen .forge-hero{display:grid;grid-template-columns:76px minmax(0,1fr) 170px;gap:16px;align-items:center;background:linear-gradient(115deg,#f2ead0,#fbf5df);padding:18px;border:1px solid #c9b47d;border-radius:14px}
.forge-hero>.item-icon{width:76px;height:76px}.forge-hero h3{font-size:22px!important;margin:6px 0}.forge-hero p{font-size:13px;line-height:1.65;margin:8px 0}.forge-hero small{font-size:12px;color:#8c7448}.forge-hero progress{width:min(100%,340px);height:8px;border:0;border-radius:4px;overflow:hidden;accent-color:#a98642}
.forge-illustration{width:170px;height:170px;object-fit:contain;pointer-events:none}
.game-screen .forge-hero .secondary{min-height:40px;padding:8px 12px;font-size:13px}.forge-hero progress{display:block;margin:10px 0}
.journey-intro{display:flex;gap:16px;align-items:center;background:#edf0dc;border:1px solid #cad0aa;border-radius:12px;padding:8px 18px;margin:0 0 14px}.journey-intro .ui-illustration{width:102px;height:102px}.journey-intro h3{margin:0 0 8px}.journey-intro p{margin:0;font-size:13px;line-height:1.7}
.contract-cards>article{border-top:3px solid #aaba83!important}.game-screen .gear-empty{grid-column:1/-1;text-align:center;padding:22px 16px;background:#f0efdb;border:1px dashed #bfc6a4;border-radius:14px;line-height:1.7}.gear-empty .ui-illustration{width:115px;height:115px;margin:auto;display:block}.gear-empty h3{margin:6px 0}.gear-empty p{font-size:14px;margin:0;color:#756c56}
.gear-choices{gap:12px}.game-screen .gear-choice{border:1px solid #c7bd98;border-radius:12px;padding:16px;background:#fffbed}.gear-choice strong{font-size:17px}.gear-choice span{font-size:14px;line-height:1.65}.gear-choice small{font-size:12px;line-height:1.6}.gear-choice.is-selected{box-shadow:inset 0 0 0 1px #4c7857,0 3px 0 #a7b58435!important;background:#edf2dc!important}
.gem-activation{border-radius:12px;padding:14px;background:#eeefdd;font-size:13px}.active-item-effects>span{line-height:1.6;min-height:40px;padding:6px 10px}.manual-target select{max-width:100%;min-width:0}
/* Camp and upgrade decisions. */
.game-screen .camp-summary{margin:10px 0 14px;padding:9px 15px;gap:14px;border-color:#bac8a2}.camp-summary .ui-illustration{width:96px;height:86px}.camp-summary>div{flex:1}.camp-summary p{font-size:13px}.camp-summary h3{font-size:18px}.checkpoint-note{font-size:12px;line-height:1.6;padding:7px 10px;margin:7px 0}
.camp-section-title{margin:14px 0 9px!important;font-size:17px!important}.game-screen .route-options button{padding:10px 12px;border-radius:10px}.route-options strong{font-size:15px}.game-screen .route-options small{font-size:12px;line-height:1.6}.route-options button[aria-pressed=true]{background:#e8eed7;border-color:#648562}
.game-screen .camp-choices .choice{display:grid;grid-template-columns:62px 1fr;grid-template-rows:auto 1fr;gap:3px 12px;padding:16px 12px!important;min-height:120px;border-radius:12px}
.camp-supply-art{grid-row:1/3;object-fit:contain;width:62px;height:72px;align-self:center;pointer-events:none}.game-screen .camp-choices .choice strong{font-size:17px;padding-top:6px}.game-screen .camp-choices .choice p{font-size:12px;line-height:1.65;margin:4px 0}
.game-screen .camp-choices{margin:0}.camp-summary .ui-illustration{height:70px}.game-screen .camp-summary{padding-block:7px}.game-screen .route-options button{padding-block:8px}
@media(min-width:761px){[data-view=camp] .screen-body{padding-top:12px;padding-bottom:12px}[data-view=camp] .camp-section-title{margin:10px 0 7px!important}[data-view=camp] .camp-summary .ui-illustration{height:64px}[data-view=camp] .camp-choices .choice{min-height:110px}}
.game-screen .choice[aria-pressed=true]:after{content:'✓';top:6px;right:6px;width:20px;height:20px;display:grid;place-items:center;padding:0;border-radius:50%;background:#376349;color:#fff;font-size:12px}
[data-view=upgrade] .choice{border-radius:12px;border:1px solid #cbbb98;background:#fff9e9;box-shadow:0 3px 0 #b8a87520;padding:16px!important}
[data-view=upgrade] .choice .category{position:static!important;align-self:flex-start;font-size:11px;padding:2px 7px;border-radius:5px;background:#eee8ce;color:#796b46;margin:0}
[data-view=upgrade] .choice p{font-size:13px;line-height:1.6}[data-view=upgrade] .choice .rank{padding-top:9px;border-top:1px dashed #d3c59c;width:100%;color:#78633d;font-variant-numeric:tabular-nums}
[data-view=upgrade] .upgrade-detail{background:#edf0dc;border-color:#bfcba4;color:#37563f;min-height:68px}.upgrade-detail details{font-size:12px;margin-top:7px}.upgrade-tools{font-size:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
/* Guide, rest and results reuse the original matching art. */
.help-grid{gap:14px}.help-grid>div{padding:16px;border:1px solid #d1c7a3;border-radius:12px;background:#fff9ea;overflow:hidden}.help-art{float:right;width:72px;height:72px;object-fit:contain;margin:0 0 10px 12px}.help-grid strong{font-size:18px}.help-grid p{font-size:14px;line-height:1.8}
.help-grid>div:before{display:none}
.game-screen[data-view=pause],.game-screen[data-view=quit]{max-width:670px!important;height:auto!important;max-height:94dvh!important}.rest-illustration{text-align:center}.rest-illustration .ui-illustration{width:190px;height:150px}.game-screen[data-view=pause] .screen-flavour,.game-screen[data-view=quit] .screen-flavour{text-align:center;font-size:20px;margin:7px 0 12px}.game-screen[data-view=pause] .screen-utility{justify-content:center}
.game-screen[data-view=result] .result-art{width:140px;height:110px;float:right;position:static;margin:0 0 8px 18px;background-size:contain;background-position:center;background-repeat:no-repeat}
.game-screen[data-view=result] .result-art[data-outcome=win]{background-image:url('assets/ui/hero-victory.webp')}.game-screen[data-view=result] .result-art[data-outcome=lose]{background-image:url('assets/ui/hero-rest.webp')}
.result-banner{display:grid;grid-template-columns:minmax(0,1fr) 130px;grid-template-rows:1fr 1fr;column-gap:20px;min-height:95px;align-items:center}.game-screen[data-view=result] .result-banner .result-art{grid-column:2;grid-row:1/3;width:130px;height:95px;float:none;margin:0}.result-banner .screen-flavour{grid-column:1;align-self:end;margin:0 0 8px!important}.result-banner .sub{grid-column:1;align-self:start;margin:0!important;font-size:14px;line-height:1.7}
[data-view=result] .screen-flavour{font-size:19px;margin:8px 0 12px}.result-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;clear:both;margin:16px 0}.result-stats>div{padding:13px 10px;background:#fff8e8;border:1px solid #d0bf93;border-radius:12px;text-align:center}.result-stats strong{font-size:28px;color:#87662f;font-variant-numeric:tabular-nums}.result-stats span{font-size:12px;margin-top:5px;color:#706b51}.result-build,.gear-result{font-size:13px;line-height:1.8}.result-learnings{margin:16px 0}.result-learnings h3{font-size:17px}.result-buffs{display:flex;gap:8px;flex-wrap:wrap}.result-buffs>span{display:flex;align-items:center;gap:7px;font-size:12px;background:#fff9e8;border:1px solid #d3c299;border-radius:8px;padding:6px 8px}.result-buffs img{border-radius:5px}.result-buffs b{color:#917239;font-size:11px}.rank-submit{padding:12px;border:1px solid #c8ceaa;border-radius:9px;background:#edefda;font-size:13px}
.game-screen .rank-banner{border-radius:12px}.game-screen .rank-filter{gap:8px}.game-screen .rank-empty{border-radius:12px;font-size:14px}.game-screen .rank-error{line-height:1.7}
#dialog.game-screen[data-view=leaderboard]{width:min(900px,96vw)}.game-screen[data-view=leaderboard] .rank-banner{height:135px;margin:0 0 10px;padding-left:27%;padding-right:12%}.rank-banner-title{font:700 25px var(--serif);letter-spacing:4px;color:#775d36}.rank-filter-group{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.dialog[data-view=leaderboard] .rank-filter{padding:8px;font-size:13px;border:1px solid #b9b492}.rank-filter select{margin-left:5px;padding:7px;font-size:13px}.dialog[data-view=leaderboard] .rank-empty{padding:18px;font-size:14px}.game-screen[data-view=leaderboard] .screen-body>.footnote{font-size:12px}
[data-view=codex] .codex-tabs{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:7px;padding:10px;background:#e9ecd7;border:1px solid #c7cba7;border-radius:11px;margin:12px 0 14px}[data-view=codex] .codex-tabs button{display:flex;gap:7px;align-items:center;padding:7px 10px;font-size:13px;min-height:43px;border-radius:8px}[data-view=codex] .codex-tabs .codex-skill-icon{width:28px;height:28px}[data-view=codex] .codex-tabs button[aria-pressed=true]{background:#dce8c9;border-color:#709062;color:#375239}[data-view=codex] .codex-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}[data-view=codex] .codex-list>article{margin:0;padding:15px;border:1px solid #d0bf95;border-left:3px solid #b29852;border-radius:11px;background:#fff9e9;font-size:13px;overflow-wrap:anywhere}[data-view=codex] .codex-list p{font-size:14px;line-height:1.7;margin:9px 0}[data-view=codex] .codex-card-title{gap:10px;flex-wrap:wrap}[data-view=codex] .codex-card-title strong{font-size:17px}[data-view=codex] .codex-card-title span{font-size:11px;margin-left:auto}[data-view=codex] .codex-card-icon{width:42px;height:42px}[data-view=codex] .codex-list small,[data-view=codex] .codex-list em,[data-view=codex] .codex-list a{font-size:12px;line-height:1.7}
@media(max-width:760px){#dialog.game-screen[data-view=leaderboard]{width:100%}.game-screen[data-view=leaderboard] .rank-banner{height:100px}.rank-banner-title{font-size:20px;letter-spacing:2px}.rank-filter-group{gap:7px}.dialog[data-view=leaderboard] .rank-filter{padding:8px 5px;font-size:12px}.rank-filter select{display:block;margin:5px auto 0;max-width:100%;font-size:12px}.game-screen[data-view=leaderboard] .screen-footer .dialog-actions button{min-width:0!important}[data-view=codex] .codex-list{grid-template-columns:1fr}[data-view=codex] .codex-tabs{padding:7px;gap:6px}[data-view=codex] .codex-tabs button{font-size:12px;padding:5px 8px}}
/* School selection, without changing which packs are playable. */
#characterSelect{border:1px solid #b9a775;border-radius:18px;box-shadow:0 22px 80px #10292066;background:#f7f0dd}.cs-header{background:linear-gradient(110deg,#294f43,#456851);color:#fff6df;border-bottom:2px solid #cba95f;padding:16px 24px;gap:14px}.cs-header>div{flex:1}.cs-header-art{width:62px;height:62px;object-fit:contain;background:#fff5db;border-radius:13px;padding:4px}.cs-header h2{color:#fff5db;font-size:25px}.cs-header .cs-eyebrow,.cs-header .cs-intro{color:#dce5ca;font-size:12px}.cs-close{background:#ffffff12;border-color:#e4dfbf77;color:#fff5dc}.cs-scroll{background:#f7f0dd;padding:18px 24px}.cs-grid{gap:12px}.cs-card{background:#fffaf0;border-radius:12px;box-shadow:0 3px 0 #b2a2751a}.cs-card.is-selected{background:#f0efcf;border-color:#8d9d65;box-shadow:inset 0 0 0 1px #8d9d65}.cs-card.is-locked{opacity:.78}.cs-card .cs-state{font-size:11px;line-height:1.6}.cs-footer{background:#fff8e7;border-top:1px solid #d1c09b;padding:14px 24px}.cs-footer>div>span{font-size:12px;line-height:1.6}.cs-confirm{font-size:15px;border-radius:10px}
/* Keep combat legible and preserve the existing buff list's responsive rules. */
#hud .player-card,#hud .stance{box-shadow:0 3px 0 #81704425}#hud .build{border-radius:12px;border-color:#baad7f;background:#fff6ddeb}#hud .build>p{color:#635b40;border-bottom:1px solid #d4c396;padding-bottom:7px}#hud .build .badge{border-radius:7px}#hud .gear-toggle-button{border-radius:9px}
@media(min-width:761px) and (max-height:780px){#home.home{padding-top:78px;gap:10px 0}#home h1{font-size:60px}#home .poem{font-size:14px!important;margin:6px 0!important}#home .intro{font-size:12px!important;margin:6px 0!important}#home .home-actions{margin:11px 0 8px}#home .ranking-entry{margin:4px 0}#home .rank-art-button{width:150px}#home .home-bottom>span{padding:7px 12px}#home .hero-art img{max-height:440px}}
@media(max-width:1000px) and (min-width:761px){#home.home{grid-template-columns:minmax(400px,1.1fr) minmax(0,.9fr);padding-left:5vw;padding-right:5vw}#home .hero-art img{width:145%}#home h1{font-size:60px}.screen-tabs.gear-tabs{gap:5px;padding-inline:16px}.screen-tabs.gear-tabs button{font-size:12px;padding:5px 8px;gap:4px}.tab-art{width:24px;height:24px}.game-screen .forge-hero{grid-template-columns:64px 1fr 125px}.forge-illustration{width:125px;height:125px}.game-screen .camp-choices .choice{grid-template-columns:48px 1fr;gap:5px}.camp-supply-art{width:48px;height:60px}}
@media(max-width:760px){
 #home.home{display:flex;flex-direction:column;padding:80px 20px 22px;gap:15px}#home .home-copy{display:flex;flex-direction:column;align-items:center;order:1;text-align:center;padding:0}#home .hero-art{display:none}#home h1{position:static;inset:auto;transform:none;width:auto;margin:10px 0;font-size:54px;text-align:center}#home h1 span{display:block}#home .title-mark{position:static;display:block;font-size:11px}#home .eyebrow{font-size:11px;letter-spacing:1px}#home .home-copy .poem{font-size:14px;text-align:center}#home .home-copy .intro{font-size:12px;max-width:100%;text-align:center}#home .home-actions{justify-content:center;gap:8px;margin:14px 0 10px}#home .home-actions .primary{min-width:165px;padding:13px 16px}#home .ranking-entry{justify-content:center;margin:6px 0;gap:9px}#home .rank-art-button{min-width:130px;width:140px}#home .rank-account{font-size:11px}#home .run-meta{justify-content:center;font-size:11px}#home .best{font-size:11px;margin:8px auto 0}#home .home-bottom{display:grid;grid-template-columns:1fr;order:2;width:100%;gap:8px}#home .home-bottom>span{grid-template-columns:38px 1fr auto;grid-template-rows:28px;padding:8px 12px}#home .home-bottom em{grid-row:1}#home .home-bottom b{font-size:14px}#home .home-bottom small{font-size:11px}#home>footer{order:3;font-size:10px}
 .game-screen .screen-header{padding:10px 14px;min-height:65px}.screen-emblem{width:42px;height:42px}.ui-emblem-art{width:39px;height:39px}.game-screen .screen-header h2{font-size:20px!important}.screen-steps{padding:3px 12px;gap:4px}.screen-steps span{font-size:12px;padding:7px 2px}.screen-body{padding:14px}.game-screen .screen-footer{padding:9px 14px max(10px,env(safe-area-inset-bottom));display:block}.screen-footer>p{font-size:12px;margin-bottom:7px}.screen-footer .dialog-actions{gap:8px}.screen-footer .primary{min-width:0;font-size:15px!important}.screen-tabs.gear-tabs{padding:6px 12px;gap:6px}.screen-tabs.gear-tabs button{padding:5px 9px;font-size:12px}.tab-art{width:25px;height:25px}
 [data-view=loadout] .character-pick{gap:7px}[data-view=loadout] .character-pick small{flex-basis:100%;font-size:11px}[data-view=loadout] .loadout-groups{grid-template-columns:1fr;gap:18px}[data-view=loadout] .loadout-card{padding:11px;min-height:175px}[data-view=loadout] .loadout-card strong{font-size:16px}[data-view=loadout] .loadout-card p{font-size:12px}[data-view=loadout] .loadout-card .glyph{float:left;width:36px;height:36px;min-width:36px;margin-right:7px}
 .game-screen .forge-hero{grid-template-columns:54px minmax(0,1fr);padding:14px;gap:12px}.forge-hero>.item-icon{width:54px;height:54px}.forge-illustration{display:none}.forge-hero h3{font-size:19px!important}.journey-intro{padding:10px;gap:10px}.journey-intro .ui-illustration{width:76px;height:80px}.journey-intro h3{font-size:17px}.camp-summary .ui-illustration{width:65px;height:68px}.game-screen .camp-summary{gap:9px;flex-wrap:wrap}.camp-summary>div{min-width:170px}.camp-summary>button{margin-left:auto}.game-screen .camp-choices .choice{grid-template-columns:62px 1fr;min-height:110px}.game-screen .camp-choices .choice p{font-size:13px}.game-screen .route-options{grid-template-columns:1fr}.help-grid{grid-template-columns:1fr}.help-grid p{font-size:13px}.game-screen[data-view=result] .result-art{width:95px;height:85px;margin-left:10px}.result-stats{gap:8px}.result-stats>div{padding:10px 3px}.result-stats strong{font-size:23px}.result-stats span{font-size:11px}.cs-header{padding:12px;gap:9px}.cs-header-art{width:43px;height:43px}.cs-header h2{font-size:21px}.cs-scroll{padding:12px}.cs-grid{gap:8px}.cs-footer{padding:12px}.cs-confirm{font-size:13px}.cs-footer>div>span{font-size:11px}.game-screen[data-view=pause],.game-screen[data-view=quit]{max-width:calc(100vw - 20px)!important;border-radius:16px!important;max-height:94dvh!important}.rest-illustration .ui-illustration{height:120px;width:160px}
}
@media(max-height:500px) and (orientation:landscape){#home.home{padding-top:68px;grid-template-columns:1fr 1fr}#home .home-copy{align-self:start}#home h1{font-size:48px}#home .home-bottom{margin-top:10px}.game-screen .screen-header{padding:6px 16px;min-height:52px}.screen-emblem{width:36px;height:36px}.ui-emblem-art{width:34px;height:34px}.screen-steps{padding-block:0}.screen-steps span{padding:4px}.game-screen .screen-footer{display:flex;padding:7px 16px}.screen-footer>p{margin:0;font-size:11px}.screen-footer .primary,.screen-footer .secondary{min-height:38px!important;padding:7px 12px!important}.rest-illustration .ui-illustration{height:85px;width:115px}}
@media(prefers-reduced-motion:reduce){#home *,#dialog *,#characterSelect *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
#characterSelect .cs-header{align-items:center;padding:14px 24px;border-bottom:2px solid #cba95f;gap:14px}#characterSelect .cs-header h2{color:#fff5db;font-size:24px;margin:0 0 6px}#characterSelect .cs-eyebrow{color:#e0dfb9;font-size:11px;margin-bottom:6px}#characterSelect .cs-intro{color:#dde5cb;font-size:12px;margin:0;line-height:1.6}#characterSelect .cs-close{background:#ffffff12;border-color:#e4dfbf77;color:#fff5dc}#characterSelect .cs-footer{background:#fff8e7;padding:14px 24px}#characterSelect .cs-footer>div>span{font-size:12px}#characterSelect .cs-card.is-locked{opacity:.78}
@media(max-width:760px){#dialog.game-screen{height:100dvh;max-height:100dvh}#characterSelect .cs-header{padding:12px;gap:10px}#characterSelect .cs-header h2{font-size:20px}#characterSelect .cs-eyebrow{font-size:10px;letter-spacing:1px}#characterSelect .cs-intro{font-size:11px}#characterSelect .cs-footer{padding:12px}#characterSelect .cs-footer>div>span{font-size:11px}}
@media(max-width:760px){#home .home-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;align-items:stretch}#home .home-actions>.primary{grid-column:1/-1}#home #homeGallery{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;min-height:48px}#home #homeGallery img{width:28px;height:28px}[data-view=loadout] .presets{display:flex;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;max-width:100%;padding-bottom:7px}[data-view=loadout] .presets button{flex:none}[data-view=loadout] .presets span{flex:none;align-self:center}}
@media(max-width:760px){#home .hero-art{display:flex;order:2;height:200px;min-height:200px;align-self:center;width:100%;max-width:440px}#home .hero-art img{width:100%;max-height:220px}#home .hero-sticker,#home .hero-bubble,#home .hero-caption{display:none}#home .home-bottom{order:3}#home>footer{order:4}.result-banner{grid-template-columns:minmax(0,1fr) 85px;gap:10px;min-height:90px}.game-screen[data-view=result] .result-banner .result-art{width:85px;height:85px}.result-banner .screen-flavour{font-size:16px}.result-banner .sub{font-size:12px}}
