/* =========================================================
   UP-TO-21 Game Dashboard (Esport Neon HUD)
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #0f111a;
  --bg-layer: radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.04), transparent 32%),
    radial-gradient(circle at 12% 18%, rgba(80, 140, 255, 0.06), transparent 40%),
    radial-gradient(circle at 86% 10%, rgba(0, 180, 220, 0.05), transparent 42%);
  --panel: rgba(12, 15, 26, 0.92);
  --panel-strong: rgba(10, 13, 22, 0.95);
  --border: rgba(120, 190, 255, 0.35);
  --text: #e8ecff;
  --muted: #9aa5c9;
  --accent: #5fa3ff;
  --accent-glow: rgba(95, 163, 255, 0.45);
  --accent-gradient: linear-gradient(135deg, rgba(90, 120, 255, 0.35), rgba(0, 190, 255, 0.25));
  --accent-rgb: 95, 163, 255;
  --accent-rose: #6b7bff;
  --accent-cyan: #4fb6ff;
  --gold: #f7d046;
  --silver: #c0c7d8;
  --bronze: #d79c6b;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font-display: "Rajdhani", "Orbitron", "Montserrat", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Montserrat", "Rajdhani", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.dashboard {
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  background: var(--bg), var(--bg-layer);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
}
body.dashboard::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size:
    220px 220px,
    180px 180px,
    180px 180px;
  background-repeat: repeat;
  background-blend-mode: soft-light, overlay, overlay;
  opacity: 0.035;
}

.hidden {
  display: none !important;
}

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  transition: top 0.3s ease;
  z-index: 999;
}
.skip-link:focus { top: 1rem; }

/* Header */
.command-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 8px clamp(12px, 3vw, 20px);
  background: linear-gradient(135deg, rgba(18, 22, 34, 0.94), rgba(12, 16, 28, 0.9));
  border-bottom: 1px solid rgba(120, 190, 255, 0.2);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.top-menu-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.lang-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.lang-inline__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 190, 255, 0.35);
  background: rgba(8, 10, 20, 0.7);
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.lang-inline__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(120, 190, 255, 0.25);
}

.lang-inline__link.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(125, 90, 240, 0.95), rgba(90, 180, 255, 0.9));
  color: #0c0f19;
}

.top-menu-shell { display: flex; flex-direction: column; gap: 0.5rem; animation: headerFloat 0.3s ease; }
.top-menu-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 0 28px;
  background: linear-gradient(130deg, rgba(16, 20, 36, 0.96), rgba(10, 12, 24, 0.92));
  border: 1px solid rgba(120, 190, 255, 0.38);
  border-radius: 12px;
  box-shadow:
    inset 0 0 12px rgba(120, 190, 255, 0.22),
    0 14px 22px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
  line-height: normal;
}

.top-menu-bar > .dashboard-title {
  text-align: center;
}

