@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Pacifico&display=swap');

:root {
  /* Pepper & Peach — white background, navy (logo) chrome everywhere, amber
     (logo) reserved for "this option is selected" states only. */
  --logo-navy: #09183b;        /* dark navy sampled from the logo mark */
  --logo-amber: #fea419;       /* amber sampled from the logo mark — selected/active states only */
  --logo-amber-soft: rgba(254, 164, 25, .18); /* amber tint — "not yet fulfilled" bar tracks */
  --bg: #ffffff;              /* white */
  --bg-soft: #f4f4f4;
  --text: var(--logo-navy);   /* was a warm dark brown */
  --muted: var(--logo-navy);  /* was a muted tan */
  --accent: var(--logo-navy); /* was Pepper & Peach red — now navy everywhere */
  --accent-dark: var(--logo-navy); /* was a darker red */
  --accent-soft: #fdeae6;     /* chip / tint background */
  --accent-border: #e5e7eb;   /* light gray — was a pink border, then navy */
  --gold: var(--logo-navy);   /* was a gold accent */
  --on-accent: #ffffff;       /* white text/icons on navy surfaces */
  --super: #5b5fe0;           /* blue star */
  --like: var(--logo-navy);   /* was red */
  --pass: #b9b2ab;
  --card: #ffffff;
  --line: #e5e7eb;            /* light gray — was a cream-toned line, then navy */
  --shadow: 0 10px 30px rgba(120, 80, 20, 0.10);
  --shadow-card: 0 18px 50px rgba(120, 80, 20, 0.18);
  /* Soft elevation used in place of card borders (borderless card look). */
  --card-soft: 0 2px 14px rgba(9, 24, 59, 0.07);
  --radius: 22px;
  /* Telegram Bot API 8.0+ fullscreen: --tg-safe-area-inset-top is the device status bar,
     --tg-content-safe-area-inset-top is Telegram's own "X Close" / "⌄ ⋮" header pill.
     Both are 0/undefined outside Telegram fullscreen, so this is a no-op there. */
  --top-inset: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; width: 100%; overflow: hidden; }
/* Media never overflows its container on any screen. */
img, canvas, svg, video { max-width: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overscroll-behavior: none;
  /* Fallback first, then Telegram's live height / dynamic vh (iOS Safari 15.4+). */
  height: 100vh;
  height: var(--tg-viewport-stable-height, 100dvh);
}
#app {
  max-width: 480px; width: 100%; margin: 0 auto; display: flex; flex-direction: column;
  background: var(--bg); overflow: hidden;
  height: 100vh;                                   /* legacy fallback */
  height: var(--tg-viewport-stable-height, 100dvh);
  /* Respect notches / Dynamic Island / home indicator on iPhone X–17, etc.,
     plus Telegram's own fullscreen header controls (see --top-inset). */
  padding-top: var(--top-inset);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
#screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; padding: 18px 18px 8px; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 700; margin: 0 0 12px; letter-spacing: -.2px; }
h1 { font-size: 32px; line-height: 1.15; }
.muted { color: var(--muted); }
small.muted { font-size: 12px; }

/* App header (Telegram-style) */
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 14px; }
.app-header h2 { font-size: 26px; margin: 0; }
.app-header-logo { height: 32px; width: auto; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg);
  display: grid; place-items: center; color: var(--text); flex: none; }
.icon-btn svg { display: block; }

/* Pepper & Peach brand / logo */
.brand { text-align: center; padding: 6px 0 2px; }
.brand .brand-img { width: 88px; max-width: 26%; height: auto; }
.brand .emojis { font-size: 42px; line-height: 1; }

