/* ============================================================================
   Entwine, design system
   Dark, warm, editorial. Fraunces display + Hanken Grotesk body.
   ========================================================================== */

:root {
  --bg: #140f12;
  --bg-2: #1a1318;
  --surface: #211923;
  --surface-2: #2a2029;
  --line: #3a2e37;
  --line-soft: #2c232b;
  --text: #f4ece4;
  --text-dim: #cdbfc6;
  --muted: #998b94;
  --ember: #e8615a;
  --ember-soft: #f08a82;
  --ember-deep: #b8403c;
  --gold: #d9a66b;
  --plum: #7a3f5c;
  --good: #6fbf8f;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 28px 60px -20px rgba(0, 0, 0, 0.85);
  --maxw: 1180px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The hidden attribute must win over component display rules (e.g. the chat
   attach menu and recorder row are display:flex but start hidden). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* atmospheric background: warm radial glows + grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(232, 97, 90, 0.16), transparent 60%),
    radial-gradient(50% 45% at 100% 10%, rgba(217, 166, 107, 0.12), transparent 55%),
    radial-gradient(70% 60% at 80% 100%, rgba(122, 63, 92, 0.18), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--text); }
img { display: block; max-width: 100%; }

::selection { background: var(--ember); color: #fff; }

/* ---- typography ---------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
.serif { font-family: var(--font-display); }
.muted { color: var(--muted); }
.dim { color: var(--text-dim); }
.tiny { font-size: 0.78rem; }
.center { text-align: center; }

/* ---- layout -------------------------------------------------------------- */
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 calc(20px + env(safe-area-inset-right, 0px)) 0 calc(20px + env(safe-area-inset-left, 0px)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap-row { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; }
.hide-desktop { display: none; }

/* ---- top bar ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 15, 18, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 14px var(--ember); }
.brand b { font-weight: 600; }
.brand .knot { color: var(--gold); }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-pill); color: var(--text-dim);
  font-weight: 500; font-size: 0.94rem; transition: background .2s, color .2s; position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-badge {
  position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--ember); color: #fff; font-size: 0.66rem; font-weight: 700;
  border-radius: 8px; display: grid; place-items: center;
}

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill); font-weight: 600; font-size: 0.95rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  transition: transform .12s ease, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--ember), var(--ember-deep));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 26px -10px rgba(232, 97, 90, 0.7);
}
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(232, 97, 90, 0.85); border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #b9863f); color: #21160a; border-color: transparent; }
.btn-sm { padding: 8px 14px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-danger { background: transparent; border-color: rgba(184, 64, 60, 0.4); color: var(--ember-soft); }
.btn-danger:hover { background: rgba(184, 64, 60, 0.12); border-color: var(--ember-deep); }
.btn-icon {
  width: 42px; height: 42px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); font-size: 1.1rem;
}

/* ---- cards --------------------------------------------------------------- */
.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-pad { padding: 22px; }

/* profile card */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.pcard {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .2s, border-color .2s; cursor: pointer;
  position: relative;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line); }
.pcard .photo { aspect-ratio: 4 / 5; position: relative; overflow: hidden; }
.pcard .photo .ph-img { width: 100%; height: 100%; object-fit: cover; }
.pcard .photo .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,10,13,.85) 4%, transparent 45%); }
.pcard .badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.match-badge {
  background: rgba(20,15,18,.7); backdrop-filter: blur(8px); border: 1px solid rgba(232,97,90,.5);
  color: var(--ember-soft); font-weight: 700; font-size: 0.78rem; padding: 5px 10px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 5px;
}
.type-chip {
  background: rgba(20,15,18,.7); backdrop-filter: blur(8px); border: 1px solid var(--line);
  font-size: 0.72rem; font-weight: 600; padding: 5px 10px; border-radius: var(--radius-pill); text-transform: capitalize;
}
.verified-tick { color: var(--gold); font-size: .8rem; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); display: inline-block; }
.pcard .meta { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 16px; }
.pcard .meta .name { font-family: var(--font-display); font-size: 1.22rem; display: flex; align-items: center; gap: 6px; }
.pcard .meta .sub { font-size: 0.84rem; color: var(--text-dim); }
.pcard .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard .tagline { font-size: 0.9rem; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard-game {
  position: absolute; bottom: 12px; right: 12px; width: 38px; height: 38px;
  background: rgba(20,15,18,.7); backdrop-filter: blur(8px); border-color: rgba(255,255,255,.14);
  z-index: 2;
}
.pcard-game .ico-svg { color: var(--gold); }
.pcard-game:hover { border-color: var(--gold); transform: translateY(-1px); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.reason { font-size: 0.72rem; color: var(--gold); background: rgba(217,166,107,.1); border: 1px solid rgba(217,166,107,.22); padding: 3px 9px; border-radius: var(--radius-pill); }

/* avatar gradient */
.avatar { border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); color: #fff; font-weight: 600; flex-shrink: 0; overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* tags / chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links { gap: 8px; }
.social-links a.tag { text-decoration: none; color: var(--text-dim); }
.social-links a.tag:hover { border-color: var(--muted); color: var(--text); }
.chip {
  padding: 7px 13px; border-radius: var(--radius-pill); font-size: 0.84rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  transition: all .15s; user-select: none;
}
.chip.selectable { cursor: pointer; }
.chip.selectable:hover { border-color: var(--muted); color: var(--text); }
.chip.on { background: linear-gradient(135deg, var(--ember), var(--ember-deep)); color: #fff; border-color: transparent; }
.chip.gold.on { background: linear-gradient(135deg, var(--gold), #b9863f); color: #21160a; }
.chip-x { display:inline-flex; align-items:center; justify-content:center; margin-left:4px; padding:0 2px; background:none; border:none; cursor:pointer; color:inherit; opacity:.6; line-height:1; }
.chip-x:hover { opacity:1; }
.chip-x .ico-svg { width:12px; height:12px; }
.tag { padding: 5px 11px; border-radius: var(--radius-pill); font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--text-dim); }

/* ---- forms --------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; color: var(--text);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(232,97,90,.18); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23998b94' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- grouped profile editor ---------------------------------------------- */
.edit-sections { display: flex; flex-direction: column; }
.edit-group-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 22px 0 8px; }
.edit-row { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .15s; border-radius: 8px; }
.edit-row:hover { background: var(--surface); }
.edit-row .er-main { flex: 1; min-width: 0; }
.edit-row .er-title { font-weight: 600; }
.edit-row .er-sub { font-size: 0.84rem; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-row .er-chev { color: var(--muted); flex-shrink: 0; }
.vis-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-top: 6px; cursor: pointer; user-select: none; }
.vis-toggle input { width: 16px; height: 16px; accent-color: var(--ember); cursor: pointer; }
.kink-level-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.kink-level-row .kn-name { flex: 1; font-weight: 500; font-size: 0.92rem; }

/* ---- misc ---------------------------------------------------------------- */
.section-title { font-size: 1.6rem; margin-bottom: 4px; }
.section-sub { color: var(--muted); margin-bottom: 20px; }
.divider { height: 1px; background: var(--line-soft); margin: 22px 0; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-dim); margin-bottom: 8px; }
.empty-ic {
  width: 56px; height: 56px; margin: 0 auto 16px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ember-soft);
  background: rgba(232, 97, 90, 0.1); border: 1px solid rgba(232, 97, 90, 0.22);
}
.empty-ic .ico-svg { width: 24px; height: 24px; }
.pill-count { font-size: 0.8rem; color: var(--muted); background: var(--surface); padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-soft); }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; }
.notice.err { background: rgba(232,97,90,.12); border: 1px solid rgba(232,97,90,.35); color: var(--ember-soft); }
.notice.ok { background: rgba(111,191,143,.1); border: 1px solid rgba(111,191,143,.3); color: var(--good); }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- landing ------------------------------------------------------------- */
.hero { padding: 56px 0 30px; position: relative; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); font-weight: 400; max-width: 14ch; }
.hero h1 em { font-style: italic; color: var(--ember-soft); }
.hero p.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text-dim); max-width: 46ch; margin: 22px 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat .n { font-family: var(--font-display); font-size: 2rem; color: var(--text); }
.hero-stats .stat .l { font-size: 0.84rem; color: var(--muted); }
.auth-card { max-width: 440px; margin: 30px auto; }
.auth-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 5px; border-radius: var(--radius-pill); margin-bottom: 22px; }
.auth-tabs button { flex: 1; padding: 9px; border-radius: var(--radius-pill); font-weight: 600; color: var(--muted); transition: all .2s; }
.auth-tabs button.on { background: var(--surface-2); color: var(--text); }

