/* City Boss UI: "Municipal Enamel"
   Hardware (bars, tool rack) is slate porcelain-enamel signage with a white keyline.
   The city name is a cobalt street sign with a green rim. Anything you read at length
   is City Hall paperwork: green-tint forms, index cards, newsprint, rubber stamps. */
@import url('./fonts/fonts.css');

:root {
  /* enamel hardware */
  --slate: #28333d;
  --slate-hi: #34424e;
  --slate-lo: #1b242c;
  --rim: #10171d;
  --enamel: #eef0ea;
  --enamel-dim: #a3b1b9;
  --keyline: rgba(238, 240, 234, 0.2);
  /* the street sign */
  --cobalt: #234b93;
  --cobalt-hi: #2f5eb3;
  --cobalt-lo: #17346a;
  --green: #2e7d57;
  /* ink and paper */
  --stamp: #b8352b;
  --stamp-hi: #ff8f86;
  --form: #e6ebe2;
  --form-rule: #bccbbf;
  --ink: #1d2924;
  --ink-soft: #4d5c55;
  --card: #fbfbf7;
  --news: #ebe9e1;
  --news-ink: #1a1a18;
  /* zoning colors, SimCity convention */
  --r: #4f9e4b;
  --c: #3d7bd0;
  --i: #e3cb4a;
  --mature: #7a3550;
  /* type */
  --sign: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --signtext: "Big Shoulders Text", "Arial Narrow", sans-serif;
  --stencil: "Big Shoulders Stencil Display", "Big Shoulders Display", sans-serif;
  --font: "Public Sans", "Segoe UI", sans-serif;
  --serif: "Old Standard TT", Georgia, serif;
  --black: "UnifrakturMaguntia", "Old English Text MT", serif;
  --typed: "Courier Prime", "Courier New", monospace;
  /* plate recipe */
  --plate-shadow: inset 0 0 0 2px var(--slate), inset 0 0 0 3px var(--keyline), 0 3px 0 var(--rim), 0 10px 22px rgba(6, 12, 18, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #6d8796; font-family: var(--font); color: var(--enamel); user-select: none; -webkit-user-select: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid #9cc0ff; outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }

svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }

/* ---------- shared plate ---------- */
#topbar .stats, #topbar .clock, #toolcol, #flyout, .bb-left, .bb-right {
  background: var(--slate);
  border: 1px solid var(--rim);
  border-radius: 6px;
  box-shadow: var(--plate-shadow);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 45%);
}

/* ---------- top: name plate, vitals, clock ---------- */
#topbar { position: fixed; top: 10px; left: 10px; right: 288px; display: flex; gap: 8px; align-items: stretch; height: 58px; z-index: 6; pointer-events: none; }
#topbar > * { pointer-events: auto; }

.nameplate {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-width: 156px; padding: 4px 18px 5px;
  background: var(--cobalt); color: var(--enamel);
  border: 3px solid var(--green); border-radius: 11px;
  box-shadow: inset 0 0 0 2px var(--cobalt), inset 0 0 0 3.5px var(--enamel), 0 3px 0 #1d4f37, 0 10px 22px rgba(6, 12, 18, 0.3);
  position: relative; transition: background 0.3s;
}
.nameplate::before, .nameplate::after { content: ""; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f6f7f2, #9aa6ad 70%); box-shadow: 0 0 0 1px rgba(0,0,0,0.35); }
.nameplate::before { left: 7px; } .nameplate::after { right: 7px; }
.nameplate #era-name { font-family: var(--signtext); font-weight: 600; font-size: 12.5px; letter-spacing: 0.04em; line-height: 1; opacity: 0.9; }
.nameplate b { font-family: var(--sign); font-weight: 900; font-size: 27px; letter-spacing: 0.035em; text-transform: uppercase; line-height: 1; margin-top: 2px; white-space: nowrap; }
.nameplate.ai { background: var(--stamp); border-color: #6e1c16; box-shadow: inset 0 0 0 2px var(--stamp), inset 0 0 0 3.5px var(--enamel), 0 3px 0 #6e1c16, 0 10px 22px rgba(6, 12, 18, 0.3); }

#topbar .stats { display: flex; align-items: center; padding: 0 4px; min-width: 0; }
#topbar .clock { display: flex; align-items: center; padding: 0 6px 0 2px; }
.pill { display: flex; align-items: center; gap: 9px; padding: 0 14px; height: 36px; border-left: 1px solid var(--keyline); white-space: nowrap; }
.stats .pill:first-child, .clock .pill { border-left: 0; }
.pill svg.i { width: 21px; height: 21px; color: var(--enamel-dim); }
.pv { display: flex; flex-direction: column; line-height: 1; }
.pv small { font-family: var(--font); font-size: 10.5px; font-weight: 600; color: var(--enamel-dim); letter-spacing: 0.01em; margin-bottom: 3px; }
.pv > span { font-family: var(--signtext); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; color: var(--enamel); }
.pill.small { padding: 0 11px; }
.pill.bad .pv > span, .pill.bad svg.i { color: var(--stamp-hi); }
.pill.bad .pv small::after { content: " low"; }
#pill-crime.bad .pv small::after { content: " high"; }
#pill-money.bad .pv small::after { content: " in the red"; }
#pill-date { min-width: 78px; padding-right: 10px; }

/* buttons that live on enamel */
.group { display: flex; gap: 3px; }
.tb { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: transparent; border: 0; border-radius: 4px; color: var(--enamel); cursor: pointer; position: relative; }
.tb:hover { background: var(--slate-hi); }
.tb.active { background: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt-lo), inset 0 0 0 2px rgba(238,240,234,0.35); }
.tb svg.i { width: 21px; height: 21px; }
.speed .tb { width: 34px; }
.speed .tb svg.i { width: 19px; height: 19px; }

/* ---------- seer's warning ---------- */
#countdown { position: fixed; top: 10px; right: 10px; width: 266px; z-index: 5; background: var(--form); color: var(--ink); border: 1px solid var(--rim); border-radius: 3px; box-shadow: 0 3px 0 var(--rim), 0 10px 22px rgba(6, 12, 18, 0.28); overflow: hidden; }
.cd-title { display: flex; align-items: center; gap: 7px; background: var(--stamp); color: #fff; font-family: var(--signtext); font-weight: 800; font-size: 16px; letter-spacing: 0.02em; padding: 6px 10px; }
.cd-title svg.i { width: 17px; height: 17px; stroke-width: 2.2; }
.cd-body { font-size: 12.5px; line-height: 1.45; padding: 8px 11px 10px; color: var(--ink); }
.cd-body b { font-family: var(--signtext); font-size: 15px; font-weight: 800; }

/* ---------- tool rack ---------- */
#toolcol { position: fixed; left: 10px; top: 78px; bottom: 76px; width: 66px; display: flex; flex-direction: column; gap: 2px; padding: 6px 5px; z-index: 6; overflow-y: auto; scrollbar-width: none; }
#toolcol .cat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; background: transparent; border: 0; border-radius: 4px; color: var(--enamel); cursor: pointer; flex: none; }
#toolcol .cat svg.i { width: 23px; height: 23px; }
#toolcol .cat small { font-family: var(--signtext); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; line-height: 1; }
#toolcol .cat:hover { background: var(--slate-hi); }
#toolcol .cat.active { background: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt-lo), inset 0 0 0 2px rgba(238,240,234,0.35); }
#toolcol .cat.dozer.active { background: var(--stamp); box-shadow: inset 0 0 0 1px #6e1c16, inset 0 0 0 2px rgba(238,240,234,0.35); }
#toolcol .spacer { flex: 1; min-height: 6px; border-bottom: 1px solid var(--keyline); margin: 0 6px 4px; }

#flyout { position: fixed; left: 84px; top: 78px; width: 252px; padding: 12px 10px 10px; z-index: 6; max-height: calc(100vh - 160px); overflow-y: auto; }
#flyout::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; background: var(--slate); border-left: 1px solid var(--rim); border-bottom: 1px solid var(--rim); transform: rotate(45deg); }
#flyout .fly { display: none; } #flyout .fly.on { display: block; }
#flyout h4 { margin: 0 4px 10px; padding-bottom: 8px; font-family: var(--sign); font-weight: 800; font-size: 23px; letter-spacing: 0.02em; line-height: 1; color: var(--enamel); border-bottom: 1px solid var(--keyline); }
.tool { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 8px 5px 5px; margin-bottom: 3px; background: transparent; border: 0; border-radius: 4px; color: var(--enamel); cursor: pointer; text-align: left; }
.tool:hover { background: var(--slate-hi); }
.t-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 3px; background: var(--slate-lo); box-shadow: inset 0 0 0 1px var(--keyline); color: var(--enamel); flex: none; }
.t-ico svg.i { width: 21px; height: 21px; }
.t-name { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.15; }
.t-cost { font-family: var(--signtext); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--enamel-dim); }
.tool.active { background: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt-lo), inset 0 0 0 2px rgba(238,240,234,0.3); }
.tool.active .t-cost { color: var(--enamel); }
.tool.active .t-ico { background: var(--cobalt-lo); }
/* zoning swatches read like a hatched zoning map */
.tool.zr .t-ico, .tool.zc .t-ico, .tool.zi .t-ico { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.22) 0 2px, transparent 2px 6px); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); }
.tool.zr .t-ico { background-color: var(--r); }
.tool.zc .t-ico { background-color: var(--c); }
.tool.zi .t-ico { background-color: var(--i); color: #2a2a1a; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0.1) 0 2px, transparent 2px 6px); }
.tool.zr.active .t-ico { background-color: var(--r); } .tool.zc.active .t-ico { background-color: var(--c); } .tool.zi.active .t-ico { background-color: var(--i); }
.tool.mature .t-ico { background-color: var(--mature); }
#flyout .hint { font-size: 12px; line-height: 1.5; color: var(--enamel-dim); margin: 8px 4px 2px; }
#flyout .btn.small { width: 100%; margin: 4px 0 2px; }

/* ---------- bottom desk ---------- */
#bottombar { position: fixed; left: 10px; right: 10px; bottom: 10px; height: 56px; display: flex; align-items: center; gap: 8px; z-index: 6; pointer-events: none; }
#bottombar > * { pointer-events: auto; }
.bb-left, .bb-right { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px; flex: none; }
.bb-sep { width: 1px; height: 26px; background: var(--keyline); margin: 0 4px; }
.bb-right .tb { width: 38px; height: 38px; }

.rci { display: flex; gap: 5px; align-items: flex-end; padding: 0 12px 0 4px; margin-right: 4px; border-right: 1px solid var(--keyline); height: 46px; }
.rcol { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rcol i { font-style: normal; font-family: var(--signtext); font-weight: 800; font-size: 12px; line-height: 1; color: var(--enamel-dim); }
.rci .bar { width: 13px; height: 33px; background: linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(238,240,234,0.45) calc(50% - 0.5px), rgba(238,240,234,0.45) calc(50% + 0.5px), transparent calc(50% + 0.5px)), var(--slate-lo); border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3); position: relative; overflow: hidden; }
.rci .fill { position: absolute; left: 0; right: 0; bottom: 50%; height: 0; transition: height 0.4s, bottom 0.4s; }
.fill.r { background: var(--r); } .fill.c { background: var(--c); } .fill.i { background: var(--i); }

