@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;500;700&display=swap');

:root {
  --bg-main: #021B34;
  --bg-deep: #01111f;
  --surface: rgba(10, 31, 55, 0.92);
  --surface-2: rgba(20, 48, 82, 0.92);
  --primary: #35246A;
  --secondary: #5A32A3;
  --accent: #2C8FA6;
  --accent-dark: #2F6F8A;
  --text: #ffffff;
  --text-muted: #b9c5d1;
  --line: rgba(255,255,255,0.08);
  --success: #2dc08d;
  --warning: #f4c14d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --max: 1280px;
  --site-scroll-progress: 0%;
  --site-header-offset: 0px;
  --visual-viewport-offset-top: 0px;
}

[data-theme='light'] {
  --bg-main: #f1effb;
  --bg-deep: #dce7f6;
  --surface: rgba(240, 244, 255, 0.96);
  --surface-2: rgba(226, 236, 252, 0.96);
  --primary: #4d2c9a;
  --secondary: #6f42c8;
  --accent: #1f9fb6;
  --accent-dark: #197f94;
  --text: #0f1d33;
  --text-muted: #334a68;
  --line: rgba(37, 52, 84, 0.28);
  --shadow: 0 20px 44px rgba(31, 46, 79, 0.24);
}


.site-scroll-progress {
  position: fixed;
  inset: calc(var(--site-header-offset, 0px) + var(--visual-viewport-offset-top, 0px)) auto auto 0;
  height: 3px;
  width: var(--site-scroll-progress, 0%);
  z-index: 240;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(100, 219, 255, 0.8), rgba(153, 119, 255, 0.95));
  box-shadow: 0 0 22px rgba(95, 188, 255, 0.62);
  transition: width 120ms linear;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
}

html[data-theme='light'] {
  background: linear-gradient(100deg, rgba(109, 74, 199, 0.92), rgba(28, 140, 165, 0.9));
}

body {
  margin: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg-main);
  background:
    radial-gradient(circle at top left, rgba(90,50,163,0.26), transparent 28%),
    radial-gradient(circle at top right, rgba(44,143,166,0.16), transparent 22%),
    linear-gradient(180deg, var(--bg-main), var(--bg-deep));
  min-height: 100vh;
}

[data-theme='light'] body {
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 101, 255, 0.18), transparent 44%),
    radial-gradient(circle at 100% 8%, rgba(44, 168, 196, 0.19), transparent 42%),
    linear-gradient(165deg, rgba(246, 242, 255, 0.96), rgba(231, 244, 255, 0.95));
}

[data-theme='light'] .hero-panel,
[data-theme='light'] .panel,
[data-theme='light'] .table-card,
[data-theme='light'] .modal-card,
[data-theme='light'] .admin-layout > section,
[data-theme='light'] .race-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 101, 255, 0.18), transparent 44%),
    radial-gradient(circle at 100% 8%, rgba(44, 168, 196, 0.19), transparent 42%),
    linear-gradient(165deg, rgba(246, 242, 255, 0.96), rgba(231, 244, 255, 0.95));
  border-color: rgba(37, 52, 84, 0.3);
  box-shadow: 0 18px 38px rgba(36, 44, 76, 0.17), 0 4px 14px rgba(36, 44, 76, 0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}

[data-theme='light'] .stat,
[data-theme='light'] .leader-item,
[data-theme='light'] .list-card,
[data-theme='light'] .result-item,
[data-theme='light'] .incident-item,
[data-theme='light'] .btn,
[data-theme='light'] .chip,
[data-theme='light'] .badge {
  background:
    radial-gradient(circle at 12% 0%, rgba(124, 96, 235, 0.15), transparent 42%),
    linear-gradient(160deg, rgba(239, 234, 255, 0.88), rgba(223, 241, 252, 0.84));
  border-color: rgba(61, 78, 115, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.66), 0 8px 18px rgba(60, 74, 109, 0.12);
}

[data-theme='light'] th {
  background: rgba(223, 233, 248, 0.78);
}

[data-theme='light'] tbody tr:hover {
  background: rgba(214, 227, 245, 0.62);
}


[data-theme='light'] body[data-page="team-wm"] .standings-table tbody tr:nth-child(n+4):nth-child(-n+8) {
  background: linear-gradient(180deg, rgba(215, 230, 249, 0.92), rgba(233, 242, 255, 0.9));
}

[data-theme='light'] body[data-page="team-wm"] .standings-table tbody tr:nth-child(n+4):nth-child(-n+8) td {
  border-top: 1px solid rgba(53, 83, 126, 0.32);
  border-bottom: 1px solid rgba(53, 83, 126, 0.32);
}

[data-theme='light'] body[data-page="team-wm"] .standings-table tbody tr:nth-child(n+4):nth-child(-n+8) td:first-child {
  border-left: 1px solid rgba(53, 83, 126, 0.32);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

[data-theme='light'] body[data-page="team-wm"] .standings-table tbody tr:nth-child(n+4):nth-child(-n+8) td:last-child {
  border-right: 1px solid rgba(53, 83, 126, 0.32);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
}

.site-safe-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: max(env(safe-area-inset-top), var(--visual-viewport-offset-top, 0px));
  background: rgb(2, 27, 52);
  z-index: 999;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  isolation: isolate;
  background: rgb(2, 27, 52);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: calc(110px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.mobile-toggle {
  display: none;
  position: relative;
  z-index: 1001;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
}

.mobile-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle__icon span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

[data-theme='light'] .site-header {
  background: linear-gradient(100deg, rgba(109, 74, 199, 0.92), rgba(28, 140, 165, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

[data-theme='light'] .site-safe-top {
  background: linear-gradient(100deg, rgba(109, 74, 199, 0.92), rgba(28, 140, 165, 0.9));
}

[data-theme='light'] .brand-title,
[data-theme='light'] .brand-subtitle {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(9, 20, 36, 0.4);
}

[data-theme='light'] .chip.success,
[data-theme='light'] .badge.player,
[data-theme='light'] .badge.done,
[data-theme='light'] .chip.warning,
[data-theme='light'] .badge.upcoming,
[data-theme='light'] .badge.bot,
[data-theme='light'] .admin-overview-card strong,
[data-theme='light'] .admin-session-inline strong,
[data-theme='light'] .button-danger,
[data-theme='light'] .trackmap-lightbox-close,
[data-theme='light'] .hof-season-eyebrow,
[data-theme='light'] .hof-champion-name,
[data-theme='light'] .hof-support-pill,
[data-theme='light'] .hof-subheading,
[data-theme='light'] .hof-total-name,
[data-theme='light'] .hof-archive-summary {
  color: #0f1d33;
}

[data-theme='light'] .mobile-toggle {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.2);
  color: #f7fbff;
}

[data-theme='light'] .mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.28);
}

.main-nav {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  padding-inline: 4px;
  scroll-padding-inline: 4px;
  scrollbar-width: thin;
}

.main-nav a {
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.18s ease;
  font-size: 0.95rem;
  white-space: nowrap;
}

.main-nav a .nav-icon {
  display: none;
}

.main-nav a .nav-label {
  display: inline;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  border-color: rgba(44,143,166,0.5);
  background: rgba(44,143,166,0.14);
}

@media (min-width: 861px) {
  .main-nav a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 12px;
  }

  .main-nav a .nav-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
  }

  .main-nav a .nav-label {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(2, 27, 52, 0.96);
    color: var(--text);
    font-size: 0.82rem;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 20;
  }

  .main-nav a:hover .nav-label,
  .main-nav a:focus-visible .nav-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-more {
  position: relative;
  display: none;
}

.nav-more-toggle {
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.18s ease;
  font-size: 0.95rem;
  background: transparent;
}

.nav-more.open .nav-more-toggle,
.nav-more-toggle:hover {
  color: var(--text);
  border-color: rgba(44,143,166,0.5);
  background: rgba(44,143,166,0.14);
}

.nav-more-menu {
  display: none;
}

@media (max-width: 1280px) and (min-width: 861px) {
  .brand-logo {
    width: 116px;
    height: 116px;
  }

  .main-nav {
    gap: 6px;
  }

  .main-nav a,
  .nav-more-toggle {
    padding: 9px 11px;
    font-size: 0.9rem;
  }
}

.page-hero {
  padding: 34px 0 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 18px;
}

.hero-panel,
.panel,
.table-card,
.modal-card,
.admin-layout > section {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90,50,163,0.34), transparent 65%);
  pointer-events: none;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-title, .page-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.podium-1 {
  background: rgba(255, 215, 0, 0.10);
}

