:root {
  --paper: #030303;
  --panel: #090909;
  --panel-2: #111111;
  --ink: #f7f7f2;
  --muted: #8b8b86;
  --line: #232323;
  --red: #f0063f;
  --red-dark: #9e062c;
  --steel: #b8c2c8;
  --teal: #00a9a5;
  --gold: #c7a34b;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.58);
  --header-height: 66px;
  --page-gutter: clamp(14px, 4vw, 68px);
  --section-y: clamp(42px, 7vw, 74px);
  --section-y-compact: clamp(30px, 5vw, 46px);
  --panel-pad: clamp(16px, 4vw, 28px);
  --layout-gap: clamp(14px, 3vw, 24px);
  --tap-size: 44px;
  --visible-vw: 100vw;
  --visible-vh: 100vh;
  --safe-vw: calc(100vw - 1px);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(240, 6, 63, 0.09), transparent 22%, transparent 78%, rgba(0, 169, 165, 0.06)),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

img,
video {
  display: block;
  height: auto;
  max-width: 100%;
}

picture {
  display: block;
  max-width: 100%;
}

picture > img {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: var(--layout-gap);
  min-height: var(--header-height);
  padding: 0 var(--page-gutter);
  border-bottom: 1px solid rgba(240, 6, 63, 0.36);
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header > * {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-orb {
  --orb-size: 86px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--orb-size);
  height: var(--orb-size);
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 60%, rgba(255, 255, 255, 0.84) 72%, rgba(255, 255, 255, 0) 100%);
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.45));
  overflow: hidden;
}

.logo-orb img {
  width: 142%;
  height: 142%;
  object-fit: contain;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(circle, #000 0 58%, rgba(0, 0, 0, 0.74) 72%, transparent 100%);
  mask-image: radial-gradient(circle, #000 0 58%, rgba(0, 0, 0, 0.74) 72%, transparent 100%);
}

.logo-home-link,
.page-logo-link {
  color: inherit;
  text-decoration: none;
}

.logo-home-link:hover,
.page-logo-link:hover {
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 18px rgba(201, 168, 90, 0.28));
}

.page-logo-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.brand-logo-orb {
  --orb-size: 52px;
  background: radial-gradient(circle, #fff 0 66%, rgba(255, 255, 255, 0.92) 78%, rgba(255, 255, 255, 0) 100%);
  filter: none;
}

.logo-banner {
  position: relative;
  width: min(380px, 100%);
  min-height: 92px;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 13%, #fff 87%, rgba(255, 255, 255, 0)),
    #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.logo-banner::before,
.logo-banner::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.18), transparent);
  transform: translateY(-50%);
}

.logo-banner::before {
  left: 0;
}

.logo-banner::after {
  right: 0;
}

.logo-banner img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(230px, 66%);
  height: 92px;
  margin: 0 auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  transform: scale(1.18);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a,
.account-chip,
.text-button,
.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  min-height: var(--tap-size);
  border-radius: 2px;
}

.nav-links a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.nav-links a.active,
.nav-links a:hover {
  color: #fff;
  background: rgba(240, 6, 63, 0.18);
}

.nav-admin-separator {
  flex: 0 0 1px;
  align-self: stretch;
  min-height: 22px;
  margin: 0 8px;
  background: var(--line);
}

.admin-nav-link {
  color: var(--gold) !important;
  border: 1px solid rgba(201, 168, 90, 0.22);
  background: rgba(201, 168, 90, 0.08);
}

.admin-only {
  display: none !important;
}

body.is-admin .admin-only {
  display: inline-flex !important;
}

.account-area {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-width: 0;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 220px;
  padding: 0 12px 0 8px;
  overflow: hidden;
  color: var(--steel);
  font-size: 0.76rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  background: #0d0d0d;
  border: 1px solid var(--line);
}

.account-profile-link {
  cursor: pointer;
}

.account-profile-link:hover,
.account-profile-link:focus-visible {
  border-color: rgba(201, 168, 90, 0.48);
  outline: none;
  background: rgba(201, 168, 90, 0.1);
  box-shadow: 0 0 0 3px rgba(201, 168, 90, 0.14);
}

.account-chip-text {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.account-chip-action {
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0;
}

.account-chip-role {
  flex: 0 0 auto;
  color: var(--gold);
}

.account-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

body.is-ghost .account-chip {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.58);
  background: rgba(240, 6, 63, 0.16);
}

body.is-ghost .account-chip-role {
  color: #fff;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.primary-button {
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 0 1px rgba(240, 6, 63, 0.2), 0 16px 34px rgba(240, 6, 63, 0.24);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.text-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  color: #fff;
  background: #080808;
  border: 1px solid #333;
}

.secondary-button:hover {
  border-color: var(--red);
}

.compact-action-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.68rem;
}

.danger-button {
  color: #fff;
  background: var(--red-dark);
}

.text-button {
  color: var(--red);
  background: transparent;
}

.icon-button {
  min-width: var(--tap-size);
  padding: 0 10px;
  color: #fff;
  background: #0b0b0b;
  border: 1px solid #2b2b2b;
}

.page {
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
}

#app:focus {
  outline: none;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 120px clamp(18px, 6vw, 82px) 58px;
  color: #fff;
  background: #000;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.24)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 58%),
    linear-gradient(120deg, transparent 52%, rgba(240, 6, 63, 0.16) 52%, rgba(240, 6, 63, 0.04) 64%, transparent 64%);
  pointer-events: none;
}

.fade-slideshow {
  position: relative;
  overflow: hidden;
  background: #050505;
  isolation: isolate;
}

.fade-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.fade-slide.active {
  z-index: 1;
  opacity: 1;
}

.fade-slide img,
.fade-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fade {
  position: absolute;
  inset: 0;
  opacity: 0.78;
}

.hero-fade img,
.hero-fade video {
  filter: saturate(1.12) contrast(1.18) brightness(0.78);
}

.feature-fade,
.about-media,
.wide-fade {
  min-height: clamp(320px, 48vw, 620px);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.feature-fade,
.about-media {
  aspect-ratio: 4 / 3;
}

.wide-fade {
  min-height: clamp(300px, 44vw, 560px);
  aspect-ratio: 16 / 7;
}

.auth-fade {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
}

.feature-fade img,
.feature-fade video,
.about-media img,
.about-media video,
.wide-fade img,
.wide-fade video,
.auth-fade img,
.auth-fade video {
  filter: saturate(1.08) contrast(1.12) brightness(0.86);
}

@media (prefers-reduced-motion: reduce) {
  .fade-slide {
    transition: none;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.phone-home-logo,
.phone-home-passkey-form {
  display: none;
}

.brand-ribbon-section {
  padding: 18px var(--page-gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid #202020;
  background:
    linear-gradient(90deg, rgba(240, 6, 63, 0.08), transparent 32%, transparent 68%, rgba(0, 169, 165, 0.06)),
    #050505;
}

.brand-ribbon-section .section-inner {
  display: flex;
  justify-content: center;
}

.brand-ribbon-banner {
  width: min(620px, 100%);
  min-height: 82px;
  margin-top: 0;
  opacity: 0.96;
}

.brand-ribbon-banner img {
  height: 82px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--red);
}

.hero h1,
.section h2,
.panel h2,
.auth-media h2,
.empty-state h2 {
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-weight: 950;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 6.9rem);
  line-height: 0.84;
}

.hero h1::after {
  content: ".";
  color: var(--red);
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.04rem;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.section {
  padding: var(--section-y) var(--page-gutter);
}

.section.compact {
  padding-top: var(--section-y-compact);
}

.section-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(24px, 5vw, 62px);
  align-items: start;
}

.section h2,
.panel h2 {
  margin: 0 0 14px;
  font-size: clamp(2.5rem, 5vw, 3.35rem);
  line-height: 0.94;
}

.panel h2,
.upload-panel h2 {
  font-size: clamp(2.15rem, 4vw, 2.7rem);
}

.section p,
.panel p {
  color: var(--muted);
}

.section-logo-orb {
  --orb-size: clamp(76px, 11vw, 112px);
  margin: 0 0 18px;
}

.page-logo-banner {
  width: min(430px, 100%);
}

.page-home-logo {
  display: grid;
  place-items: center;
  width: 20vw;
  height: 20vw;
  overflow: hidden;
  margin: clamp(18px, 3vw, 32px) auto 0;
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.page-home-logo img {
  width: 142%;
  height: 142%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.about-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #050505;
  box-shadow: var(--shadow);
}

.about-media img,
.about-media video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.12) brightness(0.84);
}

.studio-teaser {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid #202020;
  background:
    linear-gradient(120deg, rgba(240, 6, 63, 0.13), transparent 42%),
    rgba(7, 7, 7, 0.78);
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.studio-stage {
  min-width: 0;
}

.studio-stage > p:not(.eyebrow) {
  max-width: 720px;
}

.studio-preview {
  position: relative;
  min-height: clamp(380px, 48vw, 560px);
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid #202020;
  background: #050505;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.studio-preview.mini {
  min-height: clamp(280px, 34vw, 320px);
  margin-top: 0;
}

.studio-vehicle-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter:
    brightness(var(--studio-brightness, 100%))
    contrast(var(--studio-contrast, 110%))
    saturate(var(--studio-saturation, 115%))
    sepia(var(--studio-sepia, 0%))
    hue-rotate(var(--studio-hue, 0deg));
  transform: scale(1.015);
}

.studio-effects-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 72% 68%, rgba(240, 6, 63, calc(var(--studio-glow, 0.4) * 0.36)), transparent 26%),
    radial-gradient(circle at 20% 22%, rgba(0, 169, 165, calc(var(--studio-glow, 0.4) * 0.22)), transparent 22%),
    linear-gradient(180deg, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.74)), transparent 34%, transparent 62%, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.82))),
    linear-gradient(90deg, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.66)), transparent 28%, transparent 72%, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.66)));
  pointer-events: none;
}

.studio-grain-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.studio-preview[data-grain="true"] .studio-grain-layer {
  opacity: 0.22;
}

.studio-empty-photo {
  min-height: inherit;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}

.studio-empty-photo h2 {
  margin: 0;
}

.studio-source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.studio-source-button {
  display: grid;
  gap: 7px;
  padding: 7px;
  color: #fff;
  border: 1px solid #262626;
  background: #0a0a0a;
  text-align: left;
}

.studio-source-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.1) brightness(0.82);
}

.studio-source-button span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.studio-source-button.active,
.studio-source-button:hover {
  border-color: var(--red);
  background: rgba(240, 6, 63, 0.14);
}

.studio-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.14) brightness(0.48);
}

.studio-preview-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 62%),
    linear-gradient(110deg, rgba(0, 0, 0, 0.78), transparent 58%),
    radial-gradient(circle at 72% 72%, rgba(240, 6, 63, 0.28), transparent 25%);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 62%),
    linear-gradient(110deg, rgba(0, 0, 0, 0.78), transparent 58%),
    radial-gradient(circle at 72% 72%, color-mix(in srgb, var(--paint), transparent 52%), transparent 25%);
}

.studio-preview[data-road="rally"] .studio-preview-shade {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%),
    radial-gradient(circle at 24% 78%, rgba(180, 122, 54, 0.25), transparent 24%),
    radial-gradient(circle at 74% 70%, rgba(240, 6, 63, 0.24), transparent 25%);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%),
    radial-gradient(circle at 24% 78%, rgba(180, 122, 54, 0.25), transparent 24%),
    radial-gradient(circle at 74% 70%, color-mix(in srgb, var(--paint), transparent 54%), transparent 25%);
}

.studio-preview[data-road="coastal"] .studio-preview-shade {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent 62%),
    radial-gradient(circle at 68% 66%, rgba(0, 169, 165, 0.2), transparent 26%),
    radial-gradient(circle at 76% 74%, rgba(240, 6, 63, 0.22), transparent 25%);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent 62%),
    radial-gradient(circle at 68% 66%, rgba(0, 169, 165, 0.2), transparent 26%),
    radial-gradient(circle at 76% 74%, color-mix(in srgb, var(--paint), transparent 58%), transparent 25%);
}

.studio-car {
  position: absolute;
  left: 11%;
  right: 9%;
  bottom: 16%;
  z-index: 2;
  height: clamp(132px, 16vw, 190px);
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.72));
}

.studio-preview.mini .studio-car {
  left: 9%;
  right: 8%;
  bottom: 18%;
  height: 126px;
}

.studio-car-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  height: 84px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 24%),
    linear-gradient(90deg, #101010, var(--paint) 36%, #070707 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 24%),
    linear-gradient(90deg, #101010, color-mix(in srgb, var(--paint), #111 22%) 36%, #070707 100%);
  clip-path: polygon(0 80%, 8% 46%, 24% 34%, 38% 10%, 64% 12%, 78% 36%, 94% 45%, 100% 76%, 94% 100%, 7% 100%);
}

.studio-car-cabin {
  position: absolute;
  left: 33%;
  bottom: 103px;
  width: 30%;
  height: 52px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(5, 12, 16, 0.92) 42%);
  clip-path: polygon(7% 100%, 32% 10%, 74% 12%, 100% 100%);
}

.studio-wheel {
  position: absolute;
  bottom: 13px;
  width: 82px;
  height: 82px;
  border: 13px solid #070707;
  border-radius: 50%;
  background:
    radial-gradient(circle, #d5d8da 0 10%, #111 11% 22%, transparent 23%),
    conic-gradient(from 10deg, #282828, #777, #111, #999, #222, #686868, #282828);
  box-shadow: inset 0 0 0 4px #1c1c1c, 0 0 18px rgba(255, 255, 255, 0.12);
}

.studio-wheel-front {
  right: 14%;
}

.studio-wheel-rear {
  left: 14%;
}

.studio-wing {
  position: absolute;
  right: 2%;
  bottom: 120px;
  width: 96px;
  height: 18px;
  border-top: 5px solid var(--paint);
  border-top: 5px solid color-mix(in srgb, var(--paint), #fff 16%);
  transform: skewX(-18deg);
}

.studio-wing.soft {
  opacity: 0.35;
}

.studio-car.has-neon::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 31px;
  height: 5px;
  background: var(--paint);
  box-shadow: 0 0 22px var(--paint), 0 0 56px var(--paint);
}

.studio-readout {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.studio-readout strong {
  color: #fff;
}

.studio-controls {
  position: sticky;
  top: 88px;
}

.control-group {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.control-label {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.segmented-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segment-button {
  min-height: var(--tap-size);
  padding: 9px 10px;
  color: #fff;
  border: 1px solid #262626;
  background: #0a0a0a;
  font-size: 0.74rem;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.segment-button span {
  color: var(--muted);
  font-size: 0.68rem;
}

.segment-button.active,
.segment-button:hover {
  border-color: var(--red);
  background: rgba(240, 6, 63, 0.16);
}

.ai-enhance-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 13px 14px;
  color: #fff;
  border: 1px solid rgba(240, 6, 63, 0.54);
  background:
    linear-gradient(120deg, rgba(240, 6, 63, 0.26), rgba(0, 169, 165, 0.11)),
    #090909;
  font-size: 0.82rem;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.ai-enhance-button span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
}

.ai-enhance-button.active,
.ai-enhance-button:hover {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(240, 6, 63, 0.32), 0 18px 34px rgba(240, 6, 63, 0.16);
}

.paint-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.paint-swatch {
  min-height: 54px;
  position: relative;
  overflow: hidden;
  border: 1px solid #262626;
  background: var(--swatch);
}

.paint-swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 36%, rgba(0, 0, 0, 0.42));
}

.paint-swatch span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 950;
  text-shadow: 0 1px 8px #000;
  text-transform: uppercase;
}

.paint-swatch.active,
.paint-swatch:hover {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--red);
}

.two-controls {
  grid-template-columns: 1fr 1fr;
}

.studio-slider-grid {
  grid-template-columns: 1fr 1fr;
}

input[type="range"] {
  accent-color: var(--red);
  padding: 0;
}

.compact-stats {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.saved-builds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 12px;
}

.saved-build {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #202020;
  background: #0a0a0a;
}

.saved-build strong,
.saved-build span {
  display: block;
}

.saved-build span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.saved-chip {
  width: 34px;
  height: 34px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.8), transparent 18%),
    linear-gradient(135deg, var(--red), var(--teal));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 20px rgba(240, 6, 63, 0.38);
  box-shadow: 0 0 calc(12px + (28px * var(--chip-glow, 0.5))) rgba(240, 6, 63, 0.48);
}

.media-grid,
.feed-grid {
  column-count: 4;
  column-gap: 18px;
}

.media-tile,
.post-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid #202020;
  border-radius: 2px;
  background: #070707;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  break-inside: avoid;
}

.media-tile {
  position: relative;
}

.media-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.media-tile img,
.media-tile video,
.post-card-media > picture,
.post-card-media > img,
.post-card-media > video {
  width: 100%;
}

.media-tile img,
.media-tile video,
.post-card-media > picture > img,
.post-card-media > img,
.post-card-media > video {
  object-fit: cover;
  filter: saturate(1.08) contrast(1.12) brightness(0.86);
}

.post-card-media {
  display: block;
  width: 100%;
  padding: 0;
  background: #030303;
  cursor: zoom-in;
}

.post-card-media:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.album-nav-button {
  position: absolute;
  top: 50%;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    border-color 0.16s ease;
}

.album-nav-prev {
  left: 12px;
}

.album-nav-next {
  right: 12px;
}

.post-card-media:hover .album-nav-button,
.post-card-media:focus-within .album-nav-button,
.post-card-media > picture:hover ~ .album-nav-button,
.post-card-media > img:hover ~ .album-nav-button,
.post-card-media > video:hover ~ .album-nav-button,
.post-card-media.album-hover .album-nav-button,
.car-detail-media:hover .album-nav-button,
.car-detail-media:focus-within .album-nav-button,
.car-detail-media.album-hover .album-nav-button,
.garage-modal-media:hover .album-nav-button,
.garage-modal-media:focus-within .album-nav-button,
.garage-modal-media.album-hover .album-nav-button {
  opacity: 1;
  pointer-events: auto;
}

.album-nav-button:hover,
.album-nav-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.72);
  outline: none;
  transform: translateY(-50%) scale(1.04);
}

.album-count-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 7;
  padding: 5px 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.64);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.post-body {
  padding: 15px;
}

.post-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 0;
}

.post-card-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #050606;
  border-radius: 999px;
  background: var(--collector-gold);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.post-meta,
.comment-meta,
.muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.post-description,
.comment p,
.muted,
.tool-row span,
td {
  overflow-wrap: anywhere;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #fff;
  font-weight: 950;
  text-transform: uppercase;
}

.post-description {
  margin: 0 0 12px;
  color: #d7d7d1;
  white-space: pre-wrap;
}

.photo-caption {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  color: #d7d7d1;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.photo-caption.compact {
  margin: 0;
  font-size: 0.78rem;
}

.photo-title-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.photo-title-line span,
.photo-caption > span:not(.photo-title-line) {
  color: var(--muted);
}

.post-actions,
.garage-modal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.post-actions {
  justify-content: space-between;
}

.copy-link-button {
  white-space: nowrap;
}

.post-card-engagement {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

.post-stats {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.feed-card-caption-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.feed-card-action-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(246, 239, 226, 0.82);
}

.feed-icon-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 950;
}

.feed-icon-stat .garage-vector-icon {
  width: 17px;
  height: 17px;
}

.garage-heart-like-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.34), transparent 18%),
    linear-gradient(135deg, #ff174d, #b1002e);
  box-shadow:
    0 12px 28px rgba(240, 6, 63, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.garage-heart-like-button:hover,
.garage-heart-like-button:focus-visible,
.garage-heart-like-button.liked {
  filter: saturate(1.16) brightness(1.08);
  box-shadow:
    0 16px 34px rgba(240, 6, 63, 0.42),
    0 0 0 3px rgba(240, 6, 63, 0.16);
  transform: translateY(-1px) scale(1.04);
}

.garage-heart-like-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.like-button.liked {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.7);
  background: var(--red);
  box-shadow: 0 0 0 1px rgba(240, 6, 63, 0.16), 0 14px 28px rgba(240, 6, 63, 0.2);
}

.floating-heart {
  position: fixed;
  z-index: 999;
  translate: -50% -50%;
  pointer-events: none;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 5px 8px;
  background: linear-gradient(135deg, #ff174d, #9f0026);
  box-shadow: 0 14px 32px rgba(240, 6, 63, 0.34);
  font-size: 0.78rem;
  font-weight: 950;
  animation: floatingHeartPop 760ms ease forwards;
}

@keyframes floatingHeartPop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.84);
  }
  22% {
    opacity: 1;
    transform: translateY(-4px) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translateY(-42px) scale(0.94);
  }
}

.comments {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #202020;
}

.comment {
  display: grid;
  gap: 2px;
}

.comment p {
  margin: 0;
  color: #d7d7d1;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.comment-form input {
  min-width: 0;
}

.garage-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 34px);
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.78);
}

.garage-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid #292929;
  border-radius: 2px;
  background: #070707;
  box-shadow: var(--shadow);
}

.garage-modal:focus {
  outline: none;
}

.garage-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.garage-modal-media {
  display: grid;
  place-items: center;
  min-height: 0;
  background: #010101;
}

.garage-modal-media img,
.garage-modal-media picture,
.garage-modal-media video {
  width: 100%;
}

.garage-modal-media img,
.garage-modal-media picture > img,
.garage-modal-media video {
  height: min(72vh, 720px);
  object-fit: contain;
  background: #010101;
}

.garage-modal-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: calc(100vh - 48px);
  padding: clamp(18px, 3vw, 28px);
  overflow-y: auto;
}

.garage-modal-copy {
  min-width: 0;
  padding-right: clamp(58px, 9vw, 82px);
}

.garage-modal-heading {
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: space-between;
  min-width: 0;
  margin-bottom: 10px;
}

.garage-modal-heading span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.garage-modal-panel h2 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.02;
  text-transform: uppercase;
}

.garage-modal-comments h3 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.car-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: start;
}

.car-detail-media {
  display: grid;
  place-items: center;
  min-height: clamp(320px, 58vw, 720px);
  overflow: hidden;
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius);
  background: #010101;
}

.car-detail-media img,
.car-detail-media picture,
.car-detail-media video {
  width: 100%;
}

.car-detail-media img,
.car-detail-media picture > img,
.car-detail-media video {
  max-height: min(78vh, 760px);
  object-fit: contain;
}

.car-detail-panel,
.car-detail-sections {
  display: grid;
  gap: 14px;
}

.car-detail-panel {
  position: sticky;
  top: 88px;
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(201, 168, 90, 0.08), transparent 34%),
    #090a0b;
}

.car-detail-panel h1 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: clamp(1.65rem, 4.6vw, 3.4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.car-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.car-detail-topbar .secondary-button {
  min-height: 36px;
}

.car-detail-topbar .garage-vector-icon {
  width: 17px;
  height: 17px;
}

.car-detail-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

.comment-composer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  background: rgba(0, 0, 0, 0.72);
}

.comment-composer-modal {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(201, 168, 90, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(201, 168, 90, 0.1), transparent 36%),
    #090a0b;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.56);
}

.garage-photo-first {
  scroll-snap-type: y mandatory;
}

.car-page-comments {
  display: grid;
  gap: 12px;
}

.garage-empty-comments {
  margin: 0;
  color: var(--muted);
}

.fade-slide .photo-caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 3;
  max-width: min(440px, calc(100% - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 5, 5, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.fade-slide:hover .photo-caption,
.fade-slide:focus .photo-caption,
.fade-slide:focus-within .photo-caption {
  opacity: 1;
  transform: translateY(0);
}

.panel,
.upload-panel {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #202020;
  border-radius: 2px;
  background: rgba(7, 7, 7, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(320px, 1.08fr) minmax(300px, 0.92fr);
  width: min(1060px, 100%);
  min-height: 620px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #202020;
  border-radius: 2px;
  background: #050505;
  box-shadow: var(--shadow);
}

.auth-media {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 620px;
  padding: 34px;
  overflow: hidden;
  background: #0a0a0a;
}

.auth-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 58%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), transparent);
  pointer-events: none;
}

