<link rel="icon" href="../assets/logo_round.png">
<link rel="apple-touch-icon" href="../assets/logo_round.png">

<style>
/* ═════════════════════════════════════════════════════════════
   RESET + BASE
   ═════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg-0: #000;
  --bg-1: #0a0e1a;
  --bg-2: #131826;
  --blue-1: #4F8EFF;
  --blue-2: #2563EB;
  --green: #10B981;
  --red: #EF4444;
  --amber: #FFD700;
  --text-0: #fff;
  --text-1: rgba(255,255,255,0.75);
  --text-2: rgba(255,255,255,0.55);
  --text-3: rgba(255,255,255,0.4);
  --border-soft: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.04);
}

body {
  font-family: -apple-system, "SF Pro Display", "Inter", "Helvetica Neue", Roboto, sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ═════════════════════════════════════════════════════════════
   ANIMATED GRID BACKGROUND
   ═════════════════════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -2;
  animation: gridDrift 30s linear infinite;
  pointer-events: none;
}
@keyframes gridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}

/* ═════════════════════════════════════════════════════════════
   NAVIGATION
   ═════════════════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,20,0.6);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
  transition: padding 0.3s, background 0.3s;
}
nav.scrolled {
  padding: 10px 0;
  background: rgba(10,10,20,0.92);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.nav-logo img { width: 36px; height: 36px; border-radius: 9px; }
.nav-logo span .lap { color: var(--blue-1); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a:not(.nav-cta) {
  color: var(--text-1);
  font-size: 14px;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--blue-1);
  transition: width 0.3s;
}
.nav-links a:not(.nav-cta):hover { color: #fff; }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }

.nav-lang {
  display: inline-flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 3px;
}
.nav-lang a,
.nav-lang button {
  background: transparent;
  border: none;
  color: var(--text-1);
  padding: 5px 12px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.nav-lang a:hover,
.nav-lang button:hover {
  background: rgba(79,142,255,0.18);
  color: var(--blue-1);
}

.nav-cta {
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 500;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
  transition: all 0.3s;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,0.6);
}

.nav-burger {
  display: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  width: 40px; height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-burger span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text-0);
  transition: all 0.3s;
}

.nav-drawer {
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(10,10,20,0.97);
  backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border-soft);
  padding: 24px;
  transform: translateY(-120%);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
}
.nav-drawer.open { transform: translateY(0); }
.nav-drawer a {
  color: var(--text-1);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  transition: background 0.2s;
}
.nav-drawer a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-drawer .nav-lang { align-self: flex-start; margin-top: 8px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ═════════════════════════════════════════════════════════════
   HERO
   ═════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  overflow: hidden;
  background: var(--bg-0);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: 0;
}
.hero-orb.orb-1 {
  width: 600px; height: 600px;
  background: var(--blue-1);
  top: -100px; left: -200px;
  animation: orbFloat1 20s ease-in-out infinite;
}
.hero-orb.orb-2 {
  width: 500px; height: 500px;
  background: var(--blue-2);
  bottom: -100px; right: -100px;
  animation: orbFloat2 25s ease-in-out infinite;
}
.hero-orb.orb-3 {
  width: 300px; height: 300px;
  background: var(--amber);
  top: 50%; left: 50%;
  opacity: 0.12;
  animation: orbFloat3 30s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(100px, 50px) scale(1.1); }
  66% { transform: translate(-50px, 100px) scale(0.9); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-100px,-80px) scale(1.15); }
}
@keyframes orbFloat3 {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.5); }
}

.hero-bg-image {
  position: absolute;
  top: 36%; left: 50%;
  transform: translate(-50%, -50%);
  /* Поднят выше центра (за заголовок) + уменьшен, чтобы плотная часть лого
     не наезжала на подзаголовок */
  /* Автоподгонка: 72% ширины вьюпорта, но не больше 940px */
  width: min(72vw, 940px);
  height: auto;
  max-width: 100%;
  opacity: 0.22;
  z-index: 1;
  animation: bgPulse 8s ease-in-out infinite;
  filter: hue-rotate(-5deg);
  pointer-events: none;
}
@media (max-width: 600px) {
  .hero-bg-image { width: 92vw; opacity: 0.18; }
}
@keyframes bgPulse {
  0%,100% { opacity: 0.22; }
  50% { opacity: 0.32; }
}

.particles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--blue-1);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--blue-1);
}

.hud-lines { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.4; }
.hud-corner {
  position: absolute;
  width: 80px; height: 80px;
  border: 1px solid rgba(79,142,255,0.3);
}
.hud-corner.tl { top: 100px; left: 30px; border-right: none; border-bottom: none; }
.hud-corner.tr { top: 100px; right: 30px; border-left: none; border-bottom: none; }
.hud-corner.bl { bottom: 30px; left: 30px; border-right: none; border-top: none; }
.hud-corner.br { bottom: 30px; right: 30px; border-left: none; border-top: none; }

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 1100px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(79,142,255,0.15);
  border: 1px solid rgba(79,142,255,0.3);
  color: var(--blue-1);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(20px);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 200;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}
.hero h1 .accent {
  background: linear-gradient(180deg, var(--blue-1) 0%, var(--blue-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: gradientShift 4s ease-in-out infinite;
  background-size: 200% 200%;
}
@keyframes gradientShift {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero .subtitle {
  font-size: clamp(16px, 2vw, 21px);
  color: var(--text-1);
  max-width: 760px;
  margin: 0 auto 40px;
  line-height: 1.65;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-compat {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.7s both;
}
.compat-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--text-1);
  transition: all 0.25s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compat-pill:hover {
  background: rgba(79,142,255,0.1);
  border-color: rgba(79,142,255,0.3);
  color: var(--blue-1);
  transform: translateY(-1px);
}
.pill-svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.pill-svg-fill { fill: currentColor; stroke: none; }

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease-out 0.85s both;
}

.btn-primary {
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
  color: #fff;
  padding: 16px 32px;
  border-radius: 32px;
  font-weight: 500;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(37,99,235,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,99,235,0.6); }
.btn-primary:hover::before { left: 100%; }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  color: #fff;
  padding: 16px 32px;
  border-radius: 32px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out 1s both;
}
@media (max-width: 600px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.stat { text-align: center; }
.stat-value {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 200;
  letter-spacing: -1px;
  color: var(--blue-1);
  margin-bottom: 4px;
  font-feature-settings: "tnum";
}
.stat-suffix { color: var(--blue-1); font-weight: 200; }
.stat-label {
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.scroll-fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.scroll-fade-in.visible { opacity: 1; transform: translateY(0); }

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  animation: bounceUp 2s ease-in-out infinite;
}
.scroll-indicator::after {
  content: '';
  display: block;
  width: 1px; height: 30px;
  background: linear-gradient(180deg, transparent, var(--blue-1));
  margin: 8px auto 0;
}
@keyframes bounceUp {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═════════════════════════════════════════════════════════════
   GENERIC SECTION
   ═════════════════════════════════════════════════════════════ */
section { padding: 120px 24px; position: relative; }
.section-container { max-width: 1280px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  color: var(--blue-1);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-tag::before, .section-tag::after {
  content: '';
  display: inline-block;
  width: 30px; height: 1px;
  background: var(--blue-1);
  vertical-align: middle;
  margin: 0 12px;
  opacity: 0.5;
}
.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 200;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 24px;
}
.section-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-1);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ═════════════════════════════════════════════════════════════
   LIVE HUD STRIP
   ═════════════════════════════════════════════════════════════ */
.live-hud-section {
  background: linear-gradient(180deg, #000 0%, #07101e 100%);
  padding: 100px 24px;
}

.live-hud {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(20,30,50,0.7), rgba(8,14,28,0.85));
  border: 1px solid rgba(79,142,255,0.18);
  border-radius: 28px;
  padding: 36px 40px 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}

.live-hud::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-1), transparent);
}

.live-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.live-hud-top .meta { font-size: 11px; color: var(--text-2); letter-spacing: 2px; text-transform: uppercase; }
.live-hud-top .lap-num { font-size: 14px; font-weight: 600; letter-spacing: 3px; color: var(--text-0); }

.live-indicator { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--green); letter-spacing: 1.5px; }
.live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; box-shadow: 0 0 8px var(--green); }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.live-time {
  text-align: center;
  margin: 28px 0 8px;
}
.live-time .laptime {
  font-family: 'SF Mono','JetBrains Mono','Roboto Mono', monospace;
  font-size: clamp(64px, 12vw, 124px);
  font-weight: 200;
  letter-spacing: -3px;
  color: var(--text-0);
  font-feature-settings: "tnum";
  line-height: 1;
  text-shadow: 0 0 60px rgba(79,142,255,0.3);
}
.live-time .delta {
  margin-top: 8px;
  font-size: 16px;
  color: var(--green);
  letter-spacing: 1px;
  font-family: 'SF Mono', monospace;
}
.live-time .delta.negative { color: var(--red); }
.live-time .delta-label { color: var(--text-2); margin-left: 6px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }

.live-channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 32px;
}
@media (max-width: 700px) { .live-channels { grid-template-columns: repeat(2, 1fr); } }

.live-channel {
  background: rgba(0,0,0,0.35);
  border-left: 2px solid var(--blue-1);
  border-radius: 10px;
  padding: 14px 16px;
}
.live-channel .lbl {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 6px;
}
.live-channel .val {
  font-family: 'SF Mono', monospace;
  font-size: 22px;
  font-weight: 300;
  color: var(--text-0);
  display: flex; align-items: baseline; gap: 4px;
}
.live-channel .unit { font-size: 11px; color: var(--text-2); }

/* ═════════════════════════════════════════════════════════════
   3D REPLAY HERO (alt-section)
   ═════════════════════════════════════════════════════════════ */
.replay-section {
  background: linear-gradient(180deg, #07101e 0%, #000 100%);
  position: relative;
  overflow: hidden;
}
.replay-section::before {
  content: '';
  position: absolute;
  top: 30%; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,142,255,0.18), transparent 60%);
  pointer-events: none;
}

