:root {
  --bg: #f7f4ec;
  --surface: #ffffff;
  --surface-2: #ede8dc;
  --line: #d6cfc2;
  --ink: #151823;
  --ink-hover: #242a3d;
  --asphalt: #162632;
  --muted: #525866;
  --on-dark-muted: #cbd5e1;
  --coral: #d83e1c;
  --coral-hover: #bd3314;
  --yellow: #eab328;
  --amber: #f59e0b;
  --teal: #2ec4b6;
  --crimson: #e63946;
  --cobalt: #3a86ff;
  --glacier: #f4f4f6;
  --success: rgb(21, 128, 61);
  --crimson-soft: rgba(230, 57, 70, 0.08);
  --cobalt-soft: rgba(58, 134, 255, 0.1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 0 var(--ink);
  --shadow-soft: 0 12px 32px rgba(21, 24, 35, 0.1);
  --font-display: "Barlow Condensed", "Arial Narrow", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

html:has(body.is-embed),
body.is-embed {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background: var(--asphalt);
}

html:has(body.is-playing),
body.is-playing {
  overflow: hidden;
  overscroll-behavior: none;
}

body.kind-home > .site-header {
  display: none;
}

body.kind-home > .site-main,
body.is-embed > .site-main {
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cobalt);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral);
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 2px;
}

.tabular,
.sw-timer,
.sw-speed-val,
.sw-tel-num,
.sw-meta-val {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

.shell {
  width: min(1040px, calc(100% - 24px));
  margin-inline: auto;
}

/* Header & Inner Pages */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  border-radius: 8px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.15;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  background: var(--ink);
  color: var(--surface);
}

.site-main {
  flex: 1;
  padding-block: 18px 48px;
}

/* Full-Bleed 3D Hero Stage */
.swervle-hero-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 500px;
  background: var(--asphalt);
  color: var(--surface);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}

body.is-embed .swervle-hero-stage,
body.is-playing .swervle-hero-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  z-index: 50;
  touch-action: none;
}

.sw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.sw-fallback-banner {
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 35;
  background: rgba(21, 24, 35, 0.92);
  color: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  max-width: min(520px, calc(100vw - 24px));
  text-align: center;
}

/* Top Bar & Glass Pills (>= 44x44px) */
.sw-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 24;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  padding: calc(14px + var(--safe-top)) calc(18px + var(--safe-right)) 0 calc(18px + var(--safe-left));
  pointer-events: none;
}

.sw-top-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 112px;
  background: linear-gradient(to bottom, rgba(15, 23, 36, 0.36) 0%, rgba(15, 23, 36, 0.14) 55%, rgba(15, 23, 36, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.sw-top-left {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  pointer-events: auto;
}

.sw-hotkey-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 7px 16px;
  min-height: 44px;
  border-radius: 999px;
  background: rgba(15, 23, 36, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--surface);
}

.sw-hk-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.sw-hk-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
  min-height: 28px;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sw-hk-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.67rem;
  font-weight: 800;
}

.sw-hk-key.is-wide {
  padding: 0 7px;
}

.sw-mobile-quick {
  display: none;
  align-items: center;
  gap: 6px;
}

.sw-top-center {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  justify-self: center;
  pointer-events: none;
}

.sw-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sw-timer {
  font-size: clamp(2.1rem, 4.3vw, 3.35rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--surface);
  text-shadow: 0 2px 4px rgba(10, 16, 26, 0.86), 0 4px 18px rgba(10, 16, 26, 0.62);
}

.sw-practice-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(21, 24, 35, 0.34);
}

.sw-split-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(21, 24, 35, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--yellow);
}

.sw-split-pill.is-ahead {
  color: var(--teal);
}

.sw-split-pill.is-behind {
  color: var(--crimson);
}

.sw-top-right {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  justify-self: end;
  pointer-events: auto;
}

.sw-pill-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(15, 23, 36, 0.78);
  color: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, transform 90ms ease;
}

.sw-pill-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.sw-pill-btn:hover {
  background: rgba(15, 23, 36, 0.9);
  border-color: rgba(255, 255, 255, 0.72);
}

.sw-pill-btn:active {
  transform: scale(0.96);
}

.sw-pill-btn.is-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
}