/* ---- profile detail ------------------------------------------------------ */
.profile-hero { display: grid; grid-template-columns: 340px 1fr; gap: 30px; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery .main { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery .thumbs .t { aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.gallery .thumbs .t.on { border-color: var(--ember); }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.profile-actions-secondary { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; width: 100%; }
.attr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; margin: 18px 0; }
.attr { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.attr .k { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.attr .v { font-weight: 600; margin-top: 2px; }
/* Couple profiles: one card per partner, side by side (stacks on mobile). */
.partner-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.partner-card { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px 16px; }
.partner-card .partner-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.partner-card .partner-head .pg { font-family: var(--font-display); font-size: 1.15rem; color: var(--text); }
.partner-card .partner-head .pn { font-size: 0.66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); white-space: nowrap; }
.partner-card .pstat { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.partner-card .pstat:last-child { border-bottom: none; }
.partner-card .pstat .pk { color: var(--muted); }
.partner-card .pstat .pv { font-weight: 600; text-align: right; color: var(--text); }
@media (max-width: 560px) { .partner-cols { grid-template-columns: 1fr; } }
.linked-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line-soft); transition: border-color .2s; }
.linked-row:hover { border-color: var(--line); }

/* ---- messages ------------------------------------------------------------ */
.conv-list { display: flex; flex-direction: column; gap: 8px; }
.conv { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer; transition: all .15s; }
.conv:hover { border-color: var(--line); transform: translateX(2px); }
.conv .last { font-size: 0.86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* The conversation view is a fixed-height flex column that fits between the top
   bar and the bottom nav, so ONLY the message list scrolls (no page scroll). The
   header, album control, and composer are flex-none, so adding rows never breaks
   the fit (a magic per-element height calc did, which is what regressed). */
.thread-view { display: flex; flex-direction: column; height: calc(100dvh - 180px); }
.thread-view > .card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.thread .msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 4px; }
.bubble { max-width: 74%; padding: 10px 14px; border-radius: 16px; font-size: 0.94rem; line-height: 1.4; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--ember), var(--ember-deep)); color: #fff; border-bottom-right-radius: 5px; }
.bubble .t { font-size: 0.68rem; opacity: .6; margin-top: 3px; }
.bubble.media { padding: 6px; max-width: 70%; }
.bubble.media .t { padding: 0 6px 2px; }
.bubble.pending { opacity: .6; }
.bubble.failed { outline: 1px solid var(--ember-deep); }
.msg-retry { display: block; margin-top: 6px; font-size: 0.76rem; font-weight: 600; color: var(--ember-soft); background: none; border: none; padding: 2px 0; text-decoration: underline; cursor: pointer; }
.bubble.me .msg-retry { color: #ffe2df; }

/* photo bubble + lightbox */
.bubble-photo { width: 100%; max-width: 260px; max-height: 340px; object-fit: cover; border-radius: 13px; cursor: zoom-in; display: block; }
.lightbox { position: relative; display: flex; align-items: center; justify-content: center; }
.lightbox-img { max-width: min(92vw, 900px); max-height: 86vh; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: -6px; right: -6px; background: var(--surface); }
.modal:has(.lightbox) { background: transparent; border: none; box-shadow: none; padding: 0; width: auto; }

/* voice message player */
.voice-msg { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 4px 6px; }
.voice-play { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); border: none; color: inherit; cursor: pointer; }
.bubble.them .voice-play { background: var(--surface); border: 1px solid var(--line); color: var(--ember-soft); }
.voice-play .ico-svg { width: 18px; height: 18px; }
.voice-scrub { position: relative; flex: 1; height: 30px; display: flex; align-items: center; cursor: pointer; }
.voice-wave { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.voice-wave span { flex: 1; border-radius: 2px; background: currentColor; opacity: .28; }
.voice-fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 3px; border-radius: 3px; background: currentColor; opacity: .9; width: 0; pointer-events: none; }
.bubble.them .voice-fill, .bubble.them .voice-wave span { color: var(--ember); }
.voice-scrub:focus-visible { outline: 2px solid var(--ember-soft); outline-offset: 3px; border-radius: 4px; }
.voice-dur { font-size: 0.74rem; opacity: .8; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.voice-msg.voice-broken { gap: 8px; }
.voice-err { font-size: 0.84rem; opacity: .85; }
.voice-dl { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; text-decoration: underline; }
.voice-dl .ico-svg { width: 14px; height: 14px; }

/* system line (album shared / ended) */
.sys-line { align-self: center; max-width: 80%; text-align: center; font-size: 0.78rem; color: var(--muted); padding: 4px 12px; }

/* group chats: avatar glyph, sender labels, member hints, pickers */
.group-avatar { background: linear-gradient(150deg, var(--plum), var(--surface-2)); color: var(--gold); }
.group-avatar .ico-svg { width: 52%; height: 52%; }
.group-member-hint { color: var(--muted); }
.bubble-sender { font-size: 0.74rem; font-weight: 600; color: var(--ember-soft); margin-bottom: 3px; }
.group-thread-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.group-picker-slot { max-height: 280px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 6px; }
.group-picker { display: flex; flex-direction: column; gap: 4px; }
.group-picker-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 10px; background: none; border: 1px solid transparent; color: var(--text); cursor: pointer; text-align: left; }
.group-picker-row:hover, .group-picker-row:focus-visible { background: var(--surface-2); outline: none; }
.group-picker-check { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: transparent; }
.group-picker-check .ico-svg { width: 14px; height: 14px; }
.group-picker-row.on { border-color: var(--ember); background: rgba(232, 97, 90, .1); }
.group-picker-row.on .group-picker-check { background: linear-gradient(135deg, var(--ember), var(--ember-deep)); border-color: transparent; color: #fff; }

/* view-once photo: tappable to open (recipient), or a spent chip (sender/opened) */
.view-once { display: flex; align-items: center; gap: 9px; padding: 12px 16px; min-width: 190px; border-radius: 13px; background: rgba(255,255,255,.1); border: 1px dashed rgba(255,255,255,.35); color: inherit; cursor: pointer; text-align: left; }
.bubble.them .view-once { background: var(--surface-2); border-color: var(--line); }
.view-once .ico-svg { width: 18px; height: 18px; flex: none; }
.view-once .vo-label { font-weight: 600; }
.view-once .vo-hint { font-size: 0.74rem; opacity: .7; margin-left: auto; }
.view-once.spent { cursor: default; border-style: solid; opacity: .75; font-size: 0.86rem; }
.view-once.spent .ico-svg { opacity: .8; }

/* composer + attach menu + recorder */
.composer { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.composer-main { display: flex; gap: 10px; align-items: center; }
.attach-wrap { position: relative; display: flex; }
.msg-attach { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; }
.msg-attach .ico-svg { width: 20px; height: 20px; }
.composer-send { min-height: 44px; }
.attach-menu { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); padding: 6px; min-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.attach-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: none; border: none; color: var(--text); font-weight: 500; font-size: 0.92rem; cursor: pointer; text-align: left; width: 100%; }
.attach-item:hover, .attach-item:focus-visible { background: var(--surface-2); outline: none; }
.attach-item .ico-svg { width: 18px; height: 18px; color: var(--ember-soft); }
.attach-item[disabled] { opacity: .5; cursor: default; }
.attach-item[disabled]:hover { background: none; }
.attach-sep { height: 1px; background: var(--line-soft); margin: 5px 8px; }
.rec-row { display: flex; align-items: center; gap: 12px; }
.rec-meta { flex: 1; display: flex; align-items: center; gap: 10px; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); animation: recpulse 1.1s ease-in-out infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-hint { font-size: 0.84rem; }
.rec-cancel, .rec-stop { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; }
.rec-stop { background: linear-gradient(135deg, var(--gold), #b9863f); color: #21160a; border: none; }
.rec-cancel { background: var(--surface); border: 1px solid var(--line); }
@keyframes recpulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }

/* ---- in-chat game card (Never Have I Ever) ------------------------------- */
/* A game reads as special vs a normal bubble: full width, elevated, gold-edged. */
.game-card {
  align-self: stretch; max-width: 100%;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(217,166,107,.32); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 16px 18px; animation: pop .25s ease;
}
.game-card.ended { border-color: var(--line-soft); box-shadow: none; opacity: .82; }
.game-inner { display: flex; flex-direction: column; gap: 12px; }
.game-head { display: flex; align-items: center; gap: 8px; }
.game-kicker { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--gold); }
.game-tier { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); }
.game-end { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: none; border: none; color: var(--muted); cursor: pointer; }
.game-end:hover { background: var(--bg-2); color: var(--text); }
.game-end .ico-svg { width: 15px; height: 15px; }
.game-prompt { font-size: 1.12rem; line-height: 1.35; font-weight: 600; color: var(--text); }
.game-card.ended .game-prompt { color: var(--text-dim); }
.game-players { display: flex; flex-wrap: wrap; gap: 7px; }
.game-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 500;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-dim);
}
.game-chip-name { font-weight: 600; color: var(--text); }
.game-chip-state { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; }
.game-chip-state .ico-svg { width: 13px; height: 13px; }
.game-chip.thinking .game-chip-state { color: var(--muted); }
.game-chip.answered { border-color: rgba(217,166,107,.4); }
.game-chip.answered .game-chip-state { color: var(--gold); }
.game-chip.have { background: rgba(232,97,90,.13); border-color: rgba(232,97,90,.45); color: var(--ember-soft); }
.game-chip.have .game-chip-name { color: var(--ember-soft); }
.game-chip.never { opacity: .7; }
.game-actions { display: flex; gap: 10px; }
.game-answer { flex: 1; }
.game-answer.have { background: linear-gradient(135deg, var(--ember), var(--ember-deep)); color: #fff; border-color: transparent; }
.game-answer.never { background: var(--bg-2); border-color: var(--line); }
.game-answer:disabled { opacity: .5; cursor: default; transform: none; }
.game-next { flex: 1; }
.game-wait { font-size: 0.84rem; color: var(--muted); }
.game-tally { font-size: 0.94rem; font-weight: 600; color: var(--gold); }
.game-ended-note { font-size: 0.86rem; color: var(--muted); }

/* tier picker modal */
.tier-opts { display: flex; flex-direction: column; gap: 8px; }
.tier-opt {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, background .15s;
}
.tier-opt:hover { border-color: var(--muted); }
.tier-opt.on { border-color: transparent; background: linear-gradient(135deg, rgba(232,97,90,.22), rgba(184,64,60,.16)); box-shadow: inset 0 0 0 1px var(--ember); }
.tier-name { font-weight: 600; font-size: 0.98rem; }
.tier-blurb { font-size: 0.82rem; color: var(--text-dim); }

/* group composer game button */
.group-game-btn { flex: none; }
.group-game-btn .ico-svg { color: var(--gold); }

/* messages search */
.msg-search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-pill); padding: 0 16px; margin-bottom: 18px; }
.msg-search .ico-svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.msg-search-input { border: none; background: none; padding: 12px 0; flex: 1; outline: none; }
.msg-section { margin-bottom: 18px; }
.msg-section-title { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 2px 8px; }
.msg-section .conv { margin-bottom: 8px; }
.msg-loading, .msg-empty { padding: 14px 4px; font-size: 0.88rem; }