.alt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 900px) {
  .alt-grid { grid-template-columns: 1fr; gap: 48px; }
  .alt-grid.reverse > div:first-child { order: 2; }
}

.alt-visual {
  position: relative;
  background: linear-gradient(135deg, #1a2a40 0%, #0a1525 100%);
  border-radius: 28px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alt-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(79,142,255,0.25), transparent 60%);
  animation: glowShift 8s ease-in-out infinite;
}
@keyframes glowShift {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(20px,-20px); }
}

.replay-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.phone-frame {
  position: relative;
  width: 260px;
  max-width: 100%;
  flex-shrink: 0;
  background: #000;
  border-radius: 38px;
  padding: 12px;
  border: 3px solid #2a2a35;
  box-shadow: 0 32px 64px rgba(0,0,0,0.6);
  z-index: 2;
  transition: transform 0.5s;
}
.alt-visual:hover .phone-frame { transform: rotateY(-3deg) rotateX(2deg) scale(1.02); }
.phone-frame img,
.phone-frame video { border-radius: 28px; display: block; width: 100%; }
.replay-video { background: #000; aspect-ratio: 720 / 1564; object-fit: cover; }

.phone-caption-chips {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: center;
  position: relative;
  z-index: 3;
}
.chip {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-2);
  backdrop-filter: blur(20px);
}
.chip.active { background: rgba(79,142,255,0.22); border-color: rgba(79,142,255,0.4); color: var(--blue-1); }
/* Clickable replay-mode tabs (buttons) */
.replay-tabs .chip {
  cursor: pointer;
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.replay-tabs .chip:hover { background: rgba(79,142,255,0.14); color: var(--text-1); }
.replay-tabs .chip.active:hover { color: var(--blue-1); }

.alt-text h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 200;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.alt-text h2 .gradient {
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.alt-text p {
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.alt-text ul { list-style: none; margin-top: 24px; }
.alt-text ul li {
  padding: 10px 0;
  color: var(--text-1);
  font-size: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alt-text ul li::before {
  content: '✓';
  color: var(--blue-1);
  font-weight: 700;
  font-size: 14px;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79,142,255,0.15);
  border-radius: 6px;
  flex-shrink: 0;
  transition: transform 0.3s, background 0.3s;
}
.alt-text ul li:hover::before { transform: scale(1.15); background: rgba(79,142,255,0.3); }

.alt-tag {
  display: inline-block;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--green);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ═════════════════════════════════════════════════════════════
   TRACK ANIMATION
   ═════════════════════════════════════════════════════════════ */
.track-section { background: linear-gradient(180deg, #000 0%, #07101e 100%); }

.track-visualizer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 40px;
}
@media (max-width: 900px) { .track-visualizer { grid-template-columns: 1fr; } }

.track-svg-container {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(79,142,255,0.2);
  border-radius: 24px;
  padding: 40px;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.track-svg-container svg { width: 100%; height: 100%; }

.track-glow {
  position: absolute;
  width: 16px; height: 16px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 24px var(--amber), 0 0 48px var(--amber);
  pointer-events: none;
}

.track-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.track-info-card {
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 20px;
}
.track-info-label { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.track-info-value { font-size: 18px; font-weight: 300; font-family: 'SF Mono', monospace; color: var(--blue-1); }

/* ═════════════════════════════════════════════════════════════
   ANALYSIS TABS
   ═════════════════════════════════════════════════════════════ */
.analysis-section {
  background: linear-gradient(180deg, #07101e 0%, #000 100%);
}

.tabs-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tab-btn {
  background: var(--glass);
  border: 1px solid var(--border-soft);
  color: var(--text-1);
  padding: 12px 22px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.tab-btn:hover { background: rgba(255,255,255,0.07); color: #fff; }
.tab-btn.active {
  background: rgba(79,142,255,0.18);
  border-color: rgba(79,142,255,0.5);
  color: var(--blue-1);
  box-shadow: 0 4px 16px rgba(79,142,255,0.2);
}

.tab-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  animation: tabFade 0.4s ease-out;
}
.tab-panel.active { display: grid; }
@media (max-width: 900px) {
  .tab-panel.active { grid-template-columns: 1fr; gap: 32px; }
  /* На мобиле порядок: вкладки → скриншот → текст (скрин сразу под кнопками вкладок) */
  .tab-panel.active > .tab-screenshot { order: 0; }
  .tab-panel.active > .tab-text { order: 1; }
}

@keyframes tabFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.tab-screenshot {
  background: linear-gradient(135deg, #1a2a40, #0a1525);
  border-radius: 28px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.tab-screenshot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(79,142,255,0.2), transparent 60%);
}
.tab-screenshot img {
  width: 280px;
  border-radius: 22px;
  border: 3px solid #2a2a35;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5);
  position: relative;
  z-index: 2;
}

.tab-text h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 300; letter-spacing: -0.5px; margin-bottom: 16px; }
.tab-text p { color: var(--text-1); font-size: 16px; line-height: 1.7; margin-bottom: 20px; }
.tab-text ul { list-style: none; }
.tab-text ul li {
  padding: 8px 0;
  color: var(--text-1);
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.tab-text ul li::before {
  content: '→';
  color: var(--blue-1);
  font-weight: bold;
}

/* ═════════════════════════════════════════════════════════════
   DEVICES (Phone / RaceBox)
   ═════════════════════════════════════════════════════════════ */
.devices-section { background: #000; }

/* Grid auto-fit: centres 2 cards on desktop, single full-width column on mobile.
   (Flexbox column caused the cards to overflow right on mobile.) */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 24px;
  justify-content: center;
}
@media (max-width: 900px) { .devices-grid { grid-template-columns: 1fr; } }

.device-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 36px 28px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
/* Clickable device card (when link_url is set) */
.device-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.device-card--link:hover { text-decoration: none; }
.device-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-1), transparent);
  transition: left 0.8s;
}
.device-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79,142,255,0.35);
  background: linear-gradient(180deg, rgba(79,142,255,0.06), rgba(255,255,255,0.02));
}
.device-card:hover::after { left: 100%; }

.device-visual {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

.device-icon {
  width: 110px; height: 110px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(79,142,255,0.2), rgba(37,99,235,0.05));
  border: 1px solid rgba(79,142,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s;
}
.device-card:hover .device-icon { transform: scale(1.05); }

.device-svg {
  width: 60px;
  height: 60px;
  stroke: var(--blue-1);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(79,142,255,0.35));
}
.device-svg-fill { fill: var(--blue-1); stroke: none; }

/* Brand-mark icons rendered as solid fill (e.g. RaceBox «R») */
.device-svg--brand { fill: var(--blue-1); stroke: none; }

/* Feature card SVG icons — smaller container, same style */
.feature-svg {
  width: 28px;
  height: 28px;
  stroke: var(--blue-1);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(79,142,255,0.3));
}
.feature-svg-fill { fill: var(--blue-1); stroke: none; }

.ble-waves-mini {
  position: absolute;
  width: 200px; height: 200px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ble-waves-mini .w {
  position: absolute; inset: 30px;
  border: 1px solid rgba(79,142,255,0.3);
  border-radius: 50%;
  animation: bleWave 3s ease-out infinite;
  opacity: 0;
}
.ble-waves-mini .w:nth-child(2) { animation-delay: 1s; }
.ble-waves-mini .w:nth-child(3) { animation-delay: 2s; }
@keyframes bleWave {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.device-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.device-tag {
  font-size: 11px;
  color: var(--blue-1);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.device-card p {
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.device-specs {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.device-spec {
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 10px 12px;
}
.device-spec .k { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; }
.device-spec .v { font-size: 14px; color: var(--blue-1); font-family: 'SF Mono', monospace; margin-top: 2px; }

.device-card .badge-free, .device-card .badge-ble {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 8px;
}
.device-card .badge-free { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.device-card .badge-ble  { background: rgba(79,142,255,0.15); color: var(--blue-1); border: 1px solid rgba(79,142,255,0.3); }

/* ═════════════════════════════════════════════════════════════
   DESKTOP (continue at home on a big screen)
   ═════════════════════════════════════════════════════════════ */
.desktop-section {
  background: linear-gradient(180deg, #000 0%, #07101e 100%);
  position: relative;
  overflow: hidden;
}
.desktop-section::before {
  content: '';
  position: absolute;
  top: 20%; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,142,255,0.15), transparent 60%);
  pointer-events: none;
}

.desktop-mockup {
  background: linear-gradient(180deg, #1a1a22, #0d0d12);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
  transition: transform 0.5s;
}
.desktop-mockup:hover { transform: translateY(-4px); }

/* Real desktop screenshot wrapper — replaces CSS mockup */
.desktop-screenshot-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  transition: transform 0.5s;
}
.desktop-screenshot-wrap:hover { transform: translateY(-4px); }
.desktop-screenshot-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2a2a35, #1c1c25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.desktop-screenshot-img {
  width: 100%;
  height: auto;
  display: block;
}

.desktop-titlebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2a2a35, #1c1c25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.desktop-traffic {
  display: flex; gap: 7px;
}
.desktop-traffic span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.desktop-traffic span:nth-child(2) { background: #febc2e; }
.desktop-traffic span:nth-child(3) { background: #28c840; }
.desktop-title {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.5px;
  flex: 1;
  text-align: center;
}

.desktop-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 360px;
  background: #0a0e1a;
}
@media (max-width: 600px) {
  .desktop-body { grid-template-columns: 1fr; }
  .desktop-sidebar { display: none; }
}

.desktop-sidebar {
  background: linear-gradient(180deg, #0f1320, #0a0e1a);
  border-right: 1px solid rgba(255,255,255,0.05);
  padding: 18px 12px;
}
.desktop-sidebar h5 {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding: 0 8px;
}
.desktop-sidebar .session {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: default;
}
.desktop-sidebar .session.active {
  background: rgba(79,142,255,0.15);
  color: var(--blue-1);
}
.desktop-sidebar .session small {
  font-size: 10px;
  color: var(--text-3);
  font-family: 'SF Mono', monospace;
}

.desktop-main {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.04);
}

.desktop-tabs {
  display: flex;
  background: #0f1320;
  padding: 0 14px;
  gap: 4px;
}
.desktop-tabs .t {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  cursor: default;
}
.desktop-tabs .t.active {
  color: var(--blue-1);
  border-bottom-color: var(--blue-1);
}

.desktop-canvas {
  background: linear-gradient(135deg, #0a0e1a, #0f1828);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
}
@media (max-width: 700px) {
  .desktop-canvas { grid-template-columns: 1fr; }
  .desktop-canvas .desktop-panel { display: none; }
}

.desktop-map {
  background: linear-gradient(135deg, #1a2a40, #0a1525);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.desktop-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.desktop-map-meta {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-1);
  letter-spacing: 0.5px;
}
.desktop-map-meta strong { color: var(--blue-1); font-family: 'SF Mono', monospace; }

.desktop-panel {
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.desktop-panel h6 {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.desktop-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  font-family: 'SF Mono', monospace;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.desktop-row:last-child { border: none; }
.desktop-row .k { color: var(--text-2); }
.desktop-row .v { color: var(--text-0); }
.desktop-row .v.delta-pos { color: var(--green); }
.desktop-row .v.delta-neg { color: var(--red); }

.desktop-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 18px;
  background: rgba(79,142,255,0.1);
  border: 1px solid rgba(79,142,255,0.3);
  border-radius: 14px;
  color: var(--blue-1);
  font-size: 13px;
  font-weight: 500;
}
.desktop-cta::before { content: '⬇'; font-size: 16px; }

/* ═════════════════════════════════════════════════════════════
   COMPARE LAPS
   ═════════════════════════════════════════════════════════════ */
.compare-section { background: linear-gradient(180deg, #000 0%, #07101e 100%); }

.compare-mockup {
  background: linear-gradient(135deg, #1a2a40, #0a1525);
  border-radius: 28px;
  padding: 36px;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.compare-mockup::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(79,142,255,0.18), transparent 60%);
}
.compare-mockup img {
  position: relative; z-index: 2;
  width: 280px; margin: 0 auto;
  border-radius: 22px;
  border: 3px solid #2a2a35;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5);
  display: block;
}

.sector-list { margin-top: 28px; position: relative; z-index: 2; }
.sector-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  margin-bottom: 8px;
  font-family: 'SF Mono', monospace;
  font-size: 13px;
}
.sector-row .sec-name { color: var(--text-2); letter-spacing: 1px; }
.sector-row .sec-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.sector-row .sec-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #6ee7b7);
  border-radius: 3px;
}
.sector-row.lost .sec-bar .fill { background: linear-gradient(90deg, var(--red), #fca5a5); }
.sector-row .sec-delta { text-align: right; }
.sector-row.won .sec-delta { color: var(--green); }
.sector-row.lost .sec-delta { color: var(--red); }

/* ═════════════════════════════════════════════════════════════
   FEATURES GRID
   ═════════════════════════════════════════════════════════════ */
.features-section { background: linear-gradient(180deg, #07101e 0%, #000 100%); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 32px 28px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  width: 1px; height: 0;
  background: linear-gradient(180deg, var(--blue-1), transparent);
  right: 0; top: 0;
  transition: height 0.6s;
}
.feature-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(79,142,255,0.3);
  transform: translateY(-4px);
}
.feature-card:hover::after { height: 100%; }

.feature-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, rgba(79,142,255,0.2), rgba(37,99,235,0.08));
  border: 1px solid rgba(79,142,255,0.3);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  transition: transform 0.3s;
}
.feature-card:hover .feature-icon { transform: rotate(-6deg) scale(1.08); }

.feature-card h3 {
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 12px;
}
.feature-card p {
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.7;
}

/* ═════════════════════════════════════════════════════════════
   SUPPORTED CARS
   ═════════════════════════════════════════════════════════════ */
.cars-section { background: #000; }

.cars-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 900px) { .cars-split { grid-template-columns: 1fr; } }

.cars-pane {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 36px 32px;
  position: relative;
}
.cars-pane.pro {
  border-color: rgba(255,215,0,0.25);
  background: linear-gradient(180deg, rgba(255,215,0,0.05), rgba(255,255,255,0.02));
}

.cars-pane-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.cars-pane-icon {
  font-size: 32px;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(79,142,255,0.12);
  border: 1px solid rgba(79,142,255,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cars-pane.pro .cars-pane-icon {
  background: rgba(255,215,0,0.12);
  border-color: rgba(255,215,0,0.3);
}
.cars-pane-svg {
  width: 28px; height: 28px;
  stroke: var(--blue-1);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cars-pane-svg-fill { fill: var(--blue-1); stroke: none; }
.cars-pane.pro .cars-pane-svg { stroke: var(--amber); }
.cars-pane.pro .cars-pane-svg-fill { fill: var(--amber); }
.cars-pane-title { font-size: 22px; font-weight: 500; letter-spacing: -0.3px; }
.cars-pane-subtitle { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: 2px; margin-top: 2px; }

.cars-pane p { color: var(--text-1); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.cars-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cars-list span {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-1);
  letter-spacing: 0.5px;
}
.cars-pane.pro .cars-list span { background: rgba(255,215,0,0.06); border-color: rgba(255,215,0,0.2); }

/* ═════════════════════════════════════════════════════════════
   PRO TEASER (waitlist)
   ═════════════════════════════════════════════════════════════ */
.pro-section {
  background: linear-gradient(180deg, #000 0%, #1a1408 100%);
  position: relative;
  overflow: hidden;
}
.pro-section::before {
  content: '';
  position: absolute;
  top: -300px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,215,0,0.15), transparent 60%);
  pointer-events: none;
}
.pro-section::after {
  content: '';
  position: absolute;
  bottom: -300px; left: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(79,142,255,0.18), transparent 60%);
  pointer-events: none;
}

.pro-wrapper {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.35);
  color: var(--amber);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.pro-badge::before { content: '⚡'; font-size: 14px; }

.pro-section h2 {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 200;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 24px;
}
.pro-section h2 .gradient {
  background: linear-gradient(135deg, var(--amber), #ffb700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pro-section .lead {
  font-size: 18px;
  color: var(--text-1);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 720px;
}

.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
}
@media (max-width: 700px) { .tier-grid { grid-template-columns: 1fr; } }

.tier {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 24px;
  position: relative;
}
.tier.pro {
  border-color: rgba(255,215,0,0.4);
  background: linear-gradient(180deg, rgba(255,215,0,0.06), rgba(255,255,255,0.02));
}

.tier-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tier-name { font-size: 18px; font-weight: 500; }
.tier-price { font-size: 14px; color: var(--text-2); font-family: 'SF Mono', monospace; }
.tier.pro .tier-name { color: var(--amber); }

.tier ul { list-style: none; }
.tier ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-1);
  display: flex; gap: 10px; align-items: flex-start;
}
.tier ul li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}
.tier.pro ul li::before { color: var(--amber); }

.waitlist-form {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.waitlist-form input {
  flex: 1;
  min-width: 240px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px 20px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.waitlist-form input:focus { outline: none; border-color: rgba(255,215,0,0.5); }
.waitlist-form button {
  background: linear-gradient(180deg, var(--amber), #d4a800);
  color: #000;
  border: none;
  padding: 16px 28px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(255,215,0,0.25);
}
.waitlist-form button:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,215,0,0.4); }

/* ═════════════════════════════════════════════════════════════
   DOWNLOAD / EARLY ACCESS
   ═════════════════════════════════════════════════════════════ */
.download-section {
  text-align: center;
  background: linear-gradient(180deg, #1a1408 0%, #000 100%);
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.dl-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 16px 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  transition: all 0.3s;
  min-width: 220px;
}
.dl-btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); border-color: rgba(79,142,255,0.3); }
.dl-btn-icon { font-size: 28px; display: flex; align-items: center; justify-content: center; }
.dl-btn-svg {
  width: 28px; height: 28px;
  fill: var(--text-0);
  stroke: none;
}
.dl-btn-text { text-align: left; }
.dl-btn-text small { display: block; font-size: 11px; color: var(--text-2); letter-spacing: 0.5px; }
.dl-btn-text strong { display: block; font-size: 15px; font-weight: 500; }

/* ═════════════════════════════════════════════════════════════
   FAQ
   ═════════════════════════════════════════════════════════════ */
.faq-section { background: #000; }
.faq-list { max-width: 820px; margin: 0 auto; }

.faq-item {
  background: var(--glass);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
}
.faq-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(79,142,255,0.2);
}
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 500; font-size: 16px;
  gap: 16px;
}
.faq-q::after {
  content: '+';
  font-size: 24px;
  color: var(--blue-1);
  font-weight: 300;
  transition: transform 0.3s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s, padding-top 0.3s;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 400px; padding-top: 16px; }

/* ═════════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════════ */
footer {
  background: #000;
  padding: 80px 24px 32px;
  border-top: 1px solid var(--border-soft);
}
.footer-container { max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 56px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { color: var(--text-2); font-size: 14px; line-height: 1.7; max-width: 320px; }

.footer-col h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-2); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-1); font-size: 14px; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--blue-1); }

.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-3);
  flex-wrap: wrap; gap: 12px;
}

/* ═════════════════════════════════════════════════════════════
   COUNT-UP UTIL
   ═════════════════════════════════════════════════════════════ */
.count-up { display: inline-block; font-variant-numeric: tabular-nums; }

/* ═════════════════════════════════════════════════════════════
   iPhone mockup (new style — Dynamic Island, glow, tilt)
   Used by Pro Beta section and future visual-heavy sections.
   ═════════════════════════════════════════════════════════════ */
.iphone-mock {
  position: relative;
  background: linear-gradient(160deg, #1c1c24, #0a0a12);
  border-radius: 44px;
  padding: 8px;
  width: 320px;
  flex-shrink: 0;
  box-shadow:
    0 40px 70px rgba(0,0,0,0.65),
    0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.iphone-mock:hover {
  transform: translateY(-8px) rotateZ(-1deg);
}
.iphone-mock-screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: #0a0e1a;
  aspect-ratio: 9 / 19.5;
}
.iphone-mock-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.iphone-mock-island {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 26px;
  background: #000;
  border-radius: 14px;
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.iphone-mock::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 60px;
  background: radial-gradient(ellipse, rgba(79,142,255,0.35), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: -1;
}

/* Amber-badge: Pro · Beta pulsing pill (matches coming-soon style) */
.amber-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.35);
  color: var(--amber);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.amber-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: amberBlink 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--amber);
}
@keyframes amberBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Pro hero grid — phone left, copy right */
.pro-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 80px;
  align-items: center;
  margin: 0 0 80px;
}
@media (max-width: 900px) {
  .pro-hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .pro-hero-grid > .iphone-mock { margin: 0 auto; }
}

