:root {
  color-scheme: light dark;
  font:
    15px Arial,
    Helvetica,
    sans-serif;
  color: #23313c;
  background: #f5f7f8;
  --surface: #f5f7f8;
  --ink: #23313c;
  --line: #9cabb8;
  --accent: #976327;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 14px;
}
main {
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}
h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
p {
  margin: 0;
}
.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 390px;
  display: grid;
  align-items: center;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
canvas:active {
  cursor: grabbing;
}
.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
select {
  appearance: none;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding-block: 8px;
  padding-inline: 12px 42px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
label:has(> select) {
  position: relative;
}
label:has(> select)::after {
  position: absolute;
  inset-inline-end: 14px;
  bottom: 18px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  content: '';
  transform: rotate(45deg);
  pointer-events: none;
}
label:has(> select:disabled)::after {
  opacity: 0.5;
}
.detail {
  font-size: 14px;
  line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
  :root {
    background: #18232c;
    color: #e7edf1;
    --surface: #18232c;
    --ink: #e7edf1;
    --line: #81929f;
    --accent: #d8ac6f;
  }
}
@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  h1 {
    font-size: 16px;
  }
  .stage {
    height: 280px;
  }
  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .controls label:last-child {
    grid-column: 1 / -1;
  }
}

/* Match the MapLibre zoom controls used by the project map. */
.model-zoom {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 2px rgb(0 0 0 / 10%);
  color: #333;
  color-scheme: light;
  cursor: auto;
}
.model-zoom button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font:
    14px Arial,
    Helvetica,
    sans-serif;
  cursor: pointer;
}
.model-zoom button + button {
  border-top: 1px solid #ddd;
}
.model-zoom button:hover:not(:disabled) {
  background: rgb(0 0 0 / 5%);
}
.model-zoom button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgb(0 150 255 / 50%);
}
.model-zoom button:disabled {
  cursor: default;
}
.model-zoom button:disabled svg {
  opacity: 0.25;
}
.model-zoom svg {
  display: block;
}

canvas.has-floor-hover {
  cursor: pointer;
}
.floor-hover-label {
  position: absolute;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  border: 1px solid var(--line, #8998a5);
  border-radius: 8px;
  background: var(--surface, var(--background));
  color: var(--ink, var(--foreground));
  box-shadow: 0 4px 16px rgb(0 0 0 / 18%);
  font:
    14px/1.4 Arial,
    Helvetica,
    sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
.floor-hover-label[hidden] {
  display: none;
}
