@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");

:root {
  --bg: #0c111b;
  --bg2: #0a0f17;
  --panel: #141c28;
  --panel2: #0e151f;
  --text: #e7edf7;
  --muted: rgba(231, 237, 247, 0.62);
  --border: rgba(231, 237, 247, 0.14);
  --border2: rgba(231, 237, 247, 0.24);
  --brand: #ff7a18;
  --brand2: #4b1f86;
  --metal: rgba(231, 237, 247, 0.09);
  --good: #22c55e;
  --warn: #f59e0b;
  --display-font: "Bebas Neue", "VRL-Oswald", "VRL-Audiowide", ui-sans-serif, system-ui;
  --surface-texture: repeating-linear-gradient(
    135deg,
    rgba(231, 237, 247, 0.04) 0,
    rgba(231, 237, 247, 0.04) 1px,
    transparent 1px,
    transparent 6px
  );
}

@font-face {
  font-family: "VRL-Audiowide";
  src: url("/public/fonts/Audiowide-regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "VRL-Oswald";
  src: url("/public/fonts/Oswald-regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "VRL-Oswald";
  src: url("/public/fonts/Oswald-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "VRL-Fira";
  src: url("/public/fonts/FiraSansCondensed-regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "VRL-Fira";
  src: url("/public/fonts/FiraSansCondensed-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "VRL-Fira", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:
    radial-gradient(900px 480px at 18% 0%, rgba(255, 122, 24, 0.22), transparent 60%),
    radial-gradient(900px 520px at 90% 16%, rgba(75, 31, 134, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), transparent 20%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
}

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

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

.muted strong {
  color: rgba(231, 237, 247, 0.78);
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(231, 237, 247, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 237, 247, 0.82);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.85);
  border-bottom: 1px solid rgba(231, 237, 247, 0.16);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-family: "VRL-Audiowide", ui-sans-serif, system-ui;
  font-size: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(231, 237, 247, 0.92);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 122, 24, 0.45);
  background: rgba(10, 15, 23, 0.35);
  box-shadow: inset 0 1px 0 rgba(231, 237, 247, 0.10);
}

.brand-text {
  display: inline-block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 12px;
  color: rgba(231, 237, 247, 0.70);
  border: 1px solid rgba(231, 237, 247, 0.12);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02));
}

.nav-link:hover {
  color: rgba(231, 237, 247, 0.92);
  border-color: rgba(231, 237, 247, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 122, 24, 0.22), rgba(231, 237, 247, 0.03));
}

.nav-link.active {
  color: rgba(231, 237, 247, 0.95);
  border-color: rgba(255, 122, 24, 0.60);
  background:
    linear-gradient(180deg, rgba(255, 122, 24, 0.36), rgba(231, 237, 247, 0.04));
  box-shadow: 0 10px 26px rgba(255, 122, 24, 0.12);
}

.nav-link.is-telemetry-live {
  color: rgba(255, 226, 226, 0.96);
  border-color: rgba(239, 68, 68, 0.8);
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.35), rgba(231, 237, 247, 0.04));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), 0 10px 24px rgba(239, 68, 68, 0.2);
  animation: telemetryPulse 1.3s ease-in-out infinite;
}

@keyframes telemetryPulse {
  0%,
  100% {
    transform: translateZ(0);
    filter: brightness(0.95);
  }
  50% {
    filter: brightness(1.2);
  }
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: transparent;
  border: 1px solid rgba(231, 237, 247, 0.12);
  cursor: pointer;
  font: inherit;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(14, 21, 31, 0.98);
  border: 1px solid rgba(231, 237, 247, 0.16);
  padding: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(231, 237, 247, 0.72);
}

.dropdown-item:hover {
  color: rgba(231, 237, 247, 0.92);
  background: rgba(231, 237, 247, 0.08);
}

.dropdown-sep {
  height: 1px;
  margin: 6px 4px;
  background: rgba(231, 237, 247, 0.16);
}

main.container {
  padding: 26px 0 34px;
}

.home-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid rgba(255, 122, 24, 0.55);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(231, 237, 247, 0.10);
  background: rgba(10, 15, 23, 0.35);
}

.home-hero h1 {
  margin: 0 0 6px;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.live-ribbon {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.08), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(231, 237, 247, 0.08),
    0 18px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 14px;
}

.live-ribbon-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-ribbon-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.live-week {
  font-family: var(--display-font);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.live-ribbon-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-ribbon-ticker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border-top: 1px dashed rgba(231, 237, 247, 0.16);
  padding: 8px 0 0 0;
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 8px;
  z-index: 2;
  padding: 4px 10px 4px 0;
  background:
    linear-gradient(90deg, rgba(10, 15, 23, 0.95) 0%, rgba(10, 15, 23, 0.75) 70%, rgba(10, 15, 23, 0));
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: rgba(231, 237, 247, 0.92);
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
  min-width: max-content;
  padding-left: 110px;
}

