* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0d1117;
  color: #e6edf3;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

.app {
  display: flex;
  height: 100%;
}

.stage {
  flex: 1;
  min-width: 0;
  padding: 12px;
}

#world {
  width: 100%;
  height: 100%;
  display: block;
  background: #11161d;
  border: 1px solid #232c38;
  border-radius: 10px;
}

.panel {
  width: 280px;
  flex: none;
  padding: 16px;
  border-inline-start: 1px solid #232c38;
  background: #0f141b;
  overflow-y: auto;
}

.panel h1 {
  margin: 0 0 12px;
  font-size: 18px;
}

.panel h2 {
  margin: 20px 0 8px;
  font-size: 14px;
  color: #8b98a5;
  font-weight: 600;
}

.controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.controls button {
  flex: 1;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: #e6edf3;
  background: #1c2531;
  border: 1px solid #2d3948;
  border-radius: 6px;
  cursor: pointer;
}

.controls button:hover { background: #243040; }

.stats {
  display: grid;
  gap: 6px;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 10px;
  background: #131a23;
  border: 1px solid #212a36;
  border-radius: 6px;
  font-size: 13px;
}

.stat .label { color: #8b98a5; }
.stat .value { font-variant-numeric: tabular-nums; font-weight: 600; }

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.log li {
  padding: 3px 0;
  border-bottom: 1px solid #1a222c;
  color: #b6c2cf;
}

.log li .t { color: #6e7d8d; margin-inline-end: 6px; }
.log li.born .e { color: #57d38c; }
.log li.died .e { color: #f0736a; }

@media (max-width: 720px) {
  .app { flex-direction: column; }
  .stage { height: 55vh; }
  .panel { width: auto; border-inline-start: 0; border-top: 1px solid #232c38; }
}
