:root {
  --ink: #13344d;
  --muted: #4d718f;
  --paper: #d6ecff;
  --panel: #f7fcff;
  --line: #aacde8;
  --accent: #1f86cb;
  --accent-2: #2fb7d6;
  --ok: #227f5d;
  --error: #b43b33;
  --running: #0d688d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(1200px 700px at 8% -10%, rgba(255, 255, 255, 0.62) 0%, transparent 56%),
    radial-gradient(1000px 600px at 100% 0%, rgba(164, 224, 255, 0.44) 0%, transparent 46%),
    linear-gradient(160deg, #8ecff7 0%, #74b8e5 44%, #5d9fd2 100%);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

.shell {
  width: min(1480px, 97vw);
  margin: 20px auto 34px;
  display: grid;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(17, 63, 95, 0.18);
}

.hero {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background:
    radial-gradient(130% 180% at 15% -70%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 55%, rgba(255, 255, 255, 0.15) 100%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(224, 246, 255, 0.8) 100%);
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #9cc6e4;
  background: rgba(255, 255, 255, 0.86);
  color: #366e96;
  font-size: 0.9rem;
}

.status-pill[data-kind="ok"] {
  border-color: #8ed2b6;
  color: var(--ok);
  background: #e8faf1;
}

.status-pill[data-kind="error"] {
  border-color: #e6a7a1;
  color: var(--error);
  background: #fbefed;
}

.status-pill[data-kind="running"] {
  border-color: #8cc7e8;
  color: var(--running);
  background: #e7f4fd;
}

.controls {
  padding: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.runtime-panel {
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(239, 249, 255, 0.96) 0%, rgba(225, 242, 255, 0.96) 100%);
}

.runtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.runtime-item {
  border: 1px solid #9dc7e5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
}

.runtime-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.runtime-value {
  margin: 6px 0 0;
  color: #11405f;
  font-size: 0.9rem;
  font-weight: 700;
}

.runtime-hint {
  margin: 10px 2px 0;
  color: #346687;
  font-size: 0.82rem;
}

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

input,
select,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.controls input,
.controls select {
  min-width: 126px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.64;
  cursor: wait;
}

button.ghost {
  color: var(--accent);
  background: #eaf6ff;
  border: 1px solid #9cc8e6;
}

.map-panel {
  padding: 12px;
  background: linear-gradient(180deg, rgba(241, 250, 255, 0.95) 0%, rgba(230, 245, 255, 0.95) 100%);
}

.map-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.map-title-wrap h2 {
  margin: 0;
  font-size: 1.2rem;
}

.map-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.map-controls-wrap {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.map-playback-controls,
.map-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

#mapStepRange {
  width: min(32vw, 330px);
}

#mapStepLabel {
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 138px;
  text-align: right;
}

.map-ticker {
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #9dc7e5;
  border-radius: 10px;
  background: #edf8ff;
  color: #316486;
  font-size: 0.84rem;
}

.map-view-tabs {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-view-tab {
  border: 1px solid #9cc4df;
  border-radius: 999px;
  padding: 7px 12px;
  background: #eff8ff;
  color: #194664;
  font-size: 0.8rem;
  line-height: 1;
}

.map-view-tab:hover {
  filter: brightness(1.03);
}

.map-view-tab.is-active {
  border-color: #3b769d;
  background: #d8eeff;
  color: #103854;
  box-shadow: inset 0 0 0 1px rgba(16, 57, 84, 0.14);
}

.map-stage {
  position: relative;
}

.map-clock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
  border: 1px solid rgba(40, 74, 101, 0.52);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(245, 252, 255, 0.9);
  color: #10324c;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 14px rgba(16, 45, 66, 0.2);
  pointer-events: none;
}

.graph-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 430px;
  border: 1px solid #9ec8e5;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(130% 95% at 0% 0%, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(155deg, #f3fbff 0%, #e6f4ff 56%, #d8ecfb 100%);
}

.network-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.network-edge {
  stroke: rgba(58, 91, 118, 0.44);
  stroke-width: 1.4;
}

.network-edge[data-mode="bridge"] {
  stroke: rgba(120, 92, 58, 0.56);
}

.network-edge[data-mode="boat"] {
  stroke: rgba(56, 115, 163, 0.62);
}

.network-edge[data-rel-group="family"] {
  stroke: rgba(190, 114, 58, 0.65);
}