.auth-media img,
.auth-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.16) contrast(1.2) brightness(0.7);
}

.auth-media > div {
  position: relative;
  z-index: 1;
}

.auth-media > .auth-fade {
  position: absolute;
  z-index: 0;
}

.auth-logo-orb {
  --orb-size: clamp(86px, 13vw, 132px);
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1;
}

.auth-media h2 {
  max-width: 420px;
  margin: 0;
  font-size: 4rem;
  line-height: 0.9;
}

.auth-media p:not(.eyebrow) {
  max-width: 390px;
  color: rgba(255, 255, 255, 0.72);
}

.auth-forms {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(22px, 5vw, 46px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 2px;
  border-bottom: 1px solid #242424;
}

.tab-button {
  min-height: var(--tap-size);
  border-radius: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  background: transparent;
}

.tab-button.active {
  color: var(--red);
  border-bottom: 2px solid var(--red);
}

.form-grid {
  display: grid;
  gap: 14px;
}

.auth-login-links {
  display: grid;
  gap: 9px;
  margin-top: -2px;
}

.auth-login-link {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 11px 14px 11px 18px;
  color: rgba(246, 239, 226, 0.78);
  text-decoration: none;
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, rgba(240, 6, 63, 0.16), rgba(201, 168, 90, 0.06) 42%, rgba(0, 0, 0, 0.14)),
    rgba(255, 255, 255, 0.018);
}

.auth-login-link::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--gold));
}

.auth-login-link span,
.auth-login-link strong {
  min-width: 0;
}

.auth-login-link span {
  font-size: 0.78rem;
  font-weight: 850;
}

.auth-login-link strong {
  color: var(--collector-cream);
  font-size: 0.88rem;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-login-link:hover,
.auth-login-link:focus-visible {
  color: #fff;
  border-color: rgba(246, 239, 226, 0.48);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(201, 168, 90, 0.12),
    0 14px 34px rgba(240, 6, 63, 0.12);
  transform: translateY(-1px);
}

.auth-magic-link-form {
  margin-top: 4px;
  padding-top: 4px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: rgba(246, 239, 226, 0.58);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 90, 0.35));
}

.auth-divider::after {
  background: linear-gradient(90deg, rgba(201, 168, 90, 0.35), transparent);
}

.auth-inline-link {
  justify-self: center;
  color: rgba(246, 239, 226, 0.78);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 90, 0.58);
  text-underline-offset: 4px;
}

.auth-stepper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 2px;
}

.auth-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid #242424;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.auth-step b {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #fff;
  border: 1px solid #333;
  background: #080808;
  font-size: 0.74rem;
}

.auth-step.active {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.58);
  background: rgba(240, 6, 63, 0.12);
}

.auth-step.active b,
.auth-step.complete b {
  border-color: rgba(240, 6, 63, 0.72);
  background: var(--red);
}

.auth-step.complete {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(240, 6, 63, 0.34);
}

.auth-help-card {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid #262626;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-help-card strong {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.auth-help-card.success {
  border-color: rgba(201, 168, 90, 0.42);
  background: rgba(201, 168, 90, 0.08);
}

.auth-help-card.magic {
  border-color: rgba(240, 6, 63, 0.28);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.1), rgba(201, 168, 90, 0.055)),
    rgba(255, 255, 255, 0.03);
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: #f0f0ea;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #fff;
  border: 1px solid #252525;
  border-radius: 2px;
  background: #0c0c0c;
  font-size: 1rem;
  outline: 0;
}

input[type="file"] {
  padding: 8px;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(240, 6, 63, 0.17);
}

.field-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  text-transform: none;
}

.reset-cooldown-message,
.magic-login-cooldown-message {
  margin: -4px 0 0;
  color: rgba(246, 239, 226, 0.72);
}

.checkbox-label {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--red);
}

.upload-panel {
  margin-bottom: 24px;
}

.upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.garage-post-dropdown {
  display: grid;
  gap: 12px;
}

.garage-post-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(201, 168, 90, 0.32);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.16), rgba(201, 168, 90, 0.05)),
    rgba(0, 0, 0, 0.34);
  cursor: pointer;
  list-style: none;
}

.garage-post-dropdown summary::-webkit-details-marker {
  display: none;
}

.garage-post-dropdown summary strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-post-dropdown summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.garage-post-dropdown summary:hover,
.garage-post-dropdown summary:focus-visible {
  border-color: rgba(240, 6, 63, 0.68);
  outline: none;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.26), rgba(201, 168, 90, 0.08)),
    rgba(0, 0, 0, 0.42);
}

.garage-post-dropdown-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(240, 6, 63, 0.36);
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
}

.garage-post-dropdown[open] .garage-post-dropdown-icon {
  transform: rotate(45deg);
}

.garage-post-dropdown-body {
  display: grid;
  gap: 14px;
  padding-top: 12px;
}

#uploadForm.is-uploading {
  opacity: 0.72;
  pointer-events: none;
}

#uploadForm.is-uploading button[type="submit"] {
  cursor: wait;
}

.garage-media-picker {
  display: grid;
}

.garage-media-dropzone {
  position: relative;
  display: grid;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(201, 168, 90, 0.36);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 20%, rgba(240, 6, 63, 0.16), transparent 44%),
    linear-gradient(135deg, rgba(240, 6, 63, 0.14), rgba(201, 168, 90, 0.08)),
    rgba(0, 0, 0, 0.34);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(246, 239, 226, 0.04);
}

.garage-media-dropzone:hover,
.garage-media-dropzone:focus-visible,
.garage-media-dropzone:focus-within {
  outline: 0;
  border-color: rgba(246, 239, 226, 0.72);
  background:
    radial-gradient(circle at 50% 20%, rgba(240, 6, 63, 0.24), transparent 48%),
    linear-gradient(135deg, rgba(240, 6, 63, 0.22), rgba(201, 168, 90, 0.12)),
    rgba(0, 0, 0, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(246, 239, 226, 0.08),
    0 0 0 3px rgba(201, 168, 90, 0.14);
}

.garage-media-file-input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.garage-media-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(190px, 34vh, 320px);
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(246, 239, 226, 0.04), rgba(240, 6, 63, 0.08)),
    rgba(0, 0, 0, 0.2);
}

.garage-media-preview.has-preview {
  display: grid;
}

.garage-media-preview img,
.garage-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.garage-media-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: min(24rem, 90%);
  padding: 24px;
  color: var(--collector-cream);
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.garage-media-placeholder-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(201, 168, 90, 0.42);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.28);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.garage-media-placeholder span:not(.garage-media-placeholder-icon) {
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 950;
}

.garage-media-placeholder small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.3;
  text-transform: none;
}

.garage-media-preview.is-video::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.28));
}

.garage-media-preview.is-video::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-block: 7px solid transparent;
  border-inline-start: 11px solid #fff;
  transform: translate(-38%, -50%);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.65));
}

.garage-media-preview-count {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 3;
  min-width: 20px;
  padding: 1px 5px;
  color: #fff;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.74);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.4;
  text-align: center;
}

.garage-upload-summary {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.garage-upload-summary:empty,
.garage-upload-summary[hidden] {
  display: none;
}

.garage-upload-summary[data-status="warning"] {
  color: #f6b04d;
}

.garage-visibility-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.garage-visibility-label {
  color: #f0f0ea;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-visibility-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  color: var(--collector-cream);
  border: 1px solid rgba(201, 168, 90, 0.3);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.13), rgba(201, 168, 90, 0.05)),
    rgba(0, 0, 0, 0.34);
  text-align: left;
}

.garage-visibility-button strong,
.garage-visibility-option strong {
  display: block;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-visibility-button small,
.garage-visibility-option small {
  display: block;
  margin-top: 3px;
  color: rgba(246, 239, 226, 0.68);
  font-size: 0.72rem;
  font-weight: 850;
}

.garage-visibility-chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: var(--collector-gold);
  border: 1px solid rgba(201, 168, 90, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 0.7rem;
  transition: transform 0.16s ease;
}

.garage-visibility-button:hover,
.garage-visibility-button:focus-visible,
.garage-visibility-field.is-open .garage-visibility-button {
  border-color: rgba(240, 6, 63, 0.66);
  outline: none;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.24), rgba(201, 168, 90, 0.08)),
    rgba(8, 8, 9, 0.9);
  box-shadow: 0 0 0 3px rgba(240, 6, 63, 0.12);
}

.garage-visibility-field.is-open .garage-visibility-chevron {
  transform: rotate(180deg);
}

.garage-visibility-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 25;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(240, 6, 63, 0.12), rgba(201, 168, 90, 0.05)),
    rgba(7, 7, 8, 0.98);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top center;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.garage-visibility-field.is-open .garage-visibility-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.garage-visibility-option {
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.garage-visibility-option:hover,
.garage-visibility-option:focus-visible {
  border-color: rgba(201, 168, 90, 0.28);
  outline: none;
  background: rgba(201, 168, 90, 0.1);
}

.garage-visibility-option[aria-selected="true"] {
  border-color: rgba(240, 6, 63, 0.44);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.5), rgba(159, 0, 38, 0.25)),
    rgba(240, 6, 63, 0.18);
}

.garage-upload-actions {
  display: grid;
  gap: 10px;
}

.garage-upload-actions .primary-button,
.garage-upload-actions .secondary-button {
  width: 100%;
}

.meter {
  min-width: 122px;
  padding: 7px 10px;
  border-radius: 2px;
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 950;
  background: var(--red);
}

.empty-state {
  padding: 58px 24px;
  text-align: center;
  border: 1px dashed #303030;
  border-radius: 2px;
  background: rgba(7, 7, 7, 0.76);
}

.empty-state h2 {
  margin: 0 0 10px;
  font-size: 3.4rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  align-items: start;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-heading h2 {
  margin: 0;
  font-size: 4rem;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.admin-summary span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #252525;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(720px, 100%);
  margin: 0 0 22px;
  border: 1px solid #242424;
  background: rgba(7, 7, 7, 0.72);
}

.admin-stack {
  display: grid;
  gap: 22px;
}

.member-access-panel {
  width: 100%;
  margin: 0;
}

.member-list {
  display: grid;
  gap: 14px;
}

.member-search {
  margin: 16px 0;
}

.member-card {
  overflow: hidden;
  border: 1px solid #202020;
  border-radius: 2px;
  background: #080808;
}

.member-card.is-self {
  border-color: rgba(240, 6, 63, 0.5);
  background: rgba(240, 6, 63, 0.07);
}

.member-dropdown {
  display: block;
}

.member-dropdown[open] {
  background: rgba(255, 255, 255, 0.018);
}

.member-form,
.member-fields {
  display: grid;
  gap: 14px;
}

.member-form {
  padding: 0 16px 16px;
  border-top: 1px solid #202020;
}

.member-card-header,
.member-status-row,
.member-actions,
.member-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.member-card-header {
  justify-content: space-between;
  min-height: 74px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.member-card-header::-webkit-details-marker {
  display: none;
}

.member-card-header:hover {
  background: rgba(240, 6, 63, 0.08);
}

.member-identity {
  flex: 1 1 min(16rem, 100%);
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-identity strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
}

.member-identity span,
.member-status-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.member-fields {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(150px, 0.5fr);
}

.member-status-row {
  flex-wrap: wrap;
  padding-top: 2px;
}

.summary-status {
  justify-content: center;
  flex: 1 1 9rem;
  margin-left: 0;
}

.pending-pass-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: max-content;
  padding-top: 0;
  color: var(--collector-cream);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.member-status-row .pending-pass-key span {
  color: var(--muted);
  font-size: 0.68rem;
}

.pending-pass-key code {
  display: inline-block;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  white-space: nowrap;
  word-break: keep-all;
}

.pending-pass-key button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  color: var(--collector-cream);
  font-size: 0.68rem;
  border-color: rgba(201, 168, 90, 0.34);
  background: rgba(201, 168, 90, 0.08);
}

.pending-pass-key button:hover {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.55);
  background: rgba(240, 6, 63, 0.13);
}

.pending-pass-key.unavailable button {
  color: var(--muted);
}

.member-actions {
  flex-wrap: wrap;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  border: 1px solid #2a2a2a;
  background: #0b0b0b;
}

.role-chip.admin {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.5);
  background: rgba(240, 6, 63, 0.14);
}

.manage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  border: 1px solid #303030;
  background: #101010;
}

.member-dropdown[open] .manage-chip {
  border-color: rgba(240, 6, 63, 0.72);
  background: rgba(240, 6, 63, 0.22);
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dev-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.dev-primary {
  min-height: 330px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(120deg, rgba(240, 6, 63, 0.18), transparent 48%),
    rgba(7, 7, 7, 0.92);
}

.phone-preview-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
}

.phone-preview-shell {
  width: min(390px, 100%);
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 90, 0.36);
  border-radius: 28px;
  background: #050606;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.phone-preview-bar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid rgba(201, 168, 90, 0.18);
  color: var(--collector-cream);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.phone-preview-iframe {
  display: block;
  width: 100%;
  height: min(844px, 78vh);
  border: 0;
  background: var(--paper);
}

.audit-panel {
  width: 100%;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(201, 168, 90, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.024);
}

.audit-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.audit-row strong {
  color: var(--collector-cream);
  text-transform: uppercase;
}

.audit-row span,
.audit-row time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.audit-row code {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px;
  color: rgba(246, 239, 226, 0.82);
  border: 1px solid rgba(201, 168, 90, 0.12);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.74rem;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid #202020;
  background: #0a0a0a;
}

.stat-card strong {
  color: #fff;
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: 2.1rem;
  line-height: 1;
}

.stat-card span,
.tool-row span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-list {
  display: grid;
  border-top: 1px solid #202020;
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #202020;
  color: #e9e9e4;
}

.tool-row span {
  min-width: 0;
}

.tool-row strong {
  color: #fff;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 560px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  text-align: left;
  border-bottom: 1px solid #202020;
  white-space: normal;
}

th {
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

td {
  color: #e9e9e4;
  font-size: 0.9rem;
}

.content-editor {
  display: grid;
  gap: 22px;
}

.content-manager {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
  gap: 22px;
  align-items: start;
}

.content-manager .panel {
  width: 100%;
  margin: 0;
}

.content-sidebar {
  position: sticky;
  top: 88px;
}

.content-sidebar-heading,
.content-detail-heading,
.content-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.content-detail-heading {
  margin-bottom: 18px;
}

.content-detail-heading > .action-row {
  justify-content: flex-end;
  width: auto;
  margin-top: 0;
}

.content-detail-heading > .action-row > * {
  flex: 0 1 auto;
}

.content-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  color: #fff;
  font-weight: 950;
  border: 1px solid rgba(240, 6, 63, 0.42);
  background: rgba(240, 6, 63, 0.12);
}

.content-tab-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
}

.content-tab-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 62px;
  padding: 12px;
  text-align: left;
  color: #fff;
  border: 1px solid #242424;
  border-radius: 2px;
  background: #080808;
}

.content-tab-button.active,
.content-tab-button:hover {
  border-color: rgba(240, 6, 63, 0.72);
  background: rgba(240, 6, 63, 0.13);
}

.content-tab-button span {
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.content-tab-button small,
.empty-asset-slot {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.new-page-form {
  padding-top: 20px;
  border-top: 1px solid #202020;
}

.page-meta-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.72fr) minmax(96px, 0.38fr);
  gap: 12px;
}

.full-span {
  grid-column: 1 / -1;
}

.empty-asset-slot {
  display: grid;
  min-height: 112px;
  place-items: center;
  padding: 18px;
  border: 1px dashed #303030;
  background: #080808;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.asset-item {
  overflow: hidden;
  border: 1px solid #202020;
  border-radius: 2px;
  background: #070707;
}

.asset-item img,
.asset-item picture,
.asset-item video {
  width: 100%;
}

.asset-item img,
.asset-item picture > img,
.asset-item video {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.12) brightness(0.86);
}

.asset-item footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
}

.content-visual-editor {
  overflow: hidden;
}

.content-live-form,
.content-live-preview {
  display: grid;
  gap: 16px;
}

.content-live-preview {
  padding: clamp(14px, 2.4vw, 24px);
  border: 1px solid rgba(201, 168, 90, 0.2);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 18% 0%, rgba(240, 6, 63, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(3, 4, 4, 0.94);
}

.content-live-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 168, 90, 0.14);
}

.content-live-topbar span {
  color: rgba(246, 239, 226, 0.68);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.content-live-hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr));
  gap: clamp(16px, 3vw, 28px);
  align-items: stretch;
  min-height: clamp(320px, 42vw, 560px);
  overflow: hidden;
  border: 1px solid rgba(201, 168, 90, 0.16);
  border-radius: var(--radius-sm);
  background: #030303;
}

.content-live-media-preview,
.content-live-media-placeholder {
  min-height: 260px;
  background: #050606;
}

.content-live-media-preview picture,
.content-live-media-preview img,
.content-live-media-preview video {
  width: 100%;
  height: 100%;
}

.content-live-media-preview picture {
  display: contents;
}

.content-live-media-preview img,
.content-live-media-preview video {
  object-fit: cover;
  filter: saturate(1.08) contrast(1.1) brightness(0.72);
}

.content-live-media-placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(246, 239, 226, 0.52);
  border-right: 1px dashed rgba(201, 168, 90, 0.22);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.content-live-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
}