/* the wire: a strip of newsprint */
#ticker { flex: 1; min-width: 0; height: 40px; display: flex; align-items: stretch; background: var(--news); color: var(--news-ink); border: 1px solid var(--rim); border-radius: 2px; box-shadow: 0 3px 0 var(--rim), 0 10px 22px rgba(6, 12, 18, 0.28); overflow: hidden; }
.tk-flag { flex: none; display: flex; align-items: center; padding: 0 12px 0 12px; font-family: var(--black); font-size: 20px; line-height: 1; border-right: 3px double var(--news-ink); white-space: nowrap; background: var(--news); position: relative; z-index: 1; }
.tk-win { flex: 1; min-width: 0; overflow: hidden; position: relative; }
#ticker-text { display: inline-block; padding-left: 100%; white-space: nowrap; line-height: 39px; font-family: var(--serif); font-size: 15.5px; animation: tick 30s linear infinite; }
#ticker-text .tk-y { font-weight: 700; margin-right: 8px; }
#ticker-text .tk-h { font-weight: 700; }
#ticker-text .tk-s { font-style: italic; margin-left: 14px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--stamp); color: #fff; font-family: var(--signtext); font-weight: 800; font-size: 12px; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--slate); }

/* ---------- toast and tooltip ---------- */
#toast { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 30; max-width: min(680px, 80vw); padding: 9px 20px 10px; text-align: center; background: var(--cobalt); color: var(--enamel); border: 1px solid var(--cobalt-lo); border-radius: 6px; box-shadow: inset 0 0 0 2px var(--cobalt), inset 0 0 0 3px rgba(238,240,234,0.55), 0 3px 0 var(--cobalt-lo), 0 10px 24px rgba(6, 12, 18, 0.35); font-family: var(--signtext); font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: 0.01em; }
#tip { position: fixed; pointer-events: none; z-index: 7; display: none; max-width: 250px; padding: 5px 9px; background: var(--slate); color: var(--enamel); border: 1px solid var(--rim); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--keyline), 0 4px 12px rgba(0,0,0,0.3); font-size: 12px; font-weight: 500; line-height: 1.35; }

/* ---------- advisor memo ---------- */
#advisor { position: fixed; right: 10px; bottom: 78px; width: 352px; z-index: 7; display: flex; gap: 12px; padding: 12px 14px 12px 12px; background: var(--form); color: var(--ink); border: 1px solid var(--rim); border-top: 4px solid var(--cobalt); border-radius: 3px; box-shadow: 0 3px 0 var(--rim), 0 12px 26px rgba(6, 12, 18, 0.32); }
.adv-face { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--cobalt); color: var(--enamel); box-shadow: inset 0 0 0 2px var(--cobalt), inset 0 0 0 3px rgba(238,240,234,0.6), 0 0 0 2px var(--green); }
.adv-face svg.i { width: 24px; height: 24px; }
.adv-main { min-width: 0; }
.adv-name { font-family: var(--sign); font-weight: 800; font-size: 19px; line-height: 1.05; color: var(--ink); }
.adv-text { font-size: 13.5px; line-height: 1.45; margin-top: 4px; }
.adv-text b { font-weight: 700; }
.adv-text svg.i, .inline-ico { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.adv-actions { margin-top: 9px; display: flex; gap: 6px; }
.adv-actions .btn { padding: 5px 11px; font-size: 14px; }

/* ---------- paperwork: modals ---------- */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(14, 22, 30, 0.5); }
.panel { position: relative; display: flex; flex-direction: column; width: min(580px, 100%); max-height: 86vh; background: var(--form); color: var(--ink); border: 1px solid var(--rim); border-radius: 3px; box-shadow: 0 4px 0 var(--rim), 0 28px 70px rgba(4, 10, 16, 0.5); }
.panel.small { width: min(450px, 100%); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 12px 11px 18px; background: var(--cobalt); color: var(--enamel); border-bottom: 3px solid var(--green); box-shadow: inset 0 0 0 2px var(--cobalt), inset 0 0 0 3px rgba(238,240,234,0.4); border-radius: 2px 2px 0 0; }
.panel-head h2 { margin: 0; font-family: var(--sign); font-weight: 800; font-size: 27px; line-height: 1.02; letter-spacing: 0.025em; text-transform: uppercase; }
.panel-body { padding: 16px 18px 18px; overflow: auto; font-size: 14px; line-height: 1.5; user-select: text; -webkit-user-select: text; }
.panel-body p { margin: 0 0 10px; }
.panel-body h3 { font-family: var(--sign); font-weight: 800; font-size: 19px; line-height: 1.1; margin: 0 0 6px; }

