/* ==========================================================================
   関西バギークラブ連合 (KBCU) - Modern Motorsport Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Orbitron:wght@600;800;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Color Tokens */
  --bg-dark: #07090e;
  --bg-primary: #1a2840;
  --bg-secondary: #1f2f4a;
  --bg-card: rgba(38, 58, 96, 0.85);
  --bg-card-hover: rgba(48, 70, 110, 0.95);
  --bg-glass: rgba(13, 17, 26, 0.85);

  --accent-orange: #ff5500;
  --accent-orange-bright: #ff6e26;
  --accent-orange-glow: rgba(255, 85, 0, 0.4);
  --accent-yellow: #ffb703;
  --accent-cyan: #00e5ff;
  --accent-red: #ff3344;
  --accent-green: #00e676;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #07090e;

  --border-subtle: rgba(255, 255, 255, 0.22);
  --border-highlight: rgba(255, 85, 0, 0.5);
  --border-cyan: rgba(0, 229, 255, 0.4);

  /* Typography */
  --font-body: 'Noto Sans JP', 'Outfit', sans-serif;
  --font-racing: 'Orbitron', sans-serif;
  --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;

  /* Elevations */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow-orange: 0 0 25px rgba(255, 85, 0, 0.35);
  --shadow-glow-cyan: 0 0 25px rgba(0, 229, 255, 0.25);

  /* Layout */
  --container-max: 1240px;
  --header-height: 114px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Light & Cool Theme Tokens ("Bright Cool Motorsports")
   ========================================================================== */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-primary: #ffffff;
  --bg-secondary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);

  --accent-orange: #ea580c;
  --accent-orange-bright: #f97316;
  --accent-orange-glow: rgba(234, 88, 12, 0.25);
  --accent-yellow: #d97706;
  --accent-cyan: #0284c7;
  --accent-blue: #0369a1;
  --accent-red: #e11d48;
  --accent-green: #059669;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-highlight: rgba(2, 132, 199, 0.5);
  --border-cyan: rgba(2, 132, 199, 0.35);

  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.09);
  --shadow-glow-orange: 0 0 25px rgba(234, 88, 12, 0.2);
  --shadow-glow-cyan: 0 0 25px rgba(2, 132, 199, 0.2);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 日本語の自然な行末折り返しと禁則処理（画面幅に合わせて自動改行） */
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title,
.hero-title,
.card-title,
.race-heading,
.pricing-title,
.visitor-title,
.step-title,
.critical-title,
.rule-card-title,
.access-h3,
.modal-title,
.news-item-title,
.result-page-title {
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

p,
li,
dd,
dt,
figcaption,
blockquote,
.section-desc,
.hero-description,
.race-desc,
.step-text,
.pricing-notice,
.critical-desc,
.rule-card-desc,
.access-item-value,
.modal-body p,
.alert-text,
.feature-desc,
.visitor-rules-list li,
.race-story-text p,
.result-report-lead p {
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

/* 改行防止ユーティリティ（1-2文字こぼれ落ち防止） */
.no-break,
.keep-all,
.nowrap {
  display: inline-block !important;
  white-space: nowrap !important;
}

/* Carbon & Speed Background Motif */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255, 85, 0, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0, 229, 255, 0.05) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Urgent Notification Bar (Ticker)
   ========================================================================== */
.alert-ticker {
  background: linear-gradient(90deg, #b91c1c 0%, #dc2626 50%, #991b1b 100%);
  color: #fff;
  padding: 10px 0;
  font-size: 0.88rem;
  font-weight: 600;
  position: relative;
  z-index: 105;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.alert-ticker .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.alert-badge {
  background: #fff;
  color: #b91c1c;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.alert-text {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.alert-link {
  color: #ffe4e6;
  text-decoration: underline;
  margin-left: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: color var(--transition-fast);
}

.alert-link:hover {
  color: #fff;
}

.alert-close {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.alert-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ==========================================================================
   Header & Navigation (2-Row Layout: Title & Menu Separated)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .header {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

/* Row 1: Header Top (Brand Logo & Site Title + Action Buttons) */
.header-top {
  height: 66px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-top-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-badge {
  font-family: var(--font-racing);
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ff5500 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  filter: drop-shadow(0 2px 8px rgba(255, 85, 0, 0.4));
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-badge::before {
  content: '⚡';
  font-size: 1.35rem;
  -webkit-text-fill-color: initial;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-racing);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.header-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Row 2: Header Navigation Bar (Menu Strip) */
.header-nav-bar {
  height: 48px;
  background: rgba(13, 17, 26, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .header-nav-bar {
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid rgba(2, 132, 199, 0.18);
}

.header-nav-container {
  height: 100%;
  display: flex;
  align-items: center;
}

.header-nav-bar .nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
  list-style: none;
}

.header-nav-bar .nav-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  position: relative;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.header-nav-bar .nav-link:hover,
.header-nav-bar .nav-link.active {
  color: var(--text-primary);
}

[data-theme="light"] .header-nav-bar .nav-link:hover,
[data-theme="light"] .header-nav-bar .nav-link.active {
  color: #0284c7;
}

.header-nav-bar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-orange);
  transition: width var(--transition-fast);
  border-radius: 3px 3px 0 0;
}

[data-theme="light"] .header-nav-bar .nav-link::after {
  background: #0284c7;
}

.header-nav-bar .nav-link:hover::after,
.header-nav-bar .nav-link.active::after {
  width: 100%;
}

.nav-cta-mobile {
  display: none;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #e64500 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-orange-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 85, 0, 0.55);
  background: linear-gradient(135deg, var(--accent-orange-bright) 0%, #ff5500 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-cyan {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--shadow-glow-cyan);
}

.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.4);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-toggle.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(88vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  overflow: hidden;
  background-color: var(--bg-dark);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.6) contrast(1.08);
  transform: scale(1.03);
  transition: transform 12s ease-out;
}

.hero:hover .hero-bg img {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      rgba(7, 9, 14, 0.92) 0%,
      rgba(7, 9, 14, 0.72) 50%,
      rgba(7, 9, 14, 0.45) 100%),
    linear-gradient(0deg,
      var(--bg-dark) 0%,
      transparent 40%);
  z-index: 1;
}

[data-theme="light"] .hero-bg img {
  filter: brightness(0.9) contrast(1.02);
}

[data-theme="light"] .hero-overlay {
  background: linear-gradient(90deg,
      rgba(241, 245, 249, 0.94) 0%,
      rgba(241, 245, 249, 0.8) 50%,
      rgba(241, 245, 249, 0.42) 100%),
    linear-gradient(0deg,
      var(--bg-dark) 0%,
      transparent 35%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  max-width: 680px;
}

.hero-lead-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero-club-title-banner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 17, 26, 0.9);
  border: 1.5px solid rgba(255, 85, 0, 0.6);
  padding: 6px 18px 6px 8px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(255, 85, 0, 0.3), inset 0 0 15px rgba(255, 85, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-club-title-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 85, 0, 0.45);
}

.hero-club-badge {
  font-family: var(--font-racing);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ff5500 0%, #ff8c00 100%);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(255, 85, 0, 0.5);
  display: inline-block;
  line-height: 1;
}

.hero-club-title-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 85, 0, 0.15);
  border: 1px solid rgba(255, 85, 0, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-orange-bright);
  backdrop-filter: blur(8px);
}

.hero-badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-orange);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-orange);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #ff5500 0%, #ffaa00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.hero-feature-icon {
  color: var(--accent-orange);
  font-size: 1.1rem;
}

