* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #0b0f12;
  color: #e8ede4;
  font: 14px/1.45 system-ui, sans-serif;
}

.app {
  display: grid;
  grid-template-columns: 1fr 280px;
  height: 100vh;
}

.viewport {
  position: relative;
  min-width: 0;
}

#map {
  position: absolute;
  inset: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);

  /* Map theme: PeirceMap reads these --pm-* variables off its container.
     Change them (or toggle a class that changes them) and call
     map.refreshTheme() for runtime restyling. */
  --pm-ocean: #0c2033;
  --pm-land: #2a302a;
  --pm-ice: #46606e;
  --pm-wood: #22402c;
  --pm-label: #edf1e7;
  --pm-font: system-ui, sans-serif;
  --pm-label-scale: 1;
}

.panel {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #10151a;
}

.panel h1 {
  margin: 0 0 2px;
  font-size: 20px;
}

.panel p {
  margin: 0;
  color: #9aa79b;
  font-size: 12px;
}

.panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #b7c2b6;
}

.panel fieldset {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel legend {
  font-size: 11px;
  color: #9aa79b;
  padding: 0 4px;
}

.row {
  display: flex;
  gap: 6px;
}

.row input {
  min-width: 0;
  flex: 1;
}

input[type="number"] {
  background: #0b1014;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e8ede4;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 12px;
}

button {
  background: #1a232b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e8ede4;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

button:hover {
  background: #24303a;
}

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

.hint {
  font-size: 11px;
}

.readout {
  margin-top: auto;
  white-space: pre;
  font: 11px/1.7 ui-monospace, monospace;
  color: #8fa091;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}
