:root {
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --smoke: #e5e7eb;
  --off-white: #f9fafb;
  --ink: #111827;
  --navy-black: #020617;
  --alabaster: #f9fafb;
  --deep-crimson: #991b1b;
  --active-crimson: #b91c1c;
  --midnight-cobalt: #1e40af;
  --electric-cobalt: #2563eb;
  --sage: #7a8f72;
  --gold: #b9872f;
  --radius: 8px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.18);
}

[data-theme="light"] {
  --page: var(--smoke);
  --surface: var(--off-white);
  --surface-strong: #ffffff;
  --surface-muted: #eef1f5;
  --text: var(--ink);
  --text-soft: #4b5563;
  --text-faint: #6b7280;
  --line: rgba(17, 24, 39, 0.14);
  --accent: var(--deep-crimson);
  --accent-live: var(--deep-crimson);
  --energy: var(--midnight-cobalt);
  --button-text: #ffffff;
  --mockup-base: #eef1f5;
  --mockup-shadow: rgba(17, 24, 39, 0.16);
}

[data-theme="dark"] {
  --page: var(--navy-black);
  --surface: #0a1020;
  --surface-strong: #111827;
  --surface-muted: #10192f;
  --text: var(--alabaster);
  --text-soft: #cbd5e1;
  --text-faint: #94a3b8;
  --line: rgba(249, 250, 251, 0.14);
  --accent: var(--electric-cobalt);
  --accent-live: var(--active-crimson);
  --energy: var(--electric-cobalt);
  --button-text: #ffffff;
  --mockup-base: #172033;
  --mockup-shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(153, 27, 27, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 64, 175, 0.05) 1px, transparent 1px),
    var(--page);
  background-size: 44px 44px;
  letter-spacing: 0;
}

button,
input,
textarea,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-sigil {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-live), var(--energy));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 12px;
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.05;
}

.brand-mark small {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 12px;
}

.menu-links,
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-links button,
.theme-toggle button,
.menu-links a,
.hero-actions button,
.hero-actions a,
.scan-button,
.code-row button,
.gallery-toolbar a,
.merch-actions a,
.merch-actions button,
.cta-section a,
.operator-panel button,
.response-box button,
.user-cta-row a,
#collect-next,
.user-tabs button {
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.menu-links button,
.theme-toggle button,
.menu-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  background: transparent;
  padding: 8px 10px;
  font-size: 13px;
}

.nav-cta,
.cta-section a,
.hero-actions button,
.code-row button,
.scan-button,
.merch-actions a,
.response-box button,
.user-cta-row a,
#collect-next {
  color: var(--button-text) !important;
  background: var(--accent-live) !important;
  border-color: transparent !important;
  font-weight: 800;
}

.scan-button,
.hero-actions a,
.gallery-toolbar a,
.merch-actions button {
  color: var(--button-text);
  background: var(--energy);
  border-color: transparent;
  font-weight: 800;
}

.menu-links button:hover,
.menu-links a:hover,
.theme-toggle button:hover,
.theme-toggle button.is-active,
.user-tabs button:hover,
.user-tabs button.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.hero-actions button:hover,
.hero-actions a:hover,
.code-row button:hover,
.scan-button:hover,
.gallery-toolbar a:hover,
.merch-actions a:hover,
.merch-actions button:hover,
.cta-section a:hover,
.response-box button:hover,
#collect-next:hover {
  transform: translateY(-1px);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

section {
  scroll-margin-top: 88px;
}

.hero-section,
.user-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: 28px;
  align-items: center;
  padding: 56px 0 32px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-live);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: 58px;
  line-height: 1;
}

h2 {
  font-size: 42px;
  line-height: 1.08;
}

h3 {
  font-size: 24px;
  line-height: 1.15;
}

.hero-lede,
.section-head p:not(.kicker),
.screen-body p,
.feed-card p,
.auth-grid p,
.owner-console p,
.pitch-device p,
.user-view p {
  color: var(--text-soft);
  line-height: 1.68;
}

.hero-lede {
  max-width: 660px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-actions button,
.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.problem-grid,
.suite-strip,
.unlock-layout,
.screen-grid,
.community-feed,
.merch-grid,
.trophy-grid,
.auth-grid,
.console-grid,
.pitch-grid,
.user-app-grid,
.mini-trophy-grid {
  display: grid;
  gap: 12px;
}

.problem-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.problem-grid article,
.pitch-device,
.unlock-panel,
.owner-console,
.screen-card,
.feed-card,
.merch-card,
.trophy-card,
.auth-grid article,
.gallery-toolbar,
.member-state,
.cta-section,
.member-pass,
.phone-shell,
.user-panel,
.response-list article,
.mini-trophy-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}