/* Hero Next Race Card */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-racing);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-yellow);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Countdown Timer */
.countdown-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.countdown-num {
  font-family: var(--font-racing);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent-orange-bright);
  line-height: 1;
  margin-bottom: 4px;
}

.countdown-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-race-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Section Headers & Common Utilities
   ========================================================================== */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px;
}

.section-tag {
  font-family: var(--font-racing);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent-orange);
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Fast Stats Bar */
.stats-strip {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 36px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 16px;
  position: relative;
}

.stat-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border-subtle);
}

.stat-num {
  font-family: var(--font-racing);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-num .unit {
  font-size: 1rem;
  color: var(--accent-orange);
  margin-left: 2px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   About Section & Friendly Community
   ========================================================================== */
.about-grid {
  max-width: 1040px;
  margin: 0 auto;
}

.about-content {
  width: 100%;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.feature-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-box:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: rgba(255, 85, 0, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Course Guide (2026 NEW COURSE)
   ========================================================================== */
.course-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.course-layout-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* コース切り替えトップバー */
.course-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(13, 17, 26, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.course-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.course-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.course-tab-btn:hover {
  color: #fff;
  border-color: var(--accent-orange);
  background: rgba(255, 85, 0, 0.1);
}

.course-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-bright));
  color: #fff;
  border-color: var(--accent-orange-bright);
  box-shadow: var(--shadow-glow-orange);
}

.course-zoom-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* コースタブパネル */
.course-tab-pane {
  display: none;
}

.course-tab-pane.active {
  display: block;
  animation: courseFadeIn 0.3s ease;
}

@keyframes courseFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* コース画像コンテナ */
.course-hero-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 720px;
  background: #05070c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.course-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-hero-img-wrap.course-img-clickable {
  cursor: zoom-in;
}

.course-hero-img-wrap.course-img-clickable:hover img {
  transform: scale(1.02);
}

/* コースバッジ */
.course-badge-direction {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  border: 2px solid var(--accent-orange);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-racing);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-glow-orange);
  z-index: 2;
  pointer-events: none;
}

.course-badge-direction span {
  color: var(--accent-orange);
}

.course-badge-line {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}

.badge-dot-red {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ff3344;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff3344;
}

.course-zoom-indicator {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.course-hero-img-wrap.course-img-clickable:hover .course-zoom-indicator,
.access-route-img-wrap.course-img-clickable:hover .course-zoom-indicator {
  background: var(--accent-orange);
  border-color: var(--accent-orange-bright);
  color: #fff;
  box-shadow: var(--shadow-glow-orange);
}

.course-specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px;
  background: rgba(13, 17, 26, 0.95);
  border-top: 1px solid var(--border-subtle);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.spec-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   News & Announcements
   ========================================================================== */
.news-container {
  max-width: 960px;
  margin: 0 auto;
}

.news-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-orange-glow);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.news-card.urgent {
  border-left: 4px solid var(--accent-red);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, rgba(19, 26, 41, 0.75) 30%);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.news-date {
  font-family: var(--font-racing);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.news-category {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.cat-urgent {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.cat-race {
  background: rgba(255, 85, 0, 0.2);
  color: var(--accent-orange-bright);
  border: 1px solid rgba(255, 85, 0, 0.4);
}

.cat-info {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.cat-result {
  background: rgba(255, 183, 3, 0.2);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 183, 3, 0.4);
}

.news-title-wrap {
  flex-grow: 1;
}

.news-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.news-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform var(--transition-fast);
}

.news-card:hover .news-arrow {
  transform: translateX(4px);
  color: var(--accent-orange);
}

/* ==========================================================================
   Races & Championship System
   ========================================================================== */
.race-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.race-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.race-card.challenge {
  border-top: 4px solid var(--accent-orange);
}

.race-card.gp-series {
  border-top: 4px solid var(--accent-cyan);
}

.race-badge {
  display: inline-block;
  font-family: var(--font-racing);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.badge-challenge {
  background: rgba(255, 85, 0, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 85, 0, 0.3);
}

.badge-series {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.race-heading {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.race-timing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-yellow);
  margin-bottom: 16px;
}

.race-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.race-points-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.race-point-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.race-point-item i {
  color: var(--accent-orange);
  font-weight: bold;
}

/* ==========================================================================
   Race Schedule Table (2026 Annual Schedule)
   ========================================================================== */
.schedule-section {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
}

.schedule-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.schedule-tab-btn {
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.schedule-tab-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.25);
}

.schedule-tab-btn.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-orange-glow);
}

[data-theme="light"] .schedule-tab-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2,132,199,0.3);
}

.schedule-panel {
  display: none;
}

.schedule-panel.active {
  display: block;
}

.schedule-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  font-size: 0.9rem;
}

.schedule-table th {
  background: rgba(255,85,0,0.12);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  word-break: keep-all;
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .schedule-table th {
  background: rgba(2,132,199,0.07);
}

.schedule-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-secondary);
  vertical-align: middle;
  white-space: nowrap;
  word-break: keep-all;
}

[data-theme="light"] .schedule-table td {
  border-bottom: 1px solid rgba(15,23,42,0.07);
}

