/* 0.15.9 — the scene and console do not participate in roster folding. */
#battle-root>.spell-panel-battle{--console-height:210px;--formation-safe-top:254px;display:grid;grid-template-rows:minmax(0,1fr) var(--console-height) 34px;position:relative;isolation:isolate;transition:none;overflow:hidden;}
#battle-root>.spell-panel-battle.targets-collapsed{grid-template-rows:minmax(0,1fr) var(--console-height) 34px;}
#battle-root .spell-panel-battle>.battle-top{position:absolute;top:0;left:0;right:0;z-index:20;grid-row:auto;height:auto;min-height:0;padding:8px 9px 7px;overflow:hidden;background:#faf8eb;border:0;border-bottom:1px solid #d3ddc2;border-radius:0 0 18px 18px;box-shadow:0 3px 8px #243c2c12;}
.spell-panel-battle .battle-status{margin-bottom:3px;}
.spell-panel-battle .combat-roster{margin:0;padding:0;border:0;background:none;}
.spell-panel-battle .roster-toggle{height:22px;min-height:22px;padding:1px 3px;font-size:10px;line-height:16px;}
.spell-panel-battle .roster-toggle small{font-size:9px;}
.spell-panel-battle .players-cards,.spell-panel-battle .enemy-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%;margin:0 0 3px;padding:0;overflow:visible;align-items:start;}
.spell-panel-battle .player-compact,.spell-panel-battle .player-compact.player-expanded,.spell-panel-battle .enemy-card,.spell-panel-battle .roster-open .enemy-card{display:flex;flex-direction:column;position:relative;width:100%;height:72px;min-height:72px;max-height:72px;min-width:0;margin:0;padding:3px 3px 0;border:1px solid #c7d3ba;border-radius:9px;background:linear-gradient(135deg,#fffef3,#f2f5e8);box-shadow:inset 0 1px 0 #fff8;overflow:hidden;}
.spell-panel-battle .player-compact.inspected,.spell-panel-battle .enemy-card.selected{border-color:#7d9d70;background:#edf3df;box-shadow:inset 0 0 0 1px #abc39b;}
.spell-panel-battle .player-card-select{display:block;width:100%;height:47px;min-height:47px;padding:0;margin:0;background:none;border:0;border-radius:0;text-align:left;color:inherit;}
.spell-panel-battle .player-card-main{display:grid;grid-template-columns:25px minmax(0,1fr);gap:4px;align-items:stretch;height:47px;min-height:47px;margin:0;}
.spell-panel-battle .player-card-portrait{display:block;position:static;width:25px;height:47px;max-height:47px;border:1px solid #cbd5bc;border-radius:5px;object-fit:cover;object-position:50% 24%;}
.spell-panel-battle .player-card-copy{display:flex;flex-direction:column;gap:2px;min-width:0;margin:0;padding:0;}
.spell-panel-battle .player-card-identity{display:flex;align-items:center;justify-content:space-between;gap:1px;min-width:0;height:12px;min-height:12px;margin:0;padding:0;}
.spell-panel-battle .player-card-identity strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;line-height:11px;}
.spell-panel-battle .roster-ready{position:static;font-size:7px;color:#6c956a;}
.spell-panel-battle .player-card-vitals{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;margin:0;padding:3px 0 0;border-top:1px solid #d9e2cd;}
.spell-panel-battle .roster-meter{display:grid;grid-template-columns:9px minmax(0,1fr);grid-template-rows:9px 2px;gap:1px 1px;min-height:12px;margin:0;padding:0;}
.spell-panel-battle .roster-meter-label{display:grid;place-items:center;width:9px;height:9px;}
.spell-panel-battle .roster-meter-label-text{display:none;}
.spell-panel-battle .roster-meter-label .icon,.spell-panel-battle .roster-meter-label .resource-icon{display:block;width:9px;height:9px;font-size:9px;line-height:9px;object-fit:contain;}
.spell-panel-battle .roster-meter strong{min-width:0;font-size:8px;line-height:9px;text-align:right;white-space:nowrap;}
.spell-panel-battle .roster-meter .roster-value-max{display:none;}
.spell-panel-battle .roster-meter i{grid-column:1/-1;height:2px;margin:0;background:#e1e7d4;border-radius:3px;overflow:hidden;}
.spell-panel-battle .roster-meter i b{display:block;height:100%;background:#c7816d;transition:width .35s ease;}
.spell-panel-battle .roster-meter:not(.health) i b{background:#7da8b2;}
.spell-panel-battle .player-card-effects,.spell-panel-battle .enemy-card-effects,.spell-panel-battle .roster-open .enemy-card-effects{display:flex;align-items:center;justify-content:flex-start;gap:3px;height:19px;min-height:19px;max-height:19px;margin:2px -3px 0;padding:1px 4px;border-top:1px solid #d9e2cc;overflow:hidden;}
.spell-panel-battle .player-card-effects .combat-effect-icon,.spell-panel-battle .enemy-card-effects .enemy-effect{width:17px;height:16px;min-width:17px;min-height:16px;margin:0;padding:1px;gap:1px;border-radius:4px;font-size:7px;}
.spell-panel-battle .player-card-effects .combat-effect-icon img,.spell-panel-battle .enemy-card-effects .enemy-effect img{width:13px;height:13px;}
.spell-panel-battle .enemy-effect .icon{font-size:11px;line-height:12px;}
.spell-panel-battle .enemy-card-select{flex:none;display:block;height:47px;min-height:47px;padding:0;margin:0;border:0;background:none;color:inherit;}
.spell-panel-battle .enemy-card-main{display:grid;position:relative;grid-template-columns:10px 22px minmax(0,1fr);grid-template-rows:24px 12px 3px;gap:2px 2px;height:47px;min-height:47px;padding:0;align-items:center;}
.spell-panel-battle .enemy-number{grid-column:1;grid-row:1;position:static;display:grid;place-items:center;width:10px;height:17px;min-width:10px;margin:0;padding:0;border-radius:4px;font-size:8px;line-height:12px;}
.spell-panel-battle .enemy-card-main>img{grid-column:2;grid-row:1;width:22px;height:24px;object-fit:contain;}
.spell-panel-battle .enemy-card-main>strong{grid-column:3;grid-row:1;min-width:0;margin:0;padding:0;font-size:8px;line-height:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.spell-panel-battle .enemy-card-main>.enemy-selected-mark{display:none;}
.spell-panel-battle .enemy-hp{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:3px;min-width:0;margin:0;padding:0;font-size:8px;line-height:11px;}
.spell-panel-battle .enemy-hp .icon{display:block;width:10px;font-size:9px;line-height:11px;}
.spell-panel-battle .enemy-hp-value{white-space:nowrap;overflow:visible;max-width:none;text-overflow:clip;}
.spell-panel-battle .enemy-card-main>.progress{grid-column:1/-1;grid-row:3;width:100%;height:3px;margin:0;}
#battle-root .spell-panel-battle>.battle-field{position:relative;grid-row:1;z-index:1;align-self:stretch;width:100%;height:100%;min-height:0;overflow:hidden;isolation:isolate;}
.spell-panel-battle .battle-backdrop{object-position:50% 64%;opacity:1;}
.spell-panel-battle .battle-field:after{z-index:1;pointer-events:none;}
#battle-root .spell-panel-battle .battle-unit{position:absolute;aspect-ratio:auto;min-height:0;min-width:0;padding:0;margin:0;border:0;background:none;overflow:visible;transition:opacity .35s ease;isolation:isolate;touch-action:manipulation;cursor:pointer;color:#355b4c;}
#battle-root .spell-panel-battle .battle-unit .battle-actor{position:absolute;left:0;right:0;top:0;width:100%;height:var(--actor-height);overflow:hidden;transform-origin:50% 100%;pointer-events:none;}
#battle-root .spell-panel-battle .battle-hero-sprite,#battle-root .spell-panel-battle .monster-sprite{position:absolute;top:0;left:50%;width:var(--actor-height);height:var(--actor-height);max-width:none;margin:0;aspect-ratio:auto;transform:translateX(-50%);background-size:600% 100%;background-repeat:no-repeat;pointer-events:none;}
#battle-root .spell-panel-battle [data-role="mage"].battle-hero-sprite,#battle-root[data-hero-class="mage"] .hero-unit .battle-hero-sprite{width:calc(var(--actor-height) * 1.454545);}
#battle-root .spell-panel-battle .monster-sprite{background-size:400% 100%;}
#battle-root .spell-panel-battle .battle-unit .unit-name{display:block;position:absolute;top:var(--actor-height);bottom:auto;left:0;right:0;transform:none;width:100%;max-width:100%;height:14px;margin:0;padding:1px 2px;border:1px solid #dfddbd;border-radius:4px;background:#fffbe9e8;font-size:8px;line-height:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;}
#battle-root .spell-panel-battle .battle-unit .unit-health{display:flex;position:absolute;left:2px;right:2px;top:calc(var(--actor-height) + 16px);bottom:auto;gap:2px;margin:0;pointer-events:none;}
#battle-root .spell-panel-battle .battle-unit .unit-health .progress{width:100%;height:3px;margin:0;}
#battle-root .spell-panel-battle .battle-unit .unit-health small{display:block;max-width:100%;margin:0;padding:0 2px;background:#fffbe9da;border-radius:3px;font-size:7px;line-height:10px;white-space:nowrap;}
#battle-root .spell-panel-battle .monster-unit .unit-health{top:calc(var(--actor-height) + 3px);}
#battle-root .spell-panel-battle .monster-unit .unit-health small{font-size:8px;line-height:13px;}
#battle-root .spell-panel-battle .battle-unit .ground-shadow{bottom:auto;top:calc(var(--actor-height) - 5px);height:6px;left:15%;width:70%;z-index:-1;filter:none;}
#battle-root .spell-panel-battle .battle-unit .target-ring{top:calc(var(--actor-height) - 8px);bottom:auto;left:6%;right:6%;height:10px;border:1.5px solid #699f8e;background:#bde1cf22;box-shadow:0 0 0 1px #fff8;animation:none;transition:opacity .3s ease;}
#battle-root .spell-panel-battle .battle-unit.inspected .ground-shadow{box-shadow:0 0 0 1.5px #599683,0 0 0 3px #fff7;}
#battle-root .spell-panel-battle .monster-unit.selected:after{display:none;}
#battle-root .spell-panel-battle .battle-enemy-number{position:absolute;top:0;left:calc(50% - 8px);right:auto;bottom:auto;display:grid;place-items:center;width:17px;height:18px;min-height:18px;border:1px solid #fff9;border-radius:50%;background:#3c7b6de8;font-size:10px;line-height:14px;pointer-events:none;}
#battle-root .spell-panel-battle .monster-control{position:absolute;left:0;right:0;top:19px;bottom:auto;width:100%;margin:0;padding:1px 2px;font-size:6px;line-height:8px;pointer-events:none;}
#battle-root .spell-panel-battle>.battle-console{grid-row:2;align-self:stretch;position:relative;z-index:22;width:100%;height:var(--console-height);min-height:0;max-height:var(--console-height);padding:8px 10px 9px;margin:0;overflow:visible;border:1px solid #d7ddc5;border-bottom:0;border-radius:18px 18px 0 0;background:#faf8eb;box-shadow:0 -3px 9px #355a3915;}
#battle-root .spell-panel-battle .combat-player{display:flex!important;position:relative;align-items:center;width:100%;height:80px;min-height:80px;margin:0 0 8px;padding:0;gap:9px;}
#battle-root .spell-panel-battle .combat-player>img{position:static;flex:none;width:51px;height:71px;max-height:71px;object-fit:cover;object-position:50% 25%;border:1px solid #cbd4bd;border-radius:9px;}
#battle-root .spell-panel-battle .combat-player>img.enemy-portrait{object-fit:contain;background:#eff2e4;}
#battle-root .spell-panel-battle .combat-player-copy{display:block;flex:1;min-width:0;}
#battle-root .spell-panel-battle .combat-player-name{display:flex;align-items:center;justify-content:flex-start;gap:7px;height:27px;min-height:27px;margin:0 0 5px;padding:0 0 5px;border-bottom:1px solid #d9dfcb;font-size:15px;line-height:19px;}
#battle-root .spell-panel-battle .combat-player-name>span{flex:0 1 auto;min-width:0;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#battle-root .spell-panel-battle .combat-player-name>small{flex:none;margin-left:auto;font-size:9px;line-height:12px;color:#8e977f;}
#battle-root .spell-panel-battle .hero-effects{position:static;display:flex;flex:0 1 auto;gap:4px;align-items:center;min-width:0;height:22px;margin:0;padding:0;overflow:hidden;}
.combat-effect-icon{display:inline-grid;position:relative;place-items:center;flex:none;width:22px;height:22px;min-height:22px;margin:0;padding:2px;border:1px solid #c6d3b8;border-radius:6px;background:#f0f4e5;color:#6f8667;}
.combat-effect-icon img{display:block;width:17px;height:17px;object-fit:contain;}
.combat-effect-icon .icon{font-size:15px;line-height:17px;}
.combat-effect-icon small{position:absolute;right:-1px;bottom:-1px;min-width:10px;padding:0 1px;border-radius:3px;background:#faf9e9;color:#536f5f;font-size:7px;line-height:9px;}
.combat-effect-icon i{position:absolute;right:0;bottom:-1px;font:700 6px/8px sans-serif;color:#a38443;}
.no-effects{font-size:9px;color:#b3bba3;}
#battle-root .spell-panel-battle .combat-vitals{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:0;border:0;}
#battle-root .spell-panel-battle .combat-vitals .vital-row{display:flex;justify-content:space-between;align-items:center;gap:6px;margin:0;font-size:10px;line-height:12px;}
#battle-root .spell-panel-battle .combat-vitals .vital-row>span{display:grid;grid-template-columns:12px auto;align-items:center;gap:5px;font-size:10px;}
#battle-root .spell-panel-battle .combat-vitals .vital-row strong{font-size:11px;line-height:12px;}
#battle-root .spell-panel-battle .combat-vitals .progress{height:3px;margin-top:3px;}
#battle-root .spell-panel-battle .combat-action-panel,#battle-root .spell-panel-battle .combat-action-panel[data-panel="skills"]{position:relative;height:102px;min-height:102px;margin:0;padding:0;overflow:visible;isolation:isolate;}
#battle-root .spell-panel-battle #battle-actions,#battle-root .spell-panel-battle #skills-root{position:absolute!important;inset:0;width:100%;height:102px;min-height:102px;max-height:102px;margin:0;padding:0;overflow:visible;background:#faf8eb;border:0;border-radius:10px;}
#battle-root .spell-panel-battle #battle-actions{display:flex;flex-direction:column;gap:7px;}
#battle-root .spell-panel-battle #skills-root{display:flex;flex-direction:column;gap:0;}
#battle-root .spell-panel-battle #battle-actions[inert],#battle-root .spell-panel-battle #skills-root[inert]{pointer-events:none;z-index:0;}
#battle-root .spell-panel-battle #battle-actions:not([inert]),#battle-root .spell-panel-battle #skills-root:not([inert]){z-index:1;}
#battle-root .spell-panel-battle .battle-log{flex:none;position:relative;height:27px;min-height:27px;overflow:visible;border-radius:8px;}
#battle-root .spell-panel-battle .battle-log-toggle{height:27px;min-height:27px;}
#battle-root .spell-panel-battle .battle-log-content{position:absolute;top:100%;left:-1px;right:-1px;bottom:auto;z-index:4;height:72px;min-height:0;max-height:72px;padding:6px 8px;border:1px solid #cbd5bc;border-top:1px solid #dce3cf;border-radius:0 0 8px 8px;background:#fcfbef;box-shadow:0 3px 5px #3b513d13;overflow:auto;font-size:9px;line-height:1.5;}
#battle-root .spell-panel-battle .battle-buttons{height:68px;min-height:68px;gap:8px;}
#battle-root .spell-panel-battle .battle-console .battle-action{height:68px;min-height:68px;font-size:18px;border-radius:12px;}
#battle-root .spell-panel-battle .battle-action small{font-size:10px;}
#battle-root .spell-panel-battle .combat-panel-head{height:27px;min-height:27px;}
#battle-root .spell-panel-battle .combat-skills-list{height:75px;min-height:75px;padding:5px 1px 4px;gap:8px;}
#battle-root .spell-panel-battle .enemy-effect-popover{position:absolute;top:auto;bottom:calc(100% - 1px);left:auto;right:10px;width:224px;max-width:calc(100% - 20px);max-height:174px;margin:0;padding:8px;border:1px solid #c8d4b9;border-radius:12px;z-index:40;background:#fffdf1;box-shadow:0 5px 18px #294d342a;animation:effect-enter .22s ease-out;}
#battle-root .spell-panel-battle .enemy-effect-popover>header{height:auto;min-height:29px;gap:6px;margin:0;padding:0 0 6px;}
#battle-root .spell-panel-battle .enemy-effect-popover>header>img{width:25px;height:27px;object-fit:contain;}
#battle-root .spell-panel-battle .enemy-effect-popover h3{font-size:11px;line-height:14px;}
#battle-root .spell-panel-battle .enemy-effect-popover h3 small{font-size:8px;line-height:11px;}
#battle-root .spell-panel-battle .enemy-effect-popover .icon-button{width:26px;height:26px;min-height:26px;padding:3px;}
#battle-root .spell-panel-battle .enemy-effect-copy{max-height:112px;margin:0;padding:5px 0 0;overflow:auto;}
#battle-root .spell-panel-battle .enemy-effect-copy p{font-size:10px;line-height:1.45;margin:0 0 5px;}
#battle-root .spell-panel-battle .enemy-effect-copy p:last-child{margin-bottom:0;}
#battle-root .spell-panel-battle .enemy-effect-copy small{font-size:9px;line-height:1.4;margin-top:3px;}
#battle-root .spell-panel-battle>.chat-dock{grid-row:3;height:34px;min-height:34px;z-index:23;}
.battle-test-bot{flex:none;height:31px;min-height:31px;max-width:46px;padding:3px 5px;border:1px solid #cbd4b9;border-radius:8px;background:#eef2e0;color:#697f60;font-size:9px;}
.command-pending{filter:drop-shadow(0 0 4px #dbc68f);}
.attribute-counter{display:inline-grid;position:relative;min-width:2ch;overflow:hidden;vertical-align:bottom;font-variant-numeric:tabular-nums;isolation:isolate;}
.attribute-counter>.counter-old,.attribute-counter>.counter-new{grid-area:1/1;white-space:nowrap;}
.attribute-row.upgraded,.attribute-block.upgraded{animation:none!important;}
@keyframes effect-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:350px){#battle-root .spell-panel-battle .players-cards,#battle-root .spell-panel-battle .enemy-cards{gap:4px;}#battle-root .spell-panel-battle .player-card-main{grid-template-columns:22px minmax(0,1fr);gap:3px;}#battle-root .spell-panel-battle .player-card-portrait{width:22px;}#battle-root .spell-panel-battle .enemy-card-main{grid-template-columns:9px 20px minmax(0,1fr);gap:2px 1px;}#battle-root .spell-panel-battle .enemy-card-main>img{width:20px;}#battle-root .spell-panel-battle .enemy-card-main>strong{font-size:7px;}#battle-root .spell-panel-battle .combat-player-name{gap:5px;font-size:13px;}#battle-root .spell-panel-battle .combat-player-name>small{font-size:8px;}}
@media(max-height:730px){#battle-root>.spell-panel-battle{--console-height:190px;--formation-safe-top:240px;}#battle-root .spell-panel-battle .player-compact,#battle-root .spell-panel-battle .player-compact.player-expanded,#battle-root .spell-panel-battle .enemy-card,#battle-root .spell-panel-battle .roster-open .enemy-card{height:65px;min-height:65px;max-height:65px;}#battle-root .spell-panel-battle .player-card-select,#battle-root .spell-panel-battle .player-card-main,#battle-root .spell-panel-battle .player-card-portrait,#battle-root .spell-panel-battle .enemy-card-select,#battle-root .spell-panel-battle .enemy-card-main{height:42px;min-height:42px;}#battle-root .spell-panel-battle .enemy-card-main{grid-template-rows:21px 10px 3px;}#battle-root .spell-panel-battle .player-card-effects,#battle-root .spell-panel-battle .enemy-card-effects,#battle-root .spell-panel-battle .roster-open .enemy-card-effects{height:17px;min-height:17px;max-height:17px;}#battle-root .spell-panel-battle .combat-player{height:64px;min-height:64px;margin-bottom:4px;}#battle-root .spell-panel-battle .combat-player>img{height:60px;width:43px;}#battle-root .spell-panel-battle .combat-player-name{height:23px;min-height:23px;margin-bottom:3px;padding-bottom:3px;}#battle-root .spell-panel-battle .combat-vitals{gap:3px;}}
@media(prefers-reduced-motion:reduce){.combat-effect-icon,.command-pending,.enemy-effect-popover{animation:none!important;transition:none!important;}}
.reduced-motion .enemy-effect-popover{animation:none!important;}
/* Override the legacy compact-card rule, which used !important. */
#battle-root .spell-panel-battle .enemy-card-effects{display:flex!important;}
#battle-root .spell-panel-battle .player-card-main{max-height:47px;}
#battle-root .spell-panel-battle .player-card-copy{height:47px;}
#battle-root .spell-panel-battle .player-compact{gap:0;max-width:none;}
#battle-root .spell-panel-battle .enemy-card{max-width:none;}
#battle-root .spell-panel-battle .enemy-card .enemy-card-select{height:47px;min-height:47px;border-radius:0;}
#battle-root .spell-panel-battle .enemy-card .enemy-card-main{height:47px;padding:0;}
@media(max-height:730px){#battle-root .spell-panel-battle .player-card-copy{height:42px;}#battle-root .spell-panel-battle .enemy-card .enemy-card-select,#battle-root .spell-panel-battle .enemy-card .enemy-card-main{height:42px;min-height:42px;}}
.admin-test-bots{margin:12px 0;padding:12px;border:1px solid #cad6bc;border-radius:12px;background:#f1f5e8;}
.admin-test-bots h3{margin:0 0 5px;font-size:14px;}.admin-test-bots p{margin:0 0 9px;color:#79856f;font-size:11px;line-height:1.5;}.admin-test-bots>div{display:flex;flex-wrap:wrap;gap:6px;}.admin-test-bots button{flex:1;min-height:34px;padding:6px 8px;font-size:10px;white-space:nowrap;}
#battle-root .spell-panel-battle .hero-effects,#battle-root .spell-panel-battle .combat-effect-icon{pointer-events:auto;}
#battle-root .spell-panel-battle .battle-log-content{top:calc(100% + 2px);}
/* Models that are settling into a new formation cannot redirect an accidental tap. */
#battle-root .spell-panel-battle .battle-unit[data-repositioning]{pointer-events:none;}
/* 0.16.0: visible sprite bounds, grounded selection and independent effect rails. */
#battle-root>.spell-panel-battle{--formation-safe-top:226px;background:#345b4c;}
#battle-root .spell-panel-battle>.battle-field{height:calc(100% + 22px);margin-bottom:-22px;}
#battle-root .spell-panel-battle .battle-backdrop{top:-5%;left:-15%;width:130%;height:130%;max-width:none;object-fit:cover;object-position:50% 50%;filter:saturate(.88) brightness(.97);}
#battle-root .spell-panel-battle .battle-field:after{background:linear-gradient(180deg,#284b3e14,transparent 50%,#25452b0c);}
#battle-root .spell-panel-battle .battle-unit .battle-actor{inset:auto;top:0;left:0;right:0;height:var(--actor-height);overflow:visible;z-index:3;contain:style;}
#battle-root .spell-panel-battle .battle-hero-sprite,#battle-root .spell-panel-battle [data-role="mage"].battle-hero-sprite,#battle-root[data-hero-class="mage"] .hero-unit .battle-hero-sprite,#battle-root .spell-panel-battle .monster-sprite{top:var(--sprite-top);left:50%;width:var(--sprite-width);height:var(--sprite-height);transform:translateX(-50%);filter:drop-shadow(0 1px 1px #243a3540);image-rendering:auto;}
#battle-root .spell-panel-battle .battle-unit{transform-origin:50% 100%;}
#battle-root .spell-panel-battle .battle-unit .ground-shadow{z-index:0;top:calc(var(--actor-height) - 4px);left:12%;width:76%;height:7px;border-radius:50%;background:radial-gradient(ellipse,#273d3650,transparent 70%);box-shadow:none;}
#battle-root .spell-panel-battle .battle-unit.inspected .ground-shadow{box-shadow:none;}
#battle-root .spell-panel-battle .target-ring,#battle-root .spell-panel-battle .selection-floor{position:absolute;z-index:1;top:calc(var(--actor-height) - 4px);bottom:auto;left:8%;right:8%;height:9px;border:1.5px solid #f9efce;border-radius:50%;background:#75ba9f26;box-shadow:0 0 0 1px #3d8177,0 2px 3px #234d4230;opacity:0;pointer-events:none;animation:none;transition:opacity .22s ease;}
#battle-root .spell-panel-battle .selected .target-ring,#battle-root .spell-panel-battle .inspected .selection-floor{opacity:1;}
#battle-root .spell-panel-battle .battle-unit .unit-name{top:calc(var(--actor-height) + 7px);left:50%;right:auto;width:max-content;min-width:35px;max-width:calc(100% + 8px);height:13px;padding:0 4px;transform:translateX(-50%);font-size:8px;line-height:11px;border-radius:4px;background:#fffcebeb;box-shadow:0 1px 3px #3d442e18;}
#battle-root .spell-panel-battle .battle-unit .unit-health{top:calc(var(--actor-height) + 22px);left:50%;right:auto;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:3px;width:max-content;max-width:calc(100% + 16px);transform:translateX(-50%);}
#battle-root .spell-panel-battle .monster-unit .unit-health{top:calc(var(--actor-height) + 9px);}
#battle-root .spell-panel-battle .unit-stat{display:grid;grid-template-columns:9px auto;grid-template-rows:11px 2px;align-items:center;gap:1px 2px;padding:2px 4px 2px;min-width:27px;border:1px solid #d3d9c1;border-radius:5px;background:#fffcedf0;box-shadow:0 1px 3px #4d4e3714;font-size:8px;line-height:10px;font-variant-numeric:tabular-nums;}
#battle-root .spell-panel-battle .unit-stat>.icon,#battle-root .spell-panel-battle .unit-stat>img{display:block;width:9px;height:9px;margin:0;padding:0;font-size:9px;line-height:9px;color:#c97d66;object-fit:contain;}
#battle-root .spell-panel-battle .unit-stat>b{font-weight:700;line-height:10px;color:#55684e;}
#battle-root .spell-panel-battle .unit-stat>i{grid-column:1/-1;display:block;height:2px;overflow:hidden;background:#dfe5d2;border-radius:3px;}
#battle-root .spell-panel-battle .unit-stat em{display:block;height:100%;background:#c7846e;border-radius:3px;transition:width .3s ease;}
#battle-root .spell-panel-battle .unit-stat.mana em{background:#76a4b1;}
#battle-root .spell-panel-battle .battle-enemy-number{top:-20px;width:15px;height:15px;min-height:15px;left:calc(50% - 7px);font-size:8px;line-height:12px;background:#3c7869e8;}
#battle-root .spell-panel-battle .monster-control{top:-7px;font-size:6px;}
#battle-root .spell-panel-battle>.battle-console{border-radius:20px 20px 0 0;background:#faf8eb;isolation:isolate;box-shadow:0 -2px 9px #263f3220;}
#battle-root .spell-panel-battle .combat-player-name{gap:7px;justify-content:flex-start;}
#battle-root .spell-panel-battle .combat-player-name>span{flex:0 1 auto;max-width:39%;}
#battle-root .spell-panel-battle .combat-player-name>small{margin-left:0;font-size:8px;}
#battle-root .spell-panel-battle .hero-effects{display:flex;position:relative;flex:1 1 55px;flex-wrap:nowrap;min-width:39px;max-width:170px;height:27px;margin-left:auto;padding:3px;gap:4px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#b3c3a0 transparent;touch-action:pan-x;border:1px solid #d9e0cb;border-radius:7px;background:#f0f3e4;}
#battle-root .spell-panel-battle .hero-effects .icon,#battle-root .spell-panel-battle .hero-effects .effect-duration{margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
#battle-root .spell-panel-battle .combat-effect-icon{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;gap:3px;width:auto;min-width:29px;height:20px;min-height:20px;margin:0;padding:1px 3px;border:1px solid #c6d3b8;border-radius:5px;background:#fffdf1;color:#547b6b;box-shadow:none;touch-action:pan-x;transition:border-color .16s,background .16s;}
#battle-root .spell-panel-battle .combat-effect-icon>.icon{width:15px;height:15px;padding:0;border:0;background:none;font-size:15px;line-height:15px;}
#battle-root .spell-panel-battle .combat-effect-icon>img{width:16px;height:16px;object-fit:contain;border:0;border-radius:0;padding:0;}
#battle-root .spell-panel-battle .combat-effect-icon .effect-duration{position:static;display:block;min-width:7px;width:auto;height:auto;padding:0;border:0;background:none;font:700 9px/12px Interface,sans-serif;color:#5e795c;}
#battle-root .spell-panel-battle .combat-effect-icon[aria-expanded="true"]{border-color:#377c6c;background:#e4eee0;box-shadow:inset 0 0 0 1px #92b4a1;}
#battle-root .spell-panel-battle .player-card-effects,#battle-root .spell-panel-battle .enemy-card-effects{overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;scrollbar-width:none;touch-action:pan-x;overscroll-behavior-x:contain;}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon{height:16px;min-height:16px;min-width:24px;padding:0 2px;gap:2px;}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon>.icon,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon>.icon,#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon>img,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon>img{width:12px;height:12px;font-size:12px;line-height:12px;}
#battle-root .spell-panel-battle .player-card-effects .effect-duration,#battle-root .spell-panel-battle .enemy-card-effects .effect-duration{font-size:8px;line-height:10px;}
#battle-root .spell-panel-battle .hero-effects .no-effects{display:block;align-self:center;padding:0;border:0;background:none;color:#a2af94;font-size:10px;}
#battle-root .spell-panel-battle>.enemy-effect-popover{position:absolute;z-index:50;inset:auto;left:10px;top:100px;width:214px;max-width:calc(100% - 20px);max-height:156px;padding:7px 8px;border:1px solid #c7d2b6;border-radius:10px;background:#fffdf1;box-shadow:0 5px 17px #253f342b;overflow:visible;animation:effect-enter .18s ease-out;}
#battle-root .spell-panel-battle>.enemy-effect-popover:before{content:"";position:absolute;left:var(--effect-arrow);top:-4px;width:7px;height:7px;transform:rotate(45deg);border:1px solid #c7d2b6;border-right:0;border-bottom:0;background:#fffdf1;}
#battle-root .spell-panel-battle>.enemy-effect-popover[data-origin="bottom"]:before{top:auto;bottom:-4px;transform:rotate(225deg);}
#battle-root .spell-panel-battle .enemy-effect-popover>header{min-height:26px;gap:6px;padding:0 0 5px;margin:0;border-bottom:1px solid #e0e5d0;}
.effect-description-art{display:grid;place-items:center;width:25px;height:25px;border:1px solid #d3ddc3;border-radius:6px;background:#edf2e3;color:#5d8a78;}
.effect-description-art img{width:22px;height:22px;object-fit:contain;}.effect-description-art>.icon{font-size:19px;}
#battle-root .spell-panel-battle .enemy-effect-popover h3{font-size:10px;line-height:13px;}
#battle-root .spell-panel-battle .enemy-effect-popover h3 small{font-size:8px;line-height:10px;}
#battle-root .spell-panel-battle .enemy-effect-popover .icon-button{width:22px;height:22px;min-width:22px;min-height:22px;margin:0;padding:2px;}
#battle-root .spell-panel-battle .enemy-effect-copy{max-height:104px;padding:5px 0 0;overflow-y:auto;overscroll-behavior:contain;}
#battle-root .spell-panel-battle .enemy-effect-copy p,#battle-root .spell-panel-battle .enemy-effect-copy p span{font-size:10px;line-height:1.4;margin:0;}
#battle-root .spell-panel-battle .enemy-effect-copy small{font-size:8px;line-height:1.4;margin-top:4px;color:#88967d;}
#battle-root .spell-panel-battle .battle-log{height:auto;min-height:27px;max-height:102px;overflow:hidden;transition:none;}
#battle-root .spell-panel-battle .battle-log-content{position:static;inset:auto;height:73px;max-height:73px;margin:0;padding:6px 8px;border:0;border-top:1px solid #dae1cc;border-radius:0;background:#fcfbef;box-shadow:none;}
#battle-root .spell-panel-battle .battle-log.log-expanded{flex:none;}
#battle-root .spell-panel-battle #battle-actions{overflow:hidden;gap:7px;}
#battle-root .spell-panel-battle .battle-buttons{flex:none;transition:opacity .2s ease,transform .25s ease;}
#battle-root .spell-panel-battle .journal-open .battle-buttons{opacity:0;transform:translateY(8px);pointer-events:none;}
.chat-modal .chat-compose{padding-top:7px;margin-top:0;position:relative;}
.chat-modal .chat-compose .join-row{display:grid;grid-template-columns:minmax(0,1fr) 36px;align-items:end;gap:7px;}
.chat-modal #shore-message{height:36px;min-height:36px;max-height:62px;resize:none;padding:8px 30px 8px 9px;font-size:11px;line-height:18px;border-radius:10px;}
.chat-modal #shore-chat-send{display:grid;place-items:center;width:36px;min-width:36px;max-width:36px;height:36px;min-height:36px;padding:8px;border-radius:10px;background:#3a7869;}
.chat-modal #shore-chat-send img{display:block;width:20px;height:20px;object-fit:contain;border:0;}
.chat-modal #shore-chat-send.sending img{animation:send-breath 1s ease-in-out infinite;}
.chat-modal .chat-compose-footer{position:absolute;right:50px;bottom:4px;display:block;min-height:0;margin:0;padding:0;pointer-events:none;line-height:9px;}
.chat-modal #shore-message-count{font-size:7px;color:#9ba88c;}
.chat-modal .chat-sheet-grip{height:24px;min-height:24px;touch-action:none;}
.chat-modal>.modal-header{touch-action:none;}
.chat-modal .message-avatar{width:28px;height:32px;flex:0 0 28px;border-radius:7px;}
.chat-modal .message-body header{gap:5px;}.chat-modal .message-body header strong{font-size:11px;}.chat-modal .message-moderate{font-size:8px;padding:1px 2px;}
@keyframes send-breath{50%{opacity:.4;transform:translateX(2px)}}
@media(max-height:730px){#battle-root>.spell-panel-battle{--formation-safe-top:214px;}#battle-root .spell-panel-battle .hero-effects{height:24px;padding:2px;}}
@media(prefers-reduced-motion:reduce){#battle-root .spell-panel-battle .battle-hero-sprite,#battle-root .spell-panel-battle .monster-sprite{filter:none;}}
#battle-root .spell-panel-battle .hero-effects{inset:auto;}
#battle-root .spell-panel-battle .mana-shielded .battle-actor:after{inset:8% 0 1%;border:1px solid #8ecac76b;background:radial-gradient(ellipse,transparent 72%,#b6e2d519);box-shadow:none;z-index:-1;}

#battle-root .spell-panel-battle .hero-effects{scrollbar-width:none;}
#battle-root .spell-panel-battle .hero-effects::-webkit-scrollbar{display:none;}
#battle-root .spell-panel-battle .battle-unit.defeated{pointer-events:none;}
