/*
  DriveDNA cinematic redesign layer.
  Rollback: remove this stylesheet link from the public HTML files.
*/

:root {
  --premium-red: #f51f2d;
  --premium-red-hot: #ff3344;
  --premium-red-deep: #72090f;
  --premium-black: #020204;
  --premium-panel: rgba(8, 9, 12, 0.76);
  --premium-panel-strong: rgba(12, 13, 17, 0.9);
  --premium-line: rgba(255, 52, 68, 0.28);
  --premium-line-soft: rgba(255, 255, 255, 0.12);
  --premium-metal: #d7d8d9;
  --premium-muted: #9d9fa6;
  --premium-glow: 0 0 34px rgba(245, 31, 45, 0.18), 0 26px 80px rgba(0, 0, 0, 0.62);
}

body {
  background:
    radial-gradient(circle at 78% 8%, rgba(245, 31, 45, 0.2), transparent 26vw),
    radial-gradient(circle at 8% 88%, rgba(245, 31, 45, 0.16), transparent 34vw),
    linear-gradient(180deg, rgba(2, 2, 4, 0.88), rgba(0, 0, 0, 0.96)),
    var(--red-smoke-bg-image) center / cover fixed no-repeat,
    #000;
  color: #f8f8f8;
  letter-spacing: 0;
}

html,
body,
.app-shell,
main,
.modal,
.admin-main,
.admin-sidebar,
.admin-table-wrap,
.standalone-profile-page,
.standalone-profile-shell,
textarea {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 76%);
  opacity: 0.32;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 40, 55, 0.24), transparent 4px),
    radial-gradient(circle at 86% 22%, rgba(255, 40, 55, 0.18), transparent 3px),
    radial-gradient(circle at 58% 86%, rgba(255, 40, 55, 0.16), transparent 3px);
  background-size: 180px 180px, 240px 240px, 300px 300px;
  opacity: 0.34;
  animation: cinematicParticles 16s linear infinite;
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.94)),
    var(--carbon-bg-image) center / 720px auto repeat,
    #030303;
}

.app-shell::before {
  background:
    radial-gradient(circle at 82% 10%, rgba(245, 31, 45, 0.22), transparent 320px),
    radial-gradient(circle at 12% 76%, rgba(245, 31, 45, 0.13), transparent 330px),
    linear-gradient(180deg, rgba(1, 2, 4, 0.78), rgba(0, 0, 0, 0.95)),
    var(--garage-bg-image) 72% center / cover no-repeat;
  filter: saturate(0.92) contrast(1.18);
}

.app-shell::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 150px),
    linear-gradient(120deg, transparent 0 54%, rgba(245, 31, 45, 0.08) 55%, transparent 58%),
    radial-gradient(circle at 82% 8%, rgba(245, 31, 45, 0.16), transparent 250px);
}

.topbar,
.desktop-top-header,
.desktop-sidebar,
.desktop-right-panel,
.bottom-nav {
  border-color: var(--premium-line-soft);
  background:
    linear-gradient(180deg, rgba(15, 16, 20, 0.86), rgba(2, 2, 4, 0.78)),
    rgba(0, 0, 0, 0.72);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.desktop-nav {
  gap: 4px;
}

.desktop-nav button,
.desktop-logout {
  min-height: 38px;
  gap: 9px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.1;
}

.desktop-nav button span,
.desktop-logout span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktop-nav button img {
  width: 17px;
  height: 17px;
}

.desktop-nav button.is-active::before {
  top: 9px;
  bottom: 9px;
  left: -12px;
}

.desktop-sidebar,
.desktop-right-panel {
  backdrop-filter: blur(24px) saturate(1.2);
}

.brand strong,
.desktop-brand span,
.desktop-page-title,
.section-head h2,
.home-hero-copy h3,
.profile-head h2,
.compare-hero .versus,
.wrapped-hero strong,
.leaderboard-card h3,
.standalone-compare-hero h1,
.landing-hero h1 {
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow,
.dashboard-card small,
.stat-card small,
.leaderboard-subtitle,
.car-card small,
.compare-row span,
.home-hero-copy small {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.primary-action,
.secondary-action,
.small-action,
.text-action,
.desktop-add-button,
.home-add-cta,
.landing-primary-cta,
.landing-secondary-cta,
.standalone-compare-actions .primary-action,
.quick-action-card {
  min-height: 44px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body[data-view="auth"] .auth-card {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 95;
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: 440px;
  max-height: calc(100svh - 32px);
  margin: 0;
  overflow: auto;
  transform: translate(-50%, -50%) !important;
}

body[data-view="auth"] .auth-card.is-visible {
  display: block;
}

body[data-view="auth"] .auth-actions {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 80;
  width: min(420px, calc(100vw - 32px)) !important;
  transform: translate(-50%, -50%) !important;
}

body[data-view="auth"] .language-switcher {
  z-index: 90;
}

.primary-action,
.desktop-add-button,
.home-add-cta,
.landing-primary-cta,
.standalone-compare-actions .primary-action {
  border: 1px solid rgba(255, 90, 100, 0.66);
  background:
    linear-gradient(135deg, rgba(255, 49, 62, 0.98), rgba(118, 8, 14, 0.98)),
    #d81320;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 28px rgba(245, 31, 45, 0.28),
    0 18px 52px rgba(0, 0, 0, 0.48);
}

.text-action,
.secondary-action,
.landing-secondary-cta {
  border: 1px solid rgba(245, 31, 45, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  color: #fff;
}

.primary-action:hover,
.text-action:hover,
.desktop-add-button:hover,
.quick-action-card:hover {
  border-color: rgba(255, 90, 100, 0.78);
  box-shadow: var(--premium-glow);
  transform: translateY(-1px);
}

.auth-card,
.profile-head,
.feed-card,
.home-hero-card,
.progress-card,
.story-summary-card,
.compatibility-card,
.roast-card,
.wrapped-hero,
.challenge-card,
.badge-card,
.dashboard-card,
.onboarding-card,
.reward-card,
.score-strip,
.dna-card,
.car-form,
.leaderboard-card,
.stat-card,
.car-card,
.compare-form,
.compare-hero,
.compare-section,
.right-panel-card,
.standalone-compare-profile,
.compare-search-card,
.landing-garage-card,
.garage-day-card,
.share-card-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--premium-line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025) 40%, rgba(0, 0, 0, 0.18)),
    rgba(4, 5, 8, 0.78);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.68),
    0 0 34px rgba(245, 31, 45, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.2);
}

.auth-card::before,
.profile-head::before,
.home-hero-card::before,
.dashboard-card::before,
.stat-card::before,
.car-card::before,
.compare-hero::before,
.wrapped-hero::before,
.leaderboard-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 31, 45, 0.5), transparent 20%, transparent 80%, rgba(245, 31, 45, 0.24)),
    radial-gradient(circle at 16% 0%, rgba(245, 31, 45, 0.18), transparent 220px);
  opacity: 0.36;
}

.auth-card > *,
.profile-head > *,
.home-hero-card > *,
.dashboard-card > *,
.stat-card > *,
.car-card > *,
.compare-hero > *,
.wrapped-hero > *,
.leaderboard-card > * {
  position: relative;
  z-index: 1;
}

.section-head h2,
.desktop-top-header h1 {
  color: #fff;
  text-shadow: 0 0 28px rgba(245, 31, 45, 0.18);
}

.desktop-top-header {
  align-items: center;
  min-height: 92px;
  padding-top: 16px;
  padding-bottom: 18px;
}

.desktop-top-header h1 {
  margin: 3px 0 0;
  max-width: 100%;
  font-size: clamp(2rem, 3.1vw, 2.62rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.desktop-top-header .eyebrow {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.25;
}

.section-head h2 {
  font-size: clamp(1.55rem, 5vw, 3.2rem);
  line-height: 0.95;
}

.section-head .eyebrow,
.desktop-top-header .eyebrow {
  color: var(--premium-red-hot);
}

/* Home: cinematic garage dashboard */
.home-dashboard-shell {
  gap: clamp(16px, 2vw, 28px);
}

.home-hero-premium {
  min-height: clamp(540px, 64vh, 720px);
  border-color: rgba(255, 62, 76, 0.38);
  background:
    linear-gradient(105deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.82) 38%, rgba(85, 5, 11, 0.36) 100%),
    rgba(0, 0, 0, 0.82);
}

.home-hero-premium.has-car-atmosphere::before {
  background: var(--hero-car-image, var(--garage-bg-image)) center 58% / cover no-repeat;
  opacity: 0.52;
  filter: grayscale(0.2) saturate(0.94) contrast(1.24);
  transform: scale(1.06);
  animation: cinematicDrift 18s ease-in-out infinite alternate;
}

.home-hero-premium.has-car-atmosphere::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.76) 48%, rgba(0, 0, 0, 0.42) 100%),
    radial-gradient(circle at 82% 42%, rgba(245, 31, 45, 0.28), transparent 340px),
    linear-gradient(0deg, #000 0%, transparent 30%);
}

.home-hero-copy small {
  color: var(--premium-red-hot);
}

.home-hero-copy h3 {
  max-width: 780px;
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 3.1rem);
  line-height: 1;
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.86);
}

.home-score-hud {
  width: min(100%, 650px);
  grid-template-columns: clamp(82px, 14vw, 108px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 34px);
  align-items: center;
  border: 1px solid rgba(245, 31, 45, 0.36);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.72), rgba(245, 31, 45, 0.12));
  box-shadow: 0 0 48px rgba(245, 31, 45, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.home-score-hud > div:last-child {
  min-width: 0;
  padding-left: clamp(4px, 1.4vw, 18px);
  text-align: center;
}

.home-score-hud strong {
  color: var(--premium-red-hot);
  font-family: "Arial Narrow", "Impact", system-ui, sans-serif;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.9;
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(245, 31, 45, 0.34);
}

.home-score-hud small {
  text-align: center;
}

.home-score-ring {
  width: clamp(76px, 12vw, 104px);
  filter: drop-shadow(0 0 22px rgba(245, 31, 45, 0.5));
}

.home-hero-meta span,
.home-stat-card,
.home-journey-item,
.mini-rank-row,
.right-leaderboard button {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.022));
}

.home-hero-meta span {
  min-height: 70px;
  align-content: center;
  overflow: hidden;
  text-align: center;
}

.home-hero-meta b,
.home-hero-meta small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.home-hero-meta b {
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  line-height: 1.08;
}

.home-hero-meta small {
  font-size: clamp(0.55rem, 0.8vw, 0.68rem);
  line-height: 1.18;
}

.home-journey-card {
  border-color: rgba(245, 31, 45, 0.32);
}

.home-journey-track {
  position: relative;
}

.home-journey-track::before {
  position: absolute;
  top: 50%;
  right: 24px;
  left: 24px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(245, 31, 45, 0.85), transparent);
  box-shadow: 0 0 22px rgba(245, 31, 45, 0.42);
}

.home-journey-item img,
.car-card img,
.profile-car-grid img,
.home-strongest-card img,
.garage-card-media img,
.garage-day-image {
  filter: saturate(0.9) contrast(1.12) brightness(0.78);
}

/* Garage: vertical evolution timeline */
.standalone-profile-page {
  background:
    radial-gradient(circle at 78% 8%, rgba(245, 31, 45, 0.24), transparent 380px),
    radial-gradient(circle at 8% 78%, rgba(245, 31, 45, 0.16), transparent 420px),
    linear-gradient(180deg, rgba(2, 2, 4, 0.8), rgba(0, 0, 0, 0.96)),
    var(--red-smoke-bg-image) center / cover fixed no-repeat,
    #000;
}

.standalone-profile-shell {
  width: min(1240px, 100%);
}

.standalone-add-header,
.standalone-garage-head,
.standalone-profile-card,
.standalone-profile-form,
.standalone-garage-card,
.standalone-garage-empty {
  border: 1px solid var(--premium-line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 48%, rgba(0, 0, 0, 0.2)),
    rgba(4, 5, 8, 0.78);
  box-shadow: var(--premium-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.18);
}

.standalone-add-header,
.standalone-garage-head {
  border-radius: 16px;
  padding: 16px;
}

.standalone-garage-head {
  align-items: center;
  background:
    linear-gradient(110deg, rgba(0, 0, 0, 0.9), rgba(245, 31, 45, 0.14), rgba(0, 0, 0, 0.72)),
    var(--garage-bg-image) center / cover no-repeat;
}

.standalone-garage-head h1,
.standalone-profile-card h1 {
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0;
}

.standalone-garage-head h1 {
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  line-height: 0.94;
}

.standalone-profile-layout {
  grid-template-columns: minmax(280px, 0.35fr) minmax(0, 0.65fr);
  align-items: start;
}

.standalone-profile-card {
  position: sticky;
  top: 18px;
  min-height: 430px;
  border-radius: 18px;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.9)),
    radial-gradient(circle at 50% 8%, rgba(245, 31, 45, 0.26), transparent 240px),
    var(--helmet-avatar-bg-image, var(--red-smoke-bg-image)) center / cover no-repeat,
    #050506;
}

.standalone-profile-avatar {
  border-color: rgba(245, 31, 45, 0.68);
  box-shadow: 0 0 36px rgba(245, 31, 45, 0.28), 0 20px 60px rgba(0, 0, 0, 0.62);
}

.standalone-profile-card h1 {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 0.92;
}

.standalone-garage-list {
  position: relative;
  gap: 22px;
}

.standalone-garage-list::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 26px;
  width: 2px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(255, 55, 69, 0.95), transparent);
  box-shadow: 0 0 28px rgba(245, 31, 45, 0.58);
}

.standalone-garage-card {
  position: relative;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr);
  margin-left: 36px;
  border-radius: 18px;
}

.standalone-garage-card::before {
  position: absolute;
  left: -46px;
  top: 34px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  content: "";
  background: var(--premium-red-hot);
  box-shadow: 0 0 0 8px rgba(245, 31, 45, 0.12), 0 0 28px rgba(245, 31, 45, 0.78);
  animation: redNodePulse 2.6s ease-in-out infinite;
}