.ticker-track.ticker-animate {
  animation: ticker-scroll 22s linear infinite;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.3);
  background: rgba(255, 122, 24, 0.08);
  font-size: 12px;
}

.ticker-seed {
  font-family: var(--display-font);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.ticker-time {
  font-weight: 700;
  color: rgba(255, 233, 210, 0.95);
}

.ticker-name {
  font-size: 11px;
  color: rgba(231, 237, 247, 0.62);
}

.ticker-empty {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.6);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.home-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  align-items: start;
}

.home-panels {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background:
    var(--surface-texture),
    rgba(10, 15, 23, 0.35);
  border: 1px solid rgba(231, 237, 247, 0.08);
}

.mini-row[data-team-color] {
  border-left: 3px solid var(--team-color);
  padding-left: 6px;
}

.mini-row[data-team-color] .mini-avatar {
  box-shadow: 0 0 0 2px var(--team-color);
}

.mini-row.tied {
  border-color: rgba(255, 80, 80, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 80, 80, 0.25), 0 0 18px rgba(255, 80, 80, 0.15);
}

.mini-row.tied .mini-rank {
  border-color: rgba(255, 80, 80, 0.75);
  background: rgba(255, 80, 80, 0.2);
  color: rgba(255, 230, 230, 0.95);
}

.mini-link {
  color: inherit;
  text-decoration: none;
}

.mini-link:hover {
  border-color: rgba(255, 122, 24, 0.45);
  background: rgba(255, 122, 24, 0.08);
}

.mini-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.45);
  background: rgba(255, 122, 24, 0.12);
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(255, 233, 210, 0.95);
}

.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background: rgba(231, 237, 247, 0.06);
  object-fit: cover;
}

.mini-name {
  font-weight: 600;
}

.mini-score {
  margin-left: auto;
  color: rgba(231, 237, 247, 0.62);
  font-size: 12px;
}

.mini-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: rgba(254, 202, 202, 0.95);
  font-size: 11px;
  font-weight: 700;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(231, 237, 247, 0.14);
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.30);
  box-shadow: inset 0 1px 0 rgba(231, 237, 247, 0.08);
}

.feed-avatar {
  flex: 0 0 auto;
}

.feed-name {
  color: inherit;
  text-decoration: none;
}

.feed-name:hover {
  color: rgba(255, 122, 24, 0.95);
}

.feed-avatar .avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.feed-body {
  flex: 1;
  min-width: 0;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.feed-ts {
  color: rgba(231, 237, 247, 0.62);
  font-size: 12px;
}

.feed-pill {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 237, 247, 0.85);
  font-weight: 700;
  font-family: var(--display-font);
}

.feed-link {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.40);
  background: rgba(255, 122, 24, 0.12);
  color: rgba(231, 237, 247, 0.86);
  font-family: var(--display-font);
}

.feed-link:hover {
  border-color: rgba(255, 122, 24, 0.62);
  background: rgba(255, 122, 24, 0.22);
}

.feed-msg {
  line-height: 1.25;
}

.feed-msg strong {
  font-family: var(--display-font);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.good {
  color: rgba(34, 197, 94, 0.95);
}

.warn {
  color: rgba(245, 158, 11, 0.95);
}

.footer {
  padding: 18px 0 28px;
  border-top: 1px solid var(--border);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  display: block;
  padding: 14px 14px;
  border-radius: 16px;
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.07), rgba(231, 237, 247, 0.02)),
    radial-gradient(140% 120% at 20% 0%, rgba(255, 122, 24, 0.12), transparent 45%),
    rgba(14, 21, 31, 0.78);
  border: 1px solid rgba(231, 237, 247, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(231, 237, 247, 0.10),
    0 16px 50px rgba(0, 0, 0, 0.40);
}

.card:hover {
  border-color: rgba(255, 122, 24, 0.52);
}

.card h3 {
  position: relative;
  margin: 0 0 6px;
  padding-left: 12px;
  font-family: var(--display-font);
  font-size: 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.card h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 122, 24, 0.95), rgba(255, 122, 24, 0.2));
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.tryouts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tryouts-header h1 {
  margin: 0 0 6px;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tryouts-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tryouts-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
}

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

.range {
  width: 100%;
}

.select {
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.18);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(0, 0, 0, 0.02)),
    rgba(10, 15, 23, 0.55);
  color: rgba(231, 237, 247, 0.92);
  outline: none;
}

.select:focus {
  border-color: rgba(255, 122, 24, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.14);
}

.timeline-label {
  min-width: 210px;
  text-align: right;
  font-size: 12px;
}

.popover {
  position: relative;
}

.popover-menu {
  display: none;
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 10px);
  width: min(420px, calc(100vw - 64px));
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(14, 21, 31, 0.98);
  border: 1px solid rgba(231, 237, 247, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  padding: 12px;
}

.popover-menu.open {
  display: block;
}

