/* Three fixed frames inside the original opponents panel. Only their contents change. */
.world-panel-body:has(.world-opponents){display:flex;align-items:center;overflow-y:auto;scrollbar-width:none}
.world-opponents{--enemy-gap:7px;display:flex;gap:var(--enemy-gap);align-items:stretch;width:100%;height:min(100%,224px);min-height:170px;padding:0;overflow-x:auto;overflow-y:hidden;box-sizing:border-box;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;touch-action:pan-x pan-y;cursor:grab;isolation:isolate}
.world-opponents::-webkit-scrollbar,.world-panel-body:has(.world-opponents)::-webkit-scrollbar{display:none;width:0;height:0}
.world-opponents.is-dragging,.world-opponents.is-wheeling{scroll-snap-type:none;scroll-behavior:auto}.world-opponents.is-dragging{cursor:grabbing;user-select:none}
.world-opponents>.opponent-card{position:relative;flex:0 0 calc((100% - var(--enemy-gap)*2)/3);min-width:0;height:100%;min-height:170px;box-sizing:border-box;overflow:hidden;contain:layout paint;scroll-snap-align:start;--frame-ink:#a39b88;border:1px solid var(--frame-ink);border-radius:7px;color:#43574e;background:radial-gradient(ellipse at 50% 10%,#fffbed,#f0e7d4);box-shadow:inset 0 0 0 2px #fff7,inset 0 0 10px #9c87521a}
.world-opponents>.opponent-card.is-boss{--frame-ink:#86585c;background:radial-gradient(ellipse at 50% 10%,#faf0e6,#e6d8cb);box-shadow:inset 0 0 0 2px #fffae433,inset 0 0 10px #80545a18}
.opponent-frame{position:absolute;inset:3px;z-index:6;pointer-events:none;border:1px solid #b3a68c26;border-radius:4px}.opponent-frame>svg{position:absolute;width:11px;height:11px;fill:none;stroke:var(--frame-ink);stroke-width:1.1;opacity:.75}.opponent-frame>.tl{left:0;top:0}.opponent-frame>.tr{right:0;top:0;transform:scaleX(-1)}.opponent-frame>.bl{left:0;bottom:0;transform:scaleY(-1)}.opponent-frame>.br{right:0;bottom:0;transform:scale(-1)}
.opponent-empty,.opponent-respawn,.opponent-active{position:absolute;inset:0;box-sizing:border-box;opacity:0;visibility:hidden;transition:opacity .32s ease,visibility .32s}
.opponent-card[data-phase=EMPTY]>.opponent-empty,.opponent-card[data-phase=RESPAWNING]>.opponent-respawn,.opponent-card[data-phase=ACTIVE]>.opponent-active{opacity:1;visibility:visible}
.opponent-empty{display:grid;place-items:center;background:repeating-linear-gradient(48deg,transparent 0 27px,#9a865507 28px 29px)}.opponent-empty>img{width:29px;height:29px;object-fit:contain;filter:grayscale(1);opacity:.17}
.opponent-active{display:flex;flex-direction:column;gap:4px;padding:9px 7px 8px}
.opponent-inspect{display:grid;grid-template-rows:14px minmax(32px,1fr) 26px 35px;align-items:center;gap:3px;flex:1;min-width:0;min-height:0;width:100%;padding:0;border:0;background:none;color:inherit;text-align:center}
.opponent-top{display:flex;justify-content:space-between;align-items:center;gap:3px;min-width:0;color:#837862;font:500 8px/13px system-ui,sans-serif}.opponent-quantity{display:block;min-width:15px;font-size:9px;font-weight:600;text-align:left;font-variant-numeric:tabular-nums}.opponent-level{font-size:8px;white-space:nowrap}
.opponent-art{display:block;min-height:0;height:100%;max-height:92px;width:100%;padding:1px 2px 0;box-sizing:border-box;pointer-events:none}.opponent-art>img,.opponent-art>svg{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;pointer-events:none}
.opponent-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;height:26px;margin:0;overflow:hidden;overflow-wrap:anywhere;align-content:center;font:700 10px/13px Interface,sans-serif;color:#3b5c51}.is-boss .opponent-name{color:#75474d}
.opponent-stats{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:16px 16px;gap:3px 4px;min-width:0;width:100%;padding:0 1px;box-sizing:border-box;color:#70705e}.opponent-stats>span{display:flex;align-items:center;gap:3px;min-width:0;height:16px;text-align:left}.opponent-stats b{min-width:0;font:500 8.5px/10px system-ui,sans-serif;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;letter-spacing:-.1px}.opponent-stats .icon,.opponent-stats img{display:block!important;flex:0 0 12px!important;width:12px!important;height:12px!important;min-width:0;margin:0;font-size:12px;object-fit:contain}.opponent-stats .icon svg{width:12px;height:12px}
.opponent-attack.world-attack-button{display:flex;align-items:center;justify-content:center;flex:none;gap:0;width:100%;height:27px;min-height:27px;max-height:27px;min-width:0;padding:3px 1px;border:1px solid #b88d8e;border-radius:5px;background:linear-gradient(#efd3d3,#ddb8bb);color:#764d51;font:700 10px/13px Interface,sans-serif;box-shadow:inset 0 1px #fff8;touch-action:manipulation}.opponent-attack:disabled{opacity:.55;background:#e4d9cb;border-color:#c9b5a6;cursor:default}
.opponent-inspect:focus-visible,.opponent-attack:focus-visible,.world-opponents:focus-visible{outline:2px solid #907958;outline-offset:-2px}
.opponent-respawn{display:grid;place-items:center;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,#deded4,#afb4ad)}.is-boss .opponent-respawn{background:radial-gradient(ellipse at 50% 42%,#73555c,#483840)}
.opponent-respawn:before{content:"";position:absolute;inset:9px;border:1px solid #7d85723d;border-radius:4px;background:repeating-linear-gradient(55deg,transparent 0 28px,#ffffff09 29px 30px)}.is-boss .opponent-respawn:before{border-color:#b9a29b2e}
.opponent-ritual-seal{position:absolute;left:50%;top:46%;width:76%;aspect-ratio:1;transform:translate(-50%,-50%);border:1px solid #68745f27;border-radius:50%;box-shadow:inset 0 0 0 5px #ffffff0a;opacity:.7}.is-boss .opponent-ritual-seal{border-color:#d7c1ae20}
.opponent-vessel{position:relative;z-index:2;width:40px;height:77px;max-width:54%;opacity:1;filter:drop-shadow(0 2px 1px #25302930)}.opponent-vessel.is-skull{width:53px;height:61px;max-width:62%}
.opponent-vessel-art,.opponent-vessel-fill,.opponent-glass-detail{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}.opponent-vessel-art{z-index:1}.is-hourglass>.opponent-vessel-art{z-index:3}.opponent-vessel-fill{z-index:2;overflow:hidden}.opponent-glass-detail{z-index:3;opacity:.28;mix-blend-mode:screen}
.opponent-blood{opacity:.86}.opponent-blood-level{mix-blend-mode:normal}.opponent-blood-surface{fill:none;stroke:#ffb29b;stroke-width:.8;opacity:.85}
.opponent-sand-upper,.opponent-sand-lower{opacity:.98;stroke:#f7d99c;stroke-width:.35}.opponent-sand-stream{stroke:#e0bb78;stroke-width:1;stroke-dasharray:.7 1.5;animation:opponent-sand-flow .18s linear infinite}.opponent-sand-glint{fill:#f5d99f;opacity:.8}
.opponent-chains{position:absolute;inset:0;width:100%;height:100%;z-index:1;overflow:hidden}.opponent-chain{opacity:1}.chain-run{transform:none}.chain-rings{fill:none;stroke-width:.95;vector-effect:non-scaling-stroke}.chain-glints{fill:none;stroke:#e6dfce;stroke-width:.5;opacity:.78;vector-effect:non-scaling-stroke}.chain-rivet{fill:#858a7c;stroke:#555e52;stroke-width:.7}.is-boss .chain-rivet{fill:#9b8983;stroke:#332b30}.chain-debris{opacity:0;fill:none;stroke:#c0b6a7;stroke-width:1;vector-effect:non-scaling-stroke;transform-box:fill-box;transform-origin:center}
.opponent-remaining{position:absolute;bottom:12px;left:0;right:0;text-align:center;font:600 10px/14px Interface,sans-serif;letter-spacing:.7px;font-variant-numeric:tabular-nums;color:#596151}.is-boss .opponent-remaining{color:#e4cfc3}

.is-breaking .opponent-vessel{opacity:0;transition:opacity .34s ease .25s}.is-breaking .opponent-ritual-seal{opacity:0;transition:opacity .4s ease .15s}.is-breaking .opponent-remaining{opacity:0;transition:opacity .2s}
.is-arriving .opponent-art{animation:opponent-art-appear .65s ease-out both}.is-arriving .opponent-top,.is-arriving .opponent-name{animation:opponent-detail-appear .5s ease-out .09s both}.is-arriving .opponent-stats,.is-arriving .opponent-attack{animation:opponent-detail-appear .42s ease-out .2s both}



@keyframes opponent-sand-flow{to{stroke-dashoffset:-2.2}}@keyframes opponent-art-appear{from{opacity:0}to{opacity:1}}@keyframes opponent-detail-appear{from{opacity:0}to{opacity:1}}
@media(max-width:350px){.opponent-active{padding-inline:6px}.opponent-name{font-size:9px}.opponent-stats{gap:3px}.opponent-stats b{font-size:8px}.opponent-stats .icon,.opponent-stats img{flex-basis:11px!important;width:11px!important;height:11px!important}.opponent-stats>span{gap:2px}}
@media(min-width:900px){.world-opponents{--enemy-gap:10px;height:min(100%,238px);min-height:212px}.world-opponents>.opponent-card{min-height:212px}.opponent-active{padding:11px 9px 9px}.opponent-inspect{grid-template-rows:16px minmax(42px,1fr) 28px 37px;gap:4px}.opponent-name{height:28px;font-size:12px;line-height:14px}.opponent-stats b{font-size:10px}.opponent-top,.opponent-level{font-size:10px}.opponent-quantity{font-size:11px}.opponent-attack.world-attack-button{height:29px;min-height:29px;max-height:29px;font-size:12px}.opponent-vessel{width:45px;height:85px}.opponent-vessel.is-skull{width:60px;height:69px}}
@media(prefers-reduced-motion:reduce){.world-opponents{scroll-behavior:auto}.opponent-empty,.opponent-respawn,.opponent-active,.opponent-vessel,.opponent-ritual-seal,.opponent-remaining{transition:none!important}.chain-fixed,.chain-tip,.chain-debris,.opponent-sand-stream,.is-arriving *{animation:none!important}}
.reduced-motion .chain-fixed,.reduced-motion .chain-tip,.reduced-motion .chain-debris,.reduced-motion .opponent-sand-stream,.reduced-motion .is-arriving *{animation:none!important}

.world-opponents.motion-paused *{animation-play-state:paused!important}

/* All three states keep one measured frame. Loot has its own nested scroll. */
.world-opponents{height:min(100%,238px);min-height:211px;--enemy-gap:8px}
.world-opponents>.opponent-card{min-height:211px;border-radius:8px;background:radial-gradient(ellipse at 50% 14%,#fff4d9,#e8dcc1);box-shadow:inset 0 0 0 2px #fff7e999,inset 0 0 9px #8e784e12}
.world-opponents>.opponent-card.is-boss{background:radial-gradient(ellipse at 50% 14%,#f8ecdc,#e0ccbd)}
.opponent-active{gap:5px;padding:10px 7px 9px}.opponent-inspect{grid-template-rows:13px minmax(38px,1fr) 27px 34px;gap:4px}.opponent-art{max-height:70px;padding:1px 1px 0}.opponent-name{height:27px;font-size:10px;line-height:13px}.opponent-stats{gap:2px 4px;padding:0 1px}.opponent-stats>span{gap:3px;justify-content:flex-start}.opponent-top{padding-inline:1px;box-sizing:border-box}
.opponent-loot{display:flex;align-items:center;flex:0 0 28px;gap:4px;width:100%;min-width:0;height:28px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y;border-top:1px solid #ab946244;padding:3px 0 0;box-sizing:border-box;cursor:grab}
.opponent-loot::-webkit-scrollbar{display:none}.opponent-loot>button{position:relative;display:grid;place-items:center;flex:0 0 24px;width:24px;min-width:24px;height:24px;min-height:24px;padding:2px;border:1px solid #b6a17388;border-radius:4px;background:#f2e5c9;box-shadow:inset 0 0 0 1px #fff3;scroll-snap-align:start}.opponent-loot>button>img{display:block;width:20px;height:20px;object-fit:contain;pointer-events:none}.opponent-loot>button>small{position:absolute;bottom:0;right:1px;font:600 6px/8px system-ui,sans-serif;color:#655c46;background:#eee1c7d9;border-radius:2px}.opponent-loot.no-loot{justify-content:center;color:#9a8b6d;font:italic 7px/12px Interface,sans-serif}.opponent-loot>button:focus-visible{outline:1px solid #657f64;outline-offset:-2px}
.opponent-respawn{background:radial-gradient(ellipse at 50% 44%,#d9d8cf,#b2b6ad)}.is-boss .opponent-respawn{background:radial-gradient(ellipse at 50% 44%,#684b53,#43343d)}
.opponent-ritual-seal{opacity:.36}
.opponent-vessel.is-skull>.opponent-vessel-art{z-index:1}.opponent-vessel.is-skull>.opponent-vessel-fill{z-index:2}.opponent-vessel.is-skull .opponent-blood{opacity:1}.opponent-vessel.is-skull .opponent-blood-surface{stroke:#f8b1a1;stroke-width:.65;opacity:1;fill:none}
.is-breaking .chain-fixed{animation:opponent-chain-release .46s cubic-bezier(.25,.6,.3,1) both}.is-breaking .chain-tip{animation:opponent-chain-fall .46s ease-out both}.is-breaking .chain-debris{animation:opponent-link-drop .42s ease-out both;animation-delay:70ms}.is-breaking .opponent-vessel{transition:opacity .28s ease .18s}
@keyframes opponent-chain-release{0%,15%{opacity:1;transform:translate(0,0)}45%{opacity:1}100%{opacity:0;transform:translate(var(--chain-x),var(--chain-y))}}
@keyframes opponent-chain-fall{0%,15%{opacity:1;transform:translate(0,0)}100%{opacity:0;transform:translate(0,13px) rotate(var(--chain-turn))}}
@keyframes opponent-link-drop{0%{opacity:1;transform:translate(0,0)}100%{opacity:0;transform:translate(0,9px) rotate(38deg)}}
@media(max-width:350px){.opponent-active{padding-inline:6px;gap:4px}.opponent-name{font-size:9px}.opponent-stats b{font-size:8px}.opponent-loot{gap:3px}.opponent-loot>button{flex-basis:22px;width:22px;min-width:22px;height:22px;min-height:22px}.opponent-loot>button>img{width:18px;height:18px}}
@media(min-width:900px){.world-opponents{height:min(100%,252px);min-height:223px}.opponent-art{max-height:79px}.opponent-name{font-size:11px}.opponent-loot{flex-basis:30px;height:30px}.opponent-loot>button{flex-basis:26px;width:26px;height:26px}}

.world-opponents>.opponent-card.is-wandering,.world-opponents>.opponent-card.is-wandering .opponent-front,.world-opponents>.opponent-card.is-wandering .opponent-reverse,.location-choice.world-choice.choice-hunter,.location-choice.world-choice.choice-merchant{--frame-ink:#889842;border-color:#a2ae6c;background:linear-gradient(148deg,#fffef5 6%,#edf2d6 57%,#dbe5b4 100%);color:#3f542d}
.world-opponents>.opponent-card.is-wandering .opponent-name{color:#495b33}

.world-opponents>.relic-card.is-wandering{--frame-ink:#708638;--item-edge:#819b39;--item-wash:#cbdf84;--spark-color:#deea95;--edge-a:#6c8b2c;--edge-b:#edf5b2;--edge-c:#95b445;border:1px solid #859e46;background:#c4da81;box-shadow:inset 0 0 0 2px #eff5bb,inset 0 0 0 3px #859f41}
.world-opponents>.relic-card.is-wandering .relic-face{background:radial-gradient(ellipse at 75% 8%,#d1e892,#e8f0bb 35%,#c9df89 72%,#a5c461)!important}
.world-opponents>.monster-collectible.is-wandering .opponent-frame{border:1px solid #859d4c99;opacity:.9}.world-opponents>.monster-collectible.is-wandering .opponent-frame>svg{width:13px;height:13px;stroke:#6a862e;stroke-width:1.35}.world-opponents>.is-wandering .opponent-frame svg{color:#758c35;opacity:.9}
.world-opponents>.is-wandering .card-edge{background:linear-gradient(90deg,#759b2b,#e6ef9c,#849e39)}.world-opponents>.is-wandering .contour-outer{stroke:#799332;filter:none}.world-opponents>.is-wandering .contour-inner{stroke:#edf5b2;filter:none}

.world-opponents>.monster-collectible.is-wandering .item-contour .contour-inner{stroke:#eaf7a4;stroke-width:1.2;filter:none}
@media(prefers-reduced-motion:no-preference){
 html:not(.perf-lite):not(.simplified-mode) .world-opponents>.monster-collectible.is-wandering[data-phase=ACTIVE] .opponent-front .contour-inner{stroke:#edffad;stroke-width:2;stroke-dasharray:51 349;filter:drop-shadow(0 0 1px #b9e259);animation:wander-rim 5.2s linear infinite}
 @keyframes wander-rim{from{stroke-dashoffset:0}to{stroke-dashoffset:-400}}
}
