/* Public verify — mobile-first Aurora Void app shell */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --sheet: 292px;
  --spring: cubic-bezier(0.22, 1.18, 0.28, 1);
}

body.public {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--app-h, 100svh);
  background: #07090f;
  color: var(--text);
  overflow-x: hidden;
}
#fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, transparent 30%, rgba(7,9,15,0.55) 100%);
}
body.public .aurora, body.public .orb { display: none; }

.appbar, .app-main, .sheet, .app-foot, .help-drawer, .scan-screen, .toast {
  position: relative; z-index: 2;
}

.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(52px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) 20px 8px;
  gap: 10px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.appbar.is-scrolled {
  background: rgba(7, 9, 15, 0.58);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: rgba(255,255,255,0.06);
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.appbar .admin-link { display: none; }
.appbar .brand-logo { height: 24px; max-width: 148px; }
.nav-cta {
  border: 0; background: transparent;
  color: rgba(232,238,247,0.78);
  font-size: 12px; letter-spacing: 0.08em;
  padding: 6px 2px;
  position: relative;
}
.nav-cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  opacity: 0.55; transform: scaleX(0.86);
  transform-origin: left;
}
.nav-cta:hover { color: #fff; }
.text-link {
  border: 0; background: none; padding: 0;
  color: var(--muted); font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer; text-decoration: none;
}
.text-link:hover { color: var(--cyan); }
.input-help { margin: 8px 0 0; text-align: right; }
.detect-hint {
  margin: 0 0 6px;
  min-height: 0;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--faint);
  text-align: start;
}
.detect-hint:empty { margin: 0; }
.result-actions .text-link { align-self: center; padding: 8px 4px; font-size: 13px; }
.app-foot .dot { margin: 0 8px; color: var(--faint); }
.app-foot .text-link { font-size: 11px; color: var(--faint); }

.app-main {
  padding: calc(52px + var(--safe-top)) 20px 8px;
}
.hero-im {
  text-align: center;
  padding: 12px 0 8px;
  transition: opacity 0.45s var(--spring), transform 0.45s var(--spring), max-height 0.5s var(--spring);
  max-height: 520px;
}
.hero-im h1 {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(28px, 7.4vw, 40px);
  line-height: 1.14; margin: 16px auto 12px;
  max-width: min(100%, 22em);
  background: linear-gradient(180deg, #fff 10%, #c9d4ea 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  word-break: keep-all; line-break: strict;
}
.hero-im h1 .h-line {
  display: block;
  white-space: normal;
  word-break: keep-all;
}
.hero-im .lead {
  color: var(--muted); font-size: 14px; line-height: 1.7;
  max-width: min(40em, 100%); margin: 0 auto;
  word-break: keep-all; line-break: strict;
}
.hero-im .lead .lead-line { display: block; margin-top: 0.35em; }
.hero-im .nb, .nb { white-space: nowrap; word-break: keep-all; }
.kicker, .domain-banner, .help-card h2, .apply-card h2, .alert-card h2,
.ex-title, .modal-card h3, .scan-label, .apply-pill {
  word-break: keep-all;
  line-break: strict;
}
.hero-im .kicker,
.hero-im .domain-banner,
.hero-im .apply-pill { display: none !important; }
.apply-card .apply-lead { display: none !important; }
.sheet .channels { display: none; }
.sheet .channels.is-needed { display: grid; }
.hero-im .lead { max-width: 36em; }


.stage { min-height: 0; margin: 0; position: relative; }

/* Bottom sheet */
.sheet {
  position: sticky;
  bottom: 0;
  margin: 8px 0 0;
  padding: 8px 16px calc(16px + var(--safe-bot));
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(16,22,38,0.92), rgba(10,14,24,0.96));
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,0.45);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  transition: transform 0.55s var(--spring), box-shadow 0.4s ease;
}
.sheet-handle {
  width: 42px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.18); margin: 4px auto 14px;
}
.sheet-peek { display: none; }
.sheet .channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.sheet .chip {
  padding: 11px 4px;
  font-size: 11px;
  letter-spacing: 0.02em;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  transition: transform 0.18s var(--spring), background 0.2s, color 0.2s, border-color 0.2s;
}
.sheet .chip:active { transform: scale(0.94); }
.sheet .search-row { flex-direction: column; gap: 10px; }
.sheet .search-row input {
  height: 54px; border-radius: 16px; font-size: 16px;
}
.sheet .search-row .primary {
  width: 100%; height: 54px; border-radius: 16px; font-size: 16px; letter-spacing: 0.12em;
  transition: transform 0.18s var(--spring), box-shadow 0.2s;
}
.sheet .search-row .primary:active { transform: scale(0.98); }
.samples {
  margin-top: 12px;
  display: flex; gap: 8px; align-items: center;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
  color: var(--faint); font-size: 11px;
}
.samples::-webkit-scrollbar { display: none; }
.samples .lab { flex: none; }
.samples button {
  flex: none;
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.04);
}
.samples button.photo { border-color: rgba(60,232,245,0.28); }
.samples button.warn { border-color: rgba(255,77,106,0.35); color: #ffc2cc; }
.samples button.leave { border-color: rgba(245,185,66,0.35); color: var(--amber); }

/* Full-screen scan overlay */
.scan-screen {
  display: none;
  position: fixed; inset: 0; z-index: 40;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  margin: 0;
  background: rgba(5, 7, 14, 0.30);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 0;
  transform: none;
}
.scan-screen.on { display: flex; }
.scan-screen.on::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 46% 58% at 50% 48%,
    rgba(5, 7, 14, 0.42) 0%,
    rgba(5, 7, 14, 0.16) 45%,
    rgba(5, 7, 14, 0) 72%);
}
.scan-group {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: min(92vw, 420px);
  text-align: center;
}
.scan-radar-wrap {
  position: relative;
  display: grid;
  place-items: center;
}
.scan-radar-wrap .stamp-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.8);
  opacity: 0;
}
.scan-screen.phase-stamp .scan-radar-wrap .stamp-seal {
  animation: stamp 0.55s var(--spring) forwards;
}
.radar {
  width: min(64vw, 280px); aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, rgba(60,232,245,0.08), transparent 55%),
    repeating-radial-gradient(circle at 50% 50%, rgba(60,232,245,0.16) 0 1px, transparent 1px 18%);
  box-shadow: 0 0 0 1px rgba(60,232,245,0.2), 0 0 80px rgba(60,232,245,0.12);
  overflow: hidden;
}
.radar-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(60,232,245,0.12) 1px, transparent 1px) 0 50%/100% 50%,
    linear-gradient(90deg, rgba(60,232,245,0.12) 1px, transparent 1px) 50% 0/50% 100%;
}
.radar-sweep {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(60,232,245,0.0) 80%, rgba(60,232,245,0.55) 100%);
  animation: radar-spin 1.4s linear infinite;
  transform-origin: 50% 50%;
}
.radar-ping {
  position: absolute; inset: 18%;
  border-radius: 50%; border: 1px solid rgba(60,232,245,0.45);
  animation: ping 1.4s ease-out infinite;
}
.radar-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 16px var(--cyan);
  top: 22%; left: 62%;
  animation: blink 1s ease infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }
@keyframes ping { from { transform: scale(0.55); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes blink { 50% { opacity: 0.3; } }

.stream {
  width: min(88vw, 280px); height: 0; opacity: 0; overflow: hidden;
  font-family: var(--font-mono); font-size: 11px; color: var(--cyan);
  line-height: 1.8; text-align: left;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  transition: height 0.4s var(--spring), opacity 0.3s;
}
.scan-screen.phase-stream .stream,
.scan-screen.phase-stamp .stream { height: 132px; opacity: 0.9; }
.stream b { color: #fff; font-weight: 500; }
.stream .ok { color: var(--ok); }

.stamp-seal {
  position: absolute; z-index: 2;
  width: 140px; height: 140px; border-radius: 50%;
  border: 2px dashed rgba(232,200,114,0.85);
  display: grid; place-items: center;
  color: var(--gold); text-align: center; letter-spacing: 0.16em;
  font-size: 11px; font-weight: 700; line-height: 1.4;
  background: radial-gradient(circle, rgba(232,200,114,0.16), rgba(7,9,15,0.4));
  box-shadow: 0 0 40px rgba(232,200,114,0.28);
  transform: scale(1.8); opacity: 0;
  pointer-events: none;
}
.scan-screen.phase-stamp .stamp-seal {
  animation: stamp 0.55s var(--spring) forwards;
}
@keyframes stamp {
  0% { transform: translate(-50%, -50%) scale(1.8) rotate(-12deg); opacity: 0; filter: blur(6px); }
  70% { transform: translate(-50%, -50%) scale(0.92) rotate(-8deg); opacity: 1; filter: blur(0); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(-10deg); opacity: 1; }
}
.scan-label {
  position: relative; text-align: center;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan);
}

/* Results */
.result { display: none; padding: 4px 0 12px; }
.result.show { display: block; animation: springIn 0.7s var(--spring); transform: none; }
@keyframes springIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card-scene {
  perspective: 1600px;
  display: grid; place-items: center;
  padding: 4px 0 8px;
  touch-action: pan-y;
  overflow: visible;
  scroll-margin-top: calc(64px + var(--safe-top));
}
.card-tilt {
  transform-style: preserve-3d;
  overflow: visible;
}
.card-flip {
  position: relative;
  width: min(100%, 400px);
  transform-style: preserve-3d;
  transition: transform 0.7s var(--spring);
  overflow: visible;
}
.card-flip.is-back { transform: rotateY(180deg); }
.face {
  border-radius: 28px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}
.face.front { position: relative; transform: rotateY(0deg) translateZ(1px); }
.face.back {
  position: absolute; inset: 0;
  transform: rotateY(180deg) translateZ(1px);
  overflow: auto;
  background: #0f141f;
}

.holo {
  width: 100%;
  min-height: 420px;
}
.holo-inner { padding: 22px 22px 18px; }
.portrait-block { display: grid; place-items: center; margin: 10px 0 8px; }
.portrait {
  width: 136px; height: 136px; border-radius: 40px; padding: 3px;
  background: #1a2233;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  position: relative;
}
.portrait img, .portrait .mono {
  width: 100%; height: 100%; border-radius: 37px;
  object-fit: cover; object-position: 50% 15%;
  box-shadow: none;
}
.portrait .mono { font-size: 52px; }
.portrait .mono span { inset: 3px; border-radius: 34px; font-size: 52px; }
.who-center { text-align: center; }
.who-center .alias { font-size: 40px; }
.who-center .meta { margin-top: 8px; }
.ai-tag {
  margin-top: 8px; font-size: 10px; letter-spacing: 0.02em;
  color: var(--faint); text-transform: none;
}
.flip-hint {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  margin: 8px 0 4px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em;
}
.flip-hint button {
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  border-radius: 999px; padding: 7px 12px; font-size: 12px; color: var(--text);
}

.result-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 14px 0 4px;
}
.result-actions .primary, .result-actions .ghost, .result-actions .danger, .result-actions .amber-btn {
  min-height: 44px;
}
.alert-card, .leave-card { width: min(100%, 420px); }
.alert-card.is-enter { animation: glitchIn 0.7s steps(2, end); }
.leave-card.is-enter { animation: amberIn 0.8s var(--spring); }
@keyframes glitchIn {
  0% { transform: translateX(-8px) skewX(-2deg); filter: hue-rotate(40deg) contrast(1.3); opacity: 0; }
  20% { transform: translateX(7px) skewX(2deg); }
  40% { transform: translateX(-5px); filter: none; opacity: 1; }
  60% { transform: translateX(3px); }
  100% { transform: none; }
}
@keyframes amberIn {
  from { opacity: 0; filter: blur(8px) saturate(0.4); transform: translateY(16px); }
  to { opacity: 1; filter: none; transform: none; }
}

.help-drawer {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(3,5,10,0.72); backdrop-filter: blur(10px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + var(--safe-bot));
}
.help-drawer[hidden] { display: none; }
.help-card {
  width: min(560px, 100%);
  max-height: 80vh; max-height: 80dvh; overflow: auto;
  background: #121a2c; border: 1px solid var(--line-strong);
  border-radius: 24px; padding: 24px;
  animation: springIn 0.45s var(--spring);
}
.help-card h2 { font-family: var(--font-serif); font-size: 26px; margin-bottom: 10px; }
.help-card p { color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.photo-note { font-size: 12px; color: var(--gold) !important; }
.app-foot {
  display: none;
  color: var(--faint); font-size: 11px; padding: 8px 20px 16px;
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bot));
  transform: translateX(-50%);
  z-index: 60; padding: 10px 16px; border-radius: 999px;
  background: #121a2c; border: 1px solid var(--line-strong);
  font-size: 13px; box-shadow: var(--shadow);
}

/* Mobile app states: hide hero, collapse sheet */
@media (max-width: 820px) {
  body.public {
    height: 100vh;
    height: 100dvh;
    height: var(--app-h, 100svh);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-h, 100svh);
    overflow: hidden;
    display: flex; flex-direction: column;
  }
  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
    margin: 0;
  }
  .app-main { flex: 1; overflow: auto; display: flex; flex-direction: column; padding-bottom: 24px; }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-main {
    padding-bottom: 0;
    overflow: hidden;
  }
  body.public.scanning .hero-im,
  body.public.has-result .hero-im {
    opacity: 0; transform: translateY(-12px) scale(0.98);
    max-height: 0; padding: 0; overflow: hidden; pointer-events: none;
  }
  body.public.has-result .app-main { justify-content: flex-start; padding-bottom: 96px; }
  .holo { min-height: 0; }
  .portrait { width: 112px; height: 112px; }
  .who-center .alias { font-size: 34px; }
  .result .safety { display: none; }
  .exchange { margin-top: 8px; }
  body.public.scanning .sheet,
  body.public.matching .sheet,
  body.public.applying .sheet { transform: translateY(110%); }
  body.public.has-result .sheet { transform: translateY(calc(100% - 72px - var(--safe-bot))); }
  body.public.has-result .sheet.is-open { transform: none; }
  body.public.has-result .sheet-peek {
    display: block; width: 100%;
    border: 0; background: transparent; color: var(--cyan);
    letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px;
    padding: 2px 0 10px;
  }
  body.public.has-result:not(.sheet-open) .sheet-body { opacity: 0; pointer-events: none; }
  .samples { flex-wrap: wrap; overflow: visible; }
  .modal-card { margin-bottom: var(--safe-bot); }
}