.schedule-table tbody tr:hover td {
  background: rgba(255,255,255,0.03);
}

[data-theme="light"] .schedule-table tbody tr:hover td {
  background: rgba(2,132,199,0.04);
}

.schedule-table .sch-date {
  font-family: var(--font-racing);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.88rem;
  width: 100px;
  min-width: 95px;
  white-space: nowrap;
}

.schedule-table .sch-name {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 260px;
  white-space: normal !important;
  word-break: keep-all;
  line-height: 1.45;
}

.schedule-table .sch-note {
  min-width: 180px;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.4;
}

.sch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.sch-badge-cancelled {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.35);
}

.sch-badge-postponed {
  background: rgba(255,183,3,0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(255,183,3,0.35);
}

.sch-badge-special {
  background: rgba(0,229,255,0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0,229,255,0.3);
}

.sch-badge-done {
  background: rgba(0,230,118,0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0,230,118,0.3);
}

.sch-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: normal;
  word-break: keep-all;
}

.schedule-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-items: center;
}

/* ==========================================================================
   Race Results Section
   ========================================================================== */
.results-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.results-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.results-tab-btn {
  padding: 10px 28px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.results-tab-btn:hover {
  color: var(--text-primary);
}

.results-tab-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 4px 14px var(--shadow-glow-cyan);
}

[data-theme="light"] .results-tab-btn.active {
  background: #0284c7;
  border-color: #0284c7;
}

.results-panel {
  display: none;
}

.results-panel.active {
  display: block;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  transition: all var(--transition-fast);
  flex-wrap: wrap;
}

.result-item:hover {
  border-color: rgba(255,255,255,0.2);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.result-item.cancelled {
  border-left: 3px solid #f87171;
  opacity: 0.65;
}

.result-item.upcoming {
  border-left: 3px solid var(--accent-cyan);
  opacity: 0.75;
}

.result-date {
  font-family: var(--font-racing);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 68px;
}

.result-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-grow: 1;
  word-break: keep-all;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.result-link:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: var(--shadow-glow-cyan);
}

[data-theme="light"] .result-link {
  background: rgba(2,132,199,0.08);
  border-color: rgba(2,132,199,0.3);
  color: #0284c7;
}

[data-theme="light"] .result-link:hover {
  background: #0284c7;
  color: #fff;
}

/* ==========================================================================
   Series Race Point Ranking Section
   ========================================================================== */
.ranking-section {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
}

.ranking-info-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: rgba(0,229,255,0.06);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  margin-bottom: 32px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

[data-theme="light"] .ranking-info-bar {
  background: rgba(2,132,199,0.05);
  border-color: rgba(2,132,199,0.18);
}

.ranking-info-bar strong {
  color: var(--accent-cyan);
}

[data-theme="light"] .ranking-info-bar strong {
  color: #0284c7;
}

.ranking-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  -webkit-overflow-scrolling: touch;
}

.ranking-table {
  --rank-col-w: 52px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 880px;
  font-size: 0.85rem;
}

.ranking-table th {
  background-color: #0c1824;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

[data-theme="light"] .ranking-table th {
  background-color: #e3eef6;
  border-bottom: 1px solid var(--border-subtle);
}

/* 行ごとの不透明な背景色定義（スクロール時に背後が透けないように管理） */
.ranking-table tbody tr {
  --row-bg: #07090e;
}
.ranking-table tbody tr:nth-child(1) {
  --row-bg: #13130f;
}
.ranking-table tbody tr:nth-child(2) {
  --row-bg: #0c1015;
}
.ranking-table tbody tr:nth-child(3) {
  --row-bg: #110e0c;
}
.ranking-table tbody tr:hover {
  --row-bg: #121824;
}

[data-theme="light"] .ranking-table tbody tr {
  --row-bg: #f1f5f9;
}
[data-theme="light"] .ranking-table tbody tr:nth-child(1) {
  --row-bg: #fdf8ee;
}
[data-theme="light"] .ranking-table tbody tr:nth-child(2) {
  --row-bg: #f0f4f8;
}
[data-theme="light"] .ranking-table tbody tr:nth-child(3) {
  --row-bg: #faf4ee;
}
[data-theme="light"] .ranking-table tbody tr:hover {
  --row-bg: #e4eef6;
}

.ranking-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: var(--text-secondary);
  white-space: nowrap;
  word-break: keep-all;
  background-color: var(--row-bg);
  box-sizing: border-box;
}

[data-theme="light"] .ranking-table td {
  border-bottom: 1px solid rgba(15,23,42,0.07);
}

/* 順位列（1列目）：固定表示 (Sticky) */
.ranking-table th:first-child,
.ranking-table th.rank-col,
.ranking-table td:first-child,
.ranking-table td.rank-col {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  width: 52px;
  width: var(--rank-col-w, 52px);
  min-width: 52px;
  min-width: var(--rank-col-w, 52px);
  max-width: 52px;
  max-width: var(--rank-col-w, 52px);
  z-index: 2;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

/* 名前列（2列目）：固定表示 (Sticky) */
.ranking-table th:nth-child(2),
.ranking-table th.name-col,
.ranking-table td:nth-child(2),
.ranking-table td.name-col {
  position: -webkit-sticky;
  position: sticky;
  left: 52px;
  left: var(--rank-col-w, 52px);
  min-width: 105px;
  z-index: 2;
  text-align: left;
  padding-left: 16px;
  padding-right: 14px;
  border-right: 1px solid var(--border-subtle);
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .ranking-table th:nth-child(2),
[data-theme="light"] .ranking-table th.name-col,
[data-theme="light"] .ranking-table td:nth-child(2),
[data-theme="light"] .ranking-table td.name-col {
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.08);
}

/* ヘッダーの固定列はデータ行セルより前面に配置 */
.ranking-table th:first-child,
.ranking-table th.rank-col,
.ranking-table th:nth-child(2),
.ranking-table th.name-col {
  z-index: 3;
}

/* 角丸のフィット */
.ranking-table th:first-child {
  border-top-left-radius: calc(var(--radius-md) - 1px);
}
.ranking-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: calc(var(--radius-md) - 1px);
}

.ranking-table td.rank-col {
  font-family: var(--font-racing);
  font-weight: 800;
  font-size: 1rem;
}

.ranking-table th.rank-col,
.ranking-table th.name-col {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-align: center;
}

