:root {
  color-scheme: dark;
  --bg: #0e1615;
  --bg-deep: #09100f;
  --surface: #16201e;
  --surface-soft: #1b2825;
  --elevated: #22312d;
  --border: #31413b;
  --border-strong: #465a50;
  --gold: #e1b65f;
  --gold-soft: #efd297;
  --sage: #8cc7ad;
  --cream: #eee3c9;
  --ivory: #f6f2e9;
  --muted: #b4b7a9;
  --danger: #f09595;
  --shadow: 0 24px 80px rgb(0 0 0 / 30%);
  --radius-lg: 28px;
  --radius-md: 20px;
  --font: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(circle at 8% -8%, rgb(197 153 72 / 14%), transparent 34rem),
    radial-gradient(circle at 94% 12%, rgb(104 163 137 / 11%), transparent 32rem),
    var(--bg);
  color: var(--ivory);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--bg-deep); }
:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 3px; }

.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; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-150%); padding: 12px 16px; border-radius: 12px; background: var(--gold-soft); color: var(--bg-deep); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.app-shell { width: min(100%, 1240px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) clamp(16px, 3vw, 36px) max(28px, env(safe-area-inset-bottom)); }
.site-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 8px 0 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0; border: 0; background: transparent; color: var(--ivory); text-align: left; }
.brand img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 1px var(--border); }
.brand-copy { display: grid; line-height: 1.2; }
.brand-kicker { color: var(--gold); font-size: .69rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.brand strong { margin-top: 3px; font-family: var(--display); font-size: 1.5rem; letter-spacing: -.02em; }
.main-nav { display: flex; justify-content: center; gap: 4px; min-width: 0; padding: 5px; border: 1px solid var(--border); border-radius: 999px; background: rgb(22 32 30 / 82%); }
.main-nav button { min-height: 42px; padding: 9px 17px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .9rem; font-weight: 750; }
.main-nav button:hover { color: var(--ivory); background: var(--surface-soft); }
.main-nav button[aria-current="page"] { background: var(--gold); color: var(--bg-deep); }
.header-seal { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: .77rem; font-weight: 750; }
.header-seal .icon { width: 19px; height: 19px; color: var(--gold); }
.demo-ribbon { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: rgb(22 32 30 / 70%); color: var(--muted); font-size: .8rem; }
.demo-badge, .soft-badge { display: inline-flex; align-items: center; width: fit-content; min-height: 28px; padding: 4px 10px; border: 1px solid rgb(225 182 95 / 32%); border-radius: 999px; background: rgb(225 182 95 / 8%); color: var(--gold-soft); font-size: .74rem; font-weight: 800; white-space: nowrap; }
.demo-ribbon > span:nth-child(2) { flex: 1; }
.demo-ribbon button { min-height: 38px; padding: 6px 10px; border: 0; background: transparent; color: var(--ivory); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

main { min-height: 58vh; }
.view { animation: view-in .25s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.registration-layout { display: grid; grid-template-columns: minmax(0, .78fr) minmax(540px, 1.22fr); gap: clamp(28px, 4vw, 62px); align-items: start; padding: clamp(16px, 3vw, 38px) 0 34px; }
.registration-intro { position: sticky; top: 20px; padding-top: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgb(225 182 95 / 10%); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
.registration-intro h1, .view-heading h1, .pass-hero h1 { margin: 20px 0; font-family: var(--display); font-size: clamp(2.8rem, 5vw, 4.7rem); font-weight: 500; }
.registration-intro h1 span, .pass-hero h1 span { color: var(--gold-soft); font-style: italic; }
.hero-lead { max-width: 510px; margin-bottom: 28px; color: var(--muted); font-size: 1.03rem; }
.trust-list { display: grid; gap: 16px; max-width: 510px; }
.trust-list > div { display: flex; align-items: flex-start; gap: 14px; }
.trust-list .icon { width: 24px; height: 24px; margin-top: 2px; color: var(--gold); }
.trust-list span { display: grid; }
.trust-list strong { font-size: .93rem; }
.trust-list small { color: var(--muted); font-size: .82rem; }
.consent-diagram { display: grid; grid-template-columns: auto minmax(70px, 1fr) auto; align-items: center; gap: 12px; max-width: 510px; margin: 30px 0; padding: 20px; border: 1px solid var(--border); border-radius: 22px; background: linear-gradient(135deg, rgb(225 182 95 / 7%), rgb(22 32 30 / 72%)); }
.consent-person { display: grid; gap: 4px; text-align: center; }
.consent-person > span { display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 10px; border: 1px solid rgb(225 182 95 / 35%); border-radius: 50%; background: rgb(225 182 95 / 8%); color: var(--gold-soft); font-family: var(--display); font-size: .95rem; }
.consent-person small { color: var(--muted); font-size: .65rem; }
.consent-link { position: relative; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.consent-link > span { flex: 1; height: 1px; background: rgb(225 182 95 / 35%); }
.consent-link .icon { margin: 0 7px; }
.consent-link small { position: absolute; top: calc(100% + 6px); left: 50%; width: max-content; transform: translateX(-50%); color: var(--muted); font-size: .65rem; }

.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgb(29 43 39 / 97%), rgb(19 30 27 / 97%)); box-shadow: var(--shadow); }
.registration-form { padding: clamp(22px, 3vw, 32px); }
.panel-heading { margin-bottom: 25px; }
.step-label { color: var(--gold); font-size: .71rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.panel-heading h2 { margin: 9px 0 8px; font-family: var(--display); font-size: 1.8rem; font-weight: 500; }
.panel-heading p { margin: 0; color: var(--muted); font-size: .86rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-column { min-width: 0; }
.field { margin-bottom: 17px; }
label, legend, .filter-label { color: var(--ivory); font-size: .82rem; font-weight: 750; }
label { display: block; margin-bottom: 7px; }
input, textarea, select { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--bg-deep); color: var(--ivory); caret-color: var(--gold); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #818d83; }
input:hover, textarea:hover, select:hover { border-color: #5b6e62; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: .73rem; }
.choice-fieldset { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 9px; padding: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; margin: 0; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-soft); color: var(--ivory); font-size: .8rem; font-weight: 700; text-align: center; }
.choice input:checked + span { border-color: var(--gold); background: var(--gold); color: var(--bg-deep); }
.choice input:focus-visible + span { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.location-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-deep); }
.location-box > div { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.location-box .icon { width: 19px; height: 19px; margin-top: 2px; color: var(--gold); }
.location-box span { display: grid; min-width: 0; }
.location-box strong { font-size: .78rem; }
.location-box small { color: var(--muted); font-size: .69rem; overflow-wrap: anywhere; }
.location-box .secondary-button { min-height: 44px; padding: 9px 11px; font-size: .75rem; flex: 0 0 auto; }

.primary-button, .secondary-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; border-radius: 13px; font-weight: 800; text-decoration: none; }
.primary-button { padding: 12px 18px; border: 1px solid var(--gold); background: var(--gold); color: var(--bg-deep); }
.primary-button:hover { border-color: var(--gold-soft); background: var(--gold-soft); }
.secondary-button { padding: 11px 15px; border: 1px solid var(--border-strong); background: var(--surface-soft); color: var(--ivory); }
.secondary-button:hover { border-color: var(--gold); background: var(--elevated); }
.text-button { min-height: 44px; padding: 9px 12px; border: 0; background: transparent; color: var(--gold-soft); text-decoration: underline; text-underline-offset: 4px; }
.full-width { width: 100%; }
.verification-box { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 20px; align-items: center; margin-top: 22px; padding: 19px; border: 1px solid var(--border); border-radius: 18px; background: rgb(9 16 15 / 55%); }
.verification-copy h3 { margin: 8px 0; font-size: 1.05rem; }
.verification-copy > p:not(.form-feedback) { margin: 0 0 13px; color: var(--muted); font-size: .78rem; }
.camera-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.camera-actions .primary-button, .camera-actions .secondary-button { min-height: 44px; padding: 9px 12px; font-size: .78rem; }
.camera-preview { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-deep); }
.camera-preview video, .camera-preview img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.camera-preview video { transform: scaleX(-1); }
.camera-preview .text-button { width: 100%; min-height: 40px; font-size: .75rem; }
.form-feedback { min-height: 0; margin: 10px 0 0; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.form-feedback:empty { margin: 0; }
.form-feedback.is-error { color: var(--danger); }
.form-feedback.is-success { color: var(--sage); }
.check-row { display: flex; align-items: flex-start; gap: 11px; margin: 20px 0 0; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); color: var(--ivory); font-size: .82rem; font-weight: 650; cursor: pointer; }
.check-row input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); flex: 0 0 auto; }
.form-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.form-actions .primary-button { flex: 1; }
.fine-print { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .72rem; }

.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 26px 0 28px; }
.view-heading h1 { margin: 12px 0 10px; font-size: clamp(2.3rem, 4vw, 3.7rem); }
.view-heading p { max-width: 680px; margin: 0; color: var(--muted); }
.locked-state, .empty-state { padding: clamp(28px, 5vw, 56px); text-align: center; }
.locked-state { max-width: 780px; margin: 34px auto; }
.locked-state h2, .empty-state h2 { margin: 18px 0 10px; font-family: var(--display); font-size: 1.65rem; font-weight: 500; }
.locked-state p, .empty-state p { max-width: 580px; margin: 0 auto 22px; color: var(--muted); }
.locked-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-soft); color: var(--gold); }
.locked-icon .icon { width: 29px; height: 29px; }
.radar-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.radar-sidebar { display: grid; gap: 14px; }
.optin-card, .privacy-card { padding: 23px; box-shadow: none; }
.optin-card h2, .privacy-card h2 { margin: 9px 0 14px; font-family: var(--display); font-size: 1.5rem; font-weight: 500; }
.mini-consent { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0; color: var(--gold); }
.mini-consent span { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgb(225 182 95 / 30%); border-radius: 50%; background: rgb(225 182 95 / 7%); color: var(--gold-soft); font-size: .73rem; font-weight: 750; }
.optin-card ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.optin-card li { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .78rem; }
.optin-card li > span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--gold); font-size: .68rem; font-weight: 800; flex: 0 0 auto; }
.privacy-card > .icon { color: var(--sage); }
.privacy-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.radar-main { min-width: 0; }
.filter-bar { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.filter-bar label { margin: 0; white-space: nowrap; }
.filter-bar input[type="range"] { min-height: 28px; padding: 0; border: 0; background: transparent; accent-color: var(--gold); }
.filter-bar output { min-width: 54px; color: var(--gold-soft); font-size: .82rem; font-weight: 800; text-align: right; }
.result-summary { margin: 16px 2px 12px; color: var(--muted); font-size: .84rem; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-card { display: flex; flex-direction: column; min-width: 0; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius-md); background: linear-gradient(150deg, var(--surface-soft), var(--surface)); }
.profile-top { display: flex; align-items: center; gap: 14px; }
.avatar { display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid rgb(225 182 95 / 32%); border-radius: 50%; background: radial-gradient(circle at 30% 20%, rgb(225 182 95 / 35%), rgb(225 182 95 / 7%)); color: var(--gold-soft); font-family: var(--display); font-size: 1.55rem; flex: 0 0 auto; }
.avatar-sage { border-color: rgb(140 199 173 / 32%); background: radial-gradient(circle at 30% 20%, rgb(140 199 173 / 32%), rgb(140 199 173 / 7%)); color: var(--sage); }
.avatar-cream { border-color: rgb(238 227 201 / 30%); background: radial-gradient(circle at 30% 20%, rgb(238 227 201 / 28%), rgb(238 227 201 / 6%)); color: var(--cream); }
.avatar-clay { border-color: rgb(206 144 117 / 32%); background: radial-gradient(circle at 30% 20%, rgb(206 144 117 / 32%), rgb(206 144 117 / 7%)); color: #e9b298; }
.profile-title { min-width: 0; }
.profile-title h2 { margin: 0 0 4px; font-family: var(--display); font-size: 1.45rem; font-weight: 500; overflow-wrap: anywhere; }
.profile-title p { margin: 0; color: var(--muted); font-size: .77rem; }
.profile-bio { margin: 17px 0; color: var(--ivory); font-size: .87rem; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.tag-accent { border-color: rgb(225 182 95 / 32%); color: var(--gold-soft); }
.tag-pending { border-color: rgb(140 199 173 / 35%); color: var(--sage); }
.profile-distance { display: flex; align-items: center; gap: 8px; margin: auto 0 16px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: .77rem; }
.profile-distance .icon { width: 18px; height: 18px; color: var(--gold); }
.profile-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
.profile-actions .primary-button, .profile-actions .secondary-button { min-height: 46px; padding: 10px 12px; font-size: .78rem; }
.profile-actions .secondary-button:last-child { width: 46px; padding: 9px; }
.profile-actions .primary-button { min-width: 0; }

.matches-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.match-list { display: flex; flex-direction: column; gap: 9px; }
.match-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 82px; padding: 13px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); color: var(--ivory); text-align: left; }
.match-button:hover { border-color: var(--gold); }
.match-button[aria-pressed="true"] { border-color: var(--gold); background: var(--surface-soft); }
.match-button .avatar { width: 48px; height: 48px; font-size: 1.1rem; }
.match-button > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.match-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-button small { color: var(--muted); font-size: .71rem; }
.chat-panel { display: flex; flex-direction: column; min-height: 590px; overflow: hidden; box-shadow: none; }
.chat-header { display: flex; align-items: center; gap: 14px; padding: 19px 21px; border-bottom: 1px solid var(--border); }
.chat-header > div:nth-child(2) { min-width: 0; flex: 1; }
.chat-header h2 { margin: 0 0 4px; font-family: var(--display); font-size: 1.3rem; font-weight: 500; }
.chat-header p { margin: 0; color: var(--muted); font-size: .75rem; }
.danger-button { color: var(--danger); }
.local-notice { display: flex; align-items: flex-start; gap: 10px; margin: 16px 21px 0; padding: 11px 13px; border: 1px solid rgb(140 199 173 / 22%); border-radius: 12px; background: rgb(140 199 173 / 6%); color: var(--muted); font-size: .75rem; }
.local-notice .icon { width: 18px; height: 18px; color: var(--sage); }
.chat-log { display: flex; flex: 1; flex-direction: column; gap: 10px; max-height: 430px; min-height: 260px; overflow-y: auto; padding: 22px; }
.bubble { max-width: min(78%, 540px); padding: 11px 14px; border-radius: 16px; font-size: .89rem; overflow-wrap: anywhere; }
.bubble small { display: block; margin-top: 5px; opacity: .72; font-size: .66rem; }
.bubble.theirs { align-self: flex-start; border: 1px solid var(--border); border-bottom-left-radius: 5px; background: var(--surface-soft); }
.bubble.mine { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--gold); color: var(--bg-deep); }
.chat-form { display: flex; gap: 10px; padding: 16px 21px 20px; border-top: 1px solid var(--border); background: rgb(9 16 15 / 55%); }
.chat-form input { flex: 1; min-width: 0; }