.popover-title {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(231, 237, 247, 0.85);
  margin-bottom: 10px;
}

.popover-row {
  width: 100%;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(0, 0, 0, 0.12);
}

.popover-row + .popover-row {
  margin-top: 10px;
}

.pill.playing {
  border-color: rgba(34, 197, 94, 0.25);
  color: rgba(34, 197, 94, 0.95);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(231, 237, 247, 0.75);
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.08), rgba(231, 237, 247, 0.02)),
    rgba(14, 21, 31, 0.78);
  color: rgba(231, 237, 247, 0.70);
  font-size: 12px;
}

.track-pill {
  border-color: rgba(255, 122, 24, 0.45);
  color: rgba(255, 233, 210, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 122, 24, 0.18), rgba(255, 122, 24, 0.06)),
    rgba(14, 21, 31, 0.75);
  white-space: nowrap;
}

.pill.ok {
  color: rgba(34, 197, 94, 0.95);
  border-color: rgba(34, 197, 94, 0.25);
}

.pill.warn {
  color: rgba(245, 158, 11, 0.95);
  border-color: rgba(245, 158, 11, 0.25);
}

.tryouts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.panel {
  border-radius: 14px;
  border: 1px solid rgba(231, 237, 247, 0.18);
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.08), rgba(231, 237, 247, 0.02)),
    radial-gradient(120% 100% at 20% 0%, rgba(75, 31, 134, 0.16), transparent 52%),
    rgba(14, 21, 31, 0.72);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(231, 237, 247, 0.10),
    0 18px 50px rgba(0, 0, 0, 0.42);
}

.panel-title {
  position: relative;
  display: block;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid rgba(231, 237, 247, 0.14);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.10), rgba(231, 237, 247, 0.02)),
    rgba(12, 17, 27, 0.50);
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}

.panel-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(255, 122, 24, 0.95), rgba(255, 122, 24, 0.15));
  box-shadow: 0 0 12px rgba(255, 122, 24, 0.45);
}

.panel-title[href] {
  cursor: pointer;
  transition: color 0.2s ease;
}

.panel-title[href]:hover {
  color: rgba(255, 140, 57, 0.95);
}

.panel-body {
  padding: 12px 14px;
}

.panel-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-collapsible > summary::-webkit-details-marker {
  display: none;
}

.panel-collapsible > summary::after {
  content: "▾";
  font-size: 14px;
  color: rgba(231, 237, 247, 0.6);
  transition: transform 0.2s ease;
}

.panel-collapsible[open] > summary::after {
  transform: rotate(180deg);
}

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 122, 24, 0.4);
  background: rgba(255, 122, 24, 0.08);
  margin-bottom: 12px;
}

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

.race-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.race-preview {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(231, 237, 247, 0.18);
  background: rgba(0, 0, 0, 0.12);
}

.race-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.race-tier-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.14);
  background:
    var(--surface-texture),
    rgba(0, 0, 0, 0.12);
}

.race-tier-title {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.race-round {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}

.race-detail {
  margin: 0;
}

.race-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.race-detail-header .avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.race-detail-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.race-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(231, 237, 247, 0.72);
}

.race-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.race-tab-btn {
  border-radius: 999px;
  border: 1px solid rgba(231, 237, 247, 0.2);
  background: rgba(15, 23, 42, 0.4);
  color: rgba(231, 237, 247, 0.8);
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.race-tab-btn.active {
  border-color: rgba(255, 122, 24, 0.6);
  color: rgba(231, 237, 247, 0.95);
  background: rgba(255, 122, 24, 0.12);
}

.race-panel {
  display: none;
}

.race-panel.active {
  display: block;
}

.race-tier-tabs {
  margin-bottom: 12px;
}

.race-tier-panels {
  display: grid;
  gap: 12px;
}

.race-tier-panel {
  display: none;
}

.race-tier-panel.active {
  display: block;
}

.race-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.race-finals-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.race-card {
  border-radius: 14px;
  border: 1px solid rgba(231, 237, 247, 0.14);
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.35);
  padding: 12px;
}

.race-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  margin-top: 16px;
}

