/* ==========================================================================
   Wreckfest ST — Original Forged Carbon & Brushed Titanium Telemetry Theme
   ========================================================================== */

:root {
  /* Authentic Neutral Carbon-Graphite Palette (zero generic navy-blue tint) */
  --bg-void: #050607;
  --bg-base: #0A0B0E;
  --bg-surface: #111317;
  --bg-card: #16181D;
  --bg-elevated: #1D2027;
  --bg-hover: #252932;

  /* Machined Titanium & Hairline Bevels */
  --border-subtle: rgba(255, 255, 255, 0.075);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.22);
  --border-accent: rgba(56, 189, 248, 0.52);

  /* Performance Electric Blue & Cobalt-Cyan Telemetry Accents */
  --accent: #3B82F6;
  --accent-bright: #7DD3FC;
  --accent-cyan: #0EA5E9;
  --accent-deep: #2563EB;
  --accent-glow: rgba(56, 189, 248, 0.15);

  /* Legacy var aliases mapped cleanly into the Blue Carbon Theme */
  --amber: #38BDF8;
  --amber-bright: #7DD3FC;
  --copper: #2563EB;
  --amber-glow: rgba(56, 189, 248, 0.14);
  --crimson: #3B82F6;
  --crimson-deep: #1D4ED8;
  --crimson-glow: rgba(59, 130, 246, 0.16);
  --emerald: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --sky: #38BDF8;
  --sky-glow: rgba(56, 189, 248, 0.15);

  /* Brushed Chrome / Neutral Graphite Typography Tones */
  --text-primary: #F3F5F8;
  --text-secondary: #A1A8B3;
  --text-muted: #6C7380;

  /* Bespoke Motorsport Font Stack */
  --font-display: "Oxanium", "Space Grotesk", "Bahnschrift", sans-serif;
  --font-heading: "Space Grotesk", "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-server: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", "Cascadia Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Layered Billet Shadows & Specular Highlights */
  --shadow-card:
    0 18px 42px rgba(0, 0, 0, 0.56),
    0 2px 6px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
  --shadow-inset: inset 0 2px 5px rgba(0, 0, 0, 0.55);

  /* Authentic 2x2 Twill Carbon-Fiber Micro-Weave Pattern */
  --carbon-weave-subtle:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.022) 0px,
      rgba(255, 255, 255, 0.022) 2px,
      transparent 2px,
      transparent 5px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.34) 0px,
      rgba(0, 0, 0, 0.34) 2px,
      transparent 2px,
      transparent 5px
    );

  --carbon-weave-rich:
    linear-gradient(120deg, rgba(255, 255, 255, 0.045) 0%, transparent 38%, rgba(255, 255, 255, 0.02) 65%, transparent 100%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.032) 0px,
      rgba(255, 255, 255, 0.032) 2px,
      rgba(0, 0, 0, 0.22) 2px,
      rgba(0, 0, 0, 0.22) 5px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 2px,
      transparent 2px,
      transparent 5px
    );
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

section[id],
div[id] {
  scroll-margin-top: 76px;
}

/* Deep Matte Woven Carbon Canvas + Overhead Pit-Garage Studio Lighting */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.038) 0%, transparent 55%),
    var(--carbon-weave-subtle);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 440px;
  z-index: -1;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(37, 99, 235, 0.13), transparent 60%),
    radial-gradient(ellipse at 72% 35%, rgba(14, 165, 233, 0.09), transparent 56%);
  pointer-events: none;
}

