/* Beni — Telegram Mini App / APK shared UI
   Dark theme = flat black + hot-pink (#FF2D7A). Flat fills only. */
:root,
[data-theme="dark"] {
  /* Core flat palette */
  --bg: #000000;
  --surface: #1A1A1A;
  --surface-2: #141414;
  --surface-3: #262626;
  --accent: #FF2D7A;
  --accent-press: #E0196A;
  --accent-soft: rgba(255, 45, 122, 0.16);
  --text: #FFFFFF;
  --hint: #8E8E93;
  --line: rgba(255, 255, 255, 0.08);

  /* Legacy aliases used throughout the sheet */
  --bg-elev: var(--surface-2);
  --bg-card: var(--surface);
  --brand: var(--accent);
  --brand-soft: var(--accent-soft);
  --brand-deep: var(--accent-press);
  --gold: #FFB800;
  --gold-soft: rgba(255, 184, 0, 0.18);
  --like: var(--accent);
  --pass: #1F1F1F;
  --super: #2F6BFF;
  --online: #22C55E;
  --danger: #FF4D6A;
  --on-accent: #FFFFFF; /* text/icons on --accent fills (added 2026-10-09, C6) */
  --tabbar: #0A0A0A;
  --shadow: none;

  --radius: 20px;
  --radius-sm: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabs-h: 68px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Light theme kept for the toggle only (flat, same pink accent). */
[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F4F4F6;
  --surface-2: #FFFFFF;
  --surface-3: #EAEAEE;
  --text: #111114;
  --hint: #6B6B75;
  --line: rgba(17, 17, 20, 0.08);
  --pass: #EDEDF0;
  --tabbar: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Splash — solid black */
.splash { background: var(--bg); }
.splash-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: fadeIn 0.8s ease;
}
.splash-content {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 48px 24px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  text-align: center;
}
.splash-content .brand-mark { margin: auto 0 4px; display: flex; justify-content: center; }
.splash-line {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--hint);
  margin-bottom: auto;
}
.splash-foot { font-size: 0.78rem; text-align: center; color: var(--hint); }

/* Splash logo: theme-matched wordmark */
.splash .beni-logo__img--dark { display: none !important; }
.splash .beni-logo__img--light { display: none !important; }
[data-theme="dark"] .splash .beni-logo__img--dark { display: block !important; }
[data-theme="light"] .splash .beni-logo__img--light { display: block !important; }
.brand-mark { margin-bottom: 8px; }

/* Official Beni logo — PNG swap on data-theme: white wordmark (dark) / black wordmark (light), red heart, no filter */
.beni-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  line-height: 0;
  position: relative;
}
.beni-logo__img {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  background: transparent;
  object-fit: contain;
}
.beni-logo__img--dark { display: none; }
.beni-logo__img--light { display: block; }
[data-theme="dark"] .beni-logo__img--dark { display: block; }
[data-theme="dark"] .beni-logo__img--light { display: none; }
[data-theme="light"] .beni-logo__img--light { display: block; }
[data-theme="light"] .beni-logo__img--dark { display: none; }

.beni-logo--sm .beni-logo__img { height: 30px; width: auto; }
.beni-logo--md .beni-logo__img { height: 50px; width: auto; }
.beni-logo--xl .beni-logo__img { height: 96px; width: auto; max-width: min(300px, 80vw); }

.brand-tag { display: none; }

/* Age gate */
#age-gate {
  background: var(--bg);
  align-items: center;
  padding: 24px;
}
.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.gate-card h1 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 16px 0 8px;
}
.gate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.error { color: var(--danger); margin-top: 14px; font-size: 0.9rem; }