.network-edge[data-rel-group="service"] {
  stroke: rgba(60, 128, 173, 0.65);
}

.network-edge[data-rel-group="romance"] {
  stroke: rgba(173, 73, 96, 0.68);
}

.network-edge[data-rel-group="social"] {
  stroke: rgba(90, 111, 130, 0.62);
}

.network-node {
  stroke: rgba(16, 43, 64, 0.7);
  stroke-width: 1;
}

.network-node.place-building {
  fill: #d0ad86;
}

.network-node.place-hub {
  fill: #8ab8da;
}

.network-node.place-transport {
  fill: #9ecab9;
}

.network-node.place-other {
  fill: #afba9d;
}

.network-node.char-core {
  stroke-width: 1.3;
}

.network-node.char-external {
  fill: #d4dde5;
  stroke: rgba(54, 75, 96, 0.64);
}

.network-label {
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  fill: #183850;
  paint-order: stroke;
  stroke: rgba(248, 253, 255, 0.95);
  stroke-width: 2.2;
}

.network-label.node-muted {
  opacity: 0.82;
}

.graph-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.graph-chip {
  border: 1px solid rgba(89, 122, 147, 0.44);
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(244, 251, 255, 0.88);
  color: #1f4763;
  font-size: 0.74rem;
  line-height: 1.1;
}

.map-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 430px;
  border: 1px solid #9ec8e5;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: #9fd7fa;
}

.map-viewport.is-dragging {
  cursor: grabbing;
}

.map-camera {
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}

.arena-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  image-rendering: auto;
  background:
    radial-gradient(110% 95% at 18% 0%, rgba(224, 246, 255, 0.55) 0%, rgba(224, 246, 255, 0) 52%),
    radial-gradient(100% 90% at 100% 8%, rgba(170, 223, 252, 0.55) 0%, rgba(170, 223, 252, 0) 48%),
    linear-gradient(165deg, #8bcbf4 0%, #76bce8 48%, #62abdc 100%);
}

.arena-map.world-v3 {
  background:
    radial-gradient(130% 90% at 50% -20%, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #9fdbff 0%, #7fc3f1 48%, #66acd8 100%);
  transition: filter 260ms ease;
}

.arena-map.world-v3::before,
.arena-map.world-v3::after {
  display: none;
}

.arena-map.world-v3[data-phase="dawn"] {
  filter: brightness(1.05) saturate(1.03);
}

.arena-map.world-v3[data-phase="day"] {
  filter: brightness(1) saturate(1);
}

.arena-map.world-v3[data-phase="dusk"] {
  filter: brightness(0.9) saturate(0.96);
}

.arena-map.world-v3[data-phase="night"] {
  filter: brightness(0.74) saturate(0.86);
}

.three-map-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.arena-map::before,
.arena-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.arena-map::before {
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(41, 70, 21, 0.1) 0, rgba(41, 70, 21, 0.1) 2px, transparent 2px, transparent 11px),
    repeating-linear-gradient(90deg, rgba(41, 70, 21, 0.1) 0, rgba(41, 70, 21, 0.1) 2px, transparent 2px, transparent 11px);
}

.arena-map::after {
  z-index: 1;
  transition: background 260ms ease;
}

.arena-map[data-phase="dawn"]::after {
  background: linear-gradient(180deg, rgba(255, 218, 151, 0.18) 0%, rgba(255, 238, 187, 0.08) 45%, transparent 100%);
}

.arena-map[data-phase="day"]::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
}

.arena-map[data-phase="dusk"]::after {
  background: linear-gradient(180deg, rgba(255, 178, 110, 0.18) 0%, rgba(172, 99, 55, 0.1) 48%, rgba(49, 43, 32, 0.08) 100%);
}

.arena-map[data-phase="night"]::after {
  background: linear-gradient(180deg, rgba(26, 39, 74, 0.34) 0%, rgba(18, 25, 45, 0.32) 100%);
}

.map-water-svg,
.map-bridges,
.map-districts,
.map-landmarks,
.map-markers {
  position: absolute;
  inset: 0;
}

.map-water-svg {
  z-index: 2;
}

.map-canal-line {
  fill: none;
  stroke: rgba(46, 120, 170, 0.88);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(10, 58, 89, 0.5));
  stroke-dasharray: 11 7;
  animation: none;
}

.map-bridges {
  z-index: 3;
}