.host-editable-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.host-editable-field > span,
.host-editable-field > small {
  color: rgba(246, 239, 226, 0.68);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.host-editable-field > small {
  color: rgba(246, 239, 226, 0.48);
  font-size: 0.68rem;
}

.host-editable-field input,
.host-editable-field textarea {
  width: 100%;
  color: #fff8ed;
  border-color: rgba(201, 168, 90, 0.34);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.08), rgba(201, 168, 90, 0.035)),
    rgba(0, 0, 0, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.host-editable-field input:focus,
.host-editable-field textarea:focus {
  border-color: rgba(240, 6, 63, 0.78);
  box-shadow:
    0 0 0 3px rgba(240, 6, 63, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.host-editable-title textarea {
  min-height: clamp(150px, 18vw, 260px);
  resize: vertical;
  overflow-wrap: anywhere;
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(2.05rem, 4.4vw, 4.1rem);
  font-weight: 950;
  line-height: 0.92;
  text-transform: uppercase;
}

.host-editable-body textarea {
  min-height: 160px;
  resize: vertical;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.45;
}

.host-editable-nav input {
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
}

.content-settings-dropdown,
.content-picture-dropdown {
  border: 1px solid rgba(201, 168, 90, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.32);
}

.content-picture-dropdown {
  margin-top: 16px;
}

.content-settings-dropdown summary,
.content-picture-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px;
  color: #fff8ed;
  list-style: none;
  cursor: pointer;
}

.content-settings-dropdown summary::-webkit-details-marker,
.content-picture-dropdown summary::-webkit-details-marker {
  display: none;
}

.content-settings-dropdown summary strong,
.content-picture-dropdown summary strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.content-settings-dropdown summary small,
.content-picture-dropdown summary small {
  display: block;
  margin-top: 2px;
  color: rgba(246, 239, 226, 0.62);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.content-settings-dropdown[open] summary,
.content-picture-dropdown[open] summary,
.content-settings-dropdown summary:hover,
.content-picture-dropdown summary:hover,
.content-settings-dropdown summary:focus-visible,
.content-picture-dropdown summary:focus-visible {
  outline: none;
  background: rgba(240, 6, 63, 0.1);
}

.content-settings-dropdown[open] .home-members-icon,
.content-picture-dropdown[open] .home-members-icon {
  transform: rotate(45deg);
}

.content-settings-grid {
  padding: 0 14px 14px;
}

.content-settings-dropdown .checkbox-label {
  margin: 0 14px 14px;
}

.content-live-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.content-picture-dropdown .asset-list,
.content-picture-dropdown .asset-form {
  margin: 0;
  padding: 14px;
  border-top: 1px solid rgba(201, 168, 90, 0.14);
}

.content-picture-dropdown .asset-list {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

@media (max-width: 900px) {
  .content-live-hero {
    grid-template-columns: 1fr;
  }

  .content-live-media-preview,
  .content-live-media-placeholder {
    min-height: clamp(180px, 48vw, 320px);
  }

  .content-live-media-placeholder {
    border-right: 0;
    border-bottom: 1px dashed rgba(201, 168, 90, 0.22);
  }

  .host-editable-title textarea {
    min-height: 150px;
  }

  .content-live-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content-live-actions > * {
    width: 100%;
  }
}

.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 2px;
  color: #fff;
  background: rgba(240, 6, 63, 0.16);
  border: 1px solid rgba(240, 6, 63, 0.48);
  font-weight: 900;
}

.admin-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-notice span {
  overflow-wrap: anywhere;
}

.notice-code {
  padding: 7px 9px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  letter-spacing: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  border: 1px solid rgba(240, 6, 63, 0.52);
  border-radius: 2px;
  color: #fff;
  background: #080808;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 34px);
  background: rgba(0, 0, 0, 0.76);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.confirm-dialog {
  width: min(460px, 100%);
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid rgba(201, 168, 90, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(201, 168, 90, 0.12), transparent 35%, rgba(242, 10, 63, 0.1)),
    #08090a;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(242, 10, 63, 0.1);
}

.confirm-dialog-copy {
  display: grid;
  gap: 8px;
}

.confirm-dialog-copy h2 {
  margin: 0;
  color: var(--collector-cream);
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(1.8rem, 7vw, 2.7rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.confirm-dialog-copy p:not(.eyebrow) {
  margin: 0;
  color: rgba(246, 239, 226, 0.72);
}

.confirm-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.confirm-dialog-actions > * {
  min-width: 0;
}

.hidden {
  display: none !important;
}

@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(clamp(16px, 4vw, 68px), env(safe-area-inset-left));
    padding-right: max(clamp(16px, 4vw, 68px), env(safe-area-inset-right));
  }

  .toast {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 1200px) {
  .media-grid,
  .feed-grid {
    column-count: 3;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .nav-links a,
  .primary-button,
  .secondary-button,
  .danger-button,
  .text-button,
  .icon-button,
  .tab-button,
  .segment-button {
    min-height: 44px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 11vw, 5rem);
  }

  .split,
  .admin-layout,
  .content-manager,
  .studio-layout,
  .studio-teaser,
  .dev-grid,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    position: static;
  }

  .studio-controls {
    position: static;
  }

  .studio-preview {
    min-height: clamp(340px, 64vw, 440px);
  }

  .admin-heading {
    align-items: start;
    flex-direction: column;
  }

  .admin-summary {
    justify-content: start;
  }

  .auth-media {
    min-height: 360px;
  }

  .key-access-panel {
    grid-template-columns: 1fr;
    padding: clamp(18px, 5vw, 28px);
  }

  .key-access-copy .page-home-logo {
    width: clamp(112px, 34vw, 180px);
    height: clamp(112px, 34vw, 180px);
  }

  .key-access-copy h1 {
    font-size: clamp(3rem, 17vw, 5rem);
  }

  .key-passkey-form {
    grid-template-columns: 1fr;
  }

  .key-passkey-form .primary-button {
    width: 100%;
  }

  .media-grid,
  .feed-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 10px;
    min-height: var(--header-height);
    padding: 10px 14px 0;
  }

  .brand {
    max-width: 210px;
    overflow: hidden;
  }

  .account-chip {
    display: none;
  }

  .account-area {
    gap: 8px;
  }

  .account-area .primary-button,
  .account-area .secondary-button {
    min-height: 44px;
    padding: 8px 11px;
    font-size: 0.68rem;
  }

  .nav-links a {
    min-height: 44px;
  }

  .hero {
    min-height: 76vh;
    min-height: 76svh;
    padding: 98px 18px 42px;
  }

  .hero-media {
    width: 100vw;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12.5vw, 3.9rem);
  }

  .hero p {
    font-size: 0.96rem;
  }

  .section h2,
  .panel h2,
  .upload-panel h2,
  .auth-media h2,
  .empty-state h2 {
    font-size: clamp(2rem, 11vw, 2.4rem);
  }

  .section {
    padding: 48px 14px;
  }

  .section.compact {
    padding-top: 34px;
  }

  .panel,
  .upload-panel {
    padding: 16px;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .text-button {
    min-height: 44px;
    padding: 8px 14px;
    white-space: normal;
  }

  .hero-actions > .primary-button,
  .hero-actions > .secondary-button,
  .action-row > .primary-button,
  .action-row > .secondary-button,
  .action-row > .danger-button {
    flex: 1 1 12rem;
  }

  .media-grid,
  .feed-grid {
    column-count: 1;
  }

  .form-grid.two,
  .page-meta-row,
  .comment-form {
    grid-template-columns: 1fr;
  }

  .content-sidebar-heading,
  .content-detail-heading,
  .content-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .admin-tabs,
  .stat-grid,
  .member-fields,
  .two-controls,
  .studio-slider-grid,
  .segmented-grid {
    grid-template-columns: 1fr;
  }

  .member-card-header,
  .member-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .member-badges,
  .member-status-row {
    justify-content: start;
  }

  .paint-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paint-swatch {
    min-height: 48px;
  }

  .auth-panel {
    min-height: 0;
  }

  .auth-media {
    min-height: 300px;
    padding: 22px;
  }

  .auth-forms {
    padding: 18px;
  }

  .upload-header {
    align-items: start;
    flex-direction: column;
  }

  .meter {
    width: 100%;
  }

  .post-meta {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .studio-preview {
    min-height: clamp(300px, 78vw, 360px);
  }

  .studio-preview.mini {
    min-height: 260px;
  }

  .studio-car {
    left: 4%;
    right: 4%;
    height: 126px;
  }

  .studio-wheel {
    width: 58px;
    height: 58px;
    border-width: 9px;
  }

  .studio-readout {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: 0.68rem;
  }

  .stat-card {
    min-height: 78px;
  }

  .tool-row {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .table-wrap {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .saved-build {
    grid-template-columns: 34px minmax(0, 1fr) 42px;
  }

  .saved-build .secondary-button {
    grid-column: 1 / 3;
  }

  .saved-build .icon-button {
    grid-column: 3;
  }
}

@media (max-width: 480px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 10px 12px 0;
  }

  .brand {
    max-width: 100%;
  }

  .account-area {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
  }

  .account-area .primary-button,
  .account-area .secondary-button {
    flex: 1 1 auto;
  }

  .nav-links {
    width: calc(100% + 24px);
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .nav-links a {
    min-height: 44px;
    padding: 0 12px;
  }

  .hero {
    padding: 82px 14px 36px;
  }

  .empty-state {
    padding: 42px 16px;
  }
}

@supports (padding: max(0px)) {
  @media (max-width: 640px) {
    .site-header {
      padding-top: max(10px, env(safe-area-inset-top));
      padding-left: max(14px, env(safe-area-inset-left));
      padding-right: max(14px, env(safe-area-inset-right));
    }
  }

  @media (max-width: 480px) {
    .site-header {
      padding-left: max(12px, env(safe-area-inset-left));
      padding-right: max(12px, env(safe-area-inset-right));
    }
  }
}

/* Automatic device adaptation overrides. These rules let layouts choose
   their own column count from available space instead of relying on a
   narrow set of device breakpoints. */
.split,
.studio-teaser,
.auth-panel,
.admin-layout,
.dev-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.studio-layout,
.content-manager {
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
}

.segmented-grid,
.two-controls,
.form-grid.two,
.member-fields,
.page-meta-row {
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

.stat-grid,
.compact-stats,
.tabs,
.admin-tabs {
  grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
}

.paint-swatches {
  grid-template-columns: repeat(auto-fit, minmax(min(5.5rem, 100%), 1fr));
}

.asset-list {
  grid-template-columns: repeat(auto-fill, minmax(min(8.5rem, 100%), 1fr));
}

.media-grid,
.feed-grid {
  column-count: auto;
  column-width: clamp(13.5rem, 28vw, 18rem);
  column-gap: clamp(12px, 2vw, 18px);
}

.media-tile,
.post-card {
  margin-bottom: clamp(12px, 2vw, 18px);
}

.feature-fade,
.wide-fade {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: clamp(260px, 42vw, 620px);
}

.about-media {
  min-width: 0;
  min-height: 0;
}

.panel,
.upload-panel {
  padding: var(--panel-pad);
}

.hero-actions > *,
.action-row > * {
  flex: 1 1 clamp(9.5rem, 34vw, 13rem);
}

.table-wrap table {
  min-width: min(560px, 100%);
}

@media (max-width: 980px) {
  .nav-links {
    flex-wrap: wrap;
    justify-content: stretch;
    overflow: visible;
  }

  .nav-links a {
    flex: 1 1 clamp(5.5rem, 13vw, 8rem);
    justify-content: center;
    min-height: var(--tap-size);
  }
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .brand {
    max-width: 100%;
  }

  .nav-links {
    width: 100%;
    margin-inline: 0;
    padding-inline: 0;
  }

  .nav-links a {
    flex-basis: min(9rem, 45%);
  }

  .account-area {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .account-area .primary-button,
  .account-area .secondary-button {
    flex: 1 1 10rem;
  }

  .hero {
    min-height: max(620px, calc(100svh - var(--header-height)));
    padding-top: clamp(56px, 12vh, 98px);
  }

  .garage-modal-backdrop {
    align-items: start;
    padding: 10px;
  }

  .garage-modal {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .garage-modal-media img,
  .garage-modal-media video {
    height: auto;
    max-height: 48vh;
  }

  .garage-modal-panel {
    max-height: none;
  }

  .post-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Zoned Experience visual refresh */
:root {
  --paper: #050606;
  --panel: #0b0c0d;
  --panel-2: #141517;
  --ink: #f7f1e7;
  --muted: #a59d90;
  --line: rgba(205, 174, 105, 0.18);
  --red: #f20a3f;
  --red-dark: #960523;
  --teal: #00d2c8;
  --collector-gold: #c9a85a;
  --collector-brass: #80642f;
  --collector-cream: #f6efe2;
  --chrome: #d7dde0;
  --smoke: #08090a;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 28px 86px rgba(0, 0, 0, 0.6);
}

body {
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(242, 10, 63, 0.12), transparent 21%, transparent 72%, rgba(0, 210, 200, 0.08)),
    linear-gradient(180deg, #050606 0%, #0a0a0b 42%, #050606 100%);
}

body[data-route="studio"] {
  background:
    linear-gradient(110deg, rgba(242, 10, 63, 0.2), transparent 30%, transparent 64%, rgba(0, 210, 200, 0.18)),
    linear-gradient(180deg, #020203 0%, #07080a 50%, #020203 100%);
}

body::before {
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(201, 168, 90, 0.036) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 200, 0.028) 1px, transparent 1px);
  background-size: 104px 104px;
}

.site-header {
  border-bottom: 1px solid rgba(201, 168, 90, 0.28);
  background: rgba(5, 6, 6, 0.88);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
}

body[data-route="studio"] .site-header {
  border-bottom-color: rgba(242, 10, 63, 0.46);
  box-shadow: 0 18px 54px rgba(242, 10, 63, 0.12);
}

.brand {
  gap: 12px;
  color: var(--collector-cream);
  letter-spacing: 0.06em;
}

.brand-logo-orb {
  border: 1px solid rgba(201, 168, 90, 0.34);
  box-shadow: 0 0 0 4px rgba(201, 168, 90, 0.06);
}

.logo-banner {
  border-color: rgba(201, 168, 90, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(246, 239, 226, 0.08) 18%, rgba(246, 239, 226, 0.08) 82%, rgba(255, 255, 255, 0)),
    rgba(8, 9, 10, 0.72);
}

.logo-banner::before,
.logo-banner::after {
  background: linear-gradient(90deg, transparent, rgba(201, 168, 90, 0.28), transparent);
}

.logo-banner img {
  opacity: 0.76;
  filter: invert(1) grayscale(1) contrast(1.35);
  mix-blend-mode: screen;
}

.brand-ribbon-section {
  padding: 14px var(--page-gutter);
  border-top-color: rgba(201, 168, 90, 0.14);
  border-bottom-color: rgba(201, 168, 90, 0.14);
  background:
    linear-gradient(90deg, rgba(201, 168, 90, 0.1), transparent 34%, transparent 66%, rgba(242, 10, 63, 0.08)),
    #050606;
}

.brand-ribbon-banner {
  width: min(560px, 100%);
  min-height: 66px;
}

.brand-ribbon-banner img {
  height: 66px;
}

.nav-links {
  gap: 6px;
}

.nav-links a,
.account-chip,
.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button,
.tab-button,
.segment-button,
.ai-enhance-button,
.content-tab-button,
.role-chip,
.manage-chip,
.meter,
.notice,
.toast,
input,
textarea {
  border-radius: var(--radius-sm);
}

.nav-links a {
  position: relative;
  color: rgba(246, 239, 226, 0.64);
  min-height: 40px;
}

.nav-links a.active,
.nav-links a:hover {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(201, 168, 90, 0.16), rgba(242, 10, 63, 0.12));
}

body[data-route="studio"] .nav-links a.active,
body[data-route="studio"] .nav-links a:hover {
  background:
    linear-gradient(90deg, rgba(242, 10, 63, 0.22), rgba(0, 210, 200, 0.13));
}

.account-chip {
  color: var(--collector-cream);
  border-color: rgba(201, 168, 90, 0.22);
  background: rgba(201, 168, 90, 0.08);
}

.primary-button,
.danger-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, #ff174e, #b4072c 58%, #650316);
  box-shadow: 0 16px 38px rgba(242, 10, 63, 0.28);
}

.secondary-button,
.icon-button {
  color: var(--collector-cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #0c0d0f;
  border: 1px solid rgba(201, 168, 90, 0.28);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--collector-gold);
  box-shadow: 0 12px 30px rgba(201, 168, 90, 0.11);
}

.text-button {
  color: var(--collector-gold);
}

.hero {
  min-height: clamp(580px, calc(100svh - var(--header-height) - 48px), 860px);
  align-items: center;
  padding: clamp(88px, 12vh, 128px) clamp(18px, 6vw, 88px) clamp(48px, 8vh, 80px);
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(3, 3, 3, 0.94), rgba(3, 3, 3, 0.48) 48%, rgba(3, 3, 3, 0.18)),
    linear-gradient(0deg, rgba(3, 3, 3, 0.88), transparent 55%),
    linear-gradient(118deg, transparent 56%, rgba(201, 168, 90, 0.18) 56%, rgba(242, 10, 63, 0.12) 64%, transparent 64%);
}

.hero-fade {
  opacity: 0.86;
}

.hero-fade img,
.hero-fade video {
  filter: saturate(1.05) contrast(1.13) brightness(0.78);
}

.hero-copy {
  max-width: 920px;
}

.hero h1 {
  max-width: 880px;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.56);
  text-wrap: balance;
}

.hero h1::after {
  color: var(--collector-gold);
}

.hero p {
  max-width: 620px;
  color: rgba(246, 239, 226, 0.78);
}

.eyebrow {
  color: var(--collector-gold);
  letter-spacing: 0.1em;
}

.eyebrow::before {
  background: linear-gradient(90deg, var(--collector-gold), var(--red));
}

body[data-route="studio"] .eyebrow {
  color: #fff;
}

body[data-route="studio"] .eyebrow::before {
  background: linear-gradient(90deg, var(--red), var(--teal));
}

.section h2,
.panel h2,
.auth-media h2,
.empty-state h2 {
  color: var(--collector-cream);
  text-wrap: balance;
}

.section p,
.panel p {
  color: var(--muted);
}

.panel,
.upload-panel,
.studio-teaser,
.auth-panel,
.feature-fade,
.about-media,
.wide-fade,
.empty-state,
.member-card,
.stat-card,
.asset-item,
.content-tab-button {
  border-radius: var(--radius);
}

.panel,
.upload-panel {
  border-color: rgba(201, 168, 90, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(8, 9, 10, 0.94);
  box-shadow: var(--shadow);
}

.feature-fade,
.about-media,
.wide-fade,
.auth-panel {
  border-color: rgba(201, 168, 90, 0.22);
}

.feature-fade img,
.feature-fade video,
.about-media img,
.about-media video,
.wide-fade img,
.wide-fade video,
.auth-fade img,
.auth-fade video {
  filter: saturate(1.02) contrast(1.08) brightness(0.82);
}

.studio-teaser {
  border-color: rgba(242, 10, 63, 0.26);
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.13), transparent 36%),
    linear-gradient(280deg, rgba(0, 210, 200, 0.08), transparent 40%),
    rgba(8, 9, 10, 0.88);
}

.studio-layout {
  position: relative;
}

body[data-route="studio"] .studio-layout::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: -1;
  border: 1px solid rgba(0, 210, 200, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(242, 10, 63, 0.13), transparent 32%, rgba(0, 210, 200, 0.1));
  pointer-events: none;
}

.studio-preview {
  border-radius: var(--radius);
  border-color: rgba(201, 168, 90, 0.22);
}

body[data-route="studio"] .studio-preview {
  border-color: rgba(242, 10, 63, 0.44);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(0, 210, 200, 0.13),
    0 0 60px rgba(242, 10, 63, 0.16);
}

body[data-route="studio"] .studio-effects-layer {
  background:
    radial-gradient(circle at 74% 70%, rgba(242, 10, 63, calc(var(--studio-glow, 0.4) * 0.5)), transparent 27%),
    radial-gradient(circle at 20% 20%, rgba(0, 210, 200, calc(var(--studio-glow, 0.4) * 0.34)), transparent 24%),
    linear-gradient(180deg, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.66)), transparent 34%, transparent 62%, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.86))),
    linear-gradient(90deg, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.68)), transparent 29%, transparent 71%, rgba(0, 0, 0, calc(var(--studio-vignette, 0.45) * 0.68)));
}

.studio-readout {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.48);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body[data-route="studio"] .studio-readout strong {
  color: var(--teal);
}

.studio-controls .panel,
body[data-route="studio"] .panel {
  border-color: rgba(242, 10, 63, 0.2);
}

.studio-compare-button {
  white-space: nowrap;
}

.studio-compare-dock {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 70;
  display: flex;
  justify-content: end;
  max-width: calc(100vw - 36px);
  pointer-events: none;
}

.studio-compare-dock .studio-compare-button {
  position: relative;
  min-height: 56px;
  padding: 14px 22px;
  overflow: visible;
  pointer-events: auto;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(120deg, #f20a3f, #c9a85a 52%, #00d2c8),
    #f20a3f;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.62);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.56),
    0 0 0 2px rgba(255, 255, 255, 0.14),
    0 0 54px rgba(242, 10, 63, 0.42),
    0 0 34px rgba(0, 210, 200, 0.22);
}

.studio-compare-dock .studio-compare-button::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  border: 1px solid rgba(0, 210, 200, 0.58);
  border-radius: inherit;
  background: rgba(242, 10, 63, 0.16);
  animation: studioComparePulse 1800ms ease-out infinite;
}

.studio-compare-dock .studio-compare-button:hover,
.studio-compare-dock .studio-compare-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.62),
    0 0 0 3px rgba(255, 255, 255, 0.18),
    0 0 70px rgba(242, 10, 63, 0.52),
    0 0 42px rgba(0, 210, 200, 0.3);
}

@keyframes studioComparePulse {
  0% {
    opacity: 0.88;
    transform: scale(0.98);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.13);
  }
}

.studio-side-preview {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
}

.studio-preview-upload-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
}

.studio-preview-upload-button:focus-visible {
  outline: 2px solid rgba(0, 210, 200, 0.72);
  outline-offset: 4px;
}

.studio-preview-upload-button:hover .studio-preview.side {
  border-color: rgba(0, 210, 200, 0.62);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 0 2px rgba(0, 210, 200, 0.18),
    0 0 42px rgba(242, 10, 63, 0.16);
}

.studio-album-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.studio-hidden-file {
  display: none;
}

.studio-preview.side {
  min-height: clamp(170px, 18vw, 240px);
  margin-top: 0;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 210, 200, 0.08);
}

.studio-preview.side .studio-readout {
  left: 10px;
  right: 10px;
  bottom: 10px;
  gap: 8px;
  padding: 8px 9px;
  font-size: 0.62rem;
}

.studio-preview.compare {
  min-height: clamp(320px, 34vw, 520px);
  margin-top: 0;
}

.studio-compare-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(0, 0, 0, 0.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.studio-compare-modal {
  position: relative;
  width: min(1160px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(242, 10, 63, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(242, 10, 63, 0.13), transparent 34%, rgba(0, 210, 200, 0.11)),
    rgba(8, 9, 10, 0.98);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.74),
    0 0 0 1px rgba(0, 210, 200, 0.1);
}

.studio-compare-modal:focus {
  outline: 2px solid rgba(0, 210, 200, 0.52);
  outline-offset: 4px;
}

.studio-compare-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.studio-compare-heading {
  margin-bottom: 16px;
}

.studio-compare-heading h2 {
  max-width: min(760px, calc(100% - 54px));
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.55rem);
}

.studio-compare-window {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: hidden;
}

.studio-compare-pane {
  position: relative;
  min-width: 0;
  will-change: transform, opacity;
}

.studio-compare-pane.before {
  animation: studioSplitBefore 780ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.studio-compare-pane.after {
  animation: studioSplitAfter 780ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.studio-compare-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0;
  animation: studioCompareLabelIn 520ms ease-out 520ms forwards;
}

@keyframes studioSplitBefore {
  0% {
    opacity: 0.94;
    transform: translateX(52%) scale(0.94);
  }
  42% {
    opacity: 1;
    transform: translateX(52%) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes studioSplitAfter {
  0% {
    opacity: 0.94;
    transform: translateX(-52%) scale(0.94);
  }
  42% {
    opacity: 1;
    transform: translateX(-52%) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes studioCompareLabelIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.segment-button,
.studio-source-button,
.ai-enhance-button,
.paint-swatch,
.saved-build,
.asset-item,
.stat-card {
  border-radius: var(--radius-sm);
}

.segment-button,
.studio-source-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    #0b0c0d;
  border-color: rgba(201, 168, 90, 0.2);
}

.segment-button.active,
.segment-button:hover,
.studio-source-button.active,
.studio-source-button:hover {
  border-color: rgba(0, 210, 200, 0.58);
  background:
    linear-gradient(120deg, rgba(242, 10, 63, 0.18), rgba(0, 210, 200, 0.11)),
    #0b0c0d;
}

.ai-enhance-button {
  border-color: rgba(0, 210, 200, 0.4);
  background:
    linear-gradient(120deg, rgba(242, 10, 63, 0.3), rgba(0, 210, 200, 0.16)),
    #08090a;
}

.ai-enhance-button.active,
.ai-enhance-button:hover {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 46px rgba(0, 210, 200, 0.13), 0 0 0 2px rgba(242, 10, 63, 0.28);
}

.paint-swatch {
  border-color: rgba(255, 255, 255, 0.16);
}

.media-grid,
.feed-grid {
  column-gap: clamp(14px, 2vw, 22px);
}

.media-tile,
.post-card {
  border-color: rgba(201, 168, 90, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    #090a0b;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 168, 90, 0.48);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 38px rgba(201, 168, 90, 0.08);
}

.post-card-media > img,
.post-card-media > video,
.media-tile img,
.media-tile video {
  filter: saturate(0.98) contrast(1.08) brightness(0.86);
}

.post-body {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(201, 168, 90, 0.055), rgba(201, 168, 90, 0));
}

.post-meta {
  color: var(--collector-cream);
}

.post-stats,
.comment-meta,
.content-tab-button small,
.empty-asset-slot,
.saved-build span {
  color: rgba(246, 239, 226, 0.58);
}

.post-description,
.comment p {
  color: rgba(246, 239, 226, 0.82);
}

.comments,
.member-form,
.new-page-form,
.tool-list,
th,
td {
  border-color: rgba(201, 168, 90, 0.16);
}

.garage-modal-backdrop {
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.garage-modal {
  border-radius: var(--radius);
  border-color: rgba(201, 168, 90, 0.26);
  background: #070809;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.66);
}

.garage-modal-panel {
  background:
    linear-gradient(145deg, rgba(201, 168, 90, 0.08), transparent 34%),
    #090a0b;
}

.auth-panel {
  border-color: rgba(201, 168, 90, 0.26);
}

.auth-media::after {
  background:
    linear-gradient(0deg, rgba(2, 2, 2, 0.92), transparent 56%),
    linear-gradient(90deg, rgba(2, 2, 2, 0.68), transparent 66%),
    linear-gradient(120deg, rgba(201, 168, 90, 0.14), transparent 38%);
}

.tabs,
.admin-tabs {
  gap: 4px;
  padding: 4px;
  border-color: rgba(201, 168, 90, 0.18);
  border-radius: var(--radius);
}

.tab-button,
.admin-tabs .tab-button {
  border-radius: var(--radius-sm);
}

.tab-button.active {
  color: #fff;
  border-bottom: 0;
  background:
    linear-gradient(90deg, rgba(201, 168, 90, 0.16), rgba(242, 10, 63, 0.12));
}

.admin-heading h2 {
  color: var(--collector-cream);
}

.admin-summary span,
.content-count,
.role-chip,
.manage-chip {
  border-color: rgba(201, 168, 90, 0.24);
  background: rgba(201, 168, 90, 0.075);
}

.content-tab-button,
.member-card,
.stat-card,
.tool-row,
.asset-item,
.saved-build {
  border-color: rgba(201, 168, 90, 0.18);
  background: rgba(9, 10, 11, 0.86);
}

.content-tab-button.active,
.content-tab-button:hover,
.member-card.is-self {
  border-color: rgba(201, 168, 90, 0.48);
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.12), rgba(242, 10, 63, 0.07)),
    #0a0b0c;
}

.stat-card strong {
  color: var(--collector-gold);
}

label {
  color: var(--collector-cream);
  letter-spacing: 0.04em;
}

input,
textarea {
  color: var(--collector-cream);
  border-color: rgba(201, 168, 90, 0.2);
  background: rgba(4, 5, 6, 0.86);
}

input:focus,
textarea:focus {
  border-color: var(--collector-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 90, 0.16);
}

body[data-route="studio"] input:focus,
body[data-route="studio"] textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 210, 200, 0.14);
}

.notice,
.toast {
  border-color: rgba(201, 168, 90, 0.36);
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.12), rgba(242, 10, 63, 0.11)),
    #070809;
}

@media (max-width: 700px) {
  .hero {
    min-height: max(560px, calc(100svh - var(--header-height) - 24px));
    padding-top: clamp(64px, 10vh, 92px);
  }

  .site-header {
    background: rgba(5, 6, 6, 0.94);
  }

  .nav-links {
    gap: 6px;
  }

  .nav-links a {
    flex-basis: min(8.5rem, 46%);
  }

  .studio-readout {
    align-items: start;
    flex-direction: column;
  }

  body[data-route="studio"] .studio-layout::before {
    inset: 0;
  }
}

@media (min-width: 861px) {
  .site-header {
    grid-template-columns: minmax(190px, auto) minmax(0, 1fr) minmax(140px, auto);
    padding-block: 0;
  }

  .nav-links {
    grid-column: auto;
    flex-wrap: nowrap;
    justify-content: center;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-links a {
    flex: 0 1 auto;
    min-width: 92px;
    padding: 0 12px;
  }

  .account-area {
    grid-column: auto;
    width: auto;
    justify-content: end;
    flex-wrap: nowrap;
  }
}

/* Fluid layout pass: keep the site resizing from the space it actually has. */
.site-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-auto-rows: minmax(var(--tap-size), auto);
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
  min-height: var(--header-height);
  padding-block: clamp(8px, 1vw, 12px);
}

.brand {
  min-width: 0;
  max-width: 100%;
  justify-self: start;
}

.brand-logo-orb {
  --orb-size: clamp(42px, 5vw, 54px);
}

