:root {
  --bg1: #04030d;
  --bg2: #0c0a1e;
  --bg3: #0f1733;
  --panel: #110b22;
  --panel2: #1a1130;
  --text: #f6f2ff;
  --muted: #bcb3da;
  --accent: #ffd15a;
  --blue: #4aa3ff;
  --orange: #ff8a34;
  --green: #55e38b;
  --pink: #ff6fae;
  --glow: rgba(255, 209, 90, 0.45);
  --menu-bg-image: none;
  --menu-art-ratio: 960 / 816;
  --menu-screen-radial-1: rgba(64, 42, 110, 0.82);
  --menu-screen-radial-2: rgba(16, 56, 96, 0.78);
  --menu-screen-grad-top: rgba(7, 8, 22, 0.95);
  --menu-screen-grad-bottom: rgba(3, 4, 12, 0.97);
  --menu-card-grad-1: rgba(17, 11, 34, 0.98);
  --menu-card-grad-2: rgba(26, 17, 48, 0.98);
  --menu-card-border: rgba(255, 255, 255, 0.1);
  --menu-overlay-bg: rgba(0, 0, 0, 0.7);
  --menu-subpanel-bg: rgba(5, 11, 31, 0.52);
  --menu-subpanel-border: rgba(171, 196, 245, 0.25);
  --menu-item-bg: rgba(0, 0, 0, 0.24);
  --menu-item-border: rgba(255, 255, 255, 0.1);
  --menu-btn-grad-1: #2a1b4d;
  --menu-btn-grad-2: #16122f;
  --menu-btn-border: rgba(255, 255, 255, 0.1);
  --menu-btn-hover-glow: rgba(255, 255, 255, 0.1);
  --menu-input-bg: rgba(0, 0, 0, 0.35);
  --menu-input-border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", sans-serif;
  color: var(--text);
  background:
    radial-gradient(800px 500px at 12% 8%, #3a245f 0%, transparent 60%),
    radial-gradient(900px 600px at 85% 15%, #173a66 0%, transparent 60%),
    linear-gradient(180deg, var(--bg2), #05050d 70%);
  min-height: 100vh;
}

.app-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    radial-gradient(1000px 600px at 20% 18%, var(--menu-screen-radial-1), transparent 62%),
    radial-gradient(1200px 700px at 82% 12%, var(--menu-screen-radial-2), transparent 66%),
    linear-gradient(180deg, var(--menu-screen-grad-top), var(--menu-screen-grad-bottom)),
    var(--menu-bg-image);
  background-size: cover, cover, cover, cover;
  background-position: center;
}

#mainMenuScreen {
  background:
    radial-gradient(1200px 700px at 50% 48%, var(--menu-screen-radial-1), rgba(5, 7, 15, 0.985)),
    linear-gradient(180deg, var(--menu-screen-grad-top), var(--menu-screen-grad-bottom));
}

.app-screen.hidden {
  display: none;
}

.screen-card {
  width: min(980px, 94vw);
  background: linear-gradient(160deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  border: 1px solid var(--menu-card-border);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 18px;
  backdrop-filter: blur(2px);
}

.screen-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.screen-text {
  color: var(--muted);
  margin-bottom: 16px;
}

.screen-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.main-menu-shell {
  position: relative;
  width: min(96vw, calc(96vh * var(--menu-art-ratio)));
  aspect-ratio: var(--menu-art-ratio);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.58);
  background: #070a15;
}

.main-menu-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.main-menu-hotspots {
  position: absolute;
  inset: 0;
}

.main-menu-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center,
      rgba(135, 217, 255, 0.58) 0%,
      rgba(102, 193, 255, 0.26) 44%,
      rgba(164, 111, 255, 0.14) 64%,
      rgba(164, 111, 255, 0) 82%);
  filter: blur(11px);
  opacity: 0;
  transform: scale(0.99);
  will-change: opacity, transform;
  transition: opacity 180ms ease, transform 180ms ease;
}

.main-menu-glow.show {
  opacity: 0.96;
  transform: scale(1.01);
  transition-duration: 900ms, 900ms;
}

.main-menu-hover-fx {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  will-change: opacity;
  transition: opacity 180ms ease;
}

.main-menu-hover-fx.show {
  opacity: 1;
  transition-duration: 900ms;
}

.main-menu-ambient-fx {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  transition: opacity 220ms ease;
}

.main-menu-ambient-fx.show {
  opacity: 1;
}

.main-menu-fire-fx::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 6%;
  height: 50%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center,
      rgba(255, 215, 120, 0.56) 0%,
      rgba(255, 128, 26, 0.34) 42%,
      rgba(255, 44, 10, 0.2) 62%,
      rgba(255, 44, 10, 0) 90%);
  filter: blur(10px);
  mix-blend-mode: screen;
}

.main-menu-fire-particle {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle at 45% 35%,
      rgba(255, 248, 186, 0.9) 0%,
      hsla(var(--fx-hue, 24), 95%, 60%, 0.56) 40%,
      hsla(calc(var(--fx-hue, 24) - 8), 94%, 42%, 0.2) 72%,
      hsla(calc(var(--fx-hue, 24) - 12), 94%, 42%, 0) 100%);
  filter: blur(6px);
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0) scale(0.66);
  animation: main-menu-fire-rise var(--fx-duration, 1000ms) ease-out forwards;
}

@keyframes main-menu-fire-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.66);
  }
  16% {
    opacity: var(--fx-opacity, 0.48);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--fx-dx, 0px), calc(-1 * var(--fx-rise, 64px)), 0) scale(1.18);
  }
}

.main-menu-coffee-particle {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle at 40% 32%,
      rgba(236, 247, 255, 0.64) 0%,
      rgba(196, 218, 235, 0.28) 48%,
      rgba(189, 205, 223, 0.06) 78%,
      rgba(189, 205, 223, 0) 100%);
  filter: blur(5px);
  transform: translate3d(0, 0, 0) scale(0.82);
  animation: main-menu-coffee-rise var(--fx-duration, 1600ms) ease-out forwards;
}

@keyframes main-menu-coffee-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.82);
  }
  20% {
    opacity: var(--fx-opacity, 0.22);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--fx-dx, 0px), calc(-1 * var(--fx-rise, 96px)), 0) scale(1.28);
  }
}

.main-menu-smoke-particle {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background:
    radial-gradient(circle at 35% 35%,
      rgba(176, 231, 255, 0.58) 0%,
      rgba(120, 205, 255, 0.26) 46%,
      rgba(140, 158, 255, 0.09) 72%,
      rgba(140, 158, 255, 0) 100%);
  mix-blend-mode: screen;
  filter: blur(5px);
  transform: translate3d(0, 0, 0) scale(0.76);
  animation: main-menu-smoke var(--smoke-duration, 1200ms) ease-out forwards;
}

@keyframes main-menu-smoke {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.76);
  }
  18% {
    opacity: var(--smoke-opacity, 0.32);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--smoke-dx, 0px), calc(-1 * var(--smoke-rise, 34px)), 0) scale(1.26);
  }
}

.menu-account-dock {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.menu-account-auth-btn {
  background: rgba(8, 14, 34, 0.88);
  border-color: rgba(146, 192, 255, 0.55);
  font-size: 13px;
  padding: 7px 12px;
}

.menu-account-summary {
  width: min(350px, 80vw);
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  position: relative;
  background: linear-gradient(180deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  border: 1px solid var(--menu-card-border);
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.menu-account-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(192, 225, 255, 0.7);
  background: #1d2442;
}

.menu-account-meta {
  min-width: 0;
}

.menu-account-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-account-sub {
  font-size: 11px;
  color: #b9c7ea;
  min-height: 0;
}

.menu-account-actions {
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  justify-items: end;
}

.menu-account-mini {
  font-size: 12px;
  padding: 6px 10px;
}

.menu-account-gear {
  grid-row: 3;
  justify-self: end;
  align-self: end;
  min-width: 34px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
}

.menu-account-gear.is-open {
  border-color: rgba(194, 228, 255, 0.82);
  box-shadow: 0 0 0 1px rgba(127, 199, 255, 0.45), 0 0 18px rgba(79, 160, 255, 0.45);
}

.menu-account-flyout {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 6px);
  display: grid;
  gap: 6px;
  padding: 8px;
  min-width: 132px;
  border-radius: 10px;
  border: 1px solid var(--menu-card-border);
  background: linear-gradient(180deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.46);
  z-index: 12;
}

.auth-card {
  width: min(460px, 92vw);
}

.auth-grid {
  display: grid;
  gap: 8px;
}

.auth-status {
  min-height: 20px;
  color: #d8e6ff;
  font-size: 13px;
}

.profile-card {
  width: min(940px, 96vw);
}

.profile-grid-wrap {
  gap: 10px;
}

.profile-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  max-height: min(56vh, 560px);
}

.profile-tile {
  min-height: 148px;
}

.profile-tile-thumb {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: 1px solid rgba(188, 220, 255, 0.55);
  object-fit: cover;
  background: rgba(28, 38, 72, 0.85);
  justify-self: center;
}

.profile-tile-title {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #dce8ff;
}

.profile-tile-sub {
  text-align: center;
  font-size: 11px;
  color: #a9bbdf;
}

.profile-tile-create .profile-tile-thumb {
  display: grid;
  place-items: center;
  font-size: 36px;
  line-height: 1;
  color: #d7eaff;
  border-style: dashed;
  border-width: 1px;
}

.profile-create-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  padding: 0 14px 14px;
}

.match-summary-card {
  --stats-line: rgba(223, 237, 228, 0.13);
  --stats-line-strong: rgba(223, 237, 228, 0.25);
  --stats-text: #f3f6f2;
  --stats-muted: #98a49c;
  --stats-lime: #c8ff4d;
  width: min(1120px, 96vw);
  max-height: 92vh;
  overflow: auto;
}

.match-summary-progression-slot:empty { display: none; }
.match-summary-progression { margin: 14px 0 18px; padding: 14px 16px 10px; border: 1px solid var(--stats-line); border-left: 2px solid var(--stats-lime); background: linear-gradient(145deg, rgba(17, 24, 21, .96), rgba(8, 13, 11, .96)); box-shadow: 0 14px 32px rgba(0, 0, 0, .2); }
.match-summary-progression-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-bottom: 9px; border-bottom: 1px solid var(--stats-line); }
.match-summary-progression-head h3 { margin: 0; color: var(--stats-text); font-size: 16px; font-weight: 650; }
.match-summary-progression-head p { margin: 4px 0 0; color: var(--stats-muted); font-size: 10px; letter-spacing: .045em; }
.match-summary-progression-head > span { flex: 0 0 auto; padding: 4px 7px; border: 1px solid rgba(200, 255, 77, .25); color: var(--stats-lime); background: rgba(200, 255, 77, .045); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.match-summary-progression .stats-chart-visual { margin-top: 6px; }
.match-summary-progression .stats-chart-visual > svg { width: 100%; height: 220px; }

/* Stats studio ---------------------------------------------------------- */
#statsScreen {
  --stats-bg: #0a0d0c;
  --stats-panel: #111614;
  --stats-panel-strong: #171d1a;
  --stats-line: rgba(223, 237, 228, 0.13);
  --stats-line-strong: rgba(223, 237, 228, 0.25);
  --stats-text: #f3f6f2;
  --stats-muted: #98a49c;
  --stats-lime: #c8ff4d;
  --stats-blue: #5eb9ff;
  --stats-coral: #ff765f;
  --stats-gold: #ffc857;
  --stats-purple: #b98cff;
  display: block;
  overflow: hidden;
  color: var(--stats-text);
  background: var(--stats-bg);
  font-family: "Bahnschrift", "Franklin Gothic Medium", sans-serif;
}

#statsScreen.hidden { display: none; }

.stats-atmosphere,
.stats-atmosphere::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stats-atmosphere {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(200, 255, 77, 0.09), transparent 28%),
    radial-gradient(circle at 88% 6%, rgba(94, 185, 255, 0.08), transparent 30%),
    linear-gradient(120deg, transparent 0 58%, rgba(255, 255, 255, 0.018) 58% 58.15%, transparent 58.15%);
}

.stats-atmosphere::before {
  content: "";
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.stats-atmosphere > span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--stats-lime);
  box-shadow: 0 0 28px 5px rgba(200, 255, 77, 0.2);
  animation: stats-drift 12s ease-in-out infinite alternate;
}

.stats-atmosphere > span:nth-child(1) { top: 19%; left: 5.5%; }
.stats-atmosphere > span:nth-child(2) { top: 68%; left: 95%; animation-delay: -5s; background: var(--stats-blue); }
.stats-atmosphere > span:nth-child(3) { top: 88%; left: 18%; animation-delay: -8s; width: 5px; height: 5px; }

@keyframes stats-drift {
  to { transform: translate3d(24px, -18px, 0) scale(1.35); opacity: 0.55; }
}

.stats-card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 clamp(22px, 4vw, 78px);
  background: transparent;
  scrollbar-color: rgba(200, 255, 77, 0.38) transparent;
}

.stats-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--stats-line);
  background: rgba(10, 13, 12, 0.88);
  backdrop-filter: blur(22px) saturate(130%);
}

.stats-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.stats-brand-mark {
  width: 37px;
  height: 37px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--stats-line-strong);
  border-radius: 50%;
}

.stats-brand-mark i { display: block; border-radius: 999px; background: var(--stats-lime); }
.stats-brand-mark i:nth-child(1) { height: 38%; opacity: 0.55; }
.stats-brand-mark i:nth-child(2) { height: 100%; }
.stats-brand-mark i:nth-child(3) { height: 68%; opacity: 0.76; }
.stats-brand strong { display: block; font-size: 13px; letter-spacing: 0.19em; }
.stats-brand small { display: block; margin-top: 2px; color: var(--stats-muted); font-size: 8px; letter-spacing: 0.25em; }

.stats-top-actions { display: flex; align-items: center; gap: 8px; }

.stats-icon-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--stats-line-strong);
  border-radius: 999px;
  color: var(--stats-text);
  background: transparent;
  font: 600 11px/1 "Bahnschrift", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.stats-icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stats-icon-btn:hover { transform: translateY(-2px); border-color: var(--stats-lime); }
