/* ==========================================================================
   Calstone (calstone.app) — Calstone Light O Design System
   Inspired by uma.moe's sleek data-first shell & high-density competitive UI
   ========================================================================== */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* Calstone Light O Dark Palette (Midnight Navy #131B4C + Lightning Yellow #F7EB49 + Logo Gold #D4AC52) */
  --bg-primary: #070b14;
  --bg-secondary: #0c1222;
  --bg-tertiary: #141d34;
  --bg-quaternary: #1c2846;
  --component-bg: #0f1629;
  --component-hover: #141e36;
  --surface-overlay: #121a30;
  --navbar-bg: rgba(12, 18, 34, 0.92);
  --surface-tint: rgba(247, 235, 73, 0.08);
  --surface-tint-blue: rgba(100, 168, 255, 0.09);

  /* Borders */
  --border-subtle: rgba(164, 192, 240, 0.08);
  --border-primary: rgba(164, 192, 240, 0.14);
  --border-secondary: rgba(212, 172, 82, 0.28);
  --border-strong: rgba(247, 235, 73, 0.48);

  /* Text */
  --text-primary: #f4f7fc;
  --text-secondary: rgba(226, 235, 250, 0.76);
  --text-muted: rgba(186, 203, 232, 0.54);
  --text-disabled: rgba(186, 203, 232, 0.34);

  /* Brand & Accents */
  --accent-primary: #f7eb49;
  --accent-primary-rgb: 247, 235, 73;
  --accent-primary-text: #0b1120;
  --accent-gold: #d4ac52;
  --accent-gold-rgb: 212, 172, 82;
  --accent-blue: #64a8ff;
  --accent-blue-rgb: 100, 168, 255;
  --accent-navy: #284064;
  --accent-success: #7ad687;
  --accent-warning: #ffb74d;
  --accent-error: #f07178;
  --accent-purple: #c084fc;
  --accent-pink: #f472b6;

  /* Gradients */
  --gradient-wordmark: linear-gradient(115deg, #f7eb49 0%, #e0b552 46%, #7ab2ff 100%);
  --hero-ambient:
    radial-gradient(ellipse 55% 42% at 50% 18%, rgba(40, 64, 100, 0.36), transparent 72%),
    radial-gradient(ellipse 35% 28% at 58% 22%, rgba(247, 235, 73, 0.08), transparent 68%);
  --card-shadow: none;
  --card-shadow-hover: 0 8px 24px rgba(2, 6, 16, 0.42);
  --dropdown-shadow: 0 14px 36px rgba(2, 6, 18, 0.65);

  /* Umamusume Semantic Colors */
  --style-runaway: #b07cff;
  --style-front: #56a8ff;
  --style-pace: #7ad665;
  --style-late: #f7c948;
  --style-end: #f2784b;

  --stat-speed: #5bb5f9;
  --stat-stamina: #f27b82;
  --stat-power: #ffb75e;
  --stat-guts: #d08ce0;
  --stat-wit: #7ad385;
  --stat-pal: #f7d154;
  --stat-group: #4dd0e1;

  --surface-turf: #4ade80;
  --surface-dirt: #d99b66;
  --dist-sprint: #fb923c;
  --dist-mile: #4ade80;
  --dist-medium: #60a5fa;
  --dist-long: #c084fc;

  /* Logo Crest on Dark */
  --logo-crest-bg: radial-gradient(circle at 42% 38%, #fbfcff 0%, #e9effa 78%, #dce5f5 100%);
  --logo-crest-border: rgba(247, 235, 73, 0.52);
  --logo-crest-glow: 0 0 36px rgba(247, 235, 73, 0.14), 0 0 64px rgba(40, 64, 100, 0.45);
}

[data-theme="light"] {
  color-scheme: light;

  --bg-primary: #f2f5fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f5f8fd;
  --bg-quaternary: #e6edf8;
  --component-bg: #ffffff;
  --component-hover: #f8faff;
  --surface-overlay: #ffffff;
  --navbar-bg: rgba(255, 255, 255, 0.94);
  --surface-tint: rgba(27, 45, 94, 0.07);
  --surface-tint-blue: rgba(37, 99, 235, 0.08);

  --border-subtle: rgba(19, 27, 76, 0.08);
  --border-primary: rgba(19, 27, 76, 0.13);
  --border-secondary: rgba(184, 134, 27, 0.34);
  --border-strong: rgba(27, 45, 94, 0.44);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #5a6b84;
  --text-disabled: #94a3b8;

  --accent-primary: #1b2d5e;
  --accent-primary-rgb: 27, 45, 94;
  --accent-primary-text: #ffffff;
  --accent-gold: #b58419;
  --accent-gold-rgb: 181, 132, 25;
  --accent-blue: #2563eb;
  --accent-blue-rgb: 37, 99, 235;
  --accent-navy: #284064;
  --accent-success: #15803d;
  --accent-warning: #b45309;
  --accent-error: #b91c1c;
  --accent-purple: #7c3aed;
  --accent-pink: #be185d;

  --gradient-wordmark: linear-gradient(115deg, #131b4c 0%, #284064 56%, #c29128 100%);
  --hero-ambient:
    radial-gradient(ellipse 50% 38% at 22% 18%, rgba(40, 64, 100, 0.08), transparent 68%),
    radial-gradient(ellipse 42% 34% at 78% 16%, rgba(212, 172, 82, 0.11), transparent 68%);
  --card-shadow: 0 10px 26px rgba(19, 27, 76, 0.06);
  --card-shadow-hover: 0 14px 32px rgba(19, 27, 76, 0.11);
  --dropdown-shadow: 0 12px 32px rgba(19, 27, 76, 0.16);

  --style-runaway: #7c3aed;
  --style-front: #1d6fe2;
  --style-pace: #2e8b3c;
  --style-late: #c28708;
  --style-end: #d04e1e;

  --stat-speed: #1769aa;
  --stat-stamina: #b82b3b;
  --stat-power: #c46a06;
  --stat-guts: #843096;
  --stat-wit: #227a2e;
  --stat-pal: #a67608;
  --stat-group: #0e7490;

  --surface-turf: #16a34a;
  --surface-dirt: #a16207;
  --dist-sprint: #ea580c;
  --dist-mile: #16a34a;
  --dist-medium: #2563eb;
  --dist-long: #7c3aed;

  --logo-crest-bg: transparent;
  --logo-crest-border: transparent;
  --logo-crest-glow: drop-shadow(0 8px 20px rgba(19, 27, 76, 0.14));
}

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --rail-width: 64px;
  --header-height: 60px;
  --bottom-nav-height: 64px;
  --content-max: 1220px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  --z-rail: 30;
  --z-header: 40;
  --z-flyout: 60;
  --z-modal: 100;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-secondary);
}

/* ==========================================================================
   App Shell (Left Icon Rail + Top Utility Bar + Main Canvas + Footer)
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: var(--rail-width);
}

/* Left Icon Rail */
.nav-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: var(--z-rail);
  user-select: none;
}

