:root {
  color-scheme: dark;
  --bg: #0b1214;
  --bg-deep: #070d0f;
  --surface: #111c1e;
  --surface-soft: #152326;
  --elevated: #1a2a2d;
  --border: #2a3b3e;
  --border-strong: #3b5356;
  --jade: #69e4c3;
  --jade-strong: #43cfa9;
  --coral: #ff7e97;
  --cream: #f2e7cf;
  --text: #f4f8f6;
  --muted: #a8bab6;
  --danger: #ff8e8e;
  --shadow: 0 24px 80px rgb(0 0 0 / 28%);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-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 12% -10%, rgb(58 183 151 / 17%), transparent 34rem),
    radial-gradient(circle at 96% 18%, rgb(255 126 151 / 10%), transparent 30rem),
    var(--bg);
  color: var(--text);
  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(--jade); color: var(--bg-deep); }

:focus-visible {
  outline: 3px solid var(--cream);
  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(--cream);
  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(--text);
  text-align: left;
}
.brand img { width: 48px; height: 48px; border-radius: 15px; box-shadow: 0 0 0 1px var(--border); }
.brand-copy { display: grid; line-height: 1.2; }
.brand-kicker { color: var(--jade); font-size: .69rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.brand strong { margin-top: 3px; font-size: 1.35rem; letter-spacing: -.025em; }
.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(17 28 30 / 78%);
}
.main-nav button {
  min-height: 42px;
  padding: 9px 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}
.main-nav button:hover { color: var(--text); background: var(--surface-soft); }
.main-nav button[aria-current="page"] { background: var(--jade); color: var(--bg-deep); }
.header-actions { display: flex; gap: 8px; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: .86rem;
  font-weight: 750;
}
.icon-button:hover { border-color: var(--border-strong); background: var(--elevated); }
.icon-button[aria-pressed="true"] { border-color: var(--coral); color: var(--coral); background: rgb(255 126 151 / 8%); }
.icon-button .icon { width: 19px; height: 19px; }

.demo-ribbon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgb(17 28 30 / 66%);
  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(105 228 195 / 32%);
  border-radius: 999px;
  background: rgb(105 228 195 / 8%);
  color: var(--jade);
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}
.demo-ribbon > span:nth-child(2) { flex: 1; }
.demo-ribbon button { min-height: 36px; padding: 6px 10px; border: 0; background: transparent; color: var(--text); 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); } }
.access-layout { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr); gap: clamp(30px, 5vw, 74px); align-items: center; padding: clamp(18px, 4vw, 52px) 0 44px; }
.hero-copy { position: relative; min-width: 0; padding-bottom: 230px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--jade); font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 5px rgb(105 228 195 / 10%); }
.coral-dot { background: var(--coral); box-shadow: 0 0 0 5px rgb(255 126 151 / 10%); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
.hero-copy h1, .view-heading h1, .pass-hero h1 { margin: 20px 0; font-size: clamp(2.5rem, 5.2vw, 4.75rem); font-weight: 800; }
.hero-copy h1 span, .pass-hero h1 span { color: var(--muted); }
.hero-lead { max-width: 590px; margin-bottom: 28px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.13rem); }
.trust-list { display: grid; gap: 16px; max-width: 590px; }
.trust-list > div { display: flex; align-items: flex-start; gap: 14px; }
.trust-list .icon { width: 24px; height: 24px; margin-top: 2px; color: var(--jade); }
.trust-list span { display: grid; }
.trust-list strong { font-size: .95rem; }
.trust-list small { color: var(--muted); font-size: .84rem; }

.orbit-scene { position: absolute; right: 0; bottom: 0; width: 300px; height: 210px; opacity: .9; }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgb(105 228 195 / 25%); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 92px; height: 92px; }
.orbit-two { width: 166px; height: 166px; border-color: rgb(255 126 151 / 22%); }
.orbit-three { width: 240px; height: 240px; border-color: rgb(242 231 207 / 15%); }
.orbit-center { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 20px; background: var(--jade); color: var(--bg-deep); transform: translate(-50%, -50%) rotate(-8deg); box-shadow: 0 0 50px rgb(105 228 195 / 24%); }
.orbit-center .icon { width: 30px; height: 30px; }
.orbit-dot { position: absolute; width: 12px; height: 12px; border: 3px solid var(--bg); border-radius: 50%; }
.dot-one { left: 30px; top: 78px; background: var(--coral); }
.dot-two { right: 54px; top: 28px; background: var(--jade); }
.dot-three { right: 26px; bottom: 36px; background: var(--cream); }
.orbit-label { position: absolute; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .67rem; font-weight: 750; }
.label-one { left: 0; top: 54px; }
.label-two { right: 12px; top: 0; }
.label-three { right: 0; bottom: 6px; }