.problem-grid article {
  padding: 18px;
  box-shadow: none;
}

.problem-grid span,
.screen-body span,
.auth-grid span,
.owner-console span,
.merch-meta span,
.collect-state,
.mini-trophy-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 800;
}

.problem-grid strong,
.owner-console strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 20px;
}

.pitch-device {
  overflow: hidden;
}

.device-top {
  display: flex;
  gap: 6px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.device-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.device-screen {
  padding: 24px;
}

.device-screen h2 {
  font-size: 34px;
}

.mini-loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 22px 0;
}

.mini-loop span {
  display: grid;
  place-items: center;
  min-height: 54px;
  color: var(--button-text);
  background: linear-gradient(135deg, var(--accent-live), var(--energy));
  border-radius: var(--radius);
  font-weight: 900;
  font-size: 12px;
}

.qr-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.qr-card strong,
.qr-card small {
  display: block;
}

.qr-card small {
  margin-top: 5px;
  color: var(--text-faint);
}

.qr-grid {
  height: 104px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, var(--text) 12px, transparent 12px 22px, var(--text) 22px 34px, transparent 34px),
    linear-gradient(0deg, transparent 10px, var(--text) 10px 20px, transparent 20px 28px, var(--text) 28px 40px, transparent 40px),
    var(--surface-strong);
  background-size: 34px 34px;
}

.suite-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

.suite-strip div {
  padding: 18px;
  background: var(--surface);
}

.suite-strip span {
  display: block;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.suite-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.unlock-section,
.suite-dashboard,
.gallery-section,
.trophy-section,
.authenticity-section,
.cta-section {
  padding: 54px 0;
}

.section-head {
  max-width: 820px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin-bottom: 12px;
}

.unlock-layout {
  grid-template-columns: minmax(330px, 0.85fr) minmax(0, 1.15fr);
  align-items: stretch;
}

.unlock-panel,
.owner-console {
  padding: 22px;
  overflow: hidden;
}

.unlock-panel {
  position: relative;
}

.unlock-panel:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-live), var(--energy), var(--gold));
}

.unlock-form {
  display: grid;
  gap: 12px;
  margin: 18px 0 16px;
}

.unlock-form label,
.response-box label {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 800;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.code-row input,
.response-box textarea {
  width: 100%;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
}

.code-row input {
  min-height: 48px;
  font-weight: 800;
  text-transform: uppercase;
}

.response-box textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.code-row input:focus,
.response-box textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--energy) 45%, transparent);
  outline-offset: 2px;
}

.code-row button,
.scan-button,
.response-box button {
  padding: 0 18px;
}

.scan-button {
  width: 100%;
}

.status-line {
  min-height: 42px;
  display: flex;
  align-items: center;
  color: var(--text-soft);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.status-line.is-good {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-live), var(--energy));
  border-color: transparent;
}

.status-line.is-bad {
  color: #ffffff;
  background: var(--accent-live);
  border-color: transparent;
}

.key-ledger {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.key-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-muted) 76%, transparent);
}

.key-chip button {
  border: 0;
  border-radius: 6px;
  color: var(--button-text);
  background: var(--energy);
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 800;
}

.key-chip button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.key-chip strong,
.key-chip span {
  display: block;
}

.key-chip strong {
  font-size: 13px;
}

.key-chip span {
  color: var(--text-faint);
  font-size: 12px;
}

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

.console-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.member-state {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  box-shadow: none;
  color: var(--text-soft);
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-faint);
}

body.is-unlocked .state-dot {
  background: var(--accent-live);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-live) 16%, transparent);
}

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

.screen-card {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  overflow: hidden;
  box-shadow: none;
}

.screen-image {
  min-height: 260px;
  background: var(--surface-muted);
}

.screen-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screen-body {
  padding: 18px;
}

.screen-body details,
.deep-detail,
.user-view details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 12px;
}

.screen-body summary,
.deep-detail summary,
.user-view summary {
  cursor: pointer;
  font-weight: 900;
}

.screen-body ul {
  margin-bottom: 0;
  padding-left: 20px;
  color: var(--text-soft);
  line-height: 1.55;
}

.community-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.feed-card {
  padding: 18px;
  box-shadow: none;
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
}

.feed-card small {
  color: var(--text-faint);
  font-weight: 800;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  box-shadow: none;
}

.gallery-toolbar strong,
.gallery-toolbar span {
  display: block;
}