/* Home Showcase Left Cream Card */
.sw-showcase-wrap {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: calc(64px + var(--safe-top)) calc(20px + var(--safe-right)) calc(56px + var(--safe-bottom)) clamp(18px, 5.2vw, 80px);
  pointer-events: none;
}

.sw-showcase-card {
  pointer-events: auto;
  width: 100%;
  max-width: 472px;
  max-height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, #faf8f2 0%, var(--bg) 100%);
  color: var(--ink);
  border-radius: 12px;
  border: 1px solid rgba(21, 24, 35, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 2px 6px rgba(21, 24, 35, 0.08),
    0 20px 44px -8px rgba(12, 17, 28, 0.34);
  padding: 24px 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sw-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: condensed;
  font-weight: 900;
  font-size: clamp(2.2rem, 3.5vw, 2.85rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.sw-meta-strip {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 20px;
  padding-block: 10px;
  border-top: 1px solid rgba(21, 24, 35, 0.13);
  border-bottom: 1px solid rgba(21, 24, 35, 0.13);
}

.sw-meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sw-meta-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sw-meta-val {
  font-family: "Space Grotesk", var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.sw-biome-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  text-align: right;
}

.sw-biome-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(21, 24, 35, 0.15);
  box-shadow: 0 1px 2px rgba(21, 24, 35, 0.04);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.sw-pb-mini {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.1;
}

.sw-challenger-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(46, 196, 182, 0.15);
  border: 1px solid var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.sw-challenger-bar.is-practice {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--amber);
}

.sw-challenger-clear {
  appearance: none;
  border: 1px solid rgba(21, 24, 35, 0.25);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.sw-btn-race {
  appearance: none;
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(21, 24, 35, 0.16);
  border-radius: 7px;
  background: var(--coral);
  color: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 3px 10px rgba(216, 62, 28, 0.28);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

.sw-btn-race:hover {
  background: var(--coral-hover);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.26) inset, 0 5px 14px rgba(216, 62, 28, 0.36);
}

.sw-btn-race:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(216, 62, 28, 0.22);
}

.sw-mid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sw-btn-outline {
  position: relative;
  appearance: none;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid rgba(21, 24, 35, 0.2);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(21, 24, 35, 0.05);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

.sw-btn-outline:hover {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: 0 2px 6px rgba(21, 24, 35, 0.09);
}

.sw-btn-outline:active {
  transform: translateY(1px);
}

.sw-new-pill {
  position: absolute;
  top: 5px;
  right: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--surface);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
}

.sw-btn-dark {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 6px rgba(21, 24, 35, 0.16);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 120ms ease, transform 80ms ease;
}

.sw-btn-dark:hover {
  background: var(--ink-hover);
  color: var(--surface);
}

.sw-btn-dark:active {
  transform: translateY(1px);
}

.sw-btn-outline.is-copied,
.sw-btn-dark.is-copied,
.sw-btn-outline.is-copied:hover,
.sw-btn-dark.is-copied:hover {
  transition: none;
  background: var(--success);
  border-color: var(--success);
  color: var(--surface);
}

.sw-keycaps-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 4px;
  padding-top: 4px;
}

.sw-keycap-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sw-keycap-pair {
  display: inline-flex;
  gap: 5px;
}

.sw-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--ink);
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.sw-keycap.is-space {
  padding: 0 8px;
}

.sw-keycap-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.sw-touch-hint-card {
  display: none;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.sw-card-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(21, 24, 35, 0.13);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--muted);
}

.sw-card-link {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: nowrap;
}

