:root {
  --pink: #ff5e8a; --violet: #8b5cf6; --gold: #ffc94d; --green: #2fd39a; --red: #ff5a6e; --blue: #4dabf7;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --radius: 18px; --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --sidebar: 250px;
}
[data-theme="dark"] {
  --bg: #0b0920; --bg2: #120f2e; --surface: rgba(255,255,255,.055); --surface2: rgba(255,255,255,.09); --solid: #181437;
  --border: rgba(255,255,255,.1); --text: #f3f1ff; --muted: #a29fc4; --shadow: 0 20px 50px rgba(0,0,0,.45);
  --input: rgba(255,255,255,.06);
}
[data-theme="light"] {
  --bg: #f6f4ff; --bg2: #ece8ff; --surface: rgba(255,255,255,.8); --surface2: #fff; --solid: #fff;
  --border: rgba(40,20,90,.1); --text: #1d1640; --muted: #6c6890; --shadow: 0 18px 40px rgba(60,40,140,.13);
  --input: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--pink); color: #fff; }

.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(139,92,246,.28), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(255,94,138,.18), transparent 60%), var(--bg); }
[data-theme="dark"] .sky::after { content: ''; position: absolute; inset: 0; opacity: .55;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 15%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(1px 1px at 10% 85%, #fff, transparent), radial-gradient(1.2px 1.2px at 55% 45%, #fff, transparent), radial-gradient(1px 1px at 92% 88%, #fff, transparent), radial-gradient(1px 1px at 30% 8%, #fff, transparent);
  background-size: 600px 600px; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .25; } }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; padding: 6px 12px 22px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.brand span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; color: var(--muted); font-weight: 600; transition: .15s; position: relative; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface2); color: var(--text); }
.nav-item.active svg { color: var(--pink); }
.nav-item svg { width: 22px; height: 22px; flex: none; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
.nav-item .badge:empty, .badge[data-n="0"] { display: none; }
.sidebar .spacer { flex: 1; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; }
.me-chip:hover { background: var(--surface); }
.main { min-width: 0; padding: 28px clamp(16px, 4vw, 48px) 40px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.page-head .grow { flex: 1; }
.mobile-top, .bottom-nav { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
  .mobile-top .brand { padding: 0; font-size: 1.1rem; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; justify-content: space-around; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
  .bottom-nav .nav-item { flex-direction: column; gap: 3px; padding: 6px 10px; font-size: .68rem; }
  .bottom-nav .nav-item .badge { position: absolute; top: 0; right: 6px; margin: 0; min-width: 17px; height: 17px; font-size: .62rem; }
  .main { padding: 18px 14px 100px; }
  .page-head h1 { font-size: 1.4rem; }
}

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 700; transition: transform .12s, box-shadow .2s, background .2s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(255,94,138,.35); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(255,94,138,.5); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger { background: rgba(255,90,110,.12); color: var(--red); border: 1px solid rgba(255,90,110,.3); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); transition: .15s; position: relative; }
.icon-btn:hover { background: var(--surface2); }
.icon-btn svg { width: 20px; height: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1.1rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h2 small { font-weight: 500; color: var(--muted); font-size: .8rem; margin-left: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--input); border: 1px solid var(--border); outline: none; transition: border .15s, box-shadow .15s; }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,246,.18); }
textarea.input { resize: vertical; min-height: 100px; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select.input option { background: var(--solid); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .87rem; font-weight: 600; transition: .15s; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
button.chip:hover { border-color: var(--violet); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.chip.common { border-color: var(--pink); color: var(--pink); background: rgba(255,94,138,.08); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--surface2); font-size: .82rem; font-weight: 600; }
.tag svg { width: 15px; height: 15px; opacity: .8; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch b { display: block; font-weight: 600; }
.switch small { color: var(--muted); }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--border); position: relative; flex: none; transition: .2s; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.switch input:checked { background: var(--grad); border-color: transparent; }
.switch input:checked::after { left: 23px; }

input[type=range] { width: 100%; accent-color: var(--pink); }
.range-dual { position: relative; height: 30px; }
.range-dual input { position: absolute; inset: 0; pointer-events: none; background: none; appearance: none; height: 30px; }
.range-dual input::-webkit-slider-thumb { pointer-events: all; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); cursor: pointer; position: relative; z-index: 2; }
.range-dual input::-moz-range-thumb { pointer-events: all; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); cursor: pointer; }
.range-dual .track { position: absolute; top: 13px; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--surface2); }
.range-dual .fill { position: absolute; top: 13px; height: 4px; border-radius: 2px; background: var(--grad); }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface2); }
.avatar.lg { width: 64px; height: 64px; }
.avatar-wrap { position: relative; flex: none; }
.dot-online { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--green); border: 2.5px solid var(--bg); }
.verified { display: inline-flex; color: var(--blue); }
.verified svg { width: 18px; height: 18px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 3.2rem; margin-bottom: 12px; }
.empty h3 { color: var(--text); font-size: 1.2rem; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface2); border-top-color: var(--pink); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); gap: 4px; margin-bottom: 20px; }
.tabs button { padding: 9px 18px; border-radius: 999px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { background: var(--surface2); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.12); }

