:root {
  --ink: #182f2a;
  --muted: #66746f;
  --green: #173f35;
  --green-deep: #0d2c25;
  --cream: #f7f2e8;
  --paper: #fffcf5;
  --gold: #f3b63f;
  --clay: #a64c32;
  --line: #ddd7ca;
  --danger: #a5382d;
  --white: #fff;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --shadow: 0 24px 70px rgba(23, 63, 53, 0.13);
}

html:lang(kn) {
  --serif: "Noto Serif Kannada", "Noto Sans Kannada", "Nirmala UI", serif;
  --sans: "Noto Sans Kannada", "Nirmala UI", sans-serif;
}

html:lang(hi),
html:lang(mr) {
  --serif: "Noto Serif Devanagari", "Noto Sans Devanagari", "Nirmala UI", serif;
  --sans: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
}

.i18n-loading body {
  visibility: hidden;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

body[data-view="auth"] {
  background: var(--green-deep);
}

img {
  display: block;
  max-width: 100%;
}

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

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 5px;
  color: var(--white);
  background: var(--clay);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
}

.app-brand > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  color: var(--green-deep);
  background: var(--gold);
  transform: rotate(-5deg);
}

.app-brand > span svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke-width: 1.2;
  transform: rotate(5deg);
}

.app-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.app-brand strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-brand small {
  margin-top: 4px;
  color: #8ba098;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.language-picker {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 112px;
  color: var(--muted);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-picker select {
  min-height: 34px;
  padding: 0 27px 0 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

html:not([lang="en"]) .eyebrow,
html:not([lang="en"]) .prototype-pill,
html:not([lang="en"]) .language-picker {
  letter-spacing: 0;
  text-transform: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button svg {
  margin-left: 10px;
}

.button-primary {
  color: #fffaf0;
  background: var(--clay);
  box-shadow: 0 12px 28px rgba(166, 76, 50, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: #8e3e2a;
  box-shadow: 0 16px 32px rgba(142, 62, 42, 0.25);
}

.button-outline {
  color: var(--green);
  border-color: #b9c7c1;
  background: transparent;
}

.button-outline:hover:not(:disabled) {
  border-color: var(--green);
  background: #eef4f1;
}

.button-danger {
  color: var(--white);
  background: var(--danger);
  box-shadow: 0 12px 28px rgba(165, 56, 45, 0.2);
}

.button-danger:hover:not(:disabled) {
  background: #872b23;
  box-shadow: 0 16px 32px rgba(135, 43, 35, 0.25);
}

.button-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper);
}

.button-ghost svg {
  margin-right: 10px;
  margin-left: 0;
}

.button-full {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.text-button {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--clay);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Authentication */
.auth-view {
  min-height: 100vh;
  color: #f9f2e2;
  background: var(--green-deep);
}

.auth-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 64px, 1420px);
  min-height: 86px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(249, 242, 226, 0.16);
}

.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-header .language-picker {
  color: #b8c9c2;
}

.auth-header .language-picker select {
  border-color: rgba(249, 242, 226, 0.22);
  color: #ffffff;
  background: #0f332b;
  color-scheme: dark;
}

.language-picker select option {
  color: var(--ink);
  background: var(--paper);
}

.auth-header .language-picker select option {
  color: var(--ink);
  background: #ffffff;
}

.auth-header-actions > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b8c9c2;
  font-size: 0.7rem;
  font-weight: 800;
}

.auth-header-actions > a:hover {
  color: var(--white);
}

/* Keep the native language control readable on every header background. */
.language-picker select,
.language-picker select:focus {
  color: #173f35 !important;
  background-color: #ffffff !important;
  border: 2px solid #d19a35 !important;
  color-scheme: light;
}

.language-picker select option {
  color: #173f35 !important;
  background-color: #ffffff !important;
}

.auth-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(460px, 0.9fr) minmax(430px, 0.72fr);
  align-items: center;
  gap: clamp(70px, 10vw, 170px);
  width: min(100% - 64px, 1260px);
  min-height: calc(100vh - 86px);
  margin: 0 auto;
  padding: 70px 0 85px;
}

.auth-main::before {
  position: absolute;
  z-index: 0;
  top: -160px;
  left: -260px;
  width: 570px;
  height: 570px;
  border: 1px solid rgba(243, 182, 63, 0.13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-story,
.auth-card {
  position: relative;
  z-index: 1;
}

.auth-story .eyebrow {
  color: var(--gold);
}

.auth-story h1 {
  max-width: 690px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 6vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.auth-story h1 em {
  color: var(--gold);
  font-weight: 500;
}

.auth-story > p:not(.eyebrow) {
  max-width: 500px;
  margin: 25px 0 0;
  color: #a8bdb5;
  font-size: 0.92rem;
  line-height: 1.8;
}

.auth-portrait {
  position: relative;
  width: min(100%, 510px);
  height: 235px;
  margin-top: 42px;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.06);
  border-radius: 120px 6px 6px 120px;
}

.auth-portrait > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 27%;
}

.auth-portrait > div {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  width: 275px;
  padding: 13px;
  color: var(--ink);
  background: rgba(255, 252, 245, 0.94);
  backdrop-filter: blur(10px);
}

.auth-portrait > div > span {
  display: grid;
  width: 34px;
  height: 34px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
}

.auth-portrait strong,
.auth-portrait small {
  grid-column: 2;
}

.auth-portrait strong {
  font-size: 0.72rem;
}

.auth-portrait small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.45;
}

.auth-card {
  width: 100%;
  padding: clamp(32px, 4vw, 52px);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 18px 18px 0 rgba(243, 182, 63, 0.16), 0 34px 90px rgba(0, 0, 0, 0.24);
}

.auth-step {
  margin: 0 0 7px;
  color: var(--clay);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 3.4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.auth-lead {
  margin: 9px 0 25px;
  color: var(--muted);
  font-size: 0.74rem;
}

.auth-method-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.auth-method-heading strong {
  font-size: 0.72rem;
}

.auth-method-heading span {
  max-width: 230px;
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.5;
  text-align: right;
}

.auth-email-entry,
.auth-stage {
  padding: 18px;
  border: 1px solid #d8cfbd;
  background: #fffdf8;
}

.auth-email-entry {
  border-color: #b6c9c1;
  background: #eef5f1;
}

.auth-method-choice {
  display: grid;
  gap: 12px;
}

.auth-panel form > label,
.auth-email-entry form > label,
.auth-stage form > label,
.auth-stage > label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.67rem;
  font-weight: 800;
}

