/* Diez - Dating for Humans */

:root {
  --bg: #0e0b14;
  --bg-elevated: #17121f;
  --card: #1c1526;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f1fa;
  --text-muted: #a89bb8;
  --accent: #ff5c8a;
  --accent-2: #ff9a5c;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 16px;
  --container: 1080px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav__links a {
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 92, 138, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 10px 30px rgba(255, 92, 138, 0.45);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Destructive action, matches the chat panel's Unmatch / report styling. */
.btn--danger {
  border-color: #ff5c5c;
  color: #ff5c5c;
  background: transparent;
}

.btn--danger:hover {
  border-color: #ff5c5c;
  color: #ff5c5c;
  background: rgba(255, 92, 92, 0.1);
}

.btn--outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn--outline:hover {
  background: rgba(255, 92, 138, 0.1);
}



/* ---------- Sections ---------- */
section {
  padding-block: 5rem;
}

.feature-split:first-of-type {
  padding-top: 2rem;
  border-top: none;
}

.feature-split {
  padding-block: 5rem;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Feature Split (alternating image + text) ---------- */
.feature-split {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.feature-split__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-split--reversed .feature-split__inner {
  direction: rtl;
}

.feature-split--reversed .feature-split__inner > * {
  direction: ltr;
}

.feature-split__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-split__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feature-split__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.feature-split__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.feature-split__list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text);
  font-size: 0.95rem;
}

.feature-split__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.feature-split__phone {
  display: flex;
  justify-content: center;
}

/* Feature phone mockup — large, with subtle shadow and tilt */
.feature-phone {
  position: relative;
  width: 300px;
  background: #1a1a2e;
  border-radius: 36px;
  padding: 14px 10px 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 80px rgba(255, 92, 138, 0.08);
  transform: perspective(1200px) rotateY(-3deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.feature-phone:hover {
  transform: perspective(1200px) rotateY(0deg);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 100px rgba(255, 92, 138, 0.12);
}

.feature-split--reversed .feature-phone {
  transform: perspective(1200px) rotateY(3deg);
}

.feature-split--reversed .feature-phone:hover {
  transform: perspective(1200px) rotateY(0deg);
}

.feature-phone__notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 7px;
  background: #0d0d1a;
  border-radius: 4px;
  z-index: 2;
}

.feature-phone__screen {
  width: 100%;
  border-radius: 24px;
  display: block;
}

@media (max-width: 768px) {
  .feature-split__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .feature-split--reversed .feature-split__inner {
    direction: ltr;
  }
  .feature-split__list {
    align-items: center;
  }
  .feature-phone {
    width: 260px;
    transform: none;
  }
  .feature-phone:hover {
    transform: none;
  }
  .feature-split--reversed .feature-phone {
    transform: none;
  }
  .feature-split--reversed .feature-phone:hover {
    transform: none;
  }

}

/* ---------- Download the apps ---------- */
.download {
  border-top: 1px solid var(--border);
}

.download .section__title,
.download .section__subtitle {
  text-align: center;
}

.download__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 560px;
  margin: 2.5rem auto 0;
}

.download__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

a.download__card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 92, 138, 0.4);
}