@media (min-width: 769px) {
  .top-menu-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
  }

  .top-menu-right {
    margin-left: 0;
    justify-self: end;
  }

  .dashboard-title {
    justify-self: center;
  }
}
.live-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 700;
  color: #bcd3ff;
  text-transform: uppercase;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: #ff4e73;
  border-radius: 50%;
  animation: livePulse 1.6s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(255, 78, 115, 0.45), inset 0 0 6px rgba(255, 255, 255, 0.15);
}
.command-grid {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.right-button-panel {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0.7rem;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(120, 190, 255, 0.16);
}

.right-menu-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 24px;
}
.dashboard-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
  gap: 20px;
}
.dashboard-actions .menu-toggle {
  width: 100%;
  max-width: none;
  text-align: center;
  white-space: normal;
  line-height: 1.15;
}
.menu-toggle {
  width: 100%;
  min-height: 56px;
  padding: 12px 22px;
  border: 1px solid rgba(120, 190, 255, 0.7);
  border-radius: 18px;
  background: linear-gradient(125deg, rgba(95, 163, 255, 0.9), rgba(125, 90, 240, 0.92), rgba(64, 207, 255, 0.88));
  color: #e8ecff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(120, 190, 255, 0.45),
    inset 0 0 12px rgba(255, 255, 255, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease, opacity 0.24s ease;
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.05) saturate(1.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(120, 190, 255, 0.55),
    inset 0 0 14px rgba(255, 255, 255, 0.12);
  outline: none;
}
.menu-toggle:active {
  transform: translateY(0);
  opacity: 0.95;
}
@media (max-width: 780px) {
  .dashboard-actions {
    gap: 16px;
    grid-template-columns: 1fr;
  }
  .menu-toggle {
    letter-spacing: 0.12em;
  }
}

.upto21-main-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  font-weight: 700;
  letter-spacing: 1.4px;
  font-family: "Orbitron", "Rajdhani", "Space Grotesk", sans-serif;
  background: linear-gradient(90deg, #3A6DFF, #684BFF, #8A4DFF);
  border-radius: 16px;
  border: none;
  color: #E4C8FF;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(100, 140, 255, 0.35),
              0 0 18px rgba(140, 100, 255, 0.25);
  transition: transform 0.25s ease, 
              box-shadow 0.25s ease,
              opacity 0.25s ease,
              filter 0.25s ease;
  white-space: nowrap;
}

.upto21-main-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(120, 180, 255, 0.55),
              0 0 26px rgba(160, 120, 255, 0.45);
  filter: brightness(1.06);
  opacity: 0.98;
}

/* Round winner quick popup */
.round-winner-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 9999;
}
.round-winner-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.round-winner-content {
  text-align: center;
  animation: winnerEnter 0.45s ease forwards;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
}
.round-winner-title {
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #7ad7ff;
  margin-bottom: 0.6rem;
}
.round-winner-trophy {
  width: 120px;
  height: auto;
  margin: 0 auto 12px auto;
  filter: drop-shadow(0 0 18px rgba(120, 190, 255, 0.55));
  display: none;
}
.round-winner-trophy.visible {
  display: block;
}
.round-winner-name {
  font-size: 3.2rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    0 0 12px rgba(0,255,255,0.8),
    0 0 24px rgba(0,180,255,0.5);
  margin: 0.2rem 0;
}
.round-winner-role {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #86d8ff;
}

