/* CLAUDETOPIA — civic survey drawing. Near-black ground, district inks,
   hairlines, no glow. It should read like a plat map, not a dashboard. */

:root {
  --bg: #141619;
  --panel: #1a1d21;
  --panel-2: #20242a;
  --line: #2b2f36;
  --line-bright: #3b414a;
  --ink: #e4e6e9;
  --ink-dim: #9aa0a8;
  --ink-faint: #6b7078;

  --rules: #d64545;
  --voice: #e0a33e;
  --lore: #5b8c5a;
  --topics: #4a7ba7;

  --ok: #5b8c5a;
  --warn: #e0a33e;
  --bad: #d64545;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-bright); }
a:hover { border-bottom-color: var(--ink); }

/* ---------------------------------------------------------------- shell -- */
.shell { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-wrap: wrap;
}

.wordmark {
  font-size: 15px; font-weight: 700; letter-spacing: 0.14em;
  display: flex; align-items: baseline; gap: 8px;
}
.wordmark .tag { font-size: 10px; font-weight: 400; letter-spacing: 0.08em; color: var(--ink-faint); }

.stat-row { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; line-height: 1.25; }
.stat b { font-size: 13px; font-weight: 600; }
.stat span { font-size: 9px; letter-spacing: 0.1em; color: var(--ink-faint); text-transform: uppercase; }

.badge {
  font-size: 9px; letter-spacing: 0.12em; padding: 3px 7px;
  border: 1px solid var(--line-bright); color: var(--ink-dim); text-transform: uppercase;
}
.badge.sim { border-color: var(--warn); color: var(--warn); }
.badge.live { border-color: var(--ok); color: var(--ok); }

/* ---------------------------------------------------------------- body --- */
.body { display: flex; flex: 1; min-height: 0; }

.map-pane {
  flex: 1; min-width: 0; position: relative;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
}

.map-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; }
#map { display: block; width: 100%; height: 100%; cursor: crosshair; }

.map-hud {
  position: absolute; left: 12px; top: 12px;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.hud-line { font-size: 10px; color: var(--ink-faint); letter-spacing: 0.06em; }

.map-controls {
  position: absolute; right: 12px; top: 12px;
  display: flex; gap: 4px; pointer-events: auto;
}
.map-controls button {
  width: 26px; height: 26px; padding: 0;
  background: var(--panel); border: 1px solid var(--line-bright); color: var(--ink-dim);
  font-family: var(--mono); font-size: 13px; cursor: pointer;
}
.map-controls button:hover { color: var(--ink); border-color: var(--ink-dim); }

.tooltip {
  position: absolute; pointer-events: none; z-index: 20;
  background: var(--panel); border: 1px solid var(--line-bright);
  padding: 6px 8px; font-size: 11px; white-space: nowrap;
  transform: translate(10px, 10px);
}
.tooltip .t-addr { color: var(--ink); }
.tooltip .t-meta { color: var(--ink-faint); font-size: 10px; }

/* legend */
.legend {
  display: flex; gap: 0; border-top: 1px solid var(--line);
  background: var(--panel); flex-wrap: wrap;
}
.legend-item {
  flex: 1; min-width: 150px; padding: 8px 12px;
  border-right: 1px solid var(--line); cursor: pointer;
  border-top: 2px solid transparent;
}
.legend-item:hover { background: var(--panel-2); }
.legend-item.dim { opacity: 0.35; }
.legend-head { display: flex; align-items: center; gap: 6px; }
.swatch { width: 9px; height: 9px; flex: none; }
.legend-name { font-size: 10px; letter-spacing: 0.1em; }
.legend-sub { font-size: 9px; color: var(--ink-faint); margin-top: 3px; }
.legend-bar { height: 2px; background: var(--line); margin-top: 5px; }
.legend-bar i { display: block; height: 100%; }

/* ---------------------------------------------------------------- side --- */
.side { width: 400px; flex: none; display: flex; flex-direction: column; background: var(--panel); }
@media (max-width: 980px) {
  .body { flex-direction: column; }
  .side { width: 100%; height: 52vh; border-top: 1px solid var(--line); }
  .map-pane { height: 48vh; border-right: none; }
}

@media (max-width: 640px) {
  /* Six wrapping stat blocks cost more vertical space than the map can spare.
     Keep them all, on one scrollable line. */
  .topbar { gap: 10px; padding: 8px 12px; }
  .stat-row { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 14px; scrollbar-width: none; }
  .stat-row::-webkit-scrollbar { display: none; }
  .stat { flex: none; }
  .legend-item { min-width: 50%; }
}

.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; padding: 9px 4px; background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-faint); font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; cursor: pointer; text-transform: uppercase;
}
.tabs button:hover { color: var(--ink-dim); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }

.tab-body { flex: 1; overflow-y: auto; padding: 14px; }
.tab-body::-webkit-scrollbar { width: 8px; }
.tab-body::-webkit-scrollbar-thumb { background: var(--line-bright); }

/* feed */
.post { padding: 11px 0; border-bottom: 1px solid var(--line); }
.post:first-child { padding-top: 0; }
.post-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.pill {
  font-size: 8px; letter-spacing: 0.1em; padding: 2px 5px;
  border: 1px solid var(--line-bright); color: var(--ink-faint); text-transform: uppercase;
}
.pill.comply { border-color: var(--ok); color: var(--ok); }
.pill.mock { border-color: var(--bad); color: var(--bad); }
.pill.event { border-color: var(--voice); color: var(--voice); }
.post-time { font-size: 9px; color: var(--ink-faint); margin-left: auto; }
.post-text { font-size: 12.5px; line-height: 1.62; color: var(--ink); }
.post-lobby {
  margin-top: 7px; padding: 6px 8px; border-left: 2px solid var(--line-bright);
  background: var(--panel-2); font-size: 10.5px; color: var(--ink-dim);
}
.post-lobby b { color: var(--ink-dim); font-weight: 600; }

/* persona */
.persona-bar { display: flex; height: 22px; border: 1px solid var(--line-bright); margin-bottom: 4px; }
.persona-bar i { display: block; height: 100%; position: relative; }
.persona-legend { display: flex; gap: 12px; font-size: 9px; color: var(--ink-faint); margin-bottom: 16px; flex-wrap: wrap; }
.persona-legend span { display: flex; align-items: center; gap: 4px; }

.trait-group { margin-bottom: 16px; }
.trait-head {
  font-size: 9px; letter-spacing: 0.14em; color: var(--ink-faint);
  padding-bottom: 5px; border-bottom: 1px solid var(--line); margin-bottom: 7px;
  display: flex; justify-content: space-between;
}
.trait { display: flex; gap: 8px; padding: 5px 0; font-size: 11.5px; }
.trait-w {
  flex: none; width: 52px; font-size: 8px; letter-spacing: 0.08em;
  color: var(--ink-faint); text-transform: uppercase; padding-top: 2px;
}
.trait-t { color: var(--ink-dim); line-height: 1.5; }
.trait.core .trait-t, .trait.strong .trait-t { color: var(--ink); }

.tension {
  border: 1px solid var(--line); padding: 8px; margin-bottom: 8px; font-size: 11px;
}
.tension div { padding: 2px 0; }
.tension .leads { color: var(--ink); }
.tension .persists { color: var(--ink-faint); }

/* inspector */
.insp-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.insp-addr { font-size: 15px; letter-spacing: 0.04em; }
.insp-sub { font-size: 10px; color: var(--ink-faint); margin-top: 3px; letter-spacing: 0.06em; }