/* Desktop keeps a grand editorial layout */
@media (min-width: 821px) {
  body.public { overflow: auto; }
  #fx { opacity: 0.95; }
  .appbar {
    width: 100%;
    margin: 0;
    padding: calc(8px + var(--safe-top)) 32px 8px;
    height: calc(56px + var(--safe-top));
  }
  .appbar .brand-logo { height: 26px; max-width: 160px; }
  .appbar .admin-link { display: none; }
  .app-main {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: calc(64px + var(--safe-top)) 0 0;
  }
  .hero-im { padding: 28px 0 10px; }
  .hero-im h1 { font-size: clamp(44px, 5.2vw, 64px); max-width: min(100%, 18em); }
  .hero-im .lead { font-size: 16px; max-width: 46em; }
  .sheet {
    position: relative;
    width: min(640px, 100%);
    margin: 20px auto 12px;
    border-radius: 20px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--line);
  }
  .sheet-handle, .sheet-peek { display: none !important; }
  .sheet .channels {
    display: flex; flex-wrap: wrap; grid-template-columns: none;
  }
  .sheet .chip { padding: 7px 12px; border-radius: 999px; }
  .sheet .search-row { flex-direction: row; width: 100%; gap: 10px; align-items: stretch; }
  .sheet .search-row input,
  .sheet .search-row #query {
    flex: 1 1 auto;
    width: auto;
    height: 54px;
    font-size: 16px;
  }
  .sheet .search-row .primary {
    width: auto;
    min-width: 7.25rem;
    height: 54px;
    min-height: 54px;
    padding: 0 22px;
    font-size: 15px;
  }
  .samples { flex-wrap: wrap; overflow: visible; }
  .stage { min-height: 80px; margin-bottom: 40px; }
  .card-flip { width: min(520px, 100%); }
  .holo { min-height: 0; }
  .face.front .holo-inner { padding: 26px; }
  .portrait { width: 120px; height: 120px; }
  .who-center .alias { font-size: 42px; }
  .alert-card, .leave-card { width: min(640px, 100%); margin: 0 auto; }
  .app-foot {
    display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
    width: 100%;
    margin: 0;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 3;
    padding: 10px 32px calc(12px + var(--safe-bot));
    font-size: 11px;
    color: var(--faint);
    background: transparent;
    pointer-events: none;
  }
  .app-foot span, .app-foot a, .app-foot button { pointer-events: auto; }
  .app-foot strong { color: inherit; font-weight: 500; }
  .help-drawer { align-items: center; }
  body.public.has-result .sheet { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.public * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .radar-sweep, .stamp-seal { animation: none !important; opacity: 1; transform: translate(-50%, -50%); }
}