.stats-icon-btn-primary { color: #11170c; border-color: var(--stats-lime); background: var(--stats-lime); }

.stats-intro {
  min-height: clamp(260px, 34vh, 420px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
  align-items: end;
  gap: clamp(32px, 8vw, 140px);
  padding: clamp(52px, 8vh, 92px) 0 clamp(38px, 6vh, 70px);
}

.stats-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--stats-muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.stats-kicker span { width: 30px; height: 1px; background: var(--stats-lime); }
.stats-intro h1 { margin: 0; font-size: clamp(42px, 6.1vw, 96px); line-height: 0.88; letter-spacing: -0.055em; font-weight: 620; }
.stats-intro h1 em { color: var(--stats-lime); font-family: "Palatino Linotype", "Book Antiqua", serif; font-weight: 400; }
.stats-intro-copy { align-self: end; padding-bottom: 4px; }
.stats-intro-copy > p { max-width: 470px; margin: 0 0 26px; color: #c4ccc6; font: 400 clamp(14px, 1.2vw, 18px)/1.55 "Palatino Linotype", serif; }

.stats-header {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-left: 2px solid var(--stats-lime);
  color: var(--stats-muted);
  background: linear-gradient(90deg, rgba(200, 255, 77, 0.07), transparent);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-view-tabs {
  position: sticky;
  top: 78px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 7px;
  border-block: 1px solid var(--stats-line);
  background: rgba(8, 11, 9, 0.94);
  backdrop-filter: blur(20px);
}

.stats-tab-btn {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 13px;
  padding: 10px 15px;
  overflow: hidden;
  border: 1px solid rgba(223, 237, 228, 0.12);
  border-radius: 3px;
  color: var(--stats-muted);
  background: linear-gradient(145deg, rgba(25, 31, 28, 0.86), rgba(14, 18, 16, 0.88));
  font-family: "Bahnschrift", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.stats-tab-btn::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--stats-lime); transform: scaleX(0); transform-origin: left; transition: transform 220ms ease; }
.stats-tab-btn:hover { color: var(--stats-text); border-color: rgba(223, 237, 228, 0.28); background: linear-gradient(145deg, rgba(31, 38, 34, 0.95), rgba(17, 22, 19, 0.95)); transform: translateY(-1px); }
.stats-tab-btn.active { color: var(--stats-text); border-color: rgba(200, 255, 77, 0.5); background: linear-gradient(110deg, rgba(200, 255, 77, 0.13), rgba(24, 31, 27, 0.96) 56%, rgba(13, 18, 16, 0.96)); box-shadow: inset 0 0 28px rgba(200, 255, 77, 0.035); }
.stats-tab-btn.active::after { transform: scaleX(1); }
.stats-tab-index { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(223, 237, 228, 0.17); color: #758078; background: rgba(255, 255, 255, 0.025); font: 650 9px/1 "Bahnschrift", sans-serif; letter-spacing: 0.1em; transition: color 180ms ease, border-color 180ms ease, background 180ms ease; }
.stats-tab-copy { min-width: 0; display: grid; gap: 5px; }
.stats-tab-copy strong { overflow: hidden; color: inherit; font-size: clamp(15px, 1.35vw, 19px); font-weight: 650; line-height: 1; letter-spacing: 0.045em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.stats-tab-copy small { overflow: hidden; color: #747f78; font-size: 9px; font-weight: 500; line-height: 1; letter-spacing: 0.08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.stats-tab-marker { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(223, 237, 228, 0.12); border-radius: 50%; color: #68736b; font-size: 11px; transition: color 180ms ease, border-color 180ms ease, transform 180ms ease; }
.stats-tab-btn.active .stats-tab-index { color: #11170c; border-color: var(--stats-lime); background: var(--stats-lime); }
.stats-tab-btn.active .stats-tab-copy small { color: #aeb9b1; }
.stats-tab-btn.active .stats-tab-marker { color: var(--stats-lime); border-color: rgba(200, 255, 77, 0.38); transform: rotate(45deg); }

.stats-content { min-height: 42vh; padding: clamp(32px, 5vw, 68px) 0 40px; }
.stats-panel { animation: stats-reveal 420ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes stats-reveal { from { opacity: 0; transform: translateY(14px); } }

.stats-profile-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 30px;
  padding-bottom: 13px;
  overflow-x: auto;
  border-bottom: 1px solid var(--stats-line);
  scrollbar-width: none;
}

.stats-profile-tabs::-webkit-scrollbar { display: none; }

.stats-subtab-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--stats-muted);
  background: transparent;
  font: 550 10px/1 "Bahnschrift", sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.stats-subtab-btn:hover { color: var(--stats-text); }
.stats-subtab-btn.active { color: #12160f; border-color: var(--stats-lime); background: var(--stats-lime); }

.stats-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  border-block: 1px solid var(--stats-line);
  margin-bottom: clamp(34px, 5vw, 64px);
}

.stats-pill {
  min-height: 124px;
  padding: 25px 22px;
  border-right: 1px solid var(--stats-line);
  background: rgba(255, 255, 255, 0.012);
}

.stats-pill:nth-child(6n) { border-right: 0; }
.stats-pill:nth-child(n+7) { border-top: 1px solid var(--stats-line); }
.stats-pill-key { margin-bottom: 14px; color: var(--stats-muted); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.stats-pill-val { font-size: clamp(21px, 2vw, 32px); font-weight: 560; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats-pill-detail { margin-top: 8px; color: #657068; font-size: 9px; letter-spacing: 0.06em; }
.stats-pill.is-solo .stats-pill-val { color: var(--stats-blue); }
.stats-pill.is-team .stats-pill-val { color: var(--stats-gold); }

.stats-block { margin-bottom: 18px; }
.stats-block-title { margin-bottom: 12px; color: var(--stats-text); font-size: 15px; font-weight: 600; }
.stats-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.stats-section-head h2 { margin: 4px 0 0; font-size: clamp(24px, 2.5vw, 40px); line-height: 1; letter-spacing: -0.04em; font-weight: 570; }
.stats-section-head p { max-width: 430px; margin: 0; color: var(--stats-muted); font: 400 14px/1.5 "Palatino Linotype", serif; }
.stats-section-label { color: var(--stats-lime); font-size: 9px; letter-spacing: 0.19em; text-transform: uppercase; }

.stats-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.stats-data-card {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 2vw, 30px);
  border: 1px solid var(--stats-line);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(23, 29, 26, 0.96), rgba(14, 18, 16, 0.96));
  overflow: hidden;
}
.stats-data-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--card-accent, var(--stats-lime)); opacity: 0.75; }
.stats-data-card h3 { margin: 0; font-size: 17px; font-weight: 560; }
.stats-data-card-note { margin-top: 5px; color: var(--stats-muted); font-size: 10px; letter-spacing: 0.05em; }
.stats-help-label { display: inline-flex; align-items: center; gap: 5px; border-bottom: 1px dotted rgba(220, 231, 223, .4); cursor: help; }
.stats-help-label i { width: 14px; height: 14px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(200, 255, 77, .42); border-radius: 50%; color: var(--stats-lime); font: 700 8px/1 var(--stats-font, Inter, sans-serif); }
.stats-help-label:focus { outline: 1px solid var(--stats-lime); outline-offset: 3px; }
.stats-card-span-4 { grid-column: span 4; }
.stats-card-span-3 { grid-column: span 3; }
.stats-card-span-5 { grid-column: span 5; }
.stats-card-span-6 { grid-column: span 6; }
.stats-card-span-7 { grid-column: span 7; }
.stats-card-span-8 { grid-column: span 8; }
.stats-card-span-9 { grid-column: span 9; }
.stats-card-span-12 { grid-column: 1 / -1; }

.stats-donut-layout { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: clamp(20px, 3vw, 48px); }
.stats-donut {
  --value: 0;
  --donut-color: var(--stats-lime);
  position: relative;
  width: clamp(128px, 12vw, 178px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--donut-color) calc(var(--value) * 1%), #242b27 0);
}
.stats-donut::before { content: ""; position: absolute; width: 72%; aspect-ratio: 1; border-radius: inherit; background: #121714; box-shadow: inset 0 0 0 1px var(--stats-line); }
.stats-donut-center { position: relative; z-index: 1; text-align: center; }
.stats-donut-value { display: block; font-size: clamp(28px, 3vw, 44px); font-weight: 560; letter-spacing: -0.05em; }
.stats-donut-label { display: block; margin-top: 3px; color: var(--stats-muted); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; }
.stats-legend { display: grid; gap: 14px; min-width: 130px; }
.stats-legend-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; font-size: 11px; }
.stats-legend-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--legend-color); }
.stats-legend-row span { color: var(--stats-muted); }
.stats-legend-row strong { font-weight: 550; font-variant-numeric: tabular-nums; }

.stats-bars { display: grid; gap: 15px; margin-top: 26px; }
.stats-bar-row { display: grid; grid-template-columns: minmax(72px, 0.42fr) minmax(130px, 1fr) auto; align-items: center; gap: 14px; }
.stats-bar-label { overflow: hidden; color: #dce2dd; font-size: 10px; letter-spacing: 0.03em; text-overflow: ellipsis; white-space: nowrap; }
.stats-bar-track { height: 5px; overflow: hidden; background: #252c28; }
.stats-bar-fill { width: var(--bar-value); height: 100%; background: var(--bar-color, var(--stats-lime)); transform-origin: left; animation: stats-grow 720ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes stats-grow { from { transform: scaleX(0); } }
.stats-bar-value { color: var(--stats-muted); font-size: 10px; font-variant-numeric: tabular-nums; }

.stats-peg-composition { display: grid; grid-template-columns: minmax(126px, .55fr) minmax(220px, 1fr); align-items: center; gap: clamp(24px, 4vw, 56px); min-height: 190px; padding: 18px clamp(12px, 2vw, 28px) 4px; }
.stats-peg-pie { width: min(100%, 184px); aspect-ratio: 1; justify-self: center; border: 1px solid rgba(255, 255, 255, .09); border-radius: 50%; background: var(--peg-pie); box-shadow: 0 18px 42px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .04); }
.stats-peg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats-peg-item { display: grid; grid-template-columns: 9px 1fr; gap: 9px; align-items: start; }
.stats-peg-item i { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--peg-color); box-shadow: 0 0 12px color-mix(in srgb, var(--peg-color), transparent 65%); }
.stats-peg-item span { display: block; color: var(--stats-muted); font-size: 9px; text-transform: uppercase; }
.stats-peg-item strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 540; }

.stats-insight-list { display: grid; gap: 0; margin-top: 18px; }
.stats-insight { display: grid; grid-template-columns: 29px 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid var(--stats-line); }
.stats-insight-index { color: var(--stats-lime); font: 400 10px/1.5 "Palatino Linotype", serif; }
.stats-insight strong { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 560; }
.stats-insight span { color: var(--stats-muted); font: 400 11px/1.45 "Palatino Linotype", serif; }

.stats-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 12px; margin: 0 0 42px; }
.stats-podium-card {
  position: relative;
  min-height: 235px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--stats-line);
  background: linear-gradient(155deg, rgba(28, 35, 31, 0.93), rgba(13, 17, 15, 0.93));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}
.stats-podium-card:hover { transform: translateY(-5px); border-color: var(--stats-line-strong); }
.stats-podium-card.is-first { min-height: 278px; border-color: rgba(200, 255, 77, 0.42); background: linear-gradient(150deg, rgba(49, 62, 31, 0.74), rgba(16, 21, 17, 0.96) 62%); }
.stats-podium-rank { position: absolute; top: 20px; right: 22px; color: #5e6962; font: 400 38px/1 "Palatino Linotype", serif; }
.stats-podium-card.is-first .stats-podium-rank { color: var(--stats-lime); }
.stats-player-avatar { width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--stats-line-strong); border-radius: 50%; color: #0e130c; background: var(--stats-lime); font-size: 20px; font-weight: 650; }
.stats-player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.stats-podium-card.is-first .stats-player-avatar { width: 76px; height: 76px; box-shadow: 0 0 0 7px rgba(200, 255, 77, 0.08); }
.stats-podium-name { margin-top: 22px; font-size: clamp(18px, 2vw, 29px); letter-spacing: -0.04em; }
.stats-podium-record { margin-top: 6px; color: var(--stats-muted); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.stats-podium-score { padding-top: 18px; border-top: 1px solid var(--stats-line); }
.stats-podium-score span { display: block; color: var(--stats-muted); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; }
.stats-podium-score strong { display: block; margin-top: 5px; font-size: clamp(22px, 2.6vw, 38px); font-weight: 570; letter-spacing: -0.05em; }

.stats-archive-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 40px; border: 1px solid var(--stats-line); }
.stats-archive-metric { padding: 21px 24px; border-right: 1px solid var(--stats-line); }
.stats-archive-metric:last-child { border-right: 0; }
.stats-archive-metric span { display: block; color: var(--stats-muted); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; }
.stats-archive-metric strong { display: block; margin-top: 9px; font-size: clamp(20px, 2vw, 30px); font-weight: 560; letter-spacing: -0.04em; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.stats-leaderboard-heading { position: relative; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.stats-leaderboard-heading .stats-section-head { flex: 1 1 auto; margin-bottom: 0; }
.stats-history-heading { position: relative; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.stats-history-heading .stats-section-head { flex: 1 1 auto; margin-bottom: 0; }
.stats-modifier-menu { position: relative; flex: 0 0 auto; }
.stats-modifier-menu-toggle { min-height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--stats-line-strong); border-radius: 2px; color: #aeb8b1; background: rgba(12,17,14,.94); font: 650 9px/1 "Bahnschrift", sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: color 140ms ease, border-color 140ms ease, background 140ms ease; }
.stats-modifier-menu-toggle > span { color: var(--stats-lime); font-size: 15px; line-height: 1; }
.stats-modifier-menu-toggle em { font-style: normal; }
.stats-modifier-menu-toggle b { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 999px; color: #11160e; background: var(--stats-gold); font-size: 8px; letter-spacing: 0; }
.stats-modifier-menu-toggle:hover, .stats-modifier-menu-toggle[aria-expanded="true"] { color: var(--stats-text); border-color: rgba(200,255,77,.5); background: rgba(200,255,77,.07); }
.stats-modifier-flyout { position: absolute; top: calc(100% + 7px); right: 0; z-index: 30; width: min(342px, calc(100vw - 32px)); padding: 12px; border: 1px solid rgba(200,255,77,.38); border-top: 2px solid var(--stats-lime); background: linear-gradient(145deg, rgba(24,31,27,.99), rgba(8,12,10,.995)); box-shadow: 0 18px 48px rgba(0,0,0,.55); }
.stats-modifier-flyout-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--stats-line); }
.stats-modifier-flyout-head span { display: block; color: var(--stats-lime); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.stats-modifier-flyout-head h3 { margin: 3px 0 0; font-size: 14px; font-weight: 650; }
.stats-modifier-flyout-head button { min-height: 25px; padding: 0 8px; border: 1px solid rgba(223,237,228,.15); color: var(--stats-muted); background: transparent; font: 650 9px/1 "Bahnschrift", sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.stats-modifier-flyout-head button:hover:not(:disabled) { color: var(--stats-lime); border-color: rgba(200,255,77,.45); }
.stats-modifier-flyout-head button:disabled { opacity: .3; cursor: default; }
.stats-modifier-flyout > p { margin: 9px 0 10px; color: var(--stats-muted); font: 400 10px/1.35 "Palatino Linotype", serif; }
.stats-modifier-filter-group + .stats-modifier-filter-group { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--stats-line); }
.stats-modifier-filter-group h4 { margin: 0 0 6px; color: #9aa69e; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stats-modifier-filter-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.stats-modifier-filter-option { min-width: 0; min-height: 32px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 17px; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid rgba(223,237,228,.1); color: #748078; background: rgba(255,255,255,.012); cursor: pointer; transition: border-color 140ms ease, color 140ms ease, background 140ms ease; }
.stats-modifier-filter-option input { position: absolute; opacity: 0; pointer-events: none; }
.stats-modifier-filter-option i { width: 23px; height: 19px; display: grid; place-items: center; color: #657169; font: 700 9px/1 "Bahnschrift", sans-serif; font-style: normal; }
.stats-modifier-filter-option span { overflow: hidden; font-size: 10px; font-weight: 650; letter-spacing: .035em; text-overflow: ellipsis; white-space: nowrap; }
.stats-modifier-filter-option > b { width: 15px; height: 15px; display: block; border: 1px solid #465249; border-radius: 2px; }
.stats-modifier-filter-option input:checked ~ b { border-color: var(--stats-lime); background: var(--stats-lime); box-shadow: inset 0 0 0 3px #12170f; }
.stats-modifier-filter-option.is-included { border-color: rgba(200,255,77,.18); color: #dce5df; background: rgba(200,255,77,.035); }
.stats-modifier-filter-option.is-included i { color: var(--stats-lime); }
.stats-modifier-filter-option:focus-within { outline: 1px solid var(--stats-lime); outline-offset: 2px; }
.stats-modifier-filter-status { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--stats-line); color: #7d8981; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.stats-modifier-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.stats-modifier-badge { min-width: 29px; height: 21px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 5px; border: 1px solid rgba(255,184,77,.34); color: var(--stats-gold); background: rgba(255,184,77,.065); font-size: 7px; font-weight: 700; letter-spacing: .07em; cursor: help; }
.stats-modifier-badge i { font-size: 10px; font-style: normal; letter-spacing: 0; }
.stats-modifier-badge b { font-weight: 700; }
.stats-recent-match > .stats-modifier-badges.is-compact { position: absolute; top: 40px; right: 12px; margin: 0; }
.stats-modifier-badges.is-compact .stats-modifier-badge { min-width: 20px; width: 20px; padding: 0; }

.stats-recent-section { margin-bottom: 14px; border: 1px solid var(--stats-line); background: linear-gradient(145deg, rgba(20, 26, 23, 0.96), rgba(11, 15, 13, 0.96)); }
.stats-recent-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 13px; border-bottom: 1px solid var(--stats-line); }
.stats-recent-head > div { display: flex; align-items: baseline; gap: 10px; }
.stats-recent-head > div > span { color: var(--stats-lime); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.stats-recent-head h3 { margin: 0; font-size: 14px; font-weight: 620; letter-spacing: 0.015em; }
.stats-recent-head > button { min-height: 30px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid rgba(223, 237, 228, 0.17); border-radius: 2px; color: #b7c0ba; background: rgba(255, 255, 255, 0.025); font: 600 8px/1 "Bahnschrift", sans-serif; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background 160ms ease; }
.stats-recent-head > button:hover { color: #10160d; border-color: var(--stats-lime); background: var(--stats-lime); }
.stats-recent-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-recent-match { position: relative; min-width: 0; min-height: 188px; display: flex; flex-direction: column; align-items: stretch; padding: 13px 14px 12px; overflow: hidden; border: 0; border-right: 1px solid var(--stats-line); color: var(--stats-text); background: transparent; font-family: "Bahnschrift", sans-serif; text-align: left; cursor: pointer; transition: background 170ms ease, box-shadow 170ms ease; }
.stats-recent-match:last-child { border-right: 0; }
.stats-recent-match::after { content: ""; position: absolute; inset: auto 14px 0; height: 2px; background: var(--stats-lime); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.stats-recent-match:hover, .stats-recent-match:focus-visible { outline: 0; background: linear-gradient(145deg, rgba(200, 255, 77, 0.075), rgba(255, 255, 255, 0.018)); box-shadow: inset 0 0 22px rgba(200, 255, 77, 0.025); }
.stats-recent-match:hover::after, .stats-recent-match:focus-visible::after { transform: scaleX(1); }
.stats-recent-order { position: absolute; top: 11px; right: 12px; color: #465149; font: 400 19px/1 "Palatino Linotype", serif; }
.stats-recent-meta { display: grid; gap: 2px; padding-right: 28px; }
.stats-recent-meta strong { font-size: 11px; font-weight: 650; letter-spacing: 0.07em; }
.stats-recent-meta small { color: #667169; font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.stats-recent-mode { align-self: flex-start; margin-top: 10px; padding: 4px 6px; border: 1px solid rgba(94, 185, 255, 0.25); color: var(--stats-blue); background: rgba(94, 185, 255, 0.055); font-size: 9px; font-weight: 650; letter-spacing: 0.09em; }
.stats-recent-winner { display: grid; gap: 2px; margin-top: 10px; }
.stats-recent-winner small { color: #6f7a72; font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; }
.stats-recent-winner strong { overflow: hidden; font-size: 16px; font-weight: 620; line-height: 1.1; letter-spacing: -0.015em; text-overflow: ellipsis; white-space: nowrap; }
.stats-recent-players { margin-top: 4px; overflow: hidden; color: #8b968e; font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.stats-recent-metrics { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--stats-line); }
.stats-recent-metrics > span { display: grid; gap: 2px; }
.stats-recent-metrics small { color: #667169; font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.stats-recent-metrics strong { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-recent-cta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: var(--stats-lime); font-size: 8px; font-weight: 650; letter-spacing: 0.09em; text-transform: uppercase; }
.stats-recent-cta i { font-style: normal; font-size: 12px; }
.stats-recent-loading { grid-column: 1 / -1; min-height: 112px; display: grid; place-items: center; padding: 24px; color: var(--stats-muted); font: 400 12px/1.4 "Palatino Linotype", serif; }
.stats-leaderboard-table-card { min-height: 0; margin-bottom: 14px; }

.stats-table-shell { overflow-x: auto; border: 1px solid var(--stats-line); background: rgba(15, 19, 17, 0.72); }
.stats-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.stats-table th,
.stats-table td { padding: 16px 14px; border-bottom: 1px solid var(--stats-line); text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-table th { color: #727d76; background: rgba(255, 255, 255, 0.012); font-size: 8px; font-weight: 550; letter-spacing: 0.13em; text-transform: uppercase; }
.stats-table-sortable th[data-stats-sort-column] { position: relative; padding-right: 32px; cursor: pointer; user-select: none; transition: color 140ms ease, background 140ms ease; }
.stats-table-sortable th[data-stats-sort-column]::after { content: "\2195"; position: absolute; top: 50%; right: 12px; color: #536058; font-size: 12px; line-height: 1; letter-spacing: 0; transform: translateY(-50%); transition: color 140ms ease, transform 140ms ease; }
.stats-table-sortable th[data-stats-sort-column]:hover { color: var(--stats-text); background: rgba(200,255,77,.035); }
.stats-table-sortable th[data-stats-sort-column]:hover::after { color: var(--stats-lime); }
.stats-table-sortable th[data-stats-sort-column]:focus-visible { outline: 1px solid var(--stats-lime); outline-offset: -3px; color: var(--stats-text); }
.stats-table-sortable th[aria-sort="ascending"] { color: var(--stats-lime); background: rgba(200,255,77,.055); }
.stats-table-sortable th[aria-sort="ascending"]::after { content: "\2191"; color: var(--stats-lime); transform: translateY(-50%); }
.stats-table-sortable th[aria-sort="descending"] { color: var(--stats-lime); background: rgba(200,255,77,.055); }
.stats-table-sortable th[aria-sort="descending"]::after { content: "\2193"; color: var(--stats-lime); transform: translateY(-50%); }
.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table td:first-child { color: var(--stats-muted); }
.stats-table td:nth-child(2) { color: var(--stats-text); font-weight: 560; }
.stats-table-clickable tbody tr { cursor: pointer; transition: background 140ms ease, color 140ms ease; }
.stats-table-clickable tbody tr:hover { background: rgba(200, 255, 77, 0.055); }
.stats-table-clickable tbody tr.is-selected { background: rgba(200, 255, 77, 0.1); box-shadow: inset 2px 0 var(--stats-lime); }
.stats-table-rank { color: var(--stats-lime); font: 400 17px/1 "Palatino Linotype", serif; }
.stats-table-player { display: flex; align-items: center; gap: 10px; }
.stats-table-avatar { width: 31px; height: 31px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #11160e; background: #dce5df; font-size: 10px; }
.stats-table-avatar img { width: 100%; height: 100%; object-fit: cover; }
.stats-table-record { color: var(--stats-muted); }
.stats-table-score { color: var(--stats-lime); font-weight: 600; }
.stats-table-mode-avg { font-weight: 650; }
.stats-table-mode-avg.is-solo { color: var(--stats-blue); }
.stats-table-mode-avg.is-team { color: var(--stats-gold); }
.stats-table-mode-count { color: var(--stats-muted); font-size: .82em; font-weight: 550; }
.stats-empty { min-height: 150px; display: grid; place-items: center; padding: 32px; border: 1px dashed var(--stats-line-strong); color: var(--stats-muted); font: 400 14px/1.5 "Palatino Linotype", serif; text-align: center; }
.stats-table-shell + .stats-empty, .stats-data-card .stats-empty { min-height: 0; margin-top: 12px; padding: 8px; border: 0; justify-content: start; font-size: 11px; }

.stats-history-list { display: grid; gap: 10px; }
.stats-history-card {
  display: grid;
  grid-template-columns: 70px minmax(135px, .65fr) minmax(145px, .72fr) minmax(180px, 1.1fr) minmax(210px, .95fr) minmax(80px, .42fr) minmax(58px, .3fr) 20px;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 18px 22px;
  border: 1px solid var(--stats-line);
  background: rgba(17, 22, 20, 0.86);
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}
.stats-history-card:hover { transform: translateX(4px); border-color: rgba(200, 255, 77, 0.38); background: rgba(24, 31, 27, 0.95); }
.stats-history-back {
  border: 1px solid var(--stats-line);
  background: rgba(18, 24, 21, .84);
  color: var(--stats-muted);
  min-height: 36px;
  padding: 0 14px;
  margin-bottom: 12px;
  border-radius: 4px;
  font: 700 11px/1 var(--stats-font, Inter, sans-serif);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.stats-history-back:hover { color: var(--stats-accent); border-color: rgba(200, 255, 77, .4); }
.stats-match-identity-banner { position: relative; min-width: 0; margin-bottom: 8px; }
.stats-match-titlebar { display: flex; align-items: center; min-width: 0; min-height: 40px; overflow: visible; }
.stats-match-titlebar .stats-section-head { flex: 0 0 auto; margin-bottom: 0; }
.stats-match-scoreboard {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex: 0 0 auto;
  transform: translateX(-50%);
  background: transparent;
}
.stats-match-scoreboard-side {
  width: clamp(112px, 9vw, 156px);
  min-width: 0;
  min-height: 100%;
  flex: 0 1 156px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 3px;
  padding: 4px 12px 3px;
  border-right: 1px solid var(--stats-line);
  text-align: center;
}
.stats-match-scoreboard-side:last-child { border-right: 0; }
.stats-match-scoreboard-side.is-winner { background: color-mix(in srgb, var(--team-color), transparent 93%); box-shadow: inset 0 2px 0 var(--team-color); }
.stats-match-scoreboard-side > div { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
.stats-match-scoreboard-side span { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; color: var(--team-color); font-size: 12px; font-weight: 800; letter-spacing: .07em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.stats-match-scoreboard-side span i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.stats-match-scoreboard-side em { padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--team-color), transparent 50%); color: var(--team-color); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.stats-match-scoreboard-side strong { color: var(--stats-text); font-size: 24px; font-weight: 720; line-height: 1; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stats-match-scoreboard-side small { max-width: 100%; overflow: hidden; color: var(--stats-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stats-match-subtabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 10px;
  border: 1px solid var(--stats-line);
  background: rgba(9, 13, 11, .9);
}
.stats-match-subtabs button {
  position: relative;
  min-width: 0;
  min-height: 64px;
  padding: 12px 16px;
  border: 0;
  border-right: 1px solid var(--stats-line);
  background: transparent;
  color: var(--stats-muted);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.stats-match-subtabs button:last-child { border-right: 0; }
.stats-match-subtabs button::after { content: ""; position: absolute; inset: auto 12px -1px; height: 2px; background: var(--stats-lime); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.stats-match-subtabs button:hover { background: rgba(255,255,255,.025); color: var(--stats-copy); }
.stats-match-subtabs button.is-active { background: rgba(200,255,77,.06); color: var(--stats-text); }
.stats-match-subtabs button.is-active::after { transform: scaleX(1); }
.stats-match-subtabs strong { display: block; font-size: 14px; font-weight: 750; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.stats-match-subtabs span { display: block; margin-top: 5px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.stats-match-tab-panel { animation: stats-panel-enter .22s ease both; }
@keyframes stats-panel-enter { from { opacity: .35; transform: translateY(4px); } }
.stats-history-legacy { margin-bottom: 14px; }
.stats-classic-notice { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; padding: 9px 12px; border: 1px solid rgba(255,184,77,.24); border-left: 2px solid var(--stats-gold); background: rgba(255,184,77,.045); }
.stats-classic-notice strong { flex: 0 0 auto; color: var(--stats-gold); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.stats-classic-notice span { color: var(--stats-muted); font-size: 10px; }
.stats-progression-kpis {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 1px solid var(--stats-line);
  margin-bottom: 10px;
}
.stats-classic-kpis { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.stats-classic-kpis .stats-archive-metric strong { font-size: clamp(16px, 1.45vw, 24px); }
.stats-progression-kpis .stats-archive-metric { min-width: 0; border-right: 1px solid var(--stats-line); }
.stats-progression-kpis .stats-archive-metric:last-child { border-right: 0; }
.stats-progression-kpis .stats-archive-metric strong { font-size: clamp(19px, 1.8vw, 32px); }
.stats-progression-kpis .stats-archive-metric small { color: var(--stats-muted); font-size: 10px; white-space: nowrap; }
.stats-progression-grid { margin-bottom: 0; }
.stats-progression-card svg { display: block; width: 100%; height: 270px; margin-top: 5px; overflow: visible; }
.stats-chart-lenses { display: flex; flex-wrap: wrap; gap: 5px; }
.stats-chart-lens { min-height: 29px; padding: 0 11px; border: 1px solid var(--stats-line); border-radius: 999px; background: rgba(255,255,255,.018); color: var(--stats-muted); font: 700 8px/1 var(--stats-font, Inter, sans-serif); letter-spacing: .11em; text-transform: uppercase; cursor: pointer; }
.stats-chart-lens:hover { color: var(--stats-text); border-color: var(--stats-line-strong); }
.stats-chart-lens.is-active { color: #10160d; border-color: var(--stats-lime); background: var(--stats-lime); }
.stats-chart-panel-head { display: flex; justify-content: space-between; gap: 16px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--stats-line); }
.stats-chart-panel-head h3 { font-size: 15px; }
.stats-chart-visual { display: grid; grid-template-columns: minmax(120px, .18fr) minmax(0, 1fr); align-items: stretch; gap: 18px; margin-top: 5px; }
.stats-chart-player-key { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 12px 16px 12px 0; border-right: 1px solid var(--stats-line); }
.stats-chart-player-key > div { min-width: 0; display: grid; grid-template-columns: 5px minmax(0, 1fr); align-items: center; gap: 10px; color: var(--player-color); }
.stats-chart-player-key i { width: 5px; height: 30px; border-radius: 999px; background: var(--player-color); box-shadow: 0 0 14px color-mix(in srgb, var(--player-color), transparent 48%); }
.stats-chart-player-key strong { overflow: hidden; color: currentColor; font-size: clamp(12px, 1.1vw, 16px); font-weight: 750; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.stats-chart-player-key.has-teams { gap: 5px; }
.stats-chart-player-key.has-teams > div { min-height: 21px; }
.stats-chart-player-key.has-teams > .is-team { margin-top: 5px; }
.stats-chart-player-key.has-teams > .is-team:first-child { margin-top: 0; }
.stats-chart-player-key.has-teams > .is-team i { height: 24px; }
.stats-chart-player-key.has-teams > .is-team strong { font-size: clamp(13px, 1.15vw, 17px); font-weight: 850; }
.stats-chart-player-key.has-teams > .is-contribution { grid-template-columns: 22px minmax(0, 1fr); padding-left: 10px; opacity: .92; }
.stats-chart-player-key.has-teams > .is-contribution i { width: 22px; height: 2px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--player-color) 0 6px, transparent 6px 10px); box-shadow: none; }
.stats-chart-player-key.has-teams > .is-contribution strong { font-size: clamp(10px, .92vw, 13px); font-weight: 680; }
.stats-chart-visual > svg { min-width: 0; }
.stats-chart-visual-scatter { margin-top: 16px; }
.stats-chart-visual-scatter .stats-chart-player-key { padding-top: 28px; padding-bottom: 28px; }
.stats-progression-zero { stroke: rgba(244,255,226,.5); stroke-width: 1; stroke-dasharray: 5 5; }
.stats-progression-gridline { stroke: rgba(255,255,255,.09); stroke-width: 1; }
.stats-progression-axis { fill: var(--stats-muted); font-size: 12px; font-family: var(--stats-font, Inter, sans-serif); }
.stats-progression-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0; }
.stats-progression-legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--stats-copy); font-size: 11px; font-weight: 700; }
.stats-progression-legend i { width: 16px; height: 3px; border-radius: 2px; }
.stats-turning-points { display: grid; gap: 8px; margin-top: 14px; }
.stats-turning-point { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px; background: rgba(255,255,255,.025); border-left: 2px solid var(--stats-accent); }
.stats-turning-point > span { color: var(--stats-copy); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.stats-turning-point strong { color: var(--stats-accent); font-size: 18px; }
.stats-turning-point small { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; color: var(--stats-muted); font-size: 10px; }
.stats-top-shot-peg-total { color: var(--stats-copy); white-space: nowrap; }
.stats-top-shot-peg-mix { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.stats-top-shot-peg-mix > span { --peg-color: var(--stats-muted); display: inline-flex; align-items: center; gap: 3px; color: var(--peg-color); font-size: 9px; font-weight: 650; text-transform: capitalize; white-space: nowrap; }
.stats-top-shot-peg-mix i { width: 5px; height: 5px; border-radius: 50%; background: var(--peg-color); box-shadow: 0 0 7px color-mix(in srgb, var(--peg-color), transparent 55%); }
.stats-top-shot-peg-mix b { color: currentColor; font-weight: 800; font-variant-numeric: tabular-nums; }
.stats-top-shot-peg-mix .is-blue { --peg-color: #49a7ff; }
.stats-top-shot-peg-mix .is-orange { --peg-color: #ff9f43; }
.stats-top-shot-peg-mix .is-purple { --peg-color: #c58bff; }
.stats-top-shot-peg-mix .is-green { --peg-color: #65df83; }
.stats-top-shot-style { white-space: nowrap; }
.stats-story-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 15px; border: 1px solid var(--stats-line); }
.stats-story-note { display: grid; grid-template-columns: 25px 1fr; gap: 9px; min-height: 102px; padding: 15px; border-right: 1px solid var(--stats-line); background: rgba(255,255,255,.014); }
.stats-story-note:last-child { border-right: 0; }
.stats-story-note > span { color: var(--stats-lime); font: 400 10px/1.4 "Palatino Linotype", serif; }
.stats-story-note strong { display: block; color: var(--stats-text); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.stats-story-note p { margin: 7px 0 0; color: var(--stats-muted); font: 400 11px/1.45 "Palatino Linotype", serif; }
.stats-shot-timeline-card { min-height: 190px; }
.stats-shot-bars { display: flex; align-items: flex-end; gap: 3px; height: 105px; margin-top: 18px; padding-top: 8px; border-bottom: 1px solid var(--stats-line); }
.stats-shot-bar { flex: 1 1 5px; min-width: 3px; height: 100%; padding: 0; border: 0; background: transparent; cursor: crosshair; display: flex; align-items: flex-end; }
.stats-shot-bar span { width: 100%; height: var(--shot-height); min-height: 3px; background: var(--shot-color); opacity: .82; transition: opacity .15s ease, filter .15s ease; }
.stats-shot-bar:hover span { opacity: 1; filter: brightness(1.25); }
.stats-shot-log tbody tr:hover { background: rgba(24, 215, 194, .045); }
.stats-shot-scatter { display: block; width: 100%; height: 330px; margin-top: 16px; overflow: visible; }
.stats-shot-scatter circle { transition: opacity .15s ease, stroke-width .15s ease; }
.stats-shot-scatter:hover circle { opacity: .45; }
.stats-shot-scatter circle:hover { opacity: 1; stroke-width: 3; }
.stats-distribution { display: grid; gap: 15px; margin-top: 24px; }
.stats-distribution-row { display: grid; grid-template-columns: 74px minmax(80px, 1fr) 22px; align-items: center; gap: 9px; color: var(--stats-muted); font-size: 9px; }
.stats-distribution-row > strong { color: var(--stats-copy); font-size: 10px; text-align: right; }
.stats-distribution-track { height: 9px; background: rgba(255,255,255,.04); }
.stats-distribution-track > div { display: flex; width: var(--bucket-width); height: 100%; min-width: 2px; }
.stats-distribution-track i { width: var(--segment); height: 100%; background: var(--segment-color); }
.stats-range-list { display: grid; gap: 17px; margin-top: 25px; }
.stats-range-row { display: grid; grid-template-columns: minmax(85px, .22fr) minmax(180px, 1fr) 90px; align-items: center; gap: 14px; }
.stats-range-row > strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stats-range-row > span { color: var(--stats-muted); font-size: 9px; text-align: right; }
.stats-range-track { position: relative; height: 5px; background: rgba(255,255,255,.06); }
.stats-range-track i { position: absolute; top: -2px; height: 9px; opacity: .68; }
.stats-range-track b { position: absolute; top: -5px; width: 2px; height: 15px; background: #f4ffe2; }
.stats-range-track em { position: absolute; top: -4px; width: 9px; height: 9px; border: 1px solid var(--stats-lime); background: #111714; transform: translateX(-50%) rotate(45deg); }
.stats-table-color { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; }
.stats-player-comparison-table { min-width: 1160px; }
.stats-player-comparison-table th,
.stats-player-comparison-table td { padding-inline: 4px; }
.stats-player-comparison-table.stats-table-sortable th[data-stats-sort-column] { padding-inline: 4px 14px; }
.stats-player-comparison-table.stats-table-sortable th[data-stats-sort-column]::after { right: 3px; }
.stats-player-peg-cell { display: inline-flex; align-items: baseline; gap: 6px; }
.stats-player-peg-cell > strong { color: var(--stats-text); font-size: 12px; font-weight: 650; }
.stats-player-peg-breakdown { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; }
.stats-player-peg-breakdown i { display: inline-flex; align-items: center; gap: 3px; font-style: normal; }
.stats-player-peg-breakdown i::before { width: 4px; height: 4px; border-radius: 50%; background: currentColor; content: ""; }
.stats-player-peg-breakdown .is-blue { color: #5eb9ff; }
.stats-player-peg-breakdown .is-orange { color: #ff944d; }
.stats-player-peg-breakdown .is-green { color: #72df91; }
.stats-player-peg-breakdown .is-purple { color: #b98cff; }
.stats-player-peg-breakdown .is-bonus { color: #ffc857; }
.stats-player-peg-breakdown .is-gourd { color: #d69a5b; }
.stats-player-peg-breakdown .is-other { color: var(--stats-muted); }
.stats-board-controls { display: flex; align-items: end; gap: 12px; margin-bottom: 10px; padding: 13px 15px; border: 1px solid var(--stats-line); background: rgba(13,18,15,.9); }
.stats-board-controls label { display: grid; gap: 6px; color: var(--stats-muted); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.stats-board-controls select { min-width: 150px; min-height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--stats-line-strong); border-radius: 2px; background: #101512; color: var(--stats-text); font: 600 10px/1 var(--stats-font, Inter, sans-serif); }
.stats-board-legend { display: flex; flex: 1; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; padding-bottom: 8px; }
.stats-board-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--stats-muted); font-size: 9px; }
.stats-board-legend i { width: 7px; height: 7px; border-radius: 50%; }
.stats-board-map-card { padding-bottom: 18px; }
.stats-board-map { display: block; width: 100%; max-height: 610px; margin-top: 15px; border: 1px solid var(--stats-line); }
.stats-board-map circle { transition: opacity .14s ease, filter .14s ease; }
.stats-board-map circle:hover { opacity: 1; filter: brightness(1.45); }
.stats-board-grid { fill: none; stroke: rgba(255,255,255,.035); stroke-width: 1; stroke-dasharray: 5 8; }
.stats-hot-zones { display: grid; margin-top: 18px; }
.stats-hot-zone { display: grid; grid-template-columns: 25px 1fr; gap: 9px; padding: 14px 0; border-top: 1px solid var(--stats-line); }
.stats-hot-zone > span { color: var(--stats-lime); font: 400 10px/1.4 "Palatino Linotype", serif; }
.stats-hot-zone strong, .stats-hot-zone small { display: block; }
.stats-hot-zone strong { font-size: 11px; }
.stats-hot-zone small { margin-top: 4px; color: var(--stats-muted); font-size: 9px; }
.stats-board-summary { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 12px; margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--stats-line); }
.stats-board-summary span { color: var(--stats-muted); font-size: 9px; }
.stats-board-summary strong { color: var(--stats-lime); font-size: 18px; font-weight: 550; }
.stats-match-hero-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; border: 1px solid var(--stats-line); background: rgba(13,18,15,.88); }
.stats-match-hero-kpis > div { min-width: 0; padding: 17px 19px; border-right: 1px solid var(--stats-line); }
.stats-match-hero-kpis > div:last-child { border-right: 0; }
.stats-match-hero-kpis span, .stats-match-hero-kpis small { display: block; color: var(--stats-muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.stats-match-hero-kpis strong { display: block; margin: 8px 0 5px; overflow: hidden; color: var(--stats-text); font-size: clamp(18px, 1.9vw, 29px); font-weight: 570; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.stats-hero-telemetry-note { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; padding: 11px 14px; border: 1px solid rgba(255,184,77,.25); background: rgba(255,184,77,.055); }
.stats-hero-telemetry-note.is-tracked { border-color: rgba(200,255,77,.25); background: rgba(200,255,77,.05); }
.stats-hero-telemetry-note strong { flex: 0 0 auto; color: var(--stats-gold); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.stats-hero-telemetry-note.is-tracked strong { color: var(--stats-lime); }
.stats-hero-telemetry-note span { color: var(--stats-muted); font: 400 11px/1.45 "Palatino Linotype", serif; }
.stats-match-hero-distribution-card { margin-bottom: 10px; }
.stats-hero-team-explainer { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 12px; margin: 0 0 10px; padding: 11px 14px; border: 1px solid rgba(24,215,194,.3); border-left: 3px solid var(--stats-accent); background: linear-gradient(90deg, rgba(24,215,194,.09), rgba(24,215,194,.015) 55%, transparent); }
.stats-hero-team-explainer strong { color: var(--stats-accent); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.stats-hero-team-explainer span { color: var(--stats-copy); font: 400 11px/1.45 "Palatino Linotype", serif; }
.stats-match-hero-chart-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.stats-match-hero-chart-head .stats-chart-lenses { justify-content: flex-end; }
.stats-hero-chart-panel { position: relative; margin-top: 18px; }
.stats-hero-chart-unavailable { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid rgba(255,184,77,.25); background: rgba(255,184,77,.05); }
.stats-hero-chart-unavailable strong { color: var(--stats-gold); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.stats-hero-chart-unavailable span { color: var(--stats-muted); font-size: 9px; }
.stats-hero-comparison-scroll { overflow-x: auto; overflow-y: hidden; padding: 7px 0 2px; }
.stats-hero-comparison-chart { width: max(100%, var(--chart-min-width)); display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
.stats-hero-comparison-axis { position: relative; height: 170px; border-right: 1px solid rgba(255,255,255,.2); font-variant-numeric: tabular-nums; }
.stats-hero-comparison-axis span { position: absolute; right: 9px; bottom: var(--tick-position); color: #87928c; font-size: 9px; line-height: 1; transform: translateY(50%); }
.stats-hero-comparison-plot { position: relative; min-width: 0; height: 228px; }
.stats-hero-comparison-grid { position: absolute; inset: 0 0 auto; height: 170px; pointer-events: none; }
.stats-hero-comparison-grid i { position: absolute; right: 0; bottom: var(--tick-position); left: 0; height: 1px; background: rgba(255,255,255,.07); }
.stats-hero-comparison-grid i.is-zero { height: 2px; background: rgba(226,238,230,.26); }
.stats-hero-comparison-groups { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--hero-count), minmax(190px, 1fr)); }
.stats-hero-comparison-group { min-width: 0; display: grid; grid-template-rows: 194px 34px; border-left: 1px solid rgba(255,255,255,.1); }
.stats-hero-comparison-group:first-child { border-left: 0; }
.stats-hero-comparison-group.is-team-mode { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--team-color), transparent 12%); }
.stats-hero-comparison-bars { height: 194px; min-width: 0; display: flex; align-items: start; justify-content: center; gap: clamp(9px, 1.2vw, 20px); padding: 0 clamp(10px, 1.5vw, 25px); }
.stats-hero-comparison-empty { align-self: center; color: var(--stats-muted); font-size: 9px; text-transform: uppercase; }
.stats-hero-player-bar { flex: 0 1 72px; min-width: 45px; max-width: 76px; display: grid; grid-template-rows: 170px 24px; }
.stats-hero-player-bar > div { position: relative; height: 170px; }
.stats-hero-player-bar > div > i { position: absolute; right: 7px; bottom: var(--bar-bottom); left: 7px; height: var(--bar-height); min-height: 0; border-top: 2px solid color-mix(in srgb, var(--player-color), white 20%); background: linear-gradient(to top, color-mix(in srgb, var(--player-color), #06100c 28%), var(--player-color)); box-shadow: 0 -5px 14px color-mix(in srgb, var(--player-color), transparent 72%); transform-origin: bottom; animation: stats-hero-player-bar-rise .46s cubic-bezier(.2,.8,.2,1) both; }
.stats-hero-player-bar.is-negative > div > i { border-top: 0; border-bottom: 2px solid color-mix(in srgb, var(--player-color), white 20%); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--player-color), #06100c 32%) 0 5px, var(--player-color) 5px 9px); transform-origin: top; }
.stats-hero-player-bar > div > strong { position: absolute; z-index: 2; bottom: calc(var(--value-position) + 5px); left: 50%; color: var(--stats-text); font-size: 10px; font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); }
.stats-hero-player-bar.is-negative > div > strong { bottom: calc(var(--value-position) - 15px); }
.stats-hero-player-bar > span { overflow: hidden; padding: 6px 2px 0; border-top: 3px solid var(--player-color); color: var(--player-color); font-size: 10px; font-weight: 800; line-height: 1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.stats-hero-player-bar.is-team { flex-basis: 104px; max-width: 112px; }
.stats-hero-player-bar.is-team > div > i { right: 16px; left: 16px; }
.stats-hero-player-bar.is-team > span { border-top-width: 5px; color: var(--stats-text); font-size: 11px; }
@keyframes stats-hero-player-bar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.stats-hero-comparison-footer { min-width: 0; display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 10px 0; border-top: 1px solid color-mix(in srgb, var(--hero-color), transparent 52%); background: linear-gradient(90deg, color-mix(in srgb, var(--hero-color), transparent 92%), transparent 74%); }
.stats-hero-comparison-group.is-team-mode .stats-hero-comparison-footer { border-top-color: color-mix(in srgb, var(--team-color), transparent 45%); background: linear-gradient(90deg, color-mix(in srgb, var(--team-color), transparent 91%), color-mix(in srgb, var(--hero-color), transparent 96%) 70%, transparent); }
.stats-hero-comparison-footer .stats-hero-bar-icon { width: 27px; height: 27px; }
.stats-hero-comparison-footer > div:nth-child(2) { min-width: 0; }
.stats-hero-comparison-footer > div:nth-child(2) strong, .stats-hero-comparison-footer > div:nth-child(2) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-hero-comparison-footer > div:nth-child(2) strong { color: var(--hero-color); font-size: 11px; font-weight: 800; }
.stats-hero-comparison-footer > div:nth-child(2) small { margin-top: 2px; color: var(--stats-muted); font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.stats-hero-comparison-footer .stats-hero-comparison-team { display: flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--team-color), white 22%); }
.stats-hero-comparison-team i { width: 7px; height: 7px; flex: 0 0 auto; border: 1px solid color-mix(in srgb, var(--team-color), white 30%); background: var(--team-color); }
.stats-hero-comparison-total { min-width: 62px; text-align: right; }
.stats-hero-comparison-total span, .stats-hero-comparison-total b { display: block; white-space: nowrap; }
.stats-hero-comparison-total span { color: var(--stats-muted); font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.stats-hero-comparison-total b { margin-top: 2px; color: var(--stats-text); font-size: 11px; font-variant-numeric: tabular-nums; }
.stats-hero-bar-icon { position: relative; width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--hero-color), transparent 42%); border-radius: 50%; background: #111613; }
.stats-hero-bar-icon img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.stats-hero-bar-icon span { font-size: 18px; }
.stats-match-hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.stats-match-hero-card { --card-accent: var(--hero-color); }
.stats-match-hero-card-head { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.stats-match-hero-portrait { position: relative; width: 74px; height: 74px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--hero-color), transparent 55%); border-radius: 4px; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--hero-color), transparent 82%), transparent 64%), #111613; }
.stats-match-hero-portrait img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.stats-match-hero-card-head > div:nth-child(2) { min-width: 0; }
.stats-match-hero-card-head span, .stats-match-hero-card-head small { display: block; color: var(--stats-muted); font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.stats-match-hero-card-head h3 { margin: 5px 0; overflow: hidden; color: var(--hero-color); font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.stats-match-hero-card-head > strong { color: var(--stats-text); font-size: clamp(18px, 1.8vw, 27px); font-weight: 570; letter-spacing: -.04em; }
.stats-match-hero-share { height: 4px; margin: 17px 0; background: rgba(255,255,255,.055); }
.stats-match-hero-share i { display: block; height: 100%; background: var(--hero-color); }
.stats-match-hero-player-results { margin: 0 0 17px; padding: 12px 0 5px; border-top: 1px solid var(--stats-line); border-bottom: 1px solid var(--stats-line); }
.stats-match-hero-player-results-head { display: flex; justify-content: space-between; margin-bottom: 7px; }
.stats-match-hero-player-results-head span, .stats-match-hero-player-results-head small { color: var(--stats-muted); font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.stats-match-hero-team-block { margin-top: 9px; padding: 8px 10px 3px; border: 1px solid color-mix(in srgb, var(--team-color), transparent 68%); border-left: 3px solid var(--team-color); background: color-mix(in srgb, var(--team-color), transparent 96%); }
.stats-match-hero-team-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--team-color), transparent 78%); }
.stats-match-hero-team-head span { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; color: color-mix(in srgb, var(--team-color), white 22%); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.stats-match-hero-team-head span i { width: 8px; height: 8px; flex: 0 0 auto; background: var(--team-color); }
.stats-match-hero-team-head small { color: var(--stats-muted); font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.stats-match-hero-team-head strong { color: var(--stats-text); font-size: 12px; font-variant-numeric: tabular-nums; }
.stats-match-hero-player-row { position: relative; min-width: 0; display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 0 9px; }
.stats-match-hero-player-row > i { width: 5px; height: 27px; background: var(--player-color); box-shadow: 0 0 10px color-mix(in srgb, var(--player-color), transparent 48%); }
.stats-match-hero-player-row > div { min-width: 0; }
.stats-match-hero-player-row span, .stats-match-hero-player-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-match-hero-player-row span { color: var(--player-color); font-size: 11px; font-weight: 750; }
.stats-match-hero-player-row small { margin-top: 3px; color: var(--stats-muted); font-size: 8px; }
.stats-match-hero-player-row strong { color: var(--stats-text); font-size: 13px; font-weight: 720; font-variant-numeric: tabular-nums; }
.stats-match-hero-player-row > em { position: absolute; right: 0; bottom: 3px; left: 14px; width: var(--player-share); height: 2px; background: var(--player-color); opacity: .7; }
.stats-match-hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 11px; }
.stats-match-hero-metrics span, .stats-match-hero-metrics small { display: block; color: var(--stats-muted); font-size: 8px; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; }
.stats-match-hero-metrics strong { display: block; margin-top: 5px; overflow: hidden; color: var(--stats-copy); font-size: 14px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.stats-match-hero-metrics small { margin-top: 4px; font-size: 7px; }
.stats-table-score { color: var(--stats-accent); font-weight: 800; }
.stats-history-date strong { display: block; font: 400 21px/1 "Palatino Linotype", serif; }
.stats-history-date span, .stats-history-label { display: block; margin-top: 6px; color: var(--stats-muted); font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; }
.stats-history-main strong { display: block; overflow: hidden; font-size: 16px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.stats-history-main span { display: block; margin-top: 6px; color: var(--stats-lime); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; }
.stats-history-main .stats-modifier-badges.is-compact { position: static; display: flex; margin: 7px 0 0; }
.stats-history-main .stats-modifier-badge { display: inline-flex; margin: 0; color: var(--stats-gold); }
.stats-history-players { overflow: hidden; color: #c9d0cb; font: 400 13px/1.35 "Palatino Linotype", serif; text-overflow: ellipsis; white-space: nowrap; }
.stats-history-sparkline {
  position: relative;
  min-width: 0;
  height: 46px;
  overflow: hidden;
  border-right: 1px solid rgba(223, 237, 228, .08);
  border-left: 1px solid rgba(223, 237, 228, .08);
  background:
    linear-gradient(180deg, transparent 49%, rgba(223, 237, 228, .055) 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, rgba(223, 237, 228, .035) 50%, transparent 51%);
  pointer-events: none;
}
.stats-history-sparkline > span { position: absolute; top: 2px; left: 7px; z-index: 2; color: #7b877f; font-size: 7px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.stats-history-sparkline svg { position: absolute; inset: 5px 5px 2px; width: calc(100% - 10px); height: calc(100% - 7px); overflow: visible; opacity: .92; }
.stats-history-sparkline.is-unavailable { display: grid; place-items: center; border: 0; border-right: 1px dashed rgba(223, 237, 228, .12); border-left: 1px dashed rgba(223, 237, 228, .12); background: transparent; }
.stats-history-sparkline.is-unavailable > span { position: static; color: #59645d; font-size: 8px; }
.stats-history-scores { min-width: 0; overflow: hidden; }
.stats-history-scores > .stats-history-label { margin: 0 0 3px; font-size: 8px; }
.stats-history-score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.stats-history-score-player { position: relative; min-width: 0; display: grid; grid-template-columns: 5px fit-content(74px) max-content; justify-content: start; align-items: center; gap: 4px; padding-right: 4px; color: var(--player-color, var(--stats-lime)); line-height: 1.05; }
.stats-history-score-player:nth-child(even)::before { content: ""; position: absolute; top: 50%; left: -9px; width: 1px; height: 9px; background: rgba(223, 237, 228, .12); transform: translateY(-50%); }
.stats-history-score-player i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.stats-history-score-player b { overflow: hidden; color: #b9c3bc; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.stats-history-score-player strong { margin-left: 2px; color: currentColor; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-history-team-score-grid { display: grid; grid-template-columns: repeat(var(--team-count), minmax(0, 1fr)); gap: 10px; }
.stats-history-team-score { min-width: 0; padding-left: 7px; border-left: 2px solid var(--team-color); }
.stats-history-team-score > div { min-width: 0; display: flex; align-items: baseline; justify-content: flex-start; gap: 7px; }
.stats-history-team-score > div > b { overflow: hidden; color: var(--team-color); font-size: 9px; font-weight: 750; letter-spacing: .035em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.stats-history-team-score > div > strong { color: var(--team-color); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-history-team-score > small { min-width: 0; display: flex; gap: 7px; margin-top: 3px; overflow: hidden; color: var(--stats-muted); font-size: 8px; font-style: normal; white-space: nowrap; }
.stats-history-team-score > small > span { min-width: 0; display: inline-flex; gap: 3px; overflow: hidden; }
.stats-history-team-score > small b { overflow: hidden; color: #b9c3bc; font-weight: 600; text-overflow: ellipsis; }
.stats-history-team-score > small em { color: var(--team-color); font-style: normal; font-variant-numeric: tabular-nums; }
.stats-history-stat strong { display: block; margin-top: 5px; font-size: 15px; font-weight: 540; }
.stats-history-arrow { color: var(--stats-lime); font-size: 20px; }

.stats-mode-grid, .stats-hero-grid, .stats-rival-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.stats-mode-card { min-height: 235px; }
.stats-mode-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.stats-mode-name { font-size: 22px; letter-spacing: -0.03em; }
.stats-mode-record { margin-top: 6px; color: var(--stats-muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.stats-mini-ring { --value: 0; position: relative; width: 58px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--stats-lime) calc(var(--value) * 1%), #2b322e 0); font-size: 10px; }
.stats-mini-ring::before { content: ""; position: absolute; width: 44px; aspect-ratio: 1; border-radius: 50%; background: var(--stats-panel); }
.stats-mini-ring span { position: relative; z-index: 1; }
.stats-mode-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--stats-line); }
.stats-mode-metrics span { display: block; color: var(--stats-muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.stats-mode-metrics strong { display: block; margin-top: 5px; font-size: 15px; font-weight: 550; }
.stats-mode-metrics .stats-mode-average { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--stats-line); }
.stats-mode-metrics .stats-mode-average > span { display: block; }
.stats-mode-metrics .stats-mode-average strong { margin-top: 0; color: var(--stats-blue); font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.stats-hero-card { min-height: 260px; padding: 0; }
.stats-hero-portrait { position: relative; height: clamp(165px, 14vw, 240px); display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 72%, rgba(200,255,77,.14), transparent 58%), #151b18; }
.stats-hero-portrait::after { display: none; }
.stats-hero-portrait img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; filter: saturate(.9) contrast(1.04); transform: none; }
.stats-hero-fallback { font: 400 68px/1 "Palatino Linotype", serif; color: var(--stats-lime); }
.stats-hero-meta { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 20px; }
.stats-hero-meta strong { display: block; font-size: 17px; font-weight: 560; }
.stats-hero-meta span { display: block; margin-top: 5px; color: var(--stats-muted); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.stats-hero-share { color: var(--stats-lime); font-size: 21px; font-weight: 550; }

.stats-rival-card { min-height: 190px; }
.stats-rival-head { display: flex; align-items: center; gap: 13px; }
.stats-rival-name { font-size: 17px; font-weight: 560; }
.stats-rival-record { margin-top: 4px; color: var(--stats-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.stats-rival-diff { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--stats-line); }
.stats-rival-diff span { color: var(--stats-muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.stats-rival-diff strong { display: block; margin-top: 6px; font-size: 22px; font-weight: 550; }

.stats-footer { display: flex; align-items: center; gap: 10px; min-height: 76px; border-top: 1px solid var(--stats-line); color: #69736c; font-size: 9px; letter-spacing: .08em; }
.stats-footer span { padding: 4px 7px; border: 1px solid rgba(200,255,77,.32); border-radius: 999px; color: var(--stats-lime); font-size: 7px; letter-spacing: .14em; }

/* Dense dashboard composition */
.stats-atmosphere > span { display: none; }
.stats-card { padding: 0 14px; }
.stats-topbar { min-height: 54px; padding: 0 4px; gap: 14px; }
.stats-brand { gap: 8px; }
.stats-brand-mark { width: 30px; height: 30px; padding: 6px; }
.stats-brand strong { font-size: 11px; }
.stats-brand small { margin-top: 1px; font-size: 7px; }
.stats-toolbar-context { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 12px; padding-left: 14px; border-left: 1px solid var(--stats-line); }
.stats-toolbar-context > strong { flex: 0 0 auto; font-size: 13px; font-weight: 600; }
.stats-header { min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 0; color: var(--stats-muted); background: transparent; font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.stats-icon-btn { min-height: 32px; padding: 0 11px; font-size: 9px; }
.stats-icon-btn svg { width: 14px; height: 14px; }
.stats-view-tabs { top: 54px; }
.stats-tab-btn { min-height: 58px; padding: 8px 13px; }
.stats-tab-index { width: 30px; height: 30px; }
.stats-tab-copy { gap: 4px; }
.stats-tab-copy strong { font-size: clamp(15px, 1.25vw, 18px); }
.stats-tab-copy small { font-size: 9px; }
.stats-content { min-height: calc(100vh - 126px); padding: 10px 0 16px; }
.stats-panel { animation-duration: 220ms; }
.stats-profile-identity {
  position: relative;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 10px;
  padding: 10px 14px;
  overflow: visible;
  border: 1px solid var(--stats-line);
  background:
    radial-gradient(circle at 4% 50%, rgba(200, 255, 77, 0.12), transparent 25%),
    linear-gradient(110deg, rgba(23, 30, 25, 0.97), rgba(13, 18, 16, 0.96));
}
.stats-profile-identity:empty { display: none; }
.stats-profile-identity::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--stats-lime); }
.stats-profile-person { min-width: 0; display: flex; align-items: center; gap: 14px; }
.stats-profile-identity-avatar {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(200, 255, 77, 0.72);
  border-radius: 50%;
  color: #11160e;
  background: #e0e8e2;
  box-shadow: 0 0 0 5px rgba(200, 255, 77, 0.07);
  font-size: 18px;
  font-weight: 650;
}
.stats-profile-identity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.stats-profile-identity-copy { min-width: 0; }
.stats-profile-actions { min-width: 0; display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.stats-profile-actions .stats-profile-switcher { width: min(310px, 28vw); }
.stats-profile-eyebrow { margin-bottom: 2px; color: var(--stats-lime); font-size: 7px; letter-spacing: 0.16em; text-transform: uppercase; }
.stats-profile-identity h1 { margin: 0; overflow: hidden; font-size: clamp(23px, 2.3vw, 34px); font-weight: 580; line-height: 1; letter-spacing: -0.035em; text-overflow: ellipsis; white-space: nowrap; }
.stats-profile-meta { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: 6px; color: var(--stats-muted); font-size: 9px; letter-spacing: 0.055em; text-transform: uppercase; }
.stats-profile-meta span { position: relative; }
.stats-profile-meta span + span::before { content: ""; position: absolute; top: 50%; left: -7px; width: 2px; height: 2px; border-radius: 50%; background: var(--stats-lime); transform: translateY(-50%); }
.stats-profile-switcher { min-width: 0; display: grid; gap: 5px; }
.stats-profile-switcher > span { color: var(--stats-muted); font-size: 7px; letter-spacing: 0.13em; text-transform: uppercase; }
.stats-profile-switcher select {
  width: 100%;
  min-height: 38px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--stats-line-strong);
  border-radius: 2px;
  color: var(--stats-text);
  background:
    linear-gradient(45deg, transparent 50%, var(--stats-lime) 50%) calc(100% - 16px) 16px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--stats-lime) 50%, transparent 50%) calc(100% - 11px) 16px / 5px 5px no-repeat,
    rgba(8, 12, 10, 0.84);
  font: 550 11px/1 "Bahnschrift", sans-serif;
  letter-spacing: 0.04em;
  appearance: none;
  cursor: pointer;
}
.stats-profile-switcher select:hover,
.stats-profile-switcher select:focus { border-color: rgba(200, 255, 77, 0.58); outline: 0; }
.stats-profile-tabs { min-height: 38px; align-items: center; margin: 0 0 10px; padding: 3px 6px; border: 1px solid var(--stats-line); background: rgba(17, 22, 20, 0.78); }
.stats-subtab-btn { min-height: 28px; padding: 0 11px; font-size: 10px; }
.stats-summary { margin-bottom: 10px; border: 1px solid var(--stats-line); border-bottom: 0; }
.stats-pill { min-height: 82px; padding: 11px 14px; }
.stats-pill-key { margin-bottom: 6px; font-size: 9px; }
.stats-pill-val { font-size: clamp(19px, 1.7vw, 27px); }
.stats-pill-detail { margin-top: 4px; font-size: 9px; }
.stats-block { margin-bottom: 10px; }
.stats-block-title { margin-bottom: 7px; font-size: 14px; }
.stats-section-head { min-height: 30px; align-items: center; margin-bottom: 8px; }
.stats-section-head > div { display: flex; align-items: baseline; gap: 9px; }
.stats-section-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.stats-section-head p { display: none; }
.stats-section-label { font-size: 8px; }
.stats-dashboard-grid { gap: 10px; margin-bottom: 10px; }
.stats-data-card { padding: 12px 14px; }
.stats-data-card h3 { font-size: 14px; }
.stats-data-card-note { margin-top: 3px; font-size: 9px; }
.stats-donut-layout { min-height: 145px; gap: 24px; }
.stats-donut { width: clamp(100px, 9vw, 128px); }
.stats-donut-value { font-size: clamp(23px, 2.3vw, 32px); }
.stats-legend { gap: 8px; }
.stats-legend-row { font-size: 10px; }
.stats-bars { gap: 8px; margin-top: 12px; }
.stats-bar-row { grid-template-columns: minmax(72px, .42fr) minmax(100px, 1fr) auto; gap: 9px; min-height: 18px; }
.stats-bar-track { height: 6px; }
.stats-bar-label, .stats-bar-value { font-size: 10px; }
.stats-peg-composition { min-height: 145px; padding-top: 10px; }
.stats-peg-pie { width: min(100%, 132px); }
.stats-peg-grid { gap: 8px; }
.stats-peg-item span { font-size: 8px; }
.stats-peg-item strong { margin-top: 1px; font-size: 11px; }
.stats-insight-list { margin-top: 8px; }
.stats-insight { grid-template-columns: 22px 1fr; gap: 8px; padding: 8px 0; }
.stats-insight strong { margin-bottom: 2px; font-size: 11px; }
.stats-insight span { font-size: 10px; }
.stats-archive-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 10px; }
.stats-archive-strip-global { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.stats-archive-strip-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-archive-metric { min-width: 0; padding: 10px 12px; }
.stats-archive-metric span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.stats-archive-metric strong { margin-top: 5px; font-size: clamp(17px, 1.7vw, 24px); }
.stats-global-dashboard > .stats-data-card { min-height: 325px; }
.stats-global-dashboard > .stats-comparison-card { min-height: 176px; }
.stats-landscape-card { display: flex; flex-direction: column; }
.stats-landscape-plot {
  position: relative;
  flex: 1;
  min-height: 246px;
  margin: 14px 13px 18px 25px;
  border-bottom: 1px solid rgba(223, 237, 228, 0.28);
  border-left: 1px solid rgba(223, 237, 228, 0.28);
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent calc(25% - 1px), rgba(223, 237, 228, 0.05) 25%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(223, 237, 228, 0.05) 25%);
}
.stats-landscape-mid { position: absolute; z-index: 1; opacity: 0.65; pointer-events: none; }
.stats-landscape-mid.is-x { top: 0; bottom: 0; border-left: 1px dashed rgba(200, 255, 77, 0.52); }
.stats-landscape-mid.is-y { right: 0; left: 0; border-bottom: 1px dashed rgba(200, 255, 77, 0.52); }
.stats-landscape-quadrant {
  position: absolute;
  z-index: 1;
  max-width: 43%;
  color: rgba(152, 164, 156, 0.52);
  font-size: 8px;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
  pointer-events: none;
}
.stats-landscape-quadrant.is-complete { top: 7px; right: 7px; color: rgba(200, 255, 77, 0.62); text-align: right; }
.stats-landscape-quadrant.is-power { top: 7px; left: 7px; }
.stats-landscape-quadrant.is-precision { right: 7px; bottom: 7px; text-align: right; }
.stats-landscape-axis { position: absolute; color: var(--stats-muted); font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; pointer-events: none; }
.stats-landscape-axis.is-x { right: 0; bottom: -17px; }
.stats-landscape-axis.is-y { top: 0; left: -19px; transform: rotate(-90deg) translateX(-100%); transform-origin: 0 0; }
.stats-landscape-point {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  padding: 0;
  transform: translate(-50%, 50%);
  border: 0;
  color: var(--stats-muted);
  background: transparent;
  cursor: pointer;
}
.stats-landscape-point > span {
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #0c100e;
  border-radius: 50%;
  background: #77827b;
  box-shadow: 0 0 0 1px rgba(223, 237, 228, 0.28);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.stats-landscape-point > em {
  position: absolute;
  top: 14px;
  left: 50%;
  max-width: 72px;
  overflow: hidden;
  transform: translateX(-50%);
  color: #c4ccc7;
  font-size: 9px;
  font-style: normal;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-landscape-point.is-label-above > em { top: auto; bottom: 14px; }
.stats-landscape-point.is-label-left > em { top: 50%; right: 15px; left: auto; transform: translateY(-50%); }
.stats-landscape-point.is-label-right > em { top: 50%; left: 15px; transform: translateY(-50%); }
.stats-landscape-point.is-complete > span { background: var(--stats-lime); box-shadow: 0 0 0 1px rgba(200, 255, 77, 0.5), 0 0 13px rgba(200, 255, 77, 0.22); }
.stats-landscape-point.is-power > span { background: var(--stats-blue); }
.stats-landscape-point.is-precision > span { background: var(--stats-gold); }
.stats-landscape-point:hover > span,
.stats-landscape-point:focus-visible > span { transform: scale(1.45); box-shadow: 0 0 0 2px var(--stats-text), 0 0 18px rgba(200, 255, 77, 0.32); }
.stats-landscape-point:focus-visible { outline: 0; }
.stats-comparison-card .stats-bars { margin-top: 14px; }
.stats-comparison-card .stats-bar-row { min-height: 17px; }
.stats-table-card { display: flex; flex-direction: column; }
.stats-table-card .stats-table-shell { flex: 1; margin-top: 9px; overflow: auto; }
.stats-table th, .stats-table td { padding: 8px 9px; font-size: 12px; }
.stats-table th { font-size: 10px; }
.stats-table-rank { font-size: 15px; }
.stats-table-avatar { width: 27px; height: 27px; }
.stats-history-list { gap: 6px; }
.stats-history-card { min-height: 66px; padding: 9px 13px; }
.stats-history-date strong { font-size: 19px; }
.stats-history-main strong { font-size: 15px; }
.stats-history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid var(--stats-line);
  background: rgba(10, 15, 12, 0.72);
  color: var(--stats-muted);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.stats-history-load-more {
  min-height: 30px;
  padding: 0 15px;
  border: 1px solid rgba(200, 255, 77, 0.48);
  border-radius: 2px;
  color: var(--stats-lime);
  background: rgba(200, 255, 77, 0.06);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.stats-history-load-more:hover,
.stats-history-load-more:focus-visible { border-color: var(--stats-lime); background: rgba(200, 255, 77, 0.13); outline: 0; }
.stats-history-load-more:disabled { opacity: 0.55; cursor: wait; }
.stats-mode-grid, .stats-rival-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.stats-mode-card { min-height: 170px; }
.stats-mode-name { font-size: 17px; }
.stats-mode-metrics { gap: 10px; margin-top: 16px; padding-top: 12px; }
.stats-hero-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.stats-hero-card { min-height: 190px; }
.stats-hero-portrait { height: clamp(165px, 14vw, 240px); }
.stats-hero-meta { padding: 12px; }
.stats-hero-meta strong { font-size: 13px; }
.stats-hero-share { font-size: 16px; }
.stats-rival-card { min-height: 140px; }
.stats-rival-diff { margin-top: 14px; padding-top: 10px; }
.stats-footer { min-height: 34px; }

@media (max-width: 1050px) {
  .stats-summary { grid-template-columns: repeat(3, 1fr); }
  .stats-pill:nth-child(6n) { border-right: 1px solid var(--stats-line); }
  .stats-pill:nth-child(3n) { border-right: 0; }
  .stats-pill:nth-child(n+4) { border-top: 1px solid var(--stats-line); }
  .stats-card-span-3, .stats-card-span-4, .stats-card-span-5, .stats-card-span-7, .stats-card-span-8, .stats-card-span-9 { grid-column: span 6; }
  .stats-archive-strip { grid-template-columns: repeat(4, 1fr); }
  .stats-archive-strip-global { grid-template-columns: repeat(5, 1fr); }
  .stats-archive-metric:nth-child(4n) { border-right: 0; }
  .stats-archive-strip-global .stats-archive-metric:nth-child(4n) { border-right: 1px solid var(--stats-line); }
  .stats-archive-strip-global .stats-archive-metric:nth-child(5n) { border-right: 0; }
  .stats-archive-strip-global .stats-archive-metric:nth-child(n+5) { border-top: 0; }
  .stats-archive-strip-global .stats-archive-metric:nth-child(n+6) { border-top: 1px solid var(--stats-line); }
  .stats-archive-metric:nth-child(n+5) { border-top: 1px solid var(--stats-line); }
  .stats-mode-grid, .stats-rival-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-hero-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-history-card { grid-template-columns: 64px minmax(120px, .62fr) minmax(125px, .65fr) minmax(145px, 1fr) minmax(180px, .9fr) minmax(76px, .4fr) 22px; }
  .stats-history-levels { display: none; }
  .stats-progression-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-progression-kpis .stats-archive-metric:nth-child(4n) { border-right: 0; }
  .stats-progression-kpis .stats-archive-metric:nth-child(n+5) { border-top: 1px solid var(--stats-line); }
  .stats-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-story-note:nth-child(2) { border-right: 0; }
  .stats-story-note:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
  .stats-match-hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-match-hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-match-hero-kpis > div:nth-child(2) { border-right: 0; }
  .stats-match-hero-kpis > div:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
}

@media (max-width: 760px) {
  .stats-card { padding: 0 10px; }
  .stats-topbar { min-height: 54px; }
  .stats-brand small, .stats-icon-btn span { display: none; }
  .stats-toolbar-context { gap: 0; padding-left: 9px; }
  .stats-toolbar-context > strong { font-size: 11px; }
  .stats-header { display: none; }
  .stats-icon-btn { width: 38px; padding: 0; justify-content: center; }
  .stats-view-tabs { top: 54px; gap: 4px; padding: 4px; }
  .stats-tab-btn { min-height: 48px; display: grid; grid-template-columns: 1fr; gap: 0; padding: 6px 3px; text-align: center; }
  .stats-tab-index, .stats-tab-marker, .stats-tab-copy small { display: none; }
  .stats-tab-copy { display: block; }
  .stats-tab-copy strong { display: block; font-size: 10px; letter-spacing: 0.035em; white-space: normal; }
  .stats-content { padding-top: 8px; }
  .stats-leaderboard-heading { align-items: center; }
  .stats-modifier-menu-toggle { width: 34px; padding: 0; justify-content: center; }
  .stats-modifier-menu-toggle em { display: none; }
  .stats-modifier-menu-toggle b { position: absolute; top: -5px; right: -5px; }
  .stats-modifier-flyout { position: fixed; top: 112px; right: 10px; width: min(342px, calc(100vw - 20px)); max-height: calc(100vh - 126px); overflow-y: auto; }
  .stats-profile-identity { grid-template-columns: 1fr; gap: 10px; min-height: 0; padding: 11px 12px; }
  .stats-profile-identity-avatar { width: 50px; height: 50px; font-size: 15px; }
  .stats-profile-identity h1 { font-size: 24px; }
  .stats-profile-switcher { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
  .stats-profile-switcher select { min-height: 34px; }
  .stats-summary { grid-template-columns: repeat(2, 1fr); }
  .stats-pill, .stats-pill:nth-child(3n), .stats-pill:nth-child(6n) { min-height: 78px; padding: 10px; border-right: 1px solid var(--stats-line); }
  .stats-pill:nth-child(2n) { border-right: 0; }
  .stats-pill:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
  .stats-pill-val { font-size: 23px; }
  .stats-section-head { align-items: center; flex-direction: row; }
  .stats-dashboard-grid { grid-template-columns: 1fr; }
  .stats-card-span-3, .stats-card-span-4, .stats-card-span-5, .stats-card-span-6, .stats-card-span-7, .stats-card-span-8, .stats-card-span-9, .stats-card-span-12 { grid-column: 1; }
  .stats-podium { grid-template-columns: 1fr; align-items: stretch; }
  .stats-podium-card, .stats-podium-card.is-first { min-height: 210px; }
  .stats-podium-card.is-first { order: -1; }
  .stats-archive-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-archive-strip-global { grid-template-columns: repeat(2, 1fr); }
  .stats-archive-metric:nth-child(2) { border-right: 0; }
  .stats-archive-strip-global .stats-archive-metric:nth-child(5n) { border-right: 1px solid var(--stats-line); }
  .stats-archive-strip-global .stats-archive-metric:nth-child(2n) { border-right: 0; }
  .stats-archive-strip-global .stats-archive-metric:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
  .stats-archive-metric:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
  .stats-global-dashboard > .stats-comparison-card { min-height: 166px; }
  .stats-recent-head { min-height: 46px; padding: 8px 10px; }
  .stats-recent-head > div > span { display: none; }
  .stats-recent-head > button { padding: 0 8px; font-size: 7px; }
  .stats-recent-grid { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-color: rgba(200, 255, 77, 0.3) transparent; }
  .stats-recent-match { flex: 0 0 min(74vw, 220px); min-height: 178px; scroll-snap-align: start; }
  .stats-landscape-plot { min-height: 260px; margin-right: 18px; }
  .stats-history-card { grid-template-columns: 60px minmax(0, 1fr) 20px; gap: 13px; padding: 16px; }
  .stats-history-pagination { align-items: stretch; flex-direction: column; }
  .stats-history-load-more { width: 100%; }
  .stats-progression-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-progression-kpis .stats-archive-metric:nth-child(2n) { border-right: 0; }
  .stats-progression-kpis .stats-archive-metric:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
  .stats-progression-card svg { height: 220px; }
  .stats-chart-visual { grid-template-columns: 1fr; gap: 8px; }
  .stats-chart-player-key, .stats-chart-visual-scatter .stats-chart-player-key { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 8px 18px; padding: 10px 0 11px; border-right: 0; border-bottom: 1px solid var(--stats-line); }
  .stats-chart-player-key > div { grid-template-columns: 18px auto; }
  .stats-chart-player-key i { width: 18px; height: 4px; }
  .stats-chart-player-key strong { font-size: 12px; }
  .stats-chart-player-key.has-teams > .is-team { margin-top: 0; }
  .stats-chart-player-key.has-teams > .is-contribution { padding-left: 0; }
  .stats-match-subtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-match-titlebar { gap: 16px; overflow-x: auto; }
  .stats-match-scoreboard { position: static; justify-content: flex-start; transform: none; }
  .stats-match-scoreboard-side { width: 140px; min-width: 140px; }
  .stats-match-subtabs button:nth-child(2) { border-right: 0; }
  .stats-match-subtabs button:nth-child(4) { border-right: 0; }
  .stats-match-subtabs button:nth-child(n+3) { border-top: 1px solid var(--stats-line); }
  .stats-match-subtabs span { display: none; }
  .stats-story-grid { grid-template-columns: 1fr; }
  .stats-story-note, .stats-story-note:nth-child(2) { border-right: 0; }
  .stats-story-note:nth-child(n+2) { border-top: 1px solid var(--stats-line); }
  .stats-shot-scatter { height: 250px; }
  .stats-range-row { grid-template-columns: 72px minmax(100px, 1fr); }
  .stats-range-row > span { display: none; }
  .stats-board-controls { align-items: stretch; flex-direction: column; }
  .stats-board-controls select { width: 100%; }
  .stats-board-legend { justify-content: flex-start; }
  .stats-match-hero-grid { grid-template-columns: 1fr; }
  .stats-match-hero-card-head { grid-template-columns: 62px minmax(0, 1fr) auto; }
  .stats-match-hero-portrait { width: 62px; height: 62px; }
  .stats-match-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-hero-telemetry-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .stats-match-hero-chart-head { flex-direction: column; }
  .stats-match-hero-chart-head .stats-chart-lenses { justify-content: flex-start; }
  .stats-hero-team-explainer { grid-template-columns: 1fr; gap: 5px; }
  .stats-shot-bars { gap: 1px; }
  .stats-history-players, .stats-history-sparkline, .stats-history-scores, .stats-history-stat { display: none !important; }
  .stats-mode-grid, .stats-hero-grid, .stats-rival-grid { grid-template-columns: 1fr; }
  .stats-peg-composition { grid-template-columns: 1fr; gap: 18px; padding-inline: 0; }
  .stats-peg-pie { width: 148px; }
  .stats-peg-grid { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .stats-donut-layout { flex-direction: column; }
  .stats-legend { width: 100%; }
  .stats-bar-row { grid-template-columns: 80px minmax(90px, 1fr) auto; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .stats-atmosphere > span, .stats-panel, .stats-bar-fill { animation: none; }
  .stats-icon-btn, .stats-podium-card, .stats-history-card, .stats-tab-btn, .stats-recent-match { transition: none; }
}

/* Preserve the compact pre-overhaul Stats presentation inside an active match. */
#statsScreen.stats-screen-legacy {
  display: grid;
  place-items: center;
  padding: 4vh 2vw;
  overflow: auto;
  color: var(--text);
  background: rgba(2, 6, 18, .86);
  font-family: inherit;
}
#statsScreen.stats-screen-legacy.hidden { display: none; }
.stats-screen-legacy .stats-atmosphere { display: none; }
.stats-screen-legacy .stats-card {
  width: min(1080px, 96vw);
  height: auto;
  max-height: 92vh;
  margin: auto;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--menu-card-border);
  border-radius: 18px;
  background: linear-gradient(160deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  box-shadow: 0 18px 70px rgba(0, 0, 0, .45);
  scrollbar-color: auto;
}
.stats-screen-legacy .stats-topbar {
  position: static;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.stats-screen-legacy .stats-brand { display: none; }
.stats-screen-legacy .stats-toolbar-context {
  display: block;
  padding: 0;
  border: 0;
}
.stats-screen-legacy .stats-toolbar-context::before {
  content: "Stats";
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.stats-screen-legacy .stats-toolbar-context > strong { display: none; }
.stats-screen-legacy .stats-header {
  display: block;
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
}
.stats-screen-legacy .stats-top-actions { align-self: start; }
.stats-screen-legacy .stats-icon-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--menu-button-border);
  border-radius: 9px;
  color: var(--text);
  background: linear-gradient(160deg, var(--menu-button-grad-1), var(--menu-button-grad-2));
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: none;
}
.stats-screen-legacy .stats-icon-btn-primary { color: var(--text); border-color: var(--menu-button-border); background: linear-gradient(160deg, var(--menu-button-grad-1), var(--menu-button-grad-2)); }
.stats-screen-legacy .stats-icon-btn:hover { transform: none; border-color: rgba(195, 223, 255, .78); }
.stats-screen-legacy .stats-view-tabs {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}
.stats-screen-legacy .stats-tab-btn {
  min-height: 0;
  display: block;
  width: auto;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--menu-button-border);
  border-radius: 9px;
  color: var(--text);
  background: linear-gradient(160deg, var(--menu-button-grad-1), var(--menu-button-grad-2));
  text-align: center;
}
.stats-screen-legacy .stats-tab-btn::after,
.stats-screen-legacy .stats-tab-index,
.stats-screen-legacy .stats-tab-marker,
.stats-screen-legacy .stats-tab-copy small { display: none; }
.stats-screen-legacy .stats-tab-copy { display: block; }
.stats-screen-legacy .stats-tab-copy strong { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; white-space: normal; }
.stats-screen-legacy .stats-tab-btn.active { color: var(--text); border-color: rgba(195, 223, 255, .78); background: linear-gradient(160deg, var(--menu-button-grad-1), var(--menu-button-grad-2)); box-shadow: 0 0 0 1px rgba(146, 198, 255, .42), 0 0 16px rgba(92, 168, 255, .35); }
.stats-screen-legacy .stats-content { min-height: 0; padding: 0; }
.stats-screen-legacy .stats-panel { margin-bottom: 10px; animation: none; }
.stats-screen-legacy .stats-profile-identity { display: none; }
.stats-screen-legacy .stats-profile-tabs {
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}
.stats-screen-legacy .stats-subtab-btn {
  min-height: 0;
  padding: 6px 10px;
  border: 1px solid var(--menu-button-border);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(160deg, var(--menu-button-grad-1), var(--menu-button-grad-2));
  font-size: 12px;
}
.stats-screen-legacy .stats-subtab-btn.active { color: var(--text); border-color: rgba(191, 221, 255, .72); background: linear-gradient(160deg, var(--menu-button-grad-1), var(--menu-button-grad-2)); box-shadow: 0 0 0 1px rgba(133, 192, 255, .36), 0 0 14px rgba(74, 162, 255, .28); }
.stats-screen-legacy .stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  border: 0;
}
.stats-screen-legacy .stats-pill,
.stats-screen-legacy .stats-pill:nth-child(n) {
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid rgba(171, 196, 245, .25);
  border-radius: 10px;
  background: rgba(5, 11, 31, .58);
}
.stats-screen-legacy .stats-pill-key { margin: 0; color: #aebde7; font-size: 11px; letter-spacing: 0; text-transform: none; }
.stats-screen-legacy .stats-pill-val { margin-top: 2px; color: var(--text); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.stats-screen-legacy .stats-block { margin-bottom: 12px; }
.stats-screen-legacy .stats-block-title { margin-bottom: 6px; color: var(--text); font-size: 15px; font-weight: 700; }
.stats-screen-legacy .stats-table-shell { margin-top: 0; overflow: auto; border: 0; background: transparent; }
.stats-screen-legacy .stats-table { font-size: 12px; }
.stats-screen-legacy .stats-table th,
.stats-screen-legacy .stats-table td { padding: 6px 7px; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 12px; }
.stats-screen-legacy .stats-table th { color: #c3d2fb; background: transparent; font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.stats-screen-legacy .stats-table-sortable th[data-stats-sort-column] { padding-right: 25px; }
.stats-screen-legacy .stats-table-sortable th[data-stats-sort-column]::after { right: 7px; }
.stats-screen-legacy .stats-table-clickable tbody tr:hover { background: rgba(78, 129, 207, .18); }
.stats-screen-legacy .stats-table-clickable tbody tr.is-selected { background: rgba(92, 160, 255, .25); box-shadow: none; }
.stats-screen-legacy .stats-empty { min-height: 0; padding: 10px 0; border: 0; color: #abb8dd; background: transparent; font: 400 13px/1.4 inherit; text-align: left; }
.stats-screen-legacy .stats-legacy-note { margin-top: 6px; }
.stats-screen-legacy .stats-footer { display: none; }

.match-summary-stats-btn { border-color: rgba(116, 184, 255, .72); box-shadow: 0 0 14px rgba(74, 162, 255, .2); }

.options-card {
  width: min(980px, 94vw);
  max-height: 92vh;
  overflow: auto;
}

.options-build-info {
  margin-right: auto;
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.45px;
  font-variant-numeric: tabular-nums;
  opacity: 0.62;
  white-space: nowrap;
}

.options-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.options-tab-btn {
  min-width: 110px;
}

.options-tab-btn.active {
  border-color: rgba(191, 221, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(133, 192, 255, 0.36), 0 0 14px rgba(74, 162, 255, 0.28);
}

.options-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.options-section {
  border: 1px solid var(--menu-subpanel-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--menu-subpanel-bg);
  display: grid;
  gap: 10px;
}

.options-section-title {
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.options-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.options-choice-grid-circle {
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 8px;
}

.options-ui-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.options-ui-style-btn {
  min-height: 96px;
  grid-template-columns: minmax(118px, 0.8fr) minmax(120px, 1fr);
  place-items: center stretch;
  gap: 14px;
  padding: 10px 14px;
  text-align: left;
}

.options-ui-style-copy {
  display: grid;
  gap: 6px;
}

.options-ui-style-btn .options-style-name {
  color: #f6f2ff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.options-ui-style-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.options-ui-preview {
  position: relative;
  width: 100%;
  min-width: 116px;
  height: 66px;
  overflow: hidden;
  border: 1px solid rgba(178, 205, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 30%, rgba(55, 113, 190, 0.25), transparent 50%),
    #080d20;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.options-ui-preview-card {
  position: absolute;
  left: 7px;
  width: 42px;
  height: 24px;
  padding: 5px 6px;
  border: 1px solid rgba(151, 183, 240, 0.2);
  background: #10172d;
}

.options-ui-preview-card:first-child { top: 7px; }
.options-ui-preview-card:last-child { bottom: 7px; }

.options-ui-preview-card i {
  display: block;
  height: 2px;
  margin-bottom: 3px;
  border-radius: 99px;
  background: rgba(212, 226, 255, 0.5);
}

.options-ui-preview-card i:nth-of-type(2) { width: 65%; }
.options-ui-preview-card i:nth-of-type(3) { width: 82%; }

.options-ui-preview::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: 8px;
  left: 56px;
  border: 1px solid rgba(109, 143, 202, 0.18);
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.07) 49% 51%, transparent 52%),
    linear-gradient(0deg, rgba(75, 124, 196, 0.12), transparent 65%);
}

.options-ui-preview-modern .options-ui-preview-card {
  left: 6px;
  width: 47px;
  padding-left: 16px;
  border-color: rgba(95, 217, 255, 0.34);
  border-radius: 2px 8px 2px 8px;
  background: linear-gradient(135deg, #132843, #0a1225);
  box-shadow: inset 2px 0 #47d8ff, 0 0 9px rgba(48, 194, 255, 0.14);
}

.options-ui-preview-modern .options-ui-preview-card:last-child {
  border-color: rgba(255, 116, 105, 0.32);
  box-shadow: inset 2px 0 #ff776d, 0 0 9px rgba(255, 104, 91, 0.12);
}

.options-ui-preview-card b {
  position: absolute;
  top: 6px;
  left: 5px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: #f6c85c;
}

.options-ui-preview-modern::after {
  border-color: rgba(83, 206, 255, 0.26);
  border-radius: 2px 9px 2px 9px;
  background:
    linear-gradient(135deg, rgba(56, 191, 255, 0.16), transparent 46%),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(255, 255, 255, 0.035) 8px 9px);
}

.options-frame-preview {
  position: relative;
  width: 100%;
  min-width: 116px;
  height: 66px;
  overflow: hidden;
  border: 1px solid rgba(178, 205, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 54% 44%, rgba(72, 116, 181, 0.22), transparent 52%),
    #060b18;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.65);
}

.options-frame-preview-board {
  position: absolute;
  inset: 8px 27px 8px 8px;
  border: 4px solid #385a70;
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(30, 59, 91, 0.5), rgba(5, 11, 25, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(99, 222, 249, 0.78),
    0 0 8px rgba(57, 203, 237, 0.24);
}

.options-frame-preview-tower {
  position: absolute;
  top: 7px;
  right: 7px;
  bottom: 7px;
  width: 17px;
  border: 2px solid #3c6177;
  border-radius: 5px;
  background:
    repeating-linear-gradient(to top, #b2602f 0 4px, #111b28 4px 7px),
    #08111d;
  box-shadow: inset 0 0 0 1px rgba(91, 211, 239, 0.42);
}

.options-frame-preview-modern::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fe9ff;
  box-shadow: 0 0 7px #40cdeb;
}

.options-frame-preview-classic .options-frame-preview-board {
  border-color: #a9bdc8;
  border-width: 5px;
  border-radius: 2px;
  background: linear-gradient(145deg, rgba(37, 58, 89, 0.56), rgba(4, 9, 20, 0.94));
  box-shadow:
    inset 0 0 0 1px #eef8fb,
    inset 0 0 0 3px #273b4a,
    0 0 7px rgba(207, 235, 244, 0.2);
}

.options-frame-preview-classic .options-frame-preview-tower {
  border-color: #a9bdc8;
  border-radius: 2px;
  background:
    repeating-linear-gradient(to top, #a66e39 0 4px, #172333 4px 7px),
    #0b1420;
  box-shadow: inset 0 0 0 2px #2b4354;
}

.options-theme-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(56px, 1fr));
  gap: 8px;
}

.options-choice-btn {
  min-height: 82px;
  padding: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  border-color: var(--menu-item-border);
}

.options-style-btn {
  background: transparent;
  align-content: center;
  gap: 4px;
}

.options-style-btn-circle {
  min-height: 68px;
  padding: 6px 8px;
  align-content: center;
  gap: 4px;
}

.options-style-name {
  font-size: 10px;
  letter-spacing: 0.2px;
  color: #d7e4ff;
  line-height: 1;
  white-space: nowrap;
}

.options-style-btn-circle.active .options-style-name {
  color: #f6fbff;
}

.options-style-btn.active .options-style-name {
  color: #f6fbff;
}

.options-choice-btn.active {
  border-color: rgba(191, 221, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(133, 192, 255, 0.36), 0 0 14px rgba(74, 162, 255, 0.28);
}

.options-theme-btn {
  min-height: 56px;
}

.options-theme-swatch {
  width: 42px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.35);
}

.options-theme-swatch.theme-purple {
  background: linear-gradient(135deg, #592986, #2a234f);
}

.options-theme-swatch.theme-ocean {
  background: linear-gradient(135deg, #0c8bcf, #0e2a66);
}

.options-theme-swatch.theme-ember {
  background: linear-gradient(135deg, #ad3b2d, #532019);
}

.options-theme-swatch.theme-forest {
  background: linear-gradient(135deg, #2d7b56, #1f3d31);
}

.options-theme-swatch.theme-steel {
  background: linear-gradient(135deg, #4f6d86, #2b3348);
}

.options-theme-swatch.theme-sunset {
  background: linear-gradient(135deg, #b85c3c, #55326d);
}

.options-style-preview {
  display: block;
  pointer-events: none;
  image-rendering: auto;
  margin: 0 auto;
}

.options-style-preview-circle {
  width: 48px;
  height: 48px;
}

.options-style-btn-circle .options-style-preview-circle {
  width: 36px;
  height: 36px;
}

.options-style-preview-rail {
  width: 62px;
  height: 36px;
}

.options-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.options-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #dce8ff;
}

.options-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #6fe4ff;
}

.options-note {
  margin-top: 8px;
  color: #b9c7ea;
  font-size: 12px;
  line-height: 1.4;
}

.options-audio-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.options-admin-note {
  color: #b9c7ea;
  font-size: 12px;
}

.options-admin-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.options-admin-subtab-btn {
  min-height: 34px;
}

.options-admin-subtab-btn.active {
  border-color: rgba(191, 221, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(133, 192, 255, 0.36), 0 0 14px rgba(74, 162, 255, 0.28);
}

.options-admin-subpanel {
  border: 1px solid var(--menu-subpanel-border);
  border-radius: 12px;
  background: var(--menu-subpanel-bg);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.options-admin-unlock-row {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  gap: 8px;
  align-items: center;
}

.options-admin-unlock-row .duel-input {
  margin: 0;
}

.options-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.options-admin-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.options-admin-entry {
  border: 1px solid var(--menu-item-border);
  border-radius: 10px;
  background: var(--menu-item-bg);
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.options-admin-name {
  font-size: 13px;
  font-weight: 700;
  color: #dce8ff;
}

.options-admin-sub {
  font-size: 11px;
  color: #a9bbdf;
}

.options-admin-debug-list {
  display: grid;
  gap: 8px;
}

.options-admin-heroes-list {
  display: grid;
  gap: 8px;
}

.options-admin-hero-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--menu-item-border);
  border-radius: 10px;
  background: var(--menu-item-bg);
  padding: 8px;
}

.options-admin-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.options-admin-hero-gear {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  font-size: 14px;
}

.options-admin-hero-portrait {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  font-size: 12px;
}

.options-admin-hero-label {
  display: grid;
  gap: 2px;
  color: #dce8ff;
  font-size: 12px;
}

.options-admin-hero-label .options-admin-debug-default {
  color: #94a8d5;
}

.options-admin-hero-options-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 24, 0.72);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 16px;
}

.options-admin-hero-options-window {
  width: min(540px, 92vw);
  max-height: min(76vh, 620px);
  overflow: auto;
  border: 1px solid var(--menu-subpanel-border);
  border-radius: 12px;
  background: var(--menu-subpanel-bg);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.options-admin-hero-portrait-window {
  width: min(660px, 94vw);
}

.options-admin-hero-portrait-canvas {
  width: 100%;
  max-width: 420px;
  height: auto;
  border: 1px solid rgba(150, 184, 255, 0.34);
  border-radius: 12px;
  background: #0b1125;
  justify-self: center;
  cursor: grab;
  touch-action: none;
}

.options-admin-hero-portrait-canvas:active {
  cursor: grabbing;
}

.options-admin-debug-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.options-admin-debug-label {
  display: grid;
  gap: 2px;
  color: #dce8ff;
  font-size: 12px;
}

.options-admin-debug-default {
  color: #94a8d5;
  font-size: 10px;
}

.options-admin-debug-value {
  color: #b9c7ea;
  font-size: 11px;
  min-width: 54px;
  text-align: right;
}

.replay-browser-card {
  width: min(760px, 94vw);
}

.replay-browser-controls {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.replay-browser-controls label {
  color: #dce8ff;
  font-size: 12px;
}

.replay-browser-controls .duel-input {
  margin: 0;
}

.replay-browser-list {
  margin-top: 8px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}

.replay-score {
  font-size: 10px;
  color: #ffd37a;
}

.replay-profile {
  font-size: 10px;
  color: #b8d1ff;
}

.mode-card {
  width: min(560px, 92vw);
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.mode-btn {
  min-height: 48px;
  font-size: 16px;
}

.mode-btn strong {
  font: inherit;
}

.menu-modern-kicker,
.menu-modern-status,
.mode-modern-subtitle,
.options-modern-subtitle,
.replay-modern-subtitle,
.mode-modern-index,
.replay-modern-index,
.mode-modern-arrow,
.mode-modern-copy small {
  display: none;
}

.mode-modern-header,
.options-modern-header,
.replay-modern-header,
.mode-modern-copy {
  display: contents;
}

.placeholder-card {
  width: min(560px, 92vw);
}

.import-card {
  width: 98vw;
  max-width: 2400px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(860px, 52%) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  flex: 1;
}

.import-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 10px;
  align-content: start;
  overflow: auto;
  min-height: 0;
  padding-right: 4px;
}

.import-panel {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--menu-item-border);
  border-radius: 10px;
  background: var(--menu-item-bg);
  padding: 8px;
}

.import-panel-title {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.import-panel-span2 {
  grid-column: 1 / -1;
}

.import-row {
  display: grid;
  grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.import-row .duel-input {
  width: 100%;
  min-height: 30px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.import-help {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.import-modifiers {
  display: grid;
  gap: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: #aebfe6;
  opacity: 1;
}

.import-modifier-line {
  display: block;
}

.import-modifiers:empty {
  display: none;
}

.import-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}

.import-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #6fe4ff;
}

.import-toggle-help {
  font-size: 11px;
  color: var(--muted);
}

.import-edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.import-edit-actions-tight {
  grid-template-columns: 1fr;
}

.import-edit-actions-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.import-edit-actions-super {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 2100px) {
  .import-controls {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
}

.import-preview-wrap {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--menu-item-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--menu-item-bg);
}

#importPreview {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(84vh, 860px);
  background: #050912;
}

.lobby-card {
  width: min(1080px, 96vw);
}

.lobby-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

.lobby-create-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.lobby-meta {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.lobby-team-picker {
  margin-bottom: 10px;
}

.lobby-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lobby-icon-btn {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.lobby-team-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
}

.lobby-team-name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.lobby-team-name-grid .duel-input {
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 12px;
}

.lobby-roster {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.lobby-roster-team {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(0,0,0,0.24);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.lobby-roster-title {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.lobby-roster-player {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.lobby-player-ident {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lobby-player-avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(188, 214, 255, 0.55);
  background: #1d2442;
}

.lobby-ready-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.lobby-ready-pill.ready {
  color: #9df7bf;
  border-color: rgba(157, 247, 191, 0.4);
  background: rgba(40, 120, 65, 0.25);
}

.lobby-ready-pill.waiting {
  color: #ffd37a;
  border-color: rgba(255, 211, 122, 0.45);
  background: rgba(145, 90, 20, 0.28);
}

.lobby-list-wrap {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.lobby-settings-gear {
  min-width: 40px;
  min-height: 38px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
}

.lobby-settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.66);
  backdrop-filter: blur(2px);
  z-index: 54;
}

.lobby-settings-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92vw);
  border: 1px solid var(--menu-subpanel-border);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(170deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
  z-index: 55;
}

.lobby-settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.lobby-settings-check input {
  width: 16px;
  height: 16px;
}

.lobby-settings-inline {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 170px);
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.lobby-settings-inline .duel-input {
  width: 100%;
}

.mine-placement-countdown {
  position: absolute;
  z-index: 24;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 300px;
  padding: 10px 18px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(8, 13, 28, 0.9);
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 5px #000;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.52);
  pointer-events: none;
}

.lobby-settings-help {
  color: #b9c7ea;
  font-size: 12px;
}

.lobby-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lobby-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.lobby-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--menu-item-border);
  background: var(--menu-item-bg);
}

.lobby-item-meta {
  display: grid;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.lobby-phase {
  justify-self: start;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.lobby-phase.open {
  color: #9df7bf;
  border-color: rgba(157, 247, 191, 0.4);
  background: rgba(40, 120, 65, 0.25);
}

.lobby-phase.full {
  color: #ffd37a;
  border-color: rgba(255, 211, 122, 0.45);
  background: rgba(145, 90, 20, 0.28);
}

.lobby-item-name {
  color: var(--text);
  font-weight: 700;
}

.lobby-modern-subtitle,
.lobby-modern-kicker,
.lobby-modern-network,
.lobby-modern-section-head,
.lobby-modern-list-subtitle,
.lobby-settings-subtitle,
.lobby-settings-code,
.lobby-settings-group-title {
  display: none;
}

.lobby-modern-header,
.lobby-settings-header,
.lobby-settings-group {
  display: contents;
}

.level-select-actions {
  padding: 0 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.leaderboard-rush-card {
  width: min(900px, 94vw);
}

.leaderboard-rush-controls {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 10px 16px;
  align-items: center;
  border-bottom: 1px solid var(--menu-item-border);
}

.leaderboard-rush-controls .duel-label {
  margin: 0;
}

.leaderboard-rush-table-wrap {
  padding: 12px 16px 16px;
  overflow: auto;
}

.hero-select-card {
  width: min(920px, 94vw);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 14px;
  overflow: auto;
}

.hero-tile {
  background: var(--menu-item-bg);
  border: 1px solid var(--menu-item-border);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
  justify-items: stretch;
  align-content: start;
  cursor: pointer;
}

.hero-tile.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(255, 209, 90, 0.35);
}

.hero-tile.disabled {
  opacity: 0.42;
  filter: grayscale(0.45);
  cursor: not-allowed;
}

.hero-tile.unavailable-other {
  border-style: dashed;
  border-color: rgba(255, 186, 92, 0.75);
}

.hero-tile .icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  border: 1px solid var(--menu-item-border);
}

.hero-avatar-icon {
  position: relative;
  overflow: hidden;
}

.hero-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hero-avatar-icon.has-image .hero-avatar-image {
  display: block;
}

.hero-avatar-icon.eliminated-self .hero-avatar-image {
  filter: grayscale(1) saturate(0.1) brightness(0.92);
}

.hero-avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 800;
}

.hero-avatar-icon.eliminated-self .hero-avatar-fallback {
  filter: grayscale(1) saturate(0.1) brightness(0.92);
}

.hero-avatar-icon.has-image .hero-avatar-fallback {
  display: none;
}

.hero-name {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.hero-pickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.hero-picker-tag {
  font-size: 10px;
  font-weight: 700;
  color: #c9d8ff;
  background: rgba(20, 33, 78, 0.8);
  border: 1px solid rgba(100, 140, 255, 0.35);
  border-radius: 999px;
  padding: 2px 6px;
}

.hero-unavailable-note {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: #ffd99f;
}

.app-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-frame.app-frame-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.app {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 880px;
  padding: 20px;
  transform: translate(-50%, -50%) scale(var(--app-scale, 1));
  transform-origin: center;
  display: flex;
  flex-direction: column;
}

.fullscreen-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  z-index: 5;
}

.fullscreen-toggle:hover {
  box-shadow: 0 0 10px rgba(255,255,255,0.15);
}

.top {
  display: none;
}

.brand .logo {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
  text-shadow: 0 0 18px var(--glow), 0 0 40px rgba(255, 209, 90, 0.2);
}

.brand .sub { color: var(--muted); font-size: 13px; }

.scoreboard {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 18px;
  background: rgba(0,0,0,0.35);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
  align-items: center;
}

.score-pair {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.score-pair span {
  color: #ffd37a;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.levelbox {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  min-width: 190px;
}

.level-title {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.level-name {
  font-size: 16px;
  font-weight: 800;
  color: #ffd37a;
}

.main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  justify-items: center;
}

.panel {
  display: none;
  background: linear-gradient(160deg, var(--panel), var(--panel2));
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  min-height: 0;
  overflow-y: auto;
}

.panel-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.3px;
  margin: 12px 0 8px;
}

.characters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.character {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s ease, border 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  gap: 8px;
  align-items: center;
}

.character .icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(0,0,0,0.35));
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.character.active {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow);
  transform: translateY(-1px);
}

.power-name { font-weight: 800; color: var(--accent); }
.power-desc { color: var(--muted); line-height: 1.4; min-height: 36px; }
.controls { margin: 0; padding-left: 16px; color: var(--muted); }

.power-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-top: 8px;
  overflow: hidden;
}

.power-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #46d5ff, #f1c232);
  box-shadow: 0 0 10px rgba(70, 213, 255, 0.6);
  transition: width 0.2s ease;
}

.power-state { font-size: 12px; color: var(--muted); margin-top: 6px; }

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.replay-list {
  display: grid;
  gap: 8px;
}

.replay-item {
  background: var(--menu-item-bg);
  border: 1px solid var(--menu-item-border);
  padding: 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.replay-meta {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
}

.replay-name {
  color: var(--text);
  font-weight: 700;
}

.replay-meta .replay-notes {
  font-size: 10px;
  color: var(--muted);
}

.replay-date {
  font-size: 10px;
  color: #9fb4ff;
}

.replay-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0;
}

.btn {
  background: linear-gradient(180deg, var(--menu-btn-grad-1), var(--menu-btn-grad-2));
  color: var(--text);
  border: 1px solid var(--menu-btn-border);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(180deg, #f0c559, #b37d24);
  color: #1b0d0d;
}

.btn.random-drop-ready {
  box-shadow: 0 0 16px rgba(95, 255, 158, 0.65);
  border-color: rgba(95, 255, 158, 0.9);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px var(--menu-btn-hover-glow);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.toggled {
  background: linear-gradient(180deg, #f0c559, #9f6f1e);
  color: #1b0d0d;
  border-color: rgba(255, 219, 120, 0.8);
  box-shadow: 0 0 12px rgba(255, 194, 92, 0.35);
}

.stage {
  position: relative;
  --hud-width: 248px;
  --hud-gap: 12px;
  --fever-meter-right: -64px;
  --replay-anchor-board-x: 1165.46px;
  --replay-anchor-board-y: 775px;
  --playfield-center-shift: calc((var(--hud-width) + var(--hud-gap)) * -0.5);
  width: calc(960px + var(--hud-width) + var(--hud-gap) + 24px);
  background:
    radial-gradient(700px 500px at 40% 30%, #22336a55, transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 40%);
  border-radius: 18px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 40px rgba(12, 20, 48, 0.6);
  min-height: 0;
  display: grid;
  grid-template-columns: var(--hud-width) 960px;
  gap: var(--hud-gap);
  align-items: start;
  transform: translateX(var(--playfield-center-shift));
}

.hud-left {
  grid-column: 1;
  display: grid;
  gap: 12px;
  min-height: 816px;
}

.hud-modern-brand,
.hud-team-balls-label {
  display: none;
}

.hud-team-scores {
  display: grid;
  gap: 12px;
}

.hud-team-scores.battle-royale-list {
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}

.hud-team-scores.battle-royale-list::-webkit-scrollbar {
  width: 8px;
}

.hud-team-scores.battle-royale-list::-webkit-scrollbar-thumb {
  background: rgba(164, 196, 255, 0.35);
  border-radius: 999px;
}

.hud-team-scores.battle-royale-list::-webkit-scrollbar-track {
  background: rgba(8, 18, 44, 0.35);
  border-radius: 999px;
}

.hud-team-scores.battle-royale-compact {
  gap: 8px;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

.hud-team-scores.battle-royale-compact .hud-team-block {
  padding: 8px 10px;
  border-radius: 10px;
  gap: 6px;
}

.hud-team-block-br-table {
  padding: 8px 10px;
}

.hud-team-br-table-head,
.hud-team-br-table-row {
  display: grid;
  grid-template-columns: 44px 30px 18px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.hud-team-br-table-head {
  color: #9bb5ea;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  opacity: 0.9;
}

.hud-team-br-col-player {
  text-align: center;
}

.hud-team-br-col-status,
.hud-team-br-col-balls {
  text-align: center;
}

.hud-team-br-col-score {
  text-align: right;
}

.hud-team-br-table-list {
  display: grid;
  gap: 2px;
}

.hud-team-br-table-row {
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-team-br-table-row:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.hud-team-br-player {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 26px;
}

.hud-team-br-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

.hud-team-br-name-mini {
  max-width: 42px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #cad7f8;
}

.hud-team-br-status {
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.2px;
}

.hud-team-br-status.aiming {
  color: #9ed5ff;
}

.hud-team-br-status.ready {
  color: #9effbe;
}

.hud-team-br-status.auto {
  color: #ffd17d;
}

.hud-team-br-status.launching {
  color: #ffefac;
}

.hud-team-br-balls {
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  color: #fef4cd;
}

.hud-team-br-val {
  text-align: right;
  min-width: 0;
}

.hud-team-scores.battle-royale-compact .hud-score-value {
  font-size: 10px;
  letter-spacing: 0.1px;
}

.hud-team-block {
  background: linear-gradient(170deg, rgba(10, 14, 34, 0.88), rgba(16, 24, 52, 0.82));
  border: 1px solid rgba(164, 196, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 0 20px rgba(5, 12, 36, 0.45);
  display: grid;
  gap: 10px;
}

.hud-team-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hud-team-headline-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hud-team-title {
  color: #ffe38b;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-shadow: 0 0 10px rgba(255, 218, 120, 0.35);
}

.hud-team-title.turn-active {
  color: #fff4cc;
  text-shadow: 0 0 14px rgba(255, 209, 90, 0.55);
}

.hud-team-level-prominent {
  display: grid;
  gap: 2px;
  margin-top: -2px;
}

.hud-team-level-prominent-label {
  color: #c7d8ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.hud-team-level-prominent-value {
  color: #ffd15a;
  font-size: 34px;
  line-height: 0.88;
  font-weight: 900;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 12px rgba(255, 218, 120, 0.55),
    0 0 26px rgba(255, 160, 64, 0.34);
}

.hud-team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: radial-gradient(circle at 35% 30%, #d9e7ff, #273f7e 74%);
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hud-team-avatar-shell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 40px;
}

.hud-team-power-turns {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5a3200;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff3a7, #ffc93a);
  border: 1px solid rgba(255, 237, 165, 0.92);
  box-shadow:
    0 0 10px rgba(255, 205, 76, 0.42),
    inset 0 1px 0 rgba(255, 252, 232, 0.72);
  text-shadow: 0 1px 0 rgba(255, 247, 210, 0.42);
  flex-shrink: 0;
}

.hud-team-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hud-team-avatar.has-image .hud-team-avatar-image {
  display: block;
}

.hud-team-avatar-fallback {
  font-size: 14px;
  font-weight: 800;
  color: #1d1427;
}

.hud-team-avatar.has-image .hud-team-avatar-fallback {
  display: none;
}

.hud-team-avatar-stack {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 64px;
}

.hud-team-balls {
  color: #fef4cd;
  font-size: 34px;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-shadow: 0 0 12px rgba(255, 200, 90, 0.45);
  font-variant-numeric: tabular-nums;
}

.hud-team-hero-name {
  color: #b8caef;
  font-size: 13px;
  margin-top: -4px;
}

.hud-team-player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #dbe4ff;
  letter-spacing: 0.2px;
  border-radius: 12px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: box-shadow 0.12s ease, background 0.12s ease;
}

.hud-team-player.turn-active {
  background: linear-gradient(90deg, rgba(255, 209, 90, 0.2), rgba(255, 209, 90, 0.06));
  box-shadow: 0 0 12px rgba(255, 209, 90, 0.28);
  color: #fff4cc;
  border-color: rgba(255, 209, 90, 0.4);
}

.hud-team-player-name {
  font-weight: 700;
}

.hud-team-player-level {
  color: #ffd15a;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 180, 70, 0.28);
}

.hud-player-block,
.hud-meta-block {
  background: linear-gradient(170deg, rgba(10, 14, 34, 0.88), rgba(16, 24, 52, 0.82));
  border: 1px solid rgba(164, 196, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 0 20px rgba(5, 12, 36, 0.45);
}

.hud-name {
  color: #ffe38b;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(255, 218, 120, 0.35);
}

.hud-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.hud-head-meta .hud-name {
  margin-bottom: 2px;
}

.hud-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.35);
  background: radial-gradient(circle at 35% 30%, #fef5cf, #5c4a2b 72%);
  position: relative;
  display: grid;
  place-items: center;
}

.hud-avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.hud-avatar-wrap.has-image .hud-avatar-image {
  display: block;
}

.hud-avatar-fallback {
  font-size: 18px;
  font-weight: 900;
  color: #1d1427;
}

.hud-avatar-wrap.has-image .hud-avatar-fallback {
  display: none;
}

.hud-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #d5deff;
  font-size: 14px;
  line-height: 1.35;
}

.hud-line + .hud-line {
  margin-top: 5px;
}

.hud-record-line {
  margin-top: 8px;
  font-size: 12px;
  color: #c7d8ff;
}

.hud-record-sub {
  justify-content: flex-start;
  gap: 4px;
  font-size: 11px;
  color: #a9bcdf;
}

.hud-score-value {
  color: #ffd15a;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-shadow: 0 0 8px rgba(255, 180, 70, 0.35);
  transform-origin: center;
  display: inline-block;
}

/* Modern in-match interface: an arcade broadcast deck around the unchanged playfield. */
html[data-game-ui="modern"] .app-frame {
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(64, 182, 226, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 182, 226, 0.024) 1px, transparent 1px),
    radial-gradient(720px 480px at 12% 16%, rgba(17, 126, 170, 0.24), transparent 72%),
    radial-gradient(780px 560px at 90% 76%, rgba(84, 49, 151, 0.18), transparent 72%),
    radial-gradient(560px 280px at 50% 108%, rgba(218, 163, 59, 0.055), transparent 72%),
    linear-gradient(145deg, #050e1c 0%, #071426 48%, #040914 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto, auto;
}

html[data-game-ui="modern"] .app-frame::before,
html[data-game-ui="modern"] .app-frame::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

html[data-game-ui="modern"] .app-frame::before {
  top: -330px;
  right: -240px;
  width: 760px;
  height: 760px;
  border: 1px solid rgba(84, 203, 244, 0.075);
  box-shadow:
    0 0 0 76px rgba(84, 203, 244, 0.019),
    0 0 0 152px rgba(84, 203, 244, 0.012),
    inset 0 0 110px rgba(42, 166, 213, 0.03);
}

html[data-game-ui="modern"] .app-frame::after {
  bottom: -390px;
  left: -300px;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(194, 143, 255, 0.07);
  box-shadow:
    0 0 0 88px rgba(147, 89, 219, 0.016),
    0 0 0 176px rgba(147, 89, 219, 0.009);
}

html[data-game-ui="modern"] .app-frame > .app {
  z-index: 1;
}

html[data-game-ui="modern"] .stage {
  background:
    radial-gradient(560px 380px at 17% 28%, rgba(31, 140, 198, 0.18), transparent 72%),
    linear-gradient(155deg, rgba(20, 34, 62, 0.92), rgba(5, 9, 23, 0.96) 52%, rgba(16, 22, 42, 0.92));
  border-color: rgba(105, 180, 225, 0.2);
  box-shadow:
    inset 0 0 46px rgba(1, 7, 19, 0.68),
    0 16px 52px rgba(0, 0, 0, 0.32);
}

html[data-game-ui="modern"] .hud-left {
  position: relative;
  align-content: start;
  gap: 9px;
  min-height: 816px;
  padding: 2px;
  color: #eaf7ff;
  font-family: "Bahnschrift Condensed", "Agency FB", "Trebuchet MS", sans-serif;
  animation: modern-hud-enter 360ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] .hud-left::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 14px;
  background:
    repeating-linear-gradient(112deg, transparent 0 17px, rgba(112, 194, 232, 0.018) 17px 18px),
    linear-gradient(180deg, rgba(4, 12, 27, 0.5), rgba(4, 8, 20, 0.12));
  pointer-events: none;
}

html[data-game-ui="modern"] .hud-modern-brand {
  position: relative;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid rgba(102, 203, 246, 0.24);
  border-radius: 3px 13px 3px 13px;
  background:
    linear-gradient(105deg, rgba(43, 143, 190, 0.2), transparent 46%),
    rgba(5, 13, 30, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

html[data-game-ui="modern"] .hud-modern-brand::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 52px;
  height: 1px;
  background: linear-gradient(90deg, #4bdcff, transparent);
  opacity: 0.7;
}

html[data-game-ui="modern"] .hud-modern-brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border: 1px solid rgba(115, 226, 255, 0.7);
  border-radius: 4px;
  color: #05111d;
  background: linear-gradient(145deg, #baf5ff, #35bde5 52%, #167fae);
  box-shadow: 0 0 14px rgba(58, 201, 245, 0.35), inset 0 1px rgba(255, 255, 255, 0.65);
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 1px rgba(255, 255, 255, 0.34);
}

html[data-game-ui="modern"] .hud-modern-brand-copy {
  display: grid;
  line-height: 1;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-modern-brand-copy strong {
  color: #f2fbff;
  font-size: 15px;
  font-stretch: condensed;
  letter-spacing: 1.5px;
}

html[data-game-ui="modern"] .hud-modern-brand-copy em {
  margin-top: 3px;
  color: #76bdd7;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 2.1px;
}

html[data-game-ui="modern"] .hud-modern-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffb3a8;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-modern-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff665c;
  box-shadow: 0 0 8px rgba(255, 92, 82, 0.82);
  animation: modern-live-pulse 1.8s ease-in-out infinite;
}

html[data-game-ui="modern"] .hud-team-scores {
  gap: 9px;
}

html[data-game-ui="modern"] .hud-team-block,
html[data-game-ui="modern"] .hud-meta-block {
  --hud-team-accent: #56d9ff;
  --hud-team-accent-rgb: 86, 217, 255;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--hud-team-accent-rgb), 0.3);
  border-radius: 3px 17px 3px 17px;
  background:
    linear-gradient(112deg, rgba(var(--hud-team-accent-rgb), 0.12), transparent 38%),
    linear-gradient(160deg, rgba(15, 30, 54, 0.98), rgba(5, 11, 26, 0.98));
  box-shadow:
    inset 3px 0 0 rgba(var(--hud-team-accent-rgb), 0.8),
    inset 0 1px rgba(255, 255, 255, 0.055),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

html[data-game-ui="modern"] .hud-team-block {
  gap: 7px;
  padding: 11px 11px 10px 15px;
}

html[data-game-ui="modern"] .hud-team-block::after,
html[data-game-ui="modern"] .hud-meta-block::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -48px;
  width: 112px;
  height: 76px;
  transform: rotate(28deg);
  border-bottom: 1px solid rgba(var(--hud-team-accent-rgb), 0.24);
  background: linear-gradient(180deg, rgba(var(--hud-team-accent-rgb), 0.12), transparent);
  pointer-events: none;
}

html[data-game-ui="modern"] .hud-team-block-opponent {
  --hud-team-accent: #ff776d;
  --hud-team-accent-rgb: 255, 119, 109;
}

html[data-game-ui="modern"] .hud-team-block[data-hud-team="team3"] {
  --hud-team-accent: #c790ff;
  --hud-team-accent-rgb: 199, 144, 255;
}

html[data-game-ui="modern"] .hud-team-block-three-way[data-hud-seat="1"] {
  --hud-team-accent: #56d9ff;
  --hud-team-accent-rgb: 86, 217, 255;
}

html[data-game-ui="modern"] .hud-team-block-three-way[data-hud-seat="2"] {
  --hud-team-accent: #ff776d;
  --hud-team-accent-rgb: 255, 119, 109;
}

html[data-game-ui="modern"] .hud-team-block-three-way[data-hud-seat="3"] {
  --hud-team-accent: #63e58f;
  --hud-team-accent-rgb: 99, 229, 143;
}

html[data-game-ui="modern"] .hud-team-block.turn-active {
  border-color: rgba(var(--hud-team-accent-rgb), 0.72);
  box-shadow:
    inset 3px 0 0 var(--hud-team-accent),
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(var(--hud-team-accent-rgb), 0.15),
    0 0 22px rgba(var(--hud-team-accent-rgb), 0.2);
}

html[data-game-ui="modern"] .hud-team-block.turn-active:not(.hud-team-block-shared)::after,
html[data-game-ui="modern"] .hud-team-block-shared .hud-team-player.turn-active::after {
  content: "";
  position: absolute;
  inset: -1px;
  width: auto;
  height: auto;
  padding: 1.5px;
  transform: none;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(
    112deg,
    transparent 0 30%,
    rgba(var(--hud-team-accent-rgb), 0.18) 39%,
    rgba(238, 251, 255, 0.96) 48%,
    rgba(var(--hud-team-accent-rgb), 0.75) 54%,
    transparent 64% 100%
  );
  background-size: 260% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: modern-turn-border-shimmer 2.35s linear infinite;
  pointer-events: none;
}

html[data-game-ui="modern"] .hud-team-block.turn-active::before {
  content: "ACTIVE TURN";
  position: absolute;
  top: 0;
  right: 13px;
  padding: 3px 7px 4px;
  border-radius: 0 0 6px 6px;
  color: #06111e;
  background: var(--hud-team-accent);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(var(--hud-team-accent-rgb), 0.35);
}

html[data-game-ui="modern"] .hud-team-headline {
  align-items: start;
  gap: 6px;
}

html[data-game-ui="modern"] .hud-team-headline-main {
  gap: 4px;
  padding-top: 3px;
}

html[data-game-ui="modern"] .hud-team-title {
  max-width: 148px;
  overflow: hidden;
  color: #f3f8ff;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.25px;
  text-overflow: ellipsis;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.66);
  white-space: nowrap;
}

html[data-game-ui="modern"] .hud-team-title.turn-active {
  color: #fff;
  text-shadow: 0 0 12px rgba(var(--hud-team-accent-rgb), 0.5);
}

html[data-game-ui="modern"] .hud-team-level-prominent {
  gap: 0;
  margin-top: 1px;
}

html[data-game-ui="modern"] .hud-team-level-prominent-label {
  color: #8ba7ba;
  font-size: 8px;
  letter-spacing: 1.35px;
}

html[data-game-ui="modern"] .hud-team-level-prominent-value {
  color: #ffe275;
  font-size: 36px;
  line-height: 0.94;
  letter-spacing: -0.5px;
  text-shadow: 0 0 16px rgba(255, 207, 78, 0.32);
}

html[data-game-ui="modern"] .hud-team-avatar-stack {
  display: grid;
  grid-template-columns: 52px 26px;
  grid-template-rows: auto auto;
  align-items: end;
  justify-items: center;
  gap: 0 5px;
  min-width: 82px;
}

html[data-game-ui="modern"] .hud-team-avatar-shell {
  position: relative;
  grid-row: 1 / 3;
  min-width: 52px;
}

html[data-game-ui="modern"] .hud-team-avatar {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(var(--hud-team-accent-rgb), 0.8);
  background: radial-gradient(circle at 35% 25%, #eefcff, #1b4563 74%);
  box-shadow:
    0 0 0 2px rgba(3, 9, 20, 0.9),
    0 0 14px rgba(var(--hud-team-accent-rgb), 0.28),
    inset 0 0 12px rgba(255, 255, 255, 0.12);
}

html[data-game-ui="modern"] .hud-team-power-turns {
  position: absolute;
  z-index: 2;
  right: -3px;
  bottom: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #081224;
  font-size: 11px;
}

html[data-game-ui="modern"] .hud-team-balls {
  align-self: end;
  color: #f8fbff;
  font-size: 27px;
  line-height: 0.85;
  text-shadow: 0 0 10px rgba(var(--hud-team-accent-rgb), 0.32);
}

html[data-game-ui="modern"] .hud-team-balls-label {
  display: block;
  align-self: start;
  color: #7796aa;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-team-hero-name {
  width: max-content;
  max-width: 100%;
  margin-top: -4px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid rgba(var(--hud-team-accent-rgb), 0.18);
  border-radius: 2px 7px 2px 7px;
  color: rgba(216, 238, 250, 0.82);
  background: rgba(var(--hud-team-accent-rgb), 0.065);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.55px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

html[data-game-ui="modern"] .hud-team-player {
  position: relative;
  min-height: 28px;
  padding: 5px 8px;
  border-color: rgba(141, 183, 215, 0.1);
  border-radius: 2px 8px 2px 8px;
  color: #c9dae5;
  background: rgba(118, 173, 207, 0.055);
  font-size: 11px;
}

html[data-game-ui="modern"] .hud-team-player.turn-active {
  border-color: rgba(var(--hud-team-accent-rgb), 0.34);
  color: #fff;
  background: linear-gradient(90deg, rgba(var(--hud-team-accent-rgb), 0.16), transparent);
  box-shadow: none;
}

html[data-game-ui="modern"] .hud-team-player-level {
  color: #ffe275;
  font-size: 12px;
}

html[data-game-ui="modern"] .hud-total-line {
  min-height: 26px;
  margin-top: 0;
  padding: 5px 8px;
  border-top: 1px solid rgba(var(--hud-team-accent-rgb), 0.16);
  color: #809bae;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-total-line .hud-score-value {
  color: #f5f9ff;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-shadow: 0 0 9px rgba(var(--hud-team-accent-rgb), 0.25);
}

html[data-game-ui="modern"] .hud-meta-block {
  --hud-team-accent: #efb956;
  --hud-team-accent-rgb: 239, 185, 86;
  padding: 37px 12px 12px 15px;
}

html[data-game-ui="modern"] .hud-meta-block::before {
  content: "Arena Intel";
  position: absolute;
  top: 10px;
  left: 15px;
  color: #f4d58c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-meta-block > .hud-line:first-child {
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 148, 66, 0.24);
  border-radius: 2px 10px 2px 10px;
  color: #ffc49c;
  background:
    radial-gradient(circle at 86% 50%, rgba(255, 120, 48, 0.23), transparent 32%),
    linear-gradient(90deg, rgba(255, 117, 43, 0.13), transparent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-meta-block > .hud-line:first-child span {
  color: #ffb153;
  font-size: 25px;
  letter-spacing: 0;
  text-shadow: 0 0 13px rgba(255, 121, 50, 0.42);
}

html[data-game-ui="modern"] .hud-meta-block > .hud-line:nth-child(2) {
  padding: 7px 1px 8px;
  border-bottom: 1px solid rgba(239, 185, 86, 0.15);
  color: #819bac;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-meta-block > .hud-line:nth-child(2) span {
  max-width: 150px;
  overflow: hidden;
  color: #e5edf3;
  font-size: 11px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

html[data-game-ui="modern"] .hud-drinks-line {
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(118, 214, 255, 0.18);
  border-radius: 2px 8px 2px 8px;
  color: #91aabb;
  background: rgba(79, 176, 219, 0.07);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-drinks-line span {
  color: #dff7ff;
  font-size: 12px;
}

html[data-game-ui="modern"] .hud-record-line {
  margin-top: 8px;
  color: #91aabb;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .hud-record-line span {
  color: #ffe075;
  font-size: 12px;
  letter-spacing: 0;
}

html[data-game-ui="modern"] .hud-record-sub {
  margin-top: 2px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(134, 167, 190, 0.1);
  color: #6f899a;
  font-size: 8px;
}

html[data-game-ui="modern"] .hud-team-scores.battle-royale-list {
  scrollbar-color: rgba(90, 202, 245, 0.5) rgba(5, 14, 29, 0.5);
}

html[data-game-ui="modern"] .hud-team-scores.battle-royale-compact .hud-team-block {
  border-radius: 3px 13px 3px 13px;
  padding: 8px 9px 8px 12px;
}

html[data-game-ui="modern"] .hud-team-br-table-head {
  color: #6e9bb2;
  letter-spacing: 0.8px;
}

html[data-game-ui="modern"] .hud-team-br-table-row {
  border-top-color: rgba(92, 177, 212, 0.11);
}

@keyframes modern-hud-enter {
  from { opacity: 0; transform: translateX(-9px); filter: saturate(0.7); }
  to { opacity: 1; transform: translateX(0); filter: saturate(1); }
}

@keyframes modern-live-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes modern-turn-border-shimmer {
  from { background-position: 125% 0; }
  to { background-position: -125% 0; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-game-ui="modern"] .hud-left,
  html[data-game-ui="modern"] .hud-modern-live i,
  html[data-game-ui="modern"] .hud-team-block.turn-active::after,
  html[data-game-ui="modern"] .hud-team-player.turn-active::after {
    animation: none;
  }
}

.score-pulse,
.score-pulse-med {
  animation: hud-score-pulse-med 0.3s ease-out;
}

.score-pulse-low {
  animation: hud-score-pulse-low 0.24s ease-out;
}

.score-pulse-high {
  animation: hud-score-pulse-high 0.36s ease-out;
}

.score-heat,
.score-heat-med {
  animation: score-heat-med 0.82s ease-out;
}

.score-heat-low {
  animation: score-heat-low 0.58s ease-out;
}

.score-heat-high {
  animation: score-heat-high 1.15s ease-out;
}

@keyframes hud-score-pulse-low {
  0% { transform: scale(1); }
  36% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes hud-score-pulse-med {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

@keyframes hud-score-pulse-high {
  0% { transform: scale(1); }
  42% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes score-heat-low {
  0% {
    text-shadow: 0 0 8px rgba(255, 180, 70, 0.32);
    filter: saturate(1);
  }
  42% {
    text-shadow:
      0 0 13px rgba(255, 208, 118, 0.68),
      0 0 22px rgba(255, 168, 70, 0.45);
    filter: saturate(1.08);
  }
  100% {
    text-shadow: 0 0 8px rgba(255, 180, 70, 0.32);
    filter: saturate(1);
  }
}

@keyframes score-heat-med {
  0% {
    text-shadow: 0 0 8px rgba(255, 180, 70, 0.35);
    filter: saturate(1);
  }
  42% {
    text-shadow:
      0 0 14px rgba(255, 210, 120, 0.8),
      0 0 28px rgba(255, 168, 70, 0.55);
    filter: saturate(1.12);
  }
  100% {
    text-shadow: 0 0 8px rgba(255, 180, 70, 0.35);
    filter: saturate(1);
  }
}

@keyframes score-heat-high {
  0% {
    text-shadow: 0 0 10px rgba(255, 182, 72, 0.4);
    filter: saturate(1);
  }
  44% {
    text-shadow:
      0 0 18px rgba(255, 225, 142, 0.95),
      0 0 36px rgba(255, 170, 72, 0.7),
      0 0 54px rgba(255, 120, 36, 0.42);
    filter: saturate(1.2);
  }
  100% {
    text-shadow: 0 0 10px rgba(255, 182, 72, 0.4);
    filter: saturate(1);
  }
}

.ingame-menu {
  position: absolute;
  top: calc(12px + 816px * 0.5);
  left: calc(12px + var(--hud-width) + var(--hud-gap) + 480px);
  transform: translate(-50%, -50%);
  width: min(420px, 88%);
  background: linear-gradient(160deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  border: 1px solid var(--menu-card-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  padding: 16px;
  z-index: 20;
}

.ingame-menu-backdrop {
  display: none;
}

.ingame-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}

.ingame-actions {
  display: grid;
  gap: 8px;
}

.ingame-modern-kicker,
.ingame-modern-context,
.ingame-modern-notice,
.ingame-section-label,
.ingame-action-icon,
.ingame-action-detail,
.ingame-action-chevron {
  display: none;
}

.ingame-action-group {
  display: contents;
}

.ingame-action-copy strong {
  font: inherit;
}

html[data-game-ui="modern"] .ingame-menu-backdrop:not(.hidden) {
  position: absolute;
  inset: 0;
  z-index: 19;
  display: block;
  border-radius: 18px;
  background:
    radial-gradient(circle at 58% 44%, rgba(36, 151, 205, 0.13), transparent 42%),
    rgba(0, 5, 16, 0.7);
  backdrop-filter: blur(4px) saturate(0.72);
  animation: modern-ingame-backdrop-in 160ms ease-out both;
}

html[data-game-ui="modern"] .ingame-menu {
  width: min(520px, 88%);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 209, 243, 0.42);
  border-radius: 3px 24px 3px 24px;
  color: #eaf8ff;
  background:
    linear-gradient(145deg, rgba(25, 93, 127, 0.17), transparent 34%),
    linear-gradient(180deg, rgba(7, 25, 45, 0.985), rgba(2, 10, 24, 0.99));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 36px rgba(63, 198, 240, 0.12),
    inset 0 1px rgba(255, 255, 255, 0.06);
  font-family: "Bahnschrift Condensed", "Agency FB", "Trebuchet MS", sans-serif;
  animation: modern-ingame-menu-in 220ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

html[data-game-ui="modern"] .ingame-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 92px;
  z-index: 2;
  height: 2px;
  background: linear-gradient(90deg, #51dcff, rgba(81, 220, 255, 0));
  box-shadow: 0 0 13px rgba(81, 220, 255, 0.72);
}

html[data-game-ui="modern"] .ingame-menu::after {
  content: "";
  position: absolute;
  right: -115px;
  bottom: -135px;
  width: 310px;
  height: 310px;
  z-index: 0;
  border: 1px solid rgba(82, 204, 238, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 42px rgba(82, 204, 238, 0.018),
    0 0 0 84px rgba(82, 204, 238, 0.012);
  pointer-events: none;
}

html[data-game-ui="modern"] .ingame-menu > * {
  position: relative;
  z-index: 1;
}

html[data-game-ui="modern"] .ingame-modern-header {
  min-height: 94px;
  padding: 19px 22px 15px;
  border-bottom: 1px solid rgba(91, 192, 224, 0.13);
  background:
    linear-gradient(90deg, rgba(37, 145, 190, 0.09), transparent 60%),
    rgba(1, 9, 22, 0.3);
}

html[data-game-ui="modern"] .ingame-modern-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #65cbe7;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .ingame-modern-kicker i {
  width: 18px;
  height: 5px;
  background: #53dcff;
  clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
  box-shadow: 0 0 9px rgba(83, 220, 255, 0.6);
}

html[data-game-ui="modern"] .ingame-title {
  margin: 4px 0 0;
  color: #f2fbff;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.62);
}

html[data-game-ui="modern"] .ingame-modern-context {
  position: absolute;
  top: 23px;
  right: 21px;
  display: grid;
  justify-items: end;
  gap: 5px;
}

html[data-game-ui="modern"] .ingame-modern-context span:first-child {
  padding: 4px 9px;
  border: 1px solid rgba(91, 213, 244, 0.28);
  border-radius: 2px 9px 2px 9px;
  color: #9ceaff;
  background: rgba(58, 176, 216, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.1px;
}

html[data-game-ui="modern"] .ingame-modern-context span:last-child {
  color: #6f8fa1;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .ingame-modern-notice {
  min-height: 34px;
  padding: 8px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(91, 192, 224, 0.1);
  color: #7f9bab;
  background: rgba(1, 8, 18, 0.42);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 9px;
}

html[data-game-ui="modern"] .ingame-modern-notice i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffbd52;
  box-shadow: 0 0 10px rgba(255, 189, 82, 0.65);
}

html[data-game-ui="modern"] .ingame-actions {
  gap: 10px;
  padding: 15px 18px 18px;
}

html[data-game-ui="modern"] .ingame-action {
  position: relative;
  min-height: 52px;
  padding: 9px 13px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(92, 176, 211, 0.22);
  border-radius: 2px 12px 2px 12px;
  color: #d9edf6;
  background:
    linear-gradient(110deg, rgba(50, 154, 196, 0.095), transparent 48%),
    rgba(4, 16, 31, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  text-align: left;
  transform: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

html[data-game-ui="modern"] .ingame-action:hover:not(:disabled),
html[data-game-ui="modern"] .ingame-action:focus-visible {
  border-color: rgba(77, 218, 255, 0.66);
  color: #f4fcff;
  background: rgba(18, 73, 99, 0.72);
  box-shadow: 0 0 18px rgba(67, 202, 242, 0.13), inset 0 1px rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
  outline: none;
}

html[data-game-ui="modern"] .ingame-action-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(102, 210, 239, 0.24);
  border-radius: 2px 8px 2px 8px;
  color: #71daf5;
  background: rgba(66, 183, 219, 0.08);
  font-size: 13px;
}

html[data-game-ui="modern"] .ingame-action-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

html[data-game-ui="modern"] .ingame-action-copy strong {
  color: inherit;
  font: 900 12px "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .ingame-action-detail {
  display: block;
  color: #6d899a;
  font: 400 8px "Trebuchet MS", sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

html[data-game-ui="modern"] .ingame-action-chevron {
  display: block;
  color: #5ebed9;
  font-size: 15px;
}

html[data-game-ui="modern"] .ingame-resume-action {
  min-height: 58px;
  border-color: rgba(255, 211, 98, 0.58);
  color: #231804;
  background: linear-gradient(180deg, #ffe487, #d69c32);
  box-shadow: 0 0 20px rgba(240, 177, 56, 0.16), inset 0 1px rgba(255, 255, 255, 0.62);
}

html[data-game-ui="modern"] .ingame-resume-action .ingame-action-icon {
  border-color: rgba(74, 48, 6, 0.2);
  color: #3b2807;
  background: rgba(255, 255, 255, 0.18);
}

html[data-game-ui="modern"] .ingame-resume-action .ingame-action-detail,
html[data-game-ui="modern"] .ingame-resume-action .ingame-action-chevron {
  color: rgba(55, 37, 5, 0.68);
}

html[data-game-ui="modern"] .ingame-resume-action:hover:not(:disabled),
html[data-game-ui="modern"] .ingame-resume-action:focus-visible {
  border-color: rgba(255, 231, 151, 0.86);
  color: #1d1303;
  background: linear-gradient(180deg, #ffeca9, #e4aa3e);
  box-shadow: 0 0 24px rgba(247, 189, 68, 0.28), inset 0 1px rgba(255, 255, 255, 0.72);
}

html[data-game-ui="modern"] .ingame-action-group {
  display: grid;
  gap: 8px;
}

html[data-game-ui="modern"] .ingame-menu .hidden {
  display: none !important;
}

html[data-game-ui="modern"] .ingame-practice-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-game-ui="modern"] .ingame-system-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[data-game-ui="modern"] .ingame-section-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6d91a4;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .ingame-section-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(99, 186, 219, 0.17), transparent);
}

html[data-game-ui="modern"] .ingame-practice-actions .ingame-action {
  grid-template-columns: 29px minmax(0, 1fr);
}

html[data-game-ui="modern"] .ingame-system-actions .ingame-action {
  min-height: 70px;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  padding: 9px;
}

html[data-game-ui="modern"] .ingame-system-actions .ingame-action-icon {
  width: 25px;
  height: 25px;
}

html[data-game-ui="modern"] .ingame-recover-action {
  border-color: rgba(255, 185, 84, 0.31);
  background: linear-gradient(100deg, rgba(161, 87, 28, 0.16), rgba(5, 16, 31, 0.82) 58%);
}

html[data-game-ui="modern"] .ingame-recover-action .ingame-action-icon {
  border-color: rgba(255, 185, 84, 0.27);
  color: #ffc46a;
  background: rgba(184, 103, 35, 0.11);
}

html[data-game-ui="modern"] .ingame-leave-action {
  min-height: 46px;
  border-color: rgba(237, 98, 93, 0.28);
  color: #eeb7b5;
  background: linear-gradient(100deg, rgba(151, 45, 48, 0.13), rgba(5, 14, 27, 0.8) 62%);
}

html[data-game-ui="modern"] .ingame-leave-action .ingame-action-icon {
  border-color: rgba(238, 105, 100, 0.25);
  color: #ff8f8a;
  background: rgba(155, 46, 50, 0.1);
}

html[data-game-ui="modern"] .ingame-leave-action:hover:not(:disabled),
html[data-game-ui="modern"] .ingame-leave-action:focus-visible {
  border-color: rgba(255, 110, 103, 0.56);
  background: rgba(108, 31, 39, 0.5);
  box-shadow: 0 0 18px rgba(236, 73, 68, 0.12);
}

@keyframes modern-ingame-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modern-ingame-menu-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(0.975); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.fever-meter {
  position: absolute;
  top: 12px;
  bottom: 12px;
  right: var(--fever-meter-right);
  width: 50px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-items: center;
  pointer-events: none;
}

.replay-controls {
  position: absolute;
  left: calc(12px + var(--hud-width) + var(--hud-gap) + var(--replay-anchor-board-x));
  top: calc(12px + var(--replay-anchor-board-y));
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  display: block;
  pointer-events: auto;
  z-index: 30;
}

.replay-btn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.8), rgba(255,210,120,0.75) 45%, rgba(180,90,20,0.9) 100%);
  color: #1a0e0a;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 12px rgba(255, 190, 90, 0.5);
}

.replay-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.replay-actions {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.replay-mini {
  padding: 8px 12px;
  font-size: 11px;
  border-radius: 999px;
  min-width: 64px;
}

.fever-cap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, #ffd37a, #c96e1a 70%, #7a3f0a 100%);
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 0 14px rgba(255, 170, 60, 0.35);
}

.fever-cap::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 240, 190, 0.35);
  pointer-events: none;
}

.fever-cap-value {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #fff0cc;
  text-shadow:
    0 1px 0 rgba(45, 20, 0, 0.75),
    0 0 10px rgba(255, 220, 140, 0.7);
}

.fever-cap.multiplier-pop {
  animation: fever-cap-pop 0.44s ease-out;
}

.fever-cap.multiplier-pop .fever-cap-value {
  animation: fever-cap-value-pop 0.44s ease-out;
}

@keyframes fever-cap-pop {
  0% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(255, 170, 60, 0.35);
  }
  38% {
    transform: scale(1.15);
    box-shadow:
      0 0 18px rgba(255, 200, 110, 0.85),
      0 0 34px rgba(255, 120, 80, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 14px rgba(255, 170, 60, 0.35);
  }
}

@keyframes fever-cap-value-pop {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.2); filter: brightness(1.25); }
  100% { transform: scale(1); filter: brightness(1); }
}

.fever-track {
  position: relative;
  width: 32px;
  flex: 1;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.45));
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
  display: flex;
  align-items: stretch;
}

.fever-fill {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  height: 0%;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd37a 0%, #ff9f3a 55%, #ff4d6d 100%);
  box-shadow: 0 0 10px rgba(255, 140, 60, 0.6);
  transition: height 0.2s ease;
}

.fever-slots {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  top: 6px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  pointer-events: none;
}

.fever-slot {
  flex: 1;
  min-height: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
}

.fever-slot.filled {
  background: linear-gradient(180deg, #ffe08a, #ff9f3a);
  border-color: rgba(255, 205, 120, 0.7);
  box-shadow: 0 0 6px rgba(255, 166, 80, 0.55);
}

.fever-mark {
  position: absolute;
  right: -36px;
  color: #ffd37a;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(255, 209, 90, 0.5);
}

.fever-mark::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: rgba(255, 209, 90, 0.7);
}

.fever-tier {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), rgba(255,255,255,0.7));
  box-shadow: 0 0 6px rgba(255, 220, 140, 0.6);
}

.tier-2x { bottom: 48%; }
.tier-3x { bottom: 64%; }
.tier-5x { bottom: 78%; }
.tier-10x { bottom: 94%; }

.mark-2x { bottom: 48%; }
.mark-3x { bottom: 64%; }
.mark-5x { bottom: 78%; }
.mark-10x { bottom: 94%; }

canvas {
  grid-column: 2;
  width: 960px;
  height: 816px;
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 12px;
  background:
    radial-gradient(900px 700px at 50% 20%, #29407a 0%, #111c3b 55%, #080b1c 100%),
    radial-gradient(600px 300px at 10% 90%, rgba(255,255,255,0.06), transparent 60%);
  border: 1px solid rgba(255,255,255,0.1);
}

.mode-rpg-btn {
  border-color: rgba(255, 90, 105, 0.48);
  background: linear-gradient(135deg, rgba(75, 16, 32, 0.9), rgba(24, 25, 56, 0.96));
}

.rpg-format-card {
  max-width: 920px;
}

html[data-game-ui="modern"] #rpgFormatScreen .rpg-format-card {
  position: relative;
  width: min(920px, 94vw);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 104, 116, 0.28);
  border-radius: 3px 24px 3px 24px;
  background:
    radial-gradient(520px 260px at 18% 0%, rgba(173, 38, 63, 0.2), transparent 72%),
    linear-gradient(155deg, rgba(17, 24, 48, 0.985), rgba(5, 10, 24, 0.99));
  box-shadow: 0 32px 90px rgba(0,0,0,0.58), inset 4px 0 rgba(255, 83, 101, 0.52);
}

html[data-game-ui="modern"] #rpgFormatScreen .mode-modern-header {
  min-height: 112px;
  padding: 23px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 115, 126, 0.16);
  background: linear-gradient(90deg, rgba(159, 31, 54, 0.14), transparent 50%);
}

html[data-game-ui="modern"] #rpgFormatScreen .menu-modern-kicker {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
  color: #ff8792;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #rpgFormatScreen .menu-modern-kicker > span {
  width: 17px;
  background: #ff5365;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}

html[data-game-ui="modern"] #rpgFormatScreen .screen-title {
  color: #fff3f4;
  font-size: 35px;
  line-height: 1;
  font-weight: 900;
}

html[data-game-ui="modern"] #rpgFormatScreen .mode-modern-subtitle {
  display: block;
  max-width: 590px;
  margin-top: 8px;
  color: #a493a6;
  font: 11px "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] #rpgFormatScreen .menu-modern-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(255, 191, 95, 0.24);
  color: #ffd692;
  background: rgba(120, 74, 21, 0.1);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #rpgFormatScreen .menu-modern-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffca70;
  box-shadow: 0 0 10px rgba(255, 184, 74, 0.72);
}

.rpg-format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

html[data-game-ui="modern"] #rpgFormatScreen .rpg-format-grid {
  margin: 0;
  padding: 24px 30px 12px;
}

html[data-game-ui="modern"] #rpgFormatScreen .rpg-format-grid .mode-btn {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(255, 111, 123, 0.22);
  border-radius: 2px 14px 2px 14px;
  color: #f8f0f2;
  background: linear-gradient(115deg, rgba(150, 30, 53, 0.16), transparent 62%), rgba(8, 16, 34, 0.94);
}

html[data-game-ui="modern"] #rpgFormatScreen .mode-modern-copy {
  display: grid;
  gap: 6px;
  text-transform: none;
}

html[data-game-ui="modern"] #rpgFormatScreen .mode-modern-copy strong {
  font-size: 21px;
  font-weight: 900;
}

html[data-game-ui="modern"] #rpgFormatScreen .mode-modern-copy small {
  display: block;
  color: #9a899d;
  font: 11px "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] #rpgFormatScreen .rpg-format-note {
  margin: 0 30px 12px;
}

html[data-game-ui="modern"] #rpgFormatScreen .screen-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 30px 24px;
}

html[data-game-ui="modern"] #rpgFormatScreen .screen-actions .btn {
  min-width: 108px;
  min-height: 38px;
  border: 1px solid rgba(255, 116, 128, 0.3);
  border-radius: 2px 10px 2px 10px;
  color: #f1dfe2;
  background: linear-gradient(180deg, rgba(74, 28, 44, 0.94), rgba(29, 18, 37, 0.96));
  font: 900 11px "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.rpg-format-grid .mode-btn {
  min-height: 104px;
  text-align: left;
}

.rpg-format-note {
  margin-top: 16px;
  color: #aebbd4;
  font-size: 12px;
}

.app.rpg-mode {
  left: calc(50% - 31px);
  width: 1668px;
}

.stage.rpg-mode {
  --rpg-panel-width: 248px;
  --rpg-fever-lane-width: 112px;
  width: calc(960px + var(--hud-width) + var(--rpg-fever-lane-width) + var(--rpg-panel-width) + var(--hud-gap) * 3 + 24px);
  grid-template-columns: var(--hud-width) 960px var(--rpg-fever-lane-width) var(--rpg-panel-width);
  transform: none;
}

.stage.rpg-mode .game-overlay-canvas {
  width: calc(var(--hud-width) + 960px + var(--rpg-fever-lane-width) + var(--rpg-panel-width) + var(--hud-gap) * 3);
}

.stage.rpg-mode .fever-meter {
  right: calc(12px + var(--rpg-panel-width) + var(--hud-gap) + 31px);
}

.rpg-build-panel {
  grid-column: 4;
  position: relative;
  left: -88px;
  min-height: 816px;
  max-height: 816px;
  overflow: auto;
  padding: 8px;
  border-radius: 3px 18px 3px 18px;
  border: 1px solid rgba(255, 104, 116, 0.28);
  background:
    radial-gradient(220px 180px at 50% 0%, rgba(189, 44, 64, 0.24), transparent 75%),
    linear-gradient(180deg, rgba(13, 20, 39, 0.97), rgba(6, 10, 22, 0.98));
  color: #edf4ff;
  font-family: "Bahnschrift Condensed", "Agency FB", "Trebuchet MS", sans-serif;
}

.rpg-build-heading {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rpg-build-heading strong {
  display: block;
  font-size: 14px;
  color: #ff8792;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.rpg-build-heading small { color: #9daac4; font-size: 9px; }

.rpg-inventory {
  margin-bottom: 7px;
  padding: 6px;
  border: 1px solid rgba(246, 200, 76, 0.3);
  border-radius: 2px 11px 2px 11px;
  background: linear-gradient(180deg, rgba(56, 43, 15, 0.36), rgba(18, 18, 26, 0.7));
}

.rpg-inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #f6d875;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.rpg-item-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 5px;
}

.rpg-item-effects span {
  padding: 2px 5px;
  border: 1px solid rgba(116, 220, 244, 0.3);
  border-radius: 8px;
  background: rgba(51, 146, 174, 0.18);
  color: #a9ecff;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.rpg-inventory-slot {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  margin-bottom: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px 8px 2px 8px;
  background: rgba(255, 255, 255, 0.035);
}

.rpg-inventory-slot.empty {
  grid-template-columns: 25px 1fr;
  min-height: 27px;
  color: #67738a;
  font-size: 9px;
}

.rpg-item-symbol {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border: 1px solid rgba(255, 241, 171, 0.75);
  background: linear-gradient(135deg, #f7d864, #b36f19);
  color: #241504;
  font-size: 8px;
  font-weight: 1000;
  box-shadow: 0 0 8px rgba(246, 200, 76, 0.22);
}

.rpg-item-copy { min-width: 0; }
.rpg-item-copy strong { display: block; color: #fff0b0; font-size: 10px; }
.rpg-item-copy small {
  display: block;
  overflow: hidden;
  color: #9daac0;
  font-size: 7.5px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rpg-item-target {
  width: 100%;
  height: 19px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  background: #11192b;
  color: #dce8fa;
  font-family: inherit;
  font-size: 8px;
  font-weight: 800;
}

.rpg-item-use,
.rpg-pending-item button {
  min-width: 38px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid rgba(246, 200, 76, 0.42);
  border-radius: 2px 7px 2px 7px;
  background: linear-gradient(180deg, rgba(238, 189, 55, 0.92), rgba(159, 92, 19, 0.94));
  color: #211304;
  font-family: inherit;
  font-size: 8px;
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

.rpg-item-use.active { border-color: #9cecff; background: #4abbd4; }
.rpg-item-use:disabled { cursor: default; filter: grayscale(0.7); opacity: 0.38; }

.rpg-pending-item {
  margin-top: 5px;
  padding: 5px;
  border: 1px solid rgba(255, 104, 116, 0.52);
  background: rgba(126, 31, 47, 0.2);
}

.rpg-pending-item strong,
.rpg-pending-item small { display: block; }
.rpg-pending-item strong { color: #ffadb5; font-size: 9px; }
.rpg-pending-item small { margin: 2px 0 4px; color: #c4cada; font-size: 8px; }
.rpg-pending-item > div { display: flex; flex-wrap: wrap; gap: 3px; }
.rpg-pending-item button { min-width: 0; font-size: 7px; }

.rpg-rival-inventory { display: block; margin-top: 4px; color: #7f8ca3; font-size: 8px; }

.rpg-build-card {
  margin-bottom: 6px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px 11px 2px 11px;
  background: rgba(255,255,255,0.035);
}

.rpg-build-card.local-build {
  border-color: rgba(255, 104, 116, 0.48);
  box-shadow: inset 0 0 22px rgba(255, 57, 78, 0.06);
}

.rpg-build-owner {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.05;
}

.rpg-build-owner span { color: #ffadb5; }

.rpg-build-owner strong em {
  margin-left: 6px;
  color: #87d8ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rpg-xp-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0 6px;
}

.rpg-xp-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 112, 124, 0.65);
  background: rgba(255,255,255,0.05);
}

.rpg-xp-pip.filled {
  background: #e94658;
  box-shadow: 0 0 9px rgba(255, 58, 78, 0.72);
}

.rpg-points {
  margin-left: auto;
  color: #ffe49b;
  font-size: 11px;
}

.rpg-attack-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -1px 0 5px;
  padding: 4px 6px;
  border: 1px solid rgba(135, 216, 255, 0.15);
  border-radius: 2px 8px 2px 8px;
  background: rgba(8, 21, 39, 0.72);
}

.rpg-attack-mode > span {
  color: #b9c8df;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.rpg-attack-mode > div { display: flex; gap: 3px; }

.rpg-attack-btn {
  min-width: 42px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(255, 132, 144, 0.22);
  border-radius: 2px 7px 2px 7px;
  background: rgba(255,255,255,0.045);
  color: #9dabc2;
  font-family: inherit;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.rpg-attack-btn.active {
  border-color: rgba(255, 132, 144, 0.72);
  background: linear-gradient(180deg, #ff8d98, #c64c5c);
  color: #210b10;
  box-shadow: 0 0 8px rgba(255, 75, 96, 0.22);
}

.rpg-attack-btn:disabled { cursor: default; }
.rpg-attack-btn:disabled:not(.active) { opacity: 0.35; }

.rpg-attack-readonly {
  min-width: 42px;
  color: #ff9ca6;
  font-size: 9px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.rpg-skill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  padding: 3px 0;
  border-top: 1px solid rgba(255,255,255,0.055);
}

.rpg-skill-copy strong,
.rpg-skill-copy small { display: block; }
.rpg-skill-copy strong { font-size: 12px; line-height: 1.05; }
.rpg-skill-copy small { color: #9dabc2; font-size: 9px; line-height: 1.1; }
.rpg-skill-rank { color: #87d8ff; font-size: 10px; }

.rpg-spend-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 2px 8px 2px 8px;
  color: #1a0c10;
  background: #ff8490;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}

.rpg-spend-btn:disabled { opacity: 0.25; cursor: default; }

canvas.rpg-cursor-hidden { cursor: none; }

@media (max-width: 900px) {
  .rpg-format-grid { grid-template-columns: 1fr; }
}

.game-overlay-canvas {
  position: absolute;
  grid-column: auto;
  left: 12px;
  top: calc(12px - 220px);
  width: calc(var(--hud-width) + var(--hud-gap) + 960px + 260px);
  height: 1296px;
  max-width: none;
  max-height: none;
  pointer-events: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  z-index: 6;
}

.stage.ui-edit-active .game-overlay-canvas {
  pointer-events: auto;
}

.ui-edit-panel {
  position: absolute;
  left: calc(12px + var(--hud-width) + var(--hud-gap) + 10px);
  top: 10px;
  z-index: 32;
  display: grid;
  gap: 6px;
  min-width: 240px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(150, 215, 255, 0.45);
  background: rgba(3, 14, 34, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.ui-edit-title {
  color: #bfe8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.ui-edit-status {
  color: #d9ecff;
  font-size: 12px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.3;
  white-space: pre-line;
}

.ui-edit-actions {
  display: flex;
  justify-content: flex-end;
}

.hint {
  position: absolute;
  left: calc(12px + var(--hud-width) + var(--hud-gap) + 480px);
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.hint:empty {
  display: none;
}

.connection-debug {
  position: absolute;
  right: 14px;
  top: 52px;
  max-width: 300px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(4, 10, 22, 0.82);
  border: 1px solid rgba(160, 205, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  font: 11px/1.35 Consolas, "Courier New", monospace;
  color: rgba(220, 236, 255, 0.92);
  white-space: pre-line;
  pointer-events: none;
  z-index: 31;
}

.connection-debug.hidden {
  display: none;
}

.banner {
  position: absolute;
  top: 16px;
  left: calc(12px + var(--hud-width) + var(--hud-gap) + 480px);
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: #ffd37a;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.banner.show { opacity: 1; }

.battle-royale-countdown {
  position: absolute;
  left: calc(12px + var(--hud-width) + var(--hud-gap) + 480px);
  top: calc(12px + 816px * 0.52);
  transform: translate(-50%, -50%);
  min-width: 128px;
  padding: 10px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(10, 14, 28, 0.76);
  color: #ffe08a;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.45),
    0 0 18px rgba(255, 203, 110, 0.55);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.35),
    inset 0 0 16px rgba(255,255,255,0.05);
  pointer-events: none;
  z-index: 120;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.battle-royale-countdown.show {
  opacity: 1;
}

.shot-popup {
  position: absolute;
  left: calc(12px + var(--hud-width) + var(--hud-gap) + 480px);
  top: calc(12px + 816px * 0.34);
  transform: translate(-50%, -50%) scale(0.92);
  display: grid;
  gap: 4px;
  text-align: center;
  pointer-events: none;
  z-index: 7;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.shot-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.shot-popup.fever-popup {
  top: calc(12px + 816px * 0.62);
}

.shot-line {
  display: grid;
  gap: 2px;
  font-size: 30px;
  font-weight: 900;
  color: #ffe08a;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.4),
    0 0 16px rgba(255, 200, 90, 0.55);
  letter-spacing: 0.5px;
}

.shot-formula-line {
  color: #ffe08a;
}

.shot-style-line {
  color: #5dff83;
  font-size: 27px;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.42),
    0 0 14px rgba(62, 200, 101, 0.55);
}

.shot-total {
  font-size: 51px;
  font-weight: 900;
  color: #ffcc5c;
  text-shadow:
    0 3px 0 rgba(0,0,0,0.45),
    0 0 20px rgba(255, 170, 60, 0.7);
}

.shot-total.primary-total {
  font-size: 102px;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.48),
    0 0 20px rgba(255, 180, 72, 0.65);
}

.shot-total.primary-total.counting {
  animation: shot-total-count-glow 0.45s ease-in-out infinite alternate;
}

.shot-drink-line {
  margin-top: 2px;
  font-size: clamp(63px, 8.4vw, 114px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 1px;
  color: #ff5a42;
  text-transform: uppercase;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.56),
    0 0 22px rgba(255, 88, 56, 0.62);
}

@keyframes shot-total-count-glow {
  0% {
    transform: scale(1);
    filter: brightness(1);
    text-shadow:
      0 3px 0 rgba(0, 0, 0, 0.48),
      0 0 18px rgba(255, 180, 72, 0.62);
  }
  100% {
    transform: scale(1.04);
    filter: brightness(1.15);
    text-shadow:
      0 3px 0 rgba(0, 0, 0, 0.48),
      0 0 26px rgba(255, 226, 148, 0.95),
      0 0 40px rgba(255, 178, 70, 0.68);
  }
}

.debug-panel {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 220px;
  background: rgba(6, 8, 18, 0.72);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px;
  color: var(--text);
  font-size: 11px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  pointer-events: auto;
}

.debug-title {
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #9ee0ff;
  text-transform: uppercase;
  font-size: 11px;
}

.debug-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.debug-row label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.debug-row input[type="range"] {
  width: 100%;
}

.debug-row span {
  font-variant-numeric: tabular-nums;
  color: #ffd37a;
  font-weight: 700;
  font-size: 11px;
}

.debug-btn {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
}

.debug-readout {
  margin-top: 4px;
  color: #c6c0de;
  font-size: 10px;
  line-height: 1.3;
}

.penalty-popup {
  top: 36%;
}

.penalty-line {
  color: #ff9aa7;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.4),
    0 0 16px rgba(255, 80, 80, 0.55);
}

.penalty-total {
  color: #ff5f6d;
  text-shadow:
    0 3px 0 rgba(0,0,0,0.45),
    0 0 20px rgba(255, 90, 90, 0.7);
}

.level-summary-overlay {
  position: absolute;
  inset: 12px 12px 12px calc(12px + var(--hud-width) + var(--hud-gap));
  background: linear-gradient(180deg, rgba(5, 9, 22, 0.62), rgba(6, 12, 28, 0.72));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 31;
  backdrop-filter: blur(2px);
}

.level-summary-card {
  width: min(820px, 92%);
  max-height: 86%;
  background: linear-gradient(165deg, rgba(15, 20, 46, 0.95), rgba(18, 14, 40, 0.95));
  border: 1px solid rgba(170, 196, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: 14px 16px 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.level-summary-head {
  display: grid;
  gap: 3px;
}

.level-summary-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffe08f;
  text-shadow: 0 0 12px rgba(255, 218, 120, 0.25);
}

.level-summary-sub {
  font-size: 13px;
  color: #bcd0ff;
  letter-spacing: 0.3px;
}

.level-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: auto;
  padding-right: 2px;
  min-height: 0;
  align-content: start;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-card {
  width: min(980px, 95%);
  max-height: 92%;
  padding: 12px 14px 14px;
  gap: 10px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-team {
  padding: 8px 10px;
  gap: 6px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-team-title {
  font-size: 15px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-team-score {
  font-size: 18px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-hero {
  font-size: 11px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-player {
  padding-top: 6px;
  gap: 2px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-player-name {
  font-size: 13px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-line {
  font-size: 11px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-hits {
  font-size: 10px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-total-wrap {
  margin-top: 4px;
  padding-top: 6px;
}

.level-summary-overlay.level-summary-overlay--compact .level-summary-total-wrap strong {
  font-size: 26px;
}

.level-summary-team {
  background: linear-gradient(175deg, rgba(9, 13, 34, 0.88), rgba(14, 24, 48, 0.84));
  border: 1px solid rgba(160, 190, 255, 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.level-summary-team-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.level-summary-team-title {
  color: #ffe08f;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.level-summary-team-score {
  color: #ffd15a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-shadow: 0 0 10px rgba(255, 210, 120, 0.28);
}

.level-summary-hero {
  color: #b8caef;
  font-size: 12px;
}

.level-summary-player {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
  display: grid;
  gap: 3px;
}

.level-summary-player:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.level-summary-player-name {
  color: #ebf1ff;
  font-size: 14px;
  font-weight: 700;
}

.level-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: #a8bde6;
  font-size: 12px;
}

.level-summary-line strong {
  color: #e8f1ff;
  font-weight: 700;
}

.level-summary-hits {
  color: #8eb2ee;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.level-summary-total-wrap {
  margin-top: 6px;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 8px;
  display: grid;
  gap: 2px;
  justify-items: start;
}

.level-summary-total-wrap span {
  color: #ffb8c0;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 700;
}

.level-summary-total-wrap strong {
  color: #ffe8ec;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.3px;
  text-shadow:
    0 2px 0 rgba(34, 8, 14, 0.6),
    0 0 12px rgba(255, 140, 162, 0.48);
}

.level-summary-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 2px;
}

.level-summary-actions .btn {
  min-width: 140px;
}

.hidden { display: none; }

.corner-badge {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(0,0,0,0.5);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #9ee0ff;
  border: 1px solid rgba(255,255,255,0.1);
}

.footer {
  display: none;
}

.duel-card {
  background: var(--menu-item-bg);
  border: 1px solid var(--menu-item-border);
  padding: 10px;
  border-radius: 12px;
}

.duel-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.duel-input {
  width: 100%;
  margin: 6px 0 10px;
  background: var(--menu-input-bg);
  border: 1px solid var(--menu-input-border);
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
}

.duel-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.duel-status {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.duel-opponent {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.level-select {
  position: fixed;
  inset: 0;
  background: var(--menu-overlay-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  box-sizing: border-box;
  z-index: 30;
}

.level-select.peek {
  opacity: 0.35;
}

#authModal {
  z-index: 80;
}

.level-select.hidden {
  display: none;
}

.level-select-layout {
  width: min(960px, 94vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.level-select.leaderboard-rush-layout .level-select-layout {
  width: min(1280px, 96vw);
  grid-template-columns: minmax(260px, 300px) minmax(0, 960px);
}

.level-select:not(.leaderboard-rush-layout) #leaderboardRushSidePanel,
.level-select:not(.leaderboard-rush-layout) #leaderboardRushHoverWrap,
.level-select:not(.leaderboard-rush-layout) #leaderboardRushFirstPlaceWrap,
.level-select:not(.leaderboard-rush-layout) #viewLeaderboardRushBtn {
  display: none !important;
}

.leaderboard-rush-side-panel {
  display: grid;
  gap: 12px;
}

.level-select-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.leaderboard-rush-hover-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.leaderboard-rush-hover-record {
  min-height: 46px;
  width: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(175deg, rgba(24, 40, 74, 0.92), rgba(15, 27, 56, 0.92));
  border: 1px solid rgba(182, 212, 255, 0.35);
  border-radius: 12px;
  color: #e9f2ff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-shadow: 0 0 14px rgba(124, 183, 255, 0.26);
  padding: 8px 12px;
}

.leaderboard-rush-first-place-wrap {
  background: linear-gradient(160deg, rgba(24, 34, 62, 0.96), rgba(13, 22, 44, 0.96));
  border: 1px solid rgba(182, 212, 255, 0.24);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(3, 3, 10, 0.35);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.leaderboard-rush-first-place-title {
  color: #ffe38b;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

.leaderboard-rush-first-place-table {
  display: grid;
  gap: 6px;
}

.leaderboard-rush-first-place-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-rush-first-place-rank {
  color: #9bb5ea;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.leaderboard-rush-first-place-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.leaderboard-rush-first-place-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.52);
  object-fit: cover;
  background: #273257;
  flex: 0 0 28px;
}

.leaderboard-rush-first-place-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #eef4ff;
  font-size: 13px;
  font-weight: 700;
}

.leaderboard-rush-first-place-count {
  color: #ffd15a;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 209, 90, 0.32);
  font-variant-numeric: tabular-nums;
}

.level-select-card {
  width: min(960px, 94vw);
  max-height: 90vh;
  background: linear-gradient(160deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  border-radius: 18px;
  border: 1px solid var(--menu-card-border);
  box-shadow: 0 30px 80px rgba(3, 3, 10, 0.7);
  display: flex;
  flex-direction: column;
}

.level-select-main > .level-select-card {
  width: 100%;
}

.level-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--menu-item-border);
}

.level-select-title {
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
}

.level-select-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.level-select-artwork-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.level-select-artwork-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.level-select-peek-btn {
  min-width: 46px;
  min-height: 38px;
  padding: 0 10px;
  font-size: 22px;
  line-height: 1;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 14px;
  overflow: auto;
  align-items: start;
}

.level-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.level-tile {
  background: var(--menu-item-bg);
  border: 1px solid var(--menu-item-border);
  border-radius: 12px;
  padding: 8px;
  display: block;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border 0.2s ease;
  color: var(--text);
}

.level-entry > .level-tile {
  padding: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  font-size: 0;
}

.leaderboard-rush-tile-avatar,
.leaderboard-rush-tile-hero {
  position: absolute;
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  background: #273257;
  pointer-events: none;
  z-index: 2;
}

.leaderboard-rush-tile-avatar {
  left: 6px;
  bottom: 6px;
  object-fit: cover;
}

.leaderboard-rush-tile-hero {
  right: 6px;
  bottom: 6px;
}

.level-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(10, 10, 30, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.level-entry.active .level-tile {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(255, 209, 90, 0.4);
}

.level-tile.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.level-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  background: var(--menu-item-bg);
  border-radius: 10px;
  border: 1px solid var(--menu-item-border);
  display: block;
}

.level-entry > .level-tile > .level-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  background: transparent;
  border-radius: inherit;
  border: 0;
}

.level-meta {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
}

.level-entry > .level-name {
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-height: 16px;
  margin: 0;
  display: block;
  cursor: pointer;
}

.level-tag {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--blue);
}

.level-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  padding: 12px 16px 16px;
  align-items: center;
}

.level-page-label {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.manage-levels-card {
  width: min(980px, 96vw);
}

.manage-levels-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.manage-levels-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px 16px;
  overflow: auto;
  max-height: min(72vh, 740px);
}

.manage-backgrounds-card {
  width: min(1040px, 96vw);
}

.manage-backgrounds-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}

.manage-backgrounds-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 16px;
  overflow: auto;
  max-height: min(72vh, 740px);
}

.manage-backgrounds-section {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
}

.manage-backgrounds-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.manage-backgrounds-list {
  display: grid;
  gap: 8px;
}

.manage-background-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--menu-item-border);
  background: var(--menu-item-bg);
}

.manage-background-thumb-wrap {
  width: 80px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5, 12, 28, 0.65);
  border: 1px solid rgba(140, 174, 233, 0.35);
}

.manage-background-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.manage-background-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.manage-background-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.manage-background-path {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.manage-background-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manage-background-empty {
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--menu-item-border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.manage-level-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 10px;
  align-items: stretch;
  background: var(--menu-item-bg);
  border: 1px solid var(--menu-item-border);
  border-radius: 10px;
  padding: 9px 10px;
}

.manage-level-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.manage-level-preview {
  width: 180px;
  height: 120px;
  border-radius: 8px;
}

.manage-level-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.manage-level-meta {
  display: grid;
  gap: 2px;
}

.manage-level-name {
  font-weight: 700;
  color: var(--text);
}

.manage-level-sub {
  font-size: 11px;
  color: var(--muted);
}

.manage-level-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.manage-level-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}

.manage-level-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #6fe4ff;
}

.manage-level-select {
  min-width: 180px;
  max-width: 280px;
  background: var(--menu-input-bg);
  border: 1px solid var(--menu-input-border);
  color: var(--text);
  padding: 7px 8px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
}

.manage-level-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.manage-level-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 16px 8px;
}

.replay-modal {
  position: fixed;
  inset: 0;
  background: var(--menu-overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 32;
}

.replay-modal.hidden {
  display: none;
}

.replay-modal-card {
  width: min(520px, 92vw);
  background: linear-gradient(160deg, var(--menu-card-grad-1), var(--menu-card-grad-2));
  border-radius: 18px;
  border: 1px solid var(--menu-card-border);
  box-shadow: 0 30px 80px rgba(3, 3, 10, 0.7);
  display: flex;
  flex-direction: column;
}

.replay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.replay-modal-title {
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
}

.replay-modal-body {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.replay-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.replay-input {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
  font-family: inherit;
}

.replay-input.replay-notes {
  min-height: 80px;
  resize: vertical;
}

.replay-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 16px;
}

@media (max-width: 1220px) {
  .import-grid {
    grid-template-columns: minmax(520px, 52%) minmax(0, 1fr);
  }
  .import-controls {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
  .import-row {
    grid-template-columns: minmax(92px, 40%) minmax(0, 1fr) auto;
  }
  .import-edit-actions-wide {
    grid-template-columns: 1fr 1fr;
  }
  .import-edit-actions-super {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .level-select-layout {
    width: min(960px, 94vw);
    grid-template-columns: 1fr;
  }
  .level-select.leaderboard-rush-layout .level-select-layout {
    width: min(960px, 94vw);
    grid-template-columns: 1fr;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .lobby-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .main { grid-template-columns: 1fr; }
  .panel { min-height: unset; }
  .top { grid-template-columns: 1fr; }
  .buttons { grid-template-columns: 1fr; }
  .duel-actions { grid-template-columns: 1fr; }
  .scoreboard { grid-template-columns: 1fr; }
  .level-grid { grid-template-columns: repeat(2, 1fr); }
  .leaderboard-rush-hover-record {
    font-size: 16px;
    min-height: 40px;
  }
  .leaderboard-rush-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .level-summary-grid { grid-template-columns: 1fr; }
  .manage-level-row {
    grid-template-columns: 1fr;
  }
  .manage-level-preview-wrap {
    justify-content: flex-start;
  }
  .manage-level-actions {
    flex-direction: row;
    justify-content: flex-start;
  }
  .manage-level-select {
    min-width: 150px;
    width: 100%;
    max-width: 100%;
  }
  .manage-levels-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .manage-backgrounds-columns {
    grid-template-columns: 1fr;
  }
  .manage-background-row {
    grid-template-columns: 1fr;
  }
  .manage-background-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .import-grid {
    grid-template-columns: 1fr;
  }
  .import-controls {
    grid-template-columns: 1fr;
  }
  .import-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .import-edit-actions-wide {
    grid-template-columns: 1fr 1fr;
  }
  .import-edit-actions-super {
    grid-template-columns: 1fr 1fr;
  }
  .import-panel-span2 {
    grid-column: auto;
  }
  .options-choice-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .options-ui-choice-grid {
    grid-template-columns: 1fr;
  }
  .options-ui-style-btn {
    grid-template-columns: minmax(118px, .65fr) minmax(120px, 1fr);
  }
  .options-choice-grid.options-choice-grid-circle {
    grid-template-columns: repeat(3, minmax(82px, 1fr));
  }
  .options-theme-grid {
    grid-template-columns: repeat(3, minmax(56px, 1fr));
  }
  .options-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .options-admin-unlock-row {
    grid-template-columns: 1fr;
  }
  .options-admin-debug-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .options-choice-btn {
    min-height: 72px;
  }
  .options-style-preview-circle {
    width: 40px;
    height: 40px;
  }
  .options-style-btn-circle .options-style-preview-circle {
    width: 34px;
    height: 34px;
  }
  .options-style-btn-circle {
    min-height: 62px;
    padding: 5px 6px;
  }
  .options-style-name {
    font-size: 9px;
  }
  .options-style-preview-rail {
    width: 52px;
    height: 30px;
  }
  .replay-browser-controls {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  #importPreview {
    max-height: 46vh;
  }
}

/* Modern pre-match interface: a quiet arena operations deck around the existing lobby behavior. */
html[data-game-ui="modern"] #duelLobbyScreen {
  overflow: auto;
  padding: 34px;
  background:
    linear-gradient(rgba(64, 182, 226, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 182, 226, 0.026) 1px, transparent 1px),
    radial-gradient(760px 480px at 17% 18%, rgba(19, 132, 176, 0.28), transparent 70%),
    radial-gradient(700px 520px at 88% 72%, rgba(92, 53, 166, 0.2), transparent 72%),
    radial-gradient(520px 260px at 50% 104%, rgba(224, 170, 64, 0.08), transparent 70%),
    linear-gradient(145deg, #06101f 0%, #071528 45%, #050a16 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto, auto;
  color: #eaf7ff;
  font-family: "Bahnschrift Condensed", "Agency FB", "Trebuchet MS", sans-serif;
  isolation: isolate;
}

html[data-game-ui="modern"] #duelLobbyScreen .hidden {
  display: none !important;
}

html[data-game-ui="modern"] #duelLobbyScreen::before,
html[data-game-ui="modern"] #duelLobbyScreen::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

html[data-game-ui="modern"] #duelLobbyScreen::before {
  top: -280px;
  right: -190px;
  width: 720px;
  height: 720px;
  border: 1px solid rgba(84, 203, 244, 0.08);
  box-shadow:
    0 0 0 72px rgba(84, 203, 244, 0.022),
    0 0 0 144px rgba(84, 203, 244, 0.014),
    inset 0 0 100px rgba(42, 166, 213, 0.035);
}

html[data-game-ui="modern"] #duelLobbyScreen::after {
  bottom: -310px;
  left: -250px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(194, 143, 255, 0.08);
  box-shadow: 0 0 0 96px rgba(147, 89, 219, 0.018);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-card {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  min-height: min(690px, 91vh);
  padding: 0;
  border: 1px solid rgba(94, 199, 239, 0.28);
  border-radius: 4px 26px 4px 26px;
  background:
    linear-gradient(108deg, rgba(49, 169, 216, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(10, 27, 49, 0.97), rgba(4, 12, 27, 0.985));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.055),
    inset 4px 0 rgba(69, 201, 240, 0.42);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: modern-lobby-enter 360ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 26px;
  left: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #46d8ff, rgba(70, 216, 255, 0.12) 36%, transparent 78%);
  box-shadow: 0 0 14px rgba(70, 216, 255, 0.36);
  pointer-events: none;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-header {
  min-height: 102px;
  padding: 22px 26px 18px 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(93, 179, 218, 0.16);
  background:
    linear-gradient(90deg, rgba(31, 126, 168, 0.12), transparent 42%),
    rgba(2, 10, 23, 0.3);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-heading {
  min-width: 0;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #65cbe8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-kicker > span {
  width: 17px;
  height: 7px;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
  background: #4cdcff;
  box-shadow: 0 0 9px rgba(76, 220, 255, 0.75);
}

html[data-game-ui="modern"] #duelLobbyScreen .screen-title {
  margin: 0;
  color: #f4f9fc;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.62);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-subtitle {
  display: block;
  margin-top: 7px;
  color: #7f9daf;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 11px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-network {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(77, 222, 160, 0.22);
  border-radius: 2px 9px 2px 9px;
  color: #8fe8bd;
  background: rgba(27, 115, 75, 0.09);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-network i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ce5a0;
  box-shadow: 0 0 10px rgba(92, 229, 160, 0.75);
  animation: modern-lobby-status-pulse 2s ease-in-out infinite;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-grid {
  min-height: 586px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  gap: 18px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-form,
html[data-game-ui="modern"] #duelLobbyScreen .lobby-list-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 17px;
  border: 1px solid rgba(104, 183, 220, 0.17);
  border-radius: 3px 17px 3px 17px;
  background:
    linear-gradient(140deg, rgba(65, 170, 212, 0.075), transparent 30%),
    rgba(3, 13, 29, 0.67);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 12px 25px rgba(0, 0, 0, 0.18);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-form {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 207, 243, 0.42) transparent;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-form::before,
html[data-game-ui="modern"] #duelLobbyScreen .lobby-list-wrap::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 17px;
  width: 68px;
  height: 1px;
  background: #4dd8ff;
  box-shadow: 0 0 10px rgba(77, 216, 255, 0.6);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(105, 181, 211, 0.12);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-section-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 214, 255, 0.34);
  border-radius: 2px 10px 2px 10px;
  color: #70d9f4;
  background: rgba(67, 200, 240, 0.08);
  font-size: 12px;
  font-weight: 900;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-section-head > span:last-child {
  display: grid;
  gap: 2px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-section-head strong,
html[data-game-ui="modern"] #duelLobbyScreen .panel-title {
  color: #edf8fd;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-section-head small,
html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-list-subtitle {
  color: #6f8da0;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-list-subtitle {
  display: block;
  margin-top: 3px;
}

html[data-game-ui="modern"] #duelLobbyScreen .duel-label {
  display: block;
  margin: 0 0 6px;
  color: #7598ac;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.7px;
}

html[data-game-ui="modern"] #duelLobbyScreen .duel-input {
  min-height: 40px;
  margin: 0 0 15px;
  padding: 9px 11px;
  border: 1px solid rgba(100, 180, 218, 0.25);
  border-radius: 2px 9px 2px 9px;
  outline: none;
  color: #edf9ff;
  background:
    linear-gradient(90deg, rgba(70, 190, 232, 0.07), transparent 55%),
    rgba(0, 7, 18, 0.72);
  font: 700 12px "Trebuchet MS", sans-serif;
  box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.32);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

html[data-game-ui="modern"] #duelLobbyScreen .duel-input:focus {
  border-color: rgba(78, 216, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(78, 216, 255, 0.09), inset 0 1px 7px rgba(0, 0, 0, 0.32);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-create-row {
  gap: 9px;
  align-items: start;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-create-row .duel-input {
  margin-bottom: 0;
}

html[data-game-ui="modern"] #duelLobbyScreen .btn {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(101, 181, 218, 0.28);
  border-radius: 2px 9px 2px 9px;
  color: #cfe4ef;
  background:
    linear-gradient(180deg, rgba(60, 135, 171, 0.16), rgba(10, 33, 51, 0.18)),
    rgba(5, 17, 32, 0.92);
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

html[data-game-ui="modern"] #duelLobbyScreen .btn:hover:not(:disabled) {
  border-color: rgba(81, 216, 255, 0.65);
  color: #f2fbff;
  background: rgba(24, 87, 116, 0.45);
  box-shadow: 0 0 14px rgba(67, 201, 241, 0.13), inset 0 1px rgba(255, 255, 255, 0.08);
}

html[data-game-ui="modern"] #duelLobbyScreen .btn.primary {
  border-color: rgba(255, 218, 112, 0.72);
  color: #281a05;
  background: linear-gradient(180deg, #ffe486, #d49a31);
  box-shadow: 0 0 16px rgba(240, 177, 56, 0.18), inset 0 1px rgba(255, 255, 255, 0.58);
}

html[data-game-ui="modern"] #duelLobbyScreen .btn.primary:hover:not(:disabled) {
  color: #1e1404;
  background: linear-gradient(180deg, #ffedaa, #e1a53b);
  box-shadow: 0 0 19px rgba(245, 189, 70, 0.32);
}

html[data-game-ui="modern"] #duelLobbyScreen .btn:disabled {
  opacity: 0.34;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-meta {
  grid-template-columns: 1fr auto;
  gap: 7px;
  margin: 15px 0;
  padding: 10px 11px;
  border-left: 2px solid #4ed6fb;
  color: #90aabd;
  background: rgba(56, 154, 195, 0.065);
  font-size: 10px;
  font-weight: 700;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-team-picker {
  padding: 11px;
  border: 1px solid rgba(91, 182, 220, 0.15);
  border-radius: 2px 10px 2px 10px;
  background: rgba(25, 77, 105, 0.08);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-team-name-grid .duel-input {
  margin-bottom: 0;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-roster {
  gap: 8px;
  margin: 12px 0;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-roster-team {
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(101, 185, 220, 0.17);
  border-radius: 2px 11px 2px 11px;
  background: rgba(3, 11, 25, 0.56);
  box-shadow: inset 2px 0 rgba(75, 210, 247, 0.2);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-roster-title {
  color: #6fbcd4;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-roster-player {
  min-height: 30px;
  color: #dcecf3;
  font-size: 11px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-player-avatar {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(102, 218, 250, 0.52);
  box-shadow: 0 0 8px rgba(65, 195, 233, 0.15);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-ready-pill,
html[data-game-ui="modern"] #duelLobbyScreen .lobby-phase {
  border-radius: 2px 7px 2px 7px;
  font-size: 8px;
  letter-spacing: 1.1px;
}

html[data-game-ui="modern"] #duelLobbyScreen .screen-actions {
  gap: 8px;
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid rgba(102, 178, 209, 0.12);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-gear {
  margin-left: auto;
  font-size: 17px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-list-wrap {
  min-height: 0;
  overflow: hidden;
  display: flex;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-list-head {
  min-height: 48px;
  margin: 0 0 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(106, 179, 210, 0.12);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-list {
  flex: 1;
  align-content: start;
  gap: 10px;
  padding: 0 5px 0 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 207, 243, 0.42) transparent;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-list > .replay-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 32px;
  border: 1px dashed rgba(94, 186, 222, 0.16);
  border-radius: 3px 14px 3px 14px;
  color: #6f90a3;
  background:
    radial-gradient(circle at 50% 48%, rgba(57, 181, 222, 0.07), transparent 35%),
    rgba(0, 7, 18, 0.3);
  font-size: 11px;
  text-align: center;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-list > .replay-empty::before {
  content: "";
  width: 46px;
  height: 46px;
  border: 1px solid rgba(88, 214, 249, 0.4);
  border-radius: 50%;
  background:
    radial-gradient(circle, #6adfff 0 3px, transparent 4px),
    linear-gradient(90deg, transparent 48%, rgba(106, 223, 255, 0.28) 49% 51%, transparent 52%),
    linear-gradient(transparent 48%, rgba(106, 223, 255, 0.28) 49% 51%, transparent 52%);
  box-shadow: 0 0 22px rgba(72, 203, 240, 0.12), inset 0 0 18px rgba(72, 203, 240, 0.07);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 13px;
  padding: 13px;
  border: 1px solid rgba(105, 188, 223, 0.18);
  border-radius: 3px 14px 3px 14px;
  background:
    linear-gradient(110deg, rgba(61, 184, 224, 0.08), transparent 38%),
    rgba(2, 11, 24, 0.66);
  box-shadow: inset 2px 0 rgba(74, 210, 248, 0.25);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-item:hover {
  border-color: rgba(85, 212, 247, 0.38);
  background: linear-gradient(110deg, rgba(61, 184, 224, 0.13), transparent 45%), rgba(3, 15, 31, 0.82);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-item-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 5px 7px;
  color: #7894a5;
  font-size: 9px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-item-meta > div:not(.lobby-item-name) {
  padding: 3px 6px;
  border: 1px solid rgba(113, 179, 205, 0.1);
  border-radius: 2px 6px 2px 6px;
  background: rgba(58, 124, 151, 0.055);
  white-space: nowrap;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-item-name {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #edf9ff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-phase {
  align-self: start;
  margin-top: 2px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-backdrop {
  z-index: 80;
  background:
    radial-gradient(700px 420px at 50% 44%, rgba(20, 91, 126, 0.16), transparent 70%),
    rgba(1, 5, 13, 0.82);
  backdrop-filter: blur(10px) saturate(0.72);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-panel {
  z-index: 81;
  width: min(820px, 94vw);
  max-height: min(850px, calc(100vh - 38px));
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  overflow-y: auto;
  border: 1px solid rgba(91, 205, 243, 0.35);
  border-radius: 4px 24px 4px 24px;
  background:
    linear-gradient(130deg, rgba(49, 173, 214, 0.1), transparent 35%),
    linear-gradient(155deg, rgba(9, 28, 48, 0.99), rgba(3, 10, 23, 0.995));
  box-shadow:
    0 36px 100px rgba(0, 0, 0, 0.72),
    inset 4px 0 rgba(75, 211, 248, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.07);
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 207, 243, 0.42) transparent;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-header {
  grid-column: 1 / -1;
  min-height: 95px;
  margin: 0 -20px 2px;
  padding: 20px 24px 17px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(93, 179, 218, 0.16);
  background: rgba(1, 8, 19, 0.32);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-header .panel-title {
  color: #f2f9fc;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.4px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-header .lobby-modern-kicker {
  display: flex;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-subtitle {
  display: block;
  margin-top: 7px;
  color: #7894a6;
  font: 10px "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-code {
  display: block;
  padding: 7px 9px;
  border: 1px solid rgba(91, 225, 167, 0.2);
  border-radius: 2px 8px 2px 8px;
  color: #82ddb2;
  background: rgba(39, 131, 87, 0.08);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-group {
  align-content: start;
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(101, 183, 217, 0.15);
  border-radius: 3px 13px 3px 13px;
  background:
    linear-gradient(140deg, rgba(54, 169, 207, 0.06), transparent 42%),
    rgba(1, 10, 23, 0.52);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-group-title {
  display: block;
  margin: -2px 0 2px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(99, 176, 208, 0.12);
  color: #7ec8df;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-target {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
  align-items: center;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-target .lobby-settings-group-title {
  grid-column: 1 / -1;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-target .duel-label {
  margin: 0;
  color: #c5dae5;
  font-size: 10px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-target .duel-input {
  margin: 0;
  color: #ffe288;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-flow {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-flow .lobby-settings-group-title {
  grid-column: 1 / -1;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check {
  min-height: 38px;
  padding: 7px 9px;
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(103, 175, 205, 0.1);
  border-radius: 2px 8px 2px 8px;
  color: #bcd0da;
  background: rgba(47, 118, 146, 0.045);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check:hover {
  border-color: rgba(85, 208, 243, 0.27);
  color: #e9f7fc;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check input {
  position: relative;
  order: 2;
  width: 34px;
  height: 18px;
  margin: 0;
  flex: 0 0 34px;
  appearance: none;
  border: 1px solid rgba(111, 166, 190, 0.36);
  border-radius: 10px;
  background: rgba(0, 6, 15, 0.74);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #78909c;
  transition: transform 150ms ease, background 150ms ease;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check input:checked {
  border-color: rgba(71, 216, 255, 0.72);
  background: rgba(35, 155, 195, 0.34);
  box-shadow: 0 0 10px rgba(61, 206, 247, 0.16);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check input:checked::before {
  transform: translateX(16px);
  background: #8ce8ff;
  box-shadow: 0 0 7px rgba(103, 223, 255, 0.75);
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-check input:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-inline {
  min-height: 38px;
  padding: 6px 9px;
  grid-template-columns: 1fr minmax(105px, 140px);
  border: 1px solid rgba(103, 175, 205, 0.1);
  border-radius: 2px 8px 2px 8px;
  color: #bcd0da;
  background: rgba(47, 118, 146, 0.045);
  font-size: 10px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-inline .duel-input {
  min-height: 28px;
  margin: 0;
  padding: 4px 7px;
  font-size: 11px;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-help {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-left: 2px solid rgba(233, 183, 76, 0.7);
  color: #7e98a8;
  background: rgba(170, 111, 30, 0.055);
  font: 9px/1.5 "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-panel > .screen-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin: 0;
}

@keyframes modern-lobby-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.992); filter: saturate(0.72); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
}

@keyframes modern-lobby-status-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 980px) {
  html[data-game-ui="modern"] #duelLobbyScreen {
    align-items: flex-start;
    padding: 18px;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-card {
    min-height: 0;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-grid {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-form,
  html[data-game-ui="modern"] #duelLobbyScreen .lobby-list-wrap {
    min-height: 390px;
  }
}

@media (max-width: 640px) {
  html[data-game-ui="modern"] #duelLobbyScreen {
    padding: 8px;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-header {
    align-items: flex-start;
    padding: 18px;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-network {
    display: none;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-grid {
    padding: 10px;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-panel,
  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-flow {
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-group,
  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-flow {
    grid-column: 1;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-target {
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-target .lobby-settings-group-title,
  html[data-game-ui="modern"] #duelLobbyScreen .lobby-settings-flow .lobby-settings-group-title {
    grid-column: 1;
  }

  html[data-game-ui="modern"] #duelLobbyScreen .lobby-item-meta {
    grid-template-columns: repeat(2, minmax(0, max-content));
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-game-ui="modern"] #duelLobbyScreen .lobby-card,
  html[data-game-ui="modern"] #duelLobbyScreen .lobby-modern-network i {
    animation: none;
  }
}

/* Modern system menus: shared arena-console presentation for Options and Other Modes. */
html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) {
  overflow: auto;
  padding: 30px;
  background:
    linear-gradient(rgba(64, 182, 226, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 182, 226, 0.026) 1px, transparent 1px),
    radial-gradient(760px 480px at 15% 16%, rgba(19, 132, 176, 0.27), transparent 70%),
    radial-gradient(720px 520px at 88% 76%, rgba(92, 53, 166, 0.2), transparent 72%),
    radial-gradient(520px 260px at 50% 104%, rgba(224, 170, 64, 0.07), transparent 70%),
    linear-gradient(145deg, #06101f 0%, #071528 45%, #050a16 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto, auto;
  color: #eaf7ff;
  font-family: "Bahnschrift Condensed", "Agency FB", "Trebuchet MS", sans-serif;
  isolation: isolate;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .hidden {
  display: none !important;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen)::before,
html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen)::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen)::before {
  top: -290px;
  right: -210px;
  width: 740px;
  height: 740px;
  border: 1px solid rgba(84, 203, 244, 0.075);
  box-shadow:
    0 0 0 74px rgba(84, 203, 244, 0.02),
    0 0 0 148px rgba(84, 203, 244, 0.012),
    inset 0 0 105px rgba(42, 166, 213, 0.032);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen)::after {
  bottom: -350px;
  left: -270px;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(194, 143, 255, 0.07);
  box-shadow:
    0 0 0 88px rgba(147, 89, 219, 0.016),
    0 0 0 176px rgba(147, 89, 219, 0.009);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .screen-card {
  position: relative;
  z-index: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(94, 199, 239, 0.29);
  border-radius: 4px 26px 4px 26px;
  background:
    linear-gradient(108deg, rgba(49, 169, 216, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(10, 27, 49, 0.97), rgba(4, 12, 27, 0.985));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.055),
    inset 4px 0 rgba(69, 201, 240, 0.42);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: modern-menu-enter 340ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .screen-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 26px;
  left: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #46d8ff, rgba(70, 216, 255, 0.12) 36%, transparent 78%);
  box-shadow: 0 0 14px rgba(70, 216, 255, 0.36);
  pointer-events: none;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) :is(.options-modern-header, .mode-modern-header) {
  min-height: 104px;
  padding: 22px 27px 18px 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(93, 179, 218, 0.16);
  background:
    linear-gradient(90deg, rgba(31, 126, 168, 0.12), transparent 42%),
    rgba(2, 10, 23, 0.3);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .menu-modern-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #65cbe8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .menu-modern-kicker > span {
  width: 17px;
  height: 7px;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
  background: #4cdcff;
  box-shadow: 0 0 9px rgba(76, 220, 255, 0.75);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .screen-title {
  margin: 0;
  color: #f4f9fc;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.62);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) :is(.options-modern-subtitle, .mode-modern-subtitle) {
  display: block;
  margin-top: 7px;
  color: #7f9daf;
  font: 11px "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .menu-modern-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(77, 222, 160, 0.22);
  border-radius: 2px 9px 2px 9px;
  color: #8fe8bd;
  background: rgba(27, 115, 75, 0.09);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .menu-modern-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ce5a0;
  box-shadow: 0 0 10px rgba(92, 229, 160, 0.75);
  animation: modern-lobby-status-pulse 2s ease-in-out infinite;
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .btn {
  border: 1px solid rgba(101, 181, 218, 0.28);
  border-radius: 2px 9px 2px 9px;
  color: #cfe4ef;
  background:
    linear-gradient(180deg, rgba(60, 135, 171, 0.16), rgba(10, 33, 51, 0.18)),
    rgba(5, 17, 32, 0.92);
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-weight: 900;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .btn:hover:not(:disabled) {
  border-color: rgba(81, 216, 255, 0.65);
  color: #f2fbff;
  background: rgba(24, 87, 116, 0.45);
  box-shadow: 0 0 14px rgba(67, 201, 241, 0.13), inset 0 1px rgba(255, 255, 255, 0.08);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .btn.primary {
  border-color: rgba(255, 218, 112, 0.72);
  color: #281a05;
  background: linear-gradient(180deg, #ffe486, #d49a31);
  box-shadow: 0 0 16px rgba(240, 177, 56, 0.18), inset 0 1px rgba(255, 255, 255, 0.58);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) > .screen-card > .screen-actions {
  margin: 0 20px 18px;
  padding-top: 14px;
  justify-content: flex-end;
  border-top: 1px solid rgba(102, 178, 209, 0.12);
}

html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) > .screen-card > .screen-actions .btn {
  min-width: 92px;
  min-height: 38px;
}

/* Options console */
html[data-game-ui="modern"] #optionsScreen .options-card {
  width: min(1180px, 96vw);
  max-height: 94vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 207, 243, 0.42) transparent;
}

html[data-game-ui="modern"] #optionsScreen .options-tabs {
  margin: 0;
  padding: 13px 20px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: rgba(1, 8, 19, 0.2);
}

html[data-game-ui="modern"] #optionsScreen .options-tab-btn {
  position: relative;
  min-width: 0;
  min-height: 54px;
  outline: none;
  padding: 10px 14px 10px 48px;
  overflow: hidden;
  border-radius: 2px 11px 0 0;
  color: #7898aa;
  text-align: left;
}

html[data-game-ui="modern"] #optionsScreen .options-tab-btn:focus-visible {
  outline: 1px solid rgba(91, 220, 255, 0.85);
  outline-offset: 2px;
}

html[data-game-ui="modern"] #optionsScreen .options-tab-btn::before {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #4a7287;
  font-size: 10px;
  letter-spacing: 1px;
}

html[data-game-ui="modern"] #optionsScreen #optionsVisualTabBtn::before { content: "01"; }
html[data-game-ui="modern"] #optionsScreen #optionsAudioTabBtn::before { content: "02"; }
html[data-game-ui="modern"] #optionsScreen #optionsAdminTabBtn::before { content: "03"; }

html[data-game-ui="modern"] #optionsScreen .options-tab-btn::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #52dcff, transparent 78%);
  box-shadow: 0 0 10px rgba(82, 220, 255, 0.45);
  transition: transform 160ms ease;
}

html[data-game-ui="modern"] #optionsScreen .options-tab-btn.active {
  border-color: rgba(83, 211, 247, 0.38);
  color: #f0f9fc;
  background:
    linear-gradient(100deg, rgba(50, 180, 222, 0.16), transparent 62%),
    rgba(5, 20, 36, 0.9);
  box-shadow: inset 3px 0 rgba(79, 216, 251, 0.68);
}

html[data-game-ui="modern"] #optionsScreen .options-tab-btn.active::before {
  color: #63d9f6;
}

html[data-game-ui="modern"] #optionsScreen .options-tab-btn.active::after {
  transform: scaleX(1);
}

html[data-game-ui="modern"] #optionsScreen .options-panel {
  margin: 0;
  padding: 18px 20px 15px;
  display: grid;
  gap: 13px;
}

html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(1) { grid-column: 1 / -1; }
html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(2) { grid-column: 1 / -1; }
html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(3) { grid-column: span 5; }
html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(4) { grid-column: span 7; }
html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(5) { grid-column: span 8; }
html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(6) { grid-column: span 4; }

html[data-game-ui="modern"] #optionsScreen .options-section,
html[data-game-ui="modern"] #optionsScreen .options-admin-subpanel,
html[data-game-ui="modern"] #optionsScreen .options-admin-hero-options-window {
  position: relative;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(104, 183, 220, 0.17);
  border-radius: 3px 15px 3px 15px;
  background:
    linear-gradient(140deg, rgba(65, 170, 212, 0.07), transparent 31%),
    rgba(3, 13, 29, 0.67);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 10px 22px rgba(0, 0, 0, 0.14);
}

html[data-game-ui="modern"] #optionsScreen :is(.options-section, .options-admin-subpanel)::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 15px;
  width: 56px;
  height: 1px;
  background: #4dd8ff;
  box-shadow: 0 0 9px rgba(77, 216, 255, 0.52);
}

html[data-game-ui="modern"] #optionsScreen .options-section-title {
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(99, 176, 208, 0.12);
  color: #7ec8df;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.7px;
}

html[data-game-ui="modern"] #optionsScreen .options-ui-choice-grid {
  gap: 10px;
}

html[data-game-ui="modern"] #optionsScreen .options-choice-btn {
  position: relative;
  overflow: hidden;
  border-color: rgba(105, 188, 223, 0.18);
  border-radius: 2px 11px 2px 11px;
  color: #91a9b7;
  background:
    linear-gradient(115deg, rgba(61, 184, 224, 0.06), transparent 42%),
    rgba(2, 11, 24, 0.66);
  box-shadow: inset 2px 0 rgba(74, 210, 248, 0.14);
}

html[data-game-ui="modern"] #optionsScreen .options-choice-btn::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #54dcff, transparent);
  transition: transform 150ms ease;
}

html[data-game-ui="modern"] #optionsScreen .options-choice-btn:hover {
  border-color: rgba(85, 212, 247, 0.38);
  background: linear-gradient(115deg, rgba(61, 184, 224, 0.11), transparent 50%), rgba(3, 15, 31, 0.82);
}

html[data-game-ui="modern"] #optionsScreen .options-choice-btn.active {
  border-color: rgba(87, 218, 252, 0.64);
  background:
    linear-gradient(115deg, rgba(55, 192, 232, 0.17), transparent 54%),
    rgba(4, 24, 41, 0.9);
  box-shadow:
    inset 3px 0 #55ddff,
    0 0 0 1px rgba(72, 197, 234, 0.1),
    0 0 18px rgba(52, 190, 229, 0.12);
}

html[data-game-ui="modern"] #optionsScreen .options-choice-btn.active::after {
  transform: scaleX(1);
}

html[data-game-ui="modern"] #optionsScreen .options-ui-style-btn {
  min-height: 102px;
  grid-template-columns: minmax(150px, 0.72fr) minmax(140px, 1fr);
}

html[data-game-ui="modern"] #optionsScreen .options-ui-preview {
  border-color: rgba(95, 204, 239, 0.24);
  border-radius: 2px 10px 2px 10px;
  background: #030b19;
}

html[data-game-ui="modern"] #optionsScreen .options-ui-style-btn .options-style-name {
  color: #f1f8fb;
  font-size: 18px;
  letter-spacing: 0.4px;
  text-transform: none;
}

html[data-game-ui="modern"] #optionsScreen .options-ui-style-note {
  color: #7894a5;
  font: 10px "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] #optionsScreen .options-choice-grid-circle {
  grid-template-columns: repeat(4, minmax(82px, 1fr));
}

html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(4) .options-choice-grid {
  grid-template-columns: repeat(3, minmax(100px, 1fr));
}

html[data-game-ui="modern"] #optionsScreen .options-style-btn {
  min-height: 78px;
  gap: 6px;
}

html[data-game-ui="modern"] #optionsScreen .options-style-btn-circle {
  min-height: 72px;
}

html[data-game-ui="modern"] #optionsScreen .options-style-name {
  color: #a8beca;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.65px;
}

html[data-game-ui="modern"] #optionsScreen .options-theme-grid {
  gap: 7px;
}

html[data-game-ui="modern"] #optionsScreen .options-theme-btn {
  min-height: 63px;
}

html[data-game-ui="modern"] #optionsScreen .options-theme-swatch {
  width: 54px;
  height: 28px;
  border-radius: 2px 9px 2px 9px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.38), 0 4px 12px rgba(0, 0, 0, 0.18);
}

html[data-game-ui="modern"] #optionsScreen .options-toggle {
  min-height: 42px;
  padding: 8px 10px;
  justify-content: space-between;
  border: 1px solid rgba(103, 175, 205, 0.1);
  border-radius: 2px 8px 2px 8px;
  color: #bcd0da;
  background: rgba(47, 118, 146, 0.045);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

html[data-game-ui="modern"] #optionsScreen .options-toggle input[type="checkbox"] {
  position: relative;
  order: 2;
  width: 34px;
  height: 18px;
  margin: 0;
  flex: 0 0 34px;
  appearance: none;
  border: 1px solid rgba(111, 166, 190, 0.36);
  border-radius: 10px;
  background: rgba(0, 6, 15, 0.74);
  cursor: pointer;
}

html[data-game-ui="modern"] #optionsScreen .options-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #78909c;
  transition: transform 150ms ease, background 150ms ease;
}

html[data-game-ui="modern"] #optionsScreen .options-toggle input[type="checkbox"]:checked {
  border-color: rgba(71, 216, 255, 0.72);
  background: rgba(35, 155, 195, 0.34);
  box-shadow: 0 0 10px rgba(61, 206, 247, 0.16);
}

html[data-game-ui="modern"] #optionsScreen .options-toggle input[type="checkbox"]:checked::before {
  transform: translateX(16px);
  background: #8ce8ff;
  box-shadow: 0 0 7px rgba(103, 223, 255, 0.75);
}

html[data-game-ui="modern"] #optionsScreen .options-note,
html[data-game-ui="modern"] #optionsScreen .options-admin-note {
  color: #7894a5;
  font: 10px/1.5 "Trebuchet MS", sans-serif;
}

html[data-game-ui="modern"] #optionsScreen .options-row {
  min-height: 52px;
  padding: 10px 12px;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) 58px;
  border: 1px solid rgba(103, 175, 205, 0.1);
  border-radius: 2px 9px 2px 9px;
  color: #b8ced9;
  background: rgba(47, 118, 146, 0.045);
  font-size: 11px;
  font-weight: 800;
}

html[data-game-ui="modern"] #optionsScreen input[type="range"] {
  height: 4px;
  accent-color: #5bdcff;
  cursor: pointer;
}

html[data-game-ui="modern"] #optionsScreen .options-row > span,
html[data-game-ui="modern"] #optionsScreen .options-admin-debug-value {
  color: #ffe18a;
  font-variant-numeric: tabular-nums;
}

html[data-game-ui="modern"] #optionsScreen .options-audio-actions {
  justify-content: flex-end;
  padding-top: 5px;
}

html[data-game-ui="modern"] #optionsScreen #optionsAudioPanel .options-section {
  min-height: 350px;
  align-content: start;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-lock {
  min-height: 260px;
  align-content: center;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-lock .options-section-title,
html[data-game-ui="modern"] #optionsScreen .options-admin-lock .options-admin-note,
html[data-game-ui="modern"] #optionsScreen .options-admin-lock .auth-status {
  width: min(520px, 100%);
  justify-self: center;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-unlock-row {
  width: min(520px, 100%);
  justify-self: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-unlock-row .duel-input {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(100, 180, 218, 0.25);
  border-radius: 2px 9px 2px 9px;
  color: #edf9ff;
  background: rgba(0, 7, 18, 0.72);
  outline: none;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-subtabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

html[data-game-ui="modern"] #optionsScreen .options-admin-subtab-btn {
  min-height: 42px;
  color: #7898aa;
  font-size: 10px;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-subtab-btn.active {
  border-color: rgba(83, 211, 247, 0.42);
  color: #f0f9fc;
  background: linear-gradient(100deg, rgba(50, 180, 222, 0.17), transparent), rgba(4, 19, 34, 0.9);
  box-shadow: inset 3px 0 #52dbff;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-subpanel {
  margin-top: 4px;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-debug-row,
html[data-game-ui="modern"] #optionsScreen .options-admin-entry,
html[data-game-ui="modern"] #optionsScreen .options-admin-hero-row {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 175, 205, 0.1);
  border-radius: 2px 8px 2px 8px;
  background: rgba(47, 118, 146, 0.045);
}

html[data-game-ui="modern"] #optionsScreen .options-admin-debug-label,
html[data-game-ui="modern"] #optionsScreen .options-admin-name,
html[data-game-ui="modern"] #optionsScreen .options-admin-hero-label {
  color: #c4d8e1;
  font-size: 11px;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-debug-default,
html[data-game-ui="modern"] #optionsScreen .options-admin-sub {
  color: #6f8c9e;
}

html[data-game-ui="modern"] #optionsScreen .options-admin-hero-options-overlay {
  background: rgba(1, 5, 13, 0.82);
  backdrop-filter: blur(10px) saturate(0.72);
}

html[data-game-ui="modern"] #optionsScreen .options-admin-hero-options-window {
  border-color: rgba(91, 205, 243, 0.34);
  background: linear-gradient(155deg, rgba(9, 28, 48, 0.99), rgba(3, 10, 23, 0.995));
  box-shadow: 0 30px 88px rgba(0, 0, 0, 0.65), inset 3px 0 rgba(75, 211, 248, 0.42);
}

html[data-game-ui="modern"] #optionsScreen .options-admin-hero-portrait-canvas {
  border-color: rgba(91, 205, 243, 0.34);
  border-radius: 3px 14px 3px 14px;
  background: #030b18;
}

/* Alternate mode directory */
html[data-game-ui="modern"] #modeSelectScreen .mode-card {
  width: min(900px, 94vw);
}

html[data-game-ui="modern"] #modeSelectScreen .mode-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-btn {
  --mode-accent: #58d9ff;
  --mode-accent-rgb: 88, 217, 255;
  position: relative;
  min-height: 126px;
  padding: 18px 19px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border-color: rgba(var(--mode-accent-rgb), 0.27);
  border-radius: 3px 17px 3px 17px;
  color: #eff9fc;
  background:
    linear-gradient(115deg, rgba(var(--mode-accent-rgb), 0.13), transparent 48%),
    rgba(2, 12, 26, 0.78);
  box-shadow:
    inset 3px 0 rgba(var(--mode-accent-rgb), 0.68),
    inset 0 1px rgba(255, 255, 255, 0.045),
    0 10px 22px rgba(0, 0, 0, 0.16);
  text-align: left;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-btn:nth-child(2) {
  --mode-accent: #ff8275;
  --mode-accent-rgb: 255, 130, 117;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-btn:nth-child(3) {
  --mode-accent: #c493ff;
  --mode-accent-rgb: 196, 147, 255;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-btn:nth-child(4) {
  --mode-accent: #f1ba57;
  --mode-accent-rgb: 241, 186, 87;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-btn::after {
  content: "";
  position: absolute;
  top: -36px;
  right: -42px;
  width: 130px;
  height: 92px;
  transform: rotate(28deg);
  border-bottom: 1px solid rgba(var(--mode-accent-rgb), 0.22);
  background: linear-gradient(180deg, rgba(var(--mode-accent-rgb), 0.11), transparent);
  pointer-events: none;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--mode-accent-rgb), 0.66);
  background: linear-gradient(115deg, rgba(var(--mode-accent-rgb), 0.21), transparent 54%), rgba(3, 18, 35, 0.94);
  box-shadow:
    inset 3px 0 var(--mode-accent),
    0 0 22px rgba(var(--mode-accent-rgb), 0.14),
    0 14px 25px rgba(0, 0, 0, 0.2);
}

html[data-game-ui="modern"] #modeSelectScreen .mode-modern-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--mode-accent-rgb), 0.35);
  border-radius: 2px 11px 2px 11px;
  color: var(--mode-accent);
  background: rgba(var(--mode-accent-rgb), 0.08);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-modern-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-transform: none;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-modern-copy strong {
  overflow: hidden;
  color: #eff8fc;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-modern-copy small {
  display: block;
  color: #7895a6;
  font: 10px "Trebuchet MS", sans-serif;
  letter-spacing: 0;
}

html[data-game-ui="modern"] #modeSelectScreen .mode-modern-arrow {
  position: relative;
  z-index: 1;
  display: block;
  color: rgba(var(--mode-accent-rgb), 0.72);
  font-size: 18px;
}

@keyframes modern-menu-enter {
  from { opacity: 0; transform: translateY(9px) scale(0.994); filter: saturate(0.72); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
}

@media (max-width: 900px) {
  html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) {
    align-items: flex-start;
    padding: 16px;
  }

  html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel {
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(n) {
    grid-column: 1;
  }

  html[data-game-ui="modern"] #optionsScreen .options-admin-subtabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-game-ui="modern"] #modeSelectScreen .mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) {
    padding: 8px;
  }

  html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) :is(.options-modern-header, .mode-modern-header) {
    align-items: flex-start;
    padding: 18px;
  }

  html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .menu-modern-status {
    display: none;
  }

  html[data-game-ui="modern"] #optionsScreen .options-tabs {
    padding: 10px 10px 0;
  }

  html[data-game-ui="modern"] #optionsScreen .options-tab-btn {
    min-height: 46px;
    padding-left: 13px;
    text-align: center;
  }

  html[data-game-ui="modern"] #optionsScreen .options-tab-btn::before {
    display: none;
  }

  html[data-game-ui="modern"] #optionsScreen .options-panel {
    padding: 10px;
  }

  html[data-game-ui="modern"] #optionsScreen .options-ui-choice-grid,
  html[data-game-ui="modern"] #optionsScreen .options-choice-grid,
  html[data-game-ui="modern"] #optionsScreen .options-choice-grid-circle,
  html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(4) .options-choice-grid {
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #optionsScreen .options-ui-style-btn {
    grid-template-columns: minmax(112px, 0.7fr) minmax(110px, 1fr);
  }

  html[data-game-ui="modern"] #optionsScreen .options-theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-game-ui="modern"] #optionsScreen .options-row,
  html[data-game-ui="modern"] #optionsScreen .options-admin-debug-row {
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #optionsScreen .options-admin-debug-value {
    text-align: left;
  }

  html[data-game-ui="modern"] #modeSelectScreen .mode-grid {
    padding: 10px;
  }

  html[data-game-ui="modern"] #modeSelectScreen .mode-btn {
    min-height: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .screen-card,
  html[data-game-ui="modern"] :is(#optionsScreen, #modeSelectScreen) .menu-modern-status i {
    animation: none;
  }
}

/* Keep desktop Options compact enough to include its Back action. */
@media (min-width: 1100px) {
  html[data-game-ui="modern"] #optionsScreen .options-modern-header {
    min-height: 82px; padding: 14px 22px;
  }
  html[data-game-ui="modern"] #optionsScreen .options-tabs { padding: 8px 16px 0; }
  html[data-game-ui="modern"] #optionsScreen .options-tab-btn { min-height: 44px; padding-top: 7px; padding-bottom: 7px; }
  html[data-game-ui="modern"] #optionsScreen .options-panel { padding: 12px 16px; gap: 10px; }
  html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(1) { grid-column: span 4; }
  html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:nth-child(2) { grid-column: span 8; }
  html[data-game-ui="modern"] #optionsScreen .options-section { padding: 10px; gap: 8px; align-content: start; }
  html[data-game-ui="modern"] #optionsScreen .options-section-title { padding-bottom: 6px; }
  html[data-game-ui="modern"] #optionsScreen .options-ui-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html[data-game-ui="modern"] #optionsScreen #optionsVisualPanel > .options-section:first-child .options-ui-choice-grid { grid-template-columns: 1fr; }
  html[data-game-ui="modern"] #optionsScreen .options-ui-style-btn { min-height: 72px; padding: 7px 9px; gap: 9px; grid-template-columns: minmax(90px, .8fr) minmax(0, 1fr); }
  html[data-game-ui="modern"] #optionsScreen :is(.options-ui-preview, .options-frame-preview) { min-width: 0; height: 52px; }
  html[data-game-ui="modern"] #optionsScreen .options-ui-style-copy { gap: 4px; }
  html[data-game-ui="modern"] #optionsScreen .options-ui-style-btn .options-style-name { font-size: 16px; }
  html[data-game-ui="modern"] #optionsScreen :is(.arcade-style-note, .arcade-ui-note) { margin: 0; font-size: 11px; line-height: 1.4; }
  html[data-game-ui="modern"] #optionsScreen .options-style-btn { min-height: 64px; padding: 6px; gap: 4px; }
  html[data-game-ui="modern"] #optionsScreen .options-theme-btn { min-height: 54px; }
  html[data-game-ui="modern"] #optionsScreen > .screen-card > .screen-actions { margin: 0 16px 12px; padding-top: 9px; }
}
@media (min-width: 1100px) and (max-height: 850px) {
  html[data-game-ui="modern"] #optionsScreen .options-modern-header { min-height: 60px; padding: 10px 20px; }
  html[data-game-ui="modern"] #optionsScreen .options-modern-subtitle,
  html[data-game-ui="modern"] #optionsScreen .menu-modern-kicker { display: none; }
  html[data-game-ui="modern"] #optionsScreen .screen-title { font-size: 28px; }
  html[data-game-ui="modern"] #optionsScreen .options-panel { padding: 9px 14px; gap: 8px; }
  html[data-game-ui="modern"] #optionsScreen .options-section { padding: 8px; gap: 6px; }
  html[data-game-ui="modern"] #optionsScreen .options-ui-style-btn { min-height: 56px; padding: 5px 8px; }
  html[data-game-ui="modern"] #optionsScreen :is(.options-ui-preview, .options-frame-preview) { height: 40px; }
  html[data-game-ui="modern"] #optionsScreen .options-style-btn { min-height: 52px; gap: 2px; padding: 4px; }
  html[data-game-ui="modern"] #optionsScreen :is(.options-style-preview-circle, .options-style-btn-circle .options-style-preview-circle) { width: 32px; height: 32px; }
  html[data-game-ui="modern"] #optionsScreen .options-style-preview-rail { height: 30px; }
  html[data-game-ui="modern"] #optionsScreen .options-theme-btn { min-height: 46px; padding: 5px; }
  html[data-game-ui="modern"] #optionsScreen .options-theme-swatch { height: 22px; }
}

.import-canvas-viewport {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.import-modern-header,
.import-modern-canvas-bar,
.import-modern-only {
  display: none;
}

/* Modern level workshop: the Classic theme continues to use the original editor above. */
html[data-game-ui="modern"] #levelImportScreen {
  --editor-ink: #eef7ff;
  --editor-muted: #8293a8;
  --editor-panel: #101821;
  --editor-panel-raised: #15212c;
  --editor-line: rgba(148, 182, 211, 0.16);
  --editor-cyan: #39d8ff;
  --editor-cyan-soft: rgba(57, 216, 255, 0.13);
  --editor-gold: #ffc65b;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 35%, rgba(31, 76, 98, 0.18), transparent 34%),
    linear-gradient(145deg, #081016 0%, #0b1219 48%, #070c11 100%);
}

html[data-game-ui="modern"] #levelImportScreen .import-card {
  width: 100vw;
  min-width: 1180px;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr);
  font-family: "Bahnschrift", "Aptos Narrow", "Trebuchet MS", sans-serif;
  color: var(--editor-ink);
}

html[data-game-ui="modern"] #levelImportScreen .screen-title {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-modern-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px 0 26px;
  border-bottom: 1px solid var(--editor-line);
  background: rgba(9, 15, 21, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 5;
}

html[data-game-ui="modern"] #levelImportScreen .import-modern-header::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -1px;
  width: 124px;
  height: 2px;
  background: linear-gradient(90deg, var(--editor-cyan), transparent);
}

.import-modern-brand {
  display: grid;
  grid-template-columns: minmax(150px, auto) auto auto;
  align-items: end;
  column-gap: 18px;
  gap: 2px;
}

.import-modern-brand .import-modern-kicker {
  grid-column: 1 / -1;
}

.import-modern-brand strong {
  max-width: min(48vw, 720px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.015em;
  color: var(--editor-ink);
}

html[data-game-ui="modern"] #levelImportScreen .import-header-peg-size {
  display: grid;
  grid-template-columns: auto 150px 48px;
  align-items: center;
  gap: 9px;
  min-width: 260px;
  color: var(--editor-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-header-peg-size input {
  width: 150px;
  accent-color: var(--editor-cyan);
}

html[data-game-ui="modern"] #levelImportScreen .import-header-peg-size output {
  color: var(--editor-ink);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: right;
  text-transform: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-header-mirror {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  color: var(--editor-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-mirror-options {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(31px, auto));
  border: 1px solid rgba(124, 219, 255, 0.24);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(4, 10, 15, 0.62);
}

html[data-game-ui="modern"] #levelImportScreen .import-mirror-option {
  min-width: 31px;
  height: 25px;
  padding: 0 7px;
  border: 0;
  border-right: 1px solid rgba(124, 219, 255, 0.16);
  border-radius: 0;
  background: transparent;
  color: #93a6b9;
  font: 800 12px/1 "Bahnschrift", "Aptos Narrow", "Trebuchet MS", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

html[data-game-ui="modern"] #levelImportScreen .import-mirror-option:last-child {
  border-right: 0;
}

html[data-game-ui="modern"] #levelImportScreen .import-mirror-option:hover,
html[data-game-ui="modern"] #levelImportScreen .import-mirror-option:focus-visible {
  color: #eaf8ff;
  background: rgba(74, 190, 231, 0.12);
  outline: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-mirror-option.is-active {
  color: #06141b;
  background: var(--editor-cyan);
  box-shadow: inset 0 0 0 1px rgba(235, 252, 255, 0.45);
}

.import-modern-kicker {
  color: var(--editor-cyan);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.import-modern-header-meta {
  display: flex;
  align-items: center;
  gap: 17px;
  color: var(--editor-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 12px;
  border-right: 1px solid var(--editor-line);
}

html[data-game-ui="modern"] #levelImportScreen .import-history-controls > .btn {
  height: 30px;
  min-width: 34px;
  padding: 0 10px;
  border-color: rgba(148, 182, 211, 0.2);
  background: rgba(255, 255, 255, 0.025);
  color: #adbfcd;
  box-shadow: none;
  font-size: 10px;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-controls > .import-history-step {
  padding: 0;
  font-size: 18px;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-controls > .btn:hover:not(:disabled),
html[data-game-ui="modern"] #levelImportScreen .import-history-controls > .btn.toggled {
  border-color: rgba(57, 216, 255, 0.38);
  background: var(--editor-cyan-soft);
  color: #e8fbff;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-controls > .btn:disabled {
  opacity: 0.28;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-popover {
  position: absolute;
  top: 42px;
  right: 0;
  width: 310px;
  max-height: min(620px, calc(100vh - 82px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(57, 216, 255, 0.24);
  border-radius: 6px;
  background: rgba(12, 20, 28, 0.985);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), inset 0 1px rgba(255, 255, 255, 0.03);
  color: var(--editor-ink);
  text-transform: none;
  white-space: normal;
  z-index: 40;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-popover.hidden {
  display: none;
}

.import-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--editor-line);
}

.import-history-heading > div {
  display: grid;
  gap: 3px;
}

.import-history-heading span {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.import-history-heading small {
  color: var(--editor-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-history-heading .btn {
  width: 28px;
  height: 28px;
  min-width: 0;
  padding: 0;
  font-size: 17px;
}

.import-history-list {
  max-height: min(540px, calc(100vh - 150px));
  padding: 8px;
  overflow: auto;
}

.import-history-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #8fa3b5;
  text-align: left;
  cursor: pointer;
}

.import-history-entry:hover {
  border-color: rgba(57, 216, 255, 0.15);
  background: rgba(57, 216, 255, 0.05);
}

.import-history-entry.is-current {
  border-color: rgba(57, 216, 255, 0.28);
  background: linear-gradient(90deg, rgba(57, 216, 255, 0.13), rgba(57, 216, 255, 0.025));
  color: #eafaff;
}

.import-history-entry.is-future {
  opacity: 0.48;
}

.import-history-entry-index {
  color: #52677a;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.import-history-entry strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-history-entry em {
  color: var(--editor-cyan);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-test-level-btn {
  min-width: 118px;
  height: 34px;
  padding: 0 18px;
  border-color: rgba(57, 216, 255, 0.58);
  background: linear-gradient(180deg, rgba(34, 172, 210, 0.28), rgba(17, 96, 123, 0.34));
  color: #ecfbff;
  box-shadow: inset 0 0 0 1px rgba(130, 232, 255, 0.08), 0 0 20px rgba(57, 216, 255, 0.08);
  font-size: 10px;
  letter-spacing: 0.11em;
}

html[data-game-ui="modern"] #levelImportScreen .import-test-level-btn:hover:not(:disabled) {
  border-color: rgba(118, 232, 255, 0.9);
  background: linear-gradient(180deg, rgba(46, 197, 235, 0.4), rgba(18, 112, 143, 0.46));
}

html[data-game-ui="modern"] #levelImportScreen .import-test-level-btn:disabled {
  opacity: 0.56;
}

html[data-game-ui="modern"] #levelImportScreen .import-hero-frame-toggle {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--editor-line);
}

.import-modern-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a6f7d2;
}

.import-modern-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #53e3a4;
  box-shadow: 0 0 0 4px rgba(83, 227, 164, 0.08), 0 0 12px rgba(83, 227, 164, 0.7);
}

html[data-game-ui="modern"] #levelImportScreen .import-grid {
  display: grid;
  grid-template-columns: 76px minmax(720px, 1fr) minmax(310px, 340px);
  grid-template-rows: minmax(0, 1fr) 60px;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

html[data-game-ui="modern"] #levelImportScreen .import-controls {
  display: contents;
}

html[data-game-ui="modern"] #levelImportScreen .import-panel {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  gap: 14px;
  padding: 22px 20px 30px;
  border: 0;
  border-left: 1px solid var(--editor-line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 190px),
    var(--editor-panel);
  scrollbar-color: rgba(57, 216, 255, 0.28) transparent;
}

html[data-game-ui="modern"] #levelImportScreen .import-source-panel,
html[data-game-ui="modern"] #levelImportScreen .import-peg-panel,
html[data-game-ui="modern"] #levelImportScreen .import-rail-circle-panel,
html[data-game-ui="modern"] #levelImportScreen .import-path-panel,
html[data-game-ui="modern"] #levelImportScreen .import-solid-panel,
html[data-game-ui="modern"] #levelImportScreen .import-field-panel,
html[data-game-ui="modern"] #levelImportScreen .import-decay-panel {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="source"] .import-source-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="peg"] .import-peg-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="erase"] .import-peg-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="rail"] .import-rail-circle-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="circle"] .import-rail-circle-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="path"] .import-path-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="obstacle"] .import-solid-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="field"] .import-field-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="decay"] .import-decay-panel {
  display: grid;
}

html[data-game-ui="modern"] #levelImportScreen .import-panel-title {
  margin: -2px 0 7px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--editor-line);
  color: var(--editor-ink);
  font-size: 17px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: 0.025em;
  text-transform: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-panel-title::before {
  content: "PROPERTIES";
  display: block;
  margin-bottom: 7px;
  color: var(--editor-cyan);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

html[data-game-ui="modern"] #levelImportScreen .import-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  padding: 1px 0 8px;
  border-bottom: 1px solid rgba(148, 182, 211, 0.07);
  color: var(--editor-muted);
  font-size: 11px;
}

html[data-game-ui="modern"] #levelImportScreen .import-row > label {
  grid-column: 1;
  grid-row: 1;
  color: #b6c4d1;
  font-weight: 650;
  letter-spacing: 0.025em;
}

html[data-game-ui="modern"] #levelImportScreen .import-row > span {
  grid-column: 2;
  grid-row: 1;
  color: var(--editor-cyan);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

html[data-game-ui="modern"] #levelImportScreen .import-row > input,
html[data-game-ui="modern"] #levelImportScreen .import-row > select {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
}

html[data-game-ui="modern"] #levelImportScreen input[type="range"] {
  accent-color: var(--editor-cyan);
}

html[data-game-ui="modern"] #levelImportScreen .duel-label {
  margin: 0;
  color: #b6c4d1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .duel-input {
  min-height: 36px;
  border-color: rgba(148, 182, 211, 0.2);
  border-radius: 5px;
  background: #0b1219;
  color: var(--editor-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-game-ui="modern"] #levelImportScreen .duel-input:focus {
  border-color: rgba(57, 216, 255, 0.7);
  outline: 2px solid rgba(57, 216, 255, 0.1);
}

html[data-game-ui="modern"] #levelImportScreen .import-toggle {
  padding: 8px 9px;
  border: 1px solid rgba(148, 182, 211, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
  color: #afbdca;
  font-size: 10px;
}

html[data-game-ui="modern"] #levelImportScreen .import-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--editor-cyan);
}

html[data-game-ui="modern"] #levelImportScreen .import-help,
html[data-game-ui="modern"] #levelImportScreen .import-toggle-help,
html[data-game-ui="modern"] #levelImportScreen .import-modifiers {
  padding: 10px 12px;
  border-left: 2px solid rgba(57, 216, 255, 0.5);
  background: rgba(57, 216, 255, 0.045);
  color: #b7c8d7;
  font-size: 12px;
  line-height: 1.5;
}

html[data-game-ui="modern"] #levelImportScreen .import-modern-only {
  display: block;
}

html[data-game-ui="modern"] #levelImportScreen .import-classic-only,
html[data-game-ui="modern"] #levelImportScreen .import-legacy-framing {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-simple-background {
  display: grid;
  gap: 14px;
}

html[data-game-ui="modern"] #levelImportScreen .import-simple-background-status {
  padding: 12px 12px 12px 36px;
  border: 1px solid rgba(148, 182, 211, 0.13);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
  color: #8fa0b1;
  font-size: 10px;
  line-height: 1.45;
  position: relative;
}

html[data-game-ui="modern"] #levelImportScreen .import-simple-background-status::before {
  content: "+";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57, 216, 255, 0.4);
  color: var(--editor-cyan);
  transform: translateY(-50%);
}

html[data-game-ui="modern"] #levelImportScreen .import-simple-background-status[data-ready="true"]::before {
  content: "✓";
  border-color: rgba(83, 227, 164, 0.45);
  color: #76e8b2;
}

html[data-game-ui="modern"] #levelImportScreen .import-fit-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

html[data-game-ui="modern"] #levelImportScreen .import-fit-picker legend {
  width: 100%;
  margin-bottom: 8px;
  color: #b6c4d1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-fit-picker .btn {
  min-width: 0;
  min-height: 62px;
  padding: 9px 5px;
  display: grid;
  place-content: center;
  gap: 5px;
  border-color: rgba(148, 182, 211, 0.16);
  background: #0b1219;
  color: #92a2b1;
  box-shadow: none;
  text-transform: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-fit-picker .btn strong {
  color: #dce9f3;
  font-size: 11px;
  letter-spacing: 0.03em;
}

html[data-game-ui="modern"] #levelImportScreen .import-fit-picker .btn span {
  font-size: 8px;
  font-weight: 500;
  line-height: 1.2;
}

html[data-game-ui="modern"] #levelImportScreen .import-fit-picker .btn.toggled {
  border-color: rgba(57, 216, 255, 0.55);
  background: rgba(57, 216, 255, 0.1);
  color: #a9ddea;
  box-shadow: inset 0 -2px 0 var(--editor-cyan);
}

html[data-game-ui="modern"] #levelImportScreen .import-simple-drag-hint {
  padding: 10px 11px;
  border-left: 2px solid var(--editor-cyan);
  background: rgba(57, 216, 255, 0.045);
  color: #879aad;
  font-size: 10px;
  line-height: 1.4;
}

html[data-game-ui="modern"] #levelImportScreen .import-row.import-modern-only {
  display: grid;
}

html[data-game-ui="modern"] #levelImportScreen:not([data-editor-peg-shape="rect"]) .import-modern-rect-control {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-modern-capability-note {
  padding: 10px 11px;
  border: 1px solid rgba(255, 198, 91, 0.18);
  border-left: 2px solid var(--editor-gold);
  border-radius: 4px;
  background: rgba(255, 198, 91, 0.05);
  color: #d7c7a6;
  font-size: 10px;
  line-height: 1.4;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 8px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--editor-line);
  background: #0a1117;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .import-panel-title {
  margin: 0 0 1px;
  padding: 0 0 8px;
  color: #74869a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .import-panel-title::before {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .import-edit-actions {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 49px;
  padding: 6px 3px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  color: #7f91a4;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn::before {
  display: block;
  color: #a9bbca;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

html[data-game-ui="modern"] #levelImportScreen #importSourceModeBtn::before { content: "◎"; }
html[data-game-ui="modern"] #levelImportScreen #importPegModeBtn::before { content: "●"; }
html[data-game-ui="modern"] #levelImportScreen #importRailModeBtn::before { content: "∿"; }
html[data-game-ui="modern"] #levelImportScreen #importCircleModeBtn::before { content: "◌"; }
html[data-game-ui="modern"] #levelImportScreen #importPathModeBtn::before { content: "⤳"; }
html[data-game-ui="modern"] #levelImportScreen #importObstacleModeBtn::before { content: "◆"; }
html[data-game-ui="modern"] #levelImportScreen #importFieldModeBtn::before { content: "▦"; }
html[data-game-ui="modern"] #levelImportScreen #importDecayModeBtn::before { content: "◴"; }
html[data-game-ui="modern"] #levelImportScreen #importArrangeModeBtn::before { content: "⌖"; }
html[data-game-ui="modern"] #levelImportScreen #importPatternModeBtn::before { content: "✣"; }
html[data-game-ui="modern"] #levelImportScreen #importPrefabModeBtn::before { content: "▦"; }
html[data-game-ui="modern"] #levelImportScreen #importChoreoModeBtn::before { content: "≋"; }
html[data-game-ui="modern"] #levelImportScreen #importGameplayModeBtn::before { content: "⚙"; }
html[data-game-ui="modern"] #levelImportScreen #importModernEraseModeBtn::before { content: "⌫"; }
html[data-game-ui="modern"] #levelImportScreen #importFinishBtn::before { content: "✓"; }

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn:hover:not(:disabled) {
  border-color: rgba(57, 216, 255, 0.18);
  background: rgba(57, 216, 255, 0.055);
  color: #c6d5e1;
  transform: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn.toggled {
  border-color: rgba(57, 216, 255, 0.35);
  background: linear-gradient(135deg, rgba(57, 216, 255, 0.17), rgba(57, 216, 255, 0.055));
  color: #e8fbff;
  box-shadow: inset 2px 0 0 var(--editor-cyan), 0 0 18px rgba(57, 216, 255, 0.055);
}

html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn.toggled::before {
  color: var(--editor-cyan);
  text-shadow: 0 0 12px rgba(57, 216, 255, 0.55);
}

html[data-game-ui="modern"] #levelImportScreen .import-panel.import-arrange-panel,
html[data-game-ui="modern"] #levelImportScreen .import-panel.import-pattern-panel,
html[data-game-ui="modern"] #levelImportScreen .import-panel.import-prefab-panel,
html[data-game-ui="modern"] #levelImportScreen .import-panel.import-choreo-panel,
html[data-game-ui="modern"] #levelImportScreen .import-panel.import-gameplay-panel {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="arrange"] .import-arrange-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="pattern"] .import-pattern-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="prefab"] .import-prefab-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="choreo"] .import-choreo-panel,
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="gameplay"] .import-gameplay-panel {
  display: grid;
}

html[data-game-ui="modern"] #levelImportScreen .import-selection-summary {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid rgba(57, 216, 255, 0.18);
  border-left: 3px solid var(--editor-cyan);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(57, 216, 255, 0.09), rgba(57, 216, 255, 0.025));
  color: #b8ceda;
  font-size: 10px;
  line-height: 1.45;
}

html[data-game-ui="modern"] #levelImportScreen .import-arrange-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

html[data-game-ui="modern"] #levelImportScreen .import-arrange-actions .btn {
  min-width: 0;
}

html[data-game-ui="modern"] #levelImportScreen .import-subsection-label {
  margin-top: 3px;
  color: var(--editor-gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-layer-list,
html[data-game-ui="modern"] #levelImportScreen .import-prefab-library {
  display: grid;
  gap: 6px;
}

html[data-game-ui="modern"] #levelImportScreen .import-layer-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 8px 7px 11px;
  border: 1px solid rgba(148, 182, 211, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
}

html[data-game-ui="modern"] #levelImportScreen .import-layer-row button {
  min-width: 30px;
  min-height: 28px;
  padding: 4px 7px;
}

html[data-game-ui="modern"] #levelImportScreen .import-layer-name {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c5d2dc;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

html[data-game-ui="modern"] #levelImportScreen .import-layer-name small {
  color: #718599;
  font-size: 8px;
  font-weight: 600;
}

html[data-game-ui="modern"] #levelImportScreen .import-prefab-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

html[data-game-ui="modern"] #levelImportScreen .import-prefab-card {
  width: 100%;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 182, 211, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
  color: #8fa3b5;
  text-align: left;
}

html[data-game-ui="modern"] #levelImportScreen .import-prefab-card strong,
html[data-game-ui="modern"] #levelImportScreen .import-prefab-card span {
  display: block;
}

html[data-game-ui="modern"] #levelImportScreen .import-prefab-card strong {
  margin-bottom: 3px;
  color: #d6e3ec;
  font-size: 11px;
}

html[data-game-ui="modern"] #levelImportScreen .import-prefab-card span {
  font-size: 8px;
}

html[data-game-ui="modern"] #levelImportScreen .import-prefab-card.toggled {
  border-color: rgba(255, 198, 91, 0.5);
  background: rgba(255, 198, 91, 0.07);
  box-shadow: inset 3px 0 0 var(--editor-gold);
}

html[data-game-ui="modern"] #levelImportScreen .import-choreo-panel {
  align-content: start;
}

.import-choreo-intro {
  padding: 10px 11px;
  border-left: 2px solid var(--editor-gold);
  background: rgba(255, 198, 91, 0.055);
  color: #c9b991;
  font-size: 10px;
  line-height: 1.45;
}

.import-choreo-group-list {
  display: grid;
  gap: 6px;
}

.import-choreo-group-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid rgba(148, 182, 211, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
  color: #a9bccb;
  text-align: left;
  cursor: pointer;
}

.import-choreo-group-card:hover,
.import-choreo-group-card.toggled {
  border-color: rgba(57, 216, 255, 0.28);
  background: rgba(57, 216, 255, 0.075);
}

.import-choreo-group-card strong {
  display: block;
  margin-bottom: 3px;
  color: #e8f7ff;
  font-size: 11px;
}

.import-choreo-group-card small {
  color: #71869a;
  font-size: 9px;
}

.import-choreo-group-card span {
  color: var(--editor-cyan);
  font-size: 9px;
  font-weight: 750;
}

.import-choreo-editor {
  display: grid;
  gap: 10px;
}

.import-choreo-editor.is-disabled {
  display: none;
}

.import-choreo-timeline {
  display: grid;
  gap: 6px;
  min-height: 44px;
  padding: 9px;
  border: 1px solid rgba(148, 182, 211, 0.13);
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgba(148, 182, 211, 0.08) 25%),
    rgba(5, 10, 15, 0.42);
}

.import-choreo-track {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 7px;
  min-height: 22px;
}

.import-choreo-track-label {
  overflow: hidden;
  color: #8ea4b6;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-choreo-track-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 182, 211, 0.15);
}

.import-choreo-track-bar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--phase, 0%);
  width: 9px;
  height: 9px;
  border: 2px solid #10202b;
  border-radius: 50%;
  background: var(--editor-gold);
  box-shadow: 0 0 9px rgba(255, 198, 91, 0.42);
  transform: translate(-50%, -50%);
}

.import-choreo-track-direction {
  color: var(--editor-cyan);
  font-size: 12px;
  text-align: center;
}

html[data-game-ui="modern"] #levelImportScreen .import-gameplay-panel {
  align-content: start;
  gap: 10px;
}

.import-gameplay-intro {
  padding: 10px 11px;
  border-left: 2px solid #ac75ff;
  background: rgba(172, 117, 255, 0.06);
  color: #c8b5e8;
  font-size: 10px;
  line-height: 1.45;
}

.import-gameplay-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.import-gameplay-palette-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 53px;
  padding: 8px 9px;
  border: 1px solid rgba(148, 182, 211, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.018);
  color: #7f93a5;
  text-align: left;
  cursor: pointer;
}

.import-gameplay-palette-card strong {
  color: #d8e5ee;
  font-size: 10px;
}

.import-gameplay-palette-card span {
  font-size: 8px;
  line-height: 1.3;
}

.import-gameplay-palette-card:hover,
.import-gameplay-palette-card.toggled {
  border-color: rgba(172, 117, 255, 0.48);
  background: linear-gradient(135deg, rgba(172, 117, 255, 0.13), rgba(57, 216, 255, 0.035));
  box-shadow: inset 3px 0 0 #ac75ff;
}

.import-gameplay-object-list {
  display: grid;
  gap: 5px;
  max-height: 156px;
  overflow: auto;
}

.import-gameplay-object-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 182, 211, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
  color: #91a7b8;
  text-align: left;
  cursor: pointer;
}

.import-gameplay-object-card strong,
.import-gameplay-object-card small {
  display: block;
}

.import-gameplay-object-card strong {
  color: #d6e5ee;
  font-size: 10px;
}

.import-gameplay-object-card small {
  margin-top: 2px;
  color: #6f8497;
  font-size: 8px;
}

.import-gameplay-object-card > span {
  color: #ac75ff;
  font-size: 9px;
  font-weight: 800;
}

.import-gameplay-object-card.toggled {
  border-color: rgba(57, 216, 255, 0.34);
  background: rgba(57, 216, 255, 0.075);
  box-shadow: inset 3px 0 0 var(--editor-cyan);
}

.import-gameplay-inspector {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(148, 182, 211, 0.14);
  border-radius: 5px;
  background: rgba(4, 9, 14, 0.42);
}

.import-gameplay-inspector:empty {
  display: none;
}

.import-gameplay-inspector-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #e9f6ff;
  font-size: 11px;
}

.import-gameplay-inspector-heading small {
  color: #73899b;
  font-size: 8px;
  font-weight: 600;
}

.import-gameplay-note {
  padding: 8px 9px;
  border-left: 2px solid rgba(84, 226, 255, 0.72);
  background: linear-gradient(90deg, rgba(41, 186, 216, 0.1), rgba(41, 186, 216, 0.025));
  color: #91a9b9;
  font-size: 8px;
  line-height: 1.5;
}

.import-peg-color-eligibility {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 10px;
}

.import-peg-color-dot {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.28;
  filter: grayscale(0.7);
  transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.import-peg-color-dot.toggled {
  opacity: 1;
  filter: none;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72), 0 0 13px currentColor;
}

.import-peg-color-dot.is-blue { background: #35a8ff; color: #35a8ff; }
.import-peg-color-dot.is-green { background: #55dc72; color: #55dc72; }
.import-peg-color-dot.is-orange { background: #ff9d31; color: #ff9d31; }
.import-peg-color-dot.is-purple { background: #c472ff; color: #c472ff; }

.import-gameplay-color-control {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 32px;
}

.import-gameplay-color-label {
  color: #91a7b8;
  font-size: 9px;
}

.import-gameplay-color-swatches {
  display: grid;
  grid-template-columns: repeat(6, 24px);
  gap: 6px;
  align-items: center;
}

.import-gameplay-color-swatch {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid rgba(219, 238, 250, 0.22);
  border-radius: 50%;
  background: var(--swatch-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.import-gameplay-color-swatch:hover {
  transform: translateY(-1px) scale(1.06);
  border-color: rgba(255, 255, 255, 0.72);
}

.import-gameplay-color-swatch.is-selected {
  border-color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(4, 9, 14, 0.9), 0 0 0 4px var(--swatch-color), 0 0 14px var(--swatch-color);
}

.import-gameplay-control {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 7px;
  color: #91a7b8;
  font-size: 9px;
}

.import-gameplay-control.is-wide {
  grid-template-columns: 92px minmax(0, 1fr);
}

.import-gameplay-control input[type="number"],
.import-gameplay-control select {
  min-width: 0;
  height: 30px;
  padding: 4px 7px;
  border: 1px solid rgba(148, 182, 211, 0.18);
  border-radius: 4px;
  background: #091018;
  color: #d9e9f3;
  font-size: 9px;
}

.import-gameplay-control output {
  color: var(--editor-cyan);
  font-size: 9px;
  text-align: right;
}

.import-gameplay-inspector .import-toggle {
  min-height: 34px;
}

html[data-game-ui="modern"] #levelImportScreen .import-motion-v2 {
  display: grid;
  gap: 12px;
  padding-top: 3px;
}

html[data-game-ui="modern"] #levelImportScreen[data-pattern-shape="grid"] .import-pattern-radius-control,
html[data-game-ui="modern"] #levelImportScreen:not([data-pattern-shape="grid"]) .import-pattern-grid-control,
html[data-game-ui="modern"] #levelImportScreen[data-pattern-shape="line"] .import-pattern-radius-control,
html[data-game-ui="modern"] #levelImportScreen[data-pattern-shape="line"] .import-pattern-arc-control,
html[data-game-ui="modern"] #levelImportScreen[data-pattern-shape="grid"] .import-pattern-arc-control,
html[data-game-ui="modern"] #levelImportScreen[data-pattern-shape="path"] .import-pattern-radius-control,
html[data-game-ui="modern"] #levelImportScreen[data-pattern-shape="path"] .import-pattern-arc-control {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-modern-shortcuts {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-preview-wrap {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 42px 18px 14px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background-color: #0b131a;
  background-image:
    linear-gradient(rgba(95, 138, 164, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 138, 164, 0.045) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(30, 68, 85, 0.2), transparent 58%);
  background-size: 24px 24px, 24px 24px, auto;
}

html[data-game-ui="modern"] #levelImportScreen .import-preview-wrap::before,
html[data-game-ui="modern"] #levelImportScreen .import-preview-wrap::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-preview-wrap::before {
  left: 18px;
  bottom: 16px;
  border-left: 1px solid rgba(57, 216, 255, 0.45);
  border-bottom: 1px solid rgba(57, 216, 255, 0.45);
}

html[data-game-ui="modern"] #levelImportScreen .import-preview-wrap::after {
  right: 18px;
  top: 16px;
  border-top: 1px solid rgba(57, 216, 255, 0.45);
  border-right: 1px solid rgba(57, 216, 255, 0.45);
}

html[data-game-ui="modern"] #levelImportScreen .import-modern-canvas-bar {
  position: absolute;
  top: 13px;
  left: 24px;
  right: 24px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: var(--editor-muted);
  font-size: 10px;
  letter-spacing: 0.025em;
  pointer-events: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(57, 216, 255, 0.18);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(57, 216, 255, 0.07), transparent 58%),
    rgba(5, 13, 20, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #dce9f3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-heading output {
  color: var(--editor-cyan);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: right;
  text-transform: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #9db0c1;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-control small {
  color: #64788b;
  font-size: 7px;
  font-weight: 700;
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-control input {
  width: 100%;
  accent-color: var(--editor-cyan);
  cursor: ew-resize;
}

html[data-game-ui="modern"] #levelImportScreen .import-shooter-position-help {
  color: #7890a3;
  font-size: 9px;
  line-height: 1.4;
}

.import-modern-stage-tag {
  padding: 4px 7px;
  border: 1px solid rgba(57, 216, 255, 0.24);
  border-radius: 3px;
  background: rgba(57, 216, 255, 0.06);
  color: var(--editor-cyan);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

#importModernToolLabel {
  color: #dce9f3;
  font-size: 11px;
  letter-spacing: 0.04em;
}

#importModernToolHint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #levelImportScreen #importPreview {
  width: min(100%, calc((100vh - 178px) * 1.17647));
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 178px);
  border: 1px solid rgba(137, 183, 207, 0.24);
  border-radius: 2px;
  background: #050912;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), 0 0 0 5px rgba(0, 0, 0, 0.13);
}

html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="source"] #importPreview:not(.is-moving-background) {
  cursor: grab;
}

html[data-game-ui="modern"] #levelImportScreen #importPreview.is-moving-background {
  cursor: grabbing;
}

html[data-game-ui="modern"] #levelImportScreen .import-footer-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px 10px 22px;
  overflow: hidden;
  border: 0;
  border-top: 1px solid var(--editor-line);
  background: #0a1016;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
}

html[data-game-ui="modern"] #levelImportScreen .import-footer-panel > .import-help {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen .import-footer-panel .screen-actions {
  order: 2;
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  margin: 0 0 0 auto;
}

html[data-game-ui="modern"] #levelImportScreen .import-footer-panel .screen-text {
  order: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #8798a9;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #levelImportScreen .import-footer-panel .btn,
html[data-game-ui="modern"] #levelImportScreen .import-panel:not(.import-tool-panel) .btn {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(148, 182, 211, 0.2);
  border-radius: 4px;
  background: #121d26;
  box-shadow: none;
  color: #b8c7d3;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelImportScreen .import-footer-panel .btn:hover:not(:disabled),
html[data-game-ui="modern"] #levelImportScreen .import-panel:not(.import-tool-panel) .btn:hover:not(:disabled) {
  border-color: rgba(57, 216, 255, 0.45);
  background: #182733;
  color: #edfaff;
  transform: none;
}

html[data-game-ui="modern"] #levelImportScreen #importSaveBtn {
  order: 5;
  min-width: 112px;
  border-color: rgba(57, 216, 255, 0.55);
  background: linear-gradient(135deg, #1293b5, #11657f);
  color: white;
}

html[data-game-ui="modern"] #levelImportScreen #importDetectBtn { order: 4; }
html[data-game-ui="modern"] #levelImportScreen #importClearBtn { order: 3; }
html[data-game-ui="modern"] #levelImportScreen #importManageLevelsBtn { order: 2; }
html[data-game-ui="modern"] #levelImportScreen #importBackBtn { order: 1; }

html[data-game-ui="modern"] #levelImportScreen .import-edit-actions {
  gap: 7px;
}

html[data-game-ui="modern"] #levelImportScreen .import-edit-actions-tight {
  grid-template-columns: 1fr;
}

html[data-game-ui="modern"] #levelImportScreen .import-rail-circle-panel > :not(.import-panel-title):not(.import-modifiers) {
  display: none;
}

html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="rail"] .import-rail-circle-panel > :has([id^="importRail"]),
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="circle"] .import-rail-circle-panel > :has([id^="importCircle"]) {
  display: grid;
}

html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="rail"] .import-rail-circle-panel > label:has([id^="importRail"]),
html[data-game-ui="modern"] #levelImportScreen[data-editor-tool="circle"] .import-rail-circle-panel > label:has([id^="importCircle"]) {
  display: flex;
}

html[data-game-ui="modern"] #levelImportScreen .import-rail-circle-panel > .import-modifiers {
  display: grid;
}

html[data-game-ui="modern"] #levelImportScreen[data-editor-obstacle-shape="rect"] .import-solid-panel .import-row:has(#importObstacleSize),
html[data-game-ui="modern"] #levelImportScreen:not([data-editor-obstacle-shape="rect"]) .import-solid-panel .import-row:has(#importObstacleWidth),
html[data-game-ui="modern"] #levelImportScreen:not([data-editor-obstacle-shape="rect"]) .import-solid-panel .import-row:has(#importObstacleHeight) {
  display: none;
}

@media (max-height: 850px) {
  html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn {
    min-height: 42px;
  }

  html[data-game-ui="modern"] #levelImportScreen .import-tool-panel .btn::before {
    font-size: 15px;
  }

  html[data-game-ui="modern"] #levelImportScreen .import-panel {
    padding-top: 16px;
  }
}

/* Modern pre-game selectors: arena catalog presentation for levels and heroes. */
html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) {
  background:
    radial-gradient(circle at 50% -12%, rgba(51, 183, 226, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(1, 8, 19, 0.82), rgba(0, 4, 12, 0.96));
  backdrop-filter: blur(5px) saturate(1.08);
}

html[data-game-ui="modern"] #levelSelect:not(.leaderboard-rush-layout) .level-select-layout {
  width: min(1120px, 96vw);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-card {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  border: 1px solid rgba(91, 204, 241, 0.3);
  border-radius: 4px 24px 4px 24px;
  background:
    linear-gradient(112deg, rgba(51, 177, 222, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(8, 25, 45, 0.985), rgba(2, 10, 23, 0.99));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px rgba(255, 255, 255, 0.055),
    inset 4px 0 rgba(68, 205, 244, 0.42);
  animation: modern-selector-enter 260ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] #levelSelect .level-select-main > .level-select-card {
  width: 100%;
}

html[data-game-ui="modern"] #heroSelect .hero-select-card {
  width: min(1080px, 96vw);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  right: 24px;
  left: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4bdcff, rgba(75, 220, 255, 0.16) 42%, transparent 80%);
  box-shadow: 0 0 14px rgba(75, 220, 255, 0.38);
  pointer-events: none;
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 52px;
  height: 52px;
  border-right: 2px solid rgba(78, 215, 250, 0.42);
  border-bottom: 2px solid rgba(78, 215, 250, 0.42);
  clip-path: polygon(58% 100%, 100% 58%, 100% 100%);
  background: rgba(66, 205, 241, 0.07);
  pointer-events: none;
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-header {
  position: relative;
  z-index: 1;
  min-height: 72px;
  padding: 15px 20px 14px 25px;
  gap: 18px;
  border-bottom: 1px solid rgba(94, 181, 216, 0.17);
  background:
    linear-gradient(90deg, rgba(34, 139, 178, 0.13), transparent 48%),
    rgba(1, 8, 20, 0.36);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-title {
  display: grid;
  gap: 3px;
  color: #f2f8fb;
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-title::before {
  color: #62d7f5;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2.4px;
  text-shadow: none;
}

html[data-game-ui="modern"] #levelSelect .level-select-title::before {
  content: "ARENA DATABASE  /  SELECT PLAYFIELD";
}

html[data-game-ui="modern"] #heroSelect .level-select-title::before {
  content: "HERO ROSTER  /  ASSIGN LOADOUT";
}

html[data-game-ui="modern"] #levelSelect .level-select-peek-btn {
  min-width: 46px;
  min-height: 40px;
  border: 1px solid rgba(86, 209, 245, 0.45);
  border-radius: 2px 10px 2px 10px;
  color: #a9e7f7;
  background:
    linear-gradient(135deg, rgba(63, 190, 230, 0.18), transparent 62%),
    rgba(3, 18, 34, 0.88);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 0 15px rgba(62, 200, 239, 0.1);
}

html[data-game-ui="modern"] #levelSelect .level-select-peek-btn:hover:not(:disabled) {
  border-color: rgba(95, 224, 255, 0.78);
  color: #fff;
  background: rgba(28, 96, 124, 0.5);
  box-shadow: 0 0 16px rgba(74, 214, 250, 0.18);
}

html[data-game-ui="modern"] #heroSelect #heroSelectStatus {
  max-width: 52%;
  padding: 7px 11px 7px 23px;
  position: relative;
  border: 1px solid rgba(88, 211, 178, 0.22);
  border-radius: 2px 9px 2px 9px;
  color: #a9c5d3;
  background: rgba(14, 69, 61, 0.09);
  font-size: 9px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.75px;
  text-align: right;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #heroSelect #heroSelectStatus::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #5ce5a0;
  box-shadow: 0 0 9px rgba(92, 229, 160, 0.7);
}

