/* Onboarding.
   Same design system as the app: black, white type, violet accents, selective glow.
   A full-screen layer above the screens and the bottom bar (sheets and toasts stay above it). */

.onboarding {
  position: absolute; inset: 0;
  z-index: 15;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
  transition: opacity 0.38s ease, transform 0.38s ease;
}
.onboarding.leaving { opacity: 0; transform: scale(1.02); }

/* ---------- Top: back + progress ---------- */
.ob-top {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--status-h) + 6px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  position: relative; z-index: 2;
}
.ob-top:empty { min-height: 0; padding-top: calc(env(safe-area-inset-top, 0px) + var(--status-h)); }
.ob-back { position: relative; }
.ob-back::before { content: ""; position: absolute; inset: -4px; }
.ob-progress { flex: 1; height: 4px; border-radius: 2px; background: #221d31; overflow: hidden; }
.ob-progress i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), #d2b6ff); box-shadow: 0 0 10px var(--glow); transition: width 0.35s ease; }
.ob-count { flex: none; min-width: 38px; text-align: right; font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Scrolling body + sticky footer ---------- */
.ob-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; position: relative; z-index: 1; }
.ob-scroll::-webkit-scrollbar { display: none; }
.ob-step {
  display: flex; flex-direction: column; gap: 16px;
  min-height: 100%;
  padding: 10px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
  animation: ob-in 0.35s ease;
}
@keyframes ob-in { from { opacity: 0; transform: translateY(10px); } }
.ob-foot {
  flex: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) max(18px, calc(env(safe-area-inset-bottom, 0px) + 10px)) max(20px, env(safe-area-inset-left, 0px));
  position: relative; z-index: 2;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.ob-cta { width: 100%; min-height: 54px; border-radius: 18px; font-size: 16px; }