.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgb(24 39 42 / 96%), rgb(15 26 28 / 96%)); box-shadow: var(--shadow); }
.access-form { padding: clamp(22px, 3vw, 32px); }
.panel-heading { margin-bottom: 24px; }
.step-label { color: var(--jade); font-size: .71rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.panel-heading h2 { margin: 9px 0 8px; font-size: 1.65rem; }
.panel-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.field { margin-bottom: 18px; }
label, .filter-label { display: block; margin-bottom: 8px; color: var(--text); font-size: .84rem; font-weight: 750; }
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(--text);
  caret-color: var(--jade);
}
input::placeholder, textarea::placeholder { color: #7f9490; }
input:hover, textarea:hover, select:hover { border-color: #50696b; }
input:focus, textarea:focus, select:focus { border-color: var(--jade); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: .76rem; }
.check-row { display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 20px; padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); color: var(--text); font-size: .86rem; font-weight: 650; cursor: pointer; }
.check-row input { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--jade); flex: 0 0 auto; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.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(--jade); background: var(--jade); color: var(--bg-deep); }
.primary-button:hover { border-color: #91f1d6; background: #91f1d6; }
.secondary-button { padding: 11px 15px; border: 1px solid var(--border-strong); background: var(--surface-soft); color: var(--text); }
.secondary-button:hover { border-color: var(--jade); background: var(--elevated); }
.text-button { min-height: 44px; padding: 9px 12px; border: 0; background: transparent; color: var(--jade); text-decoration: underline; text-underline-offset: 4px; }
.full-width { width: 100%; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.form-actions .primary-button { flex: 1; }
.form-feedback { min-height: 0; margin: 10px 0 0; color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.form-feedback:empty { margin: 0; }
.form-feedback.is-error { color: var(--danger); }
.form-feedback.is-success { color: var(--jade); }
.fine-print { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .74rem; }
.camera-preview { margin-top: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-deep); }
.camera-preview video { width: 100%; max-height: 250px; border-radius: 10px; background: #030708; object-fit: cover; transform: scaleX(-1); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card { display: flex; gap: 15px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgb(17 28 30 / 72%); }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgb(105 228 195 / 25%); border-radius: 15px; background: rgb(105 228 195 / 9%); color: var(--jade); flex: 0 0 auto; }
.feature-icon.coral { border-color: rgb(255 126 151 / 25%); background: rgb(255 126 151 / 9%); color: var(--coral); }
.feature-icon.cream { border-color: rgb(242 231 207 / 25%); background: rgb(242 231 207 / 9%); color: var(--cream); }
.feature-card h3 { margin: 7px 0; font-size: 1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .82rem; }

.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(2rem, 4vw, 3.5rem); }
.view-heading p { max-width: 650px; margin: 0; color: var(--muted); }
.locked-state, .empty-state { padding: clamp(28px, 5vw, 56px); text-align: center; }
.locked-state { max-width: 760px; margin: 34px auto; }
.locked-state h2, .empty-state h2 { margin: 18px 0 10px; font-size: 1.5rem; }
.locked-state p, .empty-state p { max-width: 560px; 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: 20px; background: var(--surface-soft); color: var(--jade); }
.locked-icon .icon { width: 30px; height: 30px; }
.radar-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; }
.radar-sidebar { position: sticky; top: 18px; padding: 22px; }
.radar-stage { position: relative; width: 100%; aspect-ratio: 1; margin-bottom: 22px; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: radial-gradient(circle, rgb(105 228 195 / 12%), transparent 62%), var(--bg-deep); }
.stage-ring { position: absolute; left: 50%; top: 50%; border: 1px solid rgb(105 228 195 / 22%); border-radius: 50%; transform: translate(-50%, -50%); }
.ring-one { width: 28%; height: 28%; }
.ring-two { width: 54%; height: 54%; }
.ring-three { width: 80%; height: 80%; }
.stage-sweep { position: absolute; left: 50%; top: 50%; width: 40%; height: 40%; border-radius: 100% 0 0; background: conic-gradient(from 0deg, rgb(105 228 195 / 24%), transparent 70%); transform-origin: 0 0; animation: sweep 9s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.stage-center { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; border: 5px solid rgb(11 18 20 / 75%); border-radius: 50%; background: var(--jade); color: var(--bg-deep); font-size: .76rem; font-weight: 900; transform: translate(-50%, -50%); }
.stage-dot { position: absolute; width: 12px; height: 12px; border: 3px solid var(--bg-deep); border-radius: 50%; box-shadow: 0 0 16px currentColor; }
.stage-dot-one { left: 28%; top: 30%; background: var(--coral); color: var(--coral); }
.stage-dot-two { right: 22%; top: 40%; background: var(--jade); color: var(--jade); }
.stage-dot-three { left: 40%; bottom: 17%; background: var(--cream); color: var(--cream); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-heading h2 { margin: 0; font-size: 1.25rem; }
.muted { color: var(--muted); }
.radar-sidebar > .muted { margin: 10px 0 18px; font-size: .84rem; }
.radar-sidebar > .text-button { margin-top: 5px; }
.privacy-note { display: flex; gap: 11px; margin-top: 18px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-deep); }
.privacy-note .icon { margin-top: 2px; color: var(--jade); }
.privacy-note p { margin: 0; color: var(--muted); font-size: .76rem; }
.privacy-note strong { color: var(--text); }
.radar-main { min-width: 0; }
.filter-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 15px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.filter-label { margin: 0; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: .83rem; font-weight: 750; }
.chip:hover { border-color: var(--jade); }
.chip[aria-pressed="true"] { border-color: var(--jade); background: var(--jade); color: var(--bg-deep); }
.result-summary { margin: 16px 2px 12px; color: var(--muted); font-size: .85rem; }
.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: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: linear-gradient(155deg, var(--surface-soft), var(--surface)); }
.profile-top { display: flex; align-items: center; gap: 14px; }
.avatar { display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid rgb(105 228 195 / 30%); border-radius: 20px; background: radial-gradient(circle at 30% 20%, rgb(105 228 195 / 34%), rgb(105 228 195 / 8%)); color: var(--jade); font-size: 1.4rem; font-weight: 850; flex: 0 0 auto; }
.avatar-coral { border-color: rgb(255 126 151 / 32%); background: radial-gradient(circle at 30% 20%, rgb(255 126 151 / 34%), rgb(255 126 151 / 8%)); color: var(--coral); }
.avatar-cream { border-color: rgb(242 231 207 / 30%); background: radial-gradient(circle at 30% 20%, rgb(242 231 207 / 30%), rgb(242 231 207 / 7%)); color: var(--cream); }
.profile-title { min-width: 0; }
.profile-title h2 { margin: 0 0 4px; font-size: 1.25rem; overflow-wrap: anywhere; }
.profile-title p { margin: 0; color: var(--muted); font-size: .79rem; }
.profile-bio { margin: 17px 0; color: var(--text); font-size: .88rem; }
.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: .72rem; font-weight: 750; }
.tag-accent { border-color: rgb(105 228 195 / 30%); color: var(--jade); }
.profile-boundary { display: flex; align-items: flex-start; gap: 9px; margin: auto 0 17px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; }
.profile-boundary .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--cream); }
.profile-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.profile-actions .primary-button { min-width: 0; }
.profile-actions .secondary-button { width: 48px; padding: 10px; }