@keyframes winnerEnter {
  0%   { opacity: 0; transform: translateY(30px) scale(0.85); }
  50%  { opacity: 1; transform: translateY(0) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Final winner fullscreen overlay */

.header-slogan {
  text-align: center;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 1.5px;
  font-size: 0.95rem;
  background: linear-gradient(90deg, #C88BFF, #7BD7FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(150, 200, 255, 0.35));
  animation: sloganFade 0.5s ease-out forwards;
  opacity: 0;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes sloganFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-line {
  flex: 1 1 120px;
  min-width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(120, 200, 255, 0.35), transparent);
  box-shadow: 0 0 8px rgba(120, 200, 255, 0.35);
  border-radius: 999px;
}

.header-line-left {
  margin-left: 8px;
}

.header-line-right {
  margin-right: 8px;
}
.dashboard-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #eaf0ff;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.round-and-logo,
.round-pill,
.dashboard-logo {
  display: none !important;
}
.live-match {
  height: 10px;
  width: 120px;
  padding: 0;
  border-radius: 6px;
  background: linear-gradient(120deg, rgba(80, 120, 210, 0.3), rgba(40, 160, 210, 0.22));
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.live-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4976;
  margin-left: 6px;
  animation: pulse 1.5s infinite ease-in-out;
}
.live-match-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #d8e4ff;
  margin-right: 8px;
}
@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

@keyframes livePulse {
  0%   { opacity: 0.7; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}
.dashboard-logo {
  height: calc((100% - 10px) * 0.5);
  width: auto;
  margin-left: auto;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
  object-fit: contain;
  transform: scale(0.5);
  transform-origin: center right;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-toggle,
.btn,
.btn-accent,
.btn-special {
  border-radius: 10px;
  height: 42px;
  min-height: 42px;
  padding: 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  color: #fff;
  border: 1px solid rgba(120, 190, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  min-width: 140px;
  text-align: center;
}
.btn-primary,
.btn-accent {
  background: linear-gradient(135deg, rgba(70, 110, 190, 0.26), rgba(30, 150, 210, 0.2));
  box-shadow:
    inset 0 0 8px rgba(120, 190, 255, 0.18),
    0 0 10px rgba(110, 170, 240, 0.18);
}
.btn-special {
  background: linear-gradient(135deg, rgba(60, 100, 185, 0.24), rgba(20, 120, 180, 0.18));
  box-shadow:
    inset 0 0 8px rgba(120, 190, 255, 0.16),
    0 0 10px rgba(90, 150, 220, 0.18);
}
.btn-secondary { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(120, 190, 255, 0.2); }
.btn-toggle.off,
.btn-toggle.on {
  background: linear-gradient(135deg, rgba(70, 110, 190, 0.28), rgba(30, 150, 210, 0.22));
  color: #fff;
  border-color: var(--accent);
  box-shadow:
    inset 0 0 8px rgba(120, 190, 255, 0.18),
    0 0 10px rgba(120, 190, 255, 0.2);
}
.slot-btn { background: linear-gradient(135deg, #ff70b9, #7d5af0, #39cfda); box-shadow: 0 0 18px rgba(255, 112, 185, 0.45); position: relative; overflow: hidden; }
.slot-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.4s infinite;
}
.pill-btn { border-radius: 999px; padding-inline: 1rem; }
.btn:hover,
.btn:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-toggle:hover,
.btn-toggle:focus-visible,
.btn-accent:hover,
.btn-accent:focus-visible,
.btn-special:hover,
.btn-special:focus-visible {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    inset 0 0 8px rgba(120, 190, 255, 0.22),
    0 0 12px rgba(110, 170, 240, 0.22);
  filter: brightness(1.05);
}
.btn:active,
.btn-primary:active,
.btn-secondary:active,
.btn-toggle:active,
.btn-accent:active,
.btn-special:active { transform: scale(0.98); }

@keyframes headerFloat {
  0% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* HUD Status Panel */
/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 1.6rem;
  padding: clamp(16px, 3vw, 28px);
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: hidden;
  height: 100%;
  min-height: 0;
}

.panel {
  background: linear-gradient(150deg, rgba(18, 22, 34, 0.92), rgba(10, 13, 22, 0.94));
  border-radius: 12px;
  border: 1px solid rgba(120, 190, 255, 0.3);
  box-shadow: inset 0 0 10px rgba(120, 190, 255, 0.14), 0 10px 18px rgba(0, 0, 0, 0.5);
  padding: 1.4rem;
  backdrop-filter: blur(8px);
  min-height: 0;
}
.panel__head { display: flex; justify-content: space-between; align-items: center; }
.panel__head h2 { margin: 0.15rem 0 0; }
.round-indicator {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.round-gradient {
  background: linear-gradient(90deg, #3A6DFF, #684BFF, #8A4DFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.round-highlight {
  color: #b27aff;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(178, 122, 255, 0.45);
}

/* Agents Row */
.agents-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
  padding: 0.4rem 0.1rem 0.8rem;
  align-items: stretch;
  overflow: auto;
}
.drag-ghost {
  opacity: 0.65;
  transform: scale(0.98);
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

.agent-card {
  position: relative;
  isolation: isolate;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(var(--accent-rgb, 125, 90, 240), 0.16), rgba(8, 10, 20, 0.92) 45%, rgba(8, 10, 24, 0.97)),
    radial-gradient(circle at 110% 20%, rgba(var(--accent-rgb, 125, 90, 240), 0.2), rgba(6, 8, 20, 0.85) 52%);
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.55);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(var(--accent-rgb, 125, 90, 240), 0.18);
  padding: 0.8rem;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.agent-card::before {
  content: "";
  position: absolute;
  inset: -30% auto 10% -25%;
  width: 45%;
  background: radial-gradient(circle, rgba(var(--accent-rgb, 125, 90, 240), 0.28), transparent 65%);
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;
}
.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(var(--accent-rgb, 125, 90, 240), 0.2);
}

.agent-avatar {
  position: relative;
  width: 110px;
  min-width: 100px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 40% 40%, rgba(var(--accent-rgb, 125, 90, 240), 0.3), rgba(8, 10, 20, 0.9));
  border-radius: 20px;
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 0 12px rgba(var(--accent-rgb, 125, 90, 240), 0.18);
  overflow: hidden;
}
.agent-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
}
.agent-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.more-points-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.more-points-btn:hover,
.more-points-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(125, 90, 240, 0.4);
  background: rgba(125, 90, 240, 0.2);
}

.agent-info { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.agent-info { min-width: 200px; }
.agent-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.agent-profession {
  align-self: flex-start;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb, 125, 90, 240), 0.22);
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.55);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
}
.agent-name { margin: 0; font-size: 1.2rem; letter-spacing: 0.04em; }
.points-row { margin: 0.25rem 0 0; font-weight: 700; color: #e8ecff; font-size: 1rem; }
.agent-points { margin: 0; font-weight: 700; color: #e8ecff; }

.agent-actions,
.agent-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(72px, 1fr));
  gap: 0.4rem;
  flex: 1 1 100%;
  width: 100%;
}
.agent-actions button,
.agent-buttons button {
  flex: 1 1 68px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.6);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.agent-buttons button:hover,
.agent-buttons button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(var(--accent-rgb, 125, 90, 240), 0.4), rgba(var(--accent-rgb, 125, 90, 240), 0.25));
  box-shadow: 0 10px 18px rgba(var(--accent-rgb, 125, 90, 240), 0.3), inset 0 0 10px rgba(var(--accent-rgb, 125, 90, 240), 0.2);
}
.agent-buttons button:active { transform: translateY(0); filter: brightness(1.05); }

