/* Palanctral Espectral Glass 3D Replay UI
   Matches https://espectral.uhce.top/palanctral/uhc/449/ design tokens,
   typography, wordmark, Actividad live feed, Jugadores right sidebar, and
   timeline — with the full-bleed 3D WebGL world rendered BEHIND both panels,
   plus a top-right 2D minimap with live FOV cone and a roam controls ledger. */

:root {
  color-scheme: dark;
  --bg:           #0b0d10;
  --bg-rgb:       11, 13, 16;
  --panel-bg:     rgba(14, 16, 20, 0.56);
  --panel-bg-hi:  rgba(14, 16, 20, 0.72);
  --chrome-bg:    rgba(14, 16, 20, 0.76);
  --text:         #e8e6e1;
  --muted:        #a8aeb8;
  --muted-strong: #c9cdd3;
  --muted-2:      #7d8590;
  --accent:       #d9a93b;
  --accent-rgb:   217, 169, 59;
  --accent-bright:#ffd873;
  --accent-hover: #ffd873;
  --on-accent:    #101216;
  --accent-cyan:  #5cc8dc;
  --accent-cyan-rgb: 92, 200, 220;
  --edge:         rgba(var(--accent-rgb), 0.25);
  --edge-strong:  rgba(var(--accent-rgb), 0.48);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-border-bright: rgba(255, 255, 255, 0.20);
  --brand-purple: #6b3fa0;
  --overworld:    #4ade80;
  --nether:       #ef4444;
  --the_end:      #a855f7;
  --red:          #ef4444;
  --green:        #4ade80;
  --yellow:       #facc15;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm:    0.5rem;
  --radius-md:    0.75rem;
  --radius-lg:    1rem;
  --radius-pill:  9999px;
  --feed-w:       310px;
  --sidebar-w:    292px;
}

[data-theme='light'] {
  color-scheme: light;
  --bg:           #e9e7e2;
  --bg-rgb:       233, 231, 226;
  --panel-bg:     rgba(250, 249, 246, 0.68);
  --panel-bg-hi:  rgba(250, 249, 246, 0.84);
  --chrome-bg:    rgba(255, 255, 255, 0.78);
  --text:         #16181c;
  --muted:        #525862;
  --muted-strong: #2d3138;
  --muted-2:      #626872;
  --accent:       #b8862b;
  --accent-rgb:   184, 134, 43;
  --accent-bright:#9a6d1c;
  --accent-hover: #c47b1e;
  --on-accent:    #ffffff;
  --accent-cyan:  #0e7490;
  --accent-cyan-rgb: 14, 116, 144;
  --glass-border: rgba(0, 0, 0, 0.11);
  --glass-border-bright: rgba(0, 0, 0, 0.22);
  --overworld:    #16a34a;
  --nether:       #dc2626;
  --the_end:      #7c3aed;
  --red:          #dc2626;
  --green:        #16a34a;
  --yellow:       #b45309;
}

