.battle-v3-modal{background:#02050a!important;overflow:hidden}
.battle-v3-modal.battle-v3-preparing{opacity:1!important;pointer-events:auto!important;transition:none!important}
.battle-v3-modal>.battle-v3-live-shell,.battle-v3-live-shell{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;border:0!important;border-radius:0!important;background:#02060c!important;color:#eef8fb!important}
.battle-v3-header{position:absolute;z-index:12;top:0;left:0;right:0;height:72px;box-sizing:border-box;display:grid;grid-template-columns:minmax(190px,1fr) auto minmax(120px,1fr);align-items:center;gap:20px;padding:10px 24px;border-bottom:1px solid rgba(104,224,255,.24);background:linear-gradient(90deg,rgba(3,8,14,.96),rgba(8,18,28,.88),rgba(3,8,14,.96));pointer-events:none}
.battle-v3-header small{display:block;color:#66ddff;font-size:10px;font-weight:900;letter-spacing:.17em}.battle-v3-header strong{display:block;margin-top:3px;font-size:21px}.battle-v3-header>b{justify-self:end;color:#b6ff62;font-size:12px;letter-spacing:.12em}.battle-v3-versus{display:flex;align-items:center;gap:14px;color:#dbe8ed;font-size:12px;font-weight:800}.battle-v3-versus i{color:#71ddff;font-size:10px;font-style:normal}
.battle-v3-canvas-host{position:absolute;inset:72px 0 0;background-color:#06101a;background-position:center;background-size:cover;background-repeat:no-repeat}.battle-v3-live-shell[data-v3-field="HUNT"] .battle-v3-canvas-host{background-image:linear-gradient(rgba(2,7,12,.28),rgba(2,7,12,.56)),url("../assets/ui/project-v/battlefields/v3-nightmare-forest-battlefield-v1.png")}.battle-v3-live-shell[data-v3-field="TOWER"] .battle-v3-canvas-host{background-image:linear-gradient(rgba(2,7,12,.25),rgba(2,7,12,.55)),url("../assets/ui/project-v/battlefields/v3-infinite-tower-sanctum-v1.png")}.battle-v3-live-shell[data-v3-field="PVP"] .battle-v3-canvas-host{background-image:linear-gradient(rgba(2,7,12,.32),rgba(2,7,12,.62)),url("../assets/ui/coin-prediction/arena-v1.png")}.battle-v3-live-shell[data-v3-field="RAID"] .battle-v3-canvas-host{background-image:linear-gradient(rgba(2,7,12,.3),rgba(2,7,12,.6)),url("../assets/ui/project-v/battlefields/v3-world-raid-obsidian-citadel-v1.png")}.battle-v3-live-shell[data-v3-field="SIEGE"] .battle-v3-canvas-host{background-image:linear-gradient(rgba(2,7,12,.3),rgba(2,7,12,.6)),url("../assets/ui/project-v/battlefields/v3-siege-fortress-courtyard-v1.png")}.battle-v3-canvas-host canvas{display:block;width:100%!important;height:100%!important}.battle-v3-loader{position:absolute;z-index:9;inset:0;display:grid;place-content:center;text-align:center;gap:8px;background:linear-gradient(180deg,rgba(3,9,15,.24),rgba(3,9,15,.68))}.battle-v3-loader i{width:36px;height:36px;margin:auto;border:2px solid #29404f;border-top-color:#65e1ff;border-radius:50%;animation:battleV3Spin .8s linear infinite}.battle-v3-loader b{font-size:15px}.battle-v3-loader span{color:#a6bac4;font-size:12px}.battle-v3-live-shell.is-v3-ready .battle-v3-loader,.battle-v3-live-shell.is-result-visible .battle-v3-loader{display:none}
.battle-v3-status{position:absolute;z-index:14;left:18px;bottom:18px;max-width:min(52%,680px);box-sizing:border-box;padding:10px 14px;border-left:2px solid #61dcff;background:rgba(3,8,14,.86);color:#c2d5de;font-size:12px;font-weight:750;pointer-events:none}
.battle-v3-result{z-index:30!important}.battle-v3-live-shell:not(.is-result-visible)>.battle-v3-result{opacity:0;pointer-events:none}.battle-v3-live-shell.is-result-visible>.battle-v3-result{opacity:1;pointer-events:auto}
.battle-v3-live-shell .pv-ultimate-layer{position:absolute;z-index:25;inset:0;display:flex;align-items:flex-end;padding:32px;box-sizing:border-box;background:#02040a;opacity:0;pointer-events:none;transition:opacity .12s}.battle-v3-live-shell .pv-ultimate-layer.is-visible{opacity:1}.battle-v3-live-shell .pv-ultimate-layer video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.battle-v3-live-shell .pv-ultimate-layer>div{position:relative}.battle-v3-live-shell .pv-ultimate-layer small,.battle-v3-live-shell .pv-ultimate-layer strong{display:block}
@keyframes battleV3Spin{to{transform:rotate(1turn)}}
/* V1901: .nightmare-battle-mark(pve-nightmare-v1692.css)는 스테이지 기준 top:10~24px,
   right:10~28px 에 붙는다. V3 셸의 #battlePhase(.battle-v3-header>b)도 헤더 우측 끝
   세로 중앙이라 좌표가 그대로 겹쳐서, 모바일에서 초록 "SERVER ASSET SYNC" 위에
   핑크 "DAMAGE LIMIT RELEASED" 가 포개져 둘 다 못 읽는 상태였다.
   V3 셸에서만 NIGHTMARE 마크를 헤더(72px/60px) 아래로 내린다. */
.battle-v3-live-shell .nightmare-battle-mark{top:82px}
@media(max-width:760px){.battle-v3-live-shell .nightmare-battle-mark{top:68px}.battle-v3-header{height:60px;grid-template-columns:1fr auto;padding:8px 12px}.battle-v3-header>div:first-child small{font-size:8px}.battle-v3-header strong{font-size:16px}.battle-v3-versus{display:none}.battle-v3-header>b{font-size:9px}.battle-v3-canvas-host{inset:60px 0 0}.battle-v3-status{left:10px;right:10px;bottom:10px;max-width:none;padding:8px 10px;font-size:10px}.battle-v3-loader span{font-size:10px}}
@media(prefers-reduced-motion:reduce){.battle-v3-loader i{animation:none}}
/* V1796 출전 카드 로스터 — 기존 카드 프레임(card.css .card-frame, 2:2.82)을 그대로 쓴다.
   폭/높이를 새로 잡으면 카드가 찌부되므로, 원본 180px 프레임을 transform:scale 로
   축소만 한다. --v3-card-w 와 --v3-card-s 는 항상 짝(w/180)으로 맞춰야 한다. */
.battle-v3-dock{position:absolute;z-index:20;left:0;right:0;bottom:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:9px;padding:0 18px calc(12px + env(safe-area-inset-bottom,0px));pointer-events:none}
.battle-v3-roster{--v3-card-w:112px;--v3-card-s:.6222;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:20px}.battle-v3-roster[hidden]{display:none}.battle-v3-roster.is-versus{--v3-card-w:96px;--v3-card-s:.5333;justify-content:space-between}
.battle-v3-roster-side{display:flex;flex-direction:column;gap:5px;min-width:0}.battle-v3-roster-side[hidden]{display:none}.battle-v3-roster.is-versus>[data-v3-roster-side="B"]{align-items:flex-end}
.battle-v3-roster-side>header{display:flex;align-items:baseline;gap:8px;padding:0 2px}.battle-v3-roster-side>header small{color:#66ddff;font-size:9px;font-weight:900;letter-spacing:.16em}.battle-v3-roster-side>header b{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#eef8fb;font-size:11px;font-weight:900;text-shadow:0 2px 6px rgba(0,0,0,.9)}
.battle-v3-roster-side>ol{display:flex;align-items:flex-end;gap:9px;margin:0;padding:0;list-style:none}
/* 카드 한 칸: 축소된 프레임이 차지할 만큼만 자리를 잡는다(253.8px = 180 * 2.82/2). */
.battle-v3-roster-card{display:flex;flex-direction:column;align-items:center;gap:4px;width:var(--v3-card-w);flex:0 0 auto;transition:opacity .18s,filter .18s}
.battle-v3-roster-slot{position:relative;display:block;width:var(--v3-card-w);height:calc(253.8px * var(--v3-card-s))}
.battle-v3-roster .battle-v3-roster-frame{position:absolute;top:0;left:0;width:180px;margin:0;transform:scale(var(--v3-card-s));transform-origin:top left;cursor:default;transition:none}
.battle-v3-roster .battle-v3-roster-frame:hover{transform:scale(var(--v3-card-s));filter:none}
.battle-v3-roster-row{color:#8fa5b2;font-size:9px;font-weight:800;letter-spacing:.05em;line-height:1;text-shadow:0 2px 6px rgba(0,0,0,.9);white-space:nowrap}
.battle-v3-roster-ko{position:absolute;z-index:23;inset:0;display:none;place-content:center;border-radius:14px;background:rgba(2,5,10,.6);color:#ff7d8f;font-size:15px;font-style:normal;font-weight:1000;letter-spacing:.12em;text-shadow:0 2px 8px #000}
.battle-v3-roster-card.is-ko{opacity:.5;filter:grayscale(.9)}.battle-v3-roster-card.is-ko .battle-v3-roster-ko{display:grid}
.battle-v3-roster-card.is-alive .battle-v3-roster-slot::after{content:"";position:absolute;z-index:21;inset:-3px;border-radius:18px;border:1px solid rgba(123,255,176,.62);box-shadow:0 0 12px rgba(123,255,176,.28);pointer-events:none}
.battle-v3-verdict{margin:0;max-width:min(94%,760px);box-sizing:border-box;padding:7px 16px;border:1px solid rgba(104,224,255,.34);border-radius:999px;background:rgba(3,8,14,.92);color:#dbe8ed;font-size:12px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.battle-v3-verdict[hidden]{display:none}.battle-v3-verdict.is-win{border-color:rgba(123,255,176,.5);color:#b6ff62}.battle-v3-verdict.is-lose{border-color:rgba(255,125,143,.5);color:#ff9fae}
/* 결과창(.battle-message)은 bottom:34px 에 붙는다. 도크 실측 높이만큼 밀어 올린다. */
/* style.css 의 @media(max-width:800px) 규칙이 결과창 bottom 을 !important 로 못박아
   둬서, 여기서도 !important 로 덮어야 로스터 위로 올라간다(특이도는 이쪽이 높다). */
.battle-v3-live-shell.is-roster-visible .battle-v3-result{bottom:calc(var(--v3-dock-h,0px) + 10px)!important}
.battle-v3-live-shell.is-roster-visible .battle-v3-status{bottom:auto;top:84px;max-width:min(46%,560px)}
@media(max-width:1180px){.battle-v3-roster.is-versus{--v3-card-w:76px;--v3-card-s:.4222;gap:10px}.battle-v3-roster.is-versus .battle-v3-roster-side>ol{gap:6px}}
@media(max-width:760px){
  .battle-v3-dock{gap:6px;padding:0 8px 8px}
  .battle-v3-roster{--v3-card-w:66px;--v3-card-s:.3667;gap:8px}
  /* 모바일 PVP 는 5+5 장을 좌우로 두면 화면 폭을 넘어 겹친다. 위아래로 쌓는다. */
  .battle-v3-roster.is-versus{--v3-card-w:58px;--v3-card-s:.3222;flex-direction:column;align-items:center;gap:6px}
  .battle-v3-roster.is-versus>[data-v3-roster-side="B"]{align-items:center}
  .battle-v3-roster-side>ol{gap:5px}
  .battle-v3-roster-side>header small{font-size:8px}.battle-v3-roster-side>header b{max-width:120px;font-size:9px}
  .battle-v3-roster-row{font-size:8px}.battle-v3-roster-ko{font-size:11px;border-radius:9px}
  .battle-v3-verdict{font-size:10px;padding:5px 11px}
  .battle-v3-live-shell.is-roster-visible .battle-v3-status{top:66px;left:8px;right:8px;max-width:none}
  .battle-v3-live-shell[data-v3-field="PVP"].is-roster-visible .battle-v3-status{display:none}
}
@media(max-height:620px) and (orientation:landscape){.battle-v3-dock{gap:6px;padding:0 12px calc(8px + env(safe-area-inset-bottom,0px))}.battle-v3-roster{--v3-card-w:62px;--v3-card-s:.3444;gap:10px}.battle-v3-roster.is-versus{--v3-card-w:54px;--v3-card-s:.3}.battle-v3-roster-side>header small{font-size:8px}.battle-v3-verdict{font-size:10px;padding:5px 11px}}
@media(max-width:374px){.battle-v3-roster,.battle-v3-roster.is-versus{--v3-card-w:54px;--v3-card-s:.3}}

/* V2126: one report, with its own scroll area above the unchanged card dock. */
.battle-v3-live-shell>.battle-v3-result:has(>.v3-battle-report){top:88px!important;bottom:calc(var(--v3-dock-h,0px) + 14px)!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(600px,calc(100% - 32px))!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;display:flex;align-items:center;justify-content:center;text-align:left;text-shadow:none;backdrop-filter:none;overflow:visible}
.v3-battle-report{--report-accent:#c8ff6b;box-sizing:border-box;width:100%;max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #35415a;border-radius:12px;background:linear-gradient(135deg,#172238 0,#111828 65%);box-shadow:0 20px 70px #0009;color:#f3f5ff;font-family:'Noto Sans KR',sans-serif;line-height:1.5}
.v3-battle-report.is-loss{--report-accent:#ff9caa}.v3-battle-report.is-draw{--report-accent:#a5c8fa}
.battle-v3-result .v3-battle-report span{margin:0!important}.battle-v3-result .v3-report-details summary span{margin-left:auto!important}
.v3-report-header{display:flex;align-items:center;gap:18px;padding:24px 26px 22px;border-top:3px solid var(--report-accent);flex:none}
.v3-report-emblem{display:grid;place-items:center;flex:none;width:52px;height:52px;border:1px solid color-mix(in srgb,var(--report-accent) 38%,transparent);border-radius:50%;background:color-mix(in srgb,var(--report-accent) 7%,transparent);color:var(--report-accent);font-size:28px;font-weight:500}
.v3-report-mode{display:block;color:var(--report-accent);font-size:11px;letter-spacing:.04em;font-weight:700}
.v3-report-header h2{margin:2px 0 3px;color:#f3f5ff;font-size:32px;font-weight:900;letter-spacing:-.045em;line-height:1.3}
.v3-report-header p{margin:0;color:#a9b5cd;font-size:12px;line-height:1.5;word-break:keep-all}
.v3-report-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 26px 8px;scrollbar-width:thin;scrollbar-color:#43516c transparent}
.v3-report-rewards{display:flex;flex-wrap:wrap;gap:12px 24px;margin:0 0 18px;padding:18px 0;border-top:1px solid #2d3850;border-bottom:1px solid #2d3850}
.v3-report-stat{min-width:0;flex:1}.v3-report-stat dt{color:#a6b2c9;font-size:11px;font-weight:600}.v3-report-stat dd{margin:3px 0 0;font-family:'Barlow Condensed','Noto Sans KR',sans-serif;font-variant-numeric:tabular-nums;color:#f3f5ff;font-size:21px;font-weight:700;overflow-wrap:anywhere}
.v3-report-rewards dd{font-size:30px;line-height:1.2;letter-spacing:-.02em}.v3-report-rewards .is-score dd{color:var(--report-accent)}.v3-report-rewards .is-coin dd{color:#f5d88c}
.v3-report-drop{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;padding:0 0 16px;font-size:12px}.v3-report-drop>span{color:#a6b2c9}.v3-report-drop>strong{color:#f3f5ff;font-size:13px}.v3-report-drop>small{grid-column:2;color:#c8ff6b;font-size:11px}
.v3-report-adjustment{margin:0 0 14px;color:#adbcd4;font-size:11px}
.v3-report-details{border:0;border-radius:0;background:none}.v3-report-details summary{display:flex;align-items:center;gap:8px;cursor:pointer;padding:8px 0 12px;color:#dce4f4;font-size:12px;font-weight:700;list-style:none}.v3-report-details summary::-webkit-details-marker{display:none}.v3-report-details summary::before{content:'+';color:#a3b6d4;font-size:16px;width:12px}.v3-report-details[open] summary::before{content:'−'}.v3-report-details summary span{margin-left:auto;color:#94a2bd;font-size:11px;font-weight:400}
.v3-report-details>dl{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px;margin:0;padding:12px 0 18px;border-top:1px solid #29354b}.v3-report-details dd{font-size:17px}
.v3-report-suit{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 12px;padding:12px 0;border-top:1px solid #29354b;font-size:11px;color:#a6b2c9}.v3-report-suit b{color:#dce4f4}
.v3-report-footer{flex:none;padding:12px 26px 22px;background:#111828;border-top:1px solid #263148}
.v3-report-confirm{display:flex;width:100%;min-height:48px;align-items:center;justify-content:space-between;padding:12px 17px;border:1px solid #c8ff6b;border-radius:5px;background:#c8ff6b;color:#16220b;font:800 14px 'Noto Sans KR',sans-serif;cursor:pointer;transition:background .15s}.v3-report-confirm span{font-size:21px;line-height:1}.v3-report-confirm:hover{background:#daff9c}.v3-report-confirm:focus-visible,.v3-report-details summary:focus-visible{outline:2px solid #fff;outline-offset:3px}
.battle-v3-live-shell.is-result-visible:has(.v3-battle-report)>.battle-v3-status{display:none}
@media(max-width:760px){.battle-v3-live-shell>.battle-v3-result:has(>.v3-battle-report){top:72px!important;bottom:calc(var(--v3-dock-h,0px) + 10px)!important;width:calc(100% - 24px)!important}.v3-report-header{padding:16px;gap:12px}.v3-report-emblem{width:40px;height:40px;font-size:24px}.v3-report-header h2{font-size:26px}.v3-report-header p{font-size:11px}.v3-report-body{padding:0 16px 4px}.v3-report-rewards{gap:12px;margin-bottom:8px;padding:14px 0}.v3-report-rewards dd{font-size:26px}.v3-report-footer{padding:12px 16px 16px}.v3-report-confirm{min-height:46px;font-size:13px}.v3-report-stat dt{font-size:10px}.v3-report-details>dl{gap:12px}.v3-report-details dd{font-size:16px}}
@media(max-height:620px) and (orientation:landscape){.battle-v3-live-shell>.battle-v3-result:has(>.v3-battle-report){top:78px!important;bottom:calc(var(--v3-dock-h,0px) + 6px)!important}.v3-report-header{padding:10px 18px;gap:12px}.v3-report-header h2{font-size:22px}.v3-report-emblem{width:34px;height:34px;font-size:22px}.v3-report-header p{display:none}.v3-report-mode{font-size:10px}.v3-report-footer{padding:8px 18px}.v3-report-confirm{min-height:40px;padding:8px 14px;font-size:12px}.v3-report-rewards{padding:10px 0;margin-bottom:4px}.v3-report-rewards dd{font-size:24px}}