a {
  color: #7DD3FC;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: #BAE6FD; }

/* ==========================================================================
   Top Sticky Brushed-Carbon Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 12, 15, 0.92);
  background-image: var(--carbon-weave-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand:hover { color: var(--text-primary); }
.brand-mark {
  display: flex;
  align-items: center;
  margin: -5px 0;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.brand-logo-img {
  display: block;
  width: 76px;
  height: 42px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
.brand-logo-canvas {
  display: none;
  width: 84px;
  height: 46px;
  user-select: none;
  pointer-events: none;
}
@media (min-width: 641px) {
  .brand-mark.anim-ready .brand-logo-img {
    display: none;
  }
  .brand-mark.anim-ready .brand-logo-canvas {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark.anim-ready .brand-logo-img {
    display: block;
  }
  .brand-mark.anim-ready .brand-logo-canvas {
    display: none;
  }
}
.brand:hover .brand-mark {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 10px rgba(226, 232, 240, 0.22));
}
.brand-text-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
}
.brand-title {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  background: linear-gradient(90deg, #FFFFFF 0%, #E0F2FE 40%, #7DD3FC 75%, #38BDF8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.22));
}
.brand-st-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 5px;
  background: linear-gradient(135deg, #38BDF8 0%, #2563EB 100%);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(5, 6, 8, 0.65);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-inset);
}

.nav-link {
  position: relative;
  padding: 6px 14px;
  border-radius: 7px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.16s ease;
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.045);
}
.nav-link.active {
  color: var(--text-primary);
  background: linear-gradient(180deg, #212836 0%, #151922 100%);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #38BDF8, #2563EB);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
}

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

.topbar-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1px;
  flex-shrink: 0;
}
.topbar-credit .footer-credit-line {
  line-height: 1.2;
}
.topbar-credit-title {
  font-size: 12.5px;
}
.topbar-credit-link {
  font-size: 11px;
}

/* Machined Chrono 60s Live Telemetry Pill */
.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 11px;
  background: linear-gradient(180deg, #16191F 0%, #0E1014 100%);
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  box-shadow: var(--shadow-inset), 0 1px 0 rgba(255, 255, 255, 0.05);
}

.live-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-dot 2s infinite;
}
.live-dot.paused {
  background: var(--amber);
  box-shadow: none;
  animation: none;
}
.live-dot.syncing {
  background: var(--sky);
  box-shadow: 0 0 10px var(--sky);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.42; transform: scale(0.84); }
}

.countdown-ring { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 2.4; }
.ring-fg {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 56.55;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear;
}

.live-timer {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 28px;
  text-align: right;
}

.icon-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #21252D 0%, #15181E 100%);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-mini-btn:hover {
  color: var(--amber-bright);
  border-color: var(--amber);
  background: #282D37;
}
.icon-mini-btn.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   Main Container & Monocoque Carbon Hero Banner
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 22px 22px 28px;
  flex: 1;
}

.site-footer {
  width: 100%;
  padding: 14px 18px 16px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #F3F5F8;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 8, 10, 0.72);
}

.footer-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}
.footer-credit-mobile {
  display: none;
}

.footer-credit-line {
  line-height: 1.35;
}

.footer-gradient-text {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.25px;
  background: linear-gradient(90deg, #FFFFFF 0%, #E0F2FE 36%, #7DD3FC 68%, #38BDF8 88%, #3B82F6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.28));
}

.footer-discord-link {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.footer-discord-link:hover {
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.55));
  opacity: 0.95;
}

.footer-data-line {
  font-size: 11px;
  color: #F3F5F8;
}

.hero-banner {
  position: relative;
  overflow: hidden;
  padding: 24px 28px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background-color: #121419;
  background-image:
    radial-gradient(ellipse at 85% 0%, rgba(56, 189, 248, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 100%, rgba(37, 99, 235, 0.12) 0%, transparent 52%),
    var(--carbon-weave-rich);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #38BDF8 0%, #2563EB 60%, #1D4ED8 100%);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.48);
}
.hero-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), rgba(255, 255, 255, 0.12) 35%, transparent 80%);
  pointer-events: none;
}

.hero-banner.compact {
  padding: 18px 26px;
}