.standalone-garage-image {
  height: 100%;
  min-height: 220px;
  border-radius: 14px;
  filter: saturate(0.9) contrast(1.16) brightness(0.78);
}

.standalone-garage-body h2 {
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.45rem, 4vw, 2.8rem);
  line-height: 0.94;
}

.timeline {
  gap: 22px;
}

.timeline::before {
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 55, 69, 0.95), transparent);
  box-shadow: 0 0 28px rgba(245, 31, 45, 0.58);
}

.car-card {
  min-height: 250px;
  border-radius: 18px;
  border-color: rgba(245, 31, 45, 0.32);
}

.car-card::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  content: "";
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.car-card > img {
  border-radius: 14px;
  box-shadow: 0 0 34px rgba(245, 31, 45, 0.12);
}

.timeline-dot {
  box-shadow: 0 0 0 8px rgba(245, 31, 45, 0.1), 0 0 26px rgba(245, 31, 45, 0.72);
  animation: redNodePulse 2.6s ease-in-out infinite;
}

.car-title h3 {
  font-family: "Arial Narrow", "Impact", system-ui, sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 0.92;
}

.badge,
.trust-badge,
.community-status-badge,
.profile-level,
.profile-type {
  border: 1px solid rgba(245, 31, 45, 0.32);
  background: linear-gradient(135deg, rgba(245, 31, 45, 0.18), rgba(255, 255, 255, 0.035));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.car-specs span,
.garage-personality-card div span,
.missing-list span,
.home-trait-row span {
  border-color: rgba(245, 31, 45, 0.26);
  background: rgba(245, 31, 45, 0.075);
}

/* Profile: automotive identity card */
.profile-head {
  min-height: 240px;
  border-color: rgba(245, 31, 45, 0.34);
  background:
    radial-gradient(circle at 78% 28%, rgba(245, 31, 45, 0.2), transparent 290px),
    linear-gradient(125deg, rgba(0, 0, 0, 0.9), rgba(12, 13, 17, 0.82));
}

.profile-head .avatar {
  border: 2px solid rgba(245, 31, 45, 0.56);
  box-shadow: 0 0 34px rgba(245, 31, 45, 0.22), 0 18px 60px rgba(0, 0, 0, 0.62);
}

.profile-head h2 {
  font-size: clamp(2.1rem, 8vw, 5rem);
  line-height: 0.88;
}

.score-strip {
  border-color: rgba(245, 31, 45, 0.32);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(245, 31, 45, 0.08), rgba(0, 0, 0, 0.76));
}

.score-strip span,
.stat-card strong,
.leaderboard-value,
.right-panel-card > strong {
  color: var(--premium-red-hot);
  font-family: "Arial Narrow", "Impact", system-ui, sans-serif;
  text-shadow: 0 0 22px rgba(245, 31, 45, 0.28);
}

.right-score-card {
  gap: 10px;
  padding-block: 14px;
}

.right-score-card > strong {
  font-family: Inter, Arial, system-ui, sans-serif;
  font-size: clamp(2.55rem, 2.9vw, 3.35rem);
  font-stretch: normal;
  font-weight: 950;
  letter-spacing: 0.01em;
  line-height: 0.95;
}

.right-leaderboard {
  display: grid;
  grid-template-rows: repeat(5, minmax(32px, auto));
  gap: 6px;
}

.right-leaderboard button,
.right-leaderboard-empty {
  min-height: 32px;
  padding: 6px 8px;
}

.right-leaderboard-card {
  gap: 10px;
  padding-block: 13px;
}

.right-leaderboard-card .card-title-row {
  min-height: 34px;
}

.right-strongest-cars-card .card-title-row {
  align-items: start;
}

.right-strongest-cars-card .card-title-row strong {
  max-width: 170px;
  font-size: 0.84rem;
  line-height: 1.12;
}

.right-strongest-cars-card .text-action {
  min-height: 34px;
  padding-inline: 12px;
}

.right-leaderboard-empty {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.54);
}

.right-leaderboard-empty span {
  color: rgba(245, 31, 45, 0.5);
  font-weight: 950;
  text-align: center;
}

.right-leaderboard-empty strong {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.right-leaderboard-empty small {
  padding-right: 10px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.68rem;
}

.right-leaderboard small {
  min-width: 54px;
  text-align: right;
}

@media (min-width: 1024px) {
  body[data-view]:not([data-view="auth"]):not([data-view="onboarding"]) .desktop-right-panel {
    min-height: 0;
    height: calc(100dvh - 78px);
    max-height: calc(100dvh - 78px);
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body[data-view]:not([data-view="auth"]):not([data-view="onboarding"]) .desktop-right-panel::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }
}

.dna-card {
  min-height: 180px;
  border-color: rgba(245, 31, 45, 0.34);
  background:
    radial-gradient(circle at 76% 40%, rgba(245, 31, 45, 0.24), transparent 220px),
    linear-gradient(135deg, rgba(0, 0, 0, 0.86), rgba(255, 255, 255, 0.04));
}

.profile-web-timeline {
  position: relative;
}

.profile-web-timeline::before {
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(245, 31, 45, 0.78), transparent);
}

.profile-web-timeline span {
  border-color: rgba(245, 31, 45, 0.28);
  background: rgba(0, 0, 0, 0.46);
}

/* Compare: garage battle */
.compare-form {
  border-color: rgba(245, 31, 45, 0.32);
}

.compare-hero {
  align-items: stretch;
  border-color: rgba(255, 52, 68, 0.5);
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 31, 45, 0.4), transparent 240px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(98, 5, 12, 0.22), rgba(0, 0, 0, 0.86));
}

.compare-hero .versus {
  display: grid;
  place-items: center;
  min-width: 100px;
  color: #fff;
  font-size: clamp(3.4rem, 11vw, 8rem);
  text-shadow: 0 0 36px rgba(245, 31, 45, 0.92);
}

.compare-driver-link {
  min-height: 240px;
  border: 1px solid rgba(245, 31, 45, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.5);
}

.compare-section {
  border-color: rgba(245, 31, 45, 0.26);
}

.compare-row strong.is-winner {
  color: var(--premium-red-hot);
  text-shadow: 0 0 20px rgba(245, 31, 45, 0.46);
}

/* Wrapped and share cards */
.wrapped-hero {
  min-height: 430px;
  align-content: end;
  border-color: rgba(245, 31, 45, 0.42);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.9)),
    radial-gradient(circle at 58% 22%, rgba(245, 31, 45, 0.32), transparent 320px),
    var(--red-smoke-bg-image) center / cover no-repeat,
    #050506;
}

.wrapped-hero strong {
  color: #fff;
  font-size: clamp(4rem, 16vw, 10rem);
  line-height: 0.78;
}

.wrapped-hero span {
  color: var(--premium-red-hot);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 950;
  text-transform: uppercase;
}

.wrapped-grid .stat-card {
  min-height: 150px;
}

.share-card-preview {
  min-height: 280px;
  border-color: rgba(245, 31, 45, 0.36);
  background-size: cover;
  background-position: center;
}

.share-card-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.78));
}

/* Landing and leaderboards */
.landing-page,
.landing-body {
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 31, 45, 0.22), transparent 420px),
    var(--red-smoke-bg-image) center / cover fixed no-repeat,
    #000;
}

.landing-hero {
  min-height: min(940px, 100svh);
}

.landing-hero h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 0.98;
}

/* Admin: premium control room */
.admin-page {
  background:
    radial-gradient(circle at 82% 8%, rgba(245, 31, 45, 0.25), transparent 380px),
    radial-gradient(circle at 8% 82%, rgba(245, 31, 45, 0.14), transparent 420px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.97)),
    var(--carbon-bg-image) center / 760px auto repeat,
    #000;
}

.admin-shell {
  position: relative;
  isolation: isolate;
}

.admin-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.35;
}

.admin-sidebar,
.admin-topbar,
.admin-stat-card,
.admin-panel,
.admin-denied,
.admin-detail-head,
.admin-empty,
.admin-table-wrap,
.admin-lb-override {
  border-color: var(--premium-line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 48%, rgba(0, 0, 0, 0.22)),
    rgba(4, 5, 8, 0.78);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    0 0 30px rgba(245, 31, 45, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.18);
}

.admin-sidebar {
  border-right-color: rgba(245, 31, 45, 0.22);
}

.admin-topbar {
  padding: 16px;
  border: 1px solid var(--premium-line);
  border-radius: 18px;
}

.admin-topbar h1 {
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 0.96;
}

.admin-brand strong,
.admin-stat-card strong,
.admin-panel h2 {
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  text-transform: uppercase;
}

.admin-nav a,
.admin-actions button,
.admin-actions a,
.admin-toolbar button,
.admin-pagination button,
.admin-menu-button {
  border-color: rgba(245, 31, 45, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.022));
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-nav a.is-active,
.admin-nav a:hover,
.admin-actions button:hover,
.admin-actions a:hover,
.admin-toolbar button:hover,
.admin-pagination button:hover {
  border-color: rgba(255, 90, 100, 0.7);
  background: linear-gradient(135deg, rgba(245, 31, 45, 0.22), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 28px rgba(245, 31, 45, 0.16);
}

.admin-table {
  background: rgba(0, 0, 0, 0.42);
}

.admin-table th {
  color: var(--premium-red-hot);
  letter-spacing: 0.12em;
}

.admin-thumb {
  border: 1px solid rgba(245, 31, 45, 0.3);
  box-shadow: 0 0 20px rgba(245, 31, 45, 0.12);
}

.landing-hero h1 em,
.landing-section-title em,
.leaderboard-card h3,
.garage-day-content h3 {
  color: var(--premium-red-hot);
  font-style: normal;
}

.landing-garage-card,
.garage-day-card {
  border-color: rgba(245, 31, 45, 0.28);
}

.leaderboard-tabs button.is-active,
.leaderboard-row:first-of-type {
  border-color: rgba(245, 31, 45, 0.52);
  background: linear-gradient(90deg, rgba(245, 31, 45, 0.22), rgba(255, 255, 255, 0.045));
}

.leaderboard-row:hover,
.mini-rank-row:hover,
.right-leaderboard button:hover {
  border-color: rgba(245, 31, 45, 0.46);
  box-shadow: 0 0 28px rgba(245, 31, 45, 0.12);
}

/* Standalone pages */
.standalone-page,
.standalone-compare-page {
  background:
    radial-gradient(circle at 80% 8%, rgba(245, 31, 45, 0.22), transparent 360px),
    var(--garage-bg-image) center / cover fixed no-repeat,
    #000;
}

.standalone-shell,
.standalone-compare-shell {
  border-color: rgba(245, 31, 45, 0.24);
}

/* Responsive polish */
@media (min-width: 960px) {
  .app-shell {
    max-width: none;
  }

  main {
    max-width: 1640px;
  }

  .home-dashboard-shell {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  }

  .profile-web-main {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  }

  .compare-result {
    gap: 22px;
  }

  .compare-hero {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}

@media (max-width: 959px) {
  .section-head h2 {
    font-size: clamp(1.7rem, 8vw, 2.8rem);
  }

  .standalone-profile-layout {
    grid-template-columns: 1fr;
  }

  .standalone-profile-card {
    position: relative;
    top: auto;
    min-height: 320px;
  }

  .standalone-garage-list::before {
    left: 17px;
  }

  .standalone-garage-card {
    grid-template-columns: 1fr;
    margin-left: 28px;
  }

  .standalone-garage-card::before {
    left: -38px;
  }

  .home-hero-premium {
    min-height: 560px;
  }

  .home-journey-track::before {
    top: 0;
    bottom: 0;
    left: 102px;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, transparent, rgba(245, 31, 45, 0.82), transparent);
  }

  .compare-hero {
    gap: 14px;
  }

  .compare-hero .versus {
    min-height: 92px;
  }
}

@media (max-width: 520px) {
  .standalone-add-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .standalone-brand {
    min-width: 0;
    max-width: 100%;
  }

  .standalone-brand span {
    min-width: 0;
  }

  .standalone-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .standalone-header-actions .text-action,
  .standalone-header-actions .primary-action,
  .standalone-add-header > .text-action {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .standalone-header-primary {
    min-width: 0;
  }

  body[data-view="auth"] .auth-card {
    top: 52% !important;
    width: min(100% - 24px, 420px) !important;
    max-height: calc(100svh - 24px);
    padding: 22px 16px 18px;
  }

  body[data-view="auth"] .auth-actions {
    top: 52% !important;
    width: min(100% - 24px, 420px) !important;
  }

  .home-hero-copy h3 {
    font-size: clamp(1.35rem, 7vw, 2.2rem);
  }

  .landing-hero h1 {
    font-size: clamp(2rem, 10vw, 4.1rem);
  }

  .home-score-hud strong {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .home-score-hud {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }

  .home-score-hud > div:last-child {
    padding-left: 4px;
  }

  .home-score-ring {
    width: 72px;
  }

  .home-hero-meta span {
    min-height: 66px;
    padding: 9px 8px;
  }

  .profile-head h2,
  .car-title h3 {
    font-size: clamp(1.9rem, 11vw, 3.2rem);
  }

  .wrapped-hero strong {
    font-size: clamp(3.4rem, 20vw, 5.8rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .home-hero-premium.has-car-atmosphere::before,
  .timeline-dot {
    animation: none !important;
  }
}

/* Final home/right-column fit pass: keep score typography elegant and Top 5 fully visible. */
.home-score-hud {
  max-width: min(100%, 560px) !important;
  grid-template-columns: clamp(72px, 10vw, 96px) minmax(0, 1fr) !important;
  gap: clamp(14px, 2vw, 24px) !important;
  overflow: hidden;
}

.home-score-hud > div:last-child {
  display: grid;
  min-width: 0;
  justify-items: center;
  padding-left: 0 !important;
  text-align: center;
}

.home-score-hud strong {
  width: 100%;
  max-width: 100%;
  color: var(--premium-red-hot);
  font-family: Inter, "Roboto Condensed", Arial, system-ui, sans-serif !important;
  font-size: clamp(2.45rem, 4.8vw, 4.25rem) !important;
  font-stretch: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  letter-spacing: 0.01em;
  line-height: 0.98;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.home-score-hud small {
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.home-leaderboard-card {
  gap: 8px;
}

.home-leaderboard-card .card-title-row .text-action {
  top: -5px;
}

.home-top-five-list {
  display: grid;
  grid-template-rows: repeat(5, minmax(34px, auto));
  gap: 6px;
}

.home-leaderboard-card .mini-rank-row {
  min-height: 34px;
  margin-top: 6px;
  padding: 5px 8px;
  border-radius: 10px;
}

.home-top-five-list .mini-rank-row {
  margin-top: 0;
}

.mini-rank-row.is-placeholder {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.5);
}

.mini-rank-row.is-placeholder span {
  color: rgba(245, 31, 45, 0.56);
}

.mini-rank-row.is-placeholder strong,
.mini-rank-row.is-placeholder small {
  color: rgba(255, 255, 255, 0.46);
}

@media (max-width: 959px) {
  .home-score-hud {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .home-score-hud strong {
    font-size: clamp(2.15rem, 9.2vw, 3.05rem) !important;
  }
}

@keyframes cinematicParticles {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-90px, -120px, 0);
  }
}

@keyframes cinematicDrift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.1) translate3d(-18px, 10px, 0);
  }
}

@keyframes redNodePulse {
  0%,
  100% {
    box-shadow: 0 0 0 7px rgba(245, 31, 45, 0.08), 0 0 22px rgba(245, 31, 45, 0.42);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(245, 31, 45, 0.18), 0 0 34px rgba(245, 31, 45, 0.78);
  }
}

/* DriveDNA cinematic landing redesign */
body.cinematic-landing {
  --landing-red: #f51f2d;
  --landing-red-dark: #920813;
  --landing-ink: #020304;
  --landing-panel: rgba(8, 10, 13, 0.78);
  --landing-panel-solid: #090b0f;
  --landing-line: rgba(255, 255, 255, 0.13);
  --landing-muted: rgba(255, 255, 255, 0.68);
  --landing-soft: rgba(255, 255, 255, 0.46);
  background:
    linear-gradient(180deg, #010101 0%, #07080a 46%, #010101 100%);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  overflow-x: hidden;
}

.cinematic-landing * {
  box-sizing: border-box;
}

.cinematic-landing main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cinematic-landing .cinematic-hero,
.cinematic-landing .live-feed-bar {
  width: 100%;
  align-self: stretch;
}

.cinematic-landing::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 31, 45, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(245, 31, 45, 0.045) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

.cinematic-landing::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 7px);
  opacity: 0.28;
}

.cinematic-landing .cinematic-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 56px);
  min-height: 78px;
  padding: 15px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(245, 31, 45, 0.18);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.18));
  backdrop-filter: blur(18px);
}