/* Apply + match */
.apply-pill {
  display: inline-flex; margin: 18px auto 0; border: 1px solid rgba(232,200,114,0.35);
  background: rgba(232,200,114,0.08); color: var(--gold);
  border-radius: 999px; padding: 9px 16px; font-size: 13px; letter-spacing: 0.04em;
  transition: transform 0.18s var(--spring), background 0.2s;
}
.apply-pill:active { transform: scale(0.97); }
.apply-link { color: var(--gold); border-color: rgba(232,200,114,0.3); }
.apply-card .apply-lead { color: var(--muted); line-height: 1.7; margin-bottom: 14px; font-size: 14px; }
.apply-card label { display: block; font-size: 13px; color: var(--muted); letter-spacing: 0; text-transform: none; margin: 12px 0 6px; }
.apply-card .field, .apply-card .select { width: 100%; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button {
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  border-radius: 12px; padding: 10px 6px; font-size: 13px; color: var(--muted);
}
.seg button.on { background: linear-gradient(90deg, var(--violet), var(--cyan)); color: #061018; font-weight: 600; border-color: transparent; }
.plat-row { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent {
  display: flex; gap: 10px; align-items: center;
  margin: 16px 0 6px; text-transform: none !important; letter-spacing: 0 !important;
  font-size: 13px !important; color: var(--text) !important; line-height: 1.45; text-transform: none;
}
.consent input { margin-top: 3px; accent-color: var(--cyan); width: 18px; height: 18px; flex: none; }
.consent-err { color: var(--alert); font-size: 12px; margin: 0 0 8px; }
.consent-err[hidden] { display: none; }

/* AAA gacha / card-reveal match cinematic */
.match-arena {
  display: none;
  position: fixed; inset: 0; z-index: 40;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(60,232,245,0.14), transparent 44%),
    radial-gradient(ellipse at 50% 58%, rgba(139,108,255,0.1), transparent 50%),
    radial-gradient(ellipse at 50% 48%, rgba(232,200,114,0.08), transparent 42%),
    #05070e;
  overflow: hidden;
}
.match-arena.on { display: block; opacity: 1; transition: opacity 0.45s ease; }
.match-arena.on.exit { opacity: 0; pointer-events: none; }
body.public.matching.has-result .appbar,
body.public.matching.has-result .app-foot { opacity: 0; pointer-events: none; }
#match3d {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: #05070e;
}
.match-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 38%, rgba(0,0,0,0.62) 100%);
  box-shadow: inset 0 0 120px rgba(0,0,0,0.55);
}
.match-rays {
  position: absolute; inset: -30%; z-index: 3; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 48%,
    rgba(232,200,114,0) 0 12deg,
    rgba(232,200,114,0.28) 14deg,
    rgba(255,248,223,0.12) 16deg,
    rgba(232,200,114,0) 22deg);
  mix-blend-mode: screen;
  transform: scale(0.55);
}
.match-rays.on { animation: rays-burst 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes rays-burst {
  0% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.7) rotate(28deg); }
}
.match-shockwave {
  position: absolute; left: 50%; top: 44%; z-index: 4; pointer-events: none;
  width: min(62vw, 620px); height: min(62vw, 620px);
  margin: calc(min(62vw, 620px) / -2) 0 0 calc(min(62vw, 620px) / -2);
  border-radius: 50%;
  border: 2px solid rgba(255,248,223,0.85);
  box-shadow: 0 0 30px rgba(232,200,114,0.35);
  background: none;
  opacity: 0;
}
.match-shockwave.on { animation: shock 0.95s cubic-bezier(0.12, 0.7, 0.2, 1) forwards; }
@keyframes shock {
  0% { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.15); }
}
.match-hud {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 22px 22px;
}
.hud-brand {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.32em;
  color: rgba(60,232,245,0.72);
}
.hud-readouts {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--cyan);
  max-width: 280px;
}
.hud-readouts div {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(60,232,245,0.14);
  animation: hud-in 0.32s ease both;
  color: #e8c872;
  white-space: nowrap;
}
.hud-readouts div i {
  width: 7px; height: 7px; flex: none;
  border-radius: 50%;
  background: #3ce8f5;
  box-shadow: 0 0 8px #3ce8f5;
}
.match-arena.hud-dim .hud-readouts,
.match-arena.hud-dim .hud-brand { opacity: 0.28; transition: opacity 0.4s ease; }
.match-arena.hud-dim .match-label { opacity: 0; }
.match-arena.hud-off .hud-readouts,
.match-arena.hud-off .hud-brand { opacity: 0 !important; }
@keyframes hud-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.match-label {
  position: absolute; left: 20px; right: 20px; bottom: 28px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(232,238,247,0.72);
  text-align: center;
}
.match-slam {
  position: absolute; inset: auto 0 12%; z-index: 6; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  opacity: 0;
}
.match-slam span {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(16px, 3.6vw, 26px);
  letter-spacing: 0.28em;
  line-height: 1;
  color: #e8c872;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  filter: none;
  text-transform: uppercase;
}
.match-slam.on {
  animation: matched-fade 0.7s ease forwards;
}
@keyframes matched-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.match-arena.hold-lock .match-slam { opacity: 0; }
.match-arena.hold-link .match-slam {
  animation: none !important; opacity: 1; transform: none;
}
.match-arena.hold-lock .match-rays,
.match-arena.hold-lock .match-shockwave { display: none !important; }
.match-arena.hold-link .match-rays,
.match-arena.hold-link .match-shockwave { display: none; }
.match-rays,
.match-shockwave { display: none !important; }
.match-dom {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.match-dom[hidden] { display: none !important; }
.match-dom-row {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  width: min(86vw, 420px);
}
@media (min-width: 821px) {
  .match-dom-row { flex-direction: row; gap: 48px; width: min(80vw, 760px); }
}
.match-dom-card {
  width: min(64vw, 240px);
  border-radius: 18px;
  overflow: hidden;
  background: #0f141f;
  border: 1px solid rgba(232,200,114,0.22);
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.match-dom-card img {
  display: block; width: 100%; height: 180px; object-fit: cover;
  filter: saturate(0.78) brightness(0.92) contrast(1.04);
}
.match-dom-card figcaption {
  padding: 10px 14px 14px;
  color: #e8eef7;
  font-family: var(--font-serif);
  font-size: 20px;
}
.match-dom-card .sub {
  display: block; margin-top: 2px;
  font-family: var(--font-sans); font-size: 11px; color: #8b97ae; letter-spacing: 0.04em;
}
.match-dom.is-core .match-dom-card.kol { opacity: 1; transform: none; }
.match-dom.is-orbit .match-dom-card { opacity: 1; transform: none; }
.match-dom.is-filter .match-dom-card.reject { opacity: 0; transform: scale(0.9); }
.match-dom.is-lock .match-dom-card.winner {
  opacity: 1; transform: scale(1.04);
}
.match-dom.is-lock .match-dom-card:not(.winner):not(.kol) { opacity: 0; }
.match-dom-row { position: relative; }
.match-dom.is-link .match-dom-card:not(.winner):not(.kol) { display: none; }
.match-dom.is-link .match-dom-card.kol {
  position: absolute;
  z-index: 0;
  width: min(48vw, 180px);
  opacity: 1;
  transform: translate(-38%, -6%) scale(0.86);
}
.match-dom.is-link .match-dom-card.winner {
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: scale(1.04);
}
.match-dom-line { display: none !important; }
@media (min-width: 821px) {
  .match-dom.is-link .match-dom-card.kol {
    width: 180px;
    transform: translate(-42%, 0) scale(0.84);
  }
}
@media (max-width: 820px) {
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .channels { margin-bottom: 8px; }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet {
    padding: 6px 14px calc(10px + var(--safe-bot));
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row input,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row .primary {
    height: 48px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .samples { margin-top: 8px; }
}
.match-link-copy {
  position: absolute; left: 16px; right: 16px; bottom: 36px; z-index: 7;
  text-align: center;
  font-size: 14px; line-height: 1.55; color: var(--text);
  opacity: 0; transform: translateY(14px);
  pointer-events: none;
  text-shadow: 0 8px 24px rgba(0,0,0,0.8);
}
.match-link-copy.on { animation: fadeup 0.5s ease forwards; }
.match-link-copy b { color: #e8c872; }
@keyframes fadeup { to { opacity: 1; transform: none; } }
.match-tools {
  position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; z-index: 8;
  display: flex; gap: 8px;
}
.match-tools button {
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(7,9,15,0.55);
  color: var(--muted);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.match-tools button[hidden] { display: none; }
.match-arena.shake { animation: camshake 0.48s linear; }
@keyframes camshake {
  0%, 100% { transform: translate(0, 0); }
  18% { transform: translate(-7px, 4px); }
  36% { transform: translate(8px, -4px); }
  54% { transform: translate(-5px, -6px); }
  72% { transform: translate(6px, 3px); }
  88% { transform: translate(-3px, 2px); }
}
body.public.matching .appbar,
body.public.matching .app-foot { opacity: 0; pointer-events: none; }
body.public.matching #fx { opacity: 0.28; }
body.public.matching .sheet { visibility: hidden; pointer-events: none; }

@media (min-width: 821px) {
  .hud-readouts { font-size: 13px; max-width: 320px; }
  .match-label { font-size: 12px; }
  .match-link-copy { font-size: 16px; bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .match-rays, .match-shockwave, .match-slam, .match-arena.shake { animation: none !important; }
  .match-slam { opacity: 1; transform: none; }
}


.exchange {
  width: min(100%, 400px); margin: 0 auto 12px;
  border-radius: 20px; padding: 14px 16px;
  border: 1px solid rgba(74,224,179,0.3);
  background: linear-gradient(180deg, rgba(74,224,179,0.12), rgba(14,16,24,0.85));
}
.exchange .ex-title { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ok); margin-bottom: 6px; }
.exchange p { font-size: 13px; line-height: 1.65; color: var(--text); margin: 0; }
.exchange .muted { color: var(--muted); font-size: 12px; margin-top: 6px; }
.exchange b { color: #fff; font-weight: 600; }

@media (min-width: 821px) {
  .exchange, .reel-wrap { width: min(520px, 100%); }
  .apply-pill { margin-top: 22px; }
}
@media (max-width: 820px) {
  body.public.matching .sheet,
  body.public.applying .sheet { transform: translateY(110%); }
  body.public.matching .hero-im,
  body.public.applying .hero-im {
    opacity: 0; max-height: 0; padding: 0; overflow: hidden; pointer-events: none;
  }
}


/* ===== Editorial credential card (magazine cover / luxury ID) ===== */
.card-flip { width: min(920px, 100%); }
.holo.cred {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: #0f141f;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
.holo.cred::before,
.holo.cred::after { content: none; display: none; opacity: 0; }
.cred-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #0f141f;
}
.cred-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
  filter: saturate(0.78) brightness(0.92) contrast(1.04);
}
/* Overlay fade — not mask-image, which flattens the 3D flipper.
   ::after lives on the photo panel because <img class="cred-photo"> cannot host a pseudo. */
.cred-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to right, transparent 65%, #0f141f 100%);
}
html[dir="rtl"] .cred-visual::after {
  background: linear-gradient(to left, transparent 65%, #0f141f 100%);
}
.cred-fade { display: none; }
.cred-mono {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: #0f141f;
}
.cred-mono span {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(160px, 18vw, 240px);
  line-height: 0.75;
  letter-spacing: -0.06em;
  color: #e8eef7;
}
.cred-mono em {
  position: absolute; bottom: 16%;
  font-style: normal; font-size: 11px; letter-spacing: 0.46em;
  text-transform: uppercase; color: var(--gold); opacity: 0.8;
}
.cred-badge {
  position: absolute; top: 22px; left: 22px; z-index: 2;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #1a1304; font-weight: 700;
  background: #e8c872;
  padding: 6px 11px; border-radius: 999px;
}
.cred-seal {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 92px; height: 92px; border-radius: 50%;
  border: 1px solid rgba(232,200,114,0.55);
  background: #0f141f;
  color: var(--gold); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transform: rotate(-8deg);
  font-size: 6.5px; font-weight: 700; letter-spacing: 0.16em; line-height: 1.2;
  text-transform: uppercase;
}
.cred-seal-logo {
  display: block;
  width: 40px; height: 40px;
  margin-bottom: 2px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("/assets/brand/logo-mark.png") center / contain no-repeat;
          mask: url("/assets/brand/logo-mark.png") center / contain no-repeat;
}
.cred-copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 44px 40px 36px 32px;
  min-height: 520px;
}
.cred-copy .alias {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(68px, 7.2vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  color: #e8eef7;
}
.cred-kicker {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}
.cred-meta {
  display: grid; gap: 12px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid rgba(232,200,114,0.22);
}
.cred-meta div { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: baseline; }
.cred-meta dt {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin: 0;
}
.cred-meta dd {
  margin: 0; font-size: 14px; color: var(--text); line-height: 1.45;
}
.cred-body {
  margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7;
  max-width: 36ch;
}
.cred-copy .ai-tag { margin-top: 16px; }
.cred-copy .flip-hint { justify-content: flex-start; margin: 18px 0 0; }
.cred-visual-back .cred-photo,
.cred-visual-back .cred-mono { filter: grayscale(0.25) brightness(0.85); }

/* Offboarded: same architecture, amber and quieter */
.holo.cred.is-leave {
  border-color: rgba(245,185,66,0.45);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}
.holo.cred.is-leave .cred-photo { filter: saturate(0.55) grayscale(0.35) contrast(1.04) brightness(0.88); }
.holo.cred.is-leave .cred-mono span {
  color: #f0d9a0;
}
.holo.cred.is-leave .cred-badge {
  background: var(--amber); color: #1a1304;
}
.holo.cred.is-leave .cred-seal {
  border-color: var(--amber);
  color: var(--amber);
  background: #0f141f;
}

/* Desktop: after a result, the credential is the hero */
@media (min-width: 821px) {
  body.public.has-result .hero-im {
    opacity: 0; max-height: 0; padding: 0; margin: 0; overflow: hidden; pointer-events: none;
  }
  body.public.has-result .app-main { padding-top: calc(64px + var(--safe-top)); }
  body.public.has-result .sheet { margin-top: 28px; margin-bottom: 8px; }
  body.public.has-result .app-foot {
    position: relative;
    left: auto; right: auto; bottom: auto;
    padding: 8px 32px calc(16px + var(--safe-bot));
  }
  .exchange { width: min(920px, 100%); margin-bottom: 18px; }
  .result-actions { width: min(920px, 100%); margin-left: auto; margin-right: auto; justify-content: center; }
  .result .safety { width: min(920px, 100%); }
}

/* Mobile: stacked magazine cover, portrait still occupies ~half */
@media (max-width: 820px) {
  .card-flip { width: 100%; }
  .holo.cred {
    grid-template-columns: 1fr;
  }
  .cred-visual {
    min-height: 260px;
    height: 46vw;
    max-height: 320px;
    min-height: 240px;
    height: 54vw;
  }
  .cred-copy { min-height: 0; padding: 4px 22px 22px; margin-top: -48px; }
  .cred-visual::after {
    background: linear-gradient(to bottom, transparent 65%, #0f141f 100%);
  }
  .cred-copy .alias { font-size: clamp(52px, 16vw, 72px); }
  .cred-seal { width: 74px; height: 74px; font-size: 8px; top: 16px; right: 16px; }
  .cred-badge { top: 16px; left: 16px; }
  .cred-mono span { font-size: 150px; }
  .cred-meta div { grid-template-columns: 64px 1fr; }
  .exchange { width: 100%; }
}


/* ===== Round 2 refinements ===== */
.cred-visual { margin-inline-end: -64px; z-index: 0; }
.cred-copy { z-index: 2; padding-inline-start: 48px; background: transparent; }
.cred-copy .cred-seal {
  position: absolute;
  top: 28px; right: 28px;
  width: 86px; height: 86px;
}
.cred-copy { position: relative; padding-top: 36px; }
.cred-copy .alias { padding-inline-end: 96px; }
body.public.has-result .result .safety { display: none !important; }
@media (min-width: 821px) {
  body.public.has-result .sheet {
    margin-top: 20px;
    padding: 12px 16px 14px;
  }
  body.public.has-result .sheet .channels,
  body.public.has-result .sheet .samples,
  body.public.has-result .sheet .detect-hint,
  body.public.has-result .sheet-handle { display: none !important; }
  body.public.has-result .sheet .search-row { margin: 0; }
  .result-actions .ghost {
    background: transparent; border-color: transparent; color: var(--muted);
    padding-left: 10px; padding-right: 10px;
  }
  .result-actions .ghost:hover { color: var(--text); }
  .alert-card {
    width: min(840px, 100%);
    padding: 44px 48px 36px;
  }
  .alert-card h2 { font-size: 52px; letter-spacing: -0.03em; }
}
.exchange {
  background: linear-gradient(180deg, rgba(232,200,114,0.08), rgba(14,16,24,0.8));
  border-color: rgba(232,200,114,0.28);
  padding: 16px 20px;
}
.exchange .ex-title { color: var(--gold); }
.ex-grid { display: grid; gap: 6px; }
.ex-grid p { font-size: 14px; line-height: 1.55; margin: 0; }
.exchange .muted { margin-top: 8px; }

@media (max-width: 820px) {
  .cred-visual { margin-inline-end: 0; }
  .cred-copy { padding-left: 22px; padding-right: 22px; padding-top: 0; margin-top: -56px; }
  .cred-copy .alias { padding-inline-end: 0; padding-top: 0; }
  .cred-copy .cred-seal {
    position: absolute;
    top: auto; bottom: auto;
    right: 18px;
    top: -28px;
    width: 70px; height: 70px;
  }
  .cred-mono em { display: none; }
  .cred-visual { height: 58vw; min-height: 250px; max-height: 340px; }
  .exchange { margin-bottom: 10px; padding: 10px 14px; }
  .exchange .muted { display: none; }
  .ex-grid p { font-size: 12.5px; line-height: 1.5; }
  .result-actions { margin-top: 10px; }
}

.captcha-box {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #c9d3e7;
}
.captcha-box input {
  max-width: 160px;
  background: #0c1220;
  border: 1px solid rgba(40, 210, 229, 0.28);
  color: #e8eef7;
  border-radius: 8px;
  padding: 8px 10px;
}
#reportShot { display: block; margin: 10px 0 14px; color: #8b97ae; font-size: 12px; }

.captcha-box[hidden] { display: none !important; }

#apply[hidden], #help[hidden], #modal:not(.on) { display: none !important; }

/* —— Multilingual layout adaptation (text length, wrap, RTL, fonts) —— */
.hero-im h1 {
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: auto;
  font-size: clamp(22px, 6.2vw, 40px);
}
.hero-im h1 .h-line {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}
.hero-im .lead,
.hero-im .nb,
.nb {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: auto;
}
html[lang="de-DE"] .hero-im h1,
html[lang="ru-RU"] .hero-im h1,
html[lang="km-KH"] .hero-im h1,
html[lang="fa-IR"] .hero-im h1,
html[lang="vi-VN"] .hero-im h1,
html[lang="id-ID"] .hero-im h1 {
  font-size: clamp(20px, 5.2vw, 36px);
}
.hero-im h1 {
  max-width: 100%;
  padding-inline: 8px;
  box-sizing: border-box;
}
.nav-actions {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}
.nav-cta {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(44vw, 12rem);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: end;
}
.appbar, .nav-actions { min-width: 0; }
.nav-cta::after {
  left: auto; right: auto;
  inset-inline: 0;
  transform-origin: left;
}
html[dir="rtl"] .nav-cta { text-align: start; }
html[dir="rtl"] .nav-cta::after { transform-origin: right; }

.apply-pill,
.result-actions .primary,
.result-actions .ghost,
.result-actions .danger,
.result-actions .amber-btn,
.modal-card .primary,
.modal-card .ghost,
.apply-card .primary {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
  height: auto;
  min-height: 44px;
  padding-block: 10px;
  padding-inline: 14px;
}

.hud-readouts {
  max-width: min(280px, calc(100% - 24px));
}
.hud-readouts div {
  white-space: normal;
  overflow-wrap: anywhere;
  letter-spacing: 0.03em;
  line-height: 1.35;
}
.match-label {
  left: auto; right: auto;
  inset-inline: 16px;
  letter-spacing: 0.04em;
  text-transform: none;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
  font-family: var(--font-sans), var(--font-mono), sans-serif;
}
.match-slam span {
  font-size: clamp(28px, 9vw, 120px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  max-width: 92vw;
  text-align: center;
  overflow-wrap: anywhere;
  display: inline-block;
  word-break: normal;
}
.match-link-copy {
  left: auto; right: auto;
  inset-inline: 16px;
  overflow-wrap: anywhere;
}
.match-tools {
  right: auto;
  inset-inline-end: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(52vw, 16rem);
}
html[dir="rtl"] .match-tools { justify-content: flex-start; }
.match-tools button {
  text-transform: none;
  letter-spacing: 0.04em;
  white-space: normal;
  line-height: 1.2;
  max-width: 100%;
}

.unmatched-card h2 { font-size: clamp(22px, 6vw, 28px); overflow-wrap: anywhere; }
.unmatched-card p { overflow-wrap: anywhere; }
.sheet .chip { white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 400px) {
  /* Keep 4 columns so the sheet stays short enough to leave the apply pill visible */
  .sheet .channels { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sheet .chip { font-size: 11px; padding: 8px 4px; }
  .lang-toggle { max-width: min(9.5rem, 48vw); }
}
/* iPhone 14 (390–393) keeps the header CTA for e2e and short labels like Apply.
   360px Android hides it so long German/Khmer labels cannot overflow the bar. */
@media (max-width: 370px) {
  .nav-cta { display: inline-flex; max-width: min(38vw, 7.5rem); font-size: 12px; }
}

@media (max-width: 820px) {
  .hero-im { max-height: none; overflow: visible; padding: 8px 12px 0; }
  .hero-im h1 { margin: 10px auto 8px; }
  .hero-im .lead { font-size: 13px; line-height: 1.55; }
  .hero-im .domain-banner { margin-top: 10px; }
  .apply-pill { margin-top: 10px; }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-main {
    padding-bottom: 360px;
  }
}

html[lang="ru-RU"] body,
html[lang="vi-VN"] body,
html[lang="de-DE"] body,
html[lang="es-ES"] body,
html[lang="it-IT"] body,
html[lang="id-ID"] body {
  font-family: "Sora", "Noto Sans", "Segoe UI", sans-serif;
}
html[dir="rtl"] .hud-readouts { margin-inline-start: 0; }
html[dir="rtl"] .match-hud { text-align: start; }

/* Badges, seals, and meta — long labels + RTL */
.cred-badge {
  left: auto;
  inset-inline-start: 16px;
  max-width: min(62%, 15rem);
  white-space: normal;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-align: start;
  overflow-wrap: anywhere;
}
.cred-seal {
  right: auto;
  inset-inline-end: 16px;
  letter-spacing: 0.08em;
  text-transform: none;
}
html[lang="km-KH"] .cred-badge,
html[lang="fa-IR"] .cred-badge,
html[lang="ru-RU"] .cred-badge,
html[lang="de-DE"] .cred-badge,
html[lang="vi-VN"] .cred-badge {
  letter-spacing: 0.04em;
  font-size: 9px;
}
html[lang="km-KH"] .cred-badge,
html[lang="fa-IR"] .cred-badge {
  text-transform: none;
}
.cred-copy,
.photo-note,
.meta,
.holo .kicker {
  overflow-wrap: anywhere;
  letter-spacing: 0.06em;
}
.result-actions {
  width: 100%;
  max-width: 100%;
  padding-inline: 8px;
}
.result-actions .primary,
.result-actions .ghost,
.result-actions .danger,
.result-actions .amber-btn {
  max-width: 100%;
  text-align: center;
}
.app-foot {
  flex-wrap: wrap;
  gap: 8px 16px;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.apply-card,
.apply-card p,
.apply-card label,
.apply-consent,
.consent,
#applyForm label,
#applyForm p,
.modal-card,
.modal-card p,
.alert-card p,
.leave-card p {
  overflow-wrap: anywhere;
}
.lang-toggle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Khmer / Persian headings must not use Fraunces (missing glyphs → tofu) */
html[lang="km-KH"] .hero-im h1,
html[lang="km-KH"] .hero-im h1 .h-line,
html[lang="km-KH"] .hero h1,
html[lang="km-KH"] .unmatched-card h2,
html[lang="km-KH"] .alert-card h2,
html[lang="km-KH"] .leave-card h2,
html[lang="km-KH"] .help-card h2,
html[lang="km-KH"] .modal-card h3,
html[lang="km-KH"] .apply-card h2,
html[lang="km-KH"] #apply h2,
html[lang="km-KH"] .match-slam span,
html[lang="km-KH"] .match-label {
  font-family: "Noto Sans Khmer", "Noto Sans", sans-serif;
  font-weight: 600;
}
html[lang="fa-IR"] .hero-im h1,
html[lang="fa-IR"] .hero-im h1 .h-line,
html[lang="fa-IR"] .hero h1,
html[lang="fa-IR"] .unmatched-card h2,
html[lang="fa-IR"] .alert-card h2,
html[lang="fa-IR"] .leave-card h2,
html[lang="fa-IR"] .help-card h2,
html[lang="fa-IR"] .modal-card h3,
html[lang="fa-IR"] .apply-card h2,
html[lang="fa-IR"] #apply h2,
html[lang="fa-IR"] .match-slam span,
html[lang="fa-IR"] .match-label {
  font-family: "Noto Naskh Arabic", "Noto Sans", serif;
  font-weight: 600;
}

/* Latin demo handles stay LTR so @username is not visually reversed in RTL.
   The search box uses plaintext so a typed @handle is LTR but a Persian placeholder stays RTL. */
#query {
  unicode-bidi: plaintext;
}
.samples button,
.sheet .samples button {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* Meta labels like German “Sprachen” must not wrap mid-word in a 64px column */
.cred-meta div {
  grid-template-columns: minmax(4.75rem, max-content) minmax(0, 1fr);
}
.cred-meta dt {
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.cred-meta dd {
  overflow-wrap: anywhere;
  min-width: 0;
}
html[lang="de-DE"] .cred-meta dt,
html[lang="ru-RU"] .cred-meta dt,
html[lang="vi-VN"] .cred-meta dt {
  letter-spacing: 0.05em;
}
html[lang="km-KH"] .cred-meta dt,
html[lang="fa-IR"] .cred-meta dt {
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: normal;
}



/* ===== Homepage hero looping video ===== */
.hero-bg {
  --hero-span: 1.2;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  height: var(--app-h, 100svh);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #07090f;
  background-image: url("/hero/hero-poster-v3.jpg");
  background-repeat: no-repeat;
  background-size: calc(100% * var(--hero-span)) auto;
  background-position: left center;
}
.hero-bg-poster,
.hero-bg-video,
.hero-bg-shade {
  pointer-events: none;
}
.hero-bg-poster,
.hero-bg-video {
  position: absolute;
  top: 0;
  bottom: auto;
  left: 0;
  right: auto;
  width: calc(100% * var(--hero-span));
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left center;
}
.hero-bg-poster { z-index: 0; }
.hero-bg-video { z-index: 1; }

/* Soft elliptical vignette over the centered headline + search column only —
   the right side of the film stays clear so faces remain vivid. */
.hero-bg-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 50% 58% at 42% 38%,
      rgba(7, 9, 15, 0.55) 0%,
      rgba(7, 9, 15, 0.22) 48%,
      rgba(7, 9, 15, 0) 78%),
    linear-gradient(
      to right,
      rgba(7, 9, 15, 0.55) 0%,
      rgba(7, 9, 15, 0.18) 28%,
      rgba(7, 9, 15, 0) 58%
    ),
    linear-gradient(to bottom, rgba(7, 9, 15, 0.32) 0%, transparent 18%),
    linear-gradient(to top, rgba(7, 9, 15, 0.22) 0%, transparent 22%);
}
html[dir="rtl"] .hero-bg-shade {
  background:
    radial-gradient(ellipse 50% 58% at 58% 38%,
      rgba(7, 9, 15, 0.55) 0%,
      rgba(7, 9, 15, 0.22) 48%,
      rgba(7, 9, 15, 0) 78%),
    linear-gradient(
      to left,
      rgba(7, 9, 15, 0.55) 0%,
      rgba(7, 9, 15, 0.18) 28%,
      rgba(7, 9, 15, 0) 58%
    ),
    linear-gradient(to bottom, rgba(7, 9, 15, 0.32) 0%, transparent 18%),
    linear-gradient(to top, rgba(7, 9, 15, 0.22) 0%, transparent 22%);
}

/* Mobile: video is the top hero band; typography sits on a bottom-only gradient. */
@media (max-width: 767px) {
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg {
    --hero-span: 1;
    height: 58vh;
    height: 58dvh;
    height: calc(var(--app-h, 100vh) * 0.58);
    background-size: cover;
    background-position: 78% 18%;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-poster,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-video {
    width: 100%;
    left: 0;
    right: 0;
    height: 100%;
    object-fit: cover;
    object-position: 80% 16%;
    transform: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-shade {
    background:
      linear-gradient(to bottom, rgba(7, 9, 15, 0.42) 0%, transparent 16%),
      linear-gradient(to top,
        rgba(7, 9, 15, 0.88) 0%,
        rgba(7, 9, 15, 0.62) 22%,
        rgba(7, 9, 15, 0.22) 42%,
        rgba(7, 9, 15, 0) 58%);
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet {
    top: calc(var(--app-h, 100vh) * 0.58 - 28px);
    bottom: 0;
    max-height: calc(var(--app-h, 100vh) * 0.42 + 28px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im {
    min-height: calc(var(--app-h, 100vh) * 0.58 - 52px);
    max-height: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px 16px 36px;
    box-sizing: border-box;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im h1 {
    margin: 8px auto 8px;
    font-size: clamp(26px, 7vw, 36px);
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im .lead {
    font-size: 13px;
    line-height: 1.5;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im .domain-banner {
    margin-top: 8px;
    font-size: 11px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .apply-pill {
    margin-top: 10px;
  }
}

/* RTL: flip the film around the viewport center so people sit on the inline-end. */
html[dir="rtl"] .hero-bg {
  background-position: right center;
}
html[dir="rtl"] .hero-bg-poster,
html[dir="rtl"] .hero-bg-video {
  transform: scaleX(-1);
  transform-origin: calc(100% * 0.5 / var(--hero-span, 1.2)) 50%;
}
@media (max-width: 820px) {
  html[dir="rtl"] .hero-bg {
    background-position: 22% 16%;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) html[dir="rtl"] .hero-bg,
  html[dir="rtl"] body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg {
    background-position: 22% 16%;
  }
  html[dir="rtl"] .hero-bg-poster,
  html[dir="rtl"] .hero-bg-video {
    object-position: 20% 16%;
    transform: scaleX(-1);
    transform-origin: 50% 50%;
  }
}

.hero-bg.is-static .hero-bg-video { display: none; }

/* Keep the canvas FX for scan/match cinematics; hide it on the idle homepage. */
body.public:not(.scanning):not(.matching) #fx {
  opacity: 0;
}
body.public.scanning .hero-bg {
  opacity: 1;
}
body.public.scanning .hero-bg-shade {
  opacity: 0.25;
}
body.public.scanning #fx {
  opacity: 0;
}
body.public.matching .hero-bg {
  opacity: 0;
}
body.public.has-result .hero-bg,
body.public.applying .hero-bg {
  opacity: 0.28;
}

body.public .hero-im {
  position: relative;
}
/* Soft local wash under the copy; not a hard plate. */
body.public .hero-im::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: 50%;
  top: -12px;
  bottom: -16px;
  width: min(48em, calc(100% + 32px));
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 70%, rgba(7, 9, 15, 0.5) 0%, rgba(7, 9, 15, 0.18) 58%, rgba(7, 9, 15, 0) 78%);
}
body.public .hero-im .lead {
  color: #c5cedb;
}
/* Extra contrast for muted hero copy over the film (WCAG AA). */
body.public .hero-im .lead,
body.public .hero-im .domain-banner {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 6px 20px rgba(0, 0, 0, 0.55);
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-video { display: none; }
}

/* ===== Stacked mobile home: film on top, tools below, no overlap =====
   Boldness lives in the picture. Type and controls stay quiet underneath. */
@media (max-width: 767px) {
  .sheet .channels:not(.is-needed) { display: none !important; }

  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) {
    height: auto;
    min-height: var(--app-h, 100dvh);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .vignette {
    display: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg {
    position: relative;
    z-index: 1;
    --hero-span: 1;
    top: 0;
    left: 0;
    width: 100%;
    flex: 0 0 auto;
    height: auto !important;
    aspect-ratio: 4 / 5;
    max-height: min(52vh, calc(var(--app-h, 100vh) * 0.52));
    min-height: calc(100vw * 9 / 16);
    background-size: cover;
    background-position: 78% 18%;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-poster,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-video {
    width: 100%;
    height: 100%;
    left: 0;
    right: 0;
    top: 0;
    object-fit: cover;
    object-position: 80% 16%;
    transform: none;
  }
  /* A light wash only under the logo; no copy sits on the people. */
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-shade {
    background: linear-gradient(to bottom, rgba(7, 9, 15, 0.55) 0%, rgba(7, 9, 15, 0.12) 22%, rgba(7, 9, 15, 0) 42%);
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im::before {
    display: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-main {
    flex: 0 0 auto;
    overflow: visible;
    padding-top: 16px;
    padding-bottom: 0;
    min-height: 0;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im {
    min-height: 0;
    max-height: none;
    display: block;
    justify-content: unset;
    padding: 4px 20px 8px;
    box-sizing: border-box;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im h1 {
    margin: 0 auto 8px;
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.18;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im .lead {
    font-size: 14px;
    line-height: 1.5;
    color: #c5cedb;
    text-shadow: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: 2;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 4px 20px calc(18px + var(--safe-bot));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet-handle {
    display: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row input,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row #query,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row .primary {
    width: 100%;
    max-width: 100%;
    height: 54px;
    min-height: 54px;
    font-size: 16px;
    box-sizing: border-box;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row .primary {
    letter-spacing: 0.04em;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .samples {
    margin-top: 10px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px 16px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    padding: 0 20px calc(16px + var(--safe-bot));
    position: relative;
    z-index: 2;
  }

  body.public.has-result .hero-bg,
  body.public.scanning .hero-bg,
  body.public.matching .hero-bg,
  body.public.applying .hero-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: var(--app-h, 100dvh);
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
  }
}

@media (min-width: 821px) {
  .sheet .channels:not(.is-needed) { display: none !important; }
  .sheet .channels.is-needed { display: flex; }
  .hero-im h1 { font-size: clamp(40px, 4.6vw, 56px); max-width: 14em; margin-bottom: 10px; }
  .hero-im .lead { font-size: 16px; max-width: 32em; }
}

.match-arena:has(.match-slam.on) .match-label { opacity: 0 !important; }

.match-arena.hold-link .match-label { opacity: 0 !important; }

/* ===== Verify scan: search card leaves, animation is the stage ===== */
body.public.scanning .sheet {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none !important;
  transform: translateY(-12px) !important;
}
body.public.scanning .hero-im,
body.public.scanning .appbar,
body.public.scanning .app-foot {
  opacity: 0;
  pointer-events: none;
}
body.public.scanning .app-main {
  z-index: 45;
}
body.public.scanning .scan-screen.on {
  z-index: 46;
  background: rgba(5, 7, 14, 0.30);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Short viewports: scale the radar so the whole group stays centered in frame. */
@media (max-height: 700px) {
  .radar { width: min(36vw, 180px); }
  .scan-group { gap: 10px; }
  .scan-screen.phase-stream .stream,
  .scan-screen.phase-stamp .stream { height: 80px; font-size: 10px; }
}
@media (max-height: 500px) {
  .radar { width: min(28vw, 132px); }
  .scan-group { gap: 8px; }
  .scan-screen.phase-stream .stream,
  .scan-screen.phase-stamp .stream { height: 60px; font-size: 9px; }
  .stamp-seal { width: 96px; height: 96px; font-size: 9px; }
}

/* ===== Desktop / tablet home: search docked at the bottom, film stays open =====
   Headline sits just above the 640px card. The mid-frame is left for the people. */
@media (min-width: 768px) {
  .sheet .channels:not(.is-needed) { display: none !important; }
  .sheet .channels.is-needed { display: flex; }

  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) {
    --dock-bottom: calc(48px + var(--safe-bot));
    --sheet-reserve: 176px;
    overflow: hidden;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying):has(#detectHint:not(:empty)) {
    --sheet-reserve: 198px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying):has(.channels.is-needed) {
    --sheet-reserve: 248px;
  }

  /* No top vignette over faces; a soft bottom wash only, for the type and card. */
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .vignette {
    display: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-bg-shade {
    background: linear-gradient(
      to top,
      rgba(7, 9, 15, 0.86) 0%,
      rgba(7, 9, 15, 0.58) 18%,
      rgba(7, 9, 15, 0.22) 36%,
      rgba(7, 9, 15, 0) 56%
    );
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im::before {
    display: none;
  }

  /* Collapse in-flow main; the type and card are taken out to the dock. */
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-main {
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 0;
    height: 0;
    overflow: visible;
  }

  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--dock-bottom) + var(--sheet-reserve) + 12px);
    width: min(640px, calc(100% - 48px));
    z-index: 4;
    padding: 0;
    margin: 0;
    max-height: none;
    text-align: center;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im h1 {
    font-size: clamp(32px, 3.2vw, 48px);
    margin: 0 auto 8px;
    line-height: 1.16;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im .lead {
    font-size: 15px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 8px 24px rgba(0, 0, 0, 0.55);
  }

  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: var(--dock-bottom);
    top: auto;
    width: min(640px, calc(100% - 48px));
    max-width: 640px;
    margin: 0;
    z-index: 5;
    padding: 14px 16px 14px;
    border-radius: 20px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet-handle,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet-peek {
    display: none !important;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row {
    flex-direction: row;
    width: 100%;
    gap: 10px;
    align-items: stretch;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row input,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row #query {
    flex: 1 1 auto;
    width: auto;
    height: 54px;
    font-size: 16px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row .primary {
    width: auto;
    min-width: 7.25rem;
    height: 54px;
    min-height: 54px;
    padding: 0 22px;
    font-size: 15px;
  }

  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-foot {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 3;
    padding: 8px 32px calc(10px + var(--safe-bot));
    font-size: 11px;
    color: var(--faint);
    background: transparent;
    pointer-events: none;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-foot span,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-foot a,
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .app-foot button {
    pointer-events: auto;
  }
}

@media (min-width: 768px) and (max-height: 700px) {
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) {
    --dock-bottom: calc(40px + var(--safe-bot));
    --sheet-reserve: 156px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im h1 {
    font-size: clamp(28px, 3.2vw, 38px);
    margin: 0 auto 6px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .hero-im .lead {
    font-size: 13px;
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet {
    padding: 12px 14px 12px;
  }
}

/* Mobile: keep the stacked film-then-tools page, with the input sitting comfortably low. */
@media (max-width: 767px) {
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet {
    padding-bottom: calc(22px + var(--safe-bot));
  }
  body.public:not(.has-result):not(.scanning):not(.matching):not(.applying) .sheet .search-row {
    margin-top: 2px;
  }
}

/* Mobile verify: keep the people in the film visible behind the radar. */
@media (max-width: 767px) {
  body.public.scanning .hero-bg {
    --hero-span: 1;
    opacity: 1;
  }
  body.public.scanning .hero-bg-poster,
  body.public.scanning .hero-bg-video {
    width: 100%;
    left: 0;
    right: 0;
    object-fit: cover;
    object-position: 80% 16%;
    transform: none;
  }
  body.public.scanning .scan-screen.on::before {
    background: radial-gradient(ellipse 90% 42% at 50% 46%,
      rgba(5, 7, 14, 0.34) 0%,
      rgba(5, 7, 14, 0.12) 52%,
      rgba(5, 7, 14, 0) 76%);
  }
}