.chat-layout { overflow: hidden; }
.chat-workspace { display: flex; flex-direction: column; min-height: 590px; }
.chat-header { display: flex; align-items: center; gap: 14px; padding: 20px 22px; 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-size: 1.15rem; }
.chat-header p { margin: 0; color: var(--muted); font-size: .78rem; }
.local-notice { display: flex; align-items: flex-start; gap: 10px; margin: 16px 22px 0; padding: 11px 13px; border: 1px solid rgb(105 228 195 / 20%); border-radius: 12px; background: rgb(105 228 195 / 6%); color: var(--muted); font-size: .77rem; }
.local-notice .icon { width: 18px; height: 18px; color: var(--jade); }
.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: .9rem; overflow-wrap: anywhere; }
.bubble small { display: block; margin-top: 5px; opacity: .72; font-size: .67rem; }
.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(--jade); color: var(--bg-deep); }
.chat-form { display: flex; gap: 10px; padding: 16px 22px 20px; border-top: 1px solid var(--border); background: rgb(11 18 20 / 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(105 228 195 / 18%), transparent 20rem), linear-gradient(145deg, var(--surface-soft), var(--surface)); }
.pass-hero h1 { margin: 15px 0; font-size: clamp(2.3rem, 5vw, 4.2rem); }
.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(105 228 195 / 30%); border-radius: 50%; background: radial-gradient(circle, rgb(105 228 195 / 17%), transparent 68%); color: var(--jade); 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-size: 1.25rem; }
.benefit-card p { color: var(--muted); font-size: .86rem; }
.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-size: 1.35rem; }
.pass-bottom-grid p { color: var(--muted); font-size: .88rem; }
.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: .78rem; }
.site-footer > div { display: grid; }
.site-footer strong { color: var(--text); font-size: .92rem; }
.site-footer p { margin: 0; text-align: center; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--jade); text-underline-offset: 3px; }

