:root {
  --red: #c8102e; --red2: #8f0b1f; --cream: #efe3c6; --paper: #e9dcb9; --ink: #1c1a16;
  --teal: #2f8c88; --olive: #596037; --gold: #d9a441; --blue: #1f4f9a;
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --type: 'Special Elite', 'Courier New', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; font-family: var(--display); color: var(--cream); user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; filter: sepia(.16) saturate(1.08) contrast(1.04); }
.hidden { display: none !important; }
b { font-weight: 700; }

/* faded-print vignette */
#grade { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(40, 20, 10, .45) 100%); mix-blend-mode: multiply; }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; }

#suspicion { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  background: var(--ink); border: 2px solid var(--cream); padding: 8px 14px; box-shadow: 4px 4px 0 rgba(0,0,0,.4); }
#suspicion .eye { width: 40px; height: 24px; }
#suspicion .eye path { fill: var(--cream); }
#suspicion .eye circle { fill: var(--ink); transition: r .2s; r: 2; }
#suspicion.seen .eye circle { fill: var(--red); r: 6; }
#suspicion .meter { position: relative; width: 220px; height: 12px; background: #3a3630; border: 1px solid var(--cream); }
#susp-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--cream); transition: width .2s; }
#suspicion .meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
#suspicion .label { display: flex; flex-direction: column; min-width: 120px; line-height: 1; }
#suspicion .label b { font-size: 18px; letter-spacing: 2px; }
#suspicion .label span { font-family: var(--type); font-size: 11px; opacity: .7; margin-top: 3px; }
#suspicion.tier-1 #susp-fill { background: var(--gold); }
#suspicion.tier-2 #susp-fill, #suspicion.tier-3 #susp-fill, #suspicion.tier-4 #susp-fill { background: var(--red); }
#suspicion.tier-3, #suspicion.tier-4 { border-color: var(--red); }
#suspicion.rising { animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 0 4px rgba(200, 16, 46, .55), 4px 4px 0 rgba(0,0,0,.4); } }

#mission-card { position: absolute; top: 18px; left: 18px; width: 330px; background: var(--paper); color: var(--ink);
  border-left: 10px solid var(--red); padding: 12px 16px 14px; box-shadow: 5px 5px 0 rgba(0,0,0,.35); transform: rotate(-.6deg); }
.mc-head { font-size: 12px; letter-spacing: 3px; color: var(--red); display: flex; gap: 6px; align-items: baseline; }
#mc-timer { margin-left: auto; font-size: 18px; color: var(--ink); letter-spacing: 1px; }
#mc-timer.warn { color: var(--red); animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
#mc-title { font-size: 26px; font-weight: 700; letter-spacing: 1px; line-height: 1.1; margin: 2px 0 8px; }
#mc-obj { font-family: var(--type); font-size: 16px; line-height: 1.25; }
#mc-obj-en { font-family: var(--type); font-size: 12px; opacity: .6; margin-top: 2px; }
#mc-extra { font-size: 14px; margin-top: 8px; letter-spacing: 1px; }
#mc-extra i { font-family: var(--type); font-style: normal; opacity: .6; font-size: 12px; }
#mc-extra .ok { color: #3f6b3a; } #mc-extra .warn { color: var(--red); }
#mc-extra .bar { display: block; height: 8px; background: rgba(28,26,22,.15); border: 1px solid var(--ink); }
#mc-extra .bar span { display: block; height: 100%; background: var(--red); }

#topright { position: absolute; top: 18px; right: 18px; text-align: right; }
#topright .date { background: var(--red); color: var(--cream); padding: 4px 10px; font-size: 15px; letter-spacing: 2px; display: inline-block; }
#topright .pesos { margin-top: 6px; font-size: 20px; letter-spacing: 1px; text-shadow: 2px 2px 0 var(--ink); }

#minimap-wrap { position: absolute; left: 22px; bottom: 22px; width: 220px; height: 220px; border-radius: 50%;
  border: 4px solid var(--cream); box-shadow: 0 0 0 4px var(--red), 6px 6px 0 4px rgba(0,0,0,.35); }
#minimap { border-radius: 50%; display: block; }
#minimap-wrap .north { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--red); color: var(--cream);
  font-size: 13px; width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px; font-weight: 700; }
#district { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--cream);
  border: 2px solid var(--cream); padding: 2px 12px; font-size: 14px; letter-spacing: 3px; }

#gauge { position: absolute; right: 22px; bottom: 22px; filter: drop-shadow(5px 5px 0 rgba(0,0,0,.35)); }

#prompt { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: var(--ink); border: 2px solid var(--cream);
  padding: 8px 16px; font-size: 18px; letter-spacing: 2px; }
#prompt b { background: var(--red); padding: 0 8px; margin-right: 8px; }

