@font-face { font-family: "Instrument Serif"; src: url(/fonts/InstrumentSerif-Regular.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Jersey 15"; src: url(/fonts/Jersey15-Regular.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Archivo"; src: url(/fonts/Archivo-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --asphalt: #0b1322; --panel: #0e1a2e; --line: #26354f; --dusk: #142441; --burlap: #e9dcbf; --burlap-shade: #b5a079;
  --neon: #f2c46b; --glow: #f2c46b; --glow-dim: #c8902f; --up: #6ff2c2; --down: #ff5c7a; --ink: #f3ecdf; --muted: #9aa7bf; --ink0: #03060c;
  --terracotta: #e0663c; --gilt: #7a5f2a;
  --font-pixel: "Jersey 15", "Courier New", monospace; --font-sans: Archivo, "Helvetica Neue", Arial, sans-serif; --font-serif: "Instrument Serif", "Times New Roman", serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='10' height='12' fill='%230b1020'/%3E%3Crect x='0' y='1' width='12' height='10' fill='%230b1020'/%3E%3Crect x='1' y='1' width='10' height='10' fill='%232e3a5c'/%3E%3Crect x='2' y='2' width='8' height='8' fill='%231c2640'/%3E%3Crect x='2' y='2' width='8' height='1' fill='%2326314f'/%3E%3Crect x='2' y='2' width='1' height='8' fill='%2326314f'/%3E%3C/svg%3E"); --frame-hot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='10' height='12' fill='%230b1020'/%3E%3Crect x='0' y='1' width='12' height='10' fill='%230b1020'/%3E%3Crect x='1' y='1' width='10' height='10' fill='%23ff6a3d'/%3E%3Crect x='2' y='2' width='8' height='8' fill='%23131a2b'/%3E%3Crect x='2' y='2' width='8' height='1' fill='%231c2640'/%3E%3Crect x='2' y='2' width='1' height='8' fill='%231c2640'/%3E%3C/svg%3E"); --frame-plate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='10' height='12' fill='%230b1020'/%3E%3Crect x='0' y='1' width='12' height='10' fill='%230b1020'/%3E%3Crect x='1' y='1' width='10' height='10' fill='%23d99a2b'/%3E%3Crect x='2' y='2' width='8' height='8' fill='%23131a2b'/%3E%3Crect x='2' y='2' width='8' height='1' fill='%231c2640'/%3E%3Crect x='2' y='2' width='1' height='8' fill='%231c2640'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--asphalt); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.stage { position: fixed; inset: 0; overflow: hidden; }
.city { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; cursor: grab; touch-action: none; }
.city:active { cursor: grabbing; }
.tags, .overlay { position: absolute; inset: 0; pointer-events: none; }
.overlay > * { pointer-events: auto; }

/* pixel frames: every panel is drawn like game UI, not a web card */
.frame { border: 8px solid transparent; border-image: var(--frame) 4 fill / 8px / 0 stretch; background: none; image-rendering: pixelated; }
.frame.hot { border-image-source: var(--frame-hot); }

/* ticker tags over towers */
.bc-tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 5px; font: 400 17px/1 var(--font-pixel); white-space: nowrap; color: var(--ink); background: var(--panel); border: 2px solid var(--line); padding: 3px 6px 2px 3px; box-shadow: 3px 3px 0 var(--ink0); will-change: transform; }
.bc-tag img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.bc-tag b { font-weight: 400; color: var(--burlap); }
.bc-tag .up { color: var(--up); } .bc-tag .down { color: var(--down); }
.bc-tag.is-mine { border-color: var(--burlap); }
.bc-tag.is-focus { border-color: var(--neon); background: var(--asphalt); z-index: 2; }
.bc-tag.is-focus::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 6px; height: 6px; margin-left: -3px; background: var(--neon); }