.pro-feature-list {
  list-style: none;
  margin: 24px 0 32px;
}
.pro-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.6;
}
.pro-feature-list li::before {
  content: '✓';
  color: var(--amber);
  font-weight: 700;
  font-size: 13px;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,215,0,0.12);
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Make Pro section h2 work with amber gradient inside */
.pro-section .section-title .gradient-amber {
  background: linear-gradient(135deg, var(--amber), #ffb700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ═════════════════════════════════════════════════════════════
   LEGAL PAGES (Privacy Policy, Terms, etc.)
   ═════════════════════════════════════════════════════════════ */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.legal-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.legal-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-1);
  text-decoration: none;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.3px;
}
.legal-logo img { width: 32px; height: 32px; }
.legal-logo-accent { color: var(--blue-1); font-weight: 500; }
.legal-back {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  transition: all 0.2s;
}
.legal-back:hover {
  color: var(--blue-1);
  border-color: rgba(79, 142, 255, 0.35);
  background: rgba(79, 142, 255, 0.08);
}

.legal-page {
  background: var(--bg-0);
  min-height: 100vh;
  padding: 60px 24px 120px;
}
.legal-container {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-1);
  line-height: 1.7;
  font-size: 16px;
}

.legal-header { margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--border-soft); }
.legal-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 200;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.15;
}
.legal-meta { color: var(--text-2); font-size: 14px; }

