/* =========================================================================
   Vena mobile-first design system
   One stylesheet, shared across the app. Desktop adapts gracefully.
   ========================================================================= */

:root {
  /* Palette */
  --rose:        #B5546A;
  --rose-dark:   #7A2D42;
  --rose-light:  #E8C4CE;
  --rose-pale:   #F7EEF1;
  --gold:        #C9956E;
  --cream:       #FAF8F6;
  --cream-2:     #F2E8EB;
  --charcoal:    #18100E;
  --charcoal-2:  #2A1A17;
  --muted:       #6B4E55;
  --line:        #E5DCD1;
  --danger:      #B5546A;
  --success:     #5DC98A;

  /* Typography */
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(24, 16, 14, 0.06);
  --shadow-2: 0 8px 24px rgba(24, 16, 14, 0.08);
  --shadow-3: 0 16px 40px rgba(24, 16, 14, 0.14);

  /* Safe areas (iOS notch / home bar) */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);

  /* Layout */
  --tab-h: 62px;
  --header-h: 56px;
  --touch: 44px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--cream);
  overscroll-behavior-y: contain;
}
body {
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
input, select, textarea {
  font: inherit; color: inherit;
  -webkit-appearance: none; appearance: none;
  border-radius: 0;
}
a { color: var(--rose); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.15;
  margin: 0;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p  { margin: 0; }

/* --- App shell ----------------------------------------------------------- */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-height: 100vh;
  padding-top: var(--safe-top);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* Leave room for the bottom tab bar when it is present */
}
.app.has-tabs .app-body { padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px); }

/* --- Sticky header ------------------------------------------------------- */

.hdr {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--cream);
  border-bottom: 0.5px solid rgba(181, 84, 106, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}
.hdr-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--rose-dark);
  letter-spacing: 0.02em;
}
.hdr-back {
  width: var(--touch);
  height: var(--touch);
  margin-left: -0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--charcoal);
  font-size: 1.5rem;
}
.hdr-action {
  min-width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--rose);
  font-size: 0.85rem;
}

/* --- Page body ----------------------------------------------------------- */

.page {
  flex: 1;
  padding: 0.8rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.page-tight { gap: 0.45rem; }
.page-center { align-items: center; justify-content: center; text-align: center; }
.page-hero h1 {
  font-size: 2.4rem;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.page-hero .lede {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 30ch;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}
.section-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--touch);
  padding: 0.55rem 1.05rem;
  border: 0;
  border-radius: var(--r-full);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, opacity 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:active { background: var(--rose-dark); transform: scale(0.98); }
.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--line);
}
.btn-ghost:active { background: var(--cream-2); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.link {
  background: transparent;
  border: 0;
  color: var(--rose);
  font-size: 0.9rem;
  padding: 0.5rem;
}

/* --- Cards --------------------------------------------------------------- */

.card {
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.8rem 0.9rem;
  box-shadow: var(--shadow-1);
}
.card-lg { padding: 1rem; border-radius: var(--r-lg); }
.card-press {
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s;
}
.card-press:active { transform: scale(0.985); box-shadow: var(--shadow-2); }

.pill {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.pill-free    { background: var(--cream-2); color: var(--charcoal); }
.pill-premium { background: var(--gold);    color: var(--charcoal); }
.pill-rose    { background: var(--rose-pale); color: var(--rose-dark); }

/* --- Form fields --------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.85rem 0.95rem;
  font-size: 1rem;
  border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(181, 84, 106, 0.12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* --- Top app bar (3-up: filter / mode / profile) ------------------------ */

.hdr-app {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.75rem;
  height: var(--header-h);
  padding: 0 0.75rem;
  background: var(--cream);
  border-bottom: 0.5px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.hdr-app-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--charcoal);
  font-size: 1.25rem;
  text-decoration: none;
  position: relative;
}
.hdr-app-icon:active { background: var(--cream-2); }
.hdr-app-icon .badge {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--rose);
  border-radius: 50%;
  border: 2px solid var(--cream);
}
.hdr-app-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  text-decoration: none;
  margin: 4px;
}