/* neighborhood signs: street-sign plates */
.hood { position: absolute; left: 0; top: 0; --tone: var(--burlap); display: grid; gap: 2px; padding: 8px 12px 7px; background: var(--asphalt); border: 0; box-shadow: 0 0 0 2px var(--ink0), inset 0 4px 0 var(--tone), 5px 5px 0 2px var(--ink0); text-align: left; cursor: pointer; will-change: transform; }
.hood b { font: 400 28px/1 var(--font-pixel); color: var(--ink); white-space: nowrap; }
.hood span { font: 600 12px/15px var(--font-sans); color: var(--tone); white-space: nowrap; }
.hood.tone-up { --tone: var(--up); } .hood.tone-neon { --tone: var(--neon); } .hood.tone-glow { --tone: var(--glow); } .hood.tone-down { --tone: var(--down); } .hood.tone-muted { --tone: var(--muted); }
.hood:hover b { color: var(--tone); }
/* landmark plaques */
.psign { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 1px; padding: 5px 9px 4px; border: 6px solid transparent; border-image: var(--frame-plate) 4 fill / 6px / 0 stretch; cursor: pointer; will-change: transform; }
.psign b { font: 400 19px/1 var(--font-pixel); color: var(--glow); white-space: nowrap; }
.psign span { font: 600 10px/13px var(--font-sans); color: var(--muted); white-space: nowrap; }
.psign:hover b { color: var(--ink); }
/* Meme Square billboards */
.board { position: absolute; left: 0; top: 0; width: 136px; padding: 7px 8px 6px; background: var(--asphalt); border: 3px solid var(--glow-dim); box-shadow: 0 0 0 2px var(--ink0), 4px 4px 0 2px var(--ink0); text-align: center; pointer-events: none; will-change: transform; }
.board .b-k { display: block; font: 600 10px/13px var(--font-sans); color: var(--muted); }
.board .b-v { display: block; font: 400 20px/1 var(--font-pixel); color: var(--glow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board.up .b-v { color: var(--up); } .board.neon { border-color: var(--neon); }

/* top bar */
.top { position: absolute; left: 14px; right: 14px; top: calc(12px + var(--safe-t)); display: flex; align-items: center; gap: 12px; z-index: 5; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand img { height: 30px; display: block; filter: drop-shadow(3px 3px 0 var(--ink0)); }
.districts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.districts::-webkit-scrollbar { display: none; }
.chip { flex: none; font: 600 13px/18px var(--font-sans); padding: 6px 10px; background: var(--panel); color: var(--ink); border: 0; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 3px 3px 0 2px var(--ink0); cursor: pointer; white-space: nowrap; }
.chip.is-on { box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--neon), 3px 3px 0 2px var(--ink0); }
.net { margin-left: auto; display: flex; align-items: center; gap: 8px; font: 600 13px/18px var(--font-sans); padding: 0 4px; white-space: nowrap; font-variant-numeric: tabular-nums; border-width: 6px; border-image-width: 6px; }
.live { width: 8px; height: 8px; background: var(--neon); display: inline-block; flex: none; }
@media (prefers-reduced-motion: no-preference) { .live { animation: blink 1.2s steps(2, jump-none) infinite; } }
@keyframes blink { 50% { opacity: .25; } }

/* buttons: pixel blocks with a pressed edge */
.btn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; justify-content: center; font: 400 24px/1 var(--font-pixel); padding: 11px 16px 10px; border: 0; background: var(--neon); color: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0), inset 0 -4px 0 rgba(11,16,32,.35), 4px 4px 0 2px var(--ink0); cursor: pointer; text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 2px var(--ink0), inset 0 -2px 0 rgba(11,16,32,.35), 2px 2px 0 2px var(--ink0); }
.btn.ghost { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--muted), 4px 4px 0 2px var(--ink0); }
.btn.small { flex: none; font-size: 20px; padding: 8px 13px 7px; }
.connect.is-on { background: var(--burlap); }