.nav-links {
  width: 100%;
  max-width: min(52rem, 100%);
  margin-inline: auto;
  justify-self: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(4px, 0.8vw, 8px);
  overflow: visible;
}

.nav-links a {
  flex: 1 1 clamp(6.25rem, 8vw, 8.75rem);
  min-width: 0;
  max-width: 10rem;
  justify-content: center;
  padding-inline: clamp(8px, 0.9vw, 14px);
  white-space: nowrap;
}

.account-area {
  justify-self: end;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 10px);
}

.account-area .primary-button,
.account-area .secondary-button,
.account-area .account-chip {
  flex: 0 1 auto;
}

.hero {
  min-height: clamp(540px, calc(100svh - var(--header-height)), 840px);
  align-items: center;
  justify-items: start;
  padding: clamp(58px, 10vh, 112px) var(--page-gutter) clamp(42px, 7vh, 76px);
}

.hero-copy {
  width: min(920px, 100%);
  max-width: min(920px, 100%);
  margin-block: auto;
}

.hero h1 {
  max-width: min(880px, 100%);
  font-size: clamp(2.8rem, 8.2vw, 6.9rem);
}

.hero p {
  width: min(40rem, 100%);
  font-size: clamp(0.96rem, 1.35vw, 1.08rem);
}

.hero-actions,
.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  width: min(58rem, 100%);
}

.hero-actions > *,
.action-row > * {
  min-width: 0;
}

.brand-ribbon-section {
  padding-block: clamp(10px, 1.8vw, 18px);
}

.brand-ribbon-section .section-inner {
  position: relative;
  align-items: center;
  gap: clamp(14px, 3vw, 42px);
}

.brand-ribbon-section .section-inner::before,
.brand-ribbon-section .section-inner::after {
  content: "";
  display: block;
  flex: 1 1 8rem;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, rgba(201, 168, 90, 0.42), rgba(242, 10, 63, 0.16), transparent);
}

.brand-ribbon-banner {
  flex: 0 1 min(32rem, 56vw);
  width: min(32rem, 100%);
  min-height: clamp(56px, 7vw, 84px);
}

.brand-ribbon-banner img {
  width: min(240px, 58%);
  height: clamp(56px, 7vw, 84px);
}

.content-divider {
  margin-block: clamp(8px, 2vw, 18px);
  padding-block: clamp(12px, 2.4vw, 24px);
  background:
    linear-gradient(90deg, transparent, rgba(201, 168, 90, 0.1) 18%, rgba(242, 10, 63, 0.08) 50%, rgba(201, 168, 90, 0.1) 82%, transparent),
    #050606;
}

.content-divider .brand-ribbon-banner {
  border-color: rgba(201, 168, 90, 0.34);
  background:
    linear-gradient(90deg, transparent, rgba(201, 168, 90, 0.12) 24%, rgba(201, 168, 90, 0.12) 76%, transparent),
    rgba(9, 10, 11, 0.82);
}

.content-divider .brand-ribbon-banner img {
  opacity: 0.86;
}

.home-section-divider {
  margin: 0;
  padding-block: clamp(14px, 2.8vw, 26px);
  border-top: 1px solid rgba(201, 168, 90, 0.16);
  border-bottom: 1px solid rgba(201, 168, 90, 0.16);
  background:
    linear-gradient(90deg, transparent, rgba(201, 168, 90, 0.11) 20%, rgba(242, 10, 63, 0.07) 50%, rgba(201, 168, 90, 0.11) 80%, transparent),
    #050606;
}

.home-section-divider .brand-ribbon-banner {
  width: min(520px, 100%);
  min-height: clamp(54px, 6vw, 74px);
  margin: 0;
}

.home-section-divider .brand-ribbon-banner img {
  height: clamp(54px, 6vw, 74px);
  opacity: 0.78;
}

.logo-banner-link {
  display: block;
  color: var(--cream);
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.logo-banner-link .logo-banner-reveal {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0 clamp(18px, 5vw, 42px);
  color: var(--cream);
  font-size: clamp(0.92rem, 2.6vw, 1.08rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.logo-banner-link img {
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.logo-banner-link:focus-visible {
  outline: 3px solid rgba(246, 239, 226, 0.82);
  outline-offset: 4px;
}

.home-section-divider .logo-banner-link:is(:hover, :focus-visible) {
  border-color: rgba(242, 10, 63, 0.72);
  background:
    linear-gradient(90deg, rgba(242, 10, 63, 0.42), rgba(201, 168, 90, 0.18) 50%, rgba(0, 169, 165, 0.32)),
    rgba(11, 12, 13, 0.96);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(246, 239, 226, 0.12) inset;
  transform: translateY(-2px);
}

.home-section-divider .logo-banner-link:is(:hover, :focus-visible)::before,
.home-section-divider .logo-banner-link:is(:hover, :focus-visible)::after {
  background: linear-gradient(90deg, transparent, rgba(246, 239, 226, 0.7), transparent);
}

.home-section-divider .logo-banner-link:is(:hover, :focus-visible) img {
  opacity: 0;
  transform: translateY(-12px) scale(0.92);
}

.home-section-divider .logo-banner-link:is(:hover, :focus-visible) .logo-banner-reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .logo-banner-link,
  .logo-banner-link img,
  .logo-banner-link .logo-banner-reveal {
    transition: none;
  }
}

.split,
.studio-teaser,
.studio-layout,
.admin-layout,
.content-manager,
.auth-panel {
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  gap: clamp(18px, 4vw, 58px);
}

.section-inner,
.panel,
.upload-panel,
.studio-stage,
.studio-controls,
.content-sidebar,
.content-detail,
.garage-modal,
.garage-modal-panel,
.garage-modal-media {
  min-width: 0;
}

.feature-fade,
.about-media {
  width: 100%;
  height: auto;
  min-height: clamp(240px, 42vw, 620px);
}

.wide-fade {
  width: 100%;
  height: auto;
  min-height: clamp(220px, 32vw, 540px);
}

.media-grid,
.feed-grid {
  column-width: clamp(13.5rem, 26vw, 18.5rem);
  column-gap: clamp(12px, 2vw, 22px);
}

.garage-modal {
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
  width: min(1120px, calc(100vw - clamp(24px, 6vw, 68px)));
}

.garage-modal-media img,
.garage-modal-media video {
  height: min(68vh, 720px);
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand {
    order: 1;
  }

  .account-area {
    order: 2;
    justify-content: end;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    max-width: 100%;
  }

  .content-sidebar,
  .studio-controls {
    position: static;
  }
}

@media (max-width: 700px) {
  .garage-editor-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .garage-editor-modal {
    max-height: calc(100vh - 20px);
    max-height: calc(100svh - 20px);
  }

  .garage-editor-layout {
    grid-template-columns: 1fr;
  }

  .garage-editor-preview {
    min-height: clamp(260px, 72vw, 420px);
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
  }

  .brand {
    width: auto;
    justify-self: start;
    justify-content: start;
  }

  .account-area {
    grid-column: auto;
    width: auto;
    justify-self: end;
    justify-content: end;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
    justify-content: center;
  }

  .account-area .primary-button,
  .account-area .secondary-button,
  .account-area .account-chip {
    flex: 0 1 auto;
    max-width: none;
  }

  .account-area .account-chip {
    max-width: clamp(3.5rem, 20vw, 7rem);
  }

  .nav-links a {
    flex: 1 1 min(9.5rem, 46%);
    max-width: none;
  }

  .hero {
    min-height: max(520px, calc(100svh - var(--header-height)));
    padding-top: clamp(48px, 8vh, 76px);
  }

  .hero h1 {
    font-size: clamp(2.55rem, 14vw, 4.4rem);
  }

  .brand-ribbon-banner,
  .page-logo-banner {
    width: 100%;
  }

  .brand-ribbon-section .section-inner {
    gap: 10px;
  }

  .brand-ribbon-section .section-inner::before,
  .brand-ribbon-section .section-inner::after {
    flex-basis: 2.5rem;
  }

  .feature-fade,
  .about-media,
  .wide-fade {
    min-height: clamp(220px, 68vw, 420px);
  }

  .garage-modal {
    width: 100%;
    max-height: none;
  }

  .studio-compare-dock {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    max-width: none;
  }

  .studio-compare-dock .studio-compare-button {
    width: 100%;
  }

  .studio-preview.side {
    min-height: clamp(210px, 56vw, 300px);
  }

  .studio-compare-backdrop {
    align-items: start;
    overflow: auto;
    padding: 10px;
  }

  .studio-compare-modal {
    max-height: none;
  }

  .studio-compare-window {
    grid-template-columns: 1fr;
  }

  .studio-preview.compare {
    min-height: clamp(240px, 64vw, 360px);
  }

  .studio-compare-pane.before,
  .studio-compare-pane.after {
    animation: studioStackReveal 560ms ease-out both;
  }
}

@media (max-width: 380px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .brand,
  .account-area {
    width: 100%;
    justify-self: center;
    justify-content: center;
  }
}

@keyframes studioStackReveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-compare-pane.before,
  .studio-compare-pane.after,
  .studio-compare-label,
  .studio-compare-dock .studio-compare-button::before {
    animation-duration: 1ms;
    animation-delay: 0ms;
  }
}

.home-value-section {
  padding-top: clamp(42px, 7vw, 78px);
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.09), transparent 34%, rgba(242, 10, 63, 0.06)),
    #050606;
}

.home-value-grid,
.home-featured-grid,
.home-owner-grid,
.owner-proof-grid,
.home-invite-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: clamp(20px, 4vw, 58px);
  align-items: center;
}

.home-section-copy,
.home-section-heading {
  max-width: 760px;
}

.home-section-copy h2,
.home-section-heading h2,
.home-invite-band h2 {
  margin: 0 0 14px;
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(2.35rem, 5vw, 3.65rem);
  font-weight: 950;
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.home-section-copy p:not(.eyebrow),
.home-invite-band p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.45vw, 1.08rem);
}

.home-section-heading {
  margin-bottom: clamp(20px, 4vw, 34px);
}

.home-value-points,
.home-step-grid {
  display: grid;
  gap: clamp(10px, 2vw, 16px);
}

.home-value-points {
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  margin-top: clamp(20px, 3vw, 28px);
}

.home-step-card {
  border: 1px solid rgba(201, 168, 90, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(9, 10, 11, 0.84);
}

.home-value-points span {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 2px 0 2px 20px;
  color: var(--collector-cream);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.35;
  text-transform: uppercase;
  background: transparent;
  border: 0;
}

.home-value-points span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 90, 0.1);
}

.home-how-section {
  border-top: 1px solid rgba(201, 168, 90, 0.12);
}

.owner-proof-section {
  border-top: 1px solid rgba(201, 168, 90, 0.14);
  background:
    linear-gradient(105deg, rgba(201, 168, 90, 0.08), transparent 36%, rgba(0, 210, 200, 0.055)),
    #070809;
}

.owner-proof-grid {
  align-items: start;
}

.social-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: clamp(10px, 2vw, 14px);
}

.social-proof-card {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid rgba(201, 168, 90, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(9, 10, 11, 0.84);
}

.social-proof-card h3 {
  margin: 0;
  color: var(--collector-cream);
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
  background: rgba(0, 0, 0, 0.76);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.garage-editor-modal {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(242, 10, 63, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(242, 10, 63, 0.13), transparent 34%, rgba(0, 210, 200, 0.11)),
    rgba(8, 9, 10, 0.98);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.74),
    0 0 0 1px rgba(0, 210, 200, 0.1);
}

.garage-editor-modal:focus {
  outline: 2px solid rgba(0, 210, 200, 0.52);
  outline-offset: 4px;
}

.garage-editor-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.garage-editor-heading {
  max-width: min(760px, calc(100% - 54px));
  margin-bottom: 18px;
}

.garage-editor-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.8rem);
}

.garage-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(min(27rem, 100%), 0.95fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}

.garage-editor-stage {
  min-width: 0;
}

.garage-editor-preview {
  min-height: clamp(320px, 48vw, 620px);
}

.garage-editor-controls {
  position: static;
}

.social-proof-card p {
  margin: 0;
  color: var(--muted);
}

.home-step-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}

.home-step-card {
  min-height: 210px;
  padding: clamp(18px, 3vw, 26px);
}

.home-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 34px;
  margin-bottom: 18px;
  color: #fff;
  border: 1px solid rgba(242, 10, 63, 0.34);
  border-radius: var(--radius-sm);
  background: rgba(242, 10, 63, 0.14);
  font-size: 0.72rem;
  font-weight: 950;
}

.home-step-card h3 {
  margin: 0 0 10px;
  color: var(--collector-cream);
  font-size: 1.15rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-step-card p {
  margin: 0;
  color: var(--muted);
}

.home-featured-section {
  background:
    linear-gradient(280deg, rgba(0, 210, 200, 0.07), transparent 38%),
    #08090a;
}

.home-featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
}

.home-featured-fade,
.home-owner-fade {
  min-height: clamp(260px, 36vw, 560px);
}

.home-owner-section {
  border-top: 1px solid rgba(201, 168, 90, 0.12);
}

.home-community-section {
  padding-top: clamp(28px, 5vw, 58px);
  border-top: 1px solid rgba(201, 168, 90, 0.12);
  background:
    radial-gradient(circle at 18% 22%, rgba(240, 6, 63, 0.1), transparent 30%),
    radial-gradient(circle at 82% 26%, rgba(0, 210, 200, 0.07), transparent 28%),
    #050606;
}

.home-community-grid {
  display: grid;
  grid-template-columns: minmax(min(22rem, 100%), 0.42fr) minmax(min(24rem, 100%), 0.58fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
}

.home-community-members,
.home-community-public {
  min-width: 0;
}

.home-community-members {
  justify-self: start;
  width: 100%;
}

.home-community-members .home-members-dropdown {
  width: 100%;
  margin-top: 16px;
}

.section .home-members-heading {
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  line-height: 1;
}

.section .home-members-heading::before {
  width: clamp(54px, 7vw, 82px);
}

.home-community-section h2 {
  margin: 0 0 14px;
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 950;
  line-height: 0.94;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.home-public-carousel-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: clamp(280px, 36vw, 520px);
  padding: 0;
  overflow: hidden;
  color: inherit;
  border: 1px solid rgba(201, 168, 90, 0.28);
  border-radius: var(--radius-sm);
  background: #030303;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: zoom-in;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.home-public-carousel-card:hover,
.home-public-carousel-card:focus-visible {
  border-color: rgba(240, 6, 63, 0.68);
  outline: none;
  box-shadow:
    0 0 0 3px rgba(240, 6, 63, 0.14),
    0 28px 70px rgba(0, 0, 0, 0.42);
}

.home-public-carousel {
  min-height: clamp(280px, 36vw, 520px);
}

.home-public-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 42%, rgba(0, 0, 0, 0.68)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 46%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.home-public-carousel-overlay {
  position: absolute;
  inset-inline: 16px;
  inset-block-end: 14px;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  pointer-events: none;
}

.home-public-carousel-overlay strong,
.home-public-carousel-overlay small {
  font-weight: 950;
  text-transform: uppercase;
}

.home-public-carousel-overlay strong {
  font-size: 0.92rem;
}

.home-public-carousel-overlay small {
  color: rgba(246, 239, 226, 0.78);
  font-size: 0.74rem;
  text-align: right;
}

.home-public-enlarge-hint {
  z-index: 6;
}

.home-public-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.home-public-viewer-modal {
  position: relative;
  display: grid;
  place-items: center;
  width: min(1180px, 100%);
  height: min(86svh, 820px);
  overflow: hidden;
  border: 1px solid rgba(201, 168, 90, 0.32);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 18%, rgba(240, 6, 63, 0.12), transparent 32%),
    rgba(4, 5, 6, 0.94);
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.72);
}

.home-public-viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.home-public-viewer-media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.home-public-viewer-media picture,
.home-public-viewer-media img,
.home-public-viewer-media video,
.home-public-viewer-media picture > img {
  max-width: 100%;
  max-height: 100%;
}

.home-public-viewer-media img,
.home-public-viewer-media video,
.home-public-viewer-media picture > img {
  width: auto;
  height: auto;
  object-fit: contain;
}

.home-public-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: clamp(42px, 5vw, 58px);
  height: clamp(42px, 5vw, 58px);
  color: #fff;
  border: 1px solid rgba(246, 239, 226, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.32), rgba(0, 0, 0, 0.52)),
    rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 950;
  transform: translateY(-50%);
}

.home-public-viewer-nav:disabled {
  opacity: 0.38;
  cursor: default;
}

.home-public-viewer-prev {
  left: clamp(12px, 3vw, 30px);
}

.home-public-viewer-next {
  right: clamp(12px, 3vw, 30px);
}

.home-public-viewer-caption {
  position: absolute;
  inset-inline: clamp(16px, 4vw, 38px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 4;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.78);
}

.home-public-viewer-caption strong,
.home-public-viewer-caption span {
  font-weight: 950;
  text-transform: uppercase;
}

.home-public-viewer-caption strong {
  max-width: min(640px, 72%);
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.05;
}

.home-public-viewer-caption span {
  color: rgba(246, 239, 226, 0.82);
  font-size: 0.82rem;
}

.home-public-empty {
  display: grid;
  gap: 8px;
  min-height: 220px;
  align-content: center;
  padding: clamp(18px, 3vw, 28px);
  border: 1px dashed rgba(201, 168, 90, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.34);
}

.home-public-empty strong {
  color: #fff8ed;
  font-size: 0.95rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-public-empty span {
  color: rgba(246, 239, 226, 0.72);
}

.home-invite-section {
  border-top: 1px solid rgba(201, 168, 90, 0.16);
  background:
    linear-gradient(110deg, rgba(242, 10, 63, 0.14), transparent 34%, rgba(201, 168, 90, 0.12)),
    #050606;
}

.home-invite-band {
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
}

.home-invite-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: 10px;
}

@media (min-width: 900px) {
  .home-featured-grid {
    grid-template-columns: minmax(min(21rem, 100%), 0.78fr) minmax(min(24rem, 100%), 1.22fr);
  }

  .home-invite-band {
    grid-template-columns: minmax(min(24rem, 100%), 1fr) minmax(min(18rem, 100%), 0.36fr);
  }
}

@media (max-width: 820px) {
  .home-community-grid {
    grid-template-columns: 1fr;
  }

  .home-community-members {
    justify-self: stretch;
  }

  .home-public-carousel-card,
  .home-public-carousel {
    min-height: clamp(240px, 62vw, 420px);
  }
}

/* Automatic anti-overlap guardrails. Keep this last so it wins over older layout layers. */
html,
body,
#app,
.page {
  max-width: 100%;
}

body {
  min-width: 0;
}

:where(
  .site-header,
  .brand,
  .nav-links,
  .account-area,
  .section-inner,
  .panel,
  .upload-panel,
  .auth-panel,
  .studio-layout,
  .studio-stage,
  .studio-controls,
  .studio-teaser,
  .studio-side-preview,
  .admin-layout,
  .content-manager,
  .content-sidebar,
  .content-detail,
  .member-card,
  .member-form,
  .post-card,
  .garage-modal,
  .garage-modal-panel,
  .garage-modal-media,
  .studio-compare-modal,
  .studio-compare-pane,
  .home-value-grid,
  .home-featured-grid,
  .home-owner-grid,
  .home-community-grid,
  .owner-proof-grid,
  .home-invite-band,
  .home-section-copy,
  .home-section-heading,
  .home-step-card
) {
  min-width: 0;
  max-width: 100%;
}

:where(h1, h2, h3, p, a, button, label, span, strong, small, th, td) {
  overflow-wrap: anywhere;
}

:where(input, textarea, select, button) {
  max-width: 100%;
  min-width: 0;
}

:where(.primary-button, .secondary-button, .danger-button, .text-button, .tab-button, .segment-button, .ai-enhance-button, .content-tab-button) {
  white-space: normal;
  text-wrap: balance;
}

.brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header {
  row-gap: clamp(6px, 1.5vw, 12px);
}

.nav-links {
  align-items: stretch;
}

.nav-links a {
  min-height: var(--tap-size);
  line-height: 1.1;
}

.account-area {
  max-width: 100%;
}

.hero-copy,
.hero-actions,
.action-row {
  max-width: 100%;
}

.hero h1,
.section h2,
.panel h2,
.auth-media h2,
.empty-state h2 {
  max-width: 100%;
}

.split,
.studio-teaser,
.studio-layout,
.admin-layout,
.content-manager,
.dev-grid,
.auth-panel,
.garage-modal,
.studio-compare-window {
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
}

.form-grid.two,
.member-fields,
.page-meta-row,
.studio-slider-grid,
.two-controls,
.segmented-grid,
.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(11.5rem, 100%), 1fr));
}

.tabs,
.admin-tabs,
.paint-swatches,
.saved-builds,
.studio-source-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(8rem, 100%), 1fr));
}

.comment-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.member-card-header,
.member-status-row,
.member-actions,
.member-badges,
.content-sidebar-heading,
.content-detail-heading,
.content-actions,
.upload-header,
.garage-modal-actions,
.tool-row,
.studio-controls-header,
.studio-readout,
.saved-build {
  min-width: 0;
}

.studio-readout {
  flex-wrap: wrap;
}

.studio-readout span,
.studio-readout strong {
  max-width: 100%;
}

.post-card,
.content-tab-button,
.saved-build,
.stat-card,
.tool-row {
  overflow: hidden;
}

.garage-modal-backdrop,
.studio-compare-backdrop {
  max-width: 100vw;
  max-height: 100svh;
}

.garage-modal,
.studio-compare-modal {
  max-width: calc(100vw - clamp(16px, 5vw, 56px));
  max-height: calc(100svh - clamp(16px, 5vw, 56px));
}

.garage-modal-panel,
.studio-compare-modal {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: clamp(10px, 4vw, 18px);
  }

  .brand {
    max-width: 100%;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .nav-links a {
    flex: 1 1 calc(50% - 6px);
    max-width: none;
  }

  .hero {
    min-height: max(500px, calc(100svh - var(--header-height)));
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .tool-row,
  .garage-modal-actions,
  .studio-readout,
  .saved-build {
    align-items: stretch;
  }

  .tool-row,
  .garage-modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .brand,
  .account-area,
  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .account-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
  }

  .account-area .primary-button,
  .account-area .secondary-button {
    width: 100%;
  }

  .nav-links a {
    flex: 0 0 auto;
    min-width: min(9rem, 46vw);
    scroll-snap-align: start;
  }

  .hero-actions,
  .action-row {
    grid-template-columns: 1fr;
  }

  .hero-actions > *,
  .action-row > * {
    width: 100%;
  }

  .garage-modal,
  .studio-compare-modal {
    max-width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
  }
}

.home-request-section {
  border-top: 1px solid rgba(201, 168, 90, 0.12);
  background:
    linear-gradient(280deg, rgba(201, 168, 90, 0.08), transparent 36%, rgba(0, 210, 200, 0.06)),
    #070809;
}

.invite-request-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: clamp(20px, 4vw, 54px);
  align-items: start;
}

.invite-request-form {
  width: 100%;
  margin: 0;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--collector-cream);
  border: 1px solid rgba(201, 168, 90, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(4, 5, 6, 0.86);
  font: inherit;
  outline: 0;
}

select:focus {
  border-color: var(--collector-gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 90, 0.16);
}

.garage-search-panel {
  margin: 0 0 24px;
  padding: var(--panel-pad);
  border: 1px solid rgba(201, 168, 90, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(8, 9, 10, 0.9);
}

.garage-search-heading,
.invite-request-head,
.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.garage-search-heading h2,
.profile-section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.garage-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  gap: 12px;
  align-items: end;
}

.garage-sort-label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #f0f0ea;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-sort-control {
  position: relative;
  min-width: 0;
}

.garage-sort-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: var(--collector-cream);
  border: 1px solid rgba(201, 168, 90, 0.36);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.16), rgba(201, 168, 90, 0.06)),
    rgba(4, 5, 6, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.22);
  font-size: 0.84rem;
  font-weight: 950;
  text-align: left;
  text-transform: none;
}