.app-dialog { width: min(92vw, 480px); padding: 0; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.app-dialog::backdrop { background: rgb(3 8 9 / 76%); 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: 0; font-size: 1.3rem; }
.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(--text); }
.app-dialog p { margin: 16px 0 22px; color: var(--muted); font-size: .88rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.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(--text); box-shadow: var(--shadow); font-size: .85rem; 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); } }

.notes-screen { min-height: 100vh; padding: max(24px, env(safe-area-inset-top)) clamp(18px, 5vw, 48px) max(40px, env(safe-area-inset-bottom)); background: #f6f4ef; color: #25302d; }
.notes-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(100%, 760px); margin: 0 auto; padding-bottom: 20px; border-bottom: 1px solid #d8ddd8; }
.notes-kicker { color: #65736d; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.notes-header h1 { margin: 4px 0 0; font-size: 2rem; }
.notes-settings { min-height: 44px; padding: 9px 14px; border: 1px solid #cbd3cc; border-radius: 12px; background: transparent; color: #25302d; font-weight: 750; }
.notes-main { width: min(100%, 760px); margin: 0 auto; padding-top: 28px; }
.notes-form { display: flex; gap: 10px; }
.notes-form input { border-color: #cbd3cc; background: #fff; color: #25302d; }
.notes-form button { min-height: 50px; padding: 11px 18px; border: 0; border-radius: 13px; background: #25302d; color: #fff; font-weight: 800; }
.notes-count { margin: 14px 0 20px; color: #65736d; font-size: .8rem; }
.notes-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.note-item { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 14px; border: 1px solid #d8ddd8; border-radius: 14px; background: #fff; }
.note-item input { width: 20px; min-height: 20px; height: 20px; accent-color: #25302d; }
.note-item span { flex: 1; overflow-wrap: anywhere; }
.note-item.is-done span { color: #7d8782; text-decoration: line-through; }
.note-delete { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 11px; background: transparent; color: #65736d; }
.note-delete:hover { background: #eef1ec; color: #a33535; }
.note-delete .icon { width: 19px; height: 19px; }

@media (max-width: 1050px) {
  .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-actions { justify-self: end; }
  .access-layout { grid-template-columns: minmax(0, 1fr) minmax(330px, .92fr); gap: 30px; }
  .hero-copy h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); }
  .radar-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .app-shell { padding-right: 16px; padding-left: 16px; }
  .site-header { gap: 14px; }
  .brand-kicker { font-size: .62rem; }
  .icon-button span { display: none; }
  .icon-button { width: 46px; padding: 10px; }
  .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; }
  .access-layout { grid-template-columns: 1fr; padding-top: 10px; }
  .hero-copy { padding-bottom: 0; }
  .hero-copy h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
  .orbit-scene { display: none; }
  .access-form { max-width: 620px; }
  .feature-grid, .pass-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 18px; }
  .radar-layout { grid-template-columns: 1fr; }
  .radar-sidebar { position: static; display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 20px; align-items: start; }
  .radar-stage { grid-row: 1 / 6; margin: 0; }
  .sidebar-heading { grid-column: 2; }
  .radar-sidebar > .muted, .radar-sidebar > button, .privacy-note { grid-column: 2; }
  .privacy-note { margin-top: 8px; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 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: 560px) {
  .brand strong { font-size: 1.15rem; }
  .brand img { width: 44px; height: 44px; }
  .main-nav button { flex: 0 0 auto; padding: 9px 14px; }
  .demo-ribbon { font-size: .75rem; }
  .hero-copy h1 { margin-top: 16px; }
  .trust-list { gap: 13px; }
  .access-form { padding: 20px; border-radius: 22px; }
  .permission-grid { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
  .profile-grid { grid-template-columns: 1fr; }
  .radar-sidebar { display: block; }
  .radar-stage { width: min(100%, 250px); margin: 0 auto 20px; }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .view-heading { align-items: flex-start; flex-direction: column; padding-top: 18px; }
  .view-heading h1 { font-size: 2.2rem; }
  .chat-workspace { min-height: 560px; }
  .chat-header { padding: 16px; }
  .chat-header .soft-badge { display: none; }
  .local-notice { margin: 14px 16px 0; }
  .chat-log { padding: 18px 16px; }
  .chat-form { padding: 14px 16px 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.35rem; }
  .site-footer nav { flex-wrap: wrap; }
  .notes-header h1 { font-size: 1.6rem; }
  .notes-form { flex-direction: column; }
}

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