: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;
  /* the bullet-belt theme: dark leather, brass, cartridges */
  --brass: #8a6a2e; --brass-hi: #d9a441; --gold-hi: #f2c14e; --parch: #f0dcae; --stitch: rgba(217,164,65,.38);
  --leather: linear-gradient(180deg, #32241a, #1b130c);
  --grain: repeating-linear-gradient(45deg, rgba(255,255,255,.014) 0 2px, transparent 2px 5px);
  --rivet: #f6dd9a 0 1.6px, #b8862c 2.6px, #3d2a10 4.2px, transparent 4.6px;
  --rivets: radial-gradient(circle at 14px 14px, var(--rivet)), radial-gradient(circle at calc(100% - 14px) 14px, var(--rivet)),
    radial-gradient(circle at 14px calc(100% - 14px), var(--rivet)), radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), var(--rivet));
  /* one cartridge, lit (brass and copper) and unlit (dark); every belt, slider and menu bullet is this picture */
  --cart-lit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 70'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23a45a2e'/%3E%3Cstop offset='.45' stop-color='%23f0b07a'/%3E%3Cstop offset='1' stop-color='%237a3e1c'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%238a6120'/%3E%3Cstop offset='.4' stop-color='%23f6dd9a'/%3E%3Cstop offset='.75' stop-color='%23b8862c'/%3E%3Cstop offset='1' stop-color='%236b4a1b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 28C5 14 9 6 12 3c3 3 7 11 7 25z' fill='url(%23b)'/%3E%3Crect x='5' y='27' width='14' height='37' fill='url(%23c)'/%3E%3Crect x='5' y='27' width='14' height='2' fill='%23000' opacity='.35'/%3E%3Crect x='3' y='62' width='18' height='6' rx='1' fill='url(%23c)'/%3E%3Crect x='3' y='62' width='18' height='1' fill='%23000' opacity='.4'/%3E%3C/svg%3E");
  --cart-dim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 70'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%232c1f14'/%3E%3Cstop offset='.45' stop-color='%23503a28'/%3E%3Cstop offset='1' stop-color='%23221810'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23251a0f'/%3E%3Cstop offset='.4' stop-color='%23584426'/%3E%3Cstop offset='.75' stop-color='%23382a16'/%3E%3Cstop offset='1' stop-color='%231e150b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 28C5 14 9 6 12 3c3 3 7 11 7 25z' fill='url(%23b)'/%3E%3Crect x='5' y='27' width='14' height='37' fill='url(%23c)'/%3E%3Crect x='5' y='27' width='14' height='2' fill='%23000' opacity='.35'/%3E%3Crect x='3' y='62' width='18' height='6' rx='1' fill='url(%23c)'/%3E%3C/svg%3E");
}
* { 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; } /* no CSS filter on the canvas: it makes the browser re-process the whole screen every frame */
.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, rgba(150, 100, 50, .07) 50%, rgba(40, 20, 10, .42) 100%); }

/* ---------------- 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(--grain), var(--leather); border: 2px solid var(--brass); border-radius: 3px; color: var(--parch); padding: 8px 14px;
  box-shadow: inset 0 0 0 2px #1b130c, inset 0 0 0 3px rgba(217,164,65,.4), 3px 3px 0 rgba(0,0,0,.45); }
#suspicion .eye { width: 40px; height: 24px; }
#suspicion .eye path { fill: var(--brass-hi); }
#suspicion .eye circle { fill: #1b130c; transition: r .2s; r: 2; }
#suspicion.seen .eye circle { fill: var(--red); r: 6; }
#suspicion .meter { position: relative; width: 220px; height: 12px; background: #1b130c; border: 1px solid var(--brass); }
#susp-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(180deg, #f6dd9a, #b8862c); transition: width .2s; }
#suspicion .meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #1b130c; }
#suspicion .label { display: flex; flex-direction: column; min-width: 120px; line-height: 1; }
#suspicion .label b { font-size: 18px; letter-spacing: 2px; color: var(--gold-hi); }
#suspicion .label span { font-family: var(--type); font-size: 11px; opacity: .7; margin-top: 3px; }
#suspicion.tier-1 #susp-fill { background: linear-gradient(180deg, #ffd666, #d9a441); }
#suspicion.tier-2 #susp-fill, #suspicion.tier-3 #susp-fill, #suspicion.tier-4 #susp-fill { background: linear-gradient(180deg, #ee4a5f, #a30e24); }
#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); } }

.panel { background: rgba(28, 26, 22, .88); border: 2px solid var(--cream); box-shadow: 4px 4px 0 rgba(0,0,0,.4); }

/* Everything but the clock (top left), the minimap (bottom left) and the speedometer (bottom right) is one column at the top right.
   It stacks, so nothing in it can land on anything else. */