.race-detail-card {
  height: 100%;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-chip.team-link {
  color: inherit;
  text-decoration: none;
}

.team-chip.team-link:hover {
  text-decoration: underline;
}

tr[data-team-color] .team-logo,
.team-chip[data-team-color] .team-logo {
  box-shadow: 0 0 0 2px var(--team-color);
}

.team-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.race-card-title {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 14px;
  margin-bottom: 4px;
}

.race-card-subtitle {
  color: rgba(231, 237, 247, 0.6);
  font-size: 12px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .race-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.race-table .pilot-chip {
  gap: 8px;
}

.race-table tr.race-missing td {
  color: rgba(252, 165, 165, 0.95);
  background: rgba(239, 68, 68, 0.08);
}

.race-table tr.contender td {
  background: rgba(34, 197, 94, 0.08);
}

.race-table td.latest-fast {
  color: rgba(34, 197, 94, 0.95);
  font-weight: 700;
}

.race-table .dnr {
  color: rgba(248, 113, 113, 0.9);
  font-weight: 700;
}

.race-heat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 12px;
}

.race-table tr[data-team-color] td:first-child {
  box-shadow: inset 3px 0 0 0 var(--team-color);
}

.race-table tr.is-tied td {
  background: rgba(255, 214, 102, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.35);
}

.race-final-team-cell[data-team-color] {
  border-left: 3px solid var(--team-color);
  padding-left: 8px;
}

.race-finals-heats {
  display: grid;
  gap: 12px;
}

.race-final-heat {
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background:
    var(--surface-texture),
    rgba(0, 0, 0, 0.18);
  padding: 10px;
}

.race-final-title {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 13px;
  margin-bottom: 8px;
}

.race-final-grid {
  max-height: none;
}

.race-final-grid th.pair-divider,
.race-final-grid td.pair-divider {
  border-left: 2px solid rgba(231, 237, 247, 0.22);
}

.race-final-team-head {
  min-width: 180px;
  text-align: left;
}

.race-final-team-cell {
  display: grid;
  gap: 6px;
}

.race-final-team-name {
  font-weight: 700;
  font-size: 13px;
}

.race-final-team-pilots {
  display: grid;
  gap: 6px;
}

.race-final-pilot-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.race-final-pilot-line .avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.race-final-cell {
  display: grid;
  gap: 6px;
  text-align: center;
}

.race-final-scoreline {
  font-size: 12px;
  font-weight: 600;
}

.race-final-result {
  border-radius: 999px;
  border: 1px solid rgba(251, 146, 60, 0.7);
  background: rgba(249, 115, 22, 0.16);
  color: rgba(253, 186, 116, 0.95);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  letter-spacing: 0.3px;
}

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

.team-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-header-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.team-card {
  border-radius: 16px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.4);
  padding: 14px;
}

.team-card-link {
  cursor: pointer;
}

.team-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.team-card-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  align-self: center;
  flex: 0 0 auto;
}

.team-title {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 18px;
}

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

.team-pilot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background:
    var(--surface-texture),
    rgba(0, 0, 0, 0.16);
}

.team-pilot.is-retired,
.team-pilot-card.is-retired {
  opacity: 0.5;
  filter: saturate(0.6);
}

.team-pilot .avatar {
  width: 36px;
  height: 36px;
}

.team-pilot-name {
  font-weight: 700;
  font-size: 12px;
}

.team-pilot-meta {
  font-size: 11px;
  color: rgba(231, 237, 247, 0.6);
}

.team-pilot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.team-pilot-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(231, 237, 247, 0.02)),
    rgba(9, 12, 20, 0.55);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-pilot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 57, 0.5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.team-pilot-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-pilot-avatar {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  border: 2px solid rgba(255, 140, 57, 0.35);
  background: rgba(10, 12, 20, 0.5);
  object-fit: cover;
  flex-shrink: 0;
}

.team-pilot-name {
  font-size: 18px;
}

.team-pilot-country {
  font-size: 13px;
}

.team-pilot-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.team-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.race-grid .select,
.race-grid .input {
  background: transparent;
  border: none;
  color: inherit;
  margin-left: 6px;
  padding: 0;
}

.race-grid .input {
  color: rgba(231, 237, 247, 0.9);
}

.race-grid .table .dnr {
  color: rgba(239, 68, 68, 0.9);
  font-weight: 700;
}

.race-grid .table tr.contender td {
  background: rgba(34, 197, 94, 0.08);
}

.race-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 920px) {
  .race-grid {
    grid-template-columns: 1fr;
  }
  .race-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .race-round {
    grid-template-columns: 1fr;
  }
  .team-list {
    grid-template-columns: 1fr;
  }
  .team-roster {
    grid-template-columns: 1fr;
  }
  .pilot-header {
    align-items: flex-start;
  }
  .pilot-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .pilot-avatar-lg {
    width: min(280px, 70vw);
    height: min(280px, 70vw);
  }
  .pilot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .team-pilot-grid {
    grid-template-columns: 1fr;
  }

  .team-pilot-avatar {
    width: 96px;
    height: 96px;
  }
}

.input {
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.18);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(0, 0, 0, 0.02)),
    rgba(10, 15, 23, 0.55);
  color: var(--text);
  outline: none;
  margin-bottom: 10px;
}

.input:focus {
  border-color: rgba(255, 122, 24, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.14);
}

.stats-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-tabs[hidden] {
  display: none !important;
}

.stats-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.35);
  background: rgba(255, 122, 24, 0.08);
  color: rgba(231, 237, 247, 0.8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
}

.stats-tab.active {
  border-color: rgba(255, 122, 24, 0.75);
  background: rgba(255, 122, 24, 0.22);
  color: rgba(255, 243, 230, 0.95);
}

