:root {
  --void: #0B0D0B;
  --panel: #121612;
  --raised: #1A211A;
  --line: #263026;
  --bone: #E5E4DA;
  --muted: #7E877B;
  --toxic: #86C232;
  --toxic-hi: #A8E063;
  --arterial: #E33B2E;
  --gore: #8E1F16;
  --amberish: #E8C15A;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --cond: "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed", Impact, sans-serif;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  background: var(--void); color: var(--bone);
  font-family: var(--sans); font-size: 13px; line-height: 1.5;
  margin: 0; padding: 0 0 40px; width: 100%;
}
button { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
#topbar { display: flex; align-items: center; gap: 22px; padding: 14px 22px 12px; border-bottom: 1px solid var(--line); position: relative; background: linear-gradient(180deg, #101410, var(--void)); flex-wrap: wrap; }
.wordmark { font-family: var(--cond); font-weight: bold; font-size: 27px; letter-spacing: .2em; line-height: 1; user-select: none; display: inline-block; color: inherit; text-decoration: none; }
.wordmark .bite { position: relative; display: inline-block; }
.wordmark .bite::after { content: ""; position: absolute; right: -3px; top: -6px; width: 14px; height: 14px; border-radius: 50%; background: #101410; box-shadow: 4px 8px 0 -5px #101410; }
.wordmark small { display: block; font-size: 8px; letter-spacing: .48em; color: var(--toxic); margin-top: 3px; }
.drips { position: absolute; left: 0; right: 0; bottom: -1px; display: flex; align-items: flex-start; pointer-events: none; }
.drips i { display: block; width: 3px; background: linear-gradient(180deg, var(--gore), rgba(142,31,22,0)); border-radius: 0 0 3px 3px; }

.clockbox { display: flex; flex-direction: column; gap: 2px; }
.clockbox .t { font-family: var(--mono); font-size: 14px; }
.clockbox .t b { color: var(--toxic-hi); }
.clockbox .d { font-size: 9px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; font-family: var(--cond); font-weight: bold; }
.clockbox .d.warn { color: var(--amberish); }

.ffrow { display: flex; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.ffbtn { background: var(--raised); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; text-align: center; color: var(--bone); }
.ffbtn .a { font-family: var(--cond); font-weight: bold; font-size: 12px; letter-spacing: .08em; display: block; }
.ffbtn .l { font-family: var(--mono); font-size: 8.5px; color: var(--muted); display: block; }
.ffbtn.night .l { color: var(--amberish); }
.ffbtn:hover { border-color: var(--toxic); box-shadow: 0 0 14px rgba(134,194,50,.18); }
.ffbtn:disabled { opacity: .4; }

.avstack { display: flex; align-items: center; padding-left: 6px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--raised); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--cond); font-weight: bold; font-size: 12px; margin-left: -8px; position: relative; cursor: pointer; color: var(--bone); }
.av.on { border-color: var(--toxic); box-shadow: 0 0 12px rgba(134,194,50,.35); z-index: 2; }
.av.zomb { color: var(--toxic-hi); }
.av .st { position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--void); }
.st.alive { background: var(--toxic); } .st.zomb { background: var(--amberish); } .st.dead { background: #666; }
.av.add { color: var(--muted); font-size: 16px; border-style: dashed; }

/* ---------- vitals hud ---------- */
#hud { display: flex; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(18,22,18,.6); flex-wrap: wrap; align-items: center; }
.meter { flex: 1; min-width: 170px; }
.meter .lbl { display: flex; justify-content: space-between; font-family: var(--cond); text-transform: uppercase; letter-spacing: .18em; font-size: 9.5px; color: var(--muted); font-weight: bold; margin-bottom: 4px; }
.meter .lbl b { font-family: var(--mono); font-size: 11.5px; color: var(--bone); letter-spacing: 0; }
.track { height: 8px; border-radius: 999px; background: #0F120F; border: 1px solid var(--line); overflow: hidden; }
.track .f { height: 100%; border-radius: 999px; transition: width .25s ease; }
.f.hp { background: linear-gradient(90deg, var(--gore), var(--arterial)); box-shadow: 0 0 12px rgba(227,59,46,.5); }
.f.ap { background: linear-gradient(90deg, #6E5A1E, var(--amberish)); box-shadow: 0 0 12px rgba(232,193,90,.35); }
.f.xp { background: linear-gradient(90deg, #4C7A1A, var(--toxic)); box-shadow: 0 0 12px rgba(134,194,50,.4); }
@media (prefers-reduced-motion: no-preference) {
  .f.hp.hurt { animation: pulse 1.35s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { filter: brightness(1);} 12% { filter: brightness(1.5);} 24% { filter: brightness(1);} }
}
.meter .sub { font-family: var(--mono); font-size: 8.5px; color: var(--muted); margin-top: 3px; }
.infpill { flex: none; display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 14px;
  background: rgba(134,194,50,.1); border: 1px solid var(--toxic); color: var(--toxic-hi);
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-weight: bold; font-size: 11px; }
.infpill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--toxic-hi); box-shadow: 0 0 10px var(--toxic-hi); }
@media (prefers-reduced-motion: no-preference) {
  .infpill { animation: infglow 2.2s ease-in-out infinite; }
  @keyframes infglow { 0%,100% { box-shadow: 0 0 0 rgba(134,194,50,0);} 50% { box-shadow: 0 0 20px rgba(134,194,50,.35);} }
}
.deadpill { flex: none; border-radius: 999px; padding: 7px 16px; background: rgba(227,59,46,.12); border: 1px solid var(--arterial);
  color: #FF7A6E; font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-weight: bold; font-size: 11px; }

/* ---------- layout ---------- */

.card { border-radius: 14px; border: 1px solid var(--line); background: var(--panel); padding: 13px 15px; }
.card .ch { font-family: var(--cond); text-transform: uppercase; letter-spacing: .2em; font-size: 10px; color: var(--muted); font-weight: bold; display: flex; justify-content: space-between; margin-bottom: 9px; }
.card .ch b { color: var(--toxic-hi); letter-spacing: .1em; }

.occs { display: flex; gap: 9px; flex-wrap: wrap; }
.occ { display: flex; align-items: center; gap: 9px; background: rgba(18,22,18,.82); border: 1px solid var(--line); border-radius: 12px; padding: 7px 11px; backdrop-filter: blur(4px); cursor: pointer; }
.occ .oav { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); display: flex; align-items: center; justify-content: center; font-family: var(--cond); font-weight: bold; font-size: 10.5px; border: 2px solid var(--line); flex: none; }
.occ.zomb .oav { border-color: var(--toxic); color: var(--toxic-hi); }
.occ .on { font-weight: 600; font-size: 12px; display: block; line-height: 1.2; }
.occ .ok { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.occ .ohp { width: 46px; height: 5px; border-radius: 999px; background: #0F120F; overflow: hidden; }
.occ .ohp i { display: block; height: 100%; background: var(--arterial); }
.occ.friendly .ohp i { background: var(--toxic); }
.occ.lock { border-color: var(--arterial); box-shadow: 0 0 16px rgba(227,59,46,.25); }
.occ .tag { font-family: var(--cond); font-size: 8.5px; letter-spacing: .14em; color: #FF7A6E; text-transform: uppercase; font-weight: bold; }
.occ.corpse { opacity: .45; }

.dead-overlay { text-align: center; padding: 20px 0 8px; }
.dead-overlay .big { font-family: var(--cond); text-transform: uppercase; font-size: 30px; letter-spacing: .2em; color: #FF7A6E; text-shadow: 0 0 30px rgba(227,59,46,.5); }
.dead-overlay .why { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 4px; }

/* ---------- action dock ---------- */
/* The actions rail reads as the day's work does, because they are the same
   question asked at two prices: a column of one-line rows, the icon at the size
   of a bullet rather than a picture. It was a wrapping grid of tall centred
   cards, which is a lot of furniture for "Search, 1 AP" — and it put the cheap
   verbs you use every turn in the biggest boxes on the screen. */
.dock { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.act { display: grid; grid-template-columns: 16px auto minmax(0, 1fr) auto; gap: 0 9px;
  align-items: baseline; width: 100%; text-align: left; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(20,25,20,.7);
  padding: 6px 9px; cursor: pointer; position: relative; color: var(--bone); }
.act .ic { font-size: 11px; line-height: 1; }
.act .v { font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em;
  font-weight: bold; font-size: 12px; white-space: nowrap; }
.act .meta { font-family: var(--mono); font-size: 9px; color: var(--muted);
  text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act .kbd { font-family: var(--mono); font-size: 8.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; justify-self: end; }
.act[disabled] { opacity: .42; cursor: default; }
.act:hover { border-color: var(--muted); }
.act.fire { border-color: rgba(227,59,46,.6); }
.act.fire .v { color: #FF7A6E; }
.act.fire:hover { box-shadow: 0 0 24px rgba(227,59,46,.28); border-color: var(--arterial); }
.act.heal { border-color: rgba(134,194,50,.55); }
.act.heal .v { color: var(--toxic-hi); }
.act.heal:hover { box-shadow: 0 0 24px rgba(134,194,50,.25); }
.act.time .v { color: var(--amberish); }
.act:disabled { opacity: .4; cursor: default; }
.act:disabled:hover { border-color: var(--line); box-shadow: none; }

/* ---------- combat card ---------- */
#combatcard .card-inner { border-radius: 14px; border: 1px solid rgba(227,59,46,.6); background: var(--panel); overflow: hidden; }
#combatcard .chead { display: flex; align-items: center; gap: 10px; padding: 10px 15px; border-bottom: 1px solid var(--line); }
#combatcard .chead .t { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: bold; color: #FF7A6E; }
#combatcard .chead .target { font-weight: 600; font-size: 13px; }
#combatcard .chead .thp { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
#combatcard .chead .unlock { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 10px; cursor: pointer; }
.wrow { display: flex; align-items: center; gap: 12px; padding: 8px 15px; border-bottom: 1px solid #1A211A; }
.wrow:last-child { border-bottom: none; }
.wrow .wname { font-weight: 600; width: 92px; font-size: 12.5px; }
.hitbar { flex: 1; max-width: 170px; height: 8px; border-radius: 999px; border: 1px solid var(--line); background: #0F120F; overflow: hidden; }
.hitbar i { display: block; height: 100%; background: var(--arterial); }
.wrow .pct, .wrow .dmg, .wrow .ammo { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.wrow .pct b { color: var(--bone); font-size: 11px; }
.wrow .nite { font-family: var(--cond); font-size: 8.5px; letter-spacing: .08em; color: var(--amberish); border: 1px solid rgba(232,193,90,.5); border-radius: 999px; padding: 1px 7px; text-transform: uppercase; font-weight: bold; }
.wrow .go { margin-left: auto; font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: bold; border: 1px solid var(--arterial); color: #FF7A6E; border-radius: 999px; padding: 5px 14px; cursor: pointer; background: var(--raised); }
.wrow .go.aid { border-color: rgba(134,194,50,.55); color: var(--toxic-hi); }
.wrow .go:disabled { opacity: .4; }
.wrow .go:hover { box-shadow: 0 0 12px rgba(227,59,46,.3); }
.wrow .go.aid:hover { box-shadow: 0 0 12px rgba(134,194,50,.3); }

/* ---------- dossier ---------- */
#dossier .dos-grid { display: flex; gap: 26px; flex-wrap: wrap; }
#dossier .dcol { flex: 1; min-width: 230px; }
#dossier .dsub { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-size: 9.5px; color: var(--muted); font-weight: bold; margin-bottom: 6px; }
.inv { list-style: none; margin: 0; padding: 0; }
.inv li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #1A211A; font-size: 12px; }
.inv li:last-child { border-bottom: none; }
.inv .qty { font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin-left: auto; }
.pillbtn { font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: bold;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; background: var(--raised); color: var(--bone); cursor: pointer; }
.pillbtn:hover { border-color: var(--muted); }
.pillbtn.go-style { border-color: rgba(134,194,50,.55); color: var(--toxic-hi); }
.pillbtn.go-style:hover { box-shadow: 0 0 10px rgba(134,194,50,.25); }
.pillbtn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.skillchips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.skillchips .known { font-size: 10.5px; border: 1px solid rgba(134,194,50,.4); color: var(--toxic-hi); border-radius: 999px; padding: 3px 10px; background: rgba(134,194,50,.07); }
.skillshop { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- sector map ---------- */
.smap { position: relative; border-radius: 12px; background: #0A0D0A; border: 1px solid #1A211A; padding: 7px; overflow: hidden; }
/* the map proper sits inside a ruler gutter, like a printed street plan */
.smap-wrap { display: grid; grid-template-columns: 15px minmax(0, 1fr); grid-template-rows: 12px minmax(0, 1fr); gap: 2px; }
.smap-rule { display: grid; font-family: var(--mono); font-size: 7.5px; color: #4E5A4A; letter-spacing: .04em; }
.smap-rule i { display: grid; place-items: center; font-style: normal; }
.smap-rule i.on { color: var(--arterial); }
.smap-rule.col { grid-column: 2; grid-row: 1; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; }
.smap-rule.row { grid-column: 1; grid-row: 2; grid-auto-rows: 1fr; justify-items: end; padding-right: 2px; }
.smap-field { position: relative; width: 100%; aspect-ratio: 1; grid-column: 2; grid-row: 2; }
.smap-field > div { position: absolute; inset: 0; }
/* the ground: painted in JS (see paintGround), not tiled from CSS */
.smap-tex { z-index: 0; display: block; width: 100%; height: 100%; border-radius: 6px; }
.smap-heat { z-index: 2; }
.smap-foot { z-index: 3; }
.smap-sign { z-index: 4; pointer-events: none; }
/* arterial names set along their own road */
.sign { position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--cond); text-transform: uppercase; font-size: 7.5px; letter-spacing: .16em;
  color: #77836C; text-shadow: 0 0 4px #10140F, 0 0 4px #10140F; }
.sign.v { transform: translate(-50%, -50%) rotate(-90deg); }
.smap-mk { z-index: 5; }
.smap-hit { z-index: 6; display: grid;
  grid-template-columns: repeat(var(--cells, 10), 1fr); grid-template-rows: repeat(var(--cells, 10), 1fr); }
/* north arrow, bottom-right like a survey map */
.smap-rose { z-index: 7; inset: auto 6px 6px auto !important; width: 17px; height: 17px; border-radius: 50%;
  border: 1px solid rgba(120,132,108,.4); background: rgba(16,20,15,.75);
  display: grid; place-items: center; font-family: var(--mono); font-size: 7.5px; color: #8A9680; }
.smap-rose::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 5px solid rgba(120,132,108,.75); }
.smap-hit i { display: block; }
.smap-hit i.adj { cursor: pointer; border-radius: 3px; }
.smap-hit i.adj:hover { box-shadow: inset 0 0 0 1.5px var(--toxic); background: rgba(134,194,50,.08); }

/* Building footprints. The roofs themselves are painted on the canvas, so these
   are transparent overlays: a name plate and whatever state the block is in. */
.foot { position: absolute; border-radius: 2px; display: flex; align-items: center; justify-content: center; }
.foot .fcode { font-family: var(--mono); font-size: 7px; color: rgba(190,200,175,.35); letter-spacing: .02em; }
/* name plates, set above the roof the way they are on a survey print */
.foot .fname { font-family: var(--cond); text-transform: uppercase; font-size: 7.5px; letter-spacing: .04em;
  line-height: 1.15; text-align: center; hyphens: none; color: #D3DCC6;
  background: rgba(10,13,9,.82); border: 1px solid rgba(150,164,134,.3); border-radius: 3px;
  padding: 2px 4px; max-width: 100%; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.foot.big .fname { font-size: 9px; letter-spacing: .06em; }
.foot.narrow .fname { font-size: 6.5px; letter-spacing: 0; padding: 1px 2px; }
/* type accents live on the plate's left edge — quiet, but they sort at a glance */
.foot.t-police .fname { border-left: 2px solid rgba(120,150,200,.75); }
.foot.t-hospital .fname { border-left: 2px solid rgba(220,90,80,.8); }
.foot.t-vitalis .fname { border-left: 2px solid rgba(134,194,50,.8); }
.foot.t-mall .fname { border-left: 2px solid rgba(232,193,90,.8); }
.foot.t-pharmacy .fname { border-left: 2px solid rgba(120,200,170,.75); }
/* Power, ransacking, a forced door and the reticle are drawn on the canvas now
   (see paintGround), because they have to follow the building's real shape —
   a footprint <div> is a bounding box, and a third of Fenwick's buildings are
   not rectangles. The div is left as a name-plate anchor. */
.heat { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(3px); transform: translate(-50%, -50%); opacity: .8; }
.heat.z { background: radial-gradient(circle, rgba(134,194,50,.5), rgba(134,194,50,.15) 55%, transparent 72%); }
.heat.z2 { background: radial-gradient(circle, rgba(134,194,50,.7), rgba(134,194,50,.22) 55%, transparent 72%); }
.mk { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.mk.you { width: 13px; height: 13px; background: var(--bone); border: 2px solid var(--arterial); box-shadow: 0 0 10px rgba(227,59,46,.7); }
@media (prefers-reduced-motion: no-preference) {
  .mk.you { animation: youpulse 1.8s ease-in-out infinite; }
  @keyframes youpulse { 0%,100% { box-shadow: 0 0 6px rgba(227,59,46,.5);} 50% { box-shadow: 0 0 16px rgba(227,59,46,.95);} }
}
.mk.cr { width: 8px; height: 8px; background: var(--bone); box-shadow: 0 0 6px rgba(229,228,218,.7); border-radius: 2px; }
.mk.hunger { width: 6px; height: 6px; background: rgba(227,59,46,.22); box-shadow: 0 0 6px 2px rgba(227,59,46,.18); }
@media (prefers-reduced-motion: no-preference) { .mk.hunger { animation: scentpulse 2.6s ease-in-out infinite; } }
.mk.scent { width: 9px; height: 9px; background: rgba(227,59,46,.55); box-shadow: 0 0 8px 2px rgba(227,59,46,.5); }
.mk.scent.strong { background: var(--arterial); box-shadow: 0 0 12px 3px rgba(227,59,46,.75); }
@media (prefers-reduced-motion: no-preference) { .mk.scent { animation: scentpulse 1.6s ease-in-out infinite; } }
@keyframes scentpulse { 0%,100% { opacity: .55; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.25); } }
.smap-cap { display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 8.5px; color: var(--muted); margin-top: 8px; align-items: center; }
.smap-cap i { display: inline-block; vertical-align: -1px; margin-right: 4px; }
.smap-cap .gl { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, rgba(134,194,50,.7), transparent 75%); }
.smap-cap .pwk { width: 7px; height: 7px; border-radius: 50%; background: var(--amberish); }
.smap-cap .yo { width: 9px; height: 9px; border-radius: 50%; background: var(--bone); border: 2px solid var(--arterial); }

/* ---------- routes ---------- */
.routes { margin: 0; padding: 0; }
.routes li { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #1A211A; }
.routes li:last-child { border-bottom: none; }
.routes .rn { font-weight: 600; font-size: 12px; display: block; line-height: 1.25; }
.routes .rm { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.routes .risk { flex: none; font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: 8.5px; font-weight: bold; border-radius: 999px; padding: 3px 9px; border: 1px solid; }
.risk.lo { color: var(--toxic-hi); border-color: rgba(134,194,50,.5); }
.risk.md { color: var(--amberish); border-color: rgba(232,193,90,.5); }
.risk.hi { color: #FF7A6E; border-color: var(--arterial); }
.routes .go { margin-left: auto; flex: none; }
.routes .go small { display: block; font-family: var(--mono); font-size: 7.5px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.routes-note { font-family: var(--mono); font-size: 8.5px; color: var(--muted); margin-top: 8px; }

/* ---------- digest / feed / log ---------- */
.digest { margin: 0; padding: 0; }
.digest li { list-style: none; display: flex; gap: 9px; padding: 6px 0; border-bottom: 1px solid #1A211A; font-size: 11.5px; align-items: baseline; }
.digest li:last-child { border-bottom: none; }
.digest .neg { color: #FF7A6E; font-family: var(--mono); font-size: 10.5px; margin-left: auto; }
.digest .net { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.feed { margin: 0; padding: 0; max-height: 190px; overflow-y: auto; }
.feed li { list-style: none; display: flex; gap: 9px; padding: 6px 0; border-bottom: 1px solid #1A211A; font-size: 11px; }
.feed li:last-child { border-bottom: none; }
.feed .fdot { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; }
.fdot.k { background: var(--arterial); box-shadow: 0 0 7px rgba(227,59,46,.6); }
.fdot.e { background: var(--amberish); }
.fdot.g { background: var(--toxic); }
.feed time { font-family: var(--mono); font-size: 8.5px; color: var(--muted); flex: none; padding-top: 2px; }

/* ---------- new character ---------- */
/* The moment you become somebody. One centered sheet, read top to bottom:
   who you are on the left, what is true about you on the right, one door out
   at the bottom. Every trait's consequence is printed on it — the price of a
   choice belongs on the button, not in a tooltip nobody hovers. */
#newchar { margin: 22px auto; max-width: 940px; padding: 18px 22px 16px; }
.nc-body { display: grid; grid-template-columns: 250px 1fr; gap: 8px 26px; align-items: start; }
.nc-lbl { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  text-transform: uppercase; color: #6E7A68; margin: 0 0 6px 2px; }
#newchar input { background: var(--raised); border: 1px solid var(--line); color: var(--bone);
  border-radius: 10px; padding: 10px 13px; font-size: 13.5px; outline: none;
  width: 100%; box-sizing: border-box; margin-bottom: 16px; }
#newchar input:focus { border-color: var(--toxic); }
.classpick { display: flex; flex-direction: column; gap: 6px; }
.clc { text-align: left; background: rgba(20,25,20,.7); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; cursor: pointer; color: inherit; display: block; }
.clc b { display: block; font-family: var(--cond); font-size: 13.5px; letter-spacing: .07em; text-transform: uppercase; }
.clc em { display: block; font-size: 10px; color: var(--bone); opacity: .75; margin-top: 3px; line-height: 1.4; }
.clc span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.clc i { display: block; font-style: normal; font-family: var(--mono); font-size: 9px;
  color: var(--toxic-hi); margin-top: 3px; letter-spacing: .06em; }
.clc:hover { border-color: var(--toxic); }
.clc.on { border-color: var(--toxic); background: rgba(134,194,50,.10); }
.tp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.tr2 { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto;
  column-gap: 9px; text-align: left; background: rgba(20,25,20,.7); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 10px 7px; cursor: pointer; color: inherit; width: 100%;
  box-sizing: border-box; margin-bottom: 5px; }
.tr2 b { grid-row: 1 / 3; align-self: center; text-align: center; font-family: var(--mono);
  font-size: 11px; color: var(--muted); font-weight: normal;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 0; }
.tr2-t { font-family: var(--cond); font-size: 12.5px; letter-spacing: .06em; }
.tr2-d { font-size: 10px; color: var(--muted); line-height: 1.35; }
.tr2:hover:not([disabled]) { border-color: var(--toxic); }
.tr2.on { border-color: var(--toxic); background: rgba(134,194,50,.12); }
.tr2.on .tr2-t, .tr2.on b { color: var(--toxic-hi); }
.tr2.on b { border-color: var(--toxic); }
.tr2.off { opacity: .38; cursor: default; }
.nc-dead { font-family: var(--mono); font-size: 9px; color: #6E7A68; letter-spacing: .04em;
  line-height: 1.5; margin: 4px 2px 0; }
.nc-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  margin-top: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.nc-foot .lobby-err { margin-right: auto; }
@media (max-width: 880px) { .nc-body, .tp-cols { grid-template-columns: 1fr; } }

/* mobile */
@media (max-width: 640px) {
  #topbar { gap: 10px; }
  .ffrow { margin-left: 0; order: 4; width: 100%; }
  .dock { position: sticky; bottom: 8px; z-index: 20; background: linear-gradient(180deg, rgba(11,13,11,0), var(--void) 35%); padding-top: 8px; }
  .act { min-width: 96px; }
}

/* ---------- onboarding quest — a banner strip, not a rail card ---------- */
.quest-strip { padding: 7px 22px; border-bottom: 1px solid var(--line); background: rgba(232,193,90,.05);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.quest-strip .ev-tag { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em;
  font-weight: bold; color: var(--amberish); }
.quest-strip .qpill { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
  font-size: 11px; color: var(--muted); white-space: nowrap; }
.quest-strip .qpill.cur { border-color: rgba(232,193,90,.55); color: var(--bone); }
.quest-strip .qpill.done { text-decoration: line-through; opacity: .55; }
.quest-strip .qpill i { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--toxic-hi); }
.quest-strip .qhint { color: var(--muted); font-size: 11.5px; }

/* ---------- casualty report ---------- */
#deathoverlay { position: fixed; inset: 0; background: rgba(7,9,7,.9); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.casualty { width: min(460px, 94vw); background: var(--panel); border: 1px solid var(--arterial); border-radius: 14px; padding: 24px 28px 20px; position: relative; box-shadow: 0 0 60px rgba(227,59,46,.15); }
.cr-head { font-family: var(--cond); text-transform: uppercase; letter-spacing: .22em; font-size: 11px; font-weight: bold; color: #FF7A6E; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.cr-name { font-family: var(--cond); font-size: 22px; font-weight: bold; letter-spacing: .04em; margin-top: 12px; }
.cr-name span { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.cr-days { margin: 14px 0 12px; font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--muted); }
.cr-days b { font-size: 42px; color: var(--bone); letter-spacing: .02em; margin-right: 8px; vertical-align: -4px; }
.cr-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #1A211A; font-size: 12px; }
.cr-lines span { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.cr-lines b { text-align: right; }
.cr-stamp { position: absolute; top: 54px; right: 26px; font-family: var(--cond); text-transform: uppercase; font-weight: bold; letter-spacing: .14em; font-size: 15px; color: #FF7A6E; border: 3px double var(--arterial); border-radius: 4px; padding: 3px 12px; transform: rotate(-9deg); opacity: .85; }
.cr-tag { font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin: 12px 0 14px; font-style: italic; }
.cr-revive { font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: var(--muted); border-left: 2px solid var(--arterial); padding: 6px 0 6px 10px; margin: 0 0 14px; text-align: left; }
.cr-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-btns .pillbtn { padding: 7px 14px; font-size: 11px; }
.cr-rise { border-color: rgba(232,193,90,.5); color: var(--amberish); }

/* ---------- link button ---------- */
.linkbtn { background: none; border: none; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--toxic-hi); }

/* ---------- intro dispatch ---------- */
#intro { position: fixed; inset: 0; z-index: 200; overflow: hidden; display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 60% 40% at 78% 16%, rgba(120,30,18,.28), transparent 60%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(90,26,14,.3), transparent 62%),
    linear-gradient(180deg, #0A0705 0%, #0B0A08 42%, #08110B 100%); }
.intro-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; isolation: isolate; }
/* real background photo (public/img/intro-bg.*) — covers the procedural scene when present */
.intro-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; z-index: 3; }
.intro-photo-veil { position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,6,.28) 0%, rgba(5,7,6,.08) 26%, rgba(5,7,6,.14) 55%, rgba(5,7,6,.8) 100%); }

/* skyline + foreground fence, dark silhouettes */
.skyline { position: absolute; bottom: 8%; width: 100%; height: 34%; }
.skyline path, .skyline rect { fill: #06090A; }
.skyline .lit rect { fill: rgba(240,170,90,.75); filter: drop-shadow(0 0 2px rgba(235,130,50,.9)); }
@media (prefers-reduced-motion: no-preference) { .skyline .lit rect { animation: winflick 5s steps(1) infinite; } }
@keyframes winflick { 0%,90%,100% { opacity: 1; } 92% { opacity: .2; } 95% { opacity: 1; } }
.fence { position: absolute; bottom: 0; width: 100%; height: 16%; opacity: 1; z-index: 2; filter: drop-shadow(0 0 1px rgba(180,200,170,.12)); }

/* blood moon */
.bloodmoon { position: absolute; top: 9%; right: 15%; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #D07A54, #9A3322 55%, #5E1912 100%);
  box-shadow: 0 0 90px 26px rgba(170,44,26,.26), 0 0 34px 8px rgba(200,80,40,.4); }

/* Cordon searchlight sweep */
.searchlight { position: absolute; left: 70%; bottom: 34%; width: 340px; height: 340px; transform-origin: 0% 100%;
  background: conic-gradient(from 205deg at 0% 100%, transparent 0deg, rgba(232,222,180,.09) 5deg, rgba(232,222,180,.02) 12deg, transparent 16deg); }
@media (prefers-reduced-motion: no-preference) { .searchlight { animation: sweep 11s ease-in-out infinite alternate; } }
@keyframes sweep { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }

/* smoke plumes rising off the town */
.smoke span { position: absolute; bottom: 26%; width: 74px; height: 240px; transform: translateX(-50%);
  background: linear-gradient(0deg, rgba(60,30,18,.28), rgba(26,28,24,.42) 30%, transparent); filter: blur(15px); opacity: .55; }
@media (prefers-reduced-motion: no-preference) { .smoke span { animation: plume 13s ease-in-out infinite; } .smoke span:nth-child(2) { animation-delay: 4s; } .smoke span:nth-child(3) { animation-delay: 8s; } }
@keyframes plume { 0%,100% { transform: translateX(-50%) skewX(0deg); opacity: .4; } 50% { transform: translateX(-46%) skewX(-5deg); opacity: .6; } }

/* red beacon on the tallest tower */
.beacon { position: absolute; right: 26.5%; top: 22%; width: 5px; height: 5px; border-radius: 50%; background: #FF4030; box-shadow: 0 0 10px 2px rgba(255,50,40,.8); }
@media (prefers-reduced-motion: no-preference) { .beacon { animation: blink 2.4s steps(1) infinite; } }
@keyframes blink { 0%,45% { opacity: 1; } 50%,100% { opacity: .12; } }

/* shambling silhouettes on the horizon */
.walkers span { position: absolute; bottom: 15%; width: 7px; height: 17px; background: #05080A; border-radius: 4px 4px 1px 1px; transform-origin: bottom center; }
.walkers span::before { content: ""; position: absolute; top: -6px; left: 1px; width: 5px; height: 5px; border-radius: 50%; background: #05080A; }
@media (prefers-reduced-motion: no-preference) { .walkers span.sway { animation: shamble 4.5s ease-in-out infinite; } .walkers span:nth-child(3) { animation: shamble 5.6s ease-in-out infinite; } }
@keyframes shamble { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* drifting embers */
.embers span { position: absolute; bottom: 16%; width: 2px; height: 2px; border-radius: 50%; background: #E8933D; box-shadow: 0 0 6px 1px rgba(232,110,40,.85); opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .embers span { animation: ember linear infinite; } }
@media (prefers-reduced-motion: reduce) { .embers { display: none; } }
@keyframes ember { 0% { opacity: 0; transform: translate(0,0); } 12% { opacity: .9; } 100% { opacity: 0; transform: translate(14px,-190px); } }

/* fog banks + vignette */
.intro-fog { position: absolute; left: -10%; right: -10%; bottom: 0; height: 40%; filter: blur(3px); }
.intro-fog.f1 { background: linear-gradient(180deg, transparent, rgba(70,86,60,.06) 40%, rgba(8,10,8,.75)); }
.intro-fog.f2 { height: 26%; background: linear-gradient(180deg, transparent, rgba(120,140,110,.05), transparent); }
@media (prefers-reduced-motion: no-preference) { .intro-fog.f2 { animation: drift 22s ease-in-out infinite alternate; } }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.intro-vignette { position: absolute; inset: 0; z-index: 5; background: radial-gradient(ellipse 70% 62% at 50% 38%, transparent 46%, rgba(0,0,0,.6) 100%); }

.intro-stage { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px; gap: 6px;
  opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.intro-stage.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .intro-stage { transition: none; opacity: 1; transform: none; } }
.intro-kicker { font-family: var(--cond); text-transform: uppercase; letter-spacing: .28em; font-size: 11px; font-weight: bold; color: var(--toxic); }
.intro-feature { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin: 4px 0; }
.intro-title { font-family: var(--cond); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(34px, 6vw, 56px); font-weight: bold; margin: 0; line-height: .98; text-shadow: 0 3px 34px rgba(0,0,0,.8); }
.intro-body { font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.75; color: #C9CCBE; max-width: 46ch; margin: 8px 0 0; }

.intro-controls { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 18px 26px 22px; gap: 16px; }
.intro-left { display: flex; align-items: center; gap: 18px; }
.intro-dots { display: flex; gap: 8px; }
.idot { width: 8px; height: 8px; border-radius: 50%; background: #2A342A; cursor: pointer; transition: background .2s, transform .2s; }
.idot:hover { background: #3E4A3A; }
.idot.on { background: var(--toxic); transform: scale(1.15); box-shadow: 0 0 8px rgba(134,194,50,.5); }
.intro-controls .intro-next { padding: 9px 20px; font-size: 12px; }

/* feature: vitalis mark */
.ib-svg { width: 118px; height: 118px; }
.ib-svg .hex { fill: rgba(134,194,50,.05); stroke: rgba(134,194,50,.55); stroke-width: 1.5; }
.ib-svg .mol line { stroke: rgba(134,194,50,.6); stroke-width: 1.5; }
.ib-svg .mol circle { fill: #0A0C0A; stroke: var(--toxic-hi); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) { .ib-svg .mol circle { animation: molpulse 2.4s ease-in-out infinite; } .ib-svg .hex { animation: molpulse 2.4s ease-in-out infinite; } }
@keyframes molpulse { 0%,100% { filter: drop-shadow(0 0 2px rgba(134,194,50,.3)); } 50% { filter: drop-shadow(0 0 9px rgba(134,194,50,.7)); } }
.ib-slogan { font-family: var(--cond); text-transform: uppercase; letter-spacing: .22em; font-size: 13px; color: var(--toxic-hi); }

/* feature: ecg */
.ib-ecg { width: min(340px, 76vw); height: 74px; }
.ib-ecg polyline { fill: none; stroke: var(--arterial); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(227,59,46,.7)); }
@media (prefers-reduced-motion: no-preference) { .ib-ecg polyline { stroke-dasharray: 620; stroke-dashoffset: 620; animation: ecgdraw 2.6s ease-out forwards; } }
@keyframes ecgdraw { to { stroke-dashoffset: 0; } }
.ib-flat { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: #FF7A6E; }

/* feature: cordon rings */
.ib-cordon { position: relative; width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; }
.ib-cordon .ring { position: absolute; inset: 0; border: 1px dashed rgba(227,59,46,.5); border-radius: 50%; }
.ib-cordon .r2 { inset: 22px; opacity: .7; } .ib-cordon .r3 { inset: 44px; opacity: .5; }
@media (prefers-reduced-motion: no-preference) { .ib-cordon .ring { animation: ringpulse 3s ease-in-out infinite; } .ib-cordon .r2 { animation-delay: .4s; } .ib-cordon .r3 { animation-delay: .8s; } }
@keyframes ringpulse { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.05); opacity: .85; } }
.ib-cordon .district { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: bold; color: var(--bone); z-index: 1; }
.ib-cordon .chk { position: absolute; width: 8px; height: 8px; background: var(--arterial); border-radius: 50%; box-shadow: 0 0 8px rgba(227,59,46,.7); }
.ib-cordon .c1 { top: -3px; left: 50%; } .ib-cordon .c2 { bottom: -3px; left: 50%; } .ib-cordon .c3 { left: -3px; top: 50%; } .ib-cordon .c4 { right: -3px; top: 50%; }

/* feature: status readout */
.ib-status { display: flex; gap: 26px; }
.isr { display: flex; flex-direction: column; align-items: center; }
.isr b { font-family: var(--cond); font-size: 44px; font-weight: bold; color: var(--toxic-hi); line-height: 1; }
.isr.grim b { color: #FF7A6E; }
.isr span { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

@media (max-width: 560px) {
  .intro-body { font-size: 15px; }
  .ib-status { gap: 16px; } .isr b { font-size: 34px; }
  .intro-controls { padding: 14px 16px 18px; }
}

/* ---------- the season ---------- */
#seasonbar { display: flex; align-items: center; gap: 10px; padding: 7px 22px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); background: rgba(255,255,255,.015); }
#seasonbar .se-tag { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-weight: bold; color: var(--bone); white-space: nowrap; }
#seasonbar .se-bar { flex: 1; height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; min-width: 60px; }
#seasonbar .se-bar i { display: block; height: 100%; background: var(--muted); }
#seasonbar b { color: var(--bone); }
#seasonbar.second .se-tag, #seasonbar.second .se-bar i { color: var(--amberish); background: var(--amberish); }
#seasonbar.second .se-tag { background: none; }
#seasonbar.third .se-tag, #seasonbar.breach .se-tag, #seasonbar.lastnight .se-tag { color: #FF7A6E; }
#seasonbar.third .se-bar i, #seasonbar.breach .se-bar i, #seasonbar.lastnight .se-bar i { background: var(--arterial); }
#seasonbar.lastnight { background: linear-gradient(90deg, rgba(227,59,46,.16), rgba(227,59,46,.03)); }
#seasonbar.won { background: linear-gradient(90deg, rgba(124,214,124,.16), transparent); }
#seasonbar.won .se-tag, #seasonbar.won b { color: var(--toxic-hi, #7CD67C); }
#seasonbar.lost { background: linear-gradient(90deg, rgba(227,59,46,.2), transparent); }
#seasonbar.lost .se-tag, #seasonbar.lost b { color: #FF7A6E; }

/* ---------- tasking + safehouse ---------- */
#bountybanner { padding: 8px 22px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--bone);
  background: linear-gradient(90deg, rgba(120,180,255,.12), transparent); }
#bountybanner .ev-tag.bo { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-weight: bold; color: #86B7FF; margin-right: 6px; }
#bountybanner b { color: #86B7FF; }
.mk.home { font-size: 12px; line-height: 1; background: none; width: auto; height: auto; text-shadow: 0 0 8px rgba(255,255,255,.7); }
.mk.task { font-size: 13px; line-height: 1; background: none; width: auto; height: auto; color: #86B7FF; text-shadow: 0 0 8px rgba(134,183,255,.9); }
#stashcard .stash-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 2px; }
#stashcard .stash-empty { font-size: 11.5px; color: var(--muted); font-style: italic; }
#stashcard .stash-put { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
#stashcard .stash-put select { flex: 1; }
.lcheck { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 11px; color: var(--muted); cursor: pointer; }
.lcheck input { accent-color: var(--arterial); }
.casualty.chron { max-width: 620px; }
.chron-body { max-height: 52vh; overflow-y: auto; text-align: left; margin: 10px 0 4px; padding-right: 6px; }
.chron-day { margin-bottom: 12px; }
.chron-day .cd { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-size: 10px; color: var(--muted); }
.chron-line { display: flex; gap: 8px; font-size: 12px; line-height: 1.5; padding: 2px 0; color: var(--bone); }
.chron-line i { flex: 0 0 14px; font-style: normal; color: var(--muted); text-align: center; }

/* ---------- evacuation ---------- */
#evacbanner { padding: 9px 22px; border-bottom: 1px solid var(--line); font-size: 12.5px; letter-spacing: .02em;
  background: linear-gradient(90deg, rgba(232,193,90,.14), rgba(232,193,90,.04)); color: var(--bone); }
#evacbanner .ev-tag { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-weight: bold; color: var(--amberish); margin-right: 6px; }
#evacbanner b { color: var(--amberish); }
@media (prefers-reduced-motion: no-preference) { #evacbanner { animation: evacpulse 2.4s ease-in-out infinite; } }
@keyframes evacpulse { 0%,100% { background-position: 0; box-shadow: inset 0 0 0 rgba(232,193,90,0); } 50% { box-shadow: inset 0 0 30px rgba(232,193,90,.12); } }
.mk.evac { font-size: 13px; line-height: 1; color: var(--amberish); text-shadow: 0 0 8px rgba(232,193,90,.9); background: none; width: auto; height: auto; }
@media (prefers-reduced-motion: no-preference) { .mk.evac { animation: evacmk 1.4s ease-in-out infinite; } }
@keyframes evacmk { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.3); } }
.routes li.route-evac .rn { color: var(--amberish); }
.routes li.route-evac { border-bottom-color: rgba(232,193,90,.3); }

.casualty.win { border-color: var(--toxic); box-shadow: 0 0 60px rgba(134,194,50,.18); }
.casualty.win .cr-head { color: var(--toxic-hi); }
.casualty.win .cr-days b, .casualty.win .cr-stamp { color: var(--toxic-hi); border-color: var(--toxic); }
.casualty.win .cr-stamp { border-color: var(--toxic); }
.casualty.writeoff { border-color: var(--gore); }
.casualty.writeoff .cr-head, .casualty.writeoff .cr-days b, .casualty.writeoff .cr-stamp { color: #FF7A6E; }

/* ---------- district overview (2x2) ---------- */
.dq-head { font-family: var(--cond); text-transform: uppercase; letter-spacing: .18em; font-size: 9px; color: var(--muted); font-weight: bold; margin: 12px 0 6px; }
#districts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dq { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #0E120E; cursor: default; }
.dq-name { display: block; font-family: var(--cond); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; font-weight: bold; color: var(--bone); line-height: 1.15; }
.dq-pop { display: block; font-family: var(--mono); font-size: 8px; color: var(--muted); margin-top: 2px; }
.dq-pop b { color: var(--toxic-hi); } .dq-pop i { color: #FF7A6E; font-style: normal; }
.dq-state { display: block; font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: 8px; font-weight: bold; margin-top: 3px; }
.dq.holding { border-color: rgba(134,194,50,.35); } .dq.holding .dq-state { color: var(--toxic-hi); }
.dq.contested .dq-state { color: var(--amberish); } .dq.contested { border-color: rgba(232,193,90,.35); }
.dq.failing .dq-state { color: #FF7A6E; } .dq.failing { border-color: rgba(227,59,46,.45); }
.dq.lost { border-color: var(--gore); background: rgba(142,31,22,.12); } .dq.lost .dq-state { color: var(--gore); }
.dq.here { box-shadow: inset 0 0 0 1px var(--bone); }
.dq.here .dq-name::after { content: " ▸ you"; color: var(--arterial); font-size: 8px; }
.clockbox .qname { color: var(--amberish); letter-spacing: .06em; }
.dq.silent { border-color: #2A342A; opacity: .6; } .dq.silent .dq-state { color: var(--muted); }

/* ---------- records ---------- */
.rec { padding: 6px 0; border-bottom: 1px solid #1A211A; cursor: pointer; }
.rec:last-of-type { border-bottom: none; }
.rec-title { font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: bold; color: var(--bone); }
.rec.open .rec-title { color: var(--amberish); }
.rec-text { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 12px; color: #C9CCBE; padding: 5px 2px 3px 12px; border-left: 2px solid rgba(232,193,90,.4); margin-top: 4px; line-height: 1.55; }

/* ---------- legacy + memorial (join card) ---------- */
#legacyline { margin-top: 10px; font-size: 12px; color: var(--bone); border: 1px solid rgba(232,193,90,.4); border-radius: 8px; padding: 8px 12px; background: rgba(232,193,90,.07); }
#legacyline b { color: var(--amberish); }
#memorial { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.mem-head { font-family: var(--cond); text-transform: uppercase; letter-spacing: .18em; font-size: 9px; color: var(--muted); font-weight: bold; }
.mem-row { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }

/* ---------- lobby ---------- */
#lobby { padding: 40px 10px 60px; }
.lobby-inner { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.lobby-h { font-family: var(--cond); text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(28px, 5vw, 44px); margin: 0 0 22px; line-height: 1; }
.lobby-sub { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 620px; margin: -14px 0 22px; }
.lobby-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
/* The way to the manual, offered where somebody is deciding to start a run
   rather than buried in a menu they will not open mid-night. */
.lobby-manual { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: -6px 0 18px; }
.lobby-manual a { color: var(--toxic-hi); text-decoration: none; border-bottom: 1px solid rgba(168,224,99,.3); }
.lobby-manual a:hover { border-bottom-color: var(--toxic-hi); }

/* The drill gate: only the host and join doors, side by side. */
#lobby.drill-focus .lcard:not(.drill):not(.ljoin) { display: none; }
#lobby.drill-focus .lobby-cards { grid-template-columns: repeat(auto-fit, minmax(270px, 380px)); }
.lobby-all { margin-top: 18px; }
.lcard { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.lcard-tag { font-family: var(--cond); text-transform: uppercase; letter-spacing: .2em; font-size: 9.5px; font-weight: bold; color: var(--toxic-hi); }
.lcard-name { font-family: var(--cond); text-transform: uppercase; letter-spacing: .05em; font-size: 21px; font-weight: bold; line-height: 1; }
.lcard-copy { color: var(--muted); font-size: 12.5px; margin: 0; flex: 1; }
.lrow { display: flex; gap: 8px; }
.lrow input { flex: 1; min-width: 0; background: var(--raised); border: 1px solid var(--line); color: var(--bone);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; outline: none; font-family: var(--mono); }
.lrow input:focus { border-color: var(--toxic); }
#joincode { text-transform: uppercase; letter-spacing: .08em; }
.lobby-err { margin-top: 16px; border: 1px solid var(--arterial); background: rgba(227,59,46,.1); color: #FF7A6E;
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; }
.mw-head { font-family: var(--cond); text-transform: uppercase; letter-spacing: .18em; font-size: 9.5px;
  color: var(--muted); font-weight: bold; margin: 28px 0 8px; flex-basis: 100%; }
#myworlds { display: flex; flex-wrap: wrap; gap: 8px; }
.mw-row { display: flex; align-items: stretch; }
.mw { text-align: left; border: 1px solid var(--line); border-radius: 10px 0 0 10px; background: var(--raised);
  color: var(--bone); padding: 9px 14px; cursor: pointer; }
.mw:hover { border-color: var(--toxic); }
/* The way out of a world, kept quiet next to the way in — it is the only door
   out of a private Fenwick, but it is not the button anyone came here for. */
.mw-leave { border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0;
  background: var(--raised); color: var(--muted); cursor: pointer; padding: 0 11px;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: bold; }
.mw-leave:hover { color: #FF7A6E; border-color: var(--arterial); }
.mw-name { display: block; font-weight: 600; font-size: 12.5px; }
.mw-name i { color: var(--amberish); font-style: normal; font-size: 10px; }
.mw-meta { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }

/* ---------- shared-world bar ---------- */
#worldbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 9px 22px;
  border-bottom: 1px solid var(--line); background: rgba(232,193,90,.06); font-size: 12px; }
.wb-name { font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-weight: bold; }
.wb-code { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--amberish);
  background: rgba(232,193,90,.1); border: 1px solid rgba(232,193,90,.45); border-radius: 999px;
  padding: 4px 12px; cursor: pointer; }
.wb-code:hover { background: rgba(232,193,90,.2); }
.wb-copy { color: var(--muted); font-size: 9px; margin-left: 4px; }
.wb-people { color: var(--muted); }
.wb-people b { color: var(--bone); font-weight: 600; }
.wb-people b.wb-zomb { color: var(--toxic-hi); }
.wb-people b.wb-dead { color: var(--muted); text-decoration: line-through; }
.wb-host { font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: 9.5px;
  font-weight: bold; color: var(--amberish); }
.wb-guest { font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; font-size: 9.5px;
  font-weight: bold; color: var(--muted); }
.wb-leave { margin-left: auto; }
.ff-guest { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* another human's character, standing in the same room as you */
.occ.player { border-color: rgba(232,193,90,.5); }
.pl-tag { font-family: var(--cond); text-transform: uppercase; letter-spacing: .1em; font-size: 8px;
  font-weight: bold; color: var(--amberish); border: 1px solid rgba(232,193,90,.5);
  border-radius: 999px; padding: 1px 6px; margin-left: 6px; }

.lcard.drill { border-color: var(--arterial); }

/* ---------- siege: civilians and the hold-point picker ---------- */
.hf-list { display: grid; gap: 8px; margin: 14px 0 4px; }
.pillbtn.hf { display: grid; gap: 3px; text-align: left; padding: 12px 14px; height: auto; }
.pillbtn.hf b { font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--bone); }
.pillbtn.hf i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.pillbtn.hf span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); opacity: .7; }

/* ============================================================
   THREE-COLUMN GAME LAYOUT
   left: who you are · centre: where you are · right: the world
   ============================================================ */
#game { display: grid; grid-template-columns: clamp(250px, 19vw, 360px) minmax(0, 1fr) clamp(290px, 21vw, 420px);
  gap: 14px; padding: 14px 22px 22px; align-items: start; width: 100%; }
@media (max-width: 1400px) { #game { grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 12px; padding: 12px 14px 18px; } }
@media (max-width: 1100px) { #game { grid-template-columns: 1fr; }
  #left, #rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; } }
#left, #centre, #rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* The command rail: pinned to the viewport so no verb is ever below the fold.
   Taller-than-viewport days (jobs unfolded, big crew) scroll inside the rail. */
#left { position: sticky; top: 10px; align-self: start; max-height: calc(100vh - 20px);
  overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1100px) { #left { position: static; max-height: none; overflow: visible; } }

/* ---------- the place ---------- */
.place { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--panel); }
.pl-art { position: relative; aspect-ratio: 1000 / 420; max-height: clamp(180px, 30vh, 340px); overflow: hidden; width: 100%; color: #cfe4b4;
  background: #070a07; }
.pl-art .ba-ink { stroke-width: 1.15; }
.place.night .pl-art { color: #9db6c9; }
.place.outside .pl-art { color: #b3c6d9; }
.pl-art .bart { display: block; width: 100%; height: 100%; }
.pl-art .ba-raster { object-fit: cover; object-position: center; user-select: none; }
.pl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 12px 16px 14px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(0,0,0,.5), transparent); }
.pl-head h2 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .03em;
  font-size: clamp(22px, 2.6vw, 34px); line-height: 1; margin: 0; color: var(--bone); }
.pl-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--muted); margin-top: 6px; }
.pl-badge { flex: none; font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em;
  font-size: 11px; font-weight: bold; padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pl-badge.ok { color: var(--toxic-hi); border-color: rgba(134,194,50,.45); background: rgba(134,194,50,.08); }
.pl-badge.warn { color: var(--amberish); border-color: rgba(232,193,90,.45); background: rgba(232,193,90,.08); }
.pl-badge.bad { color: #FF7A6E; border-color: rgba(227,59,46,.5); background: rgba(227,59,46,.1); }

/* The building's sections, as one floor plan docked in the corner of the art.
   Sixteen lettered badges strewn over the scene was clutter; this is a single
   object you read at a glance, laid out on the real footprint. */
.pl-plan { position: absolute; right: 12px; bottom: 12px; z-index: 3;
  background: rgba(6,9,6,.8); border: 1px solid rgba(150,164,134,.22); border-radius: 7px;
  padding: 7px 8px 6px; backdrop-filter: blur(3px); }
.pp-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), 12px); gap: 3px; }
.pp-grid i { display: block; width: 12px; height: 12px; border-radius: 2px; }
.pp-grid i.gap { background: none; }                       /* a notch in the footprint */
.pp-grid i.open { background: rgba(120,132,108,.14); box-shadow: inset 0 0 0 1px rgba(160,172,142,.34); }
.pp-grid i.ok { background: rgba(134,194,50,.6); box-shadow: inset 0 0 0 1px rgba(134,194,50,.85); }
.pp-grid i.dr { background: rgba(227,59,46,.2); box-shadow: inset 0 0 0 1px rgba(227,59,46,.75); }
.pp-grid i.rk { box-shadow: inset 0 0 0 1px rgba(227,59,46,.55);
  background: repeating-linear-gradient(45deg, transparent 0 2px, rgba(227,59,46,.45) 2px 4px); }
.pp-grid i.here { outline: 1.5px solid var(--bone); outline-offset: 1.5px; }
.pp-cap { display: block; margin-top: 6px; font-family: var(--mono); font-size: 8px;
  letter-spacing: .1em; color: var(--muted); text-align: center; }

/* ---------- status cards ---------- */
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.stat { display: flex; gap: 11px; align-items: flex-start; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.stat .si { font-size: 17px; line-height: 1.1; opacity: .85; }
.stat b { display: block; font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em;
  font-size: 13px; color: var(--bone); font-weight: bold; }
.stat i { display: block; font-style: normal; font-size: 11px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.stat.good { border-color: rgba(134,194,50,.3); } .stat.good b { color: var(--toxic-hi); }
.stat.warn { border-color: rgba(232,193,90,.3); } .stat.warn b { color: var(--amberish); }
.stat.bad  { border-color: rgba(227,59,46,.35); }  .stat.bad b  { color: #FF7A6E; }

/* ---------- atmosphere ---------- */
.atmos { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 12.5px; color: var(--bone); }
.atmos .at-ic { color: var(--muted); }
.atmos .at-t { flex: 1; min-width: 0; }
.atmos .at-p { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- actions ---------- */
.actions { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 12px 13px 13px;
  container-type: inline-size; }
.act-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.act-head span { font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--muted); }
.act-head b { font-family: var(--mono); font-size: 11px; color: var(--toxic-hi); }
.act-head i { font-family: var(--mono); font-size: 10px; color: var(--muted); font-style: normal; margin-left: auto; }
.actions .dock { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.dock-primary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.dock-room-actions { display: grid; grid-template-columns: 1fr; gap: 7px; }
.dock-primary .act, .dock-room-actions .act { min-width: 0; }

/* Guarding one shot at a time and taking the full watch are one system. Keep
   both prices around the same meter so the expensive version reads as a way to
   extend the bank, not as a duplicate job. */
.guard-duty { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid rgba(227,59,46,.38); border-radius: 9px; background: rgba(227,59,46,.035); }
.guard-duty > div:first-child { display: flex; flex-direction: column; min-width: 128px; }
.guard-duty > div:first-child span { font-family: var(--cond); text-transform: uppercase; letter-spacing: .09em;
  color: #FF7A6E; font-size: 11.5px; font-weight: bold; }
.guard-duty > div:first-child i { font-style: normal; font-family: var(--mono); color: var(--muted); font-size: 8.5px; }
.guard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; margin-left: auto; }
.guard-actions button { border: 1px solid rgba(227,59,46,.48); border-radius: 999px; background: var(--raised);
  color: var(--bone); padding: 4px 9px; cursor: pointer; font-family: var(--cond); font-size: 10.5px; }
.guard-actions button:hover:not([disabled]) { border-color: var(--arterial); }
.guard-actions button i { font-style: normal; color: var(--muted); margin-left: 4px; font-family: var(--mono); font-size: 8.5px; }
.guard-actions button[disabled] { opacity: .38; cursor: default; }

.dock-room { margin-top: 2px; }
.dock-room-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; margin-bottom: 6px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .11em; font-size: 8.5px; color: var(--muted); }
.dock-room-head i { width: 100%; font-style: normal; letter-spacing: .02em; text-transform: none; text-align: left; }
.dock-unavailable { border-top: 1px solid var(--line); padding-top: 7px; }
.dock-unavailable summary, .jobs-other summary { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: 9.5px; list-style-position: inside; }
.dock-unavailable summary i, .jobs-other summary i { font-style: normal; min-width: 20px; text-align: center;
  border: 1px solid var(--line); border-radius: 999px; padding: 0 5px; }
.dock-unavailable-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 7px; }
.dock-unavailable-list .act { opacity: .42; }

/* ---------- in-room card ---------- */
#occcard .occs { display: grid; gap: 7px; margin-top: 6px; max-height: 212px; overflow-y: auto; scrollbar-width: thin; }

/* ---------- tabbed rail ---------- */
.tabcard { padding: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; padding: 10px 6px; background: none; border: none; cursor: pointer;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 10.5px;
  color: var(--muted); border-bottom: 2px solid transparent; }
.tab:hover { color: var(--bone); }
.tab.on { color: var(--bone); border-bottom-color: var(--arterial); background: rgba(255,255,255,.02); }
.tabbody { max-height: 340px; overflow-y: auto; padding: 10px 12px; margin: 0; }
.tab-empty { font-size: 11.5px; line-height: 1.6; color: var(--muted); font-style: italic; }
.tab-count { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 8px; }
ul.tabbody { list-style: none; }

/* districts move under the dossier */
.dq-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 11px 12px; }

/* Full-bleed: the centre column grows with the screen, so cap the art's height
   on very wide displays or it swallows the fold. The one-screen shell caps it
   harder still (max-height above), so this stays under that ceiling rather
   than fighting it. */
@media (min-width: 1700px) { .pl-art { aspect-ratio: auto; height: min(30vh, 340px); } }
/* Commissioned raster art fills the same box as the drawn scenes, tinted to sit
   with them rather than glaring out of the panel. */
.pl-art .ba-raster { display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.75) contrast(1.05) brightness(.82); }
.place.night .pl-art .ba-raster { filter: saturate(.5) contrast(1.1) brightness(.6) hue-rotate(-12deg); }

/* ---------- the day's work ---------- */
/* Jobs are the siege's day phase: chunky assignments rather than a hundred
   one-AP clicks. The AP price sits on the left of every button because the
   design's rule is that the bill is never a surprise. */
.jobs { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; }
.jobs.hidden { display: none; }
.jobs-head { display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 10px;
  color: var(--muted); margin-bottom: 9px; }
.jobs-head i { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--toxic-hi); }
/* The fold: same header, but it is a button now. */
button.jobs-head { width: 100%; background: none; border: 0; padding: 0; cursor: pointer; }
button.jobs-head:hover span { color: var(--bone); }
.job { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; gap: 0 9px;
  width: 100%; text-align: left; background: rgba(20,25,20,.7); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; margin-bottom: 4px; cursor: pointer; color: inherit; }
.job:hover:not([disabled]) { border-color: var(--toxic); background: rgba(134,194,50,.07); }
.job[disabled] { opacity: .42; cursor: default; }
.job .jap { grid-row: 1 / 3; align-self: center; font-family: var(--mono); font-size: 13px;
  color: var(--toxic-hi); text-align: right; }
.job[disabled] .jap { color: var(--muted); }
.job .jl { font-family: var(--cond); font-size: 12.5px; letter-spacing: .02em; }
.job .je { font-size: 10px; color: var(--muted); line-height: 1.35; }
/* the morning report, in the activity feed */
#tab-activity .report { color: #C8D3BC; border-left: 2px solid rgba(232,193,90,.55); padding-left: 9px; }

/* ---------- traits at creation ---------- */
/* The strong ones cost, the weaknesses pay, and the sheet has to balance. Shown
   as two rows so the trade is the obvious thing about the screen. */
.traitpick { margin: 10px 0 4px; }
.tp-head { display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 10px;
  color: var(--muted); margin-bottom: 6px; }
.tp-head i { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--toxic-hi); }
.tp-head i.bad { color: var(--arterial); }
.tp-lbl { font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase;
  color: #6E7A68; margin: 7px 0 4px; }
.tp-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tr { display: inline-flex; align-items: center; gap: 6px; background: rgba(20,25,20,.7);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer;
  font-size: 11px; color: inherit; font-family: var(--cond); }
.tr b { font-family: var(--mono); font-size: 9.5px; color: var(--muted); font-weight: normal; }
.tr:hover:not([disabled]) { border-color: var(--toxic); }
.tr.on { border-color: var(--toxic); background: rgba(134,194,50,.12); color: var(--toxic-hi); }
.tr.on b { color: var(--toxic-hi); }
.tr.off { opacity: .35; cursor: default; }
.tp-sel { margin-top: 8px; font-size: 10.5px; color: var(--muted); line-height: 1.45; }

/* ---------- standing orders ---------- */
/* The half of the siege you can set and then close the tab on. */
.orders { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; }
.orders.hidden { display: none; }
.o-now { font-size: 11.5px; color: #C8D3BC; background: rgba(134,194,50,.07);
  border: 1px solid rgba(134,194,50,.28); border-radius: 8px; padding: 7px 10px; margin-bottom: 9px; }
.o-now.none { color: var(--muted); background: none; border-color: var(--line); }
.o-now i { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--toxic-hi); }
.o-lbl { font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase;
  color: #6E7A68; margin: 8px 0 4px; }
.o-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.opost { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  background: rgba(20,25,20,.7); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 9px; cursor: pointer; color: inherit; }
.opost:hover { border-color: var(--toxic); }
.opost.on { border-color: var(--toxic); background: rgba(134,194,50,.1); }
.opn { font-family: var(--cond); font-size: 11.5px; }
.opc { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.o-row { display: flex; flex-wrap: wrap; gap: 5px; }
.oc { background: rgba(20,25,20,.7); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 11px; font-family: var(--cond); cursor: pointer; color: inherit;
  text-transform: capitalize; }
.oc:hover { border-color: var(--toxic); }
.oc.on { border-color: var(--toxic); background: rgba(134,194,50,.12); color: var(--toxic-hi); }
.o-commit { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.o-commit label { font-family: var(--mono); font-size: 9px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.o-commit input { width: 58px; background: #0F140F; border: 1px solid var(--line); color: var(--bone);
  border-radius: 6px; padding: 5px 8px; font-family: var(--mono); font-size: 12px; }

/* ---------- the pact ---------- */
/* The only thing settled before a run begins: what you are all agreeing to
   survive. Where you stand is found in play. */
.pactpick { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; }
.pact { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: rgba(20,25,20,.7); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 11px; cursor: pointer; color: inherit; }
.pact:hover { border-color: var(--toxic); }
.pact.on { border-color: var(--toxic); background: rgba(134,194,50,.1); }
.pact .pl { font-family: var(--cond); font-size: 13px; letter-spacing: .03em; }
.pact.on .pl { color: var(--toxic-hi); }
.pact .pb { font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.pact-long { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 3px;
  border-left: 2px solid rgba(134,194,50,.35); padding-left: 9px; }
.lhint { font-family: var(--mono); font-size: 9px; color: var(--muted); align-self: center; }

/* who is holding what, and the offer to take somewhere yourself */
.o-holds { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.hold { font-size: 10.5px; font-family: var(--cond); background: rgba(20,25,20,.7);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.hold.mine { border-color: var(--toxic); color: var(--toxic-hi); }
.hold i { font-style: normal; font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
/* The larder. It earns colour only when it is running out — a hold with a week
   of food on the shelf should read as quietly as the rest of the pill. */
.hold i.ld { margin-left: 6px; padding-left: 6px; border-left: 1px solid rgba(255,255,255,.12); }
.hold i.ld.low { color: var(--amberish, #E8C15A); }
.hold i.ld.out { color: #FF7A6E; }
.holdclaim { font-size: 10.5px; font-family: var(--cond); background: none; color: var(--toxic-hi);
  border: 1px dashed rgba(134,194,50,.5); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.holdclaim:hover { background: rgba(134,194,50,.1); }

/* ---------- the roster ---------- */
/* Your people: who is with you, who is holed up nearby, who holds which wall. */
.crewrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: rgba(20,25,20,.5); }
.crewrow.here { border-color: rgba(134,194,50,.45); }
.crewrow.stranger { border-style: dashed; }
.cr-who { min-width: 150px; display: flex; flex-direction: column; }
.cr-who b { font-family: var(--cond); font-size: 13px; letter-spacing: .02em; }
.cr-who i { font-style: normal; font-size: 9.5px; color: var(--muted); }
.cr-bars { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.cr-status { font-size: 10.5px; color: var(--bone); }
.cr-status b { color: var(--toxic-hi); }
.cr-state.hurt { font-size: 10px; color: #FF7A6E; }
.cr-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; width: 100%; }
.cr-roles { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cr-hint { font-style: normal; font-size: 9.5px; color: var(--muted); }
.crb { font-size: 10px; padding: 4px 10px; }
.crb.dim { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; cursor: pointer; }
.crb.dim:hover { color: var(--bone); border-color: var(--bone); }

/* The run's own clock, counted down locally — proof the world moves without you. */
.phaseleft { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; }

/* Sound. Lives in the top bar so it is reachable at any point in a run — it
   used to exist only inside the intro, which meant that once you had seen the
   intro there was no way to turn the district's sound on at all. */
.soundbtn { background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; width: 30px; height: 30px; font-size: 13px; cursor: pointer;
  line-height: 1; padding: 0; align-self: center; }
.soundbtn:hover { border-color: var(--bone); color: var(--bone); }
.soundbtn.on { border-color: var(--toxic); color: var(--toxic-hi); }

/* ---------- the one-screen shell ----------
   Above 1100px the page itself never scrolls: the chrome (topbar, hud,
   banners) takes what it needs, #game takes the rest, and each column
   scrolls internally. Below 1100px the page flows as before. */
@media (min-width: 1101px) {
  body.ingame { height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
  body.ingame > * { flex: none; }
  body.ingame #game { flex: 1 1 auto; min-height: 0; overflow: hidden;
    grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  body.ingame #left, body.ingame #centre, body.ingame #rail {
    min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  /* align-self:start on the bare #left rule would let it size to its content
     instead of the row — it would then never overflow itself, so its own
     overflow-y never engages and #game's overflow:hidden simply clips the
     jobs list and the districts grid out of reach. */
  body.ingame #left { position: static; max-height: none; align-self: stretch; }
}

/* ---------- the ticker: what just happened, next to the fight ---------- */
.ticker { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.45;
  border: 1px solid var(--line); border-left: 2px solid var(--amberish); border-radius: 10px;
  background: rgba(15,18,15,.85); padding: 6px 11px; }
.ticker:empty { display: none; }
.ticker p { margin: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker p:first-child { color: var(--bone); }
.ticker p.event { color: #FF9A8E; }
.ticker p.event:first-child { color: #FF7A6E; }
.ticker .t { font-family: var(--mono); color: var(--muted); font-size: 8.5px; margin-right: 6px; }

/* ---------- the character sheet overlay ---------- */
#sheet { position: fixed; inset: 0; z-index: 150; background: rgba(6,8,6,.78);
  display: flex; align-items: flex-start; justify-content: center; padding: 7vh 20px 20px; }
#sheet .sheet-card { width: min(700px, 94vw); max-height: 84vh; overflow-y: auto; scrollbar-width: thin;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; position: relative; }
#sheet .sheet-close { position: absolute; top: 12px; right: 14px; background: none; border: 1px solid var(--line);
  border-radius: 999px; width: 26px; height: 26px; color: var(--muted); cursor: pointer; font-size: 11px; }
#sheet .sheet-close:hover { color: var(--bone); border-color: var(--muted); }

/* ---------- combat header: the target's tank, readable at a glance ---------- */
.chead .thp b { color: #FF7A6E; font-family: var(--mono); }
.chead .thpbar { flex: 1 1 90px; max-width: 170px; height: 7px; border-radius: 999px;
  background: #0F120F; overflow: hidden; border: 1px solid var(--line); }
.chead .thpbar i { display: block; height: 100%; background: var(--arterial); transition: width .25s ease; }
.hitline { font-family: var(--mono); font-size: 10.5px; color: var(--amberish);
  border-top: 1px solid var(--line); margin-top: 8px; padding: 7px 2px 0; }

/* ---------- the sheet's affordances ---------- */
.sheetbtn { align-self: center; background: rgba(20,25,20,.7); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; color: var(--bone);
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: bold;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.sheetbtn:hover { border-color: var(--toxic); color: var(--toxic-hi); }
.sheetbtn span { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.meter.xpmeter { cursor: pointer; }
.meter.xpmeter:hover .sub { color: var(--toxic-hi); }
.av.me { cursor: pointer; }
.av.me:hover { border-color: var(--toxic); }
.ticker p.lockable { cursor: pointer; }
.ticker p.lockable:hover { color: var(--bone); text-decoration: underline; }

/* Whether the person in front of you is someone you can take in. Most survivors
   in Fenwick are not: they have their own plans and they are staying. Saying so
   on the row costs nothing and stops the recruit button reading as broken. */
.occ .owl { font-style: normal; color: var(--muted); }
.occ .owl.take { color: var(--toxic-hi); }

/* One pact: a statement where the chooser was. Same furniture as a .pact button
   without the affordance, because there is nothing to press. */
.pact-only { display: block; border: 1px solid var(--line, #263026); border-radius: 10px;
  padding: 12px 14px; background: rgba(20,25,20,.5); }
.pact-only .pl { display: block; font-weight: bold; letter-spacing: .04em; }
.pact-only .pb { display: block; opacity: .75; font-size: 13px; margin-top: 3px; }

/* The day's work, one line a job. The old card was three lines of manual prose
   inside a panel you read every morning; the reasoning belongs in the tooltip
   and the manual, and the row belongs to the decision. */
.jlist { display: flex; flex-direction: column; gap: 3px; }
/* One LINE, which the first attempt at this was not: collapsing the old
   two-row card to a single row left the label in column two and pushed the
   reason down into column one, which is thirty pixels wide — so every row read
   "your \u2026". Three columns, the reason taking the slack on the right. */
.job { grid-template-columns: 26px auto minmax(0, 1fr) !important;
  grid-template-rows: auto !important; align-items: baseline;
  padding: 6px 9px !important; margin-bottom: 0 !important; }
.job .jap { grid-row: auto !important; }
.job .jl { white-space: nowrap; }
.job .je { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A job this hold actually needs today. It earns a left edge and its reason in
   place of its effect — the effect never changes, the reason is why it is here. */
.job.want { border-left: 2px solid var(--toxic, #86C232); }
.job.want .je { color: var(--toxic-hi, #A8E063); }
.job.want .jap { color: var(--toxic-hi, #A8E063); }
/* Going outside. Two letters, because "risky" as a word on eleven rows is noise. */
.jrisk { font-style: normal; font-family: var(--mono); font-size: 8px; letter-spacing: .08em;
  color: #FF7A6E; border: 1px solid rgba(227,59,46,.45); border-radius: 3px;
  padding: 0 3px; margin-left: 6px; vertical-align: 1px; }
.job[disabled] { opacity: .45; }
.jobs-calm { color: var(--muted); font-size: 10.5px; font-style: italic; padding: 3px 0 7px; }
.jobs-other { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 7px; }
.jobs-other .jlist { margin-top: 7px; }

/* The desktop command rail is much narrower than the centre column even on a
   large monitor. Three priority jobs can afford a second line; clipping the
   reason is more expensive than the few pixels this adds. */
@container (max-width: 320px) {
  .job { grid-template-columns: 24px minmax(0, 1fr) !important; }
  .job .jl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .job .je { grid-column: 2; text-align: left; white-space: normal; overflow: visible; }
  .guard-duty > div:first-child { min-width: 98px; }
  .guard-actions { min-width: 86px; flex-direction: column; }
  .guard-actions button { white-space: nowrap; }
}

/* Recruiting is a roster choice, not one repeated button per person. */
.o-lbl.recruit-lbl { display: flex; align-items: center; justify-content: space-between; }
.o-lbl.recruit-lbl i { font-style: normal; color: var(--toxic-hi); letter-spacing: .05em; }
.recruitpick { flex-wrap: nowrap; cursor: pointer; }
.recruitpick input { flex: none; accent-color: var(--toxic); }
.recruitpick .cr-who { flex: 1; min-width: 0; }
.recruitpick .cr-state { margin-left: auto; text-align: right; }
.recruitpick .cr-state.ready { color: var(--muted); font-size: 9.5px; }
.recruitpick.hurt { cursor: default; opacity: .62; }
.recruit-batch { width: 100%; border: 1px solid var(--toxic); border-radius: 9px; padding: 7px 11px;
  background: rgba(134,194,50,.11); color: var(--toxic-hi); cursor: pointer; font-family: var(--cond);
  text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px; font-weight: bold; }
.recruit-batch:hover:not([disabled]) { background: rgba(134,194,50,.18); }
.recruit-batch[disabled] { opacity: .38; cursor: default; }

@media (max-width: 480px) {
  .dock-primary, .dock-unavailable-list { grid-template-columns: 1fr; }
  .guard-duty { align-items: flex-start; flex-direction: column; }
  .guard-actions { margin-left: 0; justify-content: flex-start; }
  .recruitpick { align-items: flex-start; flex-wrap: wrap; }
  .recruitpick .cr-state { width: 100%; margin-left: 22px; text-align: left; }
}

/* The dev clock, beside the sentence explaining that a run has no clock you can
   move. Deliberately unlovely — amber, monospace, small — so nobody mistakes it
   for part of the game. It only renders on localhost and the route behind it
   does not exist in a production build. */
.ffdev { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px;
  padding-left: 10px; border-left: 1px solid rgba(232,193,90,.3); }
.ffdev > i { font-style: normal; font-family: var(--mono); font-size: 8px;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(232,193,90,.7); }
.ffdevbtn { font-family: var(--mono); font-size: 9.5px; color: var(--amberish, #E8C15A);
  background: rgba(232,193,90,.08); border: 1px solid rgba(232,193,90,.35);
  border-radius: 4px; padding: 2px 6px; cursor: pointer; }
.ffdevbtn:hover:not(:disabled) { background: rgba(232,193,90,.2); }
.ffdevbtn:disabled { opacity: .4; cursor: wait; }

/* The stance you are already in. Marked rather than missing — a control that
   vanishes when it applies teaches the player they cannot do the thing. */
.crb.dim.on { color: var(--toxic-hi, #A8E063); border-color: rgba(134,194,50,.5);
  background: rgba(134,194,50,.08); opacity: 1; cursor: default; }