.map-bridge {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #8f6f49 0, #8f6f49 4px, #ab865b 4px, #ab865b 8px);
  border: 1px solid rgba(64, 45, 26, 0.55);
  box-shadow: 0 1px 0 rgba(255, 241, 214, 0.4);
}

.map-districts {
  z-index: 4;
}

.map-district {
  position: absolute;
  border: 2px solid var(--district-trim, #6f5f47);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.02) 36%),
    var(--district-sprite, none),
    repeating-linear-gradient(90deg, var(--district-roof, #9b7f58) 0, var(--district-roof, #9b7f58) 8px, var(--district-base, #d5c0a5) 8px, var(--district-base, #d5c0a5) 16px);
  background-size: 100% 100%, cover, 100% 100%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 217, 0.38),
    0 10px 18px rgba(35, 29, 20, 0.28);
}

.map-district::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 9%;
  height: 14%;
  border: 1px solid rgba(71, 52, 35, 0.3);
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(246, 236, 214, 0.5) 0, rgba(246, 236, 214, 0.5) 5px, rgba(201, 170, 126, 0.4) 5px, rgba(201, 170, 126, 0.4) 10px);
}

.map-district:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.map-district.is-selected {
  box-shadow:
    0 0 0 3px rgba(255, 233, 160, 0.72),
    inset 0 0 0 1px rgba(255, 251, 228, 0.55),
    0 10px 18px rgba(35, 29, 20, 0.3);
}

.district-icon {
  position: absolute;
  right: 7px;
  top: 5px;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(59, 43, 28, 0.8);
}

.district-title {
  position: absolute;
  top: 4px;
  left: 8px;
  max-width: calc(100% - 42px);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5d4b35;
  font-weight: 700;
  background: rgba(255, 246, 229, 0.89);
  border: 1px solid #d8c5aa;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.district-meter {
  position: absolute;
  right: 6px;
  bottom: 5px;
  border: 1px solid rgba(65, 49, 34, 0.45);
  border-radius: 3px;
  padding: 1px 4px;
  background: rgba(255, 250, 236, 0.78);
  color: #5e472f;
  font-size: 0.62rem;
  font-weight: 700;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
}

.map-landmarks {
  z-index: 5;
  pointer-events: none;
}

.map-landmark {
  position: absolute;
  transform: translate(-50%, -50%);
}

.map-landmark::before,
.map-landmark::after {
  content: "";
  position: absolute;
}

.map-landmark.size-s {
  width: 8px;
  height: 8px;
}

.map-landmark.size-m {
  width: 12px;
  height: 12px;
}

.map-landmark.size-l {
  width: 16px;
  height: 16px;
}

.landmark-courtyard-tree::before {
  left: 15%;
  top: 0;
  width: 70%;
  height: 66%;
  border-radius: 3px;
  background: #2f6b36;
}

.landmark-courtyard-tree::after {
  left: 43%;
  top: 62%;
  width: 14%;
  height: 35%;
  background: #6b4c2f;
}