.stats-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.stats-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: rgba(231, 237, 247, 0.8);
}

.stats-toggle input {
  width: 16px;
  height: 16px;
  accent-color: rgba(255, 122, 24, 0.9);
}

.stats-search {
  margin-bottom: 0;
  min-width: 200px;
}

.stats-table th.sortable {
  cursor: pointer;
}

.stats-table th .sort-indicator {
  font-size: 11px;
  color: rgba(231, 237, 247, 0.6);
}

.stats-table tr[data-team-color] td:first-child {
  box-shadow: inset 3px 0 0 var(--team-color);
}

.stats-spotlight {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats-spotlight[hidden] {
  display: none !important;
}

.spotlight-card {
  border-radius: 18px;
  border: 1px solid rgba(231, 237, 247, 0.14);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.06), rgba(0, 0, 0, 0.02)),
    rgba(10, 16, 24, 0.6);
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.08);
}

.spotlight-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.spotlight-card-title {
  font-family: var(--display-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(231, 237, 247, 0.92);
}

.spotlight-tabs .stats-tab {
  padding: 4px 12px;
  font-size: 11px;
}

.spotlight-list {
  display: grid;
  gap: 10px;
}

.spotlight-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(12, 18, 28, 0.65);
}

.spotlight-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(231, 237, 247, 0.6);
}

.spotlight-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: rgba(231, 237, 247, 0.9);
}

.spotlight-heat-link {
  color: rgba(231, 237, 247, 0.72);
  text-decoration: none;
}

.spotlight-heat-link:hover {
  color: rgba(255, 201, 145, 0.95);
}

.spotlight-vod-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 10px;
  color: rgba(255, 178, 90, 0.95);
}

.spotlight-pilot-link {
  color: inherit;
  text-decoration: none;
}

.spotlight-pilot-link:hover {
  color: rgba(255, 210, 160, 0.95);
}

.spotlight-team-link {
  color: inherit;
  text-decoration: none;
}

.spotlight-team-link:hover {
  color: rgba(255, 210, 160, 0.95);
}

.spotlight-gap {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 194, 120, 0.95);
}

.spotlight-pilot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spotlight-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 2px solid rgba(231, 237, 247, 0.28);
  object-fit: cover;
  background: rgba(10, 16, 24, 0.8);
}

.spotlight-avatar-mini[data-team-color] {
  border-color: var(--team-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 35%, transparent);
}

.spotlight-note {
  color: rgba(231, 237, 247, 0.6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.spotlight-podiums {
  display: grid;
  gap: 18px;
}

.spotlight-podium-block {
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(8, 12, 20, 0.6);
}

.spotlight-podium-title {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(231, 237, 247, 0.8);
  margin-bottom: 10px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
}

.spotlight-podium-stand {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.spotlight-podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.spotlight-avatar-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.spotlight-podium-card.placeholder {
  opacity: 0.4;
}

.spotlight-avatar {
  border-radius: 24px;
  border: 3px solid rgba(231, 237, 247, 0.35);
  object-fit: cover;
  background: rgba(10, 16, 24, 0.85);
  max-width: 100%;
}

.spotlight-avatar[data-team-color] {
  border-color: var(--team-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--team-color) 35%, transparent);
}

.spotlight-podium-card.place-1 .spotlight-avatar {
  width: 256px;
  height: 256px;
}

.spotlight-podium-card.place-2 .spotlight-avatar {
  width: 160px;
  height: 160px;
}

.spotlight-podium-card.place-3 .spotlight-avatar {
  width: 128px;
  height: 128px;
}

.spotlight-pilot-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.spotlight-team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.spotlight-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: rgba(231, 237, 247, 0.7);
}

.spotlight-stat-label {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 11px;
}

.spotlight-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 233, 210, 0.95);
}

.spotlight-stat-meta {
  font-size: 11px;
  color: rgba(231, 237, 247, 0.6);
}

.spotlight-empty {
  padding: 12px;
}

.spotlight-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 14, 0.75);
  z-index: 999;
  padding: 24px;
}

.spotlight-modal.is-open {
  display: flex;
}

.spotlight-modal-card {
  width: min(720px, 90vw);
  max-height: min(82vh, 720px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(231, 237, 247, 0.18);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.08), rgba(0, 0, 0, 0.02)),
    rgba(8, 12, 20, 0.95);
  padding: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.spotlight-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.spotlight-modal-title {
  font-family: var(--display-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(231, 237, 247, 0.92);
}

.spotlight-modal-title a {
  color: inherit;
  text-decoration: none;
}

.spotlight-modal-title a:hover {
  color: rgba(255, 201, 145, 0.95);
}

.spotlight-modal-close {
  border: 1px solid rgba(255, 122, 24, 0.55);
  background: rgba(255, 122, 24, 0.12);
  color: rgba(255, 233, 210, 0.95);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
}

.spotlight-heat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(231, 237, 247, 0.1);
}