/* panel */
.panel { position: absolute; left: 14px; bottom: calc(36px + var(--safe-b)); width: 392px; max-height: calc(100% - 110px); overflow: auto; padding: 10px 14px 8px; z-index: 6; scrollbar-width: thin; }
.panel[data-mode="token"] .v-place, .panel[data-mode="place"] .v-token { display: none; }
.grab { display: none; }
.p-head { display: flex; align-items: center; gap: 12px; }
.p-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--line); object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--ink0); }
.p-names { min-width: 0; flex: 1; }
.p-ticker { font: 400 36px/1 var(--font-pixel); color: var(--burlap); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-name { font: 500 13px/18px var(--font-sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.state { font: 600 12px/16px var(--font-sans); padding: 4px 8px; box-shadow: inset 0 0 0 2px var(--line); white-space: nowrap; }
.state.pump, .state.new { box-shadow: inset 0 0 0 2px var(--up); } .state.dump { box-shadow: inset 0 0 0 2px var(--down); }
.p-flags { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.mine { font: 600 12px/16px var(--font-sans); color: var(--asphalt); background: var(--burlap); padding: 3px 8px; }
.find, .back { font: 600 12px/16px var(--font-sans); padding: 4px 9px; background: transparent; color: var(--ink); border: 0; box-shadow: inset 0 0 0 2px var(--muted); cursor: pointer; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 12px 0 10px; }
.label { font: 600 12px/16px var(--font-sans); color: var(--muted); }
.stat { font: 400 32px/1 var(--font-pixel); font-variant-numeric: tabular-nums; }
.sub { font: 600 13px/18px var(--font-sans); margin-top: 2px; }
.up { color: var(--up); } .down { color: var(--down); }
.tabs { display: flex; gap: 6px; margin: 4px 0 6px; }
.tab { font: 400 18px/1 var(--font-pixel); padding: 4px 8px 3px; border: 0; background: transparent; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; color: var(--muted); }
.tab.is-on { color: var(--ink); box-shadow: inset 0 0 0 2px var(--muted); }
.chart { position: relative; height: 176px; margin-bottom: 12px; background: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0); overflow: hidden; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; font: 500 13px/18px var(--font-sans); color: var(--muted); }
.actions { display: flex; gap: 12px; margin: 4px 4px 6px 0; }
.actions .btn:first-child { flex: 1.6; }
.sect { margin-top: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.links a, .links .btn { font: 600 13px/18px var(--font-sans); color: var(--ink); text-decoration: none; padding: 5px 9px; box-shadow: inset 0 0 0 2px var(--line); }
.links a:hover { box-shadow: inset 0 0 0 2px var(--glow-dim); color: var(--glow); }
.links .btn { font: 400 18px/1 var(--font-pixel); color: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0), inset 0 -3px 0 rgba(11,16,32,.35); }
.ca { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ca-copy { font: 500 12px/16px var(--font-sans); color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 290px; text-align: left; }
.rail-in { display: none; margin-top: 12px; }
/* place view */
.pl-title { font: 400 36px/1 var(--font-pixel); color: var(--glow); margin-top: 10px; }
.pl-who { font: 600 13px/18px var(--font-sans); color: var(--burlap); margin-top: 4px; }
.pl-blurb { font: 420 14px/20px var(--font-sans); color: var(--ink); margin: 10px 0; }
.pnote { font: 420 14px/20px var(--font-sans); color: var(--muted); margin: 8px 0; }
.pnote b { color: var(--ink); }
.plist { list-style: none; margin: 8px 0; padding: 0; }
.prow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; font: 400 20px/1 var(--font-pixel); box-shadow: inset 0 -2px 0 var(--line); }
.prow[data-id] { cursor: pointer; } .prow[data-id]:hover { background: var(--asphalt); color: var(--glow); }
.prow em { font: 500 12px/16px var(--font-sans); color: var(--muted); font-style: normal; margin-left: 6px; }
.pl-acts { margin: 10px 0 6px; gap: 10px; }

/* right rail: minimap + trades */
.rail { position: absolute; right: 14px; top: calc(62px + var(--safe-t)); bottom: calc(36px + var(--safe-b)); width: 300px; display: flex; flex-direction: column; z-index: 6; padding: 0; }
.mini { display: block; width: 100%; aspect-ratio: 2 / 1; image-rendering: pixelated; cursor: crosshair; box-shadow: 0 2px 0 var(--line); }
.r-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px; }
.r-head h2 { margin: 0; font: 400 24px/1 var(--font-pixel); }
.r-sub { margin-left: auto; font: 500 11px/15px var(--font-sans); color: var(--muted); }
.trades { list-style: none; margin: 0; padding: 0 2px; overflow: auto; flex: 1; scrollbar-width: thin; }
.trade { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 7px 8px; }
.trade a { color: inherit; text-decoration: none; }
.trade .k { font: 400 18px/1 var(--font-pixel); }
.trade .usd { font: 400 22px/1 var(--font-pixel); font-variant-numeric: tabular-nums; }
.trade .w, .trade .ago { font: 500 11px/15px var(--font-sans); color: var(--muted); }
.trade .ago { text-align: right; }
.trade.fresh { background: var(--asphalt); }
.empty { padding: 14px 8px; font: 500 13px/18px var(--font-sans); color: var(--muted); }

.ctl { position: absolute; right: 332px; bottom: calc(36px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; z-index: 6; }
.cbtn { width: 44px; height: 44px; font: 400 26px/1 var(--font-pixel); background: var(--panel); color: var(--ink); border: 0; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 3px 3px 0 2px var(--ink0); cursor: pointer; }
.cbtn.tilt { display: none; font-size: 16px; }
.cbtn.is-on { box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--neon), 3px 3px 0 2px var(--ink0); }

.hint { position: absolute; left: 50%; bottom: calc(36px + var(--safe-b)); transform: translateX(-50%); width: min(480px, calc(100% - 800px)); min-width: 300px; display: flex; gap: 14px; align-items: center; padding: 4px 6px; z-index: 7; }
.hint p { margin: 0; font: 420 14px/20px var(--font-sans); }
.hint.gone { display: none; }
.foot { position: absolute; left: 14px; right: 330px; bottom: calc(10px + var(--safe-b)); font: 500 11px/16px var(--font-sans); color: var(--muted); z-index: 4; text-shadow: 0 1px 0 var(--asphalt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* phones */
@media (max-width: 860px) {
  .top { left: 8px; right: 8px; gap: 8px; flex-wrap: wrap; }
  .brand img { height: 22px; }
  .net { order: 2; margin-left: auto; font-size: 12px; }
  .connect { order: 3; font-size: 17px; padding: 6px 10px 5px; }
  .districts { order: 4; width: 100%; }
  .chip { font-size: 12px; padding: 5px 8px; }
  .panel { left: 6px; right: 6px; width: auto; bottom: calc(6px + var(--safe-b)); max-height: 70%; padding: 2px 10px 8px; }
  .grab { display: block; width: 100%; height: 20px; border: 0; background: none; cursor: pointer; position: relative; }
  .grab::after { content: ""; position: absolute; left: 50%; top: 7px; width: 44px; height: 4px; margin-left: -22px; background: var(--line); }
  .p-ticker { font-size: 30px; } .stat { font-size: 27px; } .pl-title { font-size: 30px; margin-top: 0; }
  .panel:not(.is-open) .more, .panel:not(.is-open) .v-place #plBody, .panel:not(.is-open) .v-place .pl-blurb { display: none; }
  .panel.is-open .rail-in { display: block; }
  .rail { top: auto; bottom: auto; right: 8px; top: calc(100px + var(--safe-t)); width: 132px; height: auto; background: none; border: 0; }
  .rail .r-head, .rail .trades { display: none; }
  .mini { box-shadow: 0 0 0 2px var(--ink0), 3px 3px 0 2px var(--ink0); }
  .ctl { right: 8px; bottom: auto; top: calc(176px + var(--safe-t)); }
  .cbtn { width: 40px; height: 40px; } .cbtn.tilt { display: block; }
  .hood b { font-size: 21px; } .hood { padding: 6px 9px 5px; }
  .hint { width: auto; left: 6px; right: 150px; transform: none; bottom: auto; top: calc(100px + var(--safe-t)); min-width: 0; flex-direction: column; align-items: flex-start; }
  .foot { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .top { flex-wrap: nowrap; } .districts { width: auto; order: 0; } .brand img { height: 20px; }
  .panel { left: 6px; right: auto; width: 300px; top: 52px; bottom: 6px; max-height: none; }
  .panel:not(.is-open) .more { display: none; }
  .rail { top: 52px; right: 6px; width: 128px; }
  .ctl { top: 124px; right: 6px; bottom: auto; } .cbtn.tilt { display: block; }
  .hint { top: auto; bottom: 6px; left: 316px; right: 150px; flex-direction: row; }
  .foot { display: none; }
}

/* sound toggle: waves when playing, a cross when muted */
.cbtn.snd { display: grid; place-items: center; color: var(--muted); }
.cbtn.snd .w { display: none; } .cbtn.snd.is-on { color: var(--ink); } .cbtn.snd.is-on .w { display: block; } .cbtn.snd.is-on .x { display: none; }
.jup { min-height: 380px; margin: 6px 0; background: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0); }
.prow a { display: flex; justify-content: space-between; gap: 10px; width: 100%; color: inherit; text-decoration: none; }
.prow a:hover { color: var(--glow); }
.prow[data-term-i] { cursor: pointer; } .prow[data-term-i]:hover { background: var(--asphalt); color: var(--glow); }
.prow em.up { color: var(--up); } .prow em.down { color: var(--down); }
.v-place .tabs { margin-top: 8px; }
@media (max-width: 860px) {
  .btn, .chip, .cbtn, .links a, .tab { min-height: 40px; }
  .links a { display: inline-flex; align-items: center; }
  .panel.is-open { max-height: 78%; }
  .prow { padding: 11px 8px; }
  .hood span { display: none; }
  .psign span { display: none; }
}

/* platform identity: each service's own site icon, shown as-is */
.lg { display: inline-block; vertical-align: middle; border-radius: 3px; background: var(--ink); image-rendering: auto; }
.psign .lgs { display: flex; gap: 4px; justify-content: center; margin-bottom: 3px; font-style: normal; }
.psign .lgs .lg { width: 16px; height: 16px; box-shadow: 0 0 0 1px var(--ink0); }
.pl-who { display: flex; flex-wrap: wrap; gap: 6px; }
.brand-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; box-shadow: inset 0 0 0 2px var(--line); font: 600 13px/18px var(--font-sans); color: var(--ink); }
.xlink { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); background: var(--panel); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 3px 3px 0 2px var(--ink0); }
.xlink:hover { color: var(--glow); }
@media (max-width: 860px) { .xlink { order: 3; width: 34px; height: 34px; } .psign .lgs .lg { width: 14px; height: 14px; } }

.bagbtn { background: var(--burlap); }
.toast { position: absolute; left: 50%; top: calc(70px + var(--safe-t)); transform: translate(-50%, -20px); opacity: 0; z-index: 9; padding: 10px 16px 9px; font: 400 22px/1 var(--font-pixel); color: var(--asphalt); background: var(--glow); box-shadow: 0 0 0 2px var(--ink0), 4px 4px 0 2px var(--ink0); pointer-events: none; transition: opacity .2s steps(2), transform .2s steps(2); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) { .bagbtn { order: 3; font-size: 17px; padding: 6px 10px 5px; } .toast { top: calc(140px + var(--safe-t)); } }

/* minimize and restore */
.minbtn { position: absolute; top: 2px; right: 2px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font: 400 26px/1 var(--font-pixel); cursor: pointer; z-index: 2; }
.minbtn:hover { color: var(--ink); }
.panel { padding-right: 34px; }
.rail .rmin { top: 0; right: 0; background: var(--panel); box-shadow: 0 0 0 2px var(--ink0); }
.rail.is-min { display: none; }
.pills { position: absolute; left: 14px; bottom: calc(36px + var(--safe-b)); display: flex; gap: 10px; z-index: 8; }
.pill { font: 400 20px/1 var(--font-pixel); color: var(--ink); background: var(--panel); border: 0; padding: 9px 14px 8px; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 3px 3px 0 2px var(--ink0); cursor: pointer; }
.pill.hot { box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--neon), 3px 3px 0 2px var(--ink0); }
#railPill { position: fixed; right: 14px; top: calc(62px + var(--safe-t)); }
body.ui-off .top, body.ui-off .panel, body.ui-off .rail, body.ui-off .ctl, body.ui-off .hint, body.ui-off .foot, body.ui-off .tags, body.ui-off .overlay, body.ui-off #panelPill, body.ui-off #railPill { display: none !important; }
body.ui-off .pills { left: 50%; transform: translateX(-50%); }
/* open-in sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(11,16,32,.6); z-index: 20; }
.sheet { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); width: min(420px, calc(100% - 20px)); z-index: 21; padding: 6px 8px 8px; display: grid; gap: 8px; }
.sh-title { font: 400 28px/1 var(--font-pixel); color: var(--glow); }
.sh-sub { font: 500 13px/18px var(--font-sans); color: var(--muted); }
.sh-list { display: grid; gap: 8px; margin: 4px 0; }
.sh-item { display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 48px; color: var(--ink); text-decoration: none; font: 400 22px/1 var(--font-pixel); box-shadow: inset 0 0 0 2px var(--line); }
.sh-item:hover, .sh-item:focus-visible { box-shadow: inset 0 0 0 2px var(--neon); }
@media (max-width: 860px) {
  .pills { left: 8px; bottom: calc(8px + var(--safe-b)); }
  .minbtn { width: 36px; height: 36px; }
  .rail .rmin { display: none; }
}

[hidden] { display: none !important; }
@media (max-width: 860px) { .net { display: none; } .connect { margin-left: auto; } .top { row-gap: 6px; } }

/* first paint: the lockup while live data loads */
.splash { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--asphalt); transition: opacity .35s steps(3); }
.splash img { height: 64px; filter: drop-shadow(4px 4px 0 var(--ink0)); }
.sp-bar { width: 220px; height: 12px; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line); position: relative; overflow: hidden; }
.sp-bar i { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 40px; background: var(--neon); }
@media (prefers-reduced-motion: no-preference) { .sp-bar i { animation: spb 1.1s steps(9) infinite; } }
@keyframes spb { from { left: 2px; } to { left: 176px; } }
.sp-t { font: 400 22px/1 var(--font-pixel); color: var(--muted); }
.splash.gone { opacity: 0; pointer-events: none; }
@media (max-width: 860px) { .splash img { height: 42px; } }