.ob-cta[aria-disabled="true"] { opacity: 0.4; box-shadow: none; filter: saturate(0.6); }
.ob-hint { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.ob-skip, .ob-link { position: relative; font-size: 14px; font-weight: 800; color: var(--accent-light); }
.ob-skip { color: var(--muted); padding: 4px 8px; }
.ob-skip::before, .ob-link::before { content: ""; position: absolute; inset: -10px -6px; }

.ob-title { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(24px, 7.4vw, 30px); font-weight: 800; line-height: 1.12; text-transform: uppercase; letter-spacing: -0.01em; }
.ob-sub { margin: -6px 0 4px; font-size: 15px; line-height: 1.45; color: #bdb5cf; }
.ob-fine { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.ob-center { text-align: center; }
.ob-center-label { justify-content: center; margin-top: 8px; }

/* ---------- Welcome + Ready (cinematic) ---------- */
.ob-welcome .ob-step, .ob-ready .ob-step { justify-content: center; padding-top: 0; }
.ob-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.32; filter: saturate(1.2); }
.ob-welcome .ob-scroll::after, .ob-ready .ob-scroll::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 60% at 50% 45%, transparent, rgba(5, 4, 7, 0.85) 75%), linear-gradient(to bottom, rgba(5,4,7,0.6), transparent 30%, transparent 60%, var(--bg));
}
.ob-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ob-glow i { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55; animation: ob-float 9s ease-in-out infinite alternate; }
.ob-glow i:nth-child(1) { width: 260px; height: 260px; left: -60px; top: 18%; background: #7a35e8; }
.ob-glow i:nth-child(2) { width: 220px; height: 220px; right: -70px; top: 42%; background: #c13dff; animation-delay: -3s; }
.ob-glow i:nth-child(3) { width: 180px; height: 180px; left: 30%; bottom: 6%; background: #4a1bff; animation-delay: -6s; opacity: 0.4; }
@keyframes ob-float { to { transform: translate(24px, -30px) scale(1.15); } }
.ob-welcome-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 0 6px; }
.ob-wordmark { font-size: clamp(26px, 9vw, 34px) !important; letter-spacing: 0.32em; }
.ob-tagline { margin: 0; font-family: "Jost", var(--font-body); font-weight: 300; letter-spacing: 0.26em; font-size: 13px; text-transform: uppercase; color: #cbb0ff; }
.ob-welcome-copy { margin: 18px 0 0; max-width: 30ch; font-size: 16px; line-height: 1.55; color: #e4def0; }
.ob-ready-title { margin: 16px 0 0; font-family: var(--font-display); font-size: clamp(26px, 8vw, 32px); font-weight: 800; text-transform: uppercase; line-height: 1.1; text-shadow: 0 0 30px rgba(157, 92, 255, 0.6); }

/* ---------- Forms ---------- */
.ob-form { display: flex; flex-direction: column; gap: 14px; }
.ob-field { display: flex; flex-direction: column; gap: 7px; }
.ob-field > span { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-light); }
.ob-field input {
  width: 100%; height: 52px; padding: 0 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  color: var(--fg); font: inherit; font-size: 16px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ob-field input:focus { border-color: var(--accent); box-shadow: 0 0 14px rgba(157, 92, 255, 0.25); }
.ob-field input::placeholder { color: #6f6884; }
.ob-error { margin: 0; font-size: 13px; font-weight: 700; color: #ff8fa3; }

/* photo placeholder */
.ob-photo { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ob-photo > img, .ob-photo > span { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-light); box-shadow: 0 0 0 6px rgba(157, 92, 255, 0.14), 0 0 30px var(--glow); }
.ob-photo-empty { display: grid; place-items: center; background: var(--surface); border-style: dashed !important; color: var(--accent-light); box-shadow: none !important; }
.ob-photo-empty svg { width: 32px; height: 32px; }
.ob-photo em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--accent-light); }
.ob-initial { display: grid; place-items: center; font-family: var(--font-display); font-size: 38px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #9d5cff, #5b2bd6); }
.ob-initial.rose { background: linear-gradient(135deg, #ff6fb5, #7a35e8); }

/* ---------- Chips ---------- */
.ob-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ob-chips.compact { gap: 8px; }
.ob-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 46px; padding: 0 18px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; font-weight: 700; color: #d9d5e3;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.ob-chips.compact .ob-chip { min-height: 42px; padding: 0 15px; font-size: 14px; }
.ob-chip svg { width: 15px; height: 15px; }
.ob-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); box-shadow: 0 0 16px rgba(157, 92, 255, 0.32); }
.ob-chip:active { transform: scale(0.96); }

/* ---------- Energy cards ---------- */
.ob-energy { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-energy-card {
  position: relative; min-height: 132px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: 16px; border-radius: 22px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}
.ob-energy-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.55; }
.ob-energy-card.e-chill::before { background: radial-gradient(80% 70% at 100% 0%, rgba(61, 139, 255, 0.45), transparent 70%); }
.ob-energy-card.e-social::before { background: radial-gradient(80% 70% at 100% 0%, rgba(255, 111, 181, 0.45), transparent 70%); }
.ob-energy-card.e-high::before { background: radial-gradient(80% 70% at 100% 0%, rgba(157, 92, 255, 0.7), transparent 70%); }
.ob-energy-card.e-anything::before { background: radial-gradient(80% 70% at 100% 0%, rgba(255, 181, 71, 0.4), transparent 70%); }
.ob-energy-card { isolation: isolate; }
.ob-energy-card b { font-family: var(--font-display); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.ob-energy-card span { font-size: 13px; line-height: 1.4; color: #bdb5cf; }
.ob-energy-card i { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #3a3350; color: transparent; }
.ob-energy-card i svg { width: 14px; height: 14px; }
.ob-energy-card.on { border-color: var(--accent-light); box-shadow: 0 0 26px rgba(157, 92, 255, 0.35); }
.ob-energy-card.on i { background: var(--accent); border-color: var(--accent); color: #fff; }
.ob-energy-card:active { transform: scale(0.98); }

/* ---------- Venue cards ---------- */
.ob-venues { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-venue {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%;
  border-radius: 20px; overflow: hidden; background: #0d0a14;
  border: 1px solid var(--line); text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.12s;
}
.ob-venue video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ob-venue::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.2), transparent 40%, rgba(0,0,0,0.85)); }
.ob-venue-text { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.ob-venue-text b { font-size: 15px; font-weight: 800; }
.ob-venue-text span { font-size: 11.5px; color: rgba(255, 255, 255, 0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-venue i { position: absolute; top: 10px; right: 10px; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.45); border: 1.5px solid rgba(255,255,255,0.4); color: transparent; }
.ob-venue i svg { width: 15px; height: 15px; }
.ob-venue.on { border-color: var(--accent-light); box-shadow: 0 0 22px rgba(157, 92, 255, 0.4); }
.ob-venue.on i { background: var(--accent); border-color: var(--accent); color: #fff; }
.ob-venue:active { transform: scale(0.98); }

/* ---------- Nightlife DNA reveal ---------- */
.ob-dna-step .ob-step { justify-content: center; }
.ob-dna { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ob-dna-orb { position: relative; width: 150px; height: 150px; display: grid; place-items: center; transition: transform 0.6s ease, width 0.6s, height 0.6s; }
.ob-dna-orb i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(185, 139, 255, 0.5); animation: ob-ring 1.8s ease-out infinite; }
.ob-dna-orb i:nth-child(2) { animation-delay: 0.6s; }
.ob-dna-orb i:nth-child(3) { animation-delay: 1.2s; }
@keyframes ob-ring { from { transform: scale(0.45); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.ob-dna-orb span { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #c9a4ff, var(--accent) 70%); color: #fff; box-shadow: 0 0 40px var(--glow); }
.ob-dna-orb span svg { width: 32px; height: 32px; }
.ob-dna-reading { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.ob-dna-result { display: none; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.ob-dna.revealed .ob-dna-orb { width: 96px; height: 96px; }
.ob-dna.revealed .ob-dna-orb i { animation: none; opacity: 0; }
.ob-dna.revealed .ob-dna-orb span { width: 64px; height: 64px; }
.ob-dna.revealed .ob-dna-reading { display: none; }
.ob-dna.revealed .ob-dna-result { display: flex; animation: ob-in 0.5s ease; }
.ob-dna-title { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 7vw, 28px); font-weight: 800; text-transform: uppercase; line-height: 1.1; text-shadow: 0 0 26px rgba(157, 92, 255, 0.6); }
.ob-dna-line { margin: 0; font-size: 14px; color: #d9d5e3; }
.ob-dna-bars { list-style: none; margin: 4px 0; padding: 16px; width: 100%; display: flex; flex-direction: column; gap: 12px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(185, 139, 255, 0.35); }
.ob-dna-bars li { display: grid; grid-template-columns: 96px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #d9d5e3; text-align: left; }
.ob-dna-bars i { height: 6px; border-radius: 3px; background: #2a2440; overflow: hidden; }
.ob-dna-bars b { display: block; height: 100%; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, var(--accent), #d2b6ff); animation: ob-bar 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d); }
@keyframes ob-bar { from { width: 0; } }
.ob-dna-bars em { font-style: normal; font-weight: 800; color: var(--fg); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Crossed Paths explanation ---------- */
.ob-paths { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 16px; border-radius: 24px; background: radial-gradient(80% 60% at 50% 50%, rgba(157, 92, 255, 0.18), transparent 70%), var(--surface); border: 1px solid rgba(185, 139, 255, 0.3); }
.ob-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ob-node b { font-size: 14px; font-weight: 800; }
.ob-node em { font-style: normal; font-size: 12px; color: var(--muted); }
.ob-node-av, .ob-node-av > * { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.ob-node-av { border: 2px solid var(--accent-light); box-shadow: 0 0 18px var(--glow); overflow: hidden; display: grid; }
.ob-node-av .ob-initial { font-size: 22px; }
.ob-node-pin { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent-light); box-shadow: 0 0 22px rgba(157, 92, 255, 0.5); }
.ob-node-pin svg { width: 22px; height: 22px; }
.ob-line { position: relative; width: 2px; height: 30px; background: repeating-linear-gradient(to bottom, rgba(185, 139, 255, 0.6) 0 4px, transparent 4px 8px); }
.ob-line i { position: absolute; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px var(--accent); animation: ob-travel 1.6s ease-in-out infinite; }
@keyframes ob-travel { from { top: -4px; opacity: 0; } 30% { opacity: 1; } to { top: 26px; opacity: 0; } }
.ob-paths-caption { margin: 10px 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--accent-light); }
.ob-paths-caption svg { width: 18px; height: 18px; }
.ob-privacy { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #d9d5e3; }
.ob-privacy svg { flex: none; width: 16px; height: 16px; color: var(--accent-light); }

/* ---------- Location ---------- */
.ob-uses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ob-uses li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ob-uses li > span { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #1c1828; color: var(--accent-light); }
.ob-uses li > span svg { width: 19px; height: 19px; }
.ob-uses b { display: block; font-size: 15px; font-weight: 800; }
.ob-uses em { font-style: normal; font-size: 13px; color: var(--muted); }
.ob-control { padding: 16px; border-radius: 20px; background: linear-gradient(135deg, #17122a, #100d18); border: 1px solid rgba(185, 139, 255, 0.35); }
.ob-control p:last-child { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #d9d5e3; }

/* ---------- Safety + notifications ---------- */
.ob-learn { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; }
.ob-learn svg { width: 14px; height: 14px; }
.ob-notifs { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.ob-notif {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 18px;
  background: rgba(28, 24, 40, 0.9); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: ob-in 0.45s ease both; animation-delay: var(--d);
}
.ob-notif p { margin: 0; font-size: 14px; font-weight: 600; }
.ob-notif em { font-style: normal; font-size: 11px; color: var(--muted); }
.ob-notif-app { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: #0b0911; border: 1px solid rgba(185, 139, 255, 0.4); }
.ob-mini-mark { font-size: 5px !important; letter-spacing: 0.18em; }

@media (max-width: 350px) {
  .ob-energy-card { min-height: 120px; padding: 14px; }
  .ob-chip { padding: 0 15px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-glow i, .ob-dna-orb i, .ob-line i, .ob-step, .ob-notif, .ob-dna-bars b { animation: none; }
}

/* venue cards: a nightlife gradient shows until (or instead of) the video frame */
.ob-venue { background: radial-gradient(80% 60% at 30% 25%, #9d5cff, #2a1450 70%, #0d0a14); }
.ob-venue.lvl-trending { background: radial-gradient(80% 60% at 30% 25%, #ff2e9a, #5b1bb0 70%, #0d0a14); }
.ob-venue.lvl-high { background: radial-gradient(80% 60% at 30% 25%, #3d8bff, #3a1b8a 70%, #0d0a14); }
.ob-venue.lvl-low { background: radial-gradient(80% 60% at 30% 25%, #6a4fa8, #1d1530 70%, #0d0a14); }
.ob-notif-app { color: var(--accent-light); background: rgba(157, 92, 255, 0.16); }
.ob-notif-app svg { width: 17px; height: 17px; }
.ob-link::before { inset: -13px -8px; }