.cinematic-landing .landing-brand {
  letter-spacing: 0;
}

.cinematic-landing .landing-brand > span {
  font-size: 1.02rem;
}

.cinematic-landing .landing-nav-links a,
.cinematic-landing .landing-link {
  letter-spacing: 0;
}

.cinematic-landing .landing-nav-cta,
.cinematic-landing .landing-primary-cta,
.cinematic-landing .landing-secondary-cta,
.cinematic-landing .battle-card a,
.cinematic-landing .landing-empty-card a,
.random-garage-card a {
  min-height: 48px;
  border-radius: 8px;
  letter-spacing: 0;
}

.cinematic-landing .landing-primary-cta,
.cinematic-landing .landing-nav-cta,
.cinematic-landing .battle-card a,
.random-garage-card a {
  background: linear-gradient(135deg, #ff3441, #9f0712);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 18px 56px rgba(245, 31, 45, 0.24);
}

.cinematic-landing .landing-secondary-cta {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(245, 31, 45, 0.18) inset;
}

.cinematic-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 118px clamp(18px, 4vw, 56px) 54px;
  overflow: hidden;
  isolation: isolate;
}

.hero-stage,
.hero-stage-image,
.hero-stage::before,
.hero-stage::after,
.hero-scanline,
.hero-smoke {
  position: absolute;
  pointer-events: none;
}

.hero-stage {
  inset: 0;
  z-index: -4;
}

.hero-stage-image {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.88) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), #020304 96%),
    var(--hero-image, url("/assets/backgrounds/landing-hero-scan.png?v=1")) center / cover no-repeat;
  filter: saturate(0.92) contrast(1.12);
  transform: scale(1.03);
  animation: cinematicLandingDrift 22s ease-in-out infinite alternate;
}

.hero-stage::before {
  content: "";
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(115deg, rgba(245, 31, 45, 0.22), transparent 38%),
    linear-gradient(250deg, rgba(245, 31, 45, 0.15), transparent 44%);
  mix-blend-mode: screen;
  opacity: 0.74;
}

.hero-stage::after {
  content: "";
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  z-index: 2;
  background: linear-gradient(180deg, transparent, #020304 88%);
}

.hero-scanline {
  inset: 0;
  z-index: 3;
  background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(255, 255, 255, 0.035) 9px 10px);
  opacity: 0.22;
}

.hero-smoke {
  z-index: 3;
  width: 58vw;
  height: 22vh;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.11), transparent);
  filter: blur(24px);
  opacity: 0.28;
  transform: skewX(-18deg);
}

.hero-smoke-a {
  left: 6%;
  bottom: 19%;
  animation: cinematicSmoke 13s ease-in-out infinite alternate;
}

.hero-smoke-b {
  right: -10%;
  bottom: 32%;
  opacity: 0.18;
  animation: cinematicSmoke 16s ease-in-out infinite alternate-reverse;
}

.hero-hud {
  position: absolute;
  inset: 28px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(245, 31, 45, 0.46);
  box-shadow: 0 0 34px rgba(245, 31, 45, 0.12) inset;
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.hero-hud span {
  position: absolute;
  width: 9vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 31, 45, 0.9), transparent);
  box-shadow: 0 0 18px rgba(245, 31, 45, 0.45);
}

.hero-hud span:nth-child(1) { top: 48px; left: 42px; }
.hero-hud span:nth-child(2) { top: 48px; right: 42px; }
.hero-hud span:nth-child(3) { bottom: 42px; left: 15%; }
.hero-hud span:nth-child(4) { bottom: 42px; right: 15%; }

.hero-grid {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
  justify-items: center;
  text-align: center;
}

.cinematic-hero .hero-copy {
  position: relative;
  inset: auto;
  z-index: 1;
  display: block;
  justify-items: stretch;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding-right: 0;
  padding-left: 0;
  padding-bottom: 0;
}

.cinematic-hero .landing-kicker,
.cinematic-section-head p,
.hero-card-head span,
.hero-score-ring small,
.hero-stat-bars span,
.random-garage-card span,
.insane-car-overlay span,
.loved-car-card small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cinematic-hero h1 {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  max-width: 560px;
  margin: 14px auto 18px;
  font-size: clamp(1.55rem, 3.5vw, 3.95rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.cinematic-hero h1 span {
  display: block;
}

.cinematic-hero h1::first-line {
  color: #fff;
}

.cinematic-hero .landing-hero-subtitle {
  max-width: 560px;
  margin: 0 auto 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.04rem, 2.2vw, 1.42rem);
  font-weight: 500;
  line-height: 1.48;
  text-transform: none;
}

.cinematic-landing .landing-hero-actions {
  justify-content: center;
}

.hero-stats-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 430px;
  justify-self: center;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(4, 5, 7, 0.72);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.66), 0 0 44px rgba(245, 31, 45, 0.12);
  backdrop-filter: blur(18px);
}

.hero-stats-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(245, 31, 45, 0.18);
  pointer-events: none;
}

.hero-card-head,
.hero-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.hero-card-head strong {
  color: #fff;
  text-transform: uppercase;
}

.hero-score-ring {
  position: relative;
  z-index: 1;
  min-height: 178px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px solid rgba(245, 31, 45, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 31, 45, 0.16), transparent),
    rgba(255, 255, 255, 0.035);
}

.hero-score-ring::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(245, 31, 45, 0.26);
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(245, 31, 45, 0.16) inset, 0 0 22px rgba(245, 31, 45, 0.12);
}

.hero-score-ring b {
  position: relative;
  z-index: 1;
  color: var(--landing-red);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.92;
  text-shadow: 0 0 30px rgba(245, 31, 45, 0.42);
}

.hero-score-ring span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-stat-bars {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
}

.hero-stat-bars div {
  display: grid;
  grid-template-columns: 1fr 1.3fr auto;
  gap: 10px;
  align-items: center;
}

.hero-stat-bars i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.hero-stat-bars em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--landing-red), #fff);
  box-shadow: 0 0 18px rgba(245, 31, 45, 0.62);
  transition: width 900ms ease;
}

.hero-stat-bars b,
.hero-card-footer strong {
  color: #fff;
  font-size: 0.9rem;
}

.hero-card-footer {
  display: grid;
  gap: 5px;
}

.hero-card-footer span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.live-feed-bar {
  --live-feed-label-width: clamp(132px, 14vw, 210px);
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  margin-top: -1px;
  border-top: 1px solid rgba(245, 31, 45, 0.2);
  border-bottom: 1px solid rgba(245, 31, 45, 0.2);
  background: rgba(0, 0, 0, 0.74);
  overflow: hidden;
}

.live-feed-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: var(--live-feed-label-width);
  display: grid;
  place-items: center;
  padding: 0 clamp(18px, 3vw, 38px);
  background: linear-gradient(135deg, #ff2734, #8e0711);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-feed-track {
  position: relative;
  z-index: 1;
  display: flex;
  width: max-content;
  padding-left: calc(var(--live-feed-label-width) + 28px);
  gap: 34px;
  white-space: nowrap;
  animation: landingFeedMarquee 28s linear infinite;
}

.live-feed-track span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
  font-weight: 800;
}

.live-feed-track span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--landing-red);
  box-shadow: 0 0 16px rgba(245, 31, 45, 0.82);
  vertical-align: middle;
}

.cinematic-section,
.cinematic-stats-section,
.cinematic-final-cta {
  position: relative;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 132px) 0;
  display: grid;
  justify-items: center;
}

.cinematic-section > *,
.cinematic-stats-section > *,
.cinematic-final-cta > * {
  width: 100%;
}

.cinematic-section::before,
.cinematic-stats-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 34px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 31, 45, 0.42), transparent);
}

.cinematic-section-head {
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}

.cinematic-section-head.align-left {
  margin-left: auto;
  text-align: center;
}

.cinematic-section-head h2 {
  margin: 7px 0 10px;
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.cinematic-section-head span {
  display: block;
  max-width: 660px;
  margin: 0 auto;
  color: var(--landing-muted);
  line-height: 1.5;
}

.cinematic-section-head.align-left span {
  margin-left: auto;
}

.insane-car-showcase {
  display: grid;
  width: min(100%, 1080px);
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
  grid-auto-rows: minmax(240px, auto);
  gap: 14px;
}

.insane-car-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #090b0f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.insane-car-card.is-featured {
  grid-row: auto;
  min-height: 390px;
}

.insane-car-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 31, 45, 0.5);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.55), 0 0 36px rgba(245, 31, 45, 0.14);
}

.insane-car-card img,
.random-garage-card > img,
.loved-car-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.08);
}

.insane-car-card img {
  position: absolute;
  inset: 0;
  transition: transform 280ms ease;
}

.insane-car-card:hover img {
  transform: scale(1.045);
}

.insane-car-card::after,
.random-garage-card::after,
.cinematic-final-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 16%, rgba(0, 0, 0, 0.9) 100%);
}

.insane-car-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
}

.insane-car-overlay h3 {
  margin: 8px 0 4px;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
}

.insane-car-overlay strong {
  display: block;
  color: var(--landing-red);
  font-size: clamp(2.1rem, 5vw, 5rem);
  line-height: 0.92;
  text-shadow: 0 0 26px rgba(245, 31, 45, 0.48);
}

.insane-car-overlay p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.loved-car-grid {
  display: grid;
  width: min(100%, 1080px);
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
  gap: 14px;
}

.cinematic-landing .loved-car-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--landing-panel);
}

.loved-car-card div {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
}

.loved-car-card strong {
  color: #fff;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.loved-car-card span {
  color: #fff;
  font-weight: 900;
}

.loved-car-card span b {
  color: var(--landing-red);
  font-size: 2.2rem;
}

.cinematic-landing .live-stats-grid.massive {
  width: min(100%, 1120px);
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: center;
  gap: 14px;
}

.cinematic-landing .live-stats-grid.massive article {
  min-height: 190px;
  display: grid;
  align-content: center;
  padding: 22px;
  border: 1px solid rgba(245, 31, 45, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 31, 45, 0.12), transparent),
    rgba(255, 255, 255, 0.035);
}

.live-stats-grid.massive strong {
  margin-top: 12px;
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.journey-showcase {
  width: min(100%, 980px);
  margin: 0 auto;
}

.legend-timeline-card {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 31, 45, 0.1), transparent),
    rgba(255, 255, 255, 0.04);
}

.legend-timeline-card > a {
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
}

.legend-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.legend-timeline::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 48px;
  height: 2px;
  background: linear-gradient(90deg, rgba(245, 31, 45, 0.2), #fff, rgba(245, 31, 45, 0.78));
  box-shadow: 0 0 24px rgba(245, 31, 45, 0.35);
}

.legend-node {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.legend-node img {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(245, 31, 45, 0.36);
  border-radius: 8px;
  background: #080a0d;
  box-shadow: 0 0 24px rgba(245, 31, 45, 0.12);
}

.legend-node span,
.legend-node small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.8rem;
  font-weight: 900;
}

