:root {
  color-scheme: light;
  font-family:
    "SUIT Variable", ui-sans-serif, sans-serif;
  background: #f4f5f3;
  color: #17201c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f5f3;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) minmax(220px, 320px);
  grid-template-rows: 72px minmax(0, 1fr) 42px;
  background: #f4f5f3;
}

.topbar {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #c7cdc5;
  padding: 12px 18px;
  background: #fbfcfa;
}

.topbar h1,
.provider-setup-required h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 650;
}

.eyebrow {
  margin: 0;
  color: #53645d;
  font-size: 12px;
  line-height: 1.2;
}

.workspace-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.workspace-logo { display:block; position:relative; flex:0 0 92px; width:92px; height:48px; overflow:hidden; }
.workspace-logo img { position:absolute; width:92px; height:92px; top:-20px; left:0; }
.topbar .workspace-logo { appearance:none; padding:0; border:0; border-radius:4px; background:transparent; cursor:pointer; }
.topbar .workspace-logo:focus-visible { outline:2px solid #245c4b; outline-offset:3px; }

.provider-pill {
  border: 1px solid #8aa69a;
  padding: 7px 10px;
  color: #153d31;
  background: #e8f2ed;
  font-size: 13px;
}

.left-panel,
.right-panel {
  min-height: 0;
  overflow: auto;
  background: #fbfcfa;
}

.left-panel {
  border-right: 1px solid #c7cdc5;
}

.right-panel {
  border-left: 1px solid #c7cdc5;
}

nav {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.nav-item {
  width: 100%;
  border: 0;
  padding: 10px;
  text-align: left;
  color: #24332e;
  background: transparent;
}

.nav-item.is-active {
  background: #dde9e3;
  color: #143f34;
}

.nav-item:disabled {
  color: #8b9690;
}

.panel-section {
  border-top: 1px solid #d8ddd6;
  padding: 14px;
}

.panel-section h2 {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 650;
}

.panel-section label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  color: #41514a;
  font-size: 13px;
}

.panel-section label.is-disabled {
  color: #8b9690;
}

.stack {
  display: grid;
  gap: 8px;
}

.stack input,
.stack textarea {
  width: 100%;
  border: 1px solid #c7cdc5;
  padding: 8px;
  color: #17201c;
  background: #ffffff;
}

.stack textarea {
  resize: vertical;
}

.stack label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.field-label {
  display: block;
  margin: 10px 0 5px;
  color: #41514a;
  font-size: 12px;
}

.text-input {
  width: 100%;
  border: 1px solid #c7cdc5;
  padding: 8px;
  color: #17201c;
  background: #ffffff;
}

select.text-input {
  min-height: 38px;
}

.selection-name-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #b8c3bd;
}

.segmented button {
  border: 0;
  border-right: 1px solid #b8c3bd;
  padding: 8px 4px;
  color: #40524b;
  background: #fbfcfa;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  color: #143f34;
  background: #dde9e3;
}

.context-surface-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 8px;
}

.context-scene-request-progress {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid #9fb7ad;
  background: #f3f7f4;
  color: #315248;
  font-size: 12px;
  line-height: 1.4;
}

.loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #bfd0c8;
  border-top-color: #315f52;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

.workspace-progress {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(520px, calc(100vw - 48px));
  padding: 16px 20px;
  border: 1px solid #61958a;
  border-radius: 8px;
  background: #f5fffb;
  color: #163c35;
  box-shadow: 0 4px 20px #183e3526;
  pointer-events: none;
  white-space: pre-line;
  line-height: 1.6;
}
.workspace-progress[hidden] { display: none; }
.workspace-progress[data-state="error"], .workspace-progress[data-state="permission_denied"] { border-color: #b96050; background: #fff5f2; color: #7a3026; }
.workspace-progress[data-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #bdd5ce;
  border-top-color: #23675a;
  border-radius: 50%;
  animation: loading-spin .8s linear infinite;
  margin-right: 8px;
}
.workspace-progress-label { font-weight: 600; }
.workspace-progress-elapsed { display: block; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) {
  .workspace-progress[data-busy="true"]::before, .loading-spinner { animation: none; }
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.command-button {
  border: 1px solid #78978b;
  padding: 8px 10px;
  color: #153d31;
  background: #e8f2ed;
}

.command-button.secondary {
  width: 100%;
  margin-top: 10px;
  color: #6b342b;
  border-color: #c8aaa2;
  background: #fbefec;
}

.link-button {
  width: 100%;
  border: 1px solid #c7cdc5;
  padding: 8px 10px;
  color: #2d5146;
  background: #fbfcfa;
  text-align: left;
}

.status-line {
  min-height: 18px;
  color: #66746f;
  font-size: 12px;
}

.result-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.result-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #c7cdc5;
  padding: 8px;
  text-align: left;
  background: #ffffff;
}

.result-item.is-active {
  border-color: #174f3f;
  background: #eef6f2;
  box-shadow: inset 3px 0 #174f3f;
}

.result-item strong {
  color: #1d2a25;
  font-size: 13px;
}

.result-item span,
.result-item small {
  color: #66746f;
  overflow-wrap: anywhere;
}

.selection-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.selection-list.site-candidate-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.selection-list.site-selected-list {
  max-height: 190px;
  overflow: auto;
  padding-right: 4px;
}

.selection-list-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #c7cdc5;
  padding: 8px;
  text-align: left;
  background: #ffffff;
}