/* phone sheet: a clear Hide button top-left, side buttons out of the way while it's open */
.minbtn .mb-m { display: none; }
@media (max-width: 860px) {
  .minbtn { left: 6px; right: auto; top: 4px; width: auto; height: 34px; padding: 0 12px; font: 400 20px/1 var(--font-pixel); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); z-index: 3; }
  .minbtn .mb-d { display: none; } .minbtn .mb-m { display: inline; }
  .panel { padding-right: 10px; }
  .grab { margin-left: 70px; width: calc(100% - 140px); height: 34px; }
  .grab::after { top: 15px; }
  body.sheet-open .ctl, body.sheet-open .rail, body.sheet-open .hint { display: none; }
  .ctl { z-index: 5; gap: 8px; }
  .cbtn { width: 38px; height: 38px; font-size: 22px; }
}

/* right rail tabs: big trades and the city chat */
.r-tabs { display: flex; gap: 0; padding: 8px 6px 0; }
.r-tab { flex: 1; font: 400 20px/1 var(--font-pixel); color: var(--muted); background: transparent; border: 0; padding: 8px 6px 7px; cursor: pointer; box-shadow: inset 0 -2px 0 var(--line); }
.r-tab.is-on { color: var(--ink); box-shadow: inset 0 -3px 0 var(--neon); }
.online { font: 600 11px/1 var(--font-sans); color: var(--up); }
.pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pane .r-head { padding: 8px 10px 6px; }
.chat .c-head { display: none; }
.c-list { list-style: none; margin: 0; padding: 6px 8px; overflow: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.c-msg { font: 420 14px/19px var(--font-sans); color: var(--ink); overflow-wrap: anywhere; }
.c-msg b { font: 400 17px/1 var(--font-pixel); color: var(--burlap); margin-right: 6px; }
.c-msg.me b { color: var(--up); }
.c-msg time { font: 500 10px/1 var(--font-sans); color: var(--muted); margin-left: 6px; }
.c-note { font: 500 12px/16px var(--font-sans); color: var(--muted); font-style: italic; }
.c-form { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px; box-shadow: 0 -2px 0 var(--line); }
.c-name { grid-column: 1 / -1; font: 600 12px/16px var(--font-sans); }
.c-name, .c-text { background: var(--asphalt); color: var(--ink); border: 0; padding: 8px 9px; box-shadow: inset 0 0 0 2px var(--line); font-family: var(--font-sans); font-size: 14px; min-width: 0; }
.c-name:focus, .c-text:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--glow-dim); }
.c-form .btn { flex: none; }
.c-rules { font: 500 10px/14px var(--font-sans); color: var(--muted); padding: 0 8px 8px; }
.c-state { font: 600 11px/1 var(--font-sans); color: var(--muted); }
.chatbtn { display: none; position: relative; place-items: center; }
.chatbtn .dot { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; background: var(--neon); }
.rail .pane[hidden] { display: none; }
@media (max-width: 860px) {
  .chatbtn { display: grid; }
  body.chat-open .ctl, body.chat-open .rail .mini, body.chat-open .panel, body.chat-open .pills { display: none !important; }
  body.chat-open #paneChat { display: flex !important; position: fixed; left: 6px; right: 6px; bottom: calc(6px + var(--safe-b)); height: min(70vh, 560px); z-index: 12; background: var(--panel); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 5px 5px 0 2px var(--ink0); }
  body.chat-open .rail { display: block !important; width: 0; height: 0; }
  .chat .c-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 8px 12px; box-shadow: 0 2px 0 var(--line); }
  .chat .c-head b { font: 400 24px/1 var(--font-pixel); color: var(--glow); }
  .chat .cmin { position: static; margin-left: auto; }
  .c-text { font-size: 16px; }
}