.rail-brand {
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.rail-brand:hover {
  background: var(--bg-tertiary);
}

.rail-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--logo-crest-bg);
  border: 1px solid var(--logo-crest-border);
  padding: 3px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] .rail-logo-badge {
  background: transparent;
  border-color: transparent;
  padding: 1px;
}

.rail-brand:hover .rail-logo-badge {
  transform: scale(1.06);
}

.rail-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rail-items {
  flex: 1;
  width: 100%;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.rail-divider {
  width: 28px;
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.rail-item-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.rail-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rail-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.rail-btn.active {
  background: var(--surface-tint);
  color: var(--accent-primary);
  border-color: rgba(var(--accent-primary-rgb), 0.28);
}

.rail-btn svg {
  width: 20px;
  height: 20px;
}

.rail-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.rail-chevron {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  opacity: 0.45;
}

/* Rail Flyout Popover */
.rail-flyout {
  position: absolute;
  left: calc(var(--rail-width) - 2px);
  top: 0;
  width: 244px;
  background: var(--surface-overlay);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--dropdown-shadow);
  padding: 8px;
  z-index: var(--z-flyout);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.rail-item-wrap:hover .rail-flyout,
.rail-item-wrap:focus-within .rail-flyout {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.rail-item-wrap.flyout-dismissed .rail-flyout {
  opacity: 0 !important;
  pointer-events: none !important;
}

.flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 9px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.flyout-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.flyout-open {
  font-size: 11px;
  color: var(--text-muted);
}

.flyout-open:hover {
  color: var(--accent-primary);
}

.flyout-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.12s ease, color 0.12s ease;
}

.flyout-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.flyout-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 8px 4px;
}

.flyout-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 2px 4px 4px;
}