* { box-sizing: border-box; }
html {
  margin: 0; padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
}
body {
  margin: 0; padding: 0;
  width: 100%; min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.replay-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

/* ── Titlebar (exact Palanctral glass chrome) ── */
.replay-titlebar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  height: 52px;
  flex-shrink: 0;
  background: var(--chrome-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  z-index: 30;
}

.replay-back {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
  transition: all 0.16s ease;
}
.replay-back:hover { color: var(--text); border-color: var(--edge-strong); background: rgba(255,255,255,0.05); }

.replay-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--brand-purple);
  user-select: none;
  white-space: nowrap;
}
.replay-logo .wg-1 { color: #ffaa00; }
.replay-logo .wg-2 { color: #ffbb00; }
.replay-logo .wg-3 { color: #ffcc00; }
.replay-logo .wg-4 { color: #ffdc0b; }
.replay-logo .wg-5 { color: #ffeb2b; }
.replay-logo .wg-6 { color: #fffa4a; }
.replay-logo .wg-7 { color: #fff540; }
.replay-logo .wg-8 { color: #ffe620; }
.replay-logo .wg-9 { color: #ffd700; }
.replay-logo .wordmark-sub { color: var(--muted-strong); font-weight: 600; margin-left: 2px; }

.replay-subtitle {
  color: var(--muted);
  font-size: 0.80rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.replay-seed {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  white-space: nowrap;
  padding: 0.24rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}
.replay-seed-label {
  font-size: 0.60rem;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.replay-seed code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-cyan);
}

.replay-spacer { flex: 1; min-width: 8px; }

.replay-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
}

.replay-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.replay-chip:hover { color: var(--text); border-color: var(--edge-strong); background: rgba(255,255,255,0.08); }
.replay-chip.active {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.55);
  color: var(--accent-bright);
}
#texBadge.active {
  background: rgba(var(--accent-cyan-rgb), 0.14);
  border-color: rgba(var(--accent-cyan-rgb), 0.45);
  color: var(--accent-cyan);
}

.replay-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.16s ease;
}
.replay-theme-toggle:hover { color: var(--accent); border-color: var(--edge-strong); }

.replay-share-btn {
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.14s ease;
}
.replay-share-btn:hover { background: var(--accent-hover); }

/* ── Full-bleed 3D Stage (WebGL renders BEHIND left chat + right players!) ── */
.replay-stage {
  position: relative;
  flex: none;
  height: calc(100vh - 106px);
  min-height: 460px;
  overflow: hidden;
  background: #0b0d10;
}

.stage-canvas,
.stage-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage-canvas { cursor: grab; z-index: 1; }
.stage-canvas:active { cursor: grabbing; }
.stage-overlay { pointer-events: none; z-index: 2; }

/* ── Left Floating Glass Panel: Actividad (Live Chat & Events) ── */
.replay-feed {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--feed-w);
  z-index: 12;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border-right: 1px solid var(--glass-border);
  transition: transform 0.2s ease;
}
.replay-stage.feed-collapsed .replay-feed {
  transform: translateX(calc(-1 * var(--feed-w) - 4px));
  pointer-events: none;
}

.replay-feed-header {
  padding: 0.7rem 0.85rem 0.55rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
.panel-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feed-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
}

.panel-collapse-btn {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}
.panel-collapse-btn:hover { color: var(--text); border-color: var(--edge-strong); }

.replay-feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.replay-feed-filters button {
  font: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.28rem 0.52rem;
  border-radius: var(--radius-pill);
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.14s ease;
}
.replay-feed-filters button:hover { color: var(--text); border-color: var(--glass-border-bright); }
.replay-feed-filters button[aria-pressed='true'] {
  color: var(--accent-cyan);
  border-color: rgba(var(--accent-cyan-rgb), 0.45);
  background: rgba(var(--accent-cyan-rgb), 0.12);
}

.replay-feed-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0 0.75rem;
  scrollbar-width: thin;
}
.replay-feed-list:empty::before {
  content: attr(data-empty);
  display: block;
  padding: 1.2rem;
  color: var(--muted-2);
  font-size: 0.76rem;
  text-align: center;
}

.feed-item {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.26rem 0.8rem;
  font-size: 0.76rem;
  line-height: 1.38;
  color: var(--text);
  cursor: pointer;
  border-left: 2px solid transparent;
  overflow-wrap: anywhere;
  transition: background 0.12s ease;
}
.feed-item:hover { background: rgba(255, 255, 255, 0.06); }
.feed-time {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted-2);
  min-width: 2.7rem;
}
.feed-body { min-width: 0; }
.feed-nick {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  vertical-align: bottom;
  font-weight: 600;
  color: var(--text);
}
.feed-head {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  image-rendering: pixelated;
  vertical-align: -2px;
}
.feed-icon { margin-right: 0.25rem; }
.feed-episode {
  margin: 0.3rem 0;
  padding-top: 0.36rem;
  padding-bottom: 0.36rem;
  border-left-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.10);
  font-weight: 700;
  color: var(--accent-bright);
}
.feed-death { border-left-color: var(--red); background: rgba(239, 68, 68, 0.06); }
.feed-death .feed-icon { color: var(--red); }
.feed-combat { border-left-color: var(--accent); color: var(--muted-strong); }
.feed-join { border-left-color: var(--overworld); color: var(--muted); }
.feed-world { border-left-color: var(--the_end); color: var(--muted-strong); }
.feed-chat { border-left-color: rgba(var(--accent-cyan-rgb), 0.55); }
.feed-tag {
  display: inline-block;
  margin-right: 0.28rem;
  padding: 0.04rem 0.3rem;
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 3px;
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent-bright);
}