/* Boot / loading scene — the motion logo plays while boot() authenticates. */
.loading-scene { height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.loading-scene video { width: 55%; max-width: 220px; height: auto; }
.brand .brand-title { font-family: 'Pacifico', cursive; color: var(--accent); font-size: 38px;
  font-weight: 400; margin: 6px 0 2px;
  text-shadow: 1.5px 1.5px 0 #fff, 2px 2px 0 var(--gold); }
.brand .tag { color: var(--gold); font-weight: 700; letter-spacing: 2px; font-size: 12px; text-transform: uppercase; }

/* Buttons */
.btn { width: 100%; padding: 16px; border: none; border-radius: 30px; font-size: 16px;
  font-weight: 600; color: var(--on-accent); background: var(--accent); margin-top: 10px; box-shadow: 0 8px 20px rgba(9,24,59,.35); }
.btn:active { transform: scale(.99); }
.btn.secondary { background: var(--bg-soft); color: var(--text); box-shadow: none; }
.btn.danger { color: #d92d20; }
.btn.ghost { background: transparent; color: var(--accent-dark); box-shadow: none; }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.small { width: auto; padding: 9px 18px; font-size: 14px; border-radius: 22px; box-shadow: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* Inputs */
label { display: block; font-size: 13px; color: var(--muted); margin: 16px 0 7px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: #ffffff; color: var(--text); font-size: 15px; font-family: inherit;
}
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2309183b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 13px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
input[type=range] { accent-color: var(--accent); padding: 0; border: none; }

/* Dual-thumb range (age): two overlapping inputs; only the thumbs are interactive. */
.range-dual { position: relative; height: 34px; margin: 6px 0 2px; }
.range-dual .range-track, .range-dual .range-fill {
  position: absolute; top: 50%; transform: translateY(-50%); height: 5px; border-radius: 4px; }
.range-dual .range-track { left: 0; right: 0; background: var(--line); }
.range-dual .range-fill { background: var(--accent); }
.range-dual input[type=range] {
  position: absolute; top: 0; left: 0; width: 100%; height: 34px; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range-dual input[type=range]::-webkit-slider-runnable-track { background: transparent; border: none; }
.range-dual input[type=range]::-moz-range-track { background: transparent; border: none; }
.range-dual input[type=range]::-webkit-slider-thumb {
  pointer-events: auto; -webkit-appearance: none; appearance: none; margin-top: 0;
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--accent);
  box-shadow: var(--shadow); cursor: pointer; }
.range-dual input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 2px solid var(--accent); box-shadow: var(--shadow); cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }

/* Emoji pill chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 11px 18px; border-radius: 26px;
  background: var(--bg); border: 1.5px solid var(--accent-border); color: var(--accent-dark);
  font-size: 14px; font-weight: 500; }
.chip.active { background: #fff; border-color: var(--logo-navy); color: var(--accent-dark); }
.chip .em { font-size: 16px; }

/* Search bar (interests picker) */
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--bg-soft);
  border-radius: 26px; padding: 4px 16px; margin-top: 6px; }
.search-bar .ico { color: var(--muted); font-size: 15px; }
.search-bar input { border: none; background: transparent; padding: 11px 0; flex: 1; }
.search-bar input:focus { outline: none; }
.search-bar + .chips { margin-top: 14px; }
.section-label { font-size: 16px; color: var(--text); font-weight: 700; margin: 20px 0 10px; }

/* Onboarding wizard */
.progress { height: 5px; background: var(--logo-amber-soft); border-radius: 3px; margin: 6px 0 24px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--logo-navy); transition: width .3s; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 6px; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; margin-bottom: calc(24px + env(safe-area-inset-bottom)); }
/* Split birth-date fields (dd / mm / yyyy) */
.dob-row { display: flex; gap: 10px; }
.dob-row select { flex: 1; min-width: 0; }
.fab-next { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--text); color: #fff;
  font-size: 22px; display: grid; place-items: center; flex: none; }
.fab-next.accent { background: var(--accent); color: var(--on-accent); }

/* Onboarding-only component restyle (monochrome: black/white/gray, gold for
   the selected-row accent) — scoped so it never touches the same classes
   used on Discover cards, Premium, or the Profile tab. */