.doclink { display: grid; place-items: center; height: 38px; padding: 0 12px; font: 400 20px/1 var(--font-pixel); color: var(--ink); text-decoration: none; background: var(--panel); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 3px 3px 0 2px var(--ink0); }
.doclink:hover { color: var(--glow); }
@media (max-width: 860px) { .doclink { order: 3; height: 34px; padding: 0 9px; font-size: 17px; } }

/* locations dropdown: replaces the chip row */
.loc { position: relative; }
.loc-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; font: 400 21px/1 var(--font-pixel); color: var(--ink); background: var(--panel); border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 3px 3px 0 2px var(--ink0); max-width: 260px; }
.loc-btn svg { flex: none; color: var(--neon); }
.loc-btn .caret { color: var(--muted); }
.loc-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--neon), 3px 3px 0 2px var(--ink0); }
.loc-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.loc-cur { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-menu { position: absolute; left: -2px; top: 50px; width: 320px; max-height: calc(100vh - 120px); overflow: auto; z-index: 20; padding: 2px 4px 6px; scrollbar-width: thin; }
.loc-h { font: 600 11px/1 var(--font-sans); color: var(--muted); letter-spacing: .02em; padding: 12px 8px 6px; }
.loc-i { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; width: 100%; text-align: left; padding: 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.loc-i:not(:has(.li-ic)) { grid-template-columns: 1fr; padding-left: 38px; }
.loc-i .li-ic { grid-row: span 2; display: grid; place-items: center; }
.loc-i .li-ic .lg { width: 18px; height: 18px; }
.loc-i .li-t { font: 400 20px/1.05 var(--font-pixel); }
.loc-i .li-s { font: 500 11px/1.3 var(--font-sans); color: var(--muted); }
.loc-i:hover, .loc-i:focus-visible { background: var(--asphalt); outline: 0; box-shadow: inset 3px 0 0 var(--neon); }
.loc-i:hover .li-t, .loc-i:focus-visible .li-t { color: var(--glow); }
@media (max-width: 860px) {
  .top { flex-wrap: nowrap; }
  .loc { order: 1; min-width: 0; flex: 1 1 auto; }
  .loc-btn { height: 34px; font-size: 17px; max-width: 100%; padding: 0 9px 0 7px; gap: 6px; }
  .loc-menu { position: fixed; left: 8px; right: 8px; width: auto; top: calc(56px + var(--safe-t)); max-height: calc(100vh - 80px - var(--safe-t)); }
  .brand { order: 0; flex: none; }
  .doclink { display: none; }
  .xlink { order: 2; flex: none; } .bagbtn { order: 3; } .connect { order: 4; margin-left: 0; flex: none; }
  .rail { top: calc(56px + var(--safe-t)); }
  .ctl { top: calc(132px + var(--safe-t)); }
  .hint { top: calc(56px + var(--safe-t)); }
}
body.loc-open .hint { display: none; }

.brand-m { display: none; }
@media (max-width: 860px) { .brand .brand-l { display: none; } .brand .brand-m { display: block; height: 32px; width: 32px; image-rendering: pixelated; } }
/* the top bar (and its dropdown) sits above every panel */
.top { z-index: 12; }
@media (max-width: 860px) { .rail .r-tabs, .rail #paneTrades, .rail #paneChat { display: none; } }

/* the $BAG CA, always at the top */
.cabar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 10px; border: 0; cursor: pointer; background: var(--asphalt); color: var(--ink); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--burlap), 3px 3px 0 2px var(--ink0); min-width: 0; max-width: 520px; }
.cabar b { font: 400 18px/1 var(--font-pixel); color: var(--burlap); white-space: nowrap; }
.cabar code { font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ca-cp { font: 400 16px/1 var(--font-pixel); color: var(--asphalt); background: var(--burlap); padding: 5px 8px 4px; }
.cabar:hover .ca-cp { background: var(--glow); }
@media (max-width: 1280px) { .net { display: none; } }
@media (max-width: 860px) {
  .cabar { position: fixed; left: 8px; right: 8px; top: calc(54px + var(--safe-t)); height: 32px; max-width: none; z-index: 11; }
  .cabar b { font-size: 15px; } .cabar code { font-size: 11px; }
  .rail { top: calc(96px + var(--safe-t)); } .ctl { top: calc(172px + var(--safe-t)); } .hint { top: calc(96px + var(--safe-t)); }
  .loc-menu { top: calc(94px + var(--safe-t)); }
  .bagbtn { display: none; }
}

/* music panel: mute and volume, beside the speaker button */
.vol { position: fixed; z-index: 14; width: 210px; display: grid; gap: 10px; padding: 12px 12px 12px; background: var(--panel); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 4px 4px 0 2px var(--ink0); }
.v-h { display: flex; align-items: baseline; justify-content: space-between; }
.v-h b { font: 400 22px/1 var(--font-pixel); color: var(--glow); font-weight: 400; }
.v-h span { font: 600 12px/1 var(--font-sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.v-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; --v: 80%; }
.v-range::-webkit-slider-runnable-track { height: 10px; background: linear-gradient(90deg, var(--neon) var(--v), var(--asphalt) var(--v)); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line); }
.v-range::-moz-range-track { height: 10px; background: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0); }
.v-range::-moz-range-progress { height: 10px; background: var(--neon); }
.v-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 22px; margin-top: -6px; background: var(--ink); border: 0; box-shadow: 0 0 0 2px var(--ink0), inset 0 -3px 0 var(--muted); }
.v-range::-moz-range-thumb { width: 18px; height: 22px; background: var(--ink); border: 0; border-radius: 0; box-shadow: 0 0 0 2px var(--ink0), inset 0 -3px 0 var(--muted); }
.v-range:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.vol .btn { width: 100%; }
@media (max-width: 860px) { .vol { width: 190px; } .v-range { height: 36px; } }