/* Segmented mode switch (Dating / Matchmaking) */
.mode-switch {
  display: inline-flex;
  background: var(--cream-2);
  border-radius: var(--r-full);
  padding: 3px;
  width: auto;
  max-width: 220px;
  margin: 0 auto;
  position: relative;
}
.mode-btn {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  line-height: 1.2;
}
.mode-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--rose-dark);
  box-shadow: var(--shadow-1);
}
.mode-btn:disabled { opacity: 0.5; cursor: wait; }

/* --- Bottom tab bar ------------------------------------------------------ */

.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 0.5px solid var(--line);
  padding-bottom: var(--safe-bottom);
  z-index: 20;
  box-shadow: 0 -4px 20px rgba(24, 16, 14, 0.04);
}
.tabs-inner {
  height: var(--tab-h);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.68rem;
  text-decoration: none;
  transition: color 0.15s;
}
.tab .ic {
  font-size: 1.25rem;
  line-height: 1;
}
.tab[aria-current="page"] { color: var(--rose-dark); }
.tab[aria-current="page"] .ic { color: var(--rose); }
.tab { position: relative; }
.tab .dot {
  position: absolute;
  top: 8px;
  /* centered over the icon: icon is centered in the tab column, so nudge from center */
  left: calc(50% + 8px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(122, 45, 66, 0.15);
}
.convo-row { position: relative; }
.convo-row .unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  display: inline-block;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.convo-row.has-unread .convo-name,
.convo-row.has-unread .convo-preview { color: var(--charcoal); font-weight: 500; }

/* --- Chat / Intake ------------------------------------------------------- */

.chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--charcoal-2);
  color: var(--cream);
  min-height: 0;
}
.chat .hdr { background: var(--charcoal); border-bottom-color: rgba(181, 84, 106, 0.15); color: var(--cream); }
.chat .hdr-title { color: var(--cream); }
.chat .hdr-back { color: var(--cream); }

.progress-bar {
  height: 3px;
  background: rgba(181, 84, 106, 0.15);
  position: relative;
}
.progress-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--rose);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-label {
  padding: 0.4rem 0.8rem;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rose-light);
  background: var(--charcoal);
  border-bottom: 0.5px solid rgba(181, 84, 106, 0.12);
  display: flex; justify-content: space-between;
}

.msgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  -webkit-overflow-scrolling: touch;
}
.msg { max-width: 86%; animation: msgIn 0.25s ease; }
.msg.a { align-self: flex-start; }
.msg.u { align-self: flex-end; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-lbl {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose-light);
  margin-bottom: 0.35rem;
}
.bubble {
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.msg.a .bubble {
  background: rgba(250, 248, 246, 0.06);
  color: var(--cream);
  border: 0.5px solid rgba(181, 84, 106, 0.2);
  border-bottom-left-radius: 4px;
}
.msg.u .bubble {
  background: var(--rose);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.chip {
  background: transparent;
  border: 1px solid rgba(181, 84, 106, 0.45);
  color: var(--rose-light);
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--r-full);
  min-height: 36px;
}
.chip:active { background: var(--rose); color: #fff; border-color: var(--rose); }
.chip[disabled] { opacity: 0.4; }

.typing-row { display: inline-flex; gap: 5px; padding: 0.6rem 0.4rem; }
.typing-row span {
  width: 6px; height: 6px;
  background: rgba(181, 84, 106, 0.6);
  border-radius: 50%;
  animation: blink 1.2s infinite;
}
.typing-row span:nth-child(2) { animation-delay: 0.2s; }
.typing-row span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1); }
}

.chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem max(0.7rem, var(--safe-bottom));
  background: var(--charcoal);
  border-top: 0.5px solid rgba(181, 84, 106, 0.15);
  flex-shrink: 0;
}

/* --- Profile sheet (slide-up dialog for swipe deck + chat avatar tap) ------- */