#screen > .progress > span { background: var(--text); }
#wiz .chip { background: #fff; border-color: var(--text); color: var(--text); }
#wiz .chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.wiz-foot .btn.ghost { color: var(--text); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-radius: 30px; background: var(--bg-soft);
  border: 1.5px solid transparent; margin-bottom: 10px; cursor: pointer; }
.opt-row span:first-child { font-size: 15px; color: var(--text); }
.opt-row.active { background: #fff; border-color: var(--gold); }
.opt-check { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line);
  display: grid; place-items: center; flex: none; font-size: 13px; color: #fff; }
.opt-row.active .opt-check { background: var(--text); border-color: var(--text); }

/* Location permission screen */
.perm-ring { width: 170px; height: 170px; border-radius: 50%; border: 1.5px solid var(--line);
  margin: 40px auto; display: grid; place-items: center; color: var(--accent-dark); }

/* Swipe deck */
.deck { position: relative; margin-top: 4px;
  height: calc(100vh - 250px);
  height: calc(var(--tg-viewport-stable-height, 100dvh) - 250px - var(--top-inset) - env(safe-area-inset-bottom)); }
.card {
  position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-card); user-select: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center;
}
.card .overlay { background: linear-gradient(transparent, rgba(0,0,0,.65) 78%); padding: 20px 18px 22px; color: #fff; }
.card h2 { color: #fff; font-size: 27px; margin: 0; }
.card .loc { display: flex; align-items: center; gap: 5px; font-size: 14px; opacity: .92; margin: 6px 0 12px; }
.card .verified { color: #fff; background: var(--super); font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 8px; vertical-align: middle; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.35); color: #fff;
  padding: 8px 14px; border-radius: 22px; font-size: 13px; font-weight: 500; margin: 0 6px 6px 0; }
.card-meta { font-size: 13px; opacity: .95; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.card-bio { font-size: 14px; line-height: 1.35; margin: 8px 0 10px; opacity: .95;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reasons { font-size: 12px; color: #ffe3d9; margin-top: 8px; }
.stamp { position: absolute; top: 30px; font-size: 30px; font-weight: 800; padding: 6px 16px;
  border: 4px solid; border-radius: 12px; opacity: 0; transition: opacity .08s; font-family: 'Poppins'; }
.stamp.like { left: 22px; color: var(--like); border-color: var(--like); transform: rotate(-14deg); }
.stamp.nope { right: 22px; color: #ff5a5a; border-color: #ff5a5a; transform: rotate(14deg); }
.tap-hint { position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,.35); color:#fff;
  font-size: 11px; padding: 5px 11px; border-radius: 16px; }

/* Floating super-like + action buttons */
.super-fab { position: absolute; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%;
  border: none; background: var(--super); color: #fff; font-size: 24px; display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(91,95,224,.4); z-index: 3; }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 18px; }
/* Uniform action buttons — same size & style, distinguished only by icon colour. */
.round { width: 62px; height: 62px; font-size: 25px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  background: #fff; box-shadow: var(--shadow); }
.round.pass { color: var(--text); }
.round.super { color: var(--text); }
.round.rewind { color: var(--muted); }
/* Like = the primary action: bigger, filled amber, subtle pulse to invite the tap. */
.round.like { width: 70px; height: 70px; border: none; color: #fff;
  background: var(--logo-amber); box-shadow: 0 8px 22px rgba(254, 164, 25, .5);
  animation: like-pulse 2.4s ease-in-out infinite; transition: transform .12s ease; }
.round.like:hover { animation-play-state: paused; transform: scale(1.06); }
.round.like:active { animation: none; transform: scale(.9); }
@keyframes like-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 22px rgba(254, 164, 25, .5); }
  50% { transform: scale(1.07); box-shadow: 0 12px 30px rgba(254, 164, 25, .68); }
}
@media (prefers-reduced-motion: reduce) { .round.like { animation: none; } }

/* Profile-first discover: actions sit at the natural END of the profile, so
   the user scrolls through the whole profile before reaching them. */
.suggestion { padding-bottom: 4px; position: relative; will-change: transform; }
.suggestion .stamp { z-index: 6; pointer-events: none; }
.suggest-actions { display: flex; justify-content: center; align-items: center; gap: 16px;
  margin-top: 18px; padding: 16px 0 calc(14px + env(safe-area-inset-bottom)); }
.reasons-list { font-size: 14px; color: var(--accent-dark); line-height: 1.4; }

/* Detail (expanded profile) */
.detail-hero { height: 320px; border-radius: var(--radius); background-size: cover; background-position: center;
  position: relative; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.detail-hero .overlay { background: linear-gradient(transparent, rgba(0,0,0,.6)); width: 100%; padding: 18px; border-radius: 0 0 var(--radius) var(--radius); color:#fff; }

/* Photo carousel — classic dating-app hero: full-bleed, edge-to-edge horizontally
   (negative margins cancel #screen's 18px padding). When rendered with no header
   above it (.profile-view.flush-hero, i.e. viewProfile) the negative top margin also
   collapses through the unpadded .profile-view/.suggestion ancestors up to #screen's
   own padding-top, so the photo starts flush at --top-inset. Discover's suggestion
   keeps its app-header above, so flush-hero is NOT applied there — only the
   horizontal bleed is (margin-top stays 0, sitting normally below the header). */
.photo-carousel { position: relative; overflow: hidden; margin: 0 -18px; }
.profile-view.flush-hero .photo-carousel { margin-top: -18px; }
.photo-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x; }
.photo-track::-webkit-scrollbar { display: none; }
/* Fill the hero edge-to-edge (cover), no letterboxing. Uploads are cropped 3:4 by
   our cropper so this is a no-op crop for them; odd-ratio Telegram prefill photos
   get a mild center crop instead of empty space around them. */
.photo-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 4; height: auto;
  background-size: cover; background-position: center; background-repeat: no-repeat; cursor: pointer;
  background-color: var(--bg-soft); }
.carousel-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }
/* Hero name — big and bold, sits right above the job line. */
.carousel-overlay .hero-name { color: #fff; font-size: 27px; font-weight: 800; margin: 0;
  letter-spacing: -.3px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
/* Job shown right under the name; location comes last. Brand amber with a dark
   shadow so it stays legible over any photo / the dark gradient. */
.carousel-overlay .hero-job { margin-top: 4px; font-family: 'Poppins'; font-weight: 600;
  font-size: 14px; color: var(--logo-amber); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.carousel-overlay .loc { display: flex; align-items: center; gap: 5px; font-size: 14px;
  color: #fff; opacity: .9; margin-top: 4px; }
.carousel-dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 5px; z-index: 2; }
.carousel-dots .cdot { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4); transition: background .2s; }
.carousel-dots .cdot.active { background: #fff; }
/* Floating back button over the hero photo (viewProfile only — Discover keeps its
   own app-header). Child of .photo-carousel so top/left are relative to the photo
   itself, which already starts at --top-inset when .flush-hero is applied. */
.vp-back-float { position: absolute; top: 10px; left: 14px; z-index: 5; width: 38px; height: 38px;
  border-radius: 50%; border: 1.5px solid var(--line); background: rgba(255,255,255,.92); color: var(--text);
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.vp-back-float svg { display: block; }

.section-card { background: var(--card); box-shadow: var(--card-soft); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
/* A user's profile as seen by other users — no borders between sections. */
.profile-view .section-card { border: none; }
.section-card h4 { font-family: 'Poppins'; text-transform: uppercase; letter-spacing: .5px; font-size: 12px;
  color: var(--accent-dark); margin: 0 0 12px; font-weight: 600; }
.life-row { margin-bottom: 12px; }
.life-row:last-child { margin-bottom: 0; }
.life-row .k { font-size: 12px; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.life-row .v { font-size: 16px; color: var(--text); margin-top: 2px; }

/* Lists (chats / liked you) */
.row { display: flex; align-items: center; gap: 13px; padding: 12px; background: var(--card);
  box-shadow: var(--card-soft); border-radius: 18px; margin-bottom: 11px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); flex: none; }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { font-weight: 600; }
.row .grow p { margin: 2px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.blur { filter: blur(8px); }

/* Chats tab */
.chats-title { font-size: 26px; margin: 6px 4px 14px; }
.chat-list .chat-item, .older-list .chat-item {
  align-items: flex-start; gap: 13px; padding: 14px 4px;
  background: transparent; border: none; border-radius: 0; margin-bottom: 0; box-shadow: none;
  border-bottom: 1.5px solid var(--line); cursor: pointer;
}
.chat-list .chat-item:last-child, .older-list .chat-item:last-child { border-bottom: none; }
.ci-name { display: block; font-weight: 600; }
.ci-preview { margin: 3px 0 0; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-preview.unread { font-weight: 700; color: var(--text); }
.ci-time-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ci-time { color: var(--logo-amber); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chat-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--logo-amber); align-self: flex-end; }
.older-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; font-weight: 700; cursor: pointer; border-bottom: 1.5px solid var(--line); margin-bottom: 2px; }
.older-chevron { display: inline-block; transition: transform .15s ease; color: var(--muted); }
.older-head.collapsed .older-chevron { transform: rotate(-90deg); }
.older-list.collapsed { display: none; }

/* Chat */
.chat { display: flex; flex-direction: column;
  height: calc(100vh - 36px);
  height: calc(var(--tg-viewport-stable-height, 100dvh) - 36px - var(--top-inset) - env(safe-area-inset-bottom)); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 12px; border-bottom: 1.5px solid var(--line); }
.chat-head b { font-family: 'Poppins'; font-size: 18px; }
.chat-head-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.chat-head-user b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); flex: none; }
.chat-head .btn.small { padding: 9px 12px; }
.messages { flex: 1; overflow-y: auto; padding: 14px 2px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 76%; padding: 11px 15px; border-radius: 20px; font-size: 15px; word-wrap: break-word; line-height: 1.35; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: var(--bg-soft); color: var(--text); border-bottom-left-radius: 6px; }
.msg .meta { font-size: 10px; opacity: .7; margin-top: 4px; text-align: right; }
.composer { display: flex; gap: 10px; padding: 10px 0 4px; position: relative; }
.composer input { flex: 1; border-radius: 26px; }
.composer button { width: 50px; flex: none; border-radius: 50%; border: none; font-size: 18px; background: var(--accent); color: var(--on-accent); }
.composer .emoji-btn { background: var(--bg-soft); color: inherit; font-size: 20px; padding: 0; cursor: pointer; }
.emoji-panel { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; z-index: 20;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  max-height: 210px; overflow-y: auto; box-shadow: 0 8px 28px rgba(0, 0, 0, .14); }
.emoji-panel.hidden { display: none; }
.emoji-panel .emoji-opt { width: auto; background: none; border: none; font-size: 22px; line-height: 1;
  padding: 5px 0; border-radius: 8px; cursor: pointer; color: inherit; }
.emoji-panel .emoji-opt:hover { background: var(--bg-soft); }
.typing { font-size: 12px; color: var(--muted); padding: 0 4px; height: 16px; }

/* Bottom tab bar */
.tabbar { display: flex; border-top: 1.5px solid var(--line); background: var(--bg); padding: 8px 4px max(8px, env(safe-area-inset-bottom)); }
.tab { flex: 1; background: none; border: none; color: var(--muted); padding: 4px 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; position: relative; }
.tab .ico { width: 28px; height: 28px; display: grid; place-items: center; transition: all .15s; }
.tab .ico svg { width: 24px; height: 24px; }
.tab.active { color: var(--logo-amber); }
.tab[data-tab="discovery"].active .ico { background: var(--logo-amber); color: var(--on-accent); border-radius: 50%; }
.tab .badge-dot { position: absolute; top: -1px; right: 50%; margin-right: -14px; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%; border: 2px solid var(--bg); }

/* Panels / plans */
.panel { background: var(--card); box-shadow: var(--card-soft); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.plan { background: var(--card); box-shadow: var(--card-soft); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.plan.featured { background: var(--accent-soft); }
.price { font-family: 'Poppins'; font-size: 28px; font-weight: 700; }
.flag-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1.5px solid var(--line); }
.flag-row:last-child { border-bottom: none; }
.flag-row select { width: auto; padding: 8px 30px 8px 12px; border-radius: 12px;
  background-position: right 10px center; background-size: 11px; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(40,30,25,.55); display: grid; place-items: center; z-index: 50; padding: 28px; }
.modal-card { background: var(--bg); border-radius: 26px; padding: 28px 22px; text-align: center; max-width: 340px; width: 100%; box-shadow: var(--shadow-card); }
.modal-card h1 { font-size: 34px; background: linear-gradient(120deg, var(--logo-navy), var(--logo-amber));
  -webkit-background-clip: text; background-clip: text; color: transparent; }

.center { text-align: center; padding: 50px 16px; color: var(--muted); line-height: 1.6; }
.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--text);
  color: #fff; padding: 12px 20px; border-radius: 24px; font-size: 14px; z-index: 100; max-width: 90%; box-shadow: var(--shadow); }
.completeness { font-size: 12px; color: var(--muted); margin-top: 4px; }
.meter { font-family: 'Poppins'; font-weight: 600; }

/* Events */
.event-card { background: var(--card); box-shadow: var(--card-soft); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.event-card .topic { display: inline-block; background: var(--accent-soft); color: var(--accent-dark);
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-bottom: 10px; }
.event-card h3 { font-size: 19px; margin: 0 0 8px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.loc-blur { filter: blur(4px); user-select: none; }
.event-meta span { display: inline-flex; align-items: center; gap: 5px; }
.event-host { display: flex; align-items: center; gap: 10px; padding-top: 12px; margin-top: 4px; }
.event-host .avatar { width: 40px; height: 40px; }
.event-host .grow { flex: 1; min-width: 0; }
.cap-bar { height: 7px; background: var(--logo-amber-soft); border-radius: 4px; overflow: hidden; margin: 6px 0 2px; }
.cap-bar > span { display: block; height: 100%; background: var(--accent); }

/* Event detail — 3-cell meta cards (date/time/city, venue/private/spots) */
.meta-card { display: flex; background: var(--card); box-shadow: var(--card-soft);
  border-radius: var(--radius); margin-top: 14px; overflow: hidden; }
.meta-cell { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 15px 6px; font-size: 12.5px; font-weight: 500; color: var(--text);
  text-align: center; line-height: 1.3; }
.meta-cell svg { flex: none; color: var(--accent-dark); }
.meta-cell:not(:first-child) { border-left: none; }
.meta-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Venue address on its own full-width row so the whole address shows (wraps
   instead of truncating inside a narrow meta-cell). */
.address-box { display: flex; align-items: flex-start; gap: 8px;
  background: var(--card); box-shadow: var(--card-soft); border-radius: var(--radius);
  margin-top: 14px; padding: 15px 16px; font-size: 14px; font-weight: 500;
  color: var(--text); line-height: 1.4; }
.address-box > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stack-avatars { display: flex; }
.stack-avatars img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); margin-left: -10px; }
.stack-avatars img:first-child { margin-left: 0; }
.status-tag { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 16px; }
.status-tag.pending { background: #fff3e0; color: #c97a00; }
.status-tag.approved { background: #e7f7ed; color: #1f9d55; }
.status-tag.rejected { background: #fdecec; color: #d14343; }
.status-tag.expired { background: var(--bg-soft); color: var(--muted); }
.seg { display: flex; gap: 8px; background: var(--bg-soft); padding: 5px; border-radius: 16px; margin-bottom: 16px; }
.seg button { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 12px; font-weight: 600; color: var(--muted); font-family: inherit; }
.seg button.active { background: var(--bg); color: var(--logo-amber); box-shadow: var(--shadow); }

/* Image cropper */
.modal-card.cropper { max-width: min(92vw, 380px); }
.crop-frame { position: relative; overflow: hidden; border-radius: 16px; margin: 0 auto;
  background: #000; touch-action: none; cursor: grab; max-width: 100%; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; max-width: none; max-height: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
input[type=range]#crop-zoom { width: 100%; }

/* Multi-photo dark cropper */
.modal.cropper-modal { padding: 0; background: #000; }
.modal-card.cropper.dark { background: #0b0b0c; max-width: 480px; width: 100%; height: 100%;
  border-radius: 0; display: flex; flex-direction: column; align-items: center; box-shadow: none;
  padding: calc(14px + var(--top-inset)) 16px calc(20px + env(safe-area-inset-bottom)); }
.crop-topbar { width: 100%; display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; }
.crop-x { background: none; border: none; color: var(--gold); font-size: 18px; width: 34px; height: 34px;
  display: grid; place-items: center; }
.crop-title { color: var(--gold); font-weight: 600; font-size: 16px; font-family: 'Poppins', sans-serif; }
.cropper.dark .crop-frame { border-radius: 22px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.crop-grid { position: absolute; inset: 0; pointer-events: none; }
.crop-grid i { position: absolute; background: rgba(255,255,255,.5); font-style: normal; }
.crop-grid i:nth-child(1) { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.crop-grid i:nth-child(2) { left: 66.666%; top: 0; bottom: 0; width: 1px; }
.crop-grid i:nth-child(3) { top: 33.333%; left: 0; right: 0; height: 1px; }
.crop-grid i:nth-child(4) { top: 66.666%; left: 0; right: 0; height: 1px; }
.crop-remove { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; display: grid; place-items: center; }
.crop-thumbs { display: flex; gap: 10px; overflow-x: auto; width: 100%; margin-top: 18px; padding-bottom: 4px; }
.crop-thumbs::-webkit-scrollbar { display: none; }
.crop-thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 14px;
  background-size: cover; background-position: center; opacity: .55; border: 2px solid transparent; }
.crop-thumb.active { opacity: 1; border-color: #fff; }
.crop-check { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); color: #1c1c1e; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; }
.crop-thumb.active .crop-check { opacity: 1; transform: scale(1); }
.upload-btn { background: #fff; color: #111; margin-top: auto; box-shadow: none; }

/* Bitcoin payments */
.btc-banner { background: #f7931a; color: #fff; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 14px; margin: 0 0 14px; text-align: center; box-shadow: 0 6px 16px rgba(247,147,26,.3); }
.qr-wrap { display: inline-block; padding: 12px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 18px; margin-top: 12px; box-shadow: var(--shadow); }
.qr-wrap img { display: block; border-radius: 8px; }

/* Upload tile (gallery picker) */
.upload-tile { height: 180px; border-radius: 16px; border: 1.5px dashed var(--accent-border);
  background: var(--accent-soft); background-size: cover; background-position: center;
  display: grid; place-items: center; color: var(--accent-dark); font-weight: 600;
  cursor: pointer; margin-top: 4px; }
.upload-tile.has-image { border-style: solid; border-color: var(--line); }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.photo-grid .ph { position: relative; aspect-ratio: 3/4; border-radius: 16px; background-size: cover;
  background-position: center; background-color: var(--bg-soft); }
.photo-grid .ph button { border: none; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 3px 8px; }
.photo-grid .add { border: 1.5px dashed var(--accent-border); display: grid; place-items: center;
  justify-content: center; padding: 0; font-size: 30px; color: var(--accent-dark); }
/* Tile controls: delete ✕ (top-right) + make-primary ★ (bottom-left) are hidden
   until Photos "Edit" is toggled on (.photo-grid.editing). The ★ badge on the
   primary photo is always shown. */
.photo-grid .ph .ph-del, .photo-grid .ph .ph-pri { position: absolute; display: none; }
.photo-grid .ph .ph-del { top: 6px; right: 6px; }
.photo-grid .ph .ph-pri { bottom: 6px; left: 6px; }
.photo-grid.editing .ph .ph-del, .photo-grid.editing .ph .ph-pri { display: block; }
.photo-grid .ph .ph-badge { position: absolute; top: 6px; left: 6px; background: var(--logo-amber);
  color: var(--logo-navy); border-radius: 10px; font-size: 12px; font-weight: 700; padding: 2px 7px; }

/* Profile tab — header actions, summary card, card heads, about rows */
.header-actions { display: flex; align-items: center; gap: 10px; }
.profile-summary { display: flex; align-items: center; gap: 14px;
  border: none; background: none; padding: 4px 2px; box-shadow: none; }
.profile-summary .avatar { width: 72px; height: 72px; }
.ps-main { flex: 1; min-width: 0; }
.ps-name { font-size: 20px; font-weight: 700; display: block; line-height: 1.2; }
.ps-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--logo-amber);
  color: var(--logo-navy); font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 14px; margin-top: 7px; }
.ps-bar { margin: 9px 0 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head b { font-size: 16px; }
.link-btn { background: none; border: none; color: var(--accent-dark); font-weight: 600;
  font-size: 14px; font-family: inherit; padding: 4px; }
.ic-counter { color: var(--muted); font-size: 13px; font-weight: 600; }
.about-list { margin-top: 6px; }
.about-item { border-bottom: 1.5px solid var(--line); }
.about-item:last-child { border-bottom: none; }
.about-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; cursor: pointer; }
.about-row .ar-k { font-size: 14px; color: var(--muted); flex: none; min-width: 90px; }
.about-row .ar-v { flex: 1; min-width: 0; font-size: 15px; color: var(--text); font-weight: 500;
  text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.about-row .ar-chev { color: var(--muted); font-size: 18px; flex: none; transition: transform 0.15s ease; }
.about-item.open .ar-chev { transform: rotate(90deg); }
.ar-edit { display: none; padding: 0 2px 16px; }
.about-item.open .ar-edit { display: block; }
.ar-edit input, .ar-edit textarea, .ar-edit select { margin: 0 0 10px; }
.ar-edit textarea { min-height: 70px; }
.ar-edit .dob-row { margin-bottom: 10px; }
.ar-edit .btn.small { display: block; margin-left: auto; }
/* Location editor: primary GPS button + a de-emphasised text link to hide,
   both left-aligned. */
.ar-loc-edit { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ar-loc-edit .btn.small { margin: 0; }
.loc-hide-link { background: none; border: none; padding: 2px 0; color: var(--muted);
  opacity: .55; font-size: 13px; text-decoration: underline; cursor: pointer; }
.loc-hide-link:active { opacity: .8; }

/* Warm-up question (icebreaker) — shared prompt + tap control ------------ */
.icebreaker-prompt { max-width: 88%; margin: 4px auto 16px; padding: 14px 16px; text-align: center;
  background: var(--logo-amber-soft); border: 1.5px solid var(--logo-amber); border-radius: 16px; color: var(--logo-navy); }
.icebreaker-prompt .ib-tag { font-size: 12px; font-weight: 600; color: var(--logo-amber); letter-spacing: .3px; }
.icebreaker-prompt .ib-q { font-size: 16px; font-weight: 700; margin: 6px 0; line-height: 1.35; }
.icebreaker-prompt .ib-hint { font-size: 12px; color: var(--muted); opacity: .8; }
.icebreaker-btn { display: block; width: calc(100% - 24px); margin: 0 12px 8px; padding: 12px 14px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--logo-navy);
  background: var(--bg); border: 1.5px solid var(--logo-amber); border-radius: 14px; cursor: pointer; }
.icebreaker-btn:active { background: var(--logo-amber-soft); }
.icebreaker-btn:disabled { opacity: .6; cursor: default; }