.pass-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin: 22px 0 16px; padding: clamp(28px, 5vw, 58px); overflow: hidden; background: radial-gradient(circle at 90% 10%, rgb(225 182 95 / 16%), transparent 20rem), linear-gradient(145deg, var(--surface-soft), var(--surface)); }
.pass-hero h1 { margin: 15px 0; font-size: clamp(2.6rem, 5vw, 4.3rem); }
.pass-hero p { max-width: 640px; margin: 0; color: var(--muted); }
.pass-emblem { display: grid; place-items: center; width: clamp(130px, 18vw, 190px); aspect-ratio: 1; border: 1px solid rgb(225 182 95 / 32%); border-radius: 50%; background: radial-gradient(circle, rgb(225 182 95 / 15%), transparent 68%); color: var(--gold); flex: 0 0 auto; }
.pass-emblem .icon { width: 56px; height: 56px; margin-bottom: -22px; }
.pass-emblem span { font-size: .75rem; font-weight: 900; letter-spacing: .28em; }
.pass-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.benefit-card { padding: 24px; box-shadow: none; }
.benefit-card h2 { margin: 20px 0 10px; font-family: var(--display); font-size: 1.45rem; font-weight: 500; }
.benefit-card p { color: var(--muted); font-size: .85rem; }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgb(225 182 95 / 27%); border-radius: 50%; background: rgb(225 182 95 / 8%); color: var(--gold); }
.feature-icon.sage { border-color: rgb(140 199 173 / 27%); background: rgb(140 199 173 / 8%); color: var(--sage); }
.feature-icon.cream { border-color: rgb(238 227 201 / 27%); background: rgb(238 227 201 / 8%); color: var(--cream); }
.pass-bottom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.pass-bottom-grid > article { padding: 26px; box-shadow: none; }
.pass-bottom-grid h2 { margin: 9px 0 10px; font-family: var(--display); font-size: 1.5rem; font-weight: 500; }
.pass-bottom-grid p { color: var(--muted); font-size: .86rem; }
.notification-card .feature-icon { margin-bottom: 20px; }
.notification-card .primary-button { margin-top: 6px; }