.legal-lede { font-size: 17px; color: var(--text-1); margin-bottom: 32px; }

.legal-container h2 {
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  margin-top: 44px;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}
.legal-container h3 {
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  margin-top: 22px;
  margin-bottom: 10px;
}
.legal-container p { margin-bottom: 16px; }
.legal-container ul { padding-left: 20px; margin-bottom: 18px; }
.legal-container li { margin-bottom: 10px; }
.legal-container li::marker { color: var(--blue-1); }
.legal-container ul ul {
  margin-top: 10px;
  margin-bottom: 4px;
  padding-left: 22px;
}
.legal-container ul ul li { margin-bottom: 6px; font-size: 15px; color: var(--text-2); }
.legal-container ul ul li strong { color: var(--text-1); }
.legal-container strong { color: #fff; font-weight: 600; }
.legal-container a {
  color: var(--blue-1);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 142, 255, 0.3);
  transition: border-color 0.2s;
}
.legal-container a:hover { border-bottom-color: var(--blue-1); }
.legal-container code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-1);
}

@media (max-width: 600px) {
  .legal-nav-inner { padding: 14px 16px; }
  .legal-page { padding: 36px 16px 80px; }
  .legal-container h2 { margin-top: 32px; font-size: 20px; }
}

/* ═════════════════════════════════════════════════════════════
   ICON SET — stroke-based SVGs (sprite in _icon_sprite.html)
   Use: <svg class="lb-icon"><use href="#lbi-trophy"/></svg>
   ═════════════════════════════════════════════════════════════ */
.lb-icon {
  display: inline-block;
  vertical-align: -3px;
  width: 20px; height: 20px;
  color: var(--blue-1);
  flex-shrink: 0;
}
.lb-icon-sm { width: 16px; height: 16px; vertical-align: -2px; }
.lb-icon-lg { width: 28px; height: 28px; }
.lb-icon-xl { width: 36px; height: 36px; }
.lb-icon-xxl { width: 48px; height: 48px; }
.lb-icon-muted { color: var(--text-2); }
.lb-icon-gold  { color: #ffd700; }

/* ═════════════════════════════════════════════════════════════
   LEADERBOARD — Stage D (lapvision.app/leaderboard/...)
   ═════════════════════════════════════════════════════════════ */
.lb-page { background: var(--bg-0); min-height: 100vh; color: var(--text-1); }
.lb-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Top navbar (shared across all leaderboard pages) */
.lb-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.lb-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lb-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text-1); text-decoration: none; font-size: 18px; font-weight: 300; }
.lb-logo img { width: 32px; height: 32px; }
.lb-logo-accent { color: var(--blue-1); font-weight: 500; }
.lb-nav-right { display: flex; align-items: center; gap: 16px; }
.lb-nav-link {
  color: var(--text-2); text-decoration: none; font-size: 14px;
  padding: 8px 14px; border-radius: 12px; border: 1px solid var(--border-soft);
  transition: all 0.2s;
}
.lb-nav-link:hover { color: var(--blue-1); border-color: rgba(79,142,255,0.35); background: rgba(79,142,255,0.08); }
.lb-nav-lang {
  color: var(--text-1); text-decoration: none; font-size: 12px;
  padding: 6px 12px; border-radius: 11px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-soft); letter-spacing: 0.5px; font-weight: 600;
}
.lb-nav-lang:hover { background: rgba(79,142,255,0.18); color: var(--blue-1); }

/* ── Hero with 3D globe — split layout (text | globe) ───────── */
.lb-hero {
  position: relative; overflow: hidden;
  min-height: 88vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "content globe";
  gap: 40px;
  align-items: center;
  padding: 100px 56px 80px;
  background:
    radial-gradient(circle at 80% 20%, rgba(79,142,255,0.18), transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(255,215,0,0.06), transparent 50%),
    var(--bg-0);
}
.lb-hero-bg {
  grid-area: globe;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 620px;
  justify-self: center;
}
.lb-hero-bg canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; cursor: grab; }
.lb-globe-hint {
  position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.5px;
  color: var(--text-2); opacity: 0.6;
  white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}
/* Hide globe-controls hint on touch / small screens — mouse-wheel and
   drag don't apply, and the line would crowd a tight mobile hero. */
@media (max-width: 900px), (hover: none) {
  .lb-globe-hint { display: none; }
}

