/* Livery Picker — Williams 50 Years. Tokens follow the Figma variables. */

/* Drop licensed Williams Grotesk .woff2 files in /fonts and add url() sources
   here; until then an installed copy is used, else Inter Tight. */
@font-face { font-family: "Williams Grotesk"; font-weight: 400; src: local("Williams Grotesk Regular"), local("WilliamsGrotesk-Regular"); }
@font-face { font-family: "Williams Grotesk"; font-weight: 500; src: local("Williams Grotesk Medium"), local("WilliamsGrotesk-Medium"); }
@font-face { font-family: "Williams Grotesk"; font-weight: 600; src: local("Williams Grotesk DemiBold"), local("WilliamsGrotesk-DemiBold"); }
@font-face { font-family: "Williams Grotesk"; font-weight: 700; src: local("Williams Grotesk Bold"), local("WilliamsGrotesk-Bold"); }

:root {
  --midnight: #000a20;
  --blue-500: #0042ff;
  --blue-600: #0230be;
  --blue-300: #668eff;
  --white: #fff;
  --black-800: #0e1014;
  --text-2: rgba(255, 255, 255, 0.6);
  --divider: rgba(255, 255, 255, 0.15);
  --divider-subtle: rgba(255, 255, 255, 0.1);
  --font: "Williams Grotesk", "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --header-h: 80px;
  --margin: 32px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }

