/* ==========================================================================
   RoomieFind — styles
   Palette drawn from Ljubljana: the green Ljubljanica river, the pink
   Franciscan church and the ochre baroque facades of the old town.
   ========================================================================== */

:root {
  --ink: #17302C;
  --ink-2: #48605B;
  --ink-3: #74867F;
  --paper: #F2F5F1;
  --surface: #FFFFFF;
  --sunk: #E8EEE9;
  --line: #D8E1DB;
  --line-strong: #BFCCC4;

  --river: #0E5E54;
  --river-strong: #094A41;
  --river-soft: #DCEBE6;
  --pink: #F3C6BD;
  --pink-soft: #FBE9E5;
  --raspberry: #A8384F;
  --butter: #F5D77A;
  --butter-soft: #FCF3D6;
  --danger: #B3261E;

  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(23, 48, 44, .06);
  --shadow-2: 0 1px 2px rgba(23, 48, 44, .05), 0 12px 32px -16px rgba(23, 48, 44, .28);
  --shadow-3: 0 2px 6px rgba(23, 48, 44, .08), 0 28px 60px -24px rgba(23, 48, 44, .38);

  --container: 1200px;
  --gutter: 20px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.no-scroll { overflow: hidden; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--river); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--river-strong); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
code { font-size: .9em; background: rgba(255,255,255,.5); padding: 1px 5px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 58ch; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1.5px solid var(--b-bd); border-radius: var(--r-pill);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { --b-bd: var(--ink-3); color: var(--b-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { --b-bg: var(--river); --b-fg: #fff; --b-bd: var(--river); }
.btn-primary:hover { --b-bg: var(--river-strong); --b-bd: var(--river-strong); --b-fg: #fff; }
.btn-accent { --b-bg: var(--butter); --b-fg: var(--ink); --b-bd: var(--butter); }
.btn-accent:hover { --b-bg: #EFCB5C; --b-bd: #EFCB5C; }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; }
.btn-ghost:hover { --b-bg: var(--sunk); --b-bd: var(--sunk); }
.btn-danger { --b-bg: var(--danger); --b-fg: #fff; --b-bd: var(--danger); }
.btn-danger:hover { --b-bg: #8F1D17; --b-bd: #8F1D17; --b-fg: #fff; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .875rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn .icon { width: 18px; height: 18px; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: var(--r-pill);
  border: none; background: transparent; color: var(--ink);
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--raspberry); border: 2px solid var(--surface); }

.link-btn { background: none; border: none; padding: 0; color: var(--river); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Forms ---------- */
.field { display: block; }
.label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--ink-3); font-size: .875rem; margin-left: 4px; }
.hint { display: block; font-size: .8125rem; color: var(--ink-3); margin-top: 6px; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--river); box-shadow: 0 0 0 3px var(--river-soft); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
select.input { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2348605B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-prefix > .input { padding-left: 32px; }
.field-error { color: var(--danger); font-size: .875rem; margin-top: 6px; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .9375rem; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--river); flex: none; }

/* Chips (toggle buttons) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); font-size: .9rem; font-weight: 500; color: var(--ink);
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--river); border-color: var(--river); color: #fff; }
.chip[aria-pressed="true"]::before { content: ''; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Segmented scale (lifestyle questions) */
.scale { display: grid; gap: 10px; }
.scale-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale-track button {
  height: 44px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong);
  background: var(--surface); font-weight: 600; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.scale-track button:hover { border-color: var(--ink-3); }
.scale-track button[aria-checked="true"] { background: var(--river); border-color: var(--river); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--ink-2); }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row button {
  flex: 1 1 140px; min-height: 46px; padding: 8px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 500; text-align: center;
}
.choice-row button:hover { border-color: var(--ink-3); }
.choice-row button[aria-checked="true"] { background: var(--river); border-color: var(--river); color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(242, 245, 241, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.demo-bar { background: var(--butter-soft); color: #5B4A12; font-size: .8125rem; text-align: center; padding: 6px var(--gutter); border-bottom: 1px solid #F1E2AE; }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 34px; height: 34px; }
.logo-word { font-family: var(--font-display); font-weight: 750; font-size: 1.375rem; letter-spacing: -0.04em; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 8px 14px; border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.main-nav a:hover { color: var(--ink); background: var(--sunk); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; }
.mobile-nav { border-top: 1px solid var(--line); padding: 8px var(--gutter) 16px; background: var(--paper); }
.mobile-nav a { display: block; padding: 12px 4px; font-weight: 600; font-size: 1.0625rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: none; }

.menu { position: relative; }
.menu-trigger { border: none; background: none; padding: 3px; border-radius: var(--r-pill); display: flex; }
.menu-trigger:hover { background: var(--sunk); }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-3); padding: 8px; border: 1px solid var(--line); }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-who strong { display: block; font-size: .9375rem; }
.menu-who span { font-size: .8125rem; color: var(--ink-3); word-break: break-all; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; background: none; border: none; font-size: .9375rem; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--sunk); }
.menu-list .icon { color: var(--ink-3); width: 18px; height: 18px; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .hide-sm { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 96px; background: var(--ink); color: #C9D6D0; }
.site-footer a { color: #E7EFEB; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand .logo { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 38ch; font-size: .9375rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { color: #fff; margin-bottom: 12px; font-size: .9375rem; }
.footer-cols a { display: block; padding: 4px 0; font-size: .9375rem; }
.footer-base { display: flex; justify-content: space-between; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8125rem; color: #93A79F; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } .footer-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Avatars & match ---------- */
.avatar { --av-bg: var(--river-soft); --av-fg: var(--river-strong); display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--av-bg); color: var(--av-fg); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.avatar { text-decoration: none; }
a:has(> .avatar) { text-decoration: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 26px; height: 26px; font-size: .7rem; }
.avatar-sm { width: 34px; height: 34px; font-size: .8125rem; }
.avatar-md { width: 46px; height: 46px; font-size: 1rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.3rem; }

.match { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-weight: 650; font-size: .8125rem; white-space: nowrap; }
.match::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.match-high { background: var(--river-soft); color: var(--river-strong); }
.match-mid { background: var(--butter-soft); color: #6B5410; }
.match-low { background: var(--pink-soft); color: var(--raspberry); }
.match-own { background: var(--sunk); color: var(--ink-2); }
.match-own::before { display: none; }

/* ---------- Listing cards ---------- */
.grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.lcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.lcard:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.lcard:focus-within { border-color: var(--river); }
.lcard-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--sunk); overflow: hidden; }
.lcard-media img { width: 100%; height: 100%; object-fit: cover; }
.lcard-tag { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.94); font-size: .8125rem; font-weight: 600; color: var(--ink); }
.save-btn { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: none; display: grid; place-items: center; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: var(--shadow-1); transition: transform .15s; }
.save-btn:hover { transform: scale(1.06); }
.save-btn.is-saved { color: var(--raspberry); }
.save-btn.is-saved .icon { fill: currentColor; }
.lcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lcard-price { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em; }
.lcard-price span { font-family: var(--font-body); font-weight: 500; font-size: .8125rem; color: var(--ink-2); letter-spacing: 0; margin-left: 2px; }
.lcard-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.lcard-title a { color: var(--ink); text-decoration: none; }
.lcard-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.lcard-title a:hover { text-decoration: underline; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .875rem; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts .icon { width: 17px; height: 17px; color: var(--ink-3); }
.lcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lcard-person { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; }
.lcard-time { font-size: .8125rem; color: var(--ink-3); }

.lcard-person-card { background: linear-gradient(180deg, var(--pink-soft) 0, var(--pink-soft) 92px, var(--surface) 92px); }
.lcard-head { display: flex; align-items: center; gap: 14px; padding: 20px 18px 8px; text-decoration: none; color: var(--ink); position: relative; z-index: 2; }
.lcard-head .avatar { box-shadow: 0 0 0 4px var(--surface); }
.lcard-who { display: flex; flex-direction: column; min-width: 0; padding-right: 40px; }
.lcard-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.lcard-occ { font-size: .8125rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-person-card .lcard-body { padding-top: 8px; }

.skeleton { min-height: 340px; padding: 0 0 18px; }
.sk { background: linear-gradient(90deg, var(--sunk), #F4F7F5, var(--sunk)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; }
.sk-media { aspect-ratio: 4/3; border-radius: 0; }
.sk-line { height: 14px; margin: 16px 18px 0; }
.sk-line.short { width: 50%; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Generic sections ---------- */
.section { padding-top: 88px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin-top: 8px; color: var(--ink-2); max-width: 52ch; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.panel-sm { border-radius: var(--r-md); padding: 20px; }
@media (max-width: 640px) { .panel { padding: 20px; border-radius: var(--r-md); } }

.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--sunk); border-radius: var(--r-pill); }
.tabs button, .tabs a { border: none; background: none; padding: 9px 18px; border-radius: var(--r-pill); font-weight: 600; font-size: .9375rem; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 520px) { .tabs { display: flex; width: 100%; border-radius: 16px; } .tabs button, .tabs a { flex: 1; padding: 9px 10px; font-size: .875rem; white-space: normal; line-height: 1.25; border-radius: 12px; } }

.empty { text-align: center; padding: 64px 24px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty h3 { margin-bottom: 8px; }
.empty p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 20px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--butter-soft); color: #4E3F10; font-size: .9375rem; }
.notice .icon { margin-top: 2px; }
.notice-green { background: var(--river-soft); color: var(--river-strong); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: .8125rem; font-weight: 600; background: var(--sunk); color: var(--ink-2); }
.badge-green { background: var(--river-soft); color: var(--river-strong); }
.badge-butter { background: var(--butter-soft); color: #6B5410; }
.badge-pink { background: var(--pink-soft); color: var(--raspberry); }
.badge .icon { width: 15px; height: 15px; }

/* ---------- Toast & modal ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff; box-shadow: var(--shadow-3); font-size: .9375rem; animation: toast-in .25s ease-out; }
.toast .icon { color: var(--butter); }
.toast-error { background: #6E1A14; }
.toast-error .icon { color: var(--pink); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(23, 48, 44, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); animation: pop .2s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 0 24px; }
.modal-head h2 { font-size: 1.375rem; }
.modal-body { padding: 16px 24px 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { padding-top: 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-top: 20px; }
.paths { margin-top: 36px; display: grid; gap: 12px; max-width: 600px; }
.path {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 18px 20px; border-radius: var(--r-md); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.path:hover { border-color: var(--river); box-shadow: var(--shadow-2); color: var(--ink); transform: translateY(-1px); }
.path-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.path-icon svg { width: 30px; height: 30px; }
.path-a .path-icon { background: var(--pink-soft); color: var(--raspberry); }
.path-b .path-icon { background: var(--river-soft); color: var(--river-strong); }
.path-text strong { display: block; font-family: var(--font-display); font-size: 1.1875rem; letter-spacing: -0.015em; line-height: 1.2; }
.path-text > span { display: block; color: var(--ink-2); font-size: .9375rem; margin-top: 2px; }
.path > .icon { color: var(--ink-3); }
.hero-note { margin-top: 18px; font-size: .875rem; color: var(--ink-3); }

/* The match card: the signature element */
.match-card { position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 26px; border: 1px solid var(--line); }
.match-card::before { content: ''; position: absolute; inset: -14px 18px auto -14px; height: 70%; z-index: -1; border-radius: var(--r-lg); background: var(--pink); transform: rotate(-3deg); }
.match-card::after { content: ''; position: absolute; right: -16px; bottom: -16px; width: 120px; height: 120px; z-index: -1; border-radius: 50%; background: var(--butter); }
.mc-people { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mc-person { display: flex; align-items: center; gap: 10px; }
.mc-person b { display: block; font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: -0.01em; line-height: 1.2; }
.mc-person small { color: var(--ink-3); font-size: .8125rem; }
.mc-person.right { flex-direction: row-reverse; text-align: right; }
.mc-score { text-align: center; padding: 18px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.mc-score b { display: block; font-family: var(--font-display); font-size: 4.25rem; line-height: 1; letter-spacing: -0.05em; color: var(--river); }
.mc-score span { font-size: .9375rem; color: var(--ink-2); }
.mc-rows { display: grid; gap: 14px; }
.mc-row-label { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--ink-3); margin-bottom: 6px; }
.mc-row-label b { color: var(--ink); font-weight: 600; }
.mc-track { position: relative; height: 8px; border-radius: 4px; background: var(--sunk); }
.mc-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: var(--shadow-1); transition: left .9s cubic-bezier(.2,.8,.2,1); }
.mc-dot.a { background: var(--raspberry); }
.mc-dot.b { background: var(--river); }
.mc-legend { display: flex; gap: 16px; margin-top: 18px; font-size: .8125rem; color: var(--ink-2); }
.mc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mc-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .match-card { max-width: 460px; margin: 0 auto 0 14px; }
}
@media (max-width: 520px) { .hero { padding-top: 32px; } .path { grid-template-columns: auto 1fr; padding: 16px; gap: 14px; } .path > .icon { display: none; } .path-icon { width: 44px; height: 44px; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; margin-bottom: 18px; }
.step h3 { font-size: 1.1875rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: .9375rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.area-link { display: block; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.area-link:hover { border-color: var(--river); color: var(--ink); }
.area-link strong { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: 1.125rem; letter-spacing: -0.015em; }
.area-link strong small { font-family: var(--font-body); font-size: .8125rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.area-link span { display: block; margin-top: 4px; font-size: .875rem; color: var(--ink-2); }

.safety-band { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px 32px; border-radius: var(--r-lg); background: var(--ink); color: #DCE6E1; }
.safety-band h3 { color: #fff; font-size: 1.375rem; margin-bottom: 4px; }
.safety-band .shield { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--butter); color: var(--ink); }
.safety-band .shield svg { width: 30px; height: 30px; }
.safety-band .btn { --b-bg: transparent; --b-fg: #fff; --b-bd: rgba(255,255,255,.35); }
.safety-band .btn:hover { --b-bd: #fff; }
@media (max-width: 760px) { .safety-band { grid-template-columns: 1fr; padding: 24px; } }

/* ==========================================================================
   Browse
   ========================================================================== */
.browse-head { padding-top: 36px; padding-bottom: 24px; }
.browse-head h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); }
.browse-head p { margin-top: 8px; color: var(--ink-2); }
.browse-tabs { margin-top: 22px; }
.browse-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; display: grid; gap: 22px; max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
.filters h2 { font-size: 1.125rem; }
.filter-group > .label { margin-bottom: 10px; }
.filter-group .chips { gap: 6px; }
.filter-group .chip { min-height: 34px; padding: 0 12px; font-size: .8125rem; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.results-count { font-weight: 600; }
.results-tools { display: flex; gap: 8px; align-items: center; }
.results-tools select.input { min-height: 40px; width: auto; padding-top: 6px; padding-bottom: 6px; font-size: .875rem; }
.view-toggle { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.view-toggle button { border: none; background: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; min-height: 37px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-toggle .icon { width: 17px; height: 17px; }
.filter-open { display: none; }
.map-box { height: 620px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--sunk); }
.map-popup { width: 220px; font-family: var(--font-body); }
.map-popup img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.map-popup b { display: block; font-size: .9375rem; color: var(--ink); line-height: 1.3; }
.map-popup span { font-size: .8125rem; color: var(--ink-2); }
.leaflet-popup-content-wrapper { border-radius: 12px !important; }
.compat-cta { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--r-md); background: var(--pink-soft); flex-wrap: wrap; }
.compat-cta p { font-size: .9375rem; }

@media (max-width: 960px) {
  .browse-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: auto 0 0 0; top: auto; z-index: 120; max-height: 85vh; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-3); transform: translateY(105%); transition: transform .25s ease-out; padding-bottom: 28px; }
  .filters:not(.is-open) { visibility: hidden; transition: transform .25s ease-out, visibility 0s .25s; }
  .filters.is-open { transform: none; }
  .results-tools { width: 100%; }
  .results-tools select.input { flex: 1 1 0%; min-width: 0; width: 0; }
  .filter-open { display: inline-flex; }
  .filters-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(23,48,44,.4); }
}

/* ==========================================================================
   Listing detail
   ========================================================================== */
.detail { padding-top: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); text-decoration: none; font-size: .9375rem; margin-bottom: 18px; }
.back-link:hover { color: var(--ink); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 440px; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 32px; }
.gallery button { border: none; padding: 0; background: var(--sunk); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.02); }
.gallery button:first-child { grid-row: span 2; }
.gallery.count-1 { grid-template-columns: 1fr; height: 400px; }
.gallery.count-1 img { object-position: 50% 62%; }
.gallery.count-1 button:first-child { grid-row: span 2; }
.gallery.count-2 button:nth-child(2) { grid-row: span 2; }
.gallery-more { position: relative; }
.gallery-more span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(23,48,44,.5); color: #fff; font-weight: 700; font-size: 1.125rem; }
@media (max-width: 760px) { .gallery { height: 280px; grid-template-columns: 1fr; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; } .gallery button:not(:first-child) { display: none; } }

.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(10, 22, 20, .94); display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lightbox .icon-btn { position: absolute; color: #fff; background: rgba(255,255,255,.12); }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.24); color: #fff; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; }
.lb-next { right: 16px; top: 50%; }
.lb-count { position: absolute; bottom: 20px; color: #fff; font-size: .875rem; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.detail-main > section + section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.detail-main h2 { font-size: 1.5rem; margin-bottom: 16px; }
.detail-title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.detail-sub { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--ink-2); }
.detail-sub span { display: inline-flex; align-items: center; gap: 6px; }
.detail-sub .icon { width: 18px; height: 18px; color: var(--ink-3); }
.prose { white-space: pre-line; color: var(--ink); max-width: 68ch; font-size: 1.0625rem; line-height: 1.65; }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.fact { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.fact .icon { color: var(--river); margin-bottom: 8px; }
.fact small { display: block; color: var(--ink-3); font-size: .8125rem; }
.fact b { display: block; font-weight: 600; font-size: 1rem; margin-top: 2px; }

.amenities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.people-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.person { display: flex; gap: 14px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.person b { display: block; }
.person small { display: block; color: var(--ink-2); font-size: .875rem; }
.person p { margin-top: 6px; font-size: .875rem; color: var(--ink-2); }
.person-new { border-style: dashed; background: transparent; align-items: center; color: var(--ink-2); }
.person-new .avatar { background: var(--butter-soft); color: #6B5410; }

.lifestyle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.ls-item { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.ls-item span { color: var(--ink-2); }
.ls-item b { font-weight: 600; text-align: right; }
@media (max-width: 640px) { .lifestyle-grid { grid-template-columns: 1fr; } }

.side-card { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-2); }
.side-price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.side-price span { font-family: var(--font-body); font-size: .9375rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.side-lines { margin: 16px 0 20px; display: grid; gap: 8px; font-size: .9375rem; }
.side-lines div { display: flex; justify-content: space-between; }
.side-lines span { color: var(--ink-2); }
.owner-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.owner-row b { display: block; font-size: 1rem; }
.owner-row small { color: var(--ink-2); font-size: .8125rem; }
.side-actions { display: grid; gap: 10px; }
.side-foot { display: flex; justify-content: space-between; margin-top: 14px; font-size: .8125rem; color: var(--ink-3); }
.side-foot button { background: none; border: none; padding: 0; color: var(--ink-3); display: inline-flex; gap: 4px; align-items: center; font-size: .8125rem; }
.side-foot button:hover { color: var(--raspberry); }
.side-foot .icon { width: 15px; height: 15px; }

.compat-panel { border-radius: var(--r-lg); background: var(--river-soft); padding: 24px; }
.compat-top { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.ring { --p: 0; --c: var(--river); width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.7) 0); }
.ring b { width: 66px; height: 66px; border-radius: 50%; background: var(--river-soft); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.375rem; letter-spacing: -0.03em; }
.compat-panel h3 { font-size: 1.25rem; }
.compat-panel .muted { font-size: .9375rem; }
.compat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compat-cols h4 { font-family: var(--font-body); font-size: .875rem; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; letter-spacing: 0; }
.compat-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9375rem; }
.compat-cols li { display: flex; gap: 8px; align-items: flex-start; }
.compat-cols li .icon { width: 18px; height: 18px; margin-top: 2px; }
.compat-cols .yes .icon { color: var(--river); }
.compat-cols .talk .icon { color: var(--raspberry); }
@media (max-width: 560px) { .compat-cols { grid-template-columns: 1fr; } }

.mini-map { height: 280px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--sunk); }

.profile-hero { display: flex; gap: 24px; align-items: center; padding: 28px; border-radius: var(--r-lg); background: var(--pink-soft); margin-bottom: 36px; }
.profile-hero h1 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.profile-hero .muted { margin-top: 6px; }
.lang-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lang-list .badge { background: rgba(255,255,255,.7); }
@media (max-width: 560px) { .profile-hero { flex-direction: column; align-items: flex-start; padding: 22px; } }

.looking-for { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }

@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .side-card { position: static; }
}

/* ==========================================================================
   Wizard (post)
   ========================================================================== */
.wizard { max-width: 760px; margin: 0 auto; padding-top: 36px; }
.progress { display: flex; gap: 6px; margin: 20px 0 32px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; }
.progress span.done { background: var(--river); }
.wizard-step h2 { margin-bottom: 6px; }
.wizard-step > .muted { margin-bottom: 26px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.type-option { text-align: left; padding: 22px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); display: grid; gap: 10px; transition: border-color .15s, box-shadow .15s; }
.type-option:hover { border-color: var(--line-strong); }
.type-option[aria-checked="true"] { border-color: var(--river); box-shadow: 0 0 0 4px var(--river-soft); }
.type-option .path-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.type-option strong { font-family: var(--font-display); font-size: 1.1875rem; letter-spacing: -0.015em; line-height: 1.2; }
.type-option span { color: var(--ink-2); font-size: .9375rem; }
.type-option[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) { .type-pick { grid-template-columns: 1fr; } }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.photo-tile { position: relative; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: var(--sunk); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.photo-tools button { width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(255,255,255,.95); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.photo-tools button:hover { background: #fff; color: var(--river); }
.photo-tools button[data-photo-remove]:hover { color: var(--danger); }
.photo-tools .icon { width: 16px; height: 16px; }
.photo-add small { font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.photo-tile .cover { position: absolute; left: 6px; bottom: 6px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: var(--r-pill); }
.photo-add { position: relative; aspect-ratio: 4/3; border-radius: var(--r-sm); border: 2px dashed var(--line-strong); background: var(--surface); display: grid; place-items: center; align-content: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: .875rem; cursor: pointer; }
.photo-add:hover { border-color: var(--river); color: var(--river); }
.photo-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.rm-list { display: grid; gap: 12px; }
.rm-item { display: grid; grid-template-columns: 1fr 90px 1fr auto; gap: 10px; align-items: start; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.rm-item .span-all { grid-column: 1 / -2; }
@media (max-width: 640px) { .rm-item { grid-template-columns: 1fr 80px auto; } .rm-item .occ { grid-column: 1 / -2; } }

.review { display: grid; gap: 10px; }
@media (max-width: 680px) { .review-grid { grid-template-columns: 1fr !important; } }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-side { background: var(--river); color: #D4E6E0; padding: 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 1.5vw, 2.6rem); max-width: 14ch; }
.auth-side p { margin-top: 16px; max-width: 40ch; font-size: 1.0625rem; }
.auth-side ul { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li .icon { color: var(--butter); }
.auth-side::after { content: ''; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--pink); opacity: .9; }
.auth-main { display: grid; place-items: center; padding: 48px var(--gutter); }
.auth-box { width: min(420px, 100%); }
.auth-box h1 { font-size: 2rem; margin-bottom: 8px; }
.auth-box form { margin-top: 28px; display: grid; gap: 16px; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: .9375rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .8125rem; margin: 6px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form-error { padding: 12px 14px; border-radius: var(--r-sm); background: #FCE9E7; color: var(--danger); font-size: .9375rem; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ==========================================================================
   Profile edit
   ========================================================================== */
.page-head { padding-top: 36px; padding-bottom: 28px; }
.page-head h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem); }
.page-head p { margin-top: 8px; color: var(--ink-2); max-width: 60ch; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.edit-grid .panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.375rem; margin-bottom: 6px; }
.panel > .muted { margin-bottom: 22px; font-size: .9375rem; }
.avatar-edit { display: flex; align-items: center; gap: 18px; }
.q-list { display: grid; gap: 26px; }
.q-item .label { margin-bottom: 10px; }
.profile-preview { position: sticky; top: calc(var(--header-h) + 20px); }
.completion { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin: 10px 0 6px; }
.completion span { display: block; height: 100%; background: var(--river); border-radius: 4px; transition: width .3s; }
.save-bar { position: sticky; bottom: 0; margin-top: 20px; padding: 14px 0; background: linear-gradient(rgba(242,245,241,0), var(--paper) 45%); display: flex; justify-content: flex-end; gap: 10px; pointer-events: none; }
.save-bar > * { pointer-events: auto; }
@media (max-width: 900px) { .edit-grid { grid-template-columns: 1fr; } .profile-preview { position: static; order: -1; } }

/* ==========================================================================
   Messages
   ========================================================================== */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - var(--header-h) - 64px); min-height: 480px; margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.conv-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conv-list h1 { font-size: 1.5rem; padding: 20px 20px 12px; }
.conv { display: flex; gap: 12px; padding: 14px 20px; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; }
.conv:hover { background: var(--paper); color: var(--ink); }
.conv[aria-current="true"] { background: var(--river-soft); border-left-color: var(--river); }
.conv-text { min-width: 0; flex: 1; }
.conv-listing, .conv-last { display: block; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top b { font-size: .9375rem; }
.conv-top time { font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
.conv-listing { font-size: .8125rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { font-size: .875rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv.unread .conv-last { color: var(--ink); font-weight: 600; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--raspberry); flex: none; margin-top: 6px; }
.thread { display: flex; flex-direction: column; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.thread-head b { display: block; }
.thread-head a.small { color: var(--ink-2); text-decoration: none; }
.thread-head a.small:hover { text-decoration: underline; }
.thread-back { display: none; }
.thread-body { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); }
.msg { max-width: min(72%, 520px); padding: 10px 14px; border-radius: 18px; font-size: .9375rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg-them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg-me { align-self: flex-end; background: var(--river); color: #fff; border-bottom-right-radius: 6px; }
.msg-time { font-size: .75rem; color: var(--ink-3); margin: 2px 6px 10px; }
.msg-time.me { align-self: flex-end; }
.day-sep { align-self: center; font-size: .75rem; color: var(--ink-3); background: var(--surface); padding: 3px 10px; border-radius: var(--r-pill); margin: 10px 0; }
.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { flex: 1; min-height: 46px; max-height: 160px; resize: none; border-radius: 22px; padding: 12px 16px; }
.composer .btn { min-width: 46px; padding: 0 14px; }
.thread-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 32px; color: var(--ink-2); }
.thread-empty .icon { width: 44px; height: 44px; color: var(--ink-3); margin: 0 auto 12px; }
.starter-tips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 0; }
.starter-tips button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-pill); padding: 6px 12px; font-size: .8125rem; color: var(--ink-2); }
.starter-tips button:hover { border-color: var(--river); color: var(--river); }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; margin-top: 0; border-radius: 0; border-left: none; border-right: none; height: calc(100vh - var(--header-h)); }
  .inbox.show-thread .conv-list { display: none; }
  .inbox:not(.show-thread) .thread { display: none; }
  .thread-back { display: inline-grid; }
  .msg { max-width: 85%; }
  .starter-tips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .starter-tips button { flex: none; }
}
.page-messages .site-footer { display: none; }
.page-messages { height: 100vh; height: 100dvh; overflow: hidden; }
.inbox-container { flex: 1; min-height: 0; display: flex; padding-bottom: 24px; }
.inbox-container .inbox { flex: 1; height: auto; min-height: 0; }
@media (max-width: 760px) { .inbox-container { padding: 0; } }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash-list { display: grid; gap: 12px; }
.dash-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.dash-thumb { width: 120px; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: var(--sunk); display: grid; place-items: center; }
.dash-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-item h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.dash-item h3 a { color: var(--ink); text-decoration: none; }
.dash-item h3 a:hover { text-decoration: underline; }
.dash-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; font-size: .8125rem; color: var(--ink-3); }
.dash-actions { display: flex; gap: 6px; align-items: center; }
.dash-actions select.input { min-height: 38px; width: auto; font-size: .875rem; padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 680px) { .dash-item { grid-template-columns: 80px minmax(0, 1fr); } .dash-thumb { width: 80px; } .dash-actions { grid-column: 1 / -1; justify-content: flex-end; } }

/* ==========================================================================
   Content pages (safety, legal)
   ========================================================================== */
.content { max-width: 760px; margin: 0 auto; padding-top: 48px; }
.content h1 { margin-bottom: 16px; }
.content h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.content h3 { font-size: 1.125rem; margin: 24px 0 8px; }
.content p, .content li { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }
.content p + p { margin-top: 14px; }
.content ul { padding-left: 22px; }
.content li + li { margin-top: 8px; }
.tips { display: grid; gap: 12px; margin-top: 28px; }
.tip { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.tip .badge { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
.tip h3 { margin: 0 0 4px; font-size: 1.0625rem; }
.tip p { font-size: .9375rem; }
details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.0625rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--ink-3); }
details.faq[open] summary::after { content: '–'; }
details.faq p { padding-bottom: 18px; }
.legal-note { padding: 14px 16px; border-radius: var(--r-md); background: var(--butter-soft); color: #4E3F10; font-size: .9375rem; margin-bottom: 28px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Languages
   ========================================================================== */
html.i18n-wait body { visibility: hidden; }
html[lang="sl"] [data-lang="en"],
html:not([lang="sl"]) [data-lang="sl"] { display: none !important; }

.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--sunk); }
.lang-switch button { border: none; background: none; min-width: 36px; height: 30px; padding: 0 8px; border-radius: var(--r-pill); font-size: .8125rem; font-weight: 650; letter-spacing: .02em; color: var(--ink-2); }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.header-actions .lang-switch { margin-right: 6px; }
.mobile-lang { padding: 14px 4px 4px; }
.footer-base .lang-switch { background: rgba(255,255,255,.08); }
.footer-base .lang-switch button { color: #93A79F; }
.footer-base .lang-switch button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.footer-base { align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-base > span:nth-child(2) { margin-left: auto; }
@media (max-width: 860px) { .lang-switch.hide-sm { display: none; } }
@media (max-width: 400px) { .header-actions .btn-sm { padding: 0 12px; } .logo-word { font-size: 1.25rem; } }

/* Soften OpenStreetMap colours so the map sits calmly in the design */
.leaflet-tile-pane { filter: saturate(.7) contrast(.95) brightness(1.03); }
.leaflet-container { font-family: var(--font-body); }

/* ---------- Date field (calendar) ---------- */
.datefield { position: relative; }
.datefield-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.datefield-btn .icon { color: var(--ink-3); }
.datefield-text.is-empty { color: var(--ink-3); }
.datefield-btn[aria-expanded="true"] { border-color: var(--river); box-shadow: 0 0 0 3px var(--river-soft); }
.datepop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 304px; max-width: calc(100vw - 32px); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); animation: pop .15s ease-out; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-head strong { font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: -0.01em; }
.dp-nav { width: 36px; height: 36px; border-radius: 50%; border: none; background: none; display: grid; place-items: center; color: var(--ink); }
.dp-nav:hover:not(:disabled) { background: var(--sunk); }
.dp-nav:disabled { opacity: .3; cursor: default; }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--ink-3); padding: 4px 0; text-transform: capitalize; }
.dp-day { aspect-ratio: 1; border: none; border-radius: 50%; background: none; font-size: .875rem; font-weight: 500; color: var(--ink); }
.dp-day:hover:not(:disabled) { background: var(--river-soft); }
.dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.dp-day.is-selected { background: var(--river); color: #fff; }
.dp-day:disabled { color: var(--line-strong); cursor: default; }
@media (max-width: 640px) { .datepop { left: 50%; transform: translateX(-50%); } @keyframes pop-c { from { opacity: 0; } } .datepop { animation-name: pop-c; } }

/* ---------- Profile photo strip ---------- */
.photo-strip { display: flex; gap: 10px; overflow-x: auto; margin: -16px 0 36px; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.photo-strip button { flex: none; width: 168px; aspect-ratio: 4/5; border: none; padding: 0; border-radius: var(--r-md); overflow: hidden; background: var(--sunk); scroll-snap-align: start; cursor: zoom-in; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-strip button:hover img { transform: scale(1.03); }
@media (max-width: 560px) { .photo-strip button { width: 132px; } }

/* ---------- Language picker ---------- */
.lang-selected { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-selected:not(:empty) { margin-bottom: 10px; }
.lang-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px 0 12px; min-height: 34px; border-radius: var(--r-pill); background: var(--river); color: #fff; font-size: .875rem; font-weight: 500; }
.lang-chip button { width: 26px; height: 26px; border: none; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; }
.lang-chip button:hover { background: rgba(255,255,255,.18); }
.lang-chip .icon { width: 14px; height: 14px; }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); max-height: 280px; overflow-y: auto; }
.combo-list li[role=option] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); cursor: pointer; font-size: .9375rem; }
.combo-list li small { color: var(--ink-3); font-size: .8125rem; }
.combo-list li[aria-selected="true"] { background: var(--river-soft); }
.combo-list li.is-custom { color: var(--river); font-weight: 600; }
.combo-head { padding: 6px 12px 4px; font-size: .75rem; font-weight: 600; color: var(--ink-3); }
.mail-sent { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--river-soft); color: var(--river); margin-bottom: 20px; }
.mail-sent svg { width: 32px; height: 32px; }
.form-error .link-btn { color: var(--danger); }

/* ---------- Small phones ---------- */
.mobile-only-signup { display: none !important; }
@media (max-width: 860px) { .header-inner { gap: 12px; } }
@media (max-width: 440px) {
  .header-actions { gap: 2px; }
  .header-actions > .btn-primary { display: none; }
  .mobile-only-signup { display: block !important; color: var(--river) !important; }
}
@media (max-width: 980px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.detail-title, .profile-hero h1, .lcard-title { overflow-wrap: anywhere; }
.hero { overflow-x: clip; }
@media (max-width: 340px) { :root { --gutter: 16px; } .logo-word { font-size: 1.125rem; } .logo-mark { width: 30px; height: 30px; } .fact-grid, .looking-for { grid-template-columns: 1fr 1fr; } }
.owner-row { flex-wrap: wrap; }

/* ---------- Match chart (profile & listing) ---------- */
.mc-chart { background: var(--surface); border-radius: var(--r-md); padding: 18px 18px 16px; margin-top: 18px; }
.mc-chart .mc-legend { margin: 0 0 16px; }
.mc-chart .mc-rows { gap: 16px; }
.mc-chart .mc-dot { transition: none; }
.mc-dot.both { background: linear-gradient(90deg, var(--river) 50%, var(--raspberry) 50%); }
.mc-choices { display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mc-choice { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 8px; align-items: center; font-size: .875rem; }
.mc-choice > span { color: var(--ink-3); }
.mc-choice b { font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); text-align: center; }
.mc-choice b.b { background: var(--river-soft); color: var(--river-strong); }
.mc-choice b.a { background: var(--pink-soft); color: var(--raspberry); }
@media (max-width: 480px) { .mc-choice { grid-template-columns: 1fr 1fr; } .mc-choice > span { grid-column: 1 / -1; } }
.detail-main .mc-chart { border: 1px solid var(--line); }
.compat-panel .mc-chart { border: none; }

/* ---------- Home: city search ---------- */
.where { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; max-width: 600px; margin-top: 28px; padding: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.where-field { display: flex; flex-direction: column; padding: 6px 12px 4px; border-radius: var(--r-md); }
.where-field + .where-field { border-left: 1px solid var(--line); }
.where-field:focus-within { background: var(--paper); }
.where-field label { font-size: .75rem; font-weight: 650; color: var(--ink-2); }
.where-field select { appearance: none; border: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2348605B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right center / 16px; padding: 4px 22px 4px 0; font: inherit; font-weight: 600; font-size: 1rem; color: var(--ink); cursor: pointer; min-width: 0; }
.where-field select:focus { outline: none; }
.where-field select:disabled { color: var(--ink-3); cursor: default; }
.where-go { height: 54px; border-radius: 16px; padding: 0 22px; }
.where + .paths { margin-top: 18px; }
@media (max-width: 560px) {
  .where { grid-template-columns: 1fr; gap: 0; padding: 6px; }
  .where-field { padding: 10px 12px; }
  .where-field + .where-field { border-left: none; border-top: 1px solid var(--line); }
  .where-go { margin-top: 6px; width: 100%; }
}
.browse-where { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 5px 12px 5px 9px; border-radius: var(--r-pill); background: var(--river-soft); color: var(--river-strong); font-weight: 600; font-size: .875rem; }
.browse-where .icon { width: 16px; height: 16px; }

/* ==========================================================================
   Home: split first screen
   ========================================================================== */
.hero { padding-top: 40px; }
.hero-top { text-align: center; max-width: 760px; margin: 0 auto; }
.hero-top h1 { max-width: none; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.5rem); letter-spacing: -0.03em; }
.hero-top .lead { margin: 16px auto 0; }
.hero-top .where { margin: 26px auto 0; text-align: left; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.side { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 360px; padding: 40px 40px 34px; border-radius: 28px; overflow: hidden; isolation: isolate; }
.side-a { background: var(--pink-soft); }
.side-b { background: var(--river-soft); }
.side::after { content: ''; position: absolute; z-index: -1; width: 320px; height: 320px; border-radius: 50%; right: -90px; bottom: -120px; opacity: .55; }
.side-a::after { background: var(--pink); }
.side-b::after { background: #BFDCD3; }
.side-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-1); }
.side-icon svg { width: 34px; height: 34px; }
.side-a .side-icon { color: var(--raspberry); }
.side-b .side-icon { color: var(--river-strong); }
.side h2 { margin-top: 26px; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.15rem); line-height: 1.12; max-width: 14ch; }
.side p { margin-top: 12px; color: var(--ink-2); max-width: 40ch; font-size: 1.0625rem; }
.side-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 28px; }
.btn-dark { --b-bg: var(--ink); --b-fg: #fff; --b-bd: var(--ink); }
.btn-dark:hover { --b-bg: #0F2421; --b-bd: #0F2421; --b-fg: #fff; }
.btn-light { --b-bg: rgba(255,255,255,.85); --b-bd: transparent; }
.btn-light:hover { --b-bg: #fff; --b-bd: transparent; }
.side-post { margin-top: 16px; font-size: .9375rem; font-weight: 600; color: var(--ink); }
a.side-post:hover { color: var(--river); }
span.side-post { font-weight: 500; color: var(--ink-2); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .side { min-height: 0; padding: 30px 24px 26px; border-radius: 22px; }
  .side h2 { max-width: none; }
  .side-actions .btn { flex: 1 1 200px; }
}

.match-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: center; }
.match-grid h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); }
.match-grid .lead { margin-top: 14px; }
@media (max-width: 860px) { .match-grid { grid-template-columns: 1fr; gap: 40px; } .match-section .match-card { margin: 0 auto 0 14px; max-width: 440px; } }

/* Professional type: tighter headings, calmer weights */
h1, h2, h3 { font-weight: 750; }
h1 { letter-spacing: -0.03em; }
.logo-word { font-weight: 800; letter-spacing: -0.035em; }
.lcard-price, .side-price, .mc-score b { font-weight: 800; }

/* Fit the split into the first screen */
.hero { padding-top: 28px; }
.hero-top h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); }
.hero-top .lead { margin-top: 10px; font-size: 1.0625rem; }
.hero-top .where { margin-top: 20px; }
.split { margin-top: 28px; }
.side { min-height: 0; padding: 30px 34px 28px; }
.side-icon { width: 52px; height: 52px; border-radius: 16px; }
.side-icon svg { width: 28px; height: 28px; }
.side h2 { margin-top: 18px; font-size: clamp(1.5rem, 1.15rem + 1vw, 1.9rem); max-width: 16ch; }
.side p { margin-top: 8px; font-size: 1rem; }
.side-actions { padding-top: 22px; }
.side-post { margin-top: 12px; }