.auth-panel form > small,
.auth-email-entry form > small,
.auth-stage form > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.55;
}

.auth-panel .button,
.auth-email-entry .button,
.auth-stage .button {
  margin-top: 22px;
}

.auth-input {
  width: 100%;
  height: 55px;
  padding: 0 16px;
  border: 1px solid #cfc8ba;
  outline: 0;
  color: var(--ink);
  background: var(--white);
  font-size: 0.76rem;
}

.auth-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.1);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: #837d70;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.legacy-phone-access {
  margin-top: 20px;
  color: #837d70;
}

.legacy-phone-access summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.legacy-phone-access[open] summary {
  margin-bottom: 12px;
}

.auth-stage {
  margin-top: 20px;
}

.auth-notice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  color: var(--green-deep);
  background: #e8f1ed;
}

.auth-notice > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
}

.auth-notice p,
.factor-summary {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.6;
}

.auth-notice .text-button {
  margin-top: 9px;
}

.factor-summary {
  padding: 12px 14px;
  color: var(--green-deep);
  background: #e8f1ed;
}

.phone-field {
  display: grid;
  grid-template-columns: 65px 1fr;
  height: 55px;
  border: 1px solid #cfc8ba;
  background: var(--white);
}

.phone-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.1);
}

.phone-field span {
  display: grid;
  place-items: center;
  border-right: 1px solid #ddd6c8;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
}

.phone-field input,
.otp-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: var(--white);
}

.phone-field input {
  padding: 0 16px;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.otp-sent {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 11px;
  color: var(--green);
  background: #e8f1ed;
  font-size: 0.62rem;
}

.otp-sent > svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
}

.otp-sent button {
  padding: 3px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 800;
}

.otp-input {
  height: 58px;
  padding: 0 18px;
  border: 1px solid #cfc8ba;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.48em;
  text-align: center;
}

.otp-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.6rem;
}

.otp-actions button {
  padding: 2px;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--clay);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.otp-actions button:disabled {
  border-bottom-color: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

.recaptcha-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.52rem;
  line-height: 1.55;
  text-align: center;
}

.recaptcha-note a {
  border-bottom: 1px solid currentColor;
}

.consent-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  cursor: pointer;
}

.consent-check > input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.consent-check > span {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.55;
}

.consent-check b {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid #b9b2a5;
  background: var(--white);
}

.consent-check b svg {
  width: 14px;
  height: 14px;
  opacity: 0;
}

.consent-check input:checked + span b {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.consent-check input:checked + span b svg {
  opacity: 1;
}

.auth-terms {
  margin: 25px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #7e8985;
  font-size: 0.56rem;
  line-height: 1.55;
  text-align: center;
}

.form-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
}

.form-status.success {
  color: var(--green);
}

.form-status.info {
  color: var(--muted);
}

/* Profile onboarding */
.onboarding-view {
  min-height: 100vh;
  background: var(--cream);
}