/* City Calls */
.calls .c-head { display: none; }
.k-tabs { display: flex; gap: 6px; padding: 10px 10px 4px; }
.k-list { list-style: none; margin: 0; padding: 4px 8px; overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.kc { display: grid; grid-template-columns: 1fr auto; row-gap: 2px; padding: 9px 8px; cursor: pointer; box-shadow: inset 0 -2px 0 var(--line); }
.kc:hover { background: var(--asphalt); }
.k-t { font: 400 20px/1 var(--font-pixel); color: var(--burlap); }
.k-x { font: 400 22px/1 var(--font-pixel); text-align: right; }
.k-w, .k-a { font: 500 11px/1.3 var(--font-sans); color: var(--muted); } .k-a { text-align: right; }
.callbtn { font-size: 18px; padding: 6px 10px 5px; }
.r-tab { font-size: 18px; }
@media (max-width: 860px) {
  .rail #paneCalls { display: none; }
  body.calls-open .ctl, body.calls-open .rail .mini, body.calls-open .panel, body.calls-open .pills { display: none !important; }
  body.calls-open .rail { display: block !important; width: 0; height: 0; }
  body.calls-open #paneCalls { display: flex !important; position: fixed; left: 6px; right: 6px; bottom: calc(6px + var(--safe-b)); height: min(70vh, 560px); z-index: 12; background: var(--panel); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--line), 5px 5px 0 2px var(--ink0); }
  .calls .c-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 8px 12px; box-shadow: 0 2px 0 var(--line); }
  .calls .c-head b { font: 400 24px/1 var(--font-pixel); color: var(--glow); }
  .calls .cmin { position: static; margin-left: auto; }
}