#signup {
  background: var(--bg);
  align-items: center;
  padding: 16px;
  overflow: auto;
}
.signup-card {
  max-width: 420px;
  margin: 12px auto;
  max-height: calc(100vh - 32px);
  overflow: auto;
  text-align: left;
}
.signup-card h1 { text-align: center; }
.signup-card .muted { text-align: center; }
.signup-card .beni-logo { margin: 0 auto; }
.signup-card .profile-edit { margin-top: 12px; }
.legal-links {
  margin-top: 16px;
  font-size: 0.78rem;
}
.legal-links a { color: var(--hint); text-decoration: none; }
.legal-links a:hover { color: var(--accent); }

/* App shell */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tabs-h) + var(--safe-bottom));
  background: var(--bg);
}
.topbar {
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}
.icon-btn:active { transform: scale(0.96); }

/* Theme spill — flat solid circles wash across the screen (2s) */
.theme-spill {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background: transparent;
}
.theme-spill::before,
.theme-spill::after,
.theme-spill .wave-mid {
  content: "";
  position: absolute;
  left: var(--sx, 80%);
  top: var(--sy, 8%);
  width: 220vmax;
  height: 220vmax;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.02);
  pointer-events: none;
}
.theme-spill::before { background: var(--spill-a); }
.theme-spill .wave-mid { background: var(--spill-b); }
.theme-spill::after { background: var(--spill-c); }
.theme-spill.spilling { opacity: 1; }
.theme-spill.spilling::before {
  animation: spillGrow 2s cubic-bezier(0.22, 0.61, 0.2, 1) forwards;
}
.theme-spill.spilling .wave-mid {
  animation: spillGrow 2s cubic-bezier(0.2, 0.65, 0.22, 1) 0.15s forwards;
}
.theme-spill.spilling::after {
  animation: spillGrow 2s cubic-bezier(0.18, 0.7, 0.25, 1) 0.3s forwards;
}
.theme-spill.to-light {
  --spill-a: #FF2D7A;
  --spill-b: #F4F4F6;
  --spill-c: #FFFFFF;
}
.theme-spill.to-dark {
  --spill-a: #FF2D7A;
  --spill-b: #1A1A1A;
  --spill-c: #000000;
}
@keyframes spillGrow {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.02); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* Compact theme toggle — flat */
.toggle-cont {
  --primary: #FF2D7A;
  --light: #FFFFFF;
  --dark: #141414;
  --gray: #2A2A2A;
  position: relative;
  z-index: 10;
  width: fit-content;
  height: 28px;
  border-radius: 9999px;
  transform: scale(0.7);
  transform-origin: right center;
}
.toggle-cont .toggle-input { display: none; }
.toggle-cont .toggle-label {
  --gap: 3px;
  --width: 28px;
  cursor: pointer;
  position: relative;
  display: inline-block;
  padding: 0.2rem;
  width: calc((var(--width) + var(--gap)) * 2);
  height: 100%;
  background-color: var(--dark);
  border: 1px solid #333;
  border-radius: 9999px;
  box-sizing: content-box;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.toggle-label::before,
.toggle-label::after { content: none; }
.toggle-cont .toggle-label .cont-icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--width);
  height: 28px;
  background: var(--gray);
  border: none;
  border-radius: 9999px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  overflow: clip;
}
.cont-icon .sparkle { display: none; }
.cont-icon .icon {
  width: 0.72rem;
  fill: var(--light);
  position: relative;
  z-index: 1;
}
.toggle-cont:has(.toggle-input:checked) .toggle-label {
  background-color: #EAEAEE;
  border-color: #D0D0D6;
}
.toggle-cont:has(.toggle-input:checked) .cont-icon {
  background: var(--primary);
  transform: translateX(calc((var(--gap) * 2) + 100%)) rotate(-225deg);
}

.mode-row .pill {
  padding: 8px 14px;
  font-size: 0.78rem;
}

main#views {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px 20px;
  -webkit-overflow-scrolling: touch;
}
#discover-panel,
.match-grid { overflow: visible; }
.view { display: none; animation: fadeUp 0.28s ease; }
.view.active { display: block; }