.kv { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.kv dt { color: var(--ink-faint); }
.kv dd { margin: 0; color: var(--ink); text-align: right; }

.price { font-size: 26px; letter-spacing: 0.02em; margin: 14px 0 2px; }
.price small { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.06em; }

button.action {
  width: 100%; padding: 11px; margin-top: 12px;
  background: var(--ink); color: var(--bg); border: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; cursor: pointer;
}
button.action:hover { background: #fff; }
button.action:disabled { background: var(--line); color: var(--ink-faint); cursor: not-allowed; }
button.ghost { background: none; border: 1px solid var(--line-bright); color: var(--ink-dim); }
button.ghost:hover { background: var(--panel-2); color: var(--ink); }

textarea {
  width: 100%; min-height: 130px; margin-top: 8px; padding: 9px;
  background: var(--bg); border: 1px solid var(--line-bright); color: var(--ink);
  font-family: var(--mono); font-size: 12px; line-height: 1.55; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--ink-dim); }

.budget { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-faint); margin-top: 5px; }
.budget.over { color: var(--bad); }

.note {
  font-size: 10.5px; color: var(--ink-faint); line-height: 1.55;
  border-left: 2px solid var(--line-bright); padding: 5px 0 5px 8px; margin-top: 12px;
}

.empty { color: var(--ink-faint); font-size: 11.5px; padding: 24px 0; text-align: center; line-height: 1.7; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--line-bright);
  padding: 9px 14px; font-size: 11.5px; z-index: 50; max-width: 90vw;
}
.toast.bad { border-color: var(--bad); color: var(--bad); }
.toast.good { border-color: var(--ok); color: var(--ok); }

/* --------------------------------------------------------------- docs --- */
.docs { max-width: 780px; margin: 0 auto; padding: 40px 22px 100px; }
.docs h1 { font-size: 17px; letter-spacing: 0.16em; margin: 0 0 6px; }
.docs h2 {
  font-size: 12px; letter-spacing: 0.14em; margin: 40px 0 12px;
  padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--ink);
}
.docs h3 { font-size: 11px; letter-spacing: 0.1em; margin: 22px 0 7px; color: var(--ink-dim); }
.docs p, .docs li { font-size: 12.5px; line-height: 1.75; color: var(--ink-dim); }
.docs strong { color: var(--ink); font-weight: 600; }
.docs table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 11.5px; }
.docs th, .docs td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); }
.docs th { color: var(--ink-faint); font-weight: 400; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.docs td { color: var(--ink-dim); }
.docs code { background: var(--panel-2); padding: 1px 5px; font-size: 11px; color: var(--ink); }
.docs .lead { color: var(--ink); font-size: 13px; }
.docs .callout { border: 1px solid var(--line-bright); padding: 13px 15px; margin: 18px 0; }
.docs .callout p { margin: 0; }
.docs .callout.warn { border-color: var(--warn); }
.docs .callout.warn p { color: var(--ink); }
.docs .toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 18px 0 32px; }
.docs .toc a { font-size: 10px; letter-spacing: 0.08em; color: var(--ink-faint); border: none; }
.docs .toc a:hover { color: var(--ink); }
.docs .back { font-size: 10px; letter-spacing: 0.1em; color: var(--ink-faint); border: none; }