.podium-2 {
  background: rgba(192, 192, 192, 0.10);
}

.podium-3 {
  background: rgba(205, 127, 50, 0.10);
}

.fastest-lap-row {
  box-shadow: inset 3px 0 0 rgba(192, 132, 252, 0.9);
}

.fastest-lap-label {
  display: inline-block;
  margin-top: 4px;
  color: #c084fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.number-box.podium-1 {
  background: rgba(255, 215, 0, 0.18);
}

.number-box.podium-2 {
  background: rgba(192, 192, 192, 0.18);
}

.number-box.podium-3 {
  background: rgba(205, 127, 50, 0.18);
}
.hero-copy, .page-subtitle {
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 65ch;
}

.hero-stats, .mini-stats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 16px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.stat-value {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
}

.next-race-card, .highlight-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(90,50,163,0.24), rgba(44,143,166,0.1));
  border: 1px solid rgba(90,50,163,0.42);
}

.next-race-title {
  color: #d9cfff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.next-race-name {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.next-race-meta {
  color: var(--text-muted);
  line-height: 1.7;
}

.race-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}


.next-race-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.race-card-link-highlight .race-card {
  border-color: rgba(44,143,166,0.9);
  box-shadow: 0 0 0 3px rgba(44,143,166,0.28), var(--shadow);
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.chip, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.chip.success, .badge.player, .badge.done {
  color: #ddfff2;
  background: rgba(45,192,141,0.12);
  border-color: rgba(45,192,141,0.32);
}

.chip.warning, .badge.upcoming, .badge.bot {
  color: #fff2d1;
  background: rgba(244,193,77,0.12);
  border-color: rgba(244,193,77,0.32);
}

.section {
  padding: 12px 0 30px;
}

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

.race-detail-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.race-detail-back-btn {
  white-space: nowrap;
  max-width: 100%;
}

.section-header h2, .panel h2, .table-header h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.section-header p, .muted {
  color: var(--text-muted);
}

.summary-grid,
.overview-grid,
.two-col,
.results-grid,
.admin-layout {
  display: grid;
  gap: 18px;
}

.overview-grid {
  grid-template-columns: 1.1fr 1fr 1fr;
}

.two-col {
  grid-template-columns: 1fr 1fr;
}

.results-grid {
  grid-template-columns: 1.2fr 0.9fr;
}

.summary-grid {
  grid-template-columns: repeat(3, 1fr);
}

.panel {
  padding: 22px;
}

.panel h3 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.results-trend-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.results-trend-heading h3 {
  margin-bottom: 0;
}

.results-trend-hint {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.leader-list, .stack-list, .race-list, .incident-list {
  display: grid;
  gap: 12px;
}

.leader-item, .list-card, .result-item, .incident-item {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}

.leader-item {
  grid-template-columns: auto 1fr auto;
}

.position-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(90,50,163,0.36), rgba(44,143,166,0.2));
  border: 1px solid rgba(90,50,163,0.48);
}

.points {
  font-size: 1.35rem;
  font-weight: 800;
}

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

.race-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.012));
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.race-card:hover {
  transform: translateY(-3px);
  border-color: rgba(44,143,166,0.34);
}

.race-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.race-round {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.race-name {
  margin: 0;
  font-size: 1.45rem;
}

.race-meta, .detail-list {
  color: var(--text-muted);
  line-height: 1.7;
}

.race-meta strong, .detail-list strong, .leader-item strong, .result-item strong {
  color: var(--text);
}

.table-card {
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: left;
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(255,255,255,0.02);
}

.mobile-th-short {
  display: none;
}

tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

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

.result-item {
  grid-template-columns: 52px 1fr auto;
}

.number-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.1rem;
  background: rgba(90,50,163,0.3);
  border: 1px solid rgba(90,50,163,0.45);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 15px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  transition: 0.18s ease;
}

.btn:hover {
  border-color: rgba(44,143,166,0.45);
  background: rgba(44,143,166,0.14);
}

.btn.primary {
  background: linear-gradient(180deg, var(--secondary), var(--primary));
}

.btn.primary:hover {
  border-color: rgba(255,255,255,0.18);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--text-muted);
  font-size: 0.86rem;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 12px 14px;
}

select {
  background-color: rgba(20, 48, 82, 0.96);
  color: var(--text);
}

select option,
select optgroup {
  background: #0d2744;
  color: var(--text);
}

select:focus {
  outline: none;
  border-color: rgba(44, 143, 166, 0.85);
  box-shadow: 0 0 0 3px rgba(44, 143, 166, 0.2);
}
.podium-1 {
  background: rgba(255, 215, 0, 0.10);
}

.podium-2 {
  background: rgba(192, 192, 192, 0.10);
}

.podium-3 {
  background: rgba(205, 127, 50, 0.10);
}

.fastest-lap-row {
  box-shadow: inset 3px 0 0 rgba(192, 132, 252, 0.9);
}

