:root {
  --wine: #7a1f2b;        /* Georgian wine red */
  --wine-dark: #5c141d;
  --gold: #c9a227;        /* warm gold */
  --green: #2e7d5b;       /* like */
  --ink: #2b2320;
  --muted: #8a7f78;
  --bg: #faf6f0;          /* warm paper */
  --card: #ffffff;
  --line: #ece3d8;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(90, 40, 30, .10);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans Georgian", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}
a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 200;
}
.badge-unread {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--wine); color: #fff; font-size: .72rem; font-weight: 700;
  vertical-align: middle; margin-left: 4px;
}
.admin-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.btn-danger { color: #a02a1a; }
.btn-danger:hover { border-color: #a02a1a; background: rgba(160,42,26,.06); }
.badge-muted {
  display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eee7dd;
  color: var(--muted); font-size: .72rem; font-weight: 600; margin-left: 4px; vertical-align: middle;
}
.top-left { display: flex; align-items: center; gap: 6px; }
.topback {
  border: none; background: none; font-size: 24px; line-height: 1; color: var(--ink);
  cursor: pointer; padding: 2px 6px; margin-left: -4px;
}
.topback:active { transform: scale(.9); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark)); color: #fff;
  border-radius: 10px; font-size: 20px;
}
.brand-name { color: var(--wine); font-size: 20px; }
.top-right { display: flex; align-items: center; gap: 18px; }
.nav { display: flex; gap: 18px; align-items: center; font-weight: 600; }
.nav a { color: var(--ink); }
.nav a.muted { color: var(--muted); font-weight: 400; }
.lang-switch { display: flex; gap: 2px; background: #f3ede4; border-radius: 999px; padding: 3px; }
.lang-switch .lang {
  font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 8px;
  border-radius: 999px; line-height: 1;
}
.lang-switch .lang:hover { text-decoration: none; color: var(--wine); }
.lang-switch .lang.active { background: var(--wine); color: #fff; }

.wrap { max-width: 640px; margin: 0 auto; padding: 24px 18px 60px; }
.wrap.has-bottomnav { padding-bottom: 90px; }
.wrap.has-adminbar { padding-bottom: 140px; }

/* ---- bottom navigation (mobile / Telegram Mini App) ---- */
.bottom-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  box-shadow: 0 -4px 20px rgba(90, 40, 30, .08);
}
.bottomnav {
  display: flex; justify-content: space-around; align-items: stretch;
  background: var(--card); border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
/* Admin quick panel (admins only), sits above the main nav */
.adminbar {
  display: flex; align-items: center; gap: 4px; overflow-x: auto;
  background: linear-gradient(90deg, #f3e8e0, #fbf5ef);
  border-top: 1px solid var(--line); padding: 7px 12px;
  font-size: .84rem; font-weight: 600; -webkit-overflow-scrolling: touch;
}
.adminbar::-webkit-scrollbar { display: none; }
.adminbar-tag {
  display: inline-flex; align-items: center; gap: 5px; color: var(--wine);
  text-transform: uppercase; font-size: .66rem; letter-spacing: .05em; margin-right: 4px; flex-shrink: 0;
}
.adminbar-tag svg { width: 15px; height: 15px; }
.adminbar a { color: var(--ink); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.adminbar a:hover { text-decoration: none; background: rgba(122,31,43,.08); }
.adminbar a.active { background: var(--wine); color: #fff; }
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: .72rem; font-weight: 600; padding: 4px 0;
}
.bottomnav a:hover { text-decoration: none; }
.bottomnav a.active { color: var(--wine); }
.bottomnav .bn-ico { width: 25px; height: 25px; display: block; }
.bottomnav a.active .bn-ico { stroke-width: 2.2; }
.bn-ico-wrap { position: relative; display: block; }
.bn-badge {
  position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--wine); color: #fff; font-size: .62rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--card); line-height: 1;
}

/* Messages inbox */
.chat-inbox { margin-top: 12px; display: flex; flex-direction: column; }
.inbox-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.inbox-row:hover { text-decoration: none; }
.inbox-avatar {
  width: 54px; height: 54px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: #f0e6da; display: grid; place-items: center; font-size: 24px;
}
.inbox-avatar img { width: 100%; height: 100%; object-fit: cover; }
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-main strong { display: flex; align-items: center; }
.inbox-preview {
  color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inbox-row.is-unread .inbox-preview { color: var(--ink); font-weight: 600; }
.nav-logout { font-weight: 400; }

/* ---- profile header (premium) ---- */
.profile-header {
  display: flex; align-items: center; gap: 14px; margin-top: 4px;
  background: linear-gradient(135deg, #fff, #fbf5ef); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px; box-shadow: var(--shadow);
}
.ph-avatar { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.ph-ring { position: absolute; inset: 0; width: 72px; height: 72px; transform: rotate(-90deg); }
.ph-ring-bg { fill: none; stroke: #eadfce; stroke-width: 4; }
.ph-ring-fg {
  fill: none; stroke: url(#phg); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 207.3; transition: stroke-dashoffset .5s ease;
}
.ph-photo {
  position: absolute; inset: 6px; border-radius: 50%; overflow: hidden;
  background: #f0e6da; display: grid; place-items: center; font-size: 30px;
}
.ph-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-info h2 { margin: 0; font-size: 1.25rem; display: flex; align-items: center; }
.ph-complete { color: var(--wine); font-weight: 600; font-size: .82rem; }
.ph-edit {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--wine); align-self: flex-start;
}
.ph-edit svg { width: 18px; height: 18px; }
.ph-edit:hover { border-color: var(--gold); text-decoration: none; }

/* ---- profile stat tiles ---- */
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 460px; margin: 16px auto 0; }
.stat-tile {
  background: linear-gradient(135deg, #fff, #fbf3ef); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; text-align: center;
}
.stat-num { font-size: 2rem; font-weight: 700; color: var(--wine); line-height: 1; }
.stat-lbl { color: var(--muted); font-size: .85rem; margin-top: 6px; }

.menu-row { display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin: 14px auto 0; max-width: 400px; font-weight: 600; color: var(--ink); }
.menu-row:hover { text-decoration: none; border-color: var(--gold); }
.row2 { display: flex; gap: 12px; }
.row2 > label { flex: 1; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0 auto 18px; max-width: 460px; }
.astat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; text-align: center; }
.astat-n { font-size: 1.4rem; font-weight: 800; color: var(--wine); }
.astat-l { font-size: .72rem; color: var(--muted); margin-top: 2px; }

.referral-card { background: linear-gradient(135deg, #fff, #fbf4e6); border: 1px solid var(--gold); border-radius: 14px; padding: 14px; margin: 14px auto 0; max-width: 400px; }
.ref-head { font-weight: 700; color: var(--wine-dark); }
.ref-hint { font-size: .85rem; color: var(--muted); margin: 4px 0 10px; }
.ref-link { font-size: .78rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; color: var(--ink); }
.ref-actions { display: flex; gap: 8px; margin-top: 10px; }

.menu-row-btn { width: 100%; text-align: left; cursor: pointer; font-family: inherit; font-size: inherit; }
/* Sign out — set apart from the rest of the profile menu. */
.menu-row-exit { margin-top: 18px; color: var(--muted); }
.menu-row-exit:hover { color: var(--wine); border-color: var(--wine); }
.pause-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fbeaea; border: 1px solid #e6b8b8; color: var(--wine-dark); border-radius: 14px;
  padding: 12px 14px; margin: 14px auto 0; max-width: 400px; font-weight: 600; }
.pause-banner .btn { flex-shrink: 0; }
.quiz-q { margin-bottom: 16px; }
.quiz-q legend { font-weight: 600; color: var(--wine-dark); padding: 0 4px; }

.premium-row { background: linear-gradient(135deg, #fff, #fbf4e6); border-color: var(--gold); }
.gift-row { background: linear-gradient(135deg, #fff, #f7eef0); border-color: var(--wine); }
.premium-perks { list-style: none; padding: 0; margin: 16px 0; text-align: left; display: inline-block; }
.premium-perks li { padding: 6px 0; font-weight: 600; }
.plan-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.plan-btn { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--card); cursor: pointer; font-size: 16px; color: inherit; text-align: left; }
.plan-btn:disabled { opacity: .5; cursor: default; }
.plan-btn.best { border-color: var(--wine); box-shadow: 0 2px 10px rgba(122,31,43,.12); }
.plan-name { font-weight: 600; }
.plan-price { font-weight: 700; white-space: nowrap; }
.plan-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--wine); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.likes-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; max-width: 400px; }
.like-cell .pcard { border-width: 1px; }
/* Like-back actions float over the bottom of the card photo (always visible). */
.like-cell { position: relative; }
.like-actions {
  position: absolute; top: 440px; right: 14px; transform: translateY(-50%);
  display: flex; gap: 12px; align-items: center; z-index: 6;
}
.lb-btn {
  width: 54px; height: 54px; border-radius: 50%; border: none; box-shadow: var(--shadow);
  font-size: 22px; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.lb-pass { background: #fff; color: var(--wine); }
.lb-yes { background: var(--wine); color: #fff; font-size: 24px; }
.lb-btn:active { transform: scale(.9); }
.lb-btn[disabled] { opacity: .55; }
.lb-matched {
  background: var(--wine); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-weight: 600; box-shadow: var(--shadow); white-space: nowrap;
}
.lb-matched:hover { text-decoration: none; color: #fff; }
a.stat-tile:hover { border-color: var(--gold); text-decoration: none; }

/* verification badge (blue check) */
.verified-badge {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px;
  background: #1d9bf0; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700;
  vertical-align: middle; line-height: 1; flex-shrink: 0;
}
.verified-badge.sm { width: 16px; height: 16px; font-size: 10px; margin-left: 4px; }
.verified-pill {
  display: inline-flex; align-items: center; gap: 6px; background: #e8f5fe; color: #1d9bf0;
  border: 1px solid #bfe3fb; border-radius: 999px; padding: 5px 14px; font-weight: 700;
  font-size: .85rem; margin: 4px 0 2px;
}
.verified-tick { font-size: .9rem; }
.report-btn { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.35); color: #fff; font-size: 16px;
  cursor: pointer; line-height: 1; }
.report-btn:hover { background: rgba(178,58,72,.85); }
/* Telegram sign-in button — glass, tuned for the light auth card. */
.tg-login { margin-bottom: 6px; }
.tg-login .or-divider { margin: 14px 0 4px; }
.btn-tg-glass {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin: 10px 0 2px; padding: 13px 20px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  color: var(--wine); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.45));
  border: 1px solid rgba(122, 31, 43, .22);
  box-shadow: 0 4px 16px rgba(122, 31, 43, .10), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-tg-glass:hover {
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.6));
  box-shadow: 0 6px 20px rgba(122, 31, 43, .16), inset 0 1px 0 rgba(255,255,255,.95);
}
.btn-tg-glass:active { transform: translateY(1px); }
.btn-tg-glass .tg-ico { width: 22px; height: 22px; color: #29a9eb; flex: none; }
.btn-tg-glass.btn-inline { width: auto; display: inline-flex; }
.btn-tg-glass.center-block { margin: 0 auto 12px; }
.btn-tg-glass .lp-tg-ico { width: 22px; height: 22px; color: #29a9eb; flex: none; }
.lp-author { text-align: center; }
.lp-author p { color: #5c524c; max-width: 460px; margin: 0 auto 18px; }
.lp-author-h { color: var(--muted) !important; font-size: .86rem; margin-top: 10px !important; }

.or-divider { text-align: center; color: var(--muted); margin: 8px 0; position: relative; }
.or-divider span { background: var(--card); padding: 0 10px; position: relative; z-index: 1; font-size: .82rem; }
.or-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }

/* admin moderation */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.admin-imgs { display: flex; gap: 8px; }
.admin-imgs figure { margin: 0; flex: 1; text-align: center; }
.admin-imgs img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; }
.admin-imgs figcaption { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.admin-name { font-weight: 700; margin: 8px 0; }
.admin-actions { display: flex; gap: 8px; }
.report-list { display: grid; gap: 10px; margin-top: 12px; }
.report-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.report-row.is-banned { opacity: .55; border-color: var(--wine); }

/* invites */
.invite-list { display: grid; gap: 12px; margin-top: 12px; }
.invite-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.invite-code { font-size: 1.5rem; font-weight: 700; letter-spacing: .18em; color: var(--wine); text-align: center; }
.invite-actions { display: flex; gap: 8px; margin-top: 10px; }
.invite-link-field { flex: 1; font-size: .82rem; margin: 0; }
.invite-used { display: flex; align-items: center; gap: 10px; }
.invite-tree { display: grid; gap: 8px; margin-top: 12px; }
.unlimited-invite { border: 2px solid var(--gold); background: linear-gradient(135deg, #fff, #fbf4e6); margin-bottom: 14px; }

/* ---- welcome ---- */
.welcome { max-width: 480px; margin: 0 auto; text-align: center; padding: 10px 4px 30px; }
.welcome-heart { font-size: 56px; }
.welcome h1 { font-size: 1.6rem; color: var(--wine); margin: 8px 0 18px; line-height: 1.3; }
.welcome p { color: #4a423d; margin: 14px 0; font-size: 1.02rem; }
.welcome .welcome-em { color: var(--wine-dark); font-weight: 600; }
.welcome .welcome-strong { font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.welcome .welcome-sign { color: var(--muted); font-style: italic; margin-top: 6px; }
.welcome-cta { margin-top: 22px; }

/* ---- hero ---- */
.hero { text-align: center; padding: 30px 0; }
.hero-badge {
  display: inline-block; background: #fff; border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; font-weight: 600; color: var(--wine);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 2.3rem; margin: 20px 0 12px; line-height: 1.2; }
.accent { color: var(--wine); }
.lead { color: #5c524c; max-width: 520px; margin: 0 auto 26px; font-size: 1.08rem; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.feature-list {
  list-style: none; padding: 0; margin: 40px auto 0; max-width: 460px;
  display: grid; gap: 14px;
}
.feature-list li {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; text-align: left; display: flex; flex-direction: column;
}
.feature-list strong { color: var(--wine); }
.feature-list span { color: var(--muted); font-size: .94rem; }

/* ---- landing (promo, liquid glass) ---- */
/* The landing breaks out of the narrow app .wrap to run full-bleed. */
.wrap:has(.lp-hero) { max-width: none; padding: 0; }

/* dark ambient hero */
.lp-hero {
  color: #f7f0e8; overflow: hidden;
  background:
    radial-gradient(620px circle at 10% 12%, rgba(122, 31, 43, .60), transparent 58%),
    radial-gradient(560px circle at 92% 96%, rgba(46, 125, 91, .42), transparent 58%),
    radial-gradient(400px circle at 78% 6%, rgba(201, 162, 39, .20), transparent 60%),
    #201a1a;
}
.lp-hero-inner {
  max-width: 980px; margin: 0 auto; padding: 40px 22px 48px;
  display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center;
}
.lp-badge {
  display: inline-block; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .82rem;
}
.lp-hero h1 { font-size: 2.4rem; line-height: 1.12; margin: 18px 0 12px; text-wrap: balance; font-weight: 800; letter-spacing: -.02em; }
.lp-hero h1 .accent { color: var(--gold); }
.lp-lead { color: rgba(247, 240, 232, .72); max-width: 440px; font-size: 1.05rem; margin: 0 0 24px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem; border: 1px solid transparent; cursor: pointer; }
.lp-btn:hover { text-decoration: none; }
.lp-btn-tg { background: #229ED9; color: #fff; box-shadow: 0 10px 24px rgba(34, 158, 217, .35); }
.lp-btn-tg:hover { background: #1b8ec2; }
.lp-btn-glass { background: rgba(255, 255, 255, .10); color: #f7f0e8; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lp-btn-glass:hover { background: rgba(255, 255, 255, .18); }
.lp-tg-ico { width: 20px; height: 20px; }
.lp-visual { display: flex; justify-content: center; }

/* liquid-glass phone */
.lp-phone {
  width: 320px; max-width: 100%; border-radius: 44px; padding: 16px 14px 0;
  background: linear-gradient(180deg, rgba(250, 246, 240, .95), rgba(244, 236, 226, .92));
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 40px 80px rgba(20, 8, 6, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
  color: var(--ink);
}
.lp-p-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.lp-p-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--wine); font-size: 1.05rem; }
.lp-p-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--wine), var(--wine-dark)); color: #fff; display: grid; place-items: center; font-size: 17px; }
.lp-p-langs { display: flex; gap: 3px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .05); border-radius: 999px; padding: 3px; }
.lp-p-langs span { font-size: .68rem; font-weight: 700; color: var(--muted); padding: 3px 8px; border-radius: 999px; line-height: 1; }
.lp-p-langs span.on { background: var(--wine); color: #fff; }
.lp-p-eyebrow { color: var(--wine); font-size: .62rem; font-weight: 700; letter-spacing: .16em; padding: 0 8px; }
.lp-p-titlerow { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 12px; }
.lp-p-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.lp-p-filter { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(0, 0, 0, .06); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .82rem; color: var(--wine); }
.lp-p-card { position: relative; border-radius: 28px; overflow: hidden; height: 416px; box-shadow: 0 12px 30px rgba(90, 40, 30, .22); }
.lp-p-photo { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 8%, #e9e2d8, #cdbfae 55%, #8f7f6e); }
.lp-p-illus { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
.lp-p-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.lp-p-shield { position: absolute; top: 14px; left: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .6); display: grid; place-items: center; color: var(--wine); box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.lp-p-shield svg { width: 18px; height: 18px; }
.lp-p-match { position: absolute; top: 16px; right: 14px; z-index: 2; background: rgba(255, 255, 255, .62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .6); color: var(--wine); font-weight: 800; font-size: .8rem; padding: 7px 13px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); }
.lp-p-overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 50px 16px 30px; color: #fff; background: linear-gradient(180deg, transparent, rgba(20, 10, 8, .82)); }
.lp-p-active { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; margin-bottom: 8px; }
.lp-p-active .dot { width: 8px; height: 8px; border-radius: 50%; background: #37d67a; box-shadow: 0 0 0 3px rgba(55, 214, 122, .3); }
.lp-p-name { font-size: 1.45rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.lp-p-verif { width: 20px; height: 20px; border-radius: 50%; background: #3897f0; display: grid; place-items: center; font-size: 12px; color: #fff; }
.lp-p-loc { display: flex; align-items: center; gap: 5px; font-size: .82rem; opacity: .9; margin-top: 3px; }
.lp-p-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.lp-p-tag { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 5px 12px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.lp-p-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: -26px; position: relative; z-index: 3; padding-bottom: 10px; }
.lp-p-act { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 8px 20px rgba(90, 40, 30, .2); }
.lp-p-act.pass { color: #c25; }
.lp-p-act.rose { color: var(--gold); width: 44px; height: 44px; font-size: 18px; }
.lp-p-act.like { color: #fff; background: var(--green); border-color: rgba(255, 255, 255, .4); }
.lp-p-nav { display: flex; justify-content: space-around; padding: 12px 4px 14px; margin-top: 6px; border-top: 1px solid rgba(0, 0, 0, .05); }
.lp-p-navitem { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .64rem; font-weight: 600; color: var(--muted); position: relative; }
.lp-p-navitem.on { color: var(--wine); }
.lp-p-navitem svg { width: 23px; height: 23px; }
.lp-p-navbadge { position: absolute; top: -4px; right: 6px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--wine); color: #fff; font-size: .58rem; font-weight: 700; display: grid; place-items: center; }

/* warm body */
.lp-body { background: var(--bg); }
.lp-body-inner { max-width: 760px; margin: 0 auto; padding: 4px 22px 40px; }
.lp-section { padding: 34px 0; border-top: 1px solid var(--line); }
.lp-section:first-child { border-top: none; }
.lp-title { text-align: center; font-size: 1.5rem; margin: 0 0 22px; text-wrap: balance; }
.lp-steps { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 460px; margin: 0 auto; }
.lp-step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: left; }
.lp-step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--wine); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px; }
.lp-step-ico { font-size: 26px; margin-bottom: 6px; }
.lp-step strong { display: block; color: var(--wine); margin-bottom: 3px; }
.lp-step span { color: var(--muted); font-size: .92rem; }
.lp-feats { list-style: none; padding: 0; margin: 0 auto; max-width: 460px; display: grid; gap: 14px; }
.lp-feats li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-align: left; display: flex; flex-direction: column; }
.lp-feats strong { color: var(--wine); }
.lp-feats span { color: var(--muted); font-size: .94rem; }
.lp-appcta { text-align: center; }
.lp-appcta p, .lp-final p { color: #5c524c; max-width: 460px; margin: 0 auto 22px; }
.lp-stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-store { display: inline-flex; align-items: center; gap: 10px; background: #1e1a17; color: #fff; border-radius: 12px; padding: 10px 18px; font-weight: 600; opacity: .9; }
.lp-store em { font-style: normal; font-size: .64rem; background: var(--gold); color: #1e1a17; padding: 2px 7px; border-radius: 999px; font-weight: 700; text-transform: uppercase; }
.lp-final { text-align: center; }
.lp-final .lp-cta { justify-content: center; }
.lp-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 0 8px; }

@media (min-width: 780px) {
  .lp-hero-inner { grid-template-columns: 1.05fr .95fr; padding: 54px 22px; }
  .lp-steps { grid-template-columns: repeat(3, 1fr); max-width: 720px; }
  .lp-feats { grid-template-columns: repeat(3, 1fr); max-width: 720px; }
}

/* ---- buttons ---- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--wine); color: #fff; }
.btn-primary:hover { background: var(--wine-dark); }
.btn-ghost { background: #fff; color: var(--wine); border-color: var(--line); }

/* ---- cards / forms ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card.wide { max-width: 640px; }
.auth-card { max-width: 400px; margin: 30px auto; }
.card h2 { margin-top: 0; }
label { display: block; font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
input, select, textarea {
  width: 100%; padding: 11px 12px; margin-top: 6px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff;
  font-weight: 400;
  color: var(--ink);         /* dark text on the white field... */
  caret-color: var(--ink);   /* ...and a visible dark typing caret (was white in some contexts) */
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
button.btn { width: auto; }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.grid-form .span2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 14px; }
legend { font-weight: 600; padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip input { width: auto; margin: 0; }
.chip span { font-weight: 400; }

.alert { background: #fdecea; color: #a02a1a; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.alert.ok { background: #e7f5ec; color: #1f7a4d; }
.dev-box { margin-top: 20px; padding: 14px; border: 1px dashed var(--gold); border-radius: 12px;
  text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.badge-ok { background: #e7f5ec; color: #1f7a4d; font-weight: 700; font-size: .8rem;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.verify-strip { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 16px; margin: 14px auto; max-width: 400px; }
.verify-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; }
.verify-row + .verify-row { border-top: 1px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }

/* ---- discover deck ---- */
.discover { display: flex; flex-direction: column; align-items: center; }
.filters-link { align-self: flex-end; font-weight: 600; color: var(--wine); font-size: .9rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin-bottom: 10px; }
.filters-link:hover { text-decoration: none; border-color: var(--gold); }
.deck { position: relative; width: 100%; max-width: 400px;
  /* leave room for header + filters link + swipe controls + the fixed bottom dock
     (nav, and the taller admin dock) so the controls sit ABOVE it, never behind */
  height: min(520px, calc(100dvh - 300px)); min-height: 380px; }
/* In the deck the whole card scrolls (photo + all details), so nothing stays
   hidden in a cramped body window. Photo is shorter so more text shows at once. */
.deck-item .pcard { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.deck-item .pcard-photo { height: 340px; }
.deck-item .pcard-body { overflow: visible; }
/* Desktop (mouse) swipe: stop the browser from grabbing the photo as a native
   image-drag / selecting text, which swallowed the swipe gesture on Mac. */
.deck-item, .deck-item * { -webkit-user-select: none; user-select: none; }
.pcard img {
  -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: auto;
}
.deck-item {
  position: absolute; inset: 0; will-change: transform;
  transition: transform .35s ease, opacity .35s ease;
}
.deck-item.gone { opacity: 0; }
.deck-item.fly-right { transform: translateX(140%) rotate(18deg); }
.deck-item.fly-left { transform: translateX(-140%) rotate(-18deg); }

.pcard {
  background: var(--card); border: 3px solid var(--line); border-radius: 22px;
  overflow: hidden; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column;
  user-select: none; position: relative;
}
/* Whole-card tap target -> open the profile (controls sit above via z-index). */
.card-link { position: absolute; inset: 0; z-index: 2; }
.pcard .carousel-nav, .pcard .report-btn, .pcard .translate-btn { z-index: 4; }
.pcard .translate-btn { position: relative; }
.pcard-photo {
  position: relative; height: 440px; background: linear-gradient(135deg, #f0e6da, #e8dccb);
  display: grid; place-items: center; flex-shrink: 0; overflow: hidden;
  z-index: 3;   /* above .card-link so tapping the photo opens the viewer */
}
.carousel-track img { cursor: zoom-in; }

/* Fullscreen photo viewer */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.94);
  display: grid; place-items: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 14px; z-index: 1001;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff; font-size: 19px; display: grid; place-items: center;
}
.lb-counter {
  position: fixed; top: calc(18px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .9rem; opacity: .85;
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 1001;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1;
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.pcard-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
}
.photo-emoji { font-size: 96px; }

/* Photo carousel */
.carousel { position: absolute; inset: 0; overflow: hidden; }
.carousel-track {
  display: flex; height: 100%; width: 100%;
  transition: transform .28s ease;
}
.carousel-track img {
  position: static; flex: 0 0 100%; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
}
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.32); color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: grid; place-items: center; z-index: 3; padding: 0;
}
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.carousel-dots {
  position: absolute; bottom: 10px; left: 0; right: 0; z-index: 3;
  display: flex; gap: 6px; justify-content: center;
}
.carousel-dots .dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5);
}
.carousel-dots .dot.on { background: #fff; }

/* Photo section in the profile editor */
.photo-edit { margin-top: 4px; }
.field-title { display: block; margin-bottom: 8px; font-size: .95rem; }
.photo-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.photo-thumbs .thumb {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  background: #e8dccb; flex-shrink: 0; position: relative;
}
.photo-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumbs .thumb.cover { outline: 2px solid #7a1f2b; outline-offset: 1px; }
/* Gallery manager (add photos one-by-one) */
.gallery-manage { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.gthumb {
  position: relative; width: 84px; height: 84px; border-radius: 12px;
  overflow: hidden; background: #e8dccb; flex-shrink: 0;
}
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gthumb-x {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.gthumb-add {
  border: 2px dashed var(--line); background: #faf5ee; display: grid; place-items: center;
  cursor: pointer; color: var(--wine); font-size: 30px; line-height: 1;
}
.gthumb-add.busy { opacity: .5; pointer-events: none; }
.gallery-manage .gthumb:first-child:not(.gthumb-add)::after {
  content: '★'; position: absolute; left: 4px; top: 3px; font-size: 12px;
  color: #fff; background: rgba(122,31,43,.9); border-radius: 999px;
  width: 18px; height: 18px; display: grid; place-items: center; line-height: 1;
}
/* "Make main" star on non-cover thumbs (tap → becomes first/cover) */
.gthumb-star {
  position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; padding: 0;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.gallery-manage .gthumb:first-child .gthumb-star { display: none; }
/* Profile completeness meter (/me) */
.completeness {
  display: block; max-width: 460px; margin: 12px auto 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #faf5ee;
}
.completeness:hover { text-decoration: none; border-color: var(--gold); }
.cmp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cmp-bar { height: 8px; border-radius: 999px; background: #eadfce; overflow: hidden; }
.cmp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--wine), var(--gold)); border-radius: 999px; }
/* Goal filter chips */
.goal-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-check span {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; font-size: .9rem; background: #fff; transition: all .15s;
}
.chip-check input:checked + span { background: var(--wine); color: #fff; border-color: var(--wine); }
.age-confirm {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #faf5ee; cursor: pointer;
}
.age-confirm input { width: 20px; height: 20px; flex-shrink: 0; margin: 0; accent-color: var(--wine); }
.age-confirm span { font-size: .95rem; }
.prompt-slot { display: flex; flex-direction: column; gap: 6px; }
.prompt-slot select { margin: 0; }
.prompt-slot input { margin: 0; }

/* Profile prompts on cards */
.prompts { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.prompt-card {
  background: #faf5ee; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.prompt-card .prompt-q { font-size: .82rem; color: var(--muted); }
.prompt-card .prompt-a { font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
.score-badge {
  position: absolute; top: 12px; right: 12px; background: rgba(122,31,43,.92); color: #fff;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem;
}
.pcard-body { padding: 16px 18px; overflow-y: auto; }
.pcard-body h3 { margin: 0 0 8px; font-size: 1.4rem; }
.pcard-meta { display: flex; flex-direction: column; gap: 3px; color: #5c524c; font-size: .92rem; }
.pcard-bio { margin: 12px 0; color: #4a423d; }
.translate-btn { background: none; border: none; color: var(--wine); font-weight: 600;
  font-size: .82rem; cursor: pointer; padding: 0; margin: -6px 0 8px; font-family: inherit; }
.translate-btn:hover { text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { background: #f3ede4; border-radius: 999px; padding: 4px 10px; font-size: .82rem; color: var(--wine-dark); }
.reasons { list-style: none; padding: 0; margin: 12px 0 0; }
.reasons li { color: var(--green); font-size: .88rem; }

.swipe-controls { display: flex; gap: 30px; margin-top: 22px; }
.swipe-btn {
  width: 66px; height: 66px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 28px; box-shadow: var(--shadow); background: #fff;
}
.swipe-btn.pass { color: var(--wine); }
.swipe-btn.like { color: var(--green); font-size: 32px; }
.swipe-btn.rose { width: 54px; height: 54px; font-size: 24px; align-self: center; position: relative; }
.rose-count {
  position: absolute; top: -2px; right: -2px; background: var(--wine); color: #fff;
  font-size: .62rem; min-width: 17px; height: 17px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px; font-weight: 700;
}
.free-rose-toast {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #b3123f, #e0538a); color: #fff; padding: 9px 18px;
  border-radius: 999px; font-weight: 600; font-size: .9rem; z-index: 60;
  box-shadow: var(--shadow); animation: freeRoseFade 4.5s ease forwards;
}
@keyframes freeRoseFade { 0%, 65% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.swipe-btn:active { transform: scale(.92); }
.deck-item.fly-up { transform: translateY(-140%) rotate(4deg); }

/* Roses */
.rose-packs { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.rose-pack { font-size: 1.05rem; }
.rose-flag {
  position: absolute; top: 12px; left: 12px; z-index: 6;
  background: rgba(122,31,43,.92); color: #fff; font-size: .8rem;
  font-weight: 600; padding: 5px 12px; border-radius: 999px; box-shadow: var(--shadow);
}
.like-cell.rose-like .pcard { border-color: #e0538a; border-width: 2px; }

/* ---- match modal ---- */
.modal { position: fixed; inset: 0; background: rgba(40,20,20,.55); display: grid; place-items: center; z-index: 300; }
.modal[hidden] { display: none; }
.modal-inner { background: #fff; border-radius: 22px; padding: 36px 30px; text-align: center; max-width: 340px; }
.match-emoji { font-size: 70px; }
.modal-inner h2 { color: var(--wine); margin: 8px 0; }

/* ---- matches / chat ---- */
.match-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.match-cell { display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.match-cell:hover { text-decoration: none; border-color: var(--gold); }
.match-avatar { width: 54px; height: 54px; border-radius: 50%; overflow: hidden;
  background: #f0e6da; display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.match-avatar.sm { width: 40px; height: 40px; font-size: 20px; }
.match-avatar img { width: 100%; height: 100%; object-fit: cover; }
.match-info { display: flex; flex-direction: column; }

.empty-state { text-align: center; padding: 50px 0; }
.empty-emoji { font-size: 60px; }
.single-card { max-width: 400px; margin: 16px auto; position: relative; }
/* Edit pencil on own card: sits on the name row (photo 260px + body padding) */
.card-edit {
  position: absolute; top: 268px; right: 14px; z-index: 6;
  background: #fff; box-shadow: var(--shadow);
}
.me-card .pcard-photo { height: 260px; }
.me-card .photo-emoji { font-size: 64px; }

/* Chat fills the screen below the header (no bottom nav here) and uses dvh so it
   shrinks when the mobile keyboard opens — otherwise the input got covered. */
.wrap.chat-page { padding: 8px 12px 0; height: calc(100vh - 62px); height: calc(100dvh - 62px); }
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.back { font-size: 24px; color: var(--ink); }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 75%; padding: 9px 14px; border-radius: 16px; font-size: .96rem; }
.bubble.mine { align-self: flex-end; background: var(--wine); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-shrink: 0; }
.chat-input input, .chat-input textarea { margin: 0; }
.chat-input textarea {
  resize: none; overflow-y: hidden; line-height: 1.35; min-height: 44px; max-height: 120px;
}
.chat-input button { flex-shrink: 0; padding: 12px 20px; align-self: flex-end; }

/* Chat presence / typing / read receipts */
.chat-head-link { display: flex; align-items: center; gap: 12px; flex: 1; color: inherit; text-decoration: none; }
.chat-head-link:hover { text-decoration: none; }
.chat-head-info { display: flex; flex-direction: column; line-height: 1.25; }
.peer-status { font-size: .78rem; color: var(--muted); }
.peer-status.on { color: #2e9e5b; }
.bubble-body { white-space: pre-wrap; word-break: break-word; }
.bubble.mine .ticks { margin-left: 6px; font-size: .68rem; opacity: .65; vertical-align: baseline; }
.bubble.mine .ticks.read { color: #7fd4ff; opacity: 1; }
.bubble.photo { padding: 4px; max-width: 62%; }
.chat-photo { display: block; width: 100%; max-width: 220px; border-radius: 12px; }
.bubble.photo .ticks { display: block; text-align: right; margin: 2px 4px 0 0; }
.chat-photo-btn {
  flex-shrink: 0; border: none; background: none; font-size: 22px; cursor: pointer;
  padding: 0 4px; line-height: 1; align-self: center;
}
.chat-photo-btn:disabled, .chat-photo-btn.busy { opacity: .5; pointer-events: none; }
.typing-bubble { padding: 12px 14px; }
.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  display: inline-block; animation: typing-blink 1.2s infinite ease-in-out both;
}
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typing-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

@media (max-width: 520px) {
  .grid-form { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}
