:root {
  --bg: #141414;
  --tile: #1f1f1f;
  --tile-2: #262626;
  --text: #f4f1ec;
  --muted: #a6a29c;
  --coral: #f2917f;
  --peri: #908cf4;
  --lime: #d5f17a;
  --line: rgba(244, 241, 236, 0.1);
  --radius: 28px;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  /* iridescent ring, like a heat-map glow */
  --iri: radial-gradient(closest-side, #f4fdff 0%, #9fdcff 18%, #8a86f2 34%, #4fbf61 52%, #ef6a52 70%, rgba(239, 106, 82, 0) 92%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

.grain::after { content: ""; position: absolute; inset: 0; opacity: .6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E"); }
/* the aura: a rainbow planet edge rising from the bottom, and a soft haze up top.
   The middle of the ring stays dark so text on top stays readable. */
.aura { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aura::before { content: ""; position: absolute; left: -60%; right: -60%; bottom: -50vh; height: 72vh; border-radius: 50%;
  background: radial-gradient(closest-side, transparent 84%, rgba(159,220,255,.55) 87.5%, rgba(138,134,242,.75) 90%, rgba(79,191,97,.6) 93.5%, rgba(239,106,82,.55) 96.5%, transparent 100%);
  filter: blur(16px); opacity: .8; animation: aura 14s ease-in-out infinite alternate; }
.aura::after { content: ""; position: absolute; top: -30vmax; left: -25vmax; width: 80vmax; height: 60vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79,191,97,.28), rgba(239,106,82,.14) 55%, transparent); filter: blur(40px); }
@keyframes aura { to { transform: translateY(-2vh) scaleX(1.04); } }
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .32; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; width: min(620px, 100%); margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 18px 24px; }
.screen { display: none; }
.screen.active { display: block; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.display { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; line-height: 1.02; }
.c-coral { color: var(--coral); }
.c-peri { color: var(--peri); }
.c-lime { color: var(--lime); }

/* ---------- landing ---------- */
#hero { padding-top: 2vh; }
.brand { font-size: 22px; margin: 0 0 28px; letter-spacing: -.02em; }
#hero h1 { font-size: clamp(38px, 10.5vw, 64px); }

/* live "found each other" ticker */
.found-ticker { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 28px 0 0; padding: 12px 20px; border-radius: 22px; background: var(--tile); font-size: 14px; color: var(--muted); min-height: 62px; }
.found-ticker #found-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.found-ticker .pair { font-size: 15px; }
.found-ticker .when { font-size: 12.5px; }
.found-ticker b { color: var(--text); }
.found-ticker .arrow { color: var(--coral); margin: 0 2px; }
.found-ticker span#found-text { transition: opacity .35s; }
.found-ticker .fade { opacity: 0; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); flex: none; box-shadow: 0 0 0 0 rgba(213, 241, 122, .6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(213, 241, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(213, 241, 122, 0); } }

/* globe */
.globe-wrap { position: relative; width: min(440px, 100%); aspect-ratio: 1; margin: 18px auto 0; }
.globe-wrap canvas { width: 100%; height: 100%; display: block; }
#hero .stats { text-align: center; margin-top: 4px; }

/* the wall */
.wall-block { margin-top: 40px; }
.wall-block h3 { font-size: 22px; margin: 0 0 14px; }
.wall { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 4px; }
.wall::-webkit-scrollbar { display: none; }
.hunt { flex: 0 0 82%; scroll-snap-align: center; position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; background: var(--tile); padding: 20px 20px 22px; }
.hunt::before { content: ""; position: absolute; z-index: -1; left: -20%; right: -20%; bottom: -70%; height: 90%; background: var(--iri); filter: blur(24px); opacity: .35; }
.hunt .who { font-size: 13px; color: var(--muted); margin: 0 0 10px; display: flex; justify-content: space-between; gap: 8px; }
.hunt .who b { color: var(--text); }
.hunt p.line { font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.5; margin: 0; }
.hunt u { color: var(--lime); text-decoration: none; border-bottom: 2.5px solid var(--lime); padding: 0 1px; }
.wall-cta { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.wall-cta .linkish { color: var(--lime); font-weight: 700; }
#result h2 { text-align: center; margin-bottom: 18px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 14px; }
h1 { font-size: clamp(40px, 11vw, 68px); margin: 0 0 18px; }
.sub { font-size: 18px; color: var(--text); opacity: .82; margin: 0 0 26px; max-width: 30em; }
.stats { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.returning { margin-top: 20px; text-align: center; }
.returning a { color: var(--lime); font-weight: 700; text-decoration: none; }

/* tiles, after the recap story grid */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 1 / .92; border-radius: var(--radius); background: var(--tile);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px;
}
.tile h3 { font-size: clamp(17px, 4.6vw, 24px); margin: 0 0 10px; }
.tile p { margin: 0; font-size: 14px; }
.tick { display: inline-block; margin-right: 6px; font-weight: 700; }
.tile::before, .tile::after { content: ""; position: absolute; z-index: -1; pointer-events: none; filter: blur(9px); }
.glow-a::before { background: var(--iri); width: 130%; height: 70%; left: -15%; top: -38%; transform: rotate(-6deg); }
.glow-a::after { background: radial-gradient(closest-side, rgba(239, 106, 82, .35), transparent); width: 80%; height: 50%; right: -30%; bottom: -25%; }
.glow-b { background: linear-gradient(180deg, var(--tile) 35%, #2d2a5c 85%, #3a35a0); }
.glow-b::before { background: radial-gradient(closest-side, transparent 58%, #9fa8ff 66%, #5bc26a 74%, transparent 84%); width: 150%; height: 70%; left: -25%; bottom: -40%; }
.glow-c::before { background: var(--iri); width: 100%; height: 62%; left: -28%; top: -30%; transform: rotate(18deg); }
.glow-c::after { background: var(--iri); width: 70%; height: 35%; right: -18%; bottom: -20%; opacity: .75; }
.glow-d::before { background: radial-gradient(closest-side, #ef6a52 0%, rgba(239, 106, 82, .5) 45%, transparent 85%); width: 110%; height: 55%; left: -5%; top: -35%; opacity: .8; }
.glow-d::after { background: var(--iri); width: 60%; height: 35%; right: -20%; bottom: -18%; opacity: .7; }
.big-tile { aspect-ratio: auto; min-height: 240px; padding: 34px 22px; margin: 18px 0; }
.big-tile p { color: var(--text); opacity: .85; font-size: 15px; max-width: 26em; }

/* ---------- buttons ---------- */
button { font: inherit; color: inherit; cursor: pointer; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 18px 28px; background: var(--text); color: #141414;
  font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -.01em;
  transition: transform .15s ease, background .15s;
}
.cta:hover { background: #fff; transform: translateY(-1px); }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .6; cursor: progress; }
.cta.wide { width: 100%; margin-top: 10px; }
.ghost { border: 1px solid var(--line); background: var(--tile); border-radius: 999px; padding: 16px 20px; font-weight: 700; }
.ghost:hover { background: var(--tile-2); }
.ghost.small { padding: 10px 16px; font-size: 14px; }
.back { border: 0; background: none; font-size: 22px; padding: 2px 6px 2px 0; color: var(--muted); }
.linkish { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.linkish.danger { color: var(--coral); }

/* ---------- forms ---------- */
.steps { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
h2 { font-size: clamp(30px, 8.5vw, 44px); margin: 14px 0 10px; }
.hint { color: var(--muted); margin: 0 0 22px; }

.drop {
  position: relative; display: flex; align-items: center; gap: 14px; overflow: hidden;
  border-radius: 22px; padding: 18px; margin-bottom: 24px; background: var(--tile); cursor: pointer;
  border: 1.5px dashed rgba(244, 241, 236, .22); transition: border-color .15s;
}
.drop:hover, .drop.over { border-color: var(--lime); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { font-size: 24px; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--tile-2); color: var(--lime); }
.drop-progress { position: absolute; left: 18px; right: 18px; bottom: 8px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.drop-progress span { display: block; height: 100%; width: 0; background: var(--lime); transition: width .2s; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.row.three { grid-template-columns: .8fr 1.2fr 1fr; }
.field { display: block; min-width: 0; }
.field.solo { margin-bottom: 14px; }
.field > span, legend { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
i { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }

input, select {
  font: inherit; font-size: 16px; color: var(--text); width: 100%;
  background: var(--tile); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input::placeholder { color: rgba(166, 162, 156, .55); }
input:focus, select:focus { border-color: var(--peri); box-shadow: 0 0 0 3px rgba(144, 140, 244, .25); }
input.filled, select.filled { border-color: rgba(213, 241, 122, .6); }

fieldset { border: 0; padding: 0; margin: 22px 0 18px; }
legend.display { font-size: 20px; margin-bottom: 12px; }
legend.display i { font-family: var(--font); }

legend { padding: 0; margin-bottom: 10px; font-size: 16px; }
.list { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { counter-increment: n; display: flex; align-items: center; gap: 10px; }
.list li::before { content: counter(n); width: 22px; flex: none; text-align: right; font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--muted); }
.handle-input { display: flex; }
.handle-input select { width: auto; flex: none; border-radius: 14px 0 0 14px; border-right: 0; }
.handle-input input { border-radius: 0 14px 14px 0; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; margin-top: 12px; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 1px; padding: 0; -webkit-appearance: auto; appearance: auto; accent-color: var(--lime); }
.check b { color: var(--text); }
.error { background: rgba(242, 145, 127, .12); border: 1px solid rgba(242, 145, 127, .45); color: #ffd6cc; padding: 12px 14px; border-radius: 14px; margin: 8px 0 4px; }

/* ---------- searching ---------- */
#scan { text-align: center; padding-top: 24vh; }
.orb { width: 220px; height: 220px; margin: 0 auto; border-radius: 50%; background: var(--iri); filter: blur(10px); animation: breathe 1.6s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(.82) rotate(0); } to { transform: scale(1.05) rotate(40deg); } }
.scan-text { font-size: 22px; margin-top: 30px; color: var(--lime); min-height: 1.3em; }

/* ---------- results ---------- */
h3.section { font-size: 24px; margin: 28px 0 8px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.person { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; background: var(--tile); padding: 20px 18px 18px; }
.person.mutual::before { content: ""; position: absolute; z-index: -1; inset: auto -20% -60% -20%; height: 90%; background: var(--iri); filter: blur(22px); opacity: .45; }
.person .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.person .lbl { font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--coral); }
.person.mutual .lbl { color: var(--lime); }
.person .pct { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.person .facts { font-size: 17px; font-weight: 700; margin: 8px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips span { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--tile-2); color: var(--text); }
.chips span.on { background: rgba(213, 241, 122, .16); color: var(--lime); }
.person .verify { background: var(--tile-2); border-radius: 16px; padding: 4px 14px; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.person .verify p { margin: 10px 0; }
.person .verify b { color: var(--text); }
.person .note { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.person .note.hot { color: var(--lime); font-weight: 700; }
.person .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.person .btns .cta { padding: 13px 20px; font-size: 14px; }
.person .btns .ghost { padding: 12px 16px; font-size: 14px; }
.person .reveal { font-family: var(--display); font-weight: 800; font-size: 26px; margin: 6px 0 4px; }
.person .reveal a { color: var(--lime); text-decoration: none; font-size: 17px; display: inline-block; margin-top: 6px; }

/* story card preview + share */
.story { width: min(300px, 78%); margin: 4px auto 0; text-align: center; }
.story-frame { aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--tile); margin-bottom: 18px; box-shadow: 0 0 0 1px var(--line), 0 24px 60px -20px rgba(144, 140, 244, .45); }
.story-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-frame img:not([src]) { visibility: hidden; }
.story .cta { white-space: nowrap; }
.sticker { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.sticker .linkish { color: var(--lime); font-weight: 700; }
.empty { text-align: center; font-size: 15px; color: var(--muted); margin: 30px 0 0; }
.counts { text-align: center; font-size: 14px; color: var(--muted); margin: 26px 0 0; }
.counts b { color: var(--text); font-variant-numeric: tabular-nums; }

.person .tools { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.reasons button { border: 1px solid var(--line); background: var(--tile-2); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.reasons button:hover { border-color: var(--coral); }
.toast { text-align: center; color: var(--lime); font-weight: 700; margin: 6px 0 0; }

.private { margin-top: 28px; padding: 18px; border-radius: 22px; background: var(--tile); font-size: 14px; color: var(--muted); }
.private b { color: var(--text); }
.copyrow { display: flex; gap: 8px; margin: 10px 0; }
.copyrow input { font-size: 13px; padding: 10px 12px; }
.fine { margin: 6px 0 0; font-size: 13px; }

footer a, .check a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
footer { position: relative; z-index: 1; text-align: center; color: rgba(166, 162, 156, .75); font-size: 12px; padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }

@media (max-width: 420px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row.three { grid-template-columns: 1fr 1fr; }
  .row.three .field:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