.download__icon {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.download__name {
  font-size: 1.2rem;
  font-weight: 800;
}

.download__hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.download__card--soon {
  opacity: 0.6;
  cursor: default;
}

/* ---------- Signup ---------- */
.signup {
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.signup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.signup__inner {
  text-align: center;
  max-width: 640px;
}

.signup__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.signup__row {
  display: flex;
  gap: 0.75rem;
}

.signup__form input,
.signup__select {
  flex: 1;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signup__select {
  flex: 0 0 11rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  padding-right: 2.5rem;
}

.signup__select option {
  background: var(--bg-elevated);
  color: var(--text);
}

/* City autocomplete dropdown */
.signup__city-wrap {
  position: relative;
  flex: 1;
}

.signup__city-wrap input {
  width: 100%;
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.city-suggestions[hidden] {
  display: none;
}

.city-suggestions li + li {
  border-top: 1px solid var(--border);
}

.city-suggestions button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.9rem;
  border: none;
  background: none;
  color: var(--text);
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 0.55rem;
}

.city-suggestions button:hover,
.city-suggestions button:focus-visible {
  background: var(--accent-soft, rgba(255, 92, 138, 0.12));
  outline: none;
}

.signup__form input::placeholder {
  color: var(--text-muted);
}

.signup__form input:focus,
.signup__select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
}

.form-message {
  margin-top: 1rem;
  min-height: 1.5em;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.form-message.success {
  color: #6ee7a0;
}

.form-message.error {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a:hover {
  color: var(--text);
}

/* ---------- Auth views (login / signed-in home) ---------- */
.auth-view {
  min-height: 100vh;
  padding: 1.5rem 1rem 5.5rem;
}

/* ---------- Signed-in bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  background: rgba(26, 22, 37, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.bottom-nav__item:hover {
  color: var(--text);
}

.bottom-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.4rem;
}

.bottom-nav__icon svg {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
}

.bottom-nav__item.is-active {
  color: var(--accent);
}

.auth-view__inner {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-card--center {
  align-items: center;
  text-align: center;
}

.auth-card__mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-card__title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.auth-card__subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form input {
  width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input::placeholder {
  color: var(--text-muted);
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
}

.auth-form__submit {
  width: 100%;
  margin-top: 0.5rem;
}

/* Side-by-side secondary actions in the login card (e.g. "Resend code" +
   "Use a different email" on the code step), styled like the modal's
   "Got it" text link, never a primary button, with the same top spacing. */
.auth-form__row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.auth-form__row .auth-card__link {
  flex: 1;
}

.auth-card__link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
  text-align: center;
}

.auth-card__link:hover {
  color: var(--text);
}

#view-profile .auth-card {
  padding: 0;
  position: relative;
  overflow: hidden;
  flex: unset;
}

#view-profile .auth-card .profile-form--section {
  overflow-y: auto;
  max-height: 100%;
  padding: 1.5rem;
}

#view-profile .profile-summary {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  gap: 0;
}

#view-profile .profile-summary__photos {
  position: relative;
  width: 100%;
  margin: 0;
  z-index: 0;
}

/* Semi-transparent gradient scrim between gallery and text overlay */
#view-profile .profile-summary::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65%;
  background: linear-gradient(to top, rgba(17, 17, 24, 0.98) 0%, rgba(17, 17, 24, 0.85) 35%, rgba(17, 17, 24, 0.4) 70%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

#view-profile .profile-summary__photos .photo-carousel {
  margin-bottom: 0;
  border-radius: 0;
  max-height: 80vh;
  overflow: hidden;
}

@media (max-width: 640px) {
  #view-profile .profile-summary__photos .photo-carousel {
    max-height: 100%;
  }
  #view-profile .profile-summary__photos .photo-carousel__img {
    max-height: 100%;
  }
}

#view-profile .profile-summary__photos .photo-carousel__track {
}

#view-profile .profile-summary__photos .photo-carousel__img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

/* Move dots to the top on profile view */
#view-profile .photo-carousel__dots {
  bottom: auto;
  top: 0.75rem;
}

#view-profile .profile-summary__name,
#view-profile .profile-summary__detail,
#view-profile .profile-summary__distance,
#view-profile .profile-summary__line,
#view-profile .profile-summary__interests,
#view-profile #profile-edit-btn,
#view-profile #manage-sub-btn {
  position: relative;
  z-index: 1;
}

/* Semi-transparent card behind the text/info area (matches mobile2's bottomOverlayBg) */
#view-profile .profile-summary__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--radius);
  margin: 0 0.75rem 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

/* On mobile, move info below the gallery instead of overlaying */
@media (max-width: 640px) {
  #view-profile .profile-summary__info {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0;
    border-radius: 0;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--bg);
  }

  #view-profile .profile-summary::before {
    display: none;
  }
}
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

#view-profile .profile-summary__name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.15rem;
}

#view-profile .profile-summary__detail,
#view-profile .profile-summary__distance,
#view-profile .profile-summary__line {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  margin: 0;
}