/* Selection chip — appears on first tap of a marker, second tap navigates */
.lb-globe-selection {
  position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid rgba(79, 142, 255, 0.5);
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-1);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 12px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 4;
  max-width: calc(100% - 32px);
  overflow: hidden; text-overflow: ellipsis;
}
.lb-globe-selection.visible {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.lb-sel-name { font-weight: 600; color: #fff; }
.lb-sel-hint { font-size: 11px; color: var(--blue-1); letter-spacing: 0.5px; text-transform: uppercase; }
.lb-hero-content {
  grid-area: content;
  text-align: left;
  max-width: 600px;
}
.lb-hero-badge {
  display: inline-block; padding: 8px 18px; margin-bottom: 28px;
  background: rgba(79,142,255,0.15); border: 1px solid rgba(79,142,255,0.3);
  color: var(--blue-1); border-radius: 20px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500;
  backdrop-filter: blur(20px);
}
.lb-hero-content h1 {
  font-size: clamp(36px, 5.4vw, 64px); font-weight: 200; line-height: 1.06;
  letter-spacing: -1.5px; margin-bottom: 22px;
}
.lb-hero-content h1 .accent {
  background: linear-gradient(180deg, var(--blue-1) 0%, var(--blue-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lb-hero-sub {
  font-size: clamp(15px, 1.6vw, 18px); color: var(--text-1);
  max-width: 540px; margin: 0 0 32px; line-height: 1.6;
}
.lb-hero-cta {
  display: inline-block; padding: 16px 36px;
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  color: #fff; text-decoration: none; border-radius: 14px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.3px;
  box-shadow: 0 12px 40px rgba(79,142,255,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lb-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(79,142,255,0.5); }

/* Stack on tablet/mobile: text on top, globe below */
@media (max-width: 900px) {
  .lb-hero {
    grid-template-columns: 1fr;
    grid-template-areas: "content" "globe";
    padding: 90px 20px 60px;
    gap: 30px;
    min-height: auto;
  }
  .lb-hero-content { text-align: center; max-width: 100%; }
  .lb-hero-sub { margin-left: auto; margin-right: auto; }
  .lb-hero-bg { max-width: 460px; }
}

.lb-globe-tooltip {
  position: fixed; pointer-events: none;
  background: rgba(10,14,22,0.92);
  border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 8px 12px; font-size: 13px; color: var(--text-1);
  backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s; z-index: 200;
}
.lb-globe-tooltip.visible { opacity: 1; transform: translateY(0); }

/* ── Section header (re-used) ───────────────────────────────── */
.lb-section-header { text-align: center; margin-bottom: 48px; }
.lb-section-tag {
  display: inline-block; color: var(--blue-1); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; font-weight: 500;
  margin-bottom: 14px;
}
.lb-section-header h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 200; letter-spacing: -1px; margin-bottom: 12px; }
.lb-section-header p { color: var(--text-2); font-size: 16px; max-width: 600px; margin: 0 auto; }

/* ── Country grid (index page) ──────────────────────────────── */
.lb-countries-section { padding: 100px 0 80px; }
.lb-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.lb-country-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border-soft);
  color: var(--text-1); text-decoration: none; text-align: center;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.lb-country-card:hover {
  transform: translateY(-4px); border-color: rgba(79,142,255,0.35);
  background: linear-gradient(180deg, rgba(79,142,255,0.08), rgba(255,255,255,0.02));
}
.lb-country-flag { font-size: 44px; margin-bottom: 10px; line-height: 1; }
.lb-country-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.lb-country-count { font-size: 11px; color: var(--text-2); letter-spacing: 0.5px; text-transform: uppercase; }

/* User's own country — golden highlight (from leaderboard_geo.js IP lookup) */
.lb-country-card.your-country {
  border-color: rgba(255, 215, 0, 0.5);
  background: linear-gradient(180deg, rgba(255,215,0,0.12), rgba(255,255,255,0.02));
  box-shadow: 0 0 24px rgba(255,215,0,0.15);
  animation: lbYourCountryGlow 2.4s ease-in-out infinite alternate;
}
.lb-country-card.your-country:hover {
  border-color: rgba(255, 215, 0, 0.7);
  background: linear-gradient(180deg, rgba(255,215,0,0.18), rgba(255,255,255,0.02));
}
@keyframes lbYourCountryGlow {
  from { box-shadow: 0 0 18px rgba(255,215,0,0.10); }
  to   { box-shadow: 0 0 30px rgba(255,215,0,0.30); }
}
.lb-your-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,215,0,0.22);
  border: 1px solid rgba(255,215,0,0.5);
  color: #ffd700;
  font-size: 9px; letter-spacing: 1.5px;
  padding: 3px 7px; border-radius: 7px;
  font-weight: 700; text-transform: uppercase;
}

/* ── How-it-works (index page) ──────────────────────────────── */
.lb-howit-section { padding: 80px 0 120px; background: #050810; }
.lb-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px; max-width: 1080px; margin: 0 auto;
}
.lb-step {
  padding: 32px 28px; border-radius: 20px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-soft);
  position: relative;
}
.lb-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(79,142,255,0.18); color: var(--blue-1);
  font-weight: 600; font-size: 16px; margin-bottom: 16px;
}
.lb-step h3 { font-size: 20px; font-weight: 500; margin-bottom: 10px; color: #fff; }
.lb-step p { color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* ── Country page: hero + tracks grid ───────────────────────── */
.lb-country-hero { padding: 80px 0 40px; text-align: center; }
.lb-country-hero-flag { font-size: 96px; margin-bottom: 18px; line-height: 1; }
.lb-country-hero h1 {
  font-size: clamp(36px, 5vw, 60px); font-weight: 200;
  letter-spacing: -1.5px; margin-bottom: 8px;
}
.lb-country-hero-sub { color: var(--text-2); font-size: 16px; }

.lb-tracks-section { padding: 40px 0 120px; }
.lb-tracks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.lb-track-card {
  display: block; padding: 26px 22px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border-soft); color: var(--text-1); text-decoration: none;
  transition: all 0.3s;
}
.lb-track-card:hover {
  transform: translateY(-4px); border-color: rgba(79,142,255,0.35);
  background: linear-gradient(180deg, rgba(79,142,255,0.08), rgba(255,255,255,0.02));
}
.lb-track-card.verified { border-color: rgba(255,215,0,0.3); }
.lb-track-card.verified:hover { border-color: rgba(255,215,0,0.5); background: linear-gradient(180deg, rgba(255,215,0,0.08), rgba(255,255,255,0.02)); }
.lb-track-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 12px; }
.lb-track-card-head h3 { font-size: 18px; font-weight: 500; line-height: 1.3; color: #fff; }
.lb-track-verified {
  color: var(--amber, #ffd700); font-weight: 700; flex-shrink: 0;
  background: rgba(255,215,0,0.15); padding: 2px 8px; border-radius: 8px; font-size: 12px;
}
.lb-track-city { color: var(--text-2); font-size: 13px; margin-bottom: 14px; }
.lb-track-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.lb-track-meta-item {
  font-size: 12px; padding: 3px 9px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft);
  color: var(--text-2);
}
.lb-track-meta-item.lb-fia { color: var(--blue-1); border-color: rgba(79,142,255,0.3); background: rgba(79,142,255,0.08); }
.lb-track-configs { color: var(--text-2); font-size: 12px; margin-top: 8px; }

/* ── Track page ─────────────────────────────────────────────── */
.lb-track-hero { padding: 80px 0 36px; }
.lb-track-hero-meta { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.lb-track-hero-flag { font-size: 28px; line-height: 1; }
.lb-track-hero-country { color: var(--text-1); font-weight: 500; }
.lb-track-hero-verified { color: var(--amber, #ffd700); font-weight: 600; font-size: 13px; padding: 3px 10px; border-radius: 8px; background: rgba(255,215,0,0.12); }
.lb-track-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 200; letter-spacing: -1.5px; margin-bottom: 28px; }
.lb-track-hero-stats { display: flex; flex-wrap: wrap; gap: 32px; }
.lb-stat .k { color: var(--text-2); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.lb-stat .v { color: var(--blue-1); font-size: 18px; font-weight: 500; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.lb-board-section { padding: 16px 0 120px; }

/* Transport tabs */
.lb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border-soft); padding-bottom: 16px; }
.lb-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft);
  color: var(--text-2); cursor: pointer; font-family: inherit; font-size: 13px;
  letter-spacing: 0.3px; font-weight: 500; transition: all 0.2s;
}
.lb-tab:hover { color: var(--text-1); background: rgba(79,142,255,0.1); }
.lb-tab.active { background: rgba(79,142,255,0.22); color: var(--blue-1); border-color: rgba(79,142,255,0.4); }

/* Filter dropdowns */
.lb-filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.lb-filter { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.lb-filter-label { color: var(--text-2); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.lb-filter select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft);
  color: var(--text-1); padding: 9px 12px; border-radius: 10px;
  font-family: inherit; font-size: 14px; min-width: 160px; cursor: pointer;
}
.lb-filter select:focus { outline: none; border-color: var(--blue-1); }
.lb-filter select:disabled { opacity: 0.4; cursor: not-allowed; }

.lb-board-count { color: var(--text-2); font-size: 13px; margin-bottom: 14px; }

/* Leaderboard table */
.lb-board-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--border-soft); background: rgba(255,255,255,0.02); }
.lb-board { width: 100%; border-collapse: collapse; }
.lb-board thead th {
  text-align: left; padding: 14px 16px; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-2); font-weight: 500;
  border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
.lb-board tbody td {
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px; color: var(--text-1); vertical-align: middle;
}
.lb-board tbody tr:last-child td { border-bottom: none; }
.lb-board tbody tr:hover { background: rgba(79,142,255,0.04); }
.col-rank { width: 56px; color: var(--text-2); font-weight: 600; }
.col-time { width: 130px; text-align: right; }
/* Specificity override — .lb-board thead th has its own left-align rule
   that would otherwise win against the .col-time class. */
.lb-board thead th.col-time { text-align: right; }
.col-time .lb-time { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--blue-1); font-size: 15px; font-weight: 600; }
.col-time .lb-time-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue-1); font-size: 15px; font-weight: 600;
  text-decoration: none; border-bottom: 1px dashed rgba(79,142,255,0.3); padding-bottom: 1px;
}
.col-time .lb-time-link:hover { color: #fff; border-bottom-color: #fff; }
.lb-row-top1 .col-time .lb-time-link { color: #ffd700; border-bottom-color: rgba(255,215,0,0.4); }
.lb-pilot-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-1); text-decoration: none;
}
.lb-pilot-link:hover .lb-pilot-name { color: var(--blue-1); text-decoration: underline; }
.lb-pilot-link .lb-pilot-flag { font-size: 16px; line-height: 1; }
.lb-pilot-link .lb-pilot-name { font-weight: 500; }
.col-date { width: 130px; color: var(--text-2); white-space: nowrap; }
.col-device { width: 140px; }

.lb-row-top1 .col-rank { color: #ffd700; font-size: 16px; }
.lb-row-top2 .col-rank { color: #c0c0c0; font-size: 15px; }
.lb-row-top3 .col-rank { color: #cd7f32; font-size: 15px; }
.lb-row-top1 .col-time .lb-time { color: #ffd700; }

.lb-vehicle-brand { font-weight: 500; color: var(--text-1); }
.lb-vehicle-model { color: var(--text-2); margin-left: 6px; }
.lb-vehicle-transport { margin-left: 8px; opacity: 0.7; }
.lb-device-chip {
  display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 11px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft);
  color: var(--text-2); white-space: nowrap;
}
.lb-board-empty { text-align: center; padding: 40px !important; color: var(--text-2); font-style: italic; }
.lb-disclaimer { margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: rgba(255,215,0,0.06); border: 1px solid rgba(255,215,0,0.18); color: var(--text-2); font-size: 13px; line-height: 1.5; }

/* ── Pilot profile page ─────────────────────────────────────── */
.lb-pilot-header { padding: 60px 0 40px; }
.lb-pilot-header-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: center;
}
.lb-pilot-avatar {
  width: 140px; height: 140px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg,
    hsl(var(--hue, 220), 55%, 38%),
    hsl(calc(var(--hue, 220) + 40), 55%, 22%));
  border: 3px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  letter-spacing: 1px;
  flex-shrink: 0;
}
.lb-pilot-meta h1 {
  font-size: clamp(28px, 4.5vw, 44px); font-weight: 200;
  letter-spacing: -1px; margin-bottom: 10px;
}
.lb-pilot-loc {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-2); font-size: 15px; margin-bottom: 10px;
}
.lb-pilot-flag { font-size: 22px; }
.lb-pilot-bio { color: var(--text-1); font-size: 16px; font-style: italic; margin-bottom: 10px; }
.lb-pilot-joined { color: var(--text-2); font-size: 13px; letter-spacing: 0.3px; }