/* The Pit */
.pmk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.pm { background: var(--asphalt); padding: 8px 10px; box-shadow: inset 0 0 0 2px var(--line); display: grid; gap: 2px; }
.pm span { font: 600 11px/1 var(--font-sans); color: var(--muted); } .pm b { font: 400 22px/1 var(--font-pixel); font-weight: 400; } .pm em { font: 600 11px/1 var(--font-sans); font-style: normal; }
.pv a { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 6px; }
.pv-n { display: flex; align-items: center; gap: 7px; font: 400 18px/1 var(--font-pixel); min-width: 0; } .pv-n em { font: 600 11px/1 var(--font-sans); color: var(--muted); font-style: normal; width: 12px; }
.pv-v { font: 400 18px/1 var(--font-pixel); white-space: nowrap; } .pv-v em { font: 600 11px/1 var(--font-sans); font-style: normal; }
.pv-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--neon); opacity: .7; }

/* The Pit: live perps ticker mounted on the arena */
.pitboard { position: absolute; left: 0; top: 0; width: 250px; background: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--neon), 5px 5px 0 2px var(--ink0); pointer-events: none; will-change: transform; }
.pb-h { font: 400 15px/1 var(--font-pixel); color: var(--asphalt); background: var(--neon); padding: 4px 8px 3px; letter-spacing: .04em; }
.pb-win { overflow: hidden; padding: 7px 0 6px; }
.pb-run { display: inline-flex; white-space: nowrap; will-change: transform; }
.pb-i { font: 400 20px/1 var(--font-pixel); color: var(--ink); padding: 0 16px; }
.pb-i b { font-weight: 400; color: var(--glow); } .pb-i em { font-style: normal; }
@media (max-width: 860px) { .pitboard { width: 220px; } .pb-i { font-size: 17px; } }