.flyout-chip {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: var(--radius-xs);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 0.12s ease;
}

.flyout-chip:hover,
.flyout-chip.active {
  background: var(--surface-tint);
  color: var(--accent-primary);
  border-color: rgba(var(--accent-primary-rgb), 0.35);
}

.rail-tooltip {
  position: absolute;
  left: calc(var(--rail-width) + 4px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: var(--surface-overlay);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: var(--dropdown-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: var(--z-flyout);
}

.rail-item-wrap:hover .rail-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Top Utility Bar */
.top-bar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: var(--z-header);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-brand-mini {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--logo-crest-bg);
  border: 1px solid var(--logo-crest-border);
  padding: 2px;
  flex-shrink: 0;
}

[data-theme="light"] .mobile-brand-mini {
  background: transparent;
  border-color: transparent;
}

.mobile-brand-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-title-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.page-title-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-title-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.utility-pill {
  height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--component-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.utility-pill:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
}

.utility-pill svg {
  width: 15px;
  height: 15px;
  color: var(--accent-gold);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--component-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  position: relative;
}

.page-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px 28px 56px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 18px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-logo-mini {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--logo-crest-bg);
  border: 1px solid var(--logo-crest-border);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .footer-logo-mini {
  background: transparent;
  border-color: transparent;
}

.footer-logo-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-links a,
.footer-links button {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--text-primary);
}

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

.version-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* ==========================================================================
   HOME PAGE (Main Area — uma.moe inspired Hero + Bento Grid + Quick Stats)
   ========================================================================== */

.home-wrap {
  background-image: var(--hero-ambient);
  background-repeat: no-repeat;
  min-height: calc(100vh - var(--header-height) - 62px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.home-hero-section {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 46px 24px 36px;
}

.hero-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 14px;
}

.hero-logo-crest {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--logo-crest-bg);
  border: 2px solid var(--logo-crest-border);
  box-shadow: var(--logo-crest-glow);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: calstone-float 4.5s ease-in-out infinite;
  flex-shrink: 0;
}

[data-theme="light"] .hero-logo-crest {
  width: 86px;
  height: 86px;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  filter: var(--logo-crest-glow);
}

.hero-logo-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes calstone-float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.02);
  }
}

.hero-wordmark {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: var(--gradient-wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  text-align: center;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  margin: 0 0 36px;
  font-weight: 400;
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 2-Column Bento Navigation Cards */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bento-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.bento-card:not(.disabled):hover {
  transform: translateY(-2px);
  background: var(--component-hover);
  border-color: var(--card-accent, var(--border-secondary));
  box-shadow: var(--card-shadow-hover);
}

.bento-card.disabled {
  opacity: 0.62;
  cursor: default;
}

.bento-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--accent-primary));
}

.bento-icon svg {
  width: 30px;
  height: 30px;
}

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

.bento-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
}

.bento-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.bento-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  line-height: 1.3;
}

.badge-live {
  background: var(--accent-primary);
  color: var(--accent-primary-text);
}

.badge-new {
  background: var(--accent-success);
  color: #07160c;
}

[data-theme="light"] .badge-new {
  color: #ffffff;
}

