/* 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: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn--outline:hover {
  background: rgba(255, 92, 138, 0.1);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 8rem;
  text-align: center;
}

.hero__glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(closest-side, rgba(255, 92, 138, 0.28), rgba(255, 154, 92, 0.12) 60%, transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero__eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
}

.hero__title {
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 40%, var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--text-muted);
  max-width: 32ch;
}

.hero__actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

/* ---------- Sections ---------- */
section {
  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;
}

/* ---------- Features ---------- */
.features {
  border-top: 1px solid var(--border);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 92, 138, 0.4);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Signup ---------- */
.signup {
  border-top: 1px solid var(--border);
}

.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);
}

.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: 70vh;
  padding: 4rem 0 7rem;
}

/* ---------- 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%;
  max-width: 26rem;
  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;
}

.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);
}

.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 ---------- */
.auth-view__inner--matches {
  flex-direction: column;
  align-items: center;
}

.matches-topbar {
  width: 100%;
  max-width: 26rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.matches-startover {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0.3rem 0.2rem;
  transition: color 0.2s ease;
}

.matches-startover:hover {
  color: var(--text);
}

.matches-startover__arrow {
  font-size: 1.05rem;
  line-height: 1;
}

.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: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.match-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

/* ---------- 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;
}

.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__credit {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* ---------- 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 {
  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: 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;
}

.match-card__info {
  flex: 1;
  min-width: 0;
}

.match-card__name {
  color: var(--text);
  font-weight: 700;
}

.match-card__meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.match-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.matches-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.matches-rating__title {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}

.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(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}

.matches-number:hover:not(:disabled) {
  transform: scale(1.06);
  border-color: var(--accent);
}

.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;
  gap: 0.4rem;
  margin-top: 1rem;
  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;
  transition: background 0.2s ease, transform 0.15s ease;
}

.matches-report:hover {
  background: rgba(255, 92, 92, 0.1);
}

.matches-report:active {
  transform: scale(0.97);
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
  width: 100%;
}

.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-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;
}

/* ---------- 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 {
  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-panel__name {
  flex: 1;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
}

.chat-panel__spacer {
  width: 2rem;
}

.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;
  padding: 0.7rem 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;
}

.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: 0.6rem;
  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;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.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%;
}

/* ---------- 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: cover;
  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;
}

.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);
}

.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-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);
}

/* ---------- 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%;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- 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;
}
