/* Current battle presentation. All values and interactions come from the combat engine. */
.in-battle{--silver:#c5b7b8;--ink:#17151d;--card-h:274px;--card-w:184px;--dialog-h:108px;--tray-h:324px;--hud-h:84px;background:#181721;font-family:Georgia,'Noto Serif SC','Microsoft YaHei',serif}
.in-battle::before{background-image:url('../assets/battle/sanctuary-background.png');background-position:62% center;filter:none!important}
.in-battle #app{min-height:100dvh}
.in-battle .battle-run{position:relative;display:block;height:100dvh;min-height:740px;width:100%;overflow:hidden;background:linear-gradient(0deg,#111018a8,transparent 46%,#10101820);isolation:isolate}
.in-battle .battle-field{position:absolute;inset:var(--hud-h) 0 0;min-height:0;height:auto;isolation:auto;z-index:1}
.in-battle .scene-vignette{z-index:-1;background:linear-gradient(90deg,#14131c55,transparent 52%),linear-gradient(0deg,#0c0b1480,transparent 50%)}
.in-battle .scene-mist{z-index:0;opacity:.25}
.in-battle .scene-particles{z-index:5;opacity:.7}
.in-battle .combat-hud{position:absolute;inset:0 0 auto;height:var(--hud-h);padding:0 26px 0 20px;gap:24px;z-index:30;border-bottom:1px solid #b9a5a650;background:linear-gradient(90deg,#14131beb,#14131b9e 55%,#17151ed9);box-shadow:0 5px 25px #0002}
.hud-hero{display:flex;align-items:center;gap:16px;border:0;background:none;color:#e8e2e5;padding:0;text-align:left;flex-shrink:0}
.hud-hero b{font-size:25px;font-weight:400;letter-spacing:4px}.hud-hero small{display:block;font-size:10px;color:#b7abb7;letter-spacing:2px;margin-top:7px}
.hud-portrait{width:73px;height:73px;position:relative;border:1px solid #a598ad;border-radius:50%;background:#2e2639 url('../assets/battle/luneth-portrait.png') 75% 10%/245% auto;box-shadow:0 0 0 4px #19151cb0,0 0 0 5px #b4a19866}
.hud-portrait:after{content:'✧';position:absolute;inset:-14px;font-size:102px;line-height:100px;text-align:center;color:#bda59d7a;pointer-events:none}
.in-battle .hud-values{gap:24px;flex-shrink:0;font:21px Georgia,serif;margin:0}.in-battle .hud-values .hp-color{color:#dea0ad}.in-battle .hud-values small{font-size:14px;color:#b6a5b3}.in-battle .hud-values .gold-color{color:#cab0f1}.in-battle .hud-values button{color:#beb4c5;font-size:20px;padding:4px}
.in-battle .hud-values .potion-hud small{font-size:10px;display:block;letter-spacing:2px}
.in-battle .hud-relics{gap:12px;min-width:30px;max-width:none;overflow:auto;scrollbar-width:none;align-items:center}
.in-battle .hud-relic{border:0;background:none;box-shadow:none;color:#c3b1b5;transform:none;font-size:28px;min-width:35px;padding:0}.in-battle .hud-relic:hover{color:#f5e5ff;filter:drop-shadow(0 0 7px #e3c5ff)}
.in-battle .hud-journey{border-left:1px solid #a59ab75e;padding-left:22px;margin-left:auto;min-width:174px;font:17px Georgia,'SimSun',serif;letter-spacing:1px}.hud-journey b{display:block;font-weight:400;font-size:17px;margin-top:4px}.in-battle .hud-journey small{font-size:8px;color:#a79ba9;letter-spacing:1px;margin-top:4px}
.hud-deck,.hud-settings{border:0;background:none;color:#bdb1c2;font:26px Georgia;white-space:nowrap;padding:4px}.hud-deck b{font-size:17px;font-weight:400}.hud-settings{font-size:30px}.hud-settings:hover{color:white}
.sanctuary-rail{position:absolute;top:130px;left:17px;display:flex;flex-direction:column;gap:28px;z-index:12}.sanctuary-rail button{border:0;background:none;display:grid;justify-items:center;gap:12px;padding:0;color:#c9bdc9;min-width:49px}.sanctuary-rail i{display:grid;place-items:center;position:relative;width:32px;height:32px;font-style:normal;font-size:26px}.sanctuary-rail i:before{content:'';position:absolute;inset:-3px;border:1px solid #baa8a47a;transform:rotate(45deg);box-shadow:inset 0 0 0 3px #15121b66}.sanctuary-rail span{font-size:11px;letter-spacing:1px;text-shadow:0 1px 4px black}.sanctuary-rail button:hover{color:white;filter:drop-shadow(0 0 4px #caa6f3)}
.sanctuary-quote{position:absolute;top:42px;left:109px;z-index:3;font-size:17px;line-height:1.9;letter-spacing:2px;color:#e0d7e1;text-shadow:0 2px 8px #000;pointer-events:none}.sanctuary-quote small{display:block;font:11px/1.8 Georgia;color:#beb1c7;letter-spacing:1px;margin-top:10px}
.in-battle .field-title{top:44px;left:auto;right:30px;text-align:right;max-width:40%;opacity:.85}.in-battle .field-title>span{font-size:9px;letter-spacing:2px}.in-battle .field-title h1{font-size:15px;letter-spacing:3px}.in-battle .turn-indicator{top:112px;right:31px;font-size:10px}.in-battle .turn-indicator b{font-size:24px}.in-battle .turn-indicator>i{font-size:22px}
.in-battle .hero-actor{left:-4%;bottom:0;width:58%;height:calc(100% - 104px);max-width:none;transform:none;pointer-events:none;z-index:3}
.in-battle .hero-actor .actor-figure{position:absolute;inset:0;width:100%;height:100%;display:block}
.in-battle .hero-actor .hero-sprite{height:100%;width:100%;object-fit:contain;object-position:left bottom;filter:drop-shadow(8px 0 20px #0b071b35);animation:portrait-breathe 8s ease-in-out infinite;transform-origin:45% 100%;mask-image:linear-gradient(#000 78%,transparent 99%)}
.in-battle .hero-actor .ground-shadow,.in-battle .hero-actor .hero-sigil,.in-battle .hero-actor .actor-caption,.in-battle .hero-actor .actor-health{display:none}
.in-battle .hero-actor .actor-health-row{position:absolute;bottom:calc(var(--tray-h) + var(--dialog-h) + 70px);left:calc(4vw + 92px);height:auto;z-index:10}
.in-battle .hero-actor .actor-shield{font-size:13px;background:#1b2637d9;border-color:#b6c6e687;padding:5px 10px;border-radius:0}
.in-battle .hero-actor .actor-statuses{position:absolute;left:calc(4vw + 150px);right:0;bottom:calc(var(--tray-h) + var(--dialog-h) + 71px);justify-content:flex-start;max-width:410px;pointer-events:auto;font-size:10px;z-index:11;gap:3px;margin:0;min-height:24px;align-content:end}
.in-battle .hero-actor .actor-statuses>span{border-radius:0;background:#17151ddb;border-color:#b0a3b458;padding:4px 6px;color:#d3c6dc}
.in-battle .hero-actor .shield-aura{inset:25% 12% 30%;opacity:.3}
.in-battle .hero-actor .actor-vfx{inset:20% 0 40%}
.in-battle .enemy-line{right:4%;bottom:calc(var(--tray-h) + var(--dialog-h) + 25px);width:44%;gap:35px;z-index:8;align-items:flex-end}
.in-battle .enemy{display:flex;flex-direction:column;align-items:center;max-width:260px;min-width:0;width:45%;padding:0;outline-offset:8px}
.in-battle .enemy .intent{position:relative;inset:auto;transform:none;order:0;width:100%;max-width:230px;padding-bottom:5px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;background:none;min-height:26px;text-shadow:0 2px 4px #000}
.in-battle .intent-main{font:23px Georgia;color:#edabb5;gap:5px}.in-battle .intent-main i{font-size:22px;color:#ed879b}.in-battle .intent small{font-size:10px;color:#d2c1d0}.in-battle .intent-special{font-size:9px;background:#19131dda}
.in-battle .enemy .actor-health-row{order:1;width:72%;max-width:180px;height:25px;margin-bottom:5px}.in-battle .enemy .actor-health{height:25px;border:0;border-radius:0;background:linear-gradient(transparent 20px,#3a2933 20px);overflow:visible;box-shadow:none}.in-battle .enemy .actor-health>span{top:auto;bottom:0;height:5px;background:#cf647e;box-shadow:0 0 5px #f39aad33}.in-battle .enemy .actor-health>b{font:16px/18px Georgia;text-shadow:0 2px 4px #000}.in-battle .enemy .damage-preview-bar{top:auto;bottom:0;height:5px}
.in-battle .enemy .actor-statuses{order:2;margin:1px 0 5px;min-height:20px;font-size:10px}.in-battle .enemy .star-marks{background:#17121c94;border-color:#c7b0d535;border-radius:0}
.in-battle .enemy .actor-figure,.in-battle .enemy.boss .actor-figure{order:3;height:clamp(160px,24vh,260px);width:100%}.in-battle .enemy .actor-sprite,.in-battle .enemy.wisp .actor-sprite,.in-battle .enemy.beetle .actor-sprite{width:115%;height:115%;object-fit:contain;filter:drop-shadow(0 8px 7px #0c0a16a6)}.in-battle .enemy.boss .actor-sprite{width:128%;height:128%}
.in-battle .enemy .actor-caption{order:4;margin:6px 0 0}.in-battle .enemy .actor-caption b{font-size:11px;letter-spacing:2px;color:#d6c9dc}
.in-battle .enemy .target-ring{bottom:-1px;opacity:.15;border-color:#ccafd866}.in-battle .enemy.targeted .target-ring{opacity:.5;box-shadow:0 0 10px #cab0e22e}.in-battle .target-chevron{display:none}.in-battle .enemy .target-label{position:static;order:5;font-size:8px;letter-spacing:2px;margin-top:6px;color:#bc96d5}.in-battle .enemy:not(.targeted) .target-label{opacity:.45}
.in-battle .preview-damage{top:45%;z-index:15;font-size:23px;text-shadow:0 2px 5px black}
.in-battle .hero-abilities{left:104px;top:auto;bottom:calc(var(--tray-h) + var(--dialog-h) + 4px);width:480px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;z-index:13}
.in-battle .ability-heading{position:absolute;left:0;top:-48px;margin:0;display:none}.in-battle .hero-passive-note{position:absolute;bottom:-28px;padding:0;font-size:9px}.in-battle .hero-passive-note small{display:inline;font-size:9px;margin-left:10px;color:#b5a4be}
.in-battle .stage-power{height:56px;margin:0;border:1px solid #a79aac8c;border-radius:0;box-shadow:inset 0 0 0 3px #17131d70;background:linear-gradient(120deg,#29212ee8,#14131edb);padding:6px;gap:8px}.in-battle .stage-power b{font-size:11px;letter-spacing:1px}.in-battle .stage-power small{font-size:8px;margin-top:5px;white-space:nowrap}.in-battle .stage-power:disabled{opacity:.62}.in-battle .stage-power:not(:disabled):hover{transform:translateY(-3px);box-shadow:0 0 15px #b99de64f}.in-battle .stage-power kbd{font-size:9px;right:4px;top:3px}
.in-battle .ability-orb{width:30px;height:30px;font-size:22px;border-color:#bcb0c9}.in-battle .ability-orb i{width:14px;height:14px;font-size:9px}.in-battle .skill-domain .ability-orb{background:radial-gradient(circle at 35% 25%,#c2b8e0,#554a75 50%,#181422 80%)}.in-battle .skill-bloom .ability-orb{background:radial-gradient(circle at 35% 25%,#eee0f5,#826389 50%,#25192d 80%)}
.in-battle .weave-status{left:104px;top:auto;bottom:calc(var(--tray-h) + var(--dialog-h) - 61px);transform:none;width:480px;display:grid;grid-template-columns:1fr 1fr;padding:5px 8px;gap:0 18px;border:0;border-left:1px solid #a89caf65;border-radius:0;background:linear-gradient(90deg,#17141e9e,transparent);box-shadow:none;color:#d5c3e7;z-index:6;font-size:10px}.in-battle .weave-status b{font-size:15px}.in-battle .weave-status .weave-detail{font-size:8px;width:auto;display:block}
.in-battle .stage-bottom{position:absolute;left:auto;right:38px;bottom:calc(var(--tray-h) + var(--dialog-h) - 29px);z-index:9;display:block}.in-battle .last-action{display:none}.in-battle .turn-forecast{font-size:10px;display:flex;gap:12px;margin:0;padding:6px 10px;background:#17131daa;border-bottom:1px solid #bd9ba03d;color:#cabbd2}.in-battle .forecast-danger b{color:#eaa3b3}
.in-battle .battle-tray{position:absolute;inset:auto 0 var(--dialog-h);height:var(--tray-h);min-height:0;display:block;padding:0;z-index:18;background:none;border:0;pointer-events:none}
.in-battle .battle-tray:before{content:'';position:absolute;inset:90px 0 -110px;background:linear-gradient(0deg,#121019db,transparent);z-index:-1;pointer-events:none}
.in-battle .hand-center{position:absolute;inset:0 175px;min-width:0;pointer-events:none}.in-battle .hand-instructions{position:absolute;top:auto;bottom:-6px;left:0;right:0;justify-content:center;height:16px;gap:18px;font-size:9px;letter-spacing:1px;color:#b8a7c7;pointer-events:none}.in-battle .hand-instructions small{font-size:8px}
.in-battle .fan-hand{position:absolute;inset:0;width:100%;height:100%;min-height:0;overflow:visible;display:block;padding:0;pointer-events:none;--step:min(145px,calc((100vw - 540px)/max(1,var(--cards) - 1)))!important}
.in-battle .fan-hand>.hand-card{position:absolute;left:50%;top:20px;bottom:auto;flex:none;width:var(--card-w);min-width:var(--card-w);height:var(--card-h);min-height:var(--card-h);margin:0 0 0 calc(var(--card-w)/-2);border-radius:7px;padding:0;pointer-events:auto;touch-action:pan-x;transform:translateX(calc(var(--shift)*var(--step))) translateY(var(--rise)) rotate(var(--tilt));transform-origin:50% 125%;transition:transform .18s ease,box-shadow .18s;box-shadow:0 6px 16px #000b,inset 0 0 0 1px #baa6ae;overflow:visible;background:#1b1823}
.in-battle .fan-hand>.hand-card:before{content:'';position:absolute;inset:4px;border:1px solid #c6b2b68f;border-radius:4px;z-index:4;pointer-events:none;box-shadow:inset 0 0 0 2px #211a2480}
.in-battle .fan-hand>.hand-card:after{content:'✧';position:absolute;inset:auto 12px -8px;color:#c8b2b9;text-align:center;font-size:20px;background:none;height:auto;pointer-events:none}
.in-battle .fan-hand>.hand-card:hover:not(:disabled),.in-battle .fan-hand>.hand-card:focus-visible{transform:translateX(calc(var(--shift)*var(--step))) translateY(-35px) rotate(0deg)!important;z-index:100!important;box-shadow:0 0 0 1px #dcc6f6,0 0 22px #ba8bedb0,0 10px 25px #0008}
.in-battle .fan-hand>.hand-card:disabled{opacity:.78;filter:saturate(.65)}
.in-battle .fan-hand>.luneth-card{border:2px solid #17191e;background:linear-gradient(#24202c,#16141d);color:#e7dfe9}.in-battle .fan-hand>.neutral-card{border:2px solid #f4f5f6;background:linear-gradient(#eeebf0,#c9c4d0);color:#302a37}
.in-battle .fan-hand .card-illustration{top:6px;left:6px;right:6px;bottom:auto;height:132px;opacity:1;border-radius:2px;background-position:center;background-size:cover;mask-image:none;filter:none}
.in-battle .fan-hand .card-illustration:after{background:linear-gradient(transparent 75%,#1a17294d);opacity:1}
.in-battle .fan-hand .card-cost{position:absolute;top:-12px;left:-10px;width:37px;height:41px;display:grid;place-items:center;font:29px Georgia;color:#f2e9fc;background:radial-gradient(ellipse at 30% 25%,#b9a3d5,#54406e 60%,#1d172e);border:1px solid #d4bedb;border-radius:50%;box-shadow:0 0 0 3px #231c2ce8,0 0 0 4px #a69aac6e;z-index:8;padding:0}
.in-battle .fan-hand .card-hotkey{top:9px;right:10px;left:auto;font-size:8px;opacity:.7;background:#191520b0;z-index:5}
.in-battle .fan-hand .card-type{position:absolute;top:163px;left:7px;right:7px;height:16px;padding:1px 0;margin:0;text-align:center;font-size:7px;line-height:12px;letter-spacing:1px;background:none;color:#b9a7c4;z-index:5;border:0}
.in-battle .fan-hand .neutral-card .card-type{color:#696072}
.in-battle .fan-hand .luneth-card .card-copy{color:#e7dfe9;background:none}.in-battle .fan-hand .neutral-card .card-copy{color:#302a37;background:none}.in-battle .hud-values .potion-hud{background:none!important;border:0!important;box-shadow:none;border-radius:0;padding:4px!important;font-size:20px!important}
.in-battle .fan-hand .card-copy{position:absolute;inset:136px 7px 24px;margin:0;padding:0;min-height:0;background:none;z-index:3;display:block}
.in-battle .fan-hand .card-copy h3{position:relative;margin:0 -10px 25px;height:27px;padding:5px 3px;display:flex;align-items:center;justify-content:center;color:#302834;background:linear-gradient(90deg,#aba1b2,#e1d9e2 38%,#d9d1dc 60%,#a79cae);box-shadow:0 2px 4px #0005;font-size:13px;line-height:17px;font-weight:600;letter-spacing:1px;border:1px solid #8b7a92;white-space:nowrap}
.in-battle .fan-hand .card-copy p{font:11px/1.65 'Microsoft YaHei',sans-serif;color:inherit;margin:0;padding:0 8px;text-align:left;letter-spacing:0}
.in-battle .fan-hand .card-bottom{height:17px;left:8px;right:8px;bottom:9px;line-height:14px;font-size:7px;background:none;color:#a99ab9;letter-spacing:1px;border-top:1px solid #9d829933;padding-top:3px}.in-battle .fan-hand .neutral-card .card-bottom{background:none;color:#62566d;border-color:#74687944}
.in-battle .energy-panel{position:absolute;left:30px;bottom:16px;padding:0;display:flex;flex-direction:column;align-items:center;pointer-events:auto;width:120px}
.in-battle .energy-orb{width:100px;height:100px;border:2px solid #d5bed7;outline:1px solid #ac93bc;outline-offset:11px;background:radial-gradient(circle at 38% 30%,#977ab9d9,#493164e6 55%,#21182c);box-shadow:0 0 0 6px #22202dbb,0 0 24px #c697e64d,inset 0 0 18px #ceb0ef80;position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#f3e8ff;transform:none}
.in-battle .energy-orb:before{content:'';position:absolute;inset:-20px;border:1px solid #ad91a8a1;transform:rotate(45deg);pointer-events:none}.in-battle .energy-orb:after{content:'✦';position:absolute;top:-36px;left:calc(50% - 10px);font:25px Georgia;color:#ead2d7;text-shadow:0 0 8px #b8a1eb}
.in-battle .energy-orb strong{font:38px Georgia;font-weight:400;white-space:nowrap}.in-battle .energy-orb strong em{font-style:normal;font-size:27px;margin:0 2px;color:#c3accf}.in-battle .energy-orb small{font-size:8px;margin-top:5px;letter-spacing:2px}.in-battle .energy-orb.empty{filter:saturate(.35)}
.in-battle .resonance-gauge{width:108px;margin-top:22px;color:#ceb9e5;font-size:10px}.in-battle .resonance-gauge b{font-size:14px}.in-battle .resonance-ticks i{height:4px;background:#5a496870}.in-battle .resonance-ticks i.filled{background:#ccb3ed;box-shadow:0 0 6px #b991e4}
.in-battle .draw-stack{position:absolute;top:calc(100% + 35px);left:6px;margin:0;transform:rotate(-9deg)}
.in-battle .deck-stack .deck-back{width:45px;height:59px;border-radius:2px;border:1px solid #bdacba;background:linear-gradient(140deg,#3d334b,#16121f);box-shadow:3px 3px 0 #817585,5px 5px 0 #241f2e,7px 7px 0 #847a8a;display:grid;place-items:center;font-size:29px;color:#b7a3c8}.in-battle .deck-stack b{background:#151019;border:1px solid #b6a1b587;color:#e4d7e9;font:16px Georgia;right:-12px;bottom:13px;min-width:28px;height:28px;display:grid;place-items:center}.in-battle .deck-stack small{font-size:8px;color:#baadc6;margin-top:10px}
.in-battle .turn-controls{position:absolute;right:28px;bottom:0;width:180px;padding:0;display:flex;flex-direction:column;pointer-events:auto}.in-battle .turn-control-note{font-size:9px;color:#b2a2c1;margin-bottom:12px}.in-battle .end-turn{width:180px;min-width:0;padding:12px 30px;color:#eee1ed;border:1px solid #c8b4b7;background:linear-gradient(120deg,#302a3bdf,#15131ef0);border-radius:0;font:18px Georgia,'SimSun',serif;letter-spacing:3px;box-shadow:inset 0 0 0 4px #1b1623,inset 0 0 0 5px #827181;clip-path:polygon(9% 0,91% 0,100% 50%,91% 100%,9% 100%,0 50%);height:70px;display:block}.in-battle .end-turn span{display:block;font:10px Georgia;letter-spacing:1px;margin-top:7px;color:#b9a4ca}.in-battle .end-turn:hover{background:linear-gradient(120deg,#61506fe8,#201927);box-shadow:inset 0 0 0 4px #1b1623,inset 0 0 0 5px #c7b0d3}.in-battle .end-shortcut{font-size:8px;color:#baabc6;margin-top:8px}
.in-battle .right-piles{position:absolute;top:calc(100% + 28px);right:15px;margin:0;gap:24px}.in-battle .exhaust-stack{font-size:10px;color:#ad9bbb}.in-battle .exhaust-stack>span{font-size:22px}
.battle-dialogue{position:absolute;left:18%;right:18%;bottom:26px;height:76px;z-index:20;display:flex;align-items:center;gap:22px;padding:0;border:1px solid #b4a1ad80;background:linear-gradient(100deg,#251e2be0,#14121beb);color:#e3d7e5;text-align:left;box-shadow:0 3px 12px #0004;overflow:hidden}.dialogue-portrait{align-self:stretch;flex:0 0 27%;background:#3e3547 url('../assets/battle/luneth-portrait.png') 77% 14%/155% auto;mask-image:linear-gradient(90deg,#000 75%,transparent)}.dialogue-copy{flex:1;min-width:0}.dialogue-copy b{display:block;font-size:12px;font-weight:400;letter-spacing:3px;color:#cfc1d5;margin-bottom:10px}.dialogue-copy>span{font-size:15px;letter-spacing:1px;line-height:1.5}.battle-dialogue>i{font-style:normal;font-size:24px;align-self:flex-end;margin:0 18px 9px 0;color:#c8b7c7}.battle-dialogue:hover{border-color:#d6bddb}
.in-battle .combat-bottomline{position:absolute;bottom:0;left:0;right:0;height:22px;z-index:20;justify-content:flex-end;background:none;font-size:8px;letter-spacing:1px;color:#a898b1;padding:0 30px;pointer-events:none}.in-battle .combat-bottomline>span:first-child{display:none}
.in-battle .stage-announcement{position:absolute;left:42%;right:6%;top:23%;width:auto;transform:none;font:24px Georgia,'SimSun',serif;letter-spacing:5px;text-shadow:0 0 15px #aa82cb,0 2px 5px #000;z-index:30;pointer-events:none}.in-battle .stage-announcement small{font-size:10px;letter-spacing:2px}
.in-battle .aim-overlay{z-index:24;pointer-events:none}.in-battle .domain-glyph{z-index:0;left:62%;top:28%;opacity:.15}.battle-settings{display:flex;gap:12px;flex-wrap:wrap}.battle-settings p{width:100%;line-height:1.8}.battle-settings .button{font-size:12px}
@keyframes portrait-breathe{50%{transform:translateY(-3px) rotate(.2deg)}}
@media(min-width:1600px) and (min-height:1000px){.in-battle{--card-w:204px;--card-h:296px;--tray-h:346px}.in-battle .fan-hand .card-illustration{height:145px}.in-battle .fan-hand .card-copy{top:149px}.in-battle .fan-hand .card-type{top:176px}.in-battle .fan-hand .card-copy p{font-size:12px}.in-battle .fan-hand{--step:min(165px,calc((100vw - 600px)/max(1,var(--cards) - 1)))!important}}
@media(max-width:1150px){.in-battle .combat-hud{gap:14px;padding:0 18px}.hud-hero{gap:12px}.hud-hero b{font-size:20px}.hud-hero small{font-size:8px}.hud-portrait{width:62px;height:62px}.hud-portrait:after{font-size:90px;line-height:90px}.in-battle .hud-values{font-size:18px;gap:15px}.in-battle .hud-journey{min-width:140px;padding-left:15px}.in-battle .hud-relics{gap:4px}.in-battle .hero-abilities{left:86px;width:430px;gap:5px}.in-battle .stage-power{gap:5px}.in-battle .stage-power b{font-size:10px}.in-battle .stage-power small{font-size:7px}.in-battle .weave-status{left:86px;width:430px}.in-battle .hand-center{left:130px;right:130px}.in-battle .fan-hand{--step:min(140px,calc((100vw - 460px)/max(1,var(--cards) - 1)))!important}.in-battle .energy-panel{left:15px;width:100px}.in-battle .energy-orb{width:80px;height:80px}.in-battle .energy-orb strong{font-size:32px}.in-battle .resonance-gauge{width:90px}.in-battle .turn-controls{right:16px;width:148px}.in-battle .end-turn{width:148px;font-size:16px}.in-battle .enemy-line{gap:16px;width:44%;right:3%}.in-battle .stage-bottom{right:20px}.in-battle .turn-forecast{font-size:9px;gap:8px}.battle-dialogue{left:17%;right:20%;gap:14px}.dialogue-copy>span{font-size:13px}}
/* Portrait tablets retain the reference composition: tall heroine, distant enemies and a fan of cards. */
@media(min-width:701px) and (max-aspect-ratio:4/5){.in-battle{--card-h:292px;--card-w:188px;--tray-h:342px;--dialog-h:135px;--hud-h:88px}.in-battle::before{background-position:64% center}.in-battle .hero-actor{left:-19%;width:87%;height:calc(100% - 125px)}.sanctuary-quote{top:49px;left:112px;font-size:18px}.in-battle .field-title{top:24%;max-width:43%;right:25px}.in-battle .turn-indicator{top:33%;right:30px}.sanctuary-rail{top:155px;gap:33px}.in-battle .enemy-line{bottom:calc(var(--tray-h) + var(--dialog-h) + 130px);width:46%;right:2%;gap:10px}.in-battle .enemy .actor-figure,.in-battle .enemy.boss .actor-figure{height:230px}.in-battle .hero-abilities{left:90px;width:calc(100% - 180px);bottom:calc(var(--tray-h) + var(--dialog-h) + 18px)}.in-battle .stage-power b{font-size:12px}.in-battle .stage-power small{font-size:9px}.in-battle .hero-actor .actor-statuses{left:calc(19vw + 140px);bottom:calc(var(--tray-h) + var(--dialog-h) + 85px);max-width:600px}.in-battle .hero-actor .actor-health-row{left:calc(19vw + 90px);bottom:calc(var(--tray-h) + var(--dialog-h) + 84px)}.in-battle .hero-passive-note{bottom:-24px}.in-battle .weave-status{bottom:calc(var(--tray-h) + var(--dialog-h) - 46px);left:90px;width:430px}.in-battle .weave-status .weave-detail{display:none}.in-battle .stage-bottom{bottom:calc(var(--tray-h) + var(--dialog-h) + 91px);right:28px}.in-battle .turn-forecast{font-size:8px}.in-battle .turn-forecast>span{display:none}.in-battle .hand-center{left:60px;right:60px}.in-battle .fan-hand{--step:min(175px,calc((100vw - 265px)/max(1,var(--cards) - 1)))!important}.in-battle .fan-hand .card-copy p{font-size:12px}.in-battle .fan-hand .card-copy h3{font-size:14px}.in-battle .fan-hand .card-bottom{font-size:8px}.in-battle .energy-panel{left:30px;bottom:-45px;z-index:110}.in-battle .energy-orb{width:100px;height:100px}.in-battle .energy-orb strong{font-size:38px}.in-battle .resonance-gauge{width:100px;margin-top:22px}.in-battle .draw-stack{left:2px;top:calc(100% + 26px)}.in-battle .turn-controls{bottom:-22px;right:28px;width:200px;z-index:110}.in-battle .end-turn{width:200px;font-size:20px;height:75px}.in-battle .turn-control-note{display:none}.in-battle .right-piles{top:calc(100% + 38px);right:5px}.battle-dialogue{left:19%;right:17%;bottom:27px;height:87px}.dialogue-copy>span{font-size:15px}.in-battle .hand-instructions{bottom:-28px}.in-battle .hand-instructions small{display:none}}
@media(min-width:701px) and (max-height:800px){.in-battle{--hud-h:68px;--card-h:240px;--card-w:166px;--tray-h:280px;--dialog-h:83px}.in-battle .battle-run{min-height:650px}.hud-portrait{width:56px;height:56px}.hud-portrait:after{font-size:84px;line-height:84px}.hud-hero b{font-size:20px}.in-battle .hero-actor{height:calc(100% - 50px);left:-6%}.sanctuary-quote{top:25px;font-size:13px}.sanctuary-quote small{font-size:9px;margin-top:4px}.sanctuary-rail{top:103px;gap:20px}.sanctuary-rail i{width:25px;height:25px;font-size:21px}.sanctuary-rail span{font-size:9px}.in-battle .field-title{top:22px}.in-battle .turn-indicator{top:75px}.in-battle .enemy-line{bottom:calc(var(--tray-h) + var(--dialog-h) + 8px)}.in-battle .enemy .actor-figure,.in-battle .enemy.boss .actor-figure{height:145px}.in-battle .enemy .intent{min-height:20px}.in-battle .intent-main{font-size:19px}.in-battle .enemy .actor-caption{margin:2px 0}.in-battle .hero-abilities{bottom:calc(var(--tray-h) + var(--dialog-h) - 1px);left:85px;width:445px}.in-battle .stage-power{height:47px}.in-battle .hero-actor .actor-statuses{left:calc(6vw + 135px);bottom:calc(var(--tray-h) + var(--dialog-h) + 51px)}.in-battle .hero-actor .actor-health-row{left:calc(6vw + 85px);bottom:calc(var(--tray-h) + var(--dialog-h) + 51px)}.in-battle .weave-status{left:85px;width:445px;bottom:calc(var(--tray-h) + var(--dialog-h) - 43px)}.in-battle .weave-status .weave-detail{display:none}.in-battle .fan-hand .card-illustration{height:106px}.in-battle .fan-hand .card-copy{top:110px;bottom:24px}.in-battle .fan-hand .card-copy h3{height:25px;font-size:12px;margin-bottom:20px}.in-battle .fan-hand .card-type{top:137px}.in-battle .fan-hand .card-copy p{font-size:10px;line-height:1.5}.in-battle .energy-orb{width:75px;height:75px}.in-battle .energy-orb strong{font-size:29px}.in-battle .energy-orb strong em{font-size:22px}.in-battle .draw-stack{top:calc(100% + 25px)}.in-battle .deck-stack .deck-back{width:34px;height:43px;font-size:23px}.in-battle .deck-stack small{font-size:7px}.in-battle .end-turn{height:62px;font-size:16px}.in-battle .turn-controls{bottom:0}.in-battle .right-piles{top:calc(100% + 20px)}.battle-dialogue{height:59px;bottom:19px}.dialogue-copy b{font-size:10px;margin-bottom:6px}.dialogue-copy>span{font-size:12px}.in-battle .combat-bottomline{height:17px;font-size:7px}}
/* Narrow screens use a readable scrollable hand; the stage remains one continuous scene. */
@media(max-width:700px){.in-battle{--hud-h:64px;--tray-h:260px;--dialog-h:106px;--card-w:145px;--card-h:225px}.in-battle .battle-run{height:100dvh;min-height:780px}.in-battle::before{background-position:64% center}.in-battle .combat-hud{height:64px;padding:0 10px;gap:10px;flex-wrap:nowrap}.hud-hero{gap:9px}.hud-portrait{width:45px;height:45px}.hud-portrait:after{inset:-10px;font-size:64px;line-height:65px}.hud-hero b{font-size:16px;letter-spacing:2px}.hud-hero small{font-size:6px;letter-spacing:1px;margin-top:4px}.in-battle .hud-values{margin-left:auto;gap:10px;font-size:14px}.in-battle .hud-values small{font-size:10px}.in-battle .hud-values button{font-size:17px;padding:0}.in-battle .hud-values .potion-hud small{display:none}.in-battle .hud-relics,.in-battle .hud-journey,.hud-deck{display:none}.hud-settings{font-size:22px;padding:0}.sanctuary-rail{left:12px;top:94px;gap:24px}.sanctuary-rail button{min-width:28px;gap:8px}.sanctuary-rail i{width:23px;height:23px;font-size:20px}.sanctuary-rail span{font-size:8px;letter-spacing:0}.sanctuary-quote{left:60px;top:27px;font-size:11px;letter-spacing:1px;line-height:1.8}.sanctuary-quote small{font-size:7px;line-height:1.6;margin-top:6px;letter-spacing:.5px}.in-battle .field-title{right:10px;top:21px;max-width:41%;opacity:.7}.in-battle .field-title>span{font-size:7px;letter-spacing:1px}.in-battle .field-title h1{font-size:10px;line-height:1.7;letter-spacing:1px;margin-top:5px}.in-battle .turn-indicator{top:86px;right:13px;font-size:8px;gap:4px}.in-battle .turn-indicator b{font-size:17px;margin-left:5px}.in-battle .hero-actor{left:-22%;bottom:130px;width:96%;height:calc(100% - 218px)}.in-battle .hero-actor .hero-sprite{object-position:left top;object-fit:contain;mask-image:linear-gradient(#000 75%,transparent)}.in-battle .hero-actor .actor-health-row{left:calc(22vw + 12px);bottom:calc(var(--tray-h) + var(--dialog-h) - 62px);height:21px}.in-battle .hero-actor .actor-shield{font-size:10px;padding:3px 7px}.in-battle .hero-actor .actor-statuses{left:calc(22vw + 59px);bottom:calc(var(--tray-h) + var(--dialog-h) - 61px);right:-20%;max-width:310px;min-height:20px;font-size:8px;gap:2px}.in-battle .hero-actor .actor-statuses>span{padding:3px 4px}.in-battle .enemy-line{right:2%;width:49%;gap:8px;bottom:calc(var(--tray-h) + var(--dialog-h) + 91px)}.in-battle .enemy{width:45%;max-width:150px}.in-battle .enemy .actor-figure,.in-battle .enemy.boss .actor-figure{height:118px}.in-battle .enemy.single-enemy{max-width:150px}.in-battle .enemy .intent{gap:2px;max-width:150px;padding-bottom:2px;min-height:20px}.in-battle .intent-main{font-size:17px}.in-battle .intent-main i{font-size:17px}.in-battle .intent small{font-size:7px}.in-battle .intent-special{font-size:7px;line-height:1.4}.in-battle .enemy .actor-health-row{height:22px;width:89%;margin-bottom:1px}.in-battle .enemy .actor-health{height:22px;background:linear-gradient(transparent 18px,#30232b 18px)}.in-battle .enemy .actor-health>span{height:4px}.in-battle .enemy .actor-health>b{font-size:12px;line-height:16px}.in-battle .enemy .actor-statuses{margin:1px 0 4px;min-height:16px}.in-battle .enemy .actor-caption b{font-size:8px;letter-spacing:1px}.in-battle .enemy .target-label{font-size:7px;margin-top:3px}.in-battle .enemy .star-marks i{font-size:8px}.in-battle .hero-abilities{left:12px;right:12px;bottom:calc(var(--tray-h) + var(--dialog-h) + 14px);width:auto;gap:5px}.in-battle .stage-power{height:48px;padding:5px 3px;gap:4px}.in-battle .stage-power b{font-size:9px;letter-spacing:0}.in-battle .stage-power small{font-size:7px;margin-top:5px}.in-battle .ability-orb{width:23px;height:23px;font-size:18px}.in-battle .ability-orb i{width:12px;height:12px;font-size:8px}.in-battle .stage-power kbd{display:none}.in-battle .hero-passive-note{display:none}.in-battle .weave-status{left:12px;top:auto;bottom:calc(var(--tray-h) + var(--dialog-h) - 12px);width:153px;display:flex;justify-content:flex-start;gap:10px;padding:3px 5px;font-size:8px}.in-battle .weave-status b{font-size:11px}.in-battle .weave-status .weave-detail{display:none}.in-battle .stage-bottom{left:auto;right:10px;bottom:calc(var(--tray-h) + var(--dialog-h) - 12px)}.in-battle .turn-forecast{font-size:7px;gap:5px;padding:4px 5px;flex-wrap:nowrap}.in-battle .turn-forecast>span{display:none}.in-battle .battle-tray{bottom:var(--dialog-h);height:var(--tray-h)}.in-battle .hand-center{inset:0 0 0 54px}.in-battle .fan-hand{inset:0;position:relative;display:flex;align-items:flex-start;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;height:252px;gap:11px;padding:20px 12px 6px 8px;scrollbar-width:thin;pointer-events:auto;scrollbar-color:#9e83b34d transparent;scroll-padding-left:8px}.in-battle .fan-hand>.hand-card{position:relative;flex:0 0 var(--card-w);left:auto;top:auto;min-height:var(--card-h);height:var(--card-h);width:var(--card-w);margin:0!important;transform:none!important;border-radius:5px}.in-battle .fan-hand>.hand-card:hover:not(:disabled),.in-battle .fan-hand>.hand-card:focus-visible{transform:none!important}.in-battle .fan-hand .card-illustration{height:95px}.in-battle .fan-hand .card-copy{top:100px;bottom:23px;left:6px;right:6px}.in-battle .fan-hand .card-copy h3{height:24px;font-size:11px;margin:0 -7px 20px;letter-spacing:0}.in-battle .fan-hand .card-copy p{font-size:9px;line-height:1.55;padding:0 4px}.in-battle .fan-hand .card-type{top:126px;font-size:6px;letter-spacing:0}.in-battle .fan-hand .card-cost{width:27px;height:31px;left:-5px;top:-9px;font-size:23px}.in-battle .fan-hand .card-bottom{font-size:6px;letter-spacing:0;bottom:7px;height:15px}.in-battle .hand-instructions{left:7px;right:auto;top:auto;bottom:-1px;font-size:7px;letter-spacing:0;height:10px;padding:0;justify-content:flex-start}.in-battle .hand-instructions small{display:none}.in-battle .energy-panel{left:5px;bottom:96px;width:44px}.in-battle .energy-orb{width:39px;height:39px;border-width:1px;outline-offset:4px;box-shadow:0 0 0 2px #262034,0 0 15px #b689e557}.in-battle .energy-orb:before{inset:-7px}.in-battle .energy-orb:after{top:-17px;left:calc(50% - 5px);font-size:13px}.in-battle .energy-orb strong{font-size:18px}.in-battle .energy-orb strong em{font-size:12px;margin:0 1px}.in-battle .energy-orb small{font-size:5px;letter-spacing:0;margin-top:1px}.in-battle .resonance-gauge{width:43px;margin-top:15px;font-size:7px}.in-battle .resonance-gauge b{font-size:10px}.in-battle .resonance-gauge small{display:none}.in-battle .resonance-ticks{gap:2px}.in-battle .resonance-ticks i{height:3px}.in-battle .draw-stack{top:calc(100% + 23px);left:3px;transform:rotate(-7deg);padding:0;min-width:0}.in-battle .deck-stack .deck-back{width:27px;height:35px;font-size:20px}.in-battle .deck-stack b{right:-10px;bottom:8px;min-width:20px;height:20px;font-size:11px}.in-battle .deck-stack small{font-size:6px;margin-top:8px}.in-battle .turn-controls{right:12px;bottom:-48px;width:auto;display:block;padding:0}.in-battle .end-turn{width:116px;height:41px;min-width:0;font-size:12px;padding:5px 10px;letter-spacing:2px}.in-battle .end-turn span{font-size:7px;margin-top:3px}.in-battle .end-shortcut,.in-battle .turn-control-note{display:none}.in-battle .right-piles{position:absolute;right:calc(100% + 16px);top:10px;gap:10px;display:flex;align-items:center;white-space:nowrap}.in-battle .right-piles .deck-stack{display:flex;gap:4px;align-items:center;padding:0}.in-battle .right-piles .deck-back{width:16px;height:23px;font-size:14px;box-shadow:2px 2px 0 #615467}.in-battle .right-piles .deck-stack b,.in-battle .right-piles .deck-stack small{position:static;background:none;border:0;font-size:8px;width:auto;min-width:0;height:auto;margin:0}.in-battle .exhaust-stack{flex-direction:row;gap:3px;padding:0;font-size:8px}.in-battle .exhaust-stack>span{font-size:14px}.in-battle .exhaust-stack small{font-size:7px}.battle-dialogue{left:12px;right:12px;bottom:11px;height:43px;gap:9px}.dialogue-portrait{flex-basis:21%;background-position:77% 13%;background-size:165% auto}.dialogue-copy b{font-size:8px;letter-spacing:1px;margin-bottom:4px}.dialogue-copy>span{font-size:10px;letter-spacing:0;line-height:1.3}.battle-dialogue>i{font-size:16px;margin:0 9px 5px 0}.in-battle .combat-bottomline{display:none}.in-battle .stage-announcement{top:27%;left:30%;right:6%;font-size:16px;letter-spacing:2px}.in-battle .stage-announcement small{font-size:7px}.in-battle .preview-damage{font-size:18px}}
/* Keep the intent stack below the HUD and leave room around the outermost cards. */
.in-battle .enemy-line{bottom:calc(var(--tray-h) + var(--dialog-h) - 28px)}
.in-battle .hud-portrait{background-position:71% 10%;background-size:340% auto}
.in-battle .dialogue-portrait{background-position:72% 12%;background-size:225% auto}
.in-battle .enemy .intent{min-width:0}.in-battle .enemy .actor-caption{min-height:0}
@media(min-width:701px) and (max-aspect-ratio:4/5){.in-battle .fan-hand{--step:min(140px,calc((100vw - 390px)/max(1,var(--cards) - 1)))!important}.in-battle .enemy-line{bottom:calc(var(--tray-h) + var(--dialog-h) + 130px)}.in-battle .field-title{top:21%;right:30px}.in-battle .turn-indicator{top:28%;right:30px}}
@media(min-width:701px) and (max-height:800px){.in-battle .enemy-line{bottom:calc(var(--tray-h) + var(--dialog-h) - 38px)}.in-battle .field-title{top:12px;right:25px}.in-battle .field-title h1{display:none}.in-battle .turn-indicator{top:39px;right:25px}.in-battle .enemy .actor-figure,.in-battle .enemy.boss .actor-figure{height:125px}.in-battle .right-piles{top:calc(100% + 15px)}.in-battle .right-piles .deck-stack small{display:none}}
@media(max-width:700px){.in-battle .enemy-line{bottom:calc(var(--tray-h) + var(--dialog-h) + 91px)}.in-battle .hud-values .potion-hud{font-size:15px!important;padding:0!important}.in-battle .dialogue-portrait{background-size:235% auto;background-position:72% 12%}}
.in-battle .hero-actor .hero-sprite{position:absolute;left:-130px;bottom:0;width:auto;height:100%;object-fit:contain;object-position:left bottom}
.in-battle .field-title{top:18px}.in-battle .turn-indicator{left:48%;right:auto;top:23px}
.in-battle .hud-portrait{background-position:72% 12%;background-size:340% auto}
.in-battle .dialogue-portrait{background-position:73% 13%;background-size:225% auto}
@media(min-width:701px) and (max-aspect-ratio:4/5){.in-battle .hero-actor .hero-sprite{left:-250px}.in-battle .field-title{top:13%}.in-battle .turn-indicator{top:18%;right:30px;left:auto}.in-battle .turn-controls{width:156px;right:20px;bottom:-45px}.in-battle .end-turn{width:156px;font-size:17px;height:68px}.in-battle .right-piles{top:calc(100% + 15px)}}
@media(min-width:701px) and (max-height:800px){.in-battle .hero-actor .hero-sprite{left:-80px}.in-battle .turn-indicator{left:48%;right:auto;top:15px}.in-battle .field-title{top:12px}}
@media(max-width:700px){.in-battle .hero-actor .hero-sprite{left:-185px}.in-battle .dialogue-portrait{background-size:235% auto}.in-battle .turn-indicator{left:auto;right:13px;top:86px}.in-battle .field-title{top:21px}}
/* Engraved silver and smoked enamel: the same material language as the sanctuary. */
.in-battle{--ui-silver:#b9abb7;--ui-lit:#ede0e8;--ui-muted:#95899e;--ui-enamel:#17141de8}
.in-battle .ui-icon{display:block;width:30px;height:30px;flex-shrink:0;pointer-events:none;filter:drop-shadow(0 1px 1px #09060d)}
.in-battle button{ -webkit-tap-highlight-color:transparent }
.in-battle button:focus-visible{outline:1px solid #e2cde7;outline-offset:5px}
.in-battle .combat-hud{background:linear-gradient(180deg,#121018c9,#14121a8c 78%,#14121a20);border-bottom-color:#b8a2b029;box-shadow:none}
.in-battle .hud-settings,.in-battle .hud-deck{display:flex;gap:8px;align-items:center;justify-content:center;color:var(--ui-silver)}
.in-battle .hud-settings .ui-icon{width:25px;height:25px}.in-battle .hud-deck .ui-icon{width:25px;height:30px}
.in-battle .hud-values .potion-hud{display:grid;grid-template-columns:22px auto;align-items:center;gap:0 6px;font-size:16px!important;color:var(--ui-silver)!important}
.in-battle .potion-hud .ui-icon{width:24px;height:29px;grid-row:1/3}.in-battle .hud-values .potion-hud small{font-size:7px;letter-spacing:2px}
.in-battle .sanctuary-rail{left:17px;gap:23px;top:128px;padding:10px 4px 20px;isolation:isolate}
.in-battle .sanctuary-rail:before{content:'';position:absolute;z-index:-1;top:0;bottom:0;left:50%;width:1px;background:linear-gradient(transparent,#b4a2b44d 20%,#b4a2b44d 80%,transparent)}
.in-battle .sanctuary-rail button{min-width:48px;min-height:62px;gap:7px;color:#b5a8bb;transition:color .2s;position:relative}
.in-battle .sanctuary-rail i{width:37px;height:37px;background:radial-gradient(#292130ed,#17131b9c 65%,transparent 72%);border-radius:50%;box-shadow:0 0 17px #0e0b164d}
.in-battle .sanctuary-rail i:before{inset:-4px;border:1px solid #9e8b9f78;box-shadow:none;transform:rotate(45deg) scale(.82);border-radius:3px}
.in-battle .sanctuary-rail i:after{content:'';position:absolute;inset:0;border:1px solid #a795af47;border-radius:50%}
.in-battle .sanctuary-rail .ui-icon{width:26px;height:26px;color:#c4b4c9}
.in-battle .sanctuary-rail span{padding:2px 5px;font:10px/1.5 Georgia,'SimSun',serif;letter-spacing:2px;background:radial-gradient(ellipse,#16121dd9,transparent);text-shadow:0 2px 4px #05030a}
.in-battle .sanctuary-rail button:hover{filter:none;color:var(--ui-lit)}
.in-battle .sanctuary-rail button:hover i{box-shadow:0 0 15px #b196c72e}.in-battle .sanctuary-rail button:hover .ui-icon{color:#f0dbea}
.in-battle .hero-abilities{width:438px;left:93px;gap:18px;bottom:calc(var(--tray-h) + var(--dialog-h) - 5px)}
.in-battle .stage-power{height:80px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;text-align:center;gap:5px;padding:0 3px;border:0;border-radius:0;background:none;box-shadow:none;position:relative;color:#e1d5e4;isolation:isolate}
.in-battle .stage-power:before{content:'';position:absolute;left:10%;right:10%;bottom:-4px;height:50px;z-index:-1;background:radial-gradient(ellipse at 50% 62%,#15121deb,transparent 75%);pointer-events:none}
.in-battle .stage-power:after{content:'';position:absolute;left:17%;right:17%;bottom:-5px;height:1px;background:linear-gradient(90deg,transparent,#bca6c06b,transparent);pointer-events:none}
.in-battle .stage-power b{font:12px/1.3 Georgia,'SimSun',serif;letter-spacing:2px;font-weight:400;text-shadow:0 2px 4px #000}
.in-battle .stage-power small{font:8px/1.5 'Microsoft YaHei',sans-serif;color:#b6a7c0;margin-top:4px;letter-spacing:0;white-space:nowrap;text-shadow:0 1px 3px #000}
.in-battle .stage-power .ability-orb{width:40px;height:40px;border:1px solid #b9a3c299;background:radial-gradient(ellipse at 35% 20%,#5e4c6a 0%,#29202fec 52%,#14101ee6 90%);box-shadow:0 0 0 3px #13101bc9,0 0 0 4px #ac96b43d,inset 0 0 9px #d1b4d71a;color:#c9b4d2;overflow:visible}
.in-battle .ability-orb .ui-icon{width:28px;height:28px}
.in-battle .ability-orb:before{content:'';position:absolute;inset:-7px;border:1px solid #bda7bb66;clip-path:polygon(0 0,35% 0,35% 35%,65% 35%,65% 0,100% 0,100% 35%,65% 35%,65% 65%,100% 65%,100% 100%,65% 100%,65% 65%,35% 65%,35% 100%,0 100%,0 65%,35% 65%,35% 35%,0 35%);transform:rotate(45deg);pointer-events:none}
.in-battle .ability-orb i{right:-6px;bottom:-2px;width:16px;height:16px;padding:1px;background:#1a1422;border:1px solid #a895af;font:10px/12px Georgia;color:#e0cfe8;box-shadow:none}
.in-battle .stage-power kbd{right:13px;top:17px;font:8px Georgia;color:#bca6c6;border:0;background:none}
.in-battle .stage-power:disabled{opacity:1;filter:none}.in-battle .stage-power:disabled .ability-orb{filter:saturate(.2);color:#938c9e;background:radial-gradient(#322c3b,#15121b)}
.in-battle .stage-power:disabled b{color:#c7bacd}.in-battle .stage-power:disabled small{color:#ac9bb8;text-shadow:0 1px 3px #000,0 0 6px #000}
.in-battle .stage-power:not(:disabled):hover{transform:translateY(-3px);border:0;box-shadow:none;filter:none}
.in-battle .stage-power:not(:disabled):hover .ability-orb{color:#f3dfff;border-color:#e2c3ee;box-shadow:0 0 0 3px #17121e,0 0 0 4px #c8a6d870,0 0 20px #b087c657}
.in-battle .skill-bloom.bloom-ready .ability-orb{color:#e8cadc;box-shadow:0 0 0 4px #b498b03b,0 0 22px #c190c64d}.in-battle .bloom-ready{animation:none}
.in-battle .hero-passive-note{bottom:-25px;text-align:center;opacity:.85;letter-spacing:1px}.in-battle .hero-passive-note small{font-size:8px;margin-left:8px}
.in-battle .hero-actor .actor-health-row{bottom:calc(var(--tray-h) + var(--dialog-h) + 90px)}
.in-battle .hero-actor .actor-statuses{bottom:calc(var(--tray-h) + var(--dialog-h) + 91px)}
.in-battle .hero-actor .actor-shield,.in-battle .hero-actor .actor-statuses>span{background:linear-gradient(90deg,#18141cba,#18141c35);border:0;border-bottom:1px solid #b3a1b641;color:#c0b3ca;box-shadow:none;padding:4px 7px;text-shadow:0 1px 3px #000}
.in-battle .weave-status{left:108px;width:402px;padding:4px 0;border:0;background:none;text-shadow:0 1px 4px #000;font-size:9px;color:#c5b2d0}
.in-battle .weave-status .weave-detail{font-size:8px;color:#a493b0}.in-battle .weave-status b{font-size:13px}
.in-battle .energy-orb{border:1px solid #c6b1c8;outline-color:#ac99af73;outline-offset:8px;background:radial-gradient(circle at 35% 25%,#796485dd,#3e2e52ed 58%,#191222);box-shadow:0 0 0 4px #16121dc4,0 0 15px #ad88c333,inset 0 0 16px #a489b370}
.in-battle .energy-orb:before{inset:-16px;border-color:#ad98ad6b}.in-battle .energy-orb:after{color:#c7b1c6;text-shadow:none}
.in-battle .resonance-gauge{color:#b8a6c3}.in-battle .resonance-ticks i.filled{background:#c7afd5;box-shadow:0 0 4px #b699cb77}
.in-battle .turn-controls{right:23px;bottom:-76px;width:205px;gap:0;isolation:isolate}
.in-battle .turn-controls:before{content:'';position:absolute;inset:-12px -15px -8px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse,#15111caf,transparent 72%)}
.in-battle .turn-control-note{display:none}
.in-battle .end-turn{position:relative;display:flex;align-items:center;justify-content:center;gap:15px;width:100%;height:78px;min-width:0;padding:12px 22px;background:none;border:0;box-shadow:none;clip-path:none;overflow:visible;color:#d8c7d9;letter-spacing:0;isolation:isolate}
.in-battle .end-turn:hover{background:none;border:0;box-shadow:none;color:#f1e1f1}
.in-battle .turn-frame{position:absolute;inset:0;width:100%;height:100%;z-index:-1;overflow:visible;pointer-events:none;filter:drop-shadow(0 3px 6px #08061080)}
.in-battle .frame-body{fill:#17141ee0;stroke:#bcabb9;stroke-width:1}.in-battle .frame-line{fill:none;stroke:#756477;stroke-width:.65}.in-battle .frame-tracery{fill:none;stroke:#b6a1b2;stroke-width:.8}.in-battle .frame-gem{fill:#4e3d56;stroke:#d0b7cb;stroke-width:.7}
.in-battle .end-turn>.ui-icon{width:37px;height:37px;color:#cbb2cf;opacity:.9;transition:transform .25s}
.in-battle .end-turn:hover>.ui-icon{transform:rotate(12deg)}.in-battle .end-turn:hover .frame-body{fill:#2c2136ee;stroke:#e6cbe4}.in-battle .end-turn:hover .turn-frame{filter:drop-shadow(0 0 9px #b694ce50)}
.in-battle .end-turn:active{transform:translateY(1px)}
.in-battle .end-turn .end-copy{display:block;margin:0;color:inherit;font:inherit;text-align:center}
.in-battle .end-copy b{display:block;font:18px/1.3 Georgia,'SimSun',serif;letter-spacing:3px;font-weight:400;white-space:nowrap}
.in-battle .end-copy small{display:block;font:8px/1.5 Georgia;letter-spacing:2px;color:#a997b4;margin-top:6px}
.in-battle .end-shortcut{margin:2px 0 0;font:7px/1.5 Georgia,'Microsoft YaHei',serif;letter-spacing:1px;color:#96839f}
.in-battle .right-piles{position:static;display:flex;justify-content:center;align-items:center;gap:19px;margin:13px 0 0;padding-top:10px;border-top:1px solid #a18ba32b;width:86%;min-height:40px}
.in-battle .deck-stack .deck-back{background:none;border:0;border-radius:0;box-shadow:none;color:#b5a0c0;width:43px;height:51px;filter:drop-shadow(2px 3px 2px #09051180)}
.in-battle .deck-back .ui-icon{width:100%;height:100%;stroke-width:.8}
.in-battle .deck-stack:hover .deck-back{color:#ead4f0;filter:drop-shadow(0 0 6px #b293cb45)}
.in-battle .deck-stack b{background:#18121fe6;border-color:#a088ac70;font-size:13px;min-width:23px;height:23px;box-shadow:none}
.in-battle .deck-stack small{color:#a694b2;letter-spacing:1px;font-size:8px}
.in-battle .right-piles .deck-stack,.in-battle .exhaust-stack{display:grid;grid-template-columns:27px auto;grid-template-rows:16px 13px;gap:0 6px;align-items:center;padding:0;min-width:0;color:#bdacc8}
.in-battle .right-piles .deck-back,.in-battle .exhaust-stack>span{grid-row:1/3;width:27px;height:31px}
.in-battle .exhaust-stack .ui-icon{width:24px;height:28px;stroke-width:.85}
.in-battle .right-piles .deck-stack b,.in-battle .exhaust-stack b{position:static;display:block;background:none;border:0;min-width:0;height:auto;font:13px Georgia;text-align:left}
.in-battle .right-piles .deck-stack small,.in-battle .exhaust-stack small{font:8px Georgia,'SimSun',serif;position:static;display:block;margin:0;color:#a694b2;letter-spacing:1px;text-align:left}
.in-battle .combat-bottomline{display:none}
.in-battle .battle-dialogue{border-color:#b4a1ad4a;background:linear-gradient(100deg,#211b28b8,#14121bd9);box-shadow:none}
.in-battle .battle-dialogue:after{content:'';position:absolute;inset:4px;border:1px solid #ac94ae21;pointer-events:none}
.in-battle .turn-forecast{background:linear-gradient(90deg,transparent,#17131dc2 30%,#17131d8c);border:0;color:#b5a1c0}
.in-battle dialog{color:#d7cbdc;background:linear-gradient(135deg,#27212cf7,#14121cfb);border:1px solid #a590aa8c;box-shadow:0 20px 90px #06040cc4,inset 0 0 0 5px #201a26,inset 0 0 0 6px #a18aa22c;border-radius:3px}
.in-battle dialog::backdrop{background:#09070f99;backdrop-filter:blur(5px)}
.in-battle .modal-header{border-bottom-color:#b39db333}.in-battle .modal-header h2{color:#dfcfdf;font-family:Georgia,'SimSun',serif;letter-spacing:2px}
.in-battle dialog .button,.in-battle dialog .mini-button{border:1px solid #9c849d80;border-radius:2px;background:linear-gradient(130deg,#393040,#201925);color:#e0cfe3;box-shadow:inset 0 0 0 3px #17121b50;font-family:Georgia,'SimSun',serif;letter-spacing:1px}
.in-battle dialog .button:hover,.in-battle dialog .mini-button:hover{border-color:#d5b7da;background:linear-gradient(130deg,#4b3a54,#291f30)}
.in-battle dialog .button.ghost{background:#1c172199;color:#c0abc9}.in-battle dialog .button.primary{border-color:#d1b4d570;background:linear-gradient(130deg,#53415e,#2d2135)}
@media(max-width:1150px) and (min-width:701px){
 .in-battle .hero-abilities{left:80px;width:412px;gap:13px}.in-battle .weave-status{left:92px;width:380px}
 .in-battle .turn-controls{right:13px;width:170px}.in-battle .end-turn{gap:9px;padding:10px 17px;height:70px}.in-battle .end-copy b{font-size:15px}.in-battle .end-turn>.ui-icon{width:29px;height:29px}
}
@media(min-width:701px) and (max-aspect-ratio:4/5){
 .in-battle .sanctuary-rail{top:143px;gap:29px}
 .in-battle .hero-abilities{left:90px;width:calc(100% - 180px);bottom:calc(var(--tray-h) + var(--dialog-h) + 9px);gap:25px}
 .in-battle .stage-power{height:87px}.in-battle .stage-power b{font-size:14px}.in-battle .stage-power small{font-size:9px}.in-battle .stage-power kbd{right:calc(50% - 42px);top:18px}
 .in-battle .hero-actor .actor-health-row{bottom:calc(var(--tray-h) + var(--dialog-h) + 110px)}.in-battle .hero-actor .actor-statuses{bottom:calc(var(--tray-h) + var(--dialog-h) + 111px)}
 .in-battle .weave-status{left:110px;width:400px;bottom:calc(var(--tray-h) + var(--dialog-h) - 45px)}
 .in-battle .draw-stack{top:calc(100% + 10px)}
 .in-battle .turn-controls{right:18px;width:170px;bottom:-114px}.in-battle .end-turn{height:68px;gap:9px;padding:10px 17px}.in-battle .end-copy b{font-size:15px}.in-battle .end-turn>.ui-icon{width:28px;height:28px}.in-battle .right-piles{margin-top:10px;padding-top:8px;gap:17px}
}
@media(min-width:701px) and (max-height:800px){
 .in-battle .sanctuary-rail{top:94px;gap:12px;padding-top:4px}.in-battle .sanctuary-rail button{min-height:54px}.in-battle .sanctuary-rail i{width:30px;height:30px}.in-battle .sanctuary-rail .ui-icon{width:23px;height:23px}
 .in-battle .hero-abilities{left:84px;width:420px;bottom:calc(var(--tray-h) + var(--dialog-h) - 8px);gap:16px}.in-battle .stage-power{height:67px}.in-battle .stage-power .ability-orb{width:32px;height:32px}.in-battle .ability-orb .ui-icon{width:24px;height:24px}.in-battle .stage-power b{font-size:11px}.in-battle .stage-power small{font-size:7px}.in-battle .stage-power kbd{top:12px;right:17px}
 .in-battle .hero-actor .actor-health-row{bottom:calc(var(--tray-h) + var(--dialog-h) + 66px)}.in-battle .hero-actor .actor-statuses{bottom:calc(var(--tray-h) + var(--dialog-h) + 67px)}
 .in-battle .hero-passive-note{bottom:-21px}.in-battle .weave-status{bottom:calc(var(--tray-h) + var(--dialog-h) - 52px)}
 .in-battle .turn-controls{bottom:-65px;width:180px;right:18px}.in-battle .end-turn{height:64px;padding:9px 18px;gap:10px}.in-battle .end-copy b{font-size:15px}.in-battle .end-turn>.ui-icon{width:29px;height:29px}.in-battle .right-piles{margin-top:7px;padding-top:6px;min-height:33px}
}
@media(max-width:700px){
 .in-battle .hud-settings .ui-icon{width:21px;height:21px}.in-battle .hud-deck{display:none}.in-battle .hud-values .potion-hud{display:flex;font-size:11px!important;gap:2px}.in-battle .potion-hud .ui-icon{width:17px;height:21px}
 .in-battle .sanctuary-rail{left:8px;top:91px;gap:16px;padding:0 2px 8px}.in-battle .sanctuary-rail button{min-width:32px;min-height:52px;gap:6px}.in-battle .sanctuary-rail i{width:27px;height:27px}.in-battle .sanctuary-rail .ui-icon{width:20px;height:20px}.in-battle .sanctuary-rail span{font-size:8px;letter-spacing:1px;padding:1px 3px}
 .in-battle .hero-abilities{left:12px;right:12px;width:auto;gap:7px;bottom:calc(var(--tray-h) + var(--dialog-h) + 11px)}
 .in-battle .stage-power{height:68px;padding:0;gap:5px}.in-battle .stage-power .ability-orb{width:29px;height:29px}.in-battle .ability-orb .ui-icon{width:22px;height:22px}.in-battle .ability-orb:before{inset:-5px}.in-battle .ability-orb i{width:13px;height:13px;font-size:8px;line-height:10px;right:-5px;bottom:-2px}.in-battle .stage-power b{font-size:10px;letter-spacing:1px}.in-battle .stage-power small{font-size:7px;margin-top:3px}.in-battle .stage-power kbd{display:none}
 .in-battle .hero-actor .actor-health-row{bottom:calc(var(--tray-h) + var(--dialog-h) - 43px)}.in-battle .hero-actor .actor-statuses{bottom:calc(var(--tray-h) + var(--dialog-h) - 42px)}
 .in-battle .hero-actor .actor-statuses>span,.in-battle .hero-actor .actor-shield{padding:3px 4px;font-size:8px}
 .in-battle .weave-status{left:13px;width:153px;bottom:calc(var(--tray-h) + var(--dialog-h) - 12px);font-size:8px;padding:3px 0}
 .in-battle .energy-orb{outline-offset:4px}.in-battle .energy-orb:before{inset:-7px}.in-battle .deck-stack .deck-back{width:29px;height:35px}.in-battle .draw-stack{left:2px}.in-battle .deck-stack b{font-size:10px;min-width:18px;height:18px;right:-8px;bottom:11px}
 .in-battle .turn-controls{right:10px;bottom:-49px;width:127px;display:block}.in-battle .end-turn{height:46px;width:127px;padding:7px 15px;gap:6px}.in-battle .end-turn>.ui-icon{width:23px;height:23px}.in-battle .end-copy b{font-size:12px;letter-spacing:1px}.in-battle .end-copy small{font-size:6px;letter-spacing:1px;margin-top:3px}
 .in-battle .right-piles{position:absolute;right:calc(100% + 11px);top:8px;width:124px;min-height:30px;border:0;margin:0;padding:0;gap:15px}.in-battle .right-piles .deck-stack,.in-battle .exhaust-stack{grid-template-columns:20px auto;grid-template-rows:14px 12px;gap:0 3px}.in-battle .right-piles .deck-back,.in-battle .exhaust-stack>span{width:20px;height:27px}.in-battle .exhaust-stack .ui-icon{width:18px;height:24px}.in-battle .right-piles .deck-stack b,.in-battle .exhaust-stack b{font-size:11px}.in-battle .right-piles .deck-stack small,.in-battle .exhaust-stack small{font-size:7px;letter-spacing:0}
}
/* Shared component language from the Luneth UI reference sheet. */
:root{--gold:#c6b8ce;--line:#a595ad45;--panel:#17151e;--ui-bright:#eee2f4;--ui-edge:#ac95b3;--ui-glow:#ba87ff;--ui-paper:#dad3df}
.ui-icon{width:24px;height:24px;vertical-align:middle;flex-shrink:0;pointer-events:none}
button:focus-visible,a:focus-visible{outline:2px solid #d4aeff;outline-offset:4px}
.in-battle .combat-hud{background:linear-gradient(90deg,#111018ed,#14121a9e 60%,#111018ed);box-shadow:inset 0 -4px 0 #09080e55,inset 0 -5px 0 #b8a6c320}
.in-battle .hud-values>span{display:flex;align-items:center;gap:7px;white-space:nowrap}
.in-battle .hud-values .ui-icon{width:23px;height:25px}.in-battle .hud-values .icon-heart{color:#e980a3}.in-battle .hud-values .icon-gem{color:#b294e5}
.in-battle .hud-deck,.in-battle .hud-settings{border-left:1px solid #c1abc329;padding-left:15px}
.in-battle .sanctuary-rail{gap:17px}.in-battle .sanctuary-rail i{border-radius:0;background:radial-gradient(#44304e8c,#16121aa1 63%,transparent 68%);border:0;box-shadow:none}
.in-battle .sanctuary-rail i:before{inset:2px;border-color:#bd9cc497;box-shadow:inset 0 0 0 3px #13101c,inset 0 0 0 4px #b79cc440}
.in-battle .sanctuary-rail i:after{content:'◆';position:absolute;top:-8px;font:7px Georgia;color:#c9abc9}
.in-battle .sanctuary-rail button:is(:hover,:focus-visible,.is-active){color:#f1deff}
.in-battle .sanctuary-rail button:is(:hover,.is-active) i:before{border-color:#d4b2ff;box-shadow:inset 0 0 0 3px #22142f,inset 0 0 0 4px #d1a4ed66,0 0 12px #c393ed88}
.in-battle .intent-main .ui-icon{width:25px;height:28px;stroke-width:1.8}.in-battle .intent-main .icon-sword{color:#f07899}.in-battle .intent-main .icon-shield{color:#bca4f2}
.in-battle .intent-main em .ui-icon{width:14px;height:16px}.in-battle .actor-shield .ui-icon{width:16px;height:18px}
.in-battle .enemy .actor-health{border-bottom:1px solid #e9b3c080}.in-battle .enemy .actor-health>span{background:linear-gradient(90deg,#9e3859,#eb95ad)}
.in-battle .enemy .star-marks{border:1px solid #bba3c85c;background:#17121dbf;box-shadow:inset 0 0 0 2px #09081180;padding:2px 5px}.in-battle .enemy .star-marks .marked{color:#d6b7ff;text-shadow:0 0 7px #b18be2}
.in-battle .end-turn .frame-body{fill:#302139e8;stroke:#dac1ec;stroke-width:1.1}.in-battle .end-turn .frame-line{stroke:#c198e0;stroke-width:1}.in-battle .end-turn .turn-frame{filter:drop-shadow(0 0 4px #af75da60)}
.in-battle .end-turn:hover .turn-frame{filter:drop-shadow(0 0 9px #cb92ff9e)}.in-battle .end-turn:hover .frame-body{fill:#4b3259f2;stroke:#f2d7ff}
.in-battle .end-turn:disabled .turn-frame{filter:none}.in-battle .end-turn:disabled .frame-body{fill:#19141e;stroke:#796782}
.in-battle .right-piles{position:relative;width:94%;padding:8px 12px;margin-top:10px;background:linear-gradient(110deg,#211929ee,#100e17df);border:1px solid #b39abb70;box-shadow:inset 0 0 0 3px #131019,inset 0 0 0 4px #8e789d30;clip-path:polygon(6% 0,94% 0,100% 50%,94% 100%,6% 100%,0 50%);gap:22px}
.in-battle .energy-orb{background:radial-gradient(circle at 37% 27%,#8e69b5e8,#52316deb 58%,#20132f);box-shadow:0 0 0 3px #15101d,0 0 0 5px #9f80b7b0,0 0 18px #b67ffa70,inset 0 0 14px #d7b2ff80;border-color:#e6ccff}
.in-battle .energy-orb:before{border-color:#c3a2bf9e;box-shadow:0 0 0 5px #17111b99,0 0 0 6px #b19b9c59;transform:rotate(45deg);border-radius:20%}
.in-battle .energy-orb.empty{filter:saturate(.35);box-shadow:0 0 0 3px #17121c,0 0 0 5px #705d82}
.card-jewel{position:absolute;right:12px;top:9px;z-index:6;color:#ddd5e2;filter:drop-shadow(0 0 3px #fff5);pointer-events:none}.card-jewel .ui-icon{width:12px;height:17px}
.hand-card[data-rarity="罕见"] .card-jewel{color:#9795f1;filter:drop-shadow(0 0 4px #9893ff)}.hand-card[data-rarity="稀有"] .card-jewel{color:#ce8ef6;filter:drop-shadow(0 0 5px #bb66ff)}
.hand-card[data-rarity="特殊"] .card-jewel{color:#c2abbf}
.card-tracery{position:absolute;inset:3px;z-index:5;border:1px solid #c4a3b57a;border-radius:3px;pointer-events:none;background:linear-gradient(135deg,#e3bdcf 0 1px,transparent 1px) top left/14px 14px no-repeat,linear-gradient(225deg,#e3bdcf 0 1px,transparent 1px) top right/14px 14px no-repeat,linear-gradient(45deg,#e3bdcf 0 1px,transparent 1px) bottom left/14px 14px no-repeat,linear-gradient(315deg,#e3bdcf 0 1px,transparent 1px) bottom right/14px 14px no-repeat}
.card-tracery:before,.card-tracery:after{content:'✧';position:absolute;left:0;right:0;text-align:center;color:#c9aabd;font:14px Georgia;line-height:12px}.card-tracery:before{top:-7px}.card-tracery:after{bottom:-7px}
.in-battle .fan-hand>.hand-card:before{inset:7px;border-color:#d4b6c45a;border-radius:1px;box-shadow:none}.in-battle .fan-hand>.hand-card:after{content:none}
.in-battle .fan-hand>.hand-card:hover:not(:disabled),.in-battle .fan-hand>.hand-card:focus-visible{border-color:#e9cbff;box-shadow:0 0 0 1px #f2dfff,0 0 8px #d7a9ff,0 0 22px #b064ff9e,0 12px 28px #0008}
.in-battle .fan-hand>.neutral-card:hover:not(:disabled){border-color:#f5edff;box-shadow:0 0 0 1px #fff,0 0 14px #dfc9ffab,0 12px 28px #0008}
.in-battle .fan-hand .card-copy h3{border-top:1px solid #ede5ea9e;border-bottom:1px solid #aa94b38a;background:linear-gradient(105deg,#8f8299,#ded6df 24%,#d9d1dc 70%,#95849e);box-shadow:0 2px 6px #09061266}
.in-battle .battle-dialogue{border-color:#bda9be83;box-shadow:inset 0 0 0 3px #14111bcc,0 7px 24px #0003}.in-battle .battle-dialogue:after{border-color:#baa3b734}
/* Menus, rewards and journey screens share the same framed materials. */
body:not(.in-battle){background:#121018;color:#e6dfe9}
body:not(.in-battle)::before{background-image:linear-gradient(#111019c9,#111019ed),url('../assets/battle/sanctuary-background.png');background-size:cover;background-position:center;filter:none}
.topbar{background:linear-gradient(90deg,#15121dee,#121019e8);border-color:#b4a0bb54;box-shadow:inset 0 -4px 0 #08070c70,inset 0 -5px 0 #a793b223}
.button,.mini-button,.event-card-choice{border-radius:2px;border-color:#ad95b466;background:linear-gradient(115deg,#342b3d,#1c1725);box-shadow:inset 0 0 0 3px #15101d90;color:#dcd0e6}
.button.primary,.in-battle dialog .button.primary{color:#2c2135;background:linear-gradient(110deg,#aaa0b4,#e1d9e6 47%,#c0b3cd);border-color:#e1cdea;box-shadow:inset 0 0 0 2px #dcd1e34f}
.button.primary:hover,.in-battle dialog .button.primary:hover{background:linear-gradient(110deg,#c5b0d8,#f1e4fb);color:#271830}
.button.secondary:hover,.mini-button:hover{background:#473450;border-color:#d3b1ed}.button.ghost{border-color:#9c83aa35;background:#15111b88}
dialog,.in-battle dialog{border:1px solid #b09ab8;background:linear-gradient(135deg,#211b2af7,#100e17fc);box-shadow:0 20px 90px #000b,inset 0 0 0 4px #100c18,inset 0 0 0 5px #ab8fb43b;border-radius:2px}
dialog::backdrop{background:#080610b0;backdrop-filter:blur(6px)}.modal-header{border-bottom:1px solid #b9a2c350}.modal-header h2{font-family:var(--serif);letter-spacing:2px}
.modal-header:before{content:'✧';color:#b9a2c3;font-size:26px}.modal-header h2{margin-right:auto}.modal-header .close-button{border:1px solid #a38cb450;line-height:1}
.system-banner{position:relative;padding:27px 24px;margin-bottom:22px;background:linear-gradient(90deg,#17111a,#17111a90,transparent),url('../assets/battle/sanctuary-background.png') center 42%/cover;border:1px solid #ac91b357}
.system-banner b{font:30px var(--serif);letter-spacing:6px}.system-banner small{display:block;font:9px Georgia;letter-spacing:5px;margin-top:8px}.system-banner p{margin:15px 0 0;font-size:11px}
.battle-settings{display:flex;flex-wrap:wrap;gap:10px}.battle-settings>p{width:100%}.battle-settings .button{flex:1 1 40%;margin:0}.battle-settings .button:last-child{flex-basis:100%}
.character-sheet{display:flex;gap:25px;align-items:center;min-height:132px;padding:22px 24px;margin-bottom:18px;background:linear-gradient(90deg,#16121ded,#15121b33),url('../assets/battle/sanctuary-background.png') center/cover;border:1px solid #ae93b565}
.character-sheet .hud-portrait{flex-shrink:0}.character-sheet h3{font:22px var(--serif);margin:0}.character-sheet h3 small{display:block;font:9px Georgia;letter-spacing:4px;margin-top:5px}.character-sheet p{margin:14px 0 0}.character-sheet .ui-icon{width:18px;height:20px}.character-sheet .icon-heart{color:#e98ea9}.character-sheet .icon-gem{color:#bca2e9}
.character-sheet p{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.character-sheet p .ui-icon{display:inline-block}
.equipment-slots{display:grid;gap:12px}.equipment-slot{display:flex;gap:20px;padding:16px;border:1px solid #b196c044;background:linear-gradient(100deg,#30233799,#100d1800);align-items:center}.equipment-slot>.ui-icon{width:38px;height:42px;color:#c9adde}.equipment-slot h3{font:18px var(--serif);margin:4px 0}.equipment-slot small{color:#b299c5;letter-spacing:2px}.equipment-slot p{font-size:12px;margin:7px 0 0}
.run-status{padding:18px 22px;border:1px solid #b199b85c;background:linear-gradient(90deg,#211a29ef,#17121edf);box-shadow:inset 0 0 0 4px #0c0a112e;gap:20px}
.run-status:before{content:'';width:54px;height:54px;flex-shrink:0;border:1px solid #c2aecb;border-radius:50%;background:#21192c url('../assets/battle/luneth-portrait.png') 75% 10%/245% auto;box-shadow:0 0 0 3px #171019,0 0 0 4px #b397b553}.run-status>div:first-child{margin-right:auto}.status-values{color:#cebddc}.status-values .gold-color{color:#bca5ed}
.route-graph{border-radius:2px;border-color:#bea2c26b;background:linear-gradient(90deg,#181020ab,#16101a44),url('../assets/battle/luneth-portrait.png') -120px bottom/70% auto no-repeat,url('../assets/battle/sanctuary-background.png') center/cover;box-shadow:inset 0 0 0 5px #15101b7a,inset 0 0 0 6px #c1a8c028}
.route-graph>svg{left:17%;width:81%}.route-graph line{stroke:#cab3d9;stroke-width:1;stroke-dasharray:3 4;opacity:.55}.route-graph line.active{stroke:#d7a6ff;stroke-width:2;filter:drop-shadow(0 0 4px #bd79ff)}
.map-stop{margin-left:calc(17% - var(--map-node-shift,0%));width:64px;height:64px;display:flex;flex-direction:column;gap:2px;justify-content:center;border:0;background:none!important;border-radius:0;padding:0;box-shadow:none!important;text-align:center}
.map-stop>span{position:relative;display:grid;place-items:center;width:30px;height:30px;color:#d4bfdc}.map-stop>span:before{content:'';position:absolute;inset:3px;transform:rotate(45deg);border:1px solid #b79bbf;background:#241a2c;box-shadow:inset 0 0 0 3px #17111f;z-index:-1}.map-stop .ui-icon{width:19px;height:19px}.map-stop b{font-size:10px;font-weight:400;letter-spacing:1px;text-shadow:0 1px 4px #000}.map-stop small{font-size:8px;color:#c0a8d0;text-shadow:0 1px 4px #000}
.map-stop.available>span:before{border-color:#f0d6ff;background:#67448a;box-shadow:inset 0 0 0 3px #33203f,0 0 5px #f1d2ff,0 0 16px #c186ff}.map-stop.available:hover>span:before{background:#9c6cbc;box-shadow:0 0 14px #dfb7ff}.map-stop.available{color:#f3e5ff}.map-stop:disabled{opacity:.7}.map-stop.visited{color:#bfaad0}.map-stop.visited>span:before{border-color:#a897b4;background:#3d2f48}
.route-graph .ui-icon{position:static;inset:auto}
.map-legend{position:absolute;top:23px;left:19px;display:grid;gap:12px;font:11px var(--serif);color:#cebddb;z-index:2;text-shadow:0 2px 4px #000;pointer-events:none}.map-legend span{display:flex;gap:8px;align-items:center}.map-legend .ui-icon{width:17px;height:20px}.map-legend span:last-child{color:#e797ac}
.route-choice,.relic-option,.camp-option,.potion-inventory,.boss-brief,.expedition-brief>div,.seed-badge{border-radius:2px;border-color:#ad90b85c;background:linear-gradient(120deg,#302536d9,#17121de6);box-shadow:inset 0 0 0 4px #0e0b1540}
.route-choice:hover,.relic-option:hover,.camp-option:hover{border-color:#d7b5ed;background:linear-gradient(120deg,#473052e8,#21162be8)}.route-symbol .ui-icon{width:28px;height:30px}.route-detail .route-choice{border-radius:1px}.seed-badge{white-space:normal;overflow-wrap:anywhere;max-width:320px}
.shop-screen .center-title,.camp-screen>.center-title{padding:30px 20px;background:linear-gradient(90deg,#1c1422f0,#1b13249c,#18121ee8),url('../assets/battle/sanctuary-background.png') center 60%/cover;border:1px solid #ad8bb04f;margin:26px 0}
.shop-item{padding:12px 9px;background:linear-gradient(135deg,#35273b65,#13101bab);border:1px solid #a48bac50;box-shadow:inset 0 0 0 4px #100c172e}.shop-item .hand-card{margin:0 auto}.shop-extras .relic-option{border:1px solid #b198bf5c}.shop-extras .relic-icon{color:#b79fc9}.shop-services{padding-top:15px;border-top:1px solid #a88eb146}
.event-panorama{height:200px;margin-top:26px;border:1px solid #b699c074;box-shadow:inset 0 0 0 5px #16121b80;background:linear-gradient(0deg,#18101de3,transparent 70%),url('../assets/battle/sanctuary-background.png') center 60%/cover}
.event-screen:has(.event-panorama)>.center-title{margin:0;padding:22px 36px;background:#18121eaf;border:1px solid #ad91b448;border-top:0;position:relative}.event-sigil{position:absolute;top:-30px;left:calc(50% - 25px);display:grid;place-items:center;width:50px;height:50px;border:1px solid #b19abd;transform:rotate(45deg);background:#241a2f}.event-sigil .ui-icon{transform:rotate(-45deg);width:25px;height:25px}.event-screen:has(.event-panorama) .eyebrow{margin-top:17px}.event-screen .event-story{text-align:left;color:#d0c1d8}
.event-choices{grid-template-columns:1fr;gap:11px;margin:22px auto;max-width:800px}.event-choices .route-choice{width:100%;max-width:none;min-height:0;padding:15px 30px 15px 46px;border:1px solid #bea3cb75;clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 50%,calc(100% - 14px) 100%,14px 100%,0 50%);position:relative}.event-choices .route-choice:before{content:'✦';position:absolute;left:20px;top:20px;color:#c8abd9;font-size:12px}.event-choices h2{font-size:18px;margin:0 0 6px}.event-choices p{font-size:12px;min-height:0;margin:0}.event-choices .route-enter{position:absolute;right:26px;top:10px;border:0;font-size:10px;margin:0;padding:0;color:#b69cc8}
.in-battle .actor-shield{display:inline-flex;align-items:center;gap:4px}
body:not(.in-battle) .reward-cards .hand-card{height:326px;flex-basis:210px;border-radius:3px;background:#19161f;box-shadow:0 5px 18px #09071188,inset 0 0 0 2px #83738a66;overflow:visible}
body:not(.in-battle) .reward-cards .hand-card.neutral-card{background:#e0dce5}
body:not(.in-battle) .reward-cards .hand-card:after{display:none}
body:not(.in-battle) .reward-cards .card-illustration{inset:7px 7px auto;height:46%;opacity:1;background-size:cover;border-radius:1px;mask-image:none}
body:not(.in-battle) .reward-cards .card-cost{top:-5px;left:-5px;width:34px;height:38px;border-radius:50%;display:grid;place-items:center;font:26px Georgia;padding:0;background:radial-gradient(ellipse at 30% 25%,#ac91c5,#54406d 65%,#201529);color:#f6e8ff;border:1px solid #d3b5e6;box-shadow:0 0 0 2px #201729,0 0 0 3px #b99cc569;z-index:8}
body:not(.in-battle) .reward-cards .card-copy{inset:48% 9px 33px}
body:not(.in-battle) .reward-cards .card-copy h3{font:16px/29px var(--serif);height:30px;margin:0 -8px 24px;padding:0 5px;text-align:center;letter-spacing:1px;background:linear-gradient(105deg,#aaa0b5,#ded6e1 30%,#ded6e1 65%,#a599ad);border-block:1px solid #d9cada;color:#302638}
body:not(.in-battle) .reward-cards .card-copy p{font-size:12px;line-height:1.8;padding:0 8px;color:#e3d9eb;text-shadow:none;margin:0}
body:not(.in-battle) .reward-cards .neutral-card .card-copy p{color:#3d3349}
body:not(.in-battle) .reward-cards .card-type{inset:calc(48% + 34px) 7px auto;height:15px;line-height:15px;padding:0;font-size:8px;text-align:center;letter-spacing:0;border:0;background:none;color:#bcabc8}
body:not(.in-battle) .reward-cards .neutral-card .card-type{color:#6b5d76}
body:not(.in-battle) .reward-cards .card-bottom{inset:auto 11px 12px;height:18px;font-size:10px;line-height:18px;padding:0;text-align:center;border-top:1px solid #9c7fac66;background:none;color:#cfbadd}
body:not(.in-battle) .reward-cards .neutral-card .card-bottom{color:#62506d;border-color:#8d7e9755}
body:not(.in-battle) .reward-cards .hand-card:hover:enabled{border-color:#dcb5f7;box-shadow:0 0 12px #c793ff6b}
@media(min-width:701px){.map-stop{left:calc(17% + var(--node-x) * .81)!important;margin-left:0}}
@media(min-width:701px) and (max-height:800px){.in-battle .sanctuary-rail{gap:3px;top:90px}.in-battle .sanctuary-rail button{min-height:47px;gap:4px}.in-battle .sanctuary-rail i{width:28px;height:28px}.in-battle .right-piles{margin-top:6px;padding:6px 10px;min-height:34px}}
@media(max-width:700px){
 .in-battle .hud-values .ui-icon{width:15px;height:17px}.in-battle .hud-values>span{gap:3px}.in-battle .hud-settings{padding-left:8px}.in-battle .sanctuary-rail{gap:9px}.in-battle .sanctuary-rail button{min-height:47px}.in-battle .intent-main .ui-icon{width:18px;height:20px}.in-battle .actor-shield .ui-icon{width:12px;height:14px}
 .in-battle .right-piles{position:absolute;right:calc(100% + 8px);top:3px;width:124px;min-height:38px;padding:4px 10px;margin:0;gap:11px}.in-battle .energy-orb:before{box-shadow:0 0 0 2px #17111b99,0 0 0 3px #b19b9c59}
 .card-jewel{right:9px;top:7px}.card-jewel .ui-icon{width:9px;height:13px}.card-tracery{inset:3px}.card-tracery:before,.card-tracery:after{font-size:11px}
 .run-status{padding:12px;gap:12px;flex-wrap:wrap}.run-status:before{width:38px;height:38px}.run-status>div:first-child{max-width:calc(100% - 60px)}.run-status .status-values{max-width:none;width:100%;justify-content:space-between;font-size:11px}.run-status .status-values>span:last-child{flex-basis:auto;font-size:9px}
 .route-graph>svg{left:20%;width:77%}.map-stop{left:calc(20% + var(--node-x) * .77)!important;margin-left:0;width:54px;height:55px}.map-stop>span{width:26px;height:26px}.map-stop b{font-size:9px}.map-stop small{font-size:7px}.map-legend{left:9px;top:15px;gap:13px;font-size:9px}.map-legend span{gap:5px}.map-legend .ui-icon{width:13px;height:16px}.route-graph{background-position:center,-70px bottom,center;background-size:auto,90% auto,cover}
 .character-sheet{padding:18px 14px;gap:18px}.character-sheet .hud-portrait{width:54px;height:54px}.character-sheet .hud-portrait:after{inset:-10px;font-size:76px;line-height:73px}.character-sheet h3{font-size:19px}.character-sheet p{font-size:11px}.equipment-slot{padding:12px;gap:12px}.equipment-slot h3{font-size:16px}.equipment-slot p{font-size:11px}.equipment-slot>.ui-icon{width:29px;height:34px}
 .event-panorama{height:150px}.event-screen:has(.event-panorama)>.center-title{padding:20px}.event-choices .route-choice{padding:16px 24px 16px 35px}.event-choices .route-choice:before{left:14px}.event-choices .route-enter{display:none}.event-choices h2{font-size:16px}.shop-screen .center-title,.camp-screen>.center-title{padding:24px 14px}.shop-item{padding:8px 3px}.shop-cards .hand-card{max-width:100%}
 body:not(.in-battle) .reward-cards .hand-card{height:278px;flex-basis:158px}body:not(.in-battle) .reward-cards .card-copy h3{font-size:13px}body:not(.in-battle) .reward-cards .card-copy p{font-size:10px;line-height:1.7;padding:0 4px}body:not(.in-battle) .reward-cards .card-type{font-size:7px}body:not(.in-battle) .reward-cards .card-cost{width:27px;height:32px;font-size:22px}body:not(.in-battle) .reward-cards .card-bottom{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.in-battle *, .drag-card{animation:none!important;transition:none!important}}
/* Two starting disciplines share Luneth's silver-black card frame. */
.build-options{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:22px 0}.build-options .relic-option{text-align:left;position:relative;padding:24px 28px}.build-options .selected{border-color:#d9c3f0;background:linear-gradient(135deg,#30293ee6,#13111bea);box-shadow:inset 0 0 25px #ba98eb12,0 0 16px #ba98eb16}.build-sigil{font-size:32px;color:#d2bcea}.build-options small{color:#c5b7d6}.doom-meter{display:inline-flex;align-items:center;gap:5px;color:#ead8ff;border:1px solid #bda0d480;background:#221b32d9;padding:2px 7px;border-radius:3px;font-size:12px;white-space:nowrap}.doom-meter b{font-size:10px;font-weight:400;color:#d6c3e8}.enemy .actor-statuses{flex-wrap:wrap;justify-content:center;row-gap:3px}.enemy.doom-ready .doom-meter{border-color:#f0d6ff;box-shadow:0 0 12px #c28cf555;color:#fff}.enemy.doom-ready .intent{opacity:.58}.enemy.doom-ready .target-ring{border-color:#d8b5ff;box-shadow:0 0 22px #c697f566}.eclipse-status{border-color:#a88db05e}.eclipse-status>span:first-child{color:#e3caff}
@media(max-width:600px){.build-options{grid-template-columns:1fr;gap:10px}.build-options .relic-option{padding:18px}.doom-meter{font-size:10px;padding:1px 4px}.doom-meter b{font-size:9px}}