.onboarding-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 84px;
  padding: 0 max(28px, calc((100vw - 1460px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.onboarding-header .app-brand {
  justify-self: start;
}

.secure-label {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 9px;
}

.secure-label > svg {
  width: 29px;
  height: 29px;
  padding: 6px;
  border-radius: 50%;
  color: var(--green);
  background: #e5eee9;
}

.secure-label span {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.55rem;
}

.secure-label strong {
  color: var(--ink);
  font-size: 0.66rem;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}

.onboarding-header .text-button {
  justify-self: end;
}

.onboarding-main {
  display: grid;
  grid-template-columns: 370px minmax(0, 830px);
  align-items: start;
  justify-content: center;
  gap: clamp(45px, 6vw, 100px);
  width: min(100% - 64px, 1370px);
  margin: 0 auto;
  padding: 75px 0 100px;
}

.onboarding-aside {
  position: sticky;
  top: 45px;
  padding: 7px 0;
}

.onboarding-aside h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 4vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.onboarding-aside h1 em {
  color: var(--clay);
  font-weight: 500;
}

.onboarding-aside > p:not(.eyebrow) {
  max-width: 330px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.stepper {
  margin: 45px 0 0;
  padding: 0;
  list-style: none;
}

.stepper li {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 13px;
  min-height: 79px;
  color: #89948f;
}

.stepper li::before {
  position: absolute;
  top: 52px;
  bottom: -14px;
  left: 20px;
  width: 1px;
  background: #d0cabe;
  content: "";
}

.stepper li:last-child::before {
  display: none;
}

.stepper li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #cfc8bb;
  border-radius: 50%;
  background: var(--cream);
  font-size: 0.66rem;
  font-weight: 800;
}

.stepper li div {
  display: flex;
  flex-direction: column;
}

.stepper li strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.stepper li small {
  font-size: 0.58rem;
}

.stepper li.active,
.stepper li.complete {
  color: var(--green);
}

.stepper li.active > span {
  color: var(--green-deep);
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(243, 182, 63, 0.15);
}

.stepper li.complete > span {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.stepper li.complete > span::before {
  content: "✓";
}

.stepper li.complete > span {
  font-size: 0;
}

.stepper li.complete::before {
  background: var(--green);
}

.aside-privacy {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  margin-top: 48px;
  padding: 18px;
  color: #f8f0db;
  background: var(--green);
}

.aside-privacy > svg {
  width: 32px;
  height: 32px;
  padding: 7px;
  border: 1px solid rgba(243, 182, 63, 0.45);
  border-radius: 50%;
  color: var(--gold);
}

.aside-privacy p {
  margin: 0;
  color: #adbfB8;
  font-size: 0.6rem;
  line-height: 1.55;
}

.aside-privacy strong {
  display: block;
  margin-bottom: 3px;
  color: var(--white);
  font-size: 0.68rem;
}

.profile-form-wrap {
  min-width: 0;
  padding: clamp(30px, 4vw, 54px);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.mobile-progress {
  display: none;
}

.form-heading {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.form-heading > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  color: var(--green-deep);
  background: var(--gold);
  font-size: 0.67rem;
  font-weight: 800;
  transform: rotate(-4deg);
}

.form-heading p {
  margin: 0;
  color: var(--clay);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.form-heading h2 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.form-heading small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.59rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px;
  padding: 34px 0 10px;
}

.form-grid > label,
.age-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.form-grid > label > span,
.photo-field > span,
.age-field > span,
.choice-field legend {
  margin-bottom: 7px;
  color: #334b44;
  font-size: 0.65rem;
  font-weight: 800;
}

.form-grid label > small:not(.character-count),
.choice-field legend small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 500;
}

.form-grid input[type="text"],
.form-grid input[type="date"],
.form-grid input[type="number"],
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cec7b9;
  border-radius: 2px;
  outline: 0;
  color: var(--ink);
  background: var(--white);
  font-size: 0.75rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-grid input[type="text"],
.form-grid input[type="date"],
.form-grid input[type="number"],
.form-grid select {
  height: 51px;
  padding: 0 13px;
}

.form-grid select {
  cursor: pointer;
}

.form-grid textarea {
  min-height: 125px;
  padding: 13px;
  resize: vertical;
  line-height: 1.65;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.1);
}

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

.choice-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.large-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.large-choices label,
.chip-choices label,
.district-choices label {
  position: relative;
  cursor: pointer;
}

.large-choices input,
.chip-choices input,
.district-choices input,
.anywhere-choice input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.large-choices input:focus-visible + span,
.chip-choices input:focus-visible + span,
.district-choices input:focus-visible + span,
.anywhere-choice input:focus-visible + span,
.consent-check input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.large-choices label > span {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 10px 13px;
  border: 1px solid #cec7b9;
  background: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease;
}

.large-choices label > span b {
  display: grid;
  width: 35px;
  height: 35px;
  margin-right: 9px;
  place-items: center;
  border-radius: 50% 50% 50% 7px;
  color: var(--green);
  background: #eee8dc;
  font-family: var(--serif);
  font-size: 0.88rem;
}

.large-choices input:checked + span {
  color: var(--green-deep);
  border-color: var(--green);
  background: #eaf2ee;
  box-shadow: inset 0 0 0 1px var(--green);
}

.large-choices input:checked + span b {
  color: var(--green-deep);
  background: var(--gold);
}

.photo-upload {
  display: grid;
  grid-template-columns: 105px 1fr;
  align-items: center;
  gap: 20px;
  padding: 17px;
  border: 1px dashed #bdb4a5;
  background: #fbf8f0;
}

.photo-field > span {
  display: block;
}

.photo-preview {
  display: grid;
  width: 105px;
  height: 105px;
  place-items: center;
  overflow: hidden;
  border-radius: 55px 55px 3px 3px;
  color: var(--muted);
  background: #e7e1d5;
}

.photo-preview > svg {
  width: 29px;
  height: 29px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  border-radius: 16px;
}

.photo-preview-grid img {
  min-width: 0;
  min-height: 0;
}

.photo-upload strong {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
}

.photo-upload p {
  margin: 3px 0 12px;
  color: var(--muted);
  font-size: 0.58rem;
}

.upload-button {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--green);
  color: var(--green);
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 800;
}

.chip-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-choices label > span,
.district-choices label > span {
  display: inline-flex;
  align-items: center;
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid #cec7b9;
  border-radius: 20px;
  color: #53625d;
  background: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease;
}

.chip-choices label svg,
.district-choices label svg {
  width: 14px;
  height: 14px;
  margin-left: 7px;
  opacity: 0;
}

.chip-choices input:checked + span,
.district-choices input:checked + span {
  color: var(--green-deep);
  border-color: var(--green);
  background: #e5eee9;
}

.chip-choices input:checked + span svg,
.district-choices input:checked + span svg {
  opacity: 1;
}

.character-count {
  align-self: flex-end;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.56rem;
}

.age-field > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
}

.age-field label {
  display: flex;
  flex-direction: column;
}

.age-field label small {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.53rem;
}

.age-field > div > i {
  display: grid;
  height: 51px;
  place-items: center;
  color: var(--muted);
  font-size: 0.6rem;
  font-style: normal;
}

.anywhere-choice {
  position: relative;
  display: flex;
  margin-bottom: 13px;
  cursor: pointer;
}

.anywhere-choice > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #cec7b9;
  background: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
}

.anywhere-choice b {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid #b9b2a5;
}

.anywhere-choice b svg {
  width: 13px;
  height: 13px;
  opacity: 0;
}

.anywhere-choice input:checked + span {
  color: var(--green-deep);
  border-color: var(--green);
  background: #e5eee9;
}

.anywhere-choice input:checked + span b {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.anywhere-choice input:checked + span b svg {
  opacity: 1;
}

.district-choices {
  display: flex;
  max-height: 200px;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: #faf7ef;
}

.step-error {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--danger);
  font-size: 0.65rem;
  font-weight: 700;
}

.form-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  align-items: center;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Member application */
.member-view {
  min-height: 100vh;
  background: #f5f1e8;
}

.member-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.member-sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 25px 20px 20px;
  color: #f8f0db;
  background: var(--green-deep);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 24px;
  border-bottom: 1px solid rgba(248, 240, 219, 0.13);
}

.sidebar-close {
  display: none;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
}

.member-mini {
  display: grid;
  grid-template-columns: 43px 1fr;
  align-items: center;
  gap: 11px;
  margin: 24px 0 20px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.07);
}

.member-mini > span {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.member-mini div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.member-mini strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-mini small {
  color: #89a198;
  font-size: 0.55rem;
}

.member-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-nav > p {
  margin: 14px 12px 7px;
  color: #708980;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.member-nav button {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 0;
  border-left: 3px solid transparent;
  color: #9db0a9;
  background: transparent;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
  text-align: left;
}

.member-nav button:hover,
.member-nav button.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.member-nav button.active {
  border-left-color: var(--gold);
}

.member-nav button svg {
  width: 19px;
  height: 19px;
}

.member-nav button b {
  display: grid;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  place-items: center;
  border-radius: 11px;
  color: var(--green-deep);
  background: var(--gold);
  font-size: 0.53rem;
}

.sidebar-lock {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  margin-top: auto;
  padding: 15px;
  border: 1px solid rgba(243, 182, 63, 0.24);
  background: rgba(243, 182, 63, 0.06);
}

.sidebar-lock > svg {
  width: 29px;
  height: 29px;
  padding: 6px;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(243, 182, 63, 0.1);
}

.sidebar-lock strong {
  display: block;
  font-size: 0.63rem;
}

.sidebar-lock p {
  margin: 3px 0 0;
  color: #829990;
  font-size: 0.52rem;
  line-height: 1.5;
}

.signout-button {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 0;
  color: #81988f;
  background: transparent;
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 700;
}

.signout-button:hover {
  color: var(--white);
}

.sidebar-scrim {
  display: none;
}

.member-stage {
  min-width: 0;
}

.member-topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 clamp(25px, 4vw, 65px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.94);
  backdrop-filter: blur(14px);
}