html[data-game-ui="modern"] :is(#levelSelect .level-grid, #heroSelect .hero-grid) {
  gap: 12px;
  padding: 18px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 207, 243, 0.42) transparent;
}

html[data-game-ui="modern"] #heroSelect .hero-grid {
  grid-auto-rows: max-content;
  align-content: start;
}

html[data-game-ui="modern"] #levelSelect .level-entry {
  gap: 7px;
}

html[data-game-ui="modern"] #levelSelect .level-tile,
html[data-game-ui="modern"] #heroSelect .hero-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(101, 189, 224, 0.22);
  border-radius: 2px 13px 2px 13px;
  background:
    linear-gradient(140deg, rgba(64, 179, 218, 0.07), transparent 42%),
    rgba(2, 13, 29, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 8px 20px rgba(0, 0, 0, 0.14);
  transition: transform 130ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

html[data-game-ui="modern"] #levelSelect .level-tile::after,
html[data-game-ui="modern"] #heroSelect .hero-tile::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(75, 210, 246, 0.56));
  box-shadow: 0 0 7px rgba(75, 210, 246, 0.18);
  pointer-events: none;
}

html[data-game-ui="modern"] #levelSelect .level-tile:hover,
html[data-game-ui="modern"] #heroSelect .hero-tile:hover:not(.disabled) {
  transform: translateY(-3px);
  border-color: rgba(80, 217, 253, 0.62);
  background:
    linear-gradient(140deg, rgba(62, 192, 231, 0.14), transparent 48%),
    rgba(3, 19, 36, 0.94);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32), 0 0 16px rgba(65, 201, 240, 0.12);
}