#view-profile .profile-summary__interests {
  gap: 0.35rem;
  margin-bottom: 0;
}

/* Profile interest chips: muted, non-accent style (no pink fill) */
#view-profile .profile-summary__interests .profile-chip {
  cursor: default;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
}

#view-profile #profile-edit-btn {
  width: 100%;
  margin-top: 0.25rem;
}

#view-profile #manage-sub-btn {
  width: 100%;
  margin-top: 0.25rem;
}

/* Edit profile button fills horizontal space */
#profile-edit-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Manage subscription button below Edit Profile */
#manage-sub-btn {
  display: block;
  width: 100%;
}

/* Modal cancel / "Not now" buttons, visible border, centered. */
.modal__cancel {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.7rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.modal__cancel:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* The login card's "Back to home" mirrors the modal's "Got it", full-width,
   centered, and separated from the button above like #notice-secondary. */
#login-back {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.75rem;
}

.auth-message {
  min-height: 1.5em;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-message.success {
  color: #6ee7a0;
}

.auth-message.error {
  color: var(--accent);
}

.auth-card__box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: left;
  margin: 1rem 0;
}

.auth-card__box h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.auth-card__box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dev-box {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  text-align: center;
}

.dev-box__code {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.35em;
}

.dev-box__hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

/* ---------- Matches feed ---------- */
/* The matches screen fills the viewport so the card can use the full height:
   view → inner → auth-card → list → card each stretch. */
#view-matches.auth-view {
  min-height: calc(100vh - 4rem);
  padding: 1rem 1rem 4.5rem;
  display: flex;
  flex-direction: column;
}

.auth-view__inner--matches {
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  /* Clear the fixed bottom nav so the last card/rating controls stay visible. */
  padding-bottom: 4.5rem;
}

#view-matches .auth-card {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 560px;
  align-items: stretch;
  padding: 1rem;
}

#view-matches .matches-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 0.5rem;
}

.matches-topbar {
  width: 100%;
  max-width: 26rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

/* Compact variant: smaller gap when no match card is on screen (loading,
   error, empty, done states). */
.matches-topbar--compact {
  margin-bottom: 0.5rem;
}

.matches-startover {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid #ff5c5c;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  color: #ff5c5c;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}

.matches-startover:hover {
  background: rgba(255, 92, 92, 0.1);
}

.matches-startover:active {
  transform: scale(0.97);
}

.matches-progress {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.matches-state {
  padding: 1.5rem 0.5rem;
  text-align: center;
}

.matches-state__title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.matches-state__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.matches-state .btn {
  margin-top: 1rem;
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  flex: 1;
  min-height: 0;
}

.match-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  height: 80vh;
  max-height: 80vh;
  flex: unset;
}

@media (max-width: 640px) {
  .match-card {
    height: 75vh;
    max-height: 75vh;
  }
}

/* Photo carousel fills the entire match card */
.match-card > .photo-carousel {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 0;
  z-index: 0;
}

.match-card > .photo-carousel .photo-carousel__track {
  height: 100%;
}

.match-card > .photo-carousel .photo-carousel__img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

/* Move dots to the top on match cards */
.match-card .photo-carousel__dots {
  bottom: auto;
  top: 0.75rem;
}

/* Gradient scrim for text readability over the gallery */
.match-card > .photo-carousel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65%;
  background: linear-gradient(to top, rgba(17, 17, 24, 0.98) 0%, rgba(17, 17, 24, 0.85) 35%, rgba(17, 17, 24, 0.4) 70%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* Semi-transparent overlay for info, chips, and actions */
.match-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0.75rem 0.75rem;
  gap: 0;
  overflow-y: auto;
  scrollbar-width: none;
  pointer-events: none;
}

.match-card__overlay > * {
  pointer-events: auto;
}

.match-card__overlay::-webkit-scrollbar {
  display: none;
}

/* Unified semi-transparent card behind all overlay content */
.match-card__bg {
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ---------- Photo carousel (match cards) ---------- */
.photo-carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.9rem;
  background: var(--bg-elevated);
}

.photo-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.photo-carousel__track::-webkit-scrollbar {
  display: none;
}

.photo-carousel__img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Profile preview shows the full photo instead of a cropped fill (match
   cards keep the cover crop). */
.photo-carousel--contain .photo-carousel__img {
  object-fit: contain;
}

.photo-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.photo-carousel__arrow:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.75);
}

