/* TrueTrust — member app styles. Mobile first; desktop gets a side rail. */

:root {
  --bg: #FBF8F4;
  --surface: #FFFFFF;
  --surface-2: #F4EFE9;
  --surface-3: #EDE6DE;
  --ink: #1A1714;
  --ink-2: #4A433D;
  --muted: #8C837B;
  --line: #ECE5DD;
  --brand: #E0435E;
  --brand-ink: #B92D47;
  --brand-soft: #FDE8EC;
  --gold: #F2A33A;
  --gold-ink: #B8730F;
  --gold-soft: #FEF1DD;
  --sky: #2F7DF6;
  --ok: #1E9E6A;
  --danger: #D64545;
  --scrim: rgba(18, 14, 12, .55);
  --shadow-1: 0 1px 2px rgba(26, 23, 20, .05), 0 6px 20px rgba(26, 23, 20, .06);
  --shadow-2: 0 2px 6px rgba(26, 23, 20, .08), 0 18px 48px rgba(26, 23, 20, .14);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --font-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --tab-h: 62px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131012;
    --surface: #1C181A;
    --surface-2: #252022;
    --surface-3: #2F292B;
    --ink: #F5EFE9;
    --ink-2: #D2C8C0;
    --muted: #918780;
    --line: #2F2A2C;
    --brand: #F0566F;
    --brand-ink: #FF8095;
    --brand-soft: #3B1C24;
    --gold-soft: #3A2B14;
    --gold-ink: #F5B65C;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .5), 0 18px 48px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.icon-verified { color: var(--sky); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; font-variation-settings: "opsz" 72; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; display: flex; }
.screen {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: var(--safe-t);
}
.has-tabs .screen { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
.page { padding: 8px 18px 28px; width: 100%; max-width: 560px; margin: 0 auto; }

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 14px;
  padding-top: calc(8px + var(--safe-t));
  margin-top: calc(-1 * var(--safe-t));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.appbar h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.appbar .title-sm { font-family: var(--font-ui); font-size: 17px; font-weight: 700; }
.appbar-inner { width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 23px; letter-spacing: -.02em; }

/* Bottom tabs (mobile) */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  position: relative;
  transition: color .2s;
}
.tab .icon { width: 25px; height: 25px; transition: transform .25s var(--ease); }
.tab.is-active { color: var(--ink); }
.tab.is-active .icon { transform: translateY(-1px); }

.tab:active .icon { transform: scale(.88); }
.dot-badge {
  position: absolute;
  top: 7px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.dot-badge:empty { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 10px; }

/* Side rail (desktop) */
.rail { display: none; }
@media (min-width: 960px) {
  .has-tabs .screen { padding-bottom: 0; }
  .tabbar { display: none; }
  .rail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100dvh;
    width: 260px;
    flex: none;
    padding: 26px 16px;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }
  .rail .brand { padding: 0 12px 26px; }
  .rail-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
    color: var(--ink-2);
    position: relative;
    transition: background .15s;
  }
  .rail-link:hover { background: var(--surface-2); }
  .rail-link.is-active { background: var(--brand-soft); color: var(--brand-ink); }
  .rail-link .dot-badge { position: static; margin-left: auto; box-shadow: none; }
  .rail-foot { margin-top: auto; padding: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
  .rail-foot a:hover { color: var(--ink); }
  .screen { background: var(--bg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: .005em;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-outline { border: 1.5px solid var(--line); background: var(--surface); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-ghost { color: var(--ink-2); }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.icon-btn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ink);
  transition: background .15s, transform .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.link { color: var(--brand-ink); font-weight: 700; }
.link:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 18px; }
.field > span, .label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; letter-spacing: .01em; }
.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  outline: none;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238C837B' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.input.is-invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 6px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.input-group { position: relative; }
.input-group .input { padding-right: 52px; }
.input-group .icon-btn { position: absolute; right: 5px; top: 5px; color: var(--muted); }
.counter { float: right; font-weight: 600; color: var(--muted); font-size: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dob-row { display: grid; grid-template-columns: 1fr 1.4fr 1.1fr; gap: 10px; }

/* Choice cards (radio styled as big tappable options) */
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  transition: border-color .15s, background .15s, transform .15s;
}
.choice-body small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.choice-body::after {
  content: "";
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
  transition: all .15s;
}
.choice input:checked + .choice-body { border-color: var(--ink); background: var(--surface-2); }
.choice input:checked + .choice-body::after { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px var(--surface); }
.choice input:focus-visible + .choice-body { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.choice:active .choice-body { transform: scale(.985); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  line-height: 1.3;
}
.chip .icon { width: 16px; height: 16px; color: var(--muted); }
label.chip { cursor: pointer; border: 1.5px solid transparent; transition: all .15s; user-select: none; }
label.chip input { display: none; }
label.chip:has(input:checked) { background: var(--ink); color: var(--bg); }
label.chip.is-on { background: var(--ink); color: var(--bg); }
.chip-brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip-gold { background: var(--gold-soft); color: var(--gold-ink); }

/* Switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 30px; background: var(--surface-3); transition: background .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(20px); }

/* Range (single + dual) */
.range-wrap { position: relative; height: 32px; }
.range-wrap input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 32px; }
.range-wrap input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: grab; position: relative; z-index: 2; }
.range-wrap input[type=range]::-moz-range-thumb { pointer-events: auto; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: grab; }
.range-track { position: absolute; left: 0; right: 0; top: 14px; height: 4px; border-radius: 4px; background: var(--surface-3); }
.range-fill { position: absolute; top: 14px; height: 4px; border-radius: 4px; background: var(--brand); }
.range-value { font-weight: 800; color: var(--ink); }

/* ---------- Lists & cards ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); }
.group { background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.group + .group { margin-top: 16px; }
.group-title { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 4px 10px; }
.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  min-height: 58px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  width: 100%;
  text-align: left;
}
.item:first-child { border-top: 0; }
a.item:hover, button.item:hover { background: var(--surface-2); }
.item .icon { color: var(--ink-2); }
.item .trail { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.item-danger, .item-danger .icon { color: var(--danger); }

.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--muted); font-size: 20px;
  position: relative;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.is-online::after {
  content: "";
  position: absolute; right: 1px; bottom: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px var(--bg);
}

.empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  gap: 12px;
}
.empty-art {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 6px;
}
.empty-art .icon { width: 40px; height: 40px; }
.empty h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.empty p { color: var(--muted); max-width: 300px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.notice .icon { color: var(--gold-ink); margin-top: 1px; }
.notice-brand { background: var(--brand-soft); }
.notice-brand .icon { color: var(--brand); }

.announcement {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--ink); color: var(--bg);
  font-size: 13.5px; font-weight: 600;
}

/* ---------- Welcome / auth ---------- */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(22px + var(--safe-t)) 22px calc(22px + var(--safe-b)); max-width: 520px; margin: 0 auto; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; }
.welcome-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 0; }
.welcome-hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(44px, 13vw, 64px); line-height: .98; letter-spacing: -.035em; font-variation-settings: "opsz" 144; }
.welcome-hero h1 em { font-style: italic; color: var(--brand); font-weight: 500; }
.welcome-hero .lede { margin-top: 20px; font-size: 17px; color: var(--ink-2); max-width: 380px; }
.welcome-points { display: grid; gap: 14px; margin-top: 34px; }
.welcome-point { display: flex; gap: 14px; align-items: flex-start; }
.welcome-point .pt-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); display: flex; align-items: center; justify-content: center; flex: none; color: var(--brand); }
.welcome-point b { display: block; font-size: 15px; }
.welcome-point span { color: var(--muted); font-size: 14px; }
.welcome-cta { display: grid; gap: 10px; }
.welcome-legal { text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; }
.welcome-legal a { text-decoration: underline; }