.spotlight-heat-row:last-child {
  border-bottom: none;
}

.spotlight-heat-rank {
  min-width: 48px;
  font-weight: 700;
  color: rgba(255, 194, 120, 0.95);
}

.spotlight-heat-pilot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.spotlight-heat-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
}

.spotlight-heat-time {
  min-width: 70px;
  text-align: right;
  font-weight: 700;
  color: rgba(231, 237, 247, 0.92);
}

.spotlight-heat-row.is-dnf .spotlight-heat-time {
  color: rgba(255, 185, 185, 0.95);
}

.spotlight-heat-row.is-dnr .spotlight-heat-time {
  color: rgba(255, 120, 120, 0.95);
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 270px);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: left;
  white-space: nowrap;
  line-height: 1.2;
}

.table th:not(:last-child),
.table td:not(:last-child) {
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.table th {
  color: rgba(231, 237, 247, 0.70);
  font-family: var(--display-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  position: sticky;
  top: 0;
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.10), rgba(231, 237, 247, 0.02)),
    rgba(14, 21, 31, 0.96);
}

.table .week-block-even {
  box-shadow: inset 0 0 0 9999px rgba(231, 237, 247, 0.04);
}

.table .week-divider {
  border-right: 1px dotted rgba(231, 237, 247, 0.22);
}

.rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.55);
  background: rgba(255, 122, 24, 0.12);
  font-family: var(--display-font);
  font-weight: 700;
  color: rgba(255, 233, 210, 0.95);
}

.season-tied td {
  background: rgba(255, 80, 80, 0.06);
}

.season-tied .rank-chip {
  border-color: rgba(255, 80, 80, 0.75);
  background: rgba(255, 80, 80, 0.2);
  color: rgba(255, 230, 230, 0.95);
}

.highlight-list {
  display: grid;
  gap: 10px;
}

.highlight-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background:
    var(--surface-texture),
    linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(75, 31, 134, 0.12)),
    rgba(14, 21, 31, 0.8);
}

.highlight-kicker {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(231, 237, 247, 0.62);
  margin-bottom: 6px;
}

.highlight-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.gap-highlight {
  color: rgba(255, 233, 210, 0.95);
  font-weight: 700;
}

.highlight-meta {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.6);
}

.row-link {
  cursor: pointer;
}

.row-link:hover td {
  background: rgba(231, 237, 247, 0.06);
}

.row-link.active td {
  background: rgba(255, 122, 24, 0.14);
}

.row-tier-alt td {
  background: rgba(0, 0, 0, 0.14);
}

.row-cut-48 td {
  border-top: 2px solid rgba(255, 122, 24, 0.55);
}

.row-cut-64 td {
  border-top: 2px solid rgba(75, 31, 134, 0.55);
}

.roster-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roster-row {
  display: grid;
  grid-template-columns: 32px 60px 42px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.14);
  background: rgba(0, 0, 0, 0.12);
}

.roster-row[data-tier-break="1"] {
  border-bottom: 2px dotted rgba(231, 237, 247, 0.35);
  padding-bottom: 16px;
}

.tier-label td {
  padding-top: 12px;
  padding-bottom: 8px;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(231, 237, 247, 0.7);
  border-bottom: 2px dotted rgba(231, 237, 247, 0.35);
  background: rgba(0, 0, 0, 0.12);
}

.table tr[data-tier-break="1"] td {
  border-bottom: 2px dotted rgba(231, 237, 247, 0.35);
}

.roster-tier-label {
  list-style: none;
  padding: 12px 10px 8px;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(231, 237, 247, 0.7);
  border-bottom: 2px dotted rgba(231, 237, 247, 0.35);
}

.vote-stack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vote-btn {
  border: 1px solid rgba(231, 237, 247, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(231, 237, 247, 0.8);
  font-size: 12px;
  cursor: pointer;
}

.vote-btn:hover {
  border-color: rgba(255, 122, 24, 0.5);
  color: rgba(231, 237, 247, 0.95);
}

.vote-btn.selected {
  border-color: rgba(255, 122, 24, 0.9);
  color: #fff;
  background: rgba(255, 122, 24, 0.2);
}

.vote-stack.vote-locked .vote-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

.roster-highlight {
  border-color: rgba(255, 122, 24, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 122, 24, 0.2);
  background: rgba(255, 122, 24, 0.12);
}

.roster-vote-highlight td {
  background: rgba(34, 197, 94, 0.12);
}

.tier-shift {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(231, 237, 247, 0.7);
}

.tier-shift-delta {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(231, 237, 247, 0.18);
  font-size: 11px;
  font-weight: 700;
}

.tier-shift-delta.up {
  border-color: rgba(34, 197, 94, 0.6);
  color: rgba(34, 197, 94, 0.95);
}

.tier-shift-delta.down {
  border-color: rgba(239, 68, 68, 0.6);
  color: rgba(239, 68, 68, 0.95);
}

.roster-highlight-toggle {
  white-space: nowrap;
}

.roster-row.row-tier-alt {
  background: rgba(0, 0, 0, 0.22);
}

.roster-row.dragging {
  opacity: 0.6;
}

.roster-handle {
  font-size: 18px;
  letter-spacing: -2px;
  cursor: grab;
  color: rgba(231, 237, 247, 0.55);
  user-select: none;
}

.roster-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.45);
  background: rgba(255, 122, 24, 0.12);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.roster-name {
  font-weight: 700;
}