.photo-carousel__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.photo-carousel__arrow--prev {
  left: 0.5rem;
}

.photo-carousel__arrow--next {
  right: 0.5rem;
}

.photo-carousel__dots {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  pointer-events: none;
}

.photo-carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.15s ease, background 0.15s ease;
}

.photo-carousel__dot.is-active {
  width: 18px;
  border-radius: 999px;
  background: var(--accent);
}

.photo-carousel__credits {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  pointer-events: none;
}

/* "User has not uploaded images yet" sits above the Pexels credit. */
.photo-carousel__credit-note {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.photo-carousel__credit {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ---------- Fullscreen photo modal ---------- */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: grid;
  place-items: center;
}

.photo-modal__backdrop {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.photo-modal__img {
  position: relative;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  cursor: zoom-out;
}

.photo-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.photo-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.photo-modal__credit-note {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
}

.photo-modal__credit {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  pointer-events: none;
}

.match-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.match-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.match-card__info {
  flex: 1;
  min-width: 0;
}

.match-card__info-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.match-card__info-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.match-card__name {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.match-card__meta {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Report Profile button aligns right on the same line as the distance/location
   row on desktop. On mobile it stacks below Looking For. */
.match-card__info-flex .matches-report {
  margin-top: 0;
}

.match-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Interests left, "Report Profile" right on the same line. */
.match-card__chips-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
}

/* Interests the viewer shares with the candidate get the same accent
   treatment the profile screen uses for interest chips; the rest stay muted. */
.match-card__chips .profile-chip {
  cursor: default;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
}

.match-card__chips .profile-chip.common {
  border-color: var(--accent);
  background: rgba(255, 92, 138, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.matches-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  /* Spacing to the card content above is handled by .match-card__actions. */
  margin-top: 0;
}

.matches-rating__title {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.matches-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.matches-number {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--gradient);
  border: none;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  opacity: var(--num-opacity, 1);
  transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.matches-number:hover:not(:disabled) {
  transform: scale(1.06);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(255, 92, 138, 0.4);
}

.matches-number:active:not(:disabled) {
  transform: scale(0.96);
}

.matches-number:disabled {
  opacity: 0.6;
  cursor: default;
}

.matches-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid #ff5c5c;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  color: #ff5c5c;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
  width: 50%;
  text-align: center;
}

.matches-report:hover {
  background: rgba(255, 92, 92, 0.1);
}

.matches-report:active {
  transform: scale(0.97);
}

/* Bottom-pinned actions area inside the match card: the rating section +
   Report Profile. DOM order is [rating, report] so mobile reads interests →
   rate → report; desktop re-orders to interests → report → rate. */
.match-card__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.4rem;
  padding-top: 0;
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
  width: 100%;
}

.report-step2 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
  width: 100%;
}

.report-step2__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.report-option {
  border-color: #ff5c5c;
  color: #ff5c5c;
  width: 100%;
}

.report-option:hover {
  border-color: #ff5c5c;
  color: #ff5c5c;
}

.report-details {
  width: 100%;
  min-height: 4.2rem;
  resize: vertical;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}

.report-details:focus {
  outline: none;
  border-color: var(--accent);
}

.report-details::placeholder {
  color: var(--text-muted);
}

.report-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.report-confirm__label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.report-confirm__value {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0;
  word-break: break-word;
}

.report-confirm__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.report-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.report-done__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.matches-submit-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.9rem;
}

/* ---------- Mobile rating modal ---------- */
.matches-rate-btn {
  width: 100%;
  margin-top: 0.5rem;
  flex: 1 1 100%;
  align-self: stretch;
}

/* Hide the Rate button on desktop, show inline numbers */
.matches-rate-btn {
  display: none;
}

.matches-numbers--desktop {
  display: flex;
}

/* On mobile, hide inline numbers, show the Rate button, hide the title */
@media (max-width: 640px) {
  .matches-rate-btn {
    display: block;
  }
  .matches-numbers--desktop {
    display: none;
  }
  #matches-rating-title {
    display: none;
  }
}