/* buttons on paper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px 9px; background: var(--cobalt); color: var(--enamel); border: 1px solid var(--cobalt-lo); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(238,240,234,0.22), 0 2px 0 var(--cobalt-lo); font-family: var(--signtext); font-weight: 700; font-size: 16px; line-height: 1.1; letter-spacing: 0.02em; cursor: pointer; }
.btn:hover { background: var(--cobalt-hi); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(238,240,234,0.22); }
.btn svg.i { width: 18px; height: 18px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.btn.ghost:hover { background: rgba(29, 41, 36, 0.07); }
.btn.ghost.danger { color: var(--stamp); border-color: var(--stamp); }
.btn.red { background: var(--stamp); border-color: #7d2019; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22), 0 2px 0 #7d2019; }
.btn.red:hover { background: #c94236; }
.btn:disabled { cursor: not-allowed; }
.panel-head .btn.ghost { color: var(--enamel); border-color: rgba(238,240,234,0.6); padding: 5px 12px 6px; font-size: 15px; }
.panel-head .btn.ghost:hover { background: rgba(238,240,234,0.12); }
#flyout .btn { background: var(--slate-lo); color: var(--enamel); border: 1px solid var(--rim); box-shadow: inset 0 0 0 1px var(--keyline); font-size: 15px; padding: 7px 10px; }
#flyout .btn:hover { background: var(--slate-hi); }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }

label.field { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--signtext); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
label.field b { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--cobalt); }
input[type=range] { width: 100%; accent-color: var(--cobalt); }
#district-name { width: 100%; padding: 8px 10px; background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; font-family: var(--signtext); font-weight: 700; font-size: 19px; }

/* segmented choices (laws, faith, district type, disasters) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 6px 11px; background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button:hover { background: #fff; }
.seg button.on { background: var(--cobalt); color: var(--enamel); border-color: var(--cobalt-lo); }
.seg button small { font-weight: 500; opacity: 0.8; }

/* the ledger */
.ledger { margin-top: 14px; display: grid; grid-template-columns: 1fr auto; font-variant-numeric: tabular-nums; border-left: 3px double var(--stamp); background: repeating-linear-gradient(to bottom, transparent 0 28px, var(--form-rule) 28px 29px); }
.ledger span { padding: 0 10px; line-height: 29px; font-size: 13.5px; }
.ledger span:nth-child(even) { text-align: right; font-weight: 600; }
.ledger .neg { color: var(--stamp); }
.ledger .tot { font-family: var(--signtext); font-weight: 800; font-size: 18px; border-top: 3px double var(--ink); line-height: 34px; }
#betbox { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--form-rule); }