.roster-meta {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.6);
  white-space: nowrap;
}

.pilot-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background: rgba(231, 237, 247, 0.06);
  object-fit: cover;
}

.team-logo-inline {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background: rgba(231, 237, 247, 0.05);
  object-fit: contain;
}

.team-logo-inline.team-logo-plain {
  border: none;
  background: transparent;
  box-shadow: none;
}

[data-team-color] .avatar,
.avatar[data-team-color],
[data-team-color] .pilot-avatar-lg,
.pilot-avatar-lg[data-team-color],
[data-team-color] .team-pilot-avatar,
.team-pilot-avatar[data-team-color] {
  box-shadow: 0 0 0 2px var(--team-color);
}

[data-team-color] .team-logo-inline,
.team-logo-inline[data-team-color] {
  box-shadow: 0 0 0 2px var(--team-color);
}

[data-team-color] .team-logo-inline.team-logo-plain,
.team-logo-inline.team-logo-plain[data-team-color] {
  box-shadow: none;
}

.pilot-name {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.pilot-chip-row {
  width: 100%;
}

.pilot-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.pilot-name-row .team-logo-inline {
  margin-left: auto;
}

.pilot-link {
  color: rgba(231, 237, 247, 0.90);
  text-decoration: underline;
  text-decoration-color: rgba(231, 237, 247, 0.24);
  text-underline-offset: 2px;
}

.pilot-link:hover {
  text-decoration-color: rgba(255, 122, 24, 0.70);
}

.race-vod-link {
  color: rgba(231, 237, 247, 0.88);
  text-decoration: underline;
  text-decoration-color: rgba(255, 122, 24, 0.45);
  text-underline-offset: 2px;
}

.race-vod-link:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 122, 24, 0.9);
}

.race-vod-icon {
  margin-left: 6px;
  font-size: 0.85em;
  color: var(--brand);
  vertical-align: 0.05em;
}

.race-vod-preview {
  color: var(--brand);
  text-decoration: none;
}

.race-vod-preview:hover {
  text-decoration: underline;
  text-decoration-color: rgba(255, 122, 24, 0.7);
  text-underline-offset: 2px;
}

.race-vod-preview.is-disabled {
  color: #6f7786;
  pointer-events: none;
  text-decoration: none;
}

.race-vod-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.race-vod-modal.is-open {
  display: flex;
}

.race-vod-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(4px);
}

.race-vod-card {
  position: relative;
  background: rgba(14, 18, 27, 0.95);
  border: 1px solid rgba(255, 128, 32, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  padding: 18px;
  width: min(960px, 92vw);
  z-index: 1;
}

.race-vod-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.race-vod-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.race-vod-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 128, 32, 0.15);
  border: 1px solid rgba(255, 128, 32, 0.5);
  color: #f8f2e8;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

.race-vod-close:hover {
  background: rgba(255, 128, 32, 0.35);
}

.team-link-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pilot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pilot-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}

.pilot-hero > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pilot-avatar-lg {
  width: min(360px, 60vw);
  height: min(360px, 60vw);
  border-radius: 24px;
  border: 1px solid rgba(231, 237, 247, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.22), rgba(75, 31, 134, 0.18)),
    rgba(0, 0, 0, 0.3);
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.pilot-name-lg {
  font-family: var(--display-font);
  font-size: clamp(28px, 4vw, 44px);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pilot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.pilot-bio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(231, 237, 247, 0.12);
}

.pilot-bio-row:last-child {
  border-bottom: none;
}

.captain-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 122, 24, 0.45);
  background: rgba(255, 122, 24, 0.12);
  color: rgba(231, 237, 247, 0.92);
  font-size: 11px;
  font-weight: 800;
}

.alt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(14, 116, 144, 0.18);
  color: rgba(224, 242, 254, 0.92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.featured-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.featured-current-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.featured-results {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.featured-search {
  margin-bottom: 10px;
}

.featured-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(10, 15, 23, 0.45);
  border: 1px solid rgba(231, 237, 247, 0.12);
}

.featured-name {
  font-weight: 700;
}

.featured-avatar {
  width: 36px;
  height: 36px;
}

.featured-meta {
  font-size: 12px;
}

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

.team-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(10, 15, 23, 0.45);
  flex-wrap: wrap;
}

.team-color-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-weight: 600;
  flex: 1 1 220px;
}