.badge-soon {
  background: var(--bg-quaternary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Home Next-LoH Quick Strip */
.home-featured-bar {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-featured-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-featured-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  background: rgba(var(--accent-gold-rgb), 0.14);
  border: 1px solid rgba(var(--accent-gold-rgb), 0.3);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.home-featured-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.home-featured-text strong {
  color: var(--text-primary);
}

.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 4-Column Quick Stats Strip (bottom of home like uma.moe) */
.home-stats-strip {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 20px 24px;
}

.home-stats-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.home-stat-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 18px;
  border-right: 1px solid var(--border-subtle);
}

.home-stat-cell:first-child {
  padding-left: 0;
}

.home-stat-cell:last-child {
  border-right: none;
}

.home-stat-icon {
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-stat-icon svg {
  width: 20px;
  height: 20px;
}

.home-stat-val {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

.home-stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   LoH DATA PAGE (Modeled closely on uma.moe /competitive/cm-data)
   ========================================================================== */

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

.loh-heading-group h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.loh-heading-group p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

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

.event-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.select-control {
  height: 40px;
  padding: 0 36px 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--component-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 38px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 260px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-control::picker-icon {
  display: none;
}

.select-control option {
  background: var(--surface-overlay);
  color: var(--text-primary);
}

.select-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.2);
}

.nav-arrow-btn {
  width: 36px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--component-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.nav-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Segmented Toggle */
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  gap: 2px;
}

.seg-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background: var(--surface-tint);
  color: var(--accent-primary);
  border-color: rgba(var(--accent-primary-rgb), 0.35);
}

/* Track Summary Banner (like uma.moe CM22 Track Strip) */
.track-banner {
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  box-shadow: var(--card-shadow);
}

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

.track-oval-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface-tint);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.25);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.track-title-line {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.track-cond-line {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.meta-chip.turf {
  color: var(--surface-turf);
  border-color: color-mix(in srgb, var(--surface-turf) 32%, transparent);
  background: color-mix(in srgb, var(--surface-turf) 10%, transparent);
}

.meta-chip.dirt {
  color: var(--surface-dirt);
  border-color: color-mix(in srgb, var(--surface-dirt) 34%, transparent);
  background: color-mix(in srgb, var(--surface-dirt) 12%, transparent);
}

.meta-chip.scenario {
  color: var(--accent-gold);
  border-color: rgba(var(--accent-gold-rgb), 0.3);
  background: rgba(var(--accent-gold-rgb), 0.1);
}

.track-kpis {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.track-kpi {
  padding-left: 20px;
  border-left: 1px solid var(--border-subtle);
}

.track-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.track-kpi-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.track-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Primary Pill Tab Strip (Overview, Umas, Support Cards, T1 Builds, Uniques, T96 Decks) */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab-btn.active {
  background: var(--surface-tint);
  color: var(--accent-primary);
  border-color: rgba(var(--accent-primary-rgb), 0.36);
}

.tab-btn svg {
  width: 15px;
  height: 15px;
}

.tab-count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.tab-btn.active .tab-count {
  background: rgba(var(--accent-primary-rgb), 0.16);
  color: var(--accent-primary);
}

/* Archive Disclaimer Banner */
.archive-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: rgba(var(--accent-gold-rgb), 0.08);
  border: 1px solid rgba(var(--accent-gold-rgb), 0.24);
  font-size: 12px;
  color: var(--text-secondary);
}

.archive-notice strong {
  color: var(--accent-gold);
}

.archive-notice-close {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}
.archive-notice-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Section Heading Row */
.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-header-row h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.section-meta-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Data Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

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

.panel-card {
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--card-shadow);
}

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

.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.action-btn:hover {
  border-color: var(--border-secondary);
  background: var(--bg-quaternary);
}

/* Running Style Rows (uma.moe thin-bar look) */
.metric-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.metric-row {
  padding: 11px 4px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.12s ease;
}

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

.metric-row:hover {
  background: rgba(var(--accent-blue-rgb), 0.04);
}

.metric-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.style-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}

.style-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.style-icon-mini {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.metric-nums {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
}

.metric-count {
  color: var(--text-muted);
  font-size: 12px;
}

.metric-pct {
  font-weight: 700;
  min-width: 48px;
  text-align: right;
}

/* Thin Progress Track */
.thin-bar-track {
  margin-top: 7px;
  height: 4px;
  width: 100%;
  border-radius: 999px;
  background: var(--bg-tertiary);
  overflow: hidden;
  display: flex;
}

.thin-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Uma Row Item (Overview & Full Table) */
.uma-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}

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

.uma-row:hover {
  background: var(--bg-tertiary);
}

.rank-badge {
  width: 34px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rank-badge.top-1 {
  color: var(--accent-primary);
}
.rank-badge.top-2 {
  color: #cbd5e1;
}
[data-theme="light"] .rank-badge.top-2 {
  color: #64748b;
}
.rank-badge.top-3 {
  color: #e09f5a;
}

.uma-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  flex-shrink: 0;
}

.uma-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.uma-info {
  flex: 1;
  min-width: 0;
}

.uma-top-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.uma-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uma-sub-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  margin-top: 2px;
}

.style-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.uma-rate-col {
  text-align: right;
  flex-shrink: 0;
}

.uma-pct {
  font-size: 14px;
  font-weight: 700;
}