.feed-off-chat .feed-chat,
.feed-off-death .feed-death,
.feed-off-combat .feed-combat,
.feed-off-join .feed-join,
.feed-off-world .feed-world { display: none; }

.replay-feed-jump {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  transform: translateX(-50%);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.32rem 0.78rem;
  border-radius: var(--radius-pill);
  color: #0b0d10;
  background: var(--accent-cyan);
  border: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ── Right Floating Glass Sidebar: Jugadores & Perfil ── */
.replay-sidebar {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 12;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border-left: 1px solid var(--glass-border);
  transition: transform 0.2s ease;
}
.replay-stage.sidebar-collapsed .replay-sidebar {
  transform: translateX(calc(var(--sidebar-w) + 4px));
  pointer-events: none;
}

.replay-sidebar-header {
  padding: 0.7rem 0.85rem 0.55rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.replay-counts {
  display: inline-flex;
  gap: 0.65rem;
  font-size: 0.74rem;
  color: var(--muted);
}
.replay-counts b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.replay-players {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.35rem 0.55rem 0.65rem;
  scrollbar-width: thin;
}

.replay-player {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.44rem 0.55rem;
  margin: 2px 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  transition: all 0.14s ease;
}
.replay-player:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--glass-border);
}
.replay-player.selected {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.52);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.15);
}
.replay-player.dead { opacity: 0.55; }

.replay-player-head-wrap {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  border: 1.5px solid var(--glass-border-bright);
  background: rgba(0, 0, 0, 0.35);
  position: relative;
}
.replay-player-head-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.replay-player.dead .replay-player-head-wrap {
  filter: grayscale(0.75);
}
.replay-player.dead .replay-player-head-wrap::before,
.replay-player.dead .replay-player-head-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 2.5px;
  background: var(--red);
  transform-origin: center;
}
.replay-player.dead .replay-player-head-wrap::before { transform: translate(-50%, -50%) rotate(45deg); }
.replay-player.dead .replay-player-head-wrap::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.replay-player-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.replay-player-row1 {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.replay-player-name {
  font-weight: 600;
  font-size: 0.80rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replay-player-dim {
  font-size: 0.56rem;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.replay-player-dim[data-dim="overworld"] { background: rgba(34, 197, 94, 0.18); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.32); }
.replay-player-dim[data-dim="nether"]    { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.32); }
.replay-player-dim[data-dim="end"]       { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.32); }

