/* 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: 100dvh;
  background: transparent;
  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; }
.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: nowrap;
  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 .domain-banner { margin-top: 16px; }

.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;
  background: rgba(5,7,14,0.72);
  backdrop-filter: blur(10px);
  align-items: center; justify-content: center; flex-direction: column;
  gap: 22px;
}
.scan-screen.on { display: flex; }
.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, 360px); height: 0; opacity: 0; overflow: hidden;
  font-family: var(--font-mono); font-size: 11px; color: var(--cyan);
  line-height: 1.8; text-align: left;
  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: scale(1.8) rotate(-12deg); opacity: 0; filter: blur(6px); }
  70% { transform: scale(0.92) rotate(-8deg); opacity: 1; filter: blur(0); }
  100% { transform: 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); }
@keyframes springIn {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.card-scene {
  perspective: 1600px;
  display: grid; place-items: center;
  padding: 4px 0 8px;
  touch-action: none;
}
.card-tilt { transform-style: preserve-3d; will-change: transform; }
.card-flip {
  position: relative;
  width: min(100%, 400px);
  transform-style: preserve-3d;
  transition: transform 0.7s var(--spring);
}
.card-flip.is-back { transform: rotateY(180deg); }
.face {
  border-radius: 28px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.face.front { position: relative; }
.face.back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
  overflow: auto;
}

.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: conic-gradient(from 200deg, var(--cyan), var(--violet), var(--gold), var(--cyan));
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.12);
  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: 10px; font-size: 10px; letter-spacing: 0.08em;
  color: var(--faint); text-transform: uppercase;
}
.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;
}
.gyro-chip {
  border: 1px solid rgba(60,232,245,0.3); background: var(--cyan-dim);
  color: var(--cyan); border-radius: 999px; padding: 7px 12px; font-size: 11px;
}

.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: 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: 100dvh;
    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: 300px;
  }
  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(820px, 100%);
    margin: 28px auto 12px;
    border-radius: 28px;
    padding: 20px 20px 16px;
    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; }
  .sheet .search-row .primary { width: auto; padding: 0 26px; }
  .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: space-between; gap: 12px; flex-wrap: wrap;
    width: min(1120px, calc(100% - 40px)); margin: 0 auto 24px;
  }
  .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: none; }
}


/* 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: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; 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: flex-start;
  margin: 16px 0 6px; text-transform: none !important; letter-spacing: 0 !important;
  font-size: 12px !important; color: var(--text) !important; line-height: 1.6; 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; }
#match3d {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.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: 0; z-index: 6; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 5.5vh;
  opacity: 0;
}
.match-slam span {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(52px, 14vw, 140px);
  letter-spacing: 0.06em;
  line-height: 0.85;
  background: linear-gradient(180deg, #fff8df 0%, #e8c872 48%, #9a7040 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 40px rgba(232,200,114,0.45)) drop-shadow(0 0 28px rgba(232,200,114,0.5));
}
.match-slam.on {
  animation: slam 0.62s cubic-bezier(0.14, 1.35, 0.28, 1) forwards,
             slam-rise 0.8s 0.95s ease forwards;
}
@keyframes slam-rise {
  to { opacity: 0; transform: translateY(-22vh); }
}
.match-arena.hold-lock .match-slam {
  animation: none !important; opacity: 1; transform: none;
  padding-bottom: 5.5vh;
}
.match-arena.hold-lock .match-slam span { transform: none; }
.match-arena.hold-lock .match-rays {
  animation: none !important; opacity: 0.55; transform: scale(1.05) rotate(8deg);
}
/* Ring sits outside the card, never across the face */
.match-arena.hold-lock .match-shockwave {
  animation: none !important; opacity: 0.38; transform: scale(1.08);
}
.match-arena.hold-link .match-slam,
.match-arena.hold-link .match-rays,
.match-arena.hold-link .match-shockwave { display: none; }
@keyframes slam {
  0% { opacity: 0; transform: scale(2.35) rotate(-5deg); }
  58% { opacity: 1; transform: scale(0.94) rotate(0.5deg); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes slam-fade { to { opacity: 0; } }
.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:
    linear-gradient(180deg, #141b2c 0%, #0b101c 100%);
  border: 1px solid rgba(232,200,114,0.28);
  box-shadow:
    0 40px 90px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 80px rgba(232,200,114,0.08);
}
.holo.cred::before { opacity: 0.22; inset: 20% -30% -30% 30%; }
.holo.cred::after { opacity: 0.7; }
.cred-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #080b12;
}
.cred-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
  filter: saturate(0.96) contrast(1.05);
}
.cred-fade {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg,
    transparent 15%,
    rgba(11,16,28,0.15) 48%,
    rgba(11,16,28,0.72) 78%,
    #0b101c 100%);
}
.cred-mono {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 35% 30%, rgba(232,200,114,0.2), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(139,108,255,0.16), transparent 50%),
    linear-gradient(165deg, #1a2236 0%, #0a0e18 60%, #07090f 100%);
}
.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;
  background: linear-gradient(180deg, #fff8df 0%, #e8c872 42%, #9a7040 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 24px 40px rgba(232,200,114,0.18));
}
.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: linear-gradient(90deg, #f3e0a6, #e8c872, #f8efc8);
  padding: 6px 11px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.cred-seal {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 92px; height: 92px; border-radius: 50%;
  border: 1.5px solid rgba(232,200,114,0.9);
  box-shadow: 0 0 0 7px rgba(232,200,114,0.1), 0 0 28px rgba(232,200,114,0.28);
  background: radial-gradient(circle at 40% 35%, rgba(232,200,114,0.18), rgba(8,10,16,0.82));
  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 img {
  width: 40px; height: 40px; object-fit: contain;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 6px rgba(40,210,229,0.35));
}
.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;
  background: linear-gradient(180deg, #ffffff 10%, #e8d9a8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.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.4);
  box-shadow: 0 40px 90px rgba(0,0,0,0.55), 0 0 60px rgba(245,185,66,0.08);
}
.holo.cred.is-leave .cred-photo { filter: grayscale(0.35) contrast(1.05) brightness(0.9); }
.holo.cred.is-leave .cred-mono span {
  background: linear-gradient(180deg, #fff3d0, #f5b942 45%, #8a5a16);
  -webkit-background-clip: text; background-clip: text;
}
.holo.cred.is-leave .cred-badge {
  background: var(--amber); color: #1a1304;
}
.holo.cred.is-leave .cred-seal {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 0 7px rgba(245,185,66,0.1), 0 0 24px rgba(245,185,66,0.22);
}
.holo.cred.is-leave::before { opacity: 0.08; }

/* 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; }
  .exchange { width: min(920px, 100%); margin-bottom: 18px; }
  .result-actions { width: min(920px, 100%); margin-left: auto; margin-right: auto; justify-content: flex-start; }
  .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-fade {
    background: linear-gradient(180deg,
      rgba(11,16,28,0) 28%,
      rgba(11,16,28,0.55) 70%,
      #0b101c 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-right: -64px; z-index: 0; }
.cred-copy { z-index: 2; padding-left: 48px; }
.cred-fade {
  background: linear-gradient(90deg,
    transparent 8%,
    rgba(11,16,28,0.08) 38%,
    rgba(11,16,28,0.55) 62%,
    rgba(11,16,28,0.92) 82%,
    #0b101c 100%);
}
.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-right: 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-right: 0; }
  .cred-copy { padding-left: 22px; padding-right: 22px; padding-top: 0; margin-top: -56px; }
  .cred-copy .alias { padding-right: 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; }