.team-color-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--team-color, rgba(231, 237, 247, 0.2));
  border: 1px solid rgba(231, 237, 247, 0.25);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.team-color-swatch[data-empty="1"] {
  background: rgba(231, 237, 247, 0.08);
}

.team-color-select {
  min-width: 160px;
}

.team-name-input {
  min-width: 220px;
  max-width: 280px;
}

.race-sub-meta {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.72);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: block;
}

.field-label {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.64);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--display-font);
}

.pill.small {
  padding: 6px 10px;
  font-size: 12px;
}

.pill.warn {
  border-color: rgba(245, 158, 11, 0.25);
  color: rgba(245, 158, 11, 0.95);
}

.smash-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smash-row {
  display: grid;
  grid-template-columns: 80px 1.1fr 2fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background:
    var(--surface-texture),
    linear-gradient(180deg, rgba(231, 237, 247, 0.07), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.30);
}

.smash-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.55);
  background: rgba(255, 122, 24, 0.12);
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(255, 233, 210, 0.95);
}

.smash-team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.smash-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 122, 24, 0.45);
  background: rgba(10, 15, 23, 0.35);
  object-fit: cover;
}

.smash-team-name {
  font-family: var(--display-font);
  font-size: 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.smash-team-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.smash-team-link:hover .smash-team-name {
  color: rgba(255, 145, 48, 0.95);
}

.smash-pilots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.smash-pilot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(0, 0, 0, 0.16);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.smash-pilot:hover {
  border-color: rgba(255, 122, 24, 0.45);
  background: rgba(255, 122, 24, 0.08);
}

.smash-pilot.missing {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.smash-pilot.missing .smash-pilot-meta {
  color: rgba(248, 113, 113, 0.9);
}

.smash-pilot-name {
  font-weight: 700;
  font-size: 13px;
}

.smash-pilot-meta {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.64);
}

.smash-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.smash-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background: rgba(10, 15, 23, 0.4);
}

.smash-view-btn {
  border: none;
  background: transparent;
  color: rgba(231, 237, 247, 0.7);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--display-font);
  cursor: pointer;
}

.smash-view-btn.active {
  color: #fff;
  background: rgba(255, 122, 24, 0.2);
  border: 1px solid rgba(255, 122, 24, 0.4);
}

.smash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smash-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background: rgba(12, 18, 30, 0.35);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--display-font);
}

.smash-root {
  min-height: 120px;
}

.smash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
}

.smash-column {
  display: grid;
  grid-template-rows: auto repeat(6, minmax(120px, auto));
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(231, 237, 247, 0.16);
  background:
    linear-gradient(180deg, rgba(231, 237, 247, 0.07), rgba(231, 237, 247, 0.02)),
    rgba(10, 15, 23, 0.3);
  min-width: 0;
  overflow: hidden;
}

.smash-grid-alt .smash-column {
  grid-template-rows: auto repeat(7, minmax(120px, auto));
}

.smash-column-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.smash-column-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(231, 237, 247, 0.64);
}

.missing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: rgba(254, 202, 202, 0.95);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.smash-column .smash-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  max-width: 100%;
}

.smash-tier-group {
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.1);
  background: rgba(8, 12, 20, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  min-width: 0;
}

.smash-tier-group.tier-disabled {
  opacity: 0.55;
}

.smash-tier-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(231, 237, 247, 0.7);
  font-family: var(--display-font);
}

.smash-tier-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.smash-column .smash-tier-body {
  align-items: stretch;
}

.smash-column .smash-pilot {
  width: 100%;
  align-items: center;
  padding: 6px;
}

.smash-column .smash-pilot-name,
.smash-column .smash-pilot-meta {
  white-space: normal;
  max-width: 100%;
}

.smash-pilot-vertical {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.smash-pilot-vertical .smash-pilot-name,
.smash-pilot-vertical .smash-pilot-meta {
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
  display: block;
}

.smash-column .smash-pilot .avatar {
  width: 80px;
  height: 80px;
}

.smash-column .smash-pilot-name {
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
  font-family: var(--display-font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.smash-column .smash-pilot-meta {
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  font-weight: 700;
}

.smash-tier-empty {
  font-size: 12px;
  color: rgba(231, 237, 247, 0.5);
  text-align: center;
  padding: 8px 4px;
}

@media (max-width: 920px) {
  .cards {
    grid-template-columns: 1fr;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-panels {
    grid-template-columns: 1fr;
  }
  .live-ribbon-ticker {
    flex-direction: column;
    align-items: flex-start;
  }
  .ticker-track.ticker-animate {
    animation: none;
  }
  .tryouts-grid {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .tryouts-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .smash-row {
    grid-template-columns: 1fr;
  }
  .smash-pilots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeline {
    flex-direction: column;
    align-items: stretch;
  }
  .timeline-label {
    min-width: unset;
    text-align: left;
  }
  .table-wrap {
    max-height: 50vh;
  }
}
