/* Musetown — premium game HUD. Dark cinematic glass, one accent (lime). */
:root {
  --panel: rgba(10, 14, 24, 0.66);
  --panel-strong: rgba(10, 14, 24, 0.86);
  --panel-solid: #0d1220;
  --hair: rgba(255, 255, 255, 0.09);
  --hair-2: rgba(255, 255, 255, 0.16);
  --text: #f4f7ff;
  --text-2: rgba(232, 238, 252, 0.74);
  --muted: rgba(214, 222, 240, 0.5);
  --accent: #c6ff3d;
  --accent-ink: #11160a;
  --accent-glow: rgba(198, 255, 61, 0.35);
  --danger: #ff5d5d;
  --energy: linear-gradient(90deg, #ffb13d, #ffd76a);
  --food: linear-gradient(90deg, #3ddc84, #a8f07a);
  --social: linear-gradient(90deg, #7c8cff, #c89bff);
  --r: 16px;
  --blur: blur(16px) saturate(1.6);
  --shadow: 0 18px 40px rgba(2, 5, 14, 0.45), 0 2px 8px rgba(2, 5, 14, 0.3);
  --display: "Space Grotesk", "Sora", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gut: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --drawer-w: 420px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(120% 90% at 50% 0%, #34507a 0%, #16213a 45%, #070a12 100%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}
button, input, textarea, select { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
button { background: none; border: 0; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.kicker { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kicker.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#scene { position: fixed; inset: 0; z-index: 0; }
#ui { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#ui > *, .topright > * { pointer-events: auto; }
#ui > .topright, #ui > .feed-col, #ui > .toasts, #ui > .cel-layer { pointer-events: none; }
.feed-col > * { pointer-events: auto; }

/* Glass panel with gradient hairline + inner glow */
.hud {
  position: absolute;
  background: var(--panel);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 24px rgba(120, 150, 255, 0.05);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.hud::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(155deg, rgba(255,255,255,.26), rgba(255,255,255,.05) 38%, rgba(255,255,255,.03) 70%, rgba(198,255,61,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.topright .hud, .pop-wrap .hud { position: relative; }
.pop-wrap .menu { position: absolute; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite; }
.is-off .dot, .dot.off { background: var(--danger); animation: none; box-shadow: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(198,255,61,.55); } 70% { box-shadow: 0 0 0 8px rgba(198,255,61,0); } 100% { box-shadow: 0 0 0 0 rgba(198,255,61,0); } }

/* Buttons */
.cta {
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 16px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .01em;
  box-shadow: 0 6px 22px rgba(198,255,61,.28), inset 0 -2px 0 rgba(0,0,0,.14); white-space: nowrap; text-shadow: none;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(198,255,61,.5), inset 0 -2px 0 rgba(0,0,0,.14); filter: brightness(1.05); }
.cta:active { transform: translateY(0); }
a.cta { text-decoration: none; }
.cta.small { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; display: inline-grid; place-items: center; flex: none;
  color: var(--text); background: var(--panel); transition: box-shadow .2s var(--ease), color .2s, transform .15s var(--ease);
}
.icon-btn:hover { color: var(--accent); box-shadow: 0 0 0 1px rgba(198,255,61,.35), 0 0 22px rgba(198,255,61,.22); }
.drawer .icon-btn, .modal .icon-btn { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- Top-left brand plate ---------- */
.brand { top: var(--gut); left: var(--gut); width: 224px; padding: 10px 12px 10px 10px; display: grid; gap: 8px; }
.brand-row { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; }
.brand-row img { border-radius: 10px; filter: drop-shadow(0 4px 14px rgba(198,255,61,.22)); transition: transform .3s ease; }
.brand-row:hover img { transform: rotate(-4deg) scale(1.05); }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: -.02em; line-height: 1; color: #fff; }
.wordmark span { color: var(--accent); text-shadow: 0 0 18px rgba(198,255,61,.35); }
.live-pill { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); background: rgba(255,255,255,.05); border-radius: 999px; padding: 4px 10px 4px 9px; box-shadow: inset 0 0 0 1px var(--hair); white-space: nowrap; overflow: hidden; }
.live-pill b { font-family: var(--display); font-size: 11px; letter-spacing: .14em; color: var(--accent); }
.live-pill.is-off b { color: var(--danger); }
.notice { position: absolute; top: calc(var(--gut) + 100px); left: var(--gut); max-width: 224px; font-size: 12px; color: var(--text-2); background: var(--panel-strong); border-radius: 10px; padding: 6px 10px; box-shadow: inset 0 0 0 1px var(--hair); }
.notice.reload { z-index: 6; cursor: pointer; color: var(--accent-ink); background: var(--accent); font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.notice.reload:hover, .notice.reload:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }

/* ---------- Top-center time capsule ---------- */
.timecap {
  top: var(--gut); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  padding: 8px 16px 12px; border-radius: 999px; overflow: hidden; min-width: 300px;
}
.tc-clock { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: -.01em; }
.tc-meta { display: grid; gap: 1px; font-size: 12px; line-height: 1.25; }
.tc-day { font-family: var(--display); font-weight: 600; letter-spacing: .14em; font-size: 10.5px; color: var(--muted); }
.tc-weather { color: var(--text); white-space: nowrap; }
.phase { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.08); white-space: nowrap; }
.phase.dawn { background: rgba(255,150,100,.18); color: #ffc2a0; }
.phase.day { background: rgba(255,214,90,.16); color: #ffe08a; }
.phase.dusk { background: rgba(230,120,200,.18); color: #f6b2e4; }
.phase.night { background: rgba(120,140,255,.2); color: #b9c4ff; }
.tc-bar { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.tc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgba(198,255,61,.4), var(--accent)); box-shadow: 0 0 8px var(--accent-glow); transition: width 1s linear; }

/* ---------- Top-right ---------- */
.topright { position: absolute; top: var(--gut); right: var(--gut); display: flex; align-items: center; gap: 8px; }
.spect { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.spect svg { color: var(--accent); width: 16px; height: 16px; }
.menu { top: calc(100% + 8px); right: 0; min-width: 230px; padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--panel-strong); z-index: 5; animation: popin .18s var(--ease); }
.menu.up { top: auto; bottom: calc(100% + 10px); }
@keyframes popin { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-title { padding: 6px 10px 8px; font-family: var(--display); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 10px; display: flex; gap: 10px; align-items: center; font-weight: 500; }
.menu button:hover { background: rgba(255,255,255,.07); color: var(--accent); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.switch-row:hover { background: rgba(255,255,255,.05); }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i, .toggle .sw { position: relative; width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .2s; flex: none; }
.switch-row i::after, .toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch-row input:checked + i, .toggle[aria-pressed="true"] .sw { background: var(--accent); }
.switch-row input:checked + i::after, .toggle[aria-pressed="true"] .sw::after { transform: translateX(14px); background: var(--accent-ink); }
.switch-row input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Right-edge city feed ---------- */
.feed-col { position: absolute; top: 76px; right: var(--gut); width: 320px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.feed-row {
  display: flex; gap: 10px; align-items: center; max-width: 100%; padding: 8px 12px 8px 8px; border-radius: 12px;
  background: rgba(10, 14, 24, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--hair), 0 6px 18px rgba(0,0,0,.25); font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.4);
  border-left: 3px solid var(--c, var(--accent)); animation: feedin .35s var(--ease);
  transition: opacity .5s ease, transform .5s ease;
}
.feed-row.clickable { cursor: pointer; }
.feed-row.clickable:hover { background: rgba(10,14,24,.8); box-shadow: inset 0 0 0 1px rgba(198,255,61,.3), 0 0 18px rgba(198,255,61,.12); }
.feed-row.out { opacity: 0; transform: translateX(16px); }
.feed-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.07); flex: none; font-size: 14px; }
.feed-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.feed-time { font-size: 11px; color: var(--muted); white-space: nowrap; margin-left: 2px; }
@keyframes feedin { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

@media (min-width: 768px) and (max-height: 860px) { .feed-row:nth-child(n+5) { display: none; } }
@media (min-width: 768px) and (max-height: 720px) { .feed-row:nth-child(n+4) { display: none; } }

/* ---------- Bottom-left minimap ---------- */
/* --mm-w: panel width, --mm-h: canvas height. app.js sets #ui.mm-wide when the city has the airport (wider than tall). */
#ui { --mm-w: 224px; --mm-h: 204px; }
#ui.mm-wide { --mm-w: 260px; --mm-h: 156px; }
@media (min-width: 768px) and (max-width: 1100px) { #ui.mm-wide { --mm-w: 224px; --mm-h: 134px; } }
.minimap { left: var(--gut); bottom: var(--gut); width: var(--mm-w); padding: 10px; }
.mm-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 2px 8px; }
.mm-label { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mm-canvas { display: block; width: calc(var(--mm-w) - 20px); height: var(--mm-h); border-radius: 10px; cursor: crosshair; box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- Bottom-center residents dock ---------- */
.dock {
  left: calc(var(--gut) + var(--mm-w) + 14px); right: calc(var(--gut) + 262px + 14px); bottom: var(--gut);
  display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 18px; max-width: 760px; margin: 0 auto;
  transition: right .3s var(--ease);
}
.dock-all { display: grid; justify-items: start; gap: 0; border: 0; background: rgba(255,255,255,.05); border-radius: 12px; padding: 8px 12px; box-shadow: inset 0 0 0 1px var(--hair); flex: none; transition: box-shadow .2s; }
.dock-all b { font-family: var(--display); font-size: 22px; line-height: 1.05; }
.dock-all:hover, .dock-btn:hover { box-shadow: inset 0 0 0 1px rgba(198,255,61,.4), 0 0 18px rgba(198,255,61,.15); }
.dock-track { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; padding: 2px; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 18px), transparent); mask: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 18px), transparent); }
.dock-track::-webkit-scrollbar { display: none; }
.chip-res { display: grid; justify-items: center; gap: 4px; border: 0; background: none; padding: 4px 4px 2px; border-radius: 12px; width: 62px; flex: none; scroll-snap-align: start; transition: background .2s, transform .15s var(--ease); }
.chip-res:hover { background: rgba(255,255,255,.07); transform: translateY(-2px); }
.chip-res.sel { background: rgba(198,255,61,.12); }
.chip-res { position: relative; }
.chip-res .nm { font-size: 11px; color: var(--text-2); max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c, #888) 32%, #0b0f1a); box-shadow: inset 0 0 0 2px var(--c, #888), 0 0 14px color-mix(in srgb, var(--c, #888) 35%, transparent);
  font-family: var(--display); font-weight: 700; font-size: 14px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.ring.away { filter: grayscale(.85); opacity: .55; }
.ring .ai { position: absolute; right: -4px; bottom: -3px; font-size: 8.5px; letter-spacing: .06em; font-weight: 700; padding: 1px 4px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); text-shadow: none; box-shadow: 0 0 0 2px #0b0f1a; }
.ring.lg { width: 44px; height: 44px; font-size: 15px; }
.dock-btn { display: inline-flex; align-items: center; gap: 7px; height: 54px; padding: 0 14px; border: 0; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; flex: none; transition: box-shadow .2s; }
.dock-btn svg { color: var(--accent); }
.dock .pop-wrap { position: relative; }
.dock .menu { right: 0; }

/* ---------- Bottom-right city supply ---------- */
.cstats { right: var(--gut); bottom: var(--gut); width: 262px; padding: 10px 12px 12px; }
.tk-strip, .cs-close { display: none; }
.cs-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 10px; }
.cs-tabs [data-ctab] { border: 0; background: rgba(255,255,255,.05); color: var(--text-2); border-radius: 8px; padding: 5px 8px; font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: background .2s, color .2s; }
.cs-tabs [data-ctab]:hover { color: var(--text); background: rgba(255,255,255,.09); }
.cs-tabs [data-ctab].active { background: var(--accent); color: var(--accent-ink); text-shadow: none; }
.cpanel { animation: fadein .2s ease; }
.cs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 0 12px; }

/* Token view (card tab + token modal) */
.tk-head { display: grid; gap: 1px; margin-bottom: 6px; }
.tk-title { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.tk-title b { font-family: var(--display); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-sym { font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.tk-chain { font-size: 11px; color: var(--muted); }
.tk-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tk-price { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.05; letter-spacing: -.01em; }
.tk-price.up { animation: flashup 1.2s ease; }
.tk-price.down { animation: flashdown 1.2s ease; }
@keyframes flashup { 15% { color: #5dff9a; } }
@keyframes flashdown { 15% { color: #ff7a7a; } }
.tk-change { font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-2); text-shadow: none; }
.tk-change.pos, .tks-chg.pos { background: rgba(61,220,132,.16); color: #6dffa8; }
.tk-change.neg, .tks-chg.neg { background: rgba(255,93,93,.16); color: #ff8f8f; }
.tk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.tk-stat { display: grid; gap: 2px; padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.tk-stat .kicker { font-size: 9.5px; letter-spacing: .12em; }
.tk-stat b { font-family: var(--display); font-size: 16px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skel { display: block; height: 14px; width: 70%; margin: 2px 0 1px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.06) 100%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tk-addr { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 9px; border-radius: 10px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 10px; }
.tk-addr .kicker { font-size: 9.5px; }
.tk-addr code { flex: 1; min-width: 0; font: 600 12.5px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-copy { width: 28px; height: 28px; border: 0; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--text); flex: none; transition: color .2s, box-shadow .2s; }
.tk-copy:hover { color: var(--accent); box-shadow: inset 0 0 0 1px rgba(198,255,61,.4); }
.tk-copy svg { width: 15px; height: 15px; }
.tk-actions { display: flex; gap: 6px; }
.tk-actions a { flex: 1; justify-content: center; text-decoration: none; }
.ghost-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--text); background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--hair-2); text-decoration: none; transition: box-shadow .2s, color .2s; white-space: nowrap; }
.ghost-btn:hover { color: var(--accent); box-shadow: inset 0 0 0 1px rgba(198,255,61,.45), 0 0 16px rgba(198,255,61,.15); }
.tk-updated { font-size: 10.5px; color: var(--muted); margin-top: 7px; text-align: right; }
.tk-updated:empty { display: none; }
.tk-soon-title { font-size: 13px; color: var(--text-2); margin-bottom: 10px; line-height: 1.4; }
.tk-soon-title b { color: var(--text); }
.tk-safe { margin: 0; font-size: 11.5px; color: #ffd79a; line-height: 1.4; }
.modal-token { margin: 0 0 18px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--hair); }
.modal-token .tk-grid { grid-template-columns: repeat(4, 1fr); }
.modal-token .tk-price { font-size: 34px; }
.modal-token .tk-actions a { flex: 0 0 auto; min-width: 140px; }
.modal-uses { margin-bottom: 8px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; }
.x-link { color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.x-link:hover { color: var(--accent); }
.x-btn svg.x-logo { width: 16px; height: 16px; fill: currentColor; stroke: none; }
a.icon-btn { text-decoration: none; }
.cs-item { display: grid; justify-items: center; gap: 0; padding: 6px 2px 5px; border-radius: 10px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); }
.cs-ico { font-size: 16px; line-height: 1.2; }
.cs-item b { font-family: var(--display); font-size: 17px; line-height: 1.15; }
.cs-item small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.bc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 600; }
.bc-top b { font-family: var(--display); font-size: 16px; color: var(--accent); }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; margin: 6px 0 5px; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8bd400, var(--accent)); box-shadow: 0 0 10px var(--accent-glow); transition: width .9s var(--ease); }
.bc-sub { font-size: 11px; color: var(--muted); }
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { color: var(--accent); transform: scale(1.12); } }

/* HUD visibility */
#ui.drawer-open .feed-col, #ui.drawer-open .cstats { opacity: 0; pointer-events: none; transform: translateX(20px); }
.feed-col, .cstats { transition: opacity .25s ease, transform .25s var(--ease); }
#ui.drawer-open .dock { right: calc(var(--gut) + var(--drawer-w) + 14px); }
#ui.hide-feed .feed-col, #ui.hide-map .minimap, #ui.hide-stats .cstats { display: none; }
#ui.hide-map .dock { left: var(--gut); }
#ui.hide-stats:not(.drawer-open) .dock { right: var(--gut); }

/* ---------- Drawer ---------- */
.drawer {
  top: 76px; right: var(--gut); bottom: var(--gut); width: var(--drawer-w); border-radius: 20px;
  background: var(--panel-strong); display: flex; flex-direction: column; overflow: hidden; animation: slidein .28s var(--ease);
}
@keyframes slidein { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.pane { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 14px 16px 0; animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.pane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pane-head h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .02em; flex: 1; }
.pane-scroll, .scroll { overflow-y: auto; min-height: 0; flex: 1; margin: 0 -16px; padding: 0 16px 20px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.search { width: 100%; border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 12px; padding: 10px 12px; outline: none; }
.search::placeholder, #talk-form ::placeholder { color: var(--muted); }
.search:focus, #talk-form input:focus, .composer:focus-within { box-shadow: inset 0 0 0 1px rgba(198,255,61,.5), 0 0 0 3px rgba(198,255,61,.12); }
.tabs { display: flex; gap: 4px; margin: 10px 0 8px; flex-wrap: wrap; }
.tabs button { border: 0; background: rgba(255,255,255,.04); padding: 6px 11px; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--text-2); transition: background .2s, color .2s; }
.tabs button:hover { color: var(--text); background: rgba(255,255,255,.08); }
.tabs button.active { background: var(--accent); color: var(--accent-ink); }
.tabs button.active .count { color: rgba(17,22,10,.6); }
.count { color: var(--muted); font-size: 11.5px; }
.res-list, .ev-list, .thread { list-style: none; margin: 0; padding: 0; }
.res-list { overflow-y: auto; flex: 1; margin: 0 -16px; padding: 2px 8px 16px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.res-row { display: flex; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.res-row:hover, .res-row:focus-visible { background: rgba(255,255,255,.06); }
.res-main { min-width: 0; flex: 1; }
.res-name { display: flex; align-items: baseline; gap: 6px; font-weight: 600; min-width: 0; }
.res-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-name .un { font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-status { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 13px; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--text-2); white-space: nowrap; font-family: var(--display); }
.badge.agent { background: var(--accent); color: var(--accent-ink); }
.badge.demo { background: rgba(255,255,255,.1); color: var(--text-2); }
.badge.job { background: rgba(255,255,255,.06); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); }

/* ---------- Profile (RPG card) ---------- */
.pf-hero {
  display: flex; gap: 14px; align-items: center; padding: 16px; margin: 0 0 12px; border-radius: 16px;
  background: radial-gradient(130% 110% at 0% 0%, color-mix(in srgb, var(--c, #888) 38%, transparent), transparent 62%), rgba(255,255,255,.035);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.pf-ring {
  width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; padding: 4px;
  background: conic-gradient(from 210deg, var(--c, #888), color-mix(in srgb, var(--c, #888) 30%, #fff), var(--c, #888));
  box-shadow: 0 0 28px color-mix(in srgb, var(--c, #888) 55%, transparent);
}
.pf-glyph { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: 38px; background: radial-gradient(circle at 35% 30%, #1d2640, #0a0e18); }
.pf-ring.away { filter: grayscale(.85); }
.pf-id { min-width: 0; }
.pf-id h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.05; overflow-wrap: anywhere; }
.handle { color: var(--muted); margin: 2px 0 8px; overflow-wrap: anywhere; font-size: 13px; }
.badges { display: flex; gap: 5px; flex-wrap: wrap; }
.pf-status { display: flex; gap: 9px; align-items: center; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); padding: 9px 12px; border-radius: 12px; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.stat-bars { display: grid; gap: 9px; margin: 14px 0 12px; }
.statbar { display: grid; grid-template-columns: 76px 1fr 30px; gap: 10px; align-items: center; font-size: 12px; }
.statbar .lb { font-family: var(--display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 10.5px; color: var(--text-2); }
.statbar .track { position: relative; height: 10px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.statbar .track::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(10,14,24,.55) calc(10% - 1px) 10%); pointer-events: none; }
.statbar .fill { height: 100%; width: 0; border-radius: 3px; transition: width .8s var(--ease); box-shadow: 0 0 12px rgba(255,255,255,.15); }
.statbar .v { text-align: right; font-family: var(--display); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); }
.chip b { color: var(--text); font-family: var(--display); font-size: 13.5px; }
.pf-bio { margin: 0 0 10px; color: var(--text-2); overflow-wrap: anywhere; }
.pf-intent { display: grid; gap: 3px; margin: 0 0 14px; padding: 10px 12px; border-left: 2px solid var(--accent); background: rgba(198,255,61,.05); border-radius: 0 10px 10px 0; font-size: 13px; overflow-wrap: anywhere; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toggle { display: inline-flex; align-items: center; gap: 9px; border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 600; font-size: 13px; }
.toggle[aria-pressed="true"] { color: var(--accent); box-shadow: inset 0 0 0 1px rgba(198,255,61,.4), 0 0 16px rgba(198,255,61,.15); }
.reacts { display: flex; gap: 5px; flex-wrap: wrap; }
.react { border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 999px; padding: 6px 10px; display: inline-flex; gap: 5px; align-items: center; font-size: 13px; transition: transform .12s var(--ease), box-shadow .2s; }
.react:hover { transform: translateY(-2px) scale(1.05); box-shadow: inset 0 0 0 1px rgba(198,255,61,.4), 0 0 14px rgba(198,255,61,.18); }
.react.pop { animation: pop .4s var(--ease); }
@keyframes pop { 45% { transform: scale(1.3); } }
.section-title { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.chat { margin-bottom: 18px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px var(--hair); }
.thread { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; margin: 0 -4px 10px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.msg { font-size: 13px; }
.msg-line { overflow-wrap: anywhere; }
.msg-line .who { font-weight: 700; color: #9fd2ff; margin-right: 6px; }
.msg-line .when { font-size: 10.5px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.reply { margin: 4px 0 0 12px; padding-left: 9px; border-left: 2px solid var(--c, var(--accent)); }
.reply .who { color: var(--c, var(--accent)); }
.reply.pending { color: var(--muted); font-style: italic; font-size: 12px; }
.tag { font-family: var(--display); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.1); color: var(--text-2); margin-right: 6px; vertical-align: 1px; }
#talk-form { display: grid; gap: 6px; }
#talk-form input { width: 100%; border: 0; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 10px; padding: 8px 11px; outline: none; font-size: 13px; }
.composer { display: flex; gap: 6px; align-items: flex-end; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 12px; padding: 6px 6px 6px 11px; }
.composer textarea { flex: 1; border: 0; background: none; outline: none; resize: none; padding: 3px 0; font-size: 13.5px; min-height: 40px; }
.send { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; transition: box-shadow .2s, opacity .2s; }
.send:hover:not(:disabled) { box-shadow: 0 0 18px rgba(198,255,61,.45); }
.send:disabled { opacity: .3; cursor: not-allowed; }
.send svg { fill: currentColor; stroke: none; }
.counter { font-size: 11px; color: var(--muted); justify-self: end; }
.counter.bad { color: var(--danger); }

/* Event lists (journal + profile) */
.ev { display: flex; gap: 10px; padding: 9px 8px; border-radius: 12px; align-items: flex-start; }
.ev.clickable { cursor: pointer; }
.ev.clickable:hover { background: rgba(255,255,255,.06); }
.ev-icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair), inset 3px 0 0 var(--c, transparent); display: grid; place-items: center; flex: none; font-size: 15px; }
.ev-body { min-width: 0; flex: 1; }
.ev-text { overflow-wrap: anywhere; font-size: 13.5px; }
.ev-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ev.new { animation: feedin .4s var(--ease); }
.live-mini { display: inline-flex; gap: 6px; align-items: center; font-family: var(--display); font-size: 10.5px; letter-spacing: .14em; color: var(--accent); font-weight: 600; }


/* ---------- Land panel ---------- */
.land-stats { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 12px; }
.ls-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ls-stat { display: grid; gap: 1px; }
.ls-stat b { font-family: var(--display); font-size: 20px; line-height: 1.1; }
.ls-stat span { font-size: 11.5px; color: var(--muted); }
.ls-stat.burn b { color: #ffb36b; }
.burn-list { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--hair); display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
.burn-list li { display: flex; justify-content: space-between; gap: 8px; }
.tx-link { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: 12px; }
.tx-link:hover { text-decoration: underline; }
.land-banner { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 12px; margin-bottom: 10px; background: rgba(255,177,61,.1); box-shadow: inset 0 0 0 1px rgba(255,177,61,.35); font-size: 13px; }
.land-banner > span { flex: 1; }
.land-banner.for { background: rgba(198,255,61,.08); box-shadow: inset 0 0 0 1px rgba(198,255,61,.3); }
.land-banner .ring { width: 30px; height: 30px; font-size: 11px; }
.land-closed { padding: 12px; border-radius: 12px; margin-bottom: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); font-weight: 600; }
.zone { margin-bottom: 16px; }
.zone-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 0 2px 6px; }
.zone-head h3 { margin: 0; font-family: var(--display); font-size: 15px; }
.zone-desc { font-size: 12px; color: var(--muted); }
.zone-price { display: grid; justify-items: end; }
.zone-price b { font-family: var(--display); font-size: 13.5px; color: var(--accent); }
.zone-price small { font-size: 11px; color: var(--muted); }
.lot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lot-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; transition: background .15s, box-shadow .2s; min-height: 46px; }
.lot-row:hover { background: rgba(255,255,255,.07); }
.lot-row.focus { box-shadow: inset 0 0 0 1px rgba(198,255,61,.55), 0 0 16px rgba(198,255,61,.12); }
.lot-main { flex: 1; min-width: 0; display: grid; }
.lot-main b { font-family: var(--display); font-size: 14px; }
.lot-sub { font-size: 11.5px; color: var(--muted); }
.lot-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.odot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.lot-chip { font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--text-2); white-space: nowrap; }
.lot-chip.available { background: rgba(198,255,61,.14); color: var(--accent); }
.lot-chip.reserved { background: rgba(255,177,61,.16); color: #ffc46b; }
.lot-chip.sold { background: rgba(255,255,255,.12); color: var(--text); }
.fine { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.pf-lots { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.lot-tag { border: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--text); padding: 5px 10px; border-radius: 999px; background: rgba(198,255,61,.1); box-shadow: inset 0 0 0 1px rgba(198,255,61,.35); cursor: pointer; }
.lot-tag:hover { background: rgba(198,255,61,.18); }
.toggle.give { padding: 6px 12px; }
.tk-land { width: 100%; margin-top: 6px; }

.land-explain { margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; padding: 10px 12px; border-radius: 12px; background: rgba(198,255,61,.05); box-shadow: inset 0 0 0 1px rgba(198,255,61,.2); }
.ls-row.four { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ls-row.four .ls-stat b { font-size: 15px; }
.ls-row.four .ls-stat span { font-size: 10.5px; line-height: 1.25; }
.recent { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hair); }
.recent .burn-list { margin: 4px 0 0; padding: 0; border: 0; }
.recent li small { white-space: nowrap; }
.burn-links { margin: 8px 0 0; font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.lot-top { display: flex; align-items: baseline; gap: 6px; }
.lot-sales { font-family: var(--display); font-size: 11px; font-weight: 700; color: var(--muted); }
.lot-price { display: grid; justify-items: end; flex: none; }
.lot-price b { font-family: var(--display); font-size: 13px; color: var(--text); white-space: nowrap; }
.lot-price small { font-size: 10.5px; color: var(--muted); }
.lot-sub.amber { color: #ffc46b; }
.lot-owner b { font-weight: 600; }
.lot-row.mine { box-shadow: inset 0 0 0 1px rgba(198,255,61,.35); }
.cta.small.takeover { background: #ffd26b; box-shadow: 0 6px 18px rgba(255,190,80,.25), inset 0 -2px 0 rgba(0,0,0,.14); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 12px 0; }
.total-row b { font-family: var(--display); font-size: 18px; color: var(--accent); }
.breakdown .tr-state b { font-family: var(--display); font-size: 14px; color: var(--text); }

/* ---------- Land purchase modal ---------- */
.buy-modal { width: min(560px, calc(100vw - 24px)); }
.buy-progress { list-style: none; display: flex; gap: 4px; margin: 0 0 14px; padding: 0; }
.buy-progress li { flex: 1; display: grid; justify-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; position: relative; }
.buy-progress li::after { content: ""; position: absolute; top: 12px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: rgba(255,255,255,.1); }
.buy-progress li:last-child::after { display: none; }
.buy-progress li.done::after { background: var(--accent); }
.buy-progress i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 11px; background: rgba(255,255,255,.08); color: var(--text-2); }
.buy-progress li.now { color: var(--text); }
.buy-progress li.now i { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 14px var(--accent-glow); }
.buy-progress li.done i { background: rgba(198,255,61,.2); color: var(--accent); }
.buy-lot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 14px; }
.bl-main { display: grid; flex: 1; min-width: 150px; }
.bl-main b { font-family: var(--display); font-size: 17px; }
.bl-main span { font-size: 12px; color: var(--muted); }
.bl-price { display: grid; justify-items: end; }
.bl-price b { font-family: var(--display); font-size: 16px; color: var(--accent); }
.bl-price small { font-size: 11px; color: var(--muted); }
.bl-for { display: flex; align-items: center; gap: 8px; width: 100%; padding-top: 8px; border-top: 1px solid var(--hair); font-weight: 600; }
.bl-for .ring { width: 28px; height: 28px; font-size: 11px; }
.buy-body { display: grid; gap: 10px; min-height: 120px; }
.buy-note { margin: 0; font-size: 13px; color: var(--text-2); }
.buy-msg { margin: 0; font-size: 13px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--text-2); }
.buy-msg.error { background: rgba(255,93,93,.1); box-shadow: inset 0 0 0 1px rgba(255,93,93,.35); color: #ffb0b0; }
.buy-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.buy-actions.left { justify-content: flex-start; }
.buy-actions.center { justify-content: center; }
.link { background: none; border: 0; padding: 6px 2px; color: var(--accent); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; text-shadow: none; }
.link:hover { text-decoration: underline; }
.buy-actions .link { color: var(--text-2); margin-right: auto; }
.buy-actions .link:hover { color: var(--text); }
.cta:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.pick-list { list-style: none; margin: 0; padding: 2px; display: grid; gap: 4px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; text-align: left; padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); }
.pick:hover { background: rgba(255,255,255,.07); }
.pick.sel { background: rgba(198,255,61,.1); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pick .ring { width: 34px; height: 34px; font-size: 12px; }
.pick-name { flex: 1; display: grid; min-width: 0; }
.pick-name small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wallet-btn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; padding: 11px 14px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair-2); font-weight: 600; font-size: 14px; text-align: left; transition: box-shadow .2s; }
.wallet-btn:hover:not(:disabled) { box-shadow: inset 0 0 0 1px rgba(198,255,61,.5), 0 0 18px rgba(198,255,61,.12); }
.wallet-btn:disabled { opacity: .5; cursor: wait; }
.wallet-btn { justify-content: flex-start; color: var(--text); }
.w-icon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.w-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.w-letter { font-family: var(--display); font-size: 14px; color: var(--text); }
.w-name { flex: 1 1 auto; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-cta { flex: none; color: var(--accent); font-size: 12px; font-weight: 600; }
.no-wallet { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); display: grid; gap: 6px; justify-items: start; }
.no-wallet p { margin: 0; font-size: 13px; color: var(--text-2); }
.wallet-chip { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 12.5px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.split > div { display: grid; gap: 2px; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.split b { font-family: var(--display); font-size: 15px; }
.countdown { justify-self: start; font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--accent); padding: 4px 10px; border-radius: 999px; background: rgba(198,255,61,.1); font-variant-numeric: tabular-nums; }
.countdown:empty { display: none; }
.countdown.low { color: #ffc46b; background: rgba(255,177,61,.14); }
.short { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255,177,61,.08); box-shadow: inset 0 0 0 1px rgba(255,177,61,.35); justify-items: start; }
.short p { margin: 0; font-size: 13px; color: var(--text-2); }
.transfers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow .3s; }
.tr.signing, .tr.confirming { box-shadow: inset 0 0 0 1px rgba(255,177,61,.5); }
.tr.verified { box-shadow: inset 0 0 0 1px rgba(198,255,61,.5); background: rgba(198,255,61,.06); }
.tr.rejected, .tr.error { box-shadow: inset 0 0 0 1px rgba(255,93,93,.45); }
.tr-ico { font-size: 22px; }
.tr-main { flex: 1; display: grid; min-width: 0; }
.tr-main b { font-family: var(--display); font-size: 14.5px; }
.tr-main small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-state { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; flex-wrap: wrap; justify-content: flex-end; }
.tr.verified .tr-state { color: var(--accent); }
.tr.rejected .tr-state, .tr.error .tr-state { color: #ff9a9a; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.celebrate { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 10px 0 4px; }
.celebrate b { font-family: var(--display); font-size: 20px; line-height: 1.25; }
.celebrate p { margin: 0; color: var(--text-2); }
.confetti { font-size: 48px; animation: pop .8s var(--ease); }


/* ---------- Wallet HUD control ---------- */
.wallet-hud { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 12px; font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; transition: box-shadow .2s var(--ease), color .2s; }
.wallet-hud svg { color: var(--accent); width: 17px; height: 17px; }
.wallet-hud:hover { box-shadow: 0 0 0 1px rgba(198,255,61,.35), 0 0 22px rgba(198,255,61,.18); }
.wallet-hud.connected svg { display: none; }
.wallet-hud.connected #wallet-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.wallet-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 0 10px rgba(255,255,255,.2); }
.wallet-menu { min-width: 300px; max-width: min(340px, calc(100vw - 20px)); max-height: min(560px, calc(100dvh - 90px)); overflow-y: auto; right: 0; }
.wallet-menu .wallet-list { margin: 4px 2px 2px; }
.wallet-menu .no-wallet { margin: 4px 2px; }
.menu-note { margin: 0 10px 8px; font-size: 12px; color: var(--text-2); }
.wm-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
.wm-head span { display: grid; }
.wm-head b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.wm-head small { font-size: 11.5px; color: var(--muted); }
.wm-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.wm-list { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 2px; }
.menu .wm-row { width: 100%; gap: 10px; padding: 6px 8px; }
.wm-row .ring { width: 30px; height: 30px; font-size: 11px; }
.wm-empty { padding: 6px 10px 8px; font-size: 12.5px; color: var(--muted); }
.wm-sep { height: 1px; background: var(--hair); margin: 4px 6px; }
.menu .menu-link { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-weight: 500; color: var(--text); text-decoration: none; }
.menu .menu-link:hover { background: rgba(255,255,255,.07); color: var(--accent); }
.menu button.danger:hover { color: #ff8f8f; }
.menu button:disabled { opacity: .45; cursor: not-allowed; }
.pending-ring { background: rgba(255,177,61,.14); box-shadow: inset 0 0 0 2px rgba(255,177,61,.6); font-size: 13px; }
.mine-tag { font-family: var(--display); font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: 0 4px; margin-top: -2px; text-shadow: none; }
.badge.yours { background: rgba(198,255,61,.14); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(198,255,61,.45); }
.pick-head { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 6px 4px 2px; }

/* ---------- Bring your Muse (claim flow) ---------- */
#modal-bring { width: min(600px, calc(100vw - 24px)); }
.bring-body { display: grid; gap: 12px; margin-bottom: 14px; }
.claim-form { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field-label { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.field-input { width: 100%; border: 0; border-radius: 12px; padding: 11px 13px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text); font-size: 15px; outline: none; }
.field-input::placeholder { color: var(--muted); }
.field-input:focus, .at-wrap:focus-within { box-shadow: inset 0 0 0 1px rgba(198,255,61,.55), 0 0 0 3px rgba(198,255,61,.12); }
.field-input:disabled { opacity: .6; }
.at-wrap { display: flex; align-items: center; border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair-2); }
.at-wrap .at { padding: 0 2px 0 13px; color: var(--muted); font-weight: 600; font-size: 15px; }
.field-input.bare { background: none; box-shadow: none; padding-left: 3px; }
.field-input.bare:focus { box-shadow: none; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.field-hint.bad { color: #ff9a9a; }
.field .wallet-chip { justify-self: start; }
.small-link { font-size: 12px; padding: 0 2px; }
.claim-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.waiting { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(198,255,61,.06); box-shadow: inset 0 0 0 1px rgba(198,255,61,.25); font-weight: 600; font-size: 13.5px; }
.waiting-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 1.6s infinite; }
.owned { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); }
.owned-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.slots { font-size: 12px; font-weight: 600; color: var(--accent); }
.slots.full { color: #ffc46b; }
.owned-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.owned-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owned-row .ring { width: 32px; height: 32px; font-size: 12px; }
.owned-row .pick-name { flex: 1; min-width: 120px; }
.owned-row .ghost-btn { padding: 5px 10px; font-size: 12px; }
.bring-body .prompt-box { margin-bottom: 0; }

/* ---------- Profile owner row ---------- */
.pf-owner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; padding: 8px 10px 8px 12px; border-radius: 12px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; }
.pf-owner:empty { display: none; }
.pf-owner .kicker { margin-right: 2px; }
.owner-addr { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text); text-decoration: none; }
.owner-addr:hover, .owner-x:hover { color: var(--accent); text-decoration: underline; }
.owner-x { color: #9fd2ff; font-weight: 600; text-decoration: none; }
.pf-owner .self { font-size: 10.5px; color: var(--muted); }
.pf-owner .tk-copy { width: 24px; height: 24px; }
.pf-owner .tk-copy svg { width: 13px; height: 13px; }


/* ---------- Beacon Seasons ---------- */
.se-panel { max-height: min(40vh, 380px); overflow-y: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.se-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 8px; }
.se-title { white-space: nowrap; }
.se-title { font-family: var(--display); font-size: 17px; }
.se-chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-2); white-space: nowrap; text-shadow: none; }
.se-chip.lime { background: rgba(198,255,61,.14); color: var(--accent); }
.se-chip.amber { background: rgba(255,177,61,.16); color: #ffc46b; }
.se-chip.gray { background: rgba(255,255,255,.08); color: var(--text-2); }
.se-chip b { font-family: inherit; }
.se-bar { height: 8px; margin: 6px 0 10px; }
.se-pool { display: grid; gap: 1px; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); margin-bottom: 10px; }
.se-pool-num { font-family: var(--display); font-size: 22px; line-height: 1.15; color: var(--accent); }
.se-pool-soon { font-family: var(--display); font-size: 14px; }
.se-parts { font-size: 10.5px; color: var(--muted); }
.se-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.se-sub small { font-size: 11px; }
.se-top { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.se-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; font-size: 12px; }
.se-row:nth-child(odd) { background: rgba(255,255,255,.03); }
.se-row.clickable { cursor: pointer; }
.se-row.clickable:hover { background: rgba(255,255,255,.08); }
.se-rank { font-family: var(--display); font-weight: 700; color: var(--muted); }
.se-row:first-child .se-rank { color: var(--accent); }
.se-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.se-owner { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; color: var(--muted); }
.se-pts { font-family: var(--display); font-size: 12px; }
.se-empty { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.se-rules { margin: 0 0 10px; font-size: 11px; color: var(--text-2); line-height: 1.45; }
.se-you { display: grid; gap: 6px; padding: 9px 10px; border-radius: 12px; background: rgba(198,255,61,.05); box-shadow: inset 0 0 0 1px rgba(198,255,61,.22); margin-bottom: 8px; font-size: 12px; }
.se-you.muted-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); color: var(--text-2); }
.se-you .se-sub b { font-family: var(--display); color: var(--accent); }
.se-mine, .se-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.se-mine li { display: flex; justify-content: space-between; gap: 8px; }
.se-check li { display: flex; gap: 7px; align-items: baseline; }
.se-check i { font-style: normal; font-weight: 700; width: 12px; }
.se-check .ok i { color: var(--accent); }
.se-check .no i { color: #ff8f8f; }
.se-check .na i { color: var(--muted); }
.se-how { font-size: 12px; padding: 2px 0 4px; }
.season-modal { width: min(680px, calc(100vw - 24px)); }
.season-body { display: grid; gap: 10px; }
.season-body .lead { margin: 0; }
.se-h { margin: 8px 0 0; font-family: var(--display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.se-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.se-table td, .se-table th { padding: 7px 10px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.se-table th { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.se-table td.num { text-align: right; white-space: nowrap; font-family: var(--display); }
.se-table tr.mine td { background: rgba(198,255,61,.07); }
.se-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.se-table td:last-child { min-width: 118px; }
.se-table small { color: #9fd2ff; }
.se-table .badge.yours { margin-left: 6px; }
.se-res { font-size: 11px; color: var(--muted); margin-top: 2px; }
.se-scroll { overflow-x: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); }
.se-bullets { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.se-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.se-hist-row { display: grid; grid-template-columns: auto auto 1fr auto 14px; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); text-align: left; font-size: 13px; color: var(--text); }
.se-hist-row:hover { box-shadow: inset 0 0 0 1px rgba(198,255,61,.45); }
.se-hist-row .num { text-align: right; font-family: var(--display); }
.se-go { color: var(--muted); font-size: 18px; line-height: 1; }
.se-payout { display: grid; gap: 6px; justify-items: start; padding: 10px 12px; border-radius: 12px; background: rgba(255,177,61,.07); box-shadow: inset 0 0 0 1px rgba(255,177,61,.3); }
.se-payout p { margin: 0; }
.se-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }


/* ---------- Guide ("?" button, first-visit pill, guide modal) ---------- */
.brand-top { display: flex; align-items: center; gap: 8px; }
.brand-top .brand-row { flex: 1; min-width: 0; }
.help-btn { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 14px rgba(198,255,61,.35); text-shadow: none; transition: transform .15s var(--ease), box-shadow .2s; }
.help-btn:hover { transform: scale(1.08); box-shadow: 0 0 22px rgba(198,255,61,.55); }
.menu .menu-guide { font-weight: 600; color: var(--accent); margin-bottom: 4px; border-bottom: 1px solid var(--hair); border-radius: 10px 10px 4px 4px; }
.guide-pill { left: 50%; bottom: 100px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 6px; border-radius: 999px; z-index: 3; animation: feedin .4s var(--ease); max-width: calc(100vw - 24px); }
.g-pill-go { border: 0; background: none; padding: 8px 10px; font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-pill-go:hover { color: var(--accent); }
.g-pill-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--text-2); flex: none; }
.g-pill-x:hover { color: var(--text); background: rgba(255,255,255,.14); }
.modal.guide { width: min(1000px, calc(100vw - 24px)); max-width: none; height: min(780px, calc(100dvh - 24px)); max-height: none; padding: 0; display: none; overflow: hidden; }
.modal.guide[open] { display: flex; flex-direction: column; }
.g-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--hair); flex: none; }
.g-headtext { flex: 1; min-width: 0; }
.guide-title { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 24px; }
.g-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); }
.g-lang-btn { border: 0; background: none; color: var(--text-2); font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; }
.g-lang-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.guide .g-close { position: static; }
.g-select-wrap { display: none; position: relative; padding: 10px 16px 0; flex: none; }
.g-select-wrap::after { content: "▾"; position: absolute; right: 30px; top: 50%; transform: translateY(-30%); color: var(--accent); pointer-events: none; }
.g-select { width: 100%; border: 0; border-radius: 12px; padding: 11px 36px 11px 13px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text); font-weight: 600; font-size: 14px; outline: none; cursor: pointer; }
.g-select:focus { box-shadow: inset 0 0 0 1px rgba(198,255,61,.55), 0 0 0 3px rgba(198,255,61,.12); }
.g-select option { background: #0d1220; color: var(--text); }
.g-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr; }
.g-side { border-right: 1px solid var(--hair); overflow-y: auto; padding: 12px 10px; }
.g-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-nav-btn { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; }
.g-nav-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.g-nav-btn.active { background: rgba(198,255,61,.12); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.g-nav-ico { width: 22px; text-align: center; flex: none; }
.g-pane { overflow-y: auto; padding: 20px 26px 26px; outline: none; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.g-pane.g-in { animation: gfade .28s var(--ease); }
@keyframes gfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.g-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--display); font-size: 26px; font-weight: 700; }
.g-pane > p { margin: 0 0 12px; color: var(--text-2); line-height: 1.6; max-width: 70ch; }
.g-pane b { color: var(--text); }
.g-list { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); line-height: 1.55; max-width: 72ch; }
.g-list li::marker { color: var(--accent); }
.g-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(198,255,61,.06); box-shadow: inset 0 0 0 1px rgba(198,255,61,.25); color: var(--text-2); line-height: 1.5; }
.g-note.warn { background: rgba(255,180,60,.08); box-shadow: inset 0 0 0 1px rgba(255,180,60,.3); color: #ffd79a; }
.g-steps { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.g-step { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); }
.g-step-text { display: flex; gap: 10px; align-items: flex-start; }
.g-step-text p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.g-num { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 12px; }
.g-figure { margin: 0; }
.g-figure.wide { margin: 0 0 14px; max-width: 520px; }
.g-figure figcaption { margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.g-fig { display: block; width: 100%; height: auto; border-radius: 12px; stroke: none; stroke-width: 1; fill: none; }
.g-fig text { stroke: none; }
.g-table-wrap { overflow-x: auto; margin: 0 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); }
.g-cap { padding: 8px 12px 0; font-family: var(--display); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.g-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.g-table th, .g-table td { padding: 8px 12px; border-bottom: 1px solid var(--hair); text-align: left; }
.g-table th { font-family: var(--display); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.g-table td { color: var(--text-2); }
.g-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.g-table.num td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-table tr:last-child td { border-bottom: 0; }
.g-devs { display: grid; gap: 6px; justify-items: start; margin: 0 0 14px; }
.g-devlink { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 13px; }
.g-devlink:hover { text-decoration: underline; }
.g-try { display: grid; gap: 8px; margin: 18px 0 8px; padding: 14px; border-radius: 14px; background: rgba(198,255,61,.05); box-shadow: inset 0 0 0 1px rgba(198,255,61,.22); }
.g-try-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.g-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.g-foot .link { color: var(--text-2); }
.g-foot .link:hover { color: var(--accent); }
/* SVG mockup theme */
.g-bg { fill: #0a1426; }
.g-block { fill: #16233a; }
.g-panel { fill: rgba(9, 13, 24, .94); stroke: rgba(255,255,255,.14); stroke-width: 1; }
.g-row { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.06); }
.g-sel { stroke: var(--accent); stroke-width: 1.6; fill: rgba(198,255,61,.1); }
.g-pill { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.14); }
.g-cta, .g-btn { fill: var(--accent); }
.g-selbtn { stroke: #fff; stroke-width: 1.4; }
.g-btn2 { fill: #ffd26b; }
.g-mini { fill: rgba(255,255,255,.08); }
.g-code { fill: #05070d; stroke: rgba(255,255,255,.16); }
.g-codeline { fill: rgba(223,232,255,.18); }
.g-reply { fill: rgba(198,255,61,.08); stroke: rgba(198,255,61,.35); }
.g-map { fill: #1e3326; }
.g-place { fill: rgba(10,14,24,.9); stroke: var(--accent); stroke-width: 1.5; }
.g-track { fill: rgba(255,255,255,.1); }
.g-fill { fill: var(--accent); }
.g-lot { fill: #e8a0a8; stroke: #fff; stroke-width: 1.4; }
.g-res1 { fill: #f6a04d; } .g-res2 { fill: #e8a0a8; } .g-res3 { fill: #7fd1c7; } .g-res4 { fill: #c6ff3d; }
.g-target { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 2; }
.g-hot { fill: var(--accent); stroke: #0a0e18; stroke-width: 2; }
.g-hot-t { fill: var(--accent-ink); font: 700 11px var(--display); }
.g-arrow { stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; }
.g-arrowhead { fill: var(--accent); }
.g-label { fill: #f4f7ff; font: 600 10px var(--sans); }
.g-muted { fill: rgba(214,222,240,.6); font: 500 9px var(--sans); }
.g-micro { fill: rgba(214,222,240,.6); font: 700 7.5px var(--display); letter-spacing: .08em; }
.g-kicker { fill: rgba(214,222,240,.62); font: 700 8px var(--display); letter-spacing: .14em; }
.g-title { fill: #f4f7ff; font: 700 14px var(--display); }
.g-brand { fill: #f4f7ff; font: 700 12px var(--display); }
.g-big { fill: var(--accent); font: 700 16px var(--display); }
.g-acc { fill: var(--accent); font: 700 9px var(--display); }
.g-amber { fill: #ffc46b; font: 700 8.5px var(--display); }
.g-tag { fill: rgba(214,222,240,.7); font: 700 7px var(--display); letter-spacing: .08em; }
.g-mono { fill: #dfe8ff; font: 600 9.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.g-emoji { font-size: 12px; }
.g-btn-t { fill: var(--accent-ink); font: 700 9px var(--display); }
.g-btn2-t { fill: #1b1405; font: 700 9px var(--display); }

/* ---------- Toasts ---------- */
.toasts { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); z-index: 4; }
.toast { background: var(--panel-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--text); padding: 10px 16px 10px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow), inset 0 0 0 1px var(--hair); border-left: 3px solid var(--accent); animation: toastin .25s var(--ease); max-width: 100%; overflow-wrap: anywhere; }
.toast.error { border-left-color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .3s ease; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Intro title card ---------- */
#intro {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center;
  background: radial-gradient(90% 70% at 50% 45%, #18223a 0%, #080b14 70%); transition: opacity .7s ease, visibility .7s;
}
#intro.out { opacity: 0; visibility: hidden; }
.intro-inner { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 0 24px; animation: introin 1s var(--ease); }
.intro-inner img { filter: drop-shadow(0 0 24px rgba(198,255,61,.35)); margin-bottom: 6px; }
.intro-title { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 9vw, 84px); letter-spacing: -.02em; line-height: 1; color: #fff; }
.intro-title span { color: var(--accent); text-shadow: 0 0 40px rgba(198,255,61,.35); }
.intro-sub { font-size: clamp(14px, 2.2vw, 18px); color: var(--text-2); letter-spacing: .04em; }
.intro-bar { width: min(260px, 70vw); height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 22px; }
.intro-bar i { display: block; height: 100%; width: 4%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); transition: width .5s var(--ease); }
.intro-hint { font-family: var(--display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); min-height: 1.2em; }
@keyframes introin { from { opacity: 0; transform: translateY(12px) scale(.98); letter-spacing: .3em; } to { opacity: 1; transform: none; } }

/* ---------- Modals ---------- */
.modal {
  border: 0; padding: 28px; border-radius: 22px; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  background: linear-gradient(180deg, #121a2c, #0b101c); color: var(--text); overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,.6), inset 0 0 0 1px var(--hair-2), inset 0 1px 0 rgba(255,255,255,.1);
}
.modal[open] { animation: modalin .25s var(--ease); }
.modal::backdrop { background: rgba(4, 6, 12, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-title { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.08; margin: 8px 0 12px; padding-right: 40px; letter-spacing: -.01em; }
.lead { font-size: 15px; color: var(--text-2); margin: 0 0 18px; }
.token-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.tcard { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); border-radius: 16px; padding: 14px; transition: box-shadow .2s, transform .2s var(--ease); }
.tcard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(198,255,61,.35), 0 0 22px rgba(198,255,61,.1); }
.tcard h3 { margin: 8px 0 4px; font-family: var(--display); font-size: 16px; }
.tcard p { margin: 0; font-size: 13px; color: var(--text-2); }
.tcard-icon { font-size: 24px; }
.warning { background: rgba(255,180,60,.1); box-shadow: inset 0 0 0 1px rgba(255,180,60,.35); color: #ffd79a; border-radius: 12px; padding: 10px 14px; font-weight: 500; font-size: 13.5px; margin: 0 0 8px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 4px 0 16px; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; background: rgba(198,255,61,.12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(198,255,61,.35); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 12px; }
.steps span { color: var(--text-2); font-size: 13px; }
.prompt-box { background: #05070d; box-shadow: inset 0 0 0 1px var(--hair-2); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.prompt-box pre { margin: 0 0 12px; white-space: pre-wrap; word-break: break-word; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #dfe8ff; }
.links a { color: var(--accent); font-weight: 600; }
.modal p { margin: 0 0 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
  .timecap { left: calc(var(--gut) + 224px + 12px); transform: none; min-width: 0; }
  .spect .extra { display: none; }
}
@media (min-width: 768px) {
  #ui.drawer-open .toasts { left: calc((100% - var(--drawer-w) - 16px) / 2); }
}
@media (min-width: 768px) and (max-width: 1280px) {
  #ui.drawer-open .minimap { opacity: 0; pointer-events: none; }
  #ui.drawer-open .dock { left: var(--gut); }
}
@media (max-width: 1140px) {
  .spect { display: none; }
}
@media (max-width: 1320px) {
  .spect { display: none; }
}
@media (max-width: 1060px) {
  .wallet-hud:not(.connected) #wallet-label { display: none; }
  .wallet-hud:not(.connected) { padding: 0; width: 40px; justify-content: center; }
}
@media (min-width: 768px) and (max-width: 940px) {
  .timecap .phase { display: none; }
  .topright { gap: 6px; }
  .topright .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
  .topright .cta { padding: 9px 12px; font-size: 13px; }
  .topright .cta span { display: none; }
}
@media (max-width: 1020px) {

  .tc-weather .wx-text { display: none; }
  :root { --drawer-w: 380px; }
}
@media (max-width: 767px) {
  :root { --gut: 10px; --blur: blur(8px) saturate(1.3); --panel: rgba(10, 14, 24, 0.78); }
  body { font-size: 13.5px; }
  .brand { width: auto; padding: 7px 10px 7px 7px; gap: 6px; right: auto; }
  .brand-row img { width: 26px; height: 26px; border-radius: 8px; }
  .wordmark { font-size: 18px; }
  .live-pill { font-size: 11px; padding: 3px 8px; }
  .notice { top: auto; bottom: 150px; max-width: none; right: var(--gut); }
  .timecap { left: auto; right: var(--gut); transform: none; gap: 8px; padding: 8px 12px 11px; min-width: 0; }
  .tc-clock { font-size: 22px; }
  .tc-meta { font-size: 11px; }
  .tc-weather .wx-text { display: none; }
  .phase { display: none; }
  .tc-bar { left: 12px; right: 12px; bottom: 4px; }
  .topright { top: 88px; right: var(--gut); gap: 6px; }
  .topright .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
  .cta { padding: 9px 13px; font-size: 13px; border-radius: 10px; }
  .feed-col { top: 134px; right: var(--gut); left: auto; width: min(300px, calc(100% - 2 * var(--gut))); }
  .feed-row { font-size: 12.5px; padding: 6px 10px 6px 6px; }
  .feed-row:nth-child(n+3) { display: none; }
  .minimap { display: none; }
  .cstats { left: var(--gut); right: var(--gut); width: auto; bottom: 92px; padding: 0; }
  .cstats .cs-card { display: none; }
  .tk-strip { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 9px 12px; text-align: left; min-width: 0; }
  .tks-sym { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--accent); letter-spacing: .06em; flex: none; }
  .tks-main { font-family: var(--display); font-weight: 700; font-size: 14px; flex: none; }
  .tks-chg { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 999px; flex: none; text-shadow: none; }
  .tks-meta { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
  .tks-open { color: var(--muted); font-size: 12px; flex: none; margin-left: auto; }
  .cstats.expanded {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 6; padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0; background: #0b0f1b; -webkit-backdrop-filter: none; backdrop-filter: none; max-height: 82dvh; overflow-y: auto;
    animation: sheetin .28s var(--ease); box-shadow: 0 -20px 60px rgba(0,0,0,.55);
  }
  .cstats.expanded .tk-strip { display: none; }
  .cstats.expanded .cs-card { display: block; }
  .cstats.expanded .cs-close { display: inline-grid; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); }
  .cstats.expanded .tk-price { font-size: 32px; }
  .modal-token .tk-grid { grid-template-columns: 1fr 1fr; }
  .modal-token .tk-actions a { flex: 1; min-width: 0; }
  .dock, #ui.hide-map .dock, #ui.drawer-open .dock { left: var(--gut); right: var(--gut); bottom: var(--gut); padding: 6px; max-width: none; }
  /* Places opens upwards from the dock (its bottom is 86 px above the screen's): on a short phone the list scrolls
     below the top HUD (about 130 px) instead of running off the top of the screen */
  #places-menu { max-height: calc(100dvh - 216px); overflow-y: auto; overscroll-behavior: contain; }
  .dock-all { padding: 6px 9px; }
  .dock-all b { font-size: 18px; }
  .chip-res { width: 54px; }
  .dock-btn { height: 48px; padding: 0 11px; }
  .dock-btn span { display: none; }
  .drawer {
    top: 132px; left: 0; right: 0; bottom: 0; width: auto; border-radius: 20px 20px 0 0;
    background: #0b0f1b; -webkit-backdrop-filter: none; backdrop-filter: none; animation-name: sheetin;
  }
  @keyframes sheetin { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .pane { padding-top: 10px; }
  .pane::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.2); margin: 0 auto 8px; flex: none; }
  .toasts { bottom: 150px; }
  .modal { padding: 22px 18px; border-radius: 18px; }
  .modal-title { font-size: 26px; }
  .token-cards { grid-template-columns: 1fr; }
  .modal.guide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; top: auto; bottom: 0; padding: 0; border-radius: 20px 20px 0 0; animation-name: sheetin; }
  .g-head { padding: 14px 14px 10px; gap: 8px; }
  .guide-title { font-size: 19px; }
  .g-select-wrap { display: block; padding: 10px 14px 0; }
  .g-select-wrap::after { right: 28px; }
  .g-body { grid-template-columns: 1fr; }
  .g-side { display: none; }
  .g-pane { padding: 16px 16px 24px; }
  .g-h { font-size: 22px; }
  .g-steps { grid-template-columns: 1fr; }
  .g-table th, .g-table td { padding: 7px 8px; font-size: 12px; }
  .g-table th { font-size: 9.5px; letter-spacing: .08em; }
  .guide-pill { bottom: 142px; }
  .help-btn { width: 22px; height: 22px; font-size: 12px; }
  .season-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; top: auto; bottom: 0; border-radius: 20px 20px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation-name: sheetin; }
  .se-hist-row { grid-template-columns: auto 1fr auto 14px; }
  .se-hist-row > .muted { display: none; }
  .cstats.expanded .se-panel { max-height: none; overflow: visible; margin: 0; padding: 0; }
  .season-body .split { grid-template-columns: repeat(3, 1fr); }
  .season-body .split b { font-size: 13px; }
  .buy-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; top: auto; bottom: 0; border-radius: 20px 20px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation-name: sheetin; }
  .buy-progress span { display: none; }
  .split { grid-template-columns: 1fr; }
  .ls-row.four { grid-template-columns: 1fr 1fr; }
  .lot-row { flex-wrap: wrap; }
  .lot-row .lot-main { min-width: 45%; }
  .pick-list { max-height: 44dvh; }
  .topright .icon-btn { width: 34px; height: 34px; }
  .wallet-hud { height: 34px; border-radius: 10px; }
  .wallet-hud:not(.connected) { width: 34px; }
  .wallet-hud.connected { padding: 0 9px; }
  .wallet-hud.connected #wallet-label { display: none; }
  .wallet-menu { position: fixed !important; top: 128px !important; left: 10px; right: 10px !important; max-width: none; min-width: 0; }
  #modal-bring { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; top: auto; bottom: 0; border-radius: 20px 20px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation-name: sheetin; }
  #modal-bring .modal-title { font-size: 24px; }
  .topright .cta span { display: none; }
  .topright .cta { padding: 8px 11px; font-size: 12.5px; }
  #ui.drawer-open .feed-col, #ui.drawer-open .cstats { display: none; }
}
@media (max-width: 360px) {
  .wordmark { display: none; }
}

/* Reduced motion (OS setting or HUD toggle) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* ---------- celebrations: new AI agent / land sold ---------- */
.cel-layer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; padding: var(--gut); }
.cel-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.cel-card { position: relative; pointer-events: auto; text-align: center; max-width: min(620px, 100%); padding: 30px 36px 24px; border-radius: 28px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(198,255,61,.14), transparent 60%), var(--panel-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 40px 90px rgba(2,5,14,.6), inset 0 0 0 1px var(--hair-2), 0 0 70px rgba(198,255,61,.16);
  animation: celin .75s var(--ease) both; }
.cel-card.land { background: radial-gradient(120% 90% at 50% 0%, rgba(255,209,102,.16), transparent 60%), var(--panel-strong); box-shadow: 0 40px 90px rgba(2,5,14,.6), inset 0 0 0 1px var(--hair-2), 0 0 70px rgba(255,209,102,.16); }
.cel-card.out { animation: celout .45s ease both; }
.cel-icon { width: 76px; height: 76px; margin: -68px auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; background: var(--panel-solid); box-shadow: 0 0 0 3px var(--accent), 0 0 40px var(--accent-glow); animation: celpop .9s .15s var(--ease) both; }
.cel-card.land .cel-icon { box-shadow: 0 0 0 3px #ffd166, 0 0 40px rgba(255,209,102,.45); }
.cel-kicker { font: 700 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.cel-card.land .cel-kicker { color: #ffd166; }
.cel-title { font: 700 clamp(26px, 4.6vw, 48px)/1.06 var(--display); letter-spacing: -.03em; color: #fff; margin: 12px 0 10px; overflow-wrap: anywhere; }
.cel-title b { color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }
.cel-card.land .cel-title b { color: #ffd166; text-shadow: 0 0 30px rgba(255,209,102,.4); }
.cel-sub { color: var(--text-2); font: 500 15px/1.45 var(--sans); overflow-wrap: anywhere; }
.cel-note { margin-top: 6px; color: var(--muted); font: 500 13px/1.4 var(--sans); }
.cel-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.cel-go { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 10px 20px; font: 700 14px/1 var(--sans); cursor: pointer; }
.cel-card.land .cel-go { background: #ffd166; color: #221a05; }
.cel-x { background: transparent; color: var(--text-2); border: 1px solid var(--hair-2); border-radius: 999px; padding: 10px 18px; font: 600 14px/1 var(--sans); cursor: pointer; }
.cel-go:hover, .cel-x:hover { filter: brightness(1.1); }
@keyframes celin { 0% { opacity: 0; transform: translateY(30px) scale(.82); } 60% { opacity: 1; transform: translateY(-6px) scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes celout { to { opacity: 0; transform: translateY(-18px) scale(.95); } }
@keyframes celpop { 0% { transform: scale(0) rotate(-20deg); } 70% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .cel-card, .cel-icon { animation: none; } }
@media (max-width: 560px) { .cel-card { padding: 26px 20px 20px; } .cel-sub { font-size: 14px; } }

/* ---------- Mayor election: banner under the clock + pane ---------- */
.mayor-bar { position: absolute; top: calc(var(--gut) + 64px); left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; border: 0; border-radius: 16px; cursor: pointer; color: var(--text); font: 600 13px/1.2 var(--sans); text-align: left; max-width: min(560px, calc(100vw - 32px)); background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair-2); transition: box-shadow .2s, transform .2s; }
.mayor-bar:hover { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,200,61,.55), 0 0 22px rgba(255,200,61,.18); }
.mayor-bar.voting { box-shadow: var(--shadow), inset 0 0 0 1px rgba(198,255,61,.55), 0 0 26px rgba(198,255,61,.2); }
.mayor-bar.ad { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,111,168,.6), 0 0 26px rgba(255,111,168,.22); }
.mb-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; }
.mb-title { font: 800 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.mb-time { color: var(--text-2); font-weight: 700; }
.mb-cta { margin-left: auto; background: var(--accent); color: var(--accent-ink); font: 800 11px/1 var(--sans); padding: 5px 9px; border-radius: 999px; }
.mb-crown { font-size: 15px; }
.mb-mayor b { color: #ffd166; }
.mb-dot, .mb-count { color: var(--muted); }
.mb-polls { display: flex; gap: 12px; }
.mb-poll { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mb-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-track { width: 54px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; flex: none; }
.mb-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8fe0ff); border-radius: 99px; }
.mb-pct { color: var(--text-2); font-size: 12px; }
.mb-sub { color: var(--muted); font-size: 12px; }
.mb-tag { background: #ff6fa8; color: #2a0716; font: 800 10px/1 var(--sans); letter-spacing: .12em; padding: 4px 7px; border-radius: 6px; }
.mb-ad b { color: #ff9cc4; }
.mb-slogan { color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1400px) { .mayor-bar { left: calc(var(--gut) + 224px + 12px); transform: none; } }
@media (max-width: 767px) {
  .mayor-bar { top: 134px; left: auto; right: var(--gut); max-width: calc(100vw - 2 * var(--gut)); padding: 7px 11px; font-size: 12px; }
  .mb-polls .mb-poll:nth-child(n+3), .mb-slogan, .mb-count { display: none; }
  #ui.has-mayor .feed-col { top: 204px; }
}
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.ghost-btn.small { padding: 6px 10px; font-size: 12px; }
.el-mayor { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,200,61,.16), rgba(255,200,61,.04)); box-shadow: inset 0 0 0 1px rgba(255,200,61,.35); margin-bottom: 12px; }
.el-crown { font-size: 30px; filter: drop-shadow(0 0 10px rgba(255,200,61,.5)); }
.el-mayor-main { flex: 1; min-width: 0; }
.el-label { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #ffd166; }
.el-name { font: 700 22px/1.2 var(--display); margin-top: 4px; overflow-wrap: anywhere; }
.el-status { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.05); margin-bottom: 10px; color: var(--text-2); }
.el-status.voting { background: rgba(198,255,61,.1); box-shadow: inset 0 0 0 1px rgba(198,255,61,.35); }
.el-status.voting b { color: var(--accent); }
.el-wallet { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.el-wallet .wallet-list { margin-top: 8px; }
.el-msg { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; font-size: 13px; background: rgba(255,255,255,.06); overflow-wrap: anywhere; }
.el-msg.error { background: rgba(255,93,93,.12); box-shadow: inset 0 0 0 1px rgba(255,93,93,.35); }
.el-msg.ok { background: rgba(125,255,176,.1); box-shadow: inset 0 0 0 1px rgba(125,255,176,.35); }
.el-promo { padding: 12px; border-radius: 14px; background: rgba(255,111,168,.08); box-shadow: inset 0 0 0 1px rgba(255,111,168,.35); margin-bottom: 10px; }
.el-promo p { margin: 6px 0 10px; color: var(--text-2); font-size: 13px; }
.el-step { font-weight: 700; margin-bottom: 8px; }
.el-promo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.el-h { margin: 16px 0 8px; font: 700 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cand { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--hair); }
.cand.out { opacity: .55; }
.cand.mine .cand-bar i { background: linear-gradient(90deg, #ffd166, var(--accent)); }
.cand-main { flex: 1; min-width: 0; }
.cand-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cand-top b { font: 700 15px/1.2 var(--display); overflow-wrap: anywhere; }
.cand-tag { font: 700 10.5px/1 var(--sans); padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-2); }
.cand-tag.inc { background: rgba(255,200,61,.16); color: #ffd166; }
.cand-tag.ad { background: rgba(255,111,168,.16); color: #ff9cc4; }
.cand-tag.mine { background: rgba(198,255,61,.14); color: var(--accent); }
.cand-slogan { margin-top: 4px; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.cand-meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.cand-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.cand-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8fe0ff); border-radius: 99px; transition: width .5s var(--ease); }
.cand-votes { margin-top: 4px; font-size: 12px; color: var(--text-2); }
.cand-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.el-hist { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.el-hist li { padding: 6px 0; border-top: 1px solid var(--hair); }

.badge.mayor { background: rgba(255,200,61,.18); color: #ffd166; box-shadow: inset 0 0 0 1px rgba(255,200,61,.45); }
.pf-ownerbox { margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.pf-ownerbox .section-title { margin-top: 0; }
.ob-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ob-select, .ob-input { flex: 1; min-width: 0; background: #0a0f1f; color: var(--text); border: 1px solid var(--hair-2); border-radius: 10px; padding: 7px 10px; font: 500 13px var(--sans); }
.ob-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ob-note.ok { color: var(--accent); }
.pf-ownerbox .el-msg { margin: 8px 0 0; }

/* buildings on lots */
.lot-own { display: flex; align-items: center; gap: 6px; flex: none; }
.lot-bld { display: block; font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-rename { margin-top: 6px; }
.bld-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.bld-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.bld-card:hover:not([disabled]) { background: rgba(255,255,255,.08); }
.bld-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(198,255,61,.15); }
.bld-card[disabled] { opacity: .45; cursor: default; }
.bld-card b { font-size: 13px; line-height: 1.2; }
.bld-ico { font-size: 22px; line-height: 1; }
.bld-price { font-size: 12px; color: var(--text); }
.bld-boost { font-size: 11px; color: var(--accent); }
.bld-name { width: 100%; margin-bottom: 8px; }
@media (max-width: 520px) { .bld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cel-card.building { background: radial-gradient(120% 90% at 50% 0%, rgba(255,209,102,.16), transparent 60%), var(--panel-strong); box-shadow: 0 40px 90px rgba(2,5,14,.6), inset 0 0 0 1px var(--hair-2), 0 0 70px rgba(255,209,102,.16); }
.cel-card.building .cel-icon { box-shadow: 0 0 0 3px #ffd166, 0 0 40px rgba(255,209,102,.45); }
.cel-card.building .cel-kicker { color: #ffd166; }
.cel-card.building .cel-title b { color: #ffd166; text-shadow: 0 0 30px rgba(255,209,102,.4); }
.menu .menu-head { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; border-top: 1px solid var(--hair); margin-top: 4px; }
/* Mayor land burn policy */
.burn-box { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); display: flex; flex-direction: column; gap: 8px; }
.burn-head { display: flex; align-items: center; justify-content: space-between; }
.burn-pct { font-size: 20px; font-weight: 700; color: #ff9d4d; }
.burn-bar { height: 8px; border-radius: 99px; background: rgba(99,203,255,.35); overflow: hidden; }
.burn-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6a3d, #ffb04d); border-radius: 99px; }
.burn-set { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.burn-set input[type=range] { flex: 1; accent-color: #ff8a3d; }

/* Bank of Muse */
.bank-lead { font-size: 13px; color: var(--text); margin: 0 0 10px; }
.bank-cap { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.bank-cap-top { display: flex; justify-content: space-between; font-size: 12.5px; }
.bank-bar { background: rgba(255,255,255,.08); }
.bank-bar i { background: linear-gradient(90deg, #63cbff, #c6ff3d); }
.bank-terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.bank-term { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--hair); color: var(--text); cursor: pointer; font: inherit; }
.bank-term b { font-size: 15px; }
.bank-term span { font-size: 13px; color: var(--accent); font-weight: 700; }
.bank-term.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(198,255,61,.15); }
.bank-form { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.bank-amt { flex: 1; }
.bank-preview { min-height: 1em; }
.bank-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.bank-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); font-size: 12.5px; }
.bank-how { margin: 4px 0 10px; padding-left: 18px; font-size: 12.5px; color: var(--text2); display: flex; flex-direction: column; gap: 4px; }
.se-chip.warn { color: #ffb04d; }

/* Musetown Reserve */
.rs-panel { display: flex; flex-direction: column; gap: 8px; }
.rs-gauge { position: relative; height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: visible; }
.rs-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #ff8a3d, #ffd166 40%, #c6ff3d); }
.rs-mark { position: absolute; top: -3px; width: 2px; height: 16px; background: rgba(255,255,255,.7); border-radius: 2px; }
.rs-note { font-size: 10.5px; }
.rs-flow { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); }
.rs-flow b { font-size: 20px; }
.rs-flow b.up, .rs-hist i.up { color: #c6ff3d; }
.rs-flow b.down { color: #ff8a6a; }
.rs-effects { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.rs-effects li { display: flex; justify-content: space-between; gap: 8px; }
.rs-runway { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.rs-hist { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.rs-hist span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.rs-hist i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: #c6ff3d; }
.rs-hist i.down { background: #ff8a6a; }
.cs-tabs { gap: 3px; }
.cs-tabs [data-ctab] { padding: 5px 5px; font-size: 9.5px; letter-spacing: .03em; }

/* Muse Casino */
.cs-player { margin: 6px 0; }
.cs-table { display: flex; align-items: center; gap: 14px; margin: 10px 0; padding: 12px; border-radius: 14px; background: radial-gradient(120% 120% at 20% 20%, rgba(31,163,90,.22), rgba(10,14,24,.4)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.cs-wheel { width: 74px; height: 74px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#d11f3f 0 10%, #141018 0 20%, #d11f3f 0 30%, #141018 0 40%, #d11f3f 0 50%, #141018 0 60%, #1fa35a 0 64%, #d11f3f 0 74%, #141018 0 84%, #d11f3f 0 92%, #141018 0 100%); box-shadow: 0 0 0 3px #ffd166, 0 0 24px rgba(255,63,164,.35); }
.cs-wheel.spinning { animation: cs-spin .35s linear infinite; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-result { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cs-result b.up { color: #c6ff3d; } .cs-result b.down { color: #ff8a6a; }
.cs-ball { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px; font: 700 12px/1 var(--display); color: #fff; }
.cs-ball.red { background: #d11f3f; } .cs-ball.black { background: #1b1720; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); } .cs-ball.green { background: #1fa35a; }
.cs-ball.big { width: 40px; height: 40px; font-size: 18px; box-shadow: 0 0 0 3px #fff; }
.cs-bets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.cs-bet { border: 1px solid var(--hair); background: rgba(255,255,255,.04); color: var(--text); border-radius: 10px; padding: 8px 4px; font: 600 12.5px var(--sans); cursor: pointer; }
.cs-bet.red { background: rgba(209,31,63,.25); } .cs-bet.black { background: rgba(0,0,0,.45); }
.cs-bet.sel, .cs-chip.sel { border-color: #ffd166; box-shadow: 0 0 0 1px #ffd166, 0 0 14px rgba(255,209,102,.3); }
.cs-num { width: 100%; }
.cs-amounts { display: flex; gap: 8px; margin: 8px 0 10px; }
.cs-chip { width: 48px; height: 48px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.5); background: #7b2cbf; color: #fff; font: 700 14px var(--display); cursor: pointer; }
.cs-chip:nth-child(2) { background: #1f7dff; } .cs-chip:nth-child(3) { background: #1fa35a; } .cs-chip:nth-child(4) { background: #d11f3f; }
.cs-recent, .cs-rich { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; }
.cs-spin, .cs-rich-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,.035); font-size: 12.5px; }
.cs-rich-row { cursor: pointer; } .cs-rich-row.mine { box-shadow: inset 0 0 0 1px rgba(198,255,61,.4); }
.cs-who, .cs-rich-row .se-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-spin b.up, .cs-rich-row b.up { color: #c6ff3d; } .cs-spin b.down, .cs-rich-row b.down { color: #ff8a6a; }

/* ---------- City poll: floating card under the brand ---------- */
.poll-card { top: calc(var(--gut) + 100px); left: var(--gut); width: 224px; z-index: 5; padding: 10px 10px 10px 12px; display: grid; gap: 8px; }
.poll-card[hidden] { display: none; }
.pl-head { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.pl-kicker { display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.pl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pl-pulse 2s infinite; }
.pl-dot.off { background: var(--text-2); animation: none; }
@keyframes pl-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 7px rgba(198,255,61,0); } 100% { box-shadow: 0 0 0 0 rgba(198,255,61,0); } }
.pl-count { margin-left: auto; font-size: 11.5px; color: var(--text-2); }
.pl-caret { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,.06); font-weight: 700; color: var(--text-2); }
.pl-head:hover .pl-caret { background: rgba(255,255,255,.12); color: var(--text); }
.pl-q { font: 700 14px/1.25 var(--display, var(--sans)); letter-spacing: -.01em; }
.poll-card:not(.open) .pl-q { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.pl-opts { display: grid; gap: 5px; }
.pl-opt { position: relative; overflow: hidden; display: grid; grid-template-columns: 16px 18px 1fr auto; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: 9px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); color: var(--text); font: 500 12px/1.2 var(--sans); text-align: left; cursor: pointer; transition: box-shadow .15s, background .15s; }
.pl-opt:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--hair-2); background: rgba(255,255,255,.08); }
.pl-opt:disabled { cursor: default; }
.pl-opt.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pl-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(198,255,61,.16), rgba(198,255,61,.07)); transition: width .6s ease; pointer-events: none; }
.pl-opt.lead .pl-bar { background: linear-gradient(90deg, rgba(198,255,61,.3), rgba(198,255,61,.12)); }
.pl-opt > :not(.pl-bar) { position: relative; }
.pl-box { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--hair-2); font: 800 11px/1 var(--sans); color: var(--accent-ink); }
.pl-opt.on .pl-box { background: var(--accent); box-shadow: none; }
.pl-emoji { font-size: 14px; line-height: 1; }
.pl-pct { font-size: 11.5px; color: var(--text-2); }
.pl-opt.lead .pl-pct { color: var(--accent); }
.pl-foot { display: grid; gap: 5px; }
.pl-vote { border: 0; border-radius: 10px; padding: 8px 10px; background: var(--accent); color: var(--accent-ink); font: 800 12.5px/1 var(--sans); cursor: pointer; box-shadow: 0 6px 18px var(--accent-glow); }
.pl-vote:disabled { background: rgba(255,255,255,.08); color: var(--text-2); box-shadow: none; cursor: default; }
.pl-note { font-size: 10.5px; color: var(--text-2); text-align: center; }
.pl-msg { font-size: 11.5px; line-height: 1.35; color: var(--text-2); }
.pl-msg.error { color: #ff9b9b; } .pl-msg.ok { color: var(--accent); }
@media (max-height: 760px) and (min-width: 768px) { .pl-opt { padding: 5px 8px; } .pl-note { display: none; } }
@media (max-width: 767px) {
  /* phones: the top row is full, so the poll floats just above the token bar and opens upward */
  .poll-card { top: auto; bottom: calc(var(--gut) + 186px); width: min(260px, calc(100vw - 2 * var(--gut))); max-height: calc(100dvh - var(--gut) - 330px); overflow: auto; padding: 8px 9px 8px 10px; gap: 6px; }
  .poll-card:not(.open) { width: auto; }
  .poll-card:not(.open) .pl-q { display: none; }
  .pl-q { font-size: 13px; }
}
