:root {
  --bg: #0f181e;
  --panel: #1a262e;
  --panel-2: #22323c;
  --line: #31444f;
  --text: #e4ece9;
  --muted: #8ea3a8;
  --accent: #f2c14e;
  --r: #6cc35a;
  --c: #5b9ae0;
  --i: #e0b53e;
  --bad: #e85b4d;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; min-height: 0; background: var(--bg); color: var(--text); overflow: hidden; }
button, select, input { font: inherit; color: inherit; }

#app {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: 'top top' 'tools view' 'status status';
  height: 100%;
}

/* ---------- top bar ---------- */
#topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.brand { font-size: 17px; letter-spacing: 0.02em; color: var(--muted); }
.brand b { color: var(--accent); }
.stat { display: flex; flex-direction: column; line-height: 1.1; min-width: 64px; }
.stat.city input {
  width: 13ch; padding: 0; margin: 0; border: 0; border-bottom: 1px dashed transparent; border-radius: 0;
  background: none; color: var(--text); font: inherit; font-weight: 600; font-size: 15px;
}
.stat.city input:hover { border-bottom-color: var(--muted); }
.stat.city input:focus { outline: none; border-bottom-color: var(--accent); }
.load-menu { min-width: 280px; max-height: 60vh; overflow-y: auto; }
.load-row { display: flex; gap: 4px; align-items: stretch; }
.load-open {
  flex: 1; display: grid; text-align: left; gap: 2px; padding: 6px 8px; border-radius: 6px;
  background: none; border: 1px solid transparent; color: inherit; cursor: pointer; font: inherit;
}
.load-open:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.load-open small { color: var(--muted); font-size: 11px; }
.load-del { min-width: 34px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); cursor: pointer; font: inherit; }
.load-del:hover { color: var(--bad); border-color: var(--line); }
.load-more { min-width: 30px; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); cursor: pointer; font: inherit; }
.load-more:hover:not(:disabled) { color: var(--text); border-color: var(--line); }
.load-more:disabled { opacity: 0.3; cursor: default; }
.load-note { color: var(--muted); font-size: 12px; padding: 4px 8px 8px; white-space: normal; max-width: 300px; }
.load-versions { display: grid; gap: 1px; margin: 0 0 6px 14px; padding-left: 6px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; }
.load-version { text-align: left; padding: 4px 6px; border-radius: 5px; background: none; border: 1px solid transparent; cursor: pointer; font-size: 12px; color: var(--text); }
.load-version:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.menu button.account { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.menu button.account.signed-in { border-color: var(--r); color: var(--r); }
.menu button[hidden] { display: none; }
.menu button:disabled { opacity: 0.6; cursor: progress; }

/* ---------- account dialog ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5, 10, 14, 0.6); }
.modal {
  width: min(360px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 14px 16px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal h2 { margin: 0; font-size: 16px; }
.modal h3 { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.modal-x { background: none; border: 0; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.modal-x:hover { color: var(--text); }
.modal-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.modal-tabs button { flex: 1; padding: 5px; font-size: 13px; border-radius: 6px; background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.modal-tabs button.on { border-color: var(--accent); color: var(--accent); cursor: default; }
.modal-form { display: grid; gap: 9px; }
.modal-form label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.modal-form input {
  padding: 7px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14px;
}
.modal-form input:focus { outline: none; border-color: var(--accent); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions button { padding: 6px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #1a1a1a; font-weight: 600; cursor: pointer; }
.modal-actions button.ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 400; margin-right: auto; }
.modal-actions button:disabled { opacity: 0.6; cursor: progress; }
.form-error { min-height: 1em; font-size: 12px; color: var(--bad); }
.modal-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.stat .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }
#funds.low { color: var(--bad); }

.rci { display: flex; gap: 3px; align-items: stretch; height: 34px; padding: 0 2px; }
.rci-bar { position: relative; width: 14px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.rci-bar::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.rci-bar i { position: absolute; left: 2px; right: 2px; border-radius: 2px; transition: all 0.25s; }
.rci-bar.r i { background: var(--r); }
.rci-bar.c i { background: var(--c); }
.rci-bar.i i { background: var(--i); }
.rci-bar span { position: absolute; bottom: -1px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 700; color: var(--text); opacity: 0.7; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 8px; font-size: 11px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #1a1408; }

.speed { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.speed input { width: 90px; accent-color: var(--accent); }
#speedv { min-width: 58px; color: var(--text); font-variant-numeric: tabular-nums; }
#btn-pause {
  width: 30px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 11px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}
#btn-pause.paused { background: var(--accent); border-color: var(--accent); color: #1a1408; }
button.toggle {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 9px; cursor: pointer; font-size: 12px;
}
button.toggle.on { border-color: var(--accent); color: var(--accent); }
.panels { display: flex; gap: 4px; }

select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
}
.menu { display: flex; gap: 4px; margin-left: auto; }
.menu button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 9px;
  cursor: pointer;
  font-size: 12px;
}
.menu button:hover { border-color: var(--muted); }

/* ---------- tools ---------- */
#tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 6px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.tool {
  display: grid;
  grid-template-columns: 28px auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  padding: 5px 9px 5px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  min-width: 128px;
}
.tool:hover { background: var(--panel-2); }
.tool.on { background: var(--panel-2); border-color: var(--accent); }
.tool svg { grid-row: span 2; width: 28px; height: 28px; }
.tool .name { font-size: 13px; font-weight: 600; }
.tool .cost { font-size: 11px; color: var(--muted); }
.tool .short { display: none; }
.tool.group { position: relative; }
.tool.locked { opacity: 0.45; }
.tool.group::after {
  content: ''; position: absolute; right: 5px; bottom: 5px;
  border-left: 5px solid transparent; border-bottom: 5px solid var(--muted);
}
.tool-sep { height: 1px; background: var(--line); margin: 3px 4px; }
.flyout {
  position: fixed; z-index: 50; display: grid; gap: 2px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.flyout-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 2px 6px 4px; }