.legend-node strong {
  color: #fff;
  text-transform: uppercase;
}

.legend-node small {
  color: #6fe18a;
}

.legend-node small.is-down {
  color: #ff8c8c;
}

.split-focus {
  display: grid;
  grid-template-columns: minmax(0, 920px);
  gap: clamp(18px, 4vw, 46px);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.random-garage-card {
  position: relative;
  width: min(100%, 920px);
  margin-right: auto;
  margin-left: auto;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #07090d;
}

.random-garage-card > img {
  position: absolute;
  inset: 0;
}

.random-garage-card > div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
}

.random-garage-card h3 {
  margin: 8px 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
}

.random-garage-card p {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.72);
}

.random-garage-card strong {
  display: block;
  margin: 0 0 18px;
  color: var(--landing-red);
  text-transform: uppercase;
}

.cinematic-garage-grid {
  width: min(100%, 1080px);
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
}

.cinematic-landing .battle-grid,
.cinematic-landing .landing-card-grid {
  width: min(100%, 1080px);
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
}

.cinematic-final-cta {
  min-height: 520px;
  display: grid;
  place-items: center;
  margin-bottom: 60px;
  padding: 48px 20px;
  overflow: hidden;
  border: 1px solid rgba(245, 31, 45, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.92)),
    url("/assets/backgrounds/bg-garage.png") center / cover no-repeat;
}

.cinematic-final-cta > div {
  position: relative;
  z-index: 1;
  max-width: 760px;
  text-align: center;
}

.cinematic-final-cta p {
  color: var(--landing-red);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cinematic-final-cta h2 {
  margin: 8px 0 14px;
  color: #fff;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.88;
  text-transform: uppercase;
}

.cinematic-final-cta span {
  display: block;
  max-width: 560px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

/* Cinematic uploaded car card system */
.cinematic-car-card,
.car-card.cinematic-car-card,
.car-grid-card.cinematic-car-card,
.evolution-image-wrap,
.current-ride-hero,
.most-missed-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #07090d;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(245, 31, 45, 0.08);
}

.cinematic-car-card {
  display: grid;
  min-height: 280px;
  aspect-ratio: 16 / 9;
  align-content: end;
  color: #fff;
  text-align: left;
  transition: transform 190ms ease, border-color 190ms ease, box-shadow 190ms ease;
}

.cinematic-car-card--large {
  min-height: 360px;
  aspect-ratio: 16 / 9;
}

.cinematic-car-card--compact {
  min-height: 260px;
  aspect-ratio: 4 / 5;
}

.cinematic-car-card-image,
.cinematic-car-card > img,
.evolution-image,
.current-ride-hero > img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.08) saturate(0.95) brightness(0.85);
  transform: scale(1.001);
  transition: transform 260ms ease, filter 260ms ease;
}

.cinematic-car-card::before,
.evolution-image-wrap::before,
.current-ride-hero::before,
.most-missed-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.4) 48%, rgba(0, 0, 0, 0.92) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.28) 52%, rgba(0, 0, 0, 0.72) 100%),
    radial-gradient(circle at 22% 88%, rgba(245, 31, 45, 0.3), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(245, 31, 45, 0.16), transparent 28%);
}

.cinematic-car-card::after,
.evolution-image-wrap::after,
.current-ride-hero::after,
.most-missed-card::after,
.cinematic-car-card-vignette {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.82), inset 0 -1px 0 rgba(245, 31, 45, 0.24);
}

.cinematic-car-card-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cinematic-car-card-top span,
.cinematic-car-card-top b,
.cinematic-car-card-content small,
.cinematic-car-card-content p,
.cinematic-car-card-content em,
.cinematic-car-card-story {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
}

.cinematic-car-card-top b {
  color: #fff;
}

.cinematic-car-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: clamp(16px, 2.4vw, 24px);
  padding-top: 64px;
}

.cinematic-car-card-content h3,
.insane-car-overlay h3,
.random-garage-card h3 {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.cinematic-car-card-content h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 2.45rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.86);
}

.cinematic-car-card-content strong {
  color: var(--premium-red-hot);
  font-size: clamp(2rem, 4.4vw, 4.7rem);
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(245, 31, 45, 0.42), 0 3px 18px rgba(0, 0, 0, 0.78);
}

.cinematic-car-card-content p,
.cinematic-car-card-story {
  max-width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.cinematic-car-card-badges,
.cinematic-car-card-actions,
.car-actions.cinematic-car-card-actions {
  position: relative;
  z-index: 3;
}

.cinematic-car-card-actions,
.car-actions.cinematic-car-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 clamp(16px, 2.4vw, 24px) clamp(16px, 2.4vw, 22px);
}

.car-grid-card.cinematic-car-card,
.car-card.cinematic-car-card {
  padding: 0;
}

.car-grid-card.cinematic-car-card {
  min-height: 320px;
}

.car-card.cinematic-car-card {
  min-height: 390px;
  margin-left: 0;
}

.car-card.cinematic-car-card .timeline-dot {
  z-index: 4;
}

.car-card.cinematic-car-card .car-card-body,
.car-grid-card.cinematic-car-card > div {
  display: contents;
}

.cinematic-landing .insane-car-card,
.cinematic-landing .loved-car-card,
.cinematic-landing .random-garage-card,
.cinematic-landing .garage-card-media {
  text-align: left;
}

.cinematic-landing .insane-car-card img,
.cinematic-landing .loved-car-card img,
.cinematic-landing .random-garage-card > img,
.cinematic-landing .garage-card-media img {
  position: absolute;
  inset: 0;
}

.insane-car-overlay,
.random-garage-card > div,
.garage-card-media > span {
  z-index: 2;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.78);
}

.cinematic-landing .loved-car-card {
  display: grid;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  grid-template-columns: 1fr;
  align-content: end;
}

.cinematic-landing .loved-car-card > div {
  position: relative;
  z-index: 2;
  justify-items: start;
  align-content: end;
  text-align: left;
}

.garage-card-media.cinematic-car-card {
  min-height: 210px;
  aspect-ratio: 16 / 10;
}

.evolution-image-wrap {
  min-height: 260px;
}

.evolution-image-wrap .evolution-status,
.current-ride-badge {
  z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
  .cinematic-car-card:hover,
  .evolution-card:hover .evolution-image-wrap,
  .current-ride-hero:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 31, 45, 0.56);
    box-shadow: 0 36px 110px rgba(0, 0, 0, 0.62), 0 0 34px rgba(245, 31, 45, 0.18);
  }

  .cinematic-car-card:hover .cinematic-car-card-image,
  .evolution-card:hover .evolution-image,
  .current-ride-hero:hover > img {
    transform: scale(1.035);
    filter: contrast(1.1) saturate(1.02) brightness(0.9);
  }
}

.cinematic-landing [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.cinematic-landing [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cinematicLandingDrift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-18px, 10px, 0); }
}

@keyframes cinematicSmoke {
  from { transform: translate3d(-4%, 0, 0) skewX(-18deg); }
  to { transform: translate3d(8%, -14%, 0) skewX(-18deg); }
}

@keyframes landingFeedMarquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@keyframes heroFloatPanel {
  from { transform: translate3d(0, -8px, 0); }
  to { transform: translate3d(0, 10px, 0); }
}

@keyframes heroFlowPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(245, 31, 45, 0.18) inset, 0 0 14px rgba(245, 31, 45, 0.08); }
  50% { box-shadow: 0 0 0 1px rgba(245, 31, 45, 0.42) inset, 0 0 26px rgba(245, 31, 45, 0.2); }
}

@keyframes heroScanSweep {
  from { transform: translate3d(-32%, -10%, 0) rotate(-11deg); opacity: 0.18; }
  to { transform: translate3d(32%, 10%, 0) rotate(-11deg); opacity: 0.46; }
}

/* Landing hero composition repair: full-width balanced left / center / right first screen. */
.cinematic-landing .cinematic-hero {
  min-height: max(820px, calc(100svh - 0px));
  width: 100%;
  padding: clamp(96px, 9vh, 132px) clamp(24px, 5vw, 76px) clamp(54px, 7vh, 82px);
  display: grid;
  align-items: center;
}

.cinematic-landing .hero-grid {
  width: min(100%, 1680px);
  max-width: none;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(360px, 1.16fr) minmax(340px, 0.92fr);
  gap: clamp(22px, 3.6vw, 64px);
  align-items: center;
  justify-items: stretch;
  text-align: left;
}

.cinematic-landing .cinematic-hero .hero-copy {
  max-width: 610px;
  margin: 0;
  justify-self: end;
  text-align: left;
  isolation: isolate;
}

.cinematic-landing .cinematic-hero .hero-copy::before {
  content: "";
  position: absolute;
  inset: -22px -22px -18px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22) 72%, transparent),
    radial-gradient(circle at 15% 16%, rgba(245, 31, 45, 0.16), transparent 42%);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

.cinematic-landing .cinematic-hero [data-reveal] {
  opacity: 1;
  transform: none;
}

.cinematic-landing .cinematic-hero .landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.cinematic-landing .cinematic-hero .landing-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--landing-red);
  box-shadow: 0 0 18px rgba(245, 31, 45, 0.9);
}

.cinematic-landing .cinematic-hero h1 {
  max-width: 650px;
  margin: 16px 0 18px;
  font-size: clamp(3.6rem, 5.9vw, 6.35rem);
  line-height: 0.84;
  text-align: left;
  text-wrap: balance;
  text-shadow: 0 10px 48px rgba(0, 0, 0, 0.88), 0 0 28px rgba(245, 31, 45, 0.12);
}

.cinematic-landing .cinematic-hero h1 span:first-child {
  color: #fff;
  text-shadow: 0 10px 48px rgba(0, 0, 0, 0.92), 0 0 22px rgba(255, 255, 255, 0.16);
}

.cinematic-landing .cinematic-hero h1 span:last-child {
  color: var(--landing-red);
  text-shadow: 0 0 26px rgba(245, 31, 45, 0.46), 0 10px 48px rgba(0, 0, 0, 0.92);
}

.cinematic-landing .cinematic-hero .landing-hero-subtitle {
  max-width: 540px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.45vw, 1.28rem);
  font-weight: 600;
  line-height: 1.48;
}

.cinematic-landing .landing-hero-actions {
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-flow {
  position: relative;
  display: grid;
  gap: 9px;
  width: min(100%, 560px);
  margin-top: 4px;
  padding-left: 18px;
}

.hero-flow::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 5px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(245, 31, 45, 0.9), rgba(255, 255, 255, 0.55), rgba(245, 31, 45, 0.75), transparent);
  box-shadow: 0 0 18px rgba(245, 31, 45, 0.34);
}

.hero-flow span {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(245, 31, 45, 0.055));
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.72rem, 0.9vw, 0.84rem);
  font-weight: 900;
  text-transform: uppercase;
  animation: heroFlowPulse 3.8s ease-in-out infinite;
}

.hero-flow span::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--landing-red);
  border-radius: 50%;
  background: #08090d;
  box-shadow: 0 0 16px rgba(245, 31, 45, 0.72);
}

.hero-flow b {
  color: var(--landing-red);
  font-size: 0.76rem;
}

.hero-social-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 600px);
  margin-top: 18px;
}