.replay-player-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
.replay-player-hearts {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.replay-heart {
  width: 8px;
  height: 8px;
  display: inline-block;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
}
.replay-heart-full  { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAR0lEQVR4nK2OwQ0AIAgDT6dhHDbCkRzHbfClD5CfTfqgvZDCVxm4gVdZM/AhAqowZ3ow1qLf6wEc9bJ5bXKR5LgzgQmIYAQ2ggYrjl6h/kEAAAAASUVORK5CYII="); }
.replay-heart-half  { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAY0lEQVR4nK2OPRmAMBQDr7igGHg7RnDU4ggj7Ch4AmogLNCv/G3cluSGwK8kUAK13Qgajy4kUDaDaYJlAWAopcq9O11Nh/BG97m00gwhb9vr2LuzQricl5lkphhjPf3gFO/CDr+ZIfabpPv1AAAAAElFTkSuQmCC"); }
.replay-heart-empty { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAARklEQVR4nK2PwQ0AIAwCr24ha3T/EVyjjlFfvrSJD3mSAwJ8lUM6ZOWZQ06pLOgRtJelN2iA9YhyaoA1gBu4gSPpkJKOpws8/heB7Oo7JwAAAABJRU5ErkJggg=="); }

.roster-item-icon {
  width: 15px;
  height: 15px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.replay-player-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.replay-player-status.dead { color: var(--red); font-weight: 700; }

/* Selected Player Profile inside Right Sidebar (exact Palanctral .has-profile swap) */
.replay-detail {
  border-top: 1px solid var(--glass-border);
  padding: 0.7rem 0.85rem 0.85rem;
  overflow-y: auto;
  flex-shrink: 0;
}
.replay-detail-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.detail-bar-actions { display: flex; gap: 0.35rem; }
.replay-sidebar.has-profile .replay-players { display: none; }
.replay-sidebar.has-profile .replay-detail { flex: 1 1 auto; border-top: 0; }
.replay-sidebar.has-profile .replay-detail-bar { display: flex; }

.replay-detail-back,
.replay-detail-go {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--text);
  background: rgba(var(--bg-rgb), 0.72);
  border: 1px solid var(--glass-border-bright);
  transition: all 0.14s ease;
}
.replay-detail-back:hover { color: var(--accent-bright); border-color: var(--edge-strong); }
.replay-detail-go { color: var(--accent-cyan); border-color: rgba(var(--accent-cyan-rgb), 0.45); }
.replay-detail-go:hover { background: rgba(var(--accent-cyan-rgb), 0.14); }
.replay-empty-detail {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-style: italic;
  text-align: center;
  margin: 0.25rem 0;
}
.profile-head-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.profile-head-canvas {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent);
  image-rendering: pixelated;
  background: rgba(0, 0, 0, 0.35);
}
.profile-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0;
}
.profile-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.replay-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--glass-border);
}
.replay-detail-label { color: var(--muted); }
.replay-detail-val { font-family: var(--font-mono); color: var(--text); font-size: 0.74rem; }
.profile-slots-grid {
  display: flex;
  gap: 6px;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.profile-slot {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.profile-slot img { width: 22px; height: 22px; image-rendering: pixelated; }
.profile-slot .slot-tag {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 0.54rem;
  color: var(--muted-2);
  font-weight: 700;
}

/* Reopen pills when side panels are collapsed */
.edge-reopen {
  position: absolute;
  top: 12px;
  z-index: 14;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-bright);
  background: var(--panel-bg-hi);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.edge-reopen-left { left: 12px; }
.edge-reopen-right { right: 12px; }

/* ── Top-Left of 3D Viewport: Camera & Layer Chips ── */
.cam-pill-bar {
  position: absolute;
  top: 12px;
  left: calc(var(--feed-w) + 12px);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--panel-bg-hi);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: left 0.2s ease;
}
.replay-stage.feed-collapsed .cam-pill-bar { left: 110px; }

.cam-pill {
  background: transparent;
  border: 0;
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.cam-pill:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.cam-pill.active {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.pill-sep {
  width: 1px;
  height: 16px;
  background: var(--glass-border);
  margin: 0 3px;
}
.dim-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.dim-switcher[hidden],
.pill-sep[hidden],
.dim-pill[hidden] { display: none !important; }
.dim-pill[data-dim="0"].active { background: #16a34a; color: #f8fafc; }
.dim-pill[data-dim="1"].active { background: #dc2626; color: #f8fafc; }
.dim-pill[data-dim="2"].active { background: #9333ea; color: #f8fafc; }

/* ── TOP-RIGHT 2D MINIMAP (with live camera position + FOV cone + Y-Cut) ── */
.minimap-card {
  position: absolute;
  top: 12px;
  right: calc(var(--sidebar-w) + 12px);
  width: 192px;
  z-index: 15;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--panel-bg-hi);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--glass-border-bright);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: right 0.2s ease;
}
.replay-stage.sidebar-collapsed .minimap-card { right: 14px; top: 50px; }

.minimap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.minimap-compass {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-bright);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.minimap-canvas-wrap {
  position: relative;
  width: 174px;
  height: 174px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border-bright);
  background: #0d1117;
  cursor: crosshair;
}
#minimapCanvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.cardinal {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}
.c-n { top: 3px; left: 50%; transform: translateX(-50%); color: var(--accent-bright); }
.c-s { bottom: 3px; left: 50%; transform: translateX(-50%); }
.c-w { left: 4px; top: 50%; transform: translateY(-50%); }
.c-e { right: 4px; top: 50%; transform: translateY(-50%); }

.minimap-coords {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.minimap-ycut {
  border-top: 1px solid var(--glass-border);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.minimap-ycut-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
}
.ycut-lbl {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ycut-val {
  font-family: var(--font-mono);
  color: var(--accent-bright);
  font-weight: 600;
  margin-right: auto;
}
.ycut-btns { display: flex; gap: 3px; }
.ycut-mini {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
}
.ycut-mini:hover { color: var(--text); border-color: var(--edge-strong); }
.ycut-mini.active {
  background: rgba(var(--accent-cyan-rgb), 0.20);
  border-color: rgba(var(--accent-cyan-rgb), 0.55);
  color: var(--accent-cyan);
}
.ycut-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
  height: 4px;
}

/* ── BOTTOM-LEFT CONTROLS LEDGER (Roam Around Guide) ── */
.controls-ledger-wrap {
  position: absolute;
  left: calc(var(--feed-w) + 12px);
  bottom: 12px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: left 0.2s ease;
}
.replay-stage.feed-collapsed .controls-ledger-wrap { left: 14px; }

.controls-ledger {
  background: var(--panel-bg-hi);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--glass-border-bright);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  width: 286px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}
.controls-ledger.collapsed { display: none; }

.ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--glass-border);
}
.ledger-mode {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}
.ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}
.ledger-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--muted-strong);
  white-space: nowrap;
}
.ledger-row kbd {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border-bright);
  border-radius: 4px;
  padding: 1px 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