/* Rating modal: mini-profile with carousel */
#rating-modal .modal__card {
  padding: 0;
  overflow: hidden;
}

#rating-modal .modal__close {
  z-index: 5;
}

#rating-modal .profile-view {
  padding: 1rem;
  margin-top: 0;
}

#rating-modal .profile-view .photo-carousel {
  margin-bottom: 0.75rem;
}

.rating-modal__rate {
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.matches-numbers--modal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

/* ---------- Push notification banner ---------- */
.push-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}
.push-banner__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}
.push-banner__text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.push-banner__btn {
  flex-shrink: 0;
}
.btn--sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
}
.push-banner__dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  opacity: 0.6;
}
.push-banner__dismiss:hover {
  opacity: 1;
}

/* ---------- Conversations (Conversations tab) ---------- */
.conversations-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.5rem;
  text-align: left;
}

.conversation-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.conversation-row:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.conversation-row__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.conversation-row__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.conversation-row__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.conversation-row__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.conversation-row__meta {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Chat panel */
.chat-panel {
  max-width: 34rem;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.chat-panel__header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  transition: color 0.15s ease;
}

.chat-back:hover {
  color: var(--text);
}

.chat-panel__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.95rem;
  overflow: hidden;
  flex-shrink: 0;
}

.chat-panel__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-profile-btn {
  /* The name is absolutely positioned (out of flow) so it can center on the
     full header, margin-left: auto pins this button to the far right.
     Same treatment as the Send button (gradient pill, white text). */
  margin-left: auto;
  flex-shrink: 0;
  background: var(--gradient);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.chat-profile-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Centered on the full header width (left group and the View Profile button
   sit on either side without skewing it). */
.chat-panel__name {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 6.5rem;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  min-height: 18rem;
  max-height: 55vh;
  overflow-y: auto;
}

.chat-bubble-row {
  display: flex;
}

.chat-bubble-row--mine {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 78%;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.chat-bubble--mine {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 4px;
}

.chat-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin: auto;
  padding: 2rem 1rem;
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-top: 1px solid var(--border);
}

.chat-composer input {
  flex: 1;
  height: 2.6rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Send is pinned to the input's exact height so the two always sit level,
   regardless of browser font / line-height quirks on form controls. */
.chat-composer .btn {
  height: 2.6rem;
  padding-top: 0;
  padding-bottom: 0;
}

.chat-composer input::placeholder {
  color: var(--text-muted);
}

.chat-composer input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
}

#chat-message-error {
  margin: 0;
  padding: 0.4rem 1.1rem 0;
}

.chat-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 0 1.1rem 0.9rem;
}