@media (prefers-reduced-motion: reduce) {
  .rec-dot { animation: none; }
  .conv:hover { transform: none; }
}

/* ---- filter bar ---------------------------------------------------------- */
.filters { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.filter-panel { position: sticky; top: calc(86px + env(safe-area-inset-top, 0px)); }
.filter-group { margin-bottom: 18px; }
.filter-group > .lbl { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 9px; }
.sort-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }

/* ---- bottom nav (mobile) ------------------------------------------------- */
.botnav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(20,15,18,.92); backdrop-filter: blur(18px); border-top: 1px solid var(--line-soft);
  padding: 8px calc(6px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(6px + env(safe-area-inset-left, 0px));
  justify-content: space-around;
}
.botnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; color: var(--muted); font-size: 0.66rem; font-weight: 600; position: relative; }
.botnav a.active { color: var(--ember-soft); }
.botnav a .ic { font-size: 1.3rem; line-height: 1; }
.botnav .nav-badge { top: 0; right: 8px; }

/* ---- toast --------------------------------------------------------------- */
.toast-host { position: fixed; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--surface-2); border: 1px solid var(--line); padding: 11px 18px; border-radius: var(--radius-pill); box-shadow: var(--shadow-lift); font-size: 0.9rem; font-weight: 500; animation: toastin .3s ease; }
.toast.ok { border-color: rgba(111,191,143,.5); }
.toast.err { border-color: rgba(232,97,90,.5); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* ---- modal --------------------------------------------------------------- */
.modal-host { position: fixed; inset: 0; z-index: 150; background: rgba(10,7,9,.7); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: calc(20px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px)); overflow-y: auto; animation: fade .2s; }
.modal-host::-webkit-scrollbar { width: 0; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 460px; width: 100%; padding: 26px; box-shadow: var(--shadow-lift); animation: pop .25s ease; margin: auto; max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* PWA install instructions: visual, browser-aware step-by-step guide */
.install-sheet { display: flex; flex-direction: column; }
.install-glyph { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; margin: 2px auto 12px; background: linear-gradient(135deg, var(--ember), var(--ember-deep)); box-shadow: 0 10px 26px -10px rgba(232, 97, 90, .7); }
.install-glyph .ico-svg { width: 26px; height: 26px; color: #fff; }
.install-title { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; text-align: center; line-height: 1.12; }
.install-sub { text-align: center; color: var(--muted); font-size: .9rem; line-height: 1.45; margin: 7px 6px 16px; }
.install-steps { display: flex; flex-direction: column; }
.ins-step { display: flex; gap: 13px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.ins-step:first-child { border-top: none; padding-top: 2px; }
.ins-num { flex: 0 0 auto; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: .85rem; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--ember), var(--ember-deep)); margin-top: 1px; }
.ins-body { flex: 1; min-width: 0; }
.ins-txt { font-size: .95rem; color: var(--text-dim); line-height: 1.5; }
.ins-txt b { color: var(--text); font-weight: 600; }
.ins-chip { display: inline-flex; align-items: center; justify-content: center; vertical-align: -9px; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); margin: 0 1px; }
.ins-chip .ico-svg { width: 17px; height: 17px; color: var(--ember-soft); }
.ins-sheetmock { margin-top: 10px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 8px; position: relative; overflow: hidden; }
.ins-smrow { display: flex; align-items: center; padding: 9px 10px; border-radius: 9px; font-size: .82rem; color: var(--muted); }
.ins-smrow + .ins-smrow { margin-top: 2px; }
.ins-smrow.faded { opacity: .45; }
.ins-smrow.hot { background: rgba(232, 97, 90, .12); border: 1px solid rgba(232, 97, 90, .45); color: var(--text); font-weight: 600; }
.ins-smlab { display: flex; align-items: center; gap: 10px; }
.ins-smic { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; }
.ins-smrow.hot .ins-smic { background: linear-gradient(135deg, var(--ember), var(--ember-deep)); }
.ins-smic .ico-svg { width: 14px; height: 14px; color: #fff; }
.ins-scrollhint { position: absolute; right: 8px; top: 6px; display: flex; align-items: center; gap: 4px; font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ember-soft); background: rgba(20, 15, 18, .7); padding: 3px 8px; border-radius: 99px; border: 1px solid rgba(232, 97, 90, .4); }
.ins-scrollhint .ico-svg { width: 11px; height: 11px; animation: insbob 1.1s ease-in-out infinite; }
@keyframes insbob { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .ins-scrollhint .ico-svg { animation: none; } }
.install-note { text-align: center; margin-top: 6px; }
.install-actions { margin-top: 16px; }
.install-actions .btn { width: 100%; }