[data-theme='light'] .ledger-row kbd {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.replay-legend-btn {
  background: var(--panel-bg-hi);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border-bright);
  border-radius: var(--radius-pill);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.replay-legend-btn:hover,
.replay-legend-btn[aria-expanded='true'] {
  color: var(--accent-bright);
  border-color: var(--edge-strong);
}

/* ── Bottom-Center Selected Player Loadout Pill ── */
.loadout-card {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  background: var(--panel-bg-hi);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--edge-strong);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}
/* Bottom-center loadout card only appears when the right Jugadores profile panel is collapsed */
.replay-stage:not(.sidebar-collapsed) .loadout-card { display: none; }
.loadout-card[hidden] { display: none; }
.loadout-face {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 2px solid var(--accent);
  image-rendering: pixelated;
}
.loadout-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.loadout-name { font-weight: 700; font-size: 0.84rem; }
.loadout-hp { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.loadout-slots { display: flex; gap: 4px; }
.inv-slot {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.inv-slot.hand { border-color: rgba(var(--accent-rgb), 0.45); }
.inv-slot img { width: 18px; height: 18px; image-rendering: pixelated; }
.inv-slot .slot-tag {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 0.52rem;
  color: var(--muted-2);
  font-weight: 700;
}
.loadout-btn {
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border-bright);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
}
.loadout-btn:hover,
.loadout-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

/* ── Status & Drop overlays ── */
.replay-map-status {
  position: absolute;
  left: 50%;
  top: 56px;
  transform: translateX(-50%);
  z-index: 20;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-bg-hi);
  border: 1px solid var(--glass-border-bright);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.replay-map-status.hidden { opacity: 0; }

.drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-overlay[hidden] { display: none; }
.drop-card {
  padding: 1.5rem 2.2rem;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--accent);
  background: var(--panel-bg-hi);
  font-size: 1rem;
  font-weight: 600;
}

/* ── Bottom Frosted Timeline (exact Palanctral gold accent) ── */
.replay-timeline {
  flex-shrink: 0;
  height: 54px;
  background: var(--chrome-bg);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1rem;
  position: relative;
  z-index: 30;
}
.replay-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.35), transparent);
}

.replay-play-btn,
.replay-speed-btn,
.replay-loop-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-size: 0.80rem;
  height: 30px;
  padding: 0 10px;
  transition: all 0.14s ease;
}
.replay-play-btn { width: 34px; padding: 0; font-weight: 700; font-size: 0.92rem; }
.replay-play-btn:hover { color: var(--accent-bright); border-color: var(--edge-strong); }
.speed-group { display: flex; gap: 3px; }
.replay-speed-btn { min-width: 36px; font-variant-numeric: tabular-nums; font-weight: 600; }
.replay-speed-btn.active,
.replay-loop-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
  font-weight: 700;
}