.hero-banner.hero-home {
  padding: 13px 20px;
  margin-bottom: 14px;
  gap: 14px;
}
.hero-banner.hero-home .hero-eyebrow-lead {
  margin: 0 0 3px;
  font-size: clamp(16px, 1.75vw, 19px);
}
.hero-banner.hero-home .hero-subtitle {
  max-width: none;
  font-size: 12.5px;
  line-height: 1.35;
}
.hero-home-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.hero-home-actions .btn-sm {
  padding: 5px 11px;
  font-size: 11.5px;
  border-radius: 7px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--amber-bright);
  margin-bottom: 7px;
}

.hero-eyebrow-lead {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.25;
  text-transform: uppercase;
  background: linear-gradient(90deg, #F8FAFC 0%, #BAE6FD 52%, #38BDF8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.22));
}

.hero-title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.8vw, 29px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.server-name-title {
  margin: 0;
  font-family: var(--font-server);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text-primary);
}

.server-name {
  font-family: var(--font-server);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13.5px;
  max-width: 680px;
}

/* Precision Instrument-Cluster KPI Ribbon */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  background-color: #121419;
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    var(--carbon-weave-subtle);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--kpi-accent, var(--amber)), transparent 88%);
}
.kpi-label {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1.25;
}
.kpi-value {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  text-align: right;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
}
.kpi-sub {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ==========================================================================
   Woven Carbon Panels & Machined Section Headers
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

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

.panel {
  background-color: var(--bg-surface);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0%, transparent 180px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  overflow: hidden;
}

.panel-header {
  position: relative;
  padding: 10px 16px;
  background-color: #15171D;
  background-image: var(--carbon-weave-rich);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.panel-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-title::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--amber), var(--copper));
  flex-shrink: 0;
}
.panel-title.panel-title-online::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 9px rgba(16, 185, 129, 0.8);
}

.badge-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.16);
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.36);
}

.badge-auto {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--emerald-glow);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.34);
}

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

.panel-body {
  padding: 13px 16px;
}

.panel-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 7, 9, 0.52);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Machined Inputs, Recessed Segmented Controls & Billet Buttons */
.search-input {
  background: #090A0D;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  min-width: 195px;
  outline: none;
  box-shadow: var(--shadow-inset);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-inset), 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.search-input::placeholder { color: var(--text-muted); }

.seg-group {
  display: inline-flex;
  background: #08090C;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
  box-shadow: var(--shadow-inset);
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.seg-btn:hover { color: var(--text-primary); }
.seg-btn.active {
  background: linear-gradient(180deg, #0EA5E9 0%, #2563EB 100%);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: linear-gradient(180deg, #21242C 0%, #15171C 100%);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}
.btn:hover {
  background: linear-gradient(180deg, #242B38 0%, #181D27 100%);
  border-color: var(--accent-cyan);
  color: #BAE6FD;
}
.btn-primary {
  background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
  border-color: rgba(125, 211, 252, 0.32);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #38BDF8 0%, #3B82F6 100%);
  color: #FFFFFF;
}

.btn-sm { padding: 4px 10px; font-size: 11.5px; }

/* Tab Pills (Leaderboards) */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #1C1F26 0%, #13151A 100%);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--text-primary); border-color: var(--border-medium); }
.tab-btn.active {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.22) 0%, rgba(37, 99, 235, 0.18) 100%);
  color: #BAE6FD;
  border-color: var(--border-accent);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.26);
}

/* ==========================================================================
   Tables — Precision Race Timing-Tower Grids
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.25;
}

table.data-table thead th {
  text-align: left;
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #0C0D11;
  border-bottom: 1px solid var(--border-medium);
  white-space: nowrap;
  user-select: none;
}

table.data-table thead th.sortable {
  cursor: pointer;
  transition: color 0.15s ease;
}
table.data-table thead th.sortable:hover { color: var(--text-primary); }
table.data-table thead th.sorted { color: var(--amber-bright); }

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.45;
}
th.sorted .sort-indicator { opacity: 1; color: var(--amber-bright); }

table.data-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.052);
  transition: background 0.12s ease;
}
table.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}
table.data-table tbody tr:last-child { border-bottom: none; }
table.data-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.065);
}

table.data-table tbody td {
  padding: 4px 12px;
  vertical-align: middle;
}

.col-num, .text-right { text-align: right !important; }
.col-center { text-align: center !important; }
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.rank-badge.rank-1 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(217, 119, 6, 0.22));
  color: #FDE047;
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.18);
}
.rank-badge.rank-2 {
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.22), rgba(148, 163, 184, 0.16));
  color: #F1F5F9;
  border-color: rgba(226, 232, 240, 0.38);
}
.rank-badge.rank-3 {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.28), rgba(154, 52, 18, 0.22));
  color: #FDBA74;
  border-color: rgba(234, 88, 12, 0.48);
}

/* Status LED Dots */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: middle;
}
.status-dot.online { background: var(--emerald); box-shadow: 0 0 9px rgba(16, 185, 129, 0.8); }
.status-dot.offline { background: #EF4444; opacity: 0.72; }

/* Player Capacity Pill + Mini Fill Bar */
.cap-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 68px;
}
.cap-text {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
}
.cap-bar {
  --cap-w: 68px;
  width: var(--cap-w);
  height: 3.5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: var(--shadow-inset);
}
.cap-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10B981 0%, #22C55E 100%);
}
.cap-fill.full {
  background: linear-gradient(90deg, #DC2626 0%, #EF4444 100%);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Track Mini-Map Thumbnails */
.track-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.track-thumb {
  width: 46px;
  height: 26px;
  flex: 0 0 46px;
  border-radius: 5px;
  background: #08090C;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-inset);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  overflow: hidden;
}
.track-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.25));
}