/* PWA update pill: subtle, sits above the bottom nav, offers a one-tap refresh */
.update-pill {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 120;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 7px 7px 7px 18px; box-shadow: var(--shadow-lift);
  font-size: 0.9rem; font-weight: 500; max-width: calc(100vw - 32px);
  animation: pop .25s ease;
}
.update-dismiss { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); flex: none; }
.update-dismiss .ico-svg { width: 15px; height: 15px; }
.update-dismiss:hover { background: var(--surface-2); color: var(--text); }
@media (min-width: 881px) { .update-pill { bottom: calc(26px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .update-pill { animation: none; } }

/* ---- staggered reveal ---------------------------------------------------- */
.reveal { animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---- icons --------------------------------------------------------------- */
.ico-svg { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.18em; }
.botnav .ic .ico-svg { width: 22px; height: 22px; }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; }
.match-badge .ico-svg { width: 13px; height: 13px; }
.verified-tick .ico-svg { width: 1em; height: 1em; vertical-align: -0.12em; }

/* ---- creator badge ------------------------------------------------------- */
.creator-badge {
  font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(217,166,107,.15); border: 1px solid rgba(217,166,107,.4); color: var(--gold);
}

/* ---- album toggle (public / private photo tabs) -------------------------- */
.album-tabs {
  display: flex; gap: 4px; background: var(--bg-2); padding: 4px;
  border-radius: var(--radius-pill); margin-bottom: 12px; width: fit-content;
}
.album-tab {
  padding: 7px 18px; border-radius: var(--radius-pill); font-size: 0.86rem; font-weight: 600;
  color: var(--muted); background: none; border: none; cursor: pointer; transition: all .18s;
}
.album-tab.on { background: var(--surface-2); color: var(--text); }

/* ---- lock badge on private photo tiles ----------------------------------- */
.lock-badge {
  position: absolute; bottom: 4px; left: 4px; font-size: 0.62rem; line-height: 1;
  background: rgba(0,0,0,.65); color: var(--gold); padding: 2px 5px;
  border-radius: 6px; pointer-events: none;
}

/* ---- onboarding ---------------------------------------------------------- */
.onboarding-wrap {
  display: flex; justify-content: center; align-items: flex-start;
  min-height: calc(100dvh - 80px); padding: 32px 20px 60px;
}
.onboarding-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); width: 100%; max-width: 560px;
  padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 0;
}
.onboarding-header { margin-bottom: 26px; }
.onboarding-skip-all {
  float: right; margin-top: -6px;
}
.onboarding-progress-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; clear: both;
}
.onboarding-pct { color: var(--ember-soft); font-weight: 600; }
.progress-track {
  height: 5px; background: var(--surface-2); border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--ember), var(--gold));
  border-radius: var(--radius-pill); transition: width .4s ease;
}
.onboarding-step-title {
  font-size: 1.55rem; margin-bottom: 6px;
}
.onboarding-body { flex: 1; margin-bottom: 18px; }
.onboarding-actions {
  display: flex; gap: 10px; align-items: center; margin-top: 6px;
}
.onboarding-photo-preview {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; min-height: 0;
}
.onboarding-thumb {
  width: 92px; height: 92px; border-radius: 12px; object-fit: cover;
  border: 1px solid var(--line);
}
.onboarding-extras { padding: 16px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line-soft); }
.onboarding-done-icon {
  width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ember-soft);
  background: rgba(232, 97, 90, 0.12); border: 1px solid rgba(232, 97, 90, 0.28);
}
.onboarding-done-icon .ico-svg { width: 28px; height: 28px; }

