/* Wynik, przeniesienie frontu i czat korzystają ze stałych warstw strony. */
#battle-result { position:fixed; inset:0; z-index:100; width:auto; padding:0; border:0; border-radius:0; background:linear-gradient(90deg,rgba(3,9,17,.12),rgba(3,9,17,.35) 42%,rgba(3,9,17,.96) 74%); color:#eef5ff; font-family:system-ui,sans-serif; pointer-events:none; overflow:auto; }
#battle-result[hidden] { display:none; }
.battle-session { position:absolute; top:5vh; left:4vw; color:#8ca3b9; font-size:10px; font-weight:700; letter-spacing:2px; }
.battle-content { width:min(500px,44vw); margin:11vh 5vw 32px auto; }
.battle-eyebrow { font-size:10px; font-weight:800; letter-spacing:2.2px; color:#94afc6; }
.battle-hero { display:flex; align-items:center; gap:20px; }
.battle-shield { display:flex; filter:drop-shadow(0 0 20px #599aff35); }
#battle-result h1.battle-verdict { margin:4px 0 0; font-size:clamp(32px,4.6vw,66px); font-weight:900; line-height:1; letter-spacing:3px; color:#8cc9ff; }
#battle-result[data-winner=red] h1.battle-verdict { color:#ff858a; }
#battle-result p.battle-outcome { margin:18px 0 24px; color:#dce7f0; font-size:15px; }
.battle-tickets { display:flex; gap:12px; margin-bottom:24px; }
.battle-team { flex:1; display:flex; align-items:center; justify-content:space-between; padding:13px 16px; border:1px solid #ffffff15; border-left:3px solid #82b8ff; background:#82b8ff0a; }
.battle-team.red { border-left-color:#ff7c82; background:#ff7c820a; }
.battle-team small { color:#82b8ff; font-size:10px; letter-spacing:1px; }.battle-team.red small { color:#ff9398; }
.battle-team strong { font-size:24px; font-variant-numeric:tabular-nums; }
.battle-destination { position:relative; display:flex; align-items:center; min-height:124px; padding:18px 20px; border:1px solid #91badf35; background:linear-gradient(120deg,#28435c40,#0c1b2860); overflow:hidden; }
.battle-destination-copy { position:relative; z-index:1; max-width:75%; }
#battle-result h2.battle-country { margin:7px 0; color:#fff; font-size:clamp(25px,2.7vw,40px); line-height:1.1; font-weight:850; letter-spacing:-.5px; }
#battle-result p.battle-biome { margin:8px 0 0; color:#9eb6ca; font-size:12px; }
.battle-country-map { width:180px; height:130px; position:absolute; right:-8px; opacity:.32; color:#8ecaff; }
.battle-country-map path { fill:#527fa54a; stroke:currentColor; stroke-width:1.5; stroke-linejoin:round; }
.battle-countdown { display:block; margin:21px 0 10px; color:#d4e7f9; font-size:12px; letter-spacing:1.8px; font-variant-numeric:tabular-nums; }
.battle-progress { height:3px; background:#ffffff12; overflow:hidden; }
.battle-progress i { display:block; height:100%; background:#96d5ff; transform:scaleX(0); transform-origin:left; transition:transform .15s linear; box-shadow:0 0 12px #96d5ff; }
.battle-leaders { margin-top:25px; padding-top:16px; border-top:1px solid #ffffff16; }
.battle-leader { display:grid; grid-template-columns:24px 1fr 40px 70px; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid #ffffff0b; color:#93a9ba; font-size:11px; }
.battle-leader-name { color:#b0d7ff; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }.battle-leader.red .battle-leader-name { color:#ffb0b4; }
.battle-rank { color:#597086; }.battle-leader strong { color:#e9f2fa; text-align:right; }
#battle-result p.battle-radio-note { color:#708a9f; font-size:10px; letter-spacing:.5px; margin-top:20px; }
#battle-result.battle-loading { background:radial-gradient(ellipse at 18% 35%,#1b3647,#070f19 68%); }
#battle-result.battle-loading::before { content:''; position:absolute; inset:0; background-image:linear-gradient(#b8e4ff04 1px,transparent 1px),linear-gradient(90deg,#b8e4ff04 1px,transparent 1px); background-size:48px 48px; }
.battle-loading .battle-content { margin-top:24vh; }
.battle-loading .battle-destination { margin-top:22px; min-height:160px; }
#battle-result p.battle-mission { font-size:14px; line-height:1.7; color:#a9bdce; max-width:420px; margin:22px 0; }
#battle-result.battle-arrival { inset:48px auto auto 50%; transform:translateX(-50%); width:max-content; max-width:80vw; padding:18px 38px; text-align:center; background:linear-gradient(90deg,transparent,#07131ee8 18%,#07131ee8 82%,transparent); overflow:visible; animation:battle-arrival-in .5s ease-out; }
#battle-result.battle-arrival h2 { font-size:26px; }
@keyframes battle-arrival-in { from { opacity:0; translate:0 -8px; } to { opacity:1; translate:0 0; } }
body.playing #chat { z-index:120; }
body.playing.menu-open #chat { display:flex; }
body.playing.debug-open #chat { display:none; }
body.battle-intermission #chat,body.battle-loading #chat { bottom:28px; width:min(460px,40vw); }
body.battle-intermission #chat .chat-tabs,body.battle-intermission #chat .chat-lines,
body.battle-loading #chat .chat-tabs,body.battle-loading #chat .chat-lines,
body.player-dead #chat .chat-tabs,body.player-dead #chat .chat-lines { opacity:1; }
body.battle-loading .campaign-layout,body.battle-loading .campaign-header { visibility:hidden; }
body.battle-loading #hint { pointer-events:none; }
@media(max-width:850px) {
  .battle-content { width:50vw; margin-right:4vw; margin-top:12vh; }
  .battle-hero { gap:10px; }.battle-shield svg { width:42px; height:42px; }
  .battle-team { padding:9px; flex-direction:column; gap:6px; }
  .battle-country-map { opacity:.2; }.battle-destination-copy { max-width:100%; }
  .battle-leader { grid-template-columns:16px 1fr 30px 52px; gap:5px; }
  body.battle-intermission #chat,body.battle-loading #chat { left:12px; width:38vw; font-size:12px; }
}
@media(max-height:780px) {
  .battle-content { margin-top:9vh; }.battle-tickets { margin-bottom:12px; }
  .battle-destination { min-height:85px; padding:12px 16px; }.battle-leaders { margin-top:12px; padding-top:10px; }
  .battle-leader { padding:6px 0; }.battle-countdown { margin-top:12px; }
  #battle-result p.battle-outcome { margin:12px 0; }.battle-loading .battle-content { margin-top:18vh; }
}
@media(prefers-reduced-motion:reduce) { #battle-result.battle-arrival { animation:none; }.battle-progress i { transition:none; } }