.hero-social-proof span {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(245, 31, 45, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
}

.hero-social-proof strong {
  color: #fff;
  font-size: clamp(1rem, 1.55vw, 1.35rem);
  line-height: 1;
}

.hero-social-proof small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-visual-core {
  position: relative;
  min-height: clamp(420px, 58vh, 660px);
  justify-self: stretch;
  align-self: stretch;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-visual-core::before {
  content: "";
  position: absolute;
  inset: 8% -10% 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(245, 31, 45, 0.36), transparent 36%),
    radial-gradient(ellipse at 50% 52%, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
  filter: blur(2px);
}

.hero-visual-ring {
  width: min(46vw, 620px);
  aspect-ratio: 1.85 / 1;
  border: 1px solid rgba(245, 31, 45, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 52px rgba(245, 31, 45, 0.16), inset 0 0 44px rgba(245, 31, 45, 0.12);
}

.hero-visual-scan {
  position: absolute;
  width: 74%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), var(--landing-red), transparent);
  filter: blur(0.2px);
  animation: heroScanSweep 3.4s ease-in-out infinite alternate;
}

.hero-visual-caption {
  position: absolute;
  right: clamp(10px, 4vw, 56px);
  bottom: clamp(26px, 7vh, 80px);
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
}

.hero-visual-caption small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-visual-caption strong {
  color: #fff;
  text-transform: uppercase;
}

.cinematic-landing .hero-stats-card {
  width: min(100%, 460px);
  max-width: none;
  justify-self: start;
  align-self: center;
  animation: heroFloatPanel 5.8s ease-in-out infinite alternate;
}

.hero-card-mini {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(245, 31, 45, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.hero-card-mini span,
.hero-card-mini small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-card-mini strong {
  grid-row: span 2;
  color: var(--landing-red);
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(245, 31, 45, 0.4);
}

.cinematic-landing .hero-stage-image {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 42%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), #020304 96%),
    var(--hero-image, url("/assets/backgrounds/landing-hero-scan.png?v=1")) center / cover no-repeat;
  filter: brightness(1.08) saturate(1.04) contrast(1.08);
}

@media (max-width: 1100px) {
  .hero-grid,
  .split-focus {
    grid-template-columns: 1fr;
  }

  .hero-stats-card {
    max-width: 520px;
  }

  .insane-car-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insane-car-card.is-featured {
    grid-column: 1 / -1;
    min-height: 460px;
  }

  .cinematic-landing .live-stats-grid.massive,
  .loved-car-grid,
  .cinematic-garage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .legend-timeline::before {
    display: none;
  }
}

@media (max-width: 760px) {
  .cinematic-landing .cinematic-nav {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 10px;
    min-height: 68px;
    overflow: hidden;
  }

  .cinematic-landing .landing-nav-links,
  .cinematic-landing .landing-link {
    display: none;
  }

  .cinematic-landing .landing-nav-cta {
    min-height: 40px;
    max-width: 126px;
    padding: 0 9px;
    font-size: 0.58rem;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .cinematic-hero {
    min-height: 100svh;
    padding: 94px 16px 34px;
  }

  .hero-hud {
    inset: 12px;
  }

  .cinematic-hero h1 {
    max-width: min(420px, calc(100vw - 48px));
    font-size: clamp(1.22rem, 5.6vw, 1.75rem);
    line-height: 0.98;
    overflow-wrap: anywhere;
  }

  .cinematic-hero .hero-copy {
    padding-bottom: 14px;
  }

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

  .hero-stats-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 14px;
  }

  .hero-score-ring {
    min-height: 148px;
  }

  .hero-stat-bars div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .live-feed-bar {
    --live-feed-label-width: 112px;
    min-height: 64px;
  }

  .live-feed-label {
    padding: 0 14px;
    font-size: 0.68rem;
  }

  .live-feed-track {
    align-items: center;
    min-height: 64px;
    padding-left: calc(var(--live-feed-label-width) + 18px);
  }

  .cinematic-section,
  .cinematic-stats-section,
  .cinematic-final-cta {
    width: min(100% - 28px, 1240px);
    padding: 62px 0;
  }

  .cinematic-section-head,
  .cinematic-section-head.align-left {
    text-align: center;
  }

  .cinematic-section-head span,
  .cinematic-section-head.align-left span {
    margin-left: auto;
  }

  .insane-car-showcase,
  .cinematic-landing .live-stats-grid.massive,
  .loved-car-grid,
  .cinematic-garage-grid,
  .battle-grid {
    grid-template-columns: 1fr;
  }

  .insane-car-card,
  .insane-car-card.is-featured {
    min-height: 360px;
  }

  .cinematic-landing .loved-car-card {
    grid-template-columns: 1fr;
  }

  .loved-car-card img {
    aspect-ratio: 16 / 10;
  }

  .legend-timeline {
    grid-template-columns: 1fr;
  }

  .random-garage-card {
    min-height: 390px;
  }

  .battle-card {
    grid-template-columns: 1fr;
  }

  .cinematic-final-cta {
    min-height: 430px;
  }
}

/* Final cinematic card layout guard: keeps uploaded car images centered, equal sized, and layered correctly. */
.cinematic-car-card,
.car-card.cinematic-car-card,
.car-grid-card.cinematic-car-card {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 9;
  align-content: end;
  justify-items: stretch;
}

.cinematic-car-card--large,
.cinematic-car-card--medium {
  aspect-ratio: 16 / 9;
}

.cinematic-car-card--compact {
  aspect-ratio: 4 / 5;
}

.cinematic-car-card-image,
.cinematic-car-card > img,
.cinematic-landing .insane-car-card img,
.cinematic-landing .loved-car-card img,
.cinematic-landing .random-garage-card > img,
.cinematic-landing .garage-card-media img,
.evolution-image,
.current-ride-hero > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  min-width: 100%;
  object-fit: cover;
  object-position: center;
}

.cinematic-car-card::before,
.cinematic-car-card::after,
.cinematic-car-card-vignette,
.evolution-image-wrap::before,
.evolution-image-wrap::after,
.current-ride-hero::before,
.current-ride-hero::after {
  z-index: 1;
}

.cinematic-car-card-top,
.cinematic-car-card-content,
.cinematic-car-card-badges,
.cinematic-car-card-actions,
.car-actions.cinematic-car-card-actions,
.insane-car-overlay,
.random-garage-card > div,
.garage-card-media > span,
.cinematic-landing .loved-car-card > div,
.evolution-image-wrap .evolution-status,
.current-ride-badge {
  position: relative;
  z-index: 3;
}

.cinematic-landing .insane-car-showcase,
.cinematic-landing .loved-car-grid,
.cinematic-landing .cinematic-garage-grid,
.cinematic-landing .battle-grid,
.cinematic-landing .landing-card-grid {
  width: min(100%, 1080px);
  margin-inline: auto;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 340px));
  grid-auto-rows: auto;
  justify-content: center;
  justify-items: center;
}

.cinematic-landing .insane-car-card,
.cinematic-landing .insane-car-card.is-featured,
.cinematic-landing .loved-car-card,
.cinematic-landing .random-garage-card {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  grid-column: auto;
  grid-row: auto;
}

.cinematic-landing .random-garage-card {
  width: min(100%, 920px);
}

.cinematic-landing .loved-car-card {
  grid-template-columns: 1fr;
  align-content: end;
}

.cinematic-landing .loved-car-card > div,
.random-garage-card > div {
  align-self: end;
  width: 100%;
}

.car-card.cinematic-car-card {
  min-height: 360px;
  border-radius: 8px;
}

.car-grid-card.cinematic-car-card {
  min-height: 300px;
}

.evolution-image-wrap,
.current-ride-hero {
  min-height: 0;
  aspect-ratio: 16 / 10;
}

.garage-card-media.cinematic-car-card {
  min-height: 0;
  aspect-ratio: 16 / 10;
}

.cinematic-landing .cinematic-section,
.cinematic-landing .cinematic-stats-section,
.cinematic-landing .cinematic-final-cta,
.cinematic-landing .journey-showcase,
.cinematic-landing .split-focus {
  margin-inline: auto;
}

@media (max-width: 760px) {
  .cinematic-landing .insane-car-showcase,
  .cinematic-landing .loved-car-grid,
  .cinematic-landing .cinematic-garage-grid,
  .cinematic-landing .battle-grid,
  .cinematic-landing .landing-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cinematic-landing .insane-car-card,
  .cinematic-landing .insane-car-card.is-featured,
  .cinematic-landing .loved-car-card,
  .cinematic-landing .random-garage-card,
  .car-card.cinematic-car-card,
  .car-grid-card.cinematic-car-card {
    min-height: 260px;
  }

  .cinematic-landing .split-focus {
    grid-template-columns: minmax(0, 1fr);
  }

  .cinematic-landing .split-focus > *,
  .cinematic-landing .random-dna-card,
  .cinematic-landing .random-garage-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .cinematic-car-card-content {
    padding: 54px 16px 16px;
  }
}

/* Bright premium DriveDNA car cards: keep the car visible while preserving readable text. */
.base-car-image-card,
.cinematic-car-card,
.car-card.cinematic-car-card,
.car-grid-card.cinematic-car-card,
.home-strongest-card,
.home-most-missed-card,
.add-preview-card,
.car-share-preview.base-car-image-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(245, 31, 45, 0.055)),
    #080a0f;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(245, 31, 45, 0.08) inset,
    0 0 28px rgba(245, 31, 45, 0.1);
}

.base-car-image-card-image,
.cinematic-car-card-image,
.cinematic-car-card > img,
.home-journey-item img,
.home-strongest-card img,
.home-most-missed-card img,
.add-preview-image,
.car-share-preview.base-car-image-card > img,
.cinematic-landing .insane-car-card img,
.cinematic-landing .loved-car-card img,
.cinematic-landing .random-garage-card > img,
.cinematic-landing .garage-card-media img,
.evolution-image,
.current-ride-hero > img {
  filter: brightness(1.05) contrast(1.08) saturate(1.05);
  opacity: 1;
}

.cinematic-car-card::before,
.evolution-image-wrap::before,
.current-ride-hero::before,
.most-missed-card::before,
.home-strongest-card::before,
.home-most-missed-card::before,
.add-preview-card::before,
.car-share-preview.base-car-image-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 34%, rgba(0, 0, 0, 0.12) 64%, rgba(0, 0, 0, 0.05) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.08) 26%, transparent 50%),
    radial-gradient(circle at 18% 84%, rgba(245, 31, 45, 0.28), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(245, 31, 45, 0.12), transparent 26%);
}

.cinematic-car-card::after,
.evolution-image-wrap::after,
.current-ride-hero::after,
.most-missed-card::after,
.cinematic-car-card-vignette,
.home-strongest-card::after,
.home-most-missed-card::after,
.add-preview-card::after,
.car-share-preview.base-car-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 42%, rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.32), inset 0 -1px 0 rgba(245, 31, 45, 0.26);
}

.cinematic-car-card-top,
.cinematic-car-card-content,
.cinematic-car-card-badges,
.cinematic-car-card-actions,
.car-actions.cinematic-car-card-actions,
.insane-car-overlay,
.random-garage-card > div,
.garage-card-media > span,
.cinematic-landing .loved-car-card > div,
.home-strongest-card > div,
.home-most-missed-card > div,
.add-preview-card > :not(img),
.car-share-preview.base-car-image-card > :not(img),
.evolution-image-wrap .evolution-status,
.current-ride-badge {
  position: relative;
  z-index: 4;
}

.cinematic-car-card-top {
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.cinematic-car-card-content,
.insane-car-overlay,
.random-garage-card > div,
.cinematic-landing .loved-car-card > div,
.home-strongest-card > div,
.home-most-missed-card > div,
.add-preview-card > :not(img),
.car-share-preview.base-car-image-card > :not(img) {
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.78);
}

.cinematic-car-card-content h3,
.insane-car-overlay h3,
.random-garage-card h3,
.home-strongest-card strong,
.home-most-missed-card strong,
.add-preview-card strong,
.car-share-preview strong {
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.82);
}

.cinematic-car-card-content strong,
.insane-car-overlay strong,
.home-strongest-card span,
.car-share-preview b {
  color: #ff2f3d;
  text-shadow: 0 0 18px rgba(245, 31, 45, 0.42), 0 3px 18px rgba(0, 0, 0, 0.8);
}

.featured-car-card .cinematic-car-card-content strong,
.featured-car-card .insane-car-overlay strong {
  font-size: clamp(2.25rem, 5vw, 5.2rem);
}

.compact-car-card .cinematic-car-card-content strong,
.compact-car-card .insane-car-overlay strong {
  font-size: clamp(1.75rem, 3.6vw, 3.4rem);
}

.home-strongest-card img,
.home-most-missed-card img,
.add-preview-card img,
.car-share-preview.base-car-image-card > img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.home-strongest-card > div,
.home-most-missed-card > div,
.add-preview-card,
.car-share-preview.base-car-image-card {
  min-height: 230px;
}

.add-preview-card {
  display: grid;
  align-content: end;
  gap: 7px;
  padding: 18px;
}

.car-share-preview.base-car-image-card {
  display: grid;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 12px;
  padding: 18px;
}

.car-share-preview.base-car-image-card div {
  padding: 0;
}

.car-share-preview.base-car-image-card ul {
  position: relative;
  z-index: 4;
  background: rgba(0, 0, 0, 0.22);
}

.home-journey-item.base-car-image-card {
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    #090b0f;
}

.home-journey-item.base-car-image-card img {
  border-color: rgba(245, 31, 45, 0.34);
  box-shadow: 0 0 22px rgba(245, 31, 45, 0.13);
}

.home-hero-premium.has-car-atmosphere::before {
  opacity: 0.74;
  filter: brightness(1.06) contrast(1.08) saturate(1.04);
}

.home-hero-premium.has-car-atmosphere::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.52) 46%, rgba(0, 0, 0, 0.22) 100%),
    radial-gradient(circle at 82% 42%, rgba(245, 31, 45, 0.22), transparent 340px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, transparent 30%);
}

@media (hover: hover) and (pointer: fine) {
  .base-car-image-card:hover,
  .cinematic-car-card:hover {
    border-color: rgba(245, 31, 45, 0.5);
    box-shadow:
      0 30px 86px rgba(0, 0, 0, 0.52),
      0 0 32px rgba(245, 31, 45, 0.18),
      0 0 0 1px rgba(245, 31, 45, 0.14) inset;
  }

  .base-car-image-card:hover .base-car-image-card-image,
  .cinematic-car-card:hover .cinematic-car-card-image {
    filter: brightness(1.1) contrast(1.1) saturate(1.08);
  }
}

/* Final landing hero responsive guard. Keeps the first screen balanced after older media rules. */
.cinematic-landing main {
  width: 100%;
  max-width: none;
  height: 100svh;
  height: 100dvh;
  max-height: 100svh;
  max-height: 100dvh;
  min-height: 100svh;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 31, 45, 0.76) rgba(255, 255, 255, 0.06);
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

body.cinematic-landing {
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

.cinematic-landing main::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  display: block;
}

.cinematic-landing main::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.cinematic-landing main::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(245, 31, 45, 0.95), rgba(120, 8, 14, 0.9));
}

.cinematic-landing .cinematic-hero {
  left: 50%;
  right: auto;
  width: 100vw;
  max-width: none;
  margin-left: -50vw;
  margin-right: 0;
}