.stack-preview { position: relative; height: 170px; margin: 6px 0 4px; }
.stack-preview .sp {
  position: absolute;
  width: 116px; height: 156px;
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 10px;
  color: #fff; font-weight: 800; font-size: 13px;
}
.stack-preview .sp i { font-style: normal; font-weight: 600; opacity: .85; display: block; font-size: 11px; }
.sp-1 { left: 0; top: 14px; transform: rotate(-8deg); background: linear-gradient(160deg, #F7B267, #E0435E); }
.sp-2 { left: 92px; top: 0; transform: rotate(3deg); background: linear-gradient(160deg, #3D405B, #81B29A); z-index: 2; }
.sp-3 { left: 186px; top: 18px; transform: rotate(10deg); background: linear-gradient(160deg, #F2CC8F, #6D597A); }
.sp-heart { position: absolute; left: 166px; top: 116px; z-index: 3; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-2); display: flex; align-items: center; justify-content: center; color: var(--brand); }

.auth { min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; width: 100%; }
.auth-body { flex: 1; padding: 6px 22px calc(28px + var(--safe-b)); display: flex; flex-direction: column; }
.auth-title { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -.02em; margin: 8px 0 8px; }
.auth-sub { color: var(--muted); margin-bottom: 28px; }
.auth-foot { margin-top: auto; padding-top: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Onboarding ---------- */
.ob { min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; width: 100%; }
.ob-progress { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; flex: 1; }
.ob-progress i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .5s var(--ease); }
.ob-body { flex: 1; padding: 10px 22px 20px; display: flex; flex-direction: column; }
.ob-step { font-size: 12.5px; font-weight: 800; color: var(--brand-ink); letter-spacing: .06em; text-transform: uppercase; margin: 10px 0 8px; }
.ob-title { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin-bottom: 10px; }
.ob-sub { color: var(--muted); margin-bottom: 26px; }
.ob-foot { position: sticky; bottom: 0; padding: 14px 22px calc(16px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; gap: 10px; }

.city-list { max-height: 46dvh; overflow: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); margin-top: 10px; }
.city-opt { display: flex; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); cursor: pointer; font-weight: 700; }
.city-opt:first-child { border-top: 0; }
.city-opt small { color: var(--muted); font-weight: 600; }
.city-opt:hover, .city-opt.is-on { background: var(--surface-2); }
.city-opt.is-on { color: var(--brand-ink); }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-slot {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: var(--surface-2);
  border: 2px dashed var(--surface-3);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.photo-slot:first-child { grid-column: span 2; grid-row: span 2; }
.photo-slot.has-photo { border: 0; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .add { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--brand) 70%, transparent); }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot .ph-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; }
.photo-slot .ph-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); }
.photo-slot .ph-btn .icon { width: 16px; height: 16px; }
.photo-slot .ph-tag { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; }
.photo-slot .ph-tag.pending { background: var(--gold); color: #1a1714; }
.photo-slot.is-uploading::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23E0435E' stroke-width='5' stroke-dasharray='90 150' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") center no-repeat; }

/* ---------- Discover ---------- */
.discover { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.deck-wrap { flex: 1; position: relative; padding: 0 12px; display: flex; flex-direction: column; min-height: 420px; max-width: 520px; width: 100%; margin: 0 auto; }
.deck { position: relative; flex: 1; }
.pcard {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--shadow-2);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transform-origin: 50% 100%;
}
.pcard:not(.is-top) { pointer-events: none; }
.pcard.is-behind { transform: scale(.955) translateY(12px); }
.pcard.is-animating { transition: transform .38s var(--ease), opacity .38s; }
.pcard-photo { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: var(--surface-3); }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pcard-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; }
.pcard-bars i { flex: 1; height: 3.5px; border-radius: 3px; background: rgba(255,255,255,.38); }
.pcard-bars i.on { background: #fff; }
.pcard-tap { position: absolute; top: 0; bottom: 34%; width: 50%; z-index: 2; }
.pcard-tap.l { left: 0; }
.pcard-tap.r { right: 0; }
.pcard-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: linear-gradient(to top, rgba(10,8,8,.92) 0%, rgba(10,8,8,.55) 45%, transparent 100%); pointer-events: none; }
.pcard-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 20px; color: #fff; z-index: 3; cursor: pointer; }
.pcard-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.pcard-name .age { font-family: var(--font-ui); font-weight: 400; font-size: 28px; opacity: .95; }
.pcard-meta { margin-top: 7px; display: grid; gap: 3px; font-size: 14.5px; font-weight: 600; opacity: .92; }
.pcard-meta span { display: flex; align-items: center; gap: 6px; }
.pcard-meta .icon { width: 16px; height: 16px; opacity: .9; }
.pcard-bio { margin-top: 9px; font-size: 14.5px; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-pills { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill .icon { width: 13px; height: 13px; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3BD68A; }
.pill-brand { background: var(--brand); }
.pill-gold { background: var(--gold); color: #1A1714; }
.pcard-more { position: absolute; right: 16px; bottom: 22px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: #fff; z-index: 4; backdrop-filter: blur(8px); }
.stamp {
  position: absolute; top: 46px; z-index: 5;
  padding: 6px 14px;
  border: 4px solid; border-radius: 12px;
  font-weight: 900; font-size: 34px; letter-spacing: .06em;
  opacity: 0; pointer-events: none;
}
.stamp-like { left: 22px; color: #3BD68A; transform: rotate(-14deg); }
.stamp-nope { right: 22px; color: #FF5A6E; transform: rotate(14deg); }
.stamp-super { left: 50%; top: auto; bottom: 34%; color: var(--gold); transform: translateX(-50%) rotate(-6deg); }

.deck-actions { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 0 14px; }
.act {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform .18s var(--ease), box-shadow .2s;
}
.act:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.act:active { transform: scale(.9); }
.act-sm { width: 50px; height: 50px; }
.act-lg { width: 66px; height: 66px; }
.act-rewind { color: var(--gold); }
.act-pass { color: var(--ink-2); }
.act-super { color: var(--sky); }
.act-like { background: var(--brand); color: #fff; box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand) 75%, transparent); }
.act-like .icon, .act-pass .icon { width: 30px; height: 30px; }
.act-like .icon path { fill: currentColor; }
.act-super .icon path { fill: currentColor; }
.act[disabled] { opacity: .4; pointer-events: none; }

.deck-empty { position: absolute; inset: 0; border-radius: var(--r-lg); border: 2px dashed var(--line); display: flex; }
.deck-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pulse { width: 92px; height: 92px; border-radius: 50%; background: var(--brand-soft); position: relative; display: flex; align-items: center; justify-content: center; color: var(--brand); }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); animation: pulse 1.8s var(--ease) infinite; }
.pulse::after { animation-delay: .9s; }
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(2.2); opacity: 0; } }

/* ---------- Full profile ---------- */
.profile-view { padding-bottom: 120px; }
.pv-gallery { position: relative; aspect-ratio: 4 / 5; background: var(--surface-3); overflow: hidden; }
.pv-gallery .pv-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pv-gallery .pv-track::-webkit-scrollbar { display: none; }
.pv-gallery img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.pv-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pv-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .2s; }
.pv-dots i.on { background: #fff; width: 20px; border-radius: 4px; }
.pv-head { padding: 20px 20px 4px; }
.pv-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.pv-name .age { font-family: var(--font-ui); font-weight: 400; font-size: 30px; color: var(--ink-2); }
.pv-meta { margin-top: 8px; display: grid; gap: 4px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.pv-meta span { display: flex; align-items: center; gap: 8px; }
.pv-meta .icon { width: 17px; height: 17px; color: var(--muted); }
.pv-section { padding: 18px 20px 4px; }
.pv-section h3 { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.pv-bio { font-size: 16px; color: var(--ink); white-space: pre-line; }
.prompt-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 20px; margin: 0 20px 12px; }
.prompt-card .q { font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 8px; }
.prompt-card .a { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.pv-actions { position: fixed; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(16px + var(--safe-b)); display: flex; justify-content: center; gap: 18px; background: linear-gradient(to top, var(--bg) 55%, transparent); z-index: 30; }
.has-tabs .pv-actions { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 14px; }
@media (min-width: 960px) { .has-tabs .pv-actions { bottom: 0; left: 260px; } }
.pv-safety { display: flex; justify-content: center; gap: 22px; padding: 22px 20px 10px; }
.pv-safety button { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 13.5px; }

/* ---------- Sheets, modals, toasts ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: var(--scrim); z-index: 80; opacity: 0; transition: opacity .25s; }
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 81;
  max-height: 92dvh;
  overflow: auto;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(22px + var(--safe-b));
  transform: translateY(100%);
  transition: transform .34s var(--ease);
  box-shadow: var(--shadow-2);
}
.sheet.is-open { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 5px; background: var(--surface-3); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.sheet .sheet-sub { color: var(--muted); margin-bottom: 18px; }
.sheet-full { padding: 0; border-radius: 26px 26px 0 0; height: 94dvh; max-height: 94dvh; }
.sheet-full .sheet-close { position: absolute; top: 12px; right: 12px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; width: 480px; bottom: 50%; border-radius: 26px; transform: translate(-50%, 60%) scale(.96); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
  .sheet.is-open { transform: translate(-50%, 50%); opacity: 1; }
  .sheet-full { height: 86dvh; max-height: 86dvh; }
  .sheet-grip { display: none; }
}

.toasts { position: fixed; left: 0; right: 0; top: calc(12px + var(--safe-t)); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  pointer-events: auto;
  max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-2);
  animation: toast-in .35s var(--ease);
}
.toast.is-error .icon { color: #FF8A99; }
.toast.is-success .icon { color: #5BE0A0; }
.toast.is-leaving { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { transform: translateY(-16px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-16px); opacity: 0; } }

/* Match celebration */
.match-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 26px calc(30px + var(--safe-b));
  background: radial-gradient(120% 80% at 50% 20%, #3A1420 0%, #120C0E 70%);
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity .3s;
}
.match-overlay.is-open { opacity: 1; }
.match-title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(52px, 15vw, 76px); line-height: .95; letter-spacing: -.03em; color: #FF8095; transform: scale(.7); opacity: 0; transition: all .55s cubic-bezier(.2, 1.4, .3, 1) .1s; }
.match-overlay.is-open .match-title { transform: none; opacity: 1; }
.match-sub { margin-top: 12px; opacity: .8; font-size: 16px; }
.match-faces { display: flex; justify-content: center; margin: 38px 0 44px; }
.match-faces .mf { width: 128px; height: 128px; border-radius: 50%; border: 4px solid #fff; overflow: hidden; background: #2a2224; box-shadow: 0 18px 40px rgba(0,0,0,.5); transition: transform .6s cubic-bezier(.2, 1.3, .3, 1) .2s; display:flex; align-items:center; justify-content:center; font-size: 40px; font-weight: 800; }
.match-faces .mf img { width: 100%; height: 100%; object-fit: cover; }
.match-faces .mf:first-child { transform: translateX(-60px) rotate(-14deg); margin-right: -18px; }
.match-faces .mf:last-child { transform: translateX(60px) rotate(14deg); margin-left: -18px; }
.match-overlay.is-open .mf:first-child { transform: rotate(-8deg); }
.match-overlay.is-open .mf:last-child { transform: rotate(8deg); }
.match-overlay .btn { width: 100%; max-width: 340px; }
.match-overlay .btn + .btn { margin-top: 10px; }
.match-overlay .btn-ghost { color: rgba(255,255,255,.8); }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Install prompt */
.install { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.install-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow-1); flex: none; }
.install-steps { display: grid; gap: 10px; margin: 6px 0 18px; }
.install-steps div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; }
.install-steps b { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.install-steps .icon { color: var(--sky); }

/* ---------- Likes ---------- */
.likes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px 16px 24px; max-width: 560px; margin: 0 auto; width: 100%; }
.like-tile { position: relative; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-1); display: block; }
.like-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.like-tile:hover img { transform: scale(1.03); }
.like-tile .lt-shade { position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(to top, rgba(10,8,8,.85), transparent); }
.like-tile .lt-info { position: absolute; left: 12px; right: 12px; bottom: 11px; color: #fff; }
.like-tile .lt-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 5px; }
.like-tile .lt-sub { font-size: 12.5px; opacity: .85; font-weight: 600; }
.like-tile .lt-badge { position: absolute; top: 10px; left: 10px; }
.likes-hero { margin: 4px 16px 16px; padding: 18px; border-radius: var(--r); background: var(--brand-soft); display: flex; gap: 14px; align-items: center; max-width: 528px; }
@media (min-width: 560px) { .likes-hero { margin-left: auto; margin-right: auto; } }
.likes-hero .lh-num { font-family: var(--font-display); font-size: 40px; font-weight: 600; color: var(--brand-ink); line-height: 1; }
.likes-hero p { font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* ---------- Matches & chat ---------- */
.new-matches { display: flex; gap: 14px; overflow-x: auto; padding: 4px 18px 18px; scrollbar-width: none; }
.new-matches::-webkit-scrollbar { display: none; }
.nm { flex: none; width: 76px; text-align: center; font-size: 13px; font-weight: 700; }
.nm .nm-ph { width: 76px; height: 98px; border-radius: 16px; overflow: hidden; background: var(--surface-3); margin-bottom: 6px; position: relative; display:flex; align-items:center; justify-content:center; font-size: 26px; font-weight: 800; color: var(--muted); }
.nm .nm-ph img { width: 100%; height: 100%; object-fit: cover; }
.nm.is-new .nm-ph { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 5px var(--brand); }
.nm-count { flex: none; width: 76px; }
.nm-count .nm-ph { background: var(--gold-soft); color: var(--gold-ink); flex-direction: column; font-size: 22px; }

.convos { padding: 0 8px 20px; max-width: 560px; margin: 0 auto; width: 100%; }
.convo { display: flex; align-items: center; gap: 14px; padding: 11px 10px; border-radius: 16px; transition: background .15s; }
.convo:hover { background: var(--surface-2); }
.convo-body { flex: 1; min-width: 0; }
.convo-top { display: flex; align-items: baseline; gap: 6px; }
.convo-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 5px; }
.convo-time { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; flex: none; }
.convo-last { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.convo.is-unread .convo-last { color: var(--ink); font-weight: 700; }
.convo-unread { min-width: 22px; height: 22px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.your-turn { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); margin-left: 6px; }

.chat { display: flex; flex-direction: column; height: 100dvh; max-width: 680px; margin: 0 auto; width: 100%; }
.has-tabs .chat { height: 100dvh; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; padding-top: calc(8px + var(--safe-t)); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.chat-head .avatar { width: 40px; height: 40px; font-size: 15px; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who b { display: flex; align-items: center; gap: 5px; font-size: 16px; }
.chat-head .who small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.chat-head .who small.on { color: var(--ok); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.chat-intro { text-align: center; padding: 24px 10px 30px; }
.chat-intro .avatar { width: 96px; height: 96px; margin: 0 auto 14px; font-size: 34px; }
.chat-intro h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.chat-intro p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.icebreakers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.icebreakers button { padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.icebreakers button:hover { border-color: var(--ink-2); }
.msg-day { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 0 8px; }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; }
.bubble { padding: 10px 15px; border-radius: 20px; font-size: 15.5px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.theirs .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.mine .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.msg.mine + .msg.mine .bubble { border-top-right-radius: 8px; }
.msg.theirs + .msg.theirs .bubble { border-top-left-radius: 8px; }
.msg.removed .bubble { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); font-style: italic; }
.msg-meta { font-size: 11px; color: var(--muted); font-weight: 600; margin: 3px 6px 8px; }
.msg.pending .bubble { opacity: .6; }
.msg.failed .bubble { background: var(--danger); }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.chat-compose textarea { flex: 1; resize: none; min-height: 46px; max-height: 140px; padding: 12px 18px; border-radius: 23px; border: 1.5px solid var(--line); background: var(--surface); outline: none; font-size: 16px; line-height: 1.35; }
.chat-compose textarea:focus { border-color: var(--ink-2); }
.send-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; transition: transform .15s, opacity .15s; }
.send-btn:disabled { opacity: .35; }
.send-btn:active { transform: scale(.9); }
.chat-ended { padding: 16px; text-align: center; color: var(--muted); font-weight: 600; border-top: 1px solid var(--line); }
.safety-tip { margin: 0 auto 12px; max-width: 420px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); font-weight: 600; }
.safety-tip .icon { color: var(--ok); flex: none; }

/* ---------- Own profile ---------- */
.me-head { display: flex; flex-direction: column; align-items: center; padding: 10px 20px 22px; text-align: center; }
.me-photo { position: relative; width: 132px; height: 132px; }
.me-photo .avatar { width: 132px; height: 132px; font-size: 44px; }
.ring { position: absolute; inset: -8px; }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.me-pct { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.me-name { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-top: 22px; display: flex; align-items: center; gap: 7px; }
.me-actions { display: flex; gap: 10px; margin-top: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---------- Static pages ---------- */
.prose { padding: 4px 20px 40px; max-width: 680px; margin: 0 auto; color: var(--ink-2); }
.prose h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); margin: 26px 0 8px; }
.prose p, .prose li { margin-bottom: 10px; font-size: 15.5px; }
.prose ul { padding-left: 20px; margin: 0 0 10px; }
.prose .updated { font-size: 13px; color: var(--muted); }

/* ---------- Error ---------- */
.error-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; gap: 12px; }
.error-page .code { font-family: var(--font-display); font-size: 88px; font-weight: 500; font-style: italic; color: var(--brand); line-height: 1; }
.error-page h1 { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.error-page p { color: var(--muted); max-width: 340px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Refinements ---------- */
.pcard-info { padding-right: 64px; }
.sheet .pv-actions { bottom: 0 !important; left: 0 !important; padding-bottom: calc(16px + var(--safe-b)); }
.sp-3 { justify-content: flex-end; text-align: right; }
input[type=file].input { cursor: pointer; color: var(--muted); font-size: 14px; }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 800; font-size: 13px;
  border: 0; border-radius: 999px; padding: 7px 14px; margin-right: 12px;
  background: var(--ink); color: var(--bg); cursor: pointer;
}
@media (min-width: 960px) {
  .discover { max-height: 100dvh; }
  .deck-wrap { max-width: 460px; }
  .deck { max-height: 700px; }
}

/* ---------- Brand ---------- */
.brand-mark { width: 34px; height: 34px; }
.brand-word i { font-style: italic; font-weight: 500; color: var(--brand); padding-right: .04em; }
.art { width: 200px; max-width: 70%; height: auto; margin-bottom: 4px; }
.sp .sp-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp > span { position: relative; z-index: 1; }
.sp-2 { background: linear-gradient(165deg, #2E3250, #3F7766); }
.sp-heart { display: none; }
.sp-seal {
  position: absolute; left: 160px; top: 104px; z-index: 3;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-2);
  display: flex; align-items: center; justify-content: center;
  animation: seal-in .8s cubic-bezier(.2, 1.4, .3, 1) .2s both;
}
.sp-seal .brand-mark { width: 44px; height: 44px; }
@keyframes seal-in { from { transform: scale(.4) rotate(-30deg); opacity: 0; } }
.brand-word i { margin-left: -.07em; }
.tab-seal .s, .tab-seal .h { transition: fill .2s, stroke .2s; }
.is-active > .tab-seal .s { fill: var(--brand); stroke: var(--brand); }
.is-active > .tab-seal .h { fill: #fff; }

/* ---------- Push prompt ---------- */
.push-card {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 16px 14px; padding: 12px 8px 12px 14px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  max-width: 528px;
}
@media (min-width: 560px) { .push-card { margin-left: auto; margin-right: auto; } }
.push-card .pc-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; }
.push-card .pc-text { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.push-card .pc-text b { display: block; color: var(--ink); font-size: 14.5px; }
.push-card .btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.push-card .pc-x { width: 32px; height: 32px; color: var(--muted); }

/* ---------- Verification ---------- */
.verify-hero { text-align: center; padding: 14px 6px 22px; }
.vh-badge { width: 76px; height: 76px; border-radius: 50%; background: color-mix(in srgb, var(--sky) 12%, transparent); display: inline-flex; align-items: center; justify-content: center; }
.pose-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px; box-shadow: var(--shadow-1); }
.pose-card small { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.pose-text { font-family: var(--font-display); font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 8px 0 16px; }
.pose-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.pose-tips li { display: flex; gap: 8px; align-items: center; }
.pose-tips .icon { color: var(--ok); }

/* ---------- Landing: desktop ---------- */
.welcome-art { display: flex; justify-content: center; padding-top: 26px; }
.welcome-hero { padding-top: 10px; }
.welcome-foot { display: none; }
@media (min-width: 960px) {
  .welcome {
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "top top" "hero art" "cta art" "foot foot";
    grid-template-rows: auto 1fr auto auto;
    column-gap: 60px;
    padding: 34px 48px 28px;
  }
  .welcome-top { grid-area: top; }
  .welcome-hero { grid-area: hero; justify-content: flex-end; padding: 40px 0 10px; }
  .welcome-hero h1 { font-size: 84px; }
  .welcome-hero .lede { font-size: 19px; max-width: 470px; }
  .welcome-points { grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
  .welcome-point { flex-direction: column; gap: 10px; }
  .welcome-cta { grid-area: cta; grid-template-columns: auto auto; justify-content: start; padding-top: 30px; }
  .welcome-cta .btn-block { width: auto; padding: 0 30px; }
  .welcome-legal { grid-column: 1 / -1; text-align: left; }
  .welcome-art { grid-area: art; align-items: center; padding: 0; }
  .welcome-art .stack-preview { transform: scale(1.7); transform-origin: center; width: 302px; }
  .welcome-foot { grid-area: foot; display: flex; justify-content: space-between; padding-top: 34px; margin-top: 30px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .welcome-foot nav { display: flex; gap: 22px; }
  .welcome-foot a:hover { color: var(--ink); }
}
.welcome-art .stack-preview { width: 302px; flex: none; }

/* ---------- AI photo disclosure ---------- */
.pill-ai { background: rgba(20, 16, 18, .55); }
.ai-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ai-note .icon { color: var(--gold); }
.lt-ai { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .45); }

/* ---------- Motion ---------- */
/* Deck: the card flying away stays above the card taking its place. */
.pcard.is-behind { z-index: 1; }
.pcard.is-top { z-index: 2; }
.pcard.is-leaving { z-index: 3; pointer-events: none; }
.pcard.is-leaving.is-animating { transition: transform .5s cubic-bezier(.3, .6, .35, 1), opacity .5s; }
.pcard.is-entering { animation: card-in .4s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: scale(.9) translateY(26px); } }
.stamp { transition: opacity .12s; }

/* Action buttons: exact circles, press pop and a ripple ring. */
.act { position: relative; flex: none; aspect-ratio: 1; padding: 0; }
.act .icon { transition: transform .2s var(--ease); }
.act::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid currentColor; opacity: 0; pointer-events: none;
}
.act-like::after { border-color: var(--brand); }
.act.is-hot { transform: scale(1.1); box-shadow: var(--shadow-2); }
.act.is-hot .icon { transform: scale(1.12); }
.act.is-pop { animation: act-pop .5s cubic-bezier(.3, 1.5, .5, 1); }
.act.is-pop::after { animation: act-ring .6s ease-out; }
.act-rewind.is-pop .icon { animation: act-spin .5s var(--ease); }
.act-super.is-pop .icon { animation: act-rise .5s var(--ease); }
.act-like.is-pop .icon { animation: act-beat .5s var(--ease); }
@keyframes act-pop { 0% { transform: scale(1); } 30% { transform: scale(.84); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes act-ring { from { opacity: .55; transform: scale(1); } to { opacity: 0; transform: scale(1.65); } }
@keyframes act-spin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes act-rise { 40% { transform: translateY(-5px) scale(1.2) rotate(18deg); } }
@keyframes act-beat { 30% { transform: scale(1.28); } 55% { transform: scale(.95); } 75% { transform: scale(1.08); } }

/* Big reaction burst (profile page like/pass/super like). */
.burst {
  position: fixed; left: 50%; top: 45%; z-index: 90; pointer-events: none;
  width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--brand); filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .3));
  animation: burst 0.9s cubic-bezier(.3, 1.4, .5, 1) both;
}
.burst .icon { width: 64px; height: 64px; }
.burst .icon path { fill: currentColor; }
.burst-pass { background: var(--surface); color: var(--ink-2); }
.burst-pass .icon path { fill: none; }
.burst-superlike { background: var(--sky); }
@keyframes burst {
  0% { transform: scale(.2); opacity: 0; }
  35% { transform: scale(1.08); opacity: 1; }
  55% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Lists and messages ease in instead of popping. */
.like-tile { animation: rise-in .45s var(--ease) both; }
.likes-grid .like-tile:nth-child(2) { animation-delay: .04s; }
.likes-grid .like-tile:nth-child(3) { animation-delay: .08s; }
.likes-grid .like-tile:nth-child(4) { animation-delay: .12s; }
.likes-grid .like-tile:nth-child(5) { animation-delay: .16s; }
.likes-grid .like-tile:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.msg.is-new { animation: msg-in .32s var(--ease) both; }
.msg.mine.is-new { transform-origin: 100% 100%; }
.msg.theirs.is-new { transform-origin: 0 100%; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.92); } }
.photo-slot.is-new { animation: rise-in .4s var(--ease) both; }
.photo-slot.is-removing { transition: transform .22s var(--ease), opacity .22s; transform: scale(.85); opacity: 0; }
.send-btn:not(:disabled):active .icon { transform: translateX(3px) rotate(-12deg); }
.send-btn .icon { transition: transform .15s; }
.dot-badge:not(.hidden) { animation: badge-in .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes badge-in { from { transform: scale(0); } }

/* ---------- Circle and alignment fixes ---------- */
.icon-btn, .pcard-more, .vh-badge, .ph-btn, .sheet-close { flex: none; aspect-ratio: 1; }
.pcard-more { transition: transform .15s var(--ease), background .2s; }
.pcard-more:active { transform: scale(.9); }

/* Profile completion ring: the SVG must be sized explicitly, an absolutely
   positioned SVG doesn't stretch to its insets. */
.me-photo { flex: none; margin-top: 8px; }
.me-photo .avatar { position: absolute; inset: 0; overflow: hidden; }
.ring { inset: auto; left: -9px; top: -9px; width: calc(100% + 18px); height: calc(100% + 18px); overflow: visible; }
.ring .val { animation: ring-fill 1.1s var(--ease) .15s both; }
@keyframes ring-fill { from { stroke-dashoffset: var(--circ); } }
.me-pct { bottom: -20px; box-shadow: 0 0 0 3px var(--bg); line-height: 1.35; }
.me-name { margin-top: 30px; }

.stat { padding: 14px 6px; }
.stat span { display: block; line-height: 1.3; }

/* Push prompt: text gets the full width on small phones. */
@media (max-width: 420px) {
  .push-card { display: grid; grid-template-columns: 40px 1fr 32px; column-gap: 12px; row-gap: 10px; padding: 12px 8px 12px 14px; }
  .push-card .pc-ico { grid-row: 1; grid-column: 1; }
  .push-card .pc-text { grid-row: 1; grid-column: 2; }
  .push-card .pc-x { grid-row: 1; grid-column: 3; align-self: start; }
  .push-card [data-push-enable] { grid-row: 2; grid-column: 2; justify-self: start; }
}
