/* Six-class ATB combat. Figures stay visible; server events never await animation. */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.action-paused .atb-gauge i{transition:none}
.atb-enemies,.atb-heroes{min-width:0;width:100%}
.atb-actor .actor-name{white-space:nowrap;max-width:100%}
.atb-battle{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto 28px;gap:8px}
.atb-battle .atb-stage{display:grid;grid-template-columns:1fr;grid-template-rows:22px minmax(0,1fr) 28px minmax(0,1fr);padding:6px 10px;background-image:linear-gradient(#0b181e50,#101c23a0),var(--battle-ground)}
.atb-stage .encounter-title{grid-column:1;grid-row:1;font-size:9px;letter-spacing:1.1px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.atb-enemies,.atb-heroes{display:flex;justify-content:center;align-items:stretch;min-height:0;gap:8px}.atb-enemies{grid-row:2}.atb-heroes{grid-row:4}
.atb-actor{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:end;min-width:0;min-height:0;flex:1;max-width:min(180px,calc(100% / var(--units,1)));padding:0 4px 5px;border:1px solid transparent;background:transparent;border-radius:14px;text-align:center;transition:border-color .2s,background .2s;isolation:isolate;color:#f2e5c7}
.atb-actor .battle-sprite{height:auto;width:100%;flex:1;min-height:30px;max-height:180px;filter:drop-shadow(0 5px 5px #0009);animation:atb-arrive .85s ease-out both}
.atb-actor.foe{cursor:pointer}.atb-actor.foe:hover{background:#debd8420}.atb-actor.targeted{border-color:#e1bd7580;background:linear-gradient(transparent 20%,#caa86322);box-shadow:inset 0 -2px #dfbd73}
.atb-actor.targeted::after{content:'◆';position:absolute;top:23px;left:50%;transform:translateX(-50%);color:#f3ce7e;font-size:10px;text-shadow:0 0 8px #000}
.atb-ground{position:absolute;bottom:58px;left:14%;right:14%;height:12px;background:#020e12a0;border:1px solid #baab7250;border-radius:50%;filter:blur(1px);z-index:-1}
.actor-name{font:600 11px/13px Georgia;min-height:15px;max-width:100%;text-overflow:ellipsis;overflow:hidden;text-shadow:0 1px 5px #000}.actor-name em{font:8px system-ui;font-style:normal;border:1px solid #ddbc7060;border-radius:5px;padding:1px 3px;color:#f5d48f}
.atb-life,.atb-gauge{height:6px;width:100%;border-radius:8px;overflow:hidden;background:#020f12b8;border:1px solid #ffffff16;flex-shrink:0;margin-top:3px}.atb-life i,.atb-gauge i{display:block;height:100%;width:0;border-radius:6px;background:linear-gradient(90deg,#577f62,#a5d08e);transition:width .3s ease-out}
.foe .atb-life i{background:linear-gradient(90deg,#8d453e,#e39477)}.atb-gauge{height:4px;margin-top:2px;border:0}.atb-gauge i{background:linear-gradient(90deg,#a58143,#f4d491);transition:width .08s linear}.ready .atb-gauge{box-shadow:0 0 8px #edcb7666}
.actor-vitals{font:9px/12px system-ui;font-variant-numeric:tabular-nums;color:#e8ddc8}.actor-status{font:8px/10px system-ui;min-height:10px;color:#f4c785;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actor-timeout{position:absolute;right:3px;top:2px;font:10px system-ui;color:#fff0bc;background:#152827a6;border-radius:6px;padding:2px}.actor-timeout:empty{display:none}
.winding-up{box-shadow:inset 0 0 24px #c5593b33!important}.winding-up .actor-status{color:#ffba8a;font-weight:700}
.affinities{display:flex;gap:3px;min-height:18px;justify-content:center;flex-shrink:0}.affinity{display:inline-flex;align-items:center;gap:2px;font:8px/15px system-ui;border-radius:4px;padding:0 3px;background:#071b20a6}.affinity b{font-size:12px;font-weight:400}.affinity.weak{color:#bce8ad}.affinity.resist{color:#e4aca2}
.atb-callout{grid-row:3;align-self:center;text-align:center;color:#ffe1a0;font:italic 14px Georgia;text-shadow:0 1px 5px #000}.atb-pets{position:absolute;bottom:52px;left:8px;display:flex;gap:2px;max-width:31%;max-height:105px;z-index:2;pointer-events:none}.atb-pets .atb-actor{width:58px;flex:0 1 58px;max-width:none}.atb-pets .battle-sprite{height:65px;min-height:35px}.pet .actor-name{font-size:8px;line-height:9px;min-height:9px}.pet .actor-vitals{font-size:8px;line-height:9px}.pet .actor-status{display:none}.pet-label{font:6px/8px system-ui;letter-spacing:.6px;color:#8dd4c9}.pet .atb-life{height:3px}.pet .atb-ground{bottom:25px}.atb-pets:has(.atb-actor:nth-child(3)){max-width:100%;left:5px;bottom:45%;}.atb-pets:has(.atb-actor:nth-child(3)) .atb-actor{width:38px;flex-basis:38px}.atb-pets:has(.atb-actor:nth-child(3)) .battle-sprite{height:42px}
.atb-dock{position:relative;background:linear-gradient(145deg,#283932,#142522);border:1px solid #c8ad6150;border-radius:15px;padding:9px 9px 10px;box-shadow:inset 0 1px #e5c57b14}
.atb-resource{display:flex;align-items:center;justify-content:space-between;gap:8px;font:11px system-ui;color:#c4d8ad;padding:0 2px 7px}.self-shield{color:#b4dbe8}.mana-orbs{display:flex;align-items:center;gap:4px;margin-left:auto;color:#b4d9e8}.mana-orbs i{display:block;width:9px;height:9px;transform:rotate(45deg);border:1px solid #6795a9;border-radius:2px;background:#132327}.mana-orbs i.full{background:linear-gradient(135deg,#d9f7ff,#4b99be);box-shadow:0 0 5px #6dc6e945}.mana-orbs b{font-size:10px;font-weight:400;margin-left:3px}
.own-readiness{position:relative;margin-bottom:8px;padding-top:2px}.own-gauge{height:6px;margin:0;background:#081d1b}.readiness-label{display:block;text-align:center;font:10px/18px system-ui;color:#b9c2ae;letter-spacing:.4px}.can-act .readiness-label{color:#ffe4a7}.can-act .own-gauge{box-shadow:0 0 12px #e8c36b30}
.atb-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.atb-action{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:start;min-width:0;min-height:118px;padding:5px 3px 8px;background:linear-gradient(150deg,#3b4937,#152a22 65%);border:1px solid #bca66a77;border-radius:18px 18px 12px 12px;color:#f4e3b7;box-shadow:inset 0 0 0 2px #14251f,inset 0 0 0 3px #a58e4433;opacity:1!important;touch-action:manipulation}
.ability-icon{display:grid;place-items:center;width:58px;height:52px;flex-shrink:0;filter:drop-shadow(0 2px 3px #0008)}.ability-icon img{width:100%;height:100%;object-fit:contain}.ability-weapon{display:block;width:48px;height:48px;background-image:url('/assets/art/combat-actions.webp');background-size:400% 200%;background-repeat:no-repeat;filter:drop-shadow(0 0 5px #dab46955)}
.atb-action strong{font:600 11px/13px Georgia;min-height:26px;display:flex;align-items:center;justify-content:center;overflow-wrap:anywhere}.action-cost{font:8px/11px system-ui;color:#accccb;min-height:11px}.action-affinity{font:8px/12px system-ui;color:#b9c4af}.atb-action[data-affinity="good"] .action-affinity{color:#bcdfa0}.atb-action[data-affinity="poor"] .action-affinity{color:#e5ab98}
.atb-action:disabled{color:#b2b3a2;border-color:#87917c40}.atb-action:disabled .ability-icon{filter:saturate(.55) brightness(.7)}.atb-action.unaffordable .action-cost{color:#d69f91}.can-act .atb-action:not(:disabled){border-color:#ecc780;box-shadow:inset 0 0 0 2px #203325,inset 0 0 0 3px #c5ad6966,0 0 12px #e3c57315}.atb-action:not(:disabled):active{transform:translateY(2px)}.atb-action:focus-visible,.atb-actor:focus-visible{outline:2px solid #f5d99b;outline-offset:2px}
.atb-leave{position:absolute;inset:auto 0 0;display:flex;align-items:center;gap:8px;background:#132422f5;border:1px solid #d6b97f;padding:14px;border-radius:12px;z-index:4}.atb-leave strong{flex:1;font:14px Georgia}.atb-leave button{font:11px system-ui;padding:8px}
.atb-battle .battle-footer{grid-column:1;grid-row:3;align-self:end}.atb-ending .atb-stage{box-shadow:inset 0 0 80px #e8c26c44}.atb-ending .atb-callout{font-size:28px;letter-spacing:4px}.damage-number.heal{color:#b9ed9e}.damage-number.shield{color:#a1e1ff}.atb-actor.fallen{opacity:.45}
.class-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.class-choices button{display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px;min-width:0;padding:5px;font:11px Georgia;background:radial-gradient(ellipse at bottom,#d9b66520,transparent 75%)}.class-choices img{height:76px;width:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #0007)}.class-choices .chosen{box-shadow:inset 0 -2px #d7b877;background:#b99e4822}.class-role{font:10px system-ui;text-transform:uppercase;letter-spacing:1.2px;color:#d8bb80}.class-facts{display:flex;gap:12px;flex-wrap:wrap;font:10px system-ui;color:#d4c6a6;margin:10px 0}.class-skill-list{display:grid;gap:9px;margin:14px 0}.class-skill-list article{display:flex;align-items:center;gap:12px;border:1px solid #d4bd8030;border-radius:12px;padding:10px;background:#ffffff03}.class-skill-list strong{font:15px Georgia}.class-skill-list small{display:block;font:10px system-ui;color:#9fc9cd;margin:4px 0}.class-skill-list p{font:11px/1.5 system-ui;margin:0;color:#bdc8bb}.welcome-form .class-skill-list{display:none}.welcome-form{padding-top:24px}.welcome-form h1{font-size:30px}.welcome-art .art{height:390px}.hero-health{font:12px system-ui;color:#b5d29f}
@keyframes atb-arrive{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.atb-stage[data-effect="fire"]{box-shadow:inset 0 0 55px #e8813540}.atb-stage[data-effect="frost"]{box-shadow:inset 0 0 55px #91d6ef50}.atb-stage[data-effect="arcane"],.atb-stage[data-effect="shadow"]{box-shadow:inset 0 0 55px #65b6bc50}.atb-stage[data-effect="shield"]{box-shadow:inset 0 0 45px #dcb96644}
@media(max-width:700px){.atb-battle .atb-stage{padding:4px 5px}.atb-enemies,.atb-heroes{gap:3px}.atb-actor{padding:0 3px 3px}.atb-dock{padding:7px}.atb-actions{gap:5px}.atb-action{min-height:112px;border-radius:14px 14px 10px 10px}.ability-icon{width:50px;height:46px}.actor-name{font-size:10px;line-height:12px}.atb-callout{font-size:12px}.welcome-art{min-height:180px;max-height:200px}.welcome-art>.art{height:200px}.welcome-form h1{font-size:26px}.welcome-form{padding:20px}.class-choices img{height:64px}.welcome-art .welcome-caption{bottom:15px}.welcome-art .welcome-caption h2{font-size:21px}}
@media(max-width:360px){.atb-actions{gap:3px}.atb-action strong{font-size:10px;line-height:12px}.ability-icon{width:43px;height:42px}.atb-action{min-height:107px}.action-cost{font-size:7px}.actor-name{font-size:9px}.affinity{font-size:7px;padding:0 2px}.atb-actor{padding-inline:1px}.class-choices button{font-size:10px}}
@media(max-height:650px){.atb-battle{gap:4px}.atb-battle .atb-stage{grid-template-rows:18px minmax(0,1fr) 20px minmax(0,1fr)}.atb-action{min-height:93px;padding-top:2px;padding-bottom:4px}.atb-action .ability-icon{height:32px;width:38px}.atb-action strong{min-height:24px}.atb-resource{padding-bottom:4px}.own-readiness{margin-bottom:3px}.atb-pets{bottom:38px;max-height:70px}.atb-pets .battle-sprite{height:38px}.actor-status{font-size:7px}}
@media(orientation:landscape) and (max-height:500px){.atb-battle{grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr) 28px;gap:6px}.atb-battle .atb-stage{grid-column:1;grid-row:1/3;grid-template-rows:18px minmax(0,1fr) 20px minmax(0,1fr)}.atb-dock{grid-column:2;grid-row:1;align-self:end}.atb-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.atb-action{min-height:82px;display:grid;grid-template-columns:40px 1fr;grid-template-rows:1fr auto auto;padding:5px;column-gap:2px}.atb-action .ability-icon{grid-row:1/4;width:38px;height:42px}.atb-action strong{font-size:10px;line-height:12px;min-height:0}.action-cost,.action-affinity{font-size:8px}.atb-battle .battle-footer{grid-column:2;grid-row:2}.atb-actor .battle-sprite{min-height:20px}.actor-status{display:none}.atb-pets{bottom:30px;max-height:60px}.atb-pets .battle-sprite{height:30px}.affinities{min-height:14px}.actor-name{font-size:8px}}
@media(prefers-reduced-motion:reduce){.atb-actor .battle-sprite{animation:none}.atb-life i,.atb-gauge i{transition:none}}
.atb-pets{display:grid;grid-template-columns:repeat(var(--owners,1),minmax(0,1fr));left:8px;right:8px;bottom:52px;max-width:none;max-height:115px;gap:3px}
.pet-owner{max-width:130px;justify-self:start;min-width:0}.pet-owner>small{display:block;font:7px/12px system-ui;color:#ace0d5;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#102c28b0;border-radius:5px}
.pet-units{display:flex;gap:2px;min-width:0}.atb-pets .atb-actor{width:62px;flex:0 1 62px}.atb-pets .battle-sprite{height:70px}.pet .pet-label{display:none}
@media(max-height:650px){.atb-pets{bottom:42px;max-height:75px}.atb-pets .battle-sprite{height:40px}}
@media(orientation:landscape) and (max-height:500px){.atb-pets{bottom:30px;max-height:60px}.atb-pets .battle-sprite{height:30px}.atb-action strong{overflow-wrap:normal}}
.atb-stage:has(.pet-owner:not([hidden])){grid-template-rows:22px minmax(0,1fr) 22px 90px minmax(0,1fr)}
.atb-stage:has(.pet-owner:not([hidden])) .atb-heroes{grid-row:5}
.atb-pets{position:static;grid-row:4;width:100%;height:90px;max-height:none;align-items:end}
.atb-pets:not(:has(.pet-owner:not([hidden]))){display:none}
.pet-owner{width:100%;max-width:140px;justify-self:center}.pet-units{width:100%;justify-content:center}
.atb-pets .atb-actor{width:auto;flex:1;min-width:0;max-width:65px;padding:0 1px 2px}
.atb-pets .battle-sprite{height:50px;min-height:20px;max-height:50px;flex:0 1 50px}
.pet .actor-name{display:none}.pet .actor-vitals{white-space:nowrap;font-size:7px}
@media(max-height:650px){.atb-stage:has(.pet-owner:not([hidden])){grid-template-rows:18px minmax(0,1fr) 18px 64px minmax(0,1fr)}.atb-pets{height:64px}.atb-pets .battle-sprite{height:28px;max-height:28px;flex-basis:28px}.pet-owner>small{font-size:6px;line-height:9px}}