html[data-game-ui="modern"] #levelSelect .level-entry.active .level-tile,
html[data-game-ui="modern"] #heroSelect .hero-tile.active {
  border-color: rgba(255, 214, 91, 0.86);
  background:
    linear-gradient(140deg, rgba(255, 196, 53, 0.12), transparent 48%),
    rgba(7, 22, 35, 0.96);
  box-shadow:
    0 0 0 1px rgba(255, 202, 60, 0.16),
    0 0 20px rgba(255, 190, 44, 0.17),
    inset 3px 0 rgba(255, 210, 73, 0.72);
}

html[data-game-ui="modern"] #levelSelect .level-entry.active .level-tile::after,
html[data-game-ui="modern"] #heroSelect .hero-tile.active::after {
  width: 54px;
  background: linear-gradient(90deg, transparent, #ffd45e);
  box-shadow: 0 0 9px rgba(255, 205, 74, 0.48);
}

html[data-game-ui="modern"] #levelSelect .level-preview {
  border-radius: inherit;
  filter: saturate(0.92) contrast(1.03);
}

html[data-game-ui="modern"] #levelSelect .level-entry.active .level-preview {
  filter: saturate(1.08) contrast(1.05) brightness(1.04);
}

html[data-game-ui="modern"] #levelSelect .level-entry > .level-name,
html[data-game-ui="modern"] #heroSelect .hero-name {
  color: #b8cfdb;
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelSelect .level-entry.active > .level-name,
html[data-game-ui="modern"] #heroSelect .hero-tile.active .hero-name {
  color: #ffe27b;
  text-shadow: 0 0 10px rgba(255, 207, 76, 0.2);
}