.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
}
.heart-accent { color: var(--accent); font-size: 1.1rem; }
.text-btn {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.muted { color: var(--hint); font-size: 0.88rem; }
.status { margin-top: 12px; text-align: center; font-size: 0.85rem; }
.empty { text-align: center; padding: 48px 12px; }
.empty-icon { font-size: 2rem; color: var(--accent); margin-bottom: 8px; }
.tip { margin-top: 12px; }
.tip-inline { display: block; margin: 0 0 12px; }

/* Pills — segmented, solid pink when active */
.pill-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pill-row::-webkit-scrollbar { display: none; }
.pill {
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--line);
  font-family: var(--font);
}
.pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Discover card — flat rounded charcoal card (legacy fx layers hidden) */
.fx-card {
  --fx-pad: 0px;
  position: relative;
  width: 100%;
  max-width: 374px;
  margin: 6px auto 6px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: var(--radius);
  cursor: pointer;
  isolation: isolate;
  overflow: visible;
}
.fx-frame,
.fx-glow { display: none !important; }
.fx-fill {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  transition: transform 0.35s ease;
}
.fx-card.is-fx .fx-fill { animation: fxFillPulse 0.45s ease; }
@keyframes fxFillPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.985); }
  100% { transform: scale(1); }
}

.fx-card.fx-hold .card-reveal,
.fx-card.vanishing .card-reveal {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.15s ease;
}
.fx-card.fx-hold .card-actions,
.fx-card.vanishing .card-actions {
  opacity: 0.35;
  pointer-events: none;
}
.profile-card.fx-card {
  touch-action: manipulation;
  cursor: default;
}