@media (min-width: 1101px) {
  .cinematic-landing .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(340px, 0.9fr);
  }

  .cinematic-landing .cinematic-hero .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .cinematic-landing .cinematic-hero h1,
  .cinematic-landing .cinematic-hero .landing-hero-subtitle,
  .hero-flow,
  .hero-social-proof {
    max-width: 100%;
  }

  .hero-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding-left: 0;
  }

  .hero-flow::before {
    top: 50%;
    right: 8px;
    bottom: auto;
    left: 8px;
    width: auto;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, rgba(245, 31, 45, 0.86), rgba(255, 255, 255, 0.5), rgba(245, 31, 45, 0.72), transparent);
  }

  .hero-flow span {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 76px;
    padding: 10px 8px;
    text-align: center;
    line-height: 1.12;
  }

  .hero-flow span::before {
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 1280px) {
  .cinematic-landing .cinematic-hero h1 {
    font-size: clamp(3.35rem, 7vw, 6.2rem);
  }

  .hero-social-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .cinematic-landing .hero-grid {
    width: min(100%, 860px);
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .cinematic-landing .cinematic-hero .hero-copy,
  .cinematic-landing .hero-stats-card,
  .hero-visual-core {
    justify-self: center;
    max-width: 720px;
    text-align: center;
  }

  .cinematic-landing .cinematic-hero h1,
  .cinematic-landing .cinematic-hero .landing-hero-subtitle {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
  }

  .cinematic-landing .landing-hero-actions {
    justify-content: center;
  }

  .hero-flow {
    margin-right: auto;
    margin-left: auto;
    text-align: left;
  }

  .hero-visual-core {
    order: 3;
    min-height: 260px;
    width: min(100%, 640px);
  }

  .cinematic-landing .hero-stats-card {
    order: 2;
    width: min(100%, 520px);
  }
}

@media (max-width: 760px) {
  .cinematic-landing .cinematic-nav {
    width: 100%;
    padding: 10px 14px;
  }

  .cinematic-landing .landing-brand {
    min-width: 0;
  }

  .cinematic-landing .landing-brand > span {
    font-size: 0.92rem;
  }

  .cinematic-landing .landing-nav-actions {
    min-width: 0;
    margin-left: auto;
  }

  .cinematic-landing .cinematic-hero {
    min-height: auto;
    padding: 92px 16px 34px;
  }

  .cinematic-landing .hero-grid {
    width: 100%;
    gap: 18px;
  }

  .cinematic-landing .cinematic-hero .hero-copy {
    width: 100%;
    max-width: 390px;
    padding-bottom: 0;
  }

  .cinematic-landing .cinematic-hero h1 {
    max-width: 330px;
    margin: 12px auto 14px;
    font-size: clamp(2.35rem, 12.4vw, 3.35rem);
    line-height: 0.9;
    overflow-wrap: normal;
    text-align: center;
  }

  .cinematic-landing .cinematic-hero .landing-hero-subtitle {
    max-width: 340px;
    margin-bottom: 18px;
    font-size: 0.95rem;
  }

  .cinematic-landing .landing-hero-actions {
    grid-template-columns: 1fr;
    width: min(100%, 340px);
    margin-right: auto;
    margin-left: auto;
  }

  .cinematic-landing .landing-primary-cta,
  .cinematic-landing .landing-secondary-cta {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    padding-right: 12px;
    padding-left: 12px;
    white-space: normal;
  }

  .hero-flow {
    width: min(100%, 340px);
    gap: 7px;
    margin-top: 14px;
  }

  .hero-flow span {
    min-height: 34px;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 7px 10px;
    font-size: 0.68rem;
  }

  .hero-social-proof {
    width: min(100%, 340px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: auto;
    margin-left: auto;
  }

  .hero-social-proof span {
    min-height: 58px;
  }

  .hero-visual-core {
    min-height: 190px;
    order: 2;
  }

  .hero-visual-ring {
    width: min(88vw, 340px);
  }

  .hero-visual-caption {
    right: 18px;
    bottom: 18px;
  }

  .cinematic-landing .hero-stats-card {
    order: 3;
    width: min(100%, 360px);
    padding: 14px;
    animation: none;
  }

  .hero-card-mini {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-card-mini strong {
    grid-row: auto;
  }
}

.cinematic-landing .insane-car-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  width: auto;
}

.cinematic-landing .random-garage-card > div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  width: auto;
}

.cinematic-landing .garage-card-media > span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
}

@keyframes garageSpineScan {
  0% {
    transform: translateY(-40%);
  }

  100% {
    transform: translateY(360%);
  }
}

@keyframes garageNodePulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(245, 31, 45, 0.12), 0 0 28px rgba(245, 31, 45, 0.76);
  }

  50% {
    box-shadow: 0 0 0 14px rgba(245, 31, 45, 0.05), 0 0 44px rgba(245, 31, 45, 0.98);
  }
}

@keyframes garageCardReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes garageBarFill {
  from {
    width: 0;
  }

  to {
    width: var(--bar-value);
  }
}

body[data-view="garage"] #garageScreen.screen.is-active {
  width: 100%;
  max-width: 1480px;
  margin-right: auto;
  margin-left: auto;
}

body[data-view="garage"] #garageScreen > .section-head,
body[data-view="garage"] #garageScreen > .garage-tabs {
  display: none;
}

#garageTimeline.timeline {
  display: block;
  padding-left: 0;
}

#garageTimeline.timeline::before {
  display: none;
}

.garage-cyber-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 18px;
  min-height: calc(100svh - 122px);
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(245, 31, 45, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, rgba(245, 31, 45, 0.16), transparent 320px),
    radial-gradient(circle at 12% 18%, rgba(245, 31, 45, 0.12), transparent 280px),
    linear-gradient(180deg, rgba(1, 3, 8, 0.72), rgba(0, 0, 0, 0.94)),
    var(--garage-bg-image) center / cover fixed no-repeat,
    #010205;
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.045) inset,
    0 0 42px rgba(245, 31, 45, 0.1);
}

.garage-cyber-shell::before,
.garage-cyber-shell::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.garage-cyber-shell::before {
  background:
    linear-gradient(rgba(245, 31, 45, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 31, 45, 0.04) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 82%);
}

.garage-cyber-shell::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 24%, transparent 72%, rgba(0, 0, 0, 0.76)),
    radial-gradient(circle at 50% 100%, rgba(245, 31, 45, 0.2), transparent 280px);
}

.garage-cyber-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.garage-cyber-header h2 {
  margin: 2px 0 0;
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  font-size: clamp(2.05rem, 4.8vw, 4.8rem);
  line-height: 0.86;
  text-transform: uppercase;
}

.garage-cyber-header > div:first-child > span {
  display: block;
  max-width: 760px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  font-weight: 750;
}

.garage-cyber-actions,
.garage-cyber-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.garage-cyber-actions label,
.garage-cyber-filters label {
  display: grid;
  gap: 4px;
  min-width: 132px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.58rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-cyber-actions select,
.garage-cyber-filters select {
  height: 38px;
  border: 1px solid rgba(245, 31, 45, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.garage-cyber-filters {
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid rgba(245, 31, 45, 0.16);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(245, 31, 45, 0.06), rgba(0, 0, 0, 0.35));
}

.garage-cyber-filters > span {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.garage-cyber-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
  gap: 22px;
  align-items: start;
}

.garage-timeline-stage {
  position: relative;
  display: grid;
  gap: 28px;
  min-height: 620px;
  padding: 10px 0 18px;
}

.garage-timeline-spine {
  position: absolute;
  top: 6px;
  bottom: 0;
  left: 50%;
  z-index: 1;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(255, 54, 68, 0.98) 12%, rgba(255, 54, 68, 0.92) 88%, transparent);
  box-shadow: 0 0 24px rgba(245, 31, 45, 0.74), 0 0 74px rgba(245, 31, 45, 0.22);
  transform: translateX(-50%);
}

.garage-timeline-spine::before {
  display: block;
  width: 100%;
  height: 26%;
  content: "";
  background: linear-gradient(180deg, transparent, #fff, transparent);
  opacity: 0.54;
  animation: garageSpineScan 5.8s ease-in-out infinite;
}

.garage-spine-marker {
  position: absolute;
  left: 50%;
  padding: 4px 7px;
  border: 1px solid rgba(245, 31, 45, 0.4);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--premium-red-hot);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(245, 31, 45, 0.28);
}

.garage-spine-marker.is-present {
  top: 0;
}

.garage-spine-marker.is-start {
  bottom: 0;
}

.garage-timeline-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 88px minmax(250px, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 250px;
  opacity: 0;
  animation: garageCardReveal 540ms ease forwards;
  animation-delay: var(--entry-delay);
}

.garage-timeline-row.is-current {
  min-height: 282px;
}

.garage-year-marker {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  padding: 5px 8px;
  border: 1px solid rgba(245, 31, 45, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  text-shadow: 0 0 14px rgba(245, 31, 45, 0.6);
}

.garage-node {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: var(--premium-red-hot);
  box-shadow: 0 0 0 8px rgba(245, 31, 45, 0.12), 0 0 28px rgba(245, 31, 45, 0.76);
}

.garage-node.is-present {
  width: 25px;
  height: 25px;
  background: #fff;
  animation: garageNodePulse 2.5s ease-in-out infinite;
}

.garage-timeline-row.is-left .garage-timeline-car-card {
  grid-column: 1;
  grid-row: 1;
}

.garage-timeline-row.is-left .garage-event-card {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}

.garage-timeline-row.is-right .garage-timeline-car-card {
  grid-column: 3;
  grid-row: 1;
}

.garage-timeline-row.is-right .garage-event-card {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.garage-timeline-car-card.cinematic-car-card {
  width: min(100%, 470px);
  min-height: 236px;
  border: 1px solid rgba(245, 31, 45, 0.34);
  border-radius: 8px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.58),
    0 0 34px rgba(245, 31, 45, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.garage-timeline-car-card.is-current {
  width: min(100%, 540px);
  min-height: 278px;
  border-color: rgba(245, 31, 45, 0.74);
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.66),
    0 0 54px rgba(245, 31, 45, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.garage-timeline-car-card .cinematic-car-card-image {
  object-position: center;
  filter: brightness(1.1) contrast(1.08) saturate(1.08);
}

.garage-timeline-car-card.cinematic-car-card::before {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.5) 33%, rgba(0, 0, 0, 0.1) 62%, rgba(0, 0, 0, 0.04) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), transparent 46%),
    radial-gradient(circle at 18% 86%, rgba(245, 31, 45, 0.22), transparent 34%);
}

.garage-timeline-car-card .cinematic-car-card-content h3 {
  max-width: 13ch;
  font-size: clamp(1.45rem, 3.2vw, 2.85rem);
  line-height: 0.92;
}

.garage-timeline-car-card .cinematic-car-card-content strong {
  font-size: clamp(1.8rem, 4vw, 3.85rem);
}

.garage-timeline-car-card .cinematic-car-card-story {
  max-width: 42ch;
}

.garage-timeline-actions.cinematic-car-card-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.garage-timeline-actions .text-action {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.58rem;
}

.garage-event-card {
  position: relative;
  width: min(100%, 190px);
  padding: 14px 14px 14px 38px;
  border: 1px solid rgba(245, 31, 45, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 31, 45, 0.12), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.68);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.38), 0 0 24px rgba(245, 31, 45, 0.1);
}

.garage-event-card::before {
  position: absolute;
  top: 17px;
  left: 14px;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(245, 31, 45, 0.72);
  border-radius: 3px;
  content: "";
  background: rgba(245, 31, 45, 0.18);
  box-shadow: 0 0 16px rgba(245, 31, 45, 0.5);
  transform: rotate(45deg);
}

.garage-event-card b,
.garage-event-card span {
  display: block;
}

.garage-event-card b {
  color: #fff;
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-event-card span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.66rem;
  font-weight: 760;
}

.garage-overview-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.garage-dna-widget,
.garage-milestone-panel,
.garage-empty-state {
  border: 1px solid rgba(245, 31, 45, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(245, 31, 45, 0.055), rgba(0, 0, 0, 0.18)),
    rgba(1, 2, 5, 0.78);
  box-shadow: 0 26px 84px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.08);
}

.garage-dna-widget,
.garage-milestone-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.garage-dna-widget > small,
.garage-milestone-panel > small {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 196px;
  height: 196px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.84) 0 48%, transparent 49%),
    conic-gradient(from 20deg, rgba(245, 31, 45, 0.12), rgba(245, 31, 45, 0.95), rgba(255, 255, 255, 0.48), rgba(245, 31, 45, 0.26), rgba(245, 31, 45, 0.12));
  box-shadow: 0 0 42px rgba(245, 31, 45, 0.24), inset 0 0 34px rgba(0, 0, 0, 0.72);
}

.garage-score-ring span {
  color: var(--premium-red-hot);
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 950;
  line-height: 0.9;
  text-shadow: 0 0 28px rgba(245, 31, 45, 0.56);
}

.garage-score-ring b {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.6rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-dna-bars {
  display: grid;
  gap: 14px;
}

.garage-dna-bars div {
  display: grid;
  gap: 7px;
}

.garage-dna-bars span {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.65rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-dna-bars i {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.garage-dna-bars i::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-value);
  border-radius: inherit;
  content: "";
  background: linear-gradient(90deg, #a10610, var(--premium-red-hot), rgba(255, 255, 255, 0.82));
  box-shadow: 0 0 16px rgba(245, 31, 45, 0.54);
  animation: garageBarFill 1s ease both;
}

.garage-milestone {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.garage-milestone i {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(245, 31, 45, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(245, 31, 45, 0.2), transparent 60%),
    rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 18px rgba(245, 31, 45, 0.12);
}

.garage-milestone.is-unlocked i {
  border-color: rgba(245, 31, 45, 0.72);
  box-shadow: 0 0 22px rgba(245, 31, 45, 0.34);
}

.garage-milestone strong,
.garage-milestone small {
  display: block;
}

.garage-milestone strong {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-milestone small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.62rem;
  font-weight: 820;
  text-transform: uppercase;
}

.garage-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid rgba(245, 31, 45, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(245, 31, 45, 0.09), rgba(0, 0, 0, 0.82)),
    rgba(0, 0, 0, 0.74);
  box-shadow: 0 -12px 48px rgba(245, 31, 45, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.garage-stats-bar span {
  display: grid;
  gap: 3px;
  min-height: 68px;
  place-items: center;
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.garage-stats-bar span:last-child {
  border-right: 0;
}

.garage-stats-bar strong {
  color: #fff;
  font-size: clamp(1rem, 2.2vw, 1.55rem);
  font-weight: 950;
  line-height: 1;
}

.garage-stats-bar small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.garage-empty-state {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 320px;
  padding: 28px;
  text-align: center;
}

.garage-empty-state strong {
  font-size: 1.6rem;
  text-transform: uppercase;
}

.garage-empty-state small {
  color: rgba(255, 255, 255, 0.58);
}

.cinematic-landing .battle-section {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(245, 31, 45, 0.18);
  border-bottom: 1px solid rgba(245, 31, 45, 0.18);
  background:
    radial-gradient(circle at 50% 52%, rgba(245, 31, 45, 0.16), transparent 360px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.94)),
    var(--garage-bg-image) center / cover fixed no-repeat;
}

.cinematic-landing .battle-section::before,
.cinematic-landing .battle-section::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.cinematic-landing .battle-section::before {
  background:
    linear-gradient(rgba(245, 31, 45, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 31, 45, 0.04) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: 0.42;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent);
}

.cinematic-landing .battle-section::after {
  background:
    radial-gradient(circle at 14% 78%, rgba(245, 31, 45, 0.18), transparent 260px),
    radial-gradient(circle at 86% 24%, rgba(245, 31, 45, 0.16), transparent 240px),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.72));
}

.cinematic-landing .battle-grid {
  position: relative;
  z-index: 2;
  width: min(100%, 1500px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
  gap: 24px;
}

@keyframes cyberBattlePulse {
  0%,
  100% {
    opacity: 0.62;
    filter: drop-shadow(0 0 12px rgba(245, 31, 45, 0.18));
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 28px rgba(245, 31, 45, 0.48));
  }
}

@keyframes cyberBattleSweep {
  from {
    transform: translateX(-120%) skewX(-18deg);
  }

  to {
    transform: translateX(220%) skewX(-18deg);
  }
}

@keyframes cyberVsPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    text-shadow: 0 0 24px rgba(245, 31, 45, 0.78), 0 0 70px rgba(245, 31, 45, 0.5);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.045);
    text-shadow: 0 0 38px rgba(255, 255, 255, 0.86), 0 0 94px rgba(245, 31, 45, 0.72);
  }
}