html[data-game-ui="modern"] #heroSelect .hero-tile {
  padding: 9px;
  gap: 7px;
}

html[data-game-ui="modern"] #heroSelect .hero-tile .icon {
  height: clamp(118px, 17vh, 160px);
  aspect-ratio: auto;
  border: 1px solid rgba(95, 190, 228, 0.2);
  border-radius: 2px 11px 2px 11px;
  background:
    radial-gradient(circle at 50% 20%, rgba(59, 156, 196, 0.19), transparent 58%),
    rgba(4, 20, 39, 0.86);
}

html[data-game-ui="modern"] #heroSelect .hero-avatar-image {
  object-fit: contain;
}

html[data-game-ui="modern"] #heroSelect .hero-tile.active .icon {
  border-color: rgba(255, 215, 98, 0.52);
  box-shadow: inset 0 0 18px rgba(255, 200, 53, 0.08);
}

html[data-game-ui="modern"] #heroSelect .hero-tile.active::before {
  content: "SELECTED";
  position: absolute;
  z-index: 3;
  top: 7px;
  right: 8px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 220, 105, 0.5);
  border-radius: 2px 6px 2px 6px;
  color: #ffe38a;
  background: rgba(9, 16, 23, 0.82);
  font-size: 7px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow: 0 0 9px rgba(255, 198, 54, 0.12);
  pointer-events: none;
}

