/* ── Self-hosted Inter ──────────────────────────────────────── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter-800.woff2') format('woff2'); }

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f7f1e7;
  --surface:   #fffdf8;
  --surface2:  #eee3d4;
  --border:    #d5c7b5;
  --text:      #25211e;
  --muted:     #71675e;
  --accent:    #3157d5;
  --accent-fg: #fffdf8;
  --radius:    12px;
  --radius-sm: 6px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Typography ─────────────────────────────────────────────── */
.display {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.headline {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--muted); }

.btn-full { width: 100%; }

.btn-xl {
  padding: 1.25rem 2.5rem;
  font-size: 1.25rem;
  border-radius: 16px;
  min-height: 4rem;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.legal-consent { display:flex; align-items:flex-start; gap:0.65rem; color:var(--muted); font-size:0.75rem; line-height:1.4; cursor:pointer; }
.legal-consent input { margin-top:0.2rem; accent-color:var(--accent); flex-shrink:0; }
.legal-consent a {
  color: var(--accent);
  text-decoration: underline !important;
  text-decoration-color: currentColor !important;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: auto;
}
.legal-consent a:visited { color: var(--accent); }
.signup-limit-note { color:var(--muted); font-size:0.72rem; line-height:1.4; text-align:center; margin-top:0.65rem; }
.legal-page { padding-top:90px; align-items:flex-start; }
.legal-page .card { max-width:720px; }
.legal-page h1 { margin-bottom:1rem; font-size:1.5rem; }
.legal-page h2 { font-size:1rem; margin:1.25rem 0 0.4rem; }
.legal-page p, .legal-page li { color:var(--muted); font-size:0.9375rem; line-height:1.65; }
.legal-page p { margin-bottom:0.9rem; }
.legal-page ul { padding-left:1.2rem; display:grid; gap:0.45rem; }

.legal-modal[hidden] { display:none; }
.legal-modal { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:1rem; }
.legal-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.78); }
.legal-modal-panel {
  position:relative;
  width:min(100%, 620px);
  max-height:min(82dvh, 700px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
}
.legal-modal-header {
  min-height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-shrink:0;
  padding:0.5rem 0.75rem 0.5rem 1.5rem;
  border-bottom:1px solid var(--border);
  background:var(--surface);
  color:var(--muted);
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
.legal-modal-close {
  width:44px; height:44px; flex-shrink:0; border:0; border-radius:50%;
  background:transparent; color:var(--text); font-size:1.5rem; line-height:1; cursor:pointer;
}
.legal-modal-close:hover { background:var(--surface2); }
.legal-modal-close:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.legal-modal-content {
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:1.5rem;
  scrollbar-gutter:stable;
}
.legal-modal-content:focus { outline:none; }
#legal-modal-content h1 { margin-bottom:1rem; font-size:1.2rem; }
#legal-modal-content p, #legal-modal-content li { color:var(--muted); font-size:0.875rem; line-height:1.65; }
#legal-modal-content p { margin-bottom:0.8rem; }
#legal-modal-content ul { padding-left:1.1rem; display:grid; gap:0.4rem; }

@media (max-width: 600px) {
  .legal-modal { align-items:flex-end; padding:0; }
  .legal-modal-panel {
    width:100%;
    max-height:92dvh;
    border-width:1px 0 0;
    border-radius:20px 20px 0 0;
  }
  .legal-modal-header {
    padding-top:max(0.5rem, env(safe-area-inset-top));
    padding-left:1.25rem;
  }
  .legal-modal-content {
    padding:1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  }
  #legal-modal-content h1 { font-size:1.5rem; line-height:1.2; }
  #legal-modal-content h2 { font-size:1.05rem; line-height:1.35; margin:1.5rem 0 0.5rem; }
  #legal-modal-content p, #legal-modal-content li { font-size:1rem; line-height:1.7; }
  #legal-modal-content p { margin-bottom:1rem; }
  #legal-modal-content ul { gap:0.75rem; }

  .legal-page { padding:80px 1rem 1.5rem; }
  .legal-page .card { padding:1.25rem; }
  .legal-page h1 { font-size:1.5rem; line-height:1.2; }
  .legal-page h2 { font-size:1.05rem; line-height:1.35; }
  .legal-page p, .legal-page li { font-size:1rem; line-height:1.7; }
  .legal-page ul { gap:0.75rem; }
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="tel"] {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.15s;
  outline: none;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted); }

/* ── Pills ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  user-select: none;
}
.pill:hover { border-color: var(--muted); }
.pill.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(49, 87, 213, 0.06);
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ── Page shell ─────────────────────────────────────────────── */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.container {
  width: 100%;
  max-width: 480px;
}

/* ── Nav bar ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(247,241,231,0.88);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-logo .beta-badge { color: #b43d2e; }

.beta-badge {
  display: inline-block;
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(198,66,49,0.35);
  background: rgba(198,66,49,0.08);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  vertical-align: middle;
  margin-left: 0.4rem;
  position: relative;
  top: -1px;
  pointer-events: none;
  user-select: none;
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { border-color: #b43d2e; color: #b43d2e; }

/* ── Landing ────────────────────────────────────────────────── */
.landing-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.accent-dot { color: var(--accent); }

.landing-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 340px;
  line-height: 1.6;
}

