/* PinkDate Mini App — single stylesheet. Themes are pure token swaps on <html data-theme>. */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120b10;
  --bg-glow: #3a1229;
  --surface: #1e1219;
  --surface-2: #2a1823;
  --surface-3: #352030;
  --line: #3b2331;
  --text: #fbeff5;
  --muted: #b99aab;
  --faint: #9b7b8c;
  --accent: #ff3d8b;
  --accent-strong: #e0226f;   /* filled buttons: white text keeps 4.5:1 contrast */
  --accent-2: #ff9ec4;
  --accent-ink: #ffffff;
  --accent-soft: #ff3d8b22;
  --danger: #ff6b7d;
  --ok: #5fd39a;
  --scrim: linear-gradient(180deg, #0000 40%, #120b10e6 100%);
  --nav-bg: #160d13;
  --shadow: 0 10px 28px #0000004d;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fff4f8;
  --bg-glow: #ffd6e7;
  --surface: #ffffff;
  --surface-2: #fde6ef;
  --surface-3: #f9d4e3;
  --line: #f2ccdc;
  --text: #3a1427;
  --muted: #8c5a72;
  --faint: #8f6479;
  --accent: #e3196f;
  --accent-strong: #e3196f;
  --accent-2: #c2185b;
  --accent-ink: #ffffff;
  --accent-soft: #e3196f1a;
  --danger: #c62844;
  --ok: #1d8a57;
  --scrim: linear-gradient(180deg, #0000 40%, #2a0d1cd9 100%);
  --nav-bg: #fffafc;
  --shadow: 0 10px 26px #8a2c541a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--text);
  background: radial-gradient(120% 50% at 50% -12%, var(--bg-glow) 0, transparent 60%), var(--bg);
  font: 500 15.5px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1; letter-spacing: -.005em; overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 10px; }
img { display: block; max-width: 100%; }
a { color: var(--accent-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.display { font-weight: 750; letter-spacing: -.02em; }
strong, b, h1, h2, h3 { font-weight: 700; }
.ico { width: 22px; height: 22px; flex: none; }

/* ---------- shell ---------- */
.app {
  max-width: 560px; margin: 0 auto;
  padding: calc(12px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)) 16px
           calc(96px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 10px; }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -.035em; }
.wordmark b { color: var(--accent); font-weight: 800; }
.page-title { font-size: 24px; margin: 4px 0 14px; }
.subtle { color: var(--muted); }
.small { font-size: 13px; }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--text); }
.icon-btn:active { background: var(--surface-2); }

.bottom-nav {
  position: fixed; z-index: 40; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 560px); display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--nav-bg); border-top: 1px solid var(--line); transform: translate3d(-50%, 0, 0);
}
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 52px; justify-content: center; color: var(--faint); font-size: 11px; font-weight: 600; border-radius: 14px; }
.nav-item[aria-current="page"] { color: var(--accent); }
.nav-item[aria-current="page"] .ico { fill: var(--accent-soft); }
.badge {
  position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent-strong); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg);
}
.badge[hidden] { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 16px; font-weight: 700;
  background: var(--surface-2); color: var(--text); transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent-strong); color: var(--accent-ink); box-shadow: 0 10px 24px var(--accent-soft); }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }
.btn-block { width: 100%; }
.btn-sm { min-height: 42px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
.link-btn { color: var(--accent-2); font-weight: 600; min-height: 44px; }

/* ---------- forms ---------- */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, textarea.input {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; margin: 6px 0 0; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-3); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px #0004; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.segmented button { min-height: 44px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

/* ---------- list rows ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
button.row:active { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .grow small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 12.5px; }
.row .value { color: var(--muted); font-size: 13px; }
.row .ico.lead { color: var(--accent-2); }
.row .chev { color: var(--faint); width: 18px; height: 18px; }
.section-label { font-size: 13px; color: var(--muted); margin: 18px 4px 8px; font-weight: 600; }
.pill-premium { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 8px; }

/* ---------- deck card ---------- */
.deck-wrap { position: relative; }
.card {
  position: relative; border-radius: 28px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); touch-action: pan-y; user-select: none;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
.card.dragging { transition: none; }
.card-photo { position: relative; aspect-ratio: 4 / 5; max-height: min(62dvh, max(260px, calc(100dvh - 340px))); width: 100%; background: var(--surface-2); }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.card-photo img.loaded { opacity: 1; }
.card-photo .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.card-photo .placeholder .ico { width: 56px; height: 56px; }
.card-photo::after { content: ""; position: absolute; inset: 0; background: var(--scrim); pointer-events: none; }
.photo-bars { position: absolute; z-index: 2; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.photo-bars i { flex: 1; height: 3px; border-radius: 2px; background: #ffffff59; }
.photo-bars i.on { background: #fff; }
.tap-zone { position: absolute; z-index: 2; top: 0; bottom: 30%; width: 40%; }
.tap-zone.left { left: 0; } .tap-zone.right { right: 0; }
.card-name { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; color: #fff; }
.card-name h2 { margin: 0; font-size: 28px; line-height: 1.1; text-shadow: 0 2px 12px #0006; overflow-wrap: anywhere; }
.card-name p { margin: 6px 0 0; display: flex; align-items: center; gap: 6px; font-size: 14px; opacity: .92; }
.card-name p .ico { width: 16px; height: 16px; }
.verified-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 3px 8px 3px 6px; border-radius: 999px;
  background: #16a34a; color: #fff; font-weight: 700; font-size: 12px; line-height: 1; letter-spacing: .02em; vertical-align: 5px; white-space: nowrap; }
.verified-badge .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.empty .verified-badge { margin: 0 auto 12px; vertical-align: 0; font-size: 14px; padding: 6px 12px; }
.empty .verified-badge .ico { width: 15px; height: 15px; margin: 0; color: #fff; }

/* verification recorder */
.verify-steps { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px 16px; margin-bottom: 8px; }
.verify-steps p { margin: 10px 0; color: var(--muted); line-height: 1.45; }
.verify-steps b { color: var(--accent); margin-right: 4px; }
.verify-say { text-align: center; color: var(--muted); margin: 4px 0 0; }
.verify-code { text-align: center; font-size: 46px; font-weight: 800; letter-spacing: .18em; padding-left: .18em; color: var(--text); margin: 2px 0 14px; font-variant-numeric: tabular-nums; }
.verify-circle { position: relative; width: min(72vw, 280px); aspect-ratio: 1; margin: 0 auto 10px; border-radius: 50%; overflow: hidden;
  background: var(--surface-2); box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.verify-circle video { width: 100%; height: 100%; object-fit: cover; display: block; }
.verify-circle video.mirror { transform: scaleX(-1); }
.verify-timer { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #000a; color: #fff; font-weight: 700;
  font-size: 13px; padding: 4px 10px 4px 22px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.verify-timer::before { content: ''; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #ff3b3b; animation: rec 1s infinite; }
@keyframes rec { 50% { opacity: .2; } }
.verify-circle + .hint { text-align: center; }

/* example (demo) profiles */
.demo-list { display: grid; gap: 12px; margin-top: 8px; }
.demo-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.demo-photo { flex: 0 0 72px; height: 88px; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.demo-photo img { width: 100%; height: 100%; object-fit: cover; }
.demo-photo span { font-size: 26px; font-weight: 700; color: var(--accent); }
.demo-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.demo-info small { color: var(--muted); }
.demo-info p { margin: 4px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.demo-tag { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--faint); background: var(--surface-2); padding: 2px 8px; border-radius: 8px; margin-bottom: 2px; }
.card-body { padding: 14px 18px 18px; }
.card-body .bio { margin: 0 0 12px; white-space: pre-line; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 6px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; }
.tag.shared { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; }
.meta-line { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.stamp { position: absolute; z-index: 3; top: 28px; padding: 6px 14px; border-radius: 12px; border: 3px solid; font-weight: 800; font-size: 22px; opacity: 0; transform: rotate(-12deg); }
.stamp.like { left: 22px; color: var(--accent); }
.stamp.pass { right: 22px; color: #fff; transform: rotate(12deg); }

.actions { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 16px 0 6px; }
/* Like / pass stay above the bottom bar on short phones even when the card is taller than the screen. */
.deck-wrap .actions { position: sticky; z-index: 6; bottom: calc(72px + env(safe-area-inset-bottom)); margin-bottom: 0; padding: 6px 0; }
.round { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .12s; }
.round:active { transform: scale(.92); }
.round.like { width: 74px; height: 74px; background: var(--accent-strong); border: 0; color: #fff; }
.round.like .ico { width: 32px; height: 32px; fill: #fff; }
.round.small { width: 48px; height: 48px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.filter-chip[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; color: var(--accent); margin: 0 auto 10px; }
.empty h2 { color: var(--text); font-size: 20px; margin: 0 0 6px; }
/* Placeholder only shows up when loading is genuinely slow (> 0.6 s); fast loads go straight to content. */
.skeleton { background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%;
  animation: skeleton-in .3s ease .6s both, shimmer 1.2s linear .6s infinite; border-radius: 18px; }
@keyframes skeleton-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- likes ---------- */
.like-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.like-tile { display: block; text-align: left; min-width: 0; }
.like-tile button.pic { display: block; width: 100%; }
.like-tile .pic { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.like-tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.like-tile .pic .lock { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #0000008c; color: #fff; }
.like-tile .pic .lock .ico { width: 15px; height: 15px; }
.like-tile .pic .super { position: absolute; left: 6px; top: 6px; }
.like-tile strong { display: block; margin-top: 6px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like-tile small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like-tile .tile-actions { display: flex; gap: 6px; margin-top: 6px; }
.like-tile .tile-actions button { flex: 1; min-height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.like-tile .tile-actions button.yes { background: var(--accent-strong); color: #fff; }
.like-tile .tile-actions .ico { width: 18px; height: 18px; }
.upsell { margin-top: 18px; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--accent); text-align: center; }
.upsell h3 { margin: 0 0 6px; font-size: 17px; }
.upsell p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

/* ---------- chats ---------- */
.chat-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 4px; text-align: left; border-bottom: 1px solid var(--line); }
.avatar { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--accent-2); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chat-row .grow { flex: 1; min-width: 0; }
.chat-row strong { display: block; }
.chat-row small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.chat-row .when { font-size: 11.5px; color: var(--faint); align-self: flex-start; margin-top: 4px; }
.unread { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.new-matches { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.new-matches button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; flex: none; font-size: 12px; }
.new-matches .avatar { width: 60px; height: 60px; box-shadow: 0 0 0 2px var(--accent); }
.new-matches span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-screen { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); max-width: 560px; margin: 0 auto; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)) 8px 8px; border-bottom: 1px solid var(--line); background: var(--nav-bg); }
.chat-head .avatar { width: 40px; height: 40px; }
.chat-head .grow { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.messages { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 20px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bubble:not(.mine) { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble time { display: block; font-size: 10.5px; opacity: .7; margin-top: 2px; text-align: right; }
.bubble.pending { opacity: .6; }
.day-sep { align-self: center; font-size: 12px; color: var(--faint); margin: 8px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--nav-bg); }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.composer .send { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.composer .send:disabled { opacity: .4; }
.chat-closed { text-align: center; color: var(--muted); padding: 14px; border-top: 1px solid var(--line); }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; margin: 4px 0 16px; }
.profile-head .avatar { width: 92px; height: 92px; font-size: 34px; box-shadow: 0 0 0 3px var(--accent); }
.profile-head h1 { margin: 0; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.profile-head p { margin: 4px 0 0; color: var(--muted); }
.bio-card { display: block; width: 100%; text-align: left; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px dashed var(--line); margin-bottom: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.bio-card.empty-bio { color: var(--muted); }
.banner { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: var(--accent-soft); margin-bottom: 16px; }
.banner .grow { flex: 1; }
.banner p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* photo picker: the camera circle shows the chosen image inside it */
.photo-picker { display: flex; align-items: center; gap: 16px; margin: 18px 0 8px; }
.photo-circle {
  position: relative; width: 96px; height: 96px; flex: none; border-radius: 50%; overflow: hidden;
  border: 2px dashed var(--accent); background: var(--surface); color: var(--accent); display: grid; place-items: center;
}
.photo-circle .ico { width: 32px; height: 32px; }
.photo-circle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-circle.has-image { border-style: solid; }
.photo-circle:disabled { opacity: .5; }
.photo-side { flex: 1; min-width: 0; }
.photo-side p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.photo-cell { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-cell .state { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 700; background: #000000a6; color: #fff; }
.photo-cell .del { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border-radius: 50%; background: #000000a6; color: #fff; display: grid; place-items: center; }
.photo-cell .del .ico { width: 16px; height: 16px; }

/* interests & games */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 650; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.game { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 650; text-align: center; min-height: 92px; }
.game[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.game .logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--surface-3); font-weight: 800; font-size: 13px; color: var(--accent-2); }
.game .logo img { width: 100%; height: 100%; object-fit: contain; }
.sticky-save { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); padding-top: 12px; background: linear-gradient(180deg, transparent, var(--bg) 35%); }

/* premium */
.premium-hero { position: relative; padding: 22px 18px; border-radius: 26px; background: linear-gradient(150deg, var(--accent) 0%, #7a1446 100%); color: #fff; overflow: hidden; margin-bottom: 18px; }
.premium-hero h2 { margin: 0 0 6px; font-size: 26px; }
.premium-hero p { margin: 0; opacity: .9; }
.premium-hero .price { margin-top: 16px; display: flex; align-items: baseline; gap: 8px; }
.premium-hero .price strong { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.premium-hero .status { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 12px; background: #ffffff2b; font-weight: 650; font-size: 13px; }
.benefit { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.benefit + .benefit { border-top: 1px solid var(--line); }
.benefit .ico { color: var(--accent); margin-top: 2px; }
.benefit small { display: block; color: var(--muted); font-size: 13px; }
.footnote { font-size: 12px; color: var(--faint); text-align: center; margin: 10px 0 0; }

/* onboarding */
.onboard { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; padding-top: 12px; }
.onboard h1 { font-size: 26px; margin: 26px 0 8px; line-height: 1.15; }
.onboard > p { color: var(--muted); margin: 0 0 10px; }
.steps { display: flex; gap: 6px; margin-top: 18px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: var(--surface-3); }
.steps i.on { background: var(--accent); }
.onboard .bottom { margin-top: auto; padding-top: 20px; }

/* sheets, toasts */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: #0000009e; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { width: min(100%, 560px); max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); animation: rise .2s cubic-bezier(.2,.8,.2,1); }
.sheet .grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.sheet .actions-col { display: grid; gap: 10px; margin-top: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: .4; } }
.match-burst { text-align: center; padding: 10px 0 4px; }
.match-burst .pair { display: flex; justify-content: center; margin: 10px 0 16px; }
.match-burst .pair .avatar { width: 88px; height: 88px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.match-burst .pair .avatar + .avatar { margin-left: -16px; }
.match-burst h2 { font-size: 26px; margin: 0 0 6px; }

.toast-host { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); top: calc(12px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 650; font-size: 14px; box-shadow: var(--shadow); animation: rise .18s ease; }
.toast.error { background: var(--danger); color: #fff; }

@media (max-width: 360px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .card-name h2 { font-size: 24px; }
  .like-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-circle { width: 80px; height: 80px; }
}
@media (min-width: 600px) { .app { padding-top: 24px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- smooth scrolling: offscreen rows are not painted, images decode off the main thread --- */
.chat-row, .like-tile, .list .row { content-visibility: auto; contain-intrinsic-size: auto 64px; }
.card { will-change: transform; }
.tag.accent { background: var(--surface-3); color: var(--text); }
.row { min-height: 54px; }
.row .grow { font-weight: 600; }
.section-label { font-weight: 650; letter-spacing: 0; }
.btn { font-weight: 700; letter-spacing: -.005em; }

/* locked likes: round blurred avatar + real name */
.like-tile.locked { display: flex; flex-direction: column; align-items: center; text-align: center; }
.blur-avatar { position: relative; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 2px var(--line); }
.blur-avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); filter: saturate(1.1); }
.blur-avatar .lock { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #000000a6; color: #fff; }
.blur-avatar .lock .ico { width: 13px; height: 13px; }
.like-tile.locked strong { margin-top: 8px; max-width: 100%; }
.blur-avatar .initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--accent-2); filter: blur(5px); }
.game-tag { display: inline-flex; align-items: center; gap: 6px; padding-left: 5px; }
.mini-logo { width: 20px; height: 20px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); font-size: 8px; font-weight: 800; }
.mini-logo img { width: 100%; height: 100%; object-fit: cover; }
.game .logo img { object-fit: cover; }

/* consent checkbox (verification) */
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.consent-row input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 22px; accent-color: var(--accent); }
.onboard a, .consent-row a { color: var(--accent); }
/* keep the main buttons reachable on short screens */
.sticky-bottom { position: sticky; bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 30%); }

.photo-cell .main-mark, .photo-cell .make-main { position: absolute; left: 6px; bottom: 6px; right: 6px; min-height: 30px; padding: 4px 8px;
  border-radius: 10px; font-size: 11.5px; font-weight: 700; text-align: center; background: #000000a6; color: #fff; }
.photo-cell .main-mark { background: var(--accent-strong); right: auto; min-height: 0; }

/* own profile: chosen games; "how others see me" preview */
.my-games { margin: -4px 0 16px; }
.deck-wrap.preview .card { touch-action: auto; }
.deck-wrap.preview .card-photo { max-height: 56dvh; }