/* ---------- landing / auth ---------- */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; padding: 40px clamp(20px, 6vw, 90px); max-width: 1300px; margin: 0 auto; }
.landing .brand { font-size: 1.5rem; padding: 0 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 20px 0 28px; max-width: 520px; line-height: 1.6; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 540px; }
.perk { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .92rem; }
.perk i { font-style: normal; font-size: 1.3rem; }
.auth-card { padding: 32px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(20px); max-width: 440px; width: 100%; justify-self: center; }
.auth-card h2 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card .tabs { width: 100%; }
.auth-card .tabs button { flex: 1; justify-content: center; }
.free-banner { margin-top: 26px; display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 999px; background: rgba(47,211,154,.12); color: var(--green); font-weight: 700; border: 1px solid rgba(47,211,154,.3); }
.err { color: var(--red); font-size: .88rem; min-height: 1.2em; margin: 4px 0 10px; }
@media (max-width: 900px) { .landing { grid-template-columns: 1fr; padding-top: 24px; } .landing .brand { padding-bottom: 20px; } .perks { grid-template-columns: 1fr; } }

/* ---------- onboarding ---------- */
.onb { max-width: 620px; margin: 0 auto; padding: 30px 16px 60px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; margin-bottom: 30px; }
.progress div { height: 100%; background: var(--grad); transition: width .35s; }
.onb h1 { font-size: 1.9rem; letter-spacing: -.02em; margin-bottom: 6px; }
.onb .sub { color: var(--muted); margin-bottom: 26px; }
.onb-actions { display: flex; justify-content: space-between; margin-top: 28px; gap: 12px; }
.option-cards { display: grid; gap: 10px; }
.option-card { padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; font-weight: 600; display: flex; gap: 12px; align-items: center; transition: .15s; }
.option-card:hover { border-color: var(--violet); }
.option-card.on { border-color: var(--pink); background: rgba(255,94,138,.1); }
.option-card i { font-style: normal; font-size: 1.4rem; }