#topright { position: absolute; top: 14px; right: 14px; width: 248px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
#status { padding: 0 0 6px; }
#status .date { background: var(--red); color: var(--cream); padding: 2px 10px; font-size: 12px; letter-spacing: 2px; margin-bottom: 4px; }
#status .passage { display: flex; align-items: baseline; gap: 6px; padding: 0 10px; font-size: 11px; letter-spacing: 2px; }
#status .passage b { font-size: 17px; letter-spacing: 1px; color: var(--cream); }
#status .passage i { font-style: normal; opacity: .65; margin-left: auto; font-size: 11px; letter-spacing: 1px; }
#status .pbar { margin: 3px 10px 0; height: 5px; background: #3a3630; border: 1px solid var(--cream); }
#pass-fill { display: block; height: 100%; width: 0; background: var(--gold); }
#heat:empty { display: none; }

#mission-card { background: var(--paper); color: var(--ink); border-left: 7px solid var(--red); padding: 7px 10px 8px; box-shadow: 3px 3px 0 rgba(0,0,0,.35); }
.mc-head { font-size: 10px; letter-spacing: 3px; color: var(--red); display: flex; gap: 6px; align-items: baseline; }
#mc-timer { margin-left: auto; font-size: 15px; 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: 18px; font-weight: 700; letter-spacing: 1px; line-height: 1.1; margin: 1px 0 5px; }
#mc-obj { font-family: var(--type); font-size: 12.5px; line-height: 1.25; }
#mc-obj-en { font-family: var(--type); font-size: 10.5px; opacity: .6; margin-top: 2px; }
#mc-extra { font-size: 12px; margin-top: 6px; 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: 6px; background: rgba(28,26,22,.15); border: 1px solid var(--ink); }
#mc-extra .bar span { display: block; height: 100%; background: var(--red); }

/* The minimap: a round window in a brass-and-leather bezel ringed with cartridges (drawn by hud.js on #minimap-bezel). The N on the rim is the
   real north: it travels round the bezel as the map turns. */
#minimap-wrap { position: absolute; left: 44px; bottom: 44px; width: 184px; height: 184px; border-radius: 50%; }
#minimap { border-radius: 50%; display: block; width: 100%; height: 100%; }
#minimap-bezel { position: absolute; left: -24px; top: -24px; width: 232px; height: 232px; pointer-events: none; filter: drop-shadow(0 5px 6px rgba(0,0,0,.55)); }
#minimap-wrap .north { position: absolute; left: 0; top: 0; margin: -11px 0 0 -11px; transform: translate(92px, -12px); width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 19px;
  font-size: 12px; font-weight: 700; color: #fff3d0; background: radial-gradient(circle at 35% 30%, #e0485c, #8f0b1f); border: 2px solid #f2d68a; box-shadow: 0 2px 4px rgba(0,0,0,.6); z-index: 2; }
#district { position: absolute; bottom: -35px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 2; color: var(--parch);
  background: var(--grain), var(--leather); border: 2px solid var(--brass); border-radius: 3px; padding: 1px 14px; font-size: 12px; letter-spacing: 3px;
  box-shadow: inset 0 0 0 1px #1b130c, 2px 2px 0 rgba(0,0,0,.5); }

#gauge { position: absolute; right: 20px; bottom: 20px; width: 208px; height: 208px; border-radius: 50%; box-shadow: 0 6px 8px rgba(0,0,0,.5); }

/* the way to the next checkpoint, beside the minimap */
#route-info { position: absolute; left: 268px; bottom: 50px; display: flex; align-items: baseline; gap: 6px; padding: 3px 10px; font-size: 15px; letter-spacing: 2px;
  white-space: nowrap; }
#route-info b { background: #2f6fd0; color: #fff; padding: 0 8px; margin-right: 2px; }
#route-info b.obj { background: #c8102e; color: #fff3d0; }
#route-info small { font: 12px var(--type); letter-spacing: 0; opacity: .75; }
#route-info span { font: 12px var(--type); letter-spacing: 0; opacity: .7; padding-left: 8px; border-left: 1px solid rgba(239,227,198,.4); }

#prompt { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); color: var(--parch); background: var(--grain), var(--leather);
  border: 2px solid var(--brass); border-radius: 3px; padding: 8px 16px; font-size: 18px; letter-spacing: 2px;
  box-shadow: inset 0 0 0 2px #1b130c, inset 0 0 0 3px rgba(217,164,65,.4), 3px 3px 0 rgba(0,0,0,.45); }