.deck-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 16px auto 4px;
  max-width: 374px;
  padding: 10px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
  z-index: 20;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
}
.deck-hint {
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.6;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.deck-hint.left { color: var(--hint); }
.deck-hint.right { color: var(--accent); }
.deck-strip.decide-left .deck-slot.current { animation: iconToLeft 0.35s ease forwards; }
.deck-strip.decide-right .deck-slot.current { animation: iconToRight 0.35s ease forwards; }
@keyframes iconToLeft { to { transform: translateX(-48px) scale(0.85); opacity: 0.4; } }
@keyframes iconToRight { to { transform: translateX(48px) scale(0.85); opacity: 0.4; } }
.deck-strip.dragging {
  cursor: grabbing;
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Swipe stage */
.swipe-stage {
  position: relative;
  max-width: 374px;
  margin: 4px auto 0;
  min-height: 100px;
}
.swipe-stage .fx-card {
  transition: transform 0.12s ease, opacity 0.12s ease;
  max-width: 374px;
  margin-left: auto;
  margin-right: auto;
}
.swipe-stage .fx-card.swiping { transition: none; }
.swipe-stage .fx-card.merge-out-left {
  animation: mergeOutLeft 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.swipe-stage .fx-card.merge-out-right {
  animation: mergeOutRight 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes mergeOutLeft {
  0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  22% { transform: translate(-36px, 4px) rotate(-8deg) scale(1); opacity: 1; }
  48% { transform: translate(0, 0) rotate(0) scale(0.97); opacity: 0.95; }
  100% { transform: translate(0, 0) scale(0.9); opacity: 0; }
}
@keyframes mergeOutRight {
  0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  22% { transform: translate(36px, 4px) rotate(8deg) scale(1); opacity: 1; }
  48% { transform: translate(0, 0) rotate(0) scale(0.97); opacity: 0.95; }
  100% { transform: translate(0, 0) scale(0.9); opacity: 0; }
}
.swipe-stage .fx-card.merge-out-left .card-reveal,
.swipe-stage .fx-card.merge-out-right .card-reveal {
  opacity: 0;
  transition: opacity 0.2s ease 0.18s;
}
.swipe-stamp {
  position: absolute;
  top: 26%;
  z-index: 5;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border: 3px solid;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transform: rotate(-12deg);
}
.swipe-stamp.pass {
  left: 14px;
  color: #FFFFFF;
  border-color: #FFFFFF;
}
.swipe-stamp.like {
  right: 14px;
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(12deg);
}

/* Profile content reveal */
.card-reveal {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.fx-card.revealed .card-reveal,
.fx-card.revealing .card-reveal {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.fx-card.revealing .card-reveal { transition-delay: 0.2s; }

/* Deck slot visuals */
.deck-slot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: inherit;
  color: #fff;
  background: var(--surface-3);
  border: 2px solid transparent;
  position: relative;
  flex-shrink: 0;
  opacity: 0.45;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  user-select: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
}
[data-theme="light"] .deck-slot { color: var(--text); }
.deck-slot:disabled,
.deck-slot.empty {
  background: var(--pass);
  opacity: 0.25;
  color: transparent;
  pointer-events: none;
  cursor: default;
}
.deck-slot.past { opacity: 0.55; }
.deck-slot.past.liked { border-color: var(--accent); }
.deck-slot.past.passed { border-color: #555; }
.deck-slot.past::after {
  content: attr(data-mark);
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 0.55rem;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
}
.deck-slot.current {
  width: 44px;
  height: 44px;
  opacity: 1;
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 0 3px var(--accent-soft);
  cursor: grab;
}
.deck-slot.peek {
  opacity: 0.72;
  border-color: var(--line);
  background: var(--surface-2);
}
.deck-slot.peek:hover { opacity: 1; transform: scale(1.06); }
.deck-slot.past:hover { opacity: 1; border-color: var(--accent); }

.card-photo {
  position: relative;
  height: min(46vh, 380px);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-photo.has-photo { background: #111111; }
.card-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-photo .card-initial { position: relative; z-index: 1; }
.card-photo.has-photo .card-initial { display: none; }
.card-initial {
  font-family: var(--display);
  font-size: 4.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}
.badge.online {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  z-index: 2;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.badge.online::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
  margin-right: 6px;
  vertical-align: middle;
}
/* Flat translucent name plate (no fade) */
.card-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 16px;
  color: #fff;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.card-overlay h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
}
.card-overlay .meta { color: rgba(255, 255, 255, 0.85); font-size: 0.86rem; margin: 2px 0 0; }
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 999px;
}
.bio {
  padding: 12px 16px 4px;
  font-size: 0.93rem;
  line-height: 1.45;
  min-height: 2.8em;
  color: var(--text);
}
.card-safety {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 16px 4px;
}
.card-safety .text-btn { margin-left: 0; color: var(--hint); font-size: 0.82rem; }
.card-safety .text-btn.danger { color: var(--danger); }
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-size: 0.85rem;
  color: var(--hint);
}
.filter-field input {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
}

/* Action row — circular pass / like / super */
.card-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 20px;
}
.action {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.action:active { transform: scale(0.92); }
.action.pass {
  background: var(--pass);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.action.like {
  width: 68px;
  height: 68px;
  background: var(--accent);
  color: #fff;
  font-size: 1.6rem;
}
.action.like:active { background: var(--accent-press); }
.action.super { background: var(--super); color: #fff; }

/* Buttons — pill, flat */
.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:active { background: var(--accent-press); }
.btn.primary.xl { padding: 16px 20px; font-size: 1.05rem; width: 100%; border-radius: 999px; }
.btn.outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.full { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Lists / chat rows */
.list, .chat-list { display: flex; flex-direction: column; gap: 10px; }
.list-item, .chat-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-item { cursor: pointer; text-decoration: none; color: inherit; }
.chat-item:active { opacity: 0.85; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-3);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
[data-theme="light"] .avatar { color: var(--text); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; background: var(--accent); color: #fff; }
.list-item.blurred .avatar,
.list-item.blurred .li-text { filter: blur(6px); user-select: none; }
.li-text { flex: 1; min-width: 0; }
.li-text strong { display: block; font-size: 0.95rem; }
.li-text span { font-size: 0.8rem; color: var(--hint); }
.chat-time { font-size: 0.72rem; color: var(--accent); font-weight: 600; }
.paywall-hint { margin-bottom: 12px; }

/* Chat bubbles (for any in-app thread) */
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 4px 0;
}
.bubble.out, .bubble.outgoing {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble.in, .bubble.incoming {
  margin-right: auto;
  background: var(--surface-3);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

/* Matches grid */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px 0 8px;
}
.match-card.fx-card {
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 0;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
}
.match-card .fx-fill {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  display: block;
  position: relative;
  background: var(--surface);
}
.match-card .mc-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  background: var(--surface-3);
  border-radius: inherit;
}
[data-theme="light"] .match-card .mc-initial { color: var(--text); }
.match-card .mc-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 40px 10px 12px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  z-index: 1;
  border-radius: 0 0 18px 18px;
}
.match-card .mc-heart {
  position: absolute;
  right: 10px;
  bottom: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: var(--accent);
  color: #fff;
  z-index: 2;
}

/* Profile / premium / hookups */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.profile-hero h2 {
  font-family: var(--display);
  font-size: 1.2rem;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.profile-edit {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-edit label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hint);
}
.profile-edit input,
.profile-edit select,
.profile-edit textarea {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  resize: vertical;
}
.profile-edit input:focus,
.profile-edit select:focus,
.profile-edit textarea:focus,
.filter-field input:focus {
  outline: none;
  border-color: var(--accent);
}
.profile-edit textarea { min-height: 72px; }
#profile-save-msg { min-height: 1.2em; font-size: 0.85rem; }
.meta { color: var(--hint); font-size: 0.88rem; margin-bottom: 6px; }

.premium-card { border: 1.5px solid var(--accent); }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.price-row strong { color: var(--text); }
.your-price { margin: 14px 0; font-weight: 700; color: var(--accent); }
.features {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--text);
}
.features li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  vertical-align: middle;
}

/* Settings-style dark list rows */
.menu-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--surface-3); }
.chev { color: var(--hint); font-size: 1.2rem; }
.filter-label {
  font-weight: 700;
  margin: 12px 0 6px;
  font-size: 0.9rem;
}

.nearby-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.nearby-map-wrap {
  margin: 0 0 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nearby-map {
  width: 100%;
  height: min(52vh, 420px);
  min-height: 260px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  z-index: 0;
}
.nearby-map .leaflet-container { font: inherit; background: var(--surface-2); }
.beni-map-pin {
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.beni-map-you {
  background: var(--text);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.verify-docs-list { list-style: none; padding: 0; margin: 8px 0; }
.verify-docs-list li { margin: 4px 0; }
.verify-docs-list .ok { color: var(--accent); font-weight: 700; }
.verify-id-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.nearby-map-wrap {
  margin: 0 0 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nearby-map {
  width: 100%;
  height: min(52vh, 420px);
  min-height: 260px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  z-index: 0;
}
.nearby-map .leaflet-container { font: inherit; background: var(--surface-2); }
.beni-map-pin {
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.beni-map-you {
  background: var(--text);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.verify-docs-list { list-style: none; padding: 0; margin: 8px 0; }
.verify-docs-list li { margin: 4px 0; }
.verify-docs-list .ok { color: var(--accent); font-weight: 700; }
.verify-id-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.nearby-radii { display: flex; gap: 6px; flex-wrap: wrap; }
.radius-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.radius-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.btn.sm { padding: 8px 12px; font-size: 0.82rem; }
.card-distance {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.privacy-loc { margin-top: 12px; text-align: left; }
.privacy-loc small { display: block; font-weight: 500; }

.hookup-map-wrap {
  margin-top: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hookup-radar {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 14px auto;
  border-radius: 50%;
  /* C6 2026-10-09: flat fill (was a radial-gradient glow) */
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.radar-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--hint) 45%, transparent);
  pointer-events: none;
}
.radar-ring.r1 { width: 33%; height: 33%; }
.radar-ring.r2 { width: 66%; height: 66%; }
.radar-ring.r3 { width: 92%; height: 92%; }
.radar-you {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  z-index: 2;
  /* C6: flat halo ring via outline (no box-shadow, no layout change) */
  outline: 6px solid var(--accent-soft);
}
.hookup-pins { position: absolute; inset: 0; z-index: 3; }
.hookup-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: none;
  background: var(--surface);
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  /* C6: flat edge instead of a drop shadow (outline keeps the 40px box) */
  outline: 1px solid var(--line);
  transition: transform 0.18s ease;
  z-index: 3;
}
.hookup-pin:active { transform: scale(1.12); }
.hookup-pin.is-online::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  border: 1.5px solid var(--surface);
}

.hookups-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.hookups-hero .flame { font-size: 2.4rem; margin-bottom: 8px; }
.hookups-hero h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.hookup-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hint);
}
.hookup-points > div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 6px;
}
.hookup-points span { display: block; font-size: 1.2rem; margin-bottom: 4px; }

.toggle-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  position: relative;
}
.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-ui {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-3);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.toggle-row input:checked + .toggle-ui { background: var(--accent); }
.toggle-row input:checked + .toggle-ui::after { transform: translateX(20px); }

/* Bottom nav — active = solid pink icon + label, inactive = gray */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabs-h) + var(--safe-bottom));
  padding: 8px 4px var(--safe-bottom);
  background: var(--tabbar);
  display: flex;
  border-top: 1px solid var(--line);
  z-index: 50;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--hint);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
}
.tab-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 1.05rem;
  line-height: 1;
}
.tab-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab.active { color: var(--accent); }
.tab.active .tab-ico svg { fill: currentColor; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}
.photo-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot .photo-x {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: rgba(0,0,0,0.65);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.photo-add-label { margin-top: 4px; cursor: pointer; text-align: center; }
.tg-import {
  margin: 14px 0 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.tg-import .btn { margin-bottom: 8px; }
.tg-import-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.tg-import-preview img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent, #FF2D7A);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.chip.emoji { font-size: 1.15rem; padding: 8px 10px; }
.hobby-cats { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.hobby-cat-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
#edit-spot-custom {
  width: 100%;
  margin-bottom: 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
  #app, .splash-content, #age-gate .gate-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  #app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .tabs {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* F32 delete account (2026-10-12): theme tokens only */
.danger-zone { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.danger:active { background: var(--surface-3); }
.confirm-sheet .btn.danger { background: var(--danger); color: var(--on-accent); }
.confirm-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 16px 16px calc(16px + var(--safe-bottom));
}
.confirm-backdrop[hidden] { display: none; }
.confirm-sheet {
  width: 100%; max-width: 480px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.confirm-sheet h3 { margin: 0 0 8px; font-family: var(--display); }
.confirm-sheet p { margin: 0 0 4px; font-size: 0.92rem; }
/* A4 GPS consent sheet (2026-10-17): theme tokens only */
.gps-consent-list { margin: 0 0 14px; padding-left: 18px; font-size: 0.9rem; color: var(--text); }
.gps-consent-list li { margin: 0 0 6px; }
.confirm-sheet .btn + .btn { margin-top: 8px; }
/* A6 / F19 S0 age-check consent stub */
.age-consent-row { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 0.9rem; color: var(--text); }

/* F53 community counts (2026-10-12): theme tokens only */
.stats-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin: -4px 0 12px; font-size: 0.84rem; color: var(--hint);
}
.stats-line b { color: var(--text); font-weight: 700; }
.stats-line .dot { color: var(--hint); }
.stats-line.hidden { display: none; }

/* F30 verification box (2026-10-12): theme tokens only */
.verify-box { margin-top: 12px; }
.verify-box .meta { margin: 0; }
.verify-pending { color: var(--gold); }
.verify-verified { color: var(--online); }
.verify-none { color: var(--hint); }
