:root {
  color-scheme: light;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  background: #f5f2ec;
  color: #1d1b16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  min-height: 100vh;
  padding: 32px;
  background: radial-gradient(circle at 20% 10%, #fef7e5, transparent 55%),
    radial-gradient(circle at 80% 0%, #f0efe9, transparent 45%),
    linear-gradient(180deg, #f6f1e7 0%, #ece3d1 100%);
}

.header h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  letter-spacing: 0.5px;
}

.controls {
  margin: 24px 0;
  padding: 16px;
  background: #fff7e6;
  border: 1px solid #d8c8a2;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(60, 46, 14, 0.08);
}

.row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.row:last-child {
  margin-bottom: 0;
}

.stats {
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: #fff4dd;
  border: 1px solid #d8c8a2;
  border-radius: 10px;
  min-width: 100px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6b5a3a;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
}

.action-buttons {
  gap: 10px;
}

.action-buttons button {
  background: #e9dcc5;
  color: #3a2c1a;
  border: 1px solid #c8b38a;
}

.action-buttons button:disabled {
  background: #efe8db;
  color: #9b8b6b;
  cursor: not-allowed;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

input,
select {
  padding: 8px 10px;
  border: 1px solid #cbb588;
  border-radius: 8px;
  background: #fffdf8;
}

button {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #3a2c1a;
  color: #fef7e5;
  cursor: pointer;
}

button:hover {
  background: #2a2014;
}

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

.map-panel {
  margin: 8px 0 24px 0;
  padding: 16px;
  background: #fffaf2;
  border: 1px solid #e3d3ad;
  border-radius: 12px;
}

.move-number {
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
  color: #7b6a49;
}

.map-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e3d3ad;
  border-radius: 10px;
  background: #fef9ef;
}

#map {
  width: 100%;
  height: 420px;
}

.map-land {
  fill: rgba(214, 199, 168, 0.35);
  stroke: rgba(140, 117, 78, 0.4);
  stroke-width: 2;
}

.edge {
  stroke: #c8b38a;
  stroke-width: 2;
  stroke-linecap: round;
}

.city {
  fill: #f6e7c2;
  stroke: #846a3b;
  stroke-width: 2;
}

.city.bonus {
  fill: #f0d27a;
}

.city.closed {
  fill: #d5cfc3;
  stroke: #9f9688;
}

.city.control-p1 {
  fill: #e64b3c;
  stroke: #7a1f16;
}

.city.control-p2 {
  fill: #3b6ef5;
  stroke: #1a3b88;
}

.city-label {
  font-size: 10px;
  fill: #3a2c1a;
}

.player {
  stroke: #1d1b16;
  stroke-width: 2;
}

.player.p1 {
  fill: #e64b3c;
}

.player.p2 {
  fill: #3b6ef5;
}

.ghost {
  fill: rgba(58, 44, 26, 0.35);
}

.player.last-known {
  opacity: 0.5;
}

.pickup {
  font-size: 11px;
  font-weight: 700;
  fill: #1d1b16;
}

.panel {
  padding: 16px;
  background: #fffaf2;
  border: 1px solid #e3d3ad;
  border-radius: 12px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-size: 12px;
}

@media (max-width: 640px) {
  .page {
    padding: 20px;
  }
}