#prompt b { background: linear-gradient(180deg, #f2d68a, #b8862c); color: #1b130c; border-radius: 2px; box-shadow: 0 2px 0 #5a3d12; padding: 0 8px; margin-right: 10px; }

#toasts { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 420px; }
.toast { background: var(--grain), var(--leather); color: var(--gold-hi); padding: 4px 14px; font-size: 18px; letter-spacing: 2px; font-weight: 700; border-radius: 3px;
  border: 2px solid var(--brass); box-shadow: inset 0 0 0 1px #1b130c, 3px 3px 0 rgba(0,0,0,.5); animation: toast 2.6s forwards; text-align: center; }
.toast.red { background: var(--grain), linear-gradient(180deg, #7a1224, #460a14); color: #fff3d0; border-color: var(--brass-hi); transform: rotate(-1.5deg); }
.toast small { display: block; font-family: var(--type); font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--parch); opacity: .85; }
@keyframes toast { 0% { opacity: 0; transform: scale(1.4); } 8% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------- the bullet-belt look, shared by every screen ---------------- */
.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, .set-foot b { background: linear-gradient(180deg, #f2d68a, #b8862c); color: #1b130c; padding: 1px 8px; border-radius: 2px; box-shadow: 0 2px 0 #5a3d12; }

/* a leather card with a brass edge, stitching and rivets */
.result-card, .map-frame, .set-card {
  position: relative; color: var(--parch); background: var(--rivets), var(--grain), var(--leather);
  border: 2px solid var(--brass); border-radius: 4px;
  box-shadow: inset 0 0 0 2px #1b130c, inset 0 0 0 3px rgba(217,164,65,.45), 0 18px 48px rgba(0,0,0,.65);
}
.result-card::after, .map-frame::after, .set-card::after { content: ''; position: absolute; inset: 8px; border: 1px dashed var(--stitch); border-radius: 2px; pointer-events: none; }

/* cartridges and the belts they stand in */
.cart { display: inline-block; flex: none; width: 14px; height: 40px; background: var(--cart-dim) center / contain no-repeat; transition: filter .15s; }
.cart.on { background-image: var(--cart-lit); }
.belt { --bw: min(720px, 90vw); position: relative; isolation: isolate; width: var(--bw); aspect-ratio: 864 / 70; background: var(--cart-lit) left top / calc(var(--bw) / 36) 100% repeat-x; }
.belt::before { content: ''; position: absolute; z-index: -1; left: -2%; right: -2%; top: 46%; height: 30%; background: linear-gradient(180deg, #4a3320, #2a1c10 60%, #1b130c);
  border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.belt::after { content: ''; position: absolute; z-index: -1; left: -2%; right: -2%; top: calc(46% + 6px); border-top: 1px dashed var(--stitch); }
.belt.dim { background-image: var(--cart-dim); }
.belt .lit { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--cart-lit) left top / calc(var(--bw) / 36) 100% repeat-x; transition: width .35s steps(6); }

/* the title and loading logo: brass letters on dark leather */
.star, .logo-h1 { background: linear-gradient(180deg, #fff0b8 0%, #f2c14e 38%, #b8862c 62%, #f2d68a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 0 0 #3d2a10) drop-shadow(-2px 0 0 #3d2a10) drop-shadow(0 2px 0 #3d2a10) drop-shadow(0 -2px 0 #3d2a10) drop-shadow(0 8px 10px rgba(0,0,0,.65)); }
.star { font-size: 70px; line-height: 1; }
.logo-h1 { font-size: clamp(64px, 11vw, 140px); line-height: .95; letter-spacing: 10px; font-weight: 700; padding: 0 0 6px 10px; }
.logo-h2 { display: inline-block; font-size: 24px; font-weight: 600; letter-spacing: 14px; margin: 8px 0 18px; padding: 3px 12px 3px 26px; color: var(--gold-hi);
  background: var(--grain), var(--leather); border: 2px solid var(--brass); border-radius: 3px; box-shadow: inset 0 0 0 1px #1b130c, 3px 3px 0 rgba(0,0,0,.5); }

/* the stitched frame round the edge of a full-screen leather page */
.frame::before { content: ''; position: absolute; inset: 14px; border: 2px dashed rgba(217,164,65,.3); border-radius: 6px; pointer-events: none; }
.frame::after { content: ''; position: absolute; inset: 22px; border: 1px solid rgba(138,106,46,.5); border-radius: 3px; pointer-events: none; }

/* ---------------- loading ---------------- */
#loading { z-index: 50; flex-direction: column; transition: opacity .7s; background: radial-gradient(ellipse at 50% 42%, #3d2c1c 0%, #1e150d 55%, #080503 100%); }
#loading.out { opacity: 0; pointer-events: none; }
.load-box { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px; }
.load-box .belt { margin-top: 12px; }
#load-pct { margin-top: 20px; font: 700 34px var(--display); letter-spacing: 4px; color: var(--gold-hi); text-shadow: 0 2px 0 #000; }
#load-text { margin-top: 4px; font: 17px var(--type); letter-spacing: 2px; color: var(--parch); min-height: 24px; }
#load-tip { margin-top: 26px; max-width: 540px; font: 13px/1.5 var(--type); color: var(--parch); opacity: .55; }
@keyframes shine { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
#loading .lit { animation: shine 1.4s ease-in-out infinite; }

/* ---------------- main menu ---------------- */
#title { background: radial-gradient(ellipse at 50% 42%, rgba(26,18,11,.5) 0%, rgba(14,9,5,.8) 62%, rgba(5,3,2,.94) 100%); }
.poster { position: relative; text-align: center; max-width: 860px; padding: 20px; display: flex; flex-direction: column; align-items: center; }
.poster .belt { margin: 4px 0 14px; }
.poster .tag { font-family: var(--type); font-size: 16px; line-height: 1.55; max-width: 600px; margin: 0 auto; color: var(--parch); opacity: .9; }
#save-info { font-family: var(--type); font-size: 13px; margin-top: 12px; color: var(--gold-hi); min-height: 16px; }
.controls { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; max-width: 780px; font-family: var(--type); font-size: 12.5px; color: var(--parch); opacity: .85; }
.controls b { font-family: var(--display); background: linear-gradient(180deg, #f2d68a, #b8862c); color: #1b130c; padding: 0 6px; letter-spacing: 1px; border-radius: 2px; box-shadow: 0 2px 0 #5a3d12; }

@media (max-width: 640px) {
  .star { font-size: 44px; }
  .logo-h1 { font-size: 17vw; letter-spacing: 3px; padding-left: 3px; }
  .logo-h2 { font-size: 15px; letter-spacing: 6px; padding: 3px 8px 3px 14px; }
  .poster { padding: 12px; }
  .poster .tag { font-size: 14px; }
  .controls { font-size: 11px; gap: 4px 10px; }
  .mbtn { font-size: 18px; letter-spacing: 4px; }
}

/* menu buttons: leather plates with a cartridge that lights when the mouse is over them */
.menu { display: flex; flex-direction: column; gap: 9px; width: min(400px, 86vw); margin: 18px auto 0; }
.mbtn { position: relative; display: flex; align-items: center; gap: 14px; font: 700 21px var(--display); letter-spacing: 5px; color: var(--parch); text-align: left; padding: 7px 16px 7px 14px; cursor: pointer;
  background: var(--grain), var(--leather); border: 2px solid var(--brass); border-radius: 3px;
  box-shadow: inset 0 0 0 2px #1b130c, inset 0 0 0 3px rgba(217,164,65,.4), 3px 3px 0 rgba(0,0,0,.5); transition: transform .12s, background .12s; }
.mbtn .cart { width: 13px; height: 38px; }
.mbtn kbd { margin-left: auto; font: 600 12px var(--display); letter-spacing: 2px; background: linear-gradient(180deg, #f2d68a, #b8862c); color: #1b130c; padding: 2px 8px; border-radius: 2px; box-shadow: 0 2px 0 #5a3d12; }
.mbtn:hover, .mbtn:focus-visible { background: var(--grain), linear-gradient(180deg, #6b4a1b, #3d2a10); border-color: var(--gold-hi); color: #fff3c8; transform: translateX(5px); outline: none; }
.mbtn:hover .cart, .mbtn:focus-visible .cart { background-image: var(--cart-lit); }
.mbtn.danger:hover { border-color: #e0485c; background: var(--grain), linear-gradient(180deg, #6a1424, #3a0a12); }

/* ---------------- result and pause cards ---------------- */
#brief, #result, #pause, #bigmap, #settings { background: radial-gradient(ellipse at center, rgba(22,14,8,.62), rgba(8,5,3,.86)); }
.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 { color: var(--cream); background: var(--red); box-shadow: none; }

.result-card { padding: 34px 50px; text-align: center; min-width: 420px; }
.result-card h3 { font-size: 34px; letter-spacing: 6px; color: var(--gold-hi); text-shadow: 0 2px 0 #000; }
.stamp { display: inline-block; font-size: 54px; font-weight: 700; letter-spacing: 6px; color: #ee4a5f; border: 6px double #ee4a5f;
  padding: 0 18px; transform: rotate(-6deg); margin-bottom: 16px; animation: stamp .35s ease-out; }
.stamp.ok { color: #9ad06b; border-color: #9ad06b; }
@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; color: var(--gold-hi); }
#pause .result-card { padding: 28px 40px 24px; }

/* ---------------- settings ---------------- */
.set-card { width: min(880px, 95vw); max-height: 94vh; overflow: auto; padding: 24px 34px 22px; text-align: left; }
.set-card h3 { font-size: 34px; letter-spacing: 8px; text-align: center; color: var(--gold-hi); text-shadow: 0 2px 0 #000; margin-bottom: 4px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } }
.set-sec h4 { display: flex; align-items: center; gap: 10px; font: 700 14px var(--display); letter-spacing: 5px; color: var(--brass-hi); margin: 18px 0 8px; padding-bottom: 5px; border-bottom: 1px solid rgba(217,164,65,.35); }
.set-sec h4::before { content: ''; width: 9px; height: 24px; background: var(--cart-lit) center / contain no-repeat; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 9px 0; font: 600 15px var(--display); letter-spacing: 2px; position: relative; z-index: 1; }
.set-row small { display: block; font: 12px var(--type); letter-spacing: 0; opacity: .6; margin-top: 1px; }
.pills { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font: 600 13px var(--display); letter-spacing: 2px; padding: 4px 11px; cursor: pointer; color: var(--parch); background: linear-gradient(180deg, #3a2a1c, #22170e); border: 1px solid #6b4f22; border-radius: 2px; box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.pill:hover { border-color: var(--gold-hi); color: #fff3c8; }
.pill.on { background: linear-gradient(180deg, #f6dd9a, #b8862c); color: #1b130c; border-color: var(--gold-hi); box-shadow: 0 0 9px rgba(242,193,78,.4), 0 2px 0 #5a3d12; }
.slider { display: flex; align-items: center; gap: 2px; cursor: pointer; touch-action: none; }
.slider .cart { width: 12px; height: 36px; }
.slider b { min-width: 42px; margin-left: 8px; text-align: right; color: var(--gold-hi); font-size: 15px; letter-spacing: 1px; }
#gfx-note { position: relative; z-index: 1; font: 12px var(--type); opacity: .7; margin-top: 6px; line-height: 1.4; }
.set-foot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
.set-foot .mbtn { width: 260px; justify-content: center; }

/* the controls list on the pause card */
#pause-extra { position: relative; z-index: 1; margin-top: 20px; text-align: left; }
#pause-extra h4 { font: 700 14px var(--display); letter-spacing: 5px; color: var(--brass-hi); margin: 0 0 8px; padding-bottom: 5px; border-bottom: 1px solid rgba(217,164,65,.35); }
#pause-extra .help { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 22px; font: 13px var(--type); }
#pause-extra .help b { font-family: var(--display); background: linear-gradient(180deg, #f2d68a, #b8862c); color: #1b130c; padding: 0 6px; margin-right: 6px; letter-spacing: 1px; font-weight: 600; border-radius: 2px; }

/* ---------------- the map (M) ---------------- */
.map-frame { padding: 16px 16px 12px; text-align: center; }
.map-head { position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 8px; }
.map-title { font-size: 20px; letter-spacing: 6px; color: var(--gold-hi); text-shadow: 0 2px 0 #000; white-space: nowrap; }
.map-title::before { content: '★ '; color: var(--brass-hi); }
#map-route { font: 600 15px var(--display); letter-spacing: 2px; text-align: right; color: var(--parch); }
#map-route b { color: #8ec1ff; }
#bigmap-canvas { position: relative; z-index: 1; display: block; border: 3px solid var(--brass); box-shadow: 0 0 0 3px #1b130c, 0 0 0 5px rgba(217,164,65,.5); cursor: crosshair; touch-action: none; }
.map-tools { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; min-height: 28px; }
.map-tools button { font: 600 14px var(--display); letter-spacing: 2px; padding: 3px 13px; cursor: pointer; color: var(--parch); background: linear-gradient(180deg, #3a2a1c, #22170e); border: 2px solid #6b4f22; border-radius: 2px; box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.map-tools button:hover { color: #1b130c; background: linear-gradient(180deg, #f6dd9a, #b8862c); border-color: var(--gold-hi); }
#map-msg { font: 13px var(--type); color: var(--gold-hi); margin-left: 10px; }
#bigmap .keys { position: relative; z-index: 1; margin-top: 8px; font-size: 13px; letter-spacing: 1px; }
.leg.gold { color: var(--gold-hi); } .leg.red { color: #ee4a5f; } .leg.blue { color: #6fa4ff; }

#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; }
