:root {
  color-scheme: dark;
  --ink: #fff3f6;
  --muted: #b9a8b0;
  --line: rgba(255, 108, 139, 0.24);
  --paper: #171014;
  --panel: #1e141a;
  --rose: #ff3f71;
  --coral: #ff795f;
  --mint: #63d6b9;
  --blue: #8d83ff;
  --gold: #f6bd55;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 63, 113, 0.28), transparent 24rem),
    radial-gradient(circle at 86% 4%, rgba(255, 121, 95, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 72%, rgba(99, 214, 185, 0.11), transparent 25rem),
    linear-gradient(135deg, #080609 0%, #160d13 44%, #0b0d12 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-right: 1px solid rgba(255, 108, 139, 0.18);
  background: rgba(12, 8, 12, 0.76);
  backdrop-filter: blur(20px);
}

.brand,
.profile-mini,
.nav-link,
.topbar,
.section-heading,
.hero-panel,
.match-list article,
.conversation,
.plan-card,
.account-card,
.location-panel,
.nearby-card,
.policy-view,
.subscription-card,
.insight-card,
.prompt-card {
  border-radius: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  font-weight: 900;
  box-shadow: 0 14px 42px rgba(255, 63, 113, 0.4);
}

.brand strong,
.profile-mini strong {
  display: block;
}

.brand small,
.profile-mini small,
.match-kicker,
.eyebrow {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 0.45rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  color: #d6c7ce;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 63, 113, 0.12);
  box-shadow: 0 16px 40px rgba(255, 63, 113, 0.12);
  color: #ffffff;
}

.icon {
  width: 1.4rem;
  text-align: center;
}

.profile-mini {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--rose));
}

main {
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
}

.topbar {
  min-height: 6.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 52rem;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  letter-spacing: 0;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
}

.primary-action,
.solid-button,
.ghost-button,
.text-button,
.chip,
.round-button,
.close-button {
  border: 0;
  cursor: pointer;
}

.primary-action,
.solid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  font-weight: 800;
  box-shadow: 0 16px 38px rgba(255, 63, 113, 0.26);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-weight: 800;
}

.text-button {
  padding: 0;
  color: var(--rose);
  background: transparent;
  font-weight: 800;
}

.hero-panel {
  min-height: 19rem;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(18rem, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: stretch;
  margin: 0.5rem 0 1.4rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 6, 9, 0.9), rgba(8, 6, 9, 0.22)),
    url("data:image/svg+xml,%3Csvg width='1200' height='520' viewBox='0 0 1200 520' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='520' fill='%23080609'/%3E%3Cpath d='M0 436C169 356 252 424 421 326C593 226 672 63 831 74C982 84 1044 176 1200 99V520H0V436Z' fill='%23FF3F71'/%3E%3Cpath d='M0 108C147 178 257 113 399 183C523 244 527 372 681 385C852 399 958 244 1200 304V520H0V108Z' fill='%23FF795F' fill-opacity='.72'/%3E%3Cpath d='M0 300C205 255 260 370 445 330C659 283 725 140 943 182C1050 203 1111 270 1200 252V520H0V300Z' fill='%238D83FF' fill-opacity='.42'/%3E%3Ccircle cx='225' cy='168' r='86' fill='%23FFFFFF' fill-opacity='.12'/%3E%3Ccircle cx='1010' cy='150' r='132' fill='%2363D6B9' fill-opacity='.16'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 108, 139, 0.3);
}

.hero-copy {
  align-self: end;
  padding: clamp(1.2rem, 4vw, 2.2rem);
  color: #ffffff;
}