/* ── Auth page ──────────────────────────────────────────────── */
.auth-box {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.25rem;
}
.auth-toggle button {
  flex: 1;
  padding: 0.75rem;
  min-height: 44px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-toggle button.active {
  background: var(--surface2);
  color: var(--text);
}

.form-fields { display: flex; flex-direction: column; gap: 1rem; }

.form-error {
  font-size: 0.85rem;
  color: #b43d2e;
  min-height: 1.2em;
}

/* ── Profile page ───────────────────────────────────────────── */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.women-only-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.women-only-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.women-only-label { font-size: 0.9rem; line-height: 1.4; }
.women-only-label strong { display: block; font-size: 1rem; }
.women-only-label span { color: var(--muted); font-size: 0.82rem; }

/* ── Dashboard ──────────────────────────────────────────────── */
.dashboard-wrap {
  padding-top: calc(56px + 2rem);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 2rem;
}

.shuffle-empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.shuffle-hint { color: var(--muted); font-size: 1rem; }

.schedule-times { width: min(100%, 430px); display: grid; gap: 0.75rem; text-align: left; }
.schedule-times > div {
  display: flex; justify-content: space-between; gap: 1rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.schedule-times span { color: var(--muted); text-align: right; }
@media (max-width: 430px) {
  .schedule-times > div { flex-direction: column; gap: 0.35rem; }
  .schedule-times span { text-align: left; }
}

.group-card-wrap {
  width: 100%;
  max-width: 480px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(49, 87, 213, 0.1);
  border: 1px solid rgba(49, 87, 213, 0.3);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.group-title { font-size: 1.3rem; font-weight: 800; }
.group-expiry { font-size: 0.82rem; color: var(--muted); }
.group-expiry span { color: var(--text); font-weight: 600; }

.member-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.member-tile {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  flex-shrink: 0;
}

.member-body { flex: 1; min-width: 0; }

.member-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.member-vibe {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.member-name { font-weight: 700; font-size: 1rem; }
.member-age  { color: var(--muted); font-size: 0.9rem; }
.member-gender {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-left: auto;
}

.member-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.interest-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  line-height: 1.6;
}

.group-actions {
  display: flex;
  gap: 0.75rem;
}
.group-actions .btn { flex: 1; }

.group-exit-area {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.group-exit-btn {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 0.8rem/1.2 var(--font);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.group-exit-btn:hover {
  color: #b43d2e;
  text-decoration-color: currentColor;
}

.group-exit-btn:focus-visible {
  color: #b43d2e;
  outline: 2px solid #b43d2e;
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.committed-state {
  text-align: center;
  padding: 2rem 0;
}
.committed-emoji { font-size: 3rem; margin-bottom: 1rem; }
.committed-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.committed-sub { color: var(--muted); }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1.1em; height: 1.1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Chat ───────────────────────────────────────────────────── */
.chat-wrap {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.chat-messages {
  height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding-right: 0.25rem;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  max-width: 85%;
}

.chat-msg-me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-bubble {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 2px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg-me .chat-bubble {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  border-radius: 12px 12px 2px 12px;
}

.chat-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 0.2rem;
}

.chat-time {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
}

.chat-safety-notice {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
  border-left: 2px solid var(--border);
}

.chat-input {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--muted); }

.chat-send {
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.member-lastseen {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
}

input[type="date"],
input[type="time"] { color-scheme: dark; }

.meet-picker { cursor: pointer; caret-color: transparent; }

.picker-wrap {
  flex: 1;
  position: relative;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
}
.picker-wrap:hover { border-color: var(--accent); }

/* ── Mobile fixes ───────────────────────────────────────────── */
body { overflow-x: hidden; }

.toast { white-space: normal; text-align: center; max-width: 90vw; }

.chat-time  { font-size: 0.75rem; }
.chat-name  { font-size: 0.75rem; }
.chat-messages { height: max(200px, 30dvh); }
.chat-send  { min-height: 44px; padding: 0.6rem 1.25rem; }
.chat-input { min-height: 44px; font-size: 1rem; }

.interest-chip { font-size: 0.82rem; }
.member-lastseen { font-size: 0.75rem; }
.member-vibe { font-size: 0.85rem; }

@media (max-width: 480px) {
  .nav { padding: 0 1rem; }
  .nav-logo { font-size: 1rem; }

  .btn { padding: 0.85rem 1.25rem; font-size: 0.95rem; }
  .btn-xl { padding: 1rem 2rem; font-size: 1.1rem; }

  .group-actions { flex-direction: column; }
  .group-actions .btn { width: 100%; }

  .member-tile { flex-direction: column; gap: 0.5rem; }

  .chat-input-row { gap: 0.4rem; }
  .chat-send { padding: 0.6rem 1rem; }

  .card { padding: 1.25rem 1rem; }
  .container { padding: 0 0.25rem; }

  .profile-form { gap: 1.25rem; }
}

/* ── Matching screen ────────────────────────────────────────────── */
.matching-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 300px;
}

.matching-radar {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  animation: radarPulse 2.4s ease-out infinite;
}
.r1 { width: 40px;  height: 40px;  animation-delay: 0s; }
.r2 { width: 80px;  height: 80px;  animation-delay: 0.6s; }
.r3 { width: 120px; height: 120px; animation-delay: 1.2s; }

.radar-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: dotPulse 1.2s ease-in-out infinite;
}

@keyframes radarPulse {
  0%   { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1);   opacity: 0; }
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.6; }
}

.matching-msg {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity 0.3s;
}

/* ── Profile popup ──────────────────────────────────────────────── */
#profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
#profile-overlay.active { display: flex; }

#profile-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}

#profile-overlay-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem 1.75rem;
  width: 100%;
  max-width: 340px;
}

#profile-overlay-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
}

.profile-overlay-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
}