/* ---------- photos editor ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.photo-slot { aspect-ratio: 3/4; border-radius: 16px; border: 2px dashed var(--border); background: var(--surface); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: .15s; }
.photo-slot.add:hover { border-color: var(--pink); color: var(--pink); cursor: pointer; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot.filled { border-style: solid; }
.photo-slot .main-tag { position: absolute; left: 8px; top: 8px; background: var(--grad); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.photo-slot .ph-actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.photo-slot .ph-actions button { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; }
.photo-slot .ph-actions svg { width: 15px; height: 15px; }
.photo-slot .plus { font-size: 2rem; font-weight: 300; }
.photo-slot.uploading::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.4); }

/* ---------- discover / swipe ---------- */
.discover { display: flex; flex-direction: column; align-items: center; }
.deck { position: relative; width: min(420px, 100%); aspect-ratio: 3/4.3; max-height: calc(100vh - 230px); min-height: 420px; }
.swipe-card { position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: var(--solid); box-shadow: var(--shadow); touch-action: none; user-select: none; will-change: transform; transform-origin: 50% 90%; }
.swipe-card.behind { transform: scale(.95) translateY(14px); filter: brightness(.7); transition: transform .3s, filter .3s; }
.swipe-card .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe-card .bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 5px; z-index: 3; }
.swipe-card .bars i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); }
.swipe-card .bars i.on { background: #fff; }
.swipe-card .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,6,25,.95) 0%, rgba(8,6,25,.4) 35%, transparent 60%); pointer-events: none; }
.swipe-card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; color: #fff; z-index: 2; }
.swipe-card .info h2 { font-size: 1.9rem; font-weight: 800; display: flex; align-items: center; gap: 8px; letter-spacing: -.02em; }
.swipe-card .info h2 span { font-weight: 500; }
.swipe-card .info .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; opacity: .9; font-size: .92rem; }
.swipe-card .info .meta span { display: inline-flex; align-items: center; gap: 5px; }
.swipe-card .info .meta svg { width: 15px; height: 15px; }
.swipe-card .info .chips .chip { background: rgba(255,255,255,.16); border: 0; color: #fff; padding: 6px 11px; font-size: .8rem; backdrop-filter: blur(6px); }
.swipe-card .info .chips .chip.common { background: rgba(255,94,138,.85); }
.swipe-card .info-btn { position: absolute; right: 18px; bottom: 24px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); backdrop-filter: blur(6px); color: #fff; display: flex; align-items: center; justify-content: center; z-index: 4; }
.swipe-card .compat { position: absolute; top: 26px; right: 14px; z-index: 3; padding: 6px 11px; border-radius: 999px; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); color: #fff; font-weight: 700; font-size: .82rem; }
.swipe-card .super-me { position: absolute; top: 26px; left: 14px; z-index: 3; padding: 6px 11px; border-radius: 999px; background: var(--gold); color: #3a2a00; font-weight: 800; font-size: .78rem; }
.stamp { position: absolute; top: 60px; z-index: 5; padding: 6px 16px; border: 4px solid; border-radius: 12px; font-size: 2rem; font-weight: 800; letter-spacing: .05em; opacity: 0; pointer-events: none; }
.stamp.like { left: 24px; color: var(--green); transform: rotate(-16deg); }
.stamp.nope { right: 24px; color: var(--red); transform: rotate(16deg); }
.stamp.super { left: 50%; top: auto; bottom: 170px; transform: translateX(-50%); color: var(--gold); }
.swipe-actions { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 22px; }
.act { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--solid); border: 1px solid var(--border); box-shadow: 0 8px 22px rgba(0,0,0,.25); transition: transform .15s, box-shadow .15s; }
.act:hover { transform: translateY(-3px) scale(1.06); }
.act:active { transform: scale(.92); }
.act svg { width: 26px; height: 26px; }
.act.sm { width: 46px; height: 46px; } .act.sm svg { width: 20px; height: 20px; }
.act.lg { width: 70px; height: 70px; } .act.lg svg { width: 32px; height: 32px; }
.act.nope { color: var(--red); } .act.like { color: #fff; background: var(--grad); border: 0; } .act.super { color: var(--gold); } .act.rewind { color: var(--gold); } .act.boost { color: var(--violet); }
.act .count { position: absolute; transform: translate(18px, -18px); background: var(--gold); color: #3a2a00; font-size: .65rem; font-weight: 800; border-radius: 8px; padding: 1px 5px; }
.act { position: relative; }
.kbd-hint { margin-top: 14px; font-size: .78rem; color: var(--muted); text-align: center; }
.kbd-hint kbd { background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-family: inherit; font-size: .75rem; }

/* ---------- grid of profiles ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.pcard { position: relative; aspect-ratio: 3/4; border-radius: 20px; overflow: hidden; background: var(--solid); cursor: pointer; transition: transform .2s, box-shadow .2s; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard img { width: 100%; height: 100%; object-fit: cover; }
.pcard .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,6,25,.9), transparent 55%); }
.pcard .pinfo { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; }
.pcard .pinfo b { font-size: 1.05rem; display: flex; align-items: center; gap: 5px; }
.pcard .pinfo small { opacity: .85; display: block; margin-top: 2px; }
.pcard .ptop { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.pcard .pill { padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); color: #fff; font-size: .72rem; font-weight: 700; }
.pcard .pill.gold { background: var(--gold); color: #3a2a00; }
.pcard .pill.green { background: var(--green); color: #003322; }
.pcard .quick { position: absolute; right: 10px; bottom: 54px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(6px); transition: .2s; }
.pcard:hover .quick { opacity: 1; transform: none; }
@media (hover: none) { .pcard .quick { opacity: 1; transform: none; } }
.pcard .quick button { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.95); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.pcard .quick button svg { width: 20px; height: 20px; }
.pcard .quick .q-like { color: var(--pink); } .pcard .quick .q-pass { color: #666; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.toolbar .input { width: auto; padding: 10px 14px; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search .input { width: 100%; padding-left: 40px; }
.toolbar .search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--muted); }

/* ---------- profile view ---------- */
.profile-view { max-width: 520px; margin: 0 auto; }
.pv-gallery { position: relative; aspect-ratio: 3/4; border-radius: 22px; overflow: hidden; background: var(--solid); }
.pv-gallery img { width: 100%; height: 100%; object-fit: cover; }
.pv-gallery .nav { position: absolute; top: 0; bottom: 0; width: 50%; }
.pv-gallery .nav.l { left: 0; } .pv-gallery .nav.r { right: 0; }
.pv-section { padding: 18px 4px; border-bottom: 1px solid var(--border); }
.pv-section:last-child { border: 0; }
.pv-section h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.pv-name { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.prompt-card { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px; }
.prompt-card small { color: var(--muted); font-weight: 600; }
.prompt-card p { font-size: 1.15rem; font-weight: 700; margin-top: 6px; line-height: 1.35; }
.compat-bar { height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; margin-top: 8px; }
.compat-bar div { height: 100%; background: var(--grad); }
.pv-actions { position: sticky; bottom: 0; display: flex; justify-content: center; gap: 16px; padding: 16px; background: linear-gradient(to top, var(--solid) 60%, transparent); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(5,3,20,.7); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--solid); border: 1px solid var(--border); border-radius: 24px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2,.9,.3,1.3); position: relative; }
.modal.wide { width: min(560px, 100%); }
.modal .modal-body { padding: 24px; }
.modal .close { position: absolute; right: 14px; top: 14px; z-index: 5; background: rgba(0,0,0,.45); color: #fff; border: 0; }
.modal h2 { margin-bottom: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
@media (max-width: 600px) { .modal-back { padding: 0; align-items: flex-end; } .modal { border-radius: 24px 24px 0 0; max-height: 94vh; animation: slideup .3s; } }
@keyframes slideup { from { transform: translateY(100%); } }

.match-modal { text-align: center; padding: 40px 24px 30px; background: radial-gradient(circle at 50% 0%, rgba(255,94,138,.35), transparent 70%), var(--solid); }
.match-modal h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; }
.match-pics { display: flex; justify-content: center; margin: 28px 0; }
.match-pics img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 4px solid var(--solid); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.match-pics img:first-child { transform: rotate(-8deg) translateX(14px); animation: inl .6s cubic-bezier(.2,.9,.3,1.3); }
.match-pics img:last-child { transform: rotate(8deg) translateX(-14px); animation: inr .6s cubic-bezier(.2,.9,.3,1.3); }
@keyframes inl { from { transform: translateX(-120px) rotate(-30deg); opacity: 0; } }
@keyframes inr { from { transform: translateX(120px) rotate(30deg); opacity: 0; } }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 200; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- messages ---------- */
.messenger { display: grid; grid-template-columns: 340px 1fr; height: 100vh; margin: -28px clamp(-48px, -4vw, -16px) -40px; border-left: 0; }
.conv-list { border-right: 1px solid var(--border); overflow-y: auto; padding: 22px 12px; }
.conv-list h1 { font-size: 1.5rem; padding: 0 10px 14px; }
.new-matches { display: flex; gap: 12px; overflow-x: auto; padding: 4px 10px 18px; scrollbar-width: none; }
.new-matches a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; flex: none; width: 66px; }
.new-matches img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; padding: 2px; background: var(--grad); }
.conv { display: flex; gap: 12px; align-items: center; padding: 11px 10px; border-radius: 14px; transition: .15s; }
.conv:hover { background: var(--surface); }
.conv.active { background: var(--surface2); }
.conv .c-body { flex: 1; min-width: 0; }
.conv .c-top { display: flex; justify-content: space-between; gap: 6px; }
.conv .c-top b { font-weight: 700; }
.conv .c-top small { color: var(--muted); font-size: .75rem; flex: none; }
.conv .c-last { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv.unread .c-last { color: var(--text); font-weight: 600; }
.conv .unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); flex: none; }
.section-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 6px 10px 10px; }
.chat { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
.chat-head .who { flex: 1; min-width: 0; cursor: pointer; }
.chat-head .who b { display: flex; align-items: center; gap: 5px; }
.chat-head .who small { color: var(--muted); }
.chat-head .who small.on { color: var(--green); }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 3px; }
.day-sep { text-align: center; font-size: .75rem; color: var(--muted); margin: 16px 0 10px; font-weight: 600; }
.bubble { max-width: min(72%, 480px); padding: 10px 15px; border-radius: 20px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; font-size: .96rem; animation: bub .2s; }
@keyframes bub { from { transform: translateY(6px); opacity: 0; } }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.bubble.them { align-self: flex-start; background: var(--surface2); border-bottom-left-radius: 6px; }
.bubble img { border-radius: 14px; max-height: 280px; margin: -4px -8px; cursor: zoom-in; }
.bubble.img-only { padding: 4px; background: none; }
.bubble.img-only img { margin: 0; }
.meta-line { font-size: .7rem; color: var(--muted); margin: 2px 6px 8px; }
.meta-line.me { align-self: flex-end; }
.typing { align-self: flex-start; background: var(--surface2); border-radius: 20px; padding: 14px 16px; display: flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tdot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-intro { text-align: center; padding: 30px 20px; }
.chat-intro img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; }
.icebreakers { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; align-items: center; }
.icebreakers button { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .9rem; max-width: 100%; }
.icebreakers button:hover { border-color: var(--pink); }
.composer { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); align-items: flex-end; position: relative; }
.composer textarea { flex: 1; resize: none; max-height: 140px; min-height: 46px; padding: 12px 16px; border-radius: 23px; background: var(--input); border: 1px solid var(--border); outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: var(--violet); }
.composer .send { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.composer .send svg { width: 20px; height: 20px; }
.emoji-pop { position: absolute; bottom: 70px; left: 16px; background: var(--solid); border: 1px solid var(--border); border-radius: 16px; padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; box-shadow: var(--shadow); z-index: 10; }
.emoji-pop button { font-size: 1.35rem; padding: 4px; border-radius: 8px; }
.emoji-pop button:hover { background: var(--surface2); }
.chat-empty { display: flex; align-items: center; justify-content: center; height: 100%; }
.dropdown { position: absolute; right: 16px; top: 64px; background: var(--solid); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 20; min-width: 210px; }
.dropdown button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; text-align: left; font-weight: 600; }
.dropdown button:hover { background: var(--surface2); }
.dropdown button.danger { color: var(--red); }
.dropdown svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .messenger { grid-template-columns: 1fr; margin: -18px -14px -100px; height: calc(100vh - 57px - 66px); }
  .messenger.in-chat { height: 100dvh; position: fixed; inset: 0; margin: 0; z-index: 50; background: var(--bg); }
  .kbd-hint { display: none; }
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .messenger.in-chat .conv-list { display: none; }
  .messenger:not(.in-chat) .chat { display: none; }
}
.back-btn { display: none; }
@media (max-width: 860px) { .back-btn { display: inline-flex; } }