.hero-copy p {
  max-width: 35rem;
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-visual {
  min-height: 18rem;
  position: relative;
}

.portrait-stack {
  position: absolute;
  inset: 1.1rem;
}

.portrait-card {
  position: absolute;
  display: flex;
  align-items: flex-end;
  width: min(44%, 14rem);
  aspect-ratio: 4 / 5;
  padding: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: white;
  font-weight: 900;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  background-size: cover;
}

.portrait-one {
  right: 42%;
  top: 1rem;
  background:
    linear-gradient(to top, rgba(8, 6, 9, 0.66), transparent 48%),
    linear-gradient(145deg, #ffb8a7 0 35%, #5c4670 36% 62%, #080609 63%);
}

.portrait-two {
  right: 19%;
  top: 3.25rem;
  background:
    linear-gradient(to top, rgba(8, 6, 9, 0.66), transparent 48%),
    linear-gradient(145deg, #63d6b9 0 34%, #ff3f71 35% 61%, #2a161f 62%);
}

.portrait-three {
  right: 0;
  top: 0.4rem;
  background:
    linear-gradient(to top, rgba(8, 6, 9, 0.66), transparent 48%),
    linear-gradient(145deg, #f6bd55 0 36%, #080609 37% 60%, #ff795f 61%);
}

.content-grid {
  display: grid;
}

body:not([data-current-view="swipe"]) .topbar,
body:not([data-current-view="swipe"]) .hero-panel {
  display: none;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.preference-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: -0.2rem 0 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.preference-bar > span {
  color: var(--muted);
  font-weight: 900;
}

.chip {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-weight: 800;
}

.chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  border-color: var(--rose);
  box-shadow: 0 12px 30px rgba(255, 63, 113, 0.25);
}

.deck-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 31rem) minmax(16rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.swipe-deck {
  display: grid;
  gap: 0.65rem;
  perspective: 1000px;
}

.match-card {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(255, 108, 139, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.match-card.dragging {
  cursor: grabbing;
  transition: none;
  box-shadow: 0 34px 96px rgba(255, 63, 113, 0.2);
}

.match-card.swiped-like,
.match-card.swiped-pass {
  opacity: 0;
}

.swipe-stamp {
  position: absolute;
  z-index: 2;
  top: 1.2rem;
  padding: 0.45rem 0.7rem;
  border: 3px solid currentColor;
  border-radius: 8px;
  background: rgba(8, 6, 9, 0.78);
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}

.like-stamp {
  left: 1.2rem;
  color: var(--mint);
  transform: rotate(-10deg);
}

.pass-stamp {
  right: 1.2rem;
  color: var(--rose);
  transform: rotate(10deg);
}

.match-card.show-like .like-stamp,
.match-card.show-pass .pass-stamp {
  opacity: 1;
}

.swipe-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
}

.match-photo {
  position: relative;
  min-height: 27rem;
  background:
    linear-gradient(to top, rgba(8, 6, 9, 0.7), transparent 54%),
    linear-gradient(135deg, #ffb8a7 0 34%, #5c4670 35% 58%, #080609 59%);
}

.compatibility {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: grid;
  gap: 0.05rem;
  min-width: 4.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(8, 6, 9, 0.76);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.compatibility span {
  font-size: 1.35rem;
}

.match-body {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
}

.match-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-row span {
  padding: 0.4rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 63, 113, 0.13);
  color: #ffdce5;
  font-size: 0.85rem;
  font-weight: 800;
}

.swipe-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0 1.1rem 1.1rem;
}

.round-button {
  min-height: 3.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
  border: 1px solid var(--line);
}

.round-button.like {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  border-color: var(--rose);
}

.round-button.details {
  color: #c8c4ff;
  background: rgba(141, 131, 255, 0.16);
}

.insight-panel {
  display: grid;
  gap: 1rem;
}

.insight-card,
.prompt-card,
.match-list article,
.conversation,
.plan-card,
.account-card,
.location-panel,
.nearby-card,
.policy-view,
.subscription-card,
.message-board {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.insight-card,
.prompt-card {
  padding: 1.1rem;
}

.metric {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--rose);
  font-size: 2.2rem;
  font-weight: 900;
}

.insight-card p,
.prompt-card blockquote {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.prompt-card blockquote {
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.match-list,
.conversation-list,
.plan-grid,
.account-grid,
.nearby-grid {
  display: grid;
  gap: 0.85rem;
}

.match-list {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.match-list article {
  padding: 1rem;
}

.mini-photo {
  width: 100%;
  aspect-ratio: 16 / 11;
  margin-bottom: 0.85rem;
  border-radius: 8px;
  background-size: cover;
}

.empty-state {
  padding: 1.2rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.message-board {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
}

.account-grid {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.account-card,
.location-panel,
.policy-view,
.subscription-card {
  padding: 1.1rem;
}

.account-card p,
.location-panel p,
.policy-view p,
.subscription-card p,
.subscription-card small {
  color: var(--muted);
  line-height: 1.5;
}

.legal-actions,
.location-actions,
.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.location-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.nearby-grid {
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.nearby-card {
  overflow: hidden;
}

.nearby-card > div:last-child {
  padding: 0.85rem;
}

.nearby-card p {
  margin: 0;
  color: var(--muted);
}

.nearby-photo {
  position: relative;
  min-height: 10rem;
  background-size: cover;
  background-position: center;
}

.nearby-photo span {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 6, 9, 0.74);
  font-size: 0.82rem;
  font-weight: 900;
}

.policy-view {
  max-width: 48rem;
}

.register-view {
  max-width: 56rem;
}

.register-form {
  margin-top: 1rem;
}

.photo-preview {
  min-height: 8.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 63, 113, 0.2), rgba(141, 131, 255, 0.18)),
    rgba(255, 255, 255, 0.055);
  background-position: center;
  background-size: cover;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.photo-preview.has-photo span {
  display: none;
}

.subscription-card {
  max-width: 34rem;
}

.stripe-form {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}

.plan-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.plan-options button {
  flex: 1 1 11rem;
}

.form-grid.compact {
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.conversation {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
}

.conversation p {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.composer {
  display: grid;
  gap: 0.45rem;
}

.composer label {
  color: var(--muted);
  font-weight: 800;
}

.composer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.82rem 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(255, 63, 113, 0.52);
  outline-offset: 2px;
}

.interest-fieldset {
  min-width: 0;
  max-height: 15rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.045);
}

.interest-fieldset legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-weight: 900;
}

.interest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.interest-chip {
  display: inline-flex;
  cursor: pointer;
}

.interest-chip input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.interest-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  font-weight: 850;
}

.interest-chip input:checked + span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  border-color: var(--rose);
}

.plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.plan-card {
  padding: 1.1rem;
}

.plan-card p {
  color: var(--muted);
  line-height: 1.5;
}

.plan-icon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: rgba(255, 63, 113, 0.14);
  color: var(--rose);
  font-weight: 900;
}

.profile-dialog {
  width: min(38rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.profile-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.profile-form {
  position: relative;
  padding: 1.3rem;
  background: var(--paper);
}

.close-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1.3rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem 0;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 800;
}

.checkbox-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 0.6rem !important;
}

.checkbox-row input {
  width: 1.1rem;
  height: 1.1rem;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #2a121a, #140b10);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    height: auto;
    padding: 0.55rem;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .brand span:not(.brand-mark),
  .profile-mini {
    display: none;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .nav-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }

  .nav-link {
    justify-content: center;
    padding: 0.7rem 0.35rem;
    font-size: 0.82rem;
  }

  .icon {
    display: none;
  }

  main {
    padding-bottom: 6rem;
  }

  .hero-panel,
  .deck-layout,
  .location-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-visual {
    min-height: 15rem;
  }
}

@media (max-width: 640px) {
  main {
    padding-inline: 0.8rem;
  }

  .topbar,
  .section-heading,
  .preference-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-action {
    width: 100%;
  }

  .match-photo {
    min-height: 22rem;
  }

  .composer-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .nav-link {
    min-height: 3rem;
  }
}
