/* Approved painterly skin. Text remains in the DOM; the ad slot never overlays play. */
:root{--banner-height:50px;--ad-space:calc(var(--banner-height) + env(safe-area-inset-bottom,0px));--sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;--serif:var(--sans)}
html,body{height:100%;overflow:hidden}body,body *{font-family:var(--sans)!important;box-sizing:border-box}button{touch-action:manipulation}
#banner-ad-root{position:fixed;z-index:90;inset:auto 0 0;height:var(--ad-space);padding-bottom:env(safe-area-inset-bottom,0px);display:grid;place-items:center;background:#101418;border-top:1px solid #65543b;color:#8b8271;font-size:10px;letter-spacing:2px}
.game-shell{position:relative;height:calc(100dvh - var(--ad-space));min-height:0!important;display:grid;grid-template-rows:60px minmax(0,1fr) 110px!important;overflow:hidden;background:#141b20}
.game-shell>footer{display:none}.topbar{z-index:12;padding:5px 20px;gap:18px;background:linear-gradient(#1b2428f5,#11191ee8);border-bottom:1px solid #81663d;box-shadow:0 3px 16px #0008}.brand{gap:7px;min-width:90px}.brand b{font-size:16px;letter-spacing:1px}.brand small{font-size:7px}.brand-mark{width:30px;height:36px}.run-stats{gap:16px}.top-health{min-width:100px}.topnav{margin-left:auto;gap:8px}.topnav button{min-height:36px}.relic-hotbar{display:flex;gap:3px;max-width:300px;flex:1;min-width:32px;overflow:auto;border:0;background:none;padding:0}.relic-hotbar>span{flex:0 0 34px;width:34px;height:40px}.item-art{display:block;width:100%;height:100%;object-fit:contain}.potion{width:auto!important;height:40px;padding:0!important;border:0!important;display:flex;gap:2px}.potion-hotbar{display:flex;gap:2px}.potion-slot{width:32px;height:38px;display:block;background:url('../assets/batch1/ui/potion-slot.png') center/contain no-repeat}.potion small{font-size:10px;align-self:end}.potion-slot .item-art{padding:3px}.potion.spent{opacity:.65}
.arena{overflow:visible;min-height:0;position:relative}.scene-background{position:absolute;inset:-60px 0 -110px;opacity:1}.replacement-bg{width:100%;height:100%;object-fit:cover;object-position:center 57%}.scene-background .ruins,.scene-haze{display:none}.arena-vignette{opacity:.35}.prototype-badge,.arena>.relic,.battle-tip,.chapter-symbol,.location p{display:none}.location{top:14px;left:20px;text-align:left}.location h1{font-size:16px;margin:3px 0;text-shadow:0 2px 5px #000}.location>span{font-size:9px}.turn-indicator{top:12px;right:22px;transform:none;gap:8px}.turn-indicator b{font-size:13px}.turn-indicator small{font-size:9px}.turn-diamond{width:27px;height:27px;font-size:12px}.arena-bottom{bottom:6px;left:12px;right:12px}.log-button{margin-left:auto;font-size:10px;min-height:28px;padding:3px 8px}
.combatants{position:absolute;inset:50px 7% 16px;display:flex;align-items:flex-end;justify-content:space-between;transform:none!important}.hero-side{position:relative;width:36%;display:flex;justify-content:center;align-items:center;flex-direction:column}.hero{width:clamp(150px,24vw,260px)}.enemy-side{position:relative;width:58%;display:flex;justify-content:center;align-items:flex-end;gap:15px}.enemy{width:clamp(115px,18vw,210px);min-width:0}.enemy.wisp{width:clamp(115px,18vw,210px)}.enemy.warden,.enemy.sovereign{width:clamp(155px,24vw,260px)}.actor{padding:0;background:none;border:0;box-shadow:none}.actor-art{display:block!important;margin:0!important;width:100%;height:auto;filter:drop-shadow(0 8px 7px #0007)}.actor-art:has(>img)>.art-fallback{display:none}.actor-art>img{animation:none}.actor-name{display:block!important;font-size:12px;text-shadow:0 2px 3px #000;margin:0 0 3px}.hp-track{display:block!important;width:100px;height:12px!important;margin:0 auto;border:1px solid #aa764e;background:#1d1819;border-radius:2px}.hp-track>i{background:linear-gradient(#c04a43,#6e2429)}.hp-track>span{font-size:9px;line-height:10px}.actor .statuses{display:flex!important;min-height:20px;justify-content:center;margin-top:4px;gap:3px}.statuses .status{font-size:9px;padding:2px 4px;background:#17252adb;border:1px solid #7b7055}.intention{position:absolute;top:-28px;left:50%;transform:translateX(-50%);height:27px;min-width:45px;padding:3px 7px;background:#121b20c9;border:1px solid #886748;border-radius:5px;font-size:13px}.intent-label{display:none}.intention .icon{width:16px;height:16px}.target-marker{bottom:-9px;top:auto;font-size:8px;min-height:20px}.actor.locked-target{outline:none;box-shadow:none}.actor.locked-target:after{opacity:.35}.character-resource{position:relative;margin:0 auto 8px;font-size:9px;max-width:180px;min-height:22px;padding:3px 6px;background:#14212ac9;border:1px solid #78684e}.advanced-resource:empty{display:none}.portrait-player{display:none!important}
.battle-controls{position:relative;z-index:8;padding:0!important;display:block!important;min-height:0;background:linear-gradient(transparent,#11171c8c);border:0;box-shadow:none;overflow:visible}.battle-controls:before,.battle-controls:after{display:none}.action-hint{position:absolute;top:-20px;left:25%;right:25%;height:20px;font-size:10px;justify-content:center;white-space:nowrap;pointer-events:none}.action-hint .hint-ornament,.portrait-hand-tip,.hand-title{display:none}.action-hint .cancel-select{pointer-events:auto}.energy-area{position:absolute;bottom:12px;left:18px;gap:0;width:70px;z-index:15;display:flex;align-items:center}.energy-orb{width:66px;height:66px;border:0;border-radius:0;background:url('../assets/batch1/ui/energy.png') center/contain no-repeat;box-shadow:none;transform:none}.energy-orb:before,.energy-orb:after{display:none}.energy-orb>span{font-size:27px;color:#fff1ce;text-shadow:0 2px 4px #321706;transform:none}.energy-orb small{font-size:11px}.energy-area>b{font-size:9px;margin-top:-3px}.energy-pips{display:none}.turn-actions{position:absolute;right:14px;bottom:12px;z-index:15;width:125px;padding:0;gap:5px}.end-turn{width:125px;height:47px;min-height:47px;background:url('../assets/batch1/ui/button-gold.png') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;color:#f5e4b7;padding:8px 12px;font-size:13px;text-shadow:0 2px 2px #261604;gap:5px}.end-turn:before,.end-turn:after{display:none}.end-turn .icon{width:15px}.end-key,.exhaust-link{display:none}.piles{gap:9px;display:flex;justify-content:center}.piles button{min-height:28px;padding:2px;font-size:9px;gap:3px}.piles .icon{width:17px;height:19px}.piles b{font-size:12px}
.hand-scroll{position:absolute!important;left:100px;right:155px;top:-190px;bottom:0;width:auto!important;height:auto!important;overflow:hidden!important;pointer-events:none;scrollbar-width:none;padding:0!important;mask-image:none!important}.hand{position:relative!important;width:100%;height:100%;display:block!important;min-width:0!important;margin:0;padding:0!important;gap:0;transform:none!important;pointer-events:none}
.card{--card-frame:url('../assets/batch1/ui/card-attack.png');position:relative;display:block;background:transparent!important;border:0!important;border-radius:0;box-shadow:none!important;padding:0!important;isolation:isolate;color:#30251e}.card.skill{--card-frame:url('../assets/batch1/ui/card-skill.png')}.card.power{--card-frame:url('../assets/batch1/ui/card-power.png')}.card:after{content:"";position:absolute;inset:0;z-index:2;background:var(--card-frame) center/100% 100% no-repeat;pointer-events:none;border:0!important;opacity:1!important}.card:before{display:none}.card-art{position:absolute;left:8%;top:19%;width:84%;height:44%;border:0;margin:0;z-index:1;overflow:hidden}.card-art>img{width:100%;height:100%;object-fit:cover}.card-art:has(>img) .art-fallback{display:none}.card-name{position:absolute;z-index:3;left:19%;right:8%;top:7%;font-size:11px;line-height:1.2;color:#f1d4a4;text-align:center;white-space:normal;letter-spacing:0;text-shadow:0 1px 2px #000}.card-cost{position:absolute;z-index:4;top:4%;left:2%;width:26px;height:29px;background:url('../assets/batch1/ui/energy.png') center/contain no-repeat;border:0;box-shadow:none;line-height:29px;font-size:16px;color:#fff2cb;transform:none}.card-type{position:absolute;z-index:3;left:22%;right:22%;top:61%;height:9%;font-size:8px;display:grid;place-items:center;color:#ead6aa;margin:0;padding:0;border:0}.card-type i{display:none}.card-description{position:absolute;z-index:3;left:10%;right:10%;top:73%;font-size:9px;line-height:1.35;text-align:center;padding:0;color:#36291f}.card-bottom{position:absolute;z-index:3;bottom:6%;left:10%;right:10%;font-size:7px;color:#67503b;text-align:center}.card-key{display:none}
.battle-controls .hand .card{position:absolute!important;pointer-events:auto;width:135px!important;height:184px!important;left:50%!important;top:calc(100% - 103px)!important;margin:0!important;transform-origin:var(--fan-anchor,50%) 100%;transform:translateX(calc(-50% + var(--fan-x,0px))) translateY(var(--fan-y,0px)) rotate(var(--fan-angle,0deg))!important;z-index:calc(10 + var(--order));transition:transform .18s ease,filter .18s ease;touch-action:none}.battle-controls .hand .card:hover{filter:brightness(1.04)}.battle-controls .hand .card.selected,.battle-controls .hand .card.selected:hover,.battle-controls .hand .card.desktop-preview{transform:translateX(calc(-50% + var(--fan-x,0px) + var(--focus-shift,0px))) translateY(-78px) rotate(0deg)!important;z-index:80;filter:drop-shadow(0 0 6px #f6cc7b)}
#overlay-root{bottom:var(--ad-space)}.modal-backdrop,.product-shell{bottom:var(--ad-space)!important}.modal{max-height:calc(100dvh - var(--ad-space) - 24px)!important}.choices .item-art{width:52px;height:52px;margin:0 auto}.deck-grid .card,.reward-cards .card{height:220px;width:170px}.empty-hand{position:absolute;bottom:25px;font-size:11px;left:10%;right:10%}
@media(orientation:portrait){:root{--banner-height:64px}.game-shell{grid-template-rows:100px minmax(0,1fr) 165px!important}.topbar{display:grid!important;grid-template-columns:1fr auto;grid-template-rows:42px 42px;padding:4px 12px;gap:3px 8px}.brand{display:none}.run-stats{grid-column:1;grid-row:1;justify-content:flex-start;gap:12px}.top-health{min-width:98px}.top-health b{font-size:16px}.top-gold{font-size:15px}.potion{position:absolute;right:12px;top:50px}.potion-slot{width:31px}.relic-hotbar{grid-row:2;grid-column:1;max-width:calc(100vw - 126px);align-self:center}.relic-hotbar>span{width:32px;flex-basis:32px;height:37px}.topnav{grid-column:2;grid-row:1;gap:0}.topnav button,.topnav .icon-button{width:30px;padding:4px;min-height:36px}.topnav button>span{display:none}.topnav .icon{width:18px}.scene-background{inset:-100px -60% -165px;}.replacement-bg{object-position:53% center}.location{top:13px;left:14px}.location h1{font-size:14px;max-width:190px}.turn-indicator{right:14px;top:14px}.turn-indicator b{font-size:11px}.turn-indicator small{font-size:8px}.combatants{inset:75px 2px 25px;align-items:flex-end}.hero-side{width:44%;padding-bottom:22px}.hero{width:clamp(140px,44vw,200px)}.enemy-side{width:54%;height:100%;flex-direction:column;justify-content:flex-end;gap:10px;align-items:center}.enemy,.enemy.wisp{width:clamp(115px,36vw,165px)}.enemy.warden,.enemy.sovereign{width:clamp(150px,46vw,210px)}.enemy-side:has(>.actor:nth-child(3)){gap:0}.enemy-side:has(>.actor:nth-child(3))>.actor{width:110px}.enemy .actor-art{max-height:150px}.intention{top:-19px;min-width:40px;height:24px}.actor-name{font-size:10px}.hp-track{width:88px}.actor .statuses{min-height:16px}.target-marker{display:none!important}.character-resource{font-size:8px;max-width:135px}.arena-bottom{bottom:0}.action-hint{top:-10px;left:70px;right:80px;font-size:8px}.hand-scroll{left:4px;right:4px;top:-170px}.battle-controls .hand .card{width:132px!important;height:182px!important;top:calc(100% - 130px)!important}.battle-controls .hand .card.selected,.battle-controls .hand .card.selected:hover{transform:translateX(calc(-50% + var(--fan-x,0px) + var(--focus-shift,0px))) translateY(-48px) rotate(0deg)!important}.energy-area{left:9px;bottom:135px;width:55px}.energy-orb{width:54px;height:54px}.energy-area>b{display:none}.turn-actions{right:8px;bottom:137px;width:108px}.end-turn{width:108px;height:42px;min-height:42px;font-size:12px}.piles{gap:7px}.piles button{font-size:8px;min-height:25px}.piles .icon{width:14px}.piles b{font-size:10px}}
@media(orientation:landscape) and (max-height:550px){.game-shell{grid-template-rows:44px minmax(0,1fr) 72px!important}.topbar{padding:2px 12px;gap:12px}.brand{display:none}.top-health{min-width:90px}.top-health b{font-size:14px}.top-gold{font-size:14px}.topnav button>span{display:none}.topnav button,.topnav .icon-button{width:30px;min-height:32px;padding:5px}.topnav .icon{width:18px}.relic-hotbar>span{width:31px;height:35px;flex-basis:31px}.potion-slot{width:29px;height:33px}.potion{height:33px}.scene-background{inset:-44px 0 -72px}.combatants{inset:30px 12% -5px}.hero{width:155px}.enemy,.enemy.wisp{width:125px}.enemy.warden,.enemy.sovereign{width:170px}.enemy-side{gap:30px}.actor .statuses{min-height:14px}.actor-name{font-size:10px}.intention{top:-14px;height:24px}.location{top:7px;left:12px}.location h1{font-size:12px}.turn-indicator{top:7px;right:15px}.turn-indicator b{font-size:10px}.turn-indicator small{font-size:8px}.character-resource{font-size:8px;margin-bottom:0}.arena-bottom{bottom:-3px}.energy-area{bottom:4px;left:12px}.energy-orb{width:54px;height:54px}.energy-area>b{display:none}.turn-actions{bottom:5px;right:10px}.end-turn{height:39px;min-height:39px}.piles button{min-height:22px}.hand-scroll{left:95px;right:150px;top:-145px}.battle-controls .hand .card{width:120px!important;height:165px!important;top:calc(100% - 83px)!important}.battle-controls .hand .card.selected,.battle-controls .hand .card.selected:hover,.battle-controls .hand .card.desktop-preview{transform:translateX(calc(-50% + var(--fan-x,0px) + var(--focus-shift,0px))) translateY(-78px) rotate(0deg)!important}.action-hint{top:-12px;font-size:8px}}
@media(orientation:portrait) and (max-height:680px){.game-shell{grid-template-rows:90px minmax(0,1fr) 125px!important}.topbar{grid-template-rows:37px 37px}.potion{top:44px}.combatants{inset:48px 0 12px}.hero{width:130px}.enemy,.enemy.wisp{width:95px}.enemy .actor-art{max-height:100px}.enemy-side{gap:4px}.actor-name{font-size:9px}.hp-track{height:10px!important}.statuses .status{font-size:7px}.character-resource{max-width:115px;font-size:7px}.energy-area{bottom:110px}.turn-actions{bottom:103px}.battle-controls .hand .card{top:calc(100% - 112px)!important;width:116px!important;height:159px!important}.location h1{font-size:11px}.turn-indicator{gap:3px}.turn-indicator b{font-size:9px}.turn-diamond{width:20px;height:20px;font-size:9px}}

/* Final interaction and layout constraints. */
.scene-background{width:auto!important;height:auto!important}.topbar{height:100%!important}.top-health{display:flex!important}.run-stats{margin-left:0}.hero-side{flex-shrink:0;height:auto}.enemy-side{display:flex!important}.hand-scroll{margin:0!important}.hand .card{overflow:visible}.actor .art-slot{overflow:visible}.statuses{height:auto}.actor{flex-direction:column;align-items:center}.arena .enemy{max-width:none}.intention strong{font-size:17px}
.combatants{height:auto!important}.piles{flex-direction:row!important;margin-top:3px!important}.battle-controls .hand .card-name{height:auto!important;min-height:0!important;padding:0!important;font-size:11px!important;line-height:1.15!important;display:block!important}.battle-controls .hand .card-art{height:44%!important;margin:0!important}.battle-controls .hand .card-description{display:block!important;min-height:0!important;margin:0!important;padding:0!important;font-size:9px!important;line-height:1.35!important}.battle-controls .hand .card-type{padding:0!important;letter-spacing:0!important}.card-bottom{padding:0!important}.actor.enemy{flex-shrink:0}.scene-background .motes{opacity:.4}.arena:before,.arena:after{display:none!important}
.target-marker,.play-dropzone{display:none}.hero .actor-art{max-height:none}.card-peek{bottom:calc(var(--ad-space) + 14px)!important;top:auto!important}.card-peek .card-art{height:44%!important;margin:0!important}.card-peek .card-description{font-size:11px}.card-peek .card-name{font-size:12px;padding:0;height:auto}.card-peek .card{height:235px}.hand .card.drag-source{transform:translateX(calc(-50% + var(--fan-x,0px) + var(--focus-shift,0px))) translateY(-78px) rotate(0deg)!important}
.hand-scroll{overflow:clip!important}.hero-side>.character-resource{position:absolute;left:50%;bottom:-23px;transform:translateX(-50%);z-index:5;white-space:normal}.status.block{background:url('../assets/batch1/ui/shield.png') center/contain no-repeat;border:0;min-width:25px;min-height:26px;display:grid;place-items:center;padding:3px;color:white}.status.block>.icon{display:none}.log-button,.topnav button{background:url('../assets/batch1/ui/button-dark.png') center/100% 100% no-repeat;border:0}.topnav button{padding:8px}
@media(orientation:landscape){.enemy[data-enemy-id=fr_ash_moth]{transform:translateY(-35px)}.enemy[data-enemy-id=fr_slag_hound]{transform:translateY(8px)}}
.action-hint{font-size:0!important;color:transparent;top:-35px}.action-hint .cancel-select{font-size:10px;color:#e6d2aa;background:#152027e6;padding:5px 10px;border:1px solid #8e7954;border-radius:4px}.battle-controls .hand .card.selected,.battle-controls .hand .card.selected:hover{transform:translateX(calc(-50% + var(--fan-x,0px) + var(--focus-shift,0px))) translateY(-88px) rotate(0deg)!important}
@media(orientation:portrait){.battle-controls .hand .card.selected,.battle-controls .hand .card.selected:hover{transform:translateX(calc(-50% + var(--fan-x,0px) + var(--focus-shift,0px))) translateY(-56px) rotate(0deg)!important}}
@media(orientation:landscape){.hero-side>.character-resource{left:-12px;bottom:35%;transform:none;width:66px;font-size:8px}.hero-side>.advanced-resource{width:95px;max-height:80px;overflow:auto}.hero-side>.advanced-resource>span{display:block}}

.product-root .product-dialog{max-height:calc(100dvh - var(--ad-space) - 24px);margin-top:12px;margin-bottom:calc(var(--ad-space) + 12px)}
/* Preserve usable space for complete enemy formations and short mobile screens. */
.actor .statuses:empty{display:none!important}
.relic-hotbar{scrollbar-width:none}.relic-hotbar::-webkit-scrollbar{display:none}
@media(orientation:portrait){.enemy-side:has(>.actor:nth-child(3)){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-content:end;align-items:end;gap:18px 2px}.enemy-side:has(>.actor:nth-child(3))>.actor{width:100%;max-width:100px}.enemy-side:has(>.actor:nth-child(3)) .actor-art{max-height:110px}}
@media(orientation:landscape){.enemy-side:has(>.actor:nth-child(3)){gap:6px}.enemy-side:has(>.actor:nth-child(3))>.actor{width:calc((100% - 18px)/var(--enemy-count));max-width:125px}.enemy-side:has(>.actor:nth-child(3)) .actor-art{max-height:140px}}
@media(orientation:portrait) and (max-height:680px){.combatants{bottom:50px}.enemy-side{gap:6px}.arena .enemy,.arena .enemy.wisp{width:80px}.arena .enemy:only-child{width:115px}.enemy .actor-art{max-height:75px}.enemy:only-child .actor-art{max-height:125px}.enemy .actor-name{font-size:8px;margin:0 0 2px}.enemy .hp-track{width:68px}.enemy .statuses{min-height:0}.enemy-side:has(>.actor:nth-child(3)) .actor-art{max-height:75px}.enemy .intention{top:-12px;height:20px}.enemy .intention strong{font-size:13px}.enemy .intention .icon{width:12px;height:12px}}
.game-shell{padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.hud-identity{flex:0 0 36px;width:36px;height:42px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px}.hero-mini{display:block;position:relative;width:29px;height:29px;overflow:hidden;border:1px solid #9b7d50;border-radius:50%;background:#20262c}.hero-mini img{position:absolute;width:80px;height:90px;max-width:none;left:-32px;top:-2px}.hud-identity>small{font-size:7px;line-height:9px;color:#ddc6a2;white-space:nowrap}.run-stats{gap:10px}
@media(orientation:portrait){.run-stats{gap:8px}.top-health{min-width:83px}.top-health>.icon{width:16px}.top-health b{font-size:14px}.top-health em{font-size:10px}.top-health-line{left:20px}.topbar{column-gap:4px}}
@media(orientation:landscape) and (max-width:650px){.hud-identity{display:none}.topbar{gap:6px}.run-stats{gap:7px}.top-health{min-width:76px}.potion-slot{width:24px}.relic-hotbar>span{flex-basis:25px;width:25px}.topnav{gap:2px}}
@media(orientation:portrait) and (min-height:681px){.combatants{bottom:60px}.enemy-side{gap:30px}}
@media(orientation:portrait) and (max-height:680px){.enemy-side{gap:18px}.enemy-side:has(>.actor:nth-child(3)){gap:18px 2px}}
@media(orientation:landscape) and (max-height:350px){.combatants{inset:23px 9% 12px}.hero{width:100px}.arena .enemy,.arena .enemy.wisp{width:85px}.arena .enemy.warden,.arena .enemy.sovereign{width:108px}.enemy .actor-art{max-height:100px}.enemy[data-enemy-id=fr_ash_moth],.enemy[data-enemy-id=fr_slag_hound]{transform:none}.actor-name{font-size:8px}.hp-track{width:70px;height:10px!important}.hp-track>span{font-size:8px;line-height:8px}.intention strong{font-size:13px}.intention{height:21px}.hero-side>.character-resource{left:-20px;width:55px;font-size:7px}}
/* Localized pile labels keep the control row at a stable height. */
.turn-actions{display:flex;flex-direction:column;align-items:center;gap:5px}.piles{width:100%;height:28px;min-height:28px;justify-content:space-evenly;align-items:center;gap:2px}.piles button{font-size:8px;min-height:26px;height:26px;padding:0;gap:3px}.piles button>span{display:flex;flex-direction:column;align-items:center;white-space:nowrap;line-height:10px}.piles button b{font-size:10px;line-height:12px;margin:0}.piles .icon{width:14px;height:17px}.portrait-exhaust{display:flex!important}.piles:has(>.portrait-exhaust) .icon{display:none}.piles:has(>.portrait-exhaust) button{max-width:33.333%}.energy-orb>span small{display:block;font-size:9px;line-height:10px;position:static;color:#eedab0}
@media(orientation:portrait) and (max-height:680px){.combatants{bottom:64px}}