.garage-sort-chevron {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--collector-gold);
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 0.7rem;
  line-height: 1;
  transition: transform 0.16s ease;
}

.garage-sort-button:hover,
.garage-sort-button:focus-visible,
.garage-sort-control.is-open .garage-sort-button {
  border-color: rgba(240, 6, 63, 0.68);
  outline: none;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.26), rgba(201, 168, 90, 0.1)),
    rgba(9, 9, 10, 0.96);
  box-shadow:
    0 0 0 3px rgba(240, 6, 63, 0.14),
    0 14px 30px rgba(0, 0, 0, 0.28);
}

.garage-sort-control.is-open .garage-sort-chevron {
  transform: rotate(180deg);
}

.garage-sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 6px;
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(240, 6, 63, 0.11), rgba(201, 168, 90, 0.05)),
    rgba(8, 9, 10, 0.98);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top center;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.garage-sort-control.is-open .garage-sort-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.garage-sort-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  color: rgba(246, 239, 226, 0.84);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: left;
}

.garage-sort-option:hover,
.garage-sort-option:focus-visible {
  color: #fff;
  border-color: rgba(201, 168, 90, 0.28);
  outline: none;
  background: rgba(201, 168, 90, 0.12);
}

.garage-sort-option[aria-selected="true"] {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.42);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.72), rgba(159, 0, 38, 0.42)),
    rgba(240, 6, 63, 0.24);
  box-shadow: inset 3px 0 0 var(--collector-gold);
}

.garage-clear-search {
  align-self: end;
}

.garage-empty-action {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.profile-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 90, 0.52);
  text-underline-offset: 3px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 0 8px;
  color: #050606;
  border-radius: 999px;
  background: var(--collector-gold);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
  vertical-align: middle;
}

.metadata-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 12px;
}

.metadata-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: rgba(246, 239, 226, 0.82);
  border: 1px solid rgba(201, 168, 90, 0.22);
  border-radius: 999px;
  background: rgba(201, 168, 90, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.build-log-entry h4 {
  color: var(--collector-cream);
  text-transform: uppercase;
}

.garage-info-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(201, 168, 90, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.garage-info-block h3 {
  margin: 0;
  color: var(--collector-gold);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.garage-info-block p {
  margin: 0;
}

.timeline-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: rgba(246, 239, 226, 0.82);
}

.build-log-list {
  display: grid;
  gap: 12px;
}

.build-log-entry {
  display: grid;
  grid-template-columns: minmax(0, 112px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 168, 90, 0.14);
}

.build-log-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.build-log-entry picture,
.build-log-entry img {
  width: 100%;
}

.build-log-entry picture > img,
.build-log-entry img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid rgba(201, 168, 90, 0.16);
  border-radius: var(--radius-sm);
  background: var(--whole-media-frame-bg, #050505);
}

.build-log-entry span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.build-log-entry h4 {
  margin: 2px 0 5px;
  font-size: 0.94rem;
}

.build-log-entry p {
  margin: 0 0 5px;
}

.build-log-form,
.permission-form {
  padding-top: 10px;
  border-top: 1px solid rgba(201, 168, 90, 0.14);
}

.comment.is-hidden {
  opacity: 0.62;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-actions .text-button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.68rem;
}

.collection-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 150px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.collection-thumb {
  display: grid;
  gap: 7px;
  padding: 7px;
  color: var(--collector-cream);
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius-sm);
  background: #08090a;
  text-align: left;
}

.collection-thumb.active,
.collection-thumb:hover {
  border-color: rgba(201, 168, 90, 0.58);
  background: rgba(201, 168, 90, 0.12);
}

.collection-thumb picture,
.collection-thumb img,
.collection-thumb video {
  width: 100%;
}

.collection-thumb picture > img,
.collection-thumb img,
.collection-thumb video {
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.collection-thumb span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-hero-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  padding: var(--panel-pad);
  border: 1px solid rgba(201, 168, 90, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.12), transparent 36%, rgba(242, 10, 63, 0.08)),
    rgba(8, 9, 10, 0.94);
  box-shadow: var(--shadow);
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(72px, 10vw, 112px);
  height: clamp(72px, 10vw, 112px);
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(135deg, #f20a3f, #c9a85a 58%, #00d2c8);
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.profile-avatar.has-photo {
  background: #050606;
}

.profile-avatar picture,
.profile-avatar-image {
  width: 100%;
  height: 100%;
}

.profile-avatar picture {
  display: contents;
}

.profile-avatar-image {
  object-fit: cover;
  object-position: center center;
}

.profile-avatar-large {
  width: clamp(96px, 12vw, 150px);
  height: clamp(96px, 12vw, 150px);
}

.profile-photo-avatar-trigger {
  padding: 0;
  cursor: pointer;
  box-shadow:
    0 0 0 0 rgba(240, 6, 63, 0),
    0 18px 42px rgba(0, 0, 0, 0.34);
  transition:
    transform var(--motion-fast) var(--motion-ease-out),
    box-shadow var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    filter var(--motion-fast) ease;
}

.profile-photo-avatar-trigger:hover,
.profile-photo-avatar-trigger:focus-visible {
  border-color: rgba(240, 6, 63, 0.78);
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(240, 6, 63, 0.16),
    0 20px 54px rgba(0, 0, 0, 0.46);
  transform: translateY(-1px) scale(1.02);
}

.profile-photo-avatar-trigger:active {
  transform: translateY(1px) scale(0.985);
}

.profile-photo-avatar-hint {
  position: absolute;
  inset-inline: 10%;
  bottom: 12%;
  padding: 5px 7px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(246, 239, 226, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.52rem, 1.15vw, 0.66rem);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease-out);
}

.profile-photo-avatar-trigger:hover .profile-photo-avatar-hint,
.profile-photo-avatar-trigger:focus-visible .profile-photo-avatar-hint {
  opacity: 1;
  transform: translateY(0);
}

.mini-avatar,
.account-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
}

.profile-byline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-photo-form {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  max-width: min(620px, 100%);
  margin-top: 12px;
}

.profile-admin-tools-button {
  min-height: 42px;
  padding-inline: 18px;
  border-color: rgba(240, 6, 63, 0.46);
  background:
    linear-gradient(120deg, rgba(240, 6, 63, 0.2), rgba(201, 168, 90, 0.08)),
    rgba(0, 0, 0, 0.34);
}

.profile-signout-button {
  min-height: 42px;
  padding-inline: 18px;
  border-color: rgba(201, 168, 90, 0.34);
  background: rgba(0, 0, 0, 0.32);
}

.profile-tour-button {
  min-height: 42px;
  padding-inline: 18px;
  border-color: rgba(201, 168, 90, 0.34);
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.14), rgba(240, 6, 63, 0.08)),
    rgba(0, 0, 0, 0.3);
}

.profile-photo-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-details-form {
  width: min(620px, 100%);
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 168, 90, 0.16);
}

.profile-details-form textarea {
  min-height: 96px;
}

.profile-main h2 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.profile-main p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(7rem, 100%), 1fr));
  gap: 10px;
}

.profile-side-panel {
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.profile-user-summary {
  min-height: clamp(150px, 18vw, 210px);
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 68% 30%, rgba(242, 10, 63, 0.12), transparent 42%),
    rgba(0, 0, 0, 0.18);
}

.profile-user-summary .eyebrow {
  margin: 0;
}

.profile-user-summary h3 {
  margin: 0;
  color: var(--collector-cream);
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  line-height: 0.86;
  text-transform: uppercase;
}

.profile-user-summary > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.profile-activity-panel {
  width: 100%;
  margin: 0;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 168, 90, 0.16);
}

.activity-item span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.activity-item strong {
  color: var(--collector-cream);
}

.activity-item p {
  margin: 0;
}

.invite-request-list {
  display: grid;
  gap: 12px;
}

.invite-request-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(9, 10, 11, 0.82);
}

.invite-request-head {
  margin: 0;
}

.invite-request-head strong {
  color: var(--collector-cream);
  text-transform: uppercase;
}

.invite-request-copy {
  display: grid;
  gap: 4px;
}

.invite-request-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.invite-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  padding: clamp(14px, 4vw, 34px);
  background: rgba(0, 0, 0, 0.26);
  pointer-events: auto;
}

.tour-highlight {
  position: fixed;
  z-index: 141;
  min-width: 36px;
  min-height: 36px;
  border: 2px solid var(--collector-gold);
  border-radius: var(--radius-sm);
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.62),
    0 0 0 6px rgba(201, 168, 90, 0.18),
    0 18px 54px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.tour-card {
  position: fixed;
  left: 50%;
  bottom: clamp(14px, 4vw, 34px);
  z-index: 142;
  width: min(480px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  padding: clamp(14px, 3vw, 18px);
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(201, 168, 90, 0.14), transparent 40%, rgba(242, 10, 63, 0.12)),
    #08090a;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.tour-backdrop[data-placement="top"] .tour-card {
  top: calc(var(--header-height) + 14px);
  bottom: auto;
}

.tour-card h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Black", Inter, sans-serif;
  font-size: clamp(1.55rem, 5vw, 2.25rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.tour-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tour-instruction {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(201, 168, 90, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 90, 0.08);
}

.tour-instruction strong {
  color: var(--collector-gold);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.tour-instruction span {
  color: var(--collector-cream);
  font-size: 0.86rem;
  font-weight: 800;
}

.tour-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tour-progress span {
  flex: 1 1 28px;
  max-width: 48px;
  height: 4px;
  border-radius: 999px;
  background: rgba(246, 239, 226, 0.18);
}

.tour-progress span.active {
  background: var(--collector-gold);
}

.tour-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 640px) {
  .tour-card {
    right: 10px;
    left: 10px;
    width: auto;
    max-height: min(54vh, 420px);
    overflow: auto;
    transform: none;
  }

  .tour-card h2 {
    font-size: clamp(1.45rem, 9vw, 2.05rem);
  }

  .tour-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .profile-hero-panel,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-side-panel {
    order: -1;
  }

  .profile-activity-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .garage-search-heading,
  .profile-section-heading,
  .invite-request-head {
    align-items: stretch;
    flex-direction: column;
  }

  .invite-request-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .garage-search-row {
    grid-template-columns: 1fr;
  }

  .build-log-entry {
    grid-template-columns: 1fr;
  }

  .garage-media-preview {
    min-height: clamp(180px, 35vh, 280px);
  }
}

/* Light mode polish */
html[data-color-scheme="light"] {
  color-scheme: light;
  --paper: #f4f6f4;
  --panel: #fffdf7;
  --panel-2: #e9eef0;
  --ink: #171511;
  --muted: #625b51;
  --line: rgba(62, 50, 34, 0.18);
  --red: #c71438;
  --red-dark: #8d0d26;
  --teal: #087d7a;
  --collector-gold: #8c681d;
  --collector-brass: #6d5426;
  --collector-cream: #fffdf7;
  --chrome: #596167;
  --smoke: #eef2f2;
  --shadow: 0 24px 70px rgba(28, 25, 20, 0.16);
}

html[data-color-scheme="light"] body {
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(199, 20, 56, 0.08), transparent 24%, transparent 72%, rgba(8, 125, 122, 0.08)),
    linear-gradient(180deg, #f8faf8 0%, #edf2f2 42%, #f7f4ea 100%);
}

html[data-color-scheme="light"] body[data-route="studio"] {
  background:
    linear-gradient(120deg, rgba(199, 20, 56, 0.11), transparent 30%, rgba(8, 125, 122, 0.12)),
    linear-gradient(180deg, #f9fbfa 0%, #eef4f4 48%, #f7f1e7 100%);
}

html[data-color-scheme="light"] body::before {
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(23, 21, 17, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 125, 122, 0.04) 1px, transparent 1px);
}

html[data-color-scheme="light"] .site-header {
  color: var(--ink);
  border-bottom-color: rgba(140, 104, 29, 0.28);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 12px 38px rgba(28, 25, 20, 0.12);
}

html[data-color-scheme="light"] .brand,
html[data-color-scheme="light"] .section h2,
html[data-color-scheme="light"] .panel h2,
html[data-color-scheme="light"] .upload-panel h2,
html[data-color-scheme="light"] .empty-state h2,
html[data-color-scheme="light"] label,
html[data-color-scheme="light"] td,
html[data-color-scheme="light"] .post-meta,
html[data-color-scheme="light"] .member-identity strong,
html[data-color-scheme="light"] .tool-row strong {
  color: var(--ink);
}

html[data-color-scheme="light"] .nav-links a {
  color: rgba(23, 21, 17, 0.62);
}

html[data-color-scheme="light"] .nav-links a.active,
html[data-color-scheme="light"] .nav-links a:hover {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(140, 104, 29, 0.18), rgba(199, 20, 56, 0.1));
}

html[data-color-scheme="light"] .nav-admin-separator {
  background: rgba(140, 104, 29, 0.24);
}

html[data-color-scheme="light"] .admin-nav-link {
  color: #7a5815 !important;
  border-color: rgba(140, 104, 29, 0.28);
  background: rgba(140, 104, 29, 0.08);
}

html[data-color-scheme="light"] .account-chip,
html[data-color-scheme="light"] .secondary-button,
html[data-color-scheme="light"] .icon-button,
html[data-color-scheme="light"] .role-chip,
html[data-color-scheme="light"] .manage-chip {
  color: var(--ink);
  border-color: rgba(140, 104, 29, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(237, 242, 242, 0.72)),
    #fffdf7;
}

html[data-color-scheme="light"] .account-chip-role {
  color: #7a5815;
}

html[data-color-scheme="light"] .secondary-button:hover,
html[data-color-scheme="light"] .icon-button:hover {
  border-color: rgba(199, 20, 56, 0.42);
  box-shadow: 0 12px 28px rgba(140, 104, 29, 0.12);
}

html[data-color-scheme="light"] .primary-button,
html[data-color-scheme="light"] .danger-button {
  color: #fff;
  background:
    linear-gradient(135deg, #e41d48, #b11033 58%, #7b0920);
  box-shadow: 0 16px 34px rgba(199, 20, 56, 0.24);
}

html[data-color-scheme="light"] .hero::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44) 48%, rgba(0, 0, 0, 0.14)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 54%),
    linear-gradient(118deg, transparent 56%, rgba(140, 104, 29, 0.18) 56%, rgba(199, 20, 56, 0.11) 64%, transparent 64%);
}

html[data-color-scheme="light"] .hero h1,
html[data-color-scheme="light"] .hero p,
html[data-color-scheme="light"] .auth-media h2,
html[data-color-scheme="light"] .auth-media p:not(.eyebrow) {
  color: #fffdf7;
}

html[data-color-scheme="light"] .hero-fade img,
html[data-color-scheme="light"] .hero-fade video,
html[data-color-scheme="light"] .feature-fade img,
html[data-color-scheme="light"] .feature-fade video,
html[data-color-scheme="light"] .about-media img,
html[data-color-scheme="light"] .about-media video,
html[data-color-scheme="light"] .wide-fade img,
html[data-color-scheme="light"] .wide-fade video,
html[data-color-scheme="light"] .post-card-media > img,
html[data-color-scheme="light"] .post-card-media > video {
  filter: saturate(1.02) contrast(1.04) brightness(0.94);
}

html[data-color-scheme="light"] .panel,
html[data-color-scheme="light"] .upload-panel,
html[data-color-scheme="light"] .studio-teaser,
html[data-color-scheme="light"] .auth-panel,
html[data-color-scheme="light"] .member-card,
html[data-color-scheme="light"] .stat-card,
html[data-color-scheme="light"] .content-tab-button,
html[data-color-scheme="light"] .saved-build,
html[data-color-scheme="light"] .asset-item,
html[data-color-scheme="light"] .empty-state,
html[data-color-scheme="light"] .post-card {
  border-color: rgba(62, 50, 34, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(232, 237, 238, 0.38)),
    #fffdf7;
  box-shadow: var(--shadow);
}

html[data-color-scheme="light"] .section p,
html[data-color-scheme="light"] .panel p,
html[data-color-scheme="light"] .muted,
html[data-color-scheme="light"] .post-stats,
html[data-color-scheme="light"] .comment-meta,
html[data-color-scheme="light"] .tool-row span,
html[data-color-scheme="light"] .content-tab-button small,
html[data-color-scheme="light"] .member-identity span,
html[data-color-scheme="light"] .member-status-row span {
  color: var(--muted);
}

html[data-color-scheme="light"] .post-description,
html[data-color-scheme="light"] .photo-caption,
html[data-color-scheme="light"] .comment p {
  color: #2b261e;
}

html[data-color-scheme="light"] .pending-pass-key,
html[data-color-scheme="light"] .pending-pass-key code {
  color: var(--ink);
}

html[data-color-scheme="light"] .photo-title-line {
  color: #16120d;
}

html[data-color-scheme="light"] input,
html[data-color-scheme="light"] textarea,
html[data-color-scheme="light"] select {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

html[data-color-scheme="light"] input::placeholder,
html[data-color-scheme="light"] textarea::placeholder {
  color: rgba(98, 91, 81, 0.72);
}

html[data-color-scheme="light"] input:focus,
html[data-color-scheme="light"] textarea:focus,
html[data-color-scheme="light"] select:focus {
  border-color: var(--collector-gold);
  box-shadow: 0 0 0 3px rgba(140, 104, 29, 0.16);
}

html[data-color-scheme="light"] .brand-ribbon-section,
html[data-color-scheme="light"] .content-divider {
  background:
    linear-gradient(90deg, rgba(140, 104, 29, 0.12), transparent 34%, transparent 66%, rgba(199, 20, 56, 0.08)),
    #f2f5f4;
  border-color: rgba(140, 104, 29, 0.18);
}

html[data-color-scheme="light"] .home-section-divider {
  background:
    linear-gradient(90deg, transparent, rgba(140, 104, 29, 0.1) 20%, rgba(199, 20, 56, 0.06) 50%, rgba(140, 104, 29, 0.1) 80%, transparent),
    #f4f6f4;
}

html[data-color-scheme="light"] .logo-banner {
  border-color: rgba(140, 104, 29, 0.26);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76) 18%, rgba(255, 255, 255, 0.76) 82%, transparent),
    rgba(232, 237, 238, 0.76);
}

html[data-color-scheme="light"] .logo-banner img {
  opacity: 0.8;
  filter: grayscale(1) contrast(1.2);
  mix-blend-mode: multiply;
}

html[data-color-scheme="light"] body[data-route="studio"] .studio-layout::before {
  background:
    linear-gradient(135deg, rgba(199, 20, 56, 0.1), transparent 32%, rgba(8, 125, 122, 0.12));
  border-color: rgba(8, 125, 122, 0.16);
}

html[data-color-scheme="light"] body[data-route="studio"] .studio-preview {
  border-color: rgba(199, 20, 56, 0.28);
  box-shadow:
    0 24px 70px rgba(28, 25, 20, 0.2),
    0 0 0 1px rgba(8, 125, 122, 0.14),
    0 0 46px rgba(199, 20, 56, 0.12);
}

html[data-color-scheme="light"] .studio-controls .panel,
html[data-color-scheme="light"] body[data-route="studio"] .panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(232, 237, 238, 0.48)),
    #fffdf7;
}

html[data-color-scheme="light"] .segment-button,
html[data-color-scheme="light"] .studio-source-button,
html[data-color-scheme="light"] .ai-enhance-button {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 237, 238, 0.56)),
    #fffdf7;
}

html[data-color-scheme="light"] .segment-button span,
html[data-color-scheme="light"] .studio-source-button span,
html[data-color-scheme="light"] .ai-enhance-button span {
  color: var(--muted);
}

html[data-color-scheme="light"] .segment-button.active,
html[data-color-scheme="light"] .segment-button:hover,
html[data-color-scheme="light"] .studio-source-button.active,
html[data-color-scheme="light"] .studio-source-button:hover,
html[data-color-scheme="light"] .ai-enhance-button.active,
html[data-color-scheme="light"] .ai-enhance-button:hover {
  color: #15110d;
  border-color: rgba(8, 125, 122, 0.34);
  background:
    linear-gradient(120deg, rgba(199, 20, 56, 0.1), rgba(8, 125, 122, 0.12)),
    #fffdf7;
}

html[data-color-scheme="light"] .garage-modal,
html[data-color-scheme="light"] .studio-compare-modal,
html[data-color-scheme="light"] .confirm-dialog {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.2);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 237, 238, 0.52)),
    #fffdf7;
  box-shadow: 0 34px 100px rgba(28, 25, 20, 0.28);
}

html[data-color-scheme="light"] .garage-modal-panel {
  background:
    linear-gradient(145deg, rgba(140, 104, 29, 0.07), transparent 34%),
    #fffdf7;
}

html[data-color-scheme="light"] .garage-modal-backdrop,
html[data-color-scheme="light"] .studio-compare-backdrop,
html[data-color-scheme="light"] .confirm-dialog-backdrop {
  background: rgba(22, 19, 15, 0.42);
}

html[data-color-scheme="light"] .confirm-dialog-copy h2 {
  color: var(--ink);
}

html[data-color-scheme="light"] .confirm-dialog-copy p:not(.eyebrow),
html[data-color-scheme="light"] .garage-empty-comments {
  color: var(--muted);
}

html[data-color-scheme="light"] .toast,
html[data-color-scheme="light"] .notice {
  color: var(--ink);
  border-color: rgba(140, 104, 29, 0.28);
  background:
    linear-gradient(120deg, rgba(140, 104, 29, 0.12), rgba(199, 20, 56, 0.08)),
    #fffdf7;
}

html[data-color-scheme="light"] .home-request-section,
html[data-color-scheme="light"] .owner-proof-section,
html[data-color-scheme="light"] .garage-search-panel,
html[data-color-scheme="light"] .profile-hero-panel,
html[data-color-scheme="light"] .tour-card,
html[data-color-scheme="light"] .invite-request-card,
html[data-color-scheme="light"] .social-proof-card,
html[data-color-scheme="light"] .garage-info-block,
html[data-color-scheme="light"] .collection-thumb,
html[data-color-scheme="light"] .car-detail-panel,
html[data-color-scheme="light"] .audit-row {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(232, 237, 238, 0.42)),
    #fffdf7;
}

html[data-color-scheme="light"] .metadata-badges span {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.16);
  background: rgba(140, 104, 29, 0.08);
}

html[data-color-scheme="light"] .pending-pass-key button {
  color: #3b3020;
  border-color: rgba(140, 104, 29, 0.24);
  background: rgba(140, 104, 29, 0.08);
}

html[data-color-scheme="light"] .pending-pass-key button:hover {
  color: #171511;
  border-color: rgba(199, 20, 56, 0.34);
  background: rgba(199, 20, 56, 0.08);
}

html[data-color-scheme="light"] .timeline-list,
html[data-color-scheme="light"] .activity-item strong,
html[data-color-scheme="light"] .invite-request-head strong,
html[data-color-scheme="light"] .social-proof-card h3,
html[data-color-scheme="light"] .build-log-entry h4,
html[data-color-scheme="light"] .car-detail-panel h1,
html[data-color-scheme="light"] .audit-row strong,
html[data-color-scheme="light"] .collection-thumb {
  color: var(--ink);
}

html[data-color-scheme="light"] .audit-row code {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.16);
  background: rgba(140, 104, 29, 0.08);
}

/* Action affordance pass: make controls and read-only labels visually distinct. */
:where(
  .primary-button,
  .secondary-button,
  .danger-button,
  .text-button,
  .icon-button,
  .tab-button,
  .segment-button,
  .ai-enhance-button,
  .content-tab-button,
  .collection-thumb,
  .member-card-header,
  [data-open-post]
) {
  cursor: pointer;
}

:where(
  .account-chip,
  .content-count,
  .role-chip,
  .manage-chip,
  .verified-badge,
  .metadata-badges span,
  .stat-card,
  .tool-row,
  .notice-code,
  .meter,
  .saved-chip
) {
  cursor: default;
  box-shadow: none;
}

.account-profile-link {
  cursor: pointer;
}

