/* v0.4: original horizontal combat stage. Game rules/save format remain v0.3. */
.in-battle{background:#0e0c19}.in-battle .topbar{height:58px;min-height:58px;padding:8px 28px;background:#11101bd9;border-bottom:1px solid #9f84bc30}.in-battle .page-footer{display:none}.in-battle .battle-run{width:100%;max-width:none;padding:0;min-height:calc(100dvh - 58px);display:flex;flex-direction:column;overflow:hidden;background:#0e0c19;color:#eee5f9}.combat-hud{height:54px;display:flex;align-items:center;padding:0 28px;gap:28px;background:linear-gradient(90deg,#171422,#221a30,#15121e);border-bottom:1px solid #b396cc40;z-index:3}.hud-journey{display:flex;align-items:center;gap:12px;font-size:13px;letter-spacing:1px}.hud-diamond{font-size:33px;color:#cfb685}.hud-journey small{display:block;color:#95899e;font-size:10px;letter-spacing:1px;margin-top:3px}.hud-relics{display:flex;gap:7px;flex:1}.hud-relic{width:35px;height:35px;border:1px solid #ae8a625c;transform:rotate(-5deg);background:#342939;border-radius:9px;font-size:20px;color:#ebc89b}.hud-values{display:flex;gap:22px;align-items:center;font-size:16px}.hud-values small{font-size:11px;color:#a995ac}.hud-values button{font-size:11px;background:none;border:0;color:#b5a9be;padding:6px}.battle-field{position:relative;flex:1;min-height:440px;height:calc(100dvh - 429px);isolation:isolate}.scene-backdrop,.scene-vignette,.scene-mist,.scene-particles{position:absolute;inset:0;pointer-events:none}.scene-backdrop{z-index:-4;background:url('../assets/battle/moon-courtyard.png') center 58%/cover}.scene-vignette{z-index:-3;background:linear-gradient(90deg,#0c0b16bf,transparent 38%,#100d1915 75%,#100d1966),linear-gradient(0deg,#100d1f 0%,transparent 30%,#0c0b1644)}.scene-1 .scene-backdrop{filter:hue-rotate(12deg) saturate(.8)}.scene-2 .scene-backdrop{filter:hue-rotate(325deg) saturate(.85)}.scene-mist{z-index:-2;opacity:.35;background:radial-gradient(ellipse at 60% 95%,#cbbbed60,transparent 65%);animation:mist-drift 9s ease-in-out infinite alternate}.scene-particles i{position:absolute;left:calc(11% + var(--i)*7%);top:calc(20% + mod(var(--i),4)*12%);width:3px;height:3px;box-shadow:0 0 8px 2px #e5c5ff;background:#efddff;border-radius:50%;animation:star-drift calc(5s + var(--i)*.4s) ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.7s)}.field-title{position:absolute;top:24px;left:29px;pointer-events:none}.field-title>span{font-size:10px;letter-spacing:3px;color:#c4b1d4}.field-title h1{font-family:Georgia,'SimSun',serif;font-size:23px;letter-spacing:4px;font-weight:400;margin:9px 0;text-shadow:0 2px 10px #000}.turn-indicator{position:absolute;right:31px;top:23px;display:flex;gap:10px;align-items:center;color:#cebbd7;font-size:12px}.turn-indicator>i{font-size:29px;font-style:normal}.turn-indicator b{font-family:Georgia,serif;font-size:29px;margin-left:13px;font-weight:400}.hero-abilities{position:absolute;left:28px;top:115px;width:180px;z-index:7}.ability-heading{display:flex;flex-direction:column;gap:3px;margin:0 0 14px 3px}.ability-heading span{font-size:8px;letter-spacing:3px;color:#b7a2c2}.ability-heading b{font-size:13px;letter-spacing:3px;font-weight:400}.stage-power{width:100%;height:59px;display:flex;align-items:center;text-align:left;gap:10px;margin:0 0 9px;border:1px solid #b495d750;border-radius:7px;background:linear-gradient(110deg,#21152eec,#1a1521c7);box-shadow:0 4px 14px #0003;padding:7px;color:#f0dff9;position:relative;transition:filter .2s,transform .2s}.stage-power:not(:disabled):hover{transform:translateX(4px);border-color:#d5a9ff;box-shadow:0 0 20px #a071d74a}.stage-power:disabled{opacity:.48;filter:saturate(.55)}.stage-power b{font-size:12px;display:block;letter-spacing:1px}.stage-power small{display:block;font-size:9px;margin-top:6px;color:#c3aaca}.stage-power kbd{position:absolute;right:5px;top:4px;font:8px monospace;color:#b8a1c9}.ability-orb{display:grid;place-items:center;flex-shrink:0;width:35px;height:35px;font-size:25px;border-radius:50%;border:1px solid #c4a7e1;background:radial-gradient(circle at 35% 25%,#c9aef4,#604287 50%,#1a122b 80%);box-shadow:0 0 10px #a87af32a;position:relative}.ability-orb i{position:absolute;bottom:-4px;right:-3px;border-radius:50%;width:16px;height:16px;background:#141020;border:1px solid #c6acd9;font:10px Georgia;text-align:center;padding:1px}.skill-domain .ability-orb{background:radial-gradient(circle at 35% 25%,#a7dfeb,#3d617e 50%,#101e33 80%)}.skill-bloom{border-color:#bf995f66}.skill-bloom .ability-orb{background:radial-gradient(circle at 35% 25%,#fff2bd,#b38b4e 50%,#3b2440 80%);border-color:#ecd39f}.bloom-ready{animation:bloom-ready 2s ease-in-out infinite}.hero-passive-note{background:none;border:0;padding:8px 3px;color:#c9b8d5;text-align:left;width:100%;font-size:11px}.hero-passive-note small{display:block;color:#8f809f;font-size:9px;margin-top:5px}.combat-actor{position:absolute;text-align:center;width:220px;bottom:63px;z-index:4}.hero-actor{left:30%;transform:translateX(-50%)}.actor-figure{position:relative;width:100%;height:252px;display:flex;align-items:flex-end;justify-content:center;isolation:isolate}.actor-sprite{position:relative;max-width:none;width:275px;height:275px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 8px 5px #0009);transform-origin:50% 95%;animation:actor-breathe 4s ease-in-out infinite}.ground-shadow{position:absolute;bottom:0;width:85%;height:22px;left:7.5%;border-radius:50%;background:#080512a6;filter:blur(5px);z-index:-2}.hero-sigil{position:absolute;bottom:-5px;left:0;width:100%;height:30px;z-index:-1;border:1px solid #c7a7f6aa;border-radius:50%;box-shadow:0 0 16px #a277d33d,inset 0 0 14px #ba83ef33}.hero-sigil i{position:absolute;inset:5px;border:1px dashed #d7b6ff88;border-radius:50%}.hero-sigil i+i{inset:-7px 12px;border-style:dotted;opacity:.4}.actor-caption{display:flex;align-items:center;justify-content:center;gap:8px;margin:12px 0 8px;text-shadow:0 2px 6px #000}.actor-caption b{font-size:13px;letter-spacing:2px;font-weight:500}.hero-title{font-size:9px;color:#baa7ca}.actor-health-row{display:flex;align-items:center;justify-content:center;gap:5px;height:21px}.actor-health.health-bar{height:18px;position:relative;flex:1;border:1px solid #b9a2a47a;border-radius:4px;background:#190f1bcc;box-shadow:0 2px 5px #0008;overflow:hidden;margin:0}.actor-health>span{position:absolute;inset:0 auto 0 0;background:linear-gradient(#d36e83,#913549);box-shadow:inset 0 1px 1px #f1a6b4;transition:width .25s}.actor-health>b{position:absolute;inset:0;font:11px/16px Georgia,serif;z-index:2;color:#fff4f5;text-shadow:0 1px 2px #000}.actor-shield{color:#d6f1ff;background:#2b536a;border:1px solid #a1cadf8c;border-radius:4px;padding:2px 5px;min-width:34px;font-size:11px;box-shadow:0 0 10px #86cce833}.actor-statuses{display:flex;justify-content:center;gap:5px;margin-top:7px;min-height:19px;flex-wrap:wrap;font-size:10px;color:#cbb9e5}.actor-statuses>span{background:#160f23bd;padding:3px 6px;border:1px solid #b094d32c;border-radius:4px}.actor-statuses .status-muted{color:#9a869e}.star-marks{display:flex;gap:3px;align-items:center}.star-marks i{font-style:normal;color:#655871;font-size:12px}.star-marks i.marked{color:#e8c9ff;text-shadow:0 0 7px #c47bff}.star-marks b{font-size:9px;margin-left:4px}.enemy-line{position:absolute;right:6%;bottom:63px;width:43%;display:flex;align-items:flex-end;justify-content:center;gap:34px}.in-battle .enemy{position:relative;bottom:auto;display:block;padding:0;flex:1;max-width:230px;min-width:0;border:0;border-radius:0;background:none;box-shadow:none;transition:filter .2s;color:#ecdfef}.in-battle .enemy:hover,.in-battle .enemy.targeted{border:0;background:none;box-shadow:none;transform:none}.enemy .actor-figure{height:224px}.enemy .actor-sprite{height:242px;width:252px;animation-delay:-1.7s}.enemy.wisp .actor-sprite{height:234px;width:180px;animation:ghost-float 4s ease-in-out infinite}.enemy.beetle .actor-sprite{height:200px}.enemy.boss{max-width:280px}.enemy.boss .actor-figure{height:256px}.enemy.boss .actor-sprite{height:285px;width:300px}.enemy.boss-stage-1 .actor-sprite{filter:hue-rotate(26deg) drop-shadow(0 0 14px #ae56cb66)}.enemy.boss-stage-2 .actor-sprite{transform:scaleX(-1);animation-name:mirror-breathe;filter:grayscale(.5) hue-rotate(35deg) brightness(.72) drop-shadow(0 0 14px #e56ec966)}.enemy .intent{position:absolute;bottom:calc(100% + 3px);left:50%;transform:translateX(-50%);margin:0;min-height:0;width:max-content;max-width:240px;padding:0;color:#d2c3de;background:none;border:0;line-height:1.4;text-shadow:0 2px 6px #090311}.intent-main{display:flex;align-items:center;justify-content:center;gap:6px;font:bold 25px Georgia,serif;color:#ffb3ac}.intent-main i{font:24px Georgia;color:#f5aea5}.intent-main em{font:13px Georgia;color:#b7d7ef;margin-left:8px}.intent small{display:block;font-size:10px;margin-top:5px}.intent .intent-special{display:block;background:#21152ddb;border:1px solid #a170b052;border-radius:4px;padding:2px 7px;font-size:9px;color:#e6b4e7;margin-top:4px}.intent.danger .intent-main{color:#ff8b8e}.target-ring{position:absolute;left:5%;bottom:-4px;height:26px;width:90%;border-radius:50%;border:1px solid #ccaae833;box-shadow:0 0 12px #b77ceb00;transition:.2s}.targeted .target-ring,.drag-target .target-ring{border:2px solid #e0b4f3;box-shadow:0 0 15px #c48ae366,inset 0 0 16px #c797df22}.target-chevron{position:absolute;bottom:0;left:calc(50% - 8px);font-size:29px;color:#ead4ff;opacity:0;text-shadow:0 0 8px #cf82ff}.targeted .target-chevron{opacity:1}.enemy .target-label{display:block;position:absolute;top:calc(100% + 4px);left:0;right:0;font-size:8px;letter-spacing:2px;color:#d4b2e8;opacity:0;margin:0}.targeted .target-label{opacity:.8}.enemy:hover .actor-sprite,.enemy.drag-target .actor-sprite{filter:drop-shadow(0 0 9px #d9b0ff99)}.stage-bottom{position:absolute;bottom:12px;left:28px;right:28px;display:flex;justify-content:space-between;align-items:center;gap:20px}.in-battle .turn-forecast{margin:0;padding:5px 0;border:0;background:none;color:#cfb9d7;font-size:10px;display:flex;gap:14px;white-space:nowrap}.turn-forecast>span{color:#94bcd0}.turn-forecast>b{font-weight:400;color:#b2c7aa}.turn-forecast.forecast-danger>b{color:#eeaea9}.last-action{max-width:42%;border:0;background:none;color:#aa99b9;font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:right;padding:4px}.last-action>span{margin-left:10px;color:#d3bedf}.battle-tray{height:277px;flex-shrink:0;display:grid;grid-template-columns:185px minmax(0,1fr) 198px;gap:14px;position:relative;z-index:8;padding:0 28px;background:linear-gradient(#151021e8,#100c18);border-top:1px solid #b096cf33}.energy-panel{display:flex;align-items:center;flex-direction:column;padding-top:12px;z-index:2}.energy-orb{height:84px;width:84px;display:flex;flex-direction:column;justify-content:center;align-items:center;border:2px solid #d0b5e0;border-radius:50%;outline:1px solid #9873a757;outline-offset:5px;background:radial-gradient(circle at 35% 25%,#d9b5ff,#7a509b 42%,#2d1c44 77%);box-shadow:inset 0 0 15px #f0d6ff55,0 0 25px #a276d43a}.energy-orb strong{font:36px Georgia;line-height:1.15;color:#fff2ff;text-shadow:0 2px 4px #4d2c5e}.energy-orb small{font-size:9px;color:#e0c8f2}.energy-orb.empty{filter:saturate(.4);opacity:.65}.resonance-gauge{width:125px;margin-top:16px;font-size:10px;color:#c7afda}.resonance-gauge>div:first-child{display:flex;justify-content:space-between}.resonance-gauge small{font-size:9px;color:#796b8d}.resonance-ticks{display:flex;gap:3px;margin-top:6px}.resonance-ticks i{height:5px;flex:1;background:#3a2b48;transform:skew(-15deg)}.resonance-ticks .filled{background:#d3a5ff;box-shadow:0 0 5px #c68cfe66}.resonance-ticks .threshold{margin-right:3px}.deck-stack{background:none;border:0;position:relative;color:#e6d1e7;padding:0 14px 16px;min-width:60px}.deck-back{width:40px;height:50px;display:grid;place-items:center;border:1px solid #a992b8;border-radius:4px;background:repeating-linear-gradient(45deg,#392945 0 3px,#302339 3px 6px);outline:1px solid #675270;outline-offset:2px;box-shadow:-3px 3px #6d536d,-5px 5px #241b32;font-size:28px;color:#c0a0d5;transform:rotate(-9deg)}.deck-stack b{position:absolute;left:44px;top:33px;font:14px Georgia;background:#221629;border:1px solid #af8fc8;border-radius:50%;width:22px;height:22px;line-height:20px}.deck-stack small{position:absolute;bottom:0;left:0;right:0;font-size:9px;color:#ad99bc}.draw-stack{margin-top:17px}.hand-center{position:relative;min-width:0}.hand-instructions{height:33px;display:flex;align-items:center;justify-content:center;gap:15px;font-size:10px;color:#c3afd2;white-space:nowrap}.hand-instructions small{color:#806e90;font-size:9px}.in-battle .fan-hand{display:block;position:relative;height:242px;padding:0;margin:0;overflow:visible;gap:0}.fan-hand .hand-card{position:absolute;left:50%;top:5px;margin-left:-88px;width:176px;min-width:176px;height:235px;min-height:235px;padding:0;border:1px solid #a68abd;background:linear-gradient(#4c385b,#21152f);border-radius:10px 10px 7px 7px;box-shadow:0 4px 10px #000b,inset 0 0 0 3px #2e213a;transform:translateX(calc(var(--shift)*var(--step))) translateY(var(--rise)) rotate(var(--tilt));transform-origin:50% 110%;transition:transform .2s,box-shadow .2s,filter .2s;z-index:calc(10 + var(--order));text-align:left;touch-action:pan-x;user-select:none}.fan-hand .hand-card:hover,.fan-hand .hand-card:focus-visible{z-index:40;transform:translateX(calc(var(--shift)*var(--step))) translateY(-35px) rotate(0deg) scale(1.08);box-shadow:0 0 0 1px #e3c9f7,0 0 30px #a275c660,0 15px 30px #000a;filter:none}.fan-hand .hand-card:disabled{opacity:1;filter:saturate(.32) brightness(.68);cursor:not-allowed}.fan-hand .hand-card:disabled:hover{filter:saturate(.4) brightness(.88)}.fan-hand .hand-card.equipment{border-color:#c7a76f;background:linear-gradient(#6b5539,#2b2330)}.fan-hand .hand-card.swap-selected{box-shadow:0 0 0 3px #ddbced,0 0 25px #d3a3ff88;transform:translateX(calc(var(--shift)*var(--step))) translateY(-22px) rotate(0deg)}.fan-hand .card-illustration{height:109px;position:relative;margin:5px 5px 0;border-radius:6px 6px 0 0;background-position:50% 36%;background-size:cover;opacity:.95;inset:auto}.fan-hand .card-illustration:after{content:'';position:absolute;inset:60% 0 0;background:linear-gradient(transparent,#2b1d37)}.fan-hand .card-cost{position:absolute;top:5px;left:5px;display:grid;place-items:center;width:31px;height:35px;border-radius:50%;background:radial-gradient(circle at 30% 20%,#d9b2fa,#61398d 60%,#26153c);border:1px solid #efcdff;box-shadow:0 1px 6px #000a;font:bold 21px Georgia;color:#fff0ff}.fan-hand .card-type{position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;text-align:center;font-size:8px;letter-spacing:1px;color:#bea4cb;margin-top:-2px;padding:2px 0;background:#2b1d35;border-top:1px solid #9e77b045;border-bottom:1px solid #9e77b045}.fan-hand .card-copy{position:relative;inset:auto;padding:7px 12px;min-height:83px;background:linear-gradient(#e5d8e7,#c9bace);color:#392b42;margin:0 5px}.fan-hand .card-copy h3{font-family:Georgia,'SimSun',serif;font-size:15px;line-height:1.25;letter-spacing:1px;margin:0 0 5px;color:#382642}.fan-hand .card-copy p{font-size:10px;line-height:1.55;color:#49374e;margin:0}.fan-hand .card-bottom{position:absolute;left:6px;right:6px;bottom:5px;padding:3px 0;font-size:8px;letter-spacing:2px;text-align:center;color:#baa0ca;background:none;border:0}.card-hotkey{position:absolute;right:11px;top:11px;font:9px monospace;color:#e2cfe9;background:#1710219c;padding:2px 4px;border:1px solid #c8a9df4a;border-radius:3px}.turn-controls{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:34px;z-index:2}.turn-control-note{font-size:9px;color:#9f8aad;margin-bottom:9px}.in-battle .end-turn{min-width:165px;padding:15px 18px;border:1px solid #c19aaf;background:linear-gradient(#765269,#432b40);border-radius:6px;box-shadow:inset 0 0 0 3px #392036,0 4px 13px #0005;color:#f4deec;font-size:14px;letter-spacing:2px;white-space:nowrap}.end-turn span{margin-left:13px;color:#dbb5ca}.end-turn:hover{filter:brightness(1.2)}.end-shortcut{font-size:8px;color:#88718e;margin-top:8px}.right-piles{display:flex;align-items:center;gap:20px;margin-top:24px}.exhaust-stack{position:relative;background:none;border:0;color:#917e9e;display:flex;flex-direction:column;align-items:center;font-size:11px;gap:3px;padding:0}.exhaust-stack>span{font-size:25px}.exhaust-stack b{font:12px Georgia}.exhaust-stack small{font-size:9px}.combat-bottomline{height:25px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;color:#776780;font-size:9px;letter-spacing:1px;z-index:9;background:#100d17;border-top:1px solid #93729f25}.empty-hand{text-align:center;padding:70px 0;color:#9783a9;font-size:14px}.empty-hand small{font-size:11px;display:block;margin-top:8px}.shield-aura{position:absolute;inset:20px -8px -2px;border-radius:50%;background:radial-gradient(ellipse,transparent 55%,#a8cfff2a 65%,transparent 70%);border:1px solid #a8cfff00;opacity:0;pointer-events:none}.has-block .shield-aura{opacity:1;border-color:#b6e5ff36}.domain-glyph{position:absolute;left:48%;top:43%;transform:translate(-50%,-50%);font:240px Georgia;color:#c69ef611;opacity:0;pointer-events:none;text-shadow:0 0 55px #ab7bff}.domain-active .domain-glyph{opacity:1}.domain-active .hero-sigil{box-shadow:0 0 26px #b590ff88;border-color:#e3c0ff}.bloom-active .hero-sprite{filter:drop-shadow(0 0 16px #ffe0aa99)}.bloom-active .scene-vignette{background:radial-gradient(ellipse at 30% 60%,#bc91ed30,transparent 60%),linear-gradient(0deg,#160e20,transparent 35%)}.aim-overlay{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:30}.aim-path{fill:none;stroke:#eed2ff;stroke-width:2;stroke-dasharray:7 6;filter:drop-shadow(0 0 4px #b682ff)}.preview-damage{position:absolute;top:35%;left:0;right:0;font:bold 22px Georgia;color:#ffe3d8;text-shadow:0 2px 6px #000;pointer-events:none}.preview-damage:empty{display:none}.damage-preview-bar{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(-45deg,#ffdfa9 0 3px,#c7865e 3px 6px);opacity:.85}.stage-announcement{position:absolute;left:50%;top:30%;transform:translate(-50%,-50%);color:#f2ddff;font-family:Georgia,'SimSun',serif;font-size:26px;letter-spacing:6px;z-index:40;pointer-events:none;text-shadow:0 2px 18px #000,0 0 24px #aa79d3;text-align:center;width:70%}.stage-announcement small{display:block;font:10px sans-serif;letter-spacing:3px;margin-top:10px;color:#c5abda}.actor-vfx{position:absolute;inset:0;pointer-events:none;z-index:10}.float-number{position:absolute;left:50%;top:28%;font:bold 34px Georgia;color:#ffcdcb;text-shadow:0 2px 3px #371429,0 0 8px #110913;animation:float-hit .8s ease-out forwards;white-space:nowrap;transform:translateX(-50%)}.float-number.shield{color:#b5e4ff;font-size:23px}.float-number.mark{color:#e8c0ff;font-size:23px}.float-number.heal{color:#b8efc7}.actor-cast .actor-sprite{animation:hero-cast .5s ease-out}.actor-hurt .actor-sprite{animation:actor-hurt .5s ease-out}.actor-lunge .actor-sprite{animation:enemy-lunge .6s ease-in-out}.actor-dead{animation:actor-vanish .5s forwards;pointer-events:none}.spell-beam{position:absolute;height:3px;border-radius:50%;transform-origin:left center;background:#efcaff;box-shadow:0 0 14px 4px #ba6fff;z-index:25;pointer-events:none;animation:beam-flash .4s ease-out forwards}.spell-burst{position:absolute;inset:12%;border:2px solid #ecbdff;border-radius:50%;box-shadow:0 0 20px #c682ff,inset 0 0 20px #c682ff;animation:burst .55s ease-out forwards;pointer-events:none;z-index:20}.battle-run[data-busy=true] .hand-card,.battle-run[data-busy=true] .stage-power,.battle-run[data-busy=true] .end-turn{pointer-events:none}.battle-run[data-busy=true] .hand-instructions{opacity:.45}.drag-card{position:fixed!important;left:0!important;top:0!important;margin:0!important;transform:translate(-50%,-65%) rotate(4deg) scale(.82)!important;z-index:1000!important;pointer-events:none!important;width:176px!important;opacity:.93}.drag-source{opacity:.18!important}.drag-target{filter:drop-shadow(0 0 10px #ddb4ff88)}
@keyframes actor-breathe{50%{transform:translateY(-3px) rotate(.5deg)}}@keyframes mirror-breathe{50%{transform:scaleX(-1) translateY(-4px)}}@keyframes ghost-float{50%{transform:translateY(-11px) rotate(-2deg)}}@keyframes mist-drift{to{transform:translateX(15px);opacity:.6}}@keyframes star-drift{to{transform:translate(12px,-40px);opacity:.2}}@keyframes bloom-ready{50%{box-shadow:0 0 20px #cfaa6c44}}@keyframes float-hit{0%{opacity:0;transform:translate(-50%,10px) scale(.7)}25%{opacity:1;transform:translate(-50%,-5px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-65px)}}@keyframes hero-cast{35%{transform:translateX(15px) rotate(4deg);filter:drop-shadow(0 0 20px #e6bdff)}}@keyframes actor-hurt{20%{transform:translateX(12px);filter:brightness(1.8) drop-shadow(0 0 10px #ff87b8)}45%{transform:translateX(-6px)}70%{transform:translateX(4px)}}@keyframes enemy-lunge{40%{transform:translateX(-35px) rotate(-5deg)}}@keyframes actor-vanish{to{opacity:0;filter:blur(10px);transform:translateY(-12px)}}@keyframes beam-flash{0%{opacity:0;scale:.1 1}40%{opacity:1;scale:1 1}100%{opacity:0}}@keyframes burst{from{transform:scale(.2);opacity:1}to{transform:scale(1.4);opacity:0}}
@media(min-width:1600px){.battle-field{min-height:490px}.hero-actor{left:31%}.actor-figure{height:290px}.hero-sprite{width:315px;height:315px}.hero-abilities{left:3%;width:210px;top:135px}.stage-power{height:66px}.stage-power b{font-size:14px}.stage-power small{font-size:10px}.enemy .actor-figure{height:270px}.enemy .actor-sprite{height:285px;width:285px}.enemy.wisp .actor-sprite{height:270px}.battle-tray{height:290px}.fan-hand .hand-card{height:248px}.fan-hand .card-illustration{height:120px}}
@media(max-width:1100px){.in-battle .topbar{padding:8px 18px}.combat-hud{padding:0 18px;gap:15px}.hud-values{gap:13px}.hero-abilities{left:18px;width:148px;top:110px}.stage-power{gap:6px;padding:6px;height:58px}.stage-power b{font-size:11px;letter-spacing:0}.stage-power small{font-size:8px}.ability-orb{width:30px;height:30px;font-size:21px}.hero-actor{left:32%;width:180px}.actor-sprite{width:230px;height:250px}.enemy-line{right:3%;width:43%;gap:23px}.enemy .actor-sprite{width:210px;height:215px}.enemy.wisp .actor-sprite{width:150px;height:206px}.enemy .actor-figure{height:211px}.actor-caption b{font-size:11px;letter-spacing:1px}.hero-title{font-size:8px}.battle-tray{grid-template-columns:135px minmax(0,1fr) 152px;padding:0 12px;gap:4px}.fan-hand{--step:min(112px,calc((100vw - 460px)/max(1,var(--cards) - 1)))!important}.hand-instructions small{display:none}.turn-controls{padding-top:34px}.in-battle .end-turn{min-width:135px;padding:15px 12px;font-size:12px}.stage-bottom{left:18px;right:18px}.last-action{max-width:35%}.hero-abilities .hero-passive-note small{font-size:8px}.hud-values button{font-size:10px}.enemy .intent{max-width:180px}}
@media(max-width:700px){.in-battle .topbar{height:54px;min-height:54px;padding:8px 12px}.in-battle .brand small{display:none}.in-battle .topbar nav{gap:8px}.in-battle .topbar nav button{font-size:10px}.in-battle .topbar nav a,.in-battle .version{display:none}.in-battle .battle-run{min-height:calc(100dvh - 54px)}.combat-hud{height:52px;padding:0 12px;gap:10px}.hud-journey{font-size:11px;gap:5px}.hud-diamond{font-size:23px}.hud-journey small{font-size:8px;letter-spacing:0}.hud-relics{gap:3px;max-width:70px;overflow:hidden}.hud-relic{width:27px;height:27px;min-width:27px;font-size:15px}.hud-values{margin-left:auto;gap:8px;font-size:12px}.hud-values button[data-action=log]{display:none}.hud-values button[data-action=sound]{font-size:0;width:25px}.hud-values button[data-action=sound]:first-letter{font-size:18px}.hud-values small{font-size:8px}.battle-field{min-height:412px;height:412px;flex:none}.field-title{top:15px;left:14px}.field-title>span{font-size:8px;letter-spacing:2px}.field-title h1{font-size:17px;letter-spacing:2px;margin:7px 0}.turn-indicator{right:12px;top:16px;font-size:9px;gap:5px}.turn-indicator>i{display:none}.turn-indicator b{font-size:19px;margin-left:5px}.hero-abilities{left:12px;right:12px;top:auto;bottom:37px;width:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.ability-heading,.hero-passive-note{display:none}.stage-power{margin:0;height:51px;gap:5px;padding:5px;border-radius:5px}.stage-power b{font-size:10px}.stage-power small{font-size:7px;margin-top:5px;white-space:nowrap}.stage-power kbd{display:none}.ability-orb{width:26px;height:26px;font-size:19px}.ability-orb i{width:13px;height:13px;font-size:9px}.combat-actor{bottom:115px}.hero-actor{left:25%;width:133px}.actor-figure{height:150px}.hero-sprite{width:160px;height:175px}.actor-caption{margin:8px 0 5px;gap:4px}.actor-caption b{font-size:11px}.hero-title{display:none}.actor-health-row{height:17px;gap:3px}.actor-health.health-bar{height:15px}.actor-health>b{font-size:9px;line-height:13px}.actor-shield{font-size:9px;min-width:25px;padding:1px 3px}.actor-statuses{font-size:8px;gap:3px;margin-top:4px;min-height:17px}.actor-statuses>span{padding:2px 3px}.star-marks{gap:1px}.star-marks i{font-size:9px}.star-marks b{font-size:7px;margin-left:2px}.enemy-line{right:3%;width:46%;gap:9px;bottom:115px}.in-battle .enemy{width:95px;max-width:133px}.enemy .actor-figure{height:142px}.enemy .actor-sprite{width:122px;height:139px}.enemy.wisp .actor-sprite{width:100px;height:145px}.enemy.beetle .actor-sprite{height:115px}.enemy.boss .actor-figure{height:156px}.enemy.boss .actor-sprite{width:166px;height:170px}.enemy .intent{max-width:130px;bottom:calc(100% + 6px)}.intent-main{font-size:21px;gap:3px}.intent-main i{font-size:19px}.intent small{font-size:8px}.intent .intent-special{font-size:7px;padding:1px 3px}.enemy .actor-caption b{font-size:9px;letter-spacing:0}.target-chevron{font-size:23px}.enemy .target-label{font-size:7px;top:calc(100% + 3px);letter-spacing:1px}.stage-bottom{left:12px;right:12px;bottom:10px}.in-battle .turn-forecast{font-size:8px;gap:9px}.last-action{display:none}.battle-tray{height:auto;min-height:284px;grid-template-columns:70px minmax(0,1fr);gap:0;padding:0 0 0 6px;z-index:8}.energy-panel{padding-top:20px}.energy-orb{width:53px;height:53px;outline-offset:3px}.energy-orb strong{font-size:27px}.energy-orb small{font-size:7px}.resonance-gauge{width:56px;font-size:8px;margin-top:17px}.resonance-gauge small{display:none}.resonance-ticks{gap:2px}.resonance-ticks i{height:4px}.resonance-ticks .threshold{margin-right:1px}.draw-stack{margin-top:22px;transform:scale(.8)}.hand-instructions{height:28px;font-size:9px;justify-content:flex-start;padding-left:10px}.in-battle .fan-hand{display:flex;height:221px;align-items:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden;padding:9px 12px 10px 7px;scrollbar-width:thin;scrollbar-color:#72568d #1c1427}.fan-hand .hand-card{position:relative;left:auto;top:auto;flex:0 0 143px;width:143px;min-width:143px;height:202px;min-height:202px;margin:0;transform:none!important;border-radius:7px}.fan-hand .hand-card:hover,.fan-hand .hand-card:focus-visible{transform:none!important}.fan-hand .card-illustration{height:82px}.fan-hand .card-copy{padding:6px 8px;min-height:80px}.fan-hand .card-copy h3{font-size:13px;margin-bottom:4px}.fan-hand .card-copy p{font-size:9px;line-height:1.5}.fan-hand .card-type{font-size:7px}.fan-hand .card-bottom{font-size:7px;bottom:4px}.fan-hand .card-cost{font-size:19px;width:28px;height:30px}.turn-controls{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center;padding:5px 12px 9px}.turn-control-note,.end-shortcut{display:none}.in-battle .end-turn{min-width:122px;padding:9px 12px;font-size:11px;order:2}.right-piles{margin:0;gap:10px;order:1}.right-piles .deck-stack{padding:0;display:flex;gap:7px;align-items:center;min-width:0}.right-piles .deck-back{width:21px;height:27px;font-size:16px}.right-piles .deck-stack b,.right-piles .deck-stack small{position:static;width:auto;height:auto;border:0;background:none;font-size:9px}.exhaust-stack{flex-direction:row;gap:5px}.exhaust-stack>span{font-size:20px}.exhaust-stack small{font-size:9px}.combat-bottomline{height:24px;padding:0 12px;font-size:7px;letter-spacing:0}.combat-bottomline>span:first-child{max-width:55%}.stage-announcement{font-size:20px;letter-spacing:3px;top:38%}.domain-glyph{font-size:150px}.preview-damage{font-size:17px}.float-number{font-size:27px}.empty-hand{padding:60px 12px;font-size:11px}}
.in-battle .fan-hand>.hand-card{margin-left:-88px;margin-right:0}.in-battle .fan-hand .card-copy{top:auto;left:auto;right:auto}.in-battle .fan-hand .card-bottom{background:#2b1c36;color:#dec4ee;height:19px;line-height:13px}.in-battle .fan-hand .card-illustration{flex:none}.in-battle .battle-tray{height:292px}.in-battle .battle-field{height:calc(100dvh - 444px)}
@media(max-width:700px){.in-battle .fan-hand{justify-content:flex-start;min-height:0}.in-battle .fan-hand>.hand-card{margin:0!important}.in-battle .fan-hand .card-copy{min-height:77px}.in-battle .battle-tray{height:auto}.in-battle .battle-field{height:412px}.hero-sprite{height:158px;width:160px}}
.in-battle .fan-hand .card-illustration{position:absolute;top:5px;left:5px;right:5px;height:100px;margin:0}.in-battle .fan-hand .card-type{position:absolute;top:105px;left:5px;right:5px;height:16px;margin:0;padding:2px 0;line-height:12px}.in-battle .fan-hand .card-copy{position:absolute;top:121px;left:5px;right:5px;bottom:25px;margin:0;min-height:0;padding:7px 10px}.in-battle .fan-hand .card-copy p{font-size:10px;line-height:1.45}.in-battle .fan-hand>.hand-card{height:254px;min-height:254px}.in-battle .battle-tray{height:310px}.in-battle .battle-field{height:calc(100dvh - 447px);min-height:410px}
@media(max-width:700px){.in-battle .fan-hand>.hand-card{height:222px;min-height:222px}.in-battle .fan-hand{height:244px}.in-battle .fan-hand .card-illustration{height:80px}.in-battle .fan-hand .card-type{top:85px;height:15px;line-height:11px}.in-battle .fan-hand .card-copy{top:100px;bottom:25px;padding:6px 8px}.in-battle .fan-hand .card-copy p{font-size:9px;line-height:1.45}.in-battle .battle-tray{height:auto}.in-battle .battle-field{height:412px;min-height:412px}}
.enemy.boss .actor-figure{height:215px}.enemy.boss .actor-sprite{height:228px;width:260px}.in-battle .fan-hand .card-copy p{font-size:11px;line-height:1.5}.in-battle .hero-abilities .stage-power:not(:disabled) small{color:#d0b9dc}
@media(min-width:1600px){.enemy.boss .actor-figure{height:270px}.enemy.boss .actor-sprite{height:280px;width:300px}}
@media(max-width:700px){.in-battle .topbar{flex-direction:row;align-items:center;gap:10px}.in-battle .topbar nav{width:auto;flex:1;flex-wrap:nowrap;justify-content:flex-end;gap:10px}.in-battle .topbar nav button{white-space:nowrap;font-size:10px}.in-battle .topbar nav button[data-action=stats]{display:none}.in-battle .topbar .brand{font-size:17px;gap:8px}.in-battle .topbar .brand-sigil{font-size:25px}.in-battle .topbar nav em{display:none}.in-battle .fan-hand .card-copy p{font-size:9px;line-height:1.45}.enemy.boss .actor-figure{height:144px}.enemy.boss .actor-sprite{height:153px;width:158px}}
/* Scene refinement: one uninterrupted viewport backdrop and balanced silhouettes. */
.in-battle{isolation:isolate;background:#110d1d}
.in-battle::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:url('../assets/battle/moon-courtyard.png') center center/cover no-repeat}
.in-battle:has(.scene-1)::before{filter:hue-rotate(12deg) saturate(.8)}
.in-battle:has(.scene-2)::before{filter:hue-rotate(325deg) saturate(.85)}
.in-battle .battle-run{background:transparent}
.in-battle .topbar{background:#11101b94}
.combat-hud{background:linear-gradient(90deg,#17142299,#221a3080,#15121e94)}
.scene-backdrop{display:none}
.scene-vignette{background:linear-gradient(90deg,#0c0b1680,transparent 38%,#100d1910 75%,#100d1940),linear-gradient(0deg,#100d1930,transparent 35%,#0c0b1620)}
.in-battle .battle-tray{background:linear-gradient(#15102130,#100c1880);border-top-color:#b096cf22}
.combat-bottomline{background:#100d1780}
.bloom-active .scene-vignette{background:radial-gradient(ellipse at 30% 60%,#bc91ed30,transparent 60%)}
.hero-actor .hero-sprite{width:210px;height:210px}
.hero-actor .actor-figure{height:230px}
.hero-actor .hero-sigil{left:9%;width:82%}
.actor-sprite{object-position:center bottom}
.enemy-line,.hero-actor{bottom:40px}
.enemy .actor-figure,.enemy.boss .actor-figure{height:255px}
.enemy .actor-sprite{width:290px;height:282px}
.enemy.wisp .actor-sprite{width:218px;height:278px}
.enemy.beetle .actor-sprite{width:290px;height:252px}
.enemy.boss .actor-sprite{width:310px;height:282px}
.in-battle .battle-field{min-height:465px}
@media(min-width:1600px) and (min-height:1000px){
  .hero-actor .hero-sprite{width:240px;height:240px}
  .hero-actor .actor-figure{height:275px}
  .enemy .actor-figure,.enemy.boss .actor-figure{height:300px}
  .enemy .actor-sprite{width:330px;height:325px}
  .enemy.wisp .actor-sprite{width:248px;height:312px}
  .enemy.beetle .actor-sprite{width:330px;height:290px}
  .enemy.boss .actor-sprite{width:350px;height:330px}
}
@media(min-width:701px) and (max-width:1100px){
  .hero-actor .hero-sprite{width:185px;height:185px}
  .enemy .actor-figure,.enemy.boss .actor-figure{height:238px}
  .enemy .actor-sprite{width:245px;height:248px}
  .enemy.wisp .actor-sprite{width:185px;height:244px}
  .enemy.beetle .actor-sprite{width:245px;height:226px}
  .enemy.boss .actor-sprite{width:280px;height:260px}
}
@media(max-width:700px){
  .in-battle::before{background-position:48% center}
  .in-battle .battle-field{min-height:430px;height:430px}
  .hero-actor,.enemy-line{bottom:115px}
  .hero-actor .hero-sprite{width:128px;height:128px}
  .hero-actor .actor-figure{height:155px}
  .enemy .actor-figure,.enemy.boss .actor-figure{height:158px}
  .enemy .actor-sprite{width:142px;height:160px}
  .enemy.wisp .actor-sprite{width:119px;height:169px}
  .enemy.beetle .actor-sprite{width:142px;height:139px}
  .enemy.boss .actor-sprite{width:183px;height:178px}
}
/* v0.5: visible combo progress and four starter builds. */
.setup .relic-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.new-build-tag{display:inline-block;font:10px sans-serif;vertical-align:middle;border:1px solid #bb93d577;border-radius:4px;padding:4px 7px;color:#e4c5fa;background:#4f315861}
.setup-combo-guide{margin:20px 0;padding:16px 20px;border:1px solid #ab86c344;background:#24192d;color:#d3bddf;font-size:12px;line-height:1.9}
.setup-combo-guide b{font-size:15px;color:#edd5ff;letter-spacing:2px}.setup-combo-guide p{margin:7px 0}.setup-combo-guide small{color:#a28bae}
.weave-status{position:absolute;left:48%;top:53%;transform:translate(-50%,-50%);width:186px;padding:13px 12px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:10px;line-height:1.5;color:#e2c6fa;background:linear-gradient(140deg,#20152ccc,#32214499);border:1px solid #b58ac759;border-radius:7px;box-shadow:0 4px 25px #11081c55;z-index:6;pointer-events:none}
.weave-status b{font:20px Georgia;color:#f1ddff;margin:0 3px}.weave-status .weave-detail{width:100%;font-size:9px;color:#bfa1d1}.fan-hand .temporary-card{border-color:#d9b6ff;box-shadow:0 0 10px #bb72ff44}.temporary-card .card-type{color:#efd7ff}
@media(min-width:701px) and (max-width:1100px){.weave-status{left:48%;width:144px;padding:10px 8px;font-size:9px}.weave-status .weave-detail{font-size:8px}}
@media(max-width:700px){.setup .relic-options{grid-template-columns:1fr}.setup-combo-guide{padding:13px 15px;font-size:11px}.weave-status{left:12px;right:12px;top:auto;bottom:93px;width:auto;transform:none;justify-content:center;gap:12px;padding:4px 8px;font-size:8px}.weave-status b{font-size:12px}.weave-status .weave-detail{display:none}}
@media(prefers-reduced-motion:reduce){.battle-run *,.drag-card{animation:none!important;transition:none!important}}
.combat-hud .hud-preparation-back{flex:none;min-width:28px;font-size:28px;line-height:1}
