:root {
  --ink: #15273a;
  --ink-2: #3b5164;
  --ink-3: #6a7f90;
  --paper: rgba(244, 248, 247, 0.95);
  --paper-solid: #f4f8f7;
  --paper-2: #e3ecea;
  --line: #c3d2d0;
  --brass: #9c6a12;
  --brass-2: #d9a441;
  --sea: #2c85ad;
  --good: #2b8a55;
  --warn: #b97c06;
  --bad: #bf3a2b;
  --info: #3b6db4;
  --ui: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --side: 372px;
  --board: 148px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #3d9cc6; color: var(--ink); font: 14px/1.4 var(--ui); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 2px; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; }
.num { font-variant-numeric: tabular-nums; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 22px rgba(12, 40, 60, 0.18); }
.cap { font: 600 11px/1.2 var(--cond); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* top: treasury + life bars */
#top { position: fixed; top: 12px; left: 12px; right: calc(var(--side) + 24px); display: flex; gap: 10px; align-items: stretch; pointer-events: none; }
#top > * { pointer-events: auto; }
#treasury { padding: 10px 14px 10px; min-width: 268px; }
#treasury .big { font: 700 34px/1 var(--cond); letter-spacing: -0.01em; }
#treasury .big small { font: 600 16px var(--cond); color: var(--ink-2); margin-left: 4px; }
#treasury .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; color: var(--ink-2); font-size: 12.5px; }
.up { color: var(--good); } .down { color: var(--bad); }
#bars { padding: 8px 12px; display: grid; grid-template-columns: repeat(5, minmax(108px, 1fr)); gap: 6px 12px; flex: 1; align-content: center; }
.bar .name { display: flex; justify-content: space-between; gap: 6px; font: 600 12.5px/1.2 var(--cond); letter-spacing: 0.02em; }
.bar .track { height: 9px; border-radius: 5px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; margin: 3px 0 2px; }
.bar .fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }
.bar .meta { font-size: 11px; line-height: 1.25; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bar.fast .fill { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
#clock { padding: 8px 12px; min-width: 150px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
#clock .bell { font: 600 15px/1.1 var(--cond); }
#clock .live { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; }
.dot.stale { background: var(--warn); } .dot.dead { background: var(--bad); }

/* side panel */
#side { position: fixed; top: 12px; right: 12px; bottom: 12px; width: var(--side); display: flex; flex-direction: column; overflow: hidden; }
#tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--paper-2); }
#tabs button { flex: 1 1 auto; border: 0; background: none; padding: 9px 4px 8px; font: 600 13px var(--cond); letter-spacing: 0.04em; color: var(--ink-2); border-bottom: 3px solid transparent; }
#tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brass-2); background: var(--paper-solid); }
#tabs .badge { display: inline-block; min-width: 17px; padding: 0 4px; margin-left: 3px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; line-height: 17px; }
#tabs .badge.hot { background: var(--bad); }
#pane { flex: 1; overflow-y: auto; padding: 10px 12px 14px; }
#pane h3 { margin: 4px 0 8px; font: 700 17px/1.2 var(--cond); }
#pane h4 { margin: 12px 0 6px; font: 700 14px/1.2 var(--cond); }
#pane p.lead { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.insp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
button.textbtn { border: 0; background: none; padding: 0; color: var(--info); font: inherit; text-decoration: underline; cursor: pointer; }
.card { border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 9px 10px; margin-bottom: 8px; }
button.card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.card.bad { border-color: var(--bad); background: #f8e3df; }
.card.bad .t { color: var(--bad); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.card .t { font-weight: 600; line-height: 1.3; }
.card .m { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.card .why { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
.card .rec { font-size: 12.5px; margin-top: 6px; padding: 6px 8px; background: #fbf4e4; border-left: 3px solid var(--brass-2); border-radius: 3px; }
.card .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card .opts button, .btn { border: 1px solid var(--ink-2); background: #fff; border-radius: 4px; padding: 4px 9px; font: 600 12.5px var(--cond); letter-spacing: 0.02em; }
.card .opts button.recommended, .btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.card .opts button:hover, .btn:hover { border-color: var(--brass-2); }
.age { display: inline-block; padding: 0 6px; border-radius: 3px; font: 600 11px/17px var(--cond); background: var(--paper-2); color: var(--ink-2); }
.age.old { background: var(--bad); color: #fff; }
.kind { display: inline-block; padding: 0 6px; border-radius: 3px; font: 600 11px/17px var(--cond); letter-spacing: 0.04em; text-transform: uppercase; margin-right: 4px; }
.kind.decision { background: #dfe9f6; color: var(--info); } .kind.law { background: #f6ecd6; color: var(--brass); }
.kind.delegation { background: #e3efe6; color: var(--good); } .kind.rule { background: #ece6f4; color: #6a4b98; }
.chron { display: grid; grid-template-columns: 44px 18px 1fr; gap: 2px 6px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dotted var(--line); align-items: start; }
button.chron { width: 100%; border: 0; border-bottom: 1px dotted var(--line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.chron:hover { background: var(--paper-2); }
button.seal { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.seal.bad { background: #f8e3df; }
.seal.bad b { background: var(--bad); }
.chron time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 11.5px; padding-top: 1px; }
.chron i { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; display: inline-block; }
.seal { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; padding: 5px 7px; border-radius: 4px; margin: 4px 0; }
.seal b { font: 700 11px/16px var(--cond); letter-spacing: 0.05em; text-transform: uppercase; flex: none; padding: 0 5px; border-radius: 3px; color: #fff; }
.seal.block { background: #f8e3df; } .seal.block b { background: var(--bad); }
.seal.warn { background: #fbf0d9; } .seal.warn b { background: var(--warn); }
.seal.ok { background: #e2f1e7; } .seal.ok b { background: var(--good); }
.seal.note { background: var(--paper-2); } .seal.note b { background: var(--ink-3); }
.seal.warn.bad { background: #f8e3df; }
.seal.warn.bad b { background: var(--bad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; margin: 6px 0 8px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.est { border-bottom: 1px dashed var(--ink-3); }
code.channel { display: block; margin-top: 6px; padding: 6px 8px; background: var(--ink); color: #e9f1f0; border-radius: 4px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
input.search { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; margin-bottom: 8px; background: #fff; }
.guide { border: 1px solid var(--brass-2); background: #fffaf0; }
.guide ol { margin: 6px 0 4px 18px; padding: 0; font-size: 12.5px; }
.guide li { margin: 2px 0; }

/* market board */
#board { position: fixed; left: 12px; right: calc(var(--side) + 24px); bottom: 12px; height: var(--board); display: flex; flex-direction: column; }
#board header { display: flex; align-items: center; gap: 8px; padding: 6px 10px 4px; flex-wrap: wrap; }
#board header h2 { margin: 0; font: 700 15px var(--cond); letter-spacing: 0.03em; }
#board header .hint { font-size: 12px; color: var(--ink-3); flex: 1; min-width: 160px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 1px 9px; font: 600 12px/20px var(--cond); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
#board select { font: 600 12px var(--cond); border: 1px solid var(--line); border-radius: 12px; padding: 1px 6px; background: #fff; height: 22px; }
#tiles { flex: 1; display: flex; gap: 7px; overflow-x: auto; overflow-y: hidden; padding: 2px 10px 10px; }
.tile { flex: none; width: 136px; border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 6px 8px; cursor: grab; user-select: none; display: flex; flex-direction: column; gap: 2px; }
.tile:hover { border-color: var(--brass-2); box-shadow: 0 2px 8px rgba(156, 106, 18, 0.18); }
.tile.armed { outline: 2px solid var(--brass-2); }
.tile > * { flex: none; }
.tile .net { font: 700 14px/1.15 var(--cond); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .reg { font: 600 11px var(--cond); letter-spacing: 0.04em; color: var(--ink-3); text-transform: uppercase; }
.tile .mk { font: 700 16px/1.1 var(--cond); }
.tile .sub { font-size: 11.5px; color: var(--ink-2); }
.tile .share { height: 4px; background: var(--paper-2); border-radius: 2px; overflow: hidden; margin-top: auto; }
.tile .share span { display: block; height: 100%; background: var(--good); }
.tile.ours .net::after { content: " ●"; color: var(--good); font-size: 10px; vertical-align: 2px; }

/* map labels */
.isl { transform: translateY(-10px); text-align: center; font: 600 12px/1.15 var(--cond); color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 6px #fff; white-space: nowrap; }
.isl b { font-size: 14px; letter-spacing: 0.01em; display: block; }
.isl .money { display: inline-flex; gap: 3px; margin-top: 2px; text-shadow: none; }
.isl .money i { font-style: normal; padding: 0 5px; border-radius: 3px; font-size: 11.5px; line-height: 16px; }
.isl .money .in { background: #fff3cf; color: #7a5208; border: 1px solid #e5c56c; }
.isl .money .rent { background: #eef2f4; color: var(--ink-2); border: 1px solid var(--line); }
.isl .meta { color: var(--ink-2); font-weight: 500; }
.isl.yard b { color: var(--ink-2); }
.reglbl { font: 700 22px/1 var(--cond); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 8px rgba(10, 50, 80, 0.55); text-align: center; white-space: nowrap; }
.reglbl small { display: block; font: 600 12.5px var(--cond); letter-spacing: 0.04em; text-transform: none; margin-top: 3px; }
.dock { font: 600 11.5px/1.15 var(--cond); color: #fff; background: rgba(21, 39, 58, 0.78); padding: 2px 6px; border-radius: 3px; white-space: nowrap; text-align: center; }
.lane { font: 600 11px/1.2 var(--cond); color: var(--ink); background: rgba(255, 255, 255, 0.88); border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
.lane.idle { color: var(--ink-3); background: rgba(255, 255, 255, 0.6); }
.pop { font: 700 14px var(--cond); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); animation: popfade 5s ease forwards; }
.pop.good { border-color: var(--good); } .pop.bad { border-color: var(--bad); color: var(--bad); } .pop.gold { background: #fff3cf; border-color: #e5c56c; color: #7a5208; }
@keyframes popfade { 0% { opacity: 0; transform: translateY(6px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
body.far .isl .meta, body.far .isl .money .rent, body.far .lane.idle, body.far .dock small { display: none; }
body.veryfar .dock { display: none; }
body.veryfar .isl, body.veryfar .reglbl small { display: none; }
body.tiny .reglbl { font-size: 13px; letter-spacing: 0.08em; }

#tip { position: fixed; pointer-events: none; z-index: 5; max-width: 300px; padding: 8px 10px; font-size: 12.5px; display: none; }
#tip .t { font: 700 15px var(--cond); }
#legend { padding: 4px 9px; font-size: 12px; display: flex; gap: 9px; align-items: center; background: var(--paper-solid); }
#legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; margin-right: 3px; }
#banner { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 18px 22px; max-width: 420px; text-align: center; display: none; z-index: 10; }
#banner a { color: var(--info); font-weight: 600; }
.coin { position: fixed; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4b8, #e2a92b 55%, #a16d0c); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); z-index: 6; pointer-events: none; transition: left 1.1s cubic-bezier(.5, -0.3, .7, 1), top 1.1s cubic-bezier(.3, 0, .6, 1.3), opacity 0.3s ease 1s; }
#treasury.ding { animation: ding 0.6s ease; }
@keyframes ding { 30% { box-shadow: 0 0 0 4px var(--brass-2), 0 6px 22px rgba(12, 40, 60, 0.18); } }
#mapbtns { position: fixed; right: calc(var(--side) + 24px); bottom: calc(var(--board) + 20px); display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; justify-content: flex-end; }
#mapbtns .btn { background: var(--paper-solid); }
#mapbtns .btn.primary { background: var(--ink); color: #fff; }
#sidetoggle { display: none; }

@media (max-width: 1180px) { #bars { grid-template-columns: repeat(3, minmax(100px, 1fr)); } }
@media (max-width: 860px) {
  :root { --side: 100vw; --board: 132px; }
  #top { right: 12px; flex-wrap: wrap; }
  #bars { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  #clock { display: none; }
  #side { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 62vh; border-radius: 10px 10px 0 0; transform: translateY(105%); transition: transform 0.25s ease; z-index: 8; }
  body.side-open #side { transform: none; }
  #board { right: 12px; }
  #mapbtns { right: 12px; }
  #legend { display: none; }
  #sidetoggle { display: inline-block; }
  #treasury { min-width: 0; flex: 1 1 100%; padding: 8px 12px; }
  #treasury .big { font-size: 28px; }
  #treasury .row:last-child { display: none; }
  #bars { grid-template-columns: repeat(5, 1fr); gap: 4px 8px; padding: 6px 10px; flex: 1 1 100%; }
  #bars .meta { display: none; }
  .bar .name { font-size: 11px; flex-direction: column; gap: 0; }
  #board header .hint { display: none; }
  #board header h2 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .bar.fast .fill, .pop, #treasury.ding { animation: none; } .coin { transition: none; } }

/* v0.2 drill-down: find, inspector, dashboard window, latency map labels (controller repo production/aquarium/GAME.md) */
#find { position: relative; padding: 8px 10px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); background: var(--paper-solid); }
#find input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; font: inherit; background: #fff; }
#find kbd { font: 600 11px var(--cond); color: var(--ink-3); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; background: var(--paper-2); }
#hits { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); max-height: 60vh; overflow-y: auto; background: var(--paper-solid); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgba(12, 40, 60, 0.25); z-index: 20; }
#hits .hit { display: grid; grid-template-columns: 52px 1fr; gap: 0 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--paper-2); background: none; padding: 6px 10px; }
#hits .hit b { font: 600 14px/1.2 var(--cond); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hits .hit small { grid-column: 2; font-size: 11.5px; color: var(--ink-3); }
#hits .hit .k { grid-row: span 2; font: 600 10.5px/1.6 var(--cond); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
#hits .hit.on, #hits .hit:hover { background: #fbf4e4; }
.opens { cursor: pointer; } .opens:hover { border-color: var(--brass-2); }
.insp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#pane h4 { margin: 14px 0 6px; font: 700 13px/1.2 var(--cond); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
#pane a { color: var(--info); }
#pane .m a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats > div { border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 6px 8px; }
.stats b { display: block; font: 700 22px/1.1 var(--cond); }
.stats b small { font: 600 12px var(--cond); color: var(--ink-3); margin-left: 2px; }
.trio { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.trio i { font-style: normal; }
.trio i.on { color: var(--ink); font-weight: 600; }
.reading { font-size: 12.5px; margin: 8px 0 0; padding: 6px 8px; background: var(--paper-2); border-radius: 4px; color: var(--ink-2); }
.mchart { position: relative; }
.mchart svg { width: 100%; height: auto; display: block; overflow: visible; }
.mchart text { font: 11px var(--ui); fill: var(--ink-3); }
.mchart text.ct { font: 700 12px var(--cond); letter-spacing: 0.03em; fill: var(--ink); }
.mchart text.cv { font: 600 12px var(--ui); fill: var(--ink); }
.mchart .base { stroke: var(--line); } .mchart .grid { stroke: var(--paper-2); }
.mchart .xh { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.ctip { display: none; position: absolute; top: 4px; width: 170px; padding: 5px 7px; font-size: 11.5px; line-height: 1.35; background: var(--ink); color: #f2f6f5; border-radius: 4px; pointer-events: none; }
details.nums { margin: 6px 0 2px; font-size: 12px; } details.nums summary { cursor: pointer; color: var(--ink-2); }
details.nums table { margin-top: 6px; }
table.lat { width: 100%; border-collapse: collapse; font-size: 12px; }
table.lat th { text-align: left; font: 600 11px var(--cond); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); padding: 3px 4px; }
table.lat td { padding: 3px 4px; border-bottom: 1px solid var(--paper-2); }
table.lat .r { text-align: right; }
table.lat tr.ours td { background: #e2f1e7; font-weight: 600; }
.strip { display: flex; flex-direction: column; gap: 3px; }
.srow { position: relative; display: grid; grid-template-columns: 1.3fr 0.9fr 0.7fr 0.8fr; gap: 6px; padding: 4px 6px 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 12px; color: var(--ink) !important; text-decoration: none; }
.srow:hover { border-color: var(--brass-2); } .srow.on { outline: 2px solid var(--brass-2); }
.srow span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--good); border-radius: 0 2px 0 4px; }
.nline { padding: 6px 8px; } .nline > a { font-weight: 600; word-break: break-all; }
.mbar { display: inline-block; width: 64px; height: 7px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; vertical-align: 0; }
.mbar i { display: block; height: 100%; }
.tile.more { cursor: pointer; align-items: center; justify-content: center; font: 600 13px var(--cond); color: var(--ink-2); }
#wide { position: fixed; left: 12px; right: calc(var(--side) + 24px); top: 120px; bottom: calc(var(--board) + 24px); display: none; flex-direction: column; z-index: 8; overflow: hidden; }
#wide.open { display: flex; }
#float { position: fixed; left: 12px; right: calc(var(--side) + 24px); top: 120px; bottom: calc(var(--board) + 24px); max-width: 1180px; display: none; flex-direction: column; z-index: 7; overflow: hidden; }
#float.open { display: flex; }
#float, #wide { background: var(--paper-solid); }
#float header { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
#float-body { flex: 1; overflow: auto; padding: 4px 20px 20px; }
#float-body h3 { font-size: 22px; }
#float-body .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#wide header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
#wide h2 { margin: 0; font: 700 18px var(--cond); } #wide p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
#wide iframe { flex: 1; border: 0; width: 100%; background: #0b1220; }
.reglbl.post { font-size: 15px; letter-spacing: 0.08em; }
.reglbl.post.empty { color: #ffe9b8; }
.lanelbl { font: 600 12px var(--cond); color: #fff; background: rgba(21, 39, 58, 0.62); padding: 1px 6px; border-radius: 9px; white-space: nowrap; }
body.veryfar .lanelbl { font-size: 11px; }
@media (max-width: 860px) {
  #wide { left: 0; right: 0; top: 0; bottom: 0; border-radius: 0; z-index: 30; }
  #float { left: 0; right: 0; top: 0; bottom: 0; max-width: none; border-radius: 0; z-index: 30; }
  #float-body .stats { grid-template-columns: 1fr 1fr; }
}

/* buildings on an island: one button per node with a status icon (shape + colour, same colours as the roofs) */
.st-serving { --st: #3f9b5a; } .st-synced { --st: #9d9583; } .st-syncing { --st: #c98f12; } .st-lagging { --st: #e07b22; }
.st-down { --st: #c23b2e; } .st-fenced { --st: #4f79b8; } .st-updating, .st-starting { --st: #8e63c9; }
.sti { width: 16px; height: 16px; flex: none; display: block; }
.sti > circle:first-child { fill: var(--st, var(--ink-3)); }
.sti path { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sti .dotc { fill: #fff; }
.stpills { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 7px; font-size: 12.5px; color: var(--ink-2); }
.stpill { display: inline-flex; align-items: center; gap: 4px; }
.stpill b { color: var(--ink); }
.blds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px; }
.bld { display: grid; grid-template-columns: 16px 1fr; column-gap: 7px; align-items: center; text-align: left; min-width: 0;
  border: 1px solid var(--line); border-left: 4px solid var(--st); border-radius: 5px; background: #fff; padding: 5px 7px; }
.bld:hover { box-shadow: 0 0 0 2px var(--brass-2); }
.bld .sti { grid-row: span 2; }
.bld b { font: 600 13.5px/1.2 var(--cond); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld small { font-size: 11px; line-height: 1.2; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld.st-down { background: #fcefed; } .bld.st-lagging { background: #fdf4ea; }
.sortchips { display: flex; gap: 5px; margin: 0 0 6px; }
.sortchips .chip { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 1px 9px; font: 600 12px var(--cond); color: var(--ink-2); }
.sortchips .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* v0.3 traffic: region bars, network rows, flow control */
.rbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--paper-2); margin: 4px 0 6px; }
.rbar i { display: block; height: 100%; min-width: 2px; }
.rtab td { padding: 2px 4px; }
.sw2 { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.ntab { display: flex; flex-direction: column; gap: 3px; }
.nrow { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; text-align: left; border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px 6px 2px; font-size: 12.5px; }
.nrow:hover { box-shadow: 0 0 0 2px var(--brass-2); }
.nrow span:first-child { font-weight: 600; }
.nrow .rbar { grid-column: 1 / -1; height: 6px; margin: 3px 0 2px; }
.kvrow { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; border-bottom: 1px dotted var(--line); }
#flowctl { display: flex; align-items: center; gap: 6px; padding: 4px 8px; }
#flowctl select { font: 600 12px var(--cond); border: 1px solid var(--line); border-radius: 12px; padding: 1px 6px; background: #fff; height: 22px; max-width: 190px; }
#flowctl .chip { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 1px 9px; font: 600 12px var(--cond); color: var(--ink-2); }
#flowctl .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
body[data-mode="spectator"] #flowctl { display: none; }