html[data-game-ui="modern"] #heroSelect .hero-tile.disabled {
  opacity: 0.38;
  filter: grayscale(0.62) saturate(0.48);
}

html[data-game-ui="modern"] #heroSelect .hero-tile.unavailable-other {
  border-color: rgba(242, 150, 76, 0.48);
  border-style: solid;
  box-shadow: inset 3px 0 rgba(241, 137, 61, 0.36);
}

html[data-game-ui="modern"] #heroSelect .hero-picker-tag {
  border-color: rgba(83, 206, 240, 0.26);
  border-radius: 2px 7px 2px 7px;
  color: #9fd5e5;
  background: rgba(10, 54, 74, 0.55);
  font-size: 8px;
  letter-spacing: 0.55px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #heroSelect .hero-unavailable-note {
  color: #f2a96d;
  font-size: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelSelect .level-pagination {
  margin: 0 20px;
  padding: 13px 0;
  border-top: 1px solid rgba(98, 180, 213, 0.13);
}

html[data-game-ui="modern"] #levelSelect .level-page-label {
  min-width: 118px;
  padding: 7px 10px;
  border: 1px solid rgba(85, 195, 231, 0.16);
  border-radius: 2px 8px 2px 8px;
  color: #7fa6ba;
  background: rgba(2, 12, 26, 0.64);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .btn {
  min-height: 39px;
  border: 1px solid rgba(101, 181, 218, 0.3);
  border-radius: 2px 9px 2px 9px;
  color: #cfe4ef;
  background:
    linear-gradient(180deg, rgba(60, 135, 171, 0.16), rgba(10, 33, 51, 0.18)),
    rgba(5, 17, 32, 0.94);
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .btn:hover:not(:disabled) {
  border-color: rgba(81, 216, 255, 0.68);
  color: #f2fbff;
  background: rgba(24, 87, 116, 0.48);
  box-shadow: 0 0 14px rgba(67, 201, 241, 0.14), inset 0 1px rgba(255, 255, 255, 0.08);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .btn:disabled {
  opacity: 0.34;
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-actions {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(98, 180, 213, 0.13);
  background: rgba(1, 8, 19, 0.28);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-actions .btn.primary {
  min-width: 174px;
  min-height: 42px;
  border-color: rgba(255, 220, 111, 0.74);
  color: #281a05;
  background: linear-gradient(180deg, #ffe486, #d49a31);
  box-shadow: 0 0 18px rgba(240, 177, 56, 0.2), inset 0 1px rgba(255, 255, 255, 0.58);
}

html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-actions .btn.primary:hover:not(:disabled) {
  border-color: #fff0ad;
  color: #1e1304;
  background: linear-gradient(180deg, #ffeca0, #e4a83b);
  box-shadow: 0 0 22px rgba(245, 185, 61, 0.3), inset 0 1px rgba(255, 255, 255, 0.66);
}

@keyframes modern-selector-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  html[data-game-ui="modern"] #levelSelect:not(.leaderboard-rush-layout) .level-select-layout {
    width: min(960px, 94vw);
  }

  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-card {
    width: min(960px, 94vw);
  }
}

@media (max-width: 640px) {
  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) {
    padding: 7px;
  }

  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-card {
    width: 97vw;
    max-height: 97vh;
    border-radius: 3px 17px 3px 17px;
  }

  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-header {
    min-height: 64px;
    padding: 12px 14px 11px 18px;
  }

  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-title {
    font-size: 20px;
  }

  html[data-game-ui="modern"] #heroSelect #heroSelectStatus {
    max-width: 58%;
    font-size: 8px;
  }

  html[data-game-ui="modern"] :is(#levelSelect .level-grid, #heroSelect .hero-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
  }

  html[data-game-ui="modern"] #levelSelect .level-pagination {
    margin: 0 12px;
    gap: 7px;
  }

  html[data-game-ui="modern"] #levelSelect .level-page-label {
    min-width: 0;
  }

  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-actions {
    padding: 11px 12px 13px;
  }

  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-actions .btn.primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-game-ui="modern"] :is(#levelSelect, #heroSelect) .level-select-card {
    animation: none;
  }

  html[data-game-ui="modern"] #levelSelect .level-tile,
  html[data-game-ui="modern"] #heroSelect .hero-tile {
    transition: none;
  }
}