/* Chart */
.panel--right .chart-shell {
  height: 100%;
  background: linear-gradient(150deg, rgba(18, 22, 34, 0.9), rgba(10, 13, 22, 0.92));
  border-radius: 12px;
  border: 1px solid rgba(120, 190, 255, 0.3);
  box-shadow: inset 0 0 10px rgba(120, 190, 255, 0.14), 0 10px 18px rgba(0, 0, 0, 0.5);
  padding: 0.7rem;
  min-height: 0;
}

/* Modal Leaderboard */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 9999;
}
.modal.hidden { display: none; }
.modal__card {
  width: min(960px, 94vw);
  background: var(--panel-strong);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.52), inset 0 0 14px rgba(125, 90, 240, 0.22);
  padding: 1.4rem 1.6rem 1.8rem;
  position: relative;
}
.modal__card--winner { text-align: center; }
.modal__card--settings {
  max-width: 640px;
  width: min(640px, 92vw);
  padding: 1.8rem 2rem 2.2rem;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(10, 14, 24, 0.92), rgba(16, 22, 38, 0.96));
  border: 1px solid rgba(120, 190, 255, 0.3);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.65),
    0 0 24px rgba(120, 190, 255, 0.25),
    inset 0 0 18px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  overflow: hidden;
  animation: modalSettingsIn 0.35s ease forwards;
}
.modal__card--settings::before {
  content: "";
  position: absolute;
  inset: -30% -10%;
  background: conic-gradient(from 60deg, rgba(95, 163, 255, 0.12), rgba(125, 90, 240, 0.18), rgba(80, 215, 255, 0.12), rgba(95, 163, 255, 0.12));
  filter: blur(28px);
  opacity: 0.75;
  pointer-events: none;
}
.modal__card--settings .modal__head .eyebrow {
  letter-spacing: 0.25em;
  font-size: 0.82rem;
  color: rgba(200, 230, 255, 0.78);
  text-transform: uppercase;
}
.modal__card--settings .modal__head h3 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: 0.12em;
  font-family: var(--font-display);
  font-weight: 800;
  background: linear-gradient(120deg, #59e4ff, #7d5af0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(125, 90, 240, 0.45), 0 0 10px rgba(80, 220, 255, 0.35);
}
.winner-highlight {
  padding: 0.7rem;
  border-radius: 14px;
  background: linear-gradient(140deg, rgba(var(--accent-rgb, 125, 90, 240), 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.winner-name { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.04em; }
.winner-profession { color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }
.winner-actions { margin-top: 1rem; }

.round-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
  gap: 1.1rem;
  margin-top: 1.1rem;
  padding: 0.4rem;
}
.round-count-option {
  position: relative;
  min-height: 68px;
  border-radius: 18px;
  border: 2px solid rgba(95, 163, 255, 0.55);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(80, 120, 210, 0.08));
  color: #efffff;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(95, 163, 255, 0.35),
    inset 0 0 12px rgba(95, 163, 255, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
  overflow: hidden;
}
.round-count-option::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.75), rgba(12, 18, 30, 0.9));
  opacity: 0.9;
  z-index: 0;
}
.round-count-option span,
.round-count-option {
  position: relative;
  z-index: 1;
}
.round-count-option:hover,
.round-count-option:focus-visible {
  transform: translateY(-2px) scale(1.06);
  border-color: rgba(120, 190, 255, 0.9);
  background: linear-gradient(135deg, rgba(120, 190, 255, 0.22), rgba(80, 215, 255, 0.16));
  box-shadow:
    0 20px 32px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(120, 190, 255, 0.45),
    inset 0 0 16px rgba(120, 190, 255, 0.25);
  filter: brightness(1.05);
}
.round-count-option.is-active {
  border-color: rgba(120, 190, 255, 0.95);
  background: linear-gradient(135deg, rgba(90, 210, 255, 0.35), rgba(80, 140, 255, 0.35));
  box-shadow:
    0 22px 36px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(90, 210, 255, 0.55),
    inset 0 0 18px rgba(90, 210, 255, 0.32);
  animation: chipPulse 0.8s ease-in-out infinite alternate;
}