.ranking-table .rank-1 { color: #fbbf24; }
.ranking-table .rank-2 { color: #94a3b8; }
.ranking-table .rank-3 { color: #c97d3b; }

.ranking-table td.name-col {
  font-weight: 700;
  color: var(--text-primary);
}

.ranking-table .total-col {
  font-family: var(--font-racing);
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent-yellow);
}

.ranking-table .rd-cell {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ranking-table .rd-cell span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ranking-table .rd-cancelled {
  color: var(--text-muted);
  opacity: 0.4;
}

.ranking-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
  line-height: 1.6;
}

/* Mobile adjustments for new sections */
@media (max-width: 768px) {
  .schedule-table-wrap,
  .ranking-table-wrap {
    border-radius: var(--radius-sm);
  }

  .ranking-table {
    --rank-col-w: 32px;
    font-size: 0.8rem;
  }

  .ranking-table th {
    padding: 8px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-body);
    text-align: center;
  }

  .ranking-table th.rank-col,
  .ranking-table th.name-col {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-body);
    letter-spacing: 0.05em;
    text-align: center;
  }

  [data-theme="light"] .ranking-table th.rank-col,
  [data-theme="light"] .ranking-table th.name-col {
    color: #64748b;
  }

  .ranking-table td {
    padding: 8px 4px;
  }

  .ranking-table th:first-child,
  .ranking-table th.rank-col,
  .ranking-table td:first-child,
  .ranking-table td.rank-col {
    width: 32px;
    width: var(--rank-col-w, 32px);
    min-width: 32px;
    min-width: var(--rank-col-w, 32px);
    max-width: 32px;
    max-width: var(--rank-col-w, 32px);
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
  }

  .ranking-table th:first-child {
    border-top-left-radius: calc(var(--radius-sm) - 1px);
  }

  .ranking-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: calc(var(--radius-sm) - 1px);
  }

  .ranking-table th:nth-child(2),
  .ranking-table th.name-col,
  .ranking-table td:nth-child(2),
  .ranking-table td.name-col {
    left: 32px;
    left: var(--rank-col-w, 32px);
    width: 66px;
    min-width: 66px;
    max-width: 66px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .ranking-table td.name-col {
    font-size: 0.74rem;
    text-align: left;
    white-space: nowrap;
    word-break: keep-all;
  }

  .schedule-tab-btn,
  .results-tab-btn {
    padding: 8px 18px;
    font-size: 0.82rem;
  }

  .result-item {
    gap: 10px;
    padding: 12px 14px;
  }

  .ranking-info-bar {
    gap: 12px;
    padding: 12px 14px;
    font-size: 0.82rem;
  }

  .schedule-legend {
    gap: 10px;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   Membership & Pricing Guide
   ========================================================================== */
.pricing-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: flex-start;
}

.pricing-card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.pricing-header-wrap {
  margin-bottom: 28px;
}

.pricing-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pricing-notice {
  font-size: 0.9rem;
  color: var(--accent-orange-bright);
  font-weight: 600;
}

/* Table Style for Monthly Dues */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 28px;
}

.dues-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dues-table th,
.dues-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.dues-table th {
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dues-table td {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.dues-table .period {
  font-weight: 700;
  color: var(--text-primary);
}

.dues-table .price {
  font-family: var(--font-racing);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-orange-bright);
}

.dues-table .early-bird {
  background: rgba(255, 85, 0, 0.08);
}

.dues-table .badge-renew {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.dues-notes {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-orange);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pricing-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.perk-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  font-weight: 600;
}

.perk-pill span {
  color: var(--accent-green);
  font-size: 1.1rem;
}

/* Visitor Card */
.visitor-card {
  background: linear-gradient(135deg, rgba(26, 36, 58, 0.9) 0%, rgba(13, 17, 26, 0.95) 100%);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-glow-cyan);
  position: relative;
}

