/* After Hours: the same chrome as Ashen Watch, in the colours of a city at night. */
:root {
  --void: #06070b;
  --panel: rgba(10, 12, 18, 0.88);
  --panel-solid: #0c0e15;
  --brass: #e8a83a;
  --brass-hi: #ffd27a;
  --brass-dim: #6a5428;
  --bone: #e6e8ee;
  --dim: #8e96a8;
  --blood: #a8261e;
  --blood-hi: #ef4a3a;
  --heal: #6ee0a0;
  --line: rgba(232, 168, 58, 0.4);
  --gothic: "Bebas Neue", "Barlow Condensed", Impact, sans-serif;
  --prose: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3 { letter-spacing: 0.04em; font-weight: 400; }
.sheet h2 { font-size: 38px; }

#title {
  background:
    radial-gradient(ellipse at 18% 30%, rgba(232, 60, 50, 0.12), transparent 55%),
    linear-gradient(90deg, rgba(4, 5, 9, 0.94) 0%, rgba(4, 5, 9, 0.72) 40%, rgba(4, 5, 9, 0) 72%);
}
#title h1 {
  font-size: clamp(64px, 11vw, 132px);
  line-height: 0.82;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #f4f1ea;
  text-shadow: 0 0 2px #fff, 0 0 18px rgba(255, 60, 60, 0.8), 0 0 48px rgba(255, 40, 40, 0.45);
}
#title h1::after {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  margin-top: 10px;
  background: linear-gradient(90deg, #ef4a3a, transparent);
}
.lede { color: #c8ccd8; font-size: 16px; }
.career { border-color: rgba(232, 168, 58, 0.28); background: rgba(8, 10, 16, 0.75); }
#career-title { font-size: 26px; letter-spacing: 0.06em; }
.credits a { color: var(--brass-hi); }

button.primary { background: linear-gradient(#b82e24, #6e1612); border-color: #ef6a4a; }
button.primary:hover { background: linear-gradient(#d0382c, #84201a); }

.track.big > span, #hp-fill { background: linear-gradient(90deg, #3aa86a, #6ee0a0); }
.track.xp > span { background: linear-gradient(90deg, #a8602a, #e8a83a); }
#heat-fill.ammo { background: linear-gradient(90deg, #8a7a40, #e8d070) !important; }
#heat-fill.reloading { background: repeating-linear-gradient(90deg, #6a6a72 0 6px, #9a9aa2 6px 12px) !important; }
#hp-fill { background: linear-gradient(#6ee0a0, #2a8a5a) !important; }
#hp-fill.low { background: linear-gradient(#ef6a4a, #8a1c16) !important; }
/* The gun in hand and what is left in it, always readable. */
.vital-row #heat-label { display: block; font-family: var(--pixel); font-size: 10px; color: #e8e0c8; text-shadow: 0 1px 0 #000; margin-bottom: 2px; letter-spacing: 0.04em; }

.mode-card.night { border-color: rgba(239, 74, 58, 0.45); background: linear-gradient(rgba(36, 14, 16, 0.6), rgba(8, 8, 12, 0.6)); }
.districts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 12px; }
.district { border: 1px solid rgba(232, 168, 58, 0.3); background: rgba(14, 16, 24, 0.7); padding: 10px 12px; display: grid; gap: 4px; align-content: start; text-align: left; }
.district.sel { border-color: var(--brass-hi); box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.3); }
.district.locked { opacity: 0.55; }
.district, .district * { text-transform: none; letter-spacing: normal; }
.district h4 { margin: 0; font-family: var(--gothic); font-size: 22px; font-weight: 400; letter-spacing: 0.05em; }
.district small { font-family: var(--pixel); font-size: 9px; color: var(--dim); letter-spacing: 0.1em; }
.district p { margin: 0; font-size: 12px; color: #b8bcc8; line-height: 1.35; }
#night-steps { font-size: 13px; }

#ammo-row { display: flex; align-items: baseline; gap: 8px; font-family: var(--pixel); font-size: 11px; color: var(--dim); }
#ammo-row b { color: var(--bone); font-size: 15px; }

#doctrines[hidden], h3[hidden] { display: none !important; }

/* The region map: Hollow Bay, two banks of the Hollow. */
.region-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 12px; }
@media (max-width: 720px) { .region-wrap { grid-template-columns: 1fr; } }
#region-map svg { width: 100%; height: auto; display: block; }
.region-svg { background: #1a1d16; border: 1px solid rgba(232, 168, 58, 0.3); font-family: var(--prose); }
.region-svg .r-water { fill: #24384e; }
.region-svg .r-current { fill: none; stroke: #3a5a78; stroke-width: 2; stroke-dasharray: 6 8; }
.region-svg .r-river { fill: #6a8aa8; font: 600 10px "Silkscreen", monospace; letter-spacing: 0.3em; text-anchor: middle; }
.region-svg .r-road { stroke: #8a8270; stroke-width: 4; stroke-dasharray: 2 3; }
.region-svg .r-bridge { stroke: #c8c0a8; stroke-width: 5; }
.region-svg .r-cell rect { fill: #2a2c26; stroke: #4a4a3e; stroke-width: 1.5; }
.region-svg .r-cell.seen rect { fill: #34362e; }
.region-svg .r-cell.look-downtown rect { fill: #33363c; }
.region-svg .r-cell.look-oldtown rect { fill: #3c3028; }
.region-svg .r-cell.look-campus rect { fill: #2e3a2c; }
.region-svg .r-cell.look-harbour rect { fill: #2a3238; }
.region-svg .r-cell.look-southside rect { fill: #30382a; }
.region-svg .r-cell.look-ironworks rect { fill: #38322c; }
.region-svg .r-cell.look-blackwood rect { fill: #1e2e1c; }
.region-svg .r-cell.look-meridian rect { fill: #262e3a; }
.region-svg .r-cell.look-fort rect { fill: #2e3424; }
.region-svg .r-cell.unseen { opacity: 0.6; }
.region-svg .r-cell.can-start { cursor: pointer; }
.region-svg .r-cell.can-start rect { stroke: #8a7a4a; }
.region-svg .r-cell.pick rect { stroke: var(--brass-hi); stroke-width: 3; }
.region-svg .r-cell.here rect { stroke: #6ee0a0; stroke-width: 3; }
.region-svg .r-name { fill: #f0ece0; font: 400 16px var(--gothic); letter-spacing: 0.05em; }
.region-svg .r-hold { fill: #d8d4c4; font-size: 10px; }
.region-svg .r-hold.unknown { fill: #8a8a7c; font-style: italic; }
.region-svg .r-found { fill: #6ee0a0; }
.region-svg .r-home { fill: var(--brass-hi); font-size: 10px; font-weight: 700; }
.region-svg .r-danger { fill: #c8a070; font-size: 10px; font-weight: 700; }
.region-svg .r-danger.t2 { fill: #e05040; }
.region-svg .r-danger.t3 { fill: #ff4a8a; }
.region-svg .r-finds { fill: #b8c8a8; font-size: 10px; }
.region-svg .r-finds.all { fill: #6ee0a0; font-weight: 700; }
.region-svg .r-you { fill: #6ee0a0; stroke: #0a1a10; stroke-width: 2; }
#region-side dl { display: grid; grid-template-columns: auto auto; gap: 4px 12px; margin: 4px 0 12px; font-size: 14px; }
#region-side dt { color: var(--dim); }
#region-side dd { margin: 0; color: var(--bone); font-weight: 600; text-align: right; }
#region-crew { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: #c8ccd8; }
.mode-card.stand { border-color: rgba(239, 120, 74, 0.5); background: linear-gradient(rgba(40, 18, 12, 0.62), rgba(10, 8, 8, 0.6)); margin-top: 10px; }
.mode-card.trip { border-color: rgba(110, 224, 160, 0.4); background: linear-gradient(rgba(16, 30, 22, 0.6), rgba(8, 10, 12, 0.6)); }

/* Beside the district map (Tab): the region, small. */
#region-mini { position: absolute; left: 12px; top: 64px; width: min(300px, 40vw); padding: 8px; z-index: 6; pointer-events: none; }
#region-mini[hidden] { display: none; }
#region-mini .kicker { margin: 0 0 6px; }

/* The trip's clock and the crew's planks, beside the plan. */
#daylight { position: absolute; top: 14px; left: calc(14px + min(280px, 40vw) + 8px); padding: 6px 10px; font-family: var(--pixel); font-size: 11px; color: var(--bone); pointer-events: none; white-space: nowrap; z-index: 5; }
#daylight[hidden] { display: none; }
#daylight.dusk #day-icon { color: #f0a050; }
#daylight.night { color: #b8c8f0; }
#daylight.night #day-icon { color: #c8d8ff; }
#daylight #day-icon { color: #ffd870; }
#day-planks { color: #c8a070; margin-left: 6px; }
#daylight.stand-alert #day-text { color: #ff8a6a; }
body.touch #daylight, body.pad #daylight { top: 8px; left: calc(8px + min(220px, 34vw) + 6px); font-size: 10px; }

/* The guns carried: two found long guns and the sidearm. */
#gunslots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 4px 0 5px; width: min(300px, 46vw); }
#gunslots[hidden] { display: none; }
.gslot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; height: 58px; font-family: var(--pixel); font-size: 9px; color: var(--dim); border: 1px solid #3a3428; background: rgba(8, 8, 6, 0.6); padding: 2px 3px 2px; white-space: nowrap; overflow: hidden; }
.gslot b { position: absolute; left: 3px; top: 1px; color: var(--brass-hi); font-weight: 400; font-size: 9px; }
.gslot img { height: 24px; max-width: 100%; object-fit: contain; image-rendering: pixelated; margin-bottom: 2px; }
.gslot .gempty { font-style: normal; opacity: 0.6; margin-bottom: 8px; }
.gslot small { font-size: 9px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--bone); }
.gslot em { font-style: normal; font-size: 9px; color: var(--dim); }
.gslot em.dry { color: #d87a6a; }
.gslot.side { border-style: dashed; }
.gslot.on { color: var(--bone); border-color: var(--brass-hi); background: rgba(60, 46, 20, 0.7); }
.gslot.empty { opacity: 0.55; }
.gextra { grid-column: 1 / -1; display: flex; gap: 10px; font-family: var(--pixel); font-size: 10px; color: var(--dim); text-shadow: 0 1px 0 #000; }
.gextra em { font-style: normal; }
.gextra .cash { color: #9fd87a; }

/* The story of the outbreak: the lead, and the documents found. */
.story-lead { margin: 4px 0 6px; font-size: 13px; line-height: 1.4; color: #e8dcc0; }
.story-lead b { color: #e8a83a; }
#region-mini .story-lead { font-size: 11px; margin-top: 6px; }
.story-docs { list-style: none; margin: 4px 0 0; padding: 0; max-height: 220px; overflow-y: auto; }
.story-docs li { margin: 0 0 4px; }
.story-docs summary { cursor: pointer; font-size: 12px; color: #d8c8a0; }
.story-docs details p { margin: 4px 0 6px 12px; }

/* The end of the story: the broadcast goes out. */
#ending { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: min(560px, 86vw); padding: 18px 24px; text-align: center; background: rgba(6, 8, 12, 0.88); border: 1px solid #e8a83a; box-shadow: 0 0 40px rgba(232, 168, 58, 0.25); pointer-events: none; z-index: 8; animation: ending-in 1.2s ease-out; }
#ending[hidden] { display: none; }
#ending small { font-family: var(--pixel); font-size: 10px; letter-spacing: 0.2em; color: var(--dim); text-transform: uppercase; }
#ending h2 { margin: 4px 0 8px; font-family: var(--gothic); font-size: 54px; color: #ffd27a; text-shadow: 0 0 18px rgba(255, 160, 60, 0.6); }
#ending p { margin: 0; font-size: 15px; line-height: 1.45; color: #e6e0d0; }
@keyframes ending-in { from { opacity: 0; transform: translate(-50%, 12px); } }
#region-story { margin-top: 12px; }

/* The danger where the crew stands, beside the clock. */
#day-danger { margin-left: 6px; color: #c8b890; }
#day-danger.z1 { color: #e0a050; }
#day-danger.z2 { color: #ef6a4a; }
#day-danger.z3 { color: #ff4a8a; text-shadow: 0 0 6px rgba(255, 60, 120, 0.6); }

/* The shop: the gun counter at Last Call, the traders in the holdouts. */
#shop-btn { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 6; padding: 4px 12px; font-size: 11px; pointer-events: auto; cursor: pointer; }
#shop-btn[hidden] { display: none; }
#shop-cash { color: #9fd87a; }
#shop-list h3 { margin: 12px 0 6px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.shop-item { display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; text-align: left; padding: 6px 8px; cursor: pointer; }
.shop-item img, .shop-item .shop-ico { grid-row: 1 / span 2; width: 44px; height: 22px; object-fit: contain; image-rendering: pixelated; font-style: normal; font-size: 18px; text-align: center; }
.shop-item b { color: #9fd87a; font-weight: 400; }
.shop-item small { grid-column: 2 / span 2; color: var(--dim); font-size: 10px; }
.shop-item.poor, .shop-item:disabled { opacity: 0.45; cursor: default; }
.shop-item.poor b { color: #d87a6a; }

/* Last Stand: a note found in Mercy General, and the orders in the objective list. */
#note-reader { position: absolute; left: 50%; top: 16%; transform: translateX(-50%) rotate(-0.6deg); width: min(480px, 86vw); padding: 16px 22px 12px; background: #efe8d4; color: #2a2620; border: 1px solid #8a7a58; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6); z-index: 9; cursor: pointer; animation: ending-in 0.4s ease-out; }
#note-reader[hidden] { display: none; }
#note-reader small { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: #7a6a4a; }
#note-reader h3 { margin: 4px 0 8px; font-size: 20px; color: #3a1a12; }
#note-reader p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; font-style: italic; }
#note-reader em { font-size: 11px; color: #8a7a5a; }
#obj-steps li.order small { color: var(--dim); font-size: 11px; }
#obj-steps li.order .prog { color: #ffd27a; font-family: var(--pixel); font-size: 10px; }
#obj-steps li.order.done b { text-decoration: line-through; opacity: 0.7; }
#obj-steps li.order-meta { color: var(--dim); font-size: 11px; }