@keyframes modalSettingsIn {
  0% { opacity: 0; transform: translateY(12px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes chipPulse {
  0% {
    box-shadow:
      0 22px 36px rgba(0, 0, 0, 0.6),
      0 0 24px rgba(90, 210, 255, 0.45),
      inset 0 0 14px rgba(90, 210, 255, 0.26);
  }
  100% {
    box-shadow:
      0 24px 40px rgba(0, 0, 0, 0.6),
      0 0 34px rgba(90, 210, 255, 0.65),
      inset 0 0 20px rgba(90, 210, 255, 0.38);
  }
}

.winner-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 40%, rgba(125, 90, 240, 0.2), rgba(0, 0, 0, 0.8));
  backdrop-filter: blur(10px);
}
.winner-overlay.hidden { display: none; }
.winner-overlay__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 50%),
    radial-gradient(circle at 20% 20%, rgba(var(--accent-rgb, 125, 90, 240), 0.3), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(57, 207, 218, 0.24), transparent 45%);
  filter: blur(20px);
  z-index: 0;
}
.winner-overlay__card {
  position: relative;
  z-index: 1;
  padding: 1.6rem 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(8, 10, 24, 0.9), rgba(14, 18, 34, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.5), inset 0 0 14px rgba(var(--accent-rgb, 125, 90, 240), 0.2);
  min-width: min(720px, 92vw);
}
.winner-overlay__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
  font-weight: 800;
}
.winner-overlay__headline {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.05em;
}
.winner-overlay__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.winner-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.55);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(var(--accent-rgb, 125, 90, 240), 0.2);
}
.winner-tile__avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: radial-gradient(circle at 40% 40%, rgba(var(--accent-rgb, 125, 90, 240), 0.35), rgba(8, 10, 20, 0.9));
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.6);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.winner-tile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.winner-tile__info { display: flex; flex-direction: column; gap: 2px; }
.winner-tile__name { margin: 0; font-weight: 800; letter-spacing: 0.04em; }
.winner-tile__meta { margin: 0; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem; }