.uma-frac {
  font-size: 11px;
  color: var(--text-muted);
}

/* Support Card Row */
.card-thumb {
  width: 38px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.card-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Filters Toolbar */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.18);
}

.pill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-primary);
  background: var(--component-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.13s ease;
}

.pill-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pill-btn.active {
  background: var(--surface-tint);
  border-color: rgba(var(--accent-primary-rgb), 0.45);
  color: var(--accent-primary);
}

/* ==========================================================================
   T1 BUILDS & DECK VISUALIZATION
   ========================================================================== */

.t1-runner-card {
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}

.t1-runner-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.t1-uma-ident {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.deck-card-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 54px;
}

.deck-card-img-wrap {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.deck-card-slot img {
  width: 48px;
  height: 58px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  transition: transform 0.15s ease;
  display: block;
}

.deck-card-slot:hover img {
  transform: translateY(-2px) scale(1.06);
}

.deck-card-slot.borrow img {
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.25);
}

.borrow-tag {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: var(--accent-primary-text);
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
}

.deck-card-caption {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Statline Bars (SPD / STA / PWR / GUT / WIT) */
.stat-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.stat-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-box-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Sparks & Skills */
.sparks-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.spark-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.spark-pill.blue {
  background: rgba(91, 181, 249, 0.14);
  color: var(--stat-speed);
  border: 1px solid rgba(91, 181, 249, 0.3);
}

.spark-pill.pink {
  background: rgba(244, 114, 182, 0.14);
  color: var(--accent-pink);
  border: 1px solid rgba(244, 114, 182, 0.3);
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.skill-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.skill-chip.double {
  border-color: rgba(var(--accent-gold-rgb), 0.42);
  color: var(--text-primary);
  background: rgba(var(--accent-gold-rgb), 0.12);
}

/* ==========================================================================
   T96 DECK EXPLORER (Leaderboard of Top 96 Teams)
   ========================================================================== */

.team-deck-card {
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.team-deck-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

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

.team-points-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
  background: var(--surface-tint);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.team-runners-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-runner-col {
  padding: 14px 16px;
  border-right: 1px solid var(--border-subtle);
}

.team-runner-col:last-child {
  border-right: none;
}

.team-runner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-deck-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.mini-card-item {
  position: relative;
}

.mini-card-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--border-primary);
  display: block;
}

.mini-card-item.borrow img {
  border: 2px solid var(--accent-primary);
}

/* ==========================================================================
   SCHEDULE PAGE (LoH 1–18 Roadmap)
   ========================================================================== */

.schedule-table-wrap {
  background: var(--component-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}

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

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr.clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}

.data-table tbody tr.clickable:hover {
  background: var(--bg-tertiary);
}

/* ==========================================================================
   MODAL (Credits, Disclaimers & Changelog)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.72);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: var(--z-modal);
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface-overlay);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--dropdown-shadow);
  padding: 24px 26px;
}

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

.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

.modal-title {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.modal-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.modal-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Empty & Loading States */
.empty-state {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 16px;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION & RESPONSIVE BREAKPOINTS
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-primary);
  z-index: var(--z-header);
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-item.active {
  color: var(--accent-primary);
}

@media (max-width: 980px) {
  .grid-2,
  .team-runners-list {
    grid-template-columns: 1fr;
  }
  .team-runner-col {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .team-runner-col:last-child {
    border-bottom: none;
  }
  .home-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .home-stat-cell {
    border-right: none;
    padding: 4px 0;
  }
  .track-kpi {
    padding-left: 0;
    border-left: none;
  }
}

@media (max-width: 767px) {
  .app-shell {
    padding-left: 0;
    padding-bottom: var(--bottom-nav-height);
  }
  .nav-rail {
    display: none;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .mobile-brand-mini {
    display: flex;
  }
  .top-bar {
    padding: 0 14px;
  }
  .utility-pill span {
    display: none;
  }
  .page-container {
    padding: 16px 14px 36px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .hero-brand-row {
    gap: 14px;
  }
  .hero-logo-crest {
    width: 64px;
    height: 64px;
  }
  .loh-controls {
    width: 100%;
  }
  .event-nav-group {
    width: 100%;
  }
  .select-control {
    min-width: 0;
    flex: 1;
    width: 100%;
  }
  .stat-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
