:root {
  --bg: #0b0f14;
  --panel: #121820;
  --line: #232c38;
  --fg: #dce6f0;
  --dim: #8b9aab;
  --accent: #7cc5ff;
  --blue: #5ec8e8;
  --red: #ff7b72;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", ui-sans-serif, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; letter-spacing: .5px; font-size: 15px; }
.brand span { color: var(--accent); }
.spacer { flex: 1; }

.pill { padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.pill.ok { color: #7ee787; border-color: #1f4426; background: #101b13; }
.pill.dead { color: #ffa657; border-color: #4a3520; background: #1c1409; }

.meta { display: flex; gap: 14px; color: var(--dim); font-size: 12px; }
.meta b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }

.toggles { display: flex; gap: 12px; color: var(--dim); font-size: 12px; }
.toggles label { display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.toggles input { accent-color: var(--accent); }

#btnCampFlip {
  flex: none;
  margin-left: 4px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 2px solid #4fb8e8;
  background: linear-gradient(180deg, #1e6a8c 0%, #123a50 100%);
  color: #e8f7ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .4px;
  line-height: 1.25;
  white-space: pre-line;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(79,184,232,.35), 0 6px 18px rgba(0,0,0,.35);
}
#btnCampFlip:hover { filter: brightness(1.12); }
#btnCampFlip.red {
  border-color: #f0665f;
  background: linear-gradient(180deg, #9a2f2c 0%, #5a1614 100%);
  color: #ffe8e6;
  box-shadow: 0 0 0 3px rgba(240,102,95,.4), 0 6px 18px rgba(0,0,0,.35);
}

main {
  flex: 1;
  min-height: 0;
}

.map-wrap { display: flex; flex-direction: column; height: 100%; min-width: 0; padding: 12px; }
.map-slot { position: relative; flex: 1; min-height: 0; }
.map-stage { position: absolute; }
#map { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