.visitor-tag {
  font-family: var(--font-racing);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.visitor-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.visitor-price-block {
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.visitor-price {
  font-family: var(--font-racing);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.visitor-price span {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.visitor-discount-badge {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255, 183, 3, 0.15);
  color: var(--accent-yellow);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
}

.visitor-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.visitor-rules-list li {
  position: relative;
  padding-left: 20px;
}

.visitor-rules-list li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--accent-cyan);
  font-size: 1.2rem;
  line-height: 1;
}

/* Membership Steps */
.join-steps-section {
  margin-top: 60px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-box {
  background: rgba(48, 72, 112, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 3px solid var(--accent-orange);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.step-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.step-box .step-num,
.step-num {
  font-family: var(--font-racing);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 85, 0, 0.35);
  line-height: 1;
  margin-bottom: 12px;
}

.step-box .step-title,
.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-box .step-text,
.step-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Control Tire Regulations
   ========================================================================== */
.tires-container {
  max-width: 1060px;
  margin: 0 auto;
}

.tires-intro {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.tire-rule-item {
  display: flex;
  gap: 14px;
}

.tire-rule-icon {
  color: var(--accent-orange);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.tire-rule-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tire-rule-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tire-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tire-search {
  flex-grow: 1;
  max-width: 360px;
  position: relative;
}

.tire-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.tire-search input:focus {
  border-color: var(--accent-orange);
}

.tire-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tire-brand-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tire-brand-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tire-brand-btn:hover,
.tire-brand-btn.active {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}

/* Tire Table */
.tire-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.tire-table {
  width: 100%;
  border-collapse: collapse;
}

.tire-table th,
.tire-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tire-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 20px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.tire-brand-col {
  font-family: var(--font-racing);
  font-weight: 800;
  color: var(--text-primary);
}

.tire-name-col {
  font-weight: 600;
  color: var(--text-primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-ok {
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.status-banned {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-challenge-only {
  background: rgba(255, 183, 3, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 183, 3, 0.3);
}

/* ==========================================================================
   Rules & Etiquette (Critical Notices)
   ========================================================================== */
.rules-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.rules-critical-banner {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  border: 1px solid #ef4444;
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25);
}

.critical-icon {
  font-size: 3rem;
  color: #fff;
  flex-shrink: 0;
}

.critical-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.critical-desc {
  font-size: 0.95rem;
  color: #fecaca;
  line-height: 1.6;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform var(--transition-fast);
}

.rule-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.rule-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 18px;
  color: var(--accent-orange);
}

.rule-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.rule-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Access Route & Parking Guide (阪奈道路からの進入ルート・駐車場案内)
   ========================================================================== */
.access-route-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 36px;
}

.access-route-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: rgba(13, 17, 26, 0.85);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
}

.access-route-footer-icon {
  color: var(--accent-orange);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.access-route-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(13, 17, 26, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.route-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-racing);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.route-topbar-title .badge-tag {
  font-size: 0.75rem;
  font-family: var(--font-main);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 85, 0, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 85, 0, 0.3);
}

.access-route-img-wrap {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.access-route-img-wrap.is-wide-map {
  aspect-ratio: 1687 / 883;
}

.access-route-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-medium);
}

.access-route-img-wrap:hover img {
  transform: scale(1.015);
}

.access-route-img-wrap.course-img-clickable .course-zoom-indicator {
  left: 20px;
  right: auto;
  bottom: 20px;
}

/* Route Pins */
.route-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
}

.route-pin-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(12px);
  border: 2px solid #fff;
  white-space: nowrap;
}

.route-pin-arrow {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid #fff;
  margin-top: -2px;
}

.route-pin-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.route-pin-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.route-pin-title {
  font-family: var(--font-racing);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: #fff;
}

.route-pin-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

/* Entrance Pin (Emerald Green) - Offset to upper-right of circle so red route is fully visible */
.route-pin.route-pin-entrance {
  left: 65.5%;
  top: 74.5%;
  transform: translate(-14px, -100%);
  align-items: flex-start;
}
.route-pin.route-pin-entrance .route-pin-badge {
  border-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}
.route-pin.route-pin-entrance .route-pin-arrow {
  border-top-color: #10b981;
  margin-left: 8px;
}
.route-pin.route-pin-entrance .route-pin-title {
  color: #a7f3d0;
}

/* Parking Pin (Racing Orange) */
.route-pin-parking .route-pin-badge {
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-glow-orange);
}
.route-pin-parking .route-pin-arrow {
  border-top-color: var(--accent-orange);
}
.route-pin-parking .route-pin-title {
  color: #ffedd5;
}

/* Mirror Pin (Caution Amber / Yellow) */
.route-pin-mirror .route-pin-badge {
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}
.route-pin-mirror .route-pin-arrow {
  border-top-color: #f59e0b;
}
.route-pin-mirror .route-pin-title {
  color: #fef3c7;
}

/* Road Pin (Highway Blue) - Points left toward the road */
.route-pin-road {
  position: absolute;
  left: 7.5%;
  top: 13.0%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
}
.route-pin-road .route-pin-arrow {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 11px solid #3b82f6;
  border-left: none;
  margin-top: 0;
  margin-right: -2px;
  margin-left: 0;
  flex-shrink: 0;
}
.route-pin-road .route-pin-badge {
  border-color: #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.5);
}
.route-pin-road .route-pin-title {
  color: #bfdbfe;
}

/* Road Label */
.route-badge-road {
  position: absolute;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Route Steps Grid */
.route-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 32px 36px;
  background: rgba(13, 17, 26, 0.95);
  border-top: 1px solid var(--border-subtle);
}

.route-step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all var(--transition-fast);
}

.route-step-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.route-step-card.highlight-entrance {
  border-left: 4px solid #10b981;
}

.route-step-card.highlight-parking {
  border-left: 4px solid var(--accent-orange);
}

.step-num {
  font-family: var(--font-racing);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-orange);
}

.route-step-card.highlight-entrance .step-num {
  color: #10b981;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.access-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.access-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.access-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 85, 0, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.access-h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

.access-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.access-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.access-item {
  display: flex;
  gap: 14px;
  font-size: 0.9rem;
}

.access-item-label {
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
  font-weight: 600;
}

.access-item-value {
  color: var(--text-primary);
  line-height: 1.5;
}

.sponsor-box {
  margin-top: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.sponsor-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sponsor-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-orange-bright);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 85, 0, 0.08);
  border: 1px solid rgba(255, 85, 0, 0.3);
  transition: all var(--transition-fast);
}

.sponsor-link-btn:hover {
  background: var(--accent-orange);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #040508;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  margin-bottom: 48px;
  align-items: start;
}

.footer-brand-col {
  max-width: 400px;
}

.footer-org-name {
  font-weight: 900;
  font-size: 1.35rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.footer-circuit-subtitle {
  font-size: 0.76rem;
  font-family: var(--font-racing);
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  color: var(--accent-orange);
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 14px;
  line-height: 1.75;
  word-break: normal !important;
  line-break: strict !important;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-h4 {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-h4::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent-orange);
}

.footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  list-style: none;
}

.footer-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 3px 0;
  transition: all var(--transition-fast);
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-orange);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.footer-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-bounce);
}