.gallery-toolbar span {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 13px;
}

.gallery-toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.merch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.merch-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  box-shadow: none;
}

.mockup {
  position: relative;
  min-height: 275px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--energy) 16%, transparent), transparent),
    var(--surface-muted);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.mockup:before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  border-radius: var(--radius);
  opacity: 0.7;
}

.product-shape {
  position: relative;
  width: 62%;
  height: 66%;
  background: var(--mockup-base);
  box-shadow: 0 28px 40px var(--mockup-shadow);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  overflow: hidden;
}

.product-shape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mockup-shirt .product-shape {
  width: 54%;
  height: 64%;
  clip-path: polygon(18% 0, 36% 10%, 64% 10%, 82% 0, 100% 22%, 84% 36%, 84% 100%, 16% 100%, 16% 36%, 0 22%);
}

.mockup-tote .product-shape {
  width: 48%;
  height: 62%;
  border-radius: 4px 4px var(--radius) var(--radius);
}

.mockup-tote .product-shape:before {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  top: -24%;
  height: 34%;
  border: 8px solid var(--mockup-base);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  z-index: 2;
}

.mockup-tray .product-shape {
  width: 72%;
  height: 44%;
  border-radius: var(--radius);
}

.mockup-stickers .product-shape {
  width: 58%;
  height: 68%;
  border-radius: var(--radius);
}

.mockup-poster .product-shape {
  width: 50%;
  height: 76%;
}

.mockup-pin .product-shape {
  width: 46%;
  height: 46%;
  border-radius: 50%;
}

.key-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
}

.merch-body {
  padding: 16px;
}

.merch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.collect-state.is-collected,
.mini-trophy-grid article.is-collected span {
  color: #ffffff;
  background: var(--accent-live);
  border-color: transparent;
}

.merch-card h3 {
  margin-bottom: 8px;
  font-size: 23px;
}

.merch-card p {
  min-height: 48px;
  color: var(--text-soft);
  line-height: 1.5;
}

.merch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.merch-actions a,
.merch-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
}

.merch-actions button:disabled,
.mini-trophy-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.merch-card.is-locked .product-shape img,
.mini-trophy-grid article.is-locked img {
  filter: blur(8px) saturate(0.55);
  transform: scale(1.04);
}

.trophy-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.trophy-card {
  min-height: 170px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
  box-shadow: none;
}

.trophy-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-live), var(--energy));
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  filter: grayscale(1);
  opacity: 0.46;
}

.trophy-card.is-collected .trophy-icon {
  filter: none;
  opacity: 1;
}

.trophy-card strong {
  display: block;
  font-size: 13px;
}

.trophy-card span {
  color: var(--text-faint);
  font-size: 12px;
}

.auth-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.auth-grid article {
  padding: 18px;
  box-shadow: none;
}

.auth-grid h3 {
  margin-top: 12px;
  font-size: 21px;
}

.deep-detail {
  margin-top: 12px;
}

.deep-detail p {
  margin: 12px 0 0;
  color: var(--text-soft);
  line-height: 1.68;
}

.cta-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin: 54px 0 80px;
  padding: 28px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-live) 14%, transparent), transparent 52%),
    var(--surface);
}

.cta-section a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  white-space: nowrap;
}

body:not(.is-unlocked) .screen-grid,
body:not(.is-unlocked) .community-feed {
  opacity: 0.76;
}

.user-hero {
  min-height: auto;
  padding-top: 52px;
}

.member-pass {
  padding: 24px;
}

.member-pass span,
.member-pass strong,
.member-pass small {
  display: block;
}

.member-pass strong {
  margin: 8px 0;
  font-family: var(--font-display);
  font-size: 38px;
}

.member-pass small {
  color: var(--text-faint);
}

.user-app-grid {
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: start;
  padding-bottom: 70px;
}

.phone-shell {
  padding: 14px;
  border-radius: 24px;
}

.phone-top {
  width: 90px;
  height: 7px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--line);
}

.phone-screen {
  min-height: 600px;
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-muted);
  overflow: hidden;
}

.phone-screen h2 {
  font-size: 31px;
}