.lb-pilot-stats-section { padding: 0 0 40px; }
.lb-pilot-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.lb-stat-card {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 22px 18px; text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.lb-stat-card:hover { transform: translateY(-3px); border-color: rgba(79,142,255,0.35); }
.lb-stat-icon { font-size: 28px; margin-bottom: 8px; }
.lb-stat-value {
  font-size: 32px; font-weight: 300; color: var(--blue-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lb-stat-label { color: var(--text-2); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }

.lb-pilot-visited {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft); border-radius: 14px;
}
.lb-pilot-visited-label { color: var(--text-2); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.lb-pilot-visited-flag { font-size: 24px; line-height: 1; }

.lb-pilot-section { padding: 40px 0; }
.lb-pilot-section-h {
  font-size: clamp(22px, 3vw, 28px); font-weight: 300; letter-spacing: -0.5px;
  margin-bottom: 24px; color: #fff;
}

.lb-pilot-tracks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.lb-pilot-track-card {
  padding: 22px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 14px;
}
.lb-pilot-track-card.verified { border-color: rgba(255,215,0,0.3); }
.lb-pilot-track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lb-pilot-track-head h3 { font-size: 17px; font-weight: 500; line-height: 1.3; }
.lb-pilot-track-head h3 a { color: #fff; text-decoration: none; }
.lb-pilot-track-head h3 a:hover { color: var(--blue-1); }
.lb-pilot-track-sub { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.lb-pilot-track-flag { font-size: 14px; margin-right: 4px; }
.lb-pilot-rank {
  font-size: 16px; font-weight: 600; color: var(--text-1);
  padding: 5px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.lb-pilot-rank-1 { color: #ffd700; background: rgba(255,215,0,0.15); border-color: rgba(255,215,0,0.4); }
.lb-pilot-rank-2 { color: #c0c0c0; background: rgba(192,192,192,0.12); border-color: rgba(192,192,192,0.4); }
.lb-pilot-rank-3 { color: #cd7f32; background: rgba(205,127,50,0.12); border-color: rgba(205,127,50,0.4); }

.lb-pilot-track-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.lb-pt-stat { display: flex; flex-direction: column; gap: 2px; }
.lb-pt-stat-k { color: var(--text-2); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.lb-pt-stat-v {
  font-size: 16px; font-weight: 500; color: var(--text-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-decoration: none;
}
.lb-pt-stat a.lb-pt-stat-v { transition: color 0.2s; }
.lb-pt-stat a.lb-pt-stat-v:hover { color: var(--blue-1); }
.lb-pt-stat-v-best { color: var(--blue-1) !important; }
.lb-pt-stat-v-text { font-family: inherit; font-size: 14px; }
.lb-pt-stat-extra { color: var(--text-2); font-size: 11px; }
.lb-pilot-track-actions { margin-top: auto; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.lb-pt-action { color: var(--blue-1); text-decoration: none; font-size: 13px; font-weight: 500; }
.lb-pt-action:hover { color: var(--text-1); }

.lb-garage-list { display: flex; flex-direction: column; gap: 12px; }
.lb-garage-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  padding: 18px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-soft);
}
.lb-garage-head { display: flex; align-items: center; gap: 14px; }
.lb-garage-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: rgba(79,142,255,0.08); border: 1px solid rgba(79,142,255,0.2);
}
.lb-garage-name strong { color: #fff; font-weight: 500; font-size: 16px; }
.lb-garage-sub { display: block; color: var(--text-2); font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 3px; }
.lb-garage-stats { color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.lb-garage-stats a { color: var(--blue-1); text-decoration: none; }
.lb-garage-stats a:hover { text-decoration: underline; }
.lb-garage-best {
  color: var(--blue-1); font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lb-recent-list { list-style: none; padding: 0; margin: 0; }
.lb-recent-item {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--border-soft);
  color: var(--text-1); font-size: 14px;
}
.lb-recent-item:last-child { border-bottom: none; }
.lb-recent-time a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue-1); font-weight: 600; text-decoration: none; font-size: 15px;
}
.lb-recent-time a:hover { color: #fff; }
.lb-recent-on { color: var(--text-2); }
.lb-recent-track a { color: var(--text-1); text-decoration: none; }
.lb-recent-track a:hover { color: var(--blue-1); }
.lb-recent-meta { color: var(--text-2); font-size: 12px; }

.lb-pilot-disclaimer {
  padding: 40px 0 60px;
}
.lb-pilot-disclaimer > .lb-container {
  padding: 14px 18px; border-radius: 12px;
  background: rgba(255,215,0,0.06); border: 1px solid rgba(255,215,0,0.18);
  color: var(--text-2); font-size: 13px; line-height: 1.5;
}

/* ── Venue page ─────────────────────────────────────────── */
.lb-venue-hero { padding: 60px 0 40px; }
.lb-venue-hero-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  color: var(--text-2); font-size: 14px; margin-bottom: 12px;
}
.lb-venue-hero-flag { font-size: 28px; line-height: 1; }
.lb-venue-hero h1 {
  font-size: clamp(34px, 5vw, 56px); font-weight: 200;
  letter-spacing: -1.5px; margin-bottom: 22px;
}
.lb-venue-hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 18px;
}
.lb-venue-tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.lb-venue-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 8px;
  background: rgba(79,142,255,0.08); border: 1px solid rgba(79,142,255,0.18);
  color: var(--blue-1); letter-spacing: 0.3px;
}
.lb-venue-links { margin-top: 16px; display: flex; gap: 18px; flex-wrap: wrap; }
.lb-venue-links a { color: var(--blue-1); text-decoration: none; font-size: 14px; }
.lb-venue-links a:hover { text-decoration: underline; }
.lb-venue-notes { color: var(--text-2); font-size: 14px; line-height: 1.6; margin-top: 18px; max-width: 720px; font-style: italic; }
.lb-venue-section { padding: 30px 0; }

.lb-layouts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.lb-layout-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px 22px; border-radius: 18px; text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border-soft);
  color: var(--text-1); transition: all 0.3s;
}
.lb-layout-card:hover {
  transform: translateY(-4px); border-color: rgba(79,142,255,0.35);
  background: linear-gradient(180deg, rgba(79,142,255,0.08), rgba(255,255,255,0.02));
}
.lb-layout-card.verified { border-color: rgba(255,215,0,0.3); }
.lb-layout-card.verified:hover { border-color: rgba(255,215,0,0.5); background: linear-gradient(180deg, rgba(255,215,0,0.08), rgba(255,255,255,0.02)); }
.lb-layout-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lb-layout-head h3 { font-size: 19px; font-weight: 500; line-height: 1.3; color: #fff; }
.lb-layout-verified { color: #ffd700; font-weight: 700; background: rgba(255,215,0,0.15); padding: 2px 8px; border-radius: 8px; font-size: 12px; }
.lb-layout-meta { color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px; }
.lb-layout-transports { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-transport-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 3px 9px 3px 7px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft);
  color: var(--text-1); letter-spacing: 0.3px;
}
.lb-transport-chip .lb-icon { vertical-align: 0; }
.lb-layout-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
  padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.lb-layout-stat { display: flex; flex-direction: column; gap: 2px; }
.lb-layout-stat-k { color: var(--text-2); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.lb-layout-stat-v {
  font-size: 15px; font-weight: 500; color: var(--text-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lb-layout-best { color: var(--blue-1) !important; }
.lb-layout-empty { color: var(--text-2) !important; }
.lb-layout-stat-pilot { color: var(--text-2); font-size: 11px; }
.lb-layout-cta { color: var(--blue-1); font-size: 13px; font-weight: 500; margin-top: auto; }

.lb-pilot-layout-name { color: var(--blue-1); font-weight: 500; }

/* ── Lap detail page ─────────────────────────────────────── */
.lb-lap-hero { padding: 60px 0 40px; }
.lb-lap-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  color: var(--text-2); font-size: 14px; margin-bottom: 18px;
}
.lb-lap-meta a { color: var(--text-1); text-decoration: none; }
.lb-lap-meta a:hover { color: var(--blue-1); }
.lb-lap-pilot-link { font-weight: 500; }
.lb-lap-dot { color: var(--text-2); opacity: 0.4; }
.lb-lap-time {
  font-size: clamp(48px, 8vw, 96px); font-weight: 200; letter-spacing: -2px;
  color: var(--blue-1); margin-bottom: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lb-lap-sub { color: var(--text-2); font-size: 14px; }
.lb-lap-section { padding: 30px 0; }
.lb-lap-sectors { display: flex; flex-wrap: wrap; gap: 14px; }
.lb-lap-sector {
  flex: 1 1 200px; min-width: 160px;
  padding: 16px 20px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft);
  display: flex; align-items: baseline; gap: 14px;
}
.lb-lap-sector-k { font-size: 13px; color: var(--text-2); font-weight: 600; }
.lb-lap-sector-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue-1); font-weight: 500; font-size: 18px;
}
.lb-lap-sector-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-2);
  opacity: 0.75;
  font-style: italic;
  max-width: 760px;
  line-height: 1.55;
}
.lb-lap-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.lb-lap-stats-grid .lb-stat {
  padding: 18px 20px; border-radius: 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-soft);
}
.lb-lap-stats-grid .lb-stat .k { color: var(--text-2); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.lb-lap-stats-grid .lb-stat .v {
  color: var(--blue-1); font-size: 22px; font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.lb-lap-mapnote {
  padding: 24px; border-radius: 14px; text-align: center;
  background: rgba(79,142,255,0.06); border: 1px dashed rgba(79,142,255,0.3);
  color: var(--text-2); font-size: 14px;
}

@media (max-width: 720px) {
  .lb-pilot-header-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .lb-pilot-avatar { margin: 0 auto; }
  .lb-pilot-tracks-grid { grid-template-columns: 1fr; }
  .lb-garage-item { flex-direction: column; align-items: flex-start; }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .lb-hero-content { padding: 100px 16px 40px; }
  .lb-container { padding: 0 16px; }
  .lb-country-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .lb-country-card { padding: 20px 12px; }
  .lb-country-flag { font-size: 36px; }
  .lb-tracks-grid { grid-template-columns: 1fr; }
  .lb-track-hero-stats { gap: 18px; }
  .lb-filters { flex-direction: column; gap: 10px; }
  .lb-filter, .lb-filter select { min-width: 100%; }
  .lb-board { font-size: 13px; }
  .lb-board thead th, .lb-board tbody td { padding: 10px 8px; }
  .col-date, .col-device { display: none; }
}

/* Action buttons on lap detail — Compare, Share, etc. */
.lb-lap-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.lb-lap-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(79,142,255,0.10);
  border: 1px solid rgba(79,142,255,0.35);
  border-radius: 12px;
  color: var(--blue-1);
  text-decoration: none;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lb-lap-action:hover { background: rgba(79,142,255,0.18); border-color: rgba(79,142,255,0.6); }
.lb-lap-action-secondary {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-soft);
  color: var(--text-1);
}
.lb-lap-action-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }

/* Share button on compare page — pinned to the right of the meta line */
.lb-cmp-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lb-cmp-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-1);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lb-cmp-share:hover { background: rgba(79,142,255,0.10); border-color: rgba(79,142,255,0.35); color: var(--blue-1); }

/* Toast for clipboard-copy fallback */
.lb-share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom, 0));
  transform: translateX(-50%) translateY(20px);
  background: rgba(10,14,22,0.95);
  border: 1px solid rgba(79,142,255,0.4);
  color: var(--text-1);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.lb-share-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Region grouping on country list (/leaderboard/) ─────────── */
