:root {
  --amber: #f0b43c;
  --amber-dim: rgba(240, 180, 60, 0.55);
  --ink: #e8e4d8;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --hand: 'Bradley Hand', 'Segoe Print', 'Comic Sans MS', cursive;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; color: var(--ink); font-family: var(--mono); user-select: none; }
#view, #view canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }
#hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(120, 0, 0, 0) 35%, rgba(150, 0, 0, 0.75) 100%); }
#fade { position: fixed; inset: 0; pointer-events: none; background: #000; opacity: 0; }

#hud { position: fixed; inset: 0; pointer-events: none; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); }
#crosshair::before, #crosshair::after { content: ''; position: absolute; background: var(--amber-dim); }
#crosshair::before { left: 8px; top: 0; width: 2px; height: 18px; clip-path: polygon(0 0, 100% 0, 100% 30%, 0 30%, 0 70%, 100% 70%, 100% 100%, 0 100%); }
#crosshair::after { top: 8px; left: 0; height: 2px; width: 18px; clip-path: polygon(0 0, 30% 0, 30% 100%, 0 100%, 0 0, 70% 0, 100% 0, 100% 100%, 70% 100%); }
#crosshair.hidden { display: none; }
#hitdir { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; transform: translate(-50%, -50%); opacity: 0; }
#hitdir i { position: absolute; left: 50%; top: 0; width: 90px; height: 26px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 0%, rgba(255, 40, 20, 0.9), transparent 70%); border-radius: 50%; }

#health, #ammo { position: absolute; bottom: 22px; display: flex; align-items: baseline; gap: 10px; color: var(--amber); text-shadow: 0 0 8px rgba(240, 160, 40, 0.5); }
#health { left: 26px; }
#health .lbl { font-size: 12px; letter-spacing: 0.2em; opacity: 0.75; }
#hp { font-size: 34px; font-weight: 700; min-width: 2.2em; }
#health .bar { width: 120px; height: 6px; background: rgba(240, 180, 60, 0.18); align-self: center; }
#hpbar { height: 100%; background: var(--amber); transition: width 0.2s; }
#hud.low #health { color: #ff5a3a; }
#hud.low #hpbar { background: #ff5a3a; }
#ammo { right: 26px; }
#weapon { font-size: 12px; letter-spacing: 0.2em; opacity: 0.75; }
#mag b { font-size: 34px; }
#mag span { font-size: 16px; opacity: 0.7; margin-left: 6px; }
#cans { font-size: 12px; opacity: 0.7; margin-right: 18px; }

#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); padding: 6px 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--amber-dim); color: var(--amber); font-size: 14px; opacity: 0; transition: opacity 0.15s; }
#prompt.on { opacity: 1; }
#subtitle { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(760px, 90vw); text-align: center; font-size: 16px; line-height: 1.4; padding: 6px 14px; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.4s; }
#subtitle.on { opacity: 1; }
#toasts { position: absolute; top: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { padding: 8px 12px; background: rgba(8, 10, 12, 0.75); border-left: 3px solid var(--amber); font-size: 14px; max-width: 420px; transition: opacity 0.6s, transform 0.6s; }
.toast.out { opacity: 0; transform: translateX(20px); }
.toast.note { background: rgba(232, 226, 205, 0.93); color: #20242a; border-left-color: #2f7f86; font-family: var(--hand); font-size: 19px; }
.toast.note .pen { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #2f7f86; }
.toast.cp { border-left-color: #6ad08a; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.8; }
#place { position: absolute; left: 28px; bottom: 82px; font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity 1s; }
#place.on { opacity: 0.8; }
#timer { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); font-size: 20px; color: var(--amber); letter-spacing: 0.15em; padding: 6px 14px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--amber-dim); }

#notes { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); }
#notes .page, .endnotes { font-family: var(--hand); }
#notes .page { width: min(640px, 92vw); max-height: 86vh; overflow: auto; padding: 28px 34px; background: #ece6d2; color: #1f2329; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); background-image: repeating-linear-gradient(transparent 0 29px, rgba(47, 127, 134, 0.18) 29px 30px); }
#notes h2 { margin: 0 0 4px; font-size: 30px; display: flex; justify-content: space-between; }
#notes h2 span { font-family: var(--mono); font-size: 14px; color: #2f7f86; align-self: center; }
#notes .sub { margin: 0 0 12px; font-size: 16px; opacity: 0.7; }
#notes h3, .endnotes h3 { margin: 14px 0 4px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: #8b2d2a; }
#notes ul, .endnotes ul { margin: 0; padding-left: 18px; }
#notes li, .endnotes li { font-size: 18px; line-height: 1.35; margin: 4px 0; }
#notes li.unseen { opacity: 0.35; list-style: none; margin-left: -18px; }
#notes .close { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; opacity: 0.6; text-align: right; }

#terminal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.75); }
#terminal pre { margin: 0; padding: 28px 34px; background: #031109; color: #5dff9a; font-size: 15px; line-height: 1.45; border: 1px solid #1d5a35; box-shadow: 0 0 40px rgba(60, 255, 140, 0.15), inset 0 0 60px rgba(0, 0, 0, 0.6); text-shadow: 0 0 6px rgba(93, 255, 154, 0.5); max-width: 94vw; overflow: auto; }

#screen { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; cursor: pointer; }
#screen.on { display: flex; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.82)); }
#screen.dim { background: rgba(0, 0, 0, 0.7); }
#screen.dead { background: radial-gradient(ellipse at center, rgba(60, 0, 0, 0.55), rgba(10, 0, 0, 0.9)); }
#screen.end { background: #050607; overflow: auto; align-items: flex-start; padding: 40px 16px; }
.title { text-align: center; max-width: 760px; padding: 0 16px; }
.title h1 { font-size: clamp(56px, 11vw, 120px); margin: 0; letter-spacing: 0.08em; color: var(--amber); text-shadow: 0 0 30px rgba(240, 160, 40, 0.45); font-weight: 800; }
.title h2 { font-size: 40px; margin: 0 0 10px; color: var(--amber); letter-spacing: 0.06em; }
.title .tag { margin: 6px 0 22px; letter-spacing: 0.25em; font-size: 13px; text-transform: uppercase; opacity: 0.7; }
.title .lede { font-size: 17px; line-height: 1.5; opacity: 0.9; }
.title .keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 18px; margin: 26px auto; font-size: 13px; text-align: left; max-width: 640px; }
.title .keys b { color: var(--amber); display: inline-block; min-width: 3.4em; }
.title .go { margin-top: 26px; font-size: 18px; color: var(--amber); animation: blink 1.6s infinite; }
.title .small, .title.small .small { font-size: 12px; opacity: 0.55; }
.title .settings { display: flex; flex-direction: column; gap: 12px; margin: 22px auto; width: 320px; text-align: left; font-size: 14px; }
.title .settings input[type='range'] { width: 100%; accent-color: var(--amber); }
.title.end .stats { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }
.title.end .stats span { display: flex; flex-direction: column; font-size: 12px; opacity: 0.85; letter-spacing: 0.1em; }
.title.end .stats b { font-size: 22px; color: var(--amber); letter-spacing: 0; }
.title.end h3 { color: var(--amber); margin: 26px 0 8px; font-size: 16px; letter-spacing: 0.15em; }
.endnotes { text-align: left; background: #ece6d2; color: #1f2329; padding: 18px 26px; }
.endnotes li.unseen { color: #6a6a6a; }
@keyframes blink { 50% { opacity: 0.45; } }
@media (max-width: 640px) { .title .keys { grid-template-columns: repeat(2, 1fr); } }
/* who is speaking: the PA is white, Okafor warm, the Sweep's radio green */
#subtitle[data-who='okafor'] { color: #ffd9a8; }
#subtitle[data-who='sweep'] { color: #a8ffb0; font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.02em; }