.scrubber-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 24px;
}
.replay-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  outline: none;
  position: relative;
  z-index: 2;
}
.replay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: var(--accent);
  border: 2px solid var(--bg);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55);
}
.death-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.death-pip {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 12px;
  transform: translate(-50%, -50%);
  background: var(--red);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}
.death-pip.mk-pvp { background: #f97316; height: 14px; box-shadow: 0 0 7px rgba(249, 115, 22, 0.85); }
.death-pip.mk-border { background: #38bdf8; height: 14px; box-shadow: 0 0 7px rgba(56, 189, 248, 0.85); }
.death-pip.mk-win { background: #facc15; width: 4px; height: 16px; box-shadow: 0 0 8px rgba(250, 204, 21, 0.9); }
.death-pip.mk-ironman,
.death-pip.mk-revive,
.death-pip.mk-showdown { background: #a855f7; height: 12px; box-shadow: 0 0 6px rgba(168, 85, 247, 0.75); }
.death-pip.mk-chapter { background: rgba(148, 163, 184, 0.55); width: 2px; height: 8px; box-shadow: none; }

.replay-time {
  font-family: var(--font-mono);
  font-size: 0.80rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 96px;
  text-align: right;
}
.time-sep { color: var(--muted-2); margin: 0 2px; }

.perf-stats {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  color: var(--muted-2);
  min-width: 82px;
  text-align: right;
  white-space: nowrap;
}

.replay-toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.45);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.replay-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ── Below-the-Fold Team Loadout Cards (exact Palanctral EQUIPAMIENTO POR EQUIPO) ── */
.replay-teams {
  width: 100%;
  flex-shrink: 0;
  padding: 24px 28px 40px;
  background: #111318;
  border-top: 1px solid var(--glass-border);
  color: var(--text);
}
[data-theme='light'] .replay-teams {
  background: #f2f1ed;
}
.replay-teams * { min-width: 0; }
.replay-teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 18px;
}
.replay-teams-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.replay-teams-time {
  flex-shrink: 0;
  padding: 0.32rem 0.78rem;
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.35);
  border-radius: var(--radius-pill);
  background: rgba(var(--accent-cyan-rgb), 0.09);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 14px rgba(var(--accent-cyan-rgb), 0.12);
  white-space: nowrap;
}
.replay-teams-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 1280px) {
  .replay-teams-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .replay-teams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .replay-teams-grid { grid-template-columns: 1fr; }
}

.replay-team-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 45%), rgba(20, 22, 27, 0.85);
}
[data-theme='light'] .replay-team-card {
  background: rgba(255, 255, 255, 0.78);
}
.replay-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--glass-border);
  border-top: 2px solid var(--team-color, var(--accent));
}
.replay-team-name {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replay-team-count {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.replay-team-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
}

.loadout-player-card {
  padding: 11px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.14s ease, background 0.14s ease;
}
.loadout-player-card:hover {
  border-color: var(--glass-border-bright);
  background: rgba(255, 255, 255, 0.045);
}
.loadout-player-card.following {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.06);
}
.loadout-player-card.dead { opacity: 0.58; }
.loadout-player-card.dead .loadout-item-icon { filter: grayscale(1); }
[data-theme='light'] .loadout-player-card { background: rgba(23, 31, 51, 0.03); }