.site-footer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-top: 42px; padding: 22px 2px 8px; border-top: 1px solid var(--border); color: var(--muted); font-size: .77rem; }
.site-footer > div { display: grid; }
.site-footer strong { color: var(--ivory); font-family: var(--display); font-size: 1.05rem; }
.site-footer p { margin: 0; text-align: center; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--gold-soft); text-underline-offset: 3px; }

.app-dialog { width: min(92vw, 520px); max-height: min(90vh, 760px); padding: 0; overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); color: var(--ivory); box-shadow: var(--shadow); }
.app-dialog::backdrop { background: rgb(3 8 7 / 78%); backdrop-filter: blur(6px); }
.app-dialog[open] { padding: 24px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 6px 0 0; font-family: var(--display); font-size: 1.55rem; font-weight: 500; }
.dialog-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); color: var(--ivory); flex: 0 0 auto; }
.app-dialog p { margin: 16px 0 20px; color: var(--muted); font-size: .86rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.report-protection { display: flex; gap: 11px; padding: 13px; border: 1px solid rgb(140 199 173 / 24%); border-radius: 13px; background: rgb(140 199 173 / 6%); }
.report-protection .icon { color: var(--sage); }
.report-protection p { margin: 0; color: var(--muted); font-size: .76rem; }
.toast-region { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--elevated); color: var(--ivory); box-shadow: var(--shadow); font-size: .84rem; animation: toast-in .2s ease-out; }
.toast.is-error { border-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1120px) {
  .site-header { grid-template-columns: auto 1fr; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .header-seal { justify-self: end; }
  .registration-layout { grid-template-columns: minmax(0, .8fr) minmax(500px, 1.2fr); gap: 28px; }
  .registration-intro h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); }
  .radar-layout { grid-template-columns: 270px minmax(0, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .registration-layout { grid-template-columns: 1fr; padding-top: 8px; }
  .registration-intro { position: static; padding-bottom: 6px; }
  .registration-intro h1 { font-size: clamp(2.8rem, 9vw, 4.3rem); }
  .consent-diagram { max-width: 580px; }
  .registration-form { max-width: 760px; }
  .radar-layout { grid-template-columns: 1fr; }
  .radar-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matches-layout { grid-template-columns: 230px minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .app-shell { padding-right: 16px; padding-left: 16px; }
  .site-header { gap: 14px; }
  .header-seal { font-size: 0; gap: 0; }
  .header-seal .icon { width: 24px; height: 24px; }
  .demo-ribbon { align-items: flex-start; flex-wrap: wrap; }
  .demo-ribbon > span:nth-child(2) { flex-basis: calc(100% - 110px); }
  .demo-ribbon button { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; gap: 4px; }
  .verification-box { grid-template-columns: minmax(0, 1fr) 170px; }
  .profile-grid { grid-template-columns: 1fr; }
  .radar-sidebar { grid-template-columns: 1fr; }
  .matches-layout { grid-template-columns: 1fr; }
  .match-list { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .match-button { width: 220px; flex: 0 0 220px; }
  .pass-grid { grid-template-columns: 1fr; }
  .pass-bottom-grid { grid-template-columns: 1fr; }
  .pass-emblem { display: none; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; text-align: left; }
  .site-footer p { text-align: left; }
}

@media (max-width: 500px) {
  .brand strong { font-size: 1.3rem; }
  .brand img { width: 44px; height: 44px; }
  .main-nav button { flex: 0 0 auto; padding: 9px 14px; }
  .demo-ribbon { font-size: .74rem; }
  .registration-intro h1 { margin-top: 16px; }
  .consent-diagram { gap: 8px; padding: 16px 12px; }
  .consent-person > span { min-width: 54px; height: 54px; font-size: .82rem; }
  .registration-form { padding: 20px; border-radius: 22px; }
  .choice-grid { gap: 7px; }
  .location-box { align-items: stretch; flex-direction: column; }
  .location-box .secondary-button { width: 100%; }
  .verification-box { grid-template-columns: 1fr; }
  .camera-preview { max-width: 260px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
  .view-heading { align-items: flex-start; flex-direction: column; padding-top: 18px; }
  .view-heading h1 { font-size: 2.25rem; }
  .filter-bar { display: grid; grid-template-columns: 1fr auto; gap: 9px 12px; }
  .filter-bar input[type="range"] { grid-column: 1 / -1; grid-row: 2; }
  .filter-bar output { grid-column: 2; grid-row: 1; }
  .profile-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .profile-actions .secondary-button:first-child { grid-column: 1 / -1; grid-row: 2; }
  .profile-actions .secondary-button:last-child { grid-column: 2; grid-row: 1; }
  .chat-panel { min-height: 560px; }
  .chat-header { padding: 15px; gap: 10px; }
  .chat-header .avatar { width: 48px; height: 48px; }
  .chat-header .secondary-button { min-height: 44px; padding: 9px; font-size: .72rem; }
  .local-notice { margin: 14px 15px 0; }
  .chat-log { padding: 18px 15px; }
  .chat-form { padding: 14px 15px 16px; }
  .chat-form .primary-button { width: 50px; padding: 11px; }
  .chat-form .primary-button span { display: none; }
  .bubble { max-width: 88%; }
  .pass-hero { padding: 26px 22px; }
  .pass-hero h1 { font-size: 2.5rem; }
  .site-footer nav { flex-wrap: wrap; }
  .app-dialog[open] { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