.lb-region-block { margin-bottom: 36px; }
.lb-region-block:last-child { margin-bottom: 0; }
.lb-region-h {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 16px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-region-h::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-soft), transparent);
}
@media (max-width: 560px) {
  .lb-region-block { margin-bottom: 26px; }
  .lb-region-h { font-size: 11px; margin-bottom: 12px; }
}

/* ── Search box in .lb-nav ────────────────────────────────────── */
.lb-search {
  position: relative;
  flex: 1;
  max-width: 360px;
  margin: 0 16px;
}
.lb-search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
}
.lb-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.lb-search-input::placeholder { color: var(--text-2); }
.lb-search-input:focus {
  border-color: rgba(79,142,255,0.5);
  background: rgba(79,142,255,0.06);
}
.lb-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(10,14,22,0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 200;
  max-height: 60vh;
  overflow-y: auto;
}
.lb-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-1);
  text-decoration: none;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border-soft);
}
.lb-search-result:last-child { border-bottom: none; }
.lb-search-result.selected,
.lb-search-result:hover { background: rgba(79,142,255,0.10); }
.lb-search-flag { font-size: 20px; flex-shrink: 0; }
.lb-search-main { display: flex; flex-direction: column; min-width: 0; }
.lb-search-name {
  font-size: 14px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-search-meta {
  font-size: 11px;
  color: var(--text-2);
  text-transform: lowercase;
}
.lb-search-hint {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}
@media (max-width: 720px) {
  .lb-search { margin: 0 8px; max-width: 100%; }
  .lb-search-input { font-size: 13px; padding: 8px 12px 8px 34px; }
}

/* ── Compare-two-laps page (spec §1.6.4 «Compare with #1») ───── */
.lb-cmp-hero {
  padding: 50px 0 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(79,142,255,0.10), transparent 55%),
    var(--bg-0);
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}
.lb-cmp-meta { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.lb-cmp-meta a { color: var(--blue-1); text-decoration: none; }
.lb-cmp-meta a:hover { text-decoration: underline; }

.lb-cmp-headline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}
.lb-cmp-side { padding: 8px 16px; }
.lb-cmp-side-a { text-align: right; border-right: 2px solid rgba(79,142,255,0.4); }
.lb-cmp-side-b { text-align: left; border-left: 2px solid rgba(255,90,95,0.4); }
.lb-cmp-pilot { font-size: 15px; margin-bottom: 8px; }
.lb-cmp-pilot a { color: var(--text-1); text-decoration: none; font-weight: 500; }
.lb-cmp-pilot a:hover { color: var(--blue-1); }
.lb-cmp-vehicle { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.lb-cmp-time {
  font-size: 38px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.lb-cmp-side-a .lb-cmp-time { color: #4f8eff; }
.lb-cmp-side-b .lb-cmp-time { color: #ff5a5f; }

.lb-cmp-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.lb-cmp-vs-label {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.lb-cmp-delta {
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 4px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
}
.lb-cmp-delta-faster { color: #50dc64; }
.lb-cmp-delta-slower { color: #ff5a5f; }

.lb-cmp-map-legend {
  position: absolute;
  bottom: 12px; left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(10,14,22,0.85);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-1);
  z-index: 500;
  backdrop-filter: blur(8px);
}
.lb-cmp-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.lb-cmp-swatch {
  width: 18px; height: 3px;
  border-radius: 2px;
}
.lb-cmp-swatch-a { background: #4f8eff; }
.lb-cmp-swatch-b {
  background: repeating-linear-gradient(to right, #ff5a5f 0 4px, transparent 4px 8px);
  height: 3px;
}

.lb-cmp-sectors-table { overflow-x: auto; }
.lb-cmp-sectors {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.lb-cmp-sectors th, .lb-cmp-sectors td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.lb-cmp-sectors th {
  color: var(--text-2);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.lb-cmp-sectors td { color: var(--text-1); }

.lb-cmp-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 720px;
  margin: 0 auto;
}
.lb-cmp-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.lb-cmp-stat-k { color: var(--text-2); font-size: 13px; }
.lb-cmp-stat-a { color: #4f8eff; text-align: right; font-weight: 500; }
.lb-cmp-stat-b { color: #ff5a5f; text-align: right; font-weight: 500; }

@media (max-width: 720px) {
  .lb-cmp-hero { padding: 30px 0 20px; }
  .lb-cmp-headline { grid-template-columns: 1fr; gap: 8px; }
  .lb-cmp-side { text-align: center !important; border: none; padding: 12px 0; }
  .lb-cmp-side-a { border-bottom: 1px solid var(--border-soft); }
  .lb-cmp-side-b { border-top: 1px solid var(--border-soft); }
  .lb-cmp-time { font-size: 32px; }
  .lb-cmp-vs { flex-direction: row; padding: 6px 0; }
  .lb-cmp-delta { font-size: 16px; }
  .lb-cmp-stat-row { font-size: 13px; padding: 10px 12px; }
}

/* ── Lap map (Leaflet) on /leaderboard/lap/<id>/ (spec §1.6.4) ── */
.lb-lap-map-section { padding-bottom: 28px; }
.lb-lap-map-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: #0a0e16;
}
.lb-lap-map {
  width: 100%;
  height: 420px;
  background: #0a0e16;
}
.lb-lap-map .leaflet-control-attribution {
  background: rgba(10,14,22,0.7);
  color: var(--text-2);
  font-size: 10px;
}
.lb-lap-map .leaflet-control-attribution a { color: var(--blue-1); }
.lb-lap-map-legend {
  position: absolute;
  bottom: 12px; left: 12px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(10,14,22,0.85);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-2);
  z-index: 500;
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
}
.lb-lap-map-legend-bar {
  width: 80px; height: 6px;
  border-radius: 3px;
  /* 5-stop gradient matching leaderboard_lap_map.js — blue → cyan → green → yellow → red */
  background: linear-gradient(to right,
    rgb(79,142,255) 0%, rgb(64,220,255) 25%,
    rgb(80,220,100) 50%, rgb(255,215,64) 75%,
    rgb(255,84,60) 100%);
}
.lb-lap-map-legend-min, .lb-lap-map-legend-max {
  font-size: 10px;
  opacity: 0.8;
}
.lb-lap-map-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-2);
  opacity: 0.7;
  font-style: italic;
}
@media (max-width: 720px) {
  .lb-lap-map { height: 320px; }
  .lb-lap-map-legend { bottom: 8px; left: 8px; font-size: 10px; padding: 4px 8px; }
  .lb-lap-map-legend-bar { width: 60px; }
}

/* ── /about/leaderboard/ FAQ + rules page ────────────────────── */
.lb-about { padding-bottom: 60px; }
.lb-about-hero {
  padding: 70px 0 40px;
  background:
    radial-gradient(circle at 80% 30%, rgba(79,142,255,0.10), transparent 55%),
    var(--bg-0);
  border-bottom: 1px solid var(--border-soft);
}
.lb-about-hero h1 {
  font-size: 40px; font-weight: 300;
  margin: 12px 0 16px;
  color: var(--text-1);
  max-width: 720px;
}
.lb-about-lede {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 720px;
}
.lb-about-section { padding: 50px 0; border-bottom: 1px solid var(--border-soft); }
.lb-about-section:last-of-type { border-bottom: none; }
.lb-about-section h2 {
  font-size: 26px; font-weight: 300;
  margin: 0 0 28px;
  color: var(--text-1);
}
.lb-about-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.lb-about-step {
  background: rgba(10,14,22,0.5);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px 18px;
}
.lb-about-step-icon { color: var(--blue-1); margin-bottom: 10px; }
.lb-about-step-icon .lb-icon-gold { color: #ffd700; }
.lb-about-step h3 {
  font-size: 14px; font-weight: 500;
  margin: 0 0 8px;
  color: var(--text-1);
}
.lb-about-step p {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.55;
}
.lb-about-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.lb-about-check {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}
.lb-about-check > svg { color: var(--blue-1); flex-shrink: 0; margin-top: 2px; }
.lb-about-check h4 {
  font-size: 15px; font-weight: 500;
  margin: 0 0 6px;
  color: var(--text-1);
}
.lb-about-check p {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.55;
}
.lb-about-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 820px;
}
.lb-about-q {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px 22px;
  transition: background 0.15s;
}
.lb-about-q[open] { background: rgba(79,142,255,0.05); border-color: rgba(79,142,255,0.3); }
.lb-about-q summary {
  cursor: pointer;
  font-size: 15px;
  color: var(--text-1);
  font-weight: 500;
  outline: none;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.lb-about-q summary::-webkit-details-marker { display: none; }
.lb-about-q summary::after {
  content: "+";
  position: absolute; right: 0; top: -1px;
  font-size: 22px; line-height: 1;
  color: var(--blue-1);
  transition: transform 0.2s;
}
.lb-about-q[open] summary::after { content: "−"; transform: rotate(0); }
.lb-about-q p {
  font-size: 14px; color: var(--text-2);
  line-height: 1.6;
  margin: 14px 0 0;
}
.lb-about-q a { color: var(--blue-1); text-decoration: none; }
.lb-about-q a:hover { text-decoration: underline; }

.lb-about-cta-section {
  text-align: center;
  padding-top: 60px;
}
.lb-about-cta-section h2 { font-size: 30px; }
.lb-about-cta-section .lb-about-lede { margin: 0 auto 24px; }
.lb-about-cta-section .lb-submit-primary { display: inline-flex; }

@media (max-width: 920px) {
  .lb-about-flow { grid-template-columns: repeat(2, 1fr); }
  .lb-about-checks { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lb-about-hero { padding: 40px 0 28px; }
  .lb-about-hero h1 { font-size: 28px; }
  .lb-about-lede { font-size: 15px; }
  .lb-about-section { padding: 36px 0; }
  .lb-about-section h2 { font-size: 22px; margin-bottom: 20px; }
  .lb-about-flow { grid-template-columns: 1fr; }
  .lb-about-q { padding: 14px 16px; }
  .lb-about-q summary { font-size: 14px; }
}

/* ── Submit-your-lap CTA on layout pages ──────────────────────── */
.lb-submit-cta {
  padding: 60px 0 80px;
  background:
    radial-gradient(circle at 80% 30%, rgba(255,215,0,0.08), transparent 50%),
    radial-gradient(circle at 10% 70%, rgba(79,142,255,0.10), transparent 55%),
    var(--bg-0);
  border-top: 1px solid var(--border-soft);
}
.lb-submit-card {
  max-width: 1080px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(79,142,255,0.25);
  border-radius: 24px;
  padding: 40px 36px;
}
.lb-submit-head { text-align: center; margin-bottom: 32px; }
.lb-submit-head h2 {
  font-size: 32px; font-weight: 300;
  margin: 0 0 12px;
  color: var(--text-1);
}
.lb-submit-head h2::after { content: ""; }
.lb-submit-head p {
  font-size: 15px; color: var(--text-2);
  max-width: 640px; margin: 0 auto;
  line-height: 1.6;
}
.lb-submit-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.lb-submit-step {
  position: relative;
  padding: 24px 20px 20px;
  background: rgba(10,14,22,0.5);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  text-align: center;
}
.lb-submit-num {
  position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  border: 3px solid var(--bg-0);
}
.lb-submit-step-icon { margin: 4px 0 14px; color: var(--blue-1); }
.lb-submit-step-icon .lb-icon-gold { color: #ffd700; }
.lb-submit-step h3 {
  font-size: 15px; font-weight: 500;
  margin: 0 0 8px;
  color: var(--text-1);
}
.lb-submit-step p {
  font-size: 13px; color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}
.lb-submit-actions {
  display: flex; gap: 16px;
  justify-content: center; align-items: center;
  flex-wrap: wrap;
}
.lb-submit-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--blue-1), #2566d6);
  color: #fff; text-decoration: none;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(79,142,255,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lb-submit-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(79,142,255,0.45); }
.lb-submit-secondary {
  color: var(--text-2); text-decoration: none;
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.lb-submit-secondary:hover { color: var(--blue-1); border-bottom-color: var(--blue-1); }
@media (max-width: 720px) {
  .lb-submit-cta { padding: 40px 0 60px; }
  .lb-submit-card { padding: 28px 18px; border-radius: 18px; }
  .lb-submit-head h2 { font-size: 24px; }
  .lb-submit-steps { grid-template-columns: 1fr; gap: 20px; }
  .lb-submit-actions { flex-direction: column; gap: 8px; }
  .lb-submit-primary, .lb-submit-secondary { width: 100%; text-align: center; justify-content: center; }
}

/* ── Mini-globe on pilot profile (spec §1.6.2) ────────────────── */
.lb-pilot-globe-section {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border-soft);
}
.lb-pilot-globe-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 12px auto 0;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 50%, rgba(79,142,255,0.10), transparent 70%),
    var(--bg-0);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.lb-pilot-globe-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
  cursor: grab;
}
.lb-pilot-globe-wrap canvas:active { cursor: grabbing; }
@media (max-width: 720px) {
  .lb-pilot-globe-wrap { aspect-ratio: 4 / 3; max-width: 100%; }
}

/* ── WebView bottom tab bar — visible only in html.in-app ─────── */
.lb-bottombar { display: none; }
html.in-app .lb-bottombar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(8, 12, 20, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-soft);
  /* Honor iOS / Android home indicator inset */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.lb-bottombar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  color: var(--text-2);
  text-decoration: none;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lb-bottombar-item:active { background: rgba(79,142,255,0.10); }
.lb-bottombar-item.active { color: var(--blue-1); }
.lb-bottombar-item .lb-icon { width: 22px; height: 22px; }
.lb-bottombar-flag { font-size: 22px; line-height: 1; }
.lb-bottombar-label {
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reserve content space so bottom bar doesn't cover the footer of pages.
   56px nav + safe-area inset is enough on most devices. */
html.in-app body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); }

/* The site search box was hidden in app-mode in the first iteration;
   un-hide it so the bottom bar's Search tab has somewhere to focus. */
html.in-app .lb-search { display: flex; }

/* ════════════════════════════════════════════════════════════════
   WebView / in-app mode — site embedded inside LapVision Mobile.
   Activated when html.in-app is set (see base.html inline script).
   Hide site chrome, tighten layout for 320–430px viewports.
   ════════════════════════════════════════════════════════════════ */
html.in-app body { background: var(--bg-0); }

/* Trim navigation in app mode — keep just the back button + search,
   drop the logo (app shows its own) and the language switcher (set by app).
   Slimmer padding so it doesn't eat much vertical space. */
html.in-app .lb-footer,
html.in-app .home-footer,
html.in-app nav.site-nav { display: none !important; }
html.in-app .lb-logo,
html.in-app .lb-nav-lang { display: none !important; }
html.in-app .lb-nav-inner { padding: 8px 10px; gap: 8px; }
html.in-app .lb-nav-link {
  padding: 6px 10px;
  font-size: 12px;
  flex-shrink: 0;
}

/* Hide download CTAs in app mode */
html.in-app .lb-download-cta,
html.in-app .home-hero-cta-download,
html.in-app [data-app-hide] { display: none !important; }

/* Hero in app mode — drop grid layout, drop globe entirely.
   WebView GPU/WebGL is unreliable across Android OEMs, and grid with named
   areas was rendering as collapsed in at least one tested WebView. Plain
   block flow is bulletproof — text and CTA always render at expected size. */
html.in-app .lb-hero {
  display: block !important;
  grid-template-columns: none;
  grid-template-areas: none;
  gap: 0;
  padding: 24px 16px 28px;
  min-height: auto;
  background: var(--bg-0);
  overflow: visible;
}
html.in-app .lb-hero-bg,
html.in-app .lb-globe-hint,
html.in-app .lb-globe-selection,
html.in-app .lb-globe-tooltip { display: none !important; }
html.in-app .lb-hero-content {
  display: block !important;
  grid-area: auto;
  padding: 0;
  max-width: 100%;
  text-align: left;
}
html.in-app .lb-hero h1 { font-size: 26px; line-height: 1.2; margin: 12px 0 14px; letter-spacing: -0.3px; }
html.in-app .lb-hero h1 .accent { display: inline; }
html.in-app .lb-hero-sub { font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
html.in-app .lb-hero-badge { font-size: 11px; padding: 5px 12px; margin-bottom: 0; }
html.in-app .lb-hero-cta { padding: 14px 24px; font-size: 14px; display: inline-block; }

/* Tighten page paddings for in-app */
html.in-app .lb-page,
html.in-app .lb-container { padding-left: 12px; padding-right: 12px; }
html.in-app .lb-section-header { margin-bottom: 16px; }
html.in-app .lb-section-header h2 { font-size: 20px; }
html.in-app .lb-section-tag { font-size: 10px; }

/* Country grid — denser on narrow viewports */
html.in-app .lb-country-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
html.in-app .lb-country-card { padding: 16px 8px; }
html.in-app .lb-country-flag { font-size: 32px; }
html.in-app .lb-country-name { font-size: 13px; }
html.in-app .lb-country-count { font-size: 11px; }

/* Leaderboard table — give it horizontal scroll instead of squeeze */
html.in-app .lb-board-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.in-app .lb-board { min-width: 480px; font-size: 12px; }
html.in-app .lb-board thead th,
html.in-app .lb-board tbody td { padding: 8px 6px; }

/* Filter row — single column stack already covered by 720px media query;
   make controls full-width and tap-friendly */
html.in-app .lb-filters { flex-direction: column; gap: 6px; }
html.in-app .lb-filter,
html.in-app .lb-filter select,
html.in-app .lb-filter input { width: 100%; min-height: 40px; }

/* How-it-works — single column always on app */
html.in-app .lb-steps { grid-template-columns: 1fr; gap: 12px; }
html.in-app .lb-step { padding: 14px; }

/* Pilot / venue / layout pages */
html.in-app .lb-pilot-hero,
html.in-app .lb-venue-hero,
html.in-app .lb-track-hero { padding: 16px 12px; }
html.in-app .lb-pilot-hero h1,
html.in-app .lb-venue-hero h1,
html.in-app .lb-track-hero h1 { font-size: 22px; }
html.in-app .lb-pilot-stats,
html.in-app .lb-track-hero-stats { gap: 14px; flex-wrap: wrap; }

/* Lite-globe — devices with <4GB RAM get a CSS-only stylized circle (no Three.js) */
html.lite-globe .lb-hero-bg canvas { display: none; }
html.lite-globe .lb-hero-bg {
  display: flex; align-items: center; justify-content: center;
}
html.lite-globe .lb-hero-bg::before {
  content: "";
  width: min(80%, 460px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(79,142,255,0.55), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(255,215,0,0.18), transparent 55%),
    radial-gradient(circle at 50% 50%, #1a2540 0%, #0a1424 70%, #050a14 100%);
  box-shadow:
    inset 0 0 60px rgba(79,142,255,0.25),
    0 0 80px rgba(79,142,255,0.15);
  opacity: 0.85;
}
html.lite-globe .lb-globe-hint,
html.lite-globe .lb-globe-selection,
html.lite-globe .lb-globe-tooltip { display: none !important; }