.phone-art {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.phone-art img {
  width: 100%;
  height: 330px;
  object-fit: cover;
}

.phone-progress {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.phone-progress span {
  color: var(--text-faint);
  font-weight: 800;
}

.user-panel {
  padding: 18px;
}

.user-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.user-tabs button {
  padding: 0 12px;
  color: var(--text-soft);
  background: transparent;
}

.user-view {
  min-height: 440px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.response-box {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.response-box button {
  justify-self: start;
  min-height: 42px;
  padding: 0 14px;
}

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

.response-list article {
  padding: 14px;
  box-shadow: none;
}

.mini-trophy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.mini-trophy-grid article {
  padding: 14px;
  box-shadow: none;
}

.mini-trophy-grid strong,
.mini-trophy-grid small {
  display: block;
}

.mini-trophy-grid strong {
  margin: 10px 0 6px;
}

.mini-trophy-grid small {
  color: var(--text-faint);
}

.user-cta-row {
  margin-top: 18px;
}

.user-cta-row a,
#collect-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
}

.scan-gate {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 28px;
  align-items: center;
  padding: 56px 0;
}

.scan-copy button {
  min-height: 48px;
  padding: 0 18px;
  color: var(--button-text);
  background: var(--accent-live);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.mansion-lock {
  min-height: 520px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 40%),
    var(--surface);
  background-size: 34px 34px, 34px 34px, auto, auto;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lock-plate {
  width: min(360px, 72vw);
  aspect-ratio: 0.68;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 46%, var(--line));
  border-radius: 999px 999px 90px 90px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(135deg, #21160d, #6f5121 45%, #0b0a0a);
  box-shadow: inset 0 0 0 18px rgba(0, 0, 0, 0.18), 0 30px 80px rgba(0, 0, 0, 0.34);
}

.keyhole {
  width: 116px;
  height: 220px;
  position: relative;
  background: #020617;
  clip-path: polygon(50% 0, 78% 12%, 88% 34%, 72% 50%, 66% 100%, 34% 100%, 28% 50%, 12% 34%, 22% 12%);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.keyhole span {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.84), transparent 58%);
  opacity: 0.28;
}

.scan-beam {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.34), transparent 22%);
  opacity: 0;
  transform: scale(0.3);
}

.scan-gate.is-scanning .scan-beam {
  animation: keyholeBeam 1.25s ease forwards;
}

.scan-gate.is-scanning .lock-plate {
  animation: keyholeTravel 1.25s ease forwards;
}

.scan-gate.is-entered {
  display: none;
}

.is-hidden {
  display: none;
}

@keyframes keyholeBeam {
  0% {
    opacity: 0;
    transform: scale(0.25);
  }
  40% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes keyholeTravel {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  100% {
    transform: scale(3.4);
    filter: brightness(1.45);
  }
}

.video-grid,
.resource-grid,
.social-feed {
  display: grid;
  gap: 12px;
}

.video-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.video-card,
.resource-grid article,
.social-feed article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.video-card > div:not(.video-thumb),
.resource-grid article,
.social-feed article {
  padding: 14px;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-muted);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.video-card small,
.social-feed strong {
  color: var(--accent-live);
  font-weight: 900;
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-grid span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 800;
}

.resource-grid strong {
  display: block;
  margin: 12px 0 8px;
}

.social-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.community-cta {
  margin: 0 0 16px;
}

.community-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--button-text);
  background: var(--accent-live);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 900;
}

.mini-trophy-grid button {
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.mini-trophy-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.82);
}

.modal-shell.is-open {
  display: flex;
}

.modal-card {
  width: min(880px, 100%);
  max-height: min(760px, 92vh);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-card > img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.modal-close {
  position: absolute;
  transform: translateY(-54px);
  min-height: 38px;
  color: var(--button-text);
  background: var(--accent-live);
  border: 0;
  border-radius: var(--radius);
  padding: 0 12px;
  cursor: pointer;
  font-weight: 900;
}

.modal-note {
  color: var(--text-soft);
  line-height: 1.6;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .menu-links,
  .theme-toggle {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-section,
  .user-hero,
  .unlock-layout,
  .scan-gate,
  .user-app-grid {
    grid-template-columns: 1fr;
  }

  .screen-grid,
  .merch-grid,
  .auth-grid,
  .video-grid,
  .resource-grid,
  .social-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trophy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .topbar {
    padding: 12px;
  }

  .brand-mark strong {
    font-size: 16px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.04;
  }

  h2 {
    font-size: 32px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-lede {
    font-size: 16px;
  }

  .problem-grid,
  .suite-strip,
  .screen-grid,
  .community-feed,
  .merch-grid,
  .auth-grid,
  .console-grid,
  .cta-section,
  .mini-trophy-grid,
  .video-grid,
  .resource-grid,
  .social-feed,
  .modal-card {
    grid-template-columns: 1fr;
  }

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

  .gallery-toolbar,
  .code-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .gallery-toolbar {
    display: grid;
  }

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

  .phone-screen {
    min-height: auto;
  }
}