.modal-backdrop.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-header {
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-top: 8px;
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-highlight-box {
  background: rgba(255, 85, 0, 0.1);
  border: 1px solid rgba(255, 85, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px 0;
}

.modal-highlight-box strong {
  color: var(--accent-orange-bright);
}

/* ==========================================================================
   Full-screen Course Lightbox Viewer (全画面高解像度ビューアー)
   ========================================================================== */
.modal-lightbox {
  padding: 0 !important;
  background: rgba(3, 5, 10, 0.95) !important;
  backdrop-filter: blur(16px);
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  z-index: 9999 !important;
  overflow: hidden;
}

.lightbox-toolbar {
  width: 100%;
  height: 60px;
  background: rgba(13, 17, 26, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 10;
}

.lightbox-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  flex-wrap: wrap;
}

.lightbox-title {
  font-family: var(--font-racing);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.lightbox-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-btn:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange-bright);
  color: #fff;
  box-shadow: var(--shadow-glow-orange);
}

.lightbox-close {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-viewport {
  flex: 1 1 auto;
  width: 100%;
  height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 20px;
  cursor: zoom-in;
  user-select: none;
}

.lightbox-viewport.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 95vw;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  transition: transform 0.25s ease, max-width 0.25s ease, max-height 0.25s ease;
  display: block;
}

.lightbox-viewport.is-zoomed .lightbox-img {
  max-width: none;
  max-height: none;
  width: 1920px;
  cursor: zoom-out;
  margin: auto;
}

.lightbox-footer-hint {
  height: 40px;
  background: rgba(7, 9, 14, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 0 16px;
  text-align: center;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card:nth-child(2)::after {
    display: none;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .pricing-layout {
    grid-template-columns: 1fr;
  }

  .rules-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .access-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 64px;
  }

  html {
    scroll-padding-top: 76px !important;
  }

  .header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 990 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
  }

  .alert-ticker {
    margin-top: var(--header-height) !important;
    position: relative !important;
    z-index: 980 !important;
  }

  .header-top {
    height: 64px;
  }

  .header-top-container {
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 0 1 auto;
    margin-right: 0;
    white-space: nowrap;
  }

  .brand-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    padding: 2px 0;
    gap: 4px;
    line-height: 1;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .brand-text {
    min-width: 0;
    flex-shrink: 1;
    white-space: nowrap;
  }

  .brand-title {
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    word-break: keep-all;
  }

  .brand-sub {
    font-size: 0.43rem;
    line-height: 1.1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    word-break: keep-all;
  }

  .header-top-right {
    flex-shrink: 0;
    gap: 8px;
    display: flex;
    align-items: center;
  }

  .header-cta-desktop {
    display: none;
  }

  /* テーマ切り替えボタン（スマホ版：クッキリ視認できる円形ボタン） */
  .theme-toggle-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    background: #1e293b;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    cursor: pointer;
    flex-shrink: 0;
  }

  .theme-toggle-btn span:last-child {
    display: none;
  }

  [data-theme="light"] .theme-toggle-btn {
    background: #e0f2fe;
    border: 1.5px solid #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
    color: #0284c7;
  }

  /* メニュー開閉ボタン（スマホ版視認性向上） */
  .mobile-toggle {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    padding: 8px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
  }

  [data-theme="light"] .mobile-toggle {
    background: #f8fafc !important;
    border: 1px solid rgba(15, 23, 42, 0.15) !important;
  }

  .header-nav-bar.nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: #0d111a;
    flex-direction: column;
    padding: 24px 20px;
    gap: 20px;
    align-items: flex-start;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    border-top: 1px solid var(--border-subtle);
    overflow-y: auto;
    z-index: 105;
  }

  [data-theme="light"] .header-nav-bar.nav {
    background: #ffffff;
  }

  .header-nav-bar.nav.open {
    transform: translateX(0);
  }

  .header-nav-bar .header-nav-container {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 0;
  }

  .header-nav-bar .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    height: auto;
  }

  .header-nav-bar .nav-link {
    font-size: 1.1rem;
    width: 100%;
    display: block;
    padding: 8px 0;
  }

  .header-nav-bar .nav-link::after {
    display: none;
  }

  .nav-cta-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-cta-mobile .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .course-card-topbar {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .course-zoom-hint {
    display: none;
  }

  .course-tab-btn {
    padding: 7px 14px;
    font-size: 0.82rem;
  }

  .course-badge-direction {
    top: 12px;
    right: 12px;
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  .course-badge-line {
    bottom: 12px;
    left: 12px;
    font-size: 0.72rem;
    padding: 4px 8px;
  }

  .course-zoom-indicator {
    bottom: 12px;
    right: 12px;
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .access-route-img-wrap.course-img-clickable .course-zoom-indicator {
    left: 12px;
    right: auto;
    bottom: 12px;
  }

  .course-specs-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px;
  }

  .lightbox-toolbar {
    height: auto;
    padding: 10px 14px;
    gap: 8px;
  }

  .lightbox-title {
    font-size: 0.92rem;
  }

  .lightbox-sub {
    font-size: 0.75rem;
  }

  .lightbox-viewport {
    height: calc(100vh - 105px);
    padding: 8px;
  }

  .lightbox-viewport.is-zoomed .lightbox-img {
    width: 1200px;
  }

  .lightbox-footer-hint {
    font-size: 0.72rem;
    height: auto;
    padding: 6px 10px;
  }

  .access-route-topbar {
    padding: 12px 16px;
  }

  .access-route-footer {
    padding: 12px 16px;
    font-size: 0.88rem;
  }

  .route-topbar-title {
    font-size: 0.92rem;
  }

  .route-pin-badge {
    padding: 4px 8px;
    gap: 6px;
  }

  .route-pin-icon {
    font-size: 0.95rem;
  }

  .route-pin-title {
    font-size: 0.75rem;
  }

  .route-pin-sub {
    font-size: 0.62rem;
  }

  .route-pin-road {
    left: 7.0%;
    top: 13.0%;
  }

  .route-pin-road .route-pin-arrow {
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #3b82f6;
  }

  .route-pin.route-pin-entrance {
    left: 65.5%;
    top: 74.0%;
    transform: translate(-10px, -100%);
  }

  .route-pin.route-pin-entrance .route-pin-arrow {
    border-left-width: 6px;
    border-right-width: 6px;
    border-top-width: 9px;
    margin-left: 6px;
  }

  .route-badge-road {
    font-size: 0.7rem;
    padding: 4px 8px;
    bottom: 8px;
    left: 8px;
  }

  .route-steps-grid {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 14px;
  }

  .race-grid {
    grid-template-columns: 1fr;
  }

  .tires-intro {
    grid-template-columns: 1fr;
  }

  .rules-critical-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 16px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 36px 0 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 20px;
  }

  .footer-brand-col {
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand-col .brand-badge {
    margin-bottom: 6px;
    font-size: 1.6rem;
  }

  .footer-org-name {
    font-size: 1.15rem;
    margin-bottom: 2px;
  }

  .footer-circuit-subtitle {
    font-size: 0.72rem;
    margin-bottom: 0;
  }

  /* モバイル表示では説明文とナビゲーション列を非表示にして超ミニマル化 */
  .footer-desc {
    display: none !important;
  }

  .footer-nav-col {
    display: none !important;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding-top: 18px;
    font-size: 0.75rem;
  }
}

@media (max-width: 360px) {
  .header-top-container {
    padding: 0 4px;
    gap: 4px;
  }

  .brand {
    gap: 4px;
  }

  .brand-badge {
    font-size: 1.0rem;
    gap: 2px;
  }

  .brand-badge::before {
    font-size: 0.8rem;
  }

  .brand-title {
    font-size: 0.74rem;
    letter-spacing: 0;
  }

  .brand-sub {
    font-size: 0.42rem;
    letter-spacing: 0.02em;
  }

  .header-top-right {
    gap: 4px;
  }
}

/* ==========================================================================
   Bright & Cool Theme (Light Mode Component Overrides)
   ========================================================================== */
[data-theme="light"] body::before {
  background-image:
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(249, 115, 22, 0.06) 0%, transparent 45%),
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
}