/* laws, faith, vitals, notes */
.law { padding: 12px 0; border-top: 1px solid var(--form-rule); }
.law:first-of-type { border-top: 0; }
.law .fx { font-size: 12.5px; color: var(--ink-soft); margin-top: 7px; line-height: 1.45; }
.vitals { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--card); }
.vitals div { padding: 8px 6px; text-align: center; border-left: 1px solid var(--form-rule); }
.vitals div:first-child { border-left: 0; }
.vitals b { display: block; font-family: var(--signtext); font-weight: 800; font-size: 24px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.vitals span { font-size: 11.5px; color: var(--ink-soft); }
.faith { background: var(--card); border: 1px solid var(--form-rule); border-left: 6px solid var(--ink); border-radius: 2px; padding: 10px 12px; margin-bottom: 8px; }
.faith h3 { display: flex; justify-content: space-between; margin: 0; }
.faith p { margin: 4px 0; font-size: 12.5px; }
.faith .meter { height: 6px; margin-top: 6px; background: var(--form); box-shadow: inset 0 0 0 1px var(--form-rule); overflow: hidden; }
.faith .meter div { height: 100%; }
.note { padding: 10px 0 12px; border-top: 1px solid var(--form-rule); }
.note:first-child { border-top: 0; padding-top: 0; }
.note h3 { color: var(--cobalt); }
.note p { margin: 0; font-size: 13.5px; }

/* people: census index cards */
.person { background: var(--card); border: 1px solid var(--form-rule); border-radius: 2px; padding: 9px 12px 10px; margin-bottom: 8px; box-shadow: inset 0 3px 0 -1px rgba(184, 53, 43, 0.55); }
.person b { font-family: var(--sign); font-weight: 800; font-size: 18px; }
.person .status { display: inline-block; margin-left: 8px; padding: 1px 7px; border: 1.2px solid currentColor; border-radius: 2px; font-family: var(--signtext); font-weight: 700; font-size: 12.5px; color: var(--ink-soft); vertical-align: 2px; }
.person .status.st-protest, .person .status.st-unemployed { color: var(--stamp); }
.person .status.st-running { color: var(--cobalt); }
.person .status.st-working { color: var(--green); }
.person .job { font-size: 12.5px; color: var(--ink-soft); margin-left: 6px; }
.person ul { margin: 6px 0 0; padding: 0 0 0 16px; font-size: 13px; }
.person li { margin: 2px 0; }

/* ---------- the decision memo ---------- */
.panel.memo { background: var(--card); background-image: linear-gradient(to right, transparent 34px, rgba(184, 53, 43, 0.35) 34px, rgba(184, 53, 43, 0.35) 35px, transparent 35px); overflow: visible; }
.memo .panel-head { background: none; color: var(--ink); box-shadow: none; border-bottom: 3px double var(--ink); margin: 0 18px 0 46px; padding: 22px 88px 10px 0; border-radius: 0; }
.memo .panel-head h2 { font-size: 31px; line-height: 1; letter-spacing: 0.01em; }
.memo .panel-body { padding: 14px 22px 22px 46px; font-size: 14.5px; }
.memo .seal { position: absolute; top: -28px; right: -8px; width: 96px; height: 96px; color: var(--cobalt); opacity: 0.85; transform: rotate(-13deg); fill: none; stroke: currentColor; stroke-width: 2; font-family: var(--signtext); font-weight: 800; pointer-events: none; mix-blend-mode: multiply; }
.memo .actions { justify-content: flex-start; gap: 14px; margin-top: 18px; }
.memo #ev-actions .btn { background: transparent; color: var(--cobalt); border: 2.5px solid currentColor; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3.5px currentColor; font-family: var(--stencil); font-weight: 800; font-size: 19px; letter-spacing: 0.05em; text-transform: uppercase; padding: 9px 16px 10px; transform: rotate(-1.2deg); }
.memo #ev-actions .btn:nth-child(even) { color: var(--stamp); transform: rotate(0.9deg); }
.memo #ev-actions .btn:nth-child(3) { color: var(--ink); transform: rotate(-0.4deg); }
.memo #ev-actions .btn:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.memo #ev-actions .btn:active { transform: scale(0.96) rotate(-1.2deg); }
#ev-extra:not(:empty) { margin-top: 10px; }
#ev-extra b { font-family: var(--signtext); font-size: 20px; color: var(--cobalt); }
#temple-pick button { text-align: left; line-height: 1.2; }

/* ---------- records office (save) ---------- */
.filecard { position: relative; margin: 14px 0; padding: 24px 14px 0; background-color: var(--card); border: 1px solid var(--form-rule); background-image: linear-gradient(to bottom, transparent 15px, rgba(184, 53, 43, 0.55) 15px, rgba(184, 53, 43, 0.55) 16px, transparent 16px), linear-gradient(to bottom, transparent 23px, rgba(61, 123, 208, 0.22) 23px, rgba(61, 123, 208, 0.22) 24px); background-size: 100% 100%, 100% 24px; background-repeat: no-repeat, repeat-y; background-position: 0 0, 0 24px; }
.fc-tab { position: absolute; top: -13px; left: 12px; padding: 2px 12px 3px; background: var(--card); border: 1px solid var(--form-rule); border-bottom: 0; border-radius: 4px 4px 0 0; font-family: var(--signtext); font-weight: 800; font-size: 13px; color: var(--ink-soft); }
#save-status { margin: 0 0 2px; font-family: var(--signtext); font-weight: 700; font-size: 18px; line-height: 24px; }
.rec-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rec-actions .btn.ghost { padding: 7px 10px; font-size: 15px; }
.rec-actions #save-new { grid-column: 1 / -1; }
.rec-actions #save-export, .rec-actions #save-import { grid-column: auto; }
.fine { font-size: 12.5px; margin: 12px 0 0 !important; }

/* ---------- disasters and the wheel ---------- */
.seg.dis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg.dis button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 9px; }
.seg.dis button svg.i { width: 19px; height: 19px; }
.seg.dis button .lk { margin-left: auto; width: 14px; height: 14px; opacity: 0.7; }
.wheelbox { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--form-rule); }
.wheel-wrap { position: relative; width: 184px; height: 184px; margin: 12px auto 4px; }
.wheel { width: 184px; height: 184px; border-radius: 50%; border: 5px solid var(--slate); box-shadow: inset 0 0 0 2px rgba(238,240,234,0.7), 0 3px 0 var(--rim), 0 10px 20px rgba(0,0,0,0.3); transition: transform 2.6s cubic-bezier(0.15, 0.85, 0.2, 1); position: relative; }
.wheel span { position: absolute; left: 50%; top: 50%; color: #fff; line-height: 0; }
.wheel span svg.i { width: 20px; height: 20px; stroke-width: 2.2; }
.wheel-pin { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 18px solid var(--stamp); filter: drop-shadow(0 2px 0 var(--rim)); }

/* ---------- The Morning Boss ---------- */
.paper { width: min(780px, 100%); max-height: 90vh; overflow: auto; background: var(--news); color: var(--news-ink); font-family: var(--serif); border-radius: 1px; box-shadow: 0 4px 0 #b9b6aa, 0 30px 70px rgba(4, 10, 16, 0.55); user-select: text; -webkit-user-select: text; }
.paper-top { display: grid; grid-template-columns: 96px 1fr 96px; align-items: center; gap: 10px; padding: 18px 26px 0; }
.masthead { text-align: center; font-family: var(--black); font-size: 60px; line-height: 1.05; letter-spacing: 0.005em; }
.ear { font-size: 10.5px; line-height: 1.25; text-align: center; border: 1px solid var(--news-ink); padding: 5px 4px; font-style: italic; }
.dateline { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: 8px; padding: 5px 2px 4px; border-top: 1px solid var(--news-ink); border-bottom: 3px double var(--news-ink); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.paper-body { padding: 16px 26px 6px; }
.lead h1 { font-size: 35px; line-height: 1.04; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.005em; }
.lead p { font-size: 16.5px; font-style: italic; margin: 0 0 14px; line-height: 1.35; }
.cols { column-count: 3; column-gap: 26px; column-rule: 1px solid rgba(26, 26, 24, 0.6); border-top: 1px solid var(--news-ink); padding-top: 12px; }
.cols > div { break-inside: avoid; margin-bottom: 14px; }
.cols h3 { font-size: 15.5px; line-height: 1.15; margin: 0 0 4px; font-weight: 700; }
.cols p { font-size: 12.5px; margin: 0; line-height: 1.42; }
.cols > div:nth-last-child(2), .cols > div:last-child { border: 1px solid var(--news-ink); padding: 7px 9px 8px; }
.cols > div:nth-last-child(2) h3, .cols > div:last-child h3 { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; border-bottom: 1px solid var(--news-ink); padding-bottom: 4px; margin-bottom: 6px; }
.paper-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 26px 20px; border-top: 1px solid rgba(26, 26, 24, 0.25); margin: 0 26px; padding-left: 0; padding-right: 0; }
.paper .btn { background: var(--news-ink); color: var(--news); border-color: #000; box-shadow: 0 2px 0 #000; }
.paper .btn:hover { background: #333230; }
.paper .btn.ghost { background: transparent; color: var(--news-ink); border-color: var(--news-ink); box-shadow: none; }

@media (max-height: 760px) {
  .wheel-wrap, .wheel { width: 150px; height: 150px; }
  .wheelbox { margin-top: 10px; padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel { transition-duration: 0.8s; }
  .rci .fill { transition: none; }
}

/* ---------- Query tool: the hover card is a small enamel plate ---------- */
.qcard { position: fixed; z-index: 8; pointer-events: none; min-width: 210px; max-width: 300px; padding: 10px 12px 9px; background: var(--slate); color: var(--enamel); border: 1px solid var(--rim); border-radius: 6px; box-shadow: var(--plate-shadow); background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 45%); }
.qcard.sig { box-shadow: inset 0 0 0 2px var(--slate), inset 0 0 0 3px rgba(242, 193, 78, 0.75), 0 3px 0 var(--rim), 0 10px 22px rgba(6, 12, 18, 0.28); }
.qcard.light { min-width: 0; max-width: 260px; padding: 8px 10px 8px; }
.qc-top { display: flex; gap: 9px; align-items: flex-start; }
.qc-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 3px; background: var(--slate-lo); box-shadow: inset 0 0 0 1px var(--keyline); color: var(--enamel); }
.qc-ico svg.i { width: 19px; height: 19px; }
.qc-ico.zr, .qc-ico.zc { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.22) 0 2px, transparent 2px 6px); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25); }
.qc-ico.zr { background-color: var(--r); } .qc-ico.zc { background-color: var(--c); }
.qc-ico.zi { background-color: var(--i); color: #2a2a1a; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0.1) 0 2px, transparent 2px 6px); }
.qc-id { min-width: 0; }
.qc-name { font-family: var(--sign); font-weight: 800; font-size: 21px; line-height: 1.02; letter-spacing: 0.012em; }
.qcard.light .qc-name { font-size: 18px; }
.qc-type { font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--enamel-dim); margin-top: 3px; }
.qc-hook { margin: 8px 0 0; padding-top: 7px; border-top: 1px solid var(--keyline); font-size: 12.5px; line-height: 1.42; font-style: italic; color: #dfe4dc; }
.qcard.light .qc-hook { margin-top: 6px; padding-top: 6px; }
.qc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.qc-foot { margin-top: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--enamel-dim); }
.chip { display: inline-block; padding: 2px 6px 1px; border: 1.4px solid currentColor; border-radius: 2px; font-family: var(--signtext); font-weight: 800; font-size: 11.5px; line-height: 1.15; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.qcard .chip.bad { color: var(--stamp-hi); } .qcard .chip.good { color: #8fd6ad; } .qcard .chip.info { color: #9cc0ff; } .qcard .chip.gold { color: #f2c14e; }

/* ---------- the Building Record: a City Hall property record card ---------- */
.record { position: fixed; right: 10px; top: 78px; width: 388px; max-height: calc(100vh - 156px); z-index: 9; display: flex; flex-direction: column; background: var(--card); color: var(--ink); border: 1px solid var(--rim); border-radius: 3px; box-shadow: 0 4px 0 var(--rim), 0 24px 60px rgba(4, 10, 16, 0.45); overflow: hidden; }
.rc-head { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 9px 15px; background: var(--cobalt); color: var(--enamel); border-bottom: 3px solid var(--green); box-shadow: inset 0 0 0 2px var(--cobalt), inset 0 0 0 3px rgba(238,240,234,0.4); }
.rc-head h2 { margin: 1px 0 0; font-family: var(--sign); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; }
.rc-dept { font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.85; }
.rc-head .btn.ghost { color: var(--enamel); border-color: rgba(238,240,234,0.6); padding: 4px 10px 5px; font-size: 14px; }
.rc-head .btn.ghost:hover { background: rgba(238,240,234,0.12); }
.rc-body { overflow: auto; padding: 10px 16px 16px 22px; font-size: 13.5px; line-height: 1.45; user-select: text; -webkit-user-select: text; background-image: linear-gradient(to right, transparent 9px, rgba(184, 53, 43, 0.38) 9px, rgba(184, 53, 43, 0.38) 10px, transparent 10px, transparent 12px, rgba(184, 53, 43, 0.38) 12px, rgba(184, 53, 43, 0.38) 13px, transparent 13px); }
.rc-ids { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed var(--form-rule); font-family: var(--typed); font-size: 12px; color: var(--ink-soft); }
.rc-ids b { color: var(--ink); font-weight: 700; }
.rc-namebox { position: relative; padding: 10px 0 9px; margin-bottom: 10px; border-bottom: 3px double var(--ink); }
.rc-name { font-family: var(--sign); font-weight: 800; font-size: 30px; line-height: 0.98; letter-spacing: 0.008em; padding-right: 96px; }
.rc-name.sig { font-size: 35px; }
.rc-namebox.stamped .rc-name { padding-right: 128px; }
body.rec-open #countdown { visibility: hidden; }
.rc-sigband { display: inline-block; margin-bottom: 5px; padding-bottom: 1px; border-bottom: 2px solid #c9952a; font-family: var(--signtext); font-weight: 800; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6410; }
.rc-official { font-size: 11.5px; font-style: italic; color: var(--ink-soft); margin-top: 3px; }
.rc-type { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-top: 5px; padding-right: 90px; }
.rc-rename { width: calc(100% - 92px); padding: 4px 8px; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; font-family: var(--sign); font-weight: 800; font-size: 24px; }
.rc-stamp { position: absolute; right: -2px; top: 12px; transform: rotate(-9deg); pointer-events: none; color: var(--stamp); border: 3px solid currentColor; border-radius: 5px; padding: 4px 9px 3px; box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3.5px currentColor; font-family: var(--stencil); font-weight: 800; font-size: 17px; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; opacity: 0.85; mix-blend-mode: multiply; -webkit-mask-image: radial-gradient(circle at 22% 30%, #000 55%, rgba(0,0,0,0.72) 100%); mask-image: radial-gradient(circle at 22% 30%, #000 55%, rgba(0,0,0,0.72) 100%); }
.rc-stamp.blue { color: var(--cobalt); } .rc-stamp.green { color: var(--green); } .rc-stamp.gold { color: #a8780f; } .rc-stamp.ink { color: #4b3f8f; } .rc-stamp.red { color: var(--stamp); }
.rc-fields { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--form-rule); border-left: 1px solid var(--form-rule); background: #f4f6f1; margin-bottom: 4px; }
.fld { border-right: 1px solid var(--form-rule); border-bottom: 1px solid var(--form-rule); padding: 4px 8px 5px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fld label { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.fld span { display: block; font-family: var(--typed); font-size: 13.5px; line-height: 1.28; color: var(--ink); overflow-wrap: anywhere; }
.rc-sec h4, .lm-fate h4 { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-family: var(--signtext); font-weight: 800; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cobalt); }
.rc-sec h4::after { content: ""; flex: 1; height: 1px; background: var(--form-rule); }
.rc-stats .rs { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, auto); align-items: center; gap: 10px; padding: 3px 0; border-bottom: 1px solid #e4e8e0; }
.rs-l { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.rs-v { font-family: var(--signtext); font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.meter { display: block; height: 7px; background: #e4e8e0; box-shadow: inset 0 0 0 1px var(--form-rule); border-radius: 1px; overflow: hidden; }
.meter i { display: block; height: 100%; }
.meter i.ok { background: var(--green); } .meter i.mid { background: #d39b2a; } .meter i.low { background: var(--stamp); } .meter i.n { background: var(--cobalt); }
.meter.none { background: none; box-shadow: none; }
.rc-util { margin-top: 8px; }
.rc-util .fld span { font-size: 12.5px; }
.rc-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.rc-alerts .chip { font-size: 12.5px; padding: 3px 7px 2px; }
.rc-alerts .chip:nth-child(odd) { transform: rotate(-1.2deg); } .rc-alerts .chip:nth-child(even) { transform: rotate(0.8deg); }
.chip.bad { color: var(--stamp); } .chip.good { color: var(--green); } .chip.info { color: var(--cobalt); } .chip.gold { color: #a8780f; }
.rc-facts { list-style: none; margin: 0; padding: 0; counter-reset: fact; }
.rc-facts li { counter-increment: fact; position: relative; padding: 6px 0 7px 26px; border-bottom: 1px dotted var(--form-rule); }
.rc-facts li::before { content: counter(fact); position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--stamp); color: var(--stamp); font-family: var(--signtext); font-weight: 800; font-size: 11.5px; line-height: 15px; text-align: center; }
.rc-facts li.real::before { border-color: var(--cobalt); color: var(--cobalt); }
.tag { display: inline-block; margin-right: 6px; padding: 1px 5px; border-radius: 2px; background: var(--cobalt); color: var(--enamel); font-family: var(--signtext); font-weight: 800; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 1px; }
.rc-style { margin: 9px 0 0; padding: 8px 10px; background: var(--form); border-left: 3px solid var(--green); font-size: 12.5px; line-height: 1.45; }
.rc-style .tag { background: var(--green); }
.rc-note { margin: 8px 0 0; font-size: 12px; font-style: italic; color: var(--ink-soft); }
.rc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 10px 0 2px; border-top: 1px solid var(--form-rule); }
.rc-check { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px 10px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; text-align: left; cursor: pointer; font: inherit; }
.rc-check:hover { background: rgba(29, 41, 36, 0.05); }
.rc-check .box { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--ink); border-radius: 2px; background: #fff; }
.rc-check .box svg.i { width: 18px; height: 18px; stroke-width: 2.6; transform: rotate(45deg); }
.rc-check.on { border-color: var(--cobalt); background: rgba(35, 75, 147, 0.06); }
.rc-check.on .box { border-color: var(--cobalt); color: var(--cobalt); }
.rc-check b { display: block; font-family: var(--signtext); font-weight: 800; font-size: 15.5px; line-height: 1.1; }
.rc-check small { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.rc-btns { display: flex; gap: 8px; justify-content: flex-end; }
.rc-btns .btn { padding: 6px 12px 7px; font-size: 15px; }
/* landmark record */
.lm-hook { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.38; }
.lm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 6px; }
.lm-stats div { padding: 7px 8px 6px; background: var(--form); border: 1px solid var(--form-rule); border-radius: 2px; }
.lm-stats b { display: block; font-family: var(--sign); font-weight: 800; font-size: 18px; line-height: 1.05; }
.lm-stats span { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.lm-story { margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.52; }
.lm-story::first-letter { float: left; padding: 5px 6px 0 0; font-family: var(--sign); font-weight: 900; font-size: 3em; line-height: 0.78; color: var(--cobalt); }
.lm-fate { margin: 14px 0 4px; padding: 2px 12px 10px; border: 2px solid currentColor; border-radius: 3px; color: var(--stamp); background: rgba(184, 53, 43, 0.05); }
.lm-fate.unbuilt { color: #4b3f8f; background: rgba(75, 63, 143, 0.05); }
.lm-fate h4 { color: inherit; margin: 8px 0 4px; }
.lm-fate p { margin: 0; color: var(--ink); font-size: 13.5px; }
.lm-src { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.lm-src a { color: var(--cobalt); }

/* ---------- Register of Landmarks: a card catalog ---------- */
.panel.register { width: min(1060px, 100%); height: min(86vh, 860px); }
.lm-tools { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--form-rule); }
.lm-tools input { flex: 1; min-width: 220px; padding: 8px 10px; background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px; font-family: var(--font); font-size: 14px; }
#lm-count { font-size: 12.5px; }
.lm-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 370px minmax(0, 1fr); }
.lm-list { overflow: auto; padding: 10px; border-right: 1px solid var(--form-rule); }
.lm-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; margin-bottom: 5px; padding: 8px 9px 7px; background: var(--card); color: var(--ink); border: 1px solid var(--form-rule); border-radius: 2px; box-shadow: inset 0 3px 0 -1px rgba(184, 53, 43, 0.5); text-align: left; cursor: pointer; font: inherit; }
.lm-row:hover { background: #fff; }
.lm-row.on { border-color: var(--cobalt); box-shadow: inset 4px 0 0 var(--cobalt), inset 0 3px 0 -1px rgba(184, 53, 43, 0.5); }
.lm-rn { font-family: var(--typed); font-size: 12px; color: var(--ink-soft); text-align: right; }
.lm-rm { min-width: 0; }
.lm-rm b { display: block; font-family: var(--sign); font-weight: 800; font-size: 17px; line-height: 1.05; }
.lm-rm small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-badge { padding: 1px 5px; border: 1.3px solid currentColor; border-radius: 2px; font-family: var(--signtext); font-weight: 800; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.lm-badge.standing { color: var(--green); } .lm-badge.lost { color: var(--stamp); } .lm-badge.unbuilt { color: #4b3f8f; }
.lm-detail { overflow: auto; background: var(--card); }
.lm-detail .rc-body { overflow: visible; padding: 14px 24px 22px 30px; font-size: 14px; }
.lm-detail .rc-name { font-size: 36px; }
.lm-back { display: none !important; margin: 10px 0 0 30px; }
.lm-empty { padding: 12px; }

/* ---------- scale the desk up on big monitors ---------- */
@media (min-width: 1700px) and (min-height: 940px) {
  #topbar, #toolcol, #flyout, #bottombar, #countdown, #advisor, #toast, #record { zoom: 1.2; }
  .modal > .panel, .modal > .paper { zoom: 1.15; }
}
@media (min-width: 2300px) and (min-height: 1280px) {
  #topbar, #toolcol, #flyout, #bottombar, #countdown, #advisor, #toast, #record { zoom: 1.6; }
  .modal > .panel, .modal > .paper { zoom: 1.5; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 1180px) {
  #topbar { right: 10px; }
  #countdown { top: 76px; width: 240px; }
  .pill.small .pv small { display: none; }
}
@media (max-width: 900px) {
  #topbar { height: auto; flex-wrap: wrap; }
  .pv small { display: none; }
  .tk-flag { display: none; }
  .nameplate { min-width: 0; }
}
@media (max-width: 720px) {
  #toolcol { width: 58px; top: 120px; }
  #flyout { left: 74px; top: 120px; width: 210px; }
  #bottombar { height: auto; flex-wrap: wrap; }
  #ticker { order: -1; flex-basis: 100%; }
  .bb-right { overflow-x: auto; max-width: 100%; }
  .masthead { font-size: 34px; }
  .paper-top { grid-template-columns: 1fr; }
  .ear { display: none; }
  .lead h1 { font-size: 24px; }
  .cols { column-count: 1; }
  #advisor { width: calc(100vw - 20px); }
  .record { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; max-height: 62vh; }
  .lm-split { grid-template-columns: 1fr; }
  .register.show-detail .lm-list, .register:not(.show-detail) .lm-detail { display: none; }
  .lm-back { display: inline-flex !important; }
  .lm-detail .rc-body { padding: 12px 16px 18px 22px; }
}

/* v17 fit: keep every stat and the dozer visible at 1280x720 */
@media (max-width: 1500px) { .pill { padding: 0 9px; gap: 7px; } .pill svg.i { width: 18px; height: 18px; } }
/* v39C: at 1280 to 1400 wide, 'Treasury in the red', 'Healthcare low' and 'Crime high' together pushed the Crime pill out of its box */
@media (max-width: 1400px) and (min-width: 1181px) { #topbar .stats .pill { padding: 0 7px; gap: 5px; } }
@media (max-height: 760px) { #toolcol .cat { padding: 5px 0 4px; gap: 2px; } #toolcol .cat svg.i { width: 21px; height: 21px; } }

/* ---------- Landmark Office: offer and fate memos, placement banner, register statuses ---------- */
.panel.memo.lmo { width: min(760px, 100%); }
.memo.lmo .panel-head h2 { font-size: 34px; text-transform: none; letter-spacing: 0.005em; }
.lmo-kicker { display: block; margin: -2px 0 2px; font-family: var(--signtext); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.lmo-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.lmo-thumb { width: 200px; height: 200px; object-fit: cover; border: 1px solid var(--form-rule); border-radius: 2px; background: #e9ece6; box-shadow: 0 2px 0 var(--form-rule); transform: rotate(-1deg); }
.lmo-main p { margin: 0 0 8px; }
.lmo-hook { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.35; }
.lmo-why, .lmo-history, .lmo-now { font-size: 13.5px; line-height: 1.45; }
.lmo-why b, .lmo-history b, .lmo-fact b { font-family: var(--signtext); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12.5px; color: var(--cobalt); }
.lmo-note { font-size: 12.5px; font-style: italic; color: var(--ink-soft); }
.lmo-price { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 8px; padding: 6px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--form-rule); font-size: 12.5px; color: var(--ink-soft); }
.lmo-price b { font-family: var(--sign); font-weight: 800; font-size: 18px; color: var(--ink); margin-left: 3px; }
.lmo-fx { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 5px; }
.lmo-fx div { padding: 5px 7px 4px; background: var(--card); border: 1px solid var(--form-rule); border-radius: 2px; }
.lmo-fx span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.lmo-fx b { display: block; font-family: var(--sign); font-weight: 800; font-size: 16px; line-height: 1.1; }
.lmo-extra { margin: 6px 0 0 !important; font-size: 12px; color: var(--green); font-weight: 600; }
.lmo-fact { margin-top: 10px !important; padding-top: 8px; border-top: 1px dashed var(--form-rule); font-size: 12.5px; line-height: 1.45; }
.lmo-card.fate .lmo-history { padding: 6px 9px; border-left: 3px solid var(--stamp); background: rgba(184, 53, 43, 0.05); }
.lmo-card.serious .lmo-thumb { filter: grayscale(0.85); transform: none; }
.lmo-card.serious .lmo-history { border-left-color: var(--ink); background: rgba(29, 41, 36, 0.05); }
.memo.lmo #ev-actions { flex-wrap: wrap; }
.memo.lmo #ev-actions .btn { font-size: 16px; }
#lm-place { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 12px; max-width: min(620px, calc(100vw - 24px)); padding: 8px 10px 8px 8px; background: var(--form); color: var(--ink); border: 1px solid var(--rim); border-top: 4px solid var(--green); border-radius: 3px; box-shadow: 0 3px 0 var(--rim), 0 10px 22px rgba(6, 12, 18, 0.35); }
#lm-place img { width: 52px; height: 52px; object-fit: cover; border: 1px solid var(--form-rule); border-radius: 2px; }
#lm-place b { display: block; font-family: var(--sign); font-weight: 800; font-size: 19px; line-height: 1.05; }
#lm-place span { display: block; font-size: 12px; color: var(--ink-soft); }
#lm-place small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--green); }
#lm-place small.bad { color: var(--stamp); }
#lm-place .btn { margin-left: auto; }
#btn-landmarks { position: relative; }
/* register statuses */
.lm-badge.st { font-size: 10px; }
.lm-badge.st-locked { color: #8a958f; border-style: dashed; }
.lm-badge.st-possible { color: var(--ink); }
.lm-badge.st-offered { color: #fff; background: var(--cobalt); border-color: var(--cobalt); }
.lm-badge.st-built { color: #fff; background: var(--green); border-color: var(--green); }
.lm-badge.st-saved { color: #4a3605; background: #f2c14e; border-color: #a8780f; }
.lm-badge.st-lost { color: var(--stamp); }
.lm-badge.st-crane { color: #7a3550; }
.lm-badge.st-declined { color: #8a958f; }
.lm-badge.st-memorial, .lm-badge.st-record { color: var(--ink); background: #e4e2da; }
.lm-row.st-locked .lm-rm b { color: var(--ink-soft); }
.lm-list-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; vertical-align: 1px; background: var(--green); }
.lm-list-dot.lost { background: var(--stamp); } .lm-list-dot.unbuilt { background: #4b3f8f; }
#lm-filter button.hot:not(.on) { border-color: var(--cobalt); color: var(--cobalt); box-shadow: inset 0 -3px 0 var(--cobalt); }
.lmo-status { margin: 4px 0 12px; padding: 8px 10px 9px; background: var(--form); border: 1px solid var(--form-rule); border-left: 4px solid #8a958f; border-radius: 2px; }
.lmo-status p { margin: 5px 0 0; font-size: 13px; line-height: 1.42; }
.lmo-status.st-offered { border-left-color: var(--cobalt); } .lmo-status.st-built { border-left-color: var(--green); } .lmo-status.st-saved { border-left-color: #f2c14e; }
.lmo-status.st-lost { border-left-color: var(--stamp); } .lmo-status.st-crane { border-left-color: #7a3550; } .lmo-status.st-memorial, .lmo-status.st-record { border-left-color: var(--ink); }
.lmo-reg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lmo-status::after { content: ''; display: block; clear: both; }
.lm-thumb { float: right; width: 112px; height: 112px; margin: -2px -4px 0 12px; object-fit: cover; border: 1px solid var(--form-rule); border-radius: 2px; box-shadow: 0 2px 0 var(--form-rule); }
@media (max-width: 720px) {
  .lmo-card { grid-template-columns: 1fr; }
  .lmo-thumb { width: 100%; height: 160px; transform: none; }
  .lm-thumb { width: 96px; height: 96px; }
}

/* ---------- Hire a Visionary: commission memo with three candidate cards ---------- */
.panel.memo.lmo.vis { width: min(980px, 100%); }
.vis-past { display: block; margin-top: 8px; font-size: 12.5px; font-style: italic; color: var(--ink-soft); }
.vis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
.vis-cand { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--form-rule); border-top: 5px solid var(--vis-b); border-radius: 2px; box-shadow: 0 2px 0 var(--form-rule); overflow: hidden; }
.vis-cand:nth-child(1) { transform: rotate(-0.6deg); } .vis-cand:nth-child(3) { transform: rotate(0.5deg); }
.vis-swatch { position: relative; height: 150px; background: var(--vis-a); overflow: hidden; border-bottom: 1px solid var(--form-rule); }
.vis-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vis-swatch i { position: absolute; bottom: 22%; width: 18%; background: var(--vis-d); border-radius: 40% 40% 0 0; }
.vis-swatch i:nth-child(1) { left: 12%; height: 46%; } .vis-swatch i:nth-child(2) { left: 40%; height: 64%; background: var(--vis-b); } .vis-swatch i:nth-child(3) { left: 68%; height: 38%; background: var(--vis-c); }
.vis-tag { position: absolute; left: 8px; top: 8px; padding: 3px 8px 2px; background: var(--vis-b); color: #fff; font-family: var(--signtext); font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px; box-shadow: 0 1px 0 rgba(0,0,0,0.25); }
.vis-body { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px 11px; flex: 1; }
.vis-name { font-family: var(--sign); font-weight: 900; font-size: 21px; line-height: 1.02; letter-spacing: 0.01em; color: var(--ink); }
.vis-who { font-family: var(--signtext); font-weight: 700; font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink-soft); }
.vis-pitch { margin: 2px 0 0; font-family: var(--serif); font-style: italic; font-size: 13.5px; line-height: 1.34; }
.vis-perk, .vis-drawback { margin: 0; font-size: 12.5px; line-height: 1.38; padding: 4px 7px; border-radius: 2px; }
.vis-perk { background: rgba(46, 125, 87, 0.09); border-left: 3px solid var(--green); }
.vis-drawback { background: rgba(184, 53, 43, 0.07); border-left: 3px solid var(--stamp); }
.vis-perk b, .vis-drawback b { font-family: var(--signtext); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11.5px; margin-right: 3px; }
.vis-perk b { color: var(--green); } .vis-drawback b { color: var(--stamp); }
.memo.vis .vis-hire { margin-top: auto; align-self: flex-start; background: transparent; color: var(--cobalt); border: 2.5px solid currentColor; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--card), inset 0 0 0 3.5px currentColor; font-family: var(--stencil); font-weight: 800; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; padding: 7px 12px 8px; }
.memo.vis .vis-hire:hover { background: color-mix(in srgb, currentColor 9%, transparent); }
.memo.vis .vis-hire:disabled { color: var(--ink-soft); opacity: 0.6; }
.memo.vis #ev-actions .btn { color: var(--ink); font-size: 15px; }
@media (max-width: 760px) { .vis-grid { grid-template-columns: 1fr; } .vis-swatch { height: 120px; } .vis-cand { transform: none !important; } }
/* v39C: the commission card fits a laptop window (800 to 940 pixels tall): smaller pictures and portraits, so the hire
   buttons and 'Decline all three' show without scrolling inside the card (selectors outrank the dressed cards' own) */
@media (max-height: 940px) and (min-width: 761px) {
  .modal > .panel.vis { max-height: calc(100dvh - 96px); }
  .modal .panel.vis .vis-swatch, .modal .panel.vis.early .vis-swatch, .modal .panel.vis.deco .vis-swatch, .modal .panel.vis.atomic .vis-swatch { height: 82px; padding-top: 5px; padding-bottom: 5px; }
  .modal .panel.vis .vis-past { margin-top: 4px; font-size: 12px; }
  .modal .panel.vis .pt-vis { width: 40px; height: 40px; margin: 1px 8px 2px 0; }
  .modal .panel.vis .vis-pitch { font-size: 12.5px; line-height: 1.26; }
  .modal .panel.vis .vis-body { gap: 3px; padding: 6px 10px 8px; }
  .modal .panel.vis .vis-perk, .modal .panel.vis .vis-drawback { font-size: 12px; line-height: 1.3; padding: 3px 6px; }
}

/* ---------- overhaul: close buttons, invention card, legend, tutorial arrow, stat tips ---------- */
#flyout .fly-x, .x-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--rim); background: var(--slate-lo); color: var(--enamel); cursor: pointer; z-index: 2; }
#flyout .fly-x:hover, .x-close:hover { background: #b8352b; color: #fff; }
#flyout .fly-x svg.i, .x-close svg.i { width: 16px; height: 16px; }
#flyout h4 { padding-right: 34px; }
#flyout .tool.locked-hidden { display: none !important; }
#flyout .tool.fresh { animation: freshpulse 1s ease-in-out 5; }
@keyframes freshpulse { 50% { box-shadow: 0 0 0 3px #f2c14e, 0 0 16px #f2c14e; } }

.panel.invention { position: relative; text-align: center; padding: 22px 24px 18px; border-top: 6px solid #f2c14e; max-width: 380px; }
.panel.invention .x-close { background: rgba(0,0,0,0.06); color: var(--ink); }
.inv-kicker { font-family: var(--sign); font-weight: 800; font-size: 15px; letter-spacing: 0.18em; text-transform: uppercase; color: #b8352b; }
.inv-art { position: relative; margin: 12px auto; width: 220px; height: 140px; border: 2px solid var(--rim); border-radius: 4px; background: repeating-linear-gradient(45deg, #efe6cf 0 10px, #e8dcc0 10px 20px); display: grid; place-items: center; overflow: hidden; }
.inv-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inv-art .inv-ico svg.i { width: 64px; height: 64px; color: #234b93; }
.panel.invention h2 { margin: 4px 0 2px; font-family: var(--sign); font-size: 30px; line-height: 1; }
.inv-year { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.panel.invention p { font-size: 15px; margin: 10px 0 14px; }
.panel.invention .actions { justify-content: center; }
.panel .panel-head { position: relative; }

#legend { position: fixed; right: 10px; top: 78px; z-index: 6; width: 250px; padding: 10px 12px; background: var(--slate); color: var(--enamel); border: 1px solid var(--rim); border-radius: 4px; box-shadow: inset 0 0 0 1px var(--keyline), 0 6px 16px rgba(0,0,0,.35); font-size: 12.5px; line-height: 1.35; }
#legend.compact { width: auto; max-width: 260px; padding: 0; background: none; border: 0; box-shadow: none; }
/* v29A: surface status chips (No water, No power): small enamel pills, right-aligned, stacking neatly */
#legend.compact ul { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#legend.compact li { gap: 6px; padding: 3px 9px 3px 5px; background: var(--slate); border: 1px solid var(--rim); border-radius: 13px; box-shadow: inset 0 0 0 1px var(--keyline), 0 3px 8px rgba(0,0,0,.3); font-size: 12px; line-height: 1.2; white-space: nowrap; }
#legend.compact li svg.i { width: 18px; height: 18px; }
#legend.compact li span small { opacity: 0.8; font-weight: 400; }
#legend h5 { margin: 0 0 6px; font-family: var(--sign); font-size: 17px; }
#legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#legend li { display: flex; gap: 8px; align-items: center; }
#legend .sw { flex: none; width: 22px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
#legend .sw.glow { height: 16px; } #legend .sw.dot { width: 14px; height: 14px; border-radius: 50%; margin: 0 4px; }
#legend svg.i { flex: none; width: 22px; height: 22px; }
#legend .fine { margin: 8px 0 0; opacity: 0.7; font-size: 11.5px; }

#tip.stat-tip { max-width: 290px; white-space: normal; line-height: 1.35; z-index: 30; }
.adv-step { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; margin-top: 2px; }
#advisor.intro .adv-text { font-size: 15px; line-height: 1.6; font-weight: 600; }
#tut-arrow { position: fixed; z-index: 40; width: 40px; height: 40px; pointer-events: none; color: #f2c14e; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); animation: tutnudge 0.9s ease-in-out infinite; }
#tut-arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
#tut-arrow.flip svg { transform: rotate(180deg); } #tut-arrow.down svg { transform: rotate(90deg); }
#tut-arrow.hidden { display: none; }
@keyframes tutnudge { 50% { translate: 6px 0; } }
#tut-arrow.flip { animation-name: tutnudgeL; } @keyframes tutnudgeL { 50% { translate: -6px 0; } }
#tut-arrow.down { animation-name: tutnudgeD; } @keyframes tutnudgeD { 50% { translate: 0 6px; } }
#btn-sound.muted .wv { opacity: 0; } #btn-sound.muted { opacity: 0.6; }

.advice3{margin:8px 0 0 18px;padding:0;list-style:disc}.advice3 li{margin:3px 0}

/* v39C: newspaper bylines */
.paper .byline { font-family: var(--serif); font-style: normal; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; margin: -2px 0 6px; opacity: 0.78; }
.lead p.byline { font-size: 11px; font-style: normal; margin: -8px 0 12px; }
/* v39C: with a card or panel open the toast drops to the bottom edge, over the (dimmed) bottom bar and clear of the
   panel (it used to sit across the panel's title; panels keep a 7vh margin, the newspaper now too) */
body:has(.modal:not(.hidden)) #toast { top: auto; bottom: 6px; z-index: 31; padding: 6px 16px 7px; }
.paper { max-height: 86vh; }
/* v39C phone width (390 x 844): the top bar wraps to three rows, so the tool column and its flyout start below it (the
   clock and speed buttons were hidden under them); the advisor card sits beside the tool column, not over it, and a long
   card scrolls instead of covering the map */
@media (max-width: 520px) {
  #toolcol, #flyout { top: 176px; }
  #toolcol { bottom: 150px; overflow-y: auto; }
  #advisor { left: 72px; right: 8px; width: auto; }
  #advisor #adv-text { max-height: 36vh; overflow-y: auto; }
}

/* v40B: between phone and laptop widths (721 to 1280 px) the bottom bar's right group (21 buttons, about 800 px) ran
   off the screen: at 800 and 1024 wide the Disasters, Advisors, Alerts, Music, Day and night, Quality, Sound and Save
   buttons could not be reached. The group now shrinks a little and scrolls sideways instead of overflowing. */
@media (max-width: 1280px) and (min-width: 721px) {
  .bb-right { flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; gap: 2px; padding: 0 4px; scrollbar-width: thin; }
  .bb-right .tb { flex: none; width: 34px; }
  .bb-right .bb-sep { flex: none; margin: 0 2px; }
}
/* v40B: from 521 to 720 px the full-width advisor card covered the tool column; it now starts beside it, as on phones */
@media (max-width: 720px) and (min-width: 521px) {
  #advisor { left: 76px; right: 8px; width: auto; }
  #advisor #adv-text { max-height: 40vh; overflow-y: auto; }
}
@media (max-width: 1200px) and (min-width: 721px) { #ticker { display: none; } }   /* v40B: no room left for it (it shrank to a 2 px sliver) */
/* v40B: while a landmark is being placed its banner sits where toasts appear; the toast moves below the banner */
body:has(#lm-place:not(.hidden)):not(:has(.modal:not(.hidden))) #toast { top: 152px; }
.ledger span[style*="grid-column"] { text-align: left; font-weight: 400; line-height: 1.45; padding-top: 4px; padding-bottom: 4px; }   /* v40B: full-width ledger notes read right-aligned, ragged */

/* Commission content scrolls inside the screen, including the raised seal. */
.modal > .panel.vis { max-height: calc(100dvh - 96px); }
.panel.vis .panel-head { flex-shrink: 0; }
.panel.vis .panel-body { min-height: 0; overscroll-behavior: contain; }

.city-settings{width:min(600px,90vw);max-height:85vh;overflow:auto;border:2px solid #bda967;border-radius:8px;background:#e8ece3;color:#233039;padding:20px;font:15px/1.5 'Public Sans',sans-serif;box-shadow:0 12px 50px #0009}
.city-settings::backdrop{background:#10232eb3}.city-settings header{display:flex;justify-content:space-between;align-items:center}.city-settings h2{margin:0;font:700 30px 'Big Shoulders Display',sans-serif}.city-settings fieldset{margin:16px 0;border:1px solid #9ca9a5;border-radius:4px}.city-settings legend{font-weight:700}.city-settings label{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:8px 0}.city-settings input[type=range]{flex:1;min-width:80px}.city-settings select{padding:6px}.city-settings output{width:42px;text-align:right}.city-settings summary{cursor:pointer;font-weight:700}.settings-keys{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.city-settings .binding{min-width:70px}.city-settings #settings-message{min-height:24px}.city-settings button:focus-visible,.city-settings input:focus-visible,.city-settings select:focus-visible{outline:3px solid #2c609e;outline-offset:2px}@media(max-width:600px){.settings-keys{grid-template-columns:1fr}}

.lm-reference { float:right; width:112px; margin:-2px -4px 6px 12px; }
.lm-reference .lm-thumb { float:none; display:block; width:100%; height:auto; margin:0; }
.lm-reference figcaption { font:10px/1.4 sans-serif; text-align:center; margin-top:4px; opacity:.75; }
@media(max-width:600px) { .lm-reference { width:96px; } }

/* Budget: the monthly answer first (finish pass 2026-11-10) */
.budget-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.budget-summary > div { background: rgba(31,43,58,.06); border: 1px solid rgba(31,43,58,.18); border-radius: 6px; padding: 8px 10px; }
.budget-summary small { display: block; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.budget-summary b { font-family: var(--signtext); font-size: 22px; font-variant-numeric: tabular-nums; }
.budget-summary .pos b { color: #1f6b3a; } .budget-summary .neg b { color: var(--stamp); }
.budget-summary p { grid-column: 1 / -1; margin: 0; font-size: 13.5px; line-height: 1.4; }
.budget-infra { margin-top: 18px; padding-top: 10px; border-top: 1px solid rgba(31,43,58,.2); }

.celebration-next { margin: 16px auto 0; max-width: 300px; display: grid; gap: 3px; text-align: center; font-size: 13.5px; }
.celebration-next small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.celebration-next b { font-family: var(--signtext); font-size: 18px; }
.celebration-next progress { width: 100%; height: 8px; accent-color: #c9951a; }
#tut-arrow.up svg { transform: rotate(-90deg); } #tut-arrow.up { animation-name: tutnudgeU; } @keyframes tutnudgeU { 50% { translate: 0 -6px; } }
#adv-actions { flex-wrap: wrap; } #adv-actions .adv-wide { flex: 1 0 100%; }

/* Milestone card must fit a 720px-tall window with its button in view (finish pass review) */
body #modal-event .panel.celebration { max-height: calc(100vh - 24px); overflow-y: auto; }
body .celebration .celebration-medal { font-size: 44px; line-height: 1.15; }
body .celebration .reward-chips { margin: 12px 0; }
.celebration-next { margin-top: 10px; }
