: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;
}

@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);
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.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: rgba(10, 15, 23, 0.35);
  border: 1px solid rgba(231, 237, 247, 0.08);
}

.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 {
  width: 28px;
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  letter-spacing: 0.4px;
  color: rgba(231, 237, 247, 0.85);
}

.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:
    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.72);
}

.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);
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  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:
    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 {
  margin: 0 0 6px;
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  font-size: 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  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;
}

.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:
    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 {
  padding: 12px 14px;
  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: "VRL-Oswald", ui-sans-serif, system-ui;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.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: rgba(0, 0, 0, 0.12);
}

.race-tier-title {
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  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-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:
    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-title {
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  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;
}

.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 .dnr {
  color: rgba(248, 113, 113, 0.9);
  font-weight: 700;
}

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

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

.race-final-title {
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  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;
}

.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-card {
  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(10, 15, 23, 0.4);
  padding: 14px;
}

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

.team-title {
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 18px;
}

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

.team-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);
}

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

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

.team-pilot-meta {
  font-size: 12px;
  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);
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.table th {
  color: rgba(231, 237, 247, 0.70);
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  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);
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  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: "VRL-Oswald", ui-sans-serif, system-ui;
  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 {
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  font-size: 16px;
  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;
}

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

.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);
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  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;
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
}

.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:
    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;
  font-family: "VRL-Oswald", ui-sans-serif, system-ui;
  font-size: 20px;
  letter-spacing: 0.8px;
  color: rgba(231, 237, 247, 0.85);
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  font-size: 18px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
  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: "VRL-Oswald", ui-sans-serif, system-ui;
}

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

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

.smash-column {
  display: grid;
  grid-template-rows: auto repeat(6, minmax(110px, auto));
  gap: 10px;
  padding: 12px;
  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-column-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(231, 237, 247, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

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

.smash-column .smash-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smash-tier-group {
  padding: 8px;
  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;
}

.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: "VRL-Oswald", ui-sans-serif, system-ui;
}

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

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

.smash-column .smash-pilot {
  width: auto;
  align-items: flex-start;
}

.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: auto;
}

.smash-pilot-vertical .smash-pilot-name,
.smash-pilot-vertical .smash-pilot-meta {
  text-align: center;
}

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

.smash-column .smash-pilot-name {
  font-size: 12px;
  line-height: 1.2;
}

.smash-column .smash-pilot-meta {
  font-size: 11px;
  line-height: 1.2;
}

.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;
  }
  .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;
  }
}