.profile-sheet {
  position: fixed;
  inset: 0;
  background: rgba(24,16,14,0.55);
  z-index: 35;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s ease;
}
.profile-sheet.show { opacity: 1; }
.profile-sheet .sheet-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: var(--cream);
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .28s ease;
}
.profile-sheet.show .sheet-card { transform: translateY(0); }
.profile-sheet .sheet-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(2rem + var(--safe-bottom));
}
.profile-sheet .sheet-hero {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--cream-2);
  position: relative;
  overflow: hidden;
}
.profile-sheet .sheet-hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.profile-sheet .sheet-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.profile-sheet .sheet-body {
  padding: 0.8rem 1rem 0;
  color: var(--charcoal);
}
.profile-sheet .sheet-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  margin: 0 0 0.15rem;
  line-height: 1.1;
}
.profile-sheet .sheet-body .sheet-meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.85rem; }
.profile-sheet .field {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.4rem 0;
  border-bottom: 0.5px solid var(--line);
  font-size: 0.95rem;
}
.profile-sheet .field > .ic {
  width: 16px;
  height: 16px;
  color: var(--rose-dark);
  margin-top: 0.18rem;
  display: inline-flex;
  flex-shrink: 0;
}
.profile-sheet .field > .ic svg { width: 100%; height: 100%; display: block; }
.profile-sheet .field-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}
.profile-sheet .field-text strong {
  color: var(--rose-dark);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.profile-sheet .field-text > span { color: var(--charcoal); line-height: 1.3; }
.profile-sheet .field.bio-field .field-text > span { line-height: 1.4; }
.profile-sheet .sheet-more-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-top: 0.75rem;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-2);
}
.profile-sheet .sheet-more-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-sheet .sheet-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(250,248,246,0) 0%, var(--cream) 35%);
  padding: 0.7rem 1rem calc(0.7rem + var(--safe-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
/* Written-prompt cards in the view-profile sheet (Hinge-style colored blocks). */
.profile-sheet .prompt-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}
.profile-sheet .prompt-card {
  padding: 1.1rem 1.15rem;
  border-radius: 20px;
  line-height: 1.3;
}
.profile-sheet .prompt-card .pc-q {
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 0.55rem;
  opacity: 0.88;
}
.profile-sheet .prompt-card .pc-a {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.005em;
}

.profile-sheet .sheet-hero-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  color: var(--rose-dark);
  opacity: 0.4;
}

/* Custom dropdown picker — used in dating-preferences and as a select
   enhancement in settings. Closed state = styled pill, open state = soft
   popout panel with rose-pale highlight on the selected option. */
.picker {
  position: relative;
  display: inline-block;
  min-width: 0;
}
.picker-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.picker-btn:active { background: var(--cream-2); }
.picker.open .picker-btn,
.picker-btn:focus {
  outline: 0;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(181, 84, 106, 0.12);
}
.picker-current {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-current.placeholder { color: var(--muted); }
.picker-arrow {
  width: 12px; height: 12px;
  color: var(--rose);
  transition: transform .18s ease;
  flex-shrink: 0;
}
.picker.open .picker-arrow { transform: rotate(180deg); }

.picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  max-width: min(86vw, 320px);
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(24, 16, 14, 0.18);
  padding: 0.3rem;
  z-index: 30;
  max-height: 320px;
  overflow-y: auto;
  transform-origin: top right;
  transform: scale(0.96) translateY(-4px);
  opacity: 0;
  pointer-events: none;
  transition: transform .14s ease, opacity .14s ease;
}
.picker.open .picker-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.picker-opt {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: background .1s;
}
.picker-opt:hover { background: var(--cream-2); }
.picker-opt:active { background: var(--rose-pale); }
.picker-opt.selected {
  background: var(--rose-pale);
  color: var(--rose-dark);
  font-weight: 500;
}
.picker-opt.selected::after {
  content: '✓';
  color: var(--rose);
  font-weight: 600;
  flex-shrink: 0;
}