.member-topbar > div:first-of-type {
  display: flex;
  flex-direction: column;
}

.member-topbar > div:first-of-type span {
  color: var(--muted);
  font-size: 0.51rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-topbar > div:first-of-type strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.sidebar-open {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.prototype-pill {
  padding: 5px 8px;
  color: #79530c;
  background: #f8dfa4;
  font-size: 0.51rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.account-button span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
  font-family: var(--serif);
  font-weight: 600;
}

.account-button strong {
  max-width: 110px;
  overflow: hidden;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-main {
  width: min(100% - 70px, 1220px);
  margin: 0 auto;
  padding: 67px 0 100px;
}

.member-page {
  animation: page-in 300ms ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
}

.page-heading.compact {
  align-items: center;
}

.page-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 5.7vw, 5.7rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.page-heading h1 em {
  color: var(--clay);
  font-weight: 500;
}

.page-heading > div > p:last-child {
  max-width: 570px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.7;
}

.preference-summary {
  display: grid;
  grid-template-columns: 0.55fr 1fr 1fr 1.2fr;
  margin: 42px 0 32px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.preference-summary > div {
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  justify-content: center;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.preference-summary > div:last-child {
  border-right: 0;
}

.preference-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.51rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preference-summary strong {
  overflow: hidden;
  font-size: 0.63rem;
  line-height: 1.55;
  text-overflow: ellipsis;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.results-heading > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.results-heading strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.results-heading small {
  color: var(--muted);
  font-size: 0.55rem;
}

.results-heading > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 0.56rem;
  font-weight: 700;
}

.match-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(220px, 42%) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(23, 63, 53, 0.12);
}

.match-photo {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #e8dfd1;
}

.match-photo::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(13, 44, 37, 0.5));
  content: "";
  pointer-events: none;
}

.match-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 450ms ease;
}

.match-card:hover .match-photo img {
  transform: scale(1.025);
}

.match-photo > span {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 12px;
  padding: 5px 8px;
  color: var(--white);
  background: rgba(13, 44, 37, 0.76);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(7px);
}

.save-match {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--green-deep);
  background: rgba(255, 252, 245, 0.94);
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(13, 44, 37, 0.15);
}

.save-match svg {
  width: 18px;
  height: 18px;
}

.save-match.saved {
  color: var(--white);
  background: var(--clay);
}

.save-match.saved svg {
  fill: currentColor;
}

.match-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.match-card-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.match-card-copy > p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.match-card-copy > p svg {
  color: var(--clay);
}

.button-card {
  width: 100%;
  min-height: 43px;
  padding: 0;
  margin-top: auto;
  border: 2px solid var(--gold);
  border-radius: 8px;
  color: var(--green);
  background: transparent;
  justify-content: space-between;
}

.empty-state {
  display: flex;
  min-height: 410px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 25px;
  padding: 50px 20px;
  border: 1px dashed #bbb4a8;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50% 50% 50% 10px;
  color: var(--green-deep);
  background: var(--gold);
  transform: rotate(-5deg);
}

.empty-state > span svg {
  width: 28px;
  height: 28px;
  transform: rotate(5deg);
}

.empty-state h2 {
  margin: 25px 0 8px;
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 600;
}

.empty-state p {
  max-width: 510px;
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

#saved-grid {
  margin-top: 45px;
}

#saved-empty {
  margin-top: 45px;
}

.connections-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.connection-panel {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.chat-panel {
  grid-column: 1 / -1;
}

.connection-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.connection-panel-heading .eyebrow {
  margin-bottom: 6px;
}

.connection-panel-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.connection-panel-heading > span {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
  font-size: 0.62rem;
  font-weight: 800;
}

.connection-list,
.conversation-list {
  display: flex;
  flex-direction: column;
}

.connection-item,
.conversation-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.connection-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: #ead9ad;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.connection-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connection-item h3,
.conversation-item h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.connection-item p,
.conversation-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.5;
}

.connection-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.connection-item-actions .button {
  min-height: 35px;
  padding: 0 10px;
  font-size: 0.56rem;
}

.connection-status {
  display: block;
  margin-top: 5px;
  color: var(--clay);
  font-size: 0.54rem;
  font-weight: 800;
  text-transform: uppercase;
}

.connection-empty {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
}

.connection-empty svg {
  width: 27px;
  height: 27px;
  color: var(--clay);
}

.connection-empty p {
  margin: 0;
  font-size: 0.65rem;
}

.conversation-shell {
  display: grid;
  grid-template-columns: minmax(190px, 0.36fr) minmax(0, 1fr);
  min-height: 390px;
}