/* Car Class + Rating Pills (Exact Wreckfest Thresholds: D<100, C<165, B<235, A>=235) */
.class-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  background: #0B0C10;
  border: 1px solid var(--border-medium);
}
.class-pill .cls-letter { font-weight: 800; }
.class-pill.cls-a { border-color: rgba(244, 63, 94, 0.55); background: rgba(244, 63, 94, 0.13); }
.class-pill.cls-a .cls-letter { color: #FB7185; }
.class-pill.cls-b { border-color: rgba(245, 158, 11, 0.55); background: rgba(245, 158, 11, 0.13); }
.class-pill.cls-b .cls-letter { color: #FCD34D; }
.class-pill.cls-c { border-color: rgba(16, 185, 129, 0.55); background: rgba(16, 185, 129, 0.13); }
.class-pill.cls-c .cls-letter { color: #34D399; }
.class-pill.cls-d { border-color: rgba(56, 189, 248, 0.55); background: rgba(56, 189, 248, 0.13); }
.class-pill.cls-d .cls-letter { color: #7DD3FC; }

/* Sparkline Slot */
.sparkline-box {
  width: 104px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Telemetry Charts (Deep Carbon Oscilloscope Canvas)
   ========================================================================== */
.chart-block {
  position: relative;
  width: 100%;
}
.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 158px;
  border-radius: var(--radius-sm);
  background: radial-gradient(ellipse at 50% 0%, #13151B 0%, #090A0D 75%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-inset);
  overflow: hidden;
  cursor: crosshair;
}
.chart-canvas-wrap.compact { height: 108px; }
.chart-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.stats-row {
  margin-bottom: 16px;
}
.stats-row .panel {
  margin-bottom: 0;
}
.stats-row .panel-header {
  padding: 10px 14px;
}
.stats-row .panel-body {
  padding: 11px 14px;
}
.legend-items {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(12, 13, 17, 0.96);
  border: 1px solid var(--border-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  font-size: 11.5px;
  white-space: nowrap;
  display: none;
}
.chart-tooltip .tt-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber-bright);
  margin-bottom: 4px;
}
.chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-primary);
}

/* ==========================================================================
   Server Details Spec Grid & Track/Car Galleries
   ========================================================================== */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.spec-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #171A20 0%, #121419 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.spec-key {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.spec-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.track-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #171A20 0%, #111317 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all 0.18s ease;
  color: var(--text-primary);
}
.track-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  color: var(--text-primary);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55);
}
.track-card-img {
  height: 112px;
  background-color: #090A0D;
  background-image: var(--carbon-weave-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.track-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25));
}
.track-card-meta { padding: 11px 14px; }
.track-card-loc {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.track-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 2px;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.car-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #181B21 0%, #121419 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.car-card:hover {
  border-color: var(--amber);
  background: linear-gradient(180deg, #232730 0%, #171A20 100%);
  color: var(--amber-bright);
  transform: translateY(-1px);
}

.lb-mini-card {
  background: #13151A;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.lb-mini-head {
  padding: 6px 10px;
  background-color: #171A21;
  background-image: var(--carbon-weave-subtle);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-box {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: #07080B;
  border: 1px solid var(--border-subtle);
  color: var(--sky);
  font-family: var(--font-mono);
  font-size: 11.5px;
  overflow-x: auto;
  white-space: nowrap;
}

/* Loading Skeletons & Empty/Error States */
.skeleton {
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, #14161B 25%, #1E2129 50%, #14161B 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state, .error-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.error-state {
  color: #FDA4AF;
  background: rgba(244, 63, 94, 0.09);
  border-radius: var(--radius-md);
  border: 1px solid rgba(244, 63, 94, 0.32);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #14161C;
  border: 1px solid var(--amber);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.current-event-badge {
  display: inline-block;
  margin-left: 55px;
  margin-top: 1px;
  font-size: 9.5px;
  line-height: 1.1;
  font-family: var(--font-mono);
  color: var(--emerald);
}

.chart-hint-desktop {
  font-size: 11px;
  color: var(--text-muted);
}

.srv-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.srv-cap-box {
  text-align: right;
}

/* Responsive */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .topbar-credit { display: none; }
  .footer-credit-mobile { display: flex; }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    border-radius: 0;
    background: #101217;
    border-bottom: 1px solid var(--border-medium);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.72);
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 120;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 10px 14px; font-size: 14px; }
  .nav-link.active::after { left: 10px; right: 10px; bottom: 0; }
  .mobile-menu-btn { display: inline-flex; flex-shrink: 0; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* Phone Breakpoint (320px - 640px) */
@media (max-width: 640px) {
  section[id],
  div[id] {
    scroll-margin-top: 64px;
  }

  /* Compact single-row topbar — Brand + Live Pill + Refresh + Menu all fit cleanly inside 360px+ */
  .topbar-inner {
    padding: 8px 10px;
    gap: 6px;
  }
  .brand {
    gap: 6px;
    min-width: 0;
  }
  .brand-mark {
    margin: -2px 0;
  }
  .brand-logo-img {
    width: 46px;
    height: 26px;
  }
  .brand-text-inline {
    gap: 5px;
  }
  .brand-title {
    font-size: 15.5px;
  }
  .brand-st-badge {
    padding: 2px 6px;
    font-size: 10.5px;
    letter-spacing: 0.6px;
  }
  .topbar-right {
    gap: 6px;
    flex-shrink: 0;
  }
  .live-pill {
    gap: 5px;
    padding: 3px 5px 3px 8px;
  }
  .countdown-ring {
    display: none;
  }
  .live-dot {
    width: 7px;
    height: 7px;
  }
  .live-timer {
    font-size: 11px;
    min-width: 24px;
  }
  .icon-mini-btn {
    width: 26px;
    height: 26px;
  }
  .mobile-menu-btn {
    width: 34px;
    height: 34px;
  }

  /* Tighter page & card layout */
  .container {
    padding: 12px 10px 22px;
  }
  .site-footer {
    padding: 12px 12px 14px;
    font-size: 10px;
    line-height: 1.45;
  }
  .footer-data-line {
    font-size: 10px;
  }
  .hero-banner {
    padding: 15px 14px;
    gap: 12px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
  }
  .hero-banner.compact {
    padding: 14px 14px;
  }
  .hero-banner.hero-home {
    padding: 11px 13px;
    gap: 10px;
    margin-bottom: 12px;
  }
  .hero-banner.hero-home .hero-eyebrow-lead {
    font-size: 14.5px;
    letter-spacing: 1px;
  }
  .hero-banner > div {
    min-width: 0;
    max-width: 100%;
  }
  .hero-eyebrow {
    font-size: 10px;
    letter-spacing: 0.9px;
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .hero-eyebrow-lead {
    font-size: 15px;
    letter-spacing: 1.1px;
    margin-bottom: 6px;
  }
  .hero-title {
    font-size: 21px;
  }
  .server-name-title {
    font-size: 16.5px;
    line-height: 1.3;
    word-break: break-word;
  }
  .hero-subtitle {
    font-size: 12.5px;
  }
  .srv-header-right {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
  }
  .srv-cap-box {
    text-align: left;
  }

  /* KPI Ribbon */
  .kpi-grid {
    gap: 8px;
    margin-bottom: 12px;
  }
  .kpi-card {
    padding: 9px 11px;
    column-gap: 8px;
    row-gap: 3px;
  }
  .kpi-label {
    font-size: 9px;
    letter-spacing: 0.7px;
  }
  .kpi-value {
    grid-row: 1;
    font-size: 17px;
  }
  .kpi-sub {
    grid-column: 1 / -1;
    font-size: 10.5px;
  }

  /* Panels & Controls */
  .grid-2 {
    gap: 14px;
    margin-bottom: 14px;
  }
  .panel {
    margin-bottom: 14px;
    border-radius: var(--radius-md);
  }
  .panel-header {
    padding: 11px 12px;
    gap: 9px;
  }
  .panel-title-wrap {
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
  }
  .panel-title {
    font-size: 14.5px;
    gap: 7px;
    flex-wrap: wrap;
  }
  .panel-controls {
    width: 100%;
    gap: 8px;
  }
  .panel-body {
    padding: 12px;
  }
  .panel-footer {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11.5px;
  }

  /* Full-width phone search inputs (16px prevents iOS Safari auto-zoom) */
  .search-input {
    min-width: 0 !important;
    width: 100%;
    flex: 1 1 100%;
    font-size: 16px;
    padding: 7px 11px;
  }

  /* Flexible segmented toggles (handles 5-button Class filters cleanly) */
  .seg-group {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .seg-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  .tab-bar {
    width: 100%;
    gap: 5px;
  }
  .tab-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Charts */
  .chart-hint-desktop {
    display: none;
  }
  .chart-canvas-wrap {
    height: 148px;
  }
  .chart-canvas-wrap.compact {
    height: 102px;
  }
  .legend-items {
    gap: 10px;
    font-size: 11.5px;
    flex-wrap: wrap;
  }

  /* Compact phone tables so 3-column tables fit without horizontal scrolling */
  table.data-table {
    font-size: 12px;
  }
  table.data-table thead th {
    padding: 5px 8px;
    font-size: 9.5px;
    letter-spacing: 0.6px;
  }
  table.data-table tbody td {
    padding: 4px 8px;
  }
  .track-cell {
    gap: 7px;
  }
  .track-thumb {
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
    padding: 2px;
  }
  .current-event-badge {
    margin-left: 45px;
  }
  .cap-wrap {
    min-width: 60px;
  }
  .cap-bar {
    --cap-w: 60px;
  }

  /* Spec & Gallery Grids */
  .spec-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .track-card-img {
    height: 84px;
    padding: 8px;
  }
  .track-card-meta {
    padding: 9px 10px;
  }
  .track-card-name {
    font-size: 13px;
  }
  .car-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    text-align: center;
  }
}

/* Ultra-narrow screens (<= 360px) */
@media (max-width: 360px) {
  .brand-logo-img {
    width: 38px;
    height: 22px;
  }
  .brand-title {
    font-size: 14px;
  }
  .live-pill {
    gap: 4px;
    padding: 2px 4px 2px 7px;
  }
  .icon-mini-btn {
    width: 24px;
    height: 24px;
  }
}