/* The instrument dock overrides these free-standing styles for the Modern frame. */
.stage .replay-controls.instrument-replay {
  width: var(--replay-dock-size, 62px);
  height: var(--replay-dock-size, 62px);
}

.replay-controls.instrument-replay .replay-btn {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 2px solid #c6a770;
  border-radius: 50%;
  color: transparent;
  font-size: 0;
  background: radial-gradient(ellipse at 35% 22%, #547b78, #204950 45%, #102e38 78%);
  box-shadow: inset 0 2px 3px #e6edca55, inset 0 -4px 8px #061b28, 0 2px 3px #06151dcc;
  transition: filter 140ms ease, box-shadow 140ms ease;
}

.replay-controls.instrument-replay .replay-btn::before {
  content: "↺";
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  color: #f1dba9;
  font: 30px/1 "Trebuchet MS", sans-serif;
  text-shadow: 0 1px 2px #122a2c;
}

.replay-controls.instrument-replay .replay-btn::after {
  content: "REPLAY";
  position: absolute;
  left: 0;
  top: auto;
  bottom: 10px;
  width: 100%;
  transform: none;
  color: #f1dfb8;
  font: 900 8px/1 "Trebuchet MS", sans-serif;
  letter-spacing: .7px;
  text-align: center;
  text-shadow: 0 1px 2px #132d30;
}

.replay-controls.instrument-replay .replay-btn:hover:not(:disabled),
.replay-controls.instrument-replay .replay-btn:focus-visible {
  transform: none;
  filter: brightness(1.18);
  border-color: #f4d895;
  outline: 2px solid #f4dfac;
  outline-offset: 2px;
  box-shadow: inset 0 2px 4px #f2edba55, inset 0 -4px 8px #0b2b36, 0 0 10px #e3b66f55;
}

.replay-controls.instrument-replay .replay-btn:active:not(:disabled) {
  transform: none;
  filter: brightness(.92);
  box-shadow: inset 0 3px 8px #041923;
}

.replay-controls.instrument-replay .replay-btn:disabled {
  opacity: 1;
  filter: saturate(.35) brightness(.64);
  box-shadow: inset 0 2px 5px #071f2a;
}

.replay-controls.instrument-replay.replay-active .replay-btn { visibility: hidden; }

.replay-controls.instrument-replay .replay-actions {
  left: 0;
  top: 0;
  bottom: auto;
  width: 100%;
  height: 100%;
  transform: none;
  padding: 6px 7px;
  gap: 3px;
  border: 1px solid #cfb079;
  border-radius: 24px;
  background: #173d44;
  box-shadow: inset 0 2px 5px #071f2a;
}

.replay-controls.instrument-replay .replay-actions .replay-mini {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  border: 1px solid #a18d65;
  border-radius: 9px;
  color: #f0dfba;
  background: linear-gradient(#3b6264, #173640);
  font: 900 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: .3px;
}

.replay-controls.instrument-replay .replay-actions .replay-mini:focus-visible {
  outline: 2px solid #f4dfac;
  outline-offset: 1px;
}

/* Modern replay controls: broadcast capture control and replay archive console. */
html[data-game-ui="modern"] .replay-controls {
  width: 100px;
  height: 66px;
}

html[data-game-ui="modern"] .replay-btn {
  position: relative;
  width: 100px;
  height: 66px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(82, 217, 248, 0.5);
  border-radius: 3px 16px 3px 16px;
  color: transparent;
  background:
    linear-gradient(115deg, rgba(73, 217, 250, 0.17), transparent 44%),
    linear-gradient(160deg, rgba(14, 33, 57, 0.98), rgba(4, 10, 24, 0.99));
  font-size: 0;
  box-shadow:
    inset 3px 0 rgba(75, 219, 251, 0.8),
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(61, 207, 247, 0.14);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

html[data-game-ui="modern"] .replay-btn::before {
  content: "↺";
  position: absolute;
  top: 50%;
  left: 13px;
  transform: translateY(-54%);
  color: #64dcf8;
  font: 400 28px/1 "Arial Narrow", sans-serif;
  text-shadow: 0 0 13px rgba(92, 224, 255, 0.7);
}

html[data-game-ui="modern"] .replay-btn::after {
  content: "INSTANT\A REPLAY";
  position: absolute;
  top: 50%;
  left: 43px;
  transform: translateY(-50%);
  color: #eefaff;
  font: 900 9.5px/1.12 "Arial Narrow", sans-serif;
  letter-spacing: 0.85px;
  text-align: left;
  white-space: pre;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.72);
}

html[data-game-ui="modern"] .replay-btn:hover:not(:disabled),
html[data-game-ui="modern"] .replay-btn:focus-visible {
  transform: translateY(-2px);
  outline: 1px solid rgba(104, 229, 255, 0.85);
  outline-offset: 2px;
  border-color: rgba(107, 230, 255, 0.86);
  box-shadow:
    inset 3px 0 #72e6ff,
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(61, 207, 247, 0.28);
}

html[data-game-ui="modern"] .replay-btn:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(1.12);
}

html[data-game-ui="modern"] .replay-btn:disabled {
  opacity: 0.46;
  filter: saturate(0.45);
  box-shadow: inset 3px 0 rgba(75, 219, 251, 0.4), 0 8px 18px rgba(0, 0, 0, 0.28);
}

html[data-game-ui="modern"] .replay-actions {
  bottom: calc(100% + 9px);
  width: 100px;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(79, 211, 244, 0.28);
  border-radius: 3px 12px 3px 12px;
  background:
    linear-gradient(150deg, rgba(55, 201, 237, 0.1), transparent 45%),
    rgba(4, 12, 28, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.05);
}

html[data-game-ui="modern"] .replay-actions .replay-mini {
  min-width: 0;
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid rgba(106, 198, 226, 0.24);
  border-radius: 2px 8px 2px 8px;
  color: #dff7ff;
  background: rgba(16, 48, 73, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: none;
}

html[data-game-ui="modern"] .replay-actions .replay-mini:hover,
html[data-game-ui="modern"] .replay-actions .replay-mini:focus-visible {
  outline: none;
  border-color: rgba(105, 226, 255, 0.72);
  color: #fff;
  background: rgba(31, 102, 136, 0.78);
}

html[data-game-ui="modern"] .replay-modal {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(29, 151, 187, 0.15), transparent 31%),
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(79, 205, 235, 0.055) 18.2% 18.45%, transparent 18.7% 30%, rgba(79, 205, 235, 0.04) 30.2% 30.4%, transparent 30.65%),
    linear-gradient(rgba(68, 180, 214, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 180, 214, 0.025) 1px, transparent 1px),
    rgba(0, 5, 15, 0.82);
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  backdrop-filter: blur(8px);
}