.loadout-player-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.loadout-player-header .replay-player-head-wrap {
  width: 28px;
  height: 28px;
  border-radius: 5px;
}
.loadout-player-name {
  flex: 1;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loadout-player-card.dead .loadout-player-name {
  color: var(--muted-2);
  text-decoration: line-through;
}
.loadout-health {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.loadout-dead-skull {
  color: var(--red);
  font-size: 0.95rem;
  line-height: 1;
}
.loadout-go {
  flex-shrink: 0;
  font: inherit;
  font-size: 0.70rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.22rem 0.62rem;
  border-radius: var(--radius-pill);
  color: var(--accent-cyan);
  background: rgba(var(--accent-cyan-rgb), 0.05);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.42);
  transition: all 0.14s ease;
}
.loadout-go:hover {
  background: rgba(var(--accent-cyan-rgb), 0.16);
  border-color: rgba(var(--accent-cyan-rgb), 0.78);
}

.loadout-section { margin-top: 8px; }
.loadout-section-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}
.loadout-armor-grid,
.loadout-weapons-row,
.loadout-items-grid,
.loadout-potions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}
.loadout-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
}
.loadout-slot.empty { border-color: rgba(255, 255, 255, 0.045); }
.loadout-slot.has-item { border-color: rgba(255, 255, 255, 0.15); }
[data-theme='light'] .loadout-slot { background: rgba(23, 31, 51, 0.07); }
.loadout-item-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
  vertical-align: middle;
}
.loadout-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.70rem;
  color: var(--text);
}
.loadout-potion-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  font-size: 0.68rem;
  font-weight: 600;
}
.loadout-empty-text {
  color: var(--muted-2);
  font-size: 0.74rem;
  font-style: italic;
}


/* --- PvE 3D Replay HUD & Recent Runs Picker --- */
.replay-select {
  appearance: auto;
  max-width: 240px;
  cursor: pointer;
  background: var(--glass-bg, rgba(16, 20, 28, 0.85));
  color: inherit;
}

.pve-hud-card {
  position: absolute;
  top: 56px;
  left: 316px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(13, 18, 28, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  color: #f8fafc;
  pointer-events: auto;
  max-width: calc(100vw - 830px);
}
[data-theme="light"] .pve-hud-card {
  background: rgba(248, 250, 252, 0.88);
  border-color: rgba(15, 23, 42, 0.14);
  color: #0f172a;
}
.pve-hud-card[hidden] { display: none !important; }
.pve-hud-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pve-hud-head {
  width: 30px; height: 30px; border-radius: 6px;
  image-rendering: pixelated; border: 1px solid rgba(255,255,255,0.2);
}
.pve-hud-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pve-hud-top { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.pve-hud-structure {
  font-weight: 700; font-size: 13px; letter-spacing: 0.01em; white-space: nowrap;
}
.pve-hud-variant {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; opacity: 0.72;
  padding: 1px 5px; border-radius: 5px; background: rgba(148, 163, 184, 0.18);
}
.pve-hud-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(34, 197, 94, 0.22); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4);
}
.pve-hud-badge.loss {
  background: rgba(239, 68, 68, 0.22); color: #f87171; border-color: rgba(248, 113, 113, 0.4);
}
.pve-hud-badge.practice {
  background: rgba(250, 204, 21, 0.22); color: #fde047; border-color: rgba(253, 224, 71, 0.4);
}
.pve-hud-player { font-size: 11px; opacity: 0.76; }
.pve-hud-stats {
  display: flex; align-items: center; gap: 14px;
  padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.pve-stat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.pve-stat-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.62; }
.pve-stat strong { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #ffd873; }
[data-theme="light"] .pve-stat strong { color: #b45309; }

.feed-item.feed-gold .feed-body { color: #fde047; }
.feed-item.feed-chest .feed-body { color: #38bdf8; }
.feed-item.feed-win .feed-body { color: #4ade80; font-weight: 600; }
.feed-item.feed-go .feed-body { color: #a78bfa; }


/* --- Minimap hide button & Lower-left 1ª POV Health HUD --- */
.minimap-head-right, .ledger-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.minimap-hide-btn {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.78;
  transition: opacity 0.15s, background 0.15s;
}
.minimap-hide-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
}
.minimap-card.collapsed {
  display: none !important;
}

.pov-health-hud {
  position: absolute;
  left: 316px;
  bottom: 54px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(11, 15, 24, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  color: #f8fafc;
  pointer-events: none;
}
.replay-stage.feed-collapsed .pov-health-hud {
  left: 16px;
}
.pov-health-hud[hidden] {
  display: none !important;
}
.pov-health-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pov-health-head {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  image-rendering: pixelated;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.pov-health-name {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
}
.pov-health-num {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #f87171;
}
.pov-health-hearts {
  display: block;
  image-rendering: pixelated;
}

[hidden] { display: none !important; }