:where(
  .primary-button,
  .secondary-button,
  .danger-button,
  .icon-button,
  .tab-button,
  .segment-button,
  .ai-enhance-button,
  .content-tab-button,
  .collection-thumb,
  [data-open-post]
):not(:disabled) {
  position: relative;
}

:where(
  .primary-button,
  .secondary-button,
  .danger-button,
  .icon-button,
  .tab-button,
  .segment-button,
  .ai-enhance-button,
  .content-tab-button,
  .collection-thumb
):not(:disabled):hover {
  filter: brightness(1.08);
}

.text-button {
  min-height: 34px;
  padding-inline: 4px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-button:hover {
  background: transparent;
}

.account-chip {
  min-height: 32px;
  color: rgba(246, 239, 226, 0.82);
  border-style: dotted;
  background: rgba(201, 168, 90, 0.045);
}

.content-count {
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 4px 0;
  color: var(--collector-gold, var(--gold));
  border: 0;
  background: transparent;
}

.role-chip,
.metadata-badges span {
  min-height: 0;
  padding: 0;
  color: rgba(246, 239, 226, 0.7);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.role-chip.admin {
  color: var(--collector-gold, var(--gold));
  border: 0;
  background: transparent;
}

.verified-badge {
  min-height: 0;
  padding: 0;
  color: var(--collector-gold, var(--gold));
  border-radius: 0;
  background: transparent;
}

.manage-chip {
  min-height: 0;
  padding: 0;
  color: var(--collector-gold, var(--gold));
  border: 0;
  background: transparent;
}

.manage-chip::after {
  content: " +";
}

.member-dropdown[open] .manage-chip {
  border: 0;
  background: transparent;
}

.member-dropdown[open] .manage-chip::after {
  content: " -";
}

.stat-card,
.tool-row {
  background: rgba(9, 10, 11, 0.58);
}

.post-card-media,
.garage-modal-media,
.collection-thumb {
  cursor: pointer;
}

.post-card-media::after {
  content: "Open";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  padding: 5px 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.64);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.post-card-media:hover::after,
.post-card-media:focus-visible::after {
  opacity: 1;
}

html[data-color-scheme="light"] :where(.role-chip, .metadata-badges span) {
  color: rgba(23, 21, 17, 0.68);
}

html[data-color-scheme="light"] :where(.role-chip.admin, .verified-badge, .manage-chip, .content-count) {
  color: #7a5815;
}

html[data-color-scheme="light"] .account-chip {
  background: rgba(140, 104, 29, 0.045);
}

/* Whole-object media fit guardrails. Keep this late so every frame shows the full subject. */
:root {
  --whole-media-frame-bg: #050505;
  --ambient-page-bg: #050606;
  --ambient-page-bg-soft: rgba(5, 6, 6, 0.82);
  --ambient-page-bg-mid: rgba(5, 6, 6, 0.46);
  --ambient-page-bg-clear: rgba(5, 6, 6, 0);
  --ambient-frame-bg: #050505;
  --ambient-frame-bg-soft: rgba(5, 5, 5, 0.82);
  --ambient-frame-bg-clear: rgba(5, 5, 5, 0);
}

html[data-color-scheme="light"] {
  --whole-media-frame-bg: #f2f5f4;
  --ambient-page-bg: #f4f6f4;
  --ambient-page-bg-soft: rgba(244, 246, 244, 0.72);
  --ambient-page-bg-mid: rgba(244, 246, 244, 0.34);
  --ambient-page-bg-clear: rgba(244, 246, 244, 0);
  --ambient-frame-bg: #ffffff;
  --ambient-frame-bg-soft: rgba(255, 255, 255, 0.9);
  --ambient-frame-bg-clear: rgba(255, 255, 255, 0);
}

:where(
  .fade-slideshow,
  .studio-preview,
  .studio-source-button,
  .post-card-media,
  .media-tile,
  .asset-item,
  .car-detail-media,
  .garage-modal-media,
  .auth-media
) {
  background: var(--whole-media-frame-bg);
}

:where(
  .fade-slide img,
  .fade-slide video,
  .hero-fade img,
  .hero-fade video,
  .feature-fade img,
  .feature-fade video,
  .about-media img,
  .about-media video,
  .wide-fade img,
  .wide-fade video,
  .auth-media img,
  .auth-media video,
  .studio-vehicle-photo,
  .studio-source-button img,
  .media-tile img,
  .media-tile video,
  .post-card-media > img,
  .post-card-media > video,
  .car-detail-media img,
  .car-detail-media video,
  .garage-modal-media img,
  .garage-modal-media video,
  .asset-item img,
  .asset-item video
) {
  object-fit: contain !important;
  object-position: center center !important;
  background: var(--whole-media-frame-bg);
}

:where(
  .fade-slide img,
  .fade-slide video,
  .hero-fade img,
  .hero-fade video,
  .feature-fade img,
  .feature-fade video,
  .about-media img,
  .about-media video,
  .wide-fade img,
  .wide-fade video,
  .auth-media img,
  .auth-media video,
  .studio-vehicle-photo,
  .garage-modal-media img,
  .garage-modal-media video
) {
  width: 100%;
  height: 100%;
}

:where(
  .feature-fade,
  .about-media,
  .wide-fade,
  .post-card-media,
  .media-tile,
  .asset-item,
  .car-detail-media,
  .garage-modal-media
) {
  position: relative;
}

:where(
  .feature-fade,
  .about-media,
  .wide-fade,
  .post-card-media,
  .media-tile,
  .asset-item,
  .car-detail-media,
  .garage-modal-media
).media-outline-ready {
  border-color: transparent !important;
}

:where(
  .feature-fade,
  .about-media,
  .wide-fade,
  .post-card-media,
  .media-tile,
  .asset-item,
  .car-detail-media,
  .garage-modal-media
).media-outline-ready::before {
  content: "";
  position: absolute;
  left: var(--media-outline-x, 0);
  top: var(--media-outline-y, 0);
  z-index: 4;
  width: min(var(--media-outline-width, 100%), 100%);
  height: min(var(--media-outline-height, 100%), 100%);
  border: 1px solid var(--line);
  border-radius: inherit;
  transform: none;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(201, 168, 90, 0.08);
}

/* Hero ambient media fade */
.hero-fade {
  z-index: 0;
  background: var(--ambient-page-bg);
}

.hero-fade::before,
.hero-fade::after,
.fade-slideshow.media-outline-ready:not(.hero-fade)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-fade::before {
  z-index: 2;
  background:
    linear-gradient(90deg, var(--ambient-page-bg) 0%, var(--ambient-page-bg-soft) 8%, var(--ambient-page-bg-clear) 25%, var(--ambient-page-bg-clear) 58%, var(--ambient-page-bg-mid) 75%, var(--ambient-page-bg) 100%),
    linear-gradient(180deg, var(--ambient-page-bg) 0%, var(--ambient-page-bg-clear) 15%, var(--ambient-page-bg-clear) 78%, var(--ambient-page-bg) 100%);
}

.hero-fade::after {
  z-index: 3;
  background:
    radial-gradient(ellipse at 68% 52%, transparent 0 34%, var(--ambient-page-bg-clear) 50%, var(--ambient-page-bg-soft) 88%, var(--ambient-page-bg) 100%),
    linear-gradient(90deg, transparent 0 52%, var(--ambient-page-bg-mid) 80%, var(--ambient-page-bg) 100%);
}

.hero-copy {
  z-index: 3;
}

.fade-slideshow.media-outline-ready:not(.hero-fade)::after {
  z-index: 2;
  background:
    linear-gradient(90deg, var(--ambient-frame-bg-soft) 0%, var(--ambient-frame-bg-clear) 11%, var(--ambient-frame-bg-clear) 89%, var(--ambient-frame-bg-soft) 100%),
    linear-gradient(180deg, var(--ambient-frame-bg-soft) 0%, var(--ambient-frame-bg-clear) 13%, var(--ambient-frame-bg-clear) 87%, var(--ambient-frame-bg-soft) 100%);
}

/* Light mode white media fade */
html[data-color-scheme="light"] .fade-slideshow.media-outline-ready:not(.hero-fade) {
  background: #ffffff;
  box-shadow:
    0 18px 48px rgba(62, 50, 34, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.72);
}

html[data-color-scheme="light"] .fade-slideshow.media-outline-ready:not(.hero-fade)::after {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.7) 6%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0) 84%, rgba(255, 255, 255, 0.7) 94%, rgba(255, 255, 255, 0.96) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0) 76%, rgba(255, 255, 255, 0.78) 91%, rgba(255, 255, 255, 0.98) 100%);
}

html[data-color-scheme="light"] :where(.feature-fade, .about-media, .wide-fade).media-outline-ready {
  background: #ffffff;
  box-shadow:
    0 18px 48px rgba(62, 50, 34, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.72);
}

html[data-color-scheme="light"] :where(.feature-fade, .about-media, .wide-fade).media-outline-ready::before {
  border-color: rgba(140, 104, 29, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92);
}

html[data-color-scheme="light"] :where(
  .feature-fade img,
  .feature-fade video,
  .about-media img,
  .about-media video,
  .wide-fade img,
  .wide-fade video
) {
  filter: saturate(1.02) contrast(1.02) brightness(0.98);
}

html[data-color-scheme="light"] .fade-slide .photo-caption {
  color: #211c15;
  border-color: rgba(140, 104, 29, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(62, 50, 34, 0.1);
}

html[data-color-scheme="light"] .fade-slide .photo-title-line {
  color: #171511;
}

html[data-color-scheme="light"] .fade-slide .photo-title-line span,
html[data-color-scheme="light"] .fade-slide .photo-caption > span:not(.photo-title-line) {
  color: rgba(68, 59, 48, 0.78);
}

.studio-vehicle-photo {
  transform: none !important;
}

html[data-color-scheme="light"] .home-value-section,
html[data-color-scheme="light"] .home-featured-section,
html[data-color-scheme="light"] .home-invite-section {
  background:
    linear-gradient(120deg, rgba(140, 104, 29, 0.1), transparent 36%, rgba(199, 20, 56, 0.07)),
    #f4f6f4;
}

html[data-color-scheme="light"] .home-step-card {
  color: var(--ink);
  border-color: rgba(62, 50, 34, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(232, 237, 238, 0.42)),
    #fffdf7;
}

html[data-color-scheme="light"] .home-step-card h3,
html[data-color-scheme="light"] .home-value-points span {
  color: var(--ink);
}

html[data-color-scheme="light"] .home-value-points span {
  border: 0;
  background: transparent;
}

html[data-color-scheme="light"] .home-value-points span::before {
  background: #8d6b23;
  box-shadow: 0 0 0 4px rgba(141, 107, 35, 0.1);
}

@media (max-width: 900px) {
  .car-detail-grid {
    grid-template-columns: 1fr;
  }

  .car-detail-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .audit-row {
    grid-template-columns: 1fr;
  }

  .car-detail-media {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  body[data-route="home"]:not(.is-signed-in) .site-header {
    display: none;
  }

  .hero {
    min-height: max(520px, calc(100svh - var(--header-height)));
    align-items: start;
    justify-items: center;
    padding: 18px 16px 28px;
  }

  .hero-copy {
    width: min(100%, 360px);
    min-height: min(560px, calc(100svh - var(--header-height) - 46px));
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    align-content: start;
    justify-items: center;
    gap: 14px;
    margin-block: 0;
    padding: 24px 20px 20px;
    text-align: center;
    border: 1px solid rgba(201, 168, 90, 0.26);
    border-radius: var(--radius);
    background:
      linear-gradient(180deg, rgba(246, 239, 226, 0.07), rgba(246, 239, 226, 0.018)),
      rgba(7, 8, 9, 0.82);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
  }

  .phone-home-logo {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 90, 0.34);
    border-radius: 999px;
    background: #050606;
    box-shadow:
      0 0 0 6px rgba(201, 168, 90, 0.08),
      0 16px 36px rgba(0, 0, 0, 0.36);
  }

  .phone-home-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .privacy-eyebrow {
    justify-content: center;
    margin: 0;
    font-size: 0.64rem;
    line-height: 1.35;
  }

  .privacy-eyebrow::before {
    display: none;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10vw, 2.75rem);
    line-height: 0.92;
  }

  .hero p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .guest-hero-actions {
    display: none;
  }

  .phone-home-passkey-form {
    align-self: end;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-top: 10px;
  }

  .phone-home-passkey-form label {
    min-width: 0;
    margin: 0;
  }

  .phone-home-passkey-form label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .phone-home-passkey-form input {
    min-height: 48px;
    text-align: center;
    letter-spacing: 0.08em;
  }

  .phone-home-passkey-form .primary-button {
    min-width: 58px;
    min-height: 48px;
    padding-inline: 14px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.55rem);
  }
}

/* Visible viewport fitting. The JS keeps --safe-vw matched to what the device can actually see. */
html,
body {
  width: var(--safe-vw);
  max-width: var(--safe-vw);
  overflow-x: hidden;
}

body,
.page,
#app,
.site-header {
  max-width: var(--safe-vw);
}

:where(
  .section,
  .section-inner,
  .site-header,
  .hero,
  .hero-copy,
  .hero-actions,
  .nav-links,
  .account-area,
  .admin-layout,
  .content-manager,
  .studio-layout,
  .auth-panel,
  .garage-modal,
  .car-detail-grid,
  .profile-hero-panel,
  .profile-layout,
  .home-value-grid,
  .home-featured-grid,
  .home-owner-grid,
  .home-community-grid,
  .home-invite-band,
  .invite-request-grid
) {
  width: min(100%, var(--safe-vw));
  max-width: min(100%, var(--safe-vw));
}

.nav-links {
  flex-wrap: wrap !important;
  justify-content: center;
  overflow-x: visible !important;
  white-space: normal;
}

.nav-links a {
  flex: 1 1 clamp(7rem, 18vw, 10rem);
  min-width: 0 !important;
  max-width: 100%;
}

.nav-admin-separator {
  display: none;
}

.account-area,
.hero-actions,
.action-row,
.garage-modal-actions,
.member-actions,
.invite-request-actions,
.content-actions,
.home-invite-actions {
  min-width: 0;
  max-width: 100%;
}

.audit-row code,
table,
th,
td,
.tool-row,
.comment,
.build-log-entry,
.collection-thumb,
.activity-item,
.invite-request-card {
  white-space: normal;
  overflow-wrap: anywhere;
}

.audit-row code,
.tool-row {
  overflow-x: hidden;
}

.viewport-narrow .site-header {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}

.viewport-narrow .brand,
.viewport-narrow .account-area,
.viewport-narrow .nav-links {
  width: 100%;
  justify-content: center;
}

.viewport-narrow .account-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
}

.viewport-narrow .account-area > * {
  width: 100%;
}

.viewport-tight .nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viewport-tight .nav-links a {
  width: 100%;
  min-height: 42px;
}

.viewport-tight .brand {
  white-space: normal;
  text-align: center;
}

.viewport-tight .brand .brand-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Home hero format: logo, title, then first-time invite key. */
body[data-route="home"] .hero {
  align-items: start;
  justify-items: center;
  min-height: max(620px, calc(100svh - var(--header-height)));
  padding: clamp(54px, 8vh, 90px) var(--page-gutter) clamp(42px, 7vh, 76px);
  text-align: center;
}

body[data-route="home"] .hero::after {
  background:
    radial-gradient(ellipse at 50% 28%, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.44));
}

body[data-route="home"] .hero-fade {
  opacity: 1;
}

body[data-route="home"] .hero-fade img,
body[data-route="home"] .hero-fade video {
  object-fit: cover !important;
  filter: saturate(1.12) contrast(1.08) brightness(1);
}

body[data-route="home"] .hero-fade::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.1) 22%, rgba(0, 0, 0, 0.1) 78%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 22%, transparent 76%, rgba(0, 0, 0, 0.34));
}

body[data-route="home"] .hero-fade::after {
  background:
    radial-gradient(ellipse at 50% 48%, transparent 0 52%, rgba(0, 0, 0, 0.22) 82%, rgba(0, 0, 0, 0.42) 100%);
}

body[data-route="home"] .hero-copy {
  z-index: 4;
  width: min(920px, 100%);
  max-width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
}

/* Main logo: scale to exactly 20% of the browser width. */
body[data-route="home"] .hero .home-hero-logo {
  display: grid;
  place-items: center;
  width: 20vw;
  height: 20vw;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 90, 0.42);
  border-radius: 999px;
  background: rgba(5, 6, 6, 0.82);
  box-shadow:
    0 0 0 10px rgba(201, 168, 90, 0.08),
    0 24px 56px rgba(0, 0, 0, 0.48);
}

body[data-route="home"] .hero .home-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-route="home"] .hero h1 {
  max-width: min(900px, 100%);
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 6.6rem);
  line-height: 0.86;
}

body[data-route="home"] .home-passkey-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(460px, 100%);
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(201, 168, 90, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(246, 239, 226, 0.07), rgba(246, 239, 226, 0.018)),
    rgba(7, 8, 9, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

body[data-route="home"] .home-passkey-form label {
  min-width: 0;
  margin: 0;
  text-align: left;
}

body[data-route="home"] .home-passkey-form label span {
  color: rgba(246, 239, 226, 0.84);
}

body[data-route="home"] .home-passkey-form input {
  min-height: 48px;
  text-align: center;
  letter-spacing: 0.08em;
}

body[data-route="home"] .home-passkey-form .primary-button {
  align-self: end;
  min-height: 48px;
}

body[data-route="home"] .home-enter-garage-button {
  width: min(460px, 100%);
  min-height: 58px;
  font-size: clamp(0.88rem, 1.6vw, 1.05rem);
  box-shadow:
    0 18px 44px rgba(240, 6, 63, 0.3),
    0 0 0 1px rgba(246, 239, 226, 0.08) inset;
}

body[data-route="home"] .already-member-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -4px;
  color: rgba(246, 239, 226, 0.84);
  font-size: 0.78rem;
  font-weight: 950;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 90, 0.72);
  text-underline-offset: 4px;
  text-transform: uppercase;
}

body[data-route="home"] .already-member-link:hover,
body[data-route="home"] .already-member-link:focus-visible {
  color: #fff;
  text-decoration-color: var(--red);
}

.key-access-section {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  align-items: center;
}

.key-access-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  overflow: hidden;
  padding: clamp(22px, 5vw, 56px);
  border: 1px solid rgba(201, 168, 90, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 18%, rgba(240, 6, 63, 0.22), transparent 32%),
    radial-gradient(circle at 78% 70%, rgba(201, 168, 90, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(40, 0, 10, 0.78), rgba(0, 0, 0, 0.9) 55%, rgba(0, 18, 17, 0.72)),
    #050505;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(246, 239, 226, 0.035);
}

.key-access-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(246, 239, 226, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 239, 226, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  pointer-events: none;
}

.key-access-copy,
.key-access-card {
  position: relative;
  z-index: 1;
}

.key-access-copy {
  display: grid;
  gap: 14px;
}

.key-access-copy .page-home-logo {
  width: clamp(132px, 22vw, 260px);
  height: clamp(132px, 22vw, 260px);
  margin: 0 0 6px;
}

.key-access-copy h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(3.6rem, 9vw, 7.4rem);
  line-height: 0.82;
  text-transform: uppercase;
}

.key-access-copy p:not(.eyebrow) {
  max-width: 520px;
  margin: 0;
  color: rgba(246, 239, 226, 0.76);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.45;
}

.key-access-card {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(201, 168, 90, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(246, 239, 226, 0.07), rgba(246, 239, 226, 0.018)),
    rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.key-passkey-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.key-passkey-form label {
  min-width: 0;
  margin: 0;
}

.key-passkey-form input {
  min-height: 56px;
  text-align: center;
  letter-spacing: 0.12em;
}

.key-passkey-form .primary-button {
  min-height: 56px;
}

.key-member-link {
  margin-top: 0;
  justify-self: center;
}

body[data-route="key"] .site-header {
  background:
    linear-gradient(180deg, rgba(65, 0, 14, 0.16), rgba(0, 0, 0, 0.04)),
    rgba(0, 0, 0, 0.06);
}

body[data-route="home"] .hero-supporting-copy {
  width: min(44rem, 100%);
  margin: 0;
  color: rgba(246, 239, 226, 0.8);
}

body[data-route="home"] .home-members-dropdown {
  width: min(560px, 100%);
  text-align: left;
}

.home-members-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px;
  color: #fff8ed;
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.15), rgba(201, 168, 90, 0.06)),
    rgba(0, 0, 0, 0.48);
  list-style: none;
  cursor: pointer;
}

.home-members-dropdown summary::-webkit-details-marker {
  display: none;
}

.home-members-dropdown summary strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-members-dropdown summary small {
  display: block;
  margin-top: 2px;
  color: rgba(246, 239, 226, 0.7);
  font-size: 0.74rem;
  font-weight: 850;
}

.home-members-dropdown summary:hover,
.home-members-dropdown summary:focus-visible,
.home-members-dropdown[open] summary {
  border-color: rgba(240, 6, 63, 0.68);
  outline: none;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.24), rgba(201, 168, 90, 0.1)),
    rgba(0, 0, 0, 0.58);
}

.home-members-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(240, 6, 63, 0.34);
  font-weight: 950;
  transition: transform 0.16s ease;
}

.home-members-dropdown[open] .home-members-icon {
  transform: rotate(45deg);
}

.home-members-list {
  display: grid;
  gap: 10px;
  max-height: min(42vh, 390px);
  margin-top: 10px;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(201, 168, 90, 0.24);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(240, 6, 63, 0.08), rgba(201, 168, 90, 0.04)),
    rgba(5, 6, 6, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.home-member-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 11px;
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.32);
}

.home-member-avatar {
  width: 52px;
  height: 52px;
  font-size: 1.25rem;
}

.home-member-card h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.home-member-card p {
  margin: 0;
  color: rgba(246, 239, 226, 0.76);
  font-size: 0.84rem;
  line-height: 1.35;
}

.home-member-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--collector-gold);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-member-meta a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 90, 0.7);
  text-underline-offset: 3px;
}

.home-public-garage-section {
  padding-top: 26px;
  padding-bottom: 10px;
}

.home-public-garage-dropdown {
  max-width: 940px;
  margin: 0 auto;
}

.home-public-garage-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  color: #fff8ed;
  border: 1px solid rgba(201, 168, 90, 0.34);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.12), rgba(201, 168, 90, 0.06)),
    rgba(0, 0, 0, 0.42);
  list-style: none;
  cursor: pointer;
}

.home-public-garage-dropdown summary::-webkit-details-marker {
  display: none;
}

.home-public-garage-dropdown summary strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-public-garage-dropdown summary small {
  display: block;
  margin-top: 2px;
  color: rgba(246, 239, 226, 0.68);
  font-size: 0.74rem;
  font-weight: 850;
}

.home-public-garage-dropdown summary:hover,
.home-public-garage-dropdown summary:focus-visible,
.home-public-garage-dropdown[open] summary {
  border-color: rgba(240, 6, 63, 0.66);
  outline: none;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.22), rgba(201, 168, 90, 0.08)),
    rgba(0, 0, 0, 0.54);
}

.home-public-garage-dropdown[open] .home-members-icon {
  transform: rotate(45deg);
}

.home-public-garage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.home-public-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  color: inherit;
  border: 1px solid rgba(201, 168, 90, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.34);
  text-decoration: none;
}

.home-public-card:hover,
.home-public-card:focus-visible {
  border-color: rgba(240, 6, 63, 0.64);
  outline: none;
  box-shadow: 0 0 0 3px rgba(240, 6, 63, 0.12);
}

.home-public-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #030303;
}

.home-public-card-media img,
.home-public-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-public-card-copy {
  display: grid;
  gap: 3px;
}

