:root {
  --bg: #fdf3ee;
  --bg2: #fbe6dd;
  --card: #fffaf7;
  --line: #f1d9cf;
  --ink: #3b2a2e;
  --ink2: #7a6267;
  --ink3: #a68f93;
  --rose: #e8606f;
  --rose2: #f08a7f;
  --rose-soft: #fde1df;
  --lilac: #b9a3e3;
  --lilac-soft: #efe8fb;
  --peach: #f7c9a9;
  --gold: #e7a64b;
  --ok: #3e9c6e;
  --grad: linear-gradient(135deg, #f2747b 0%, #ec5f71 55%, #e2567a 100%);
  --grad-soft: linear-gradient(160deg, #fff6f1 0%, #fde6df 60%, #f8dccf 100%);
  --shadow: 0 6px 24px rgba(166, 84, 84, .12);
  --shadow2: 0 14px 40px rgba(166, 84, 84, .18);
  --r: 18px;
  --nav-h: 64px;
  --font: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --serif: 'Frank Ruhl Libre', Georgia, serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { -webkit-user-drag: none; user-select: none; }
svg:not([width]) { width: 22px; height: 22px; flex: none; }
.btn svg { width: 20px; height: 20px; }
a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 3px solid rgba(232, 96, 111, .45); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* boot */
.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; }
.boot img { width: 120px; border-radius: 28px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--rose-soft); border-top-color: var(--rose); animation: spin 1s linear infinite; margin: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(253, 243, 238, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: #8a3b4a; letter-spacing: .2px; direction: ltr; }
.brand img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.topbar .sp { flex: 1; }
.iconbtn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.iconbtn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -3px; left: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.narrow { max-width: 560px; margin: 0 auto; }
.mid { max-width: 760px; margin: 0 auto; }

.nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: rgba(255, 250, 247, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink3); font-size: 12px; font-weight: 500; position: relative; text-decoration: none; }
.nav a svg { width: 25px; height: 25px; }
.nav a.on { color: var(--rose); }
.nav a .badge { top: 6px; left: calc(50% - 22px); }
.desk-nav { display: none; }
@media (min-width: 900px) {
  .nav { display: none; }
  main { padding-bottom: 40px; }
  .desk-nav { display: flex; gap: 4px; margin-inline-start: 18px; }
  .desk-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; color: var(--ink2); font-weight: 500; position: relative; text-decoration: none; }
  .desk-nav a svg { width: 20px; height: 20px; }
  .desk-nav a.on { background: var(--rose-soft); color: var(--rose); }
  .desk-nav a .badge { top: -4px; left: -4px; }
}

/* type */
h1, h2, h3 { line-height: 1.25; margin: 0 0 10px; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
.tiny { font-size: 12px; color: var(--ink3); }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.page-title { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; }
.page-title h1 { margin: 0; flex: 1; font-size: 23px; }
.back { width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; display: grid; place-items: center; color: var(--ink); }
.back svg { width: 24px; height: 24px; }

/* cards & lists */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 14px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > a { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.list > :last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.chev { color: var(--ink3); width: 18px; height: 18px; transform: scaleX(-1); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; border: none; font-weight: 600; font-size: 16.5px; text-decoration: none !important; transition: transform .12s, box-shadow .2s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(232, 96, 111, .32); }
.btn.ghost { background: var(--card); color: var(--rose); border: 1.5px solid #f2b6b3; }
.btn.plain { background: transparent; color: var(--ink2); min-height: 40px; padding: 0 10px; }
.btn.danger { background: #fff; color: #c2334a; border: 1.5px solid #f0b3bc; }
.btn.small { min-height: 38px; font-size: 14.5px; padding: 0 16px; }
.btn.block { display: flex; width: 100%; }
.linkbtn { background: none; border: none; color: var(--rose); padding: 0; font-weight: 500; }

/* forms */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: #eea0a3; box-shadow: 0 0 0 4px rgba(232, 96, 111, .12); }
.field .hint { font-size: 12.5px; color: var(--ink3); margin-top: 4px; }
.err { color: #c2334a; font-size: 14px; min-height: 0; margin: 4px 0 10px; }
.err:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink2); margin: 6px 0 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--rose); margin-top: 2px; flex: none; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--ink3); padding: 8px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--ink2); font-size: 14.5px; font-weight: 500; }
button.chip { cursor: pointer; }
.chip.on { background: var(--rose-soft); border-color: #f3a9ab; color: #c23f55; }
.chip.soft { background: var(--rose-soft); border-color: transparent; color: #b8475a; font-size: 13.5px; padding: 5px 12px; }
.chip.lilac { background: var(--lilac-soft); border-color: transparent; color: #6b52a8; }
.chip .x { border: none; background: none; padding: 0 0 0 2px; color: inherit; font-size: 16px; line-height: 1; }
.type-pill { display: inline-block; padding: 3px 11px; border-radius: 999px; background: rgba(255,255,255,.92); color: #b8475a; font-weight: 700; font-size: 13px; letter-spacing: .5px; direction: ltr; }

/* type grid */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.type-grid button { min-height: 54px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; letter-spacing: .5px; color: var(--ink2); }
.type-grid button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(232, 96, 111, .3); }

/* match ring */
.ring { --p: 80; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(closest-side, #fff 80%, transparent 81% 100%), conic-gradient(var(--rose) calc(var(--p) * 1%), #f6dcd6 0); box-shadow: var(--shadow); }
.ring b { display: block; font-size: 21px; font-weight: 800; color: var(--rose); line-height: 1; direction: ltr; }
.ring small { font-size: 11px; color: var(--ink2); }
.pct { font-weight: 800; color: var(--rose); direction: ltr; unicode-bidi: isolate; }

/* landing */
.landing { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--grad-soft); position: relative; overflow: hidden; }
.landing::before, .landing::after { content: ''; position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; pointer-events: none; }
.landing::before { width: 420px; height: 420px; background: #f8c2b4; top: -120px; left: -140px; }
.landing::after { width: 380px; height: 380px; background: #e9d6f6; bottom: -140px; right: -120px; }
.hero { position: relative; z-index: 1; max-width: 440px; width: 100%; text-align: center; }
.hero .logo { width: 180px; border-radius: 40px; box-shadow: var(--shadow2); }
.hero h1 { font-family: var(--serif); font-size: 58px; color: #8a3b4a; margin: 18px 0 0; direction: ltr; }
.hero .tag { font-size: 24px; font-weight: 700; color: #9c4555; margin: 4px 0 14px; }
.hero .sub { font-size: 19px; color: var(--ink2); margin-bottom: 30px; }
.hero .btn { width: 100%; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 30px 0 10px; }
.features div { background: rgba(255,255,255,.65); border-radius: 14px; padding: 12px 8px; font-size: 13px; color: var(--ink2); }
.features b { display: block; font-size: 20px; }
.auth-wrap { min-height: 100vh; background: var(--grad-soft); padding: 20px 16px 40px; }
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-card .panel { padding: 24px 20px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink3); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* discover */
.disc { display: grid; gap: 20px; }
@media (min-width: 900px) { .disc { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; justify-content: center; } .disc-side { position: sticky; top: 90px; } }
.deck { position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 3 / 4.25; max-height: calc(100vh - 250px); min-height: 420px; }
@media (min-width: 900px) { .deck { max-height: calc(100vh - 190px); } }
.swcard { position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: #f4d8cf; box-shadow: var(--shadow2); touch-action: pan-y; user-select: none; cursor: grab; will-change: transform; }
.swcard.behind { transform: scale(.955) translateY(14px); filter: brightness(.97); pointer-events: none; }
.swcard.anim { transition: transform .38s cubic-bezier(.2,.8,.2,1), opacity .38s; }
.swcard .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.swcard .bars { position: absolute; top: 10px; inset-inline: 12px; display: flex; gap: 5px; z-index: 2; }
.swcard .bars i { flex: 1; height: 3.5px; border-radius: 2px; background: rgba(255,255,255,.45); }
.swcard .bars i.on { background: #fff; }
.swcard .tapzone { position: absolute; top: 0; bottom: 45%; width: 35%; z-index: 2; }
.swcard .tapzone.r { right: 0; } .swcard .tapzone.l { left: 0; }
.swcard .tp { position: absolute; top: 24px; inset-inline-end: 14px; z-index: 3; }
.swcard .info { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; padding: 70px 18px 18px; color: #fff; background: linear-gradient(to top, rgba(40,18,22,.86) 0%, rgba(40,18,22,.55) 55%, transparent 100%); cursor: pointer; }
.swcard .info h2 { color: #fff; font-size: 27px; margin: 0; }
.swcard .info .meta { font-size: 14.5px; opacity: .92; margin: 2px 0 8px; }
.swcard .info .ttl { font-weight: 700; color: #ffd9d2; font-size: 15px; }
.swcard .info .desc { font-size: 14px; opacity: .92; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.swcard .ring { position: absolute; z-index: 4; bottom: 156px; inset-inline-end: 14px; }
.swcard .stamp { position: absolute; top: 46px; z-index: 5; padding: 6px 16px; border: 4px solid; border-radius: 12px; font-size: 30px; font-weight: 800; opacity: 0; letter-spacing: 1px; }
.swcard .stamp.like { left: 22px; color: #4cc38a; border-color: #4cc38a; transform: rotate(-14deg); }
.swcard .stamp.nope { right: 22px; color: #ff6b81; border-color: #ff6b81; transform: rotate(14deg); }
.actions { direction: ltr; display: flex; justify-content: center; align-items: center; gap: 26px; margin: 18px 0 6px; }
.act { width: 66px; height: 66px; border-radius: 50%; border: none; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; transition: transform .15s; }
.act:hover { transform: scale(1.07); }
.act svg { width: 30px; height: 30px; }
.act.nope { color: #ef5a6f; }
.act.like { width: 76px; height: 76px; background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(232, 96, 111, .4); }
.act.info { width: 50px; height: 50px; color: var(--lilac); }
.act.info svg { width: 24px; height: 24px; }
.empty { text-align: center; padding: 40px 20px; }
.empty .ico { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose); }
.empty .ico svg { width: 44px; height: 44px; }

/* profile view */
.pv-photos { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4/5; background: #f4d8cf; box-shadow: var(--shadow); }
.pv-photos img { width: 100%; height: 100%; object-fit: cover; }
.pv-photos .bars { position: absolute; top: 10px; inset-inline: 12px; display: flex; gap: 5px; }
.pv-photos .bars i { flex: 1; height: 3.5px; border-radius: 2px; background: rgba(255,255,255,.45); }
.pv-photos .bars i.on { background: #fff; }
.pv-photos .nav-l, .pv-photos .nav-r { position: absolute; top: 0; bottom: 0; width: 40%; border: 0; background: transparent; }
.pv-photos .nav-r { right: 0; } .pv-photos .nav-l { left: 0; }
.pv-head { display: flex; align-items: center; gap: 14px; margin: -38px 12px 0; position: relative; }
.pv-head .panel { flex: 1; padding: 14px 16px; }
.facts { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; color: var(--ink2); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg { width: 18px; height: 18px; color: var(--ink3); flex: none; }
.pv-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .pv-grid { grid-template-columns: 420px 1fr; align-items: start; } }

/* photo editor */
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ph-slot { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: #fff; border: 2px dashed #f0c4bd; display: grid; place-items: center; color: var(--rose); }
.ph-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-slot.filled { border-style: solid; border-color: transparent; }
.ph-slot .del { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 18px; line-height: 1; z-index: 2; }
.ph-slot .main-tag { position: absolute; bottom: 6px; right: 6px; background: rgba(255,255,255,.92); color: var(--rose); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; z-index: 2; }
.ph-slot .mv { position: absolute; bottom: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--ink); z-index: 2; font-size: 14px; }
.ph-slot label { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; font-size: 34px; }
.ph-slot.busy::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6) center/32px no-repeat; }

/* steps */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: #f3d9d1; }
.steps i.on { background: var(--rose2); }

/* range */
.range2 { position: relative; height: 34px; }
.range2 input[type=range] { position: absolute; inset: 0; width: 100%; pointer-events: none; -webkit-appearance: none; appearance: none; background: none; margin: 0; }
.range2 input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--rose); box-shadow: var(--shadow); cursor: pointer; position: relative; z-index: 2; }
.range2 input[type=range]::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--rose); cursor: pointer; }
.range2 .track { position: absolute; top: 50%; inset-inline: 0; height: 6px; margin-top: -3px; border-radius: 3px; background: #f3d9d1; }
.range2 .fill { position: absolute; top: 0; bottom: 0; background: var(--rose2); border-radius: 3px; }
input[type=range].single { width: 100%; accent-color: var(--rose); }
.range-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 4px; }
.range-label output { color: var(--rose); font-weight: 700; direction: ltr; }

/* toggle */
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: #e9d5cf; transition: background .2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked + span { background: var(--rose2); }
.toggle input:checked + span::after { transform: translateX(-20px); }

/* tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink2); font-weight: 600; font-size: 14.5px; }
.tabs button.on { background: var(--grad); color: #fff; border-color: transparent; }

/* avatars / match list */
.av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--rose-soft); flex: none; }
.av.sm { width: 42px; height: 42px; }
.av.lg { width: 76px; height: 76px; }
.unread-dot { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.new-matches { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.new-matches a { flex: none; width: 76px; text-align: center; color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.new-matches .av { width: 72px; height: 72px; border: 3px solid #f6a7a6; }
.like-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.like-tile { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 3/4; background: #f4d8cf; color: #fff; text-decoration: none !important; box-shadow: var(--shadow); }
.like-tile img { width: 100%; height: 100%; object-fit: cover; }
.like-tile > div { position: absolute; inset-inline: 0; bottom: 0; padding: 30px 10px 10px; background: linear-gradient(to top, rgba(40,18,22,.8), transparent); }
.like-tile .pct { position: absolute; top: 8px; inset-inline-end: 8px; background: #fff; border-radius: 99px; padding: 1px 9px; font-size: 13px; }

/* chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 66px - var(--nav-h) - env(safe-area-inset-bottom)); max-width: 760px; margin: -16px auto calc(-1 * (var(--nav-h) + 24px)); }
@media (min-width: 900px) { .chat { height: calc(100vh - 66px); margin-bottom: -40px; } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); background: var(--bg); }
.chat-head .who { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.chat-head .who b { display: block; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.bubble { max-width: 78%; padding: 9px 14px; border-radius: 20px; white-space: pre-wrap; word-wrap: break-word; font-size: 15.5px; line-height: 1.45; }
.bubble.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-start-start-radius: 6px; }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, #fbd2cd, #f8c0c3); border-start-end-radius: 6px; }
.bubble time { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; direction: ltr; text-align: end; }
.day-sep { align-self: center; font-size: 12px; color: var(--ink3); background: var(--bg2); padding: 2px 12px; border-radius: 99px; margin: 8px 0; }
.chat-foot { padding: 10px 10px calc(10px); border-top: 1px solid var(--line); background: var(--bg); }
.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; resize: none; min-height: 48px; max-height: 140px; padding: 12px 16px; border-radius: 24px; border: 1.5px solid var(--line); background: #fff; outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: #eea0a3; }
.sendbtn { width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.sendbtn svg { width: 22px; height: 22px; transform: scaleX(-1); }
.helpbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: none; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px rgba(232, 96, 111, .3); }
.sugg-pop { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); animation: up .3s ease; }
.sugg-pop .s { display: flex; gap: 10px; align-items: center; width: 100%; text-align: start; padding: 10px 12px; margin-top: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 14.5px; }
.sugg-pop .s:hover { border-color: #f2b6b3; }
.sugg-pop .s svg { width: 18px; height: 18px; color: var(--rose); flex: none; transform: scaleX(-1); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
.chat-closed { text-align: center; color: var(--ink2); padding: 8px; font-size: 14.5px; }

/* type page */
.type-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 24px 22px; background: linear-gradient(135deg, #fff2ec, #fde0dc 60%, #efe3fb); box-shadow: var(--shadow); }
.type-hero .code { font-family: var(--serif); font-size: 52px; font-weight: 700; color: #8a3b4a; direction: ltr; line-height: 1; letter-spacing: 1px; }
.type-hero .ttl { font-size: 20px; font-weight: 700; color: #b8475a; margin: 8px 0 10px; }
.type-hero .orb { position: absolute; top: -40px; left: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(247, 168, 150, .7), transparent 70%); }
.compat-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.compat-row .c { width: 54px; font-weight: 700; direction: ltr; text-align: start; }
.compat-row .bar { flex: 1; height: 10px; border-radius: 5px; background: #f6e2dc; overflow: hidden; }
.compat-row .bar i { display: block; height: 100%; background: var(--grad); border-radius: 5px; }
.compat-row .p { width: 44px; text-align: end; }
.disclaimer { font-size: 13px; color: var(--ink3); margin-top: 10px; }

/* notifications */
.notif { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; }
.notif.unread { background: linear-gradient(90deg, transparent, rgba(253, 225, 223, .55)); }
.notif .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--rose-soft); color: var(--rose); }
.notif .ic svg { width: 21px; height: 21px; }
.notif.system .ic { background: var(--lilac-soft); color: #7c62bf; }
.notif.account .ic { background: #fdf0dc; color: var(--gold); }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(59, 42, 46, .45); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@media (max-width: 600px) { .modal-bg { place-items: end center; padding: 0; } .modal { border-end-start-radius: 0 !important; border-end-end-radius: 0 !important; width: 100% !important; max-height: 92vh; } }
.modal { background: var(--card); border-radius: 24px; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); width: min(460px, 100%); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow2); animation: up .25s ease; }
.modal h2 { margin-bottom: 6px; }
@keyframes fade { from { opacity: 0; } }

/* match celebration */
.celebrate { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #fff6f2, #fbd9cf 70%, #f2c0b6); text-align: center; padding: 24px; overflow: hidden; animation: fade .3s; }
.celebrate .inner { position: relative; z-index: 2; max-width: 380px; width: 100%; }
.celebrate h1 { font-family: var(--serif); font-size: 44px; color: #8a3b4a; margin: 8px 0 2px; }
.celebrate .pair { display: flex; justify-content: center; align-items: center; margin: 26px 0 30px; position: relative; }
.celebrate .pair img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: var(--shadow2); animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.celebrate .pair img:first-child { margin-inline-end: -22px; transform: rotate(-6deg); }
.celebrate .pair img:last-child { transform: rotate(6deg); animation-delay: .12s; }
.celebrate .heart { position: absolute; z-index: 3; width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--rose); box-shadow: var(--shadow); animation: beat 1.2s ease-in-out .5s infinite; }
.celebrate .heart svg { width: 30px; height: 30px; }
.celebrate .logo { width: 110px; border-radius: 26px; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
.confetti { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; opacity: .9; animation: fall linear forwards; z-index: 1; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* toast */
#toast { position: fixed; z-index: 200; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: #b9334a; }
#toast.clickable { pointer-events: auto; cursor: pointer; }

.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #fff3dc; border: 1px solid #f4dcae; color: #7a5413; font-size: 14.5px; margin-bottom: 14px; }
.banner.rose { background: var(--rose-soft); border-color: #f5c3c2; color: #9c3445; }
.banner.lilac { background: var(--lilac-soft); border-color: #ddd0f5; color: #5a4392; }
.banner .grow { flex: 1; }

.settings-list a, .settings-list button.li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 4px; border: none; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: start; text-decoration: none; font-size: 16px; }
.settings-list svg.i { width: 22px; height: 22px; color: var(--rose2); flex: none; }
.settings-list .grow { flex: 1; }

details.faq { border-bottom: 1px solid var(--line); padding: 12px 2px; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: '+'; color: var(--rose); font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: '−'; }
details.faq p { margin: 8px 0 0; color: var(--ink2); }

.me-head { display: flex; align-items: center; gap: 16px; }
.me-head .av { width: 84px; height: 84px; border: 3px solid #fff; box-shadow: var(--shadow); }
.footer-links { text-align: center; font-size: 13px; color: var(--ink3); margin-top: 26px; }
.footer-links a { color: var(--ink3); margin: 0 6px; }
.prose { line-height: 1.75; }
.prose h3 { margin-top: 18px; }

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

.helpbtn svg { width: 18px; height: 18px; }
.ph-slot label svg { width: 40px; height: 40px; }
.banner svg { width: 22px; height: 22px; }
.sugg-pop { max-height: 52vh; overflow-y: auto; }