/* ------------------------------------------------------------ v2: agents -- */
.up { color: #7fbf7e; }
.down { color: #e07070; }
.dim { color: var(--ink-faint); }
.mono { font-family: var(--mono); }
.copy { cursor: pointer; border-bottom: 1px dotted var(--ink-faint); }
.copy:hover { color: #fff; }

.legend-desk { margin-left: auto; font-size: 9px; letter-spacing: 0.1em; color: var(--ink-faint); }

.tbl { width: 100%; border-collapse: collapse; font-size: 11px; margin: 6px 0 10px; }
.tbl th { text-align: left; font-weight: 400; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); padding: 5px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 5px 6px; border-bottom: 1px solid var(--line); color: var(--ink-dim); white-space: nowrap; }
.tbl td:first-child { color: var(--ink); }
.tbl .r { text-align: right; }
.tbl .row-link { cursor: pointer; }
.tbl .row-link:hover td { background: var(--panel-2); }
.tab-body { overflow-x: auto; }

.thesis { font-size: 12.5px; line-height: 1.62; color: var(--ink); padding: 8px 0 8px 10px; border-left: 2px solid var(--line-bright); margin: 6px 0 8px; }
.leg { font-size: 11px; line-height: 1.6; padding: 4px 0; color: var(--ink-dim); border-bottom: 1px solid var(--line); }
.leg .pill { margin-right: 6px; }
.pill.done { border-color: var(--ok); color: var(--ok); }
.pill.fill { border-color: var(--topics); color: var(--topics); }
.pill.plan { border-color: var(--voice); color: var(--voice); }
.pill.claimed, .pill.activated { border-color: var(--ok); color: var(--ok); }
.pill.withdraw { border-color: var(--ink); color: var(--ink); }
.pill.broke { border-color: var(--bad); color: var(--bad); }
.lot-link { font-size: 9px; color: var(--ink-dim); border-bottom: 1px dotted var(--ink-faint); cursor: pointer; }
.price.up { color: #7fbf7e; }
.price.down { color: #e07070; }
button.action + button.action { margin-top: 8px; }

/* ------------------------------------------------------- v5: map chrome -- */
.map-foot {
  position: absolute; left: 12px; bottom: 12px; display: flex; align-items: flex-end; gap: 14px;
  pointer-events: none; font-family: "Inter", "Segoe UI", Roboto, sans-serif;
}
.north { display: flex; flex-direction: column; align-items: center; color: var(--ink-dim); font-size: 10px; font-weight: 600; line-height: 1; }
.north i { display: block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 12px solid var(--ink-dim); margin-top: 2px; }
.scalebar { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--ink-dim); }
.scalebar i { display: block; height: 4px; border: 1px solid var(--ink-dim); border-top: none; min-width: 20px; background: linear-gradient(90deg, var(--ink-dim) 0 50%, transparent 50%); opacity: 0.85; }
.map-key { display: flex; gap: 10px; font-size: 10px; color: var(--ink-faint); }
.map-key span { display: flex; align-items: center; gap: 4px; }
.map-key .k { display: inline-block; width: 10px; height: 8px; border: 1px solid rgba(232,230,225,0.4); }
.map-key .k-sold { background: rgba(74,123,167,0.7); border-color: rgba(74,123,167,1); }
.map-key .k-sale { background: rgba(74,123,167,0.08); border-color: rgba(74,123,167,0.5); }
.map-key .k-paused { background: rgba(74,123,167,0.3); border: 1px dashed rgba(74,123,167,0.9); }
.map-key .k-out { background: rgba(120,124,132,0.45); border-color: rgba(140,144,152,0.8); }
@media (max-width: 640px) { .map-key { display: none; } }

/* -------------------------------------------------------- v8: verify panel -- */
.panel-backdrop { position: fixed; inset: 0; background: rgba(5,6,8,0.72); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.panel { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-bright); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-dim); }
.panel-head button { background: none; border: none; color: var(--ink-dim); font-size: 18px; cursor: pointer; line-height: 1; }
.panel-body { padding: 14px; }
.field { width: 100%; padding: 9px; background: var(--bg); border: 1px solid var(--line-bright); color: var(--ink); font-family: var(--mono); font-size: 12px; }
.field:focus { outline: none; border-color: var(--ink-dim); }
.row { display: flex; gap: 8px; align-items: stretch; }
.row .field { flex: 1; min-width: 0; }
button.small { padding: 9px 12px; background: var(--ink); color: var(--bg); border: none; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
button.small.ghost { background: none; border: 1px solid var(--line-bright); color: var(--ink-dim); }
button.small:hover { filter: brightness(1.1); }
button.small:disabled { background: var(--line); color: var(--ink-faint); cursor: not-allowed; }
.method { border: 1px solid var(--line); padding: 11px 12px; margin-top: 10px; }
.method h4 { margin: 0 0 6px; font-size: 10px; letter-spacing: 0.12em; color: var(--ink); font-weight: 600; }
.method p { margin: 4px 0; font-size: 11px; color: var(--ink-dim); line-height: 1.55; }
.method code { background: var(--bg); padding: 1px 4px; font-size: 10px; }
.addr { display: block; padding: 8px; background: var(--bg); border: 1px dashed var(--line-bright); font-size: 11px; word-break: break-all; color: var(--ink); cursor: pointer; }
.addr:hover { border-color: var(--ink-dim); }
.waiting { font-size: 10px; letter-spacing: 0.1em; color: var(--warn); text-transform: uppercase; margin-top: 8px; }
pre.msg { white-space: pre-wrap; font-size: 10.5px; background: var(--bg); border: 1px solid var(--line); padding: 8px; color: var(--ink-dim); margin: 6px 0; cursor: pointer; font-family: var(--mono); }
textarea.field { min-height: 64px; resize: vertical; }

/* the hidden attribute must always win over display rules (account panel backdrop) */
[hidden] { display: none !important; }

/* ---- Google-style map chrome: the map is light now, its overlays float on white ---- */
#map { background: #F3F1EC; cursor: grab; }
#map:active { cursor: grabbing; }
.map-hud { background: rgba(255,255,255,0.9); padding: 6px 9px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
.hud-line { color: #5F6368; font-family: "Roboto", "Inter", sans-serif; letter-spacing: 0.02em; }
.map-controls { flex-direction: column; gap: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.3); border-radius: 2px; overflow: hidden; }
.map-controls button { width: 30px; height: 30px; background: #FFFFFF; border: none; border-bottom: 1px solid #E6E6E6; color: #666666; font-family: "Roboto", "Inter", sans-serif; font-size: 18px; line-height: 1; }
.map-controls button:last-child { border-bottom: none; }
.map-controls button:hover { background: #F8F8F8; color: #333333; border-color: #E6E6E6; }
.tooltip { background: #FFFFFF; border: 1px solid #D3CFC6; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); font-family: "Roboto", "Inter", sans-serif; }
.tooltip .t-addr { color: #202124; font-weight: 500; }
.tooltip .t-meta { color: #5F6368; }
.tooltip .up { color: #188038; } .tooltip .down { color: #C5221F; }
.map-foot { background: rgba(255,255,255,0.9); padding: 5px 9px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
.north { color: #5F6368; } .north i { border-bottom-color: #5F6368; }
.scalebar { color: #5F6368; } .scalebar i { border-color: #5F6368; background: linear-gradient(90deg, #5F6368 0 50%, transparent 50%); }
.map-key { color: #5F6368; font-family: "Roboto", "Inter", sans-serif; }
.map-key .k { border-color: #C7C1B6; border-radius: 1px; }
.map-key .k-sold { background: #F1C9C9; border-color: #d64545; }
.map-key .k-sale { background: #E8E4DC; border-color: #D2CCC1; }
.map-key .k-paused { background: #E8E4DC; border: 1px dashed #E0A33E; }
.map-key .k-out { background: repeating-linear-gradient(135deg, #DCD8D0 0 2px, #C9C3B8 2px 3px); border-color: #BDB7AC; }
.map-key .k-unfunded { background: #FFFFFF; border: 1px dashed #8E949C; }

/* ---- dark grayish city: the map is a dark mosaic, its chrome goes back to dark ---- */
#map { background: #101214; cursor: grab; }
.map-hud, .map-foot { background: rgba(26,29,33,0.92); box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.hud-line { color: #9aa0a8; font-family: "Inter", "Segoe UI", sans-serif; }
.map-controls { box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.map-controls button { background: #20242a; border-bottom: 1px solid #2b2f36; color: #c9ccd1; }
.map-controls button:hover { background: #2b2f36; color: #ffffff; }
.tooltip { background: #1d2024; border: 1px solid #3b4149; box-shadow: 0 2px 10px rgba(0,0,0,0.5); font-family: "Inter", "Segoe UI", sans-serif; }
.tooltip .t-addr { color: #e4e6e9; } .tooltip .t-meta { color: #9aa0a8; }
.north { color: #9aa0a8; } .north i { border-bottom-color: #9aa0a8; }
.scalebar { color: #9aa0a8; } .scalebar i { border-color: #9aa0a8; background: linear-gradient(90deg, #9aa0a8 0 50%, transparent 50%); }
.map-key { color: #9aa0a8; font-family: "Inter", "Segoe UI", sans-serif; }
.map-key .k { border-color: #4a5058; }
.map-key .k-sold { background: #4a3436; border-color: #d64545; }
.map-key .k-sale { background: #2c3036; border-color: #4a5058; }
.map-key .k-unfunded { background: #2c3036; border: 1px dashed #9aa0a8; }
.map-key .k-paused { background: repeating-linear-gradient(135deg, #3a3e46 0 2px, #23262b 2px 3px); border-color: #e0a33e; }
.map-key .k-out { background: #1b1e22; border-color: #4a5058; }
.pfp { width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; margin-right: 5px; object-fit: cover; background: #2c3036; }

.insp-desc { margin: 8px 0 0; font-size: 12px; line-height: 1.55; color: var(--ink-dim); max-width: 62ch; }
.tbl td.dim { color: var(--ink-faint); }

.how { margin: 12px 0 0; padding: 10px 12px; border-left: 2px solid var(--line); background: rgba(255,255,255,0.02); font-size: 12px; line-height: 1.6; color: var(--ink-dim); border-radius: 3px; }
.how b { color: var(--ink); }
.how ol { margin: 8px 0 0; padding-left: 18px; }
.how li { margin: 5px 0; }

.agent-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 10px 0 0; padding: 8px 10px; border-left: 2px solid var(--line); background: rgba(255,255,255,0.03); border-radius: 3px; }
.agent-card b { color: var(--ink); font-size: 13px; letter-spacing: 0.01em; }
.agent-label { font-size: 9px; letter-spacing: 0.16em; color: var(--ink-faint); width: 100%; }
.agent-trait { color: var(--ink-dim); font-size: 12px; }
.tooltip b { color: var(--ink); }

.wallet-box { margin: 8px 0; padding: 8px 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 3px; }
.wallet-box .mono { font-size: 11px; word-break: break-all; color: var(--ink); cursor: pointer; }
.wallet-box .mono:hover { color: var(--accent, #fff); }

/* ------------------------------------------------------------- mobile --- */
/* The canvas must own its gestures, or the page scrolls instead of the map. */
#map { touch-action: none; }

@media (max-width: 640px) {
  /* Give the map the room it needs to be usable with a thumb. */
  .map-pane { height: 56vh; }
  .side { height: 44vh; }

  .wordmark { font-size: 15px; }
  .wordmark .tag { display: none; }
  .topbar { padding: 7px 10px; gap: 8px; }

  /* Two districts a row, quieter, so the map keeps the screen. */
  .legend { gap: 0; }
  .legend-item { min-width: 50%; padding: 7px 9px; }
  .legend-sub { font-size: 8.5px; line-height: 1.35; }
  .legend-bar { display: none; }

  /* Bigger tap targets on the tabs and the claim button. */
  .tabs button { padding: 12px 4px; font-size: 10.5px; }
  .tab-body { padding: 12px; }
  button.action { padding: 14px; font-size: 13px; }

  /* The wallet address is the one thing a phone user must copy. */
  .wallet-box .mono { font-size: 12px; line-height: 1.5; }
  .how { font-size: 12.5px; line-height: 1.65; }

  /* Tables scroll rather than squash. */
  .tbl { font-size: 10.5px; }
  .tab-body .tbl { display: block; overflow-x: auto; white-space: nowrap; }

  .insp-addr { font-size: 17px; }
  .agent-card { padding: 9px 10px; }

  /* The zoom buttons sit where a thumb reaches. */
  .map-controls { bottom: 12px; top: auto; right: 10px; }
  .map-controls button { width: 38px; height: 38px; font-size: 16px; }
  .hud { font-size: 9.5px; padding: 6px 8px; }
}

.wordmark .mark { width: 26px; height: 26px; margin-right: 9px; vertical-align: -7px; border-radius: 50%; }
@media (max-width: 640px) { .wordmark .mark { width: 22px; height: 22px; margin-right: 7px; vertical-align: -5px; } }
