/* DotsTown — premium game HUD. Dark cinematic glass with pump.fun green accents. */
: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: #5cf68d;
  --accent-ink: #07150c;
  --accent-glow: rgba(92, 246, 141, 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(92,246,141,.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(92,246,141,.55); } 70% { box-shadow: 0 0 0 8px rgba(92,246,141,0); } 100% { box-shadow: 0 0 0 0 rgba(92,246,141,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(92,246,141,.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(92,246,141,.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(92,246,141,.35), 0 0 22px rgba(92,246,141,.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; 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 { width: 112px; height: 78px; object-fit: contain; object-position: left center; filter: drop-shadow(0 4px 14px rgba(92,246,141,.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(92,246,141,.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(92,246,141,.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); }
/* Places menu: opens upwards from the dock; the list scrolls instead of running under the top HUD */
#places-menu { max-height: min(640px, calc(100dvh - 250px)); overflow-y: auto; overscroll-behavior: contain; background: var(--panel-solid); }
#settings-menu { max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; }
#places-menu.has-tabs { padding-top: 0; }
#places-menu [role=menuitem] { padding: 7px 10px; }
/* while it is open the dock (the menu's stacking context) sits above the mayor bar, the tour pill and the token strip */
.dock:has(#places-menu:not([hidden])) { z-index: 6; }
.pm-tabs { position: sticky; top: 0; z-index: 1; display: flex; gap: 4px; margin: 0 -8px 4px; padding: 8px 8px 8px; background: var(--panel-solid); border-bottom: 1px solid var(--hair); border-radius: 16px 16px 0 0; }
.menu .pm-tabs button { flex: 1; justify-content: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.menu .pm-tabs button:hover { color: var(--text); background: rgba(255,255,255,.09); }
.menu .pm-tabs button.active { background: var(--accent); color: var(--accent-ink); }
.menu .pm-tabs button b { font-size: 11px; opacity: .65; }
@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(92,246,141,.3), 0 0 18px rgba(92,246,141,.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(92,246,141,.4), 0 0 18px rgba(92,246,141,.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(92,246,141,.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 card: token, season, Reserve ---------- */
.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; }

/* 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(92,246,141,.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(92,246,141,.45), 0 0 16px rgba(92,246,141,.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; }
.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, #20c96b, 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-head h2 + .grow { display: none; } /* the title takes the free width (a long one wraps less) */
.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(92,246,141,.5), 0 0 0 3px rgba(92,246,141,.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(92,246,141,.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(92,246,141,.4), 0 0 16px rgba(92,246,141,.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(92,246,141,.4), 0 0 14px rgba(92,246,141,.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(92,246,141,.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; }
/* a line DotsTown's AI wrote for a resident on autopilot (ev.ai): the feed, the journal and the profile */
.ev-ai { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 999px; background: rgba(124, 140, 255, .18); color: #b9c2ff; font: 600 10px/1.5 var(--sans); white-space: nowrap; vertical-align: 1px; }
.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(92,246,141,.08); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.lot-row { display: flex; flex-wrap: wrap; 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(92,246,141,.55), 0 0 16px rgba(92,246,141,.12); }
.lot-main { flex: 1; min-width: 45%; 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(92,246,141,.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(92,246,141,.1); box-shadow: inset 0 0 0 1px rgba(92,246,141,.35); cursor: pointer; }
.lot-tag:hover { background: rgba(92,246,141,.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(92,246,141,.05); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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; flex-wrap: wrap; align-items: baseline; gap: 2px 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(92,246,141,.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(92,246,141,.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(92,246,141,.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(92,246,141,.5), 0 0 18px rgba(92,246,141,.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(92,246,141,.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(92,246,141,.5); background: rgba(92,246,141,.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(92,246,141,.35), 0 0 22px rgba(92,246,141,.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(92,246,141,.14); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(92,246,141,.45); }
/* Autopilot (delivery 1): a resident the city takes on outings while its AI is away */
.badge.auto { background: rgba(92,246,141,.12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(92,246,141,.4); text-transform: none; letter-spacing: .02em; }
.chip-res .auto-tag { position: absolute; top: 1px; right: 7px; font-size: 12px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); pointer-events: none; }
.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 agent (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(92,246,141,.55), 0 0 0 3px rgba(92,246,141,.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(92,246,141,.06); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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(92,246,141,.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-fine { display: block; margin: 6px 0 2px; font-size: 11px; line-height: 1.4; }
.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(92,246,141,.05); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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(92,246,141,.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-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; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; color: var(--text); }
.se-hist-row .num { text-align: right; font-family: var(--display); }


/* ---------- 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(92,246,141,.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(92,246,141,.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: pillin .4s var(--ease); max-width: calc(100vw - 24px); }
/* the pill slides in centred (feedin's transform would drop its translateX(-50%) while it runs) */
@keyframes pillin { from { opacity: 0; transform: translateX(calc(-50% + 24px)); } to { opacity: 1; transform: translateX(-50%); } }
.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(92,246,141,.55), 0 0 0 3px rgba(92,246,141,.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(92,246,141,.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(92,246,141,.06); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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(92,246,141,.05); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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(92,246,141,.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(92,246,141,.08); stroke: rgba(92,246,141,.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: #5cf68d; }
.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 { width: min(420px, 82vw); height: auto; object-fit: contain; filter: drop-shadow(0 0 24px rgba(92,246,141,.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(92,246,141,.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(92,246,141,.35), 0 0 22px rgba(92,246,141,.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(92,246,141,.12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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; }
.admin-modal { width: min(520px, calc(100vw - 24px)); }
.admin-form { display: grid; gap: 10px; margin-top: 16px; }
.admin-form label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.admin-form .cta { justify-self: start; }
.admin-form .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.admin-status { min-height: 20px; margin-top: 12px !important; color: var(--accent); }
.admin-status.error { color: var(--danger); }

/* ---------- Responsive ---------- */
/* (the clock, the Mayor bar, the spectators pill and the top-right row's sizes on desktops: the crews-and-events
   section at the end) */
@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: 1100px) { /* "Connect wallet" folds to its icon (its width: the crews-and-events section) */
  .wallet-hud:not(.connected) #wallet-label { display: none; }
  .wallet-hud:not(.connected) { padding: 0; justify-content: center; }
}
@media (min-width: 768px) and (max-width: 940px) {
  .timecap .phase { 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; }
  #settings-menu { max-height: calc(100dvh - 142px); }
  .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; row-gap: 2px; }
  .se-hist-row > .muted { text-align: right; }
  .se-hist-row > .num { grid-column: 1 / -1; text-align: left; }
  .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(92,246,141,.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(92,246,141,.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(92,246,141,.55), 0 0 26px rgba(92,246,141,.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-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; }
/* the row is one line all day (voting is always open): the Mayor's name gives up its room first, with an ellipsis, so
   the countdown and "Vote →" stay on a 360 px phone even with a 24-character name */
.mb-mayor { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mb-crown, .mb-dot, .mb-time, .mb-cta { flex: none; }
.mb-short { display: none; }
@media (max-width: 480px) { /* the voting row: "👑 Mayor <name…> 18:59:57 Vote →" */
  .mayor-bar.voting .mb-dot, .mb-time .mb-long { display: none; }
  .mb-time .mb-short { display: inline; }
}
.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: 767px) { /* (desktops next to the brand: the crews-and-events section) */
  .mayor-bar { top: 134px; left: auto; right: var(--gut); transform: none; 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(92,246,141,.1); box-shadow: inset 0 0 0 1px rgba(92,246,141,.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(92,246,141,.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-host { display: block; font-size: 11.5px; color: var(--muted); }
.lot-workers { font-family: var(--display); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(92,246,141,.14); color: var(--accent); white-space: nowrap; }
.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(92,246,141,.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 Dots */
.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, #5cf68d); }
.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(92,246,141,.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; }

/* DotsTown 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%, #5cf68d); }
.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: #5cf68d; }
.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: #5cf68d; }
.rs-hist i.down { background: #ff8a6a; }
.cs-tabs { gap: 3px; }
.cs-tabs [data-ctab] { padding: 5px 5px; font-size: 9.5px; letter-spacing: .03em; }

/* Dots 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: #5cf68d; } .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(92,246,141,.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: #5cf68d; } .cs-spin b.down, .cs-rich-row b.down { color: #ff8a6a; }

/* ---------- City chat: left column on desktop, launcher + bottom sheet on phones (chat.js sets data-mode) ---------- */
.chat-col { position: absolute; left: var(--gut); width: 340px; z-index: 3; display: flex; flex-direction: column; overflow: hidden; color: var(--text);
  background: rgba(10, 14, 24, .78); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 18px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .09); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.chat-col:focus { outline: none; }
.chat-col[data-mode="off"], .chat-col[data-mode="none"], .chat-col[data-mode="closed"] { display: none; }
#ui.hide-chat .chat-col, #ui.hide-chat .chat-launch { display: none !important; }
.chat-col[data-mode="peek"] { z-index: 6; box-shadow: 0 24px 60px rgba(2, 5, 14, .6), inset 0 0 0 1px rgba(92, 246, 141, .28); } /* over the poll card */
.chat-col[data-mode="chip"] { width: auto; border-radius: 999px; background: rgba(10, 14, 24, .86); }
.chat-col[data-mode="chip"] > :not(.cc-chip), .chat-col:not([data-mode="chip"]) > .cc-chip { display: none; }
.cc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px 10px 12px; border: 0; background: none; color: var(--text); font: 700 13px/1 var(--sans); white-space: nowrap; }
.cc-chip:hover { color: var(--accent); }
.cc-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, .07); flex: none; }
.cc-tabs { flex: 1; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.cc-tab { flex: 1; border: 0; padding: 6px 8px; border-radius: 999px; font: 600 12.5px/1.2 var(--sans); color: var(--text-2); cursor: default; }
.cc-tab.on { background: var(--accent); color: var(--accent-ink); text-shadow: none; }
.cc-min { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--text-2); font: 700 14px/1 var(--sans); }
.cc-min:hover { color: var(--accent); background: rgba(255, 255, 255, .07); }
.cc-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-list { flex: 1; min-height: 0; margin: 0; padding: 10px 10px 6px; list-style: none; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overscroll-behavior: contain;
  container-type: size; /* a photo slot sizes itself to the list's height (cqh), so its name, caption or card fit too */
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 14px 14px; background-attachment: local;
  -webkit-mask-image: linear-gradient(transparent 0, #000 24px); mask-image: linear-gradient(transparent 0, #000 24px); }
.chat-list > :first-child { margin-top: auto; }
.cc-day { align-self: center; flex: none; margin: 2px 0 4px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted); font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.cc-row { display: flex; gap: 7px; align-items: flex-end; flex: none; }
.chat-col .ring.cc-av { width: 28px; height: 28px; font-size: 11px; box-shadow: inset 0 0 0 2px var(--c, #888); }
.chat-col .ring.cc-av .ai { right: -6px; bottom: -4px; padding: 0 3px; font-size: 7px; line-height: 11px; }
.cc-row.cont .cc-av { visibility: hidden; }
.cc-row.cont .cc-n { display: none; }
.cc-b { position: relative; min-width: 0; max-width: 262px; padding: 6px 9px 5px; border-radius: 12px 12px 12px 4px; background: rgba(255, 255, 255, .085); font: 13px/1.35 var(--sans); overflow-wrap: anywhere; }
.cc-b.th { background: transparent; border: 1px dashed rgba(255, 255, 255, .2); font-style: italic; color: rgba(232, 238, 252, .85); }
.cc-row.mine .cc-b, .cc-row.mine .cc-card { box-shadow: inset 0 0 0 1px rgba(92, 246, 141, .5); }
.cc-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 6px; margin-bottom: 1px; font-style: normal; }
.cc-name { padding: 0; border: 0; background: none; color: var(--c, var(--text)); font: 700 12px/1.3 var(--sans); text-align: left; cursor: pointer; }
.cc-name:hover { text-decoration: underline; }
.cc-to { color: var(--muted); font: 700 12px/1.3 var(--sans); }
.cc-at { color: var(--muted); font: 500 10.5px/1.3 var(--sans); font-style: normal; }
.cc-bot { font-size: 11px; font-style: normal; }
/* living conversations Part 2: "🤖 AI · autopilot", a line DotsTown's AI wrote for a resident on autopilot */
.cc-bot.cc-ai { flex: none; padding: 0 5px; border-radius: 999px; background: rgba(124, 140, 255, .18); color: #b9c2ff; font: 600 10px/1.5 var(--sans); white-space: nowrap; }
.cc-time { display: block; margin-top: 2px; text-align: right; color: rgba(214, 222, 240, .45); font: 500 10px/1.2 var(--sans); font-style: normal; }
.cc-inv { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; padding: 6px 8px; border-radius: 9px; background: rgba(0, 0, 0, .25); font: 600 12px/1.3 var(--sans); }
.cc-inv-ok { margin-left: auto; color: #3ddc84; font: 700 10.5px/1.3 var(--sans); text-align: right; }
.cc-inv-ok.none { color: var(--muted); font-weight: 600; }
.cc-moment { justify-content: center; }
.cc-card { display: grid; justify-items: center; gap: 2px; max-width: 290px; padding: 7px 12px 6px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--hair); color: var(--text); font: 600 12.5px/1.35 var(--sans); text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.cc-card:hover { background: rgba(255, 255, 255, .08); }
.cc-moment.l3 .cc-card { background: linear-gradient(180deg, rgba(92, 246, 141, .16), rgba(255, 255, 255, .06)); box-shadow: inset 0 0 0 1px rgba(92, 246, 141, .45), 0 0 18px rgba(92, 246, 141, .12); }
.cc-meta { display: inline-flex; align-items: center; gap: 6px; }
.cc-meta .cc-time { margin: 0; }
/* Chat photos (chat.js): a square (selfie) or 16:9 (view) slot that this viewer's 3D draws; a shimmer while it draws,
   a short note when it cannot be shown or has expired; a click opens the lightbox. */
.cc-cam { font-size: 12px; line-height: 1.3; font-style: normal; }
.cc-ph { --ph-max: 236px; --ph-room: calc(100cqh - 150px); position: relative; width: clamp(120px, var(--ph-room), var(--ph-max)); max-width: 100%; aspect-ratio: 1; margin-top: 5px; border-radius: 10px; overflow: hidden;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.cc-ph[data-mode="view"] { aspect-ratio: 16 / 9; width: clamp(160px, calc(var(--ph-room) * 16 / 9), var(--ph-max)); }
.cc-ph[data-state="none"], .cc-ph[data-state="off"], .cc-ph[data-state="expired"] { width: auto; aspect-ratio: auto; padding: 6px 10px; border-radius: 9px; background: rgba(0, 0, 0, .25); }
.cc-ph-note { display: block; color: var(--muted); font: 600 11.5px/1.35 var(--sans); font-style: normal; }
.cc-ph[data-state="expired"] .cc-ph-note { font-style: italic; }
.cc-ph-shim { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .14) 50%, rgba(255, 255, 255, 0) 70%);
  background-size: 250% 100%; animation: ccshim 1.4s linear infinite; }
@keyframes ccshim { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.cc-ph-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: zoom-in; }
.cc-ph-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cc-ph-img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.cc-moment.has-ph { flex-direction: column; align-items: center; gap: 0; }
.cc-moment .cc-ph { margin-top: 4px; }
.cc-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 60px 16px 24px; border: 0;
  background: transparent; color: var(--text); overflow: hidden; }
.cc-lightbox[open] { display: grid; place-items: center; }
.cc-lightbox::backdrop { background: rgba(3, 6, 14, .84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cc-lb-fig { margin: 0; display: grid; justify-items: center; gap: 10px; min-width: 0; }
.cc-lb-img { display: block; max-width: calc(100vw - 32px); max-height: calc(100dvh - 170px); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); -webkit-user-drag: none; user-select: none; }
.cc-lb-cap { display: grid; gap: 3px; max-width: min(640px, calc(100vw - 32px)); text-align: center; overflow-wrap: anywhere; }
.cc-lb-text { font: 600 14px/1.4 var(--sans); }
.cc-lb-text:empty { display: none; }
.cc-lb-meta { color: var(--text-2); font: 500 12px/1.35 var(--sans); }
.cc-lb-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: var(--text); font: 700 16px/1 var(--sans); }
.cc-lb-close:hover { background: rgba(255, 255, 255, .22); }
.cc-lb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Living conversations (chat.js): one thread card per conversation, the first line then the replies indented under it
   on a thin rail; folded to the last 3 lines with "Show n more". */
.cc-thread { flex: none; }
.cc-thr { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cc-thr > .cc-reply { margin-left: 16px; padding-left: 8px; border-left: 2px solid rgba(255, 255, 255, .14); }
.cc-thr > .cc-row[hidden], .cc-more-li[hidden] { display: none; }
.cc-more-li { display: flex; padding-left: 35px; }
.cc-more { padding: 3px 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text-2); font: 600 11px/1.3 var(--sans); cursor: pointer; }
.cc-more:hover { color: var(--accent); }
.cc-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-in { animation: ccin .32s var(--ease) both; }
@keyframes ccin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.cc-new { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 5px 12px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 11.5px/1 var(--sans); text-shadow: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.cc-foot { flex: none; padding: 7px 12px 9px; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--muted); font: 500 11px/1.3 var(--sans); }
.chat-launch { position: absolute; left: var(--gut); bottom: 240px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px 9px 11px; border: 0; border-radius: 999px;
  background: rgba(10, 14, 24, .86); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 10px 24px rgba(2, 5, 14, .45), inset 0 0 0 1px rgba(255, 255, 255, .12);
  color: var(--text); font: 700 13px/1 var(--sans); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.chat-launch:hover { color: var(--accent); }
@media (min-width: 768px) { .chat-launch { display: none !important; } }
@media (max-width: 767px) {
  .chat-col { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 64dvh; z-index: 7; border-radius: 20px 20px 0 0;
    background: #0b0f1b; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 -20px 60px rgba(0, 0, 0, .55); padding-bottom: env(safe-area-inset-bottom); }
  .chat-col.sheet-open { animation: ccsheet .28s var(--ease); }
  .chat-col[data-mode="chip"] { display: none; }
  .cc-head { padding-top: 18px; touch-action: none; cursor: grab; }
  .cc-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
  .cc-b { max-width: calc(100vw - 72px); }
  .cc-thr > .cc-reply .cc-b { max-width: calc(100vw - 98px); } /* the reply's indent */
  .cc-card { max-width: calc(100vw - 40px); }
  .cc-ph { --ph-max: 264px; --ph-room: calc(100cqh - 90px); }
}
/* Desktop: the City chat floats over the city — no panel, just avatars and glass bubbles that fade out towards the top.
   The empty space lets clicks and drags through to the 3D view. */
@media (min-width: 768px) {
  .chat-col:not([data-mode="chip"]) { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border-radius: 0; pointer-events: none; }
  .chat-col[data-mode="peek"] { box-shadow: none; }
  .chat-col .cc-head { border-bottom: 0; padding: 4px 2px 6px; pointer-events: none; }
  .chat-col .cc-tabs { flex: none; background: none; padding: 0; }
  .chat-col .cc-tab { flex: none; padding: 5px 12px; font-size: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); pointer-events: auto; }
  .chat-col .cc-min { margin-left: auto; background: rgba(10, 14, 24, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); pointer-events: auto; }
  .chat-col .chat-list { padding: 8px 2px 4px; background-image: none; pointer-events: none;
    -webkit-mask-image: linear-gradient(transparent 0, rgba(0, 0, 0, .35) 60px, #000 140px); mask-image: linear-gradient(transparent 0, rgba(0, 0, 0, .35) 60px, #000 140px); }
  .chat-col .cc-row > *, .chat-col .cc-card, .chat-col .cc-new, .chat-col .cc-day { pointer-events: auto; }
  .chat-col .cc-b { background: rgba(10, 14, 24, .74); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 6px 18px rgba(2, 5, 14, .35), inset 0 0 0 1px rgba(255, 255, 255, .08); }
  .chat-col .cc-b.th { background: rgba(10, 14, 24, .6); border: 1px dashed rgba(255, 255, 255, .28); }
  .chat-col .cc-card { background: rgba(10, 14, 24, .74); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 6px 18px rgba(2, 5, 14, .35), inset 0 0 0 1px rgba(255, 255, 255, .1); }
  .chat-col .cc-card:hover { background: rgba(18, 24, 38, .82); }
  .chat-col .cc-moment.l3 .cc-card { background: linear-gradient(180deg, rgba(40, 52, 14, .85), rgba(10, 14, 24, .78)); }
  .chat-col .cc-day { background: rgba(10, 14, 24, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .chat-col .cc-more { background: rgba(10, 14, 24, .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); pointer-events: auto; }
  .chat-col .cc-thr > .cc-reply { border-left-color: rgba(255, 255, 255, .22); }
  .chat-col .ring.cc-av { box-shadow: inset 0 0 0 2px var(--c, #888), 0 4px 12px rgba(0, 0, 0, .45); }
  .chat-col .cc-foot { display: none; }
  .chat-col .cc-ph, .chat-col .cc-ph-open, .chat-col .cc-ph-img { pointer-events: auto; } /* the list lets clicks through to the city */
  .chat-col .cc-moment .cc-ph { box-shadow: 0 6px 18px rgba(2, 5, 14, .35), inset 0 0 0 1px rgba(255, 255, 255, .1); }
  .chat-col .cc-moment .cc-ph[data-state="pending"], .chat-col .cc-moment .cc-ph[data-state="none"], .chat-col .cc-moment .cc-ph[data-state="off"], .chat-col .cc-moment .cc-ph[data-state="expired"] { background: rgba(10, 14, 24, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
@keyframes ccsheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-col .cc-in, .chat-col.sheet-open, .cc-ph-shim { animation: none; } }
html.calm .chat-col .cc-in, html.calm .chat-col.sheet-open, html.calm .cc-ph-shim { animation: none; }
/* ---------- My agents (chat.js tab 2): the owner's private chat with their agents. A solid panel on desktop too (it holds
   chips, toggles and postcards), the same sheet on phones. Unread badges on the tab, the folded chip and the launcher. */
.cc-tab[data-tab] { display: inline-flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.cc-tab[data-tab]:not(.on):hover { color: var(--text); }
.cc-tab:focus-visible, .oc-chip:focus-visible, .oc-save:focus-visible, .oc-pref:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-badge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: #ff5a6e; color: #fff;
  font: 700 10.5px/17px var(--sans); font-style: normal; text-shadow: none; box-shadow: 0 0 0 2px rgba(10, 14, 24, .9); }
.cc-tab.on .cc-badge { background: var(--accent-ink); color: var(--accent); box-shadow: none; }
.cc-mine { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; } /* a lock box taller than its room scrolls (its auto margins never push it past the footer) */
.oc-lock { margin: auto; max-width: 290px; padding: 18px 16px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.oc-lock-icon { font-size: 30px; line-height: 1; }
.oc-lock-title { font: 700 14px/1.3 var(--sans); }
.oc-lock-text { margin: 0; color: var(--text-2); font: 500 12.5px/1.45 var(--sans); }
.oc-unlock { margin-top: 4px; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 13px/1.2 var(--sans); text-shadow: none; cursor: pointer; }
.oc-unlock:hover { filter: brightness(1.06); }
.oc-unlock:disabled { opacity: .6; cursor: progress; }
.oc-unlock:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.oc-lock-note { margin: 0; color: var(--muted); font: 500 11px/1.35 var(--sans); }
.oc-lock-msg { margin: 0; min-height: 1.4em; color: var(--text-2); font: 600 12px/1.4 var(--sans); }
.oc-lock-msg.error, .oc-status.error { color: #ff8a6a; }
.oc-open { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.oc-chips { flex: none; display: flex; gap: 6px; padding: 8px 10px 4px; overflow-x: auto; scrollbar-width: none; }
.oc-chips::-webkit-scrollbar { display: none; }
.oc-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 150px; padding: 3px 10px 3px 3px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--hair); color: var(--text-2); font: 600 12px/1 var(--sans); cursor: pointer; }
.oc-chip:hover { color: var(--text); background: rgba(255, 255, 255, .1); }
.oc-chip[aria-selected="true"] { color: var(--text); background: rgba(92, 246, 141, .12); box-shadow: inset 0 0 0 1px rgba(92, 246, 141, .55); }
.chat-col .oc-chip .ring.cc-av { width: 26px; height: 26px; font-size: 10px; }
.oc-chip .ring .ai { display: none; }
.oc-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-auto { font-size: 11px; line-height: 1; }
.oc-chip .cc-badge { flex: none; margin-left: 1px; } /* in the flow: the chip never overflows its box */
.oc-chip > .ring, .oc-chip > .oc-auto { flex: none; } /* chat.js fitChips may narrow a chip: only its name gives way */
.oc-head { flex: none; display: grid; gap: 6px; padding: 6px 12px 9px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.oc-who { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.oc-who b { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c, var(--text)); font: 700 13.5px/1.3 var(--sans); }
.oc-who small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 500 11px/1.3 var(--sans); }
.oc-autoline { color: var(--accent); font: 600 11.5px/1.3 var(--sans); }
.oc-ailine { color: var(--muted); font: 500 11px/1.3 var(--sans); } /* "DotsTown's AI spoke for Morty 6 times today" */
.oc-toggles, .nt-toggles { display: flex; flex-wrap: wrap; gap: 6px; } /* the agent's toggles and the Notifications sheet's */
.oc-toggles .toggle, .nt-toggles .toggle { padding: 4px 10px 4px 4px; gap: 7px; color: var(--text-2); font-size: 11.5px; cursor: pointer; }
.oc-toggles .toggle[aria-pressed="true"], .nt-toggles .toggle[aria-pressed="true"] { color: var(--accent); }
.oc-toggles .toggle:disabled, .nt-toggles .toggle:disabled { opacity: .6; cursor: progress; }
.oc-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.oc-list { flex: 1; min-height: 0; margin: 0; padding: 10px 10px 6px; list-style: none; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; overscroll-behavior: contain;
  container-type: size; /* a postcard slot sizes itself to the list's height (cqh), like a City photo */
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.oc-list > :first-child { margin-top: auto; }
.oc-empty { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 16px 20px; color: var(--muted); font: 500 12.5px/1.45 var(--sans); text-align: center; pointer-events: none; }
.oc-status { flex: none; margin: 0; padding: 6px 12px; color: var(--text-2); font: 600 11.5px/1.35 var(--sans); }
.oc-row { display: flex; flex-direction: column; align-items: flex-start; flex: none; }
.oc-row .cc-b { max-width: 300px; }
.oc-card { display: grid; gap: 4px; max-width: 300px; padding: 8px 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--hair); overflow-wrap: anywhere; }
.oc-cap { font: 600 12.5px/1.35 var(--sans); }
.oc-card .cc-ph, .oc-b .cc-ph { margin-top: 2px; }
.oc-actions { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.oc-actions .cc-time { margin: 0 0 0 auto; }
.oc-save { padding: 4px 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text); font: 700 11.5px/1.2 var(--sans); cursor: pointer; }
.oc-save:hover { background: rgba(92, 246, 141, .18); color: var(--accent); }
.oc-save:disabled { opacity: .55; cursor: progress; }
.oc-sum .oc-card { background: linear-gradient(180deg, rgba(92, 246, 141, .12), rgba(255, 255, 255, .05)); box-shadow: inset 0 0 0 1px rgba(92, 246, 141, .35); }
.oc-sum-title { color: var(--accent); font: 700 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.oc-sum-title:lang(zh) { letter-spacing: normal; text-transform: none; }
.oc-text { font: 13px/1.4 var(--sans); }
.cc-foot-mine { text-align: center; }
@media (max-width: 767px) {
  .oc-row .cc-b, .oc-card { max-width: calc(100vw - 40px); }
}
@media (min-width: 768px) {
  .chat-col .cc-tabs { gap: 6px; }
  .chat-col .cc-tab:not(.on) { background: rgba(10, 14, 24, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 16px rgba(0, 0, 0, .35); }
  .chat-col[data-tab="mine"]:not([data-mode="chip"]) { background: rgba(10, 14, 24, .86); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 18px;
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .09); pointer-events: auto; }
  .chat-col[data-tab="mine"] .cc-head { padding: 10px 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, .07); pointer-events: auto; }
  .chat-col[data-tab="mine"] .cc-tabs { flex: 1; gap: 2px; padding: 3px; background: rgba(255, 255, 255, .06); }
  .chat-col[data-tab="mine"] .cc-tab { flex: 1; box-shadow: none; }
  .chat-col[data-tab="mine"] .cc-tab:not(.on) { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .chat-col[data-tab="mine"] .cc-min { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .chat-col[data-tab="mine"] .cc-foot-mine { display: block; }
  /* My agents on a short screen (chat.js layout: data-cover="map"): the panel takes the minimap's place, which hides
     meanwhile, and its chrome takes fewer rows so a whole postcard with its ⤓ Save fits in the thread. */
  #chat[data-cover="map"] ~ #minimap { visibility: hidden; }
  .chat-col[data-cover="map"][data-tab="mine"] .cc-head { padding: 6px 8px 5px; }
  .chat-col[data-cover="map"][data-tab="mine"] .cc-tab { flex: 1 1 auto; white-space: nowrap; } /* the narrower panel: "My agents" and its badge stay on one line */
  .chat-col[data-cover="map"] .oc-chips { gap: 4px; padding: 5px 8px 2px; }
  .chat-col[data-cover="map"] .oc-chip { gap: 4px; padding-right: 8px; } /* three chips keep their short names whole */
  .chat-col[data-cover="map"] .oc-head { gap: 4px; padding: 3px 12px 6px; }
  .chat-col[data-cover="map"] .oc-autoline, .chat-col[data-cover="map"] .oc-ailine { display: none; } /* the agent's chip carries its 🤖 */
  .chat-col[data-cover="map"] .oc-toggles { gap: 4px; }
  .chat-col[data-cover="map"] .oc-toggles .toggle { padding: 3px 8px 3px 3px; gap: 5px; font-size: 11px; }
  .chat-col[data-cover="map"] .cc-foot-mine { padding: 5px 12px 6px; }
  .chat-col[data-cover="map"] .oc-lock { gap: 6px; padding: 12px 14px; }
  .chat-col[data-cover="map"] .oc-lock-icon { font-size: 24px; }
}

/* ---------- Notifications (public/notify-ui.js): the 🔔 button in the My agents header opens this sheet in place of the
   chips, the header and the thread (chat.js); the sheet scrolls on its own in a short column. ---------- */
.cc-bell { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--text-2); font: 14px/1 var(--sans); cursor: pointer; }
.cc-bell[hidden] { display: none; }
.cc-bell:hover { background: rgba(255, 255, 255, .07); }
.cc-bell.on { background: rgba(92, 246, 141, .16); box-shadow: inset 0 0 0 1px rgba(92, 246, 141, .45); }
.cc-bell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nt-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nt-box[hidden] { display: none; }
.nt-sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; outline: none; }
.nt-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px 7px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.nt-title { flex: 1; min-width: 0; font: 700 13.5px/1.3 var(--sans); }
.nt-close { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--text-2); font: 700 13px/1 var(--sans); cursor: pointer; }
.nt-close:hover { color: var(--accent); background: rgba(255, 255, 255, .07); }
.nt-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 12px; display: grid; align-content: start; gap: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.nt-row { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--hair); }
.nt-label { font: 700 12.5px/1.3 var(--sans); }
.nt-state { color: var(--accent); font: 600 12px/1.35 var(--sans); overflow-wrap: anywhere; }
.nt-state.wait { color: var(--text-2); }
.nt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nt-btn { padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text); font: 700 12px/1.2 var(--sans); cursor: pointer; }
.nt-btn:hover { background: rgba(92, 246, 141, .18); color: var(--accent); }
.nt-btn.primary { background: var(--accent); color: var(--accent-ink); text-shadow: none; }
.nt-btn.primary:hover { filter: brightness(1.06); }
.nt-btn:disabled { opacity: .55; cursor: progress; }
.nt-link { color: var(--accent); font: 700 12px/1.2 var(--sans); }
.nt-hint, .nt-note { margin: 0; color: var(--text-2); font: 500 11.5px/1.45 var(--sans); }
.nt-rows { display: contents; } /* notify-ui.js rebuilds these rows; they stay items of the .nt-body grid */
.nt-test { justify-self: start; }
.nt-status { margin: 0; min-height: 1.35em; color: var(--text-2); font: 600 11.5px/1.35 var(--sans); }
.nt-status.error { color: #ff8a6a; }
.nt-fine { margin: 0; color: var(--muted); font: 500 11px/1.4 var(--sans); }
.nt-btn:focus-visible, .nt-close:focus-visible, .nt-link:focus-visible, .nt-toggles .toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 768px) {
  .chat-col[data-tab="mine"] .cc-tab { flex: 1 1 auto; white-space: nowrap; } /* with the 🔔 button in the row, "My agents" and its badge stay on one line */
  .chat-col[data-cover="map"][data-tab="mine"] .cc-bell { width: 24px; height: 24px; font-size: 12px; }
  .chat-col[data-cover="map"] .nt-body { gap: 8px; padding: 8px 10px 10px; }
  .chat-col[data-cover="map"] .nt-row { padding: 8px 10px; }
}
/* 768–1100 px: the column in the minimap's place is only 224–236 px wide, so the header tightens (smaller tabs, gaps
   and "—") and the tabs may shrink (a longer label ellipsizes) rather than push 🔔 and "—" out of the column */
@media (min-width: 768px) and (max-width: 1100px) {
  .chat-col[data-cover="map"][data-tab="mine"] .cc-head { gap: 4px; }
  .chat-col[data-cover="map"][data-tab="mine"] .cc-tabs { min-width: 0; padding: 2px; }
  .chat-col[data-cover="map"][data-tab="mine"] .cc-tab { min-width: 0; overflow: hidden; padding-inline: 5px; gap: 3px; font-size: 11.5px; }
  .chat-col[data-cover="map"][data-tab="mine"] .cc-tab > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .chat-col[data-cover="map"][data-tab="mine"] .cc-min { width: 24px; height: 24px; }
}

/* ---------- 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(92,246,141,0); } 100% { box-shadow: 0 0 0 0 rgba(92,246,141,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(92,246,141,.16), rgba(92,246,141,.07)); transition: width .6s ease; pointer-events: none; }
.pl-opt.lead .pl-bar { background: linear-gradient(90deg, rgba(92,246,141,.3), rgba(92,246,141,.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; }
}

/* ---------- City growth: homes badge, East Bay lots, city slots, the wider minimap ---------- */
/* The East Bay (city.east) makes the city about 1,040 × 476: a wider minimap keeps it readable. Its height stays (the
   City chat column above it is sized from the minimap top). */
#ui.mm-wide.mm-east { --mm-w: 300px; }
@media (min-width: 768px) and (max-width: 1100px) { #ui.mm-wide.mm-east { --mm-w: 236px; } }
.menu button .pm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-badge { flex: none; margin-left: auto; font-family: var(--display); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(92,246,141,.14); color: var(--accent); white-space: nowrap; }
.lot-chip.auction { background: rgba(255,177,61,.18); color: #ffc46b; }
.lot-chip.upcoming { background: rgba(170,180,200,.14); color: var(--text-2); }
.city-slots { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.city-slots.full { color: #ffc46b; }

/* ---------- East Bay auction: the top-bar chip and the panel ---------- */
/* Desktop: under the top-right buttons, the feed moves down; hidden while the drawer is open (like the feed). */
.auction-chip { top: calc(var(--gut) + 54px); right: var(--gut); z-index: 4; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 999px; cursor: pointer; color: #ffe2ad; font: 700 13px/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,177,61,.55), 0 0 22px rgba(255,177,61,.18); transition: box-shadow .2s, opacity .25s ease; }
.auction-chip:hover { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,200,110,.9), 0 0 26px rgba(255,177,61,.3); }
#ui.has-auction .feed-col { top: 116px; }
#ui.drawer-open .auction-chip { opacity: 0; pointer-events: none; }
@media (min-width: 768px) and (max-width: 1100px) {
  #ui.has-mayor .auction-chip { top: calc(var(--gut) + 130px); }
  #ui.has-mayor.has-auction .feed-col { top: 190px; }
}
/* a landscape phone: the token card starts about 130 px down, so the chip stays under the top-right buttons and the
   Mayor bar stops short of it */
@media (min-width: 768px) and (max-width: 1100px) and (max-height: 500px) {
  #ui.has-mayor .auction-chip { top: calc(var(--gut) + 54px); }
  #ui.has-mayor.has-auction .mayor-bar { max-width: calc(100vw - 2 * var(--gut) - 236px - 224px); }
  #ui.has-mayor.has-auction .feed-col { top: 116px; }
}
@media (max-width: 767px) {
  .auction-chip { top: 134px; right: var(--gut); padding: 6px 11px; font-size: 12px; }
  #ui.has-auction .mayor-bar { top: 176px; }
  #ui.has-auction .feed-col { top: 176px; }
  #ui.has-auction.has-mayor .feed-col { top: 246px; }
  /* the drawer is a sheet from 132 px down: the Mayor bar and the chip would float over its header */
  #ui.drawer-open .mayor-bar, #ui.drawer-open .auction-chip { display: none; }
}
.au-head { display: grid; gap: 10px; margin-bottom: 12px; }
.au-lot { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,177,61,.16), rgba(255,177,61,.04)); box-shadow: inset 0 0 0 1px rgba(255,177,61,.35); }
.au-lot-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.au-name { font-family: var(--display); font-size: 20px; }
.au-phase { flex: none; font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--text-2); white-space: nowrap; }
.au-phase.bidding { background: var(--accent); color: var(--accent-ink); }
.au-phase.settling, .au-phase.closing { background: rgba(255,177,61,.2); color: #ffc46b; }
.au-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.au-stat { display: grid; gap: 1px; align-content: start; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.au-stat b { font-family: var(--display); font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.au-stat small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; border-radius: 14px; margin-bottom: 10px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.au-box.win { background: rgba(92,246,141,.07); box-shadow: inset 0 0 0 1px rgba(92,246,141,.35); }
.au-box .el-wallet { margin: 0; }
.au-box .cta, .au-box > .ghost-btn { justify-self: start; }
.au-note { margin: 0; font-size: 13px; color: var(--text-2); }
.au-win { font-family: var(--display); font-size: 17px; color: var(--accent); }
.au-you { color: var(--accent); }
.au-bid { display: grid; gap: 4px; min-width: 0; }
.au-field { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 12px; border-radius: 12px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px var(--hair-2); }
.au-field:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.au-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 10px 0; font-family: var(--display); font-size: 20px; font-weight: 700; }
.au-sym { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.au-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.au-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.au-msg { margin: 0 0 10px; }
.au-picks { max-height: 220px; }
.au-bids { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.au-bids li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.035); font-size: 13px; }
.au-bids li.top { background: rgba(92,246,141,.08); box-shadow: inset 0 0 0 1px rgba(92,246,141,.3); }
.au-bids li b { font-family: var(--display); }
.au-who { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.au-queue { display: grid; gap: 10px; margin: 4px 0 12px; }
.au-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.au-sold { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--text-2); }
.au-rules { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.lot-row .cta.small.au-go { background: #ffd26b; box-shadow: 0 6px 18px rgba(255,190,80,.25), inset 0 -2px 0 rgba(0,0,0,.14); }
.menu button.pm-auction { color: #ffe2ad; background: rgba(255,177,61,.1); }

/* Language (public/i18n.js): the Settings row with EN / 中文 (the .g-lang pill inside the menu) */
.switch-row.lang-row { cursor: default; }
.switch-row.lang-row:hover { background: none; }
.menu .g-lang-btn { display: inline-block; padding: 5px 11px; border-radius: 999px; font-weight: 700; }
.menu .g-lang-btn:hover { background: rgba(255,255,255,.07); color: var(--text); }
.menu .g-lang-btn[aria-pressed="true"], .menu .g-lang-btn[aria-pressed="true"]:hover { background: var(--accent); color: var(--accent-ink); cursor: default; }
/* 中文 (<html lang="zh-CN">): a CJK font stack (Noto Sans SC is linked only for 中文; Space Grotesk keeps the wordmark
   and the display numerals), normal letter-spacing and no forced uppercase on kickers, chips and tabs */
:lang(zh) {
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
:is(.kicker, .live-pill b, .tc-day, .phase, .menu-title, .cs-tabs [data-ctab], .badge, .statbar .lb, .section-title, .tag,
  .live-mini, .lot-chip, .buy-progress li, .mine-tag, .pick-head, .field-label, .se-chip, .se-h, .se-table th, .g-cap,
  .g-table th, .g-micro, .g-kicker, .g-tag, .intro-sub, .intro-hint, .cel-kicker, .mb-tag, .el-label, .el-h,
  .menu .menu-head, .cc-day, .pl-kicker, .au-phase, .g-lang-btn):lang(zh) { letter-spacing: normal; text-transform: none; }
/* 中文 has no italic (the browser would slant the glyphs): the muted colour and the dashed border stay the cue */
:is(.reply.pending, .cc-b.th, .cc-ph[data-state="expired"] .cc-ph-note):lang(zh) { font-style: normal; }
/* 中文 labels sized for tracked English capitals: 11px at least */
:is(.mine-tag, .tag, .lot-chip, .se-chip, .tk-stat .kicker, .tk-addr .kicker, .cs-tabs [data-ctab], .g-table th):lang(zh) { font-size: 11px; }

/* ---------- team announcement pop-up (app.js renderAnnouncePop) ---------- */
.announce-pop { position: fixed; left: 50%; top: 152px; z-index: 60; width: min(560px, calc(100vw - 32px)); transform: translateX(-50%); padding: 14px 16px 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(20, 26, 12, .94), rgba(10, 14, 24, .94)); box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(92,246,141,.55); backdrop-filter: blur(10px); }
.announce-pop[hidden] { display: none; }
.announce-pop.in { animation: annin .5s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes annin { from { opacity: 0; transform: translate(-50%, -18px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.ann-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ann-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent, #5cf68d); }
:lang(zh) .ann-kicker { letter-spacing: .04em; text-transform: none; }
.ann-close { width: 30px; height: 30px; border-radius: 10px; }
.ann-text { margin: 8px 2px 0; font-size: 19px; line-height: 1.4; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.announce-modal textarea { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hair, rgba(255,255,255,.14)); background: rgba(255,255,255,.05); color: inherit; font: inherit; resize: vertical; min-height: 84px; }
.an-count { display: block; text-align: right; margin-top: 4px; }
.an-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.an-row select { flex: 1; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); color: inherit; border: 1px solid var(--hair, rgba(255,255,255,.14)); }
.an-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.an-current { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: rgba(92,246,141,.07); box-shadow: inset 0 0 0 1px rgba(92,246,141,.25); }
.an-current p { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 767px) { .announce-pop { top: 130px; } .ann-text { font-size: 17px; } }

/* ---------- camera modes: the dock's 🎥 Camera menu and the pill (app.js renderCam) ---------- */
.cam-menu { min-width: 280px; background: var(--panel-solid); }
.dock:has(#cam-menu:not([hidden])) { z-index: 6; }
.cam-modes { display: flex; flex-direction: column; gap: 2px; }
.cam-btn { display: grid; gap: 1px; text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.cam-btn b { font-size: 13.5px; font-weight: 700; }
.cam-btn small { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.cam-btn:hover { background: rgba(255,255,255,.07); }
.cam-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cam-btn[aria-pressed="true"] small { color: var(--accent-ink); opacity: .75; }
.dock-btn.cam-dock.on { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 18px rgba(92,246,141,.25); }
.cam-pill { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 30; display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text); background: rgba(10,14,24,.78); box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(92,246,141,.45); backdrop-filter: blur(8px); pointer-events: auto; white-space: nowrap; }
.cam-pill[hidden] { display: none; }
.cam-pill .icon-btn { width: 28px; height: 28px; border-radius: 999px; }
@media (max-width: 767px) { .cam-pill { bottom: 176px; max-width: calc(100vw - 32px); font-size: 12px; } #cam-pill-text { overflow: hidden; text-overflow: ellipsis; } }
#cam-menu .cam-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; }
#cam-menu .cam-btn b { white-space: nowrap; }

/* the look editor (public/look-editor.js) and the wallet menu's edit buttons */
.look-modal { width: min(880px, calc(100vw - 24px)); }
.look-body { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 18px; align-items: start; }
.look-preview { position: relative; height: 380px; border-radius: 18px; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, rgba(255,255,255,.14), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px var(--hair); }
.look-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.look-canvas:active { cursor: grabbing; }
.look-badge { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-2); background: rgba(0,0,0,.35); }
.look-badge[hidden] { display: none; }
.look-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.look-tab { border: 0; padding: 7px 12px; border-radius: 999px; font: 700 13px var(--display); color: var(--text-2); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; }
.look-tab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }
.look-rows { display: grid; gap: 14px; max-height: 324px; overflow-y: auto; padding-right: 4px; }
.look-label { margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.look-chips, .look-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.look-chips + .look-swatches { margin-top: 8px; }
.look-chip { border: 0; padding: 6px 11px; border-radius: 999px; font: 600 13px var(--sans); color: var(--text); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--hair-2); cursor: pointer; }
.look-chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); box-shadow: none; }
.look-swatch { border: 0; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); cursor: pointer; }
.look-swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.look-msg { margin: 12px 0 0; }
.look-msg[hidden] { display: none; }
.look-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.look-actions .grow { flex: 1; }
.look-note { margin-top: 10px; }
.wm-item { display: flex; align-items: center; gap: 4px; }
.wm-item .wm-row { flex: 1; min-width: 0; }
.wm-edit { flex: none; }
@media (max-width: 720px) {
  .look-body { grid-template-columns: 1fr; }
  .look-preview { height: 250px; }
  .look-rows { max-height: none; overflow: visible; }
}

/* walk mode (public/walk-mode.js): the usual HUD steps aside and the minimap moves up; the walk HUD sits over the city.
   Phones (.phone): the chat lines under the top bar, the input behind 💬, the joystick bottom-left, the emotes bottom-right. */
body.walking #ui > :not(#minimap):not(#toasts) { display: none !important; }
body.walking #minimap { top: var(--gut); bottom: auto; transform: scale(.8); transform-origin: top left; pointer-events: none; }
.walk-hud { position: fixed; inset: 0; z-index: 30; pointer-events: none; font-family: var(--sans); color: var(--text); }
.walk-hud > * { pointer-events: auto; }
.walk-pad { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.walk-pad:active { cursor: grabbing; }
.walk-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--panel-strong); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair-2); max-width: calc(100vw - 24px); }
.walk-title { font: 700 14px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.walk-btn { height: 34px; min-width: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--hair-2); color: var(--text); font: 700 13px var(--display); cursor: pointer; flex: none; }
.walk-btn:hover { color: var(--accent); }
.walk-view, .walk-chatbtn { padding: 0; font-size: 16px; }
.walk-chat { position: absolute; left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); display: grid; gap: 6px; }
.walk-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.walk-lines li { justify-self: start; max-width: 100%; padding: 6px 11px; border-radius: 12px; background: rgba(10,14,24,.74); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.walk-lines li.agent { box-shadow: inset 3px 0 0 var(--accent); }
.walk-lines li.sys { color: var(--muted); font-style: italic; }
.walk-name { border: 0; background: none; padding: 0; font: 700 14px var(--display); color: var(--accent); cursor: pointer; }
.walk-form { display: flex; gap: 6px; }
.walk-input { flex: 1; min-width: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: rgba(10,14,24,.86); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair-2); font: 14px var(--sans); outline: none; }
.walk-input:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(92,246,141,.18); }
.walk-send { border: 0; border-radius: 12px; padding: 0 14px; background: var(--accent); color: var(--accent-ink); font: 700 13px var(--display); cursor: pointer; }
.walk-note { margin: 0; font-size: 12px; color: rgba(244,247,255,.72); text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.walk-emotes { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; }
.walk-emotes button { width: 48px; height: 48px; border: 0; border-radius: 50%; font-size: 22px; background: var(--panel-strong); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair-2); cursor: pointer; transition: transform .12s var(--ease); }
.walk-emotes button:active { transform: scale(.9); }
.walk-joy { position: absolute; left: 24px; bottom: 28px; width: 124px; height: 124px; border-radius: 50%; background: rgba(10,14,24,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); pointer-events: none; }
.walk-joy.on { background: rgba(10,14,24,.5); }
.walk-knob { position: absolute; left: 37px; top: 37px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.4); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.walk-hint { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 16px; background: var(--panel-strong); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair-2); font-size: 14px; line-height: 1.5; }
.walk-hint p { margin: 0 0 10px; }
.walk-hint .walk-send { padding: 8px 14px; }
.walk-hud.phone .walk-top { top: max(10px, env(safe-area-inset-top)); padding-left: 12px; }
.walk-hud.phone .walk-title { font-size: 13px; }
.walk-hud.phone .walk-chat { top: 60px; bottom: auto; left: 12px; width: calc(100vw - 24px); }
.walk-hud.phone .walk-lines li { font-size: 13px; padding: 5px 10px; }
.walk-hud.phone .walk-lines li:nth-last-child(n+4) { display: none; }
.walk-hud.phone[data-chat="closed"] .walk-form, .walk-hud.phone[data-chat="closed"] .walk-note { display: none; }
.walk-hud.phone .walk-emotes { right: 12px; bottom: 28px; display: grid; grid-template-columns: repeat(2, 48px); }
.walk-hud.phone.unread .walk-chatbtn { box-shadow: inset 0 0 0 2px var(--accent); }
.walk-hud.phone .walk-hint { top: auto; bottom: 170px; }
@media (max-width: 720px) { body.walking #minimap { display: none !important; } }

/* plush portraits (public/plush-portrait.js): a resident's plush face instead of its initials or shape emoji */
.ring.face { color: transparent; text-shadow: none; background: var(--face) 50% 50% / 128% no-repeat, color-mix(in srgb, var(--c, #888) 32%, #0b0f1a); }
.pf-glyph.face { animation: face-in .35s ease both; background: var(--face) center 40% / 112% no-repeat, radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c, #888) 45%, #1d2640), #0a0e18); }
@keyframes face-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* ---------- Crews and events (delivery 3 of social v2: public/crews-ui.js, public/events-ui.js) ---------- */
/* The top-right row with 🏳️ Crews and 📅 Events never runs under the clock (it already did at 1440 px with the X link
   or the spectators pill): the clock and the Mayor bar stay next to the brand up to 1760 px, the spectators pill shows
   from 2241 px (at most 236 px wide: "23 watching · 18,450 visitors" fits), the row compacts below 1241 px (the X link
   and the wallet's address hide), "Connect wallet" and the ✨ Bring button fold to their icons below 1101 px and on small
   phones (their text stays the accessible name; ✨ has a title too), and from 768 to 820 px (an iPad in portrait) the
   buttons are 32 px. scripts/events-check.mjs sweeps these edges. */
@media (min-width: 768px) and (max-width: 1760px) {
  .timecap { left: calc(var(--gut) + 224px + 12px); transform: none; min-width: 0; }
  .mayor-bar { left: calc(var(--gut) + 224px + 12px); transform: none; }
}
@media (max-width: 2240px) { .spect { display: none; } }
.spect { max-width: 236px; }
#spect-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) and (max-width: 1240px) {
  .x-btn { display: none; }
  .topright { gap: 4px; }
  .topright .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
  .wallet-hud.connected #wallet-label { display: none; }
  .wallet-hud.connected { padding: 0 11px; }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .topright .cta { font-size: 0; gap: 0; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 10px; }
  .topright .cta::before { content: "✨"; font-size: 16px; }
  .wallet-hud { height: 34px; border-radius: 10px; }
  .wallet-hud:not(.connected) { width: 34px; }
}
@media (min-width: 768px) and (max-width: 820px) {
  .topright .icon-btn, .topright .cta { width: 32px; height: 32px; }
  .wallet-hud { height: 32px; }
  .wallet-hud:not(.connected) { width: 32px; }
  .wallet-hud.connected { padding: 0 9px; }
}
@media (max-width: 767px) {
  .x-btn { display: none; }
  .topright { gap: 4px; }
  .topright .icon-btn { width: 30px; height: 30px; border-radius: 9px; }
  .topright .icon-btn svg { width: 16px; height: 16px; }
  .wallet-hud { height: 30px; border-radius: 9px; }
  .wallet-hud:not(.connected) { width: 30px; }
  .topright .cta { height: 30px; padding: 0 10px; font-size: 12px; }
}
@media (max-width: 440px) {
  .topright .cta { font-size: 0; gap: 0; width: 30px; padding: 0; justify-content: center; border-radius: 9px; }
  .topright .cta::before { content: "✨"; font-size: 15px; }
}
/* 📅 lights up while an event is live */
.topright [data-nav="events"] { position: relative; }
.topright [data-nav="events"].live::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #ff6fa8; box-shadow: 0 0 8px #ff6fa8; }

/* the live chip under the clock (events-ui.js sets left/top; it clears the Mayor bar, the auction chip and, on a phone,
   the top-right row) */
.event-chip { z-index: 4; display: inline-flex; align-items: center; gap: 8px; max-width: min(460px, calc(100vw - 2 * var(--gut))); padding: 7px 13px; border: 0; border-radius: 999px; cursor: pointer; color: var(--text); font: 700 13px/1.2 var(--display); white-space: nowrap; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,209,102,.55), 0 0 22px rgba(255,209,102,.16); transition: box-shadow .2s; }
.event-chip.live { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,111,168,.65), 0 0 26px rgba(255,111,168,.24); }
.event-chip:hover { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.6), 0 0 26px rgba(255,111,168,.3); }
.event-chip .ec-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #ffd166; }
.event-chip.live .ec-dot { background: #ff6fa8; animation: evtpulse 1.6s infinite; }
.event-chip .ec-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.event-chip .ec-place { flex: none; color: var(--text-2); font: 600 12px/1.2 var(--sans); }
@keyframes evtpulse { 0% { box-shadow: 0 0 0 0 rgba(255,111,168,.6); } 70% { box-shadow: 0 0 0 7px rgba(255,111,168,0); } 100% { box-shadow: 0 0 0 0 rgba(255,111,168,0); } }
@media (max-width: 767px) {
  .event-chip { padding: 6px 11px; font-size: 12px; max-width: calc(100vw - 20px); }
  .event-chip .ec-place { display: none; }
  #ui.has-event .feed-col { margin-top: 44px; }
  #ui.drawer-open .event-chip { display: none; }
  #ui.drawer-open .poll-card { display: none; } /* it floated over the drawer sheet's rows */
}
#ui.drawer-open > .guide-pill { display: none; } /* "New here?" comes back when the drawer closes */
/* An open drawer on a narrower desktop: the chip (up to 1151 px) and the Mayor bar (up to 1020 px) would run over the
   pane's head, the crew page's ← Back included, so they hide until it closes (📅 keeps its live dot); up to 1255 px the
   Mayor bar stops 8 px short of the drawer. (The feed rows cap the chip in events-ui.js chipSpot.) */
@media (min-width: 768px) and (max-width: 1151px) { #ui.drawer-open .event-chip { display: none; } }
@media (min-width: 768px) and (max-width: 1020px) { #ui.drawer-open .mayor-bar { display: none; } }
@media (min-width: 1021px) and (max-width: 1255px) { #ui.drawer-open .mayor-bar { max-width: calc(100vw - var(--drawer-w) - var(--gut) - 260px); } }

/* the 📅 Events pane */
.evt-explain { margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.evt-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.evt-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.evt-row.live { background: rgba(255,111,168,.08); box-shadow: inset 0 0 0 1px rgba(255,111,168,.45); }
.evt-row.done { opacity: .75; }
.evt-ico { font-size: 22px; flex: none; }
.evt-main { flex: 1; display: grid; gap: 2px; min-width: 0; justify-items: start; }
.evt-title { font-family: var(--display); font-size: 14.5px; overflow-wrap: anywhere; }
.evt-meta { font-size: 12px; color: var(--text-2); }
.evt-tag.official { background: rgba(92,246,141,.14); color: var(--accent); }
.evt-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; }
@media (max-width: 420px) { .evt-row { flex-wrap: wrap; } .evt-actions { flex-direction: row; width: 100%; justify-content: flex-end; } }

/* the event start card (the celebration queue's `event` kind) */
.cel-card.event { background: radial-gradient(120% 90% at 50% 0%, rgba(255,111,168,.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,111,168,.16); }
.cel-card.event .cel-icon { box-shadow: 0 0 0 3px #ff6fa8, 0 0 40px rgba(255,111,168,.45); }

/* the 🏳️ Crews pane: the ranking (each row striped in its crew colour; the crowned ones warmer) */
.crew-explain { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.crew-week { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); }
.crew-found { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 14px; }
.crew-found small { font-size: 12px; }
.crew-resume { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.crew-rank { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.crew-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px 9px 10px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 3px 0 0 var(--crew, #9aa3b8), inset 0 0 0 1px var(--hair); }
.crew-row:hover { background: rgba(255,255,255,.08); }
.crew-row.crowned { background: linear-gradient(90deg, rgba(255,209,102,.12), rgba(255,255,255,.03)); }
.crew-n { width: 22px; text-align: center; font-family: var(--display); font-weight: 700; color: var(--text-2); flex: none; }
.crew-flag { font-size: 20px; flex: none; }
.crew-main { flex: 1; display: grid; min-width: 0; }
.crew-main b { font-family: var(--display); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-main small, .crew-pts small { font-size: 11.5px; color: var(--muted); }
.crew-pts { display: grid; justify-items: end; flex: none; }
.crew-pts b { font-family: var(--display); font-size: 16px; color: var(--accent); }
/* a crew page */
.crew-hero { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 10px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--crew, #9aa3b8) 22%, transparent), rgba(255,255,255,.03)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crew, #9aa3b8) 55%, transparent); }
.crew-bigflag { font-size: 40px; line-height: 1; flex: none; }
.crew-id { display: grid; gap: 2px; min-width: 0; }
.crew-id h3 { margin: 0; font-family: var(--display); font-size: 22px; overflow-wrap: anywhere; }
.crew-id small { font-size: 12px; color: var(--text-2); }
.crew-hq { display: flex; align-items: center; gap: 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; }
.crew-stats { margin-bottom: 12px; }
.crew-members, .crew-mine { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.crew-member, .crew-mine-row { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 12px; }
.crew-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; padding: 0; }
.crew-open:hover b { color: var(--accent); }
.crew-member .ring, .crew-mine-row .ring { width: 34px; height: 34px; font-size: 12px; flex: none; }
#crews-scroll .fine + .section-title { margin-top: 18px; } /* a note ends its block: room before the next section */
.crew-err { color: #ffb0b0; }
.ghost-btn.armed { color: #ffb0b0; box-shadow: inset 0 0 0 1px rgba(255,93,93,.6); }
.crew-dissolve { color: #ff9a9a; }
.crew-sched { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; align-items: end; }
.crew-sched .ob-input { width: 100%; min-width: 0; }
.crew-sched .crew-ev-go { grid-column: 1 / -1; justify-self: end; }
.crew-ev-when { display: grid; gap: 3px; min-width: 0; font-size: 11.5px; color: var(--text-2); } /* the start's visible label */
#crews-scroll .ob-row + .section-title { margin-top: 14px; } /* "Schedule an event" under the HQ row */
#crews-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* one line: the hero carries the whole name */
.crew-main small .nw, .crew-id small .nw { white-space: nowrap; }
.crew-nowallet { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; }
.crew-nowallet p { margin: 0; flex: 1 1 200px; }
/* the "Found a crew" modal (the land purchase's .buy-* layout) */
.crew-field { display: grid; gap: 6px; }
.crew-swatches, .crew-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.crew-swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--crew); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.crew-swatch.sel { box-shadow: 0 0 0 2px #0b0f1a, 0 0 0 4px #fff; }
.crew-flagbtn { width: 36px; height: 36px; border-radius: 10px; font-size: 20px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); }
.crew-flagbtn.sel { background: rgba(92,246,141,.14); box-shadow: inset 0 0 0 1.5px var(--accent); }
.crew-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.crew-preview { box-shadow: inset 4px 0 0 var(--crew, #9aa3b8), inset 0 0 0 1px var(--hair); }
.crew-steps .tr { padding: 9px 12px; }
@media (max-width: 767px) { .crew-sched, .crew-modes { grid-template-columns: 1fr; } }
/* crews in the Residents list, the City chat and the profile */
.res-flag, .cc-flag { flex: none; font-size: 12px; }
/* two columns shared by every row (the rows' own boxes step aside): the kickers, then Best friends, Crew and Stamps at
   one left edge whatever the longest kicker is */
.pf-social { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px 10px; margin: -2px 0 12px; }
.pf-srow { display: contents; }
.pf-srow > :not(.kicker) { justify-self: start; min-width: 0; }
.pf-best { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-friend { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: rgba(255,209,102,.08); box-shadow: inset 0 0 0 1px rgba(255,209,102,.3); font-size: 12.5px; font-weight: 600; }
.pf-friend .ring { width: 26px; height: 26px; font-size: 10px; }
.pf-friend .ring .ai { display: none; }
.pf-crew { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: inset 3px 0 0 var(--crew, #9aa3b8), inset 0 0 0 1px var(--hair); font-size: 12.5px; max-width: 100%; }
.pf-crew small { color: var(--muted); }
/* one line on a narrow profile: the flag and its crown side by side, the role whole, a long name cut with an ellipsis */
.pf-crew-flag, .pf-crew small { flex: none; white-space: nowrap; }
.pf-crew b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-stamps { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-stamp { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 15px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--hair); cursor: default; }

/* ---------- Soul and voice (public/ideas-ui.js, public/soul-ui.js; the City chat's idea lines) ---------- */
/* The top-right row with one more button (💡 Ideas, ~48 px) stays 4 px clear of the clock (scripts/events-check.mjs and
   scripts/ideas-check.mjs sweep it): from 768 to 900 px its buttons are 30 px with a 3 px gap; from 1101 to 1180 px
   "Connect wallet" still folds to its icon; the row stays compact (no X link) up to 1290 px; the clock and the Mayor bar
   stay next to the brand up to 1860 px; the spectators pill waits until 2321 px. */
@media (min-width: 768px) and (max-width: 900px) {
  .topright { gap: 3px; }
  .topright .icon-btn, .topright .cta { width: 30px; height: 30px; }
  .wallet-hud { height: 30px; }
  .wallet-hud:not(.connected) { width: 30px; }
  /* the live day has 3-4 digits ("DAY 1234"): a tighter clock keeps the row clear of it at 768 px (an iPad in portrait) */
  .timecap { gap: 8px; padding: 8px 12px 12px; }
  .tc-clock { font-size: 26px; }
  .tc-bar { left: 12px; right: 12px; }
}
@media (min-width: 1101px) and (max-width: 1180px) {
  .wallet-hud:not(.connected) #wallet-label { display: none; }
  .wallet-hud:not(.connected) { width: 34px; padding: 0; justify-content: center; }
}
@media (min-width: 1241px) and (max-width: 1290px) {
  .x-btn { display: none; }
  .topright { gap: 4px; }
  .topright .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
  .wallet-hud.connected #wallet-label { display: none; }
  .wallet-hud.connected { padding: 0 11px; }
}
@media (min-width: 1761px) and (max-width: 1860px) {
  .timecap { left: calc(var(--gut) + 224px + 12px); transform: none; min-width: 0; }
  .mayor-bar { left: calc(var(--gut) + 224px + 12px); transform: none; }
}
@media (min-width: 2241px) and (max-width: 2320px) { .spect { display: none; } }
/* 💡 Ideas: the tabs under the head; rows like the crew rows, the kind's colour on the left edge; an idea's page */
.ideas-tabs { margin: 0 0 10px; }
.ideas-tabs[hidden] { display: none; }
.idea-intro, .idea-empty { margin: 0 0 10px; }
.idea-list, .idea-answers, .idea-chain, .idea-responses, .idea-people { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.idea-row, .idea-hero { --ik: #9aa3b8; }
.idea-row.k-opinion, .idea-hero.k-opinion { --ik: #ffd166; }
.idea-row.k-question, .idea-hero.k-question { --ik: #8f9bff; }
.idea-row.k-proposal, .idea-hero.k-proposal { --ik: var(--accent); }
.idea-row { display: flex; align-items: center; gap: 4px; min-width: 0; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 3px 0 0 var(--ik), inset 0 0 0 1px var(--hair); }
.idea-open { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px 9px 12px; border: 0; border-radius: 14px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.idea-open:hover { background: rgba(255,255,255,.05); }
.idea-kind { flex: none; font-size: 17px; line-height: 1.25; }
.idea-main { display: grid; gap: 3px; min-width: 0; }
.idea-text { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-meta, .idea-sentby, .idea-note { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.idea-note b { color: var(--text-2); }
.idea-send { flex: none; margin-right: 10px; }
.idea-sec { margin-top: 14px; }
.idea-hall-head { display: grid; gap: 4px; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: rgba(92,246,141,.05); box-shadow: inset 0 0 0 1px rgba(92,246,141,.25); }
.idea-owner, .idea-msg, .idea-off { margin: 0 0 10px; }
.idea-msg.ok, .soul-msg.ok { color: var(--accent); }
.idea-answer { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 13px; overflow-wrap: anywhere; }
.idea-answer.a-support b { color: var(--accent); }
.idea-answer.a-against b { color: #ff9a9a; }
.idea-answer.a-later b { color: #ffd166; }
.idea-short { justify-self: start; text-align: left; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.idea-people li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,.04); }
.idea-rank { width: 22px; flex: none; text-align: right; color: var(--muted); font-weight: 700; }
.idea-person { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.idea-inf { flex: none; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.idea-hero { margin: 0 0 10px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: inset 3px 0 0 var(--ik), inset 0 0 0 1px var(--hair); }
.idea-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.idea-tag { padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-2); font-size: 11.5px; }
.idea-tag.s-sent, .idea-tag.s-building { color: #ffd166; }
.idea-tag.s-built { color: var(--accent); }
.idea-tag.s-declined { color: #ff9a9a; }
.idea-big { margin: 8px 0; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.idea-byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.idea-author { text-decoration: none; }
.idea-counts { margin: 0 0 10px; color: var(--text-2); font-size: 12.5px; }
.idea-box { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,209,102,.07); box-shadow: inset 0 0 0 1px rgba(255,209,102,.25); font-size: 12.5px; overflow-wrap: anywhere; }
.idea-quote { margin: 4px 0 0; color: var(--text); overflow-wrap: anywhere; }
.idea-sendbox { display: grid; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: rgba(92,246,141,.06); box-shadow: inset 0 0 0 1px rgba(92,246,141,.3); }
.idea-sendbox .ob-input { width: 100%; resize: vertical; }
.idea-sendbox .buy-msg { margin: 0; }
.idea-sendrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idea-sendrow .idea-send { margin: 0; }
.idea-chain li, .idea-responses li { display: grid; gap: 2px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.035); font-size: 12.5px; overflow-wrap: anywhere; }
.idea-chain li { grid-template-columns: minmax(0, 1fr) auto; }
.idea-chain .idea-why { grid-column: 1 / -1; color: var(--muted); }
.idea-responses .st-reject b { color: #ff9a9a; }
.idea-responses .st-question b { color: #aab4ff; }
/* the Mayor pane's City Hall row */
.hall-box { align-items: flex-start; }
.hall-open { white-space: normal; text-align: left; }
/* the City chat: an idea line's button and an idea's city card */
.cc-idea-btn { display: inline-block; max-width: 100%; margin-top: 5px; padding: 3px 9px; border: 0; border-radius: 999px; background: rgba(255,209,102,.1); box-shadow: inset 0 0 0 1px rgba(255,209,102,.35); color: #ffe3a3; font: 600 11.5px/1.3 var(--sans); text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.cc-idea-btn:hover { background: rgba(255,209,102,.18); }
.cc-moment.cc-idea .cc-card { box-shadow: inset 0 0 0 1px rgba(255,209,102,.4); }
/* the resident card's ✨ Soul */
.pf-soul { display: grid; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--hair); }
.pf-soul[hidden] { display: none; }
.pf-soul-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-soul-head .section-title { margin: 0; }
.pf-soul-edit { align-self: flex-start; margin-top: 8px; max-width: 100%; }
.pf-soul-block { display: grid; gap: 3px; }
.pf-soul-text { margin: 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; white-space: pre-line; }
.pf-goals, .pf-beliefs { display: grid; gap: 3px; margin: 0; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.pf-belief { text-align: left; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.pf-inf { flex: none; }
/* My agents: the ✨ Soul button and the soul editor in place of the thread */
.oc-toggles .oc-soul-btn { padding: 4px 10px; }
/* My agents: 🔑 Reconnect agent and its dialog (#modal-rekey, public/rekey-ui.js) */
.oc-toggles .oc-rekey-btn { padding: 4px 10px; }
#rekey-body { display: grid; gap: 12px; }
#rekey-body > p { margin: 0; }
.rekey-who { font-size: 15px; overflow-wrap: anywhere; }
.rekey-warn { margin: 0; font-size: 13px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 190, 80, .08); box-shadow: inset 0 0 0 1px rgba(255, 190, 80, .35); color: #ffd9a0; }
.rekey-cmd { display: block; max-width: 100%; padding: 9px 12px; border-radius: 10px; background: #05070d; box-shadow: inset 0 0 0 1px var(--hair-2); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #dfe8ff; white-space: pre-wrap; word-break: break-all; user-select: all; }
.oc-soul { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 12px; }
.oc-soul[hidden] { display: none; }
.soul-ed { display: grid; gap: 8px; }
.soul-head { display: flex; align-items: center; gap: 8px; }
.soul-title { flex: 1; min-width: 0; font-family: var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soul-close { flex: none; width: 30px; height: 30px; }
.soul-intro, .soul-private, .soul-inf, .soul-msg { margin: 0; }
.soul-field { display: grid; gap: 4px; min-width: 0; }
.soul-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.soul-in { width: 100%; min-height: 64px; resize: vertical; line-height: 1.4; }
.soul-goal-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.soul-goal-row .soul-count { flex: none; min-width: 52px; text-align: right; }
.soul-in[aria-invalid="true"], .soul-goal[aria-invalid="true"] { border-color: rgba(255,93,93,.7); }
.soul-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.soul-sec { margin: 6px 0 0; }
.soul-mem, .soul-notes { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.soul-mem li, .soul-notes li { display: grid; gap: 2px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: 12.5px; overflow-wrap: anywhere; }
.soul-clear { justify-self: start; }