html[data-game-ui="modern"] .replay-modal-card {
  position: relative;
  width: min(560px, 92vw);
  overflow: hidden;
  border: 1px solid rgba(75, 211, 244, 0.36);
  border-radius: 4px 22px 4px 22px;
  background:
    linear-gradient(120deg, rgba(71, 215, 249, 0.105), transparent 32%),
    linear-gradient(160deg, rgba(13, 30, 53, 0.985), rgba(3, 9, 22, 0.995));
  box-shadow:
    inset 4px 0 rgba(74, 218, 249, 0.74),
    inset 0 1px rgba(255, 255, 255, 0.07),
    0 30px 80px rgba(0, 0, 0, 0.72),
    0 0 38px rgba(42, 190, 229, 0.12);
}

html[data-game-ui="modern"] .replay-modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 155px;
  height: 72px;
  border-bottom: 1px solid rgba(81, 217, 248, 0.2);
  background: linear-gradient(145deg, transparent 34%, rgba(75, 217, 248, 0.09));
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

html[data-game-ui="modern"] .replay-modal-header {
  position: relative;
  z-index: 1;
  min-height: 78px;
  padding: 15px 18px 12px 22px;
  border-bottom: 1px solid rgba(87, 196, 226, 0.15);
  background: rgba(0, 8, 21, 0.3);
}

html[data-game-ui="modern"] .replay-modal-title {
  display: grid;
  color: #f1fbff;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] .replay-modal-title::before {
  content: "REPLAY ARCHIVE  /  LAST SHOT";
  margin-bottom: 7px;
  color: #5bdcf9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.7px;
}

html[data-game-ui="modern"] .replay-modal-title::after {
  content: "Preserve a memorable play in your personal vault";
  margin-top: 7px;
  color: #819daf;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.35px;
  text-transform: none;
}

html[data-game-ui="modern"] #replaySaveClose {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(102, 203, 231, 0.26);
  border-radius: 2px 9px 2px 9px;
  color: transparent;
  background: rgba(12, 39, 60, 0.68);
  font-size: 0;
  box-shadow: none;
}

html[data-game-ui="modern"] #replaySaveClose::before {
  content: "×";
  color: #b9d9e7;
  font-size: 19px;
  font-weight: 400;
}

html[data-game-ui="modern"] #replaySaveClose:hover,
html[data-game-ui="modern"] #replaySaveClose:focus-visible {
  outline: none;
  border-color: rgba(104, 226, 255, 0.72);
  color: transparent;
  background: rgba(24, 83, 112, 0.76);
}

html[data-game-ui="modern"] .replay-modal-body {
  gap: 8px;
  padding: 19px 22px 21px;
}

html[data-game-ui="modern"] .replay-label {
  margin-top: 4px;
  color: #8ca8b9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

html[data-game-ui="modern"] .replay-input {
  padding: 10px 12px;
  border: 1px solid rgba(104, 193, 220, 0.24);
  border-radius: 2px 9px 2px 9px;
  outline: none;
  color: #edf9ff;
  background:
    linear-gradient(90deg, rgba(65, 205, 239, 0.06), transparent 44%),
    rgba(0, 7, 18, 0.78);
  font-size: 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

html[data-game-ui="modern"] .replay-input::placeholder {
  color: rgba(142, 169, 184, 0.58);
}

html[data-game-ui="modern"] .replay-input:hover {
  border-color: rgba(104, 210, 238, 0.42);
}

html[data-game-ui="modern"] .replay-input:focus {
  border-color: rgba(95, 224, 254, 0.9);
  background: rgba(1, 12, 27, 0.94);
  box-shadow: 0 0 0 2px rgba(72, 207, 240, 0.12), 0 0 18px rgba(55, 201, 237, 0.1);
}

html[data-game-ui="modern"] .replay-input.replay-notes {
  min-height: 104px;
  line-height: 1.45;
}

html[data-game-ui="modern"] .replay-modal-actions {
  gap: 8px;
  padding: 12px 22px 17px;
  border-top: 1px solid rgba(84, 184, 214, 0.12);
  background: rgba(0, 7, 18, 0.38);
}

html[data-game-ui="modern"] .replay-modal-actions .btn {
  min-height: 36px;
  padding: 8px 15px;
  border: 1px solid rgba(95, 188, 215, 0.25);
  border-radius: 2px 9px 2px 9px;
  color: #cce7f2;
  background: rgba(18, 55, 79, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  box-shadow: none;
}

html[data-game-ui="modern"] .replay-modal-actions .btn.primary {
  border-color: rgba(255, 206, 100, 0.68);
  color: #1b1203;
  background: linear-gradient(180deg, #ffe28b, #d59a27);
  box-shadow: 0 0 18px rgba(229, 170, 51, 0.18), inset 0 1px rgba(255, 252, 222, 0.6);
}

html[data-game-ui="modern"] .replay-modal-actions .btn:hover,
html[data-game-ui="modern"] .replay-modal-actions .btn:focus-visible {
  outline: none;
  filter: brightness(1.12);
}

@media (max-width: 720px) {
  html[data-game-ui="modern"] .replay-modal-card {
    width: min(94vw, 560px);
  }

  html[data-game-ui="modern"] .replay-modal-header {
    min-height: 70px;
    padding-left: 17px;
  }

  html[data-game-ui="modern"] .replay-modal-title {
    font-size: 19px;
  }

  html[data-game-ui="modern"] .replay-modal-body,
  html[data-game-ui="modern"] .replay-modal-actions {
    padding-left: 17px;
    padding-right: 17px;
  }
}

/* Modern replay browser: full match-vault presentation for the home-screen archive. */
html[data-game-ui="modern"] #replayBrowserScreen {
  overflow: auto;
  padding: 24px;
  color: #eaf7ff;
  background:
    linear-gradient(rgba(64, 182, 226, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 182, 226, 0.026) 1px, transparent 1px),
    radial-gradient(780px 480px at 12% 16%, rgba(19, 132, 176, 0.25), transparent 70%),
    radial-gradient(720px 520px at 88% 78%, rgba(92, 53, 166, 0.18), transparent 72%),
    radial-gradient(520px 260px at 50% 104%, rgba(224, 170, 64, 0.065), transparent 70%),
    linear-gradient(145deg, #06101f 0%, #071528 45%, #050a16 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto, auto;
  font-family: "Bahnschrift Condensed", "Agency FB", "Trebuchet MS", sans-serif;
  isolation: isolate;
}

html[data-game-ui="modern"] #replayBrowserScreen::before,
html[data-game-ui="modern"] #replayBrowserScreen::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

html[data-game-ui="modern"] #replayBrowserScreen::before {
  top: -300px;
  right: -190px;
  width: 720px;
  height: 720px;
  border: 1px solid rgba(84, 203, 244, 0.075);
  box-shadow: 0 0 0 74px rgba(84, 203, 244, 0.02), 0 0 0 148px rgba(84, 203, 244, 0.012);
}

html[data-game-ui="modern"] #replayBrowserScreen::after {
  bottom: -370px;
  left: -270px;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(194, 143, 255, 0.07);
  box-shadow: 0 0 0 88px rgba(147, 89, 219, 0.016), 0 0 0 176px rgba(147, 89, 219, 0.009);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-card {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 48px));
  height: min(820px, calc(100vh - 48px));
  min-height: 520px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(94, 199, 239, 0.29);
  border-radius: 4px 26px 4px 26px;
  background:
    linear-gradient(108deg, rgba(49, 169, 216, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(10, 27, 49, 0.97), rgba(4, 12, 27, 0.985));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.055),
    inset 4px 0 rgba(69, 201, 240, 0.42);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: modern-menu-enter 340ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  right: 26px;
  left: 4px;
  height: 2px;
  background: linear-gradient(90deg, #46d8ff, rgba(70, 216, 255, 0.12) 36%, transparent 78%);
  box-shadow: 0 0 14px rgba(70, 216, 255, 0.36);
  pointer-events: none;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-modern-header {
  min-height: 104px;
  padding: 22px 27px 18px 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(93, 179, 218, 0.16);
  background: linear-gradient(90deg, rgba(31, 126, 168, 0.12), transparent 42%), rgba(2, 10, 23, 0.3);
}

html[data-game-ui="modern"] #replayBrowserScreen .menu-modern-kicker {
  display: block;
  margin-bottom: 6px;
  color: #63d9f6;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #replayBrowserScreen .screen-title {
  margin: 0;
  color: #effbff;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-modern-subtitle {
  display: block;
  margin-top: 8px;
  color: #839fb1;
  font-size: 10px;
  letter-spacing: 0.3px;
}

html[data-game-ui="modern"] #replayBrowserScreen .menu-modern-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(86, 206, 238, 0.2);
  border-radius: 2px 9px 2px 9px;
  color: #a9c8d8;
  background: rgba(9, 35, 54, 0.55);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

html[data-game-ui="modern"] #replayBrowserScreen .menu-modern-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60e6a0;
  box-shadow: 0 0 10px rgba(96, 230, 160, 0.8);
  animation: modern-status-pulse 2s ease-in-out infinite;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-controls {
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 14px 22px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(82, 177, 208, 0.12);
  background: rgba(1, 9, 21, 0.3);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-controls label {
  color: #86a5b7;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-controls .duel-input {
  min-height: 38px;
  padding: 8px 34px 8px 11px;
  border: 1px solid rgba(98, 190, 218, 0.24);
  border-radius: 2px 9px 2px 9px;
  outline: none;
  color: #e9f8ff;
  background: rgba(1, 10, 24, 0.8);
  font-size: 11px;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-controls .duel-input:focus {
  border-color: rgba(91, 220, 255, 0.82);
  box-shadow: 0 0 0 2px rgba(72, 207, 240, 0.1);
}

html[data-game-ui="modern"] #replayBrowserRefreshBtn {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid rgba(94, 201, 232, 0.28);
  border-radius: 2px 9px 2px 9px;
  color: #dff7ff;
  background: rgba(18, 66, 92, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: none;
}

html[data-game-ui="modern"] #replayBrowserRefreshBtn:hover,
html[data-game-ui="modern"] #replayBrowserRefreshBtn:focus-visible {
  outline: none;
  border-color: rgba(104, 226, 255, 0.72);
  background: rgba(28, 101, 134, 0.78);
}

html[data-game-ui="modern"] #replayBrowserStatus {
  margin: 0;
  padding: 9px 24px 8px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(82, 177, 208, 0.09);
  color: #6f91a6 !important;
  background: rgba(0, 7, 17, 0.24);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-list {
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 13px 17px 14px 20px;
  flex: 1 1 auto;
  gap: 7px;
  overflow-y: auto;
  scrollbar-color: rgba(74, 206, 239, 0.5) rgba(2, 11, 25, 0.65);
  scrollbar-width: thin;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-list::-webkit-scrollbar {
  width: 8px;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-list::-webkit-scrollbar-track {
  background: rgba(2, 11, 25, 0.65);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(2, 11, 25, 0.65);
  border-radius: 8px;
  background: rgba(74, 206, 239, 0.5);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-item {
  position: relative;
  min-height: 82px;
  padding: 10px 11px 10px 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 92px;
  gap: 12px;
  border: 1px solid rgba(91, 176, 208, 0.16);
  border-radius: 3px 14px 3px 14px;
  background:
    linear-gradient(100deg, rgba(59, 193, 229, 0.075), transparent 30%),
    rgba(5, 18, 36, 0.78);
  box-shadow: inset 3px 0 rgba(62, 199, 234, 0.24), 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  animation: replay-vault-row-enter 260ms ease-out both;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-item:hover {
  transform: translateX(3px);
  border-color: rgba(92, 213, 244, 0.4);
  background: linear-gradient(100deg, rgba(59, 193, 229, 0.13), transparent 38%), rgba(7, 25, 46, 0.9);
  box-shadow: inset 3px 0 rgba(74, 218, 250, 0.7), 0 8px 20px rgba(0, 0, 0, 0.24);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-item:nth-child(2) { animation-delay: 24ms; }
html[data-game-ui="modern"] #replayBrowserScreen .replay-item:nth-child(3) { animation-delay: 48ms; }
html[data-game-ui="modern"] #replayBrowserScreen .replay-item:nth-child(4) { animation-delay: 72ms; }
html[data-game-ui="modern"] #replayBrowserScreen .replay-item:nth-child(5) { animation-delay: 96ms; }
html[data-game-ui="modern"] #replayBrowserScreen .replay-item:nth-child(n + 6) { animation-delay: 112ms; }

@keyframes replay-vault-row-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-modern-index {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(85, 190, 221, 0.13);
  color: rgba(110, 213, 239, 0.58);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.4px;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(120px, 1fr) max-content;
  align-content: center;
  gap: 4px 18px;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-name {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #eefaff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-score {
  color: #ffd66f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-profile {
  overflow: hidden;
  color: #8fbbce;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-date {
  color: #668699;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-align: right;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-meta .replay-notes {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #718d9e;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-item > .replay-mini {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  align-self: center;
  border: 1px solid rgba(88, 207, 238, 0.34);
  border-radius: 2px 10px 2px 10px;
  color: #e3f9ff;
  background: linear-gradient(135deg, rgba(42, 151, 188, 0.56), rgba(10, 54, 80, 0.86));
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 0 14px rgba(40, 188, 226, 0.08);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-item > .replay-mini::before {
  content: "▶";
  margin-right: 6px;
  color: #73e5ff;
  font-size: 7px;
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-item > .replay-mini:hover,
html[data-game-ui="modern"] #replayBrowserScreen .replay-item > .replay-mini:focus-visible {
  outline: none;
  border-color: rgba(114, 229, 255, 0.82);
  background: linear-gradient(135deg, rgba(49, 184, 222, 0.72), rgba(13, 72, 102, 0.92));
  box-shadow: 0 0 18px rgba(58, 205, 241, 0.18);
}

html[data-game-ui="modern"] #replayBrowserScreen .replay-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(95, 190, 220, 0.22);
  border-radius: 3px 16px 3px 16px;
  color: #7695a8;
  background: rgba(3, 14, 29, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #replayBrowserScreen .screen-actions {
  margin: 0;
  padding: 11px 20px 15px;
  flex: 0 0 auto;
  border-top: 1px solid rgba(82, 177, 208, 0.12);
  background: rgba(0, 7, 18, 0.36);
}

html[data-game-ui="modern"] #replayBrowserBackBtn {
  min-height: 34px;
  padding: 7px 15px;
  border: 1px solid rgba(95, 188, 215, 0.25);
  border-radius: 2px 9px 2px 9px;
  color: #cce7f2;
  background: rgba(18, 55, 79, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  box-shadow: none;
}

html[data-game-ui="modern"] #replayBrowserBackBtn:hover,
html[data-game-ui="modern"] #replayBrowserBackBtn:focus-visible {
  outline: none;
  border-color: rgba(105, 226, 255, 0.7);
  background: rgba(28, 92, 123, 0.78);
}

@media (max-width: 760px) {
  html[data-game-ui="modern"] #replayBrowserScreen {
    padding: 12px;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-card {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-modern-header {
    min-height: 90px;
    padding: 18px;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .menu-modern-status {
    display: none;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-controls {
    grid-template-columns: 1fr auto;
    padding: 12px 15px;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-controls label {
    grid-column: 1 / -1;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-item {
    grid-template-columns: 38px minmax(0, 1fr) 70px;
    gap: 8px;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-meta {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-name,
  html[data-game-ui="modern"] #replayBrowserScreen .replay-meta .replay-notes {
    grid-column: 1;
  }

  html[data-game-ui="modern"] #replayBrowserScreen .replay-date {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-game-ui="modern"] #replayBrowserScreen .replay-browser-card,
  html[data-game-ui="modern"] #replayBrowserScreen .menu-modern-status i,
  html[data-game-ui="modern"] #replayBrowserScreen .replay-item {
    animation: none;
  }
}

/* Modern results and Rush records: authoritative post-match console. */
html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal) {
  background:
    radial-gradient(circle at 50% -12%, rgba(51, 183, 226, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(1, 8, 19, 0.88), rgba(0, 4, 12, 0.97));
  backdrop-filter: blur(5px) saturate(1.08);
  font-family: "Bahnschrift", "Franklin Gothic Medium", sans-serif;
}

html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal)::before,
html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal)::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal)::before {
  top: -290px;
  right: -210px;
  width: 740px;
  height: 740px;
  border: 1px solid rgba(84, 203, 244, 0.075);
  box-shadow:
    0 0 0 74px rgba(84, 203, 244, 0.02),
    0 0 0 148px rgba(84, 203, 244, 0.012),
    inset 0 0 105px rgba(42, 166, 213, 0.032);
}

html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal)::after {
  bottom: -350px;
  left: -270px;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(194, 143, 255, 0.07);
  box-shadow: 0 0 0 88px rgba(147, 89, 219, 0.016);
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-card,
html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-card {
  position: relative;
  z-index: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(94, 199, 239, 0.29);
  border-radius: 4px 26px 4px 26px;
  background:
    linear-gradient(108deg, rgba(49, 169, 216, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(10, 27, 49, 0.98), rgba(4, 12, 27, 0.99));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.055),
    inset 4px 0 rgba(69, 201, 240, 0.42);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: modern-menu-enter 340ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-card::before,
html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  right: 26px;
  left: 4px;
  height: 2px;
  background: linear-gradient(90deg, #46d8ff, rgba(70, 216, 255, 0.12) 36%, transparent 78%);
  box-shadow: 0 0 14px rgba(70, 216, 255, 0.36);
  pointer-events: none;
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-card {
  width: min(1180px, calc(100vw - 42px));
  height: min(900px, calc(100vh - 42px));
  max-height: none;
  display: flex;
  flex-direction: column;
}

html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-card {
  width: min(1080px, calc(100vw - 42px));
  max-height: min(820px, calc(100vh - 42px));
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-modern-header,
html[data-game-ui="modern"] #leaderboardRushModal .level-select-header {
  min-height: 104px;
  padding: 20px 26px 17px 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(93, 179, 218, 0.16);
  background:
    linear-gradient(90deg, rgba(31, 126, 168, 0.12), transparent 42%),
    rgba(2, 10, 23, 0.3);
}

html[data-game-ui="modern"] #matchSummaryScreen :is(.menu-modern-kicker, .menu-modern-status),
html[data-game-ui="modern"] #matchSummaryScreen .match-summary-modern-subtitle,
html[data-game-ui="modern"] #leaderboardRushModal :is(.leaderboard-rush-kicker, .leaderboard-rush-subtitle) {
  display: flex;
}

html[data-game-ui="modern"] #matchSummaryScreen .menu-modern-kicker,
html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-kicker {
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #65cbe8;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #matchSummaryScreen .menu-modern-kicker > span {
  width: 17px;
  height: 7px;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
  background: #4cdcff;
  box-shadow: 0 0 9px rgba(76, 220, 255, 0.75);
}

html[data-game-ui="modern"] #matchSummaryScreen .screen-title,
html[data-game-ui="modern"] #leaderboardRushModal .level-select-title {
  margin: 0;
  color: #f4f9fc;
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.62);
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-modern-subtitle,
html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-subtitle {
  margin-top: 7px;
  color: #7f9daf;
  font: 10px "Trebuchet MS", sans-serif;
  letter-spacing: 0.2px;
}

html[data-game-ui="modern"] #matchSummaryScreen .menu-modern-status {
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(77, 222, 160, 0.22);
  border-radius: 2px 9px 2px 9px;
  color: #8fe8bd;
  background: rgba(27, 115, 75, 0.09);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #matchSummaryScreen .menu-modern-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ce5a0;
  box-shadow: 0 0 10px rgba(92, 229, 160, 0.75);
  animation: modern-lobby-status-pulse 2s ease-in-out infinite;
}

html[data-game-ui="modern"] #leaderboardRushModal #leaderboardRushCloseBtn {
  min-width: 82px;
  min-height: 38px;
}

html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal) .btn {
  border: 1px solid rgba(101, 181, 218, 0.3);
  border-radius: 2px 9px 2px 9px;
  color: #cfe4ef;
  background:
    linear-gradient(180deg, rgba(60, 135, 171, 0.16), rgba(10, 33, 51, 0.18)),
    rgba(5, 17, 32, 0.92);
  font-family: "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  font-weight: 900;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal) .btn:hover:not(:disabled) {
  border-color: rgba(81, 216, 255, 0.65);
  color: #f2fbff;
  background: rgba(24, 87, 116, 0.45);
  box-shadow: 0 0 14px rgba(67, 201, 241, 0.13), inset 0 1px rgba(255, 255, 255, 0.08);
}

html[data-game-ui="modern"] #matchSummaryScreen .btn.primary {
  border-color: rgba(255, 218, 112, 0.72);
  color: #281a05;
  background: linear-gradient(180deg, #ffe486, #d49a31);
  box-shadow: 0 0 16px rgba(240, 177, 56, 0.18), inset 0 1px rgba(255, 255, 255, 0.58);
}

html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-controls {
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 11px;
  padding: 14px 23px;
  border-bottom: 1px solid rgba(82, 177, 208, 0.12);
  background: rgba(1, 9, 21, 0.3);
}

html[data-game-ui="modern"] #leaderboardRushModal .duel-label {
  color: #86a5b7;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

html[data-game-ui="modern"] #leaderboardRushModal .duel-input {
  min-height: 40px;
  margin: 0;
  padding: 8px 34px 8px 11px;
  border: 1px solid rgba(98, 190, 218, 0.24);
  border-radius: 2px 9px 2px 9px;
  outline: none;
  color: #e9f8ff;
  background: rgba(1, 10, 24, 0.8);
  font: 11px "Bahnschrift", sans-serif;
}

html[data-game-ui="modern"] #leaderboardRushModal .duel-input:focus {
  border-color: rgba(91, 220, 255, 0.82);
  box-shadow: 0 0 0 2px rgba(72, 207, 240, 0.1);
}

html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-table-wrap {
  min-height: 350px;
  max-height: min(590px, calc(100vh - 210px));
  margin: 0;
  padding: 20px 23px 24px;
  overflow: auto;
  scrollbar-color: rgba(74, 206, 239, 0.5) rgba(2, 11, 25, 0.65);
  scrollbar-width: thin;
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result) .stats-block-title,
html[data-game-ui="modern"] #matchSummaryScreen .stats-block-title {
  margin-bottom: 10px;
  color: #eaf8fc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result, #matchSummaryScreen) .stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(84, 174, 207, 0.14);
  background: rgba(1, 9, 19, 0.62);
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result, #matchSummaryScreen) .stats-table th {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(88, 179, 211, 0.16);
  color: #6f91a3;
  background: rgba(29, 76, 95, 0.12);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result, #matchSummaryScreen) .stats-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(77, 151, 178, 0.09);
  color: #c8dae3;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result) .stats-table tbody tr:first-child {
  background: linear-gradient(90deg, rgba(255, 202, 79, 0.12), rgba(24, 69, 89, 0.08));
  box-shadow: inset 3px 0 #f5c654;
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result) .stats-table tbody tr:first-child td {
  color: #f5e2ad;
}

html[data-game-ui="modern"] :is(#leaderboardRushModal, #levelSummaryOverlay.leaderboard-rush-result, #matchSummaryScreen) .stats-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Leaderboard Rush end-of-run overlay */
html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result {
  inset: 0;
  padding: 18px;
  border-radius: 0;
  background:
    radial-gradient(circle at 52% -8%, rgba(55, 187, 228, 0.15), transparent 40%),
    rgba(0, 5, 14, 0.84);
  backdrop-filter: blur(10px) saturate(1.12);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-card {
  position: relative;
  width: min(1120px, calc(100vw - 42px));
  max-height: min(780px, calc(100vh - 42px));
  padding: 0;
  gap: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(94, 199, 239, 0.29);
  border-radius: 4px 26px 4px 26px;
  background:
    linear-gradient(108deg, rgba(49, 169, 216, 0.08), transparent 34%),
    linear-gradient(155deg, rgba(10, 27, 49, 0.985), rgba(4, 12, 27, 0.99));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.6),
    inset 4px 0 rgba(69, 201, 240, 0.42);
  animation: modern-menu-enter 340ms cubic-bezier(0.2, 0.75, 0.24, 1) both;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  right: 26px;
  left: 4px;
  height: 2px;
  background: linear-gradient(90deg, #46d8ff, rgba(70, 216, 255, 0.12) 36%, transparent 78%);
  box-shadow: 0 0 14px rgba(70, 216, 255, 0.36);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-head {
  min-height: 100px;
  padding: 20px 28px 17px 31px;
  align-content: center;
  border-bottom: 1px solid rgba(93, 179, 218, 0.16);
  background: linear-gradient(90deg, rgba(31, 126, 168, 0.12), transparent 42%), rgba(2, 10, 23, 0.3);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-title {
  display: grid;
  gap: 5px;
  color: #f4f9fc;
  font: 900 clamp(26px, 3vw, 36px)/1 "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.62);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-title::before {
  content: "RUSH CIRCUIT  /  AUTHORITATIVE RUN REPORT";
  color: #65cbe8;
  font-size: 8px;
  line-height: 1;
  letter-spacing: 2.2px;
  text-shadow: none;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-sub {
  color: #7f9daf;
  font-size: 10px;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-grid {
  gap: 14px;
  padding: 17px 19px 20px;
  scrollbar-color: rgba(74, 206, 239, 0.5) transparent;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-team {
  position: relative;
  padding: 17px;
  gap: 10px;
  border: 1px solid rgba(104, 183, 220, 0.17);
  border-radius: 3px 17px 3px 17px;
  background:
    linear-gradient(140deg, rgba(65, 170, 212, 0.075), transparent 30%),
    rgba(3, 13, 29, 0.67);
  box-shadow: inset 3px 0 rgba(65, 199, 236, 0.18), 0 12px 25px rgba(0, 0, 0, 0.18);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .leaderboard-rush-result-card::before,
html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .leaderboard-rush-result-board::before {
  content: "RUN TELEMETRY";
  color: #5ccdea;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .leaderboard-rush-result-board::before {
  content: "GLOBAL POSITION";
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-team-title {
  color: #dff7ff;
  font-size: 15px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-team-score {
  color: #ffd66f;
  font-size: clamp(25px, 3vw, 36px);
  text-shadow: 0 0 14px rgba(255, 204, 80, 0.24);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-hero {
  color: #799aad;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-player {
  border-top-color: rgba(88, 174, 207, 0.12);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-player-name {
  color: #edfaff;
  font-size: 14px;
  font-weight: 900;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-line {
  color: #7896a8;
  font-size: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-line strong {
  color: #d8e9f0;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-actions,
html[data-game-ui="modern"] #matchSummaryScreen .screen-actions {
  min-height: 66px;
  margin: 0;
  padding: 13px 22px 15px;
  flex: 0 0 auto;
  justify-content: flex-end;
  border-top: 1px solid rgba(82, 177, 208, 0.12);
  background: rgba(0, 7, 18, 0.42);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-actions .btn,
html[data-game-ui="modern"] #matchSummaryScreen .screen-actions .btn {
  min-width: 145px;
  min-height: 38px;
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-actions .btn {
  border: 1px solid rgba(101, 181, 218, 0.3);
  border-radius: 2px 9px 2px 9px;
  color: #cfe4ef;
  background: rgba(10, 38, 60, 0.82);
  font: 900 11px "Bahnschrift Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.65px;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-actions .btn.primary {
  border-color: rgba(255, 218, 112, 0.72);
  color: #281a05;
  background: linear-gradient(180deg, #ffe486, #d49a31);
}

/* Match summary data hierarchy */
html[data-game-ui="modern"] #matchSummaryScreen .match-summary-scroll {
  min-height: 0;
  padding: 16px 20px 22px;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-color: rgba(74, 206, 239, 0.5) rgba(2, 11, 25, 0.65);
  scrollbar-width: thin;
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-header {
  min-height: 38px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(76, 217, 255, 0.13);
  border-left: 3px solid #4dd8ff;
  color: #8db0c1;
  background: linear-gradient(90deg, rgba(45, 169, 208, 0.1), transparent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-summary {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin: 0 0 14px;
  border: 1px solid rgba(84, 174, 207, 0.14);
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-pill {
  min-height: 78px;
  padding: 15px 16px;
  border-color: rgba(84, 174, 207, 0.12);
  background: rgba(3, 15, 29, 0.58);
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-pill-key {
  margin-bottom: 9px;
  color: #6f91a3;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-pill-val {
  color: #edfaff;
  font-size: clamp(18px, 1.8vw, 25px);
  font-weight: 800;
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-pill:first-child {
  background: linear-gradient(125deg, rgba(255, 203, 78, 0.12), rgba(3, 15, 29, 0.58));
  box-shadow: inset 3px 0 #f4c853;
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-pill:first-child .stats-pill-val {
  color: #ffd66f;
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-progression {
  margin: 0 0 14px;
  padding: 14px 16px 10px;
  border: 1px solid rgba(84, 174, 207, 0.16);
  border-left: 3px solid #49d8ff;
  border-radius: 2px 14px 2px 14px;
  background: linear-gradient(145deg, rgba(12, 33, 48, 0.92), rgba(3, 13, 27, 0.94));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-progression-head {
  border-bottom-color: rgba(84, 174, 207, 0.13);
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-progression-head h3 {
  color: #eaf8fc;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-progression-head p {
  color: #7896a8;
}

html[data-game-ui="modern"] #matchSummaryScreen .match-summary-progression-head > span {
  border-color: rgba(75, 216, 255, 0.28);
  color: #68dbf7;
  background: rgba(47, 183, 218, 0.06);
}

html[data-game-ui="modern"] #matchSummaryScreen .stats-block {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(104, 183, 220, 0.16);
  border-radius: 3px 15px 3px 15px;
  background: rgba(3, 13, 29, 0.62);
}

@media (max-width: 760px) {
  html[data-game-ui="modern"] #matchSummaryScreen,
  html[data-game-ui="modern"] #leaderboardRushModal,
  html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result {
    padding: 10px;
  }

  html[data-game-ui="modern"] #matchSummaryScreen .match-summary-card,
  html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-card,
  html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-card {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-height: none;
  }

  html[data-game-ui="modern"] #matchSummaryScreen .match-summary-modern-header,
  html[data-game-ui="modern"] #leaderboardRushModal .level-select-header,
  html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-head {
    min-height: 88px;
    padding: 16px 18px;
  }

  html[data-game-ui="modern"] #matchSummaryScreen .menu-modern-status,
  html[data-game-ui="modern"] :is(#matchSummaryScreen, #leaderboardRushModal) :is(.match-summary-modern-subtitle, .leaderboard-rush-subtitle) {
    display: none;
  }

  html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-controls {
    grid-template-columns: 1fr auto;
    padding: 12px 15px;
  }

  html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-controls label {
    grid-column: 1 / -1;
  }

  html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-table-wrap {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    padding: 14px;
  }

  html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-card {
    display: flex;
    flex-direction: column;
  }

  html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-grid {
    grid-template-columns: 1fr;
  }

  html[data-game-ui="modern"] #matchSummaryScreen .stats-summary {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  html[data-game-ui="modern"] #matchSummaryScreen .stats-pill:nth-child(n) {
    border: 0;
    border-right: 1px solid rgba(84, 174, 207, 0.12);
    border-bottom: 1px solid rgba(84, 174, 207, 0.12);
  }

  html[data-game-ui="modern"] #matchSummaryScreen .screen-actions,
  html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-actions {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-game-ui="modern"] #matchSummaryScreen .match-summary-card,
  html[data-game-ui="modern"] #leaderboardRushModal .leaderboard-rush-card,
  html[data-game-ui="modern"] #levelSummaryOverlay.leaderboard-rush-result .level-summary-card,
  html[data-game-ui="modern"] #matchSummaryScreen .menu-modern-status i {
    animation: none;
  }
}