.fastest-lap-label {
  display: inline-block;
  margin-top: 4px;
  color: #c084fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
textarea { min-height: 120px; resize: vertical; }

.admin-layout {
  grid-template-columns: 1.05fr 0.95fr;
}
.number-box.podium-1 {
  background: rgba(255, 215, 0, 0.18);
}

.number-box.podium-2 {
  background: rgba(192, 192, 192, 0.18);
}

.number-box.podium-3 {
  background: rgba(205, 127, 50, 0.18);
}
.notice {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(44,143,166,0.12);
  border: 1px solid rgba(44,143,166,0.28);
  color: var(--text-muted);
}

.footer {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding: 26px 0 42px;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}

.footer__theme,
.footer__language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.footer__theme select,
.footer__language select {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
}

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

@media (max-width: 1180px) {
  .hero-grid,
  .overview-grid,
  .results-grid,
  .summary-grid,
  .admin-layout,
  .two-col,
  .race-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-grid > :first-child,
  .results-grid > :first-child,
  .admin-layout > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body {
    padding-top: calc(76px + env(safe-area-inset-top));
  }

  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(1, 14, 27, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 980;
  }

  body.nav-drawer-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .mobile-toggle { display: inline-flex; order: 2; }

  .header-inner {
    min-height: auto;
    padding: calc(6px + env(safe-area-inset-top)) 0 6px;
    align-items: center;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(260px, 82vw);
    height: 100vh;
    padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
    background: rgba(2, 27, 52, 0.96);
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 44px rgba(0, 0, 0, 0.42);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    overflow-y: auto;
    z-index: 990;
    transform: translateX(104%);
    transition: transform 0.26s ease;
  }

[data-theme='light'] .main-nav {
  background: linear-gradient(180deg, rgba(97, 65, 179, 0.96), rgba(33, 136, 160, 0.94));
  border-left: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: -20px 0 44px rgba(52, 43, 106, 0.32);
}

  [data-theme='light'] .main-nav a {
    color: rgba(255, 255, 255, 0.96);
    border-color: transparent;
  }

  [data-theme='light'] .main-nav a:hover,
  [data-theme='light'] .main-nav a.active {
    color: #ffffff;
    border-color: rgba(164, 238, 255, 0.65);
    background: rgba(255, 255, 255, 0.2);
  }

  .main-nav .nav-extra-link,
  .main-nav .nav-primary-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .nav-more {
    display: none;
  }

  .nav-more-toggle {
    width: 100%;
    text-align: center;
  }

  .nav-more.open .nav-more-menu {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-more-menu a {
    text-align: center;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-align: left;
    line-height: 1.15;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
  }

  .main-nav a .nav-icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .main-nav a .nav-label {
    display: inline-flex;
    align-items: center;
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    font-size: inherit;
    white-space: nowrap;
    line-height: 1.2;
  }

  .hero-grid,
  .overview-grid,
  .results-grid,
  .summary-grid,
  .admin-layout,
  .two-col,
  .race-grid,
  .form-grid,
  .hero-stats,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .result-item,
  .leader-item {
    grid-template-columns: 44px 1fr;
  }

  .leader-item > :last-child,
  .result-item > :last-child {
    grid-column: 2;
    justify-self: start;
  }

  .container {
    width: min(var(--max), calc(100% - 18px));
  }

  .hero-panel,
  .panel,
  .table-card,
  .admin-layout > section {
    border-radius: 20px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand-title {
    font-size: 0.92rem;
  }

  .brand-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 760px) {
  body[data-page="fahrer-wm"] .mobile-th-full {
    display: none;
  }

  body[data-page="fahrer-wm"] .mobile-th-short {
    display: inline;
  }

  body[data-page="fahrer-wm"] .table-header,
  body[data-page="team-wm"] .table-header {
    padding: 12px 14px;
    gap: 8px;
  }

  body[data-page="fahrer-wm"] .table-header h2,
  body[data-page="team-wm"] .table-header h2 {
    font-size: 1rem;
  }

  body[data-page="fahrer-wm"] .table-wrap table,
  body[data-page="team-wm"] .table-wrap table {
    min-width: 640px;
  }

  body[data-page="fahrer-wm"] .standings-table th,
  body[data-page="fahrer-wm"] .standings-table td,
  body[data-page="team-wm"] .standings-table th,
  body[data-page="team-wm"] .standings-table td {
    padding: 9px 10px;
    font-size: 0.8rem;
  }

  body[data-page="fahrer-wm"] .page-title,
  body[data-page="team-wm"] .page-title {
    font-size: clamp(1.5rem, 9vw, 2rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  body[data-page="fahrer-wm"] .page-subtitle,
  body[data-page="team-wm"] .page-subtitle {
    font-size: 0.92rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  body[data-page="fahrer-wm"] .standings-table th,
  body[data-page="team-wm"] .standings-table th {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    line-height: 1.25;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  body[data-page="fahrer-wm"] .standings-table td,
  body[data-page="team-wm"] .standings-table td {
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body[data-page="fahrer-wm"] .standings-table td:nth-child(3),
  body[data-page="fahrer-wm"] .standings-table td:nth-child(4),
  body[data-page="fahrer-wm"] .standings-table td:nth-child(5),
  body[data-page="team-wm"] .standings-table td:nth-child(3),
  body[data-page="team-wm"] .standings-table td:nth-child(4),
  body[data-page="team-wm"] .standings-table td:nth-child(5),
  body[data-page="team-wm"] .standings-table td:nth-child(6),
  body[data-page="team-wm"] .standings-table td:nth-child(7) {
    min-width: 88px;
  }
}

@media (max-width: 480px) {
  body[data-page="fahrer-wm"] .table-wrap table,
  body[data-page="team-wm"] .table-wrap table {
    min-width: 560px;
  }

  body[data-page="fahrer-wm"] .standings-table th,
  body[data-page="fahrer-wm"] .standings-table td,
  body[data-page="team-wm"] .standings-table th,
  body[data-page="team-wm"] .standings-table td {
    padding: 8px 8px;
    font-size: 0.76rem;
  }
}

/* Modular layout helpers */
.page-title-compact {
  font-size: 2.8rem;
}

body[data-page="ergebnisse"] .page-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-inline {
  padding: 16px;
}

.section-spacer-top {
  margin-top: 18px;
}

.card-actions-tight {
  margin-top: 10px;
}

.hero-race-block {
  margin-bottom: 18px;
}

/* Schnellste Runde (F1 Style lila) */
.fastest-lap {
  color: #c084fc !important;
  font-weight: 600;
}

/* Optional: dezenter Hintergrund */
.fastest-lap-row {
  background: rgba(192, 132, 252, 0.08);
}

.divider-subtle {
  border-color: rgba(255, 255, 255, 0.08);
  border-style: solid;
  border-width: 1px 0 0;
  margin: 18px 0;
}

.button-primary,
.button-secondary {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button-primary {
  background: linear-gradient(135deg, #7c4dff, #2c8fa6);
  box-shadow: 0 10px 26px rgba(44, 143, 166, 0.22);
}

.button-secondary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.button-primary:hover,
.button-secondary:hover,
.btn:hover {
  transform: translateY(-1px);
}

/* Admin: einheitliche Button-Optik (Größe darf je nach Kontext variieren) */
body[data-page="admin"] .button-primary,
body[data-page="admin"] .button-secondary,
body[data-page="admin"] .button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(7, 14, 24, 0.24);
}

/* Admin: Seite beim Wechsel zwischen Mobile-Tabs farblich stabil halten */
body[data-page="admin"] {
  background-color: var(--bg-main);
  background-image:
    radial-gradient(circle at top left, rgba(90,50,163,0.26), transparent 28%),
    radial-gradient(circle at top right, rgba(44,143,166,0.16), transparent 22%),
    linear-gradient(180deg, var(--bg-main), var(--bg-deep));
  background-attachment: fixed;
}

body[data-page="admin"] .button-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.05));
  border-color: rgba(255,255,255,0.16);
}

body[data-page="admin"] .button-primary:hover,
body[data-page="admin"] .button-secondary:hover,
body[data-page="admin"] .button-danger:hover {
  filter: saturate(1.06);
}

body[data-page="admin"] .button-primary:focus-visible,
body[data-page="admin"] .button-secondary:focus-visible,
body[data-page="admin"] .button-danger:focus-visible {
  outline: 2px solid rgba(255,255,255,0.82);
  outline-offset: 2px;
}

.notice-error {
  background: rgba(255, 92, 92, 0.12);
  border-color: rgba(255, 92, 92, 0.28);
  color: #ffd7d7;
}

.champion-panel {
  min-height: 180px;
}

.champion-name {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-top: 12px;
}

.champion-meta {
  color: var(--text-muted);
  margin-top: 8px;
}

.leader-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.leader-copy h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.leader-copy p,
.compact-row,
.race-meta-sub,
.result-points,
.track-map-placeholder {
  color: var(--text-muted);
}

.leader-points {
  font-weight: 800;
  font-size: 1.1rem;
}

.compact-standings {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.compact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.compact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.modern-race-body,
.race-meta-grid {
  display: grid;
  gap: 14px;
}

.race-meta-grid {
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
}

.track-map-card,
.hero-track-map,
.detail-track-map {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 10px;
}

.track-map-svg {
  width: 100%;
  height: auto;
}

.track-map-outline {
  fill: none;
  stroke: rgba(255,255,255,0.88);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-map-start {
  fill: none;
  stroke: #c084fc;
  stroke-width: 4;
  stroke-linecap: round;
}

.fastest-lap-cell,
.fastest-lap-cell * {
  color: #d8a4ff !important;
  font-weight: 700;
}

.steward-entry {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.steward-entry:last-child {
  border-bottom: 0;
}


.steward-case-card {
  gap: 8px;
}

.steward-case-title {
  line-height: 1.4;
}

.steward-case-description {
  line-height: 1.6;
}

.steward-case-meta {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.steward-case-meta strong {
  color: var(--text);
}

.admin-panel-accent {
  border-color: rgba(124, 77, 255, 0.32);
}

.season-panel {
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.12), rgba(44,143,166,0.08));
}

@media (max-width: 860px) {
  .race-meta-grid,
  .leader-card {
    grid-template-columns: 1fr;
  }

  .leader-points {
    justify-self: start;
  }
}

.admin-panel-wide {
  grid-column: 1 / -1;
}

.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
}

.flag-badge img {
  width: 24px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.flag-code {
  display: none;
}

.flag-badge-fallback {
  justify-content: center;
  min-width: 36px;
}

.flag-fallback-emoji {
  font-size: 1rem;
  line-height: 1;
}

.race-round {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-race-block .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.track-map-card,
.hero-track-map,
.detail-track-map {
  min-height: 110px;
  display: grid;
  place-items: center;
}

.track-map-svg {
  width: 100%;
  max-width: 160px;
  height: 92px;
}

.track-map-shadow {
  fill: none;
  stroke: rgba(192, 132, 252, 0.20);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-map-outline {
  fill: none;
  stroke: rgba(255,255,255,0.95);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track-map-start-dot {
  fill: #c084fc;
}

.detail-track-map {
  margin-top: 16px;
}

#race-title .flag-badge {
  margin-right: 10px;
}

@media (max-width: 860px) {
  .admin-panel-wide {
    grid-column: auto;
  }
}

.status-chip-player {
  color: #d9ffff;
  background: rgba(44,143,166,0.16);
  border-color: rgba(44,143,166,0.48);
}

.status-chip-bot {
  color: #f0e0ff;
  background: rgba(192,132,252,0.14);
  border-color: rgba(192,132,252,0.45);
}

.trend-cell {
  font-weight: 800;
  text-align: center;
}

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

.calendar-sections {
  display: grid;
  gap: 18px;
}

.calendar-toggle-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.archive-subtitle {
  margin-top: 0;
}

.archive-select-row {
  display: grid;
  gap: 10px;
  max-width: 420px;
}

.archive-control-panel {
  max-width: 540px;
}

.archive-race-card {
  margin-bottom: 18px;
}

.archive-race-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-muted);
  margin: 6px 0 14px;
}

.season-champion-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 2200;
}

.season-champion-overlay.is-visible {
  display: grid;
}

.season-champion-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(4px);
}

.season-champion-overlay__card {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 24px));
  border-radius: 24px;
  border: 1px solid rgba(255, 212, 92, 0.45);
  background: linear-gradient(160deg, rgba(22, 30, 62, 0.96), rgba(66, 40, 10, 0.9));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(255, 211, 107, 0.12);
  padding: 28px 28px 30px;
  overflow: hidden;
}

.season-champion-overlay__eyebrow { color: #ffd56a; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.72rem; }
.season-champion-overlay__copy { color: #f8ebcb; max-width: 58ch; }
.season-champion-overlay h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 18px);
  margin-right: 30px;
  font-size: clamp(1.5rem, 5.3vw, 3rem);
  text-align: center;
  line-height: 1.15;
}
.season-champion-overlay__title-text { white-space: nowrap; }
.season-champion-overlay__trophy {
  flex: 0 0 auto;
  font-size: clamp(1.15rem, 4.4vw, 2.4rem);
  line-height: 1;
}
.season-champion-overlay__winners { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.season-champion-overlay__winner { border: 1px solid rgba(255, 215, 120, 0.34); border-radius: 14px; padding: 14px; background: rgba(9, 14, 30, 0.4); }
.season-champion-overlay__label { color: #e7c980; font-size: 0.82rem; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.07em; }
.season-champion-overlay__name { font-size: clamp(1.02rem, 2.3vw, 1.28rem); font-weight: 800; }

.season-champion-overlay__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.season-champion-overlay__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}
.season-champion-overlay__confetti-piece {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffe595, #f4b736);
  animation: overlayConfettiFall linear forwards;
}

@keyframes overlayConfettiFall {
  0% { transform: translate3d(0, -10px, 0) rotate(0deg); }
  100% { transform: translate3d(0, 110vh, 0) rotate(720deg); }
}

@media (max-width: 720px) {
  .season-champion-overlay__winners { grid-template-columns: 1fr; }
  .season-champion-overlay h2 {
    margin-right: 24px;
  }
  .season-champion-overlay__title-text { white-space: normal; }
}

.compact-home-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-panel {
  padding: 22px;
}

.hero-grid-single {
  grid-template-columns: 1fr;
}

.results-points-cell.is-bot {
  color: #6ee7f2;
  font-weight: 700;
}

.results-points-cell.is-fastest {
  color: #d8a4ff;
  font-weight: 800;
}

.results-matrix-table {
  min-width: 1100px;
}

.sticky-driver {
  position: sticky;
  left: 0;
  background: rgba(2, 27, 52, 0.98);
  z-index: 1;
}

.notice-error {
  border-color: rgba(255,99,132,0.45);
  background: rgba(255,99,132,0.12);
}

@media (max-width: 860px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .hidden-mobile-section {
    display: none;
  }
}


.results-matrix-table th,
.results-matrix-table td {
  white-space: nowrap;
}

.results-race-header {
  min-width: 76px;
  text-align: center;
}

.results-race-head-compact {
  display: none;
}

.sticky-driver {
  min-width: 220px;
  max-width: 220px;
  box-shadow: 10px 0 18px rgba(1, 17, 31, 0.18);
}

.sticky-driver-head {
  z-index: 3;
}

.driver-label-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-total-head,
.results-total-cell {
  text-align: center;
  min-width: 82px;
}

.sticky-total {
  position: sticky;
  right: 0;
  background: rgba(2, 27, 52, 0.98);
  box-shadow: -10px 0 18px rgba(1, 17, 31, 0.18);
}

.results-total-head.sticky-total {
  z-index: 3;
}

.results-total-cell.sticky-total {
  z-index: 2;
}

[data-theme='light'] .sticky-driver,
[data-theme='light'] .sticky-total {
  background: rgba(237, 243, 255, 0.97);
  color: #16243a;
  box-shadow: 10px 0 18px rgba(69, 91, 130, 0.2);
}

[data-theme='light'] .sticky-total {
  box-shadow: -10px 0 18px rgba(69, 91, 130, 0.2);
}

@media (max-width: 1100px) {
  .results-matrix-table {
    min-width: 920px;
  }

  .sticky-driver {
    min-width: 180px;
    max-width: 180px;
  }
}

@media (max-width: 860px) {
  .table-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-matrix-table {
    min-width: 720px;
    font-size: 0.9rem;
  }

  .results-matrix-table th,
  .results-matrix-table td {
    padding: 10px 12px;
  }

  .results-race-head-full {
    display: none;
  }

  .results-race-head-compact {
    display: inline;
  }

  .results-race-header {
    min-width: 58px;
  }

  .sticky-driver {
    position: sticky;
    left: 0;
    min-width: 160px;
    max-width: 160px;
    box-shadow: 8px 0 16px rgba(1, 17, 31, 0.18);
  }
}

@media (max-width: 480px) {
  .results-matrix-table {
    min-width: 640px;
    font-size: 0.84rem;
  }

  .results-matrix-table th,
  .results-matrix-table td {
    padding: 8px 10px;
  }

  .sticky-driver {
    min-width: 142px;
    max-width: 142px;
  }

  .results-race-header {
    min-width: 52px;
  }

  .results-total-head,
  .results-total-cell {
    min-width: 68px;
  }
}


.trend-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.trend-pill svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.trend-pill.up { background: linear-gradient(180deg, rgba(45, 192, 141, 0.2), rgba(45, 192, 141, 0.12)); color: #55e2ad; }
.trend-pill.flat { background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.08)); color: #b9c5d1; }
.trend-pill.down { background: linear-gradient(180deg, rgba(255, 92, 92, 0.2), rgba(255, 92, 92, 0.12)); color: #ff8383; }

.storyline-banner {
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto 18px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(245, 196, 81, 0.25);
  background: linear-gradient(90deg, rgba(245,196,81,0.16), rgba(183,140,255,0.14), rgba(44,143,166,0.16));
  box-shadow: var(--shadow);
}
.storyline-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.storyline-banner .card-label { margin-bottom: 6px; }
.storyline-banner-content { color: var(--text); line-height: 1.6; }
.storyline-ticker {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent 0, black 6%, black 94%, transparent 100%);
}
.storyline-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 100%;
  animation: storyline-marquee var(--ticker-duration, 70s) linear infinite;
  will-change: transform;
}
.storyline-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
  color: var(--text);
  font-family: "Atkinson Hyperlegible", "Segoe UI", Inter, Arial, sans-serif;
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.storyline-item::after {
  content: '•';
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
}

.storyline-item-link {
  color: var(--text);
  text-decoration: none;
  font: inherit;
}
.storyline-item-link:hover,
.storyline-item-link:focus-visible {
  text-decoration: underline;
}

@keyframes storyline-marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
.workflow-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.03); }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.workflow-list { margin: 0; padding-left: 18px; color: var(--text-muted); }
@media (max-width: 860px) {
  .storyline-banner { width: min(var(--max), calc(100% - 18px)); padding: 14px; }
  .storyline-banner-head { align-items: flex-start; }
  .workflow-grid { grid-template-columns: 1fr; }
}


.hidden-section {
  display: none !important;
}


.results-matrix-wrap,
.table-wrap {
  overflow-x: auto;
}

.results-matrix-table .sticky-driver,
.results-matrix-table .sticky-driver-head {
  position: sticky;
  left: 0;
}

.results-matrix-table .sticky-driver-head {
  z-index: 4;
}

.results-matrix-table tbody .sticky-driver {
  z-index: 2;
}

.results-matrix-table thead .sticky-total {
  z-index: 3;
}

.results-matrix-table tbody .sticky-total {
  z-index: 2;
}

.fastest-lap-points,
.fastest-lap-value {
  color: #d8a4ff;
  font-weight: 800;
}

.fastest-lap-bonus {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(216, 164, 255, 0.16);
  color: #d8a4ff;
  font-size: 0.78rem;
  font-weight: 800;
  vertical-align: middle;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-chip.player {
  background: rgba(45, 192, 141, 0.16);
  color: #55e2ad;
}

.status-chip.bot {
  background: rgba(110, 231, 242, 0.16);
  color: #6ee7f2;
}


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

.compact-driver-card {
  padding: 14px;
}

.driver-team-card {
  gap: 14px;
  border: 1px solid rgba(110, 231, 242, 0.38);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 242, 0.12);
}

.driver-team-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.driver-team-card-head h5 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.driver-team-title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.driver-team-name {
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.team-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  line-height: 1;
}

.team-logo-badge img {
  width: 42px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.team-logo-badge--large {
  min-width: 58px;
  min-height: 30px;
}

.team-logo-badge--large img {
  width: 58px;
  height: 30px;
}

.team-logo-badge.is-fallback,
.team-logo-fallback {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.team-logo-badge.is-fallback {
  min-width: 0;
  min-height: 0;
  line-height: 1.1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.driver-team-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.2);
  border: 1px solid rgba(124, 77, 255, 0.35);
  color: #d8c7ff;
  font-size: 0.8rem;
  font-weight: 700;
}

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

.driver-team-member {
  display: grid;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.driver-team-member-flip {
  width: 100%;
  text-align: left;
  cursor: pointer;
  perspective: 1100px;
  min-height: 156px;
  color: inherit;
}

body[data-page="grid"] .driver-team-member-flip {
  min-height: 0;
  perspective: none;
}

.driver-team-member-flip:focus-visible {
  outline: 2px solid rgba(110, 231, 242, 0.82);
  outline-offset: 2px;
}

.driver-team-member-inner {
  position: relative;
  display: block;
  min-height: 130px;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.driver-team-member-flip.is-flipped .driver-team-member-inner {
  transform: rotateY(180deg);
}

.driver-team-member-front,
.driver-team-member-back {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  backface-visibility: hidden;
}

.driver-team-member-back {
  transform: rotateY(180deg);
}

.driver-team-member.is-missing-gamertag {
  border-color: rgba(244, 193, 77, 0.55);
  background: linear-gradient(180deg, rgba(244, 193, 77, 0.2), rgba(244, 193, 77, 0.08));
}

.driver-team-member-main {
  display: grid;
  gap: 4px;
}

.driver-card-hint {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.driver-facts-heading {
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(216, 199, 255, 1);
}

.driver-facts-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
}

.driver-facts-list li {
  color: var(--text-muted);
}

.driver-facts-list li strong {
  color: var(--text);
}

.driver-facts-season-label {
  list-style: none;
  margin-left: -18px;
  margin-top: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(216, 199, 255, 1);
  font-weight: 700;
}

.driver-facts-divider {
  list-style: none;
  margin: 3px 0 5px -18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.driver-admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.driver-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.driver-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.driver-pill strong {
  color: var(--text);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-driver-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 860px) {
  .driver-admin-grid {
    grid-template-columns: 1fr;
  }

  .driver-team-title-with-logo {
    align-items: flex-start;
  }

  .driver-team-name {
    overflow-wrap: anywhere;
  }

  .driver-team-members {
    grid-template-columns: 1fr;
  }

  .driver-admin-card-head {
    flex-direction: column;
  }

  .compact-driver-actions {
    width: 100%;
    justify-content: flex-start;
  }
}


.flag-emoji {
  font-size: 1rem;
  line-height: 1;
}

.track-map-button {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.track-map-image {
  width: 100%;
  max-width: 180px;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.track-map-zoom-hint {
  display: none;
}

.track-map-button:hover .track-map-image,
.track-map-button:focus-visible .track-map-image {
  transform: scale(1.03);
  transition: transform 0.18s ease;
}

.modal-open {
  overflow: hidden;
}

.trackmap-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.trackmap-lightbox.hidden {
  display: none;
}

.trackmap-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(8px);
}

.trackmap-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 28px));
  margin: 36px auto;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(9, 14, 24, 0.96));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.trackmap-lightbox-title {
  margin-bottom: 14px;
  margin-right: 52px;
  font-size: 1rem;
  font-weight: 800;
}

.trackmap-lightbox-image {
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.trackmap-lightbox-close {
  position: absolute;
  top: max(12px, calc(var(--driver-modal-safe-top, env(safe-area-inset-top, 0px)) + 4px));
  right: 12px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.driver-swap-dialog {
  max-width: 560px;
}

.driver-card-modal-dialog {
  --driver-modal-safe-top: max(env(safe-area-inset-top, 0px), var(--visual-viewport-offset-top, 0px));
  max-width: 900px;
  margin-top: max(186px, calc(var(--driver-modal-safe-top) + 148px));
  margin-bottom: 24px;
  padding-top: max(38px, calc(var(--driver-modal-safe-top) + 26px));
}

.driver-card-modal-content {
  max-width: 760px;
  margin: 0 auto;
}

.driver-card-modal-primary.is-hidden-for-comparison {
  display: none;
}

.driver-card-modal-content .driver-team-member-flip {
  min-height: 0;
}

.driver-card-modal-content .driver-team-member-inner {
  min-height: 0;
  transform: none;
}

.driver-card-modal-content .driver-team-member-flip.is-flipped .driver-team-member-inner {
  transform: none;
}

.driver-card-modal-content .driver-team-member-front {
  display: none;
}

.driver-card-modal-content .driver-team-member-back {
  position: static;
  transform: none;
  backface-visibility: visible;
}

.driver-card-modal-content .driver-facts-list {
  font-size: 0.88rem;
  gap: 3px;
}

.driver-compare-controls {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.driver-compare-controls label {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.driver-compare-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.driver-compare-panel h4 {
  margin: 0 0 4px;
}

.driver-compare-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.driver-compare-close-button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.driver-compare-table-wrap {
  overflow-x: auto;
}

.driver-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  table-layout: fixed;
}

.driver-compare-table .driver-compare-col-driver {
  width: 24%;
}

.driver-compare-table .driver-compare-col-metric {
  width: 52%;
}

.driver-compare-table th,
.driver-compare-table td {
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.driver-compare-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(216, 199, 255, 1);
  white-space: normal;
  overflow-wrap: anywhere;
}

.driver-compare-table tbody th {
  font-weight: 600;
  color: var(--text-muted);
  white-space: normal;
  overflow-wrap: anywhere;
}

.driver-compare-table td {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: normal;
}

.driver-compare-table .is-better {
  color: #75f2b9;
  font-weight: 700;
}

@media (min-width: 681px) {
  .driver-compare-table-wrap {
    overflow-x: visible;
  }
}

@media (max-width: 680px) {
  .driver-team-card {
    padding: 10px;
    border-radius: 14px;
  }

  .driver-team-card-head {
    padding-bottom: 6px;
  }

  .driver-team-members {
    gap: 8px;
  }

  .driver-team-member {
    padding: 8px 10px;
    border-radius: 12px;
  }

  .driver-team-member-flip {
    min-height: 124px;
  }

  .driver-team-member-inner {
    min-height: 104px;
  }

  .driver-team-member-main {
    gap: 2px;
  }

  .driver-team-member-main strong {
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .driver-card-modal-dialog {
    width: calc(100% - 12px);
    margin: max(168px, calc(var(--driver-modal-safe-top) + 136px)) auto 14px;
    padding: 14px;
    padding-top: max(30px, calc(var(--driver-modal-safe-top) + 24px));
  }

  .driver-card-modal-content {
    max-width: 100%;
  }

  .driver-compare-table {
    font-size: 0.8rem;
  }

  .driver-compare-table th,
  .driver-compare-table td {
    padding: 4px 3px;
  }

  .driver-compare-table td {
    font-size: 0.76rem;
  }

  .driver-compare-table .driver-compare-col-driver {
    width: 22%;
  }

  .driver-compare-table .driver-compare-col-metric {
    width: 56%;
  }
}

@media (display-mode: standalone) and (max-width: 860px) {
  .driver-compare-table td {
    font-size: 0.78rem;
  }
}

.manual-results-toolbar {
  position: sticky;
  top: 10px;
  z-index: 5;
  padding: 12px;
  border-radius: 16px;
  background: rgba(10, 14, 24, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

.manual-results-table {
  min-width: 980px;
}

.manual-results-input,
.manual-results-select {
  width: 100%;
  min-width: 92px;
}

.manual-results-time {
  min-width: 148px;
}

@media (max-width: 860px) {
  .trackmap-lightbox-dialog {
    width: calc(100% - 16px);
    margin: 8px auto;
    padding: 16px;
  }

  .trackmap-lightbox-image {
    max-height: calc(100vh - 120px);
  }

  .driver-card-modal-content .driver-team-member-inner {
    min-height: 300px;
  }

  .manual-results-toolbar {
    top: 6px;
    padding: 10px;
  }
}


.btn:disabled, .button-primary:disabled, .button-secondary:disabled {
  opacity: 0.7;
  cursor: wait;
}


.results-points-cell.is-player {
  color: #d8a4ff;
  font-weight: 800;
}

body.hof-page {
  background:
    radial-gradient(circle at 50% -8%, rgba(241, 199, 100, 0.2) 0%, rgba(241, 199, 100, 0.04) 24%, rgba(6, 10, 20, 0.05) 46%, rgba(3, 7, 18, 0.94) 78%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.94) 0%, rgba(4, 9, 22, 0.98) 100%),
    #030712;
}

.hof-page-main {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.hof-page-main::before,
.hof-page-main::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hof-page-main::before {
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 217, 135, 0.16), rgba(255, 217, 135, 0) 42%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 222, 154, 0.045) 0px,
      rgba(255, 222, 154, 0.045) 1px,
      transparent 1px,
      transparent 140px
    );
  mix-blend-mode: screen;
  opacity: 0.78;
}

.hof-page-main::after {
  background:
    radial-gradient(circle at 8% 28%, rgba(0, 0, 0, 0.66), transparent 40%),
    radial-gradient(circle at 92% 28%, rgba(0, 0, 0, 0.62), transparent 42%),
    radial-gradient(circle at 50% 118%, rgba(0, 0, 0, 0.76), transparent 56%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.08), rgba(3, 7, 18, 0.4));
  opacity: 0.88;
}

.hof-hero { padding: 48px 0 12px; }
.hof-hero-copy { max-width: 760px; padding: 28px 0 8px; }
.hof-hero-copy h1 { margin: 0 0 12px; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 0.96; letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.hof-hero-copy p { max-width: 620px; color: rgba(241, 245, 249, 0.82); font-size: 1.02rem; }
.hof-content-shell { position: relative; z-index: 1; padding-bottom: 56px; }
.hof-season-wall { display: grid; gap: 26px; }
.hof-season-card { position: relative; overflow: hidden; border-radius: 30px; padding: 26px; background: linear-gradient(180deg, rgba(7, 10, 18, 0.78), rgba(7, 10, 18, 0.9)), rgba(255,255,255,0.03); border: 1px solid rgba(255, 215, 130, 0.18); box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06); backdrop-filter: blur(12px); }
.hof-season-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 215, 130, 0.08), transparent 35%, transparent 65%, rgba(255,255,255,0.03)); pointer-events: none; }
.hof-season-card--featured { margin-bottom: 6px; }
.hof-feature-interactive { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hof-feature-interactive:hover { transform: translateY(-2px); box-shadow: 0 24px 55px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08); }
.hof-feature-interactive:focus-visible { outline: 2px solid rgba(255, 225, 149, 0.9); outline-offset: 4px; }
.hof-season-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.hof-season-header > div { flex: 1; text-align: center; display: grid; justify-items: center; }
.hof-season-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff4cd;
  background: linear-gradient(180deg, rgba(255, 215, 130, 0.2), rgba(255, 215, 130, 0.08));
  border: 1px solid rgba(255, 225, 149, 0.38);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.hof-season-title { margin: 6px 0 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.hof-star { width: 42px; height: 42px; opacity: 0.92; filter: drop-shadow(0 0 16px rgba(255, 216, 117, 0.28)); }
.hof-star--left { transform: rotate(-11deg); }
.hof-star--right { transform: rotate(11deg); }
.hof-season-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hof-champion-card { position: relative; min-height: 290px; display: grid; align-content: center; justify-items: center; padding: 26px 18px 22px; border-radius: 24px; border: 1px solid rgba(255,255,255,0.08); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); overflow: hidden; }
.hof-medal-glow { position: absolute; inset: auto 50% 18px; width: 220px; height: 70px; transform: translateX(-50%); background: radial-gradient(circle, rgba(255, 214, 102, 0.24), transparent 70%); filter: blur(12px); }
.hof-champion-image { position: relative; z-index: 1; width: min(240px, 72%); height: auto; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.38)); transition: transform 0.28s ease; }
.hof-champion-card:hover .hof-champion-image { transform: translateY(-4px) scale(1.03); }
.hof-champion-meta { position: relative; z-index: 1; margin-top: 10px; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(241,245,249,0.72); }
.hof-champion-name { position: relative; z-index: 1; margin-top: 8px; text-align: center; font-size: clamp(1.12rem, 2.6vw, 1.55rem); font-weight: 800; letter-spacing: 0.02em; color: #f8e9b6; text-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.35); }
.hof-support-pill { position: relative; z-index: 1; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 215, 130, 0.12); border: 1px solid rgba(255, 215, 130, 0.18); color: rgba(255, 239, 198, 0.88); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.hof-support-text { position: relative; z-index: 1; margin-top: 10px; max-width: 90%; text-align: center; color: rgba(241,245,249,0.86); line-height: 1.6; }
.hof-support-text--lineup { font-size: 0.98rem; }
.hof-totals-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.hof-totals-block { display: grid; gap: 14px; }
.hof-subheading { margin: 0; font-size: 1.1rem; color: #fff0c1; }
.hof-totals-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.hof-total-card { padding: 18px; border-radius: 22px; background: linear-gradient(180deg, rgba(5, 10, 18, 0.8), rgba(5, 10, 18, 0.92)); border: 1px solid rgba(255, 215, 130, 0.14); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 34px rgba(0,0,0,0.26); }
.hof-total-rank { font-size: 0.82rem; color: var(--secondary); letter-spacing: 0.18em; text-transform: uppercase; }
.hof-total-name { margin-top: 8px; font-size: 1.2rem; font-weight: 800; color: #fff3cf; }
.hof-total-stats { margin-top: 8px; color: rgba(241,245,249,0.82); line-height: 1.55; }
.hof-empty { padding: 18px; border-radius: 18px; background: rgba(10, 16, 28, 0.78); border: 1px solid rgba(255,255,255,0.08); color: rgba(241,245,249,0.82); text-align: center; }
.hof-confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1500; overflow: hidden; opacity: 0; transition: opacity 0.2s ease; }
.hof-confetti-layer.is-visible { opacity: 1; }
.hof-confetti-piece {
  position: absolute;
  top: -26px;
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(255, 203, 75, 0.32);
  animation-name: hofConfettiRain;
  animation-timing-function: cubic-bezier(0.18, 0.75, 0.34, 1);
  animation-fill-mode: forwards;
}
@keyframes hofConfettiRain {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(var(--hof-confetti-drift), calc(100vh + 42px), 0) rotate(640deg); opacity: 0; }
}

[data-theme='light'] body.hof-page {
  background: radial-gradient(circle at 50% -14%, rgba(255, 214, 120, 0.35) 0%, rgba(255, 214, 120, 0.06) 28%, rgba(241, 245, 255, 0.94) 76%), linear-gradient(180deg, rgba(245, 249, 255, 0.98) 0%, rgba(226, 238, 252, 0.98) 100%), #eaf1fc;
}

[data-theme='light'] .hof-page-main::before {
  opacity: 0.62;
  background: radial-gradient(circle at 50% 6%, rgba(255, 208, 98, 0.32), rgba(255, 208, 98, 0) 50%), repeating-linear-gradient(90deg, rgba(182, 157, 76, 0.09) 0px, rgba(182, 157, 76, 0.09) 1px, transparent 1px, transparent 96px);
}

[data-theme='light'] .hof-page-main::after {
  opacity: 0.42;
}

[data-theme='light'] .hof-hero-copy h1 {
  background: linear-gradient(118deg, #7a5517 0%, #d7ab42 24%, #fff4b7 42%, #c8952f 62%, #fff6c2 74%, #9e6f1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 9px 20px rgba(110, 78, 19, 0.22);
}

[data-theme='light'] .hof-hero-copy p,
[data-theme='light'] .hof-support-text,
[data-theme='light'] .hof-total-stats,
[data-theme='light'] .hof-empty,
[data-theme='light'] .page-subtitle {
  color: rgba(31, 45, 69, 0.9);
}

[data-theme='light'] .hof-season-title,
[data-theme='light'] .page-title,
[data-theme='light'] .hof-subheading,
[data-theme='light'] .hof-archive-summary {
  color: #2a3652;
}

[data-theme='light'] .hof-champion-name,
[data-theme='light'] .hof-total-name {
  color: #f6f9ff;
  text-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(0,0,0,0.42);
}

[data-theme='light'] .hof-support-text,
[data-theme='light'] .hof-total-stats {
  color: rgba(233, 241, 255, 0.94);
}

[data-theme='light'] body.hof-page .hof-season-eyebrow,
[data-theme='light'] body.hof-page .eyebrow {
  color: #1f90b3;
}

@media (max-width: 960px) { .hof-season-grid, .hof-totals-split { grid-template-columns: 1fr; } }
@media (max-width: 760px) { body.hof-page { background: radial-gradient(circle at 50% -8%, rgba(241, 199, 100, 0.14) 0%, rgba(241, 199, 100, 0.03) 20%, rgba(3, 7, 18, 0.95) 72%), linear-gradient(180deg, rgba(3, 7, 18, 0.95) 0%, rgba(4, 9, 22, 0.99) 100%), #030712; } .hof-page-main::before { opacity: 0.52; background: radial-gradient(circle at 50% 5%, rgba(255, 217, 135, 0.14), rgba(255, 217, 135, 0) 48%), repeating-linear-gradient(90deg, rgba(255, 222, 154, 0.03) 0px, rgba(255, 222, 154, 0.03) 1px, transparent 1px, transparent 96px); } .hof-page-main::after { opacity: 0.82; } .hof-hero { padding: 28px 0 4px; } .hof-season-card { padding: 18px; border-radius: 22px; } .hof-season-header { align-items: flex-start; } .hof-star { width: 30px; height: 30px; } .hof-champion-card { min-height: 240px; padding: 18px 14px 18px; } .hof-champion-image { width: min(210px, 76%); } }


.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header-row h3 {
  margin-bottom: 0;
}

.panel-collapse-toggle {
  flex-shrink: 0;
}

.panel.collapsed > :not(.panel-header-row) {
  display: none !important;
}


.notice-warning {
  border-color: rgba(255, 184, 0, 0.28);
  background: rgba(255, 184, 0, 0.08);
  color: #ffe39a;
}

.admin-preview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-preview-table th,
.admin-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  font-size: 0.94rem;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.12);
}

.preview-badge--success { background: rgba(46, 204, 113, 0.12); color: #b4f1ca; }
.preview-badge--warning { background: rgba(255, 184, 0, 0.12); color: #ffe39a; }
.preview-badge--error { background: rgba(255, 99, 132, 0.12); color: #ffc1cf; }

#season-finalize-preview {
  margin-top: 12px;
}


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

.admin-overview-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 30px rgba(0,0,0,0.16);
}

.admin-overview-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.admin-overview-card strong {
  display: block;
  font-size: 1.08rem;
  color: #fff4cf;
}

.admin-overview-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-mobile-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-session-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.admin-session-banner-logout {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.admin-session-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.admin-session-inline strong {
  color: #fff;
}

.admin-session-inline .button-secondary {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.admin-mobile-tab {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 700;
}

.admin-mobile-tab.is-active {
  color: var(--text);
  border-color: rgba(44,143,166,0.62);
  background: rgba(44,143,166,0.18);
}

.button-danger {
  background: linear-gradient(135deg, rgba(255,99,132,0.88), rgba(255,77,77,0.88));
  border-color: rgba(255,99,132,0.42);
  color: #fff;
}

.button-danger:hover {
  filter: brightness(1.05);
}

.admin-layout > .panel {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-layout > .panel:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.12);
}

.panel-header-row {
  margin-bottom: 18px;
}

.panel-collapse-toggle {
  min-width: 122px;
}

.panel.collapsed .panel-collapse-toggle {
  opacity: 0.94;
}

.notice, .detail-list {
  line-height: 1.6;
}

#csv-import-preview .notice,
#season-finalize-preview.notice {
  border-style: dashed;
}

@media (max-width: 1100px) {
  .admin-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-overview-card {
    padding: 14px 15px;
    border-radius: 16px;
  }

  .panel-collapse-toggle {
    min-width: 104px;
    padding-inline: 12px;
  }
}


/* V10.5.8 mobile polish + results readability */
.results-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.results-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.results-legend-pill--player {
  background: rgba(216, 164, 255, 0.22);
  color: #1b2235;
  border-color: rgba(140, 102, 194, 0.34);
}

.results-legend-pill--bot {
  background: rgba(110, 231, 242, 0.22);
  color: #1b2235;
  border-color: rgba(69, 165, 174, 0.34);
}

.results-points-cell.is-bot,
.results-points-cell.is-fastest,
.fastest-lap-points,
.fastest-lap-value {
  text-shadow: none;
}

.results-points-cell.is-bot {
  background: linear-gradient(180deg, rgba(110, 231, 242, 0.18), rgba(110, 231, 242, 0.10));
  color: #d8fcff;
  font-weight: 800;
}

.results-points-cell.is-fastest {
  background: linear-gradient(180deg, rgba(216, 164, 255, 0.22), rgba(216, 164, 255, 0.12));
  color: #f4deff;
  font-weight: 900;
}

.results-points-cell.is-bot.is-fastest {
  background: linear-gradient(180deg, rgba(162, 212, 255, 0.22), rgba(180, 155, 255, 0.18));
  color: #f3f6ff;
}

.fastest-lap-bonus {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 16px rgba(216, 164, 255, 0.12);
}

@media (max-width: 980px) {
  .admin-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .container.admin-layout {
    gap: 14px;
  }
}

@media (max-width: 760px) {
  body[data-page="ergebnisse"] .page-title {
    font-size: clamp(1.9rem, 12vw, 2.7rem);
    line-height: 1.02;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .container.section-header > div {
    width: 100%;
    min-width: 0;
  }

  .race-detail-header-actions {
    width: 100%;
    align-items: flex-start;
  }

  .race-detail-back-btn {
    white-space: normal;
  }

  .admin-overview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .admin-overview-card {
    padding: 14px 15px;
    border-radius: 16px;
  }

  .container.admin-layout {
    gap: 12px;
  }

  .admin-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .admin-session-banner {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  .admin-layout > .panel,
  .panel,
  .table-card {
    padding: 16px;
    border-radius: 18px;
  }

  .panel-header-row {
    align-items: flex-start;
    gap: 10px;
  }

  .panel-header-row h3 {
    margin-right: auto;
  }

  .panel-collapse-toggle {
    min-width: auto;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .form-grid {
    gap: 12px;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 46px;
    font-size: 16px;
  }

  .field textarea {
    min-height: 104px;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card-actions .button-primary,
  .card-actions .button-secondary,
  .card-actions .button-danger {
    width: 100%;
    justify-content: center;
  }

  .manual-results-toolbar {
    position: sticky;
    bottom: 12px;
    z-index: 9;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 12, 24, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 32px rgba(0,0,0,0.28);
  }

  .manual-results-toolbar .button-primary,
  .manual-results-toolbar .button-secondary {
    min-height: 46px;
  }

  .table-wrap,
  .results-matrix-wrap {
    border-radius: 16px;
    position: relative;
  }

  .table-wrap::after,
  .results-matrix-wrap::after {
    content: "↔ wischen";
    position: sticky;
    right: 0;
    float: right;
    margin: 8px 8px 0 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 12, 24, 0.72);
    color: rgba(241,245,249,0.74);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .sticky-driver {
    min-width: 172px;
    max-width: 172px;
  }

  .results-matrix-table {
    min-width: 980px;
  }

  .results-legend {
    margin: 8px 0 12px;
  }

  .results-legend-pill {
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  .results-points-cell.is-bot,
  .results-points-cell.is-fastest {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  }
}


/* V10.5.9 readability + HOF archive */
.results-points-cell.is-bot,
.results-points-cell.is-fastest,
.results-points-cell.is-bot.is-fastest {
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.results-cell-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.results-cell-chips {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.results-cell-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  text-transform: uppercase;
}

.results-cell-chip--bot {
  background: rgba(110, 231, 242, 0.24);
  color: #18263a;
  border-color: rgba(69, 165, 174, 0.36);
}

.results-cell-chip--player,
.results-cell-chip--fl {
  background: rgba(216, 164, 255, 0.24);
  color: #18263a;
  border-color: rgba(140, 102, 194, 0.36);
}

.results-points-value {
  font-weight: 800;
}

.results-points-cell {
  vertical-align: middle;
  text-align: center;
}

.hof-totals-block .eyebrow {
  min-height: 18px;
}

.hof-subheading {
  min-height: 28px;
  display: flex;
  align-items: center;
}

.hof-archive-details {
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 130, 0.14);
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.72), rgba(5, 10, 18, 0.9));
  overflow: hidden;
}

.hof-archive-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 800;
  color: #fff0c1;
}

.hof-archive-summary::-webkit-details-marker {
  display: none;
}

.hof-archive-summary-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 215, 130, 0.12);
  transition: transform 0.2s ease;
}

.hof-archive-details[open] .hof-archive-summary-icon {
  transform: rotate(45deg);
}

.hof-season-wall--archive {
  padding: 0 18px 18px;
}

@media (max-width: 760px) {
  .results-cell-chip {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 0.64rem;
  }

  .hof-subheading {
    min-height: 0;
  }
}


/* V10.5.10 results + standings correction */
.results-points-value--bot {
  color: #6ee7f2;
  font-weight: 800;
}

.results-points-value--fl-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(216, 164, 255, 0.18);
  border: 1px solid rgba(216, 164, 255, 0.28);
  color: #f8f4ff;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}


[data-theme='light'] .results-points-value--fl-chip {
  color: #111111;
}
.results-cell-chip--fl {
  background: rgba(216, 164, 255, 0.16);
  color: #f3deff;
}


/* V10.5.13 grid fix for ergebnisse.html */
.results-table {
  table-layout: fixed;
}

.results-table td,
.results-table th {
  text-align: center;
  vertical-align: middle;
  padding-left: 8px;
  padding-right: 8px;
}

.results-table td > * {
  margin-left: auto;
  margin-right: auto;
}

.results-table td .lap-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1;
  margin-left: auto;
  margin-right: auto;
}

.results-table td .bot-time,
.results-table td .points-value,
.results-table td .result-value {
  display: inline-block;
  min-width: 2.3rem;
  text-align: center;
}

@media (max-width: 760px) {
  .results-table td,
  .results-table th {
    padding-left: 6px;
    padding-right: 6px;
  }
}

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

.rules-config-item {
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

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

.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-item p {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

.faq-editor-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.faq-editor-item {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.rules-faq-page-layout {
  display: grid;
  gap: 18px;
}

.rules-faq-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 860px) {
  .rules-faq-dual {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rules-faq-page-layout,
  .rules-faq-dual {
    gap: 12px;
  }

  .rules-config-grid {
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .rules-config-item {
    padding: 8px 10px;
    gap: 4px;
    border-radius: 10px;
  }

  .rules-config-item .muted {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .rules-config-item strong {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .faq-list {
    gap: 8px;
  }

  .faq-item {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .faq-item summary {
    font-size: 0.92rem;
  }

  .faq-item p {
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .storyline-ticker-track,
  .hof-confetti-piece {
    animation: none !important;
  }
}

.f1-loading {
  overflow: hidden;
}
.f1-loader-overlay { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: radial-gradient(circle at 50% -12%, rgba(52, 211, 198, 0.22), transparent 38%), linear-gradient(180deg, rgba(6, 10, 19, 0.96), rgba(3, 7, 16, 0.98)); backdrop-filter: blur(6px); transition: opacity 0.45s ease, visibility 0.45s ease; }
.f1-loader-overlay.is-hidden { opacity: 0; visibility: hidden; }
.f1-loader { display: grid; justify-items: center; gap: 16px; color: #f4f7ff; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.f1-loader-lights { display: grid; grid-template-columns: repeat(5, 18px); gap: 10px 12px; }
.f1-loader-lights span { width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 70, 70, 0.15); border: 1px solid rgba(255, 110, 110, 0.4); box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.22); transition: background 0.09s linear, border-color 0.09s linear, box-shadow 0.09s linear; }
.f1-loader-lights span.is-red { background: #ff2b2b; border-color: rgba(255, 214, 214, 0.88); box-shadow: 0 0 16px rgba(255, 50, 50, 0.9), inset 0 0 10px rgba(255, 255, 255, 0.24); }
.f1-loader-lights span.is-green { background: #1fef75; border-color: rgba(218, 255, 232, 0.9); box-shadow: 0 0 16px rgba(46, 255, 131, 0.92), inset 0 0 10px rgba(255, 255, 255, 0.24); }

.track-map-wrap {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
}

.track-map-button {
  cursor: zoom-in;
}

.track-map-info-hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  color: #b7f5ff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.track-map-info-hint:hover,
.track-map-info-hint:focus-visible {
  color: #d6fbff;
  transform: scale(1.08);
}

.trackinfo-dialog {
  --trackinfo-safe-top: max(env(safe-area-inset-top, 0px), var(--visual-viewport-offset-top, 0px));
  width: min(920px, calc(100% - 28px));
}

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

.trackinfo-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
}
.trackinfo-item span { color: #89eaff; font-size: 0.78rem; }
.trackinfo-item strong { font-size: 0.9rem; }
.trackinfo-fallback { margin: 8px 0 0; color: #d4e8f7; }

[data-theme='light'] .track-map-info-hint {
  color: #325d88;
}

[data-theme='light'] .track-map-info-hint:hover,
[data-theme='light'] .track-map-info-hint:focus-visible {
  color: #173d64;
}

[data-theme='light'] .trackinfo-item {
  background:
    radial-gradient(circle at 14% 0%, rgba(121, 89, 229, 0.15), transparent 42%),
    linear-gradient(162deg, rgba(248, 245, 255, 0.96), rgba(232, 244, 255, 0.92));
  border-color: rgba(59, 76, 112, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 8px 18px rgba(50, 64, 96, 0.12);
}

[data-theme='light'] .trackinfo-item span {
  color: #366091;
}

[data-theme='light'] .trackinfo-fallback {
  color: #355174;
}

@media (max-width: 768px) {
  .trackinfo-dialog {
    margin-top: max(12px, calc(var(--trackinfo-safe-top) + 6px));
    margin-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding-top: 24px;
  }

  .trackinfo-grid { grid-template-columns: 1fr; }
}
