/* Matches page — "Your matches" after a chat resolves.
   Scoped under `.matches` like the landing's `.lp` and chat's `.chat`, so
   these rules never leak elsewhere. Same palette as chat.css (landing
   colours: dark green #17251f, cream #f2efe6, coral #c2603e, sage #9fb8a9),
   fixed hex values, so chat → matches flows stay visually continuous. */

.matches {
  font-family: 'Gabarito', system-ui, sans-serif;
  background: #17251f;
  color: #f2efe6;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Mobile only: padding from the browser viewport, like the chat page —
     safe-area insets (notch/home-indicator on viewport-fit=cover devices)
     so the topbar and adjust pill never sit under the OS chrome. */
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.matches a { color: #f2efe6; }

/* ── Element defaults inside .matches ── */
/* :where() keeps this a zero-specificity base rule so the scoped
   .matches-topbar / .matches-main padding rules win (the same pattern
   chat.css uses) — without it, `padding: 0` here would defeat them. */
:where(.matches) header,
:where(.matches) main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
}
.matches h1 { font-family: 'Gabarito', system-ui, sans-serif; }

/* ── Top bar ── */
.matches-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 6px;
}
.matches-logo {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: #f2efe6;
  text-decoration: none;
}
.matches-logo:hover { opacity: 0.75; }
.matches-logo-dot { color: #c2603e; }
.matches-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(242, 239, 232, 0.22);
  background: rgba(242, 239, 232, 0.07);
  color: #9fb8a9;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.matches-close:hover { border-color: rgba(242, 239, 232, 0.4); color: #f2efe6; }

/* ── Scroll area ── */
.matches-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

/* ── Header ── */
.matches-header { padding: 8px 4px 18px; }
.matches-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.matches-title {
  margin: 0;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: #f2efe6;
}
.matches-count {
  font-size: 13px;
  font-weight: 800;
  color: #17251f;
  background: #c2603e;
  border-radius: 999px;
  padding: 3px 10px;
}
.matches-summary {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: #9fb8a9;
  max-width: 400px;
}

/* ── Match cards ── */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.match-card {
  display: flex;
  gap: 14px;
  background: rgba(242, 239, 232, 0.07);
  border: 1px solid rgba(242, 239, 232, 0.16);
  border-radius: 18px;
  padding: 16px;
}
.match-card-rank {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #c2603e;
  color: #17251f;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.match-card-body { flex: 1; min-width: 0; }
.match-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.match-card-name {
  font-weight: 700;
  font-size: 16px;
  color: #f2efe6;
}
.match-verified {
  font-size: 11.5px;
  font-weight: 700;
  color: #9fb8a9;
  background: rgba(159, 184, 169, 0.16);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.match-card-meta {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: #9fb8a9;
}
.match-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 9px 0 0;
}
.match-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #e8b49a;
  background: rgba(194, 96, 62, 0.14);
  border-radius: 999px;
  padding: 4px 10px;
}
.match-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 11px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #9fb8a9;
  background: rgba(242, 239, 232, 0.08);
  border: 1px solid rgba(242, 239, 232, 0.16);
  border-radius: 999px;
  padding: 5px 12px;
}
.match-slot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c2603e;
}
.match-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.match-btn-primary {
  font-family: 'Gabarito', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  color: #17251f;
  background: #c2603e;
}
.match-btn-primary:hover { background: #e8b49a; transform: translateY(-1px); }

/* ── Empty state ── */
.matches-empty {
  text-align: center;
  padding: 48px 24px;
}
.matches-empty-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #f2efe6;
}
.matches-empty-sub {
  margin: 8px auto 0;
  font-size: 14px;
  line-height: 1.5;
  color: #9fb8a9;
  max-width: 300px;
}
.matches-empty-btn {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 700;
  color: #17251f;
  background: #c2603e;
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  transition: background 0.15s;
}
.matches-empty-btn:hover { background: #e8b49a; }

/* ── Adjust pill ── */
.adjust-pill {
  flex-shrink: 0;
  width: calc(100% - 40px);
  max-width: 600px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: 'Gabarito', system-ui, sans-serif;
  font-size: 13.5px;
  color: #9fb8a9;
  background: rgba(242, 239, 232, 0.07);
  border: 1px solid rgba(242, 239, 232, 0.2);
  border-radius: 999px;
  padding: 14px 18px;
  text-decoration: none;
  transition: border-color 0.2s;
}
.adjust-pill:hover { border-color: #c2603e; }
.adjust-arrow { color: #c2603e; font-weight: 700; }

/* ── Responsive ── */
@media (max-width: 760px) {
  .matches-topbar { padding: 16px 16px 4px; }
  .matches-main { padding: 10px 16px 16px; }
  .adjust-pill { width: calc(100% - 32px); margin-bottom: 16px; }
}