.ms {
  font-family: "Material Symbols Sharp";
  font-weight: 400; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  display: inline-block; width: 1em; height: 1em; overflow: hidden;
  font-variation-settings: "FILL" 0, "GRAD" 0;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  flex: none;
}
.ms-14 { font-size: 14px; } .ms-16 { font-size: 16px; } .ms-20 { font-size: 20px; } .ms-24 { font-size: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 999px; font-weight: 600; line-height: 1.1; white-space: nowrap;
  transition: background-color 0.18s, transform 0.12s, opacity 0.18s;
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 38px; padding: 0 20px; font-size: 14px; }
.btn-md { height: 44px; padding: 0 24px; font-size: 16px; }
.btn-lg { height: 56px; padding: 0 32px; font-size: 16px; gap: 6px; }
.btn-primary { background: var(--blue-500); color: var(--white); }
.btn-primary:hover { background: #1f58ff; }
.btn-glass { background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); color: var(--white); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.28); }
.btn-soft { background: rgba(0, 10, 32, 0.07); color: var(--midnight); }
.btn-soft:hover { background: rgba(0, 10, 32, 0.12); }
.btn-white { background: var(--white); color: var(--midnight); }
.btn-white:hover { background: #e9edf6; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 999px; background: rgba(255, 255, 255, 0.2); color: var(--white);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.18s, color 0.18s, transform 0.12s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.3); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn-lg { width: 56px; height: 56px; }
.icon-btn-44 { width: 44px; height: 44px; }
.icon-btn-32 { width: 32px; height: 32px; }
.icon-btn-white, .icon-btn.is-active { background: var(--white); color: var(--black-800); }
.icon-btn-white:hover, .icon-btn.is-active:hover { background: #e9edf6; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--midnight); }
.hdr-desktop { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--margin); }
.hdr-logo { width: 440px; flex: 0 1 440px; min-width: 250px; }
.hdr-logo img { height: 38px; width: auto; max-width: none; }
.hdr-nav { display: flex; gap: 32px; height: 100%; }
.hdr-nav a { display: flex; align-items: center; gap: 2px; font-weight: 600; white-space: nowrap; }
.hdr-nav a:hover { color: var(--blue-300); }
.hdr-actions { width: 440px; flex: 0 1 440px; display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.member { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.avatar { width: 38px; height: 38px; margin: 3px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: linear-gradient(-37deg, var(--blue-300) 12%, var(--blue-500) 86%); position: relative; }
body.logged-in .avatar::after, body.logged-in .member-m::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #3ddc84; border: 2px solid var(--midnight); }
.hdr-mobile { display: none; height: 52px; align-items: center; justify-content: space-between; }
.hdr-icon { width: 60px; height: 52px; display: flex; align-items: center; justify-content: center; position: relative; }
body.logged-in .member-m::after { right: 14px; bottom: 12px; }
.hdr-aw { height: 24px; width: auto; }

/* ---------- Stage ---------- */
.stage {
  position: relative; overflow: hidden; isolation: isolate; scroll-margin-top: var(--header-h);
  height: clamp(540px, calc(100svh - var(--header-h)), 1200px);
  background: linear-gradient(var(--sky, #6f9bd1) 0 42%, var(--ground, #e6e3df) 58% 100%);
  container: stage / size;
  user-select: none; -webkit-user-select: none;
}
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0s 0.45s; }
.stage[data-mode="lineup"] .scene-lineup,
.stage[data-mode="boot"] .scene-lineup,
.stage[data-mode="spin"] .scene-spin,
.stage[data-mode="voted"] .scene-voted { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease), visibility 0s; }

/* Lineup media: covers the stage on landscape; on tall stages it fits the car
   to the width and the sky/ground are extended with a sampled gradient. */
.lineup-media {
  position: absolute; left: 50%; top: 50%;
  width: min(max(100cqw, 177.78cqh), 112cqw); aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
}
.lineup-media img, .lineup-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
#transitionVideo { visibility: hidden; }
.stage.playing #transitionVideo { visibility: visible; }
@container stage (max-aspect-ratio: 158/100) {
  .lineup-media { -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
}

.scene-spin { background: #9a958f; touch-action: pan-y; cursor: grab; }
.scene-spin.dragging { cursor: grabbing; }
.scene-spin img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; transform: scale(var(--spin-zoom, 1.3)); }
@container stage (max-aspect-ratio: 1/1) { .scene-spin img { --spin-zoom: 1; } }

.shade { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; transition: opacity 0.4s; }
.shade-top { top: 0; height: 30cqh; background: linear-gradient(var(--midnight), rgba(0, 10, 32, 0)); opacity: 0.4; }
.shade-bottom { bottom: 0; height: 30cqh; background: linear-gradient(to top, var(--midnight), rgba(0, 10, 32, 0)); opacity: 0.4; }
.stage[data-mode="spin"] .shade-top { height: 48cqh; opacity: 0.5; }
.stage[data-mode="spin"] .shade-bottom { height: 35cqh; }
.stage[data-mode="voted"] .shade { opacity: 0; }

/* Picker */
.picker { position: absolute; z-index: 3; top: 43px; left: 0; right: 0; height: 165px; --item-w: 170px; transition: opacity 0.3s, transform 0.4s var(--ease); }
.picker-label { position: absolute; top: 8px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 500; line-height: 1; text-transform: uppercase; color: var(--text-2); }
.picker-window { position: absolute; top: 32px; left: 0; right: 0; height: 101px; overflow: hidden; }
.picker-list { position: absolute; top: 0; left: 50%; height: 100%; display: flex; transition: transform 0.6s var(--ease); will-change: transform; }
.picker-item {
  width: var(--item-w); height: 100%; flex: none; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px; letter-spacing: -0.01em; line-height: 1.1; color: var(--text-2); white-space: nowrap;
  transition: font-size 0.45s var(--ease), color 0.3s, letter-spacing 0.45s;
}
.picker-item:hover { color: var(--white); }
.picker-item.is-active { font-size: 48px; letter-spacing: -0.02em; color: var(--white); cursor: default; }
.picker-progress { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.picker-progress i { display: block; height: 3px; width: 12px; background: var(--white); opacity: 0.3; transition: width 0.45s var(--ease), opacity 0.3s; }
.picker-progress i.is-active { width: 32px; opacity: 1; }

.trigger { position: absolute; z-index: 2; top: 198px; bottom: 104px; width: 18%; min-width: 90px; }
.trigger-l { left: 0; cursor: w-resize; } .trigger-r { right: 0; cursor: e-resize; }
.trigger:disabled { cursor: default; }

/* 360 title */
.spin-title { position: absolute; z-index: 3; top: 0; left: 0; right: 0; padding: 32px; text-align: center; pointer-events: none; opacity: 0; transform: translateY(-8px); transition: opacity 0.3s, transform 0.4s var(--ease); }
.spin-name { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.spin-hint { margin-top: 8px; color: var(--text-2); }

.stage:not([data-mode="lineup"]) .picker { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.stage:not([data-mode="lineup"]) .trigger { display: none; }
.stage[data-mode="spin"] .spin-title { opacity: 1; transform: none; }

/* Bottom controls */
.stage-bottom { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); }
.stage-bottom > * { pointer-events: auto; }
.sb-left, .sb-right { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.sb-left { padding: 32px; height: 91px; }
.sb-right { padding: 24px; justify-content: flex-end; }
.countdown { display: flex; align-items: baseline; gap: 8px; text-transform: uppercase; white-space: nowrap; line-height: 1; }
.countdown-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.countdown-value { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.votebar { flex: none; width: 390px; max-width: 100%; padding: 24px 16px; display: flex; align-items: center; gap: 8px; }
.votebar-vote { flex: 1 1 0; min-width: 0; }
.stage-topbar { display: none; }
.stage[data-mode="voted"] .stage-bottom, .stage[data-mode="boot"] .stage-bottom { opacity: 0; transform: translateY(12px); pointer-events: none; }
.stage[data-mode="voted"] .stage-bottom > *, .stage[data-mode="boot"] .stage-bottom > * { pointer-events: none; }
.stage[data-mode="boot"] .picker, .stage[data-mode="boot"] .stage-topbar { opacity: 0; }

/* Info card */
.info-layer { position: absolute; z-index: 4; inset: 0; padding: 32px 32px 104px; display: flex; align-items: center; pointer-events: none; }
.info-card {
  position: relative; pointer-events: auto; width: 452px; max-width: 100%; max-height: 100%; overflow: auto;
  display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--midnight); animation: card-in 0.35s var(--ease);
}
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }
.info-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; }
.info-name { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; padding-right: 48px; }
.info-stats { display: flex; border-top: 1px solid rgba(0, 10, 32, 0.15); border-bottom: 1px solid rgba(0, 10, 32, 0.15); }
.info-stats div { flex: 1 1 0; padding: 12px 0 8px 12px; border-left: 1px solid rgba(0, 10, 32, 0.15); display: flex; flex-direction: column; gap: 8px; }
.info-stats div:first-child { padding-left: 0; border-left: 0; }
.info-stats dt { font-size: 12px; font-weight: 500; line-height: 1; text-transform: uppercase; color: rgba(0, 10, 32, 0.6); }
.info-stats dd { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.info-body { display: flex; flex-direction: column; gap: 24px; }
.info-photo { width: 100%; height: 230px; object-fit: cover; }

/* ---------- Voted hero ---------- */
.scene-voted {
  background:
    linear-gradient(to top, rgba(1, 20, 63, 0.7), rgba(0, 10, 32, 0) 40%),
    linear-gradient(rgba(1, 20, 63, 0.92), rgba(0, 10, 32, 0) 48.5%),
    url(../ui/skyline.jpg) center top / auto 126.5% no-repeat, #7f9cc4;
  --u: min(calc(100cqw / 1920), calc(100cqh / 1000));
}
.voted-art { position: absolute; left: 50%; top: 50%; width: calc(var(--u) * 1920); height: calc(var(--u) * 1000); transform: translate(-50%, -50%); }
.voted-art > * { position: absolute; left: 50%; transform: translateX(-50%); }
.voted-lockup { top: calc(var(--u) * 98); height: calc(var(--u) * 120); width: auto; max-width: none; }
.voted-thanks { top: calc(var(--u) * 283); width: 100%; text-align: center; font-weight: 600; font-size: max(16px, calc(var(--u) * 24)); letter-spacing: -0.01em; line-height: 1.2; }
.voted-name { top: calc(var(--u) * 349); font-weight: 700; font-size: calc(var(--u) * 378); line-height: 0.715; letter-spacing: -0.045em; white-space: nowrap; height: calc(var(--u) * 270); }
.voted-name-reflect { top: calc(var(--u) * 609); transform: translateX(-50%) scaleY(-1); opacity: 0.3; -webkit-mask-image: linear-gradient(to top, #000, transparent 75%); mask-image: linear-gradient(to top, #000, transparent 75%); }
.voted-car { top: calc(var(--u) * 433); width: calc(var(--u) * 899); margin-left: calc(var(--u) * -52); max-width: none; }
.stage[data-mode="voted"] .voted-art > * { animation: rise 0.8s var(--ease) both; }
.stage[data-mode="voted"] .voted-thanks { animation-delay: 0.1s; }
.stage[data-mode="voted"] .voted-name { animation-delay: 0.18s; }
.stage[data-mode="voted"] .voted-car { animation: car-in 0.9s var(--ease) 0.3s both; }
@keyframes rise { from { opacity: 0; translate: 0 24px; } }
@keyframes car-in { from { opacity: 0; translate: 60px 0; } }
.stage[data-mode="voted"] .voted-name-reflect { animation-name: rise-reflect; }
@keyframes rise-reflect { from { opacity: 0; } to { opacity: 0.3; } }

.share-panel {
  position: absolute; z-index: 6; right: 32px; bottom: 32px; width: 296px; padding: 16px; border-radius: 16px;
  background: var(--white); color: var(--midnight); display: flex; flex-direction: column; gap: 16px;
  opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity 0.5s var(--ease) 0.5s, transform 0.6s var(--ease) 0.5s, visibility 0s 1.1s;
}
.stage[data-mode="voted"] .share-panel { opacity: 1; visibility: visible; transform: none; transition: opacity 0.5s var(--ease) 0.5s, transform 0.6s var(--ease) 0.5s, visibility 0s; }
.share-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.share-actions { display: flex; flex-direction: column; gap: 8px; }
.share-actions .btn { width: 100%; }

.restart-btn { position: absolute; z-index: 6; top: 24px; left: 32px; opacity: 0; visibility: hidden; transition: opacity 0.4s 0.8s, visibility 0s 1.2s, background-color 0.18s; }
.stage[data-mode="voted"] .restart-btn { opacity: 1; visibility: visible; transition: opacity 0.4s 0.8s, visibility 0s, background-color 0.18s; }
@media (max-width: 767px) { .restart-btn { top: 12px; left: 16px; height: 32px; padding: 0 14px; font-size: 12px; } }

/* ---------- Vote card (CTA image, confirm image, share thumb) ---------- */
.vcard {
  position: relative; overflow: hidden; border-radius: 8px; container-type: inline-size; color: var(--white);
  background:
    linear-gradient(to top, rgba(1, 20, 63, 0.65), rgba(0, 10, 32, 0) 38%),
    linear-gradient(rgba(1, 20, 63, 0.92), rgba(0, 10, 32, 0) 52%),
    url(../ui/skyline.jpg) center top / auto 122% no-repeat, #7f9cc4;
}
.vcard-square { aspect-ratio: 1; }
.vcard-wide { aspect-ratio: 388 / 238; }
.vcard > * { position: absolute; left: 50%; transform: translateX(-50%); }
.vcard-logo { top: 9%; width: 23cqw; max-width: none; }
.vcard-name { top: 29%; font-weight: 700; font-size: 31cqw; line-height: 0.715; letter-spacing: -0.045em; white-space: nowrap; }
.vcard-car { top: 41%; width: 60cqw; max-width: none; margin-left: -2cqw; }
.vcard-tag { display: none; bottom: 7.5%; font-weight: 600; font-size: 3.6cqw; white-space: nowrap; letter-spacing: -0.01em; }
.vcard-square .vcard-logo { top: 12%; width: 27cqw; }
.vcard-square .vcard-name { top: 38%; font-size: 33cqw; }
.vcard-square .vcard-car { top: 47%; width: 68cqw; }
.vcard-square .vcard-tag { display: block; }

/* ---------- Auth placeholder + modal ---------- */
.auth-block { position: absolute; z-index: 20; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 10, 32, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fade 0.25s; }
.auth-card, .modal-card { width: 452px; max-width: 100%; padding: 32px; border-radius: 16px; background: var(--white); color: var(--midnight); display: flex; flex-direction: column; gap: 24px; animation: card-in 0.35s var(--ease); }
.auth-card { align-items: center; text-align: center; gap: 16px; }
.auth-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px; border: 1px dashed rgba(0, 10, 32, 0.4); color: rgba(0, 10, 32, 0.6); }
.auth-logo { width: 150px; margin: 8px 0; filter: brightness(0.25) saturate(0); }
.auth-card h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.auth-card p { color: rgba(0, 10, 32, 0.7); }
.auth-card .dialog-actions { margin-top: 8px; }
.dialog-actions { display: flex; gap: 10px; width: 100%; }
.dialog-actions .btn-primary { flex: 1 1 0; min-width: 0; }
.modal { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 10, 32, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.25s; }
.modal-card p { text-align: center; font-weight: 500; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Loader ---------- */
.boot { position: absolute; z-index: 30; inset: 0; background: var(--midnight); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; transition: opacity 0.6s var(--ease); }
.boot.gone { opacity: 0; pointer-events: none; }
.boot-label { font-size: 12px; font-weight: 500; line-height: 1; text-transform: uppercase; color: var(--text-2); }
.boot-logo { width: 245px; aspect-ratio: 311 / 100; background: rgba(255, 255, 255, 0.2); -webkit-mask: url(../ui/w50-gold.svg) center / contain no-repeat; mask: url(../ui/w50-gold.svg) center / contain no-repeat; }
.boot-logo i { display: block; height: 100%; width: 0; background: var(--white); transition: width 0.25s linear; }

/* ---------- Content ---------- */
.content { width: min(920px, 100% - 64px); margin: 0 auto; padding: 128px 0; display: flex; flex-direction: column; gap: 48px; }
.content-head { display: flex; flex-direction: column; gap: 48px; }
.content-logo { width: 311px; }
.content h1 { font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.content-intro { font-size: 24px; line-height: 1.3; }
.content hr { border: 0; height: 1px; background: var(--divider); }
.cta { margin: 24px 0; display: flex; min-height: 300px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 8px; overflow: hidden; background: var(--blue-600); }
.cta-text { flex: 1 1 0; min-width: 0; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 24px; }
.cta-label { background: var(--white); color: var(--black-800); font-size: 12px; font-weight: 500; line-height: 1; padding: 6px 8px; border-radius: 4px; }
.cta-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta-copy h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.cta-copy p { font-size: 14px; line-height: 1.3; opacity: 0.6; }
.cta-copy .btn { margin-top: 12px; }
.cta-image { flex: 1 1 0; min-width: 0; aspect-ratio: auto; border-radius: 0; }
.rules { display: flex; flex-direction: column; gap: 24px; }
.rules h2 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.rules ol { padding-left: 30px; font-size: 14px; line-height: 1.3; color: var(--text-2); }

/* ---------- Footer ---------- */
.footer-band { height: 180px; padding: 32px; display: flex; align-items: center; justify-content: space-between; background: var(--midnight) url(../ui/footer-band.jpg) left center / cover no-repeat; }
.footer-band p { flex: 1 1 0; text-align: center; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; text-transform: uppercase; }
.footer-band img { width: 180px; }
.footer-main { padding: 32px; display: flex; flex-direction: column; gap: 44px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr 1fr 0.59fr; gap: 16px; }
.footer-links div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-links h4 { font-size: 12px; font-weight: 500; line-height: 1; text-transform: uppercase; color: var(--text-2); margin-bottom: 20px; }
.footer-links a { font-size: 15px; line-height: 18px; }
.footer-links a:hover { color: var(--blue-300); }
.footer-social { display: flex; align-items: center; justify-content: space-between; padding: 32px 0; border-top: 1px solid var(--divider-subtle); border-bottom: 1px solid var(--divider-subtle); }
.social-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.social-icons a { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.social-icons img { width: 24px; height: 24px; }
.partners { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0.5; margin-top: -12px; }
.partners .p-title { width: 418px; max-width: 80%; }
.partners .p-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.partners .p-2 img { width: 200px; height: 70px; }
.partners .p-3 img { width: 107px; height: 48px; }
.legal { margin-top: -12px; text-align: center; font-size: 11px; line-height: 1.4; opacity: 0.5; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 200; left: 50%; bottom: 32px; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 999px; background: var(--white); color: var(--midnight); font-size: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease); white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  .hdr-nav { gap: 22px; }
  .hdr-logo, .hdr-actions { flex-basis: 260px; width: auto; }
  .sb-left { padding: 24px; }
  .countdown-label { display: none; }
}
@media (max-width: 1000px) {
  .hdr-nav { display: none; }
  .content h1 { font-size: 56px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  :root { --header-h: 52px; --margin: 16px; }
  .hdr-desktop { display: none; }
  .hdr-mobile { display: flex; }

  .stage { height: clamp(520px, calc(100svh - var(--header-h)), 900px); }
  .shade-top { height: 49cqh; opacity: 0.6; }
  .shade-bottom { height: 32cqh; }

  .stage-topbar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--divider-subtle); transition: opacity 0.3s; }
  .stage-topbar .countdown-label { display: inline; font-size: 10px; }
  .stage-topbar .countdown-value { font-size: 14px; }
  .stage:not([data-mode="lineup"]) .stage-topbar { opacity: 0; pointer-events: none; }
  .sb-left, .sb-right { display: none; }
  .stage-bottom { justify-content: center; }
  .votebar { width: 100%; padding: 24px; }
  .btn-lg { height: 48px; padding: 0 24px; font-size: 14px; }
  .icon-btn-lg { width: 48px; height: 48px; }
  .icon-btn-lg .ms { font-size: 20px; }

  .picker { top: 97px; height: 106px; --item-w: 120px; }
  .picker-label { top: 0; font-size: 11px; }
  .picker-window { top: 21px; height: 60px; }
  .picker-item { font-size: 16px; }
  .picker-item.is-active { font-size: 32px; letter-spacing: -0.03em; }
  .picker-progress { bottom: 12px; }
  .picker-progress i { height: 2px; width: 8px; }
  .picker-progress i.is-active { width: 24px; }
  .trigger { top: 165px; bottom: 96px; width: 49%; }

  .spin-title { padding: 24px; }
  .spin-name { font-size: 24px; }
  .spin-hint { font-size: 14px; }

  .info-layer { padding: 16px 16px 96px; align-items: flex-end; }
  .info-card { width: 100%; padding: 16px; padding-top: 24px; gap: 24px; }
  .info-close { top: 16px; right: 16px; width: 32px; height: 32px; }
  .info-name { font-size: 24px; }
  .info-stats dt { font-size: 10px; }
  .info-stats dd { font-size: 18px; }
  .info-body { font-size: 14px; }
  .info-photo { height: 190px; }

  .scene-voted { --u: min(calc(100cqw / 390), calc(100cqh / 756)); background-size: auto, auto, auto 118%, auto; }
  .voted-art { width: calc(var(--u) * 390); height: calc(var(--u) * 756); }
  .voted-lockup { top: calc(var(--u) * 66); height: calc(var(--u) * 96); }
  .voted-thanks { top: calc(var(--u) * 252); font-size: calc(var(--u) * 16); }
  .voted-name { top: calc(var(--u) * 290); font-size: calc(var(--u) * 133); height: calc(var(--u) * 95); }
  .voted-name-reflect { top: calc(var(--u) * 381); }
  .voted-car { top: calc(var(--u) * 326); width: calc(var(--u) * 348); margin-left: calc(var(--u) * -8); }

  .share-panel { left: 16px; right: 16px; bottom: 16px; width: auto; padding: 12px; display: grid; grid-template-columns: 128px 1fr; gap: 0 16px; align-items: center; }
  .share-title { display: none; }
  .share-actions .btn { height: 40px; font-size: 14px; padding: 0 12px; }

  .auth-card, .modal-card { padding: 16px; gap: 24px; }
  .auth-card { padding: 24px 16px 16px; gap: 14px; }
  .auth-card h2 { font-size: 24px; }
  .auth-card p { font-size: 14px; }
  .vcard-wide { aspect-ratio: 326 / 208; }

  .content { width: calc(100% - 32px); padding: 80px 0; gap: 32px; }
  .content-head { gap: 24px; }
  .content-logo { width: 199px; }
  .content h1 { font-size: 32px; letter-spacing: -0.02em; }
  .br-d { display: none; }
  .content-intro { font-size: 18px; margin-top: -8px; }
  .cta { margin: 0; flex-direction: column-reverse; }
  .cta-image { flex: none; aspect-ratio: 358 / 210; }
  .cta-text { position: relative; padding: 16px; }
  .cta-label { position: absolute; top: -194px; left: 16px; z-index: 1; }
  .cta-copy { width: 100%; }
  .cta-copy h3 { font-size: 18px; }
  .cta-copy .btn { width: 100%; }

  .footer-band { height: auto; padding: 40px 16px; flex-direction: column; gap: 28px; background-position: 20% center; }
  .footer-band img { order: -1; }
  .footer-main { padding: 32px 16px; gap: 32px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .footer-social { flex-direction: column; gap: 24px; padding: 24px 0; }
  .social-icons { justify-content: center; gap: 0; }
  .social-icons a { width: 38px; }
  .partners, .legal { margin-top: 0; }
  .partners .p-2 img { width: 110px; height: 40px; }
  .partners .p-3 img { width: 80px; height: 36px; }
  .toast { bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