.chat-action {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chat-action:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.chat-action--danger {
  border-color: #ff5c5c;
  color: #ff5c5c;
}

.chat-action--danger:hover {
  border-color: #ff5c5c;
  color: #ff5c5c;
  background: rgba(255, 92, 92, 0.1);
}

/* ---------- Modal ---------- */
[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 26rem;
  max-height: 85vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

/* Mobile: use dynamic viewport height so the card shrinks when the
   keyboard opens (iOS) or we can detect it via JS (Android). */
@media (max-width: 640px) {
  .modal__card {
    max-height: 85dvh;
  }
}

/* When the virtual keyboard is open on mobile, push the card to the
   bottom of the viewport so the textarea stays above the keyboard. */
.modal.kb-open .modal__backdrop {
  justify-content: flex-end;
  padding-bottom: 1rem;
}
.modal.kb-open .modal__card {
  max-height: 70dvh;
  overflow: auto;
}

.modal__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal__body {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.modal__action {
  width: 100%;
}

#notice-secondary {
  display: block;
  margin-top: 0.75rem;
  text-align: center;
  width: 100%;
}

/* ---------- Profile section (Profile tab) ---------- */
.auth-card__mark--center {
  margin: 0 auto 0.75rem;
}

.auth-card__title--center,
.auth-card__subtitle--center {
  text-align: center;
}

.profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.profile-summary__name {
  font-size: 1.4rem;
  font-weight: 800;
}

.profile-summary__detail {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.profile-summary__distance {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.profile-summary__interests {
  justify-content: center;
  margin-bottom: 1rem;
}

.profile-summary__interests .profile-chip {
  cursor: default;
  border-color: var(--accent);
  background: rgba(255, 92, 138, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.profile-form--section {
  margin-top: 0.5rem;
}

/* ---------- Profile photo grid (3x2 upload slots) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.photo-grid__cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.photo-grid__cell:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.photo-grid__cell--filled {
  border-style: solid;
  border-color: var(--border);
}

.photo-grid__cell--static {
  cursor: default;
}

.photo-grid__cell--static:hover {
  border-color: var(--border);
  background: var(--bg-elevated);
}

.photo-grid__cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.photo-grid__remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.profile-summary__photos {
  margin-bottom: 1rem;
  width: 100%;
}

/* ---------- Profile setup modal ---------- */
.modal__card--wide {
  max-width: 34rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__card--wide .auth-card__mark {
  margin: 0 auto 0.75rem;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 1;
}

.modal__close:hover {
  color: var(--text);
  background: var(--border);
}

/* ---------- View Profile modal (chat header) ---------- */
.profile-view {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.profile-view__loading {
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
}

.profile-view__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.profile-view__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.profile-view__info {
  flex: 1;
  min-width: 0;
}

.profile-view__name {
  font-weight: 800;
  font-size: 1.15rem;
}

.profile-view__meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

.profile-view__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-view__chips .profile-chip {
  cursor: default;
}

.profile-view__chips .profile-chip.common {
  border-color: var(--accent);
  background: rgba(255, 92, 138, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-form input[type="text"] {
  width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-form input[type="text"]::placeholder {
  color: var(--text-muted);
}

.profile-form input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
}

.profile-label,
.profile-field legend {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.profile-field {
  border: none;
  margin: 0;
  padding: 0.35rem 0;
}

.profile-field legend {
  padding: 0;
}

.profile-segment {
  display: flex;
  gap: 0.5rem;
}

.profile-seg {
  flex: 1;
  cursor: pointer;
}

.profile-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-seg span {
  display: block;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.profile-seg input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.profile-range {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-range input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.profile-range__value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  min-width: 4.5rem;
}

.profile-range__value input[type="number"] {
  width: 3rem;
  padding: 0.25rem 0.35rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-align: right;
}

.profile-range__unit {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-range__bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Date-of-birth input, same look as the text inputs. */
.profile-form input[type="date"] {
  width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-form input[type="date"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.2);
}

.profile-form input[type="date"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-form input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
}

/* Dual-thumb partner age range: two overlaid range inputs + highlight track. */
.profile-dual-range {
  position: relative;
  height: 2rem;
  margin: 0.5rem 0;
}

.profile-dual-range input[type="range"] {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  margin: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 2rem;
  z-index: 2;
}

/* Hide the default tracks, we draw our own highlight instead. */
.profile-dual-range input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}

.profile-dual-range input[type="range"]::-moz-range-track {
  background: transparent;
  height: 4px;
}

.profile-dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: grab;
  margin-top: -9px;
  z-index: 2;
}

.profile-dual-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: grab;
  margin-top: -9px;
  z-index: 2;
}

.profile-dual-range__highlight {
  position: absolute;
  top: calc(50% - 2px);
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}

.profile-dual-range__labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.15rem;
  gap: 0.5rem;
}

.profile-dual-range__num {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--accent);
}

.profile-dual-range__inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.profile-dual-range__inputs span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-dual-range__inputs input[type="number"] {
  width: 3rem;
  padding: 0.3rem 0.4rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-align: center;
}

/* "Looking for" segment, 2x2 so all four options fit comfortably. */
.profile-segment--looking {
  flex-wrap: wrap;
}

.profile-segment--looking .profile-seg {
  flex: 1 1 calc(50% - 0.5rem);
}

/* Extra profile-summary lines (age / looking-for / age range). */
.profile-summary__line {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.profile-chip {
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.profile-chip:hover {
  border-color: var(--accent);
}

.profile-chip.selected {
  border-color: var(--accent);
  background: rgba(255, 92, 138, 0.12);
  color: var(--accent);
  font-weight: 700;
}

.profile-chip.crossed-out {
  opacity: 0.35;
  border-color: var(--text-muted);
  text-decoration: line-through;
}

#profile-cancel {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
  text-align: center;
}

#profile-cancel:hover {
  color: var(--text);
}

/* ---------- Profile wizard ---------- */
.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease;
}

.wizard-dot.active {
  background: var(--accent);
}

.wizard-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

.wizard-steps {
  position: relative;
}

.wizard-step {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
}

.wizard-step.active {
  display: flex;
}

.wizard-step__title {
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 0.5rem;
}

.wizard-step__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 0.5rem;
}

.wizard-step .profile-segment,
.wizard-step .profile-range,
.wizard-step .profile-dual-range,
.wizard-step .profile-chips,
.wizard-step .photo-grid {
  margin-top: 0.5rem;
}

.wizard-error {
  color: #ff5c5c;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.3rem;
  margin-top: 0.5rem;
}

.wizard-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.wizard-back {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.wizard-back:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.wizard-next {
  flex: 1;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
}

.wizard-nav__spacer {
  flex: 0;
}

/* When the Back button is hidden (first step), collapse the spacer
   so the Next button fills the entire row. */
.wizard-back[hidden] ~ .wizard-nav__spacer {
  display: none;
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav__links {
    display: none;
  }

  .hero {
    padding: 5rem 0 6rem;
  }

  .signup__form {
    flex-direction: column;
  }

  .signup__row {
    flex-direction: column;
  }

  .signup__select {
    flex: 1;
  }

  .signup__form .btn {
    width: 100%;
  }

  /* Match card: interests centered, then the actions area below. */
  .match-card__chips-row {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .match-card__chips {
    justify-content: center;
  }

  /* Mobile: info-flex stacks vertically. */
  .match-card__info-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Hide original Report Profile on mobile; cloned button appears below rating. */
  .match-card__info-flex .matches-report {
    display: none;
  }

  .matches-report--mobile {
    margin-top: 0;
    align-self: center;
    width: 100%;
  }

  /* Mobile: rating stays in the actions area. */
  .match-card__actions .matches-rating {
    order: 1;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  /* Distance range: prevent the number input + unit from overflowing */
  .profile-range {
    gap: 0.5rem;
  }

  .profile-range__value {
    min-width: 0;
    flex-shrink: 0;
  }

  .profile-range__value input[type="number"] {
    width: 2.5rem;
    padding: 0.25rem 0.2rem;
    font-size: 0.8rem;
  }

  /* Chat composer: tighten spacing so the Send button stays on screen. */
  .chat-composer {
    padding: 0.55rem 0.65rem;
    gap: 0.35rem;
  }

  .chat-composer input {
    height: 2.2rem;
    font-size: 0.88rem;
    padding: 0 0.75rem;
    min-width: 0;
  }

  .chat-composer .btn {
    height: 2.2rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    flex-shrink: 0;
    font-size: 0.88rem;
  }

  .chat-messages {
    min-height: 10rem;
    padding: 0.75rem 0.9rem;
  }

  .chat-actions {
    padding: 0 0.9rem 0.65rem;
  }
}

/* ---------- Premium subscription modal ---------- */
.premium-modal__title {
  text-align: center;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
}

.premium-modal__subtitle {
  text-align: center;
}

.premium-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.premium-benefits__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.premium-benefits__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 12px;
}

.premium-benefits__item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

.premium-benefits__item p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.premium-price {
  text-align: center;
  margin-bottom: 1.25rem;
}

.premium-price__amount {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.premium-price__period {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.matches-unlock {
  margin-top: 1rem;
  width: 100%;
}

.premium-modal__subscribe {
  margin-bottom: 0.75rem;
}

#premium-close {
  display: block;
  margin: 0.75rem auto 0;
}

/* ============================================================
   City landing pages (dating-in-{city}.html)
   ============================================================ */
.city-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg));
}

.city-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.city-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 11, 20, 0.25), rgba(14, 11, 20, 0.94));
}

.city-hero__content {
  position: relative;
  padding: 3rem 0 2.75rem;
}

.city-hero__eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.city-hero__title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
}

.city-hero__sub {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0.75rem 0 1.5rem;
  font-size: 1.1rem;
}

.city-hero__credit {
  position: absolute;
  right: 1rem;
  bottom: 0.5rem;
  font-size: 0.75rem;
  color: rgba(245, 241, 250, 0.72);
  z-index: 2;
}

.city-hero__credit a {
  color: inherit;
  text-decoration: underline;
}

.city-section {
  padding: 2.5rem 0;
}

.city-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.city-section p {
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 720px;
}

.city-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.city-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.city-list strong {
  color: var(--text);
}

.city-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 2.5rem 0;
}

.city-gallery figure {
  margin: 0;
}

.city-gallery img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.city-gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.city-gallery figcaption a {
  color: inherit;
}

.city-cta {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

.city-cta h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.city-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.city-cta .btn {
  margin: 0 0.35rem 0.5rem;
}

.city-footer__more {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  flex-basis: 100%;
}

.city-footer__more a {
  color: var(--accent);
}

/* ---------- Smart App Banner (Diez theme) ---------- */
.smartbanner {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: 72px;
}

.smartbanner__exit {
  position: absolute;
  top: 50%;
  left: 9px;
  transform: translateY(-50%);
  display: block;
  width: 20px;
  height: 20px;
  border: 0;
  cursor: pointer;
}

.smartbanner__exit::before,
.smartbanner__exit::after {
  position: absolute;
  width: 1px;
  height: 14px;
  background: var(--text-muted);
  content: " ";
  top: 3px;
  left: 9px;
}

.smartbanner__exit::before {
  transform: rotate(45deg);
}

.smartbanner__exit::after {
  transform: rotate(-45deg);
}

.smartbanner__icon {
  left: 38px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  top: 8px;
}

.smartbanner__info {
  left: 106px;
  color: var(--text);
  height: 56px;
}

.smartbanner__info__title {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.smartbanner__info__author,
.smartbanner__info__price {
  color: var(--text-muted);
  font-size: 12px;
}

.smartbanner__button {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 1;
  display: block;
  padding: 6px 16px;
  min-width: 10%;
  border-radius: 20px;
  background: var(--gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 0;
}

.smartbanner__button:active,
.smartbanner__button:hover {
  opacity: 0.9;
  color: #fff;
}

.smartbanner__button__label {
  text-align: center;
  line-height: 20px;
}

/* Android-specific overrides */
.smartbanner.smartbanner--android {
  background: var(--card);
  box-shadow: none;
}

.smartbanner.smartbanner--android .smartbanner__exit {
  background: none;
  box-shadow: none;
  border-radius: 0;
}

.smartbanner.smartbanner--android .smartbanner__exit::before,
.smartbanner.smartbanner--android .smartbanner__exit::after {
  background: var(--text-muted);
}

.smartbanner.smartbanner--android .smartbanner__info {
  color: var(--text);
  text-shadow: none;
}

.smartbanner.smartbanner--android .smartbanner__info__title {
  color: #fff;
}

.smartbanner.smartbanner--android .smartbanner__button {
  background: var(--gradient);
  box-shadow: none;
  border-radius: 20px;
  color: #fff;
}

.smartbanner.smartbanner--android .smartbanner__button__label {
  background: none;
  text-shadow: none;
  text-transform: none;
}

/* iOS-specific overrides */
.smartbanner.smartbanner--ios {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.smartbanner.smartbanner--ios .smartbanner__button {
  background: var(--gradient);
  border-radius: 20px;
  color: #fff;
}