.sw-card-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Bottom-Left Track Guide Link (kept off bright start stripe) */
.sw-scroll-cue {
  position: absolute;
  left: clamp(18px, 5.2vw, 80px);
  bottom: calc(14px + var(--safe-bottom));
  z-index: 21;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(15, 23, 36, 0.74);
  color: var(--surface);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sw-scroll-cue:hover {
  background: rgba(15, 23, 36, 0.92);
  color: var(--surface);
}

body.is-embed .sw-scroll-cue,
body.is-playing .sw-scroll-cue {
  display: none !important;
}

/* Giant Coral-Shadow Countdown (3-2-1-GO!) */
.sw-countdown-wrap {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 5vh;
  pointer-events: none;
}

.sw-countdown-num {
  font-family: var(--font-display);
  font-stretch: condensed;
  font-size: clamp(9.2rem, 23vw, 16.2rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--surface);
  text-shadow: 9px 9px 0 var(--coral);
  transform: rotate(-3deg);
  letter-spacing: -0.03em;
}

/* Bottom Racing Telemetry HUD (Symmetric Left & Right Boxes) */
.sw-hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 23;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 calc(20px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(20px + var(--safe-left));
  pointer-events: none;
}

.sw-telemetry-box {
  background: rgba(15, 23, 36, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 11px 14px;
  width: 146px;
  height: 102px;
  color: var(--surface);
}

.sw-hud-bl {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.sw-tel-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sw-tel-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  line-height: 1;
}

.sw-tel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sw-cp-bars {
  display: grid;
  grid-template-columns: repeat(10, 6px);
  gap: 3px;
  align-items: center;
}

.sw-cp-seg {
  width: 6px;
  height: 19px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  transition: background-color 90ms ease;
}

.sw-cp-seg.is-passed {
  background: var(--coral);
}

.sw-tel-num {
  font-family: var(--font-display);
  font-stretch: condensed;
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1;
  min-width: 22px;
  text-align: right;
}

.sw-rpm-track {
  flex: 1;
  height: 16px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.sw-rpm-fill {
  height: 100%;
  width: 100%;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.sw-hud-br {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
}

.sw-speed-val {
  font-family: var(--font-display);
  font-stretch: condensed;
  font-size: clamp(2.35rem, 4.3vw, 3.2rem);
  font-weight: 900;
  line-height: 0.94;
}

/* Mobile Touch Controls (LEFT, RIGHT, BRAKE, DRIFT >= 56x56px) */
.sw-touch-layer {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 25;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 calc(14px + var(--safe-right)) 0 calc(14px + var(--safe-left));
  pointer-events: none;
}

.sw-touch-steer-pair,
.sw-touch-action-pair {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.sw-touch-pad {
  appearance: none;
  min-width: 64px;
  min-height: 64px;
  padding: 6px 12px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  background: rgba(15, 23, 36, 0.72);
  color: var(--surface);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.sw-touch-pad.is-steer {
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}

.sw-touch-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

.sw-touch-lbl {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

.sw-touch-pad.is-drift {
  min-width: 84px;
  border-color: var(--coral);
}

.sw-touch-pad.is-active,
.sw-touch-pad:active {
  background: var(--coral);
  border-color: var(--surface);
}

/* Modals */
.sw-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(21, 24, 35, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(14px + var(--safe-top)) calc(14px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(14px + var(--safe-left));
}

.sw-modal-card {
  width: 100%;
  max-width: 530px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  background: var(--bg);
  color: var(--ink);
  border-radius: 16px;
  border: 2px solid var(--ink);
  box-shadow: 0 24px 60px rgba(21, 24, 35, 0.5);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.sw-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sw-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.sw-modal-sub {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.sw-modal-close {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  border: 0;
  background: rgba(21, 24, 35, 0.07);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 120ms ease, transform 80ms ease;
}

.sw-modal-close::after {
  content: "";
  position: absolute;
  inset: -4px;
}

.sw-modal-close svg {
  pointer-events: none;
  flex-shrink: 0;
}

.sw-modal-close:hover,
.sw-modal-close:active {
  background: rgba(21, 24, 35, 0.14);
}

.sw-modal-close:active {
  transform: scale(0.95);
}

.sw-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.sw-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sw-choice-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sw-choice-btn {
  appearance: none;
  min-height: 52px;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.sw-choice-btn small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.sw-choice-btn.is-active {
  border-color: var(--coral);
  background: rgba(255, 90, 54, 0.12);
  box-shadow: 0 0 0 1px var(--coral);
}

.sw-paint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sw-paint-swatch {
  appearance: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 3px solid var(--surface);
  background: var(--glacier);
  box-shadow: 0 0 0 1.5px var(--line);
}

.sw-paint-swatch.is-active {
  box-shadow: 0 0 0 3px var(--ink);
  transform: scale(1.06);
}

.sw-fairness-note {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.sw-past-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.sw-past-item {
  appearance: none;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sw-past-item.is-active {
  border-color: var(--coral);
  background: rgba(255, 90, 54, 0.1);
}

.sw-past-date {
  font-size: 0.78rem;
  font-weight: 900;
}

.sw-past-sub {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

/* Result & Leaderboard */
.sw-result-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.sw-stat-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sw-stat-big {
  font-size: 1.95rem;
  font-weight: 900;
  line-height: 1.05;
  color: var(--ink);
}

.sw-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sw-badge-row:not(:has(> :not([hidden]))) {
  display: none;
}

.sw-badge-pb {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(234, 179, 40, 0.24);
  border: 1px solid var(--yellow);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--ink);
}

.sw-lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.sw-lb-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 700;
}

.sw-lb-row.is-you {
  border-color: var(--coral);
  background: rgba(255, 90, 54, 0.1);
}

.sw-lb-rank {
  font-weight: 900;
  color: var(--muted);
}

.sw-lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-lb-time {
  font-weight: 900;
  color: var(--ink);
}

.sw-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-text-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  user-select: text;
  -webkit-user-select: text;
}

.sw-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sw-share-wide {
  grid-column: 1 / -1;
}

.sw-status-line {
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(21, 128, 61, 0.12);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.sw-status-line:empty {
  display: none;
}

.sw-status-line.is-warn {
  background: rgba(216, 62, 28, 0.12);
  color: var(--coral);
}

.sw-copy-fallback {
  display: flex;
  width: 100%;
}

.sw-copy-fallback .sw-text-input {
  width: 100%;
  font-size: 0.8rem;
}

.sw-share-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.sw-share-preview-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.sw-share-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sw-share-preview-hint {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
}

.sw-share-preview-btn {
  flex-shrink: 0;
  min-height: 38px;
  padding: 6px 12px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sw-howto-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
}

/* Guide Band, Comments & Inner Pages */
.guide-band {
  padding-block: 36px 52px;
  background: var(--bg);
}

.home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.guide-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--surface-2);
}

.guide-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 4px;
}

.guide-title {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 900;
  line-height: 1.15;
}

.guide-lead {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}

.content-card,
.comments-section,
.doc-card,
.not-found-card,
.player-direct-card {
  min-width: 0;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.player-direct-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.player-direct-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.player-direct-pitch {
  margin: 0;
  color: var(--muted);
}

.prose h2 {
  font-weight: 800;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  margin: 1.5em 0 0.55em;
  padding-top: 0.85em;
  border-top: 1px solid var(--line);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose p {
  margin: 0 0 0.95em;
  max-width: 72ch;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
  max-width: 70ch;
}

.prose li + li {
  margin-top: 0.38em;
}

.faq-section {
  margin-top: 26px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 2px 16px;
}

.faq-item[open] {
  border-color: var(--ink);
  background: var(--surface);
}

.faq-q {
  padding: 13px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--coral);
}

.faq-item[open] .faq-q::after {
  content: "−";
}

.faq-a {
  padding-bottom: 12px;
  color: var(--muted);
}

.faq-a p {
  margin: 0;
}

/* Comments */
.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.comments-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.comments-pill {
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 700;
  font-size: 0.84rem;
}

.gf-comment-form {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  display: grid;
  gap: 12px;
}

.gf-reply-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--cobalt-soft);
  border: 1px solid rgba(58, 134, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.88rem;
}

[data-gf-comment-form][data-gf-replying] .gf-reply-bar {
  display: flex;
}

.gf-reply-cancel {
  border: 1px solid var(--ink);
  background: var(--surface);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.gf-form-grid {
  display: grid;
  gap: 10px;
}

.gf-field {
  display: grid;
  gap: 5px;
}

.gf-label {
  font-size: 0.88rem;
  font-weight: 700;
}

.gf-label small {
  font-weight: 500;
  color: var(--muted);
}

.gf-field input,
.gf-field textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.gf-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.gf-submit-btn {
  min-height: 44px;
  padding: 9px 20px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

.gf-comment-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.gf-comments-list {
  display: grid;
  gap: 12px;
}

.gf-comment {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface);
}

.gf-comment[data-gf-owner] {
  background: var(--crimson-soft);
  border-color: var(--crimson);
  border-left-width: 5px;
}

.gf-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.gf-c-author {
  font-weight: 800;
}

.gf-c-owner-badge {
  background: var(--coral);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}

.gf-c-to {
  color: var(--cobalt);
  font-weight: 700;
}

.gf-c-time {
  color: var(--muted);
  font-size: 0.82rem;
  margin-left: auto;
}

.gf-c-body {
  margin: 0 0 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.gf-c-reply-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.gf-c-replies {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.gf-c-replies:empty {
  display: none;
}

.gf-reply {
  background: var(--bg);
}

.gf-comments-empty,
.gf-comments-off {
  display: none;
  padding: 16px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

[data-gf-comments][data-gf-empty] .gf-comments-empty {
  display: block;
}

[data-gf-comments][data-gf-off] .gf-comments-off {
  display: block;
}

/* Inner Docs, 404 & Footer */
.doc-shell {
  max-width: 820px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.doc-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--surface-2);
}

.doc-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.doc-lead,
.doc-meta {
  margin: 0;
  color: var(--muted);
}

.not-found-card {
  text-align: center;
  padding: 42px 24px;
}

.not-found-code {
  display: inline-block;
  font-weight: 900;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--coral);
  margin-bottom: 8px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.btn-primary {
  background: var(--coral);
  color: var(--surface);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
}

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  border-top: 2px solid var(--ink);
  padding-block: 28px 20px;
}

.site-footer a {
  color: var(--surface);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-brand {
  max-width: 42ch;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}

.footer-note {
  margin: 8px 0 0;
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-link {
  font-weight: 600;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  font-size: 0.84rem;
}

/* Responsive Touch, Mobile Portrait (375x812) & Compact Landscape */
@media (hover: none), (max-width: 760px) {
  .sw-kbd-hint {
    display: none;
  }
}

@media (pointer: coarse), (max-width: 820px) {
  .sw-keycaps-row {
    display: none;
  }
  .sw-touch-hint-card {
    display: block;
  }
  .swervle-hero-stage[data-stage-mode="racing"] .sw-touch-layer,
  .swervle-hero-stage[data-stage-mode="countdown"] .sw-touch-layer {
    display: flex;
  }
  .sw-hotkey-pill {
    display: none;
  }
  .sw-mobile-quick {
    display: inline-flex;
  }
  .sw-touch-layer {
    bottom: calc(12px + var(--safe-bottom));
    padding: 0 calc(10px + var(--safe-right)) 0 calc(10px + var(--safe-left));
    gap: 8px;
  }
  .sw-touch-steer-pair,
  .sw-touch-action-pair {
    gap: 6px;
  }
  .sw-touch-pad {
    min-width: 68px;
    min-height: 60px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .sw-touch-pad.is-steer {
    min-width: 72px;
    min-height: 64px;
  }
  .sw-touch-pad.is-drift {
    min-width: 76px;
    min-height: 64px;
  }
  .sw-hud-bottom {
    bottom: calc(86px + var(--safe-bottom));
    padding-bottom: 0;
  }
}

@media (max-width: 767px) {
  .shell {
    width: calc(100% - 16px);
  }

  .sw-top-bar {
    grid-template-columns: auto 1fr auto;
    padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) 0 calc(10px + var(--safe-left));
    gap: 6px;
  }

  .sw-top-center {
    grid-column: 1 / -1;
    position: absolute;
    top: calc(60px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    width: max-content;
  }

  .sw-timer {
    font-size: 1.9rem;
    letter-spacing: 0.05em;
  }

  .sw-pill-btn {
    padding: 0 10px;
    font-size: 0.7rem;
  }

  .sw-pill-label-hide-sm {
    display: none;
  }

  .sw-showcase-wrap {
    align-items: flex-end;
    justify-content: center;
    padding: calc(60px + var(--safe-top)) 10px calc(62px + var(--safe-bottom)) 10px;
  }

  .sw-showcase-card {
    max-width: 440px;
    padding: 15px 15px 13px;
    gap: 9px;
  }

  .sw-card-title {
    font-size: 1.85rem;
  }

  .sw-meta-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding-block: 7px;
  }

  .sw-biome-chip {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .sw-card-links {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .sw-scroll-cue {
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(8px + var(--safe-bottom));
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.74rem;
  }

  .sw-btn-race {
    min-height: 48px;
    font-size: 0.98rem;
  }

  .sw-btn-outline,
  .sw-btn-dark {
    min-height: 44px;
    font-size: 0.82rem;
  }

  .sw-hud-bottom {
    padding: 0 calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
  }

  .sw-telemetry-box {
    padding: 8px 11px;
    width: 146px;
    height: 96px;
    min-height: 96px;
  }

  #swervle-result-modal {
    padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
  }

  #swervle-result-modal .sw-modal-card {
    max-height: calc(100dvh - 20px);
    padding: 14px 15px;
    gap: 8px;
  }

  #swervle-result-modal .sw-modal-head {
    padding-bottom: 8px;
    gap: 8px;
  }

  #swervle-result-modal .sw-modal-title {
    font-size: 1.26rem;
    line-height: 1.08;
  }

  #swervle-result-modal .sw-modal-sub {
    margin-top: 2px;
    font-size: 0.76rem;
  }

  #swervle-result-modal .sw-result-hero {
    grid-template-columns: 1.15fr 1fr;
    gap: 8px;
  }

  #swervle-result-modal .sw-stat-card {
    padding: 8px 10px;
    gap: 2px;
  }

  #swervle-result-modal .sw-stat-big {
    font-size: 1.5rem;
  }

  #swervle-result-modal .sw-input-row {
    gap: 6px;
  }

  #swervle-result-modal .sw-text-input,
  #swervle-result-modal #sw-callsign-save {
    min-height: 40px;
  }

  #swervle-result-modal .sw-section-label {
    margin-bottom: 4px;
  }

  #swervle-result-modal .sw-lb-list {
    max-height: 150px;
    gap: 4px;
  }

  #swervle-result-modal .sw-lb-row {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  #swervle-result-modal .sw-status-line {
    padding: 5px 10px;
    font-size: 0.76rem;
  }

  #swervle-result-modal .sw-share-grid {
    gap: 6px;
  }

  #swervle-result-modal .sw-share-grid .sw-btn-outline,
  #swervle-result-modal .sw-share-grid .sw-btn-dark {
    min-height: 40px;
    padding: 6px 8px;
    font-size: 0.76rem;
    letter-spacing: 0.03em;
  }

  #swervle-result-modal .sw-mid-actions {
    gap: 8px;
  }

  #swervle-result-modal .sw-mid-actions .sw-btn-race,
  #swervle-result-modal .sw-mid-actions .sw-btn-outline {
    min-height: 44px;
    font-size: 0.86rem;
  }

  .content-card,
  .comments-section,
  .doc-card,
  .not-found-card {
    padding: 18px 16px;
  }
}