.stats-controls {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.stats-section {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.stats-table-wrapper { overflow-x: auto; }
.stats-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
  font-weight: 700;
}
.stats-table th,
.stats-table td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.stats-table thead {
  background: linear-gradient(120deg, rgba(125, 90, 240, 0.18), rgba(57, 207, 218, 0.15));
}
.stats-table tbody tr:nth-child(2n) { background: rgba(255, 255, 255, 0.01); }
.stats-table .stats-total { color: #fff; }
.stats-table .stats-average { color: var(--muted); }
.stats-table .stats-current { background: rgba(var(--accent-rgb, 125, 90, 240), 0.12); }
.stats-table .stats-highlight { color: var(--accent); }

.statistics-panel.inactive {
  opacity: 0.4;
  filter: grayscale(100%);
  border-color: #666;
  background: #2a2a2a;
  box-shadow: none;
}
.statistics-panel.active {
  opacity: 1;
  filter: none;
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 20px var(--accent-glow);
}
.stats-note {
  margin: 0.6rem 0.8rem;
  color: #bbb;
  font-size: 0.95rem;
}
.stats-toggle {
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.stats-toggle.off {
  background: #555;
  color: #bbb;
  border-color: #666;
  box-shadow: none;
}
.stats-toggle.off:hover { background: #5f5f5f; color: #d0d0d0; }
.stats-toggle.on {
  background: var(--accent-gradient);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}
.stats-toggle.on:hover { box-shadow: 0 0 22px var(--accent-glow); }

@keyframes flashRed {
  0% { box-shadow: 0 0 0px rgba(255, 77, 77, 0.8); }
  50% { box-shadow: 0 0 24px rgba(255, 77, 77, 0.9); }
  100% { box-shadow: 0 0 0px rgba(255, 77, 77, 0.8); }
}
.flash-warning {
  animation: flashRed 0.5s ease-in-out 3;
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}
.modal__head h3 { margin: 0.2rem 0 0.4rem; }

.table-wrapper { margin-top: 0.8rem; overflow-x: auto; }
.leaderboard {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.leaderboard thead th {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: var(--muted);
}
.leaderboard thead th,
.leaderboard td { text-align: center; vertical-align: middle; }
.leaderboard tbody tr {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  border-radius: 12px;
}
.leaderboard td { padding: 0.85rem 1rem; }
.rank-1 {
  background: rgba(255, 215, 0, 0.25) !important;
  border-left: 4px solid #ffd700;
  box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.35);
}
.rank-2 {
  background: rgba(192, 192, 192, 0.25) !important;
  border-left: 4px solid #c0c0c0;
  box-shadow: inset 0 0 12px rgba(192, 192, 192, 0.35);
}
.rank-3 {
  background: rgba(205, 127, 50, 0.25) !important;
  border-left: 4px solid #cd7f32;
  box-shadow: inset 0 0 12px rgba(205, 127, 50, 0.35);
}
.trend-up { color: #4cff4c; font-weight: 700; letter-spacing: 0.04em; }
.trend-down { color: #ff4c4c; font-weight: 700; letter-spacing: 0.04em; }
.trend-neutral { color: var(--muted); opacity: 0.6; }
.trend { text-align: center; }
.role-icon { width: 42px; height: 42px; object-fit: contain; }

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  background: rgba(6, 8, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.eyebrow { text-transform: uppercase; letter-spacing: 0.26em; font-size: 0.78rem; color: var(--muted); margin: 0; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .turn-panel {
    grid-template-columns: 1fr;
  }
  .header-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .header-identity { grid-row: auto; grid-column: 1; }
  .header-buttons--row1,
  .header-buttons--row2 {
    grid-column: 1;
    justify-content: flex-start;
  }
}
.startplayer-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}
.startplayer-overlay.hidden { display: none; }
.startplayer-overlay__content {
  position: relative;
  padding: 1.2rem 1.6rem 1.8rem;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(12, 18, 36, 0.9), rgba(18, 24, 48, 0.92));
  border: 1px solid rgba(125, 90, 240, 0.45);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 28px rgba(125, 90, 240, 0.5);
  backdrop-filter: blur(8px) saturate(160%);
  width: min(720px, 92vw);
  overflow: hidden;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}
.startplayer-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(125, 90, 240, 0.28), rgba(0, 0, 0, 0.5));
  filter: blur(20px);
  pointer-events: none;
}
.startplayer-title {
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #5fe4ff, #7d5af0, #ff6eab);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(125, 90, 240, 0.45);
  padding: 0.3rem 0;
  text-align: center;
}
.startplayer-reel {
  position: relative;
  width: 260px;
  height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0.4rem;
}
.startplayer-card {
  width: 240px;
  height: 280px;
  background: rgba(12, 18, 36, 0.85);
  border: 1px solid rgba(var(--accent-rgb, 255, 255, 255), 0.25);
  border-radius: 18px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 40px rgba(var(--accent-rgb, 125, 90, 240), 0.25), 0 12px 28px rgba(0, 0, 0, 0.4);
  opacity: 0.95;
  transform: scale(0.96);
}
.startplayer-card__color {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  background: var(--accent, #7d5af0);
  box-shadow: 0 0 20px rgba(var(--accent-rgb, 125, 90, 240), 0.6);
}
.startplayer-card__character {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.startplayer-card__name { margin: 0; font-weight: 800; letter-spacing: 0.04em; text-align: center; font-size: 1.05rem; }
.startplayer-card__role { margin: 0; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.startplayer-card__badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border: 1px solid rgba(var(--accent-rgb, 125, 90, 240), 0.55);
  background: rgba(var(--accent-rgb, 125, 90, 240), 0.16);
  color: var(--accent, #7d5af0);
}
.startplayer-winner {
  position: relative;
  margin-top: 0.5rem;
  text-align: center;
  pointer-events: none;
}
.startplayer-winner.hidden { display: none; }
.startplayer-winner__text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}
.startplayer-winner__text span { color: var(--accent); }

@keyframes startplayer-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  50% { transform: scale(1.3); box-shadow: 0 0 28px rgba(var(--accent-rgb, 125, 90, 240), 0.8); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
}
.startplayer-card.is-winner {
  animation: startplayer-pulse 0.9s ease;
}

.slot-snap-enter {
  animation: slotSnap 0.16s ease;
}
@keyframes slotSnap {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slotSlideIn {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

.winner-highlight {
  animation: winnerPulse 1.2s ease;
}
@keyframes winnerPulse {
  0%   { transform: scale(1); box-shadow: none; }
  40%  { transform: scale(1.1); box-shadow: 0 0 20px var(--accent); }
  100% { transform: scale(1); box-shadow: none; }
}
.startplayer-pulse {
  animation: startPulse 1s ease;
}
@keyframes startPulse {
  0%   { transform: scale(1); box-shadow: none; }
  40%  { transform: scale(1.12); box-shadow: 0 0 24px var(--accent); }
  100% { transform: scale(1); box-shadow: none; }
}
.more-points-menu {
  position: absolute;
  z-index: 9999;
  min-width: 220px;
  background: rgba(14, 18, 34, 0.96);
  border: 1px solid rgba(125, 90, 240, 0.5);
  border-radius: 14px;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(125, 90, 240), 0.2);
  padding: 0.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(60px, 1fr));
  gap: 0.4rem;
  animation: popIn 0.18s ease;
  backdrop-filter: blur(6px);
}
.more-points-menu button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.45rem 0.35rem;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.more-points-menu button:hover,
.more-points-menu button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(125, 90, 240, 0.4);
  background: rgba(125, 90, 240, 0.2);
}

@keyframes popIn {
  0% { opacity: 0; transform: translateY(-6px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.chart-shell,
.chart-wrapper,
.command-grid,
.command-row,
.header-shell,
.header-hero,
.command-bar,
.panel,
.panel--right .chart-shell {
  overflow-x: hidden;
}
.panel--right .panel__head {
  justify-content: center;
  text-align: center;
}

.panel--right .panel__head > div {
  width: 100%;
}

.panel--right {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.panel--right h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.06em;
}

.panel--right .chart-shell {
  overflow: hidden;
}

.panel--right .chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 100%;
}

.turn-panel {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 28px) 1rem;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr);
  gap: 1.4rem;
  align-items: center;
}

.turn-panel__player {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(150deg, rgba(18, 22, 34, 0.92), rgba(10, 13, 22, 0.94));
  border-radius: 16px;
  border: 1px solid rgba(120, 190, 255, 0.3);
  padding: 1.2rem;
  box-shadow: inset 0 0 10px rgba(120, 190, 255, 0.14), 0 10px 18px rgba(0, 0, 0, 0.4);
}

.turn-panel__marker {
  width: 16px;
  height: 64px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb, 125, 90, 240), 0.7);
}

.turn-panel__role {
  margin: 0.2rem 0 0;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.turn-panel__points {
  margin: 0.4rem 0 0;
  font-weight: 700;
}

.turn-panel__actions {
  display: grid;
  gap: 0.8rem;
  background: linear-gradient(150deg, rgba(18, 22, 34, 0.92), rgba(10, 13, 22, 0.94));
  border-radius: 16px;
  border: 1px solid rgba(120, 190, 255, 0.3);
  padding: 1.2rem;
  box-shadow: inset 0 0 10px rgba(120, 190, 255, 0.14), 0 10px 18px rgba(0, 0, 0, 0.4);
}

.turn-panel__points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 0.5rem;
}

.turn-panel__points-grid button {
  border-radius: 12px;
  border: 1px solid rgba(120, 190, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.55rem 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.turn-panel__points-grid button:hover,
.turn-panel__points-grid button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(95, 163, 255, 0.35), rgba(125, 90, 240, 0.25));
  box-shadow: 0 10px 18px rgba(125, 90, 240, 0.35);
}

.turn-panel__next {
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .table-wrapper {
    margin-inline: 0;
    padding-bottom: 0;
    overflow-x: hidden;
  }

  .leaderboard {
    width: 100%;
    table-layout: fixed;
  }

  .leaderboard thead th,
  .leaderboard td {
    padding: 0.6rem 0.55rem;
  }

  /* Mobile: keep table readable without horizontal scrolling */
  .leaderboard thead th:nth-child(4),
  .leaderboard td:nth-child(4) {
    display: none;
  }

  .leaderboard thead th:nth-child(2),
  .leaderboard td:nth-child(2) {
    text-align: left;
  }

  .leaderboard td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .leaderboard td {
    font-size: 0.95rem;
  }

.modal__close {
  width: 44px;
  height: 44px;
}

  .role-icon {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 768px) {
  body.dashboard {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .command-bar {
    padding-inline: 12px;
  }

  .top-menu-bar {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 10px 12px;
  }

  .dashboard-title {
    font-size: 1.15rem;
    letter-spacing: 0.06em;
  }

  .header-line {
    display: none;
  }

  .header-slogan {
    flex-basis: 100%;
    order: 10;
    font-size: 0.85rem;
    line-height: 1.35;
    opacity: 0.9;
    overflow: visible;
    text-overflow: clip;
  }

  .top-menu-right {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .live-status {
    margin-left: 0;
    font-size: 0.8rem;
  }

  .lang-inline__link {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .right-menu-container {
    padding: 12px 12px 6px;
  }

  .dashboard-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dashboard-actions .menu-toggle {
    flex: none;
    max-width: none;
    width: 100%;
  }

  .menu-toggle {
    min-height: 52px;
    padding: 12px 14px;
    font-size: 14px;
    letter-spacing: 0.1em;
  }

  .turn-panel {
    padding-inline: 12px;
    gap: 12px;
  }

  .turn-panel__player,
  .turn-panel__actions {
    padding: 0.95rem;
  }

  .turn-panel__button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .turn-panel__button-row .btn {
    width: 100%;
  }

  .layout {
    padding: 12px;
    gap: 16px;
  }

  .panel {
    padding: 1.05rem;
  }

  .agents-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .turn-panel__points-grid {
    grid-template-columns: repeat(3, minmax(54px, 1fr));
  }
}
