:root {
  color-scheme: dark;
  --landing-search-width: 760px;
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --panel: #121212;
  --panel-strong: #1e1e1e;
  --text: #fafafa;
  --muted: #a1a1a1;
  --muted-strong: #d4d4d4;
  --primary: #ffffff;
  --primary-hover: #e5e5e5;
  --primary-contrast: #0a0a0a;
  --accent: #1a1a1a;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --input-bg: #1e1e1e;
  --chip-bg: #1a1a1a;
  --focus-ring: #525252;
  --ai-gradient-start: #8b5cf6;
  --ai-gradient-end: #6366f1;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --control-min-height: 48px;
  --control-padding-x: 14px;
  --control-padding-y: 12px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-strong: #f3f3f5;
  --text: #030213;
  --muted: #717182;
  --muted-strong: #030213;
  --primary: #030213;
  --primary-hover: #1a1925;
  --primary-contrast: #ffffff;
  --accent: #e9ebef;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #d4183d;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.18);
  --input-bg: #f3f3f5;
  --chip-bg: #e9ebef;
  --focus-ring: #737373;
  --shadow: 0 18px 54px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: var(--bg);
}

body {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 0;
  min-height: 100vh;
}

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 64px;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 12px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.side-logo {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.side-nav-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: 0;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
}

.side-nav-button:first-of-type {
  margin-top: 22px;
}

.side-nav-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.side-nav-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.side-theme-switcher {
  display: grid;
  margin-top: auto;
}

.side-theme-toggle {
  border: 1px solid transparent;
}

.theme-icon {
  display: block;
}

[data-theme="dark"] .theme-icon-moon,
[data-theme="light"] .theme-icon-sun {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  height: 61px;
  min-height: 61px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 0 64px;
  background: var(--panel);
}