.flyout .tool { min-width: 170px; }
.tool kbd { font: 10px ui-monospace, monospace; color: var(--muted); margin-left: 4px; }

/* ---------- viewport ---------- */
#legend {
  position: absolute; left: 10px; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px 12px;
  padding: 6px 10px; border-radius: 8px; background: rgba(20, 31, 38, 0.92); border: 1px solid var(--line);
  font-size: 12px; color: var(--text); max-width: calc(100% - 20px);
}
#legend[hidden] { display: none; }
#legend span { display: inline-flex; align-items: center; gap: 5px; }
#legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
#legend .faint { color: var(--muted); }
#viewport { grid-area: view; position: relative; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
#view.pan { cursor: grab; }
#view.panning { cursor: grabbing; }
#view.build { cursor: crosshair; }
/* The 3D view sits on top of the 2D canvas; the mouse still talks to the 2D canvas below. */
#view3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#view3d[hidden] { display: none; }
#rot3d { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: flex; gap: 4px; }
#rot3d[hidden] { display: none; }
#rot3d button {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px;
  background: rgba(20, 31, 38, 0.94); border: 1px solid var(--line); color: var(--text);
}
#rot3d button:hover { border-color: var(--accent); }

#info {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 190px;
  padding: 10px 12px;
  background: rgba(20, 31, 38, 0.94);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
  pointer-events: none;
}
#info h3 { margin: 0 0 4px; font-size: 13px; }
#info .row { display: flex; justify-content: space-between; gap: 16px; }
#info .row span:first-child { color: var(--muted); }
#info .bad { color: var(--bad); }