.conversation-list {
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.conversation-item {
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 13px 8px;
  cursor: pointer;
}

.conversation-item.selected {
  background: #f6edda;
}

.conversation-item .connection-avatar {
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.conversation-item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-left: 22px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.chat-header strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.chat-header-copy {
  min-width: 0;
  flex: 1;
}

.chat-header small {
  color: var(--muted);
  font-size: 0.58rem;
}

.chat-remove-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.54rem;
  white-space: nowrap;
}

.chat-closed-label {
  color: var(--clay);
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-messages {
  display: flex;
  min-height: 220px;
  max-height: 340px;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 20px 5px;
}

.chat-message {
  max-width: min(78%, 470px);
  padding: 10px 13px;
  color: var(--ink);
  background: #eee8dc;
  font-size: 0.66rem;
  line-height: 1.55;
}

.chat-message.mine {
  align-self: flex-end;
  color: #f9f4e9;
  background: var(--green);
}

.chat-message small {
  display: block;
  margin-top: 4px;
  opacity: 0.65;
  font-size: 0.49rem;
}

.chat-form {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.chat-form textarea {
  display: block;
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.chat-form > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.chat-form small {
  color: var(--muted);
  font-size: 0.55rem;
}

.chat-form .button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.57rem;
}

.profile-overview {
  display: grid;
  grid-template-columns: 310px 1fr;
  align-items: start;
  gap: 30px;
  margin-top: 48px;
}

.own-card {
  position: sticky;
  top: 110px;
  padding: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.own-photo {
  display: grid;
  width: 100%;
  height: 330px;
  place-items: center;
  overflow: hidden;
  border-radius: 150px 150px 3px 3px;
  color: var(--green-deep);
  background: #ead9ad;
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 600;
}

.own-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.own-card h2 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
}

.own-card > p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.own-card > div:last-child {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  padding: 13px;
  color: #f8f0db;
  background: var(--green);
}

.own-card > div:last-child svg {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(243, 182, 63, 0.1);
}

.own-card > div:last-child span {
  color: #a8bbb4;
  font-size: 0.53rem;
  line-height: 1.5;
}

.own-card > div:last-child strong {
  display: block;
  color: var(--white);
  font-size: 0.62rem;
}

.profile-facts {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}

.profile-facts section {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.profile-facts section > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.profile-facts section > div > span {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.profile-facts section > div button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 800;
}

.profile-facts dl {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) 1fr;
  margin: 0;
}

.profile-facts dt,
.profile-facts dd {
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid #ece7dc;
  font-size: 0.65rem;
}

.profile-facts dt {
  color: var(--muted);
}

.profile-facts dd {
  font-weight: 700;
}

.data-control,
.security-upgrade {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 19px;
  margin-top: 24px;
  padding: 25px 28px;
  border: 1px solid #dfb8b1;
  background: #fff5f0;
}

.security-upgrade {
  border-color: #b6c9c1;
  background: #eef5f1;
}

.data-control > span,
.security-upgrade > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  color: var(--white);
  background: var(--danger);
  transform: rotate(-5deg);
}

.security-upgrade > span {
  color: var(--green-deep);
  background: var(--gold);
}

.data-control > span svg,
.security-upgrade > span svg {
  width: 24px;
  height: 24px;
  transform: rotate(5deg);
}

.data-control p,
.security-upgrade p {
  margin: 0 0 3px;
  color: var(--danger);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.security-upgrade p {
  color: var(--green);
}

.data-control h2,
.security-upgrade h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
}

.data-control small,
.security-upgrade small {
  display: block;
  max-width: 680px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.6;
}

.data-control .button,
.security-upgrade .button {
  min-width: 170px;
  padding: 0 18px;
  white-space: nowrap;
}

.safety-hero {
  display: grid;
  grid-template-columns: 1fr 170px;
  align-items: center;
  min-height: 390px;
  padding: 55px;
  color: #f8f0db;
  background: var(--green-deep);
}

.safety-hero .eyebrow {
  color: var(--gold);
}

.safety-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.7rem, 6vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.safety-hero h1 em {
  color: var(--gold);
  font-weight: 500;
}

.safety-hero p:last-child {
  max-width: 590px;
  margin: 20px 0 0;
  color: #a7bbb4;
  font-size: 0.74rem;
  line-height: 1.7;
}

.safety-hero > span {
  display: grid;
  width: 145px;
  height: 145px;
  place-items: center;
  border: 1px solid rgba(243, 182, 63, 0.5);
  border-radius: 50%;
  color: var(--gold);
}

.safety-hero > span svg {
  width: 65px;
  height: 65px;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.safety-grid article {
  padding: 34px;
  border-right: 1px solid var(--line);
}

.safety-grid article:last-child {
  border-right: 0;
}

.safety-grid article > span {
  color: var(--clay);
  font-size: 0.57rem;
  font-weight: 800;
}

.safety-grid h2 {
  margin: 36px 0 10px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.safety-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.7;
}

.aadhaar-safety {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 20px;
  margin-top: 28px;
  padding: 29px;
  border: 1px solid #d8bd80;
  background: #fae7b7;
}

.aadhaar-safety > svg {
  width: 52px;
  height: 52px;
  padding: 11px;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
}

.aadhaar-safety h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.aadhaar-safety p {
  max-width: 800px;
  margin: 7px 0 0;
  color: #635c4c;
  font-size: 0.67rem;
  line-height: 1.7;
}

.mobile-dock {
  display: none;
}

/* Limited profile dialog */
.match-dialog {
  width: min(950px, calc(100% - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow-y: auto;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
}

.match-dialog::backdrop {
  background: rgba(7, 25, 21, 0.78);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: -14px;
  right: -14px;
  color: var(--green-deep);
  border: 0;
  background: var(--gold);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dialog-profile {
  display: grid;
  grid-template-columns: 0.83fr 1fr;
  min-height: 600px;
}

.dialog-photo {
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

.dialog-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #e8dfd1;
}

.dialog-photo-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 54px;
  background: #e8dfd1;
}

.dialog-photo-carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: var(--green-deep);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(13, 44, 37, 0.2);
  transform: translateY(-50%);
}

.photo-carousel-control:hover:not(:disabled) {
  background: var(--gold);
}

.photo-carousel-control:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.photo-carousel-control svg {
  width: 18px;
  height: 18px;
}

.photo-carousel-control--previous {
  left: 14px;
}

.photo-carousel-control--next {
  right: 14px;
}

.dialog-photo > span {
  position: absolute;
  bottom: 15px;
  left: 15px;
  padding: 6px 9px;
  color: var(--white);
  background: rgba(13, 44, 37, 0.82);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-copy {
  align-self: center;
  padding: 45px;
}

.dialog-kicker {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dialog-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 3.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.dialog-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 27px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.matched-profile-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.matched-profile-facts section {
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.matched-profile-facts section > div {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.matched-profile-facts section > div > span {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}

.matched-profile-facts dl {
  display: grid;
  grid-template-columns: minmax(100px, 0.55fr) 1fr;
  margin: 0;
}

.matched-profile-facts dt,
.matched-profile-facts dd {
  min-width: 0;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #ece7dc;
  font-size: 0.61rem;
  overflow-wrap: anywhere;
}

.matched-profile-facts dt {
  color: var(--muted);
}

.matched-profile-facts dd {
  font-weight: 700;
}

.locked-details {
  border-top: 1px solid var(--line);
}

.locked-details > div {
  display: grid;
  grid-template-columns: 35px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.locked-details > div > svg {
  width: 33px;
  height: 33px;
  padding: 8px;
  border-radius: 50%;
  color: var(--green);
  background: #e5eee9;
}

.locked-details span {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 0.54rem;
  line-height: 1.5;
}

.locked-details strong {
  color: var(--ink);
  font-size: 0.67rem;
}

.locked-details small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.5rem;
}

.privacy-redaction {
  display: block;
  width: 78%;
  height: 9px;
  margin-top: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, #8c8175 0 18%, #b8aa99 18% 25%, #85786c 25% 44%, #c7b9a7 44% 52%, #918477 52% 76%, #c1b19f 76% 100%);
  filter: blur(3px);
  opacity: 0.68;
}

.privacy-redaction--short {
  width: 48%;
}

.privacy-redaction--medium {
  width: 64%;
}

.privacy-redaction--long {
  width: 88%;
}

.premium-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px;
  background: #fae7b7;
}

.premium-note span {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: var(--green-deep);
  background: var(--gold);
  font-size: 0.48rem;
  font-weight: 800;
  text-transform: uppercase;
}

.premium-note p {
  margin: 0;
  color: #655f52;
  font-size: 0.55rem;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 20px;
}

.dialog-actions .button {
  min-height: 45px;
  padding: 0 14px;
  font-size: 0.62rem;
}

.dialog-actions .button-outline svg {
  margin-right: 7px;
  margin-left: 0;
}

.dialog-actions .button-outline.saved {
  color: var(--white);
  border-color: var(--clay);
  background: var(--clay);
}

.dialog-actions .button-outline.saved svg {
  fill: currentColor;
}

.delete-dialog {
  width: min(560px, calc(100% - 40px));
  max-height: calc(100vh - 40px);
  padding: 38px;
  overflow-y: auto;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
}

.delete-dialog::backdrop {
  background: rgba(7, 25, 21, 0.78);
  backdrop-filter: blur(7px);
}

.delete-dialog-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 23px;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  color: var(--white);
  background: var(--danger);
  transform: rotate(-5deg);
}

.delete-dialog-mark svg {
  width: 25px;
  height: 25px;
  transform: rotate(5deg);
}

.delete-dialog .eyebrow {
  margin-bottom: 9px;
  color: var(--danger);
}

.delete-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.delete-dialog > p:not(.eyebrow, .delete-scope) {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.delete-dialog ul {
  margin: 0;
  padding: 13px 0 13px 21px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.delete-dialog li {
  margin: 7px 0;
  padding-left: 3px;
  font-size: 0.69rem;
  font-weight: 700;
}

.delete-dialog li::marker {
  color: var(--danger);
}

.delete-scope {
  margin: 17px 0 0;
  padding: 13px 15px;
  color: #665750;
  background: #f5e5dd;
  font-size: 0.62rem;
  line-height: 1.65;
}

.delete-dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 24px;
}

.delete-dialog-actions .button {
  min-height: 47px;
  padding: 0 17px;
  font-size: 0.67rem;
}

#remove-connection-dialog .delete-dialog-mark {
  background: var(--clay);
}

#remove-connection-dialog .form-status {
  margin: 12px 0 0;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 25px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 18px;
  color: var(--white);
  background: var(--green-deep);
  box-shadow: 0 16px 40px rgba(13, 44, 37, 0.25);
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast svg {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--gold);
}

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

@media (max-width: 1120px) {
  .auth-main {
    grid-template-columns: minmax(380px, 0.8fr) minmax(390px, 0.72fr);
    gap: 55px;
  }

  .auth-story h1 {
    font-size: clamp(3.7rem, 6vw, 5.4rem);
  }

  .onboarding-main {
    grid-template-columns: 300px minmax(0, 760px);
    gap: 45px;
  }

  .member-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .member-sidebar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .match-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-photo {
    height: min(48vw, 460px);
  }

  .preference-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .preference-summary > div:nth-child(2) {
    border-right: 0;
  }

  .preference-summary > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .auth-header,
  .auth-main {
    width: min(100% - 40px, 680px);
  }

  .auth-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 50px;
    min-width: 0;
  }

  .auth-story {
    text-align: center;
  }

  .auth-story h1,
  .auth-story > p:not(.eyebrow),
  .auth-portrait {
    margin-right: auto;
    margin-left: auto;
  }

  .auth-story .eyebrow {
    text-align: center;
  }

  .auth-card {
    width: min(100%, 540px);
    min-width: 0;
    margin: 0 auto;
  }

  .onboarding-header {
    grid-template-columns: 1fr auto;
    padding: 0 24px;
  }

  .secure-label {
    display: none;
  }

  .language-picker > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .onboarding-main {
    display: block;
    width: min(100% - 40px, 760px);
    padding-top: 45px;
  }

  .onboarding-aside {
    display: none;
  }

  .mobile-progress {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 27px;
    color: var(--green);
    font-size: 0.58rem;
    font-weight: 800;
  }

  .mobile-progress > div {
    height: 4px;
    flex: 1;
    overflow: hidden;
    background: #e0d9cc;
  }

  .mobile-progress i {
    display: block;
    height: 100%;
    background: var(--green);
    transition: width 220ms ease;
  }

  .member-shell {
    display: block;
  }

  .member-sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(300px, 84vw);
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .member-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: grid;
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(7, 25, 21, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .sidebar-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-open {
    display: grid;
  }

  .member-topbar {
    justify-content: flex-start;
    gap: 13px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .member-main {
    width: min(100% - 44px, 760px);
  }

  .profile-overview {
    grid-template-columns: 270px 1fr;
  }

  .own-photo {
    height: 285px;
  }

  .safety-grid {
    grid-template-columns: 1fr;
  }

  .safety-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .safety-grid article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  .auth-header {
    width: calc(100% - 24px);
  }

  .auth-header .app-brand,
  .onboarding-header .app-brand {
    gap: 7px;
    min-width: 0;
  }

  .auth-header .app-brand > span,
  .onboarding-header .app-brand > span {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .auth-header .app-brand strong,
  .onboarding-header .app-brand strong {
    font-size: 1rem;
  }

  .auth-header .app-brand small,
  .onboarding-header .app-brand small {
    display: none;
  }

  .auth-header-actions,
  .onboarding-actions {
    gap: 8px;
  }

  .auth-header .language-picker,
  .onboarding-actions .language-picker {
    min-width: 82px;
  }

  .auth-header .language-picker select,
  .onboarding-actions .language-picker select {
    width: 82px;
    padding-right: 22px;
    padding-left: 7px;
  }

  .auth-header {
    min-height: 76px;
  }

  .auth-header-actions > a {
    font-size: 0;
  }

  .auth-header-actions > a svg {
    width: 22px;
    height: 22px;
  }

  .auth-main {
    width: calc(100% - 30px);
    padding: 48px 0 65px;
  }

  .auth-story h1 {
    font-size: clamp(3.4rem, 17vw, 5rem);
  }

  .auth-portrait {
    height: 210px;
  }

  .auth-card {
    padding: 29px 21px;
    box-shadow: 9px 9px 0 rgba(243, 182, 63, 0.16), 0 25px 60px rgba(0, 0, 0, 0.24);
  }

  .onboarding-header {
    min-height: 74px;
    padding: 0 16px;
  }

  .onboarding-main {
    width: calc(100% - 24px);
    padding: 24px 0 70px;
  }

  .profile-form-wrap {
    padding: 24px 17px;
  }

  .form-heading {
    grid-template-columns: 43px 1fr;
    gap: 12px;
    padding-bottom: 23px;
  }

  .form-heading > span {
    width: 41px;
    height: 41px;
  }

  .form-heading h2 {
    font-size: 1.9rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 25px;
  }

  .field-wide {
    grid-column: auto;
  }

  .large-choices {
    grid-template-columns: 1fr;
  }

  .photo-upload {
    grid-template-columns: 84px 1fr;
    gap: 14px;
    padding: 13px;
  }

  .photo-preview {
    width: 84px;
    height: 84px;
  }

  .photo-preview-grid {
    gap: 2px;
    border-radius: 12px;
  }

  .form-actions {
    grid-template-columns: auto 1fr;
  }

  .form-actions > span {
    display: none;
  }

  .form-actions #next-step,
  .form-actions #complete-profile {
    grid-column: 2;
  }

  .member-topbar {
    min-height: 67px;
    padding: 0 15px;
  }

  .member-topbar > div:first-of-type strong {
    font-size: 1rem;
  }

  .prototype-pill,
  .account-button strong {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-actions .language-picker,
  .member-topbar .language-picker {
    min-width: 98px;
  }

  .member-main {
    width: calc(100% - 28px);
    padding: 42px 0 100px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: clamp(3.25rem, 15vw, 4.7rem);
  }

  .page-heading > .button {
    width: 100%;
  }

  .preference-summary {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .preference-summary > div,
  .preference-summary > div:nth-child(2) {
    min-height: 68px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preference-summary > div:last-child {
    border-bottom: 0;
  }

  .results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .match-grid {
    grid-template-columns: 1fr;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-photo {
    height: min(110vw, 460px);
    min-height: 0;
  }

  .match-photo {
    height: min(116vw, 510px);
  }

  .profile-overview {
    grid-template-columns: 1fr;
  }

  .own-card {
    position: static;
    width: min(100%, 340px);
    margin: 0 auto;
  }

  .profile-facts section {
    padding: 21px 17px;
  }

  .profile-facts dl {
    grid-template-columns: 1fr;
  }

  .profile-facts dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .profile-facts dd {
    padding-top: 2px;
  }

  .safety-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 40px 23px;
  }

  .safety-hero h1 {
    font-size: clamp(3.3rem, 15vw, 4.6rem);
  }

  .safety-hero > span {
    display: none;
  }

  .safety-grid article {
    padding: 29px 20px;
  }

  .aadhaar-safety {
    grid-template-columns: 43px 1fr;
    gap: 13px;
    padding: 20px;
  }

  .aadhaar-safety > svg {
    width: 42px;
    height: 42px;
    padding: 9px;
  }

  .data-control,
  .security-upgrade {
    grid-template-columns: 48px 1fr;
    padding: 21px 18px;
  }

  .data-control > span,
  .security-upgrade > span {
    width: 48px;
    height: 48px;
  }

  .data-control .button,
  .security-upgrade .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .mobile-dock {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 67px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 252, 245, 0.97);
    backdrop-filter: blur(14px);
  }

  .mobile-dock button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 7px 3px;
    border: 0;
    color: #77847f;
    background: transparent;
    font-size: 0.5rem;
    font-weight: 700;
  }

  .mobile-dock button::before {
    position: absolute;
    top: 0;
    right: 22%;
    left: 22%;
    height: 3px;
    background: var(--clay);
    content: "";
    opacity: 0;
  }

  .mobile-dock button.active {
    color: var(--green);
  }

  .mobile-dock button.active::before {
    opacity: 1;
  }

  .mobile-dock svg {
    width: 20px;
    height: 20px;
  }

  .match-dialog {
    width: calc(100% - 22px);
    max-height: calc(100vh - 22px);
    overflow-y: auto;
  }

  .dialog-close {
    position: fixed;
    top: 16px;
    right: 16px;
  }

  .dialog-profile {
    grid-template-columns: 1fr;
  }

  .dialog-photo {
    min-height: 430px;
    max-height: 55vh;
  }

  .dialog-copy {
    padding: 28px 20px;
  }

  .dialog-copy h2 {
    font-size: 2.8rem;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .delete-dialog {
    width: calc(100% - 22px);
    max-height: calc(100vh - 22px);
    padding: 28px 20px;
  }

  .delete-dialog-actions {
    grid-template-columns: 1fr;
  }

  .delete-dialog-actions .button-danger {
    grid-row: 1;
  }

  .toast {
    right: 14px;
    bottom: 81px;
  }
}

@media (max-width: 420px) {
  .auth-portrait > div {
    right: 8px;
    bottom: 8px;
    width: calc(100% - 16px);
  }

  .form-actions .button {
    padding: 0 14px;
    font-size: 0.68rem;
  }

  .dialog-photo {
    min-height: 360px;
  }
}

@media (min-width: 901px) {
  .match-card {
    width: min(100%, 720px);
  }

  .match-photo {
    height: 380px;
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Carry the public site's Indian matrimony palette into the member journey. */
:root {
  --ink: #33251f;
  --muted: #75685d;
  --green: #2f594c;
  --green-deep: #541f2a;
  --cream: #fbf3e5;
  --paper: #fffaf1;
  --gold: #d19a35;
  --clay: #a74732;
  --line: #dfd1bf;
  --shadow: 0 24px 70px rgba(84, 31, 42, 0.14);
}

body {
  background-image: radial-gradient(rgba(84, 31, 42, 0.065) 0.8px, transparent 0.8px), linear-gradient(135deg, rgba(209, 154, 53, 0.05), transparent 44%);
  background-size: 22px 22px, 100% 100%;
}

.app-brand > span {
  border-radius: 50%;
  color: #fff4df;
  background: var(--green-deep);
  transform: none;
}

.app-brand > span svg {
  transform: none;
}

.auth-view {
  background: var(--green-deep);
}

.auth-main::before {
  border-color: rgba(209, 154, 53, 0.2);
}

.auth-portrait {
  border-color: rgba(255, 250, 241, 0.1);
  border-radius: 150px 8px 8px 8px;
}

.auth-card {
  border-top: 5px solid var(--gold);
  box-shadow: 18px 18px 0 rgba(209, 154, 53, 0.18), 0 34px 90px rgba(45, 18, 24, 0.26);
}

.profile-form-wrap {
  border-top: 4px solid var(--gold);
}

.member-view {
  background: #f8f0e3;
}

.member-sidebar {
  background: var(--green-deep);
}

.member-topbar {
  background: rgba(255, 250, 241, 0.95);
}

.preference-summary,
.match-card,
.profile-form-wrap {
  box-shadow: 0 18px 48px rgba(84, 31, 42, 0.08);
}

.match-card {
  border-top: 4px solid var(--gold);
}

.match-card:hover {
  box-shadow: 0 22px 50px rgba(84, 31, 42, 0.15);
}

.match-photo::after {
  background: linear-gradient(transparent, rgba(84, 31, 42, 0.58));
}

.match-photo > span {
  background: rgba(84, 31, 42, 0.82);
}

.save-match.saved {
  background: var(--clay);
}

.mobile-dock {
  background: rgba(255, 250, 241, 0.97);
}

@media (max-width: 680px) {
  .auth-portrait {
    border-radius: 100px 7px 7px 7px;
  }
}

/* Turn member suggestions into a private introduction desk with biodata cards. */
.auth-view {
  background: #541f2a;
}

.auth-header {
  width: min(100% - 64px, 1400px);
  border-bottom-color: rgba(255, 248, 236, 0.24);
}

.auth-main {
  grid-template-columns: minmax(430px, 0.78fr) minmax(470px, 0.84fr);
  max-width: 1320px;
  gap: clamp(56px, 8vw, 120px);
}

.auth-story h1 {
  font-size: clamp(3.6rem, 5.4vw, 5.7rem);
}

.auth-portrait {
  height: 270px;
  border-radius: 0;
  border: 1px solid rgba(255, 248, 236, 0.26);
}

.auth-card {
  border-top: 0;
  border-left: 8px solid #d19a35;
  box-shadow: 20px 20px 0 rgba(209, 154, 53, 0.18), 0 34px 90px rgba(42, 15, 22, 0.3);
}

.onboarding-header {
  border-bottom: 0;
  box-shadow: 0 8px 24px rgba(84, 31, 42, 0.06);
}

.onboarding-main {
  grid-template-columns: 350px minmax(0, 860px);
  max-width: 1320px;
}

.onboarding-aside {
  padding: 34px 0;
}

.profile-form-wrap {
  border-top: 0;
  border-left: 8px solid #d19a35;
}

.form-heading > span {
  border-radius: 50%;
  transform: none;
}

.member-shell {
  grid-template-columns: 300px minmax(0, 1fr);
}

.member-sidebar {
  padding: 32px 24px 24px;
}

.sidebar-head {
  padding-right: 0;
  padding-left: 0;
}

.member-mini {
  margin: 30px 0 26px;
  padding: 16px;
  border-left: 3px solid #d19a35;
  background: rgba(255, 248, 236, 0.08);
}

.member-nav > p {
  margin-top: 24px;
}

.member-nav button {
  min-height: 50px;
  border-left-width: 4px;
}

.member-main {
  width: min(100% - 88px, 1280px);
  padding-top: 72px;
}

.page-heading h1 {
  max-width: 700px;
  font-size: clamp(3rem, 5vw, 5rem);
}

.preference-summary {
  margin-top: 34px;
  border-top: 5px solid #d19a35;
}

.match-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.68fr) minmax(0, 1fr);
  border-top: 0;
  border-left: 5px solid #d19a35;
}

.match-photo {
  height: 100%;
  min-height: 300px;
}

.match-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
}

.button-card {
  margin-top: 16px;
}

.profile-overview {
  gap: 28px;
}

.own-card {
  border-top: 5px solid #d19a35;
}

.security-upgrade,
.data-control {
  border-left: 5px solid #d19a35;
}

@media (max-width: 1120px) {
  .match-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-main {
    grid-template-columns: 1fr;
  }

  .auth-story {
    max-width: 680px;
  }

  .member-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .auth-header {
    width: calc(100% - 32px);
  }

  .auth-main {
    display: block;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    padding-top: 52px;
  }

  .auth-card {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border-left-width: 5px;
  }

  .auth-card * {
    min-width: 0;
  }

  .auth-method-heading span {
    max-width: 44%;
  }

  .member-main {
    width: calc(100% - 32px);
    padding-top: 48px;
  }

  .match-card {
    grid-template-columns: 125px minmax(0, 1fr);
  }

  .match-photo {
    min-height: 260px;
  }

  .match-card-copy {
    padding: 16px;
  }

  .connections-layout {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .chat-panel {
    grid-column: auto;
  }

  .connection-panel {
    padding: 18px;
  }

  .connection-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .connection-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .connection-avatar {
    width: 42px;
    height: 42px;
  }

  .conversation-shell {
    display: block;
  }

  .conversation-list {
    max-height: 210px;
    overflow-y: auto;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-thread {
    min-height: 350px;
    padding: 18px 0 0;
  }
}

@media (max-width: 380px) {
  .auth-header,
  .onboarding-header {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .auth-header .app-brand,
  .onboarding-header .app-brand {
    flex-basis: 100%;
  }

  .auth-header-actions,
  .onboarding-actions {
    width: 100%;
    justify-content: space-between;
  }
}