.home-public-card-copy strong {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.home-public-card-copy span {
  color: rgba(246, 239, 226, 0.68);
  font-size: 0.74rem;
  font-weight: 850;
}

body[data-route="home"] .hero-actions {
  justify-content: center;
  margin-top: 0;
}

@media (max-width: 640px) {
  body[data-route="home"] .hero {
    min-height: auto;
    padding: 18px 16px 24px;
  }

  body[data-route="home"] .hero-copy {
    width: min(100%, 380px);
    min-height: 0;
    display: flex;
    gap: 14px;
    padding: 24px 20px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  body[data-route="home"] .hero h1 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  body[data-route="home"] .hero .home-hero-logo {
    width: 20vw;
    height: 20vw;
  }

  body[data-route="home"] .home-passkey-form {
    grid-template-columns: 1fr;
  }

  body[data-route="home"] .home-passkey-form .primary-button {
    width: 100%;
  }

  body[data-route="home"] .home-enter-garage-button {
    width: 100%;
    min-height: 52px;
  }

  .home-members-list {
    max-height: 300px;
  }

  .home-member-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home-member-avatar {
    justify-self: center;
  }

  .home-member-meta {
    justify-content: center;
  }

  .home-public-garage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-public-card {
    padding: 8px;
  }
}

/* High contrast light mode pass */
html[data-color-scheme="light"] :where(.home-value-section, .home-featured-section, .home-invite-section) {
  color: var(--ink);
}

html[data-color-scheme="light"] :where(.home-value-section, .home-featured-section, .home-invite-section) :where(
  h1,
  h2,
  h3,
  h4,
  .eyebrow,
  .home-value-points span,
  .home-step-number,
  .home-step-card h3
) {
  color: #171511;
}

html[data-color-scheme="light"] :where(.home-value-section, .home-featured-section, .home-invite-section) :where(
  p:not(.eyebrow),
  .muted,
  .home-step-card p
) {
  color: #443b30;
}

html[data-color-scheme="light"] :where(.panel, .upload-panel, .studio-teaser, .auth-panel, .member-card, .stat-card, .content-tab-button, .saved-build, .empty-state, .post-card) {
  color: var(--ink);
}

html[data-color-scheme="light"] :where(.panel, .upload-panel, .studio-teaser, .auth-panel, .member-card, .stat-card, .content-tab-button, .saved-build, .empty-state, .post-card) :where(
  h1,
  h2,
  h3,
  h4,
  label,
  strong,
  th,
  td,
  li,
  code,
  .eyebrow,
  .post-title,
  .photo-title-line,
  .member-identity strong,
  .tool-row strong
) {
  color: #171511;
}

html[data-color-scheme="light"] :where(.panel, .upload-panel, .studio-teaser, .auth-panel, .member-card, .stat-card, .content-tab-button, .saved-build, .empty-state, .post-card) :where(
  p,
  small,
  .muted,
  .field-hint,
  .post-stats,
  .comment-meta,
  .member-identity span,
  .member-status-row span,
  .content-tab-button small
) {
  color: #4c4338;
}

html[data-color-scheme="light"] :where(
  .home-request-section,
  .owner-proof-section,
  .garage-search-panel,
  .profile-hero-panel,
  .profile-layout,
  .profile-activity-panel,
  .tour-card,
  .invite-request-card,
  .social-proof-card,
  .garage-info-block,
  .collection-thumb,
  .car-detail-panel,
  .audit-row
) :where(h1, h2, h3, h4, label, strong, .eyebrow, .profile-section-heading h2, .activity-item strong) {
  color: #171511;
}

html[data-color-scheme="light"] :where(
  .home-request-section,
  .owner-proof-section,
  .garage-search-panel,
  .profile-hero-panel,
  .profile-layout,
  .profile-activity-panel,
  .tour-card,
  .invite-request-card,
  .social-proof-card,
  .garage-info-block,
  .collection-thumb,
  .car-detail-panel,
  .audit-row
) :where(p, small, span:not(.primary-button):not(.secondary-button):not(.danger-button), .muted, .field-hint) {
  color: #4c4338;
}

html[data-color-scheme="light"] :where(.role-chip, .manage-chip, .metadata-badges span, .content-count, .notice-code) {
  color: #2c2419;
  border-color: rgba(62, 50, 34, 0.18);
  background: rgba(140, 104, 29, 0.08);
}

html[data-color-scheme="light"] :where(.role-chip.admin, .verified-badge, .account-chip-role) {
  color: #6f4e0f;
}

html[data-color-scheme="light"] .profile-avatar:not(.has-photo) {
  color: #171511;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
}

@media (max-width: 360px) {
  .viewport-tight .nav-links {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .danger-button,
  .text-button,
  .tab-button {
    padding-inline: 10px;
  }
}

/* Simple centered header: large logo, clear nav, translucent red-black glass. */
:root {
  --header-height: clamp(154px, 16vw, 202px);
  --header-logo-size: clamp(96px, 8vw, 132px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "brand"
    "nav";
  justify-items: center;
  align-items: start;
  gap: clamp(6px, 1vw, 10px);
  min-height: var(--header-height);
  padding: max(10px, env(safe-area-inset-top)) var(--page-gutter) clamp(10px, 1.4vw, 16px);
  border-bottom: 1px solid rgba(240, 6, 63, 0.24);
  background:
    linear-gradient(180deg, rgba(65, 0, 14, 0.24), rgba(0, 0, 0, 0.1)),
    linear-gradient(90deg, rgba(240, 6, 63, 0.08), rgba(0, 0, 0, 0.06) 44%, rgba(0, 0, 0, 0.03));
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  backdrop-filter: blur(8px) saturate(115%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.site-header > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.header-brand-center {
  grid-area: brand;
  justify-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  gap: 2px;
  margin: 0 auto;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
}

.header-brand-center .brand-logo-orb {
  --orb-size: var(--header-logo-size);
  width: var(--header-logo-size);
  height: var(--header-logo-size);
}

.header-title {
  display: block;
  max-width: min(92vw, 34rem);
  color: #fff8ed;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.65rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.64);
}

.header-nav {
  grid-area: nav;
  width: min(100%, 62rem);
  max-width: calc(100vw - (var(--page-gutter) * 2));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 12px);
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

.nav-links a.header-nav-button {
  flex: 0 1 auto;
  min-width: clamp(7rem, 12vw, 10rem);
  min-height: 44px;
  justify-content: center;
  padding: 0 16px;
  color: #fff8ed;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: clamp(0.78rem, 0.9vw, 0.9rem);
}

.nav-links a.header-nav-button:hover,
.nav-links a.header-nav-button.active {
  color: #fff;
  border-color: rgba(240, 6, 63, 0.72);
  background: rgba(240, 6, 63, 0.22);
}

.nav-links a.header-garage-button {
  border-color: rgba(240, 6, 63, 0.7);
  background: linear-gradient(135deg, rgba(240, 6, 63, 0.62), rgba(110, 0, 28, 0.36));
}

.nav-links a.header-admin-tools-button {
  color: #ffe3a0;
  border-color: rgba(201, 168, 90, 0.56);
  background: rgba(201, 168, 90, 0.13);
}

.header-account-area {
  position: absolute;
  inset-block-start: max(10px, env(safe-area-inset-top));
  inset-inline-end: max(10px, var(--page-gutter));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(44vw, 430px);
}

.account-chip.header-account-chip {
  min-height: 42px;
  max-width: min(260px, 32vw);
  padding: 5px 13px 5px 6px;
  color: #fff8ed;
  border-color: rgba(255, 255, 255, 0.17);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.36);
}

.account-chip.header-account-chip[data-profile-shortcut] {
  border-color: rgba(201, 168, 90, 0.32);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.14), rgba(201, 168, 90, 0.08)),
    rgba(0, 0, 0, 0.38);
}

.account-chip.header-account-chip[data-profile-shortcut]:hover,
.account-chip.header-account-chip[data-profile-shortcut]:focus-visible {
  border-color: rgba(240, 6, 63, 0.68);
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.24), rgba(201, 168, 90, 0.12)),
    rgba(0, 0, 0, 0.54);
}

.header-account-chip .account-chip-text {
  gap: 2px;
}

.header-account-chip .account-chip-action {
  color: var(--collector-gold);
  font-size: 0.64rem;
}

.header-account-chip .account-chip-name {
  font-size: 0.82rem;
}

.header-account-chip .account-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.header-sign-in-button {
  min-height: 42px;
  padding-inline: 14px;
  border-radius: 6px;
  color: #fff8ed;
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(0, 0, 0, 0.36);
  font-size: 0.78rem;
}

.header-sign-in-button:hover {
  border-color: rgba(240, 6, 63, 0.65);
  background: rgba(240, 6, 63, 0.2);
}

@media (max-width: 760px) {
  :root {
    --header-height: auto;
    --header-logo-size: clamp(88px, 28vw, 122px);
  }

  .site-header {
    min-height: 0;
    padding-top: calc(max(8px, env(safe-area-inset-top)) + 50px);
    padding-inline: clamp(10px, 4vw, 18px);
  }

  .header-account-area {
    inset-inline: clamp(8px, 3vw, 14px);
    max-width: none;
  }

  .account-chip.header-account-chip {
    max-width: min(54vw, 210px);
  }

  .header-sign-in-button {
    min-width: 82px;
    padding-inline: 10px;
  }

  .header-nav {
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  .nav-links a.header-nav-button {
    flex: 1 1 min(9rem, 42vw);
    min-width: 0;
    max-width: none;
    font-size: 0.78rem;
  }
}

@media (max-width: 420px) {
  .site-header {
    padding-top: calc(max(8px, env(safe-area-inset-top)) + 48px);
  }

  .header-title {
    font-size: clamp(1.55rem, 9vw, 2.2rem);
  }

  .account-chip.header-account-chip {
    max-width: 48vw;
    padding-right: 8px;
  }

  .header-account-chip .account-chip-action {
    font-size: 0.58rem;
  }

  .header-account-chip .account-chip-name {
    font-size: 0.72rem;
  }

  .header-sign-in-button {
    min-width: 74px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }
}

html[data-color-scheme="light"] .site-header {
  color: #fff8ed;
  border-bottom-color: rgba(240, 6, 63, 0.24);
  background:
    linear-gradient(180deg, rgba(65, 0, 14, 0.24), rgba(0, 0, 0, 0.1)),
    linear-gradient(90deg, rgba(240, 6, 63, 0.08), rgba(0, 0, 0, 0.06) 44%, rgba(0, 0, 0, 0.03));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

html[data-color-scheme="light"] .header-title,
html[data-color-scheme="light"] .nav-links a.header-nav-button,
html[data-color-scheme="light"] .account-chip.header-account-chip,
html[data-color-scheme="light"] .header-sign-in-button {
  color: #fff8ed;
}

body[data-route="home"] {
  --header-height: 0px;
}

@media (max-width: 640px) {
  body[data-route="home"]:not(.is-signed-in) .site-header {
    display: none !important;
  }
}

/* Small garage modal close button override. */
.garage-modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  right: auto;
  z-index: 12;
  grid-column: auto;
  grid-row: auto;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
}

/* Global top banner removal: hide the banner, keep account shortcuts. */
:root {
  --header-height: 0px;
}

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: auto 0;
  z-index: 60;
  display: block !important;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  pointer-events: none;
}

.site-header .header-brand-center,
.site-header .header-nav {
  display: none !important;
}

.site-header .header-account-area {
  position: fixed;
  inset-block-start: max(10px, env(safe-area-inset-top));
  inset-inline-end: max(10px, var(--page-gutter));
  pointer-events: auto;
  max-width: min(94vw, 430px);
}

body[data-route="gallery"] .site-header .header-account-area {
  display: none;
}

@media (max-width: 760px) {
  .site-header .header-account-area {
    inset-inline-start: auto;
    inset-inline-end: clamp(8px, 3vw, 14px);
    max-width: calc(100vw - 16px);
  }
}

/* Remove the gap between the two homepage rows. */
body[data-route="home"] .hero {
  padding-bottom: 0 !important;
}

body[data-route="home"] .hero + .home-owner-section {
  padding-top: 0 !important;
  border-top: 0;
}

/* Garage cards: keep one card visible per row on every screen. */
@media (max-width: 640px) {
  body[data-route="gallery"] .feed-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    column-count: initial;
    column-width: auto;
    column-gap: 0;
  }

  .post-card {
    display: block;
    width: 100%;
    margin: 0;
  }

  .post-card-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .post-card-media > picture,
  .post-card-media > img,
  .post-card-media > video,
  .post-card-media > picture > img {
    height: 100%;
  }

  .post-body {
    padding: 10px;
  }

  .post-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .post-actions > .secondary-button {
    min-height: 34px;
    padding-inline: 6px;
    font-size: 0.64rem;
  }

  .post-card-engagement {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
  }

  .post-stats {
    min-width: 0;
    font-size: 0.62rem;
    line-height: 1.25;
    white-space: normal;
  }

  .garage-heart-like-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    font-size: 1.08rem;
  }
}

/* TikTok-style Garage stream. */
body[data-route="gallery"] .page {
  overflow-x: hidden;
}

.garage-feed-hint {
  width: min(520px, 100%);
  margin: 16px auto 10px;
  color: rgba(246, 239, 226, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.garage-feed-stream {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-count: initial;
  column-gap: 0;
  gap: 16px;
  width: min(520px, 100%);
  height: min(820px, calc(100svh - 22px));
  min-height: min(620px, calc(100svh - 22px));
  margin: 0 auto;
  padding: 0 4px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scroll-padding-block: 10px;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.garage-feed-stream::-webkit-scrollbar,
.garage-feed-stream .post-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.garage-feed-stream .post-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.garage-feed-stream .post-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: min(780px, calc(100svh - 36px));
  margin: 0;
  overflow: hidden;
  border-color: rgba(201, 168, 90, 0.28);
  border-radius: 12px;
  background: #000;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.44);
  break-inside: auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.garage-feed-stream .post-card-media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  height: 100%;
  aspect-ratio: auto;
  background: #000;
}

.garage-feed-stream .post-card-media > picture,
.garage-feed-stream .post-card-media > img,
.garage-feed-stream .post-card-media > video,
.garage-feed-stream .post-card-media > picture > img {
  width: 100%;
  height: 100%;
}

.garage-feed-stream .post-card-badges {
  position: absolute;
  top: 46px;
  left: 12px;
  z-index: 8;
  padding: 0;
}

.garage-feed-stream .post-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  display: grid;
  gap: 10px;
  max-height: 54%;
  padding: 78px 14px 14px;
  overflow-y: auto;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58) 64%, transparent);
}

.garage-feed-stream .post-meta,
.garage-feed-stream .photo-caption,
.garage-feed-stream .photo-title-line {
  margin-bottom: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.82);
}

.garage-feed-stream .metadata-badges {
  gap: 6px;
}

.garage-feed-stream .post-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 8px;
}

.garage-feed-stream .post-actions > .secondary-button {
  min-height: 38px;
  padding-inline: 8px;
  font-size: 0.68rem;
}

.garage-feed-stream .post-card-engagement {
  margin-left: 0;
}

.garage-feed-stream .post-stats {
  display: none;
}

.garage-feed-stream .garage-heart-like-button {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  font-size: 1.25rem;
}

@media (max-width: 640px) {
  .garage-feed-hint {
    width: 100%;
    margin-top: 12px;
  }

  .garage-feed-stream {
    width: 100%;
    height: calc(100svh - 18px);
    min-height: calc(100svh - 18px);
    padding-inline: 0;
    border-radius: 0;
  }

  .garage-feed-stream .post-card {
    min-height: calc(100svh - 18px);
    border-radius: 10px;
  }

  .garage-feed-stream .post-body {
    max-height: 58%;
    padding: 86px 12px 12px;
  }

  .garage-feed-stream .post-actions {
    grid-template-columns: 1fr 1fr auto;
  }

  .garage-feed-stream .copy-link-button {
    display: none;
  }
}

body[data-route="gallery"] .feed-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-count: initial;
  column-width: auto;
  column-gap: 0;
}

/* Garage top action banner and modals. */
:root {
  --garage-action-banner-space: clamp(132px, 17vw, 176px);
}

body[data-route="gallery"] .garage-page {
  min-height: 100svh;
  padding-top: var(--garage-action-banner-space);
}

.garage-action-banner {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 58;
  display: grid;
  gap: 8px;
  width: min(100%, 880px);
  padding: env(safe-area-inset-top, 0px) clamp(14px, 4vw, 28px) 12px;
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(69, 0, 16, 0.48), rgba(4, 5, 5, 0.48)),
    rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  backdrop-filter: blur(12px) saturate(145%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, 0);
  transition: transform 180ms ease, opacity 180ms ease;
}

.garage-action-banner-row {
  display: grid;
  align-items: center;
  min-width: 0;
}

.garage-action-banner-main {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
}

.garage-banner-icon-button,
.garage-banner-profile-link {
  width: max-content;
}

.garage-banner-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  color: #fff8ed;
  border: 1px solid rgba(201, 168, 90, 0.26);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hamburger-lines {
  display: grid;
  gap: 4px;
  width: 18px;
}

.hamburger-lines span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.garage-banner-logo {
  display: grid;
  place-items: center;
  width: clamp(62px, 9vw, 88px);
  height: clamp(62px, 9vw, 88px);
  border: 1px solid rgba(201, 168, 90, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.garage-banner-logo img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.garage-banner-profile-link {
  justify-self: end;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.garage-banner-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(201, 168, 90, 0.34);
}

.garage-action-banner-post-row {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  justify-items: center;
}

.garage-banner-new-post {
  grid-column: 2;
  width: min(33vw, 340px);
  min-width: 220px;
  min-height: 46px;
  border-radius: 8px;
}

.garage-banner-hide-button {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  color: #fff8ed;
  border: 1px solid rgba(201, 168, 90, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(240, 6, 63, 0.16), rgba(0, 0, 0, 0.28)),
    rgba(0, 0, 0, 0.34);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.garage-banner-hide-button:hover,
.garage-banner-hide-button:focus-visible {
  border-color: rgba(246, 239, 226, 0.58);
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(201, 168, 90, 0.14),
    0 14px 30px rgba(240, 6, 63, 0.14);
}

.garage-banner-hide-button span[aria-hidden="true"] {
  font-size: 1rem;
  line-height: 0.8;
}

.garage-banner-count {
  position: absolute;
  right: 0;
  top: 50%;
  color: var(--collector-gold);
  font-size: 0.76rem;
  font-weight: 950;
  transform: translateY(-50%);
}

.garage-action-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(18px, 5vh, 58px) clamp(12px, 4vw, 28px);
  overflow: auto;
  background: rgba(0, 0, 0, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.garage-action-modal {
  display: grid;
  gap: 16px;
  width: min(680px, 100%);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: clamp(18px, 4vw, 28px);
  color: var(--ink);
  border: 1px solid rgba(201, 168, 90, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(240, 6, 63, 0.12), rgba(201, 168, 90, 0.08)),
    #090909;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.garage-search-modal {
  overflow: visible;
}

.garage-search-modal .garage-sort-control {
  z-index: 30;
}

.garage-action-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.garage-action-modal-head h2 {
  margin: 0;
  color: var(--collector-cream);
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 9vw, 4.4rem);
  line-height: 0.88;
  text-transform: uppercase;
}

.garage-action-modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: #fff8ed;
  border: 1px solid rgba(201, 168, 90, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .garage-action-modal-close,
  .garage-modal-close,
  .garage-editor-close {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.1rem;
    line-height: 1;
  }
}

.garage-search-modal .content-count {
  justify-self: start;
}

.garage-search-modal .garage-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.garage-new-post-form {
  gap: 14px;
}

body[data-route="gallery"] .garage-feed-stream {
  height: min(820px, calc(100svh - var(--garage-action-banner-space) - 22px));
  min-height: min(560px, calc(100svh - var(--garage-action-banner-space) - 22px));
}

@media (max-width: 700px) {
  :root {
    --garage-action-banner-space: 142px;
  }

  .garage-action-banner {
    width: 100%;
    border-radius: 0 0 14px 14px;
  }

  .garage-banner-icon-button span:last-child {
    display: none;
  }

  .garage-banner-new-post {
    width: min(64vw, 300px);
    min-width: 0;
  }

  .garage-banner-hide-button {
    min-width: 44px;
    min-height: 40px;
    padding-inline: 12px;
  }

  .garage-banner-hide-button span:last-child {
    display: none;
  }

  .garage-banner-count {
    right: 2px;
    font-size: 0.68rem;
  }

  .garage-search-modal .garage-search-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-route="gallery"] .garage-feed-stream {
    height: calc(100svh - var(--garage-action-banner-space) - 12px);
    min-height: calc(100svh - var(--garage-action-banner-space) - 12px);
  }

  body[data-route="gallery"] .garage-feed-stream .post-card {
    min-height: calc(100svh - var(--garage-action-banner-space) - 12px);
  }
}

/* Photo-first Garage feed and detail page. */
:root {
  --garage-action-banner-space: clamp(108px, 12vw, 136px);
}

body[data-route="gallery"] .garage-page {
  padding-top: calc(var(--garage-action-banner-space) + 2px);
}

body[data-route="gallery"] .section.compact {
  padding-top: 0;
  padding-inline: 0;
  padding-bottom: 12px;
}

body[data-route="gallery"] .section-inner {
  width: min(1480px, 100%);
  padding-inline: clamp(8px, 1.6vw, 18px);
}

.garage-action-banner {
  background:
    linear-gradient(180deg, rgba(62, 0, 14, 0.32), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.18);
}

.garage-banner-logo {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.garage-banner-logo img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.garage-banner-count {
  display: none !important;
}

.post-card-media::after {
  content: none !important;
}

body[data-route="gallery"] .garage-feed-stream {
  display: grid;
  /* Garage cards: keep one card visible per row on every screen. */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(10px, 1.6vw, 16px);
  width: min(760px, 100%);
  height: calc(100svh - var(--garage-action-banner-space) - 14px);
  min-height: min(620px, calc(100svh - var(--garage-action-banner-space) - 14px));
  margin-inline: auto;
  padding: 0 0 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 0;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body[data-route="gallery"] .garage-feed-stream .post-card {
  min-height: calc(100svh - var(--garage-action-banner-space) - 18px);
  border-radius: 12px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition:
    transform 360ms cubic-bezier(0.2, 0.82, 0.2, 1),
    box-shadow 360ms ease,
    filter 360ms ease;
  will-change: transform;
}

body[data-route="gallery"] .garage-feed-stream .post-card-media {
  z-index: 1;
}

.post-card-stack,
body[data-route="gallery"] .garage-feed-stream .post-card.post-card-stack {
  --stack-swipe-x: 0px;
  isolation: isolate;
  overflow: visible !important;
  border: clamp(6px, 0.65vw, 9px) solid rgba(248, 246, 239, 0.96);
  background: rgba(248, 246, 239, 0.88);
  box-shadow:
    0 26px 62px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  transform: rotate(-0.18deg);
}

.post-card-stack::before,
.post-card-stack::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -2;
  pointer-events: none;
  border: 1px solid rgba(201, 168, 90, 0.24);
  border-radius: inherit;
  background: rgba(7, 8, 8, 0.2);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 0 34px rgba(0, 0, 0, 0.42);
}

.post-card-stack::before {
  transform: rotate(1.35deg) translate(11px, -9px);
}

.post-card-stack::after {
  z-index: -3;
  opacity: 0.78;
  transform: rotate(-1.55deg) translate(-10px, 9px);
}

.post-card-stack .post-card-media {
  inset: 0;
  border-radius: 7px;
}

.post-card-stack .post-body {
  z-index: 5;
}

.post-card-stack.is-stack-swiping .post-card-media,
.post-card-stack.is-stack-swiping .post-body,
.post-card-stack.is-stack-swiping .post-stack-controls {
  transform: translateX(var(--stack-swipe-x));
  transition: none;
}

.post-card-stack.is-stack-swiping .post-stack-preview-media {
  opacity: 0.78;
  filter: brightness(0.82) saturate(1.04) contrast(1.08);
}

.post-card-stack:not(.is-stack-swiping) .post-card-media,
.post-card-stack:not(.is-stack-swiping) .post-body,
.post-card-stack:not(.is-stack-swiping) .post-stack-controls {
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.post-stack-layers {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.post-stack-layer {
  position: absolute;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(248, 246, 239, 0.2);
  border-radius: inherit;
  background: rgba(5, 6, 6, 0.54);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.24),
    0 16px 34px rgba(0, 0, 0, 0.22);
}

.post-stack-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62)),
    radial-gradient(circle at 50% 35%, rgba(240, 6, 63, 0.1), transparent 58%);
}

.post-stack-preview-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: brightness(0.72) saturate(0.95) contrast(1.08);
}

