/* Approved B composition, using the existing C leather frame and painted controls. */
.portrait-battle{--pb-duration:700ms;--pb-scene:url('assets/arena-forest-v06.webp');border:8px solid #77542f;border-image:url('assets/woodland-panel-leather-v1.webp') 82 fill/8px;background:#21170f;padding:12px;color:#edd6ad;font-family:Georgia,serif;width:100%;max-width:1550px;margin:auto;min-width:0}
.pb-sector-marsh{--pb-scene:url('assets/arena-marsh-v06.webp')}.pb-sector-ruins{--pb-scene:url('assets/arena-chapel-v06.webp')}.pb-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.pb-heading small{font:10px Georgia;letter-spacing:.12em;color:#c3a56a}.pb-heading h1{font:25px/1.2 Georgia;margin:5px 0}.pb-heading>span{font:12px Georgia;color:#d1b77d;white-space:nowrap}
.pb-arena{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.8fr) minmax(0,1fr);gap:24px;align-items:center;background:linear-gradient(#11190c22,#11190c55),var(--pb-scene) center/cover;border:2px solid #977442;padding:18px;min-height:370px;isolation:isolate;overflow:visible}.pb-fighter{border:6px solid #77542f;border-image:url('assets/woodland-panel-leather-v1.webp') 82 fill/6px;background:#21170f;min-width:0;position:relative}.pb-fighter>header{padding:10px 12px 8px;background:#130e09b5;min-height:78px}.pb-fighter header small{font:9px Georgia;letter-spacing:.1em;color:#c7a76c}.pb-fighter h2{font:22px/1.1 Georgia;margin:5px 0;overflow-wrap:anywhere}.pb-fighter header>span{font:11px/1.3 Georgia;color:#b8ac8b;display:block}.pb-portrait{aspect-ratio:1.45;overflow:hidden;position:relative;background:#14200c66}.pb-portrait img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 0;transform:none!important;animation:none!important}.pb-vitals{padding:10px 12px;background:#120f09b8}.pb-vitals>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:4px;font:12px Georgia;margin-bottom:7px}.pb-vitals b{font-size:19px;color:#f6dfb1;font-variant-numeric:tabular-nums}.pb-hp{height:11px;border:1px solid #ac8c55;border-radius:20px;padding:2px;background:#110e0a;overflow:hidden}.pb-hp>i{display:block;height:100%;border-radius:20px;background:linear-gradient(#d79a64,#913923);transition:width .13s linear}.pb-vitals .pb-energy{display:flex;justify-content:space-between;align-items:center;font:12px Georgia;margin-top:8px;gap:4px}.pb-energy>b{color:#e7bd65;font-size:15px}.pb-stats{display:flex;align-items:center;gap:4px;font:11px Georgia;color:#c3af88;margin-top:8px}.pb-stats .icon{width:17px;height:17px;flex-shrink:0}
.pb-exchange{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;min-width:0;color:#f2ddb4;text-shadow:0 2px 4px #000,0 0 8px #000}.pb-exchange>small{font:9px Georgia;letter-spacing:.13em;color:#e0c68f}.pb-exchange h3{font:18px Georgia;margin:9px 0;min-height:40px;display:flex;align-items:center}.pb-exchange>strong{font:19px/1.3 Georgia;min-height:45px;display:flex;align-items:center;justify-content:center}.pb-exchange>span{font:12px/1.4 Georgia;min-height:36px;display:flex;align-items:center}.pb-companion{display:flex;align-items:center;gap:5px;font:11px/1.3 Georgia;background:#150f09bd;border:1px solid #8c7548;padding:8px;margin-top:10px}.pb-companion .icon{width:24px;height:24px;flex-shrink:0}
.pb-weapon-stage{position:relative;width:210px;height:195px;max-width:100%;overflow:visible;border-radius:50%;background:radial-gradient(#c4a0541a,transparent 70%)}.pb-weapon{position:absolute;inset:20px;transform-origin:42% 77%;filter:drop-shadow(0 2px 5px #0008);overflow:visible}.pb-weapon>.isolated-equipment-svg,.pb-weapon>img,.pb-weapon>svg,.pb-weapon>.icon{width:100%!important;height:100%!important;display:block;object-fit:contain;max-width:none;max-height:none;position:static;overflow:visible;background-color:transparent}.pb-weapon svg:not(.isolated-equipment-svg){fill:none;stroke:#f5e4b3;stroke-width:6;stroke-linecap:round}.pb-weapon>.painted-icon{background-size:400% 400%}.pb-impact{position:absolute;inset:0;width:100%;height:100%;opacity:0;fill:#f9e2a7;filter:drop-shadow(0 0 6px #eccd6b);pointer-events:none}.pb-damage{position:absolute;left:45%;top:16%;font:bold 33px Georgia;color:#ffe0a0;opacity:0;white-space:nowrap;pointer-events:none}.pb-acting .pb-weapon:not([hidden]){animation:pb-cut var(--pb-duration) ease-in-out}.pb-acting .pb-impact{animation:pb-hit var(--pb-duration) ease-out}.pb-acting .pb-damage{animation:pb-number var(--pb-duration) ease-out}.pb-counter .pb-impact{transform:scaleX(-1);fill:#ffc29c}.pb-block .pb-weapon:not([hidden]){animation:pb-block var(--pb-duration) ease-in-out}.pb-block .pb-impact{fill:#b1c9cf}.pb-heal .pb-impact{fill:#bbd390}.pb-heal .pb-damage{color:#c4e59a}.pb-poison .pb-impact{fill:#a9c86d}.pb-poison .pb-damage{color:#bbd494}
.pb-plan{margin-top:12px;border:6px solid #77542f;border-image:url('assets/woodland-panel-leather-v1.webp') 82 fill/6px;padding:10px}.pb-plan>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.pb-plan>header>strong{font:18px Georgia;font-weight:normal}.pb-tactics{display:flex;gap:5px;flex-wrap:wrap}.pb-tactics button,.pb-controls button{position:relative;isolation:isolate;background:none!important;border:0!important;border-radius:0;box-shadow:none!important;font:14px Georgia;padding:8px 14px;min-height:38px;color:#ead3ab}.pb-tactics button.primary,.pb-controls button.primary{color:#2d1b09}.pb-skills{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.pb-skill{display:flex;align-items:center;gap:8px;border:1px solid #7b6741;background:#160f09aa;padding:7px;min-width:0}.pb-skill .pb-skill-art{width:35px!important;height:35px!important;flex-shrink:0}.pb-skill strong{font:14px/1.2 Georgia;display:block;overflow-wrap:anywhere}.pb-skill small{font:10px/1.3 Georgia;color:#bda985;display:block;margin-top:4px}.pb-skill.pb-selected{border-color:#e5bd6d;box-shadow:inset 0 0 13px #c59c4230}.pb-descriptions{margin-top:9px;font:12px/1.5 Georgia}.pb-descriptions summary,.pb-log summary{cursor:pointer;color:#c4ae7c;padding:4px 0}.pb-descriptions p{font:13px/1.5 Georgia;margin:8px 0}.pb-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:10px}.pb-controls>p{font:12px/1.5 Georgia;color:#cbbb9a;min-height:20px;margin:0}.pb-controls>div{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.portrait-battle [hidden]{display:none!important}.pb-result{margin-top:10px;border:1px solid #947d4b;background:#151c10aa;padding:12px}.pb-result h2{font:24px Georgia;margin:0 0 6px}.pb-result p{font:14px/1.5 Georgia;margin:5px 0}.pb-result small{font:11px Georgia;color:#bba881}.pb-log{font:12px/1.5 Georgia;margin-top:9px}.pb-log p{font:12px/1.5 Georgia;margin:5px 0}.portrait-battle .smith-button-label{position:relative;z-index:1}.portrait-battle .smith-button-skin{pointer-events:none}
@keyframes pb-cut{0%,100%{transform:rotate(-12deg) translateX(0)}28%{transform:rotate(-55deg) translate(-12px,-4px)}56%{transform:rotate(48deg) translate(25px,0)}}@keyframes pb-block{0%,100%{transform:scale(1)}53%{transform:scale(1.16)}}@keyframes pb-hit{0%,46%,100%{opacity:0}57%{opacity:.9}77%{opacity:.18}}@keyframes pb-number{0%,47%{opacity:0;transform:translateY(8px)}57%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-28px)}}
body:has(.portrait-battle) .layout-footer{display:none!important}body[data-layout=sidebar]:has(.portrait-battle) #app{grid-template-rows:0 minmax(0,1fr)!important}body[data-layout=sidebar] .main-content:has(.portrait-battle){padding:10px 12px!important;overflow:auto!important;min-height:0!important}body[data-layout=sidebar] .main-content:has(.portrait-battle) .view-content{height:auto!important;min-height:0!important;overflow:visible!important}
@media(max-width:1150px){.pb-arena{gap:14px;grid-template-columns:minmax(0,1fr) minmax(150px,.7fr) minmax(0,1fr);padding:12px}.pb-weapon-stage{width:165px;height:165px}.pb-fighter h2{font-size:19px}.pb-skill{display:grid;justify-items:center;text-align:center;gap:5px}.pb-skill strong{font-size:12px}}
@media(max-width:900px){body[data-layout=sidebar]:has(.portrait-battle) #app{grid-template-rows:46px minmax(0,1fr)!important}.portrait-battle{border-width:5px;border-image-width:5px;padding:7px}.pb-heading{margin-bottom:7px}.pb-heading small{font-size:8px;letter-spacing:.04em}.pb-heading h1{font-size:19px}.pb-heading>span{font-size:10px}.pb-arena{grid-template-columns:1fr 1fr;gap:7px;padding:7px;min-height:0}.pb-fighter{grid-row:1;border-width:4px;border-image-width:4px}.pb-fighter header{padding:6px;min-height:66px}.pb-fighter header small{font-size:7px;letter-spacing:.02em}.pb-fighter h2{font-size:16px;line-height:1.15;margin:4px 0}.pb-fighter header>span{font-size:9px}.pb-portrait{height:clamp(95px,20svh,170px);aspect-ratio:auto}.pb-vitals{padding:7px}.pb-vitals>div:first-child{font-size:9px;margin-bottom:4px}.pb-vitals b{font-size:15px}.pb-hp{height:9px;padding:1px}.pb-vitals .pb-energy{font-size:9px;margin-top:6px}.pb-energy>b{font-size:12px}.pb-stats{font-size:9px;margin-top:5px;gap:3px}.pb-stats .icon{width:13px;height:13px}.pb-exchange{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:82px minmax(0,1fr);grid-template-rows:auto auto;gap:0 8px;text-align:left;background:#170f09c9;padding:3px 7px;border:1px solid #847045;min-height:82px}.pb-exchange>small,.pb-exchange h3,.pb-companion{display:none}.pb-weapon-stage{width:78px;height:78px;grid-row:1/3;grid-column:1}.pb-weapon{inset:8px}.pb-exchange>strong{font-size:14px;min-height:0;justify-content:flex-start;align-self:end;grid-column:2;grid-row:1;line-height:1.25}.pb-exchange>span{font-size:10px;min-height:0;grid-column:2;grid-row:2;align-self:start;line-height:1.3;padding-top:4px}.pb-damage{font-size:22px;top:14%}.pb-plan{margin-top:7px;border-width:4px;border-image-width:4px;padding:7px}.pb-plan>header{gap:5px;margin-bottom:7px}.pb-plan>header>strong{font-size:13px}.pb-tactics{gap:3px;flex-wrap:nowrap}.pb-tactics button{font-size:10px;min-height:31px;padding:6px 9px}.pb-skills{gap:4px}.pb-skill{padding:5px 3px;gap:4px;align-content:start}.pb-skill .pb-skill-art{width:27px!important;height:27px!important}.pb-skill strong{font-size:10px;line-height:1.2}.pb-skill small{font-size:8px;line-height:1.2;margin-top:3px}.pb-descriptions{font-size:10px;margin-top:5px}.pb-controls{display:grid;gap:7px;padding-top:7px}.pb-controls>p{font-size:10px;line-height:1.35;min-height:0}.pb-controls>div{justify-content:stretch;gap:4px}.pb-controls button{font-size:12px;min-height:38px;padding:7px 13px}.pb-controls button.primary{flex:1}.pb-result{padding:8px}.pb-result h2{font-size:20px}.pb-result p{font-size:12px}.pb-log{font-size:11px}}
@media(max-width:360px){.pb-heading h1{font-size:17px}.pb-fighter h2{font-size:14px}.pb-plan>header{display:block}.pb-tactics{margin-top:5px;justify-content:space-between}.pb-tactics button{flex:1}.pb-skill strong{font-size:9px}.pb-skill small{font-size:7px}.pb-fighter header{min-height:67px}}
@media(max-height:500px) and (orientation:landscape){.pb-arena{grid-template-columns:minmax(0,1fr) 180px minmax(0,1fr)}.pb-exchange{grid-column:2;grid-row:1;display:flex;padding:5px;min-height:190px}.pb-fighter.pb-enemy{grid-column:3}.pb-portrait{height:90px}.pb-exchange>strong{font-size:12px}.pb-exchange>span{font-size:9px}.pb-exchange>strong,.pb-exchange>span{align-self:center}.pb-plan{margin-top:6px}.pb-descriptions{display:none}.pb-heading h1{font-size:16px}.pb-fighter header{min-height:55px}}
@media(prefers-reduced-motion:reduce){.pb-acting *{animation:none!important}.pb-hp>i{transition:none}}

.ep-content:has(.portrait-battle)>.ep-title{display:none}
/* Keep the live arena usable inside the existing application shell. */
.portrait-battle h1,.portrait-battle h2,.portrait-battle h3{max-width:none}
.pb-plan .pb-descriptions,.portrait-battle>.pb-log{padding:0;border:0;background:none;box-shadow:none;min-height:0}
.pb-plan .pb-descriptions:not([open]){height:auto}
@media(min-width:901px){.pb-portrait{height:clamp(150px,23svh,235px);aspect-ratio:auto}.pb-exchange h3{min-height:25px;margin:6px 0}.pb-exchange>strong{font-size:17px;min-height:35px}.pb-exchange>span{min-height:24px}.pb-weapon-stage{height:165px}.pb-arena{min-height:350px}.pb-fighter>header{min-height:70px}.pb-plan{padding:8px}.pb-heading{margin-bottom:8px}}
@media(max-width:900px){.pb-portrait{height:clamp(82px,14svh,125px)}.pb-fighter>header{min-height:58px;padding:5px}.pb-fighter h2{font-size:14px;margin:3px 0}.pb-vitals{padding:5px}.pb-vitals>div:first-child{margin-bottom:3px}.pb-vitals .pb-energy{margin-top:4px}.pb-stats{margin-top:3px}.pb-exchange{min-height:72px;grid-template-columns:70px minmax(0,1fr)}.pb-weapon-stage{width:68px;height:68px}.pb-plan{padding:5px}.pb-plan>header{margin-bottom:5px}.pb-skill{padding:4px 2px}.pb-skill .pb-skill-art{width:23px!important;height:23px!important}.pb-skill strong{font-size:9px}.pb-descriptions summary{padding:2px 0}.pb-companion{display:flex;grid-column:2;grid-row:3;padding:0;margin:3px 0 0;border:0;background:none;font-size:9px}.pb-companion .icon{width:12px;height:12px}.pb-controls>p{font-size:10px}.pb-heading h1{margin:3px 0}}
@media(max-width:360px){.pb-portrait{height:82px}.pb-heading{margin-bottom:4px}.pb-plan>header{display:flex}.pb-plan>header>strong{display:none}.pb-tactics{width:100%;margin:0}.pb-fighter>header{min-height:62px}.pb-controls>p{display:none}}
.pb-descriptions summary,.pb-log summary{font:12px/1.35 Georgia}
@media(max-width:900px) and (max-height:710px){.pb-heading small{font-size:7px}.pb-heading h1{font-size:16px}.pb-fighter>header{min-height:50px}.pb-fighter header small{display:none}.pb-fighter h2{font-size:12px}.pb-portrait{height:65px}.pb-vitals b{font-size:13px}.pb-energy>b{font-size:11px}.pb-vitals>div:first-child>span{display:none}.pb-exchange{min-height:58px;grid-template-columns:52px minmax(0,1fr)}.pb-weapon-stage{width:52px;height:52px}.pb-companion{display:none}.pb-exchange>strong{font-size:12px}.pb-exchange>span{font-size:9px}.pb-plan>header>strong{display:none}.pb-plan>header{display:block}.pb-tactics{width:100%;margin:0}.pb-tactics button{flex:1;min-height:28px;padding:4px}.pb-skill strong{display:none}.pb-skill .pb-skill-art{width:24px!important;height:24px!important}.pb-skill small{font-size:8px}.pb-descriptions summary{font-size:10px}.pb-controls>p{display:none}.pb-controls button{min-height:34px;padding:6px 8px}.pb-plan{margin-top:5px}.pb-arena{gap:5px;padding:5px}}
.portrait-battle .pb-descriptions>summary,.portrait-battle .pb-log>summary{min-height:0!important;font:12px/1.35 Georgia!important;padding:4px 0!important}
@media(max-width:900px) and (max-height:710px){.pb-portrait{height:55px}.portrait-battle .pb-descriptions>summary{font-size:10px!important;padding:2px 0!important}.pb-heading h1{line-height:1.1}.pb-heading small{display:none}}

/* Ranged weapons recoil in place; a separate streak carries their hit. */
.portrait-battle:is([data-pb-enemy-type=gun],[data-pb-enemy-type=bow],[data-pb-enemy-type=crossbow]).pb-counter.pb-acting .pb-weapon[data-pb-weapon=enemy]{animation:pb-ranged var(--pb-duration) ease-in-out}
.portrait-battle:is([data-pb-enemy-type=gun],[data-pb-enemy-type=bow],[data-pb-enemy-type=crossbow]).pb-counter .pb-impact{height:20%;top:40%;fill:#ffce83;transform:scaleX(-1)}
.portrait-battle:is([data-pb-enemy-type=spear],[data-pb-enemy-type=staff]).pb-counter.pb-acting .pb-weapon[data-pb-weapon=enemy]{animation:pb-thrust var(--pb-duration) ease-in-out}
@keyframes pb-ranged{0%,100%{transform:rotate(-25deg)}30%{transform:rotate(-25deg) translateX(8px)}56%{transform:rotate(-30deg) translateX(-12px)}}
@keyframes pb-thrust{0%,100%{transform:rotate(-20deg)}30%{transform:rotate(-25deg) translateX(10px)}56%{transform:rotate(-20deg) translateX(-20px)}}
/* Expedition containers also style generic buttons; keep this component's controls scoped. */
.portrait-battle .pb-tactics button,.portrait-battle .pb-controls button{font:14px/1.25 Georgia!important;min-width:0!important;width:auto;white-space:normal!important}
.portrait-battle .pb-tactics .smith-button-label,.portrait-battle .pb-controls .smith-button-label{font:inherit!important}
@media(max-width:900px){.pb-plan>header>strong{display:none}.pb-tactics{width:100%;flex-wrap:nowrap}.portrait-battle .pb-tactics button{font-size:12px!important;flex:1;padding:6px!important;min-height:36px!important}.portrait-battle .pb-controls button{font-size:13px!important;padding:7px 10px!important}}
@media(max-width:900px) and (max-height:710px){.portrait-battle .pb-tactics button{font-size:10px!important;min-height:28px!important;padding:4px!important}.portrait-battle .pb-controls button{font-size:12px!important;min-height:34px!important}}
@media(min-width:600px) and (max-width:900px) and (max-height:500px) and (orientation:landscape){.pb-plan{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;gap:8px}.pb-plan>header{margin:0}.pb-plan .pb-skills{gap:4px}.pb-plan .pb-skill{min-height:48px}.pb-plan .pb-descriptions{display:none}}
/* Full static figures retain both arms and hands inside their frame. */
.pb-portrait img{object-fit:contain;object-position:center center}
@media(min-width:901px){.pb-portrait{height:clamp(180px,25svh,240px)}}
@media(max-width:900px) and (min-height:711px){.pb-portrait{height:clamp(95px,18svh,160px)}}
@media(min-width:600px) and (max-width:900px) and (max-height:500px) and (orientation:landscape){.pb-exchange{min-height:155px}.pb-fighter>header{min-height:42px}.pb-portrait{height:45px}}

@media(min-width:600px) and (max-width:900px) and (max-height:500px) and (orientation:landscape){.portrait-battle{padding:3px}.pb-heading{margin-bottom:3px}.pb-plan{margin-top:3px}}

@media(min-width:600px) and (max-width:900px) and (max-height:500px) and (orientation:landscape){.portrait-battle{padding:3px}.pb-heading{margin-bottom:3px}.pb-plan{margin-top:3px}}
/* B2: fill the application area with the existing leather/forest art, never stretch characters. */
body[data-layout=sidebar] .main-content:has(.portrait-battle){background:linear-gradient(#18120bd9,#18120bea),url('assets/woodland-panel-leather-v1.webp') center/700px auto!important}
body[data-layout=sidebar] .main-content:has(.portrait-battle) .view-content{width:100%!important;max-width:none!important}
.ep-content:has(.portrait-battle){width:100%;max-width:none!important;padding:0!important}
.portrait-battle{max-width:none;--pb-projectile-color:#edc375}
.static-class-portrait{display:block;width:100%;height:100%;object-fit:contain;object-position:center;animation:none!important;transform:none!important}
.class-hero-art:has(.static-class-portrait){background:none!important;overflow:visible!important}
.hh-equipment-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.pb-arena{position:relative;background-position:center;background-size:cover}
.pb-portrait{background:radial-gradient(ellipse at 50% 75%,#56644777,#2b33266b 65%,#29271988);position:relative}
.pb-fighter{align-self:stretch;display:flex;flex-direction:column}.pb-fighter .pb-portrait{flex:1;min-height:0}.pb-fighter .pb-vitals{flex-shrink:0}
.pb-portrait img{animation:none!important;transform:none!important;object-fit:contain;image-rendering:auto}
.pb-acting .pb-weapon,.pb-acting .pb-impact,.pb-acting .pb-damage{animation:none!important}.pb-impact,.pb-damage{display:none!important}
.pb-card-effects{position:absolute;inset:0;pointer-events:none;isolation:isolate;overflow:visible}.pb-card-effects svg{width:100%;height:100%;position:absolute;inset:0;opacity:0}.pb-cut-mark{fill:#ffe8ae;filter:drop-shadow(0 0 5px #ffe0ac)}.pb-claw-mark{fill:none;stroke:#ffe0b0;stroke-width:5;stroke-linecap:round}.pb-impact-mark{fill:none;stroke:#edcd8c;stroke-width:7}.pb-claw-mark,.pb-impact-mark{display:none}
.pb-card-number{position:absolute;top:25%;left:50%;transform:translateX(-50%);font:bold clamp(20px,3vw,40px) Georgia;color:#ffe6ae;opacity:0;text-shadow:0 2px 6px #000}
.pb-acting.pb-target-hero .pb-hero .pb-card-effects svg,.pb-acting.pb-target-enemy .pb-enemy .pb-card-effects svg{animation:pb-card-contact var(--pb-duration) ease-out}
.pb-acting[data-pb-target=hero] .pb-hero .pb-card-effects svg,.pb-acting[data-pb-target=enemy] .pb-enemy .pb-card-effects svg{animation:pb-card-contact var(--pb-duration) ease-out}
.pb-acting[data-pb-target=hero] .pb-hero .pb-card-number,.pb-acting[data-pb-target=enemy] .pb-enemy .pb-card-number{animation:pb-target-number var(--pb-duration) ease-out}
.portrait-battle:not([data-pb-attack=slash]) .pb-cut-mark{display:none}.portrait-battle[data-pb-attack=claw] .pb-claw-mark{display:block}.portrait-battle:is([data-pb-attack=orb],[data-pb-attack=bullet],[data-pb-attack=arrow],[data-pb-attack=impact],[data-pb-attack=block],[data-pb-attack=heal],[data-pb-attack=poison]) .pb-impact-mark{display:block}
.portrait-battle[data-pb-attack=orb]{--pb-projectile-color:#87d5de}.portrait-battle[data-pb-attack=poison]{--pb-projectile-color:#a9cd73}.portrait-battle[data-pb-attack=heal]{--pb-projectile-color:#c3e49d}.portrait-battle[data-pb-attack=orb] .pb-impact-mark{stroke:#a7e9ef;filter:drop-shadow(0 0 8px #7bd6ec)}
.pb-projectile{pointer-events:none;position:absolute;left:var(--pb-from-x,25%);top:var(--pb-from-y,50%);width:22px;height:22px;z-index:5;border-radius:50%;background:radial-gradient(circle,#fff 0 10%,var(--pb-projectile-color) 35%,transparent 70%);box-shadow:0 0 12px var(--pb-projectile-color);opacity:0;will-change:transform,opacity}
.pb-acting:is([data-pb-attack=orb],[data-pb-attack=bullet],[data-pb-attack=arrow]) .pb-projectile{animation:pb-projectile-flight var(--pb-duration) linear}
.portrait-battle:is([data-pb-attack=bullet],[data-pb-attack=arrow]) .pb-projectile{width:30px;height:5px;border-radius:50%;background:#ffe4a3;box-shadow:0 0 7px #efbd76}
.portrait-battle[data-pb-target=hero] .pb-projectile{margin-left:-20px}
@keyframes pb-projectile-flight{0%,7%{opacity:0;transform:translate(0,0) scale(.5)}12%{opacity:1;transform:translate(0,0) scale(1)}51%{opacity:1;transform:translate(var(--pb-travel-x),var(--pb-travel-y)) scale(.85)}57%,100%{opacity:0;transform:translate(var(--pb-travel-x),var(--pb-travel-y)) scale(.2)}}
@keyframes pb-card-contact{0%,47%,100%{opacity:0;transform:scale(.8)}54%{opacity:.95;transform:scale(1)}76%{opacity:.3;transform:scale(1.04)}}
@keyframes pb-target-number{0%,48%{opacity:0;transform:translate(-50%,10px)}57%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-22px)}}
.pb-options{display:flex;align-items:start;gap:12px;justify-content:space-between}.pb-options .pb-descriptions{margin:4px 0 0;flex:1}.pb-audio-settings{position:relative;min-width:52px;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;margin:4px 0 0}.pb-audio-settings>summary{font:12px/1.35 Georgia!important;min-height:0!important;padding:4px 0!important;cursor:pointer}.pb-audio-settings[open]{position:relative;width:190px;max-width:100%;z-index:6;background:#241c13!important;padding:6px!important}.pb-audio-settings label{display:block;font:12px Georgia;margin-top:6px}.pb-audio-settings input{display:block;width:100%;min-width:0}.pb-audio-settings button{font:12px Georgia!important;min-height:32px!important;white-space:normal}
@media(min-width:901px){.portrait-battle{min-height:calc(100svh - 24px);display:flex;flex-direction:column}.pb-arena{flex:1;min-height:380px;grid-template-columns:minmax(0,1fr) minmax(180px,.65fr) minmax(0,1fr)}.pb-portrait{height:clamp(230px,38svh,520px);flex:none!important}.pb-controls{margin-top:auto}.pb-fighter h2{font-size:22px}}
@media(max-width:900px){.pb-options{gap:6px}.pb-audio-settings>summary{font-size:10px!important}.pb-options .pb-descriptions{margin-top:3px}.portrait-battle{background-color:#252218}.pb-projectile{width:15px;height:15px}.pb-fighter{align-self:stretch}}
@media(prefers-reduced-motion:reduce){.portrait-battle .pb-projectile,.portrait-battle .pb-card-effects *{animation:none!important}}
@media(min-width:901px){.pb-portrait{height:clamp(210px,29svh,380px)}.pb-arena{min-height:340px}.pb-exchange{justify-content:center}.pb-heading{margin-bottom:7px}}
.static-enemy-art>img{display:block;width:100%;height:100%;object-fit:contain;animation:none!important;transform:none!important}
@media(min-width:901px) and (max-height:800px){.pb-heading small{display:none}.pb-heading h1{font-size:20px;margin:2px 0}.pb-fighter>header{padding:6px 10px;min-height:58px}.pb-fighter h2{font-size:18px;margin:3px 0}.pb-portrait{height:clamp(150px,25svh,230px)}.pb-vitals{padding:7px 10px}.pb-vitals b{font-size:17px}.pb-vitals .pb-energy{margin-top:5px}.pb-stats{margin-top:5px}.pb-arena{min-height:320px;padding:12px}.pb-plan{padding:6px;margin-top:7px}.pb-exchange h3{font-size:15px;min-height:22px}.pb-exchange>strong{font-size:15px;min-height:30px}.pb-weapon-stage{height:140px}}
@media(max-width:900px) and (max-height:650px){.pb-portrait{height:17svh!important;min-height:80px!important;max-height:110px!important}.pb-exchange{display:none!important}.pb-arena{min-height:0!important}.pb-heading{margin-bottom:4px}.pb-fighter>header{min-height:49px!important;padding:5px!important}.pb-vitals{padding:5px!important}.pb-plan{margin-top:5px!important}.pb-controls{margin-top:5px!important}.portrait-battle{padding:8px!important}.pb-options{margin-bottom:0}}

.pb-basic-note{padding:10px 14px;border:1px solid #775b35;background:#17120d;margin:10px 0;color:#c3aa7e;font:15px Georgia;text-align:center}.pb-energy{min-height:20px}.pb-basic-note+.pb-controls{margin-top:5px}@media(max-width:650px){.pb-basic-note{font-size:12px;padding:8px}}

button[data-action="hero-tab"][data-tab="skills"]{display:none!important}

/* Contact follows the confirmed presentation clip; portraits and anatomy stay static. */
.pb-bite-mark,.pb-ram-mark,.pb-thrust-mark{display:none;fill:none;stroke:#f0d3a3;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.portrait-battle[data-pb-attack=bite] .pb-bite-mark,.portrait-battle[data-pb-attack=ram] .pb-ram-mark,.portrait-battle[data-pb-attack=thrust] .pb-thrust-mark{display:block}
.portrait-battle[data-pb-attack=breath] .pb-impact-mark{display:block;stroke:#f2aa65;stroke-width:10}
.pb-acting[data-pb-target=hero] .pb-hero .pb-card-effects svg,.pb-acting[data-pb-target=enemy] .pb-enemy .pb-card-effects svg{animation:pb-confirmed-contact var(--pb-recovery,300ms) ease-out var(--pb-contact,350ms) both}
.pb-acting[data-pb-target=hero] .pb-hero .pb-card-number,.pb-acting[data-pb-target=enemy] .pb-enemy .pb-card-number{animation:pb-confirmed-number var(--pb-recovery,300ms) ease-out var(--pb-contact,350ms) both}
.pb-acting:is([data-pb-attack=orb],[data-pb-attack=bullet],[data-pb-attack=arrow]) .pb-projectile{animation:pb-confirmed-flight var(--pb-travel,160ms) linear var(--pb-windup,300ms) both}
.portrait-battle[data-pb-attack=arrow] .pb-projectile{height:5px;width:42px;clip-path:polygon(0 32%,72% 32%,72% 0,100% 50%,72% 100%,72% 68%,0 68%);border-radius:0;background:#e5d0a3;box-shadow:none}
.portrait-battle[data-pb-attack=bullet] .pb-projectile{height:4px;width:24px;background:#fff2b2;box-shadow:0 0 9px #eab96a}
.portrait-battle[data-pb-attack=breath] .pb-projectile{width:var(--pb-distance,300px);height:72px;margin-top:-36px;margin-left:0;transform-origin:0 50%;border-radius:0;clip-path:polygon(0 43%,100% 5%,100% 95%,0 57%);background:linear-gradient(90deg,#fff1b3,#f6b961aa,#ec722477,transparent);box-shadow:none}
.pb-acting[data-pb-attack=breath] .pb-projectile{animation:pb-breath-cast var(--pb-travel,320ms) ease-out var(--pb-windup,570ms) both}
.pb-natural-weapon{color:#e8d7b7;filter:drop-shadow(0 0 5px #d8b66f66)}.pb-natural-breath{color:#f4b16a}.pb-natural-fist{color:#c4c4b7}
.pb-portrait .animal-attack,.pb-portrait .animal-attack *{animation-duration:var(--pb-recovery,430ms)}
.portrait-battle[data-pb-motion=false] :is(.pb-projectile,.pb-card-effects svg,.pb-card-number,.animal-attack-host){display:none!important}
@keyframes pb-confirmed-flight{0%{opacity:0;transform:translate(0,0) rotate(var(--pb-angle))}7%{opacity:1}90%{opacity:1;transform:translate(var(--pb-travel-x),var(--pb-travel-y)) rotate(var(--pb-angle))}100%{opacity:0;transform:translate(var(--pb-travel-x),var(--pb-travel-y)) rotate(var(--pb-angle))}}
@keyframes pb-confirmed-contact{0%{opacity:.95;transform:scale(.8)}40%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(1.05)}}
@keyframes pb-confirmed-number{0%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-20px)}}
@keyframes pb-breath-cast{0%{opacity:0;transform:rotate(var(--pb-angle)) scaleX(.05)}20%{opacity:.75}70%{opacity:.7;transform:rotate(var(--pb-angle)) scaleX(1)}100%{opacity:0;transform:rotate(var(--pb-angle)) scaleX(1)}}
@media(prefers-reduced-motion:reduce){.portrait-battle :is(.pb-projectile,.pb-card-effects svg,.pb-card-number,.animal-attack-host){display:none!important}}

.pb-natural-orb{color:#a7deef}.portrait-battle[data-pb-target=hero] .pb-thrust-mark{transform:rotate(180deg);transform-origin:center}
