:root {
  --bg: #0b0f0a;
  --card: rgba(16, 20, 14, 0.72);
  --lime: #d2f56b;
  --cyan: #68e1e6;
  --coral: #f2745f;
  --lilac: #9aa8ff;
  --text: #f4f6ef;
  --muted: #a7ad9f;
  --line: rgba(255, 255, 255, 0.14);
  --pill: #e8f8f6;
  --danger: #ff8a7a;
  --radius: 28px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Iridescent background ---------- */
.aura { position: fixed; inset: 0; overflow: hidden; z-index: 0; filter: blur(70px) saturate(140%); opacity: .75; }
.blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.b1 { width: 55vmax; height: 55vmax; left: -15vmax; top: -18vmax; background: radial-gradient(circle, #3f6b1d 0%, transparent 65%); }
.b2 { width: 45vmax; height: 45vmax; right: -12vmax; top: 10vh; background: radial-gradient(circle, var(--cyan) 0%, transparent 60%); animation-duration: 28s; opacity: .55; }
.b3 { width: 40vmax; height: 40vmax; left: 10vw; bottom: -20vmax; background: radial-gradient(circle, var(--coral) 0%, transparent 60%); animation-duration: 31s; opacity: .45; }
.b4 { width: 30vmax; height: 30vmax; right: 15vw; bottom: -8vmax; background: radial-gradient(circle, var(--lilac) 0%, transparent 60%); animation-duration: 26s; opacity: .5; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -4vh) scale(1.12); }
  100% { transform: translate(-5vw, 5vh) scale(.92); }
}

/* ---------- Story card ---------- */
.story {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  min-height: min(860px, calc(100dvh - 24px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px 16px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.story-top { position: relative; z-index: 3; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.progress i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; position: relative; }
.progress i.done::after, .progress i.on::after { content: ""; position: absolute; inset: 0; background: var(--text); }
.progress i.on::after { animation: fill .5s ease-out both; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* 3 columns with equal sides, so the brand stays centered whether or not "back" is shown. */
.story-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; height: 44px; }
.story-nav > #back { grid-column: 1; justify-self: start; }
.brand { grid-column: 2; font-weight: 800; letter-spacing: -.01em; font-size: 15px; text-align: center; }
.icon-btn { width: 36px; }
.story-nav > .lang { grid-column: 3; justify-self: end; }
.icon-btn { height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text); font-size: 30px; line-height: 1; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }

.screen { flex: 1; display: flex; flex-direction: column; text-align: center; padding-top: 8px; animation: enter .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

h1, h2 { margin: 12px 0 6px; font-weight: 900; letter-spacing: -.035em; line-height: 1.02; }
h1 { font-size: clamp(36px, 10vw, 50px); }
h2 { font-size: clamp(28px, 7.5vw, 36px); }
.lime { color: var(--lime); }
.sub { margin: 0 0 14px; color: var(--lime); font-weight: 600; opacity: .85; }
.body { color: var(--muted); line-height: 1.5; margin: 8px 4px 20px; }
.fine { color: var(--muted); font-size: 13px; margin-top: 14px; min-height: 1em; }
.story-foot { margin-top: 14px; text-align: center; color: var(--muted); font-size: 11px; opacity: .7; }

/* ---------- Wrapped-style details: grain, display type, twin badge ---------- */
.b5 { width: 35vmax; height: 35vmax; left: 30vw; top: 30vh; background: radial-gradient(circle, #e8f8f6 0%, transparent 60%); animation-duration: 34s; opacity: .18; }
/* Film grain: SVG turbulence as a data URI (allowed by the CSP's img-src data:). */
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .13; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Heavy italic with an iridescent glow, in the spirit of the Wrapped lettering. */
.display {
  font-style: italic; font-weight: 900; letter-spacing: -.045em; color: var(--lime);
  text-shadow: 0 0 1px #0b0f0a, 2px 2px 0 rgba(154, 168, 255, .55), -2px -1px 0 rgba(242, 116, 95, .45), 0 0 28px rgba(104, 225, 230, .35);
}
.twin-badge { width: 112px; height: 112px; margin: 14px auto 4px; filter: drop-shadow(0 0 18px rgba(154, 168, 255, .55)); animation: badge 6s ease-in-out infinite; }
@keyframes badge { 50% { transform: scale(1.04); filter: drop-shadow(0 0 26px rgba(104, 225, 230, .6)) hue-rotate(20deg); } }

.brand small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 800; padding: 5px 8px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--pill); color: #0b0f0a; }

/* ---------- Forms ---------- */
form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field em { text-transform: none; font-style: normal; font-weight: 500; letter-spacing: 0; }
input, select, textarea {
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 14px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select option { background: #1a1f17; }
input::placeholder, textarea::placeholder { color: rgba(244, 246, 239, .35); font-weight: 500; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(210, 245, 107, .2); background: rgba(255, 255, 255, .09); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12px; min-height: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--lime); }
.check.invalid span { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--danger); text-align: center; margin: 0; min-height: 1.2em; font-size: 14px; }

/* ---------- Buttons ---------- */
.actions { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 12px; }
.pill {
  min-width: 220px; height: 48px; padding: 0 28px; border-radius: 999px; border: 0;
  background: var(--pill); color: #0b0f0a; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  transition: transform .12s, background .15s, opacity .15s;
}
.pill:hover { background: #fff; transform: scale(1.03); }
.pill:active { transform: scale(.97); }
.pill.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.pill[disabled] { opacity: .55; cursor: progress; transform: none; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ---------- Results ---------- */
.search-result { background: rgba(210, 245, 107, .1); border: 1px solid rgba(210, 245, 107, .3); color: var(--lime); border-radius: 16px; padding: 12px 14px; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.search-result:empty { display: none; }
/* Result screen, modeled on the Audio Twin story: kicker, big city, 2×2 stats, planet. */
.result { position: relative; overflow: hidden; margin: 0 -22px -16px; padding: 8px 22px 0; border-radius: 0 0 var(--radius) var(--radius); }
.result > * { position: relative; z-index: 1; }
.kicker { margin: 8px 0 0; color: var(--lime); font-weight: 500; font-size: 16px; }
.city { margin: 4px 0 18px; color: var(--lime); font-size: clamp(32px, 9vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 10px; margin: 0 0 22px; }
.stats dt { color: var(--lime); font-size: 14px; opacity: .85; }
.stats dd { margin: 2px 0 0; color: var(--lime); font-size: 18px; font-weight: 800; }
.status h3, .near h3 { margin: 6px 0 4px; font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: -.02em; }
.status .body { margin-bottom: 10px; }
.body.small { font-size: 13px; margin: 0 0 8px; }
.cards { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.near { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.match .diff { grid-column: 1 / -1; color: var(--cyan); font-size: 12px; font-weight: 600; }

.shop { display: grid; gap: 10px; margin-top: 16px; text-align: left; }
.offer {
  padding: 14px 16px; border-radius: 20px; border: 1px solid rgba(210, 245, 107, .35);
  background: linear-gradient(135deg, rgba(210, 245, 107, .1), rgba(104, 225, 230, .06) 60%, rgba(154, 168, 255, .1));
}
.offer h4 { margin: 0 0 4px; font-size: 16px; font-weight: 900; color: var(--lime); }
.offer p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.offer .owned { color: var(--lime); font-weight: 700; margin: 0; }
.offer.is-owned { border-color: var(--line); background: rgba(255, 255, 255, .04); }
.offer.is-owned > p:not(.owned) { display: none; }
.buy-form { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.buy-form .field { flex: 1 1 170px; }
.auth-sent { flex-basis: 100%; margin: 0 0 2px !important; color: var(--text) !important; }
.auth-code [name=code] { letter-spacing: .4em; font-size: 20px; text-align: center; }
.auth-code [name=code]:placeholder-shown { letter-spacing: normal; font-size: 15px; }
.auth-change { flex-basis: 100%; text-align: left; padding-left: 0; }
.offer .notice { color: var(--coral); font-weight: 700; }
.offer.account { border-color: rgba(104, 225, 230, .45); background: linear-gradient(135deg, rgba(104, 225, 230, .12), rgba(154, 168, 255, .08)); }
.offer.account h4 { color: var(--cyan); }
.offer.account.is-owned { border-color: var(--line); background: rgba(255, 255, 255, .04); }
.offer.account.is-owned .owned { color: var(--cyan); }
[data-screen="login"] .auth, [data-screen="account"] .auth { margin-top: 16px; text-align: left; }
.pill.small { min-width: 0; height: 42px; padding: 0 18px; font-size: 14px; white-space: nowrap; }
.actions .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.link-btn.danger:hover { color: var(--danger); }
.link-btn:not(.danger):hover { color: var(--text); }

.planet {
  position: relative; z-index: 0 !important; height: 150px; margin: 6px -22px 0;
  background:
    radial-gradient(120% 140% at 50% 140%, transparent 58%, rgba(104, 225, 230, .5) 61%, transparent 66%),
    radial-gradient(40% 60% at 28% 92%, rgba(154, 168, 255, .9), transparent 70%),
    radial-gradient(35% 55% at 62% 85%, rgba(104, 225, 230, .85), transparent 70%),
    radial-gradient(30% 50% at 80% 100%, rgba(242, 116, 95, .8), transparent 70%),
    radial-gradient(25% 40% at 45% 110%, rgba(210, 245, 107, .6), transparent 70%);
  -webkit-mask: radial-gradient(120% 140% at 50% 140%, #000 60%, transparent 61%);
  mask: radial-gradient(120% 140% at 50% 140%, #000 60%, transparent 61%);
  filter: blur(1px) saturate(130%);
  animation: spin 40s linear infinite;
}
@keyframes spin { 50% { filter: blur(1px) saturate(130%) hue-rotate(35deg); } }

#matches { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.match {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; text-align: left;
  padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  animation: enter .4s both;
}
.match .avatar { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--lime), var(--cyan), var(--lilac), var(--coral), var(--lime)); }
.match .handle { font-weight: 800; font-size: 17px; word-break: break-word; }
.match .meta { color: var(--muted); font-size: 13px; }
.match .song { grid-column: 1 / -1; color: var(--lime); font-size: 13px; margin-top: 6px; }
.match .copy { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }

.toast {
  position: fixed; z-index: 10; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--pill); color: #0b0f0a; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100vw - 32px); text-align: center;
  pointer-events: none; /* never blocks the buttons underneath */
}

/* ---------- Upsell card: one card, two perks, iridescent animated border ---------- */
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.upsell {
  position: relative; border-radius: 26px; padding: 2px;
  background: conic-gradient(from var(--angle), var(--coral), var(--lilac), var(--cyan), var(--lime), var(--coral));
  box-shadow: 0 0 36px rgba(154, 168, 255, .25), 0 0 80px rgba(104, 225, 230, .12);
  animation: upsell-ring 6s linear infinite;
}
@keyframes upsell-ring { to { --angle: 360deg; } }
.upsell-inner {
  border-radius: 24px; padding: 18px 14px 12px;
  background: radial-gradient(120% 70% at 50% 0%, rgba(154, 168, 255, .2), transparent 60%), #10140f;
}
.upsell-head { text-align: center; margin-bottom: 14px; }
.spark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 50%;
  background: conic-gradient(var(--lime), var(--cyan), var(--lilac), var(--coral), var(--lime));
  color: #0b0f0a; font-size: 16px; box-shadow: 0 0 22px rgba(210, 245, 107, .5);
}
.upsell-head h4 {
  margin: 0; font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: -.035em; color: var(--lime);
  text-shadow: 2px 2px 0 rgba(154, 168, 255, .5), -1px -1px 0 rgba(242, 116, 95, .4), 0 0 24px rgba(104, 225, 230, .35);
}
.upsell-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.perks { display: grid; gap: 10px; }
.perk {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; align-items: start; text-align: left;
  padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.perk.lead {
  background: linear-gradient(135deg, rgba(210, 245, 107, .15), rgba(104, 225, 230, .08));
  border-color: rgba(210, 245, 107, .45);
}
.perk-icon { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.perk-icon.flex i { position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--lime); }
.perk-icon.flex i:first-child { transform: translateX(-5px); }
.perk-icon.flex i:last-child { transform: translate(6px, 2px); border-color: var(--cyan); }
.perk-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.perk.lead .perk-icon.notify svg { animation: bell 2.6s ease-in-out infinite; transform-origin: 50% 12%; }
@keyframes bell { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(14deg); } 84% { transform: rotate(-12deg); } 92% { transform: rotate(6deg); } }
.perk-text h5 { margin: 0; font-size: 16px; font-weight: 900; color: var(--text); letter-spacing: -.01em; }
.perk-text p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.perk .owned { color: var(--lime); font-weight: 700; }
.perk.is-owned .perk-text > p:not(.owned) { display: none; }
.badge {
  display: inline-block; margin-bottom: 5px; padding: 2px 8px; border-radius: 999px;
  background: var(--lime); color: #0b0f0a; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em;
}

/* Curiosity gap: blurred preview of almost-twins that really exist. */
.teaser {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 8px;
  padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px dashed rgba(104, 225, 230, .45);
}
.ghosts { position: relative; display: flex; flex-direction: column; gap: 5px; flex: none; }
.ghost { display: flex; align-items: center; gap: 6px; filter: blur(2.2px); }
.ghost i { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--lime), var(--cyan), var(--lilac), var(--coral), var(--lime)); }
.ghost b { width: 62px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .55); }
.ghost:nth-child(2) b { width: 44px; }
.lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 16px; filter: drop-shadow(0 0 6px rgba(0, 0, 0, .8)); }
.teaser-text { color: var(--cyan); font-size: 13px; line-height: 1.3; }

.upsell .buy {
  width: 100%; min-width: 0; height: 52px; margin-top: 14px; font-size: 16px; font-weight: 900;
  background: var(--lime); color: #0b0f0a; box-shadow: 0 8px 28px rgba(210, 245, 107, .4);
  animation: cta-pulse 2.8s ease-in-out infinite;
}
.upsell .buy:hover { background: #e2ff86; }
@keyframes cta-pulse { 50% { box-shadow: 0 8px 36px rgba(210, 245, 107, .65); } }
.trust { margin: 12px 0 0; text-align: center; font-size: 11px; color: var(--muted); }

.upsell.all-owned { animation: none; background: var(--line); box-shadow: none; }
.upsell.all-owned .upsell-inner { padding: 12px; background: #10140f; }
.upsell-done { margin: 0; text-align: center; color: var(--lime); font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .story { padding: 14px 16px; }
  .pill { min-width: 0; width: 100%; }
}
@media (min-width: 900px) {
  .story { width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Screen-level UX additions ---------- */
.progress[hidden] { display: none; }
.twin-badge.small { width: 76px; height: 76px; margin-top: 8px; }
.intro-actions, .for-new, .for-returning { display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* Step 3: privacy promises make the ask (your contact) feel safe. */
.promises { list-style: none; margin: 4px 0 0; padding: 14px 16px; display: grid; gap: 10px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.promises li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Result: empty state with a calm "listening" radar instead of a wall of text. */
.empty { display: flex; flex-direction: column; align-items: center; }
.radar { position: relative; width: 64px; height: 64px; margin: 2px 0 6px; }
.radar b { position: absolute; inset: 26px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--cyan); opacity: 0; animation: radar 3s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: 1s; }
.radar i:nth-child(3) { animation-delay: 2s; }
@keyframes radar { from { transform: scale(.3); opacity: .8; } to { transform: scale(1); opacity: 0; } }
.note { margin: 4px 0 0; padding: 10px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.45; color: var(--coral); background: rgba(242, 116, 95, .1); border: 1px solid rgba(242, 116, 95, .3); }

/* Compact Plus entry on the result screen; opens the dedicated Plus screen. */
.plus-row {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 18px; padding: 12px 14px;
  border-radius: 18px; border: 1px solid rgba(210, 245, 107, .35); cursor: pointer; text-align: left;
  background: linear-gradient(135deg, rgba(210, 245, 107, .12), rgba(104, 225, 230, .06) 60%, rgba(154, 168, 255, .1));
  color: var(--text); font: inherit; transition: transform .12s, border-color .15s;
}
.plus-row:hover { transform: translateY(-1px); border-color: var(--lime); }
.plus-row .spark { flex: none; width: 34px; height: 34px; font-size: 16px; }
.plus-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plus-text strong { color: var(--lime); font-size: 15px; font-weight: 900; }
.plus-text small { color: var(--muted); font-size: 12.5px; }
.plus-row.hot .plus-text small { color: var(--cyan); font-weight: 700; }
.plus-row .chev { font-size: 26px; color: var(--lime); line-height: 1; }

/* Plus screen: the card is the whole screen, vertically centered. */
[data-screen="plus"] { justify-content: center; }
[data-screen="plus"] .upsell { margin: 8px 0; }

/* Secondary options tucked away to keep the result calm. */
.more { width: 100%; margin-top: 4px; text-align: center; }
.more summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " ▾"; }
.more[open] summary::after { content: " ▴"; }
.more-body { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 6px; }
.account-line { margin: 0; font-size: 12.5px; color: var(--cyan); }

/* Account screen notice (shown when paying requires it). */
[data-screen="account"] .notice { margin: 4px 0 0; padding: 10px 12px; border-radius: 14px; font-size: 13px; font-weight: 700; color: var(--coral); background: rgba(242, 116, 95, .1); border: 1px solid rgba(242, 116, 95, .3); }

/* Error screen */
[data-screen="error"] { justify-content: center; }
.error-icon { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 900; color: var(--coral); border: 2px solid var(--coral); box-shadow: 0 0 22px rgba(242, 116, 95, .35); }
[data-screen="error"] .actions { margin-top: 8px; }

/* Offline banner */
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 10; padding: 8px 14px; text-align: center; font-size: 13px; font-weight: 700; color: #0b0f0a; background: var(--coral); }

@media (prefers-reduced-motion: reduce) {
  .radar i, .upsell .buy, .twin-badge { animation: none; }
}

/* Headings get programmatic focus on screen change (for screen readers); no visible ring for that. */
[tabindex="-1"]:focus { outline: none; }

/* Pay options on the Plus screen: first one is the primary (lime), the rest are outlined. */
.pay-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pay-options .buy { margin-top: 0; }
.pay-option { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.pay-option small { color: var(--muted); font-size: 11.5px; text-align: center; }
.pay-options .buy { width: 100%; min-width: 0; height: auto; min-height: 50px; padding: 10px 16px; font-size: 16px; line-height: 1.2; white-space: normal; }
.pay-options .buy.alt { min-height: 46px; font-size: 15px; }
.pay-choose { margin: 14px 0 -4px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.upsell .buy.alt { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, .35); box-shadow: none; animation: none; height: 46px; font-size: 15px; }
.upsell .buy.alt:hover { border-color: var(--text); background: rgba(255, 255, 255, .06); }
.pay-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

/* "I don't know" on your own card */
.field-hint { grid-column: 1 / -1; margin: 2px 0 -4px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.check.unsure { grid-column: 1 / -1; margin-top: -6px; }

/* What your twin's Wrapped says about you */
.match .reveal { grid-column: 1 / -1; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--lime); }

/* My details */
.mine-card { text-align: left; padding: 16px 18px 2px; margin: 14px 0 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .04); }
.mine-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mine-card .stats { margin-bottom: 14px; gap: 14px 10px; }
.mine-city { margin: -4px 0 12px; font-weight: 700; }
.mine-handle { margin-top: 14px; }
#open-mine { margin-top: 4px; }

/* ---------- Contact step: network chips, input with icon, note ---------- */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
fieldset.field legend em { text-transform: none; font-style: normal; font-weight: 500; letter-spacing: 0; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chips.small { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
.chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px 9px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .04); font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chips.small .chip { flex-direction: row; justify-content: center; padding: 9px 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.chip svg { width: 22px; height: 22px; }
.chips.small .chip svg { width: 16px; height: 16px; }
.chip:has(input:checked) { border-color: var(--lime); color: var(--text); background: rgba(210, 245, 107, .12); }
.chip:has(input:checked) svg { color: var(--lime); }
.chip:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon .adorn { position: absolute; left: 14px; display: flex; align-items: center; gap: 4px; color: var(--lime); pointer-events: none; }
.input-icon .adorn svg { width: 18px; height: 18px; }
.input-icon .adorn b { color: var(--muted); font-weight: 700; }
.input-icon .adorn b[hidden] { display: none; }
.input-icon input { padding-left: 56px; }
.input-icon.no-at input { padding-left: 44px; }
.textarea-wrap { position: relative; display: block; }
textarea { height: auto; min-height: 76px; padding: 12px 14px 24px; resize: none; line-height: 1.4; font-size: 16px; }
.textarea-wrap .counter { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: var(--muted); }

/* ---------- Match: the moment ---------- */
.match-kicker { display: inline-block; margin: 2px auto 0; padding: 5px 12px; border-radius: 999px; background: rgba(210, 245, 107, .14); color: var(--lime); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.result:not(.found-mode) .match-kicker { display: none; }
.found-mode .status { margin-top: 4px; }
.found-mode #result-title {
  margin: 8px 0 16px; font-size: clamp(34px, 10.5vw, 46px); line-height: 1.02; font-weight: 900; font-style: italic; letter-spacing: -.03em;
  background: linear-gradient(95deg, var(--lime), var(--cyan) 70%, var(--lilac)); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pop .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.found-mode .twin-badge { width: 92px; height: 92px; margin-top: 6px; }
.found-mode .kicker { margin-top: 26px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.found-mode .city { font-size: 24px; margin-bottom: 12px; }
.found-mode .stats { gap: 12px 10px; }
.match .handle .ic { width: 16px; height: 16px; vertical-align: -2px; margin-right: 5px; color: var(--lime); }
.match.hero { padding: 18px; text-align: left; border-color: rgba(210, 245, 107, .5); box-shadow: 0 0 0 1px rgba(210, 245, 107, .15), 0 14px 44px rgba(210, 245, 107, .14); animation: enter .5s .15s cubic-bezier(.2, .8, .2, 1) both; }
.match.hero .handle { font-size: 22px; }
.match .actions-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.match .actions-row .copy { margin-top: 0; }
.match .write { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.match .write.pill { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 18px; font-size: 15px; }
.match .write .ic { width: 18px; height: 18px; }
.note-bubble { grid-column: 1 / -1; margin: 12px 0 0; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: rgba(255, 255, 255, .07); text-align: left; }
.note-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); }
.note-label .ic { width: 14px; height: 14px; }
.note-bubble p { margin: 4px 0 0; font-size: 15px; line-height: 1.35; word-break: break-word; }

.result > .confetti { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -14px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: confetti 2.8s cubic-bezier(.2, .7, .4, 1) var(--d) forwards; }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), 640px) rotate(var(--r)); } }
.check.is-disabled { opacity: .4; cursor: default; }
select:disabled { opacity: .4; }