/* ---------- floating panels ---------- */
.panel {
  position: absolute;
  background: rgba(20, 31, 38, 0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.panel > header { display: flex; align-items: center; gap: 10px; }
.panel h3 { margin: 0; font-size: 13px; }
.panel .sub { flex: 1; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel .close {
  background: transparent; border: 0; color: var(--muted); font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 2px; margin-left: auto;
}
.panel .seg button { padding: 2px 8px; }

#charts { left: 10px; top: 10px; width: min(820px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow-y: auto; }
#charts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; }
.chart-head { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--muted); }
.chart-head b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart canvas { display: block; width: 100%; height: 64px; touch-action: none; }

#budget {
  right: 10px; bottom: 10px; width: min(1080px, calc(100% - 20px));
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 18px;
}
#budget > header, #budget > .table-wrap { grid-column: 1 / -1; }
#budget[hidden] { display: none; }
.money-side { display: grid; gap: 8px; align-content: start; margin: 8px 0 4px; font-size: 12px; }
.money-side h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); display: flex; justify-content: space-between; }
.money-side h4 b { color: var(--text); font-size: 14px; letter-spacing: 0; }
.loans p { margin: 0 0 6px; color: var(--muted); line-height: 1.35; }
.loans p b { color: var(--text); }
.loan-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.loan-buttons button { font-size: 12px; padding: 3px 8px; }
#approval-parts { display: grid; grid-template-columns: 96px 1fr 26px; gap: 3px 6px; align-items: center; color: var(--muted); }
#approval-parts .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
#approval-parts .bar i { display: block; height: 100%; background: var(--r); }
#approval-parts .bar i.mid { background: var(--i); }
#approval-parts .bar i.low { background: var(--bad); }
#approval-parts b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
#approval.low { color: var(--bad); }
#approval.high { color: var(--r); }
@media (max-width: 760px) { #budget { grid-template-columns: 1fr; } }
#budget h3 { flex: 1; }
.check { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); }
.taxes { display: grid; gap: 4px; margin: 8px 0 4px; }
.taxrow { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.taxrow b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.taxrow.r input { accent-color: var(--r); }
.taxrow.c input { accent-color: var(--c); }
.taxrow.i input { accent-color: var(--i); }
.taxrow.pd input { accent-color: #5b8be0; }
.taxrow.fd input { accent-color: #e0623e; }
.taxrow.ed input { accent-color: #a66be0; }
.taxrow.tr input { accent-color: #4fb3a6; }
.taxrow.hl input { accent-color: #e05b8c; }
.taxrow.sn input { accent-color: #8a9a5b; }
.service-note { margin: 0; font-size: 11px; color: var(--muted); min-height: 1em; }
.service-note.bad { color: var(--bad); }
#budget .table-wrap { max-height: 200px; overflow: auto; margin-top: 6px; }
#budget table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
#budget th {
  position: sticky; top: 0; background: #17222a; text-align: right; font-weight: 500; white-space: nowrap;
  color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 6px;
}
#budget td { text-align: right; padding: 3px 6px; border-top: 1px solid rgba(49, 68, 79, 0.6); white-space: nowrap; }
#budget td small { color: var(--muted); font-size: 10px; margin-left: 3px; }
#budget th:first-child, #budget td:first-child { text-align: left; }
#budget tr.new td { background: rgba(242, 193, 78, 0.12); }
.pos { color: #7fd17a; }
.neg { color: var(--bad); }
#budget-empty { margin: 8px 6px; font-size: 12px; color: var(--muted); }

#rules { right: 10px; top: 10px; width: min(360px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto; }
#rules-list { display: grid; gap: 10px; margin: 10px 0; }
.rule { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; }
.rule label { font-weight: 600; }
.rule output { color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.rule input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.rule p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.rule .tag { font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 4px; }
.rules-foot { display: flex; justify-content: space-between; gap: 8px; }
.rules-foot button { border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.ghost { background: transparent; border: 1px solid var(--line); }
.primary { background: var(--accent); border: 1px solid var(--accent); color: #1a1408; font-weight: 600; }

#info .growth { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
#info .growth .row span:last-child { font-variant-numeric: tabular-nums; }
#info .total { font-weight: 600; }
#info .note { color: var(--muted); font-size: 11px; margin-top: 4px; max-width: 220px; }
#status .right { display: flex; gap: 18px; }
#last-budget { font-variant-numeric: tabular-nums; color: var(--text); }

#toast {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 31, 38, 0.94);
  border: 1px solid var(--line);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
#toast.show { opacity: 1; }
#toast.link { pointer-events: auto; cursor: pointer; border-color: var(--accent); }

/* ---------- status ---------- */
#status {
  grid-area: status;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border-top: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
}
#power.bad { color: var(--bad); }

@media (max-width: 1700px) { .brand { display: none; } #topbar { gap: 10px; } }
@media (max-width: 1500px) { #overlay { max-width: 160px; } .speed input { width: 64px; } #topbar .panels button, #topbar .menu button { padding-left: 7px; padding-right: 7px; } }

/* ---------- narrow screens: tools along the bottom ---------- */
@media (max-width: 720px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas: 'top' 'view' 'tools' 'status';
  }
  #tools { flex-direction: row; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); padding: 6px; }
  .tool { min-width: 0; grid-template-columns: 28px; padding: 4px 6px; justify-items: center; }
  .tool-sep { width: 1px; height: auto; margin: 4px 2px; }
  .flyout .tool { min-width: 0; }
  .tool svg { grid-row: auto; }
  .tool .cost, .tool .short { display: none; }
.tool kbd { display: none; }
  .tool .name { font-size: 10px; font-weight: 500; }
  .tool .long { display: none; }
  .tool .short { display: inline; }
  .brand, .menu button#btn-export, .menu button#btn-import { display: none; }
  #status #hint { display: none; }
}
@media (max-width: 700px) { #charts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- log, records, density ---------- */
.badge { display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.badge[hidden] { display: none; }
#log { right: 10px; top: 10px; width: min(560px, calc(100% - 20px)); max-height: calc(100% - 20px); display: flex; flex-direction: column; }
#log[hidden], #records[hidden] { display: none; }
#log header h3 { flex: 1; }
#log-list { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; font-size: 12px; }
#log-list li { display: grid; grid-template-columns: 74px 10px 1fr; gap: 8px; align-items: baseline; padding: 4px 6px; border-top: 1px solid rgba(49, 68, 79, 0.6); }
#log-list li.go { cursor: pointer; }
#log-list li.go:hover { background: rgba(255, 255, 255, 0.05); }
#log-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
#log-list i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
#log-list .fire i { background: #e0623e; }
#log-list .power i { background: var(--i); }
#log-list .money i { background: var(--bad); }
#log-list .growth i { background: var(--r); }
#log-list .unlock i { background: var(--c); }
#log-list .record i { background: #b77be0; }
#log-list .go span::after { content: ' ↗'; color: var(--muted); }
#records { left: 10px; top: 10px; width: min(900px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow-y: auto; }
#records header h3 { flex: 1; }
#records-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 20px; margin-top: 8px; }
#records-body section h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
#records-body .rec { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 12px; padding: 3px 0; border-top: 1px solid rgba(49, 68, 79, 0.6); }
#records-body .rec b { font-variant-numeric: tabular-nums; text-align: right; }
#records-body .rec small { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
#records-body .rec.streak small { min-width: 0; }
#records-body .none { color: var(--muted); font-size: 12px; }
#density-bar {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: 8px; background: rgba(20, 31, 38, 0.94); border: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
#density-bar[hidden] { display: none; }
#density-bar span { margin-right: 4px; }
#density-bar button { padding: 2px 9px; font-size: 12px; }
#density-bar button.on { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
#density-bar button:disabled { opacity: 0.4; cursor: not-allowed; }
#density-bar .use-group { display: flex; align-items: center; gap: 4px; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--line); }
#density-bar .use-group[hidden] { display: none; }

/* ---------- map picker ---------- */
.map-pick { display: grid; grid-template-columns: 128px 1fr; gap: 6px 10px; margin: 10px 0 4px; font-size: 12px; }
.map-pick .map-row { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.map-pick label { font-weight: 600; }
.map-pick .tag { font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 4px; }
#map-preview { width: 128px; height: 128px; border-radius: 6px; border: 1px solid var(--line); image-rendering: pixelated; background: var(--panel-2); }
.map-side p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.map-side button { border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