#toasts { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.toast { background: var(--cream); color: var(--ink); padding: 4px 14px; font-size: 18px; letter-spacing: 2px; font-weight: 700;
  border: 2px solid var(--ink); animation: toast 2.6s forwards; text-align: center; }
.toast.red { background: var(--red); color: var(--cream); border-color: var(--cream); transform: rotate(-1.5deg); }
.toast small { display: block; font-family: var(--type); font-size: 11px; font-weight: 400; letter-spacing: 0; opacity: .8; }
@keyframes toast { 0% { opacity: 0; transform: scale(1.4); } 8% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------- screens ---------------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.keys { margin-top: 18px; font-size: 15px; letter-spacing: 2px; }
.keys b { background: var(--red); color: var(--cream); padding: 1px 8px; }

#title { background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(181,13,39,.92) 0deg 6deg, rgba(200,16,46,.92) 6deg 12deg); }
.poster { text-align: center; max-width: 820px; padding: 20px; }
.poster .star { font-size: 90px; line-height: 1; color: var(--cream); text-shadow: 5px 5px 0 var(--ink); }
.poster h1 { font-size: clamp(70px, 12vw, 150px); line-height: .9; letter-spacing: 8px; color: var(--cream); text-shadow: 7px 7px 0 var(--ink); }
.poster h2 { font-size: 26px; letter-spacing: 14px; margin: 10px 0 22px; color: var(--ink); background: var(--cream); display: inline-block; padding: 2px 18px; }
.poster .tag { font-family: var(--type); font-size: 17px; line-height: 1.5; max-width: 620px; margin: 0 auto; }
.poster .press { margin-top: 28px; font-size: 22px; letter-spacing: 3px; animation: blink 1.2s steps(2) infinite; }
.poster .press b { background: var(--ink); padding: 2px 10px; }
#save-info { font-family: var(--type); font-size: 13px; margin-top: 8px; opacity: .85; }
.controls { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-family: var(--type); font-size: 13px; }
.controls b { font-family: var(--display); background: var(--cream); color: var(--ink); padding: 0 6px; letter-spacing: 1px; }

#brief, #result, #pause, #bigmap { background: rgba(20, 14, 10, .62); }
.dossier { position: relative; width: min(620px, 92vw); background: var(--paper); color: var(--ink); padding: 34px 40px; transform: rotate(-1deg);
  box-shadow: 10px 10px 0 rgba(0,0,0,.45); border-top: 14px solid var(--red); }
.stamp-confid { position: absolute; top: 26px; right: 26px; color: var(--red); border: 3px solid var(--red); padding: 2px 10px; font-size: 18px;
  letter-spacing: 3px; transform: rotate(8deg); opacity: .8; }
#brief-num { font-size: 13px; letter-spacing: 3px; color: var(--red); }
#brief-title { font-size: 42px; letter-spacing: 2px; line-height: 1; margin-top: 6px; }
#brief-en { font-family: var(--type); opacity: .6; margin-bottom: 16px; }
#brief-text p { font-family: var(--type); font-size: 16px; line-height: 1.55; margin-bottom: 10px; }
#brief-reward { font-size: 18px; letter-spacing: 2px; margin-top: 8px; }
.dossier .keys b, .result-card .keys b { color: var(--cream); }

.result-card { background: var(--paper); color: var(--ink); padding: 34px 50px; text-align: center; min-width: 420px; box-shadow: 10px 10px 0 rgba(0,0,0,.45); }
.result-card h3 { font-size: 34px; letter-spacing: 2px; }
.stamp { display: inline-block; font-size: 54px; font-weight: 700; letter-spacing: 6px; color: var(--red); border: 6px double var(--red);
  padding: 0 18px; transform: rotate(-6deg); margin-bottom: 16px; animation: stamp .35s ease-out; }
.stamp.ok { color: var(--olive); border-color: var(--olive); }
@keyframes stamp { from { transform: rotate(-6deg) scale(2.2); opacity: 0; } }
#res-reason { font-family: var(--type); margin-top: 6px; }
#res-reward { margin-top: 14px; font-size: 18px; letter-spacing: 2px; }

.map-frame { background: var(--paper); padding: 14px; box-shadow: 10px 10px 0 rgba(0,0,0,.45); text-align: center; color: var(--ink); }
.map-title { font-size: 20px; letter-spacing: 5px; margin-bottom: 10px; color: var(--red); }
#bigmap-canvas { display: block; border: 3px solid var(--ink); }
.leg.gold { color: var(--gold); } .leg.red { color: var(--red); } .leg.blue { color: var(--blue); }

#ending { background: linear-gradient(#0d0907, #4a0a14); }
.ending { max-width: 640px; text-align: center; padding: 20px; }
.ending p { font-family: var(--type); font-size: 19px; line-height: 1.6; margin-bottom: 16px; }
.ending p.en { font-size: 14px; opacity: .6; }
.ending h1 { font-size: 110px; letter-spacing: 20px; color: var(--red); text-shadow: 5px 5px 0 #000; }