.landmark-market-stall::before {
  inset: 0;
  border: 1px solid rgba(66, 36, 22, 0.55);
  background: repeating-linear-gradient(90deg, #a94f3a 0, #a94f3a 3px, #dfd0b3 3px, #dfd0b3 6px);
}

.landmark-gondola::before {
  left: 5%;
  right: 5%;
  top: 40%;
  height: 45%;
  border-radius: 2px 2px 5px 5px;
  background: #7d5334;
}

.landmark-gondola::after {
  left: 36%;
  top: 8%;
  width: 26%;
  height: 36%;
  background: #e9e2cb;
}

.landmark-campanile::before {
  left: 35%;
  top: 2%;
  width: 30%;
  height: 84%;
  background: #c9b28f;
  border: 1px solid rgba(87, 67, 43, 0.55);
}

.landmark-campanile::after {
  left: 26%;
  top: 0;
  width: 48%;
  height: 20%;
  background: #8f6e43;
}

.landmark-statue::before {
  left: 35%;
  top: 8%;
  width: 30%;
  height: 60%;
  background: #b6b7b1;
}

.landmark-statue::after {
  left: 12%;
  bottom: 0;
  width: 76%;
  height: 20%;
  background: #8b7557;
}

.map-markers {
  z-index: 6;
  pointer-events: none;
}

.actor-token {
  position: absolute;
  width: 30px;
  height: 34px;
  transform: translate(-50%, -58%);
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  appearance: none;
  pointer-events: auto;
  transition: left 0.45s linear, top 0.45s linear;
  animation: sprite-hop 1.2s steps(2, end) infinite;
}

.actor-token.is-traveling {
  transition: none;
}

.actor-token.is-three-overlay {
  width: 24px;
  height: 24px;
  transform: translate(-50%, -96%);
  animation: none;
  transition: left 90ms linear, top 90ms linear;
}

.actor-token.is-three-overlay.is-traveling {
  transition: none;
}

.actor-token:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.actor-token.is-selected .sprite-body {
  box-shadow:
    0 0 0 2px rgba(255, 244, 148, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sprite-shadow {
  position: absolute;
  left: 8px;
  bottom: 1px;
  width: 14px;
  height: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.sprite-head {
  position: absolute;
  left: 10px;
  top: 5px;
  width: 10px;
  height: 10px;
  border: 2px solid #3b2b1f;
  border-bottom-width: 1px;
  border-radius: 2px;
  background: linear-gradient(0deg, rgba(227, 183, 140, 0.7), rgba(227, 183, 140, 0.7)), #f2cfab;
}

.sprite-body {
  position: absolute;
  left: 7px;
  top: 14px;
  width: 16px;
  height: 15px;
  border: 2px solid #2f2a25;
  border-radius: 2px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)), var(--token-color, #875);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sprite-tag {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 18px;
  text-align: center;
  border: 1px solid rgba(40, 36, 29, 0.72);
  border-radius: 3px;
  padding: 0 3px;
  line-height: 1.2;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: #32291f;
  background: rgba(255, 247, 227, 0.94);
}

.actor-emoji-badge {
  position: absolute;
  top: -12px;
  right: -8px;
  z-index: 5;
  min-width: 18px;
  min-height: 18px;
  border: 1px solid rgba(20, 34, 48, 0.72);
  border-radius: 999px;
  padding: 0 3px;
  background: rgba(255, 253, 239, 0.96);
  box-shadow: 0 2px 6px rgba(6, 18, 31, 0.28);
  color: #1f3548;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  font-family: "Avenir Next", "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  pointer-events: auto;
}

.actor-token.is-three-overlay .sprite-shadow,
.actor-token.is-three-overlay .sprite-head,
.actor-token.is-three-overlay .sprite-body,
.actor-token.is-three-overlay .sprite-tag {
  display: none;
}

.actor-token.is-three-overlay .actor-emoji-badge {
  top: 0;
  right: 0;
  min-width: 22px;
  min-height: 22px;
  padding: 1px 4px;
  font-size: 14px;
  line-height: 18px;
}

.arena-map.world-v2 {
  image-rendering: auto;
  background:
    radial-gradient(130% 90% at 20% 0%, rgba(211, 238, 171, 0.44) 0%, rgba(211, 238, 171, 0) 56%),
    radial-gradient(120% 80% at 100% 0%, rgba(157, 206, 231, 0.28) 0%, rgba(157, 206, 231, 0) 52%),
    linear-gradient(170deg, #9bc868 0%, #82b056 44%, #6f9850 100%);
}

.arena-map.world-v2::before {
  z-index: 0;
  background:
    linear-gradient(45deg, rgba(52, 92, 33, 0.08) 0, rgba(52, 92, 33, 0.08) 1px, transparent 1px, transparent 12px),
    linear-gradient(-45deg, rgba(52, 92, 33, 0.08) 0, rgba(52, 92, 33, 0.08) 1px, transparent 1px, transparent 12px);
}

.map-iso-svg {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
}

.iso-layer {
  pointer-events: none;
}

.iso-layer .map-feature {
  pointer-events: all;
}

.map-district-poly {
  fill: rgba(146, 189, 102, 0.35);
  stroke: rgba(58, 85, 39, 0.68);
  stroke-width: 0.26;
  transition: fill 120ms ease, stroke 120ms ease;
}

.map-district-poly:hover {
  fill: rgba(170, 208, 125, 0.47);
}

.map-district-poly,
.map-building-top,
.map-node,
.district-label,
.building-label {
  cursor: pointer;
}

.district-label {
  fill: rgba(54, 42, 31, 0.88);
  font-size: 1.58px;
  text-anchor: middle;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  paint-order: stroke;
  stroke: rgba(249, 241, 224, 0.92);
  stroke-width: 0.34;
}

.map-street-line-v2 {
  fill: none;
  stroke: rgba(170, 147, 107, 0.76);
  stroke-width: 0.88;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-canal-line-v2 {
  stroke: rgba(42, 112, 166, 0.89);
  stroke-width: 1.22;
  stroke-dasharray: 4.6 3.8;
  animation: none;
}

.bridge-node-v2 {
  fill: #c8a47b;
  stroke: rgba(76, 57, 34, 0.72);
  stroke-width: 0.22;
}

.map-building-side {
  stroke: rgba(64, 50, 37, 0.54);
  stroke-width: 0.21;
}

.map-building-side-a {
  fill: rgba(156, 121, 83, 0.86);
}

.map-building-side-b {
  fill: rgba(132, 98, 67, 0.84);
}

.map-building-top {
  fill: rgba(206, 174, 132, 0.95);
  stroke: rgba(76, 57, 38, 0.72);
  stroke-width: 0.24;
  transition: fill 120ms ease;
}

.map-building-top:hover {
  fill: rgba(226, 194, 151, 0.96);
}

.building-label {
  fill: rgba(56, 43, 30, 0.92);
  font-size: 1.42px;
  text-anchor: middle;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  paint-order: stroke;
  stroke: rgba(255, 246, 228, 0.93);
  stroke-width: 0.32;
}

.map-node {
  fill: rgba(62, 52, 43, 0.85);
  stroke: rgba(255, 244, 219, 0.74);
  stroke-width: 0.12;
  opacity: 0.5;
}

.map-node.node-room {
  opacity: 0.26;
}

.map-node.node-piazza,
.map-node.node-street_hub,
.map-node.node-bridge,
.map-node.node-pier {
  opacity: 0.82;
}

.map-feature.is-selected {
  filter: drop-shadow(0 0 1.4px rgba(255, 246, 174, 0.92));
}

.map-node.is-selected {
  opacity: 1;
  fill: rgba(246, 227, 146, 0.95);
  stroke: rgba(84, 64, 34, 0.84);
}

@keyframes sprite-hop {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -2px;
  }
}

@keyframes canal-flow {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -160;
  }
}

.map-legend {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8c3a4;
  border-radius: 9px;
  background: #fff6e7;
  padding: 7px 9px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  appearance: none;
}

.legend-item:hover {
  border-color: #b1825d;
}

.legend-item[data-active="true"] {
  border-color: #926040;
  box-shadow: inset 0 0 0 1px rgba(146, 96, 64, 0.25);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.legend-text {
  font-size: 0.82rem;
  color: #5c4b39;
  line-height: 1.2;
}

.map-legend-empty {
  border: 1px dashed #ceb99c;
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.locale-card,
.actor-card {
  position: absolute;
  top: 10px;
  width: min(360px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  overflow: auto;
  z-index: 9;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 14px 28px rgba(12, 9, 7, 0.45);
}

.locale-card {
  left: 10px;
  border: 1px solid #4d5c42;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(241, 255, 236, 0.32) 0%, transparent 55%),
    linear-gradient(165deg, rgba(34, 45, 31, 0.92) 0%, rgba(27, 38, 24, 0.95) 100%);
  color: #eaf4da;
}

.actor-card {
  right: 10px;
  border: 1px solid #4f402f;
  background:
    radial-gradient(120% 70% at 30% 0%, rgba(255, 251, 240, 0.36) 0%, transparent 55%),
    linear-gradient(165deg, rgba(55, 39, 29, 0.92) 0%, rgba(46, 33, 24, 0.95) 100%);
  color: #f7ead4;
}

.locale-card-close,
.actor-card-close {
  float: right;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 4px 9px;
}

.locale-card-close {
  border: 1px solid #748b66;
  background: #22331f;
  color: #e2f0d0;
}

.actor-card-close {
  border: 1px solid #7f654d;
  background: #2b2018;
  color: #f5dfba;
}

.locale-card-head h3,
.actor-card-head h3 {
  margin: 8px 0 4px;
  font-size: 1rem;
}

.locale-card-head p,
.actor-card-head p {
  margin: 0;
}

.locale-desc {
  margin: 8px 0;
  font-size: 0.84rem;
  line-height: 1.32;
  color: #d8e6c8;
}

.locale-portrait {
  margin-top: 4px;
}

.locale-frame {
  border: 1px solid #8eac77;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(160deg, #274025 0%, #3a5a32 60%, #9bbc78 100%);
  box-shadow: inset 0 0 0 1px rgba(230, 247, 210, 0.2);
}

.locale-frame.fallback {
  background: linear-gradient(160deg, #283f47 0%, #45626e 60%, #a7c4cf 100%);
}

.locale-image {
  position: relative;
  height: 176px;
  border-radius: 6px;
  margin: 10px;
  border: 2px solid rgba(23, 37, 22, 0.6);
  overflow: hidden;
  background: #1f3321;
}

.locale-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.locale-fallback-art {
  display: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(144, 190, 121, 0.85) 0%, rgba(94, 141, 81, 0.9) 100%),
    repeating-linear-gradient(45deg, rgba(255, 244, 219, 0.14) 0 8px, rgba(27, 49, 31, 0.18) 8px 16px);
}

.locale-frame.fallback .locale-fallback-art {
  display: block;
}

.locale-card h4 {
  margin: 10px 0 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cde3b8;
}

.locale-list,
.locale-biblio {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 6px;
  font-size: 0.79rem;
}

.locale-biblio li {
  border: 1px solid rgba(129, 151, 112, 0.45);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(25, 35, 22, 0.5);
  list-style: none;
}

.locale-biblio a {
  color: #bad8ff;
}

.biblio-top {
  color: #e3f5ce;
  font-size: 0.74rem;
  margin-bottom: 3px;
}

.biblio-excerpt {
  color: #d7e8c6;
  font-size: 0.76rem;
  line-height: 1.35;
}

.actor-card .actor-arena {
  margin-top: 3px;
  font-size: 0.82rem;
  color: #e0c8a2;
}

.actor-portrait {
  margin-top: 4px;
}

.portrait-frame {
  border: 1px solid #9f7957;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(160deg, #4a2f29 0%, #71503b 60%, #c9a57b 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 228, 183, 0.25);
}

.portrait-frame.fallback {
  background: linear-gradient(160deg, #3f2f49 0%, #69517a 60%, #ceb89a 100%);
}

.portrait-crest {
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 8px;
  color: rgba(255, 239, 213, 0.92);
}

.portrait-image {
  position: relative;
  height: 182px;
  margin: 0 12px;
  border: 2px solid rgba(47, 28, 19, 0.65);
  border-radius: 4px;
  overflow: hidden;
  background: #39281f;
}

.portrait-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: #2f2219;
  image-rendering: auto;
}

.portrait-image .portrait-bust {
  display: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 25%, rgba(242, 204, 166, 0.95) 0 12%, transparent 12%),
    radial-gradient(circle at 50% 78%, rgba(53, 34, 27, 0.88) 0 32%, transparent 32%),
    linear-gradient(180deg, rgba(250, 213, 171, 0.82) 0 35%, rgba(72, 46, 35, 0.86) 35% 100%);
}

.portrait-frame.fallback .portrait-image img {
  display: none;
}

.portrait-frame.fallback .portrait-image .portrait-bust {
  display: block;
}

.portrait-plaque {
  margin: 8px 10px 4px;
  border: 1px solid rgba(209, 168, 121, 0.6);
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 0.75rem;
  line-height: 1.25;
  color: #f6e4c5;
  background: rgba(35, 23, 16, 0.46);
}

.portrait-clue {
  margin: 0 10px 10px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #d8c4a2;
}

.actor-stats {
  margin: 10px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 4px;
  column-gap: 10px;
  font-size: 0.78rem;
}

.actor-stats dt {
  color: #c9b290;
}

.actor-stats dd {
  margin: 0;
  text-align: right;
}

.actor-model {
  display: grid;
  gap: 2px;
  margin: 8px 0;
  border: 1px solid rgba(177, 137, 96, 0.5);
  border-radius: 6px;
  background: rgba(32, 22, 17, 0.5);
  padding: 7px 9px;
}

.actor-model .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c8aa7f;
}

.actor-model .model-driver-preview {
  font-size: 0.78rem;
  color: #ead6b5;
}

.model-driver-preview {
  display: block;
}

.model-driver-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.model-driver-btn {
  border: 1px solid #9d7a58;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  line-height: 1;
  background: #f7ead3;
  color: #3a271a;
}

.model-driver-btn:hover {
  filter: brightness(1.04);
}

.model-driver-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.talk-label {
  display: block;
  font-size: 0.84rem;
  color: #ddc39f;
  margin: 6px 0;
}

#talkInput {
  width: 100%;
  border: 1px solid #7f664c;
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
  color: #f8ebd0;
  background: rgba(38, 27, 20, 0.68);
}

#talkInput::placeholder {
  color: #b79a74;
}

.talk-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.dialogue-history-btn {
  border: 1px solid #9d7a58;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  line-height: 1;
  background: #f7ead3;
  color: #3a271a;
}

.dialogue-history-btn:hover {
  filter: brightness(1.04);
}

.dialogue-history-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.talk-thread {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.talk-empty {
  border: 1px dashed rgba(192, 157, 117, 0.58);
  border-radius: 10px;
  padding: 10px;
  color: #d3b993;
  font-size: 0.88rem;
}

.talk-bubble {
  border: 1px solid #dfcfb8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff8ea;
  color: #1a3348;
}

.talk-bubble.user {
  background: #f1f9ff;
  border-color: #bad5e7;
  color: #122f45;
}

.talk-bubble.actor {
  background: #fff4e2;
  border-color: #cdb18a;
  color: #3e2b1d;
}

.talk-bubble.system {
  background: #faecea;
  border-color: #e0b1ab;
  color: #4a2f2b;
}

.talk-head {
  font-size: 0.78rem;
  color: #4a6074;
  margin-bottom: 4px;
}

.talk-text {
  line-height: 1.4;
  color: inherit;
}

.talk-meta {
  margin-top: 5px;
  font-size: 0.75rem;
  color: #6d655b;
}

.model-driver-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 22, 35, 0.72);
}

.model-driver-modal[hidden] {
  display: none;
}

.activity-modal {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 20, 31, 0.7);
}