@media (max-height: 430px) and (orientation: landscape) {
  .sw-top-bar {
    padding-top: calc(6px + var(--safe-top));
  }

  .sw-top-center {
    grid-column: 1 / -1;
    top: calc(10px + var(--safe-top));
  }

  .sw-timer {
    font-size: 1.65rem;
  }

  .sw-showcase-wrap {
    align-items: center;
    justify-content: flex-start;
    padding: calc(52px + var(--safe-top)) 12px calc(8px + var(--safe-bottom)) 12px;
  }

  .sw-showcase-card {
    max-width: 440px;
    padding: 11px 14px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 7px 12px;
    align-items: center;
  }

  .sw-card-title {
    font-size: 1.45rem;
  }

  .sw-meta-strip {
    padding-block: 4px;
    gap: 8px;
    grid-template-columns: auto 1fr;
  }

  .sw-biome-chip {
    display: none;
  }

  .sw-challenger-bar,
  .sw-card-links {
    grid-column: 1 / -1;
  }

  .sw-touch-hint-card,
  .sw-scroll-cue {
    display: none !important;
  }

  .sw-btn-race,
  .sw-btn-outline,
  .sw-btn-dark {
    min-height: 42px;
    font-size: 0.8rem;
  }

  .sw-countdown-num {
    font-size: 4.2rem;
  }

  .sw-hud-bottom {
    bottom: calc(76px + var(--safe-bottom));
    padding-bottom: 0;
  }

  .sw-telemetry-box {
    padding: 6px 9px;
    transform: scale(0.84);
    transform-origin: bottom left;
  }

  .sw-hud-br {
    transform-origin: bottom right;
  }

  .sw-speed-val {
    font-size: 1.65rem;
  }

  .sw-touch-layer {
    bottom: calc(8px + var(--safe-bottom));
  }

  .sw-touch-pad {
    min-width: 62px;
    min-height: 58px;
  }

  .sw-touch-pad.is-steer {
    min-width: 68px;
    min-height: 58px;
  }

  .sw-touch-pad.is-drift {
    min-width: 76px;
    min-height: 58px;
  }

  .sw-modal-card {
    max-width: 640px;
    padding: 13px 16px;
    gap: 9px;
  }
}