[data-theme="light"] .alert-ticker {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #b91c1c 100%);
}

[data-theme="light"] .hero {
  background: radial-gradient(circle at 85% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 55%),
              linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .brand-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.3));
}

[data-theme="light"] .brand-title {
  color: #0f172a;
  text-shadow: none;
}

[data-theme="light"] .brand-sub {
  color: #0284c7;
}

[data-theme="light"] .hero-club-title-banner {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(2, 132, 199, 0.45);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.18), inset 0 0 15px rgba(2, 132, 199, 0.05);
}

[data-theme="light"] .hero-club-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

[data-theme="light"] .hero-club-title-text {
  color: #0f172a;
  text-shadow: none;
}

[data-theme="light"] .hero-badge-wrap {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

[data-theme="light"] .hero-badge-pulse {
  background: #0284c7;
  box-shadow: 0 0 10px #0284c7;
}

[data-theme="light"] .hero-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(2, 132, 199, 0.2);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .hero-card::before {
  background: linear-gradient(90deg, #0284c7 0%, #ff5500 100%);
}

[data-theme="light"] .card-tag {
  color: #0284c7;
}

[data-theme="light"] .countdown-box {
  background: #f8fafc;
  border: 1px solid rgba(2, 132, 199, 0.15);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.02);
}

[data-theme="light"] .countdown-num {
  color: #0284c7;
}

[data-theme="light"] .info-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .stats-strip {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .course-card-topbar {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .course-tab-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  color: #475569;
}

[data-theme="light"] .course-tab-btn:hover {
  color: #0284c7;
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}

[data-theme="light"] .course-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .course-hero-img-wrap {
  background: #0f172a;
}

[data-theme="light"] .course-badge-line,
[data-theme="light"] .course-zoom-indicator {
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .course-hero-img-wrap.course-img-clickable:hover .course-zoom-indicator,
[data-theme="light"] .access-route-img-wrap.course-img-clickable:hover .course-zoom-indicator {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .course-specs-grid {
  background: #ffffff;
  border-top-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .course-badge-direction {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: #0284c7;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .lightbox-toolbar {
  background: #0f172a;
}

[data-theme="light"] .lightbox-title {
  color: #f8fafc;
}

[data-theme="light"] .lightbox-sub {
  color: #94a3b8;
}

[data-theme="light"] .tab-btn {
  background: #ffffff;
  color: #475569;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .tab-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

[data-theme="light"] .news-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .news-card:hover {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .dues-table th,
[data-theme="light"] .tire-table th {
  background: #f0f9ff;
  color: #0369a1;
  border-bottom: 2px solid rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .dues-table tr:hover,
[data-theme="light"] .tire-table tr:hover {
  background: #f8fafc;
}

[data-theme="light"] .dues-table .early-bird {
  background: rgba(254, 243, 199, 0.5);
}

[data-theme="light"] .dues-notes {
  background: #f8fafc;
  border-left-color: #f97316;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
}

[data-theme="light"] .perk-pill {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .visitor-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.1);
}

[data-theme="light"] .visitor-price-block {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.2);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .visitor-price {
  color: #0f172a;
}

/* How to Join Steps (Light Theme) */
[data-theme="light"] .step-box {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid var(--accent-orange);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .step-box:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  border-left-color: var(--accent-orange);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .step-box .step-num {
  color: var(--accent-orange);
  opacity: 0.85;
}

[data-theme="light"] .step-box .step-title {
  color: var(--text-primary);
}

[data-theme="light"] .step-box .step-text {
  color: var(--text-secondary);
}

[data-theme="light"] .tire-search input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

[data-theme="light"] .tire-search input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .tire-brand-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}

[data-theme="light"] .tire-brand-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.3);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.5);
}

[data-theme="light"] .footer {
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  color: #0f172a;
  border-top: 1px solid rgba(2, 132, 199, 0.2);
  position: relative;
}

[data-theme="light"] .footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #ff5500 100%);
}

[data-theme="light"] .footer .brand-badge {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .footer-circuit-subtitle {
  color: #0284c7;
}

[data-theme="light"] .footer .footer-h4 {
  color: #0f172a;
  font-weight: 800;
  letter-spacing: 0.05em;
}

[data-theme="light"] .footer .footer-desc {
  color: #475569;
  line-height: 1.7;
}

[data-theme="light"] .footer .footer-link {
  color: #64748b;
  font-weight: 500;
  transition: all var(--transition-fast);
}

[data-theme="light"] .footer .footer-link::after {
  background: #0284c7;
}

[data-theme="light"] .footer .footer-link:hover {
  color: #0284c7;
  transform: translateY(-1px);
}

[data-theme="light"] .footer .footer-bottom {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #64748b;
}

[data-theme="light"] .sponsor-box {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.2);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .sponsor-label {
  color: #0284c7;
}

[data-theme="light"] .sponsor-link-btn {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}

[data-theme="light"] .sponsor-link-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

[data-theme="light"] .access-route-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .access-route-topbar {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .access-route-footer {
  background: #f8fafc;
  border-top-color: rgba(15, 23, 42, 0.08);
  color: var(--text-primary);
}

[data-theme="light"] .route-steps-grid {
  background: #ffffff;
  border-top-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .route-step-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .route-step-card:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .access-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .access-badge-icon {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #f1f5f9;
}


/* ==========================================================================
   Race Results Detail Pages (Modern Racing Premium UI)
   ========================================================================== */

/* Page Header & Navigation Bar in Results */
.result-page-header {
  padding: 134px 0 36px;
  background: linear-gradient(180deg, rgba(13, 17, 26, 0.98) 0%, rgba(10, 15, 29, 0.92) 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

[data-theme="light"] .result-page-header {
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border-bottom: 1px solid rgba(2, 132, 199, 0.2);
}

.result-back-nav {
  margin-bottom: 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.back-btn:hover {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
  background: var(--bg-card-hover);
  transform: translateX(-3px);
}

[data-theme="light"] .back-btn:hover {
  color: #0284c7;
  border-color: #0284c7;
}

.result-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.result-cat-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-date-badge {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.result-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.result-stats-pill strong {
  color: var(--accent-cyan);
}

[data-theme="light"] .result-stats-pill strong {
  color: #0284c7;
}

.result-page-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.25;
}

.result-page-subtitle {
  font-size: 1.05rem;
  color: var(--accent-orange);
  font-weight: 600;
}

[data-theme="light"] .result-page-subtitle {
  color: #0284c7;
}

/* Quick Jump Navigation */
.result-quick-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--border-subtle);
}

.quick-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.quick-nav-link:hover {
  color: #ffffff;
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.12);
}

[data-theme="light"] .quick-nav-link:hover {
  color: #0284c7;
  border-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}

/* Race Summary Card (Top Highlight) */
.result-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-orange);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .result-summary-card {
  background: #ffffff;
  border-left-color: #0284c7;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.summary-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-value.highlight-tq {
  color: var(--accent-yellow);
}

.stat-value.highlight-fastest {
  color: var(--accent-cyan);
}

[data-theme="light"] .stat-value.highlight-fastest {
  color: #0284c7;
}

.result-report-lead {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

/* Sections Structure (Clear Division) */
.result-section {
  margin-bottom: 52px;
  scroll-margin-top: 90px;
}

.result-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-subtle);
  position: relative;
}

.result-section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-yellow));
}

[data-theme="light"] .result-section-header::after {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 85, 0, 0.12);
  border: 1px solid rgba(255, 85, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

[data-theme="light"] .section-icon-box {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Main Groups (D, C, B, A) */
.main-group-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.main-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast);
}

.main-group-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .main-group-card {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.main-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(90deg, #131b2a 0%, #0d121c 100%);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="light"] .main-header-bar {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.main-title-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
}

.main-rule-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

[data-theme="light"] .main-rule-tag {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}

.main-body-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Result Cards & Lap Sheet Cards */
.result-card {
  background: #090d15;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

[data-theme="light"] .result-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.result-card:hover {
  border-color: rgba(255, 85, 0, 0.45);
}

[data-theme="light"] .result-card:hover {
  border-color: #0284c7;
}

/* Lap Time & Official Result Sheet Dedicated Styling */
.sheet-card {
  border-left: 4px solid var(--accent-cyan);
}

[data-theme="light"] .sheet-card {
  border-left: 4px solid #0284c7;
}

.sheet-badge-header {
  padding: 10px 16px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

[data-theme="light"] .sheet-badge-header {
  background: rgba(2, 132, 199, 0.06);
  border-bottom: 1px solid rgba(2, 132, 199, 0.18);
}

.sheet-badge-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.03em;
}

[data-theme="light"] .sheet-badge-title {
  color: #0284c7;
}

.sheet-badge-note {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.result-img-wrapper {
  position: relative;
  cursor: zoom-in;
  background: #05070b;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

[data-theme="light"] .result-img-wrapper {
  background: #f1f5f9;
}

.result-img {
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  display: block;
}

.zoom-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.result-card-caption {
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Drivers Advancement & Podium Badges */
.advancement-tag-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.advancement-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(0, 230, 118, 0.18);
  color: #00e676;
}

.podium-award-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(255, 183, 3, 0.06);
  border: 1px solid rgba(255, 183, 3, 0.2);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.podium-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.p-gold { color: #fbbf24; }
.p-silver { color: #cbd5e1; }
.p-bronze { color: #d97706; }

/* Grid Gallery for Low-Res Snapshots (Prevents Oversized Jagged Display) */
.thumbnail-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.thumbnail-gallery-item {
  background: #000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.thumbnail-gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--accent-orange);
  z-index: 2;
}

.thumbnail-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox Modal Polish */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.94);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 96vw;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lightboxPop 0.22s ease-out;
}

@keyframes lightboxPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9);
  background: #000;
}

.lightbox-caption {
  color: #f1f5f9;
  font-size: 0.95rem;
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  line-height: 1.5;
  background: rgba(15, 23, 42, 0.8);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 90vw;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: -6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  transform: rotate(90deg);
}

/* Mobile Adjustments for Result Details */
@media (max-width: 768px) {
  .result-page-header {
    padding: 84px 0 28px !important;
  }

  .result-summary-card {
    padding: 18px;
  }

  .result-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .main-header-bar {
    padding: 12px 16px;
  }

  .main-body-content {
    padding: 16px;
    gap: 18px;
  }

  .result-card-caption {
    font-size: 0.85rem;
    padding: 10px 14px;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .thumbnail-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
  }

  .lightbox-close {
    top: -40px;
    right: 0;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
}

/* ==========================================================================
   Drone Video & Action Theater Styles
   ========================================================================== */

/* 1. Hero Background Video */
.hero-bg video.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.65) contrast(1.1);
  z-index: 1;
  pointer-events: none;
}

[data-theme="light"] .hero-bg video.hero-video {
  filter: brightness(0.85) contrast(1.05);
}

.hero-video-controls {
  position: absolute;
  bottom: 24px;
  right: 28px;
  z-index: 10;
}

.hero-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 17, 26, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.hero-video-btn:hover {
  background: rgba(255, 85, 0, 0.25);
  border-color: var(--accent-orange);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .hero-video-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0f172a;
}

[data-theme="light"] .hero-video-btn:hover {
  background: rgba(2, 132, 199, 0.15);
  border-color: #0284c7;
  color: #0284c7;
}

/* Accent Button in Hero */
.btn-accent {
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
  border: 1.5px solid var(--accent-orange);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 85, 0, 0.25);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #ff5500 0%, #ff8c00 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.45);
}

[data-theme="light"] .btn-accent {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(56, 189, 248, 0.12) 100%);
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.18);
}

[data-theme="light"] .btn-accent:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

/* 2. Course Section Video Pane */
.course-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.course-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-pane-movie-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.course-pane-movie-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

[data-theme="light"] .course-pane-movie-footer {
  background: #f8fafc;
  border-top-color: rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
  .hero-video-controls {
    bottom: 14px;
    right: 14px;
  }

  .hero-video-btn {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  /* モバイル表示における自然なテキスト自動折り返し（途中での不自然な改行防止） */
  .keep-all,
  .no-break {
    display: inline !important;
    white-space: normal !important;
  }

  p br,
  .section-desc br,
  .hero-description br,
  .result-report-lead br,
  .race-story-text br,
  .footer-desc br,
  .pricing-notice br,
  .section-title br {
    display: none;
  }
}

@media (max-width: 576px) {
  .course-pane-movie-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .course-pane-movie-footer .btn {
    width: 100%;
  }
}