/* v4.0 · A single visual system for the journey, codex and combat stage. */
:root{--paper:#eee5ce;--gold:#dfbc79;--jade:#98c7b0;--muted:#acbdb5;--line:#d7bb782b;--ui:ui-sans-serif,system-ui,-apple-system,"PingFang SC",sans-serif}
html{background:#081617}body{background:#081617}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:2px solid #f3d799;outline-offset:3px}button:disabled{opacity:.42}.primary-btn{border:1px solid #f7df9b65;border-radius:6px;background:linear-gradient(110deg,#ead19a,#c89b54);box-shadow:0 8px 32px #9e733523;letter-spacing:.08em;min-height:48px}.secondary-btn{border:1px solid #c7bc9166;background:#163c3580;color:var(--paper);padding:12px 20px;border-radius:6px;min-height:46px}.text-btn{min-height:44px}.icon-btn{width:44px;height:44px;flex:none}.screen{width:min(100%,1100px)}#app{background:radial-gradient(ellipse at 15% 0,#24413988,transparent 60%),#081617}.eyebrow{font:600 10px/1.6 var(--ui);letter-spacing:.18em}.lead{font-size:14px;line-height:1.9}.hidden,[hidden]{display:none!important}
/* A cover that gives the approved fox artwork room to breathe. */
#splash{padding:24px 38px 22px;display:block;isolation:isolate;text-align:left;min-height:100dvh}#splash:before,#splash:after{display:none}.home-top{display:flex;justify-content:space-between;align-items:center;position:relative;z-index:3}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--paper);font-size:20px;letter-spacing:.12em}.brand i{display:grid;place-items:center;font-style:normal;width:38px;height:42px;color:#ecd69f;border:1px solid #d8bc7966;background:#b1583020}.brand small{display:block;color:#a3b7a9;font:8px/2 var(--ui);letter-spacing:.17em}.home-hero{height:540px;position:relative;isolation:isolate}.hero-art{position:absolute;right:0;top:-55px;bottom:-45px;width:68%;z-index:-1;overflow:hidden;mask-image:linear-gradient(90deg,transparent,#000 25%,#000 83%,transparent);-webkit-mask-image:linear-gradient(90deg,transparent,#000 25%,#000 83%,transparent)}.hero-art:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#08161700 58%,#081617)}.hero-art img{width:100%;height:100%;object-fit:cover;object-position:center 65%;opacity:.93}.hero-caption{position:absolute;right:24px;top:22%;writing-mode:vertical-rl;letter-spacing:.3em;color:#ead39ca8;font-size:12px}.hero-copy{padding-top:86px;position:relative;z-index:1;width:48%}.hero-copy h1{font-size:clamp(60px,7vw,91px);letter-spacing:.07em;line-height:1.13;margin:16px 0 22px;font-weight:500}.hero-copy h1 em{font-style:normal;color:#e3c58d}.hero-copy .primary-btn,.hero-copy .secondary-btn{display:block;min-width:224px;margin-top:10px}.hero-facts{display:flex;gap:10px;color:#a9bcae;font:10px var(--ui);margin-top:23px}.hero-facts i{color:#bfa069}.home-nav{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);position:relative;background:#0e211ddd}.home-nav button{position:relative;text-align:left;background:transparent;border:0;color:var(--paper);padding:21px 22px;display:grid;gap:7px}.home-nav button+button{border-left:1px solid var(--line)}.home-nav span{font:9px var(--ui);letter-spacing:.18em;color:#a9b99d}.home-nav strong{font-weight:500;font-size:23px;letter-spacing:.1em}.home-nav small{font:11px var(--ui);color:#8da79a}.home-nav b{position:absolute;right:21px;top:40%;font-weight:400;color:var(--gold)}.home-nav button:hover{background:#c7a46d0b}.journey-route{display:flex;justify-content:center;align-items:center;gap:30px;padding:27px 0 19px}.journey-route>span{display:grid;grid-template-columns:30px 1fr;gap:4px 9px}.journey-route i{font-style:normal;grid-row:span 2;align-self:center;color:#d9bd7c;font-size:23px}.journey-route b{font-size:14px;font-weight:400;letter-spacing:.1em}.journey-route small{color:#789284;font:9px var(--ui)}.journey-route em{color:#846e41;font-size:24px}#splash .caption{text-align:center;font:10px var(--ui);color:#728d7e}#splash .launch-tools{margin:8px 0;flex-wrap:wrap;justify-content:center}.launch-tools #connection-status{flex-basis:auto;font-size:10px}
/* Formation cards remain exactly 9:16, including every label and control. */
#deck-screen{max-width:1024px;padding-bottom:130px}.back-home{padding:0 0 10px;color:#b4c5b9;text-align:left;font:12px var(--ui)}#deck-screen h2{font-size:30px}.hint{font:12px/1.7 var(--ui);color:#a4b6ad}.difficulty-select{display:flex;gap:8px;margin:14px 0}.difficulty-select button{flex:1;display:grid;grid-template-columns:1fr auto;gap:5px;text-align:left;border:1px solid #bdd2b526;background:#102922;color:#d4dfce;border-radius:6px;padding:11px 12px}.difficulty-select button.active{background:#d6b27417;border-color:#d4b371b0}.difficulty-select b{font:600 15px var(--ui)}.difficulty-select small{grid-column:1/-1;color:#93aa9a;font:10px/1.45 var(--ui)}.difficulty-select span{color:#d0b276;font-size:12px}.formation-presets{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:13px 0 16px;font:11px var(--ui);color:#95ab9e}.formation-presets button{min-height:38px;padding:8px 11px;border:1px solid #8fac942b;border-radius:4px;background:#19342b;color:#d5deca}.formation-presets button:hover{border-color:var(--gold)}.phase-filters{margin:0 0 4px}.phase-filters button{min-height:42px}.phase-cycle{font-size:10px;border:0;background:none;padding:6px 0;margin-bottom:13px}.deck-grid{grid-template-columns:repeat(5,minmax(0,1fr));padding-bottom:12px;gap:15px}.deck-item{position:relative;min-width:0}.deck-card{width:100%;display:block;aspect-ratio:9/16;border-color:#d8bf815b;border-radius:6px;transition:transform .18s,border-color .18s}.deck-card .deck-vignette{background:linear-gradient(180deg,#08161544,transparent 24%,transparent 62%,#061314dd 87%,#061314)}.deck-card .deck-overlay{padding:20px 12px 14px;min-height:22%;background:linear-gradient(transparent,#061314d9)}.deck-card .deck-overlay h3{font-size:21px}.deck-card .deck-overlay p{font-size:11px;line-height:1.45}.deck-phase{top:39px;left:12px}.card-info{position:absolute;right:9px;top:38px;z-index:5;width:34px;height:34px;border:1px solid #d6c28c88;color:#eee1bb;background:#0b2320ed;border-radius:50%;font-size:14px}.deck-card.selected:after{top:auto;bottom:73px;right:12px;width:21px;height:21px}.deck-footer{max-width:1024px;margin:auto;padding:12px 22px calc(12px + env(safe-area-inset-bottom));background:#0b211ef5;backdrop-filter:blur(10px);box-shadow:0 -8px 28px #020d0d77;z-index:10;border-radius:9px 9px 0 0}.formation-status{min-width:0;flex:1}.selected-roster{display:flex;gap:6px;margin-bottom:6px}.selected-roster button{min-width:64px;height:37px;display:flex;align-items:center;gap:4px;padding:0 8px;border:1px solid #d7bb782e;background:#172d28;color:#dbe4cf;border-radius:4px;font:11px var(--ui)}.selected-roster img{width:28px;height:32px;object-fit:contain}.selected-roster .empty-slot{border-style:dashed;color:#819685}.deck-summary{font:10px/1.4 var(--ui);color:#acbea8}.deck-summary.needs-elements{color:#e5bd87}.deck-footer .primary-btn{min-height:49px;padding:11px 17px;white-space:nowrap}
/* Battle: stage first, information at the edges, every action reachable. */
#battle-screen{width:min(100%,600px);height:100dvh;min-height:740px;max-height:1040px;padding:12px 16px calc(10px + env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:visible}.battle-header{flex:none;height:61px;align-items:center}.battle-header h2{font-size:28px!important;margin:2px 0 0}.battle-header .eyebrow{font-size:10px}.battle-tools{gap:6px}#battle-screen .battle-tools .icon-btn{width:38px;height:38px;font:600 12px var(--ui)}#battle-banner{display:none!important}#battle-screen>.terrain-panel{flex:none;min-height:29px;height:29px;margin:2px 0 6px;padding:2px 5px;display:flex;gap:8px;border:0;border-block:1px solid #bdd2b51f;background:transparent;border-radius:0;box-shadow:none}#battle-screen .terrain-sigil{width:20px;height:20px;font-size:11px}#battle-screen .terrain-panel b{font-size:11px}#battle-screen .terrain-panel p{display:none}#battle-screen .terrain-favor{margin-left:auto;font:10px var(--ui);padding:0;align-self:center}#wanxiang-tactical-ui{display:none!important}
#battle-screen>.arena{position:relative;isolation:isolate;flex:1;min-height:360px;margin:0 -16px;padding:83px 14px 13px;border:1px solid #d7bc7136;border-inline:0;border-radius:0;display:flex;flex-direction:column;justify-content:center;overflow:hidden;background:radial-gradient(ellipse at 77% 10%,#edce9228,transparent 50%),linear-gradient(180deg,#294e42,#12392f 56%,#12352c 57%,#112a25);box-shadow:inset 0 0 80px #07191788}
#battle-screen>.arena:before{inset:0;z-index:-2;opacity:.48;filter:none;transform:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 600'%3E%3Cpath fill='%237a9680' d='M0 300L75 199L116 235L192 68L237 171L269 147L340 242L408 80L453 164L474 147L551 291L592 220L640 287V600H0Z'/%3E%3Cpath fill='%23304f40' d='M0 350L97 276L170 343L250 214L340 371L417 292L493 327L557 216L640 360V600H0Z'/%3E%3Cpath fill='%23132620' d='M0 450Q149 382 290 474T640 419V600H0Z'/%3E%3Cpath fill='none' stroke='%23c9b985' opacity='.5' d='M0 489Q190 429 390 509T640 477M0 517Q220 462 470 548T640 540'/%3E%3C/svg%3E");background-size:cover;background-position:center 55%}
#battle-screen>.arena:after{inset:auto 0 8%;height:44%;z-index:-1;background:repeating-radial-gradient(ellipse at 50% 60%,transparent 0 37px,#e2ce8c0c 39px 40px,transparent 42px 68px);border-radius:50%;box-shadow:none;transform:perspective(300px) rotateX(35deg)}#battle-screen[data-stage="2"]>.arena{background:radial-gradient(ellipse at 70% 8%,#f4d5843b,transparent 60%),linear-gradient(#494936,#293d32 55%,#292d24)}#battle-screen[data-stage="3"]>.arena{background:radial-gradient(ellipse at 78% 8%,#80d9ed44,transparent 45%),linear-gradient(#254e59,#113541 60%,#0d2631)}
#battle-screen #battle-objective-hud{position:absolute;inset:10px 14px auto;margin:0;min-height:60px;padding:9px 12px;grid-template-columns:minmax(0,1.5fr) minmax(65px,.7fr) 35px;gap:10px;border:1px solid #d9c59260;border-radius:6px;background:#09241de6;box-shadow:0 4px 16px #06191622;backdrop-filter:none;z-index:5}#battle-screen .objective-kicker{font:8px var(--ui);letter-spacing:.12em}.objective-title{font-size:15px!important}.objective-tip{font:9px/1.5 var(--ui)!important;display:block;white-space:normal!important}.objective-danger{min-height:37px}.objective-danger strong{font-size:22px}.objective-break>span{font-size:9px}
#battle-screen .combat-row{height:auto;min-height:113px;flex:1;gap:9px;margin:0;transform:none;align-items:end;padding:0 2px;z-index:2}#battle-screen .combat-card{height:100%;max-height:170px;min-height:112px;display:flex;flex-direction:column;justify-content:flex-end;padding:0;min-width:0}#battle-screen .unit-motion{height:calc(100% - 35px);min-height:84px;max-height:145px;width:100%}#battle-screen .unit-standee img{object-fit:contain;object-position:center bottom;filter:drop-shadow(0 8px 5px #00180dc9) drop-shadow(0 0 8px #f1d89633)}#battle-screen .unit-hud{padding:4px 5px 3px;background:linear-gradient(#12362ae8,#08291fe8);border:1px solid #c4cca449;border-radius:5px;box-shadow:0 5px 10px #06181055;backdrop-filter:none;flex:none;height:36px}#battle-screen .combat-name{font-size:12px!important;font-weight:500}#battle-screen .hp-text{font:8px var(--ui)}#battle-screen .hp-line{height:4px;margin:3px 0 2px}#battle-screen #player-row .hp-line i{background:linear-gradient(90deg,#60af8e,#a1d6a4)}#battle-screen .unit-phase{width:14px;height:14px;font-size:8px}#battle-screen .badge{font:8px var(--ui);padding:2px 3px}#battle-screen .combat-card.has-acted .unit-standee{filter:brightness(.72)}#battle-screen .combat-card.active .unit-hud{border-color:#e8cf83;box-shadow:0 0 12px #e0c27944}#battle-screen .combat-card.targetable .unit-hud{border-color:#edb493}.combat-card.active:after{content:"◆";position:absolute;top:4%;left:calc(50% - 5px);color:#ead499;font-size:12px;text-shadow:0 0 10px #ecd380}.combat-card.defeated:after{display:none}#battle-screen .team-label{font:9px var(--ui);letter-spacing:.06em;margin:3px 1px 2px;min-height:13px;flex:none}#battle-screen .enemy-label>span:first-child{display:none}#battle-screen .enemy-label #enemy-intent{font-size:10px;color:#e9bc8a}#battle-screen .versus{height:15px;min-height:15px;margin:5px 0;flex:none;opacity:.6}.versus span{display:none}
#battle-screen>.action-panel{position:relative;flex:none;width:auto;margin:0 -16px;padding:11px 15px 10px;border:0;border-top:1px solid #d4be7e50;border-radius:0;background:linear-gradient(170deg,#183b30,#0a2521);box-shadow:none}#battle-screen .active-info{margin-top:4px;align-items:center;gap:4px}#battle-screen #active-name{font-size:15px}#battle-screen #active-status{font:9px var(--ui);max-width:49%}#battle-screen .resource-row{margin:6px 0 8px;gap:12px}.battle-decision{font:11px/1.6 var(--ui);color:#c8d8be;min-height:20px;display:flex;align-items:center;justify-content:space-between;gap:8px}.battle-decision button{border:0;background:none;color:#d9c183;padding:4px 0;font:10px var(--ui);min-height:25px}.battle-decision em{font-style:normal;color:#edd38c}#battle-screen .energy{display:flex;flex:1;gap:5px;align-items:center}#battle-screen .energy strong{font-size:21px}#battle-screen .energy em{font-size:10px}#battle-screen .energy-bar{width:52px;height:4px}#battle-screen .energy>span{font-size:10px}#battle-screen .combo-meter{font-size:10px}#battle-screen .combo-meter b{font-size:16px}#battle-screen .turn-tip{font:9px var(--ui);max-width:95px;line-height:1.4}#battle-screen .skill-buttons{gap:7px;margin:0}#battle-screen .skill-buttons .action-btn{min-height:75px;padding:8px 4px 6px;position:relative;display:grid;grid-template-rows:auto auto auto;gap:3px;background:linear-gradient(135deg,#355545,#1e3b30);border:1px solid #c9bd8155;border-radius:5px}#battle-screen .skill-buttons .action-btn.ultimate{background:linear-gradient(130deg,#605334,#343c2b);border-color:#d7bd7766}#battle-screen .skill-buttons .action-btn>span{font-size:12px;position:absolute;left:7px;top:7px}#battle-screen .skill-buttons .action-btn>b{font-size:13px;max-width:100%;padding:0 3px;margin:1px 0 0;white-space:nowrap}#battle-screen .skill-buttons .action-btn small{font:10px var(--ui);color:#e3d7a8}#battle-screen .skill-short{font:9px/1.4 var(--ui);font-style:normal;color:#b1c6b3;max-width:100%;text-align:center}#battle-screen .utility-buttons{margin:7px 0 0;gap:7px}#battle-screen .utility-buttons .action-btn{min-height:42px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px;padding:6px 4px;background:#15372e;border:1px solid #a2b79a33;border-radius:5px}#battle-screen .utility-buttons .action-btn b{font:12px var(--ui)}#battle-screen .utility-buttons .action-btn span{font-size:12px}#battle-screen .utility-buttons .action-btn small{font:9px var(--ui)}#battle-screen>.battle-log-wrap{flex:none;margin:0 -16px;padding:0 16px;background:#09211c}.log-title{font:10px var(--ui);min-height:28px}.log-title button{min-height:28px!important;font-size:10px}.battle-log{max-height:100px;margin:0 0 8px}
/* One readable skill title; leave the stage visible throughout the effect. */
.release-v4 .fx-cutin{top:18%;height:94px;left:5%;right:5%;max-width:540px;margin:auto;border-radius:6px;clip-path:none;background:linear-gradient(90deg,#0a211cfa,#2d4838f5);box-shadow:0 7px 24px #08181066;animation-duration:.9s;gap:14px}.release-v4 .fx-cutin img{height:80px;width:80px;border:0;background:none;border-radius:0;box-shadow:none}.release-v4 .fx-cutin strong{font-size:22px}.release-v4 .cinematic-banner{top:22%;max-width:420px!important}.release-v4 .cinematic-banner-note{font-size:10px}.release-v4 .fx-dash-echo{width:min(34vw,152px);height:min(36vw,165px)}.release-v4 .fx-spell-field{width:min(54vw,270px);height:min(54vw,270px)}.release-v4 .fx-impact-wave{width:105px;height:105px}
/* Journals, settings and complete result states. */
.journal-panel{position:relative;width:min(92vw,590px);max-height:86dvh;overflow:auto;padding:30px;border:1px solid #d1bb7970;border-radius:10px;background:linear-gradient(140deg,#203f32,#0b2420);box-shadow:0 22px 90px #0009}.journal-panel .close-btn{right:10px;top:10px;width:34px;height:34px}.journal-panel h2{font-size:29px;margin:4px 35px 20px 0}.journal-panel p{font:13px/1.85 var(--ui);color:#bfceba}.journal-panel h3{font-weight:500;color:#e1ca90;font-size:18px;margin:21px 0 8px}.guide-step{display:grid;grid-template-columns:29px 1fr;gap:10px;margin:15px 0}.guide-step>i{border:1px solid #d8bd7744;border-radius:50%;width:27px;height:27px;display:grid;place-items:center;font-style:normal;color:#e5c989}.guide-step strong{font-size:15px;font-weight:500}.guide-step p{margin:5px 0}.phase-wheel{display:flex;justify-content:space-between;padding:15px 9px;border-block:1px solid #c3b07b44;color:#e6d394;font-size:18px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid #cad4ba20;font:13px var(--ui)}.settings-row label{display:grid;gap:6px}.settings-row small{font-size:10px;color:#98b1a1}.settings-row select{padding:10px;background:#0b2720;color:#e6dcbe;border:1px solid #d5bd7a55;border-radius:4px;min-width:115px;font:12px var(--ui)}.settings-row button{min-height:40px}.record-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.record-stats span{padding:16px 4px;text-align:center;background:#c1b88a0d;border:1px solid #b1c3a822;border-radius:5px;color:#b9c8b5;font:10px var(--ui)}.record-stats b{font:28px Georgia,serif;display:block;color:#e4c68e;margin-bottom:6px}.record-row{display:flex;align-items:center;justify-content:space-between;padding:15px 0;border-bottom:1px solid #b7c5a320;gap:10px;font:12px/1.6 var(--ui)}.record-row small{display:block;color:#8fa797;font-size:10px}.record-row>b{font-weight:500;color:#d9c184}.medals{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.medals span{text-align:center;opacity:.45;border:1px solid #c6b37f44;padding:16px 5px;border-radius:5px;font:12px var(--ui)}.medals i{display:block;font-style:normal;font-size:28px;margin-bottom:10px;color:#e6cf91}.medals .unlocked{opacity:1;background:#bbaa6020}.journal-panel .primary-btn{width:100%;margin-top:14px}.notice{position:fixed;bottom:95px;left:50%;transform:translateX(-50%);padding:12px 20px;max-width:90vw;border:1px solid #d4be8177;background:#153b30fa;color:#f3e4bc;border-radius:6px;font:12px/1.6 var(--ui);z-index:80;box-shadow:0 8px 28px #0007}.modal{z-index:60}.modal-backdrop{backdrop-filter:blur(3px)}.card-modal-panel{width:min(94vw,690px);max-height:90dvh;grid-template-columns:42% 58%;border-radius:7px;padding:10px;overflow:visible;background:#122f27}.card-modal-panel #modal-art{aspect-ratio:9/16;object-fit:contain}.modal-copy{max-height:84dvh;overflow:auto;padding:14px 18px}.modal-skill>p{font-size:11px!important;line-height:1.6}.modal-skill{margin-top:7px!important}.modal-skill>b{font-size:14px!important}.modal-copy>p{font-size:12px;line-height:1.7}.modal-kicker{font-size:10px}.modal-affinity{display:flex;flex-wrap:wrap;font-size:11px}.modal-affinity small{width:100%;font-size:10px}.modal-stats{font-size:11px}#modal-select-btn{width:100%;margin-top:14px;min-height:44px;font-size:12px}.close-btn{right:5px;top:5px}.result-screen{max-width:800px;background:radial-gradient(ellipse at 50% 35%,#46734b30,transparent 60%)}.result-screen .result-ornament{border-radius:3px;transform:rotate(45deg);color:#efcf90;font-size:43px;width:64px;height:64px;margin:20px 0 38px}.result-screen h2{font-size:44px}.result-insight{font:13px/1.9 var(--ui);max-width:450px;color:#b6cbb8;margin:-10px 0 25px}.result-stats div{padding:17px 8px;border-radius:6px}.result-stats strong{font-size:28px}.reward-options{grid-template-columns:repeat(3,1fr);max-width:650px}.reward-card{min-height:160px;border-radius:7px;padding:22px 17px;background:linear-gradient(140deg,#294732,#122f26);border-color:#dbbe7b44}.reward-card strong{font-size:22px}.reward-card span{font:12px/1.65 var(--ui);color:#bfd0b7}.reward-card:hover{border-color:#e9d08f}.reward-team{display:flex;gap:13px;margin:0 0 22px}.reward-team img{height:85px;width:85px;object-fit:contain}.pause-panel{border-radius:8px}
@media(max-width:649px){#splash{padding:18px 21px 18px}.brand{font-size:17px}.brand i{width:31px;height:35px}.brand small{font-size:7px}.home-top>.icon-btn{height:36px;width:36px}.home-hero{height:540px}.hero-art{right:-21px;top:4px;bottom:50px;width:102%;mask-image:linear-gradient(180deg,transparent,#000 8%,#000 70%,transparent);-webkit-mask-image:linear-gradient(180deg,transparent,#000 8%,#000 70%,transparent)}.hero-art img{object-position:65% 59%;opacity:.85}.hero-art:after{background:linear-gradient(90deg,#08161796,transparent 65%),linear-gradient(180deg,transparent 48%,#081617 96%)}.hero-caption{top:45px;right:29px;font-size:10px}.hero-copy{padding-top:49px;width:100%}.hero-copy h1{font-size:63px;line-height:1.13;margin-top:14px}.hero-copy>.lead{margin-top:141px;margin-bottom:10px;font-size:12px;line-height:1.8;text-shadow:0 1px 9px #001}.hero-copy>.primary-btn{width:100%;min-height:50px}.hero-copy>.secondary-btn{width:100%;margin-top:7px}.hero-facts{margin-top:12px;justify-content:center;font-size:9px}.home-nav{margin-top:40px}.home-nav button{padding:15px 9px;gap:7px}.home-nav span{font-size:8px;letter-spacing:.04em}.home-nav strong{font-size:17px;letter-spacing:.03em}.home-nav small{font-size:8px;line-height:1.7}.home-nav b{display:none}.journey-route{gap:13px;padding:22px 0 15px}.journey-route>span{grid-template-columns:18px 1fr;gap:4px}.journey-route i{font-size:18px}.journey-route b{font-size:12px}.journey-route small{font-size:8px}.journey-route em{font-size:14px}.deck-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.deck-card .deck-overlay{padding:18px 9px 11px}.deck-card .deck-overlay h3{font-size:16px}.deck-card .deck-overlay p{font-size:9px}.card-info{right:6px;top:36px;width:30px;height:30px}.deck-phase{left:9px;top:37px}.difficulty-select button{padding:10px 8px}.difficulty-select small{font-size:9px}.difficulty-select span{display:none}.formation-presets{gap:5px;font-size:10px}.formation-presets button{font-size:10px;padding:6px 9px}.deck-footer{padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:7px}.selected-roster{gap:3px}.selected-roster button{min-width:0;font-size:10px;padding:0 4px;gap:1px;height:34px}.selected-roster img{width:23px}.deck-summary{max-width:240px;font-size:9px;white-space:normal}.deck-footer .primary-btn{font-size:12px;padding:9px 13px}.journal-panel{padding:25px 21px}.card-modal-panel{grid-template-columns:35% 65%;padding:7px}.modal-copy{padding:14px 10px}.modal-copy>p{font-size:11px}.modal-skill>p{font-size:10px!important}.modal-skill>b{font-size:12px!important}.modal-copy h2{font-size:26px}.modal-skill>em{font-size:9px}.reward-options{grid-template-columns:1fr;gap:9px}.reward-card{min-height:100px;padding:16px 18px}.reward-card strong{font-size:20px;margin:6px 0}.reward-card>span:first-child{display:none}.result-screen{padding-inline:22px}.result-screen h2{font-size:37px}.result-stats{grid-template-columns:repeat(2,1fr)}}
@media(min-width:650px){body[data-screen="battle"] #app{background:radial-gradient(ellipse at 50% 40%,#48604538,#081617 70%)}#battle-screen{border-inline:1px solid #c2bd7a24;box-shadow:0 0 100px #0018}.deck-footer{left:24px;right:24px}}
@media(max-height:740px){#battle-screen{min-height:660px}.battle-header{height:50px}#battle-screen>.arena{min-height:298px;padding-top:77px}#battle-screen .combat-card{min-height:97px}#battle-screen .combat-row{min-height:100px}#battle-screen .unit-motion{min-height:69px}#battle-screen .skill-buttons .action-btn{min-height:67px}#battle-screen>.action-panel{padding-block:7px}#battle-screen .battle-decision{font-size:10px}.hero-copy>.lead{margin-top:122px}.home-hero{height:516px}}
@media(max-width:359px){.hero-copy h1{font-size:55px}.selected-roster img{display:none}.selected-roster button{min-width:53px}.difficulty-select b{font-size:13px}.formation-presets>span{width:100%}#battle-screen .hp-text{font-size:7px}#battle-screen .combat-name{font-size:11px!important}#battle-screen .skill-buttons .action-btn>b{font-size:12px}#battle-screen .skill-short{font-size:8px}.card-info{width:27px;height:27px}.card-modal-panel{display:block;max-height:90dvh;overflow:auto}.card-modal-panel #modal-art{width:35%;float:left;margin:10px}.modal-copy{max-height:none}.objective-tip{font-size:8px!important}}
/* The battle rig occupies only its own row: image size is independent of screen width. */
#battle-screen .combat-row{height:auto;flex:1 1 0;min-height:100px}
#battle-screen .combat-card{height:100%;min-height:0;max-height:none;overflow:visible;justify-content:flex-end;gap:0}
#battle-screen .unit-motion{flex:1 1 0;height:auto;min-height:0;max-height:155px;display:block}
#battle-screen .unit-standee{position:absolute;inset:0;min-height:0;display:block}
#battle-screen .unit-standee img{position:absolute;inset:0;width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain}
#battle-screen .unit-hud{height:42px;flex:0 0 42px;display:grid;grid-template-rows:17px 4px 11px;gap:2px;padding:3px 5px;overflow:hidden}
#battle-screen .unit-title{min-height:0;line-height:17px}
#battle-screen .combat-name{padding:0;line-height:17px}
#battle-screen .hp-line{display:block;margin:0;height:4px}
#battle-screen .hp-text{padding:0;line-height:11px;height:11px;font-size:8px}
#battle-screen>.arena:before{background-image:url("./landscape.svg");background-size:cover;background-position:center;opacity:1}
.spell-projectile{position:fixed;z-index:8;pointer-events:none;width:52px;height:26px;border-radius:70% 25% 25% 70%;background:linear-gradient(90deg,transparent,var(--spell-color) 60%,#fff4cf);box-shadow:12px 0 22px var(--spell-color);transform-origin:center;will-change:transform,opacity}
.spell-projectile:after{content:"";position:absolute;inset:6px 0 6px 16px;border-radius:50%;background:#fff5d1;box-shadow:0 0 10px #fff}
.spell-water{height:30px;width:42px;border:1px solid #d0ffff}
.spell-fire{width:60px;height:29px;clip-path:polygon(0 10%,35% 20%,12% 0,65% 17%,100% 50%,65% 83%,12% 100%,35% 80%,0 90%,22% 50%)}
.spell-wood{height:23px;width:43px;border-radius:0 85% 0 85%;border:1px solid #d5ebaa}
.spell-metal{height:9px;width:68px;border-radius:80% 0 0 80%}
.spell-earth{height:33px;width:34px;border-radius:6px;clip-path:polygon(20% 0,80% 10%,100% 55%,70% 100%,10% 80%,0 30%)}
@media(max-width:600px){.home-nav{margin-top:16px}}
/* Let the cover grow when a saved journey adds a second button. */
#splash .home-hero{height:auto;min-height:540px}
#splash .hero-copy{padding-bottom:30px}
@media(min-width:650px){#splash .hero-copy>.lead{margin-top:0}#splash .hero-copy{padding-top:60px}}
@media(max-width:649px){#splash .home-hero{height:auto;min-height:0}#splash .home-nav{margin-top:22px}}
/* Touch and safe-area acceptance: small glyphs keep full-size hit areas. */
button,a{touch-action:manipulation}
#splash{padding-top:calc(24px + env(safe-area-inset-top))}
#battle-screen{padding-top:calc(12px + env(safe-area-inset-top))}
#battle-screen .battle-tools .icon-btn,.home-top>.icon-btn,.close-btn{width:44px;height:44px;min-width:44px;min-height:44px}
.card-info{width:44px;height:44px;min-width:44px;min-height:44px}
.formation-presets button,.phase-filters button,.selected-roster button,.back-home{min-height:44px}
#current-skills{min-height:44px}
#battle-screen .battle-decision{min-height:44px}
.log-title button{min-height:44px;min-width:44px}
.modal-copy>p,.modal-skill>p{font-size:13px!important;line-height:1.7!important}
.modal-skill>b{font-size:14px!important}
#battle-screen .hp-text{font-size:9px}
@media(max-width:649px){#splash{padding-top:calc(18px + env(safe-area-inset-top))}}
#battle-screen .log-title button{height:44px;min-height:44px;min-width:44px}
#battle-screen .battle-log-wrap{min-height:44px}
#battle-screen .utility-buttons .action-btn{min-height:44px}

/* One resolved motion preference drives CSS, WAAPI and cinematic effects. */
#battle-screen #battle-motion-btn{min-width:58px;width:auto;padding:0 7px;font:12px var(--ui);border-radius:8px;white-space:nowrap}
#battle-motion-btn[aria-pressed="true"]{color:#f3dfa3;border-color:#bfa465;background:#31493a}
#battle-motion-btn[aria-pressed="false"]{color:#f2d0a6;border-color:#a78663;background:#453a2d}
#battle-screen .battle-tools{gap:6px;flex-shrink:0}
#battle-screen .battle-header{min-height:62px}
html .fx-dash-echo{animation-duration:calc(.62s / var(--fx-speed,1))}
html .fx-dash-echo.fx-skill{animation-duration:calc(.76s / var(--fx-speed,1))}
html .fx-spell-field{animation-duration:calc(.98s / var(--fx-speed,1))}
html .fx-impact-wave{animation-duration:calc(.76s / var(--fx-speed,1))}
html .fx-ring{animation-duration:calc(.62s / var(--fx-speed,1))}
html .battle-screen.fx-arena-charge .arena{animation-duration:calc(.62s / var(--fx-speed,1))}
html .battle-screen.fx-arena-cast .arena{animation-duration:calc(.98s / var(--fx-speed,1))}
html .battle-screen.fx-arena-impact .arena{animation-duration:calc(.72s / var(--fx-speed,1))}
html[data-reduced-motion="true"] .fx-float{animation:none!important;opacity:1;transform:translate(-50%,-50%)}
html[data-reduced-motion="true"] .hero-art,html[data-reduced-motion="true"] .home-hero *{transition:none}
.fx-busy .cinematic-team-switch,.fx-busy .cinematic-stage{display:none}
@media(max-width:360px){#battle-screen .battle-header{padding-inline:0;gap:6px}#battle-screen .battle-tools{gap:4px}#battle-screen .battle-header h2{font-size:24px!important;white-space:nowrap;letter-spacing:.04em}#battle-screen .battle-header .eyebrow{font-size:8px;letter-spacing:0}}