/* Safety prompts (block confirm, report sheet) */
.report-opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid var(--line);
  cursor: pointer;
  font-size: 0.95rem;
}
.report-opt input[type="radio"] {
  accent-color: var(--rose);
  width: 18px; height: 18px;
}
.report-opt:hover { background: var(--cream-2); }
.report-opt:last-child { border-bottom: 0; }
.chat-input input {
  flex: 1;
  background: rgba(250, 248, 246, 0.06);
  border: 0.5px solid rgba(181, 84, 106, 0.25);
  color: var(--cream);
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-full);
  font-size: 0.95rem;
}
.chat-input input::placeholder { color: rgba(250, 248, 246, 0.35); }
.chat-input input:focus { outline: 0; border-color: var(--rose); }
.chat-input .btn {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  min-height: 44px;
}

/* --- Agent avatar -------------------------------------------------------- */

.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--rose); color: #fff;
  font-family: var(--font-serif); font-size: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.9rem; }
.avatar-sm { width: 36px; height: 36px; font-size: 1rem; }
.avatar .online {
  position: absolute; right: 1px; bottom: 1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--cream);
}

/* --- Match / profile cards ---------------------------------------------- */

.match {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.7rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.match-name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--charcoal); }
.match-meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.match-why {
  font-size: 0.82rem; color: var(--charcoal-2); line-height: 1.4;
  font-style: italic; padding: 0.55rem 0.7rem;
  background: var(--rose-pale); border-left: 3px solid var(--rose);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-top: 0.55rem;
}
.match-score { text-align: center; min-width: 52px; }
.match-score .n {
  font-family: var(--font-serif); font-size: 1.6rem; color: var(--rose); display: block; line-height: 1;
}
.match-score .l {
  font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* Status badges + decision actions on match cards */
.match { position: relative; }
.match.is-passed   { opacity: 0.55; }
.match.is-declined { opacity: 0.7;  }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: var(--r-full);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.status-new      { background: var(--rose-pale); color: var(--rose-dark); }
.status-awaiting { background: #FFF4E0; color: #A06414; }
.status-mutual   { background: #E2F4E8; color: #2E7A47; }
.status-declined { background: var(--cream-2); color: var(--muted); }
.status-passed   { background: var(--cream-2); color: var(--muted); }

.match-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.match-actions .btn { min-height: 40px; padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn-pass {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line);
}
.btn-pass:active { background: var(--cream-2); color: var(--charcoal); }
.btn-accept { background: var(--rose); color: #fff; }
.btn-accept:active { background: var(--rose-dark); }

.match-status-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.match-status-row .open-link {
  color: var(--rose-dark);
  font-weight: 500;
  text-decoration: none;
}
.awaiting-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(160, 100, 20, 0.25);
  border-top-color: #A06414;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Empty / loading states --------------------------------------------- */

.empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--muted);
}
.empty .avatar { margin: 0 auto 0.65rem; background: var(--rose-pale); color: var(--rose-dark); }
.empty h3 { margin-bottom: 0.25rem; color: var(--charcoal); }

.banner-error {
  background: #FDECEF;
  border: 1px solid var(--danger);
  color: var(--rose-dark);
  padding: 0.55rem 0.85rem;
  border-radius: var(--r-md);
  font-size: 0.88rem;
}

/* --- Utilities ----------------------------------------------------------- */

.stack   { display: flex; flex-direction: column; gap: 0.55rem; }
.stack-2 { display: flex; flex-direction: column; gap: 1.25rem; }
.row     { display: flex; align-items: center; gap: 0.75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.mt-auto { margin-top: auto; }
.center-text { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* --- Desktop adaptation (single breakpoint) ----------------------------- */

@media (min-width: 720px) {
  body { background: #EEE7DD; }
  .app {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--cream);
    box-shadow: 0 20px 80px rgba(24, 16, 14, 0.12);
    border-radius: 0;
  }
  .tabs { max-width: 420px; left: 50%; transform: translateX(-50%); }
}
