:root {
  --bg: #06100e;
  --panel: rgba(10, 22, 18, 0.91);
  --line: rgba(184, 157, 85, 0.32);
  --line-soft: rgba(218, 197, 142, 0.15);
  --cream: #eee7d8;
  --muted: #b7ad98;
  --olive: #7e8750;
  --olive-light: #aeb77a;
  --orange: #f18a2b;
  --gold: #d0b675;
  --radius: 22px;
  --serif: Georgia, 'Iowan Old Style', Baskerville, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--cream); font-family: var(--sans); }
body { background: radial-gradient(circle at 60% 10%, rgba(97, 83, 43, 0.12), transparent 38%), linear-gradient(180deg, #06100e, #071310 72%, #050c0b); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.icon { width: 1.15em; height: 1.15em; display: inline-block; flex: none; vertical-align: -0.16em; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.app-shell { min-height: 100vh; }

.topbar { height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 0 30px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(3,10,9,.9); position: relative; z-index: 50; }
.brand { justify-self: start; border: 0; background: transparent; font: 34px/1 var(--serif); letter-spacing: -1px; color: var(--orange); }
.brand em { color: var(--olive); font-style: normal; }
.toplinks, .mode-switcher { display: flex; gap: 28px; align-items: center; }
.toplinks button, .muted-link { background: none; border: 0; color: #e0d7c8; opacity: .9; }
.mode-switcher { background: rgba(12,24,21,.75); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.mode-switch { border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-transform: lowercase; }
.mode-switch.is-active { background: rgba(126,135,80,.2); color: var(--cream); box-shadow: inset 0 0 0 1px rgba(241,138,43,.5); }
.account { justify-self: end; display: flex; align-items: center; gap: 16px; font-size: 14px; color: #ddd4c6; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(241,138,43,.55); background: rgba(126,135,80,.2); }

.home-page { padding: 22px 22px 28px; max-width: 1600px; margin: 0 auto; }
.hero-copy { text-align: center; padding-bottom: 20px; }
.hero-copy h1 { margin: 0; font: 64px/1.1 var(--serif); letter-spacing: -2px; color: var(--cream); }
.hero-copy h1 span { color: var(--orange); font-weight: 400; }
.hero-copy h1 em { color: var(--olive); font-style: normal; font-weight: 400; }
.hero-copy p { margin: 8px 0 0; color: var(--muted); font-size: 17px; }
.overview-grid { min-height: calc(100vh - 190px); display: grid; grid-template-columns: 1fr 1.08fr 1fr; gap: 14px; }
.overview-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(8,19,16,.95), rgba(8,18,15,.88)); min-width: 0; }
.dream-image { height: 34%; min-height: 220px; background: linear-gradient(180deg, transparent 50%, #08120f), url('./assets/dream-scene.jpg') center/cover; }
.overview-body { padding: 20px 22px 0; }
.mock-input { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); background: rgba(19,31,26,.85); border-radius: 16px; color: #d9d0c0; }
.large-input { padding: 20px; min-height: 72px; }
.large-input b, .chat-input b { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(126,135,80,.35); color: var(--cream); }
.overview-body > small { display: block; margin: 18px 0 10px; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row span, .chip-row button, .quick-row button { border: 1px solid var(--line); color: #d9d1c1; background: rgba(11,23,19,.7); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.tool-row, .dream-tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.tool-tile { min-width: 0; min-height: 100px; border: 1px solid var(--line); background: rgba(13,26,21,.85); border-radius: 14px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 12px; }
.tool-tile > span { color: var(--orange); font-size: 26px; display: grid; place-items: center; }
.tool-tile b { font-weight: 500; font-size: 13px; }
.tool-tile small { color: var(--muted); text-align: center; line-height: 1.4; }
.section-launch { position: absolute; left: 0; right: 0; bottom: 0; min-height: 145px; border: 0; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(7,17,14,.2), rgba(7,17,14,.98) 42%); padding: 24px; color: var(--cream); text-align: center; display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'title arrow' 'subtitle subtitle'; align-items: center; z-index: 12; }
.section-launch strong { grid-area: title; font: 54px/1 var(--serif); color: var(--orange); font-weight: 400; justify-self: end; margin-right: 24px; }
.section-launch i { grid-area: arrow; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--orange); font-style: normal; justify-self: start; }
.section-launch small { grid-area: subtitle; color: var(--cream); font-size: 15px; margin-top: 8px; }
.find-overview .section-launch strong { color: var(--olive); }
.find-overview .section-launch i { color: var(--olive-light); }
.find-overview { background: #07110f; }
.map-canvas { position: absolute; inset: 0; }
.map-toolbar { display: flex; align-items: center; gap: 8px; background: rgba(7,17,14,.86); border: 1px solid var(--line-soft); border-radius: 16px; padding: 8px; backdrop-filter: blur(16px); }
.map-toolbar.mini { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 10; }
.map-toolbar button { border: 0; background: transparent; color: #d8d0c0; border-radius: 12px; padding: 12px 16px; display: inline-flex; gap: 8px; align-items: center; text-transform: lowercase; }
.map-toolbar button.is-active { background: rgba(126,135,80,.2); box-shadow: inset 0 0 0 1px rgba(241,138,43,.55); color: var(--orange); }
.zyp-overview { padding: 26px 24px 158px; }
.chat-mini { display: flex; flex-direction: column; gap: 12px; min-height: 48%; }
.bubble { max-width: 78%; padding: 13px 16px; border-radius: 14px; line-height: 1.45; font-size: 14px; border: 1px solid rgba(218,197,142,.12); }
.bubble.user { align-self: flex-end; background: rgba(104,110,67,.3); }
.bubble.assistant { align-self: flex-start; background: rgba(14,27,23,.95); }
.chat-input { padding: 14px 16px; margin-top: 18px; }
.zyp-take { display: flex; gap: 12px; margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: rgba(11,23,19,.8); }
.star { color: var(--orange); font-size: 24px; }
.zyp-take h3 { margin: 0 0 6px; font: 24px/1 var(--serif); }
.zyp-take p { margin: 0; color: #d2c9ba; line-height: 1.5; font-size: 14px; }

.workspace-shell { min-height: calc(100vh - 64px); display: grid; grid-template-columns: 96px minmax(0, 1fr); }
.mode-rail { padding: 20px 12px; border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 10px; background: rgba(5,13,11,.82); position: relative; z-index: 20; }
.rail-button { height: 96px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(11,24,20,.74); color: var(--muted); display: flex; flex-direction: column; gap: 9px; align-items: center; justify-content: center; }
.rail-button span { font-size: 28px; }
.rail-button small { font-size: 14px; }
.rail-button.is-active { background: rgba(126,135,80,.2); color: var(--cream); border-color: var(--line); }
.rail-button.is-active span { color: var(--orange); }
.workspace { position: relative; min-width: 0; min-height: calc(100vh - 64px); overflow: hidden; }
.workspace-title h1, .find-title h1 { margin: 0; font: 76px/.95 var(--serif); font-weight: 400; color: var(--orange); letter-spacing: -2px; }
.workspace-title p, .find-title p { margin: 10px 0 0; font-size: 19px; color: #ded6c7; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(16px); }

.dream-workspace { padding: 34px 34px 28px; }
.dream-workspace > .workspace-title { position: absolute; top: 30px; left: 38px; z-index: 4; }
.dream-layout { display: grid; grid-template-columns: minmax(460px, .95fr) minmax(560px, 1.45fr); gap: 24px; min-height: calc(100vh - 126px); padding-top: 136px; }
.dream-left { display: flex; flex-direction: column; gap: 18px; }
.dream-prompt { padding: 18px; position: relative; }
.panel-heading, .strip-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-heading span, .strip-heading button { color: var(--gold); background: none; border: 0; }
.dream-prompt textarea { width: 100%; resize: none; margin-top: 14px; padding: 18px 58px 18px 18px; border: 1px solid var(--line-soft); background: rgba(7,16,14,.55); border-radius: 14px; color: #e0d8c8; line-height: 1.5; }
.round-submit { position: absolute; right: 32px; top: 86px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--orange); color: #1d180f; font-size: 22px; }
.round-submit.is-loading { opacity: .5; }
.dream-prompt > small { display: block; color: var(--muted); margin: 14px 0 8px; }
.dream-tools-panel { padding: 18px; }
.dream-tools-panel > strong { display: block; margin-bottom: 12px; }
.dream-tools-grid { margin: 0; }
.bridge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bridge-card { border: 1px solid var(--line); border-radius: 16px; background: rgba(11,24,20,.88); min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; text-align: left; }
.bridge-card strong { font: 23px/1.1 var(--serif); font-weight: 400; }
.bridge-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.45; }
.bridge-card > span { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--orange); flex: none; }
.z-circle { background: rgba(126,135,80,.28); color: var(--cream) !important; font-family: var(--serif); font-weight: bold; }
.dream-right { min-width: 0; position: relative; display: grid; grid-template-rows: minmax(320px, 1fr) auto auto; gap: 16px; }
.dream-hero-photo { min-height: 360px; border-radius: 22px; background: linear-gradient(90deg, rgba(7,16,14,.4), transparent 55%), url('./assets/dream-scene.jpg') center/cover; border: 1px solid var(--line-soft); }
.vision-card { width: min(520px, 72%); justify-self: end; margin-top: -110px; padding: 20px; position: relative; z-index: 2; }
.vision-card h3 { margin: 0 0 16px; font: 24px/1 var(--serif); font-weight: 400; }
.vision-card h3 span { color: var(--orange); }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.vision-grid small { color: var(--gold); display: block; margin-bottom: 4px; }
.vision-grid b { font-size: 14px; font-weight: 500; line-height: 1.4; }
.neighborhood-strip { min-width: 0; }
.neighborhood-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.neighborhood-card { text-align: left; border: 1px solid var(--line-soft); background: rgba(10,22,18,.85); border-radius: 12px; overflow: hidden; padding: 0 0 10px; }
.mini-photo { display: block; height: 84px; background: linear-gradient(180deg, rgba(241,138,43,.1), rgba(7,17,14,.35)), url('./assets/dream-scene.jpg') center/cover; }
.neighborhood-card b, .neighborhood-card small { display: block; padding: 0 10px; }
.neighborhood-card b { margin-top: 8px; }
.neighborhood-card small { color: var(--muted); margin-top: 3px; }

.find-workspace { background: #07110f; }
.find-full-map { position: absolute; inset: 0; }
.find-workspace::after { content: ''; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,12,10,.9) 0%, rgba(4,12,10,.5) 27%, transparent 52%), linear-gradient(0deg, rgba(5,14,12,.9), transparent 32%); z-index: 2; }
.find-title { position: absolute; top: 28px; left: 40px; z-index: 6; }
.find-title h1 { color: var(--olive); }
.map-toolbar.full { position: absolute; z-index: 8; top: 30px; left: 50%; transform: translateX(-50%); }
.find-search-panel { position: absolute; z-index: 8; top: 158px; left: 40px; width: 390px; padding: 18px; }
.search-box { min-height: 48px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; background: rgba(8,18,15,.88); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--cream); }
.find-search-panel > strong, .find-search-panel > small { display: block; }
.find-search-panel .search-box { margin: 14px 0; }
.find-search-panel > small { color: var(--muted); margin-bottom: 8px; }
.dream-toggle { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--olive-light); }
.dream-context { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.explore-panel { position: absolute; z-index: 8; right: 32px; top: 72px; width: 300px; padding: 20px; }
.explore-panel h3 { margin: 0; font: 24px/1 var(--serif); font-weight: 400; }
.explore-panel > small { display: block; color: var(--muted); margin: 8px 0 14px; }
.explore-panel > button { width: 100%; display: flex; justify-content: space-between; align-items: center; background: transparent; border: 0; border-top: 1px solid var(--line-soft); padding: 15px 0; text-align: left; }
.explore-panel i { color: var(--gold); font-style: normal; }
.find-bottom { position: absolute; z-index: 8; bottom: 24px; left: 24px; right: 24px; display: grid; grid-template-columns: minmax(0, 1.6fr) .7fr .7fr; gap: 14px; align-items: stretch; }
.neighborhood-results { padding: 16px; min-width: 0; }
.neighborhood-results .neighborhood-cards { grid-template-columns: repeat(4, 1fr); }
.find-bottom .bridge-card { min-height: 170px; background: rgba(8,18,15,.9); }

.zyp-workspace { padding: 30px 34px; display: grid; grid-template-columns: minmax(470px, 1.05fr) minmax(440px, 1fr) minmax(320px, .62fr); gap: 18px; }
.zyp-left-column, .zyp-visual-column { min-width: 0; }
.zyp-title h1 { color: var(--orange); }
.zyp-search { margin-top: 24px; height: 58px; }
.zyp-search button, .chat-compose button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--orange); color: #1d180f; }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.quick-row small { color: var(--muted); }
.zyp-chat-panel { margin-top: 22px; padding: 18px; min-height: 395px; }
.zyp-chat-panel h3 { margin: 0 0 16px; font: 23px/1 var(--serif); font-weight: 400; }
.zyp-chat-panel h3 span { color: var(--orange); }
.zyp-messages { display: flex; flex-direction: column; gap: 10px; max-height: 230px; overflow: auto; padding-right: 4px; }
.chat-compose { display: flex; gap: 8px; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; }
.chat-compose input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.recent-panel { margin-top: 18px; padding: 18px; }
.recent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.recent-home { border: 1px solid var(--line-soft); background: rgba(10,22,18,.8); border-radius: 12px; padding: 8px; display: grid; grid-template-columns: 76px 1fr; gap: 10px; text-align: left; }
.home-thumb { min-height: 62px; border-radius: 8px; background: url('./assets/zyp-home.jpg') center/cover; }
.recent-home b, .recent-home small { display: block; }
.recent-home small { color: var(--muted); margin-top: 3px; }
.zyp-home-photo { min-height: 570px; border-radius: 22px; border: 1px solid var(--line-soft); background: linear-gradient(0deg, rgba(7,16,14,.2), transparent 45%), url('./assets/zyp-home.jpg') center/cover; }
.zyp-crosslinks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.zyp-crosslinks .bridge-card { min-height: 138px; }
.report-panel { padding: 20px; align-self: start; }
.report-panel h2 { margin: 0; font: 29px/1 var(--serif); color: var(--cream); font-weight: 400; }
.report-panel h2 span { color: var(--orange); }
.report-panel > p { color: var(--muted); margin: 8px 0 16px; }
.report-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.report-row > span { color: var(--gold); }
.report-row b, .report-row small { display: block; }
.report-row b { font-size: 14px; }
.report-row small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.primary-button { margin-top: 16px; width: 100%; height: 48px; border: 0; border-radius: 14px; background: var(--orange); color: #231b10; font-weight: 700; }
.privacy { display: block; text-align: center; color: var(--muted); margin-top: 8px; }

.maplibregl-canvas { filter: saturate(.68) brightness(.76) contrast(1.06) sepia(.08); }
.maplibregl-ctrl-group { background: rgba(8,18,15,.9) !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(.9) sepia(.2); }
.maplibregl-ctrl-attrib { background: rgba(7,17,14,.76) !important; color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--cream); }

@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: 1fr; min-height: auto; }
  .overview-card { min-height: 720px; }
  .toplinks { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .mode-switcher { display: none; }
  .account { grid-column: 2; }
  .workspace-shell { grid-template-columns: 72px minmax(0,1fr); }
  .mode-rail { padding: 12px 8px; }
  .rail-button { height: 76px; }
  .dream-layout { grid-template-columns: 1fr; padding-top: 128px; }
  .dream-right { grid-template-rows: 420px auto auto; }
  .find-bottom { grid-template-columns: 1fr; }
  .find-bottom .bridge-card { display: none; }
  .zyp-workspace { grid-template-columns: 1fr 1fr; }
  .report-panel { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar { height: 58px; padding: 0 14px; }
  .brand { font-size: 27px; }
  .account span:first-child, .account span:last-child { display: none; }
  .hero-copy h1 { font-size: 45px; }
  .hero-copy p { font-size: 14px; }
  .home-page { padding: 16px 10px; }
  .overview-card { min-height: 650px; }
  .workspace-shell { display: block; }
  .mode-rail { position: sticky; top: 58px; z-index: 30; flex-direction: row; height: 58px; padding: 5px 10px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .rail-button { flex: 1; height: 46px; flex-direction: row; gap: 6px; }
  .rail-button span { font-size: 18px; }
  .workspace { min-height: calc(100vh - 116px); }
  .dream-workspace { padding: 24px 12px; }
  .dream-workspace > .workspace-title { position: static; }
  .workspace-title h1, .find-title h1 { font-size: 55px; }
  .dream-layout { padding-top: 24px; }
  .tool-row, .dream-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .bridge-grid, .zyp-crosslinks { grid-template-columns: 1fr; }
  .vision-card { width: 100%; margin-top: -70px; }
  .neighborhood-cards { grid-template-columns: repeat(2, 1fr); }
  .find-title { top: 20px; left: 18px; }
  .map-toolbar.full { top: 112px; left: 18px; right: 18px; transform: none; overflow-x: auto; }
  .find-search-panel { top: 180px; left: 18px; width: calc(100% - 36px); }
  .explore-panel { display: none; }
  .find-bottom { left: 12px; right: 12px; bottom: 12px; }
  .neighborhood-results .neighborhood-cards { grid-template-columns: repeat(2, 1fr); }
  .zyp-workspace { display: block; padding: 24px 12px; }
  .zyp-home-photo { min-height: 380px; margin-top: 18px; }
  .report-panel { margin-top: 18px; }
  .recent-grid { grid-template-columns: 1fr; }
}