/* ---- accessibility: visible focus rings --------------------------------- */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(232, 97, 90, .55); border-radius: 6px; }
.btn:focus-visible, .chip:focus-visible { box-shadow: 0 0 0 3px rgba(244, 236, 228, .85); }
a:focus-visible, .pcard:focus-visible, .conv:focus-visible, .linked-row:focus-visible { box-shadow: 0 0 0 3px rgba(232, 97, 90, .6); border-radius: 10px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { box-shadow: 0 0 0 3px rgba(232, 97, 90, .18); }

/* ---- accessibility: honour reduced-motion ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .pcard:hover, .btn:hover, .conv:hover, .verify-shutter:hover { transform: none; }
  /* Suppress the white capture flash entirely (not just shorten it) for photosensitivity. */
  .verify-frame.flash::after { display: none !important; }
}

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 880px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: block; }
  /* Reserve the bottom nav's height *plus* the home-indicator safe area, so the
     last line of content clears the fixed nav on notched phones. The nav grows
     by env(safe-area-inset-bottom); this padding must grow with it. */
  .app { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .botnav { display: flex; }
  .nav-links { display: none; }
  .profile-hero { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .field-row { grid-template-columns: 1fr; }
  .topbar .wrap { height: 58px; }
  /* Fit the chat between the topbar and the (taller, safe-area-aware) bottom nav,
     so only the message list scrolls. Only outer chrome is subtracted; the flex
     children handle their own height. */
  .thread-view { height: calc(100dvh - 142px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
}

/* ---- install banner ------------------------------------------------------ */
.install-banner {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  width: calc(100% - 32px);
  max-width: 560px;
  background: rgba(26, 19, 24, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(217, 166, 107, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(217, 166, 107, 0.12);
  animation: rise .35s ease both;
}
.install-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.install-banner-icon {
  flex-shrink: 0;
  color: var(--gold);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(217, 166, 107, 0.12);
  border: 1px solid rgba(217, 166, 107, 0.25);
}
.install-banner-icon .ico-svg { width: 18px; height: 18px; }
.install-banner-text {
  flex: 1;
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.install-banner-add { flex-shrink: 0; }
.install-banner-dismiss {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color .15s, background .15s;
  padding: 0;
}
.install-banner-dismiss:hover { color: var(--text); background: var(--surface); }
.install-banner-dismiss .ico-svg { width: 15px; height: 15px; }

/* viewMe install row icon */
.install-me-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(217, 166, 107, 0.1);
  border: 1px solid rgba(217, 166, 107, 0.22);
  color: var(--gold);
}
.install-me-icon .ico-svg { width: 20px; height: 20px; }

/* on desktop (no botnav) the banner sits above the bottom of the viewport */
@media (min-width: 881px) {
  .install-banner {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- photo verification -------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Member verify card: a gold-hairline trust object, not a plain card. */
.verify-card { border: 1px solid rgba(217, 166, 107, 0.35); box-shadow: inset 0 1px 0 rgba(217, 166, 107, 0.12); }
.verify-card.is-verified { background: linear-gradient(160deg, rgba(217,166,107,.10), var(--bg-2)); }
.verify-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.verify-head h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 0; }
.verify-seal { flex-shrink: 0; display: grid; place-items: center; color: var(--gold); background: rgba(217, 166, 107, 0.12); border-radius: 12px; }
.verify-seal.sm { width: 38px; height: 38px; }
.verify-seal.sm .ico-svg { width: 20px; height: 20px; }
.verify-seal.lg { width: 64px; height: 64px; border-radius: 18px; }
.verify-seal.lg .ico-svg { width: 34px; height: 34px; }
.verify-seal.shimmer { animation: sealpulse 1.6s ease-in-out infinite; }
@keyframes sealpulse { 50% { opacity: .62; transform: scale(.97); } }
.verify-earned { text-align: center; padding: 12px 4px; }
/* The earned moment gets its own wax-stamp reveal, not the generic list rise. */
.verify-earned .verify-seal { margin: 0 auto 12px; box-shadow: 0 0 26px rgba(217, 166, 107, 0.35); animation: sealstamp .55s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes sealstamp { from { opacity: 0; transform: scale(1.7) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.verify-earned h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 6px; animation: rise .5s ease both; }
.verify-pose { color: var(--text-dim); margin: 4px 0 12px; }
.verify-pose em { color: var(--ember-soft); font-style: italic; font-weight: 600; }
.verify-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.verify-actions-sub { justify-content: center; }

/* Live camera / preview frame. */
.verify-frame { position: relative; width: 100%; max-width: 340px; aspect-ratio: 4 / 5; margin: 4px auto 14px; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: inset 0 0 40px rgba(217, 166, 107, 0.18); }
.verify-frame img, .verify-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.verify-oval { position: absolute; inset: 12% 22%; border: 2px dashed rgba(244, 236, 228, 0.4); border-radius: 50%; box-shadow: 0 0 0 9999px rgba(20, 15, 18, .28); pointer-events: none; }
.verify-frame.flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: vflash .35s ease-out forwards; }
@keyframes vflash { from { opacity: .9; } to { opacity: 0; } }
/* Shutter is the focal action: its own centered row. */
.verify-shutter-row { display: flex; justify-content: center; margin-bottom: 12px; }
.verify-shutter { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #21160a; background: linear-gradient(135deg, var(--gold), #b9863f); cursor: pointer; box-shadow: 0 0 0 3px var(--gold); transition: transform .12s; }
.verify-shutter:hover:not(:disabled) { transform: scale(1.06); }
.verify-shutter:active:not(:disabled) { transform: scale(.94); }
.verify-shutter:disabled { opacity: .4; cursor: default; }
.verify-shutter:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px var(--cream, #f4ece4); }

/* Owner nudge strip (reuses edit-row rhythm with a gold hairline). */
.verify-nudge { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 14px 0; border: 1px solid rgba(217, 166, 107, 0.35); border-radius: var(--radius); cursor: pointer; transition: background .15s; }
.verify-nudge:hover { background: rgba(217, 166, 107, 0.07); }
.verify-nudge .er-main { flex: 1; min-width: 0; }
.verify-nudge .er-title { font-weight: 600; }
.verify-nudge .er-sub { font-size: 0.84rem; color: var(--text-dim); margin-top: 2px; }
.verify-nudge .er-chev { color: var(--gold); flex-shrink: 0; }

/* Admin review queue. */
.verify-review-grid { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.verify-review-selfie { position: relative; }
.verify-review-selfie img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
/* Brighter gold + weight so chip text clears contrast on the dark scrim. */
.verify-pose-chip { position: absolute; left: 8px; bottom: 8px; font-size: 0.74rem; font-weight: 600; color: #f0cd97; background: rgba(20, 15, 18, 0.9); border: 1px solid rgba(217, 166, 107, 0.4); padding: 4px 9px; border-radius: var(--radius-pill); backdrop-filter: blur(6px); }
.verify-src-chip { position: absolute; right: 8px; top: 8px; font-size: 0.68rem; color: var(--text); background: rgba(20, 15, 18, 0.9); border: 1px solid var(--line); padding: 3px 8px; border-radius: var(--radius-pill); }
.verify-review-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; }
/* Match the selfie's 4:5 so the reviewer compares faces at the same scale. */
.verify-review-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.verify-review-name { font-weight: 600; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.verify-review-name:hover { color: var(--gold); }
.verify-reasons { flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Admin metrics. */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.metric-tile { text-align: center; }
.metric-num { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--gold); }

@media (max-width: 560px) {
  .verify-review-grid { grid-template-columns: 1fr; }
  .verify-review-selfie { max-width: 220px; }
}