.hero-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-action {
  margin-top: 0;
  padding: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.top-action:hover {
  background: var(--chip-bg);
  color: var(--text);
}

.top-action.primary-action {
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 8px 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup .brand-logo {
  display: none;
}

.top-actions .top-action:first-child,
.theme-switcher {
  display: none;
}

.locale-switcher {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  background: var(--panel);
}

.locale-menu-wrap {
  position: relative;
}

.locale-menu-trigger {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-md) - 3px);
  padding: 0 24px 0 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.locale-menu-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.locale-menu-trigger::after {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  content: "v";
  color: var(--muted);
  font-size: 0.7rem;
}

.locale-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.locale-menu[hidden] {
  display: none;
}

.locale-menu-option {
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.locale-menu-option:last-child {
  border-bottom: 0;
}

.locale-menu-option:hover,
.locale-menu-option.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.theme-button {
  margin: 0;
  border: 0;
  border-radius: calc(var(--radius-md) - 3px);
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

h1,
h2,
p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1 {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.25;
}

.subtitle,
.muted {
  color: var(--muted);
}

.subtitle {
  display: none;
}

.workspace-tabs {
  display: none;
  justify-content: center;
  gap: 10px;
  padding: 0 28px;
}

.workspace-tab {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--muted);
  min-width: 112px;
}

.workspace-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

.workspace-view.is-hidden {
  display: none;
}

.layout {
  display: grid;
  max-width: 1680px;
  margin: 0 auto 24px;
  grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "search search"
    "results map";
  gap: 0;
  align-items: stretch;
  padding: 0;
}

.workspace-view {
  max-width: 1440px;
  margin: 0 auto 24px;
}

.workspace-view.layout:not(.is-landing) {
  max-width: none;
  height: calc(100vh - 61px);
  min-height: 0;
  overflow: hidden;
  margin: 0 0 0 64px;
  padding: 0;
}

.layout.is-landing {
  min-height: calc(100vh - 61px);
  grid-template-columns: minmax(0, 760px);
  grid-template-areas:
    "hero"
    "controls"
    "entry";
  justify-content: center;
  align-content: start;
  row-gap: 24px;
  margin-left: 64px;
  padding: 48px 48px 48px;
}

.layout.is-landing.has-landing-map {
  grid-template-columns: minmax(0, 620px) minmax(0, 628px);
  grid-template-areas:
    "hero hero"
    "controls controls"
    "entry map";
  align-items: start;
  column-gap: 32px;
  row-gap: 24px;
  max-width: 1376px;
}

.layout.is-landing:not(.has-landing-map) {
  grid-template-columns: minmax(0, 1280px);
  max-width: 1376px;
}

.layout.is-landing:not(.has-landing-map) .search-controls,
.layout.is-landing:not(.has-landing-map) .search-entry-container {
  width: min(var(--landing-search-width), 100%);
  justify-self: center;
}

.layout.is-landing .map-panel,
.layout.is-landing .results-panel {
  display: none;
}

.layout.is-landing.has-landing-map .map-panel {
  display: grid;
  position: relative;
  margin-top: 0;
  height: 515px;
  min-height: 515px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.layout.is-landing .search-panel {
  display: contents;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.layout.is-landing .search-entry-container {
  grid-area: entry;
  display: grid;
  gap: 24px;
  align-content: start;
}

.layout.is-landing .search-entry-container .prompt-search,
.layout.is-landing .search-entry-container .filter-drawer,
.layout.is-landing .search-entry-container .search-examples {
  grid-area: auto;
}

.layout.is-landing .search-hero {
  grid-area: hero;
  gap: 16px;
  justify-items: center;
  text-align: center;
  margin-bottom: 0;
}

.layout.is-landing .search-kicker {
  display: none;
}

.layout.is-landing .search-hero h2 {
  max-width: none;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

.title-nowrap {
  white-space: nowrap;
}

.layout.is-landing .search-subtitle {
  width: 100%;
  max-width: 672px;
  font-size: 1.125rem;
  line-height: 1.5556;
}

.layout.is-landing .search-mode-tabs {
  width: auto;
  display: flex;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.layout.is-landing .search-controls {
  grid-area: controls;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.layout.is-landing .search-controls,
.layout.is-landing .map-panel,
.layout.is-landing .search-examples {
  margin-top: 8px;
}

.layout.is-landing .search-mode-button,
.layout.is-landing .map-toggle-button {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 650;
}

.layout.is-landing .search-mode-button {
  background: var(--accent);
  color: var(--text);
}

.layout.is-landing .search-mode-button.is-active,
.layout.is-landing .map-toggle-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.layout.is-landing .map-toggle-button {
  background: var(--accent);
  color: var(--text);
}

.layout.is-landing .prompt-box textarea {
  display: block;
  height: calc(10.5em + 80px);
  min-height: calc(4.5em + 80px);
  padding: 18px 78px 62px 24px;
  border-radius: 14px;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.layout.is-landing .prompt-label {
  display: none;
}

.layout.is-landing .prompt-search {
  width: 100%;
}

.layout.is-landing .search-examples {
  justify-content: center;
}

.layout.is-landing.has-landing-map .search-examples {
  display: none;
}

.layout.is-landing .active-filters,
.layout.is-landing #reset,
.layout.is-landing .view-mode-tabs,
.layout.is-landing .new-search-button {
  display: none;
}

.stack-gap-sm {
  display: grid;
  gap: 6px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: none;
}

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

.compact-heading {
  margin-bottom: 14px;
}

.results-heading-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  text-align: right;
}

.search-panel {
  display: grid;
  grid-area: search;
  gap: 18px;
}

.layout:not(.is-landing) .search-panel {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  max-height: none;
  overflow: visible;
  grid-template-columns: auto minmax(280px, 760px) auto;
  grid-template-areas:
    "back query views"
    "chips chips chips";
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.layout:not(.is-landing) .search-entry-container {
  display: contents;
}

.layout:not(.is-landing) .search-hero {
  display: none;
}

.layout:not(.is-landing) .search-controls,
.layout:not(.is-landing) .search-examples,
.layout:not(.is-landing) .filter-drawer,
.layout:not(.is-landing) #reset {
  display: none;
}

.layout:not(.is-landing) .prompt-search {
  display: grid;
  grid-area: query;
  min-width: 0;
}

.layout:not(.is-landing) .prompt-label {
  display: none;
}

.layout:not(.is-landing) .prompt-box textarea {
  display: block;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 13px 58px 13px 44px;
  overflow: hidden;
  resize: none;
}

.layout:not(.is-landing) .prompt-submit {
  top: 50%;
  right: 6px;
  bottom: auto;
  width: 36px;
  height: 36px;
  min-height: 36px;
  transform: translateY(-50%);
}

.layout:not(.is-landing) .prompt-box::before {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  content: "";
  pointer-events: none;
}

.layout:not(.is-landing) .prompt-box::after {
  position: absolute;
  left: 28px;
  top: calc(50% + 6px);
  width: 8px;
  height: 2px;
  transform: rotate(45deg);
  transform-origin: left center;
  border-radius: 999px;
  background: var(--muted);
  content: "";
  pointer-events: none;
}

.layout:not(.is-landing) .active-filters {
  grid-area: chips;
  margin-top: 0;
  justify-items: center;
}

.layout:not(.is-landing) .active-filters-title {
  display: none;
}

.layout:not(.is-landing) .new-search-button {
  grid-area: back;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-top: 0;
  min-height: 40px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted-strong);
  border: 0;
}

.new-search-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.view-mode-tabs {
  display: none;
}

.layout:not(.is-landing) .view-mode-tabs {
  grid-area: views;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.view-mode-button {
  margin-top: 0;
  padding: 8px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
}

.view-mode-button:hover {
  background: var(--chip-bg);
}

.view-mode-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.layout.view-list {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "search"
    "results";
}

.layout.view-list .map-panel {
  display: none;
}

.layout.view-map {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "search"
    "map";
}

.layout.view-map .results-panel {
  display: none;
}

.layout.view-map .map-panel {
  min-height: calc(100vh - 112px);
}

.search-hero {
  display: grid;
  gap: 8px;
}

.search-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-hero h2 {
  font-size: 1.9rem;
  line-height: 1.06;
}

.search-subtitle {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.search-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.search-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-mode-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 9px 10px;
  background: transparent;
  color: var(--muted);
}

.search-mode-button svg,
.map-toggle-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-mode-button:hover {
  background: var(--chip-bg);
}

.search-mode-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.map-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 10px 12px;
  background: var(--chip-bg);
  color: var(--text);
}

.map-toggle-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
}

.prompt-search {
  display: grid;
  gap: 8px;
}

.prompt-label {
  color: var(--muted-strong);
  font-weight: 700;
}

.prompt-box {
  position: relative;
}

.prompt-box textarea {
  min-height: 170px;
  padding-right: 58px;
  resize: vertical;
  line-height: 1.45;
}

.prompt-submit {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 0;
  padding: 0;
  border-radius: var(--radius-md);
}

.prompt-submit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  pointer-events: none;
}

.search-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-examples span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.search-examples button {
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 0.84rem;
}

.search-examples button:hover {
  border-color: var(--border-strong);
  background: var(--panel-strong);
}

.filter-drawer {
  display: grid;
  gap: 0;
}

.filter-drawer.is-collapsed,
.search-mode-ai .filter-drawer,
.search-mode-filters .prompt-search,
.search-mode-filters .search-examples {
  display: none;
}

.search-mode-filters .filter-drawer {
  display: grid;
}

.layout:not(.is-landing).search-mode-filters .prompt-search {
  display: grid;
}

.layout:not(.is-landing).search-mode-filters .filter-drawer {
  display: none;
}

.pill {
  background: var(--accent-soft);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.filter-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.filter-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  pointer-events: none;
}

.filter-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.segmented-field {
  display: grid;
  grid-template-columns: minmax(82px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.segmented-control.wrap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segment-button {
  margin-top: 0;
  min-height: 30px;
  padding: 6px 8px;
  background: var(--chip-bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.1;
}

.segment-button.is-active {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: transparent;
}

.advanced-toggle {
  margin-top: 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.advanced-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.advanced-filters.is-collapsed {
  display: none;
}

.boolean-filters {
  display: grid;
  gap: 10px;
}

.filter-drawer label,
.advanced-filters label {
  grid-template-columns: minmax(82px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.filter-drawer input,
.filter-drawer select,
.advanced-filters input,
.advanced-filters select {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.active-filters {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.active-filters-title {
  font-size: 0.9rem;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: var(--control-min-height);
  padding: var(--control-padding-y) var(--control-padding-x);
  background: var(--input-bg);
  color: var(--text);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 24%, transparent);
  outline: 0;
}

button {
  margin-top: 0;
  border: 0;
  border-radius: var(--radius-md);
  min-height: var(--control-min-height);
  padding: var(--control-padding-y) var(--control-padding-x);
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 600;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.52;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

button.secondary:hover {
  background: var(--chip-bg);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.map {
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--panel-strong);
}

.map-panel {
  grid-area: map;
  position: relative;
  top: auto;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.map-layer-menu {
  position: relative;
  z-index: 600;
}

.map-draw-toolbar {
  position: absolute;
  top: 62px;
  left: 12px;
  z-index: 610;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.layout.is-landing.has-landing-map .map-draw-toolbar {
  top: 12px;
}

.map-draw-tool,
.map-layer-menu-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.map-layer-menu-button::-webkit-details-marker {
  display: none;
}

.map-draw-tool:hover,
.map-draw-tool[aria-pressed="true"],
.map-layer-menu[open] .map-layer-menu-button {
  background: var(--primary);
  color: var(--primary-contrast);
}

.map-draw-tool.is-hidden {
  display: none;
}

.map.is-draw-armed .maplibregl-canvas,
.map.is-drawing-area .maplibregl-canvas {
  cursor: crosshair;
}

.map.is-draw-armed .maplibregl-marker,
.map.is-drawing-area .maplibregl-marker {
  pointer-events: none;
}

.map.is-draw-armed .maplibregl-canvas,
.map.is-drawing-area .maplibregl-canvas {
  touch-action: none;
}

.map.is-draw-armed .maplibregl-marker,
.map.is-drawing-area .maplibregl-marker {
  pointer-events: none;
}

.map-draw-tool svg,
.map-layer-menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.map-layer-menu-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: 288px;
  max-width: calc(100vw - 96px);
  max-height: min(420px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: var(--shadow);
}

.map-layer-menu-panel .map-layers {
  gap: 12px;
  margin: 0;
  padding: 12px;
}

.map-layer-menu-panel .map-layers p {
  display: block;
}

.map-layer-menu-panel .layer-toggles {
  display: grid;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 2px;
}

.map-layer-menu-panel .layer-toggle {
  justify-content: space-between;
  width: 100%;
  border-radius: var(--radius-sm);
}

.layout.is-landing.has-landing-map .map-panel {
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}

.layout.is-landing.has-landing-map .map-panel .panel-heading {
  display: none;
}

.layout.is-landing.has-landing-map .map {
  min-height: 0;
  height: 100%;
  border-radius: var(--radius-sm);
}

.layout.is-landing.has-landing-map .maplibregl-map {
  background: #f7f3eb;
  font-family: inherit;
}

.layout.is-landing.has-landing-map .maplibregl-ctrl-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(18, 18, 18, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.layout.is-landing.has-landing-map .maplibregl-ctrl-group button {
  width: 32px;
  height: 32px;
  border: 0;
  background-color: transparent;
  color: var(--text);
}

.layout.is-landing.has-landing-map .maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--border);
}

.layout.is-landing.has-landing-map .maplibregl-ctrl-attrib {
  background: rgba(18, 18, 18, 0.8);
  color: var(--muted);
  font-size: 10px;
}

.layout.is-landing.has-landing-map .maplibregl-ctrl-attrib a {
  color: var(--text);
}

.map-panel .panel-heading {
  position: static;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
  pointer-events: auto;
}

.results-panel {
  grid-area: results;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
}

.create-workspace {
  max-width: none;
  margin: 0 0 24px 64px;
  padding: 28px;
}

.create-shell {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 18px;
}

.create-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.create-heading {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.create-heading h2 {
  font-size: 1.8rem;
  line-height: 1.1;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.create-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.create-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--muted);
}

.create-steps span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.create-steps strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.create-steps li.is-active {
  border-color: var(--border-strong);
  color: var(--text);
}

.create-steps li.is-active span {
  background: var(--primary);
  color: var(--primary-contrast);
}

.create-steps li.is-complete span {
  background: var(--success);
  color: #ffffff;
}

.create-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.draft-workflow-panel,
.draft-preview-panel {
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.draft-form,
.draft-step {
  display: grid;
  gap: 18px;
}

.draft-step {
  display: none;
}

.draft-step.is-active {
  display: grid;
}

.draft-upload-zone {
  display: grid;
  min-height: 240px;
  place-items: center;
  gap: 8px;
  padding: 26px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.draft-upload-zone:hover,
.draft-upload-zone.is-dragging {
  border-color: var(--primary);
  background: var(--accent);
}

.draft-upload-zone svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.draft-upload-title {
  font-weight: 800;
}

.field-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.35;
}

.draft-photo-meta,
.draft-edit-list-header,
.draft-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-button {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 750;
}

.text-button:hover {
  background: transparent;
  color: var(--text);
}

.draft-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.draft-ai-selection-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.draft-photo-card {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.draft-photo-card.is-ai-selected img {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 26%, transparent);
}

.draft-ai-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 0.72rem;
  font-weight: 800;
}

.draft-photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.draft-photo-card figcaption {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-field,
.draft-field-grid {
  display: grid;
  gap: 10px;
}

.draft-field {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.draft-field-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.draft-ready-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.draft-ready-list div {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-strong);
}

.ready-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
}

.draft-submit-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.draft-submit-status.is-error {
  color: var(--danger);
}

.draft-submit-status.is-success {
  color: var(--success);
}

.create-backend-note {
  font-size: 0.9rem;
  line-height: 1.45;
}

.draft-preview-panel {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 16px;
}

.draft-empty-preview {
  display: grid;
  min-height: 360px;
  place-items: center;
  gap: 7px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  text-align: center;
}

.draft-result {
  display: grid;
  gap: 16px;
}

.draft-result.is-hidden,
.draft-empty-preview.is-hidden {
  display: none;
}

.draft-preview-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
}

.draft-preview-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--panel-strong);
}

.draft-preview-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-preview-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted-strong);
  font-size: 0.85rem;
  font-weight: 750;
}

.draft-edit-list,
.draft-review-lists,
.draft-check-list,
.draft-warning-list,
.draft-highlights-list {
  display: grid;
  gap: 10px;
}

.draft-highlight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.draft-review-lists {
  padding-top: 4px;
}

.draft-review-lists section {
  display: grid;
  gap: 8px;
}

.draft-review-lists h4 {
  margin: 0;
  font-size: 0.92rem;
}

.draft-check-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--muted-strong);
}

.draft-check-item input {
  width: 16px;
  margin-top: 2px;
}

.draft-warning-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.11);
  color: var(--muted-strong);
}

.draft-warning-empty {
  margin: 0;
}

.draft-expiry {
  font-size: 0.84rem;
}

.dev-panel {
  display: grid;
  gap: 18px;
}

.dev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dev-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
}

.dev-card-wide {
  grid-column: 1 / -1;
}

.dev-map {
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--panel-strong);
}

.dev-map-large {
  min-height: 520px;
}

.dev-status {
  font-size: 0.86rem;
}

.dev-map-zoom {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-width: 64px;
  padding: 6px 8px;
  border: 1px solid rgba(52, 48, 42, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 247, 0.92);
  color: #34302a;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  text-align: center;
  box-shadow: 0 8px 22px rgba(22, 18, 12, 0.16);
}

.maplibregl-ctrl-attrib {
  font-size: 0.72rem;
}

.zoom-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.zoom-chip {
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text);
}

.preset-chip {
  margin-top: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text);
}