/* the golden $BAG tower */
.psign.gold { border-image-source: var(--frame-hot); } .psign.gold b { color: var(--glow); } .psign.gold span { color: var(--burlap); }
.burnpop { position: absolute; left: 0; top: 0; font: 400 34px/1 var(--font-pixel); color: var(--asphalt); background: var(--neon); padding: 6px 12px 4px; box-shadow: 0 0 0 2px var(--ink0), 4px 4px 0 2px var(--ink0); pointer-events: none; will-change: transform; letter-spacing: .04em; }
/* share my tower */
.share-ov { position: fixed; inset: 0; z-index: 30; background: rgba(11,16,32,.72); display: grid; place-items: center; padding: 16px; }
.share { width: min(680px, 100%); display: grid; gap: 10px; padding: 6px 8px 8px; }
.sh-top { display: flex; align-items: center; } .sh-top b { font: 400 28px/1 var(--font-pixel); color: var(--glow); font-weight: 400; }
.sh-top .minbtn { position: static; margin-left: auto; }
.share-img { width: 100%; aspect-ratio: 16 / 9; background: var(--asphalt); box-shadow: 0 0 0 2px var(--ink0); image-rendering: auto; }
.sh-note { margin: 0; font: 500 13px/18px var(--font-sans); color: var(--muted); }
.sh-acts { display: flex; flex-wrap: wrap; gap: 10px; } .sh-acts .btn { flex: 1 1 auto; }
.sharebtn { font-size: 18px; padding: 6px 10px 5px; }

/* PONTE: the prestige layer */
#plTitle, .loc-h, .sh-top b, .splash .sp-t { font-family: var(--font-serif); font-weight: 400; letter-spacing: .04em; }
#plTitle { font-size: 34px; line-height: 1; }
.loc-h { text-transform: uppercase; letter-spacing: .24em; font-size: 12px; color: var(--glow); }
.psign b { font-family: var(--font-serif); letter-spacing: .06em; font-size: 17px; }

/* phones: while any sheet is up, nothing floats over it; big, obvious ways to put it away */
@media (max-width: 860px) {
  body.panel-on .ctl, body.panel-on .rail, body.panel-on .hint, body.panel-on .chatbtn, body.panel-on .xlink { display: none !important; }
  .panel .minbtn { min-width: 72px; height: 40px; font-size: 18px; }
  .grab { height: 28px; } .grab::after { top: 10px; width: 56px; height: 5px; background: var(--muted); }
}
.sharebtn { background: var(--panel) !important; color: var(--ink) !important; box-shadow: 0 0 0 2px var(--ink0), inset 0 0 0 2px var(--glow-dim) !important; }

/* the Latin layer: carved-stone titles, English underneath */
.pl-title .lat { display: block; font: 400 34px/1 var(--font-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.pl-title small { display: block; margin-top: 4px; font: 600 11px/14px var(--font-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--glow); }
#plTitle { font-size: inherit; }
.mean { font-family: var(--font-serif); font-size: 16px; color: var(--burlap); }
.psign b { text-transform: uppercase; letter-spacing: .16em; font-size: 15px; }
.hood b { font-family: var(--font-serif); font-weight: 400; text-transform: uppercase; letter-spacing: .1em; font-size: 26px; }
.loc-h i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); font-family: var(--font-sans); font-size: 11px; }
.li-r { font: 400 15px/1 var(--font-serif); color: var(--glow); width: 26px; text-align: center; letter-spacing: .04em; }
.splash .sp-motto { font: 400 15px/1 var(--font-serif); letter-spacing: .34em; text-transform: uppercase; color: var(--glow); margin-top: 18px; }
.foot i { font-family: var(--font-serif); font-style: italic; color: var(--glow); }
.loc-i .li-t { font-family: var(--font-serif); text-transform: uppercase; letter-spacing: .1em; font-size: 17px; }