.activity-modal[hidden] {
  display: none;
}

.activity-dialog {
  width: min(760px, 94vw);
  max-height: min(78vh, 720px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border: 1px solid #8cb6d8;
  border-radius: 12px;
  background:
    radial-gradient(110% 75% at 14% -22%, rgba(255, 255, 255, 0.7) 0%, transparent 58%),
    linear-gradient(170deg, #edf7ff 0%, #e1f1ff 100%);
  box-shadow: 0 24px 50px rgba(10, 24, 37, 0.48);
  overflow: hidden;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #b4d4ec;
}

.activity-head h3 {
  margin: 0;
  color: #183248;
  font-size: 1rem;
}

.activity-head button {
  border: 1px solid #8daec8;
  border-radius: 8px;
  padding: 6px 10px;
  background: #f4fbff;
  color: #1e425d;
  cursor: pointer;
}

.activity-meta {
  margin: 0;
  padding: 8px 14px;
  color: #355673;
  font-size: 0.83rem;
  border-bottom: 1px solid #c5dff2;
}

.activity-summary {
  margin: 0;
  padding: 10px 14px;
  color: #1a3b55;
  font-size: 0.88rem;
  border-bottom: 1px solid #c5dff2;
}

.activity-scroll {
  overflow: auto;
  padding: 12px 14px 14px;
}

#actorActivityBody {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfd9ec;
  border-radius: 10px;
  background: #fbfeff;
  color: #14344d;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

.dialogue-dialog {
  width: min(980px, 96vw);
  max-height: min(82vh, 760px);
}

#actorDialogueBody {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfd9ec;
  border-radius: 10px;
  background: #fbfeff;
  color: #14344d;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

#actorLogBody {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfd9ec;
  border-radius: 10px;
  background: #fbfeff;
  color: #14344d;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

.model-driver-dialog {
  width: min(940px, 94vw);
  max-height: min(84vh, 760px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid #8cb6d8;
  border-radius: 12px;
  background:
    radial-gradient(110% 75% at 14% -22%, rgba(255, 255, 255, 0.7) 0%, transparent 58%),
    linear-gradient(170deg, #edf7ff 0%, #e1f1ff 100%);
  box-shadow: 0 24px 50px rgba(10, 24, 37, 0.48);
  overflow: hidden;
}

.model-driver-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #b4d4ec;
}

.model-driver-head h3 {
  margin: 0;
  color: #183248;
  font-size: 1rem;
}

.model-driver-head button {
  border: 1px solid #8daec8;
  border-radius: 8px;
  padding: 6px 10px;
  background: #f4fbff;
  color: #1e425d;
  cursor: pointer;
}

.model-driver-meta {
  margin: 0;
  padding: 8px 14px;
  color: #355673;
  font-size: 0.83rem;
  border-bottom: 1px solid #c5dff2;
}

.model-driver-scroll {
  overflow: auto;
  padding: 12px 14px 14px;
}

#modelDriverText {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfd9ec;
  border-radius: 10px;
  background: #fbfeff;
  color: #14344d;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
}

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

.runs-panel,
.detail-panel {
  padding: 14px;
}

.accordion-panel {
  padding: 0;
  overflow: hidden;
}

.accordion-head {
  margin: 0;
  padding: 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.accordion-head::-webkit-details-marker {
  display: none;
}

.accordion-head::after {
  content: "+";
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #ceb089;
  background: #fff3df;
  color: #7f4e2f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}

.accordion-panel[open] .accordion-head::after {
  content: "-";
}

.accordion-body {
  padding: 0 14px 14px;
}

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

.panel-head h2,
.detail-head h2 {
  margin: 0;
}

.count {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4e5d2;
  border: 1px solid #d3b995;
}

.runs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
}

.run-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff9ee;
}

.run-item[data-active="true"] {
  border-color: #b87a53;
  box-shadow: 0 0 0 2px rgba(184, 122, 83, 0.2);
}

.run-select {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.run-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.run-top strong {
  font-size: 0.95rem;
}

.scenario {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.run-meta,
.run-score {
  font-size: 0.82rem;
  color: var(--muted);
}

.run-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.detail-head {
  margin-bottom: 12px;
}

.detail-meta-head {
  margin-bottom: 12px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fffdf8;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.meta-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 8px;
  column-gap: 10px;
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
  word-break: break-word;
}

.scores {
  display: grid;
  gap: 8px;
}

.score-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2d0bb;
  border-radius: 9px;
  background: #fff7ea;
  padding: 7px 9px;
}

.score-key {
  color: var(--muted);
  font-size: 0.83rem;
}

.score-val {
  font-weight: 700;
}

.artifacts {
  display: grid;
  gap: 8px;
}

.artifact-link {
  display: block;
  padding: 8px 10px;
  border: 1px solid #d9c3a4;
  border-radius: 9px;
  background: #fff3de;
  color: #7d361f;
  text-decoration: none;
}

.artifact-link:hover {
  border-color: #bf8057;
}

.artifact-link.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.timeline-card {
  margin-top: 12px;
}

.timeline-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.timeline-toolbar-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.timeline-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-wrap {
  overflow: auto;
  max-height: 360px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

thead th {
  position: sticky;
  top: 0;
  background: #fff6e9;
}

th,
td {
  padding: 8px;
  border-bottom: 1px solid #ecdcc7;
  text-align: left;
  vertical-align: top;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Iosevka Web", "SFMono-Regular", Menlo, monospace;
  font-size: 0.82rem;
  background: #fefaf1;
  border: 1px solid #ead8bd;
  border-radius: 10px;
  padding: 10px;
  max-height: 260px;
  overflow: auto;
}

@media (max-width: 1180px) {
  .map-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .runs-list {
    max-height: 34vh;
  }

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

@media (max-width: 980px) {
  .map-head {
    flex-direction: column;
    align-items: stretch;
  }

  .map-controls-wrap {
    justify-items: start;
  }

  #mapStepRange {
    width: min(64vw, 330px);
  }

  #mapStepLabel {
    min-width: 0;
    text-align: left;
  }

  .locale-card,
  .actor-card {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: 8px;
  }

  .map-viewport {
    min-height: 340px;
  }

  .graph-viewport {
    min-height: 340px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw, 100%);
    margin: 0;
    padding: 10px;
  }

  .hero {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    padding: 12px;
  }

  .controls label,
  .controls button {
    width: calc(50% - 5px);
  }

  .map-playback-controls,
  .map-zoom-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  #mapStepRange {
    width: 100%;
  }

  .map-legend {
    grid-template-columns: 1fr;
  }

  .map-viewport {
    min-height: 270px;
  }

  .graph-viewport {
    min-height: 270px;
  }

  .map-view-tab {
    flex: 1 1 calc(33% - 8px);
  }

  .actor-stats {
    grid-template-columns: 1fr;
  }

  .actor-stats dd {
    text-align: left;
  }
}