/* ---------- notifications ---------- */
.notif { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; transition: .15s; }
.notif:hover { background: var(--surface); }
.notif.unread { background: rgba(255,94,138,.07); }
.notif .n-ico { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--surface2); flex: none; overflow: hidden; }
.notif .n-ico img { width: 100%; height: 100%; object-fit: cover; }
.notif .n-body { flex: 1; }
.notif small { color: var(--muted); }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--solid); border: 1px solid var(--border); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 600; display: flex; gap: 10px; align-items: center; animation: toastin .3s cubic-bezier(.2,.9,.3,1.3); max-width: 92vw; cursor: pointer; }
.toast img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.toast.error { border-color: rgba(255,90,110,.5); }
.toast.out { opacity: 0; transform: translateY(-10px); transition: .3s; }
@keyframes toastin { from { opacity: 0; transform: translateY(-16px) scale(.95); } }

.settings-wrap, .edit-wrap { max-width: 760px; }
.edit-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.edit-layout .preview-col { position: sticky; top: 24px; }
@media (max-width: 1100px) { .edit-layout { grid-template-columns: 1fr; } .edit-layout .preview-col { display: none; } }
.strength { display: flex; align-items: center; gap: 12px; }
.strength .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.strength .bar div { height: 100%; background: var(--grad); transition: width .4s; }
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 12px; }
table.admin { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.admin td, table.admin th { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.stat b { font-size: 1.8rem; display: block; }
.stat small { color: var(--muted); }
.tabs svg { width: 18px; height: 18px; }

/* ---------- v2: legal, banner, consent, demo, messages tools, calls, admin ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { align-items: flex-start; margin-bottom: 8px; cursor: pointer; line-height: 1.4; }
.consent input { margin-top: 3px; flex: none; }
.consent a, .legal-body a, .link { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
button.link { padding: 0; font-weight: 600; text-align: left; }
.legal-footer { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 26px 16px 34px; font-size: .85rem; }
.legal-footer a { color: var(--muted); }
.legal-footer a:hover { color: var(--text); }
.legal-page { max-width: 760px; margin: 0 auto; padding: 30px 18px 10px; }
.legal-page h1 { font-size: 2rem; letter-spacing: -.02em; margin: 18px 0 10px; }
.legal-body { line-height: 1.7; }
.legal-body h3 { margin: 22px 0 6px; font-size: 1.05rem; }
.legal-body ul { padding-left: 22px; margin: 6px 0; }
.legal-body li { margin: 4px 0; }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border-radius: 16px; background: rgba(255,201,77,.12); border: 1px solid rgba(255,201,77,.35); font-size: .92rem; }
.banner span { flex: 1; min-width: 200px; }
.demo-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.18); color: inherit; border: 1px dashed currentColor; opacity: .85; vertical-align: middle; }
.demo-tag.on-card { position: absolute; top: 60px; right: 14px; z-index: 3; background: rgba(0,0,0,.45); color: #fff; backdrop-filter: blur(8px); border-style: solid; border-color: rgba(255,255,255,.3); }
.gesture { font-size: 1.4rem; font-weight: 800; text-align: center; padding: 22px; border-radius: 18px; background: var(--surface2); border: 2px dashed var(--pink); }

/* messages v2 */
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.msg.me { align-items: flex-end; }
.msg-line { display: flex; align-items: center; gap: 6px; max-width: 100%; position: relative; }
.msg.me .msg-line { flex-direction: row-reverse; }
.msg .bubble { max-width: min(72vw, 480px); }
.msg-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { opacity: 1; }
@media (hover: none) { .msg-tools { opacity: .55; } }
.msg-tools button { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.msg-tools button:hover { background: var(--surface2); color: var(--text); }
.msg-tools svg { width: 16px; height: 16px; }
.bubble .edited { font-size: .68rem; opacity: .7; margin-left: 8px; font-style: italic; }
.bubble .deleted { opacity: .7; }
.reactions { display: flex; gap: 4px; margin: -6px 10px 4px; z-index: 1; }
.reaction { padding: 2px 8px; border-radius: 999px; background: var(--solid); border: 1px solid var(--border); font-size: .85rem; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.reaction.mine { border-color: var(--pink); }
.react-pop { position: absolute; bottom: 100%; z-index: 15; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow); animation: pop .2s; }
.msg.me .react-pop { right: 0; } .msg.them .react-pop { left: 0; }
.react-pop button { font-size: 1.35rem; padding: 2px 5px; border-radius: 50%; transition: transform .1s; }
.react-pop button:hover { transform: scale(1.3); }

/* calls */
.call-screen { position: fixed; inset: 0; z-index: 500; background: radial-gradient(circle at 50% 30%, #2b1f63, #0b0920 70%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fade .25s; }
.call-screen .remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.call-screen.has-video .remote { display: block; }
.call-screen.has-video .call-who { position: absolute; top: 24px; left: 24px; flex-direction: row; text-align: left; gap: 12px; }
.call-screen.has-video .call-who img { width: 48px; height: 48px; }
.call-screen.has-video .call-who h2 { font-size: 1.1rem; }
.call-who { display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 2; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.call-who img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,.2); margin-bottom: 16px; }
.call-who img.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,94,138,.6); } 100% { box-shadow: 0 0 0 30px rgba(255,94,138,0); } }
.call-who h2 { font-size: 1.8rem; }
.call-who p { opacity: .8; margin-top: 4px; }
.call-screen .local { position: absolute; right: 18px; bottom: 120px; width: 130px; aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; border: 2px solid rgba(255,255,255,.4); z-index: 3; background: #111; transform: scaleX(-1); }
.call-actions { position: absolute; bottom: calc(34px + env(safe-area-inset-bottom)); display: flex; gap: 22px; z-index: 3; }
.call-actions .act { color: #fff; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.2); backdrop-filter: blur(8px); }
.call-actions .act.off { background: #fff; color: #222; }
.call-actions .act.hang { background: var(--red); border: 0; }
.call-actions .act.hang svg { transform: rotate(135deg); }
.call-actions .act.accept { background: var(--green); border: 0; animation: pulse 1.4s infinite; }

/* admin */
.card.report.closed { opacity: .6; }
.evidence { max-height: 280px; overflow: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface); font-size: .88rem; }
.evidence .ev-them { align-self: flex-start; background: rgba(255,90,110,.1); padding: 6px 10px; border-radius: 10px; }
.evidence .ev-me { align-self: flex-end; background: var(--surface2); padding: 6px 10px; border-radius: 10px; }
.verify-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.verify-grid figure { margin: 0; }
.verify-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; }
.verify-grid figure:first-child img { outline: 3px solid var(--pink); }
.verify-grid figcaption { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 4px; }
summary { cursor: pointer; color: var(--muted); }
.card h2 > svg, .card h2 .verified svg { width: 20px; height: 20px; flex: none; color: var(--pink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.mobile-only { display: none; }
@media (max-width: 900px) { .mobile-only { display: inline-flex; } .hero .lead { margin-bottom: 18px; } .hero .mobile-only { margin-bottom: 22px; } }