.cinematic-landing .battle-card.cyber-battle-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-height: 580px;
  padding: clamp(16px, 2.2vw, 26px);
  overflow: hidden;
  border: 1px solid rgba(245, 31, 45, 0.5);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(245, 31, 45, 0.18), transparent 280px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(245, 31, 45, 0.06) 40%, rgba(0, 0, 0, 0.36)),
    rgba(0, 0, 0, 0.82);
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.62),
    0 0 48px rgba(245, 31, 45, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.cyber-battle-card::before,
.cyber-battle-card::after,
.cyber-battle-frame {
  position: absolute;
  content: "";
  pointer-events: none;
}

.cyber-battle-card::before {
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(245, 31, 45, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 31, 45, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.46;
}

.cyber-battle-card::after {
  top: 0;
  bottom: 0;
  left: -30%;
  z-index: 5;
  width: 26%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: cyberBattleSweep 7s ease-in-out infinite;
}

.cyber-battle-frame {
  inset: 12px;
  z-index: 1;
  border: 1px solid rgba(245, 31, 45, 0.32);
  border-radius: 8px;
  box-shadow:
    0 0 24px rgba(245, 31, 45, 0.16),
    inset 0 0 28px rgba(245, 31, 45, 0.08);
  clip-path: polygon(0 7%, 4% 0, 46% 0, 49% 3%, 51% 3%, 54% 0, 96% 0, 100% 7%, 100% 93%, 96% 100%, 54% 100%, 51% 97%, 49% 97%, 46% 100%, 4% 100%, 0 93%);
  animation: cyberBattlePulse 3.4s ease-in-out infinite;
}

.cyber-battle-header,
.cyber-battle-arena,
.cyber-battle-telemetry,
.cyber-battle-footer {
  position: relative;
  z-index: 3;
}

.cyber-battle-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.cyber-battle-title {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 170px;
  text-align: center;
  text-transform: uppercase;
}

.cyber-battle-title span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.cyber-battle-title strong {
  color: #fff;
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.cyber-battle-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.cyber-battle-identity.is-right {
  flex-direction: row-reverse;
  text-align: right;
}

.cyber-battle-identity img {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(245, 31, 45, 0.54);
  border-radius: 50%;
  background: #050505;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(245, 31, 45, 0.2), inset 0 0 0 2px rgba(0, 0, 0, 0.74);
}

.cyber-battle-identity span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cyber-battle-identity strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cyber-battle-identity small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.64rem;
  font-weight: 850;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cyber-battle-arena {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: 252px;
}

.cyber-battle-panel {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  min-height: 252px;
  border: 1px solid rgba(245, 31, 45, 0.44);
  border-radius: 8px;
  background: #050508;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.68), 0 0 30px rgba(245, 31, 45, 0.1);
}

.cyber-battle-panel::before,
.cyber-battle-panel::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.cyber-battle-panel::before {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.2) 56%, rgba(0, 0, 0, 0.04)),
    radial-gradient(circle at 18% 85%, rgba(245, 31, 45, 0.3), transparent 36%);
}

.cyber-battle-panel::after {
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.54), inset 0 -1px 0 rgba(245, 31, 45, 0.48);
}

.cyber-battle-panel img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.08) contrast(1.1) saturate(1.08);
  transition: transform 260ms ease, filter 260ms ease;
}

.cyber-battle-panel div {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  display: grid;
  gap: 4px;
  text-transform: uppercase;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.82);
}

.cyber-battle-panel small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.64rem;
  font-weight: 950;
}

.cyber-battle-panel strong {
  color: #fff;
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.85rem);
  line-height: 0.9;
}

.cyber-battle-panel span {
  color: var(--premium-red-hot);
  font-size: clamp(1.2rem, 2.6vw, 2.4rem);
  font-weight: 950;
}

.cyber-battle-vs {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 252px;
}

.cyber-battle-vs i {
  position: absolute;
  inset: 4px 50%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #fff, var(--premium-red-hot), transparent);
  box-shadow: 0 0 28px rgba(245, 31, 45, 0.86), 0 0 76px rgba(245, 31, 45, 0.48);
  transform: translateX(-50%) rotate(16deg);
}

.cyber-battle-vs b {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  color: #fff;
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  font-size: clamp(3.2rem, 7vw, 5.8rem);
  line-height: 0.8;
  transform: translate(-50%, -50%);
  animation: cyberVsPulse 2.2s ease-in-out infinite;
}

.cyber-battle-vs span {
  position: absolute;
  bottom: 42px;
  z-index: 3;
  padding: 7px 10px;
  border: 1px solid rgba(245, 31, 45, 0.36);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.64);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cyber-battle-telemetry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.cyber-battle-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cyber-battle-chip,
.cyber-battle-badges {
  position: relative;
  overflow: hidden;
  min-height: 70px;
  padding: 10px;
  border: 1px solid rgba(245, 31, 45, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(245, 31, 45, 0.045)),
    rgba(0, 0, 0, 0.54);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.36);
}

.cyber-battle-chip small,
.cyber-battle-badges small {
  display: block;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.54rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cyber-battle-chip strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.cyber-battle-chip i {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.cyber-battle-chip i::before {
  display: block;
  width: var(--chip-value);
  height: 100%;
  content: "";
  background: linear-gradient(90deg, #8f0710, var(--premium-red-hot), rgba(255, 255, 255, 0.84));
  box-shadow: 0 0 14px rgba(245, 31, 45, 0.58);
}

.cyber-battle-badges {
  grid-column: 1 / -1;
  min-height: 62px;
}

.cyber-battle-badges span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.cyber-battle-badges b {
  padding: 5px 7px;
  border: 1px solid rgba(245, 31, 45, 0.28);
  border-radius: 999px;
  background: rgba(245, 31, 45, 0.11);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cinematic-landing .cyber-battle-cta,
.cinematic-landing .battle-card .cyber-battle-cta {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(245, 31, 45, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 31, 45, 0.22), rgba(0, 0, 0, 0.42)),
    rgba(0, 0, 0, 0.62);
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 34px rgba(245, 31, 45, 0.16), inset 0 0 22px rgba(245, 31, 45, 0.08);
}

.cyber-battle-cta span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.58rem;
  font-weight: 950;
}

.cyber-battle-cta b {
  color: var(--premium-red-hot);
  font-family: "Arial Narrow", "Roboto Condensed", "Impact", system-ui, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 0.92;
}

.cyber-battle-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cyber-battle-footer strong {
  color: var(--premium-red-hot);
  text-align: center;
}

.cyber-battle-footer span:last-child {
  text-align: right;
}

@media (hover: hover) and (pointer: fine) {
  .cinematic-landing .battle-card.cyber-battle-card:hover {
    border-color: rgba(255, 70, 84, 0.82);
    box-shadow:
      0 42px 128px rgba(0, 0, 0, 0.72),
      0 0 68px rgba(245, 31, 45, 0.28),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
  }

  .cyber-battle-card:hover .cyber-battle-panel img {
    filter: brightness(1.14) contrast(1.12) saturate(1.12);
    transform: scale(1.035);
  }
}

@media (max-width: 980px) {
  .cinematic-landing .battle-grid {
    grid-template-columns: 1fr;
  }

  .cyber-battle-header,
  .cyber-battle-telemetry,
  .cyber-battle-footer {
    grid-template-columns: 1fr;
  }

  .cyber-battle-title {
    order: -1;
  }

  .cyber-battle-identity.is-right {
    flex-direction: row;
    text-align: left;
  }

  .cyber-battle-arena {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cyber-battle-vs {
    min-height: 112px;
  }

  .cyber-battle-vs i {
    inset: 10px auto;
    left: 50%;
    height: auto;
  }

  .cyber-battle-vs span {
    bottom: 8px;
  }

  .cyber-battle-footer,
  .cyber-battle-footer span:last-child {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .cinematic-landing .battle-card.cyber-battle-card {
    min-height: auto;
    padding: 12px;
  }

  .cyber-battle-frame {
    inset: 7px;
  }

  .cyber-battle-panel {
    min-height: 210px;
  }

  .cyber-battle-stats {
    grid-template-columns: 1fr;
  }

  .cyber-battle-chip {
    min-height: 62px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .garage-timeline-car-card.cinematic-car-card:hover {
    border-color: rgba(245, 31, 45, 0.72);
    box-shadow:
      0 34px 98px rgba(0, 0, 0, 0.64),
      0 0 48px rgba(245, 31, 45, 0.24),
      inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    transform: translateY(-3px);
  }

  .garage-timeline-car-card.cinematic-car-card:hover .cinematic-car-card-image {
    filter: brightness(1.15) contrast(1.1) saturate(1.1);
    transform: scale(1.035);
  }
}

@media (max-width: 1260px) {
  .garage-cyber-layout {
    grid-template-columns: 1fr;
  }

  .garage-overview-panel {
    position: relative;
    top: auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 940px) {
  .garage-cyber-shell {
    padding: 16px;
  }

  .garage-cyber-header {
    grid-template-columns: 1fr;
  }

  .garage-cyber-actions,
  .garage-cyber-filters {
    justify-content: stretch;
  }

  .garage-cyber-actions > *,
  .garage-cyber-filters > * {
    flex: 1 1 150px;
  }

  .garage-cyber-filters > span {
    flex-basis: 100%;
    margin-left: 0;
  }

  .garage-timeline-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    min-height: auto;
  }

  .garage-timeline-spine {
    left: 23px;
  }

  .garage-spine-marker {
    left: 23px;
  }

  .garage-year-marker,
  .garage-node {
    grid-column: 1;
  }

  .garage-timeline-row.is-left .garage-timeline-car-card,
  .garage-timeline-row.is-right .garage-timeline-car-card,
  .garage-timeline-row.is-left .garage-event-card,
  .garage-timeline-row.is-right .garage-event-card {
    grid-column: 2;
    justify-self: stretch;
  }

  .garage-timeline-row.is-left .garage-timeline-car-card,
  .garage-timeline-row.is-right .garage-timeline-car-card {
    grid-row: 1;
  }

  .garage-timeline-row.is-left .garage-event-card,
  .garage-timeline-row.is-right .garage-event-card {
    grid-row: 2;
    width: 100%;
  }

  .garage-timeline-car-card.cinematic-car-card,
  .garage-timeline-car-card.is-current {
    width: 100%;
    min-height: 250px;
  }

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

  .garage-stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .garage-stats-bar span:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 560px) {
  body[data-view="garage"] #garageScreen.screen.is-active {
    max-width: 100%;
  }

  .garage-cyber-shell {
    min-height: auto;
    padding: 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .garage-cyber-header h2 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .garage-cyber-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .garage-cyber-actions label,
  .garage-cyber-filters label {
    min-width: 0;
  }

  .garage-timeline-stage {
    gap: 20px;
  }

  .garage-timeline-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .garage-timeline-spine,
  .garage-spine-marker {
    left: 17px;
  }

  .garage-year-marker {
    padding: 4px 5px;
    font-size: 0.62rem;
    writing-mode: vertical-rl;
  }

  .garage-node {
    width: 13px;
    height: 13px;
  }

  .garage-node.is-present {
    width: 19px;
    height: 19px;
  }

  .garage-timeline-car-card .cinematic-car-card-content h3 {
    max-width: 10ch;
    font-size: clamp(1.55rem, 10vw, 2.45rem);
  }

  .garage-timeline-car-card .cinematic-car-card-content strong {
    font-size: clamp(1.9rem, 12vw, 3rem);
  }

  .garage-timeline-actions.cinematic-car-card-actions {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 0 12px 12px;
  }

  .garage-score-ring {
    width: 168px;
    height: 168px;
  }

  .garage-score-ring span {
    font-size: 2.35rem;
  }

  .garage-stats-bar {
    grid-template-columns: 1fr;
  }

  .garage-stats-bar span {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .garage-stats-bar span:last-child {
    border-bottom: 0;
  }
}

@keyframes sidebarActivePulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(-50%) scaleY(0.82);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
  }
}

@keyframes sidebarIconGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(245, 31, 45, 0));
  }

  50% {
    filter: drop-shadow(0 0 12px rgba(245, 31, 45, 0.42));
  }
}

@media (min-width: 1024px) {
  body[data-view]:not([data-view="auth"]):not([data-view="onboarding"]) .app-shell {
    grid-template-columns: 96px minmax(0, 1fr) 320px;
  }

  body[data-view]:not([data-view="auth"]):not([data-view="onboarding"]) main {
    padding-left: 24px;
  }

  .desktop-sidebar {
    align-items: center;
    width: 96px;
    padding: 16px 10px 14px;
    overflow: hidden;
    border-right: 1px solid rgba(245, 31, 45, 0.24);
    background:
      radial-gradient(circle at 50% 7%, rgba(245, 31, 45, 0.16), transparent 76px),
      linear-gradient(90deg, rgba(245, 31, 45, 0.09), transparent 14px),
      linear-gradient(180deg, rgba(8, 9, 13, 0.96), rgba(1, 2, 5, 0.92)),
      rgba(0, 0, 0, 0.92);
    box-shadow:
      18px 0 70px rgba(0, 0, 0, 0.42),
      inset -1px 0 0 rgba(245, 31, 45, 0.24),
      inset 1px 0 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px) saturate(1.08);
  }

  .desktop-sidebar::before,
  .desktop-sidebar::after {
    position: absolute;
    content: "";
    pointer-events: none;
  }

  .desktop-sidebar::before {
    inset: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 14px;
    background:
      linear-gradient(rgba(245, 31, 45, 0.065) 1px, transparent 1px),
      linear-gradient(90deg, rgba(245, 31, 45, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 82%);
  }

  .desktop-sidebar::after {
    top: 18px;
    right: -1px;
    bottom: 18px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(245, 31, 45, 0.88), transparent);
    box-shadow: 0 0 18px rgba(245, 31, 45, 0.55);
  }

  .desktop-brand {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 4px;
    width: 64px;
    min-height: 54px;
    margin: 0 0 10px;
    padding: 6px 0;
    border: 1px solid rgba(245, 31, 45, 0.18);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
  }

  .desktop-brand img {
    width: 34px;
    height: 34px;
    border-color: rgba(245, 31, 45, 0.52);
    box-shadow: 0 0 18px rgba(245, 31, 45, 0.18);
  }

  .desktop-brand span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.54rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
  }

  .desktop-nav {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 5px;
    width: 100%;
    padding: 4px 0;
  }

  .desktop-nav button {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    width: 72px;
    min-height: 54px;
    padding: 7px 4px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.006));
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.48rem;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
    transition:
      transform 180ms ease,
      color 180ms ease,
      border-color 180ms ease,
      background 180ms ease,
      box-shadow 180ms ease;
  }

  .desktop-nav button::after {
    position: absolute;
    top: 50%;
    right: -11px;
    width: 2px;
    height: 0;
    border-radius: 999px;
    background: var(--premium-red-hot);
    box-shadow: 0 0 16px rgba(245, 31, 45, 0.9);
    content: "";
    transform: translateY(-50%);
    transition: height 180ms ease;
  }

  .desktop-nav button img {
    width: 20px;
    height: 20px;
    opacity: 0.72;
    filter: brightness(0) invert(1);
    transition:
      transform 180ms ease,
      opacity 180ms ease,
      filter 180ms ease;
  }

  .desktop-nav button span {
    max-width: 64px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .desktop-nav button.is-active {
    border-color: rgba(245, 31, 45, 0.44);
    background:
      radial-gradient(circle at 50% 16%, rgba(245, 31, 45, 0.22), transparent 54%),
      linear-gradient(180deg, rgba(245, 31, 45, 0.16), rgba(255, 255, 255, 0.025));
    color: #fff;
    box-shadow:
      0 0 28px rgba(245, 31, 45, 0.14),
      inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .desktop-nav button.is-active::before {
    top: 50%;
    bottom: auto;
    left: -10px;
    width: 3px;
    height: 38px;
    border-radius: 999px;
    background: var(--premium-red-hot);
    box-shadow: 0 0 18px rgba(245, 31, 45, 0.82);
    transform: translateY(-50%);
    animation: sidebarActivePulse 2.6s ease-in-out infinite;
  }

  .desktop-nav button.is-active::after {
    height: 28px;
  }

  .desktop-nav button.is-active img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(23%) sepia(96%) saturate(3563%) hue-rotate(342deg) brightness(107%) contrast(96%);
    animation: sidebarIconGlow 3s ease-in-out infinite;
  }

  .desktop-sidebar-version {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3px;
    width: 72px;
    margin-top: auto;
    padding: 8px 5px;
    border: 1px solid rgba(245, 31, 45, 0.22);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    text-align: center;
  }

  .desktop-sidebar-version small {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.46rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .desktop-sidebar-version strong {
    color: var(--premium-red-hot);
    font-size: 0.74rem;
    line-height: 1;
  }

  .desktop-profile-mini {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    width: 72px;
    margin-top: 8px;
    padding: 8px 5px;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(245, 31, 45, 0.04));
  }

  .desktop-profile-mini::before {
    position: absolute;
    top: 11px;
    right: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48ff83;
    box-shadow: 0 0 12px rgba(72, 255, 131, 0.68);
    content: "";
  }

  .desktop-profile-mini img {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(245, 31, 45, 0.36);
    box-shadow: 0 0 18px rgba(245, 31, 45, 0.14);
  }

  .desktop-profile-mini span {
    min-width: 0;
    max-width: 64px;
    text-align: center;
  }

  .desktop-profile-mini strong {
    color: #fff;
    font-size: 0.58rem;
    line-height: 1.05;
  }

  .desktop-profile-mini small {
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.48rem;
    line-height: 1.05;
    text-transform: uppercase;
  }

  .desktop-logout {
    position: relative;
    z-index: 1;
    width: 72px;
    min-height: 30px;
    margin-top: 7px;
    padding: 0 4px;
    border-color: rgba(245, 31, 45, 0.16);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.24);
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.5rem;
    text-transform: uppercase;
  }
}