.dev-notes {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
}

.dev-notes ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.map-layers {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.map-layers p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.layer-toggle {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.layer-toggle input {
  width: auto;
  margin: 0;
}

.listing-marker {
  width: auto !important;
  height: auto !important;
  z-index: 30;
}

.listing-marker span {
  display: inline-block;
  pointer-events: none;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #111318;
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.listing-cluster-marker {
  width: 38px !important;
  height: 38px !important;
}

.listing-cluster-marker span {
  display: grid;
  place-items: center;
  pointer-events: none;
  width: 38px;
  height: 38px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #111318;
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.custom-price-marker {
  width: 80px !important;
  height: 32px !important;
  background: none;
  border: 0;
}

.price-marker-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-marker {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(10, 10, 10, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.poi-marker {
  width: 22px !important;
  height: 22px !important;
  z-index: 20;
}

.poi-marker span {
  display: grid;
  place-items: center;
  pointer-events: none;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c65732;
  box-shadow: 0 4px 10px rgba(25, 21, 17, 0.22);
  color: #fff;
}

.poi-marker svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.poi-cluster-marker {
  width: 34px !important;
  height: 34px !important;
  z-index: 20;
}

.poi-cluster-marker span {
  display: grid;
  place-items: center;
  pointer-events: none;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #334155;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.metro-stop-marker {
  width: 24px !important;
  height: 24px !important;
}

.metro-stop-marker span {
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  background: #e30613;
}

.metro-stop-marker svg {
  width: 15px;
  height: 15px;
}

.metro-stop-cluster-marker span {
  background: #e30613;
}

.bus-stop-marker span {
  background: #2f6fed;
}

.bus-stop-cluster-marker span {
  background: #2f6fed;
}

.train-station-marker span {
  background: #111827;
  border-radius: 6px;
}

.train-station-cluster-marker span {
  background: #111827;
  border-radius: 10px;
}

.supermarket-marker span {
  background: #16a34a;
  border-radius: 7px;
}

.supermarket-cluster-marker span {
  background: #16a34a;
}

.gym-marker span {
  background: #7c3aed;
}

.gym-cluster-marker span {
  background: #7c3aed;
}

.school-marker span {
  background: #f59e0b;
  color: #111;
}

.school-cluster-marker span {
  background: #f59e0b;
  color: #111;
}

.park-entrance-marker span {
  background: #15803d;
}

.park-entrance-cluster-marker span {
  background: #15803d;
}

.pharmacy-marker span {
  background: #059669;
  border-radius: 6px;
}

.pharmacy-cluster-marker span {
  background: #059669;
  border-radius: 10px;
}

.university-marker span {
  background: #1d4ed8;
}

.university-cluster-marker span {
  background: #1d4ed8;
}

.hospital-marker span {
  background: #dc2626;
  border-radius: 6px;
}

.hospital-cluster-marker span {
  background: #dc2626;
  border-radius: 10px;
}

.clinic-marker span {
  background: #f43f5e;
}

.clinic-cluster-marker span {
  background: #f43f5e;
}

.daycare-marker span {
  background: #f97316;
}

.daycare-cluster-marker span {
  background: #f97316;
}

.tram-stop-marker span {
  background: #0ea5e9;
  border-radius: 6px;
}

.tram-stop-cluster-marker span {
  background: #0ea5e9;
  border-radius: 10px;
}

.parking-marker span {
  background: #2563eb;
  border-radius: 6px;
}

.parking-cluster-marker span {
  background: #2563eb;
  border-radius: 10px;
}

.ev-charger-marker span {
  background: #84cc16;
  color: #111;
}

.ev-charger-cluster-marker span {
  background: #84cc16;
  color: #111;
}

.coworking-marker span {
  background: #9333ea;
}

.coworking-cluster-marker span {
  background: #9333ea;
}

.map-popup {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.map-popup h3 {
  margin: 0;
  font-size: 1rem;
}

.map-popup p {
  margin: 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.listing-card {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  background: var(--panel-strong);
}

.listing-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.listing-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.listing-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.listing-eyebrow {
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.listing-card-side {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.listing-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--muted-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.listing-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-attributes span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 750;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.error-state {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
}

.price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.address-line {
  font-size: 0.92rem;
}

.description {
  line-height: 1.45;
  color: var(--muted-strong);
}

.contact-line {
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  body {
    padding: 0;
  }

  .side-nav {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .layout.is-landing {
    grid-template-areas:
      "hero"
      "controls"
      "entry"
      "map"
      "results";
  }

  .layout:not(.is-landing) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "search"
      "results"
      "map";
    height: auto;
    min-height: auto;
    overflow: visible;
    margin-left: 0;
  }

  .topbar {
    display: flex;
    height: auto;
    min-height: 61px;
    margin-left: 0;
    align-items: center;
    padding: 12px 18px;
  }

  .hero-side {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .top-actions {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .workspace-tabs,
  .layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .filters,
  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .layout.is-landing.has-landing-map {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "controls"
      "entry"
      "map";
  }

  .layout.is-landing {
    grid-template-columns: 1fr;
    margin-left: 0;
    max-width: none;
    min-height: calc(100vh - 61px);
    row-gap: 18px;
    padding-top: 24px;
    padding-bottom: 88px;
  }

  .layout.is-landing:not(.has-landing-map) {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .layout.is-landing:not(.has-landing-map) .search-controls,
  .layout.is-landing:not(.has-landing-map) .search-entry-container {
    width: 100%;
  }

  .map {
    min-height: 360px;
    height: 360px;
  }

  .map-panel {
    position: static;
    height: auto;
    min-height: 0;
  }

  .layout.is-landing.has-landing-map .map-panel {
    height: auto;
    min-height: 0;
    margin-top: 0;
  }

  .layout.is-landing.has-landing-map .map,
  .layout.is-landing.has-landing-map .map-panel {
    min-height: 360px;
  }

  .layout:not(.is-landing) .search-panel {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "query"
      "views"
      "chips";
    align-items: stretch;
  }

  .layout.is-landing .search-hero h2 {
    font-size: 2.2rem;
    white-space: normal;
  }

  .layout.is-landing .search-controls {
    align-items: stretch;
    margin-top: 0;
  }

  .layout.is-landing .search-mode-tabs {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .layout.is-landing .map-toggle-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .layout.is-landing .map-panel,
  .layout.is-landing .search-examples {
    margin-top: 0;
  }

  .layout.is-landing .prompt-box textarea {
    height: calc(9em + 80px);
    min-height: calc(4.5em + 80px);
  }

  .layout:not(.is-landing) .new-search-button {
    width: 100%;
  }

  .create-workspace {
    margin-left: 0;
    padding: 18px 18px 88px;
  }

  .create-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .create-header .pill {
    grid-column: 2;
    justify-self: start;
  }

  .create-steps,
  .create-grid {
    grid-template-columns: 1fr;
  }

  .create-steps li {
    min-height: 50px;
  }

  .draft-preview-panel {
    position: static;
  }

  .draft-field-grid,
  .draft-field-grid-three {
    grid-template-columns: 1fr;
  }

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

  .listing-card,
  .listing-card-header {
    grid-template-columns: 1fr;
  }

  .listing-card-side {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .meta {
    justify-content: flex-start;
  }

  .price {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .layout.is-landing .search-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .layout.is-landing .map-toggle-button {
    width: 100%;
  }

  .create-heading h2 {
    font-size: 1.45rem;
  }

  .create-steps {
    gap: 6px;
  }

  .create-steps li {
    padding: 8px;
  }

  .create-steps strong {
    display: none;
  }

  .draft-photo-grid,
  .draft-preview-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draft-step-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 340px) {
  .title-nowrap {
    white-space: normal;
  }
}

body[data-active-workspace="create"] .topbar {
  display: none;
}

body[data-active-workspace="create"] {
  overflow: hidden;
}

.create-workspace {
  min-height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 64px;
  padding: 0 16px 32px;
  overflow-y: auto;
  background: var(--bg);
}

.create-shell {
  width: min(100%, 896px);
  max-width: 896px;
  margin: 0 auto;
  gap: 28px;
}

.create-header {
  position: sticky;
  top: 0;
  z-index: 12;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: 61px;
  margin: 0 -16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  backdrop-filter: blur(14px);
}

.create-header .icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
}

.create-heading {
  justify-items: center;
  gap: 0;
  text-align: center;
}

.create-heading .search-kicker,
.create-heading .muted,
.create-header .pill {
  display: none;
}

.create-heading h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.create-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 4px 0 8px;
  padding: 0;
}

.create-steps li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.create-steps li::after {
  content: "";
  position: absolute;
  top: 20px;
  left: calc(50% + 26px);
  right: calc(-50% + 26px);
  height: 2px;
  background: var(--border);
}

.create-steps li:last-child::after {
  display: none;
}

.create-steps li.is-complete::after {
  background: var(--success);
}

.create-steps span {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.create-steps li.is-active span {
  background: var(--primary);
  color: var(--primary-contrast);
}

.create-steps li.is-complete span {
  background: var(--success);
  color: transparent;
}

.create-steps li.is-complete span::before {
  content: "";
  width: 12px;
  height: 7px;
  border: solid #ffffff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.create-steps strong {
  max-width: 100%;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.create-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.draft-workflow-panel,
.draft-preview-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.draft-preview-panel {
  position: static;
}

.draft-preview-panel:has(.draft-empty-preview:not(.is-hidden)) {
  display: none;
}

.draft-preview-panel .panel-heading {
  display: none;
}

.draft-form,
.draft-step {
  gap: 24px;
}

.draft-step .stack-gap-sm {
  gap: 8px;
}

.draft-step h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
}

.draft-step .muted {
  font-size: 0.9rem;
  line-height: 1.45;
}

.draft-upload-zone {
  min-height: 340px;
  aspect-ratio: 4 / 3;
  padding: 32px;
  border-color: var(--border-strong);
  border-radius: var(--radius-md);
  background: transparent;
}

.draft-upload-zone:hover,
.draft-upload-zone.is-dragging {
  background: var(--accent);
}

.draft-upload-zone svg {
  width: 48px;
  height: 48px;
  color: var(--muted);
}

.draft-upload-title {
  font-weight: 600;
}

.draft-photo-grid,
.draft-ai-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.draft-ai-images img,
.draft-photo-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.draft-photo-actions {
  gap: 6px;
}

.draft-photo-actions button {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.draft-field-grid {
  gap: 16px;
}

.draft-field,
.draft-step label,
.draft-edit-list-header {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

.draft-step label {
  display: grid;
  gap: 8px;
}

.draft-step input,
.draft-step select,
.draft-step textarea {
  border-radius: var(--radius-md);
  background: var(--accent);
}

.draft-ready-list {
  padding: 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}

.ready-dot {
  position: relative;
  width: 16px;
  height: 16px;
  background: var(--success);
}

.ready-dot::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 7px;
  height: 4px;
  border: solid #ffffff;
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}

.draft-step-actions {
  gap: 12px;
}

.draft-step-actions button,
#draft-upload-next,
#draft-generate,
#draft-publish {
  min-height: 48px;
}

.draft-step-actions button {
  flex: 1;
}

#draft-generate {
  background: linear-gradient(90deg, var(--ai-gradient-start), var(--ai-gradient-end));
  color: #ffffff;
}

#draft-generate.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#draft-generate.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: draft-generate-spin 760ms linear infinite;
}

@keyframes draft-generate-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #draft-generate.is-loading::before {
    animation-duration: 1600ms;
  }
}

.draft-submit-status {
  min-height: 21px;
}

.draft-result {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.draft-preview-images {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.draft-preview-images img {
  border-radius: 0;
}

.draft-result > label,
.draft-preview-facts,
.draft-edit-list,
.draft-review-lists,
.draft-expiry {
  padding: 16px 24px;
}

.draft-result > label + label,
.draft-result > label,
.draft-preview-facts,
.draft-edit-list,
.draft-review-lists,
.draft-expiry {
  border-top: 1px solid var(--border);
}

.draft-result > label:first-of-type {
  border-top: 0;
}

.draft-result > label > span {
  color: var(--muted);
  font-size: 0.8rem;
}

#draft-title-input {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
}

#draft-description-input {
  min-height: 144px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  line-height: 1.6;
}

.draft-preview-facts {
  gap: 16px;
}

.draft-preview-facts span {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 500;
}

.draft-review-lists {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .create-workspace {
    margin-left: 0;
    padding: 0 16px 88px;
  }

  .create-shell {
    gap: 24px;
  }

  .draft-field-grid,
  .draft-field-grid-three,
  .draft-review-lists {
    grid-template-columns: 1fr;
  }

  .draft-upload-zone {
    min-height: 260px;
  }
}

@media (max-width: 420px) {
  .create-steps strong {
    display: block;
  }

  .create-steps span {
    width: 34px;
    height: 34px;
    font-size: 0.84rem;
  }

  .create-steps li::after {
    top: 17px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
  }

  .draft-photo-grid,
  .draft-ai-images,
  .draft-preview-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .draft-result > label,
  .draft-preview-facts,
  .draft-edit-list,
  .draft-review-lists,
  .draft-expiry {
    padding: 14px 16px;
  }
}