.selection-list-item.is-active {
  border-color: #78978b;
  background: #e8f2ed;
}

.selection-list-item strong {
  color: #1d2a25;
  font-size: 13px;
}

.selection-list-item span,
.selection-list-item small {
  color: #66746f;
  overflow-wrap: anywhere;
}

.metric-list,
.credential-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.metric-list div,
.credential-row {
  display: grid;
  gap: 3px;
}

.metric-list dt,
.credential-row dt {
  color: #66746f;
  font-size: 11px;
  text-transform: uppercase;
}

.metric-list dd,
.credential-row dd {
  margin: 0;
  color: #16231e;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #dce5e0;
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #dce5e0;
}

.map-canvas-inner {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.urban-context-3d-viewer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f6f5ef;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.urban-context-3d-viewer:active {
  cursor: grabbing;
}

.urban-context-3d-viewer[data-navigation-profile="secondary-orbit"],
.urban-context-3d-viewer[data-navigation-profile="middle-orbit"],
.urban-context-3d-viewer[data-navigation-profile="alt-middle-orbit"],
.urban-context-3d-viewer[data-navigation-profile="shift-middle-orbit"] {
  cursor: default;
}

.urban-context-3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.urban-context-3d-viewer[data-initial-context-state="preparing"] > canvas,
.urban-context-3d-viewer[data-initial-context-state="issue"] > canvas { visibility: hidden; }
.context-initial-gate {
  position: absolute; inset: 0; z-index: 7;
  display:flex; align-items:center; justify-content:center; padding:24px;
  background:#f4f6f2; color:#193c30; cursor:default; overflow:auto; touch-action:auto;
}
.context-initial-gate[hidden], .context-initial-preview[hidden] { display:none !important; }
.context-initial-gate[data-presentation="shared"] { position:static; display:block; width:100%; padding:0; background:transparent; overflow:visible; pointer-events:auto; }
.context-initial-card { width:100%; max-width:448px; margin:auto; line-height:1.6; text-align:center; }
.context-initial-description { margin:0; font-size:13px; color:#53645d; line-height:1.7; word-break:keep-all; text-wrap:pretty; }
.context-initial-actions { margin-top:24px; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.context-initial-card button { appearance:none; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border:1px solid #c4d1c8; border-radius:8px; background:#fbfcfa; color:#294f44; font-size:13px; font-weight:550; cursor:pointer; }
.context-initial-card button[hidden] { display:none; }
.context-initial-card .context-initial-preview-action { border-color:#245c4b; background:#245c4b; color:#fff; }
.context-initial-card button:hover { background:#edf3ee; }
.context-initial-card .context-initial-preview-action:hover { background:#194a3b; }
.context-initial-details { margin-top:12px; color:#53645d; font-size:12px; }
.context-initial-details summary { display:list-item; width:fit-content; min-height:44px; margin:auto; padding:12px 8px; cursor:pointer; }
.context-initial-details[open] { text-align:left; }
.context-initial-details ul { margin:0; padding-left:20px; overflow-wrap:anywhere; }
.context-initial-details li { margin:4px 0; }
.context-initial-card :is(button,summary):focus-visible { outline:2px solid #245c4b; outline-offset:3px; }
.context-initial-note { margin:8px 0 0; font-size:12px; color:#53645d; }
@media(max-width:600px) {
  .context-initial-actions button { flex:1 1 auto; }
}
@media(forced-colors:active) {
  .context-initial-card button { border-color:ButtonText; }
}
.urban-context-building-model-status { position: absolute; z-index: 9; top: 128px; left: 12px; max-width: min(520px, calc(100% - 80px)); padding: 6px 8px; background: #f6f5efee; border: 1px solid #bfcec8; font-size: 11px; color: #365e51; }
.urban-context-building-model-status[hidden] { display: none; }
.urban-context-building-model-status button { cursor: pointer; }
.urban-context-railway-status { position:absolute; z-index:9; top:216px; left:12px; max-width:min(520px, calc(100% - 80px)); padding:6px 8px; background:#f6f5efee; border:1px solid #bfcec8; font-size:11px; color:#365e51; }
.urban-context-railway-status[hidden] { display:none; }
.urban-context-railway-status summary, .urban-context-railway-status button { cursor:pointer; }
.urban-context-evidence-status { position:absolute; z-index:10; top:260px; left:12px; max-width:min(550px,calc(100% - 80px)); padding:6px 8px; background:#faf4e9ee; border:1px solid #b8a384; font-size:11px; color:#60503a; }
.urban-context-evidence-status summary { cursor:pointer; }
.urban-context-evidence-status[open] div { max-height:150px; overflow:auto; padding:8px 0; line-height:1.5; }
.urban-context-evidence-status[hidden] { display:none; }
.context-initial-preview button { margin-left: 12px; cursor: pointer; pointer-events: auto; }
.context-initial-preview button:focus-visible { outline: 2px solid #754800; outline-offset: 2px; }
.context-initial-preview { position: absolute; z-index: 10; bottom: 28px; left: 12px; right: 12px;
  padding: 10px; background: #fff1dc; color: #754800; border: 1px solid #cb9c58; pointer-events: none; }

.urban-context-3d-progress {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: min(320px, calc(100% - 32px));
  padding: 9px 12px;
  border: 1px solid #9fb7ad;
  border-radius: 4px;
  background: rgba(246, 245, 239, 0.94);
  color: #23493e;
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
}

.urban-context-3d-progress,
.urban-context-3d-surface-status {
  display: grid;
  min-width: 220px;
  gap: 5px;
}

.urban-context-3d-progress progress,
.urban-context-3d-surface-status progress {
  width: 100%;
  height: 8px;
  accent-color: #2e6b59;
}

.urban-context-3d-progress.is-error {
  border-color: #c88d84;
  color: #8b2f22;
}

.urban-context-3d-surface-status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 11px;
  border: 1px solid #9fb7ad;
  border-radius: 4px;
  background: rgba(246, 245, 239, 0.94);
  color: #23493e;
  font-size: 13px;
  pointer-events: none;
}

.urban-context-3d-surface-status.is-error {
  border-color: #c88d84;
  color: #8b2f22;
}

.urban-context-3d-focus-status {
  position: absolute;
  left: 16px;
  bottom: 42px;
  max-width: min(390px, calc(100% - 32px));
  padding: 8px 11px;
  background: rgba(246, 245, 239, 0.94);
  border: 1px solid #9fb7ad;
  color: #23493e;
  font-size: 12px;
  pointer-events: none;
}

.urban-context-stream-status {
  position: absolute;
  left: 12px;
  top: 12px;
  max-width: min(470px, calc(100% - 110px));
  padding: 8px 10px;
  background: rgba(246, 245, 239, 0.95);
  border: 1px solid #9fb7ad;
  color: #23493e;
  font-size: 11px;
  line-height: 1.5;
  z-index: 3;
}
.urban-context-stream-status summary { cursor: pointer; }
.urban-context-stream-status div { margin: 8px 0; }
.urban-context-stream-status a { display: block; color: inherit; }
.urban-context-stream-status button { display: block; margin-top: 8px; }

.urban-context-water-attribution {
  position: absolute;
  bottom: 2px;
  left: 4px;
  z-index: 2;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #354b50;
  font-size: 11px;
  max-width: calc(100% - 8px);
  overflow-wrap: anywhere;
}
.urban-context-water-attribution a { color: inherit; }

.urban-context-3d-viewer[data-surface-mode="diagram"] .actual-surface-legend,
.urban-context-3d-viewer[data-surface-mode="imagery"] .diagram-surface-legend {
  display: none;
}

.urban-context-3d-legend {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  max-width: min(280px, calc(100% - 32px));
  gap: 5px;
  padding: 9px 11px;
  border: 1px solid #aebbb5;
  border-radius: 4px;
  background: rgba(246, 245, 239, 0.94);
  color: #263f37;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
}

.urban-context-3d-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.urban-context-3d-legend i {
  width: 12px;
  height: 12px;
  border: 1px solid rgb(27 46 39 / 35%);
}

.urban-context-3d-legend i.is-surface {
  border-color: #4f7565;
  background: #8da17b;
}

.urban-context-3d-legend i.is-building-detail {
  border-color: #766a5e;
  background: #a99a8b;
}

.urban-context-3d-data-state {
  position: absolute;
  bottom: 16px;
  left: 16px;
  max-width: min(360px, calc(100% - 32px));
  padding: 8px 11px;
  border: 1px solid #c88d84;
  border-radius: 4px;
  background: rgba(255, 248, 245, 0.94);
  color: #7d352b;
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
}

.vworld-tile-map {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  background: #dce5e0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.vworld-tile-map:active {
  cursor: grabbing;
}

.vworld-tile-map[data-pan-dragging="true"],
.vworld-tile-map[data-pan-dragging="true"]:active {
  cursor: grabbing;
}

.vworld-tile-map[data-draw-mode="rectangle"],
.vworld-tile-map[data-draw-mode="polygon"],
.vworld-tile-map[data-draw-mode="circle"],
.vworld-tile-map[data-draw-mode="rectangle"]:active,
.vworld-tile-map[data-draw-mode="polygon"]:active,
.vworld-tile-map[data-draw-mode="circle"]:active {
  cursor: crosshair;
}

.vworld-tile-layer {
  position: absolute;
  inset: 0;
}

.vworld-raster-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vworld-tile-layer img {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  user-select: none;
}

.vworld-selection-layer,
.vworld-search-layer,
.vworld-parcel-layer,
.vworld-site-layer,
.vworld-context-scene-layer,
.vworld-draw-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.vworld-search-marker path {
  fill: #d9342b;
  stroke: #fff;
  stroke-width: 2;
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 35%));
}

.vworld-search-marker text {
  fill: #fff;
  font: 700 11px/1 "SUIT Variable", sans-serif;
  text-anchor: middle;
  dominant-baseline: middle;
}

.vworld-search-marker.is-active path {
  fill: #174f3f;
  stroke-width: 3;
}

.vworld-site-layer {
  pointer-events: auto;
}

.vworld-selection-layer,
.vworld-search-layer,
.vworld-site-layer,
.vworld-context-scene-layer,
.vworld-draw-layer {
  /* The map root clips the screen. A transformed SVG must not clip a
     selected outline at its previous viewport edge during wheel zoom. */
  overflow: visible;
}

.vworld-tile-map[data-pan-dragging="true"] .vworld-parcel-layer,
.vworld-tile-map[data-pan-dragging="true"] .vworld-site-layer,
.vworld-tile-map[data-site-render-pending="true"] .vworld-parcel-layer,
.vworld-tile-map[data-site-render-pending="true"] .vworld-site-layer {
  will-change: transform;
}

.vworld-selection-shape {
  fill: rgb(255 207 64 / 24%);
  stroke: #ffcf40;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.vworld-selection-shape.is-muted {
  fill: rgb(255 207 64 / 14%);
  stroke: #d9a300;
  stroke-width: 1.7;
}

.vworld-selection-shape.is-active {
  fill: rgb(255 207 64 / 28%);
  stroke: #ffb000;
  stroke-width: 3;
}

.vworld-parcel-shape {
  fill: rgb(30 126 93 / 16%);
  stroke: #1c7358;
  stroke-width: 1.8;
  pointer-events: visiblePainted;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}

.vworld-parcel-shape:hover {
  fill: rgb(30 126 93 / 28%);
  stroke: #0f5f45;
  stroke-width: 2.6;
}

.vworld-parcel-shape.is-selected {
  fill: rgb(255 190 54 / 34%);
  stroke: #c98300;
  stroke-width: 3;
}

.vworld-road-shape {
  fill: none;
  stroke: #1f6feb;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.vworld-context-building-shape {
  fill: rgb(134 78 188 / 22%);
  stroke: #7f49b8;
  stroke-width: 1.8;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.vworld-scene-parcel-shape {
  fill: rgb(86 128 105 / 9%);
  stroke: rgb(54 105 82 / 56%);
  stroke-width: 1.1;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.vworld-scene-road-shape {
  fill: none;
  stroke: #d97706;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.vworld-site-void-shape {
  fill: rgb(255 255 255 / 42%);
  stroke: #0f5f45;
  stroke-dasharray: 7 5;
  stroke-width: 3;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.vworld-context-extrusion {
  pointer-events: none;
}

.vworld-context-extrusion-wall {
  fill: rgb(55 80 125 / 22%);
  stroke: rgb(55 80 125 / 48%);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}

.vworld-context-extrusion-roof {
  fill: rgb(54 113 136 / 32%);
  stroke: #0f5f72;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.vworld-context-extrusion.is-estimated .vworld-context-extrusion-roof {
  fill: rgb(185 122 39 / 30%);
  stroke: #8a5a14;
  stroke-dasharray: 5 4;
}

.vworld-context-extrusion-edge {
  stroke: rgb(25 68 92 / 45%);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.vworld-site-boundary-shape {
  fill: rgb(47 112 194 / 14%);
  stroke: #1f5fba;
  stroke-width: 3;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.vworld-draft-shape {
  fill: rgb(44 112 194 / 18%);
  stroke: #2c70c2;
  stroke-dasharray: 6 5;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.vworld-draft-vertex {
  fill: #ffffff;
  stroke: #2c70c2;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.draw-toolbox {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.draw-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.draw-actions .command-button.secondary {
  margin-top: 0;
}

.command-button:disabled,
.segmented button:disabled {
  color: #8b9690;
  border-color: #c7cdc5;
  background: #eef1ed;
  cursor: not-allowed;
}

.map-loading {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 420px;
  place-items: center;
  color: #3d524a;
}

.map-loading.is-error {
  color: #8b2f22;
}

.map-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 6px;
}

.map-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid #95a69f;
  background: #fbfcfa;
  color: #1d2a25;
}

.bottom-panel {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #c7cdc5;
  padding: 0 14px;
  background: #fbfcfa;
  color: #53645d;
  font-size: 12px;
}

.provider-setup-only {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f4f5f3;
}

.provider-setup-required {
  width: min(680px, 100%);
  border: 1px solid #c2cbc5;
  padding: 22px;
  background: #fbfcfa;
}

.provider-setup-required p {
  margin: 12px 0 0;
  color: #3f5049;
}

.credential-list {
  margin-top: 18px;
  border-top: 1px solid #d8ddd6;
  padding-top: 14px;
}

.selection-summary {
  margin-top: 12px;
  border-top: 1px solid #d8ddd6;
  padding-top: 12px;
}

.selection-summary.pending-selection {
  border: 1px solid #9bb8d6;
  padding: 10px;
  background: #f1f6fb;
}

.selection-summary.is-empty {
  color: #66746f;
}

.selection-summary p {
  margin: 6px 0 0;
  color: #66746f;
  font-size: 13px;
}

.selection-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.selection-actions .command-button.secondary {
  width: auto;
  margin-top: 0;
}

.site-parcel-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.site-parcel-actions .command-button.secondary {
  width: 100%;
  margin-top: 0;
}

.site-boundary-editor {
  width: 100%;
  min-height: 120px;
  margin: 8px 0;
  border: 1px solid #c7cdc5;
  padding: 8px;
  color: #17201c;
  background: #ffffff;
  font-family: "SUIT Variable", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.context-summary {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.context-cache-summary {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid #d8ddd6;
}

.context-cache-summary small,
.context-cache-summary p {
  margin: 0;
  color: #66746f;
  font-size: 12px;
  line-height: 1.45;
}

.context-provider-row {
  display: grid;
  gap: 4px;
  border-top: 1px solid #d8ddd6;
  padding-top: 8px;
}

.context-provider-row div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.context-provider-row strong {
  color: #1d2a25;
  font-size: 13px;
}

.context-provider-row span,
.context-provider-row small,
.context-provider-row p {
  margin: 0;
  color: #66746f;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.context-trace {
  border-top: 1px solid #d8ddd6;
  padding-top: 8px;
}

@media (max-width: 880px) {
  .app-shell {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(420px, 1fr) auto auto;
  }

  .topbar,
  .bottom-panel {
    grid-column: 1;
  }

  .left-panel,
  .right-panel {
    border: 0;
    border-bottom: 1px solid #c7cdc5;
  }

  .map-stage {
    min-height: 420px;
  }

  .map-canvas,
  .map-canvas-inner {
    min-height: 420px;
  }

  .bottom-panel {
    flex-wrap: wrap;
    min-height: 42px;
    padding: 10px 14px;
  }
}
.urban-context-bridge-status {
  position: absolute;
  z-index: 4;
  top: 46px;
  left: 12px;
  max-width: min(480px, calc(100% - 110px));
  padding: 7px 9px;
  color: #365b52;
  background: rgba(248, 248, 240, 0.94);
  border: 1px solid #c3d0c8;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
}
.urban-context-bridge-status button {
  pointer-events: auto;
  margin-left: 6px;
  padding: 2px 6px;
  font: inherit;
}
.urban-context-building-model-status.is-staging { top: auto; bottom: 64px; left: 50%; transform: translateX(-50%); width: min(480px, 85%); max-width: 85%; padding: 16px; background: #fffef6; box-shadow: 0 3px 16px #0002; border: 1px solid #b7c9c2; font-size: 13px; line-height: 1.6; z-index: 12; }
.urban-context-building-model-status.is-staging button { margin: 8px 8px 0 0; }
#site-envelope-form { display: grid; gap: 10px; min-width: 0; }
#site-envelope-form label:has(input[type="number"]) { display: grid; gap: 4px; }
#site-envelope-form input[type="number"] { box-sizing: border-box; width: 100%; min-width: 0; }
#site-envelope-form label:has(input[type="checkbox"]) { align-items: flex-start; }

/* Workspace: progressive disclosure, map-first on small screens. */
.app-shell { grid-template-columns: 248px minmax(0, 1fr) 270px; grid-template-rows: 72px minmax(0,1fr) 30px; font-size:14px; }
.app-shell .topbar { gap:16px; border-color:#e1e7e2; }
.app-shell .topbar h1 { font-size:19px; letter-spacing:-.03em; }
.workspace-header-actions { display:flex; align-items:center; gap:8px; }
.workspace-header-actions .context-export-action { display:inline-flex; align-items:center; justify-content:center; gap:8px; background:#245e4b; color:#fff; border-color:#245e4b; font-weight:600; white-space:nowrap; }
.workspace-header-actions .context-export-action:disabled { background:#edf2ee; color:#65776c; border-color:#cedbd4; }
.context-export-dialog { width:min(560px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); box-sizing:border-box; padding:24px; border:1px solid #cedbd4; border-radius:16px; color:#263d33; background:#fbfcfa; overflow:auto; box-shadow:0 16px 56px #16372a30; }
.context-export-dialog::backdrop { background:#132e2859; }
.context-export-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid #dce4de; padding-bottom:16px; }
.context-export-heading h2 { margin:0 0 8px; font-size:22px; }
.context-export-heading p { margin:0; font-size:14px; line-height:1.5; }
.context-export-heading button { min-height:44px; padding:8px 14px; border:1px solid #cedbd4; border-radius:8px; background:#fff; color:#244c40; cursor:pointer; white-space:nowrap; }
.context-export-heading form { flex-shrink:0; }
.context-export-options { display:grid; gap:10px; padding:20px 0 0; }
.context-export-options select { width:100%; min-height:44px; font-size:16px; }
.context-export-options label { font-size:14px; line-height:1.5; }
.context-export-options label:has(input) { display:flex; align-items:flex-start; gap:8px; padding:8px 0; }
.context-export-options input[type="checkbox"] { flex-shrink:0; margin-top:4px; }
.context-export-options .status-line { margin:4px 0; font-size:13px; line-height:1.7; }
.context-export-options button { min-height:44px; }
.context-export-options #download-context-model { background:#245e4b; color:#fff; border-color:#245e4b; }
.context-export-dialog :focus-visible { outline:3px solid #337e64; outline-offset:3px; }
.workspace-header-actions button, .workspace-sources button { min-height:44px; border:1px solid #cedbd4; border-radius:9px; background:#fff; color:#244c40; padding:8px 14px; cursor:pointer; }
#toggle-workspace-tools, #toggle-workspace-info, .workspace-drawer-close, .workspace-mobile-start { display:none; }
.workspace-drawing-guide { position:absolute; bottom:36px; left:50%; transform:translateX(-50%); z-index:6; display:flex; align-items:center; gap:8px; max-width:calc(100% - 24px); width:max-content; padding:8px 12px; border:1px solid #c7dbcd; background:#fff; border-radius:12px; box-shadow:0 4px 20px #214b3822; font-size:13px; }
.workspace-drawing-guide button { min-width:44px; min-height:44px; border:1px solid #c7dbcd; border-radius:8px; background:#edf4ef; color:#245e4b; cursor:pointer; }
.workspace-mobile-start[hidden] { display:none!important; }
.app-shell .draw-actions[hidden] { display:none; }
.workspace-progress[data-busy="false"][data-state="ready"] { width:max-content; max-width:calc(100vw - 48px); padding:8px 14px; font-size:13px; }
.app-shell .left-panel, .app-shell .right-panel { overscroll-behavior:contain; scrollbar-gutter:stable; border-color:#e1e7e2; }
.app-shell .left-panel nav { gap:4px; padding:14px 10px; }
.app-shell .nav-item { display:flex; align-items:center; gap:10px; border-radius:8px; min-height:44px; cursor:pointer; }
.step-number { display:inline-grid; place-items:center; width:23px; height:23px; border:1px solid #bdcec4; border-radius:50%; font-size:12px; flex-shrink:0; }
.nav-item.is-active .step-number { color:white; background:#245e4b; border-color:#245e4b; }
.workspace-next-step { margin:0 12px 16px; padding:16px 14px; border:1px solid #d7e5dd; border-radius:12px; background:#edf4ef; }
.workspace-next-step strong { font-size:14px; line-height:1.6; }
.workspace-next-step p { font-size:13px; color:#52695e; line-height:1.6; margin:8px 0 14px; }
.workspace-next-step button { min-height:44px; width:100%; border:0; border-radius:8px; color:#fff; background:#245e4b; font:inherit; cursor:pointer; }
.workspace-next-step button:disabled { background:#dde7e0; color:#52695e; cursor:wait; }
.app-shell .panel-section { padding:16px 14px; border-color:#e1e7e2; }
.app-shell .panel-section h2 { font-size:14px; margin-bottom:14px; }
.app-shell .status-line { line-height:1.6; color:#53645d; }
.app-shell .command-button, .app-shell .link-button, .app-shell .segmented button, .app-shell .map-controls button { min-height:44px; cursor:pointer; }
.app-shell .command-button { border-radius:8px; margin-top:6px; }
.app-shell .segmented { border-radius:8px; overflow:hidden; }
.app-shell input:not([type="checkbox"]), .app-shell select, .app-shell textarea { min-height:44px; border-radius:8px; max-width:100%; }
.app-shell .selection-summary { border-radius:8px; overflow-wrap:anywhere; }
.app-shell .map-controls { grid-template-columns:repeat(2,44px); }
.app-shell .map-controls button { width:44px; height:44px; border-radius:8px; box-shadow:0 2px 6px #18332610; }
.app-shell .map-controls .map-controls-wide { grid-column:1 / -1; width:auto; font-size:.8125rem; white-space:nowrap; }
.app-shell .map-controls .map-controls-wide[aria-pressed="true"], .app-shell .map-controls .map-controls-wide[aria-pressed="true"]:hover { background:#1d2a25; border-color:#1d2a25; color:#fff; }
.app-shell .map-controls .map-controls-note { grid-column:1 / -1; max-width:13rem; margin:0; padding:.4rem .55rem; border-radius:.5rem; background:rgba(255,255,255,.94); box-shadow:0 1px 4px rgba(0,0,0,.12); font-size:.75rem; line-height:1.35; color:#1d2a25; }
.app-shell .bottom-panel { justify-content:space-between; gap:12px; min-height:0; padding:5px 14px; border-color:#e1e7e2; font-size:11px; }
.workspace-map-credit { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-disclosure { margin:0 12px 12px; border-top:1px solid #e0e6e1; }
.workspace-disclosure > summary { cursor:pointer; min-height:44px; padding:13px 2px; font-weight:600; color:#385a4c; }
.workspace-disclosure .panel-section { padding:8px 0; border:0; }
.workspace-sources { border:1px solid #d6e0d9; border-radius:16px; width:min(700px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); padding:24px; color:#244236; background:#fbfcfa; overscroll-behavior:contain; overflow-wrap:anywhere; }
.workspace-sources::backdrop { background:#182d2666; }
.workspace-sources header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.workspace-sources h2 { margin:8px 0; font-size:23px; }
.workspace-sources h3 { margin:24px 0 8px; font-size:16px; }
.workspace-sources p { font-size:14px; line-height:1.75; }
.workspace-sources details { border-top:1px solid #dce4de; margin-top:18px; padding-top:8px; }
.workspace-sources summary { min-height:44px; padding:10px 0; cursor:pointer; }
.workspace-sources .panel-section { padding:12px 0; }
.app-shell :is(button,input,select,textarea,summary):focus-visible, .workspace-sources :focus-visible { outline:3px solid #337e64; outline-offset:3px; }
.app-shell button:disabled { cursor:default; }
@media(max-width:1100px) {
  .app-shell { position:relative; min-height:100dvh; height:100dvh; overflow:hidden; grid-template-columns:1fr; grid-template-rows:76px minmax(0,1fr) 30px; }
  .app-shell .topbar { grid-column:1; grid-row:1; padding:10px 12px; gap:8px; }
  .app-shell .topbar h1 { font-size:16px; }
  .workspace-header-actions { gap:6px; }
  .workspace-header-actions .provider-pill { display:none; }
  .workspace-header-actions button { padding:8px 10px; font-size:13px; }
  #toggle-workspace-tools, #toggle-workspace-info { display:block; }
  .app-shell .map-stage { grid-column:1; grid-row:2; min-height:0; }
  .app-shell .map-canvas, .app-shell .map-canvas-inner { min-height:0; height:100%; }
  .app-shell .left-panel, .app-shell .right-panel { display:none; position:absolute; z-index:25; top:auto; bottom:30px; left:8px; right:8px; max-height:min(66dvh,620px); padding-bottom:16px; border:1px solid #ccdcd1; border-radius:16px 16px 0 0; box-shadow:0 -8px 36px #16372a24; background:#fbfcfa; }
  .app-shell[data-tools-open="true"] .left-panel, .app-shell[data-info-open="true"] .right-panel { display:block; }
  .app-shell .left-panel nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workspace-drawer-close { display:block; position:sticky; top:0; width:100%; min-height:44px; border:0; border-bottom:1px solid #d9e4dd; background:#fbfcfa; color:#285640; cursor:pointer; z-index:1; }
  .workspace-mobile-start { display:block; position:absolute; left:50%; bottom:36px; transform:translateX(-50%); z-index:5; white-space:nowrap; min-height:48px; padding:12px 22px; color:#fff; background:#245e4b; border:1px solid #ffffff70; border-radius:24px; box-shadow:0 4px 16px #153c3340; cursor:pointer; }
  .app-shell .bottom-panel { grid-row:3; grid-column:1; flex-wrap:nowrap; font-size:10px; }
  .app-shell .bottom-panel > span:first-child { flex-shrink:0; }
  .app-shell .map-controls { top:10px; right:10px; }
}
@media(max-width:540px) {
  .app-shell { grid-template-rows:106px minmax(0,1fr) 30px; }
  .app-shell .topbar { align-content:center; flex-wrap:wrap; row-gap:6px; }
  .app-shell .topbar > .workspace-brand { align-items:center; gap:10px; }
  .workspace-logo { flex-basis:76px; width:76px; height:40px; }
  .workspace-logo img { width:76px; height:76px; top:-16px; }
  .workspace-header-actions { width:100%; justify-content:flex-end; }
  .workspace-header-actions button { flex:1; }
  .app-shell .topbar .eyebrow { font-size:12px; letter-spacing:.06em; }
  .app-shell input:not([type="checkbox"]), .app-shell select, .app-shell textarea { font-size:16px; }
  .workspace-sources { padding:18px; }
}
@media(prefers-reduced-motion:reduce) { .app-shell *, .workspace-sources * { scroll-behavior:auto!important; } }
@media(max-width:540px) {
  .app-shell:has(#open-context-export) { grid-template-rows:154px minmax(0,1fr) 30px; }
  .workspace-header-actions:has(#open-context-export) { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .workspace-header-actions #open-context-export { grid-column:1/-1; }
  .workspace-header-actions:has(#open-context-export) button { white-space:nowrap; }
  .context-export-dialog { padding:18px; }
  .context-export-heading h2 { font-size:20px; }
}

/* 대지 정하기: the place, the surroundings and the site as one step, each with its state. */
.site-step-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: sitestep; }
.site-step-list li { counter-increment: sitestep; display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; color: var(--fi-secondary, #53616a); }
.site-step-list li::before { content: counter(sitestep); grid-row: span 2; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--fi-line-strong, #bac5cc); font-size: 12px; font-weight: 600; }
.site-step-list li strong { color: var(--fi-ink, #1d252b); font-size: 14px; }
.site-step-list li span { font-size: 13px; line-height: 1.45; }
.site-step-list li.is-done::before { content: '✓'; background: var(--fi-tint, #e8f0ec); border-color: var(--fi-accent, #245b4b); color: var(--fi-accent, #245b4b); }
.site-step-list li.is-now, .site-step-list li.is-busy { background: var(--fi-tint, #e8f0ec); }
.site-step-list li.is-now::before, .site-step-list li.is-busy::before { background: var(--fi-accent, #245b4b); border-color: var(--fi-accent, #245b4b); color: #fff; }
.site-step-list li.is-wait { opacity: .7; }
@media (prefers-reduced-motion: no-preference) { .site-step-list li.is-busy::before { animation: site-step-pulse 1.2s ease-in-out infinite; } }
@keyframes site-step-pulse { 50% { opacity: .45; } }
.site-range-disclosure { margin: 8px 0; }
