/* MICROCITY NYC — cozy New York UI. Dark translucent panels, warm accents, subway-bullet chips. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #1d2230; font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }

.mc-ui {
  /* warm espresso panels, like the inside of a corner coffee shop after dark */
  --panel: rgba(29, 25, 23, 0.93);
  --panel-hi: rgba(40, 34, 31, 0.96);
  --line: rgba(255, 236, 214, 0.09);
  --enamel: #0d0d0f;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .8 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  --ink: #f6f0e6;
  --ink-2: #d2c9ba;
  --dim: #9c958a;
  --accent: #ffb454;
  --accent-2: #ff7a59;
  --good: #7fd98a;
  --bad: #ff6f61;
  --warn: #ffc857;
  --ui-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sign-font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --r: 14px;
  --insp-w: clamp(360px, 26vw, 410px);
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}
.mc-ui * { box-sizing: border-box; }
.mc-ui button { font-family: inherit; }
.mc-ui ::-webkit-scrollbar { width: 9px; height: 9px; }
.mc-ui ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
.mc-ui ::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.24); }
.mc-ui ::-webkit-scrollbar-track { background: transparent; }

.panel, .panel-glass {
  background: var(--grain), var(--panel);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  backdrop-filter: blur(12px) saturate(1.25);
  border: 1px solid rgba(255,230,200,.08);
  box-shadow: 0 12px 34px rgba(8,6,4,.45), inset 0 1px 0 rgba(255,240,220,.06);
  border-radius: var(--r);
  pointer-events: auto;
}
.dim { color: var(--dim); }
.small { font-size: 11.5px; }
.warn { color: var(--warn); }
.badt { color: var(--bad) !important; }
.goodt { color: var(--good) !important; }
.sp { flex: 1; }
kbd { font-family: var(--sign-font); font-size: 10.5px; font-weight: 800; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--ink); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { font: inherit; font-weight: 800; font-size: 12.5px; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 6px 11px; cursor: pointer; transition: background .15s, transform .1s, color .15s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.15); }
.btn:active { transform: translateY(1px); }
.btn.on, .btn.primary { background: var(--accent); color: #2a1c08; border-color: transparent; }
.btn.primary:hover, .btn.on:hover { background: #ffc374; }
.btn.big { font-size: 15px; padding: 10px 18px; border-radius: 12px; }
.btn.sm { font-size: 11.5px; padding: 3px 9px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn kbd { background: rgba(0,0,0,.12); border-color: rgba(0,0,0,.15); color: inherit; }
.btn.warnb { background: var(--bad); color: #fff; }
.ib { background: transparent; border: 0; color: var(--ink-2); font-size: 15px; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.ib:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.ib.sm { width: 24px; height: 24px; font-size: 12px; }
.btn-more { display: block; width: 100%; margin: 8px 0 2px; background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.14); color: var(--ink-2); font-weight: 800; font-size: 12px; border-radius: 9px; padding: 6px; cursor: pointer; }
.btn-more:hover { background: rgba(255,255,255,.09); color: var(--ink); }

/* ---------- HUD ---------- */
.hud { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; align-items: stretch; pointer-events: none; z-index: 20; }
.hud > * { pointer-events: auto; }
.hud-l { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; position: relative; min-width: 0; }
.wordmark { display: flex; align-items: center; gap: 8px; background: #0c0c0e; border-radius: 10px; padding: 7px 12px 6px 7px; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); cursor: default; }
.wordmark::before { content: ''; position: absolute; left: 7px; right: 7px; top: 3px; height: 1.5px; background: rgba(255,255,255,.85); border-radius: 2px; }
.wm-bullet { width: 30px; height: 30px; border-radius: 50%; background: #FF6319; color: #fff; font-family: var(--sign-font); font-weight: 800; font-size: 19px; display: inline-flex; align-items: center; justify-content: center; flex: none; letter-spacing: 0; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.wm-bullet.big { width: 50px; height: 50px; font-size: 31px; }
.wm-words { display: flex; flex-direction: column; line-height: 1.05; padding-top: 2px; }
.wm-main { font-family: var(--sign-font); font-weight: 800; font-size: 17px; letter-spacing: .015em; color: #fff; white-space: nowrap; }
.wm-main em { font-style: normal; font-weight: 600; color: #fff; opacity: .92; }
.wm-sub { font-family: var(--sign-font); font-size: 9.5px; font-weight: 600; color: #b8b8b8; letter-spacing: .04em; margin-top: 2px; white-space: nowrap; }
.hud-sep { width: 1px; align-self: stretch; margin: 6px 0; background: var(--line); }
.clock { display: flex; flex-direction: column; width: 124px; flex: none; }
.ck-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); font-weight: 700; white-space: nowrap; overflow: hidden; }
.ck-saved { display: none; color: var(--good); font-weight: 900; }
.clock.saved .ck-date { display: none; }
.clock.saved .ck-saved { display: inline; animation: fpop .4s ease-out; }
.ck-day { font-family: var(--sign-font); font-weight: 800; font-size: 9.5px; letter-spacing: .08em; background: var(--accent); color: #2a1c08; border-radius: 4px; padding: 1px 5px; }
.ck-time { font-family: var(--sign-font); font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; }
.hud.paused .ck-time { animation: blinkp 1.4s steps(2, jump-none) infinite; color: var(--accent); }
@keyframes blinkp { 50% { opacity: .45; } }
.wx { display: flex; align-items: center; gap: 8px; cursor: default; width: 136px; flex: none; min-width: 0; }
.wx-ic { width: 30px; height: 27px; flex: none; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.pxi { display: block; image-rendering: pixelated; }
.wx-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.wx-t { font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.wx-d { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; background: rgba(255,255,255,.05); padding: 3px 8px; border-radius: 99px; cursor: default; width: 112px; text-align: center; flex: none; font-variant-numeric: tabular-nums; }
.pop b { color: var(--ink); }
.hud-speed { display: flex; align-items: center; gap: 2px; padding: 5px; }
.hud-speed .hud-sep { margin: 6px 4px; }
.spd { background: transparent; border: 0; color: var(--ink-2); font-family: var(--sign-font); font-weight: 800; font-size: 13px; min-width: 38px; height: 34px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; display: inline-flex; align-items: center; justify-content: center; }
.spd.cam { min-width: 32px; }
.spd:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.spd.on { background: var(--accent); color: #2a1c08; box-shadow: 0 2px 8px rgba(255,180,84,.35); }
.hud.paused .spd[data-speed="0"].on { background: var(--accent-2); color: #fff; }
.hud-nav { margin-left: auto; display: flex; align-items: center; gap: 1px; padding: 5px; }
.navb { position: relative; background: transparent; border: 0; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 5px; border-radius: 10px; cursor: pointer; font-weight: 800; font-size: 12.5px; transition: background .15s; white-space: nowrap; }
/* instant card under each nav button: bullet, name, what it opens, shortcut (the words collapse when the bar is tight) */
.nb-tip { position: absolute; top: calc(100% + 9px); right: 0; display: flex; align-items: center; gap: 9px; background: #0c0c0e; color: #fff; padding: 7px 9px 7px 7px; border-radius: 10px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(-3px); transition: opacity .12s, transform .12s; box-shadow: 0 6px 16px rgba(0,0,0,.4); z-index: 5; text-align: left; }
.nb-tip .nb-bul, .nb-tip .nb-q { width: 26px; height: 26px; font-size: 14px; }
.nb-tt { display: flex; flex-direction: column; gap: 1px; }
.nb-tt b { font-family: var(--sign-font); font-size: 13px; font-weight: 800; }
.nb-tt span { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.nb-tip kbd { font-family: var(--sign-font); font-size: 11px; font-weight: 800; color: var(--ink-2); border: 1px solid rgba(255,255,255,.22); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.navb:hover .nb-tip { opacity: 1; transform: none; }
.navb:hover { background: rgba(255,255,255,.08); }
.navb.on { background: rgba(255,255,255,.14); }
.nb-bul, .win-bul { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--sign-font); font-weight: 800; font-size: 12.5px; color: #fff; flex: none; box-shadow: inset 0 -1.5px 0 rgba(0,0,0,.18); }
.nb-q { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; color: var(--ink-2); }
.navb.help { padding: 0 6px; }
/* Narrower screens: shed the extras first so the nav keeps its words as long as possible. */
.hud-l, .hud-speed, .hud-nav { flex: none; }
@media (max-width: 1700px) { .pop { display: none; } }
@media (max-width: 1640px) { .wm-sub { display: none; } .wm-main { font-size: 15.5px; } .navb { font-size: 12px; gap: 5px; padding: 0 7px 0 4px; }
  .wx { width: 78px; } .wx-d { display: none; } .spd { min-width: 34px; } .spd.cam { min-width: 30px; } }
@media (max-width: 1480px) {
  .wm-words { display: none; } .wordmark { padding-right: 7px; } .navb.help { display: none; } .navb { padding: 0 6px 0 4px; gap: 4px; } .hud-l { gap: 9px; } }
@media (max-width: 1344px) { .nb-l { display: none; } .navb { padding: 0 5px; } .navb.help { display: inline-flex; } }
.hud.compact .nb-l { display: none; } .hud.compact .navb { padding: 0 5px; gap: 0; } .hud.compact .navb.help { display: inline-flex; }
@media (max-width: 900px) { .clock { width: 96px; } .ck-date { display: none; } .hud-l, .hud-speed, .hud-nav { flex: 0 1 auto; min-width: 0; } }
/* speed and camera buttons: one pill on wide screens; on phones they split into two (see the phone rules) */
.spd-g, .cam-g { display: contents; }

.follow-pill { position: fixed; bottom: 14px; left: 50%; transform: translate(-50%, 90px); display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border-radius: 999px; z-index: 22; visibility: hidden; transition: transform .35s cubic-bezier(.2,1.3,.4,1), visibility 0s linear .35s; cursor: pointer; font-size: 13px; }
.follow-pill.on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s cubic-bezier(.2,1.3,.4,1), visibility 0s; }
.follow-pill .av { width: 30px; height: 30px; border-radius: 50%; }
.follow-pill .fp-t { padding-right: 2px; }
.follow-pill .fp-t::before { content: '🎥 '; }
.fp-x { background: rgba(255,255,255,.1); border: 0; color: var(--ink); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 12px; }
.fp-x:hover { background: var(--bad); }

/* ---------- chips & links ---------- */
.lk { display: inline-block; max-width: 100%; padding: 0 8px 0 2px; margin: 0; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--ink); font-weight: 800; font-size: .94em; line-height: 1.45; cursor: pointer; text-decoration: none; white-space: nowrap; vertical-align: baseline; transition: background .15s, box-shadow .15s; }
.lk:hover { background: rgba(255,180,84,.24); box-shadow: 0 0 0 1px rgba(255,180,84,.45); }
.lk .av { width: 17px; height: 17px; border-radius: 50%; vertical-align: -4px; margin-right: 4px; }
.lk.gone { opacity: .6; font-style: italic; }
.lk .bul { width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 10.5px; background: rgba(255,255,255,.12); vertical-align: -4px; margin-right: 4px; }
.lk-b .bul { background: var(--bc, #ffb454); }
.lk-u .bul, .lk-bl .bul { background: #996633; }
.lk-pl .bul, .lk-v .bul { background: #0039A6; }
.lk.demo { cursor: default; padding-left: 8px; }
.lkw { white-space: nowrap; }
.lkw > .lk { padding-right: 5px; margin-right: -2px; } /* the full stop tucks into the pill’s curve instead of floating off */

/* ---------- meters, stars, hearts, pills ---------- */
.meter { display: inline-block; height: 7px; border-radius: 99px; background: rgba(255,255,255,.09); width: 100%; overflow: hidden; vertical-align: middle; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--good); transition: width .5s ease; }
.meter.mid i { background: var(--warn); }
.meter.low i { background: var(--bad); }
.meter.gold i { background: linear-gradient(90deg, #ffb454, #ff7a59); }
.meter.fam { height: 4px; max-width: 120px; }
.meter.fam i { background: rgba(255,255,255,.4); }
.stars { position: relative; display: inline-block; font-size: 13px; letter-spacing: 1px; line-height: 1; vertical-align: -1px; white-space: nowrap; }
.stars.sm { font-size: 11px; }
.st-bg { color: rgba(255,255,255,.17); }
.st-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #ffc94d; }
.hearts { color: #ff7aa2; letter-spacing: 1px; font-size: 11.5px; white-space: nowrap; }
.hearts .dim { color: rgba(255,255,255,.14); }
.thorns { color: #ff8a7d; font-size: 11px; font-weight: 800; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: rgba(127,217,138,.16); color: #a9f0b2; }
.pill.bad { background: rgba(255,111,97,.18); color: #ffb0a6; }
.pill.warn { background: rgba(255,200,87,.16); color: #ffe09a; }
.pill.rs, i.rs { background: #2e6fd8; color: #fff; }
i.rs { font-style: normal; font-size: 8.5px; font-weight: 900; padding: 0 3px; border-radius: 3px; margin-left: 3px; letter-spacing: .03em; vertical-align: 1px; }
.rs { font-size: 9px; font-weight: 900; background: #2e6fd8; color: #fff; padding: 0 4px; border-radius: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; align-items: center; }
.chip { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.07); color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.chip.trait { background: rgba(255,180,84,.13); color: #ffd9a3; }
.chip.good { background: rgba(127,217,138,.13); color: #b6efbd; }
.chip.bad { background: rgba(255,111,97,.14); color: #ffb9b0; white-space: normal; }
.tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.08); color: var(--ink-2); font-weight: 800; margin-right: 3px; text-transform: lowercase; }
.t-partner, .t-dating { background: rgba(255,122,162,.2); color: #ffc0d3; }
.t-crush { background: rgba(255,122,162,.12); color: #ffc0d3; }
.t-friend { background: rgba(127,217,138,.16); color: #b6efbd; }
.t-family, .t-sibling, .t-cousin, .t-child, .t-parent { background: rgba(255,180,84,.16); color: #ffd9a3; }
.t-roommate { background: rgba(195,166,255,.16); color: #ddd0ff; }
.t-grudge, .t-ex { background: rgba(255,111,97,.18); color: #ffb0a6; }
.t-coworker, .t-boss-employee { background: rgba(126,200,227,.15); color: #c3e9f7; }
.t-neighbor { background: rgba(128,203,196,.14); color: #bfe8e3; }
.t-commuter { background: rgba(126,200,227,.15); color: #c3e9f7; }
.t-visitor { background: rgba(195,166,255,.16); color: #ddd0ff; }
.empty { color: var(--dim); font-size: 12.5px; font-style: italic; padding: 6px 2px; }
.note { font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.045); border-radius: 10px; padding: 8px 10px; margin: 6px 0; line-height: 1.45; }
.line { margin: 4px 0; font-size: 13px; }
h4 { font-family: var(--sign-font); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 16px 0 7px; font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; }
h4::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: inset 0 -1.5px 0 rgba(0,0,0,.25); flex: none; }
h4 .dim { letter-spacing: 0; font-weight: 700; }

/* ---------- inspector ---------- */
.insp { position: fixed; top: 64px; right: 10px; bottom: 10px; width: var(--insp-w); max-width: calc(100vw - 20px); display: flex; flex-direction: column; z-index: 15; transform: translateX(calc(100% + 24px)); opacity: 0; visibility: hidden; transition: transform .32s cubic-bezier(.2,1.1,.35,1), opacity .2s, visibility 0s linear .32s; overflow: hidden; }
.insp.open { transform: none; opacity: 1; visibility: visible; transition: transform .32s cubic-bezier(.2,1.1,.35,1), opacity .2s, visibility 0s; }
.insp-top { position: relative; display: flex; align-items: center; gap: 4px; padding: 10px 6px 6px 8px; background: var(--enamel); box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); margin-bottom: 8px; }
.insp-top .btn.sm { padding: 4px 9px; }
.tb-follow.pulse { animation: fpulse 1s ease-in-out 3; }
@keyframes fpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,180,84,0); } 50% { box-shadow: 0 0 0 5px rgba(255,180,84,.55); background: var(--accent); color: #2a1c08; } }
.insp.compact .insp-head { cursor: pointer; }
.insp.compact .insp-head > .chips, .insp.compact .ph-meta, .insp.compact .ph-line, .insp.compact .bh-meta, .insp.compact .uh .chips, .insp.compact .mood-dot, .insp.compact .awning { display: none; }
.insp.compact .ph, .insp.compact .uh { padding-top: 0; padding-bottom: 4px; align-items: center; }
.insp.compact canvas.portrait { width: 40px; height: 40px; box-shadow: 0 0 0 2px rgba(255,255,255,.1); }
.insp.compact .ph-art { padding-bottom: 0; }
.insp.compact .ph-name { font-size: 16px; }
.insp.compact .uh-ic { width: 36px; height: 36px; font-size: 19px; border-radius: 10px; }
.insp.compact .sign { margin-top: 4px; }
.insp.compact .sign-board { padding: 5px 10px; margin-top: 0; }
.insp.compact .sign-name { font-size: 15px; }
.insp.compact .sign-ic { font-size: 18px; }
.insp.compact .status-line { padding-top: 2px; }
.insp.compact .st-why.long { display: none; }
.insp-kind { font-family: var(--sign-font); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: #fff; margin-left: 4px; }
.insp-head { padding: 0 0 4px; }
.insp-tabs { display: flex; gap: 2px; padding: 4px 10px 0; border-bottom: 1px solid var(--line); }
.tab { flex: 1; background: none; border: 0; color: var(--dim); font-family: var(--sign-font); font-weight: 700; font-size: 12px; padding: 8px 4px 7px; border-bottom: 2.5px solid transparent; cursor: pointer; transition: color .15s, border-color .15s; white-space: nowrap; }
.tab:hover { color: var(--ink-2); }
.tab.on { color: var(--ink); border-color: var(--accent); }
.insp-body { overflow-y: auto; flex: 1; padding: 2px 16px 18px; overscroll-behavior: contain; }
.isec:first-child h4 { margin-top: 12px; }
.ins-missing { padding: 20px; color: var(--dim); }
.ph { display: flex; gap: 14px; padding: 4px 16px 2px; align-items: flex-start; }
.ph-art { position: relative; flex: none; padding-bottom: 6px; }
canvas.portrait { width: 92px; height: 92px; border-radius: 50%; display: block; box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 8px 20px rgba(0,0,0,.4); }
.mood-dot { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 900; padding: 1px 8px; border-radius: 99px; background: var(--mc); color: #1d1a12; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.ph-txt { min-width: 0; padding-top: 4px; }
.ph-name { font-size: 21px; font-weight: 900; line-height: 1.12; letter-spacing: -.005em; }
.ph-name .nick { font-weight: 700; font-size: 15px; color: var(--ink-2); font-style: italic; }
.ph-meta { color: var(--dim); font-size: 12.5px; margin: 3px 0 5px; font-weight: 600; }
.ph-line { font-size: 12.5px; margin: 3px 0; color: var(--ink-2); }
.insp-head > .chips { padding: 0 16px; margin: 8px 0 2px; }
.ph-act { display: flex; gap: 6px; padding: 8px 16px 6px; flex-wrap: wrap; }
.card { border-radius: 13px; padding: 10px 12px; }
.now-card { --ink: #2a221a; --ink-2: #4d4234; --dim: #857660; --accent: #c2410c; color: var(--ink); margin-top: 12px; background: linear-gradient(180deg, transparent 0 25px, rgba(214,66,66,.55) 25px 26.5px, transparent 26.5px), repeating-linear-gradient(180deg, transparent 0 21px, rgba(90,120,170,.13) 21px 22px) 0 26px / 100% calc(100% - 26px) no-repeat, #f6efdd; border: 0; box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.05); transform: rotate(-.35deg); }
.now-card .lk { background: rgba(60,40,20,.09); color: var(--ink); }
.now-card .lk:hover { background: rgba(194,65,12,.16); box-shadow: 0 0 0 1px rgba(194,65,12,.4); }
.now-card .det summary { color: var(--accent); }
.now-card .why-l li { color: var(--ink-2); }
.now-card .why-l li.plus::before { color: #2f8a3e; }
.now-card .why-l li.minus::before { color: #c0392b; }
.now-card .why-h { color: var(--ink-2); }
.now-card .kick { color: #b91c1c; }
.now-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.kick { font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; font-weight: 900; color: var(--accent); }
.now-act { font-size: 17px; font-weight: 900; display: flex; gap: 9px; align-items: center; margin: 5px 0 3px; line-height: 1.2; }
.now-ic { font-size: 24px; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.now-reason { font-size: 13px; color: var(--ink-2); font-style: italic; margin: 2px 0 4px; }
.now-where, .now-with, .now-dest { font-size: 12.5px; margin-top: 5px; color: var(--ink-2); }
.det { margin-top: 8px; }
.det summary { cursor: pointer; font-weight: 800; font-size: 12.5px; color: var(--accent); list-style: none; user-select: none; display: inline-flex; align-items: center; gap: 5px; }
.det summary::-webkit-details-marker { display: none; }
.det summary::before { content: '▸'; display: inline-block; transition: transform .15s; font-size: 11px; }
.det[open] summary::before { transform: rotate(90deg); }
.isec > .det > summary { color: var(--accent); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; font-weight: 900; margin-top: 10px; }
.isec > .det > summary .dim { text-transform: none; letter-spacing: 0; font-weight: 700; }
.det-b { padding-top: 6px; }
.why-h { font-size: 12px; font-weight: 800; margin: 6px 0 3px; color: var(--ink-2); }
.why-l { list-style: none; padding: 0; margin: 0; }
.why-l li { font-size: 12.5px; padding: 2px 0 2px 20px; position: relative; color: var(--ink-2); }
.why-l li::before { position: absolute; left: 2px; top: 2px; font-weight: 900; }
.why-l li.plus::before { content: '✓'; color: var(--good); }
.why-l li.minus::before { content: '✗'; color: var(--bad); }
.mood-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mood-word { font-weight: 900; font-size: 13px; color: var(--mc); white-space: nowrap; }
.mood-scale { position: relative; flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #e05a6a, #f3a86b 30%, #f3d36b 55%, #7ee081); opacity: .85; }
.mood-scale i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2.5px solid #1b1d27; transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: left .6s ease; }
.needs { display: flex; flex-direction: column; gap: 5px; }
.need { display: grid; grid-template-columns: 20px 70px 1fr 74px; align-items: center; gap: 6px; font-size: 12.5px; margin: 3px 0; }
.need .n-ic { display: flex; justify-content: center; }
.need .n-name { color: var(--ink-2); font-weight: 700; }
.need .n-w { font-size: 11.5px; color: var(--dim); font-weight: 700; text-align: right; }
.need:not(:has(.n-ic)) { grid-template-columns: 90px 1fr 74px; }
.moodlets .chip { white-space: normal; }
.rel-tag { font-size: 10.5px; color: var(--dim); font-weight: 700; margin: 0 6px 0 3px; }
.goal { margin: 6px 0 9px; }
.g-t { font-size: 12.5px; margin-bottom: 4px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; margin: 8px 0; }
.facts > div { display: flex; flex-direction: column; min-width: 0; }
.facts > div > span { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.facts b { font-size: 12.5px; font-weight: 800; }
.sched { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 10px 0 4px; }
.sd { background: rgba(255,255,255,.04); border-radius: 7px; padding: 4px 1px 5px; text-align: center; font-size: 9.5px; color: var(--dim); line-height: 1.25; min-height: 38px; }
.sd b { display: block; font-size: 10.5px; color: var(--ink-2); margin-bottom: 2px; }
.sd.on { background: rgba(126,200,227,.15); color: #d3f0fb; }
.sd.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cash-row { display: flex; align-items: baseline; gap: 10px; }
.cash-big { font-size: 26px; font-weight: 900; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cash-big.bad { color: var(--bad); }
.cash-big.kid { color: #ffc0d3; }
.cash-lbl { color: var(--dim); font-size: 12px; font-weight: 700; }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.io > div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; }
.io > div > span { font-size: 10.5px; color: var(--dim); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.io b { font-size: 16px; font-weight: 900; }
.io-in b { color: var(--good); }
.io-out b { color: #ffb3a8; }
.io-last { grid-column: 1 / -1; }
.io-last b { font-size: 12px; color: var(--ink-2); }
.hbars { display: flex; flex-direction: column; gap: 4px; }
.hb-row { display: grid; grid-template-columns: minmax(80px, 38%) 1fr 70px; align-items: center; gap: 8px; font-size: 12px; }
.hb-l { color: var(--ink-2); font-weight: 700; overflow: hidden; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hb-bar { height: 9px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; }
.hb-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.hb-bar i.in { background: var(--good); }
.hb-bar i.out { background: #ff9585; }
.hb-v { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.buy, .ev { display: grid; grid-template-columns: 62px 1fr auto; gap: 6px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,.06); align-items: baseline; }
.ev { grid-template-columns: 86px 1fr; }
.ev > .tl-t { white-space: normal; line-height: 1.3; }
.amt { margin-left: 6px; font-weight: 800; font-size: 11.5px; color: #ffb3a8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt.in { color: var(--good); }
.tl-day { margin: 6px 0 10px; }
.tl-dh { font-weight: 900; font-size: 12px; color: var(--ink); background: rgb(40,44,60); padding: 4px 9px; border-radius: 7px; position: sticky; top: 0; z-index: 1; margin-bottom: 3px; }
.tl-e { display: grid; grid-template-columns: 62px 20px 1fr; gap: 5px; font-size: 12.5px; padding: 4px 2px; border-bottom: 1px dashed rgba(255,255,255,.055); align-items: baseline; }
.tl-t { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tl-i { text-align: center; font-size: 12px; }
.tl-x { min-width: 0; line-height: 1.45; }
.tl-e.imp3 .tl-x { font-weight: 800; }
.tl-e.imp1 .tl-x { color: var(--ink-2); }
.mem { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.06); align-items: baseline; }
.mem-imp { color: #ff9ab8; font-size: 7px; letter-spacing: 1px; }
.mem-ic { font-size: 13px; line-height: 1; }
.mem-t { color: var(--dim); font-size: 11px; white-space: nowrap; }
.rel { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rel-a { min-width: 0; display: flex; align-items: center; gap: 4px; }
.rel-b { text-align: right; white-space: nowrap; }
.rel-c { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; font-size: 11px; }
.rom { font-size: 13px; }
.fav { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: center; }
.fav > .dim { grid-column: 1 / -1; font-size: 11.5px; }
.fav > .lk { justify-self: start; }
.members { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.mem-card { display: flex; gap: 8px; align-items: center; font-size: 12px; }

/* business */
.sign { margin: 8px 16px 6px; border-radius: 11px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.awning { height: 18px; background: repeating-linear-gradient(90deg, var(--bc) 0 20px, #fff6e6 20px 40px); -webkit-mask: radial-gradient(circle at 10px 18px, transparent 0 7px, #000 7.5px) 0 0 / 20px 100% repeat-x; mask: radial-gradient(circle at 10px 18px, transparent 0 7px, #000 7.5px) 0 0 / 20px 100% repeat-x; }
.sign-board { background: linear-gradient(180deg, #202028, #16161b); padding: 9px 14px 11px; display: flex; align-items: center; gap: 10px; margin-top: -5px; }
.sign-ic { font-size: 26px; filter: drop-shadow(0 0 6px var(--bc)); }
.sign-name { font-weight: 900; font-size: 21px; color: #fff; text-shadow: 0 0 10px var(--bc), 0 0 2px var(--bc); letter-spacing: .01em; line-height: 1.15; }
.bh-meta { padding: 2px 16px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.status-line { padding: 6px 16px 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--ink-2); }
.st-why.long { order: 3; flex-basis: 100%; line-height: 1.45; }
.st-rate { white-space: nowrap; font-size: 12px; }
.st-rate b { color: var(--ink); margin-left: 2px; }
.status { font-family: var(--sign-font); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.s-open { background: #2fb35a; color: #06230e; }
.s-closed { background: #595f70; color: #eee; }
.s-warn { background: var(--warn); color: #3a2a00; }
.s-gone { background: #2a2a2e; color: #999; text-decoration: line-through; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin: 6px 0; }
.stat { background: rgba(255,255,255,.05); border-radius: 10px; padding: 7px 9px; min-width: 0; container-type: inline-size; }
.stat b { display: block; font-size: min(16px, 22.5cqi); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > span { font-size: 10.5px; color: var(--dim); font-weight: 700; display: block; line-height: 1.2; }
.stat.bad b { color: var(--bad); }
.prods { display: flex; flex-direction: column; }
.prod { display: grid; grid-template-columns: 1fr auto 80px; gap: 1px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.prod.out .pr-n { color: var(--dim); }
.pr-n { font-weight: 700; }
.pr-p { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-s { display: flex; justify-content: flex-end; }
.pr-c { grid-column: 1 / -1; font-size: 11px; }
.pdiff { font-size: 10px; margin-left: 4px; font-weight: 800; }
.pdiff.up { color: #ffb3a8; }
.pdiff.down { color: var(--good); }
.oos { font-family: var(--sign-font); font-size: 9px; font-weight: 800; color: #fff; background: var(--bad); padding: 2px 5px; border-radius: 4px; letter-spacing: .06em; white-space: nowrap; }
.inv { display: grid; grid-template-columns: 116px 1fr 82px; gap: 8px; align-items: center; font-size: 12px; margin: 5px 0; }
.inv-n { color: var(--ink-2); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.ord { padding: 5px 0; border-bottom: 1px solid var(--line); }
.hours { display: flex; flex-direction: column; gap: 2px; }
.hrow { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 2px 4px; border-radius: 5px; }
.hrow.today { background: rgba(255,180,84,.12); font-weight: 800; }
.hist-t .hrow { display: grid; grid-template-columns: 1fr 70px 70px 70px; text-align: right; }
.hist-t .hrow span:first-child { text-align: left; }
.chart-lbl { font-size: 10.5px; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin: 8px 0 3px; }
.spark { display: block; overflow: visible; }
.spark .ax, .bars .ax { fill: #8c867c; font-size: 9.5px; font-family: var(--ui-font); font-weight: 700; }
.bars .ax.now { fill: var(--accent); }
.staff { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.roster { display: flex; flex-direction: column; gap: 2px; font-size: 10px; margin-top: 4px; }
.ro-h, .ro-r { display: grid; grid-template-columns: 58px repeat(7, 1fr); gap: 2px; }
.ro-h b { text-align: center; color: var(--dim); font-size: 10px; }
.ro-h b.today { color: var(--accent); }
.ro-n { font-weight: 800; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.ro-r i { background: rgba(255,255,255,.035); border-radius: 4px; min-height: 24px; font-style: normal; text-align: center; font-size: 8.5px; color: #d3f0fb; line-height: 1.15; padding: 2px 0; }
.ro-r i.on { background: rgba(126,200,227,.2); }
.ro-r i.today { box-shadow: inset 0 0 0 1px rgba(255,180,84,.6); }

/* unit / building */
.uh { display: flex; gap: 12px; padding: 6px 16px 2px; align-items: flex-start; }
.uh-ic { width: 54px; height: 54px; border-radius: 14px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 28px; flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.apt { color: var(--accent); }
.bstack { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(180deg, #7a5040, #5e3c30); padding: 7px 7px 7px 4px; border-radius: 8px; box-shadow: inset 0 2px 0 rgba(255,255,255,.08); }
.bfloor { display: flex; gap: 4px; }
.bf-n { width: 16px; font-size: 9.5px; color: rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.ucell, .hu { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 5px; border-radius: 5px; background: linear-gradient(180deg, #ffefc2, #ffd98a); color: #3d2b10; font-size: 10.5px; cursor: pointer; text-decoration: none; box-shadow: inset 0 0 0 2px rgba(80,50,20,.25), 0 0 10px rgba(255,210,120,.18); transition: transform .12s, box-shadow .12s; }
.ucell:hover, .hu:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.8), 0 0 14px rgba(255,210,120,.45); }
.ucell.vac, .hu.vac { background: linear-gradient(180deg, #2c3446, #232a39); color: #9aa7bd; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35); }
.hu.arr { box-shadow: inset 0 0 0 2px #ff6f61, 0 0 10px rgba(255,111,97,.3); }
.uc-l, .hu-t { font-weight: 900; font-size: 10.5px; white-space: nowrap; }
.uc-av, .hu-av { display: flex; min-height: 16px; align-items: center; }
.uc-av img, .hu-av img { width: 17px; height: 17px; border-radius: 50%; margin-right: -5px; box-shadow: 0 0 0 1.5px #ffe6a6; background: #ffe6a6; }
.hu-av .more { font-size: 9px; font-weight: 900; margin-left: 7px; }
.hu, .ucell { overflow: hidden; }
.hu-av, .uc-av { overflow: hidden; }
.vac-t { font-family: var(--sign-font); font-size: 8px; font-weight: 800; letter-spacing: .03em; opacity: .85; white-space: nowrap; color: #ffd98a; }
.uc-r, .hu-r { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 10px; opacity: .85; white-space: nowrap; }

/* ---------- windows (left dock) ---------- */
.win { --win-pref: 820px; position: fixed; top: 64px; left: 10px; bottom: 10px; width: min(var(--win-pref), calc(100vw - 40px)); display: flex; flex-direction: column; z-index: 16; transform: translateX(calc(-100% - 24px)); opacity: 0; visibility: hidden; transition: transform .32s cubic-bezier(.2,1.1,.35,1), opacity .2s, visibility 0s linear .32s; }
.win.open { transform: none; opacity: 1; visibility: visible; transition: transform .32s cubic-bezier(.2,1.1,.35,1), opacity .2s, visibility 0s; }
/* windows declare a preferred width; with the inspector open they take whatever is left beside it */
body.insp-open .win { width: clamp(min(500px, calc(100vw - 20px)), calc(100vw - var(--insp-w) - 50px), var(--win-pref)); }
.win-body { container-type: inline-size; }
.win-top { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 10px 9px 14px; background: var(--enamel); border-radius: var(--r) var(--r) 0 0; box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); }
.win-top::before, .insp-top::before { content: ''; position: absolute; left: 12px; right: 12px; top: 4px; height: 1.5px; border-radius: 2px; background: rgba(255,255,255,.82); }
.win-title { font-family: var(--sign-font); font-weight: 800; font-size: 16px; color: #fff; letter-spacing: .01em; }
.win-top .ib, .insp-top .ib { color: #d9d9d9; }
.win-bul { width: 26px; height: 26px; font-size: 14px; }
.win-bodies { flex: 1; min-height: 0; display: flex; }
.win-body { flex: 1; overflow-y: auto; padding: 4px 16px 18px; overscroll-behavior: contain; }
.dir-ctl { position: sticky; top: 0; z-index: 2; background: linear-gradient(var(--panel-hi), var(--panel-hi)), rgb(29, 25, 23); /* opaque: rows scroll underneath */ margin: 0 -16px; padding: 10px 16px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.search { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 8px 12px; outline: none; }
.search:focus { border-color: var(--accent); background: rgba(255,255,255,.1); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.segb { background: rgba(255,255,255,.06); border: 0; color: var(--ink-2); font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 99px; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.segb:hover { background: rgba(255,255,255,.12); color: var(--ink); }
.segb.on { background: var(--accent); color: #2a1c08; }
.segb.on .dim { color: rgba(42,28,8,.7); }
.dir-row2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sortl { margin-left: auto; font-size: 12px; color: var(--dim); font-weight: 700; display: flex; align-items: center; gap: 6px; }
select { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 4px 8px; outline: none; }
select option { background: #232736; color: var(--ink); }
.dir-count { font-size: 11.5px; font-weight: 700; }
.dir-list { display: flex; flex-direction: column; padding-top: 6px; }
.drow { display: grid; grid-template-columns: 42px minmax(150px, 1.25fr) minmax(90px, .9fr) minmax(110px, 1.1fr) 64px; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 6px 8px; border-radius: 11px; cursor: pointer; transition: background .12s; }
.drow:hover { background: rgba(255,255,255,.06); }
.drow.sel { background: rgba(255,180,84,.14); }
.drow .dav { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; }
.dr-a { grid-column: 2; grid-row: 1; display: flex; gap: 6px; align-items: baseline; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; }
.dr-a b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dr-age { flex: none; }
.dr-age .tag { margin-left: 4px; }
.dr-b { grid-column: 2; grid-row: 2; font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-c { grid-column: 3; grid-row: 1 / span 2; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-d { grid-column: 4; grid-row: 1 / span 2; font-size: 12px; color: var(--ink-2); font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dr-m { grid-column: 5; grid-row: 1 / span 2; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.biz-list { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.brow { display: grid; grid-template-columns: 38px minmax(140px, 1.3fr) minmax(120px, 1.3fr) 110px 84px 92px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.03); border-left: 4px solid var(--bc); transition: background .12s; }
.brow:hover { background: rgba(255,255,255,.07); }
.brow.gone { opacity: .5; }
.br-ic { font-size: 22px; text-align: center; }
.br-a, .br-r, .br-st { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.br-a b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-s { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.br-why { font-size: 11px; overflow: hidden; max-width: 100%; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.br-r b { font-size: 14px; }
.br-st { align-items: flex-end; gap: 2px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-h h4 { margin-bottom: 7px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 800; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 5px 6px; border-bottom: 1px solid rgba(255,255,255,.04); white-space: nowrap; }
.tbl td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.tbl tr.gone { opacity: .45; }
.tbl tr:hover td { background: rgba(255,255,255,.03); }
.lchart { display: block; }
.lchart .ax { fill: #8c867c; font-size: 10px; font-family: var(--ui-font); }
.chart-empty { color: var(--dim); font-style: italic; font-size: 12.5px; padding: 18px; text-align: center; background: rgba(255,255,255,.03); border-radius: 10px; }
.recs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rec { background: rgba(255,255,255,.05); border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; font-size: 12px; }
.rec > span { color: var(--dim); font-size: 10.5px; font-weight: 800; }

/* housing window */
.hs-street { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding: 16px 2px 6px; }
.hcol { flex: var(--cols, 2) 1 0; min-width: 0; display: flex; flex-direction: column; }
.hroof { height: 7px; margin: 0 -3px; background: color-mix(in srgb, var(--bcol) 60%, #000); border-radius: 3px 3px 0 0; }
.hbody { background: var(--bcol); padding: 6px 5px; display: flex; flex-direction: column; gap: 5px; box-shadow: inset 0 2px 0 rgba(255,255,255,.1), inset 0 -3px 0 rgba(0,0,0,.2); }
.hf { display: flex; gap: 4px; }
.shopf { background: rgba(10,12,18,.55); border-radius: 4px; padding: 4px; min-height: 36px; align-items: center; justify-content: center; flex-wrap: wrap; }
.hshop { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,.35); border-left: 3px solid var(--bc, #ffb454); padding: 3px 7px; border-radius: 5px; cursor: pointer; text-decoration: none; white-space: nowrap; max-width: 100%; }
.hshop > i { font-style: normal; flex: none; }
.hshop .hs-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chips .hshop { display: inline-flex; }
.hshop:hover { background: rgba(255,180,84,.25); }
.hshop.vac { border-color: #888; color: var(--ink-2); }
.hname { text-align: center; font-size: 11px; margin-top: 6px; color: var(--ink-2); display: flex; flex-direction: column; cursor: pointer; text-decoration: none; line-height: 1.25; }
.hname b { color: var(--ink); font-size: 11.5px; white-space: nowrap; }
.hname:hover b { color: var(--accent); }
.hs-legend { font-size: 11px; margin: 6px 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lg { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.lg.occ { background: #ffd98a; }
.lg.vac { background: #2c3446; border: 1px solid #556; }
.lg.arr { background: transparent; border: 2px solid #ff6f61; }

/* stories */
.story-card { background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px 14px; margin: 10px 0; border-left: 3px solid #FCCC0A; }
.story-card h3 { font-family: var(--display); font-size: 19px; margin: 4px 0; line-height: 1.2; }
.story-card p { margin: 4px 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.story-card .lk-in { color: var(--ink); border-bottom: 1px dotted rgba(255,255,255,.4); cursor: pointer; }
.det.grp { margin: 0 0 4px 67px; }
.det.grp summary { font-size: 11.5px; color: var(--dim); }
.det.grp[open] { margin-left: 0; }
.det.grp[open] summary { margin-left: 67px; }
.sc-k { font-size: 10.5px; color: var(--dim); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* block association */
.as-banner { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, rgba(238,53,46,.18), rgba(255,180,84,.1)); border: 1px solid rgba(238,53,46,.3); border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.as-seal { width: 64px; height: 64px; border-radius: 50%; background: #EE352E; color: #fff; font-family: var(--sign-font); font-weight: 800; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1; flex: none; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 6px 14px rgba(0,0,0,.35); }
.as-seal span { font-size: 8px; font-weight: 600; margin-top: 3px; }
.as-role { font-weight: 900; font-size: 15px; }
.as-fund { margin-left: auto; text-align: right; display: flex; flex-direction: column; flex: none; white-space: nowrap; }
.as-fund b { font-size: 24px; font-weight: 900; color: var(--good); }
.as-fund span { font-size: 11px; color: var(--dim); font-weight: 700; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.as-card { background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.as-card.off { opacity: .72; }
.as-card .btn { align-self: flex-start; margin-top: auto; }
.as-top { display: flex; align-items: center; gap: 8px; }
.as-ic { font-size: 22px; }
.as-t { font-weight: 900; flex: 1; }
.as-cost { font-family: var(--sign-font); font-weight: 800; font-size: 12px; background: rgba(127,217,138,.15); color: #b6efbd; padding: 2px 8px; border-radius: 99px; }
.as-pick { width: 100%; }
.as-apps { display: flex; flex-direction: column; gap: 8px; }
.as-app { background: rgba(255,255,255,.05); border-left: 3px solid #EE352E; border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.as-app-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.as-app-f .btn { margin-left: auto; }
.as-d { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.as-why { font-size: 11px; color: var(--warn); }

/* ---------- story feed & toasts ---------- */
.feed { position: fixed; left: 10px; bottom: 10px; width: 350px; max-width: calc(100vw - 20px); display: flex; flex-direction: column; gap: 5px; z-index: 12; pointer-events: none; transition: opacity .25s, transform .25s; }
.feed > * { pointer-events: auto; }
body.win-open .feed { opacity: 0; transform: translateY(12px); }
body.win-open .feed > * { pointer-events: none; }
.feed-h { display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: 11px; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); align-self: flex-start; }
.feed.collapsed .feed-list { display: none; }
.feed.collapsed [data-f="col"] { transform: rotate(-90deg); }
.feed-list { display: flex; flex-direction: column; gap: 5px; }
.fcard { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; background: var(--panel); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.06); border-left: 3px solid rgba(255,255,255,.14); border-radius: 12px; padding: 7px 10px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer; transition: opacity .4s, background .15s; pointer-events: auto; }
.fcard:hover { background: var(--panel-hi); }
.fcard:nth-last-child(4) { opacity: .5; }
.fcard:nth-last-child(3) { opacity: .7; }
.fcard:nth-last-child(2) { opacity: .88; }
.fcard.story { border-left-color: #FCCC0A; }
.fcard.big { border-left-color: var(--accent-2); }
.fcard.fresh { animation: fpop .5s cubic-bezier(.2,1.5,.4,1); }
.fcard.quiet { cursor: default; }
@keyframes fpop { from { transform: translateY(14px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.fc-ic { font-size: 16px; text-align: center; line-height: 1.3; }
.fc-x { min-width: 0; overflow-wrap: anywhere; }
.fc-t { color: var(--dim); font-size: 10.5px; font-weight: 700; white-space: nowrap; padding-top: 2px; }
.fcard.hello { border-left-color: #6CBE45; }
.fc-ic .pxi { margin: 1px auto 0; }
/* The feed is a one-line ticker over the map (the diorama fills the screen); hover to read the last few. */
.feed { width: 440px; }
.feed:not(:hover):not(:focus-within) .fcard:not(.pin) { display: none; }
.feed:not(:hover):not(:focus-within) .fcard { opacity: 1; padding: 5px 10px; }
.feed:not(:hover):not(:focus-within) .fc-x { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.feed:not(:hover):not(:focus-within) .fcard.stale:not(.watched) { opacity: .62; }
.fcard.watched { border-left-color: #ff8fb3; }
.fcard.watched .fc-ic::after { content: '👀'; display: block; font-size: 10px; line-height: 1; margin-top: 2px; }
.feed:not(:hover):not(:focus-within) .fc-x .lk { vertical-align: 0; }
.feed:not(:hover):not(:focus-within) .feed-h::after { content: 'hover for more'; font-size: 9.5px; letter-spacing: .04em; text-transform: none; font-weight: 700; color: var(--dim); margin-left: 6px; order: 1; }
@media (hover: none) { .feed:not(:hover):not(:focus-within) .feed-h::after { content: 'tap for more'; } }
.feed-h > span:first-child { order: 0; }
.feed-h .sp { order: 2; }
.feed-h .ib { order: 3; }
.toasts { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 30; pointer-events: none; width: max-content; max-width: min(640px, 90vw); }
.toasts.bottom { top: auto; bottom: 64px; flex-direction: column-reverse; }
.toasts.narrow .toast { font-size: 12px; padding: 7px 6px 7px 10px; gap: 7px; align-items: flex-start; }
.toasts.narrow .toast .t-ic { font-size: 15px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 18px; font-size: 13px; line-height: 1.45; opacity: 0; transform: translateY(-14px) scale(.95); transition: opacity .3s, transform .4s cubic-bezier(.2,1.4,.4,1); pointer-events: auto; }
.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast .t-ic { font-size: 18px; }
.toast.paper { background: #f4eddc; color: #1f1b16; border-color: rgba(0,0,0,.2); font-family: var(--serif); }
.toast.paper b { font-family: 'UnifrakturMaguntia', var(--display); font-weight: 400; font-size: 17px; }
.toast.paper .ib { color: #5b5346; }
.toast.paper .btn { background: #1f1b16; color: #f4eddc; }
.toast.good { border-color: rgba(255,180,84,.35); }

/* ---------- locator ring (Show on map / chip hover) ---------- */
.locator { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 11; pointer-events: none; opacity: 0; --sz: 44px; }
.locator.on { opacity: 1; }
.locator i, .locator b { position: absolute; left: calc(var(--sz) / -2); top: calc(var(--sz) / -2); width: var(--sz); height: var(--sz); border-radius: 50%; }
.locator i { border: 3px solid #ffd65a; box-shadow: 0 0 12px rgba(255,214,90,.7), inset 0 0 8px rgba(255,214,90,.45); opacity: 0; }
.locator.on:not(.soft) i { animation: lring 1.2s cubic-bezier(.2,.7,.3,1) 2; }
.locator.on:not(.soft) i + i { animation-delay: .35s; }
.locator b { border: 2px dashed rgba(255,255,255,.85); opacity: 0; transition: opacity .2s; }
.locator.soft b { opacity: .9; animation: lspin 6s linear infinite; }
@keyframes lring { 0% { transform: scale(2.4); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(.8); opacity: 0; } }
@keyframes lspin { to { transform: rotate(360deg); } }

/* ---------- tooltip ---------- */
.tip { position: fixed; left: 0; top: 0; z-index: 60; display: flex; gap: 9px; align-items: center; background: rgba(18,20,28,.94); border: 1px solid rgba(255,255,255,.1); padding: 6px 11px 6px 7px; border-radius: 12px; font-size: 12.5px; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 8px 22px rgba(0,0,0,.45); max-width: 300px; }
.tip.on { opacity: 1; }
.tip .av { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.tip-ic { font-size: 20px; padding-left: 3px; }
.tip-s { color: var(--ink-2); font-size: 12px; margin-top: 1px; }

/* ---------- modal / welcome / menu ---------- */
.modal-ov { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; }
.modal-ov.open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .25s, visibility 0s; }
.modal-back { position: absolute; inset: 0; background: rgba(8,10,18,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(640px, 94vw); max-height: 88vh; overflow-y: auto; padding: 22px 24px 18px; background: var(--panel-hi); transform: translateY(16px) scale(.97); transition: transform .35s cubic-bezier(.2,1.3,.4,1); font-size: 13.5px; line-height: 1.5; }
.modal-ov.open .modal { transform: none; }
.m-h { display: flex; align-items: center; justify-content: space-between; }
.m-h h2 { margin: 0; font-size: 20px; font-weight: 900; }
.m-sec { margin-top: 6px; }
.m-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-row input[type=text] { font: inherit; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px 10px; outline: none; width: 190px; }
.m-row input[type=text]:focus { border-color: var(--accent); }
.m-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.m-msg { color: var(--accent); font-weight: 800; min-height: 1em; margin-top: 8px; }
.saves { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.save-row { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 10px; align-items: center; background: rgba(255,255,255,.04); border-radius: 9px; padding: 5px 8px; font-size: 12.5px; }
.sv-slot { font-weight: 900; }
.credits { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); text-align: center; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; margin: 6px 0; }
.keys > div { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.keys kbd { min-width: 58px; text-align: center; flex: none; }
.m-welcome { padding: 0 0 18px; overflow: hidden; width: min(600px, 94vw); }
.m-welcome > *:not(.wel-sign) { margin-left: 24px; margin-right: 24px; }
.wel-sign { display: flex; gap: 14px; align-items: center; background: #0c0c0e; padding: 20px 24px 16px; position: relative; margin-bottom: 14px; }
.wel-sign::before { content: ''; position: absolute; left: 14px; right: 14px; top: 7px; height: 2px; background: rgba(255,255,255,.85); border-radius: 2px; }
.wel-t { font-family: var(--sign-font); font-weight: 800; font-size: 25px; color: #fff; line-height: 1.1; }
.wel-s { font-family: var(--sign-font); font-size: 12px; color: #aaa; margin-top: 3px; }
.wel-lede { font-size: 15px; }
.wel-list { list-style: none; padding: 0; margin: 12px 24px 0; display: flex; flex-direction: column; gap: 8px; }
.wel-list li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.04); border-radius: 11px; padding: 8px 12px; }
.wel-list li > span { font-size: 20px; line-height: 1.3; }

/* ---------- THE MICROCITY MORNING ---------- */
.np-overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s, visibility 0s linear .3s; }
.np-overlay.open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .25s, visibility 0s; }
.np-back { position: absolute; inset: 0; background: rgba(8,10,18,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.np-wrap { position: relative; width: min(1060px, 96vw); height: calc(100vh - 28px); display: flex; flex-direction: column; gap: 8px; transform: translateY(24px) rotate(-.6deg) scale(.97); transition: transform .45s cubic-bezier(.2,1.2,.35,1); }
.np-overlay.open .np-wrap { transform: none; }
.np-nav { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 12px; }
.np-iss { font-weight: 900; font-size: 13px; }
.np-keys { font-size: 11px; }
.np-scroll { flex: 1; min-height: 0; overflow-y: auto; border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.np-paper { background-color: #f4eddc; background-image: radial-gradient(rgba(110,80,30,.07) 1px, transparent 1.2px), linear-gradient(180deg, rgba(255,255,255,.35), rgba(0,0,0,.03)); background-size: 4px 4px, 100% 100%; color: #1f1b16; font-family: var(--serif); padding: 22px 34px 26px; min-height: 100%; }
.np-top { display: grid; grid-template-columns: 170px 1fr 170px; align-items: center; gap: 12px; padding-bottom: 6px; }
.np-mast { font-family: 'UnifrakturMaguntia', 'Old English Text MT', 'Goudy Text MT', var(--display); font-size: clamp(36px, 5.6vw, 62px); text-align: center; line-height: 1; white-space: nowrap; letter-spacing: .005em; }
.np-ear { border: 1px solid #1f1b16; padding: 6px 8px; font-size: 11px; text-align: center; line-height: 1.3; min-height: 56px; display: flex; align-items: center; justify-content: center; }
.np-ear.r b { font-style: italic; font-weight: 600; }
.np-ear.r span { font-family: var(--sign-font); font-weight: 800; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.np-wx { display: flex; gap: 8px; align-items: center; text-align: left; font-size: 11px; line-height: 1.25; }
.np-wx-ic { flex: none; }
.np-paused { font-size: 11px; font-weight: 800; color: var(--accent); margin-right: 6px; }
.np-dateline { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #1f1b16; border-bottom: 3px double #1f1b16; padding: 4px 2px; font-family: var(--sign-font); font-weight: 700; font-size: 10.5px; letter-spacing: .1em; }
.np-lead { padding-top: 6px; }
.np-kicker { text-align: center; font-family: var(--sign-font); font-weight: 800; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-top: 10px; color: #7a2a1a; }
.np-lead h1 { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.04; text-align: center; margin: 10px 20px 6px; letter-spacing: -.01em; }
.np-dek { font-family: var(--display); font-style: italic; font-size: 17px; text-align: center; margin: 0 40px 12px; color: #3b342a; }
.np-lead-row { display: grid; grid-template-columns: minmax(180px, 250px) 1fr; gap: 24px; margin-top: 10px; align-items: start; }
.np-lead-row.nophoto { grid-template-columns: 1fr; }
.np-lead-body { columns: 2 220px; column-gap: 24px; column-rule: 1px solid rgba(31,27,22,.25); font-size: 14.5px; line-height: 1.52; text-align: justify; hyphens: auto; }
.np-lead-row.nophoto .np-lead-body { columns: 3 220px; }
.np-lead-row.short .np-lead-body { columns: 1; max-width: 62ch; }
.np-lead-body p { margin: 0 0 8px; }
.np-lead-body p.first::first-letter { float: left; font-family: var(--display); font-size: 3.5em; line-height: .82; padding: 5px 7px 0 0; font-weight: 900; }
.np-fig { break-inside: avoid; margin: 0; }
.np-ph { position: relative; }
.np-ph::after { content: ''; position: absolute; inset: 1px; background-image: radial-gradient(rgba(20,16,10,.22) .8px, transparent 1.2px); background-size: 3px 3px; mix-blend-mode: multiply; pointer-events: none; }
.np-photo { width: 100%; aspect-ratio: 1; display: block; filter: grayscale(1) contrast(1.2) sepia(.18); border: 1px solid #1f1b16; background: #ddd6c4; }
.np-fig figcaption { font-size: 11px; font-style: italic; margin-top: 3px; line-height: 1.3; }
.np-grid { display: grid; grid-template-columns: 1fr 250px; gap: 24px; border-top: 2px solid #1f1b16; margin-top: 16px; padding-top: 12px; }
.np-grid.one { grid-template-columns: minmax(0, 320px); justify-content: center; }
.np-main { columns: 2 240px; column-gap: 24px; column-rule: 1px solid rgba(31,27,22,.25); }
.np-sec { margin-bottom: 14px; }
.np-sec-h { font-family: var(--sign-font); font-weight: 800; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; border-bottom: 2px solid #1f1b16; padding-bottom: 3px; margin: 0 0 6px; break-after: avoid; }
.np-item { break-inside: avoid; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(31,27,22,.18); }
.np-item h3 { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.15; margin: 4px 0 4px; }
.np-item p { font-size: 13.5px; line-height: 1.48; margin: 0 0 6px; text-align: justify; hyphens: auto; }
.np-box { border: 1px solid #1f1b16; padding: 8px 10px; margin-bottom: 12px; font-size: 12.5px; break-inside: avoid; background: rgba(255,255,255,.18); }
.np-box-h { font-family: var(--sign-font); font-weight: 800; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid #1f1b16; margin-bottom: 6px; padding-bottom: 3px; display: flex; justify-content: space-between; align-items: center; }
.np-live { font-size: 8.5px; background: #b3261e; color: #fff; padding: 1px 4px; border-radius: 2px; letter-spacing: .1em; }
.np-stat { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted rgba(31,27,22,.35); padding: 3px 0; }
.np-stat b { font-family: var(--sign-font); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.np-d.up { color: #1d6b2e; } .np-d.dn { color: #a8261b; }
.np-cl { font-size: 12px; line-height: 1.38; padding: 4px 0; border-bottom: 1px solid rgba(31,27,22,.14); }
.np-cl:last-child { border-bottom: 0; }
.np-help .np-cl b, .np-apts .np-cl b { font-family: var(--sign-font); font-size: 11px; }
.lk-in { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(31,27,22,.55); cursor: pointer; transition: background .15s; }
.lk-in:hover { background: rgba(255,200,40,.35); }
.np-foot { text-align: center; font-size: 11px; font-style: italic; border-top: 3px double #1f1b16; margin-top: 12px; padding-top: 6px; }
.np-empty { text-align: center; padding: 26px 50px 8px; }
.np-empty-ic { display: flex; justify-content: center; opacity: .85; }
.np-empty h1 { font-family: var(--display); font-weight: 900; font-size: 34px; margin: 8px 0; line-height: 1.1; }
.np-empty p { font-size: 15px; line-height: 1.55; max-width: 620px; margin: 8px auto; }

@media (max-width: 1100px) {
  .mc-ui { --insp-w: 360px; }
  .win { width: calc(100vw - 20px) !important; min-width: 0; }
  body.insp-open:not(.win-front) .win { opacity: 0; pointer-events: none; visibility: hidden; }
  body.insp-open.win-front .insp { opacity: 0; pointer-events: none; visibility: hidden; }
  .np-top { grid-template-columns: 1fr; } .np-ear { display: none; }
  .np-grid { grid-template-columns: 1fr; }
}
@media (max-height: 820px) {
  canvas.portrait { width: 74px; height: 74px; }
  .ph-name { font-size: 19px; }
  .ph { gap: 12px; }
  .ph-act { padding-top: 4px; padding-bottom: 4px; }
  .insp-head > .chips { margin-top: 4px; }
  .sign-board { padding: 6px 12px 8px; }
  .sign-name { font-size: 18px; }
}
@media (max-height: 760px) {
  .insp, .win { top: 58px; }
  .ck-time { font-size: 18px; }
  .wordmark { padding-top: 6px; padding-bottom: 5px; }
  .wm-bullet { width: 26px; height: 26px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-ui *, .mc-ui *::before { animation: none !important; transition: none !important; }
}
.feed.collapsed .feed-h::after { display: none !important; }

/* ---------- tablets & phones ---------------------------------------------------------------------
   Below 900px the station bullets move to a tab bar along the bottom edge (the top row keeps the clock,
   speeds and camera); below 640px the top row splits in two. Panels sit between the two bars. */
@media (max-width: 900px) {
  .hud { top: 6px; left: 6px; right: 6px; gap: 6px; }
  .hud-l, .hud-speed { flex: none; }
  .hud-nav { position: fixed; left: 6px; right: 6px; bottom: 6px; margin: 0; padding: 4px; justify-content: space-between; }
  .navb { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0; }
  .navb.help { display: inline-flex; padding: 0; }
  .nb-tip { display: none; }
  .win, .insp { top: 58px; bottom: 58px; }
  .feed { left: 6px; bottom: 58px; }
  .follow-pill { bottom: 58px; }
  body.following .feed { bottom: 104px; }
  /* with the inspector open, the pill centres itself in the map that's left over */
  body.insp-open .follow-pill { left: calc((100vw - var(--insp-w) - 20px) / 2); }
  .toasts { top: 62px; }
  .toasts.bottom { bottom: 108px; }
}
@media (max-width: 640px) {
  .mc-ui { --insp-w: calc(100vw - 12px); }
  .hud { flex-wrap: wrap; }
  .hud-l { order: 1; flex: 1 1 auto; gap: 8px; padding: 4px 8px 4px 4px; }
  .hud-speed { display: contents; }
  .hud-speed > .hud-sep { display: none; }
  .spd-g, .cam-g { display: flex; align-items: center; gap: 2px; padding: 5px; }
  .cam-g { order: 2; flex: none; }
  .spd-g { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .spd-g .spd { flex: 1 1 0; min-width: 0; }
  .spd.cam { min-width: 30px; }
  .wordmark { padding: 5px; }
  .wordmark::before { left: 5px; right: 5px; }
  .wm-bullet { width: 26px; height: 26px; font-size: 16px; }
  .clock { width: auto; }
  .ck-time { font-size: 17px; }
  .wx { width: auto; gap: 5px; }
  .win, .insp { top: 108px; left: 6px; right: 6px; width: auto !important; max-width: none; }
  body.insp-open .follow-pill { visibility: hidden; opacity: 0; } /* the inspector's own Follow button says it */
  .toasts { top: 112px; }
  .feed { width: calc(100vw - 12px); }
  .modal { padding: 18px 16px 14px; max-height: calc(100vh - 24px); }
  .m-welcome > *:not(.wel-sign) { margin-left: 16px; margin-right: 16px; }
  .m-foot { flex-wrap: wrap; }
  .keys { grid-template-columns: 1fr; }
  /* the paper folds down to a single column */
  .np-wrap { width: calc(100vw - 12px); height: calc(100vh - 12px); }
  .np-nav { flex-wrap: wrap; gap: 6px; padding: 4px 4px 4px 10px; }
  .np-keys { display: none; }
  .np-paper { padding: 14px 14px 18px; }
  .np-mast { font-size: 10.2vw; white-space: normal; }
  .np-dateline { flex-wrap: wrap; justify-content: center; column-gap: 14px; font-size: 9.5px; }
  .np-dateline span:nth-child(3), .np-dateline span:nth-child(4) { display: none; }
  .np-lead h1 { margin: 8px 0 6px; font-size: 26px; }
  .np-dek { margin: 0 0 10px; font-size: 15px; }
  .np-lead-row { grid-template-columns: 1fr; gap: 12px; }
  .np-fig { max-width: 210px; width: 100%; margin: 0 auto; }
  .np-lead-body, .np-lead-row.nophoto .np-lead-body { columns: 1; }
  .np-empty { padding: 18px 6px 8px; }
  .np-empty h1 { font-size: 26px; }
}
/* narrower windows (beside the inspector, tablets). These come after the base rules so they win. */
@container (max-width: 640px) {
  .drow { grid-template-columns: 42px minmax(120px, 1.3fr) minmax(90px, 1fr) 58px; }
  .dr-c { display: none; }
  .dr-d { grid-column: 3; }
  .dr-m { grid-column: 4; }
  .brow { grid-template-columns: 34px minmax(120px, 1.2fr) minmax(100px, 1.2fr) 96px 80px; }
  .br-sp { display: none; }
  .two { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
/* narrow windows (phones, or a window squeezed beside the inspector) */
@container (max-width: 460px) {
  .drow { grid-template-columns: 40px minmax(0, 1fr) 62px; column-gap: 10px; padding: 6px 4px; }
  .dr-c, .dr-d { display: none; }
  .dr-m { grid-column: 3; }
  .brow { grid-template-columns: 28px minmax(0, 1fr) minmax(0, .95fr) 62px; gap: 8px; padding: 8px; }
  .br-sp, .br-st { display: none; }
  .br-ic { font-size: 18px; }
  .as-banner { flex-wrap: wrap; }
  .as-fund { margin-left: 0; text-align: left; }
}
@container (max-width: 720px) {
  /* keep the apartments legible: the street scrolls sideways instead of squeezing every building */
  .hcol { flex: none; width: calc(var(--cols, 2) * 62px + 14px); }
}

/* ---------- game-feel pass: watch cards, stars, relationship cues, follow card, feed ticker ---------- */
.tb-star.on { background: rgba(255,206,92,.16); color: #ffd35c; border-color: rgba(255,206,92,.4); }
.drow.starred .dr-a b::before { content: '★ '; color: #ffd35c; }
/* "Wait, they know each other?" — a watched person's new bond gets its own card with both faces */
.toast.watch { align-items: center; padding: 9px 9px 9px 10px; border-radius: 16px; background: linear-gradient(135deg, rgba(58,40,52,.97), rgba(33,27,33,.97)); border: 1px solid rgba(255,160,190,.35); box-shadow: 0 10px 34px rgba(0,0,0,.45), 0 0 0 1px rgba(255,160,190,.08), 0 0 26px rgba(255,120,170,.16); }
.toast.watch .t-ic:empty { display: none; }
.toast.watch.in { animation: wcpop .6s cubic-bezier(.2,1.5,.4,1); }
@keyframes wcpop { 0% { transform: translateY(-16px) scale(.9); } 60% { transform: translateY(2px) scale(1.02); } 100% { transform: none; } }
.wc { display: flex; align-items: center; gap: 12px; }
.wc-pics { position: relative; display: flex; align-items: center; flex: none; }
.wc-pics img { width: 46px; height: 46px; border-radius: 50%; background: #2b2430; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 3px 10px rgba(0,0,0,.4); }
.wc-pics img + .wc-ic + img { margin-left: -8px; }
.wc-ic { position: relative; z-index: 1; margin-left: -8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; background: #fff6ea; box-shadow: 0 2px 8px rgba(0,0,0,.35); animation: wcbeat 1.6s ease-in-out infinite; }
@keyframes wcbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } }
.wc-txt { min-width: 0; }
.wc-k { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #ffb3cc; }
.wc-h { font-size: 15px; font-weight: 900; margin: 1px 0 2px; }
.wc-h .lk { font-size: 13.5px; }
.wc-shift { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 1px 9px 1px 8px; border-radius: 999px; background: rgba(255,255,255,.07); }
.wc-from { color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); }
.wc-arr { color: #ffb3cc; font-weight: 900; }
.wc-shift b { color: #ffe1ea; }
.wc-s { margin-top: 3px; font-size: 11.5px; color: var(--ink-2); }
.toast.watch .btn[data-tact] { background: #ff8fb3; color: #2d1520; border-color: transparent; }
.toast.watch .btn[data-tact]:hover { background: #ffadc7; }
.toasts.narrow .toast.watch .wc-pics img { width: 36px; height: 36px; }
/* following someone you can't see: where they are, when they're back, and what to do meanwhile */
.fcard-away { position: fixed; left: 50%; bottom: 58px; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 16px; z-index: 22; max-width: min(620px, calc(100vw - 24px)); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.2,1.2,.4,1), visibility 0s linear .3s; }
.fcard-away.on { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition: opacity .25s, transform .3s cubic-bezier(.2,1.2,.4,1), visibility 0s; }
.fa-av { width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(140,220,255,.7); opacity: .85; filter: saturate(.7); }
.fa-t { min-width: 0; }
.fa-h { font-weight: 800; font-size: 13px; }
.fa-ic { margin-right: 6px; }
.fa-s { font-size: 11.5px; color: var(--ink-2); margin-top: 1px; }
.fa-b { display: flex; gap: 6px; flex: none; }
@media (max-width: 900px) { .fcard-away { bottom: 104px; } body.insp-open .fcard-away { left: calc((100vw - var(--insp-w) - 20px) / 2); } }
@media (max-width: 640px) {
  .fcard-away { top: 112px; bottom: auto; transform: translate(-50%, -12px); flex-wrap: wrap; justify-content: center; }
  .fcard-away.on { transform: translate(-50%, 0); }
  .fa-av { display: none; }
  body.insp-open .fcard-away { display: none; }
}
.mem-card { flex-wrap: wrap; }
.mem-w { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pill.here { background: rgba(160,236,170,.14); color: #b9f3c1; font-size: 10.5px; padding: 1px 7px; }