.post-stack-layer.layer-1 {
  inset: -3px 13px 18px -12px;
  transform: rotate(-0.9deg);
}

.post-stack-layer.layer-2 {
  inset: 14px -12px -4px 16px;
  opacity: 0.72;
  transform: rotate(1.05deg);
}

.post-stack-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 6px;
  color: #fff;
  border: 1px solid rgba(248, 246, 239, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.18), rgba(0, 0, 0, 0.32)),
    rgba(4, 4, 4, 0.54);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  backdrop-filter: blur(12px) saturate(135%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  font-size: 0.72rem;
  font-weight: 950;
}

.post-stack-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(248, 246, 239, 0.2);
  border-radius: 999px;
  background: rgba(116, 0, 30, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.post-stack-button:hover,
.post-stack-button:focus-visible {
  outline: none;
  background: rgba(240, 6, 63, 0.72);
  box-shadow: 0 0 0 3px rgba(240, 6, 63, 0.16);
  transform: translateY(-1px);
}

.post-stack-button .garage-vector-icon {
  width: 17px;
  height: 17px;
}

.garage-feed-shell {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  padding-inline: clamp(16px, 3vw, 36px);
  scroll-margin-top: calc(var(--garage-action-banner-space) + 10px);
}

body[data-route="gallery"] .garage-feed-stream .post-card-media {
  height: 100%;
}

body[data-route="gallery"] .garage-feed-stream .post-body {
  align-content: end;
  max-height: 48%;
  padding: 92px 16px 16px;
  pointer-events: none;
}

body[data-route="gallery"] .garage-feed-stream .post-body a,
body[data-route="gallery"] .garage-feed-stream .post-body button {
  pointer-events: auto;
}

.feed-card-caption-row {
  justify-content: flex-start;
  align-items: center;
}

.feed-card-caption-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.feed-card-caption-row p,
.car-detail-photo-copy p {
  margin: 0;
  color: rgba(246, 239, 226, 0.86);
  overflow-wrap: anywhere;
}

.feed-card-action-row {
  min-height: 48px;
  justify-content: flex-start;
  gap: 18px;
}

.feed-icon-stat {
  min-height: 44px;
  padding: 0;
  color: #fff;
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  letter-spacing: 0;
}

.feed-heart-button {
  cursor: pointer;
}

.feed-heart-button:hover,
.feed-heart-button:focus-visible,
.feed-heart-button.liked {
  color: #fff;
  filter: drop-shadow(0 0 10px rgba(240, 6, 63, 0.62));
}

.feed-icon-stat .garage-vector-icon,
.car-detail-heart-button .garage-vector-icon,
.floating-heart .garage-vector-icon {
  width: 44px;
  height: 44px;
  color: #fff;
}

.car-page.garage-photo-first {
  min-height: 100svh;
  padding: 0 0 92px;
}

.car-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(86px, 1fr) auto minmax(52px, 1fr);
  align-items: center;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) clamp(10px, 3vw, 22px) 8px;
  border-bottom: 1px solid rgba(201, 168, 90, 0.18);
  background:
    linear-gradient(180deg, rgba(58, 0, 14, 0.42), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.car-detail-back-button,
.car-detail-profile-link,
.car-detail-logo-link {
  display: inline-grid;
  align-items: center;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.car-detail-back-button {
  justify-self: start;
  grid-auto-flow: column;
  gap: 8px;
  min-width: 92px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.car-detail-logo-link {
  justify-self: center;
  width: clamp(52px, 8vw, 78px);
  height: clamp(52px, 8vw, 78px);
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.car-detail-logo-link img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.car-detail-profile-link {
  justify-self: end;
  border-radius: 999px;
}

.car-detail-scroll {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(8px, 2vw, 18px) clamp(8px, 2vw, 18px) 24px;
}

.car-detail-photo-section,
.car-detail-comments-section {
  display: grid;
  gap: 14px;
}

.car-detail-media {
  position: relative;
  min-height: min(78svh, 820px);
  border-radius: 12px;
  background: #000;
}

.car-detail-media img,
.car-detail-media picture,
.car-detail-media video,
.car-detail-media picture > img {
  width: 100%;
  height: 100%;
}

.car-detail-media img,
.car-detail-media picture > img,
.car-detail-media video {
  max-height: min(78svh, 820px);
  object-fit: contain;
}

.car-detail-remove-photo {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  min-height: 38px;
  padding: 8px 12px;
  color: #fff;
  border: 1px solid rgba(240, 6, 63, 0.62);
  border-radius: 999px;
  background: rgba(96, 0, 24, 0.78);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.car-detail-photo-copy {
  display: grid;
  gap: 10px;
  padding: 0 2px;
}

.car-detail-photo-copy h1 {
  margin: 0;
  color: #fff8ed;
  font-size: clamp(1.25rem, 4vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
}

.car-detail-section-heading h2 {
  margin: 0;
  font-size: clamp(1.3rem, 5vw, 2.8rem);
  line-height: 1;
  text-transform: uppercase;
}

.car-page-comments {
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.78);
}

.car-page-comments .comment {
  padding-block: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.car-page-comments .comment:last-child {
  border-bottom: 0;
}

.car-detail-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px clamp(10px, 3vw, 20px) max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(201, 168, 90, 0.22);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(58, 0, 14, 0.42)),
    rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.car-detail-heart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 62px;
  height: 56px;
  padding: 0 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.car-detail-heart-button.liked {
  background: rgba(240, 6, 63, 0.24);
  box-shadow: 0 0 0 3px rgba(240, 6, 63, 0.12);
}

.car-detail-comment-field {
  min-height: 48px;
  min-width: 0;
  padding: 0 14px;
  color: rgba(246, 239, 226, 0.72);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  font-weight: 850;
}

.car-detail-submit-button {
  min-height: 48px;
  white-space: nowrap;
}

.comment-composer-backdrop {
  align-items: end;
  padding: clamp(12px, 3vw, 24px);
}

.comment-composer-modal {
  width: min(760px, 100%);
  min-height: min(76svh, 620px);
  align-content: start;
}

.comment-composer-modal .comment-form {
  grid-template-columns: minmax(0, 1fr);
}

.comment-composer-modal textarea {
  min-height: min(42svh, 320px);
  resize: vertical;
}

.floating-heart {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(240, 6, 63, 0.86);
  animation: floatingHeartBalloon 1300ms ease-out forwards;
}

@keyframes floatingHeartBalloon {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(10px) scale(0.72) rotate(-8deg);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-8px) scale(1.04) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-72vh) scale(1.22) rotate(-12deg);
  }
}

/* Garage feed smart media fit. Scrolling cards fill the frame; opened details keep the full photo visible. */
.garage-media-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000;
}

.photo-enlarge-hint {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #fff8ed;
  border: 1px solid rgba(248, 246, 239, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(240, 6, 63, 0.2), rgba(0, 0, 0, 0.36)),
    rgba(0, 0, 0, 0.58);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.post-card-stack .photo-enlarge-hint {
  top: 58px;
}

.garage-media-backdrop picture,
.garage-media-backdrop img,
.garage-media-backdrop video,
.garage-media-backdrop picture > img {
  width: 100%;
  height: 100%;
}

.garage-media-backdrop img,
.garage-media-backdrop video,
.garage-media-backdrop picture > img {
  object-fit: cover !important;
  object-position: center center !important;
  filter: blur(clamp(18px, 3vw, 30px)) brightness(0.45) saturate(1.2);
  transform: scale(1.08);
}

body[data-route="gallery"] .garage-feed-stream .post-card-media > img,
body[data-route="gallery"] .garage-feed-stream .post-card-media > picture,
body[data-route="gallery"] .garage-feed-stream .post-card-media > picture > img,
body[data-route="gallery"] .garage-feed-stream .post-card-media > video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

body[data-route="gallery"] .garage-feed-stream .post-card-media > img,
body[data-route="gallery"] .garage-feed-stream .post-card-media > picture > img,
body[data-route="gallery"] .garage-feed-stream .post-card-media > video {
  object-fit: cover !important;
  object-position: center center !important;
  background: transparent !important;
}

.car-detail-media img,
.car-detail-media picture > img,
.car-detail-media video {
  object-fit: contain !important;
  object-position: center center !important;
}

@media (max-width: 760px) {
  :root {
    --garage-action-banner-space: 116px;
  }

  body[data-route="gallery"] .section-inner {
    padding-inline: 0;
  }

  .garage-feed-shell {
    padding-inline: 8px;
  }

  body[data-route="gallery"] .garage-feed-stream {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100svh - var(--garage-action-banner-space));
    min-height: calc(100svh - var(--garage-action-banner-space));
    padding: 0 0 8px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }

  body[data-route="gallery"] .garage-feed-stream .post-card {
    min-height: calc(100svh - var(--garage-action-banner-space) - 8px);
    border-radius: 10px;
    scroll-snap-align: start;
  }

  .post-card-stack,
  body[data-route="gallery"] .garage-feed-stream .post-card.post-card-stack {
    border-width: 6px;
    transform: rotate(-0.2deg);
  }

  .post-card-stack::before {
    inset: -5px;
    transform: rotate(1.35deg) translate(8px, -8px);
  }

  .post-card-stack::after {
    inset: -5px;
    transform: rotate(-1.45deg) translate(-8px, 8px);
  }

  .post-stack-layer.layer-1 {
    inset: -2px 10px 14px -10px;
  }

  .post-stack-layer.layer-2 {
    inset: 12px -10px -4px 12px;
  }

  body[data-route="gallery"] .garage-feed-stream .post-body {
    max-height: 50%;
    padding: 86px 12px 14px;
  }

  .feed-card-action-row {
    gap: 13px;
  }

  .car-detail-topbar {
    grid-template-columns: minmax(82px, 1fr) auto minmax(48px, 1fr);
    gap: 8px;
  }

  .car-detail-back-button span {
    display: inline;
  }

  .car-detail-media {
    min-height: min(68svh, 720px);
  }

  .car-detail-media img,
  .car-detail-media picture > img,
  .car-detail-media video {
    max-height: min(68svh, 720px);
  }

  .car-detail-scroll {
    padding-inline: 8px;
  }

  .car-detail-action-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .car-detail-submit-button {
    padding-inline: 12px;
  }
}

/* Gallery banner auto-hide and full-height feed. */
body[data-route="gallery"] .garage-page {
  min-height: 100svh;
  padding-top: 0 !important;
}

body[data-route="gallery"] .section.compact {
  padding-top: 0 !important;
}

body[data-route="gallery"] .garage-feed-shell {
  padding-inline: clamp(6px, 1.8vw, 18px);
  scroll-margin-top: 0;
}

body[data-route="gallery"] .garage-feed-stream {
  min-height: 100svh !important;
  height: 100svh !important;
  padding: 0 !important;
  align-content: start;
}

body[data-route="gallery"] .garage-feed-stream .post-card {
  min-height: 100svh !important;
  border-radius: 0;
}

body[data-route="gallery"] .garage-feed-stream .post-card.post-card-stack {
  min-height: calc(100svh - 8px) !important;
  margin-top: 4px;
  margin-bottom: 4px;
}

body.garage-banner-hidden .garage-action-banner {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
}

body[data-route="gallery"]:not(.garage-banner-hidden) .garage-feed-stream .post-body {
  padding-top: clamp(132px, 19vw, 186px);
}

body[data-route="gallery"].garage-banner-hidden .garage-feed-stream .post-body {
  padding-top: clamp(58px, 9vw, 92px);
}

/* Site-wide motion polish. */
:root {
  --motion-fast: 160ms;
  --motion-medium: 260ms;
  --motion-slow: 420ms;
  --motion-ease-out: cubic-bezier(0.2, 0.82, 0.2, 1);
  --motion-ease-in: cubic-bezier(0.48, 0, 0.8, 0.32);
  --motion-pop: cubic-bezier(0.18, 0.92, 0.28, 1.18);
}

#app {
  transform-origin: center top;
}

#app.app-route-exiting {
  pointer-events: none;
  animation: pageContentOut var(--motion-fast) var(--motion-ease-in) both;
}

#app.app-route-entering {
  animation: pageContentIn var(--motion-medium) var(--motion-ease-out) both;
}

.garage-action-modal-backdrop.is-mounted,
.garage-editor-backdrop.is-mounted,
.studio-compare-backdrop.is-mounted,
.comment-composer-backdrop.is-mounted,
.confirm-dialog-backdrop.is-mounted,
.tour-backdrop.is-mounted,
.garage-modal-backdrop {
  animation: modalBackdropIn var(--motion-medium) ease both;
}

.garage-action-modal-backdrop.is-leaving,
.garage-editor-backdrop.is-leaving,
.studio-compare-backdrop.is-leaving,
.comment-composer-backdrop.is-leaving,
.confirm-dialog-backdrop.is-leaving,
.tour-backdrop.is-leaving,
.garage-modal-backdrop.is-leaving {
  pointer-events: none;
  animation: modalBackdropOut var(--motion-fast) ease both;
}

.garage-action-modal-backdrop.is-mounted .garage-action-modal,
.garage-editor-backdrop.is-mounted .garage-editor-modal,
.studio-compare-backdrop.is-mounted .studio-compare-modal,
.comment-composer-backdrop.is-mounted .comment-composer-modal,
.confirm-dialog-backdrop.is-mounted .confirm-dialog,
.tour-backdrop.is-mounted .tour-card,
.garage-modal-backdrop .garage-modal {
  transform-origin: center top;
  animation: modalPanelIn var(--motion-medium) var(--motion-pop) both;
}

.garage-action-modal-backdrop.is-leaving .garage-action-modal,
.garage-editor-backdrop.is-leaving .garage-editor-modal,
.studio-compare-backdrop.is-leaving .studio-compare-modal,
.comment-composer-backdrop.is-leaving .comment-composer-modal,
.confirm-dialog-backdrop.is-leaving .confirm-dialog,
.tour-backdrop.is-leaving .tour-card,
.garage-modal-backdrop.is-leaving .garage-modal {
  animation: modalPanelOut var(--motion-fast) var(--motion-ease-in) both;
}

.toast.show {
  animation: toastFloatIn var(--motion-medium) var(--motion-ease-out) both;
}

.garage-sort-control.is-open .garage-sort-menu,
.garage-visibility-field.is-open .garage-visibility-menu,
details[open] > :not(summary) {
  transform-origin: top center;
  animation: dropdownReveal var(--motion-medium) var(--motion-ease-out) both;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.garage-banner-icon-button,
.garage-banner-new-post,
.garage-action-modal-close,
.garage-sort-button,
.garage-visibility-trigger,
.post-card,
.content-page-card,
.member-card,
.panel {
  transition:
    transform var(--motion-fast) var(--motion-ease-out),
    box-shadow var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    filter var(--motion-fast) ease;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active,
.icon-button:active,
.garage-banner-icon-button:active,
.garage-banner-new-post:active,
.garage-action-modal-close:active,
.garage-sort-button:active,
.garage-visibility-trigger:active {
  transform: translateY(1px) scale(0.985);
}

/* Doubled site logo sizing. */
:root {
  --large-logo-base: clamp(172px, 18vw, 240px);
  --header-height: clamp(286px, 30vw, 394px);
  --header-logo-size: clamp(192px, 16vw, 264px);
}

.logo-orb {
  --orb-size: var(--large-logo-base);
}

.header-brand-center .brand-logo-orb {
  --orb-size: var(--header-logo-size);
  width: var(--header-logo-size);
  height: var(--header-logo-size);
}

.header-title {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.section-logo-orb,
.auth-logo-orb {
  --orb-size: clamp(152px, 20vw, 224px);
}

.page-home-logo {
  width: min(40vw, 520px);
  height: min(40vw, 520px);
}

body[data-route="home"] .hero .home-hero-logo {
  width: var(--home-hero-logo-size);
  height: var(--home-hero-logo-size);
}

.garage-banner-logo {
  width: clamp(124px, 18vw, 176px);
  height: clamp(124px, 18vw, 176px);
}

.car-detail-logo-link {
  width: clamp(104px, 16vw, 156px);
  height: clamp(104px, 16vw, 156px);
}

/* Keep the homepage top banner inside the visible viewport. */
:root {
  --home-hero-logo-size: clamp(132px, min(28vw, 34svh), 440px);
  --home-hero-title-size: clamp(2.2rem, min(6.8vw, 9.4svh), 5.6rem);
  --home-hero-gap: clamp(7px, 1.35svh, 16px);
}

body[data-route="home"] .hero {
  min-height: 100svh;
  height: 100svh;
  align-items: center;
  justify-items: center;
  padding: clamp(10px, 2.2svh, 26px) clamp(16px, 5vw, 82px);
}

body[data-route="home"] .hero-copy {
  max-height: calc(100svh - clamp(20px, 4.4svh, 52px));
  justify-content: center;
  gap: var(--home-hero-gap);
}

body[data-route="home"] .hero .home-hero-logo {
  flex: 0 0 auto;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 clamp(5px, 0.9vw, 10px) rgba(201, 168, 90, 0.1),
    0 clamp(12px, 3svh, 28px) clamp(28px, 5svh, 56px) rgba(0, 0, 0, 0.46);
}

body[data-route="home"] .hero .home-hero-logo img {
  display: block;
  width: 108%;
  height: 108%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}

body[data-route="home"] .hero h1 {
  font-size: var(--home-hero-title-size);
}

body[data-route="home"] .home-enter-garage-button {
  min-height: clamp(44px, 6svh, 58px);
}

body[data-route="home"] .hero-supporting-copy {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 640px) {
  body[data-route="home"] .hero {
    min-height: 100svh;
    height: 100svh;
    padding: max(8px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom));
  }

  body[data-route="home"] .hero-copy {
    width: min(100%, 390px);
    min-height: 0;
    max-height: calc(100svh - 20px);
    padding: clamp(10px, 2svh, 18px) 14px;
    gap: clamp(6px, 1.15svh, 10px);
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body[data-route="home"] .hero .home-hero-logo {
    width: clamp(116px, min(48vw, 28svh), 240px);
    height: clamp(116px, min(48vw, 28svh), 240px);
  }

  body[data-route="home"] .hero h1 {
    font-size: clamp(2rem, min(10vw, 7.8svh), 3.2rem);
    line-height: 0.9;
  }

  body[data-route="home"] .home-passkey-form {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: clamp(8px, 1.5svh, 12px);
  }

  body[data-route="home"] .home-passkey-form input,
  body[data-route="home"] .home-passkey-form .primary-button,
  body[data-route="home"] .home-enter-garage-button {
    min-height: clamp(42px, 6svh, 52px);
  }

  body[data-route="home"] .hero-supporting-copy {
    font-size: clamp(0.9rem, 2.7vw, 1rem);
    -webkit-line-clamp: 3;
  }
}

@media (max-height: 680px) {
  :root {
    --home-hero-logo-size: clamp(112px, min(21vw, 24svh), 260px);
    --home-hero-title-size: clamp(1.9rem, min(5.8vw, 8svh), 4.2rem);
    --home-hero-gap: clamp(5px, 1svh, 10px);
  }

  body[data-route="home"] .home-enter-garage-button {
    min-height: 44px;
  }

  body[data-route="home"] .hero-supporting-copy {
    -webkit-line-clamp: 2;
  }
}

@keyframes pageContentIn {
  0% {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(14px) scale(0.992);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes pageContentOut {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(-8px) scale(0.996);
  }
}

@keyframes modalBackdropIn {
  0% {
    opacity: 0;
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
  100% {
    opacity: 1;
  }
}

@keyframes modalBackdropOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}

@keyframes modalPanelIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.965);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.006);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalPanelOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(10px) scale(0.982);
  }
}

@keyframes dropdownReveal {
  0% {
    opacity: 0;
    transform: translateY(-6px) scaleY(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes toastFloatIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Home hero background collage: fill tall screens with more car imagery. */
body[data-route="home"] .hero {
  min-height: 100svh;
  height: 100svh;
  isolation: isolate;
  background: #000;
}

body[data-route="home"] .hero::after {
  z-index: 3;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, 0.04) 0 18%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.34) 45%, rgba(0, 0, 0, 0.58));
}

body[data-route="home"] .hero-fade {
  z-index: 0;
  opacity: 0.72;
}

body[data-route="home"] .hero > .hero-fade {
  display: none;
}

body[data-route="home"] .home-hero-collage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
  padding: clamp(8px, 1.2vw, 18px);
  pointer-events: none;
  opacity: 0.82;
}

body[data-route="home"] .home-hero-collage-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 90, 0.18);
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
}

body[data-route="home"] .home-hero-collage-slideshow {
  width: 100%;
  height: 100%;
  background: transparent;
}

body[data-route="home"] .home-hero-collage-slideshow .fade-slide {
  transition-duration: 1.35s;
}

body[data-route="home"] .home-hero-collage-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.3)),
    radial-gradient(circle at 50% 50%, transparent 0 48%, rgba(0, 0, 0, 0.2) 100%);
}

body[data-route="home"] .home-hero-collage-media,
body[data-route="home"] .home-hero-collage-tile picture,
body[data-route="home"] .home-hero-collage-tile img,
body[data-route="home"] .home-hero-collage-tile video {
  width: 100%;
  height: 100%;
}

body[data-route="home"] .home-hero-collage-tile picture {
  display: block;
}

body[data-route="home"] .home-hero-collage-tile img,
body[data-route="home"] .home-hero-collage-tile video {
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08) brightness(0.86);
}

body[data-route="home"] .home-hero-collage-tile-1 {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

body[data-route="home"] .home-hero-collage-tile-2 {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

body[data-route="home"] .home-hero-collage-tile-3 {
  grid-column: 3 / 4;
  grid-row: 2 / 4;
}

body[data-route="home"] .home-hero-collage-tile-4 {
  grid-column: 4 / 5;
  grid-row: 2 / 4;
}

body[data-route="home"] .home-hero-collage-tile-5 {
  grid-column: 1 / 2;
  grid-row: 3 / 5;
}

body[data-route="home"] .home-hero-collage-tile-6 {
  grid-column: 2 / 4;
  grid-row: 4 / 5;
}

body[data-route="home"] .home-hero-collage-tile-7 {
  grid-column: 4 / 5;
  grid-row: 4 / 5;
}

body[data-route="home"] .home-hero-collage-tile-8 {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

body[data-route="home"] .hero-copy {
  z-index: 4;
}

@media (max-width: 640px) {
  body[data-route="home"] .hero {
    min-height: auto;
    height: auto;
    padding: 8px 16px 0;
  }

  body[data-route="home"] .hero-copy {
    padding-bottom: 12px;
  }

  body[data-route="home"] .home-hero-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    opacity: 0.9;
  }

  body[data-route="home"] .home-hero-collage-tile {
    border-radius: 9px;
  }

  body[data-route="home"] .home-hero-collage-tile-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  body[data-route="home"] .home-hero-collage-tile-2 {
    grid-column: 1 / 2;
    grid-row: 3 / 5;
  }

  body[data-route="home"] .home-hero-collage-tile-3 {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
  }

  body[data-route="home"] .home-hero-collage-tile-4 {
    grid-column: 2 / 3;
    grid-row: 4 / 6;
  }

  body[data-route="home"] .home-hero-collage-tile-5 {
    grid-column: 1 / 2;
    grid-row: 5 / 7;
  }

  body[data-route="home"] .home-hero-collage-tile-6 {
    grid-column: 2 / 3;
    grid-row: 6 / 7;
  }

  body[data-route="home"] .home-hero-collage-tile-7,
  body[data-route="home"] .home-hero-collage-tile-8 {
    display: none;
  }
}