@media (hover: hover) and (pointer: fine) {
  .desktop-nav button:hover {
    border-color: rgba(245, 31, 45, 0.28);
    color: #fff;
    box-shadow: 0 0 24px rgba(245, 31, 45, 0.1);
    transform: translateX(2px);
  }

  .desktop-nav button:hover img {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (max-width: 1023px) {
  .bottom-nav {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    height: 72px;
    padding: 8px;
    border: 1px solid rgba(245, 31, 45, 0.22);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(12, 14, 19, 0.94), rgba(3, 4, 7, 0.9)),
      rgba(0, 0, 0, 0.72);
    box-shadow:
      0 22px 64px rgba(0, 0, 0, 0.62),
      0 0 24px rgba(245, 31, 45, 0.12);
    backdrop-filter: blur(18px) saturate(1.08);
  }

  .bottom-nav button {
    min-width: 0;
    border-radius: 14px;
  }

  .bottom-nav button.is-active {
    background: radial-gradient(circle at 50% 20%, rgba(245, 31, 45, 0.24), transparent 60%);
    color: #fff;
  }

  .bottom-nav button.is-active::before {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: var(--premium-red-hot);
    box-shadow: 0 0 14px rgba(245, 31, 45, 0.75);
    content: "";
    transform: translateX(-50%);
  }
}

@media (min-width: 1024px) {
  body[data-view="garage"] .app-shell {
    grid-template-areas:
      "sidebar header"
      "sidebar main" !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
  }

  body[data-view="garage"] .desktop-right-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  .cinematic-landing .insane-car-overlay,
  .cinematic-landing .random-garage-card > div {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage-image,
  .hero-smoke,
  .hero-flow span,
  .hero-visual-scan,
  .cinematic-landing .hero-stats-card,
  .live-feed-track {
    animation: none;
  }

  .cinematic-landing [data-reveal] {
    transition: none;
  }
}

.cinematic-landing [data-reveal],
.cinematic-landing [data-reveal].is-visible {
  opacity: 1 !important;
  transform: none !important;
}

.cinematic-landing .battle-section,
.cinematic-landing .battle-grid,
.cinematic-landing .battle-card.cyber-battle-card {
  opacity: 1 !important;
  visibility: visible !important;
}

.cinematic-landing .battle-grid {
  display: grid !important;
  min-height: 760px;
  margin-top: 28px !important;
}

.cinematic-landing .battle-card.cyber-battle-card {
  display: grid !important;
  min-height: 760px;
}

.cinematic-landing .cinematic-final-cta {
  margin-top: 40px !important;
}

/* Garage compact timeline polish: smaller cards, cleaner actions, no oversized current-car hero. */
.current-ride-hero {
  display: none !important;
}

.standalone-profile-shell {
  width: min(1120px, calc(100% - clamp(20px, 4vw, 56px)));
}

.standalone-garage-list.has-compact-timeline {
  gap: 16px;
}

.standalone-garage-list.has-compact-timeline::before {
  display: none;
}

.compact-garage-timeline.vehicle-evolution {
  gap: 14px;
  padding: 4px 0 4px 30px;
}

.compact-garage-timeline .timeline-spine {
  left: 11px;
  top: 16px;
  bottom: 16px;
}

.compact-garage-timeline .vehicle-timeline-item {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.compact-garage-timeline .timeline-marker {
  gap: 6px;
  padding-top: 14px;
}

.compact-garage-timeline .timeline-marker strong {
  font-size: 0.74rem;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.76);
}

.compact-garage-timeline .timeline-node {
  top: 16px;
  left: -27px;
  width: 14px;
  height: 14px;
}

.compact-garage-timeline .vehicle-timeline-item.is-current .timeline-node {
  left: -30px;
  width: 20px;
  height: 20px;
}

.compact-garage-timeline .evolution-card {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(124px, 168px);
  gap: 11px;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.34), 0 0 18px rgba(245, 31, 45, 0.08);
}

.compact-garage-timeline .evolution-image-wrap {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
}

.compact-garage-timeline .evolution-image {
  min-height: 0;
  border-radius: 9px;
  filter: brightness(1.06) contrast(1.08) saturate(1.05);
}

.compact-garage-timeline .evolution-image-wrap::before {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0.04)),
    radial-gradient(circle at 18% 86%, rgba(245, 31, 45, 0.22), transparent 34%);
}

.compact-garage-timeline .evolution-image-wrap::after {
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(245, 31, 45, 0.24);
  background: none;
}

.compact-garage-timeline .evolution-status {
  bottom: 7px;
  left: 7px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 0.58rem;
}

.compact-garage-timeline .evolution-content {
  gap: 8px;
}

.compact-garage-timeline .evolution-title small {
  font-size: 0.66rem;
}

.compact-garage-timeline .evolution-title h2 {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1.05rem, 2vw, 1.52rem);
  line-height: 0.98;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.compact-garage-timeline .evolution-spec-grid {
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 6px;
}

.compact-garage-timeline .evolution-spec-grid span {
  padding: 7px;
  border-radius: 8px;
}

.compact-garage-timeline .evolution-spec-grid small {
  font-size: 0.58rem;
}

.compact-garage-timeline .evolution-spec-grid strong {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.08;
}

.compact-garage-timeline .evolution-story {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-garage-timeline .car-opinion-panel {
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
}

.compact-garage-timeline .car-opinion-panel strong {
  font-size: 0.74rem;
  line-height: 1.1;
}

.compact-garage-timeline .car-opinion-panel small {
  margin-top: 2px;
  font-size: 0.66rem;
  line-height: 1.2;
}

.compact-garage-timeline .car-opinion-actions {
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  gap: 5px;
}

.compact-garage-timeline .car-opinion-actions button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 0.66rem;
}

.compact-garage-timeline .evolution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: stretch;
  margin-top: 0;
}

.compact-garage-timeline .profile-file-field.evolution-upload {
  position: relative;
  display: inline-flex;
  width: auto;
  min-height: 32px;
  flex: 1 1 130px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.compact-garage-timeline .profile-file-field.evolution-upload input[type="file"] {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 0;
  opacity: 0;
}

.compact-garage-timeline .evolution-upload > span {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.compact-garage-timeline .evolution-upload small {
  display: none;
}

.compact-garage-timeline .danger-action.evolution-delete {
  width: auto;
  min-height: 32px;
  flex: 0 1 auto;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.compact-garage-timeline .evolution-delta {
  gap: 7px;
}

.compact-garage-timeline .upgrade-indicator,
.compact-garage-timeline .timeline-origin,
.compact-garage-timeline .transition-badges span,
.compact-garage-timeline .trust-badge {
  padding: 8px;
  border-radius: 9px;
  font-size: 0.68rem;
  line-height: 1.2;
}

.compact-garage-timeline .upgrade-indicator strong {
  font-size: 0.72rem;
  line-height: 1.14;
}

.compact-garage-timeline .upgrade-indicator small {
  font-size: 0.62rem;
}

.most-missed-card {
  margin-top: 10px;
  padding: 16px;
  border-radius: 12px;
}

.most-missed-card strong {
  font-size: 1.12rem;
}

@media (max-width: 1080px) {
  .compact-garage-timeline .evolution-card {
    grid-template-columns: minmax(180px, 232px) minmax(0, 1fr);
  }

  .compact-garage-timeline .evolution-delta {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .standalone-profile-shell {
    width: min(100%, calc(100% - 24px));
  }

  .compact-garage-timeline.vehicle-evolution {
    padding-left: 24px;
  }

  .compact-garage-timeline .vehicle-timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .compact-garage-timeline .timeline-marker {
    min-height: 22px;
    padding-top: 0;
  }

  .compact-garage-timeline .timeline-node,
  .compact-garage-timeline .vehicle-timeline-item.is-current .timeline-node {
    top: 3px;
    left: -21px;
  }

  .compact-garage-timeline .evolution-card,
  .compact-garage-timeline .evolution-delta {
    grid-template-columns: 1fr;
  }

  .compact-garage-timeline .evolution-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-garage-timeline .car-opinion-panel {
    align-items: stretch;
    flex-direction: column;
  }
}