.profile-safety-actions {
  display:flex;
  justify-content:center;
  margin-top:1.25rem;
  padding-top:1rem;
  border-top:1px solid var(--border);
}

.profile-block-btn {
  min-height:44px;
  padding:0.65rem 1rem;
  border:0;
  border-radius:var(--radius-sm);
  background:transparent;
  color:#b43d2e;
  font:600 0.85rem/1.2 var(--font);
  cursor:pointer;
}
.profile-block-btn:hover:not(:disabled) { background:rgba(180,61,46,0.1); }
.profile-block-btn:focus-visible { outline:2px solid #b43d2e; outline-offset:2px; }
.profile-block-btn:disabled { color:var(--muted); cursor:default; }

.activity-host {
  width:100%;
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0.65rem;
  margin-top:1rem;
  padding:0.5rem 0.75rem;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--surface2);
  color:var(--muted);
  font:500 0.85rem/1.3 var(--font);
  cursor:pointer;
}
.activity-host .member-avatar { width:32px; height:32px; }
.activity-host strong { color:var(--text); }
.activity-host:hover { border-color:var(--muted); }
.activity-host:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* ── Meet box ───────────────────────────────────────────────────── */
.meet-box {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.meet-detail {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.meet-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Avatar lightbox ────────────────────────────────────────────── */
.avatar-clickable { cursor: pointer; }
.avatar-clickable:hover { opacity: 0.85; transition: opacity 0.15s; }

#avatar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#avatar-overlay.active { display: flex; }

#avatar-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
}

#avatar-overlay-box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

#avatar-overlay-img {
  width: min(280px, 80vw);
  height: min(280px, 80vw);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px rgba(49,87,213,0.2);
}

#avatar-overlay-name {
  color: #fffdf8;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

#ios-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text);
}
#ios-install-banner svg { vertical-align: middle; }
#ios-install-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  flex-shrink: 0;
}

/* ── Invite card overlay ─────────────────────────────────────── */
#invite-card-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
#invite-card-overlay.active { display: flex; }

#invite-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

#invite-card-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem 1.25rem 2rem;
  animation: slide-up 0.25s ease;
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Interest chip selected state (slots picker) ─────────────── */
.interest-chip.selected {
  background: var(--accent);
  color: var(--accent-fg);
}

/* ── Accent dim for post badge ───────────────────────────────── */
:root { --accent-dim: rgba(49,87,213,0.12); }
