/* Everything drawn over the game. Sizes are written for a 1280 x 720 window; --ui (set in index.html and ui.js) scales the lot to the window. */
:root { --ui: 1; --cream: #f4ead0; --gold: #ffe9a8; --ink: #14121a; --red: #ff6a5a; --green: #9fe07a; --yel: #ffe070; --cy: #9fd0ff; --dim: #b9c0d8; --plate: rgba(8, 9, 14, .64); }
html, body { margin: 0; height: 100%; background: #05060a; overflow: hidden; }
body { font-family: 'VT323', ui-monospace, Menlo, Consolas, monospace; color: var(--cream); font-size: 22px; line-height: 1; user-select: none; -webkit-user-select: none; cursor: default; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud, .panel { zoom: var(--ui); }
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: -2px 0 #000, 2px 0 #000, 0 -2px #000, 0 2px #000, 2px 3px 0 #000; }
#hud.off { display: none; }
.hidden { display: none !important; }
#cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--cream); box-shadow: 0 0 0 2px #000; }

/* ---- small pixel pictures (drawn in ui.js) ---- */
.ic { display: inline-block; width: 22px; height: 22px; background: center / contain no-repeat; image-rendering: pixelated; vertical-align: -4px; }

/* ---- a key to press: the cap itself fills while you hold it ---- */
kbd { font: inherit; display: inline-block; position: relative; min-width: .8em; padding: 0 .36em 1px; margin: 0 .34em 0 0; text-align: center; color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 0 3px 0 var(--ink); text-shadow: none; overflow: hidden; vertical-align: 1px; white-space: nowrap; }
kbd > u { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--green); }
kbd > span { position: relative; text-decoration: none; }
kbd.down { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); background: var(--green); }
/* a controller's four face buttons, with the one to press filled in (never a letter) */
kbd .face { display: inline-block; position: relative; width: .84em; height: .84em; margin-right: .3em; vertical-align: -2px; }
kbd .face::before, kbd .face::after { content: ''; position: absolute; inset: 0; }
kbd .face { background: radial-gradient(circle at 50% 14%, #14121a44 0 .14em, transparent .15em), radial-gradient(circle at 50% 86%, #14121a44 0 .14em, transparent .15em), radial-gradient(circle at 14% 50%, #14121a44 0 .14em, transparent .15em), radial-gradient(circle at 86% 50%, #14121a44 0 .14em, transparent .15em); }
kbd .face.t::after { background: radial-gradient(circle at 50% 14%, var(--ink) 0 .2em, transparent .21em); }
kbd .face.b::after { background: radial-gradient(circle at 50% 86%, var(--ink) 0 .2em, transparent .21em); }
kbd .face.l::after { background: radial-gradient(circle at 14% 50%, var(--ink) 0 .2em, transparent .21em); }
kbd .face.r::after { background: radial-gradient(circle at 86% 50%, var(--ink) 0 .2em, transparent .21em); }
.co { font-size: 0; }
.hold { color: var(--yel); margin-right: .3em; }
/* waiting: a ring that empties round a whole number. It keeps its width, so the words beside it stay still. */
.dial { display: inline-block; position: relative; width: 1.5em; height: 1.5em; margin: -.25em .3em; border-radius: 50%; vertical-align: middle; background: conic-gradient(var(--yel) calc(var(--f, 1) * 1turn), #000a 0); box-shadow: 0 0 0 2px var(--ink); text-align: center; line-height: 1.5em; }
.dial::before { content: ''; position: absolute; inset: .2em; border-radius: 50%; background: var(--ink); }
.dial b { position: relative; font-weight: normal; color: var(--cream); text-shadow: none; }
/* how far along a job is: a bar and a number, both a fixed width */
.meter { display: inline-block; width: 110px; height: 12px; margin: 0 .4em; border: 2px solid var(--ink); outline: 2px solid var(--cream); background: #000a; vertical-align: middle; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); }
.pc { display: inline-block; width: 2.1em; text-align: left; font-weight: normal; }

/* ---- top middle: which part of the night this is, and what starts the next ---- */
#top { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); text-align: center; white-space: nowrap; }
#wave { font-size: 46px; letter-spacing: 3px; color: var(--gold); }
#wave.raid { color: #ffb0a0; }
#phase { font-size: 26px; margin-top: 3px; min-height: 30px; }
#phase.go kbd { animation: nudge 1s steps(2) infinite; }
#phase.go { color: var(--yel); }
@keyframes nudge { 50% { background: var(--yel); transform: translateY(-2px); } }
#raidbar { width: 240px; margin: 6px auto 0; }
#raidbar i { background: #9fe07a; }
.bar { height: 8px; background: #000a; border: 2px solid var(--ink); outline: 1px solid #f4ead0aa; }
.bar i { display: block; height: 100%; width: 50%; background: #e0b040; }
.bar.hp i { background: #d43a2f; }
/* (r15hud) the one alarm line: short, small, one at a time, gone in about 3 s (guide_coach.js). A thief with gold, a breach, your gun empty */
#alerts { position: absolute; left: 0; right: 0; top: 112px; font-size: 21px; letter-spacing: 1px; }
#alerts div { width: fit-content; margin: 0 auto; padding: 1px 10px 2px 8px; background: rgba(60, 10, 8, .62); color: #ffd2c4; animation: drop .25s steps(3); }      /* (it fades out on the game's clock: guide_coach.js alarmsTick) */
#alerts div::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; vertical-align: 2px; background: var(--red); box-shadow: 0 0 0 1px #000; }
#alerts div.old { animation: none; }
#alerts .warn { background: rgba(56, 42, 6, .62); color: var(--gold); } #alerts .warn::before { background: var(--yel); }
#alerts .good { background: rgba(14, 50, 16, .62); color: #d6f5c4; } #alerts .good::before { background: var(--green); }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
@keyframes blink { 50% { opacity: .25; } }

/* ---- top left: the purse, then what to do next ---- */
#left { position: absolute; left: 16px; top: 10px; width: 400px; }
.cap { font-size: 18px; color: var(--dim); letter-spacing: 1px; } .cap span { opacity: .75; text-transform: none; letter-spacing: 0; }
#loot { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 3px; font-size: 30px; }
#loot span { display: inline-flex; align-items: baseline; gap: 5px; } #loot .ic { width: 24px; height: 24px; align-self: center; }
#loot b { font-weight: normal; } #loot em { font-style: normal; font-size: 17px; color: var(--dim); }
#loot .g b { color: #ffd040; } #loot .g.down b { color: #ff5a40; } #loot .g.down { animation: golddrop .7s steps(7); } #loot .g.up { animation: goldup .5s steps(5); } #loot .g.low b { color: var(--red); }
#loot .out { font-size: 24px; padding: 0 8px; background: var(--plate); text-shadow: 0 2px 0 #000; } #loot .out:empty { display: none; } #loot .out.k { color: #ff6a50; } #loot .out.y { color: var(--yel); }
@keyframes golddrop { 0% { transform: translate(0, 0) scale(1.25); } 20% { transform: translate(-5px, 2px) scale(1.2); } 40% { transform: translate(5px, -1px) scale(1.15); } 60% { transform: translate(-3px, 1px) scale(1.08); } 100% { transform: none; } }
@keyframes goldup { 0% { transform: scale(1.18); } 100% { transform: none; } }
#coach, #jobs { margin-top: 12px; font-size: 22px; }
#coach .hd, #jobs .hd { color: var(--yel); font-size: 23px; margin-bottom: 3px; }
#jobs .tip { color: var(--cy); font-size: 19px; margin-bottom: 4px; white-space: normal; }
#coach div, #jobs div { margin-top: 3px; }
#coach i, #jobs i { display: inline-block; width: 13px; height: 13px; margin-right: 9px; border: 2px solid var(--cream); box-shadow: 0 0 0 2px #000; vertical-align: -1px; }
#coach .done, #jobs .done { color: var(--green); opacity: .85; } #coach .done i, #jobs .done i { border-color: var(--green); background: var(--green); }
#coach .todo { color: var(--dim); }
#coach .cur { color: var(--gold); font-size: 25px; } #coach .cur i { border-color: var(--yel); background: var(--yel); animation: blink 1s steps(2) infinite; }
#coach .note, #jobs .note { color: var(--dim); font-size: 19px; }
#jobs em { font-style: normal; color: var(--dim); font-size: 19px; margin-left: 8px; } #jobs u { text-decoration: none; color: var(--yel); margin-left: 8px; }

/* ---- top right: the two things you can lose, and who is here ---- */
#right { position: absolute; right: 16px; top: 12px; width: 300px; font-size: 21px; }
#castle .row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#castle .nm { width: 84px; text-align: left; white-space: nowrap; } #castle .bar { flex: 1; height: 10px; } #castle .v { width: 44px; text-align: right; }
#castle .low .bar i { animation: blink .6s steps(2) infinite; } #castle .low .nm { color: var(--red); }
#castle .mood .bar i { background: #e0b040; }
#castle .say { text-align: right; margin: -1px 0 6px; font-size: 21px; } #castle .say.k { color: var(--red); } #castle .say.y { color: var(--yel); }
#players { margin-top: 8px; text-align: right; font-size: 20px; }
#players .cap { margin-bottom: 2px; } #players div { margin-top: 2px; }
#players .dead { color: var(--red); } #players .z { color: #ff8a50; } #players .rdy { color: var(--green); } #players .me { color: var(--gold); }

/* ---- bottom left: you, and what has been happening ---- */
#feed { position: absolute; left: 16px; bottom: 124px; font-size: 21px; max-width: 470px; opacity: .92; }
#feed div { margin-top: 3px; }
#feed .k { color: #ff8a70; } #feed .t { color: #ff5a40; } #feed .q { color: #ffd98a; font-style: italic; } #feed .g { color: var(--green); } #feed .y { color: var(--yel); } #feed .c { color: var(--cy); }
#vitals { position: absolute; left: 16px; bottom: 16px; width: 520px; }
#hprow { display: flex; align-items: center; gap: 8px; width: 300px; font-size: 24px; } #hprow .bar { flex: 1; height: 12px; } #hpn { font-weight: normal; width: 40px; }
#chips { margin-top: 7px; font-size: 21px; min-height: 26px; }
#chips .row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 20px; } #chips .seg { white-space: nowrap; margin-left: 0; }
#chips .bad { color: var(--red); } #chips .good { color: var(--green); } #chips .dial { font-size: 17px; margin: -.3em .2em -.3em .3em; }
#chips .pip { display: inline-block; width: 9px; height: 12px; margin-left: 3px; border-radius: 5px; border: 2px solid #000; background: #3a3020; vertical-align: -1px; } #chips .pip.on { background: #b98a4a; }

/* ---- what you can do right now (under the dot), and what your hands can do (under that) ---- */
#prompt, #status, #stinfo { position: absolute; left: 0; right: 0; text-align: center; white-space: nowrap; }
#prompt { top: 59%; font-size: 30px; }
#status { top: 67.5%; font-size: 23px; color: var(--yel); }
#prompt .row, #status .row { display: inline-block; padding: 5px 14px 6px; background: var(--plate); border: 2px solid var(--ink); }
#status .row { padding: 3px 12px 4px; }
.seg + .seg { margin-left: 1.1em; }
#stinfo { display: none; bottom: 104px; font-size: 26px; color: var(--gold); }
/* on a machine the words drop to the bottom: the middle is where you are aiming */
#hud.mounted #prompt { top: auto; bottom: 58px; font-size: 25px; } #hud.mounted #status { top: auto; bottom: 22px; font-size: 22px; } #hud.mounted #stinfo { display: block; }
#hud.mounted #feed { bottom: 124px; }
/* (hands) with something in your hands, its hints sit just under the dot, above whatever you hold: lower down they covered it */
#hud.holding:not(.mounted) #status { top: 53.5%; }
/* (r15fx) with a throw line up (src/throw_arc_fx.js), the hint steps off the middle: the line and the ring where it lands run straight down it */
#hud.arcing:not(.mounted) #prompt { left: calc(50% + 54px); right: auto; text-align: left; }
#stinfo .row { display: inline-block; padding: 3px 12px 4px; background: var(--plate); border: 2px solid var(--ink); } #stinfo .bad { color: var(--red); }
#stinfo.low, #stinfo.out { color: var(--red); } #stinfo.out .row { animation: blink .5s steps(2) infinite; }      /* (r11ammo) the machine gun's ammo: low, and out */
#big { position: absolute; left: 0; right: 0; top: 27%; text-align: center; font-size: 50px; color: var(--gold); white-space: pre-line; }      /* (r15hud) was 64 px: a raid's name, a thing bought, is said, not shouted */
#big small { display: block; font-size: 24px; line-height: 1.1; color: var(--cream); margin-top: 4px; }
#dead { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: 720px; padding: 10px 18px 12px; background: var(--plate); border: 2px solid var(--ink); font-size: 24px; text-align: left; }
#dead .hd { font-size: 34px; color: #ffb0a0; margin-bottom: 4px; } #dead div { margin-top: 5px; } #dead .dim { color: var(--dim); }
#hurt { position: absolute; inset: 0; background: radial-gradient(transparent 45%, #a00000); opacity: 0; transition: opacity .15s; }

/* ---- marks pinned to places in the world (guide_coach.js) ---- */
/* (r15hud) no words, no metres. On screen: a small chevron over the place, pointing down at it. Off screen: a thin see-through chevron at the edge,
   turned (by guide_coach.js) the way to look. The colour says what it is: red trouble (a thief, the last few, whoever got in), yellow the one thing
   the game nudges you to, blue where what you carry goes or a thing to pick up. */
#marks { position: absolute; inset: 0; overflow: hidden; }
.mk { position: absolute; left: 0; top: 0; width: 0; height: 0; display: flex; flex-direction: column; align-items: center; will-change: transform; --mk: var(--yel); filter: drop-shadow(0 0 1px rgba(0, 0, 0, .9)) drop-shadow(1px 1px 0 rgba(0, 0, 0, .6)); }
.mk i { flex: none; width: 14px; height: 9px; margin-top: -9px; background: var(--mk); opacity: .8; clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 42%, 50% 100%, 0 42%); }
.mk.go i { animation: bob .9s steps(4) infinite alternate; }
.mk.bad, .mk.last { --mk: #ff6a52; } .mk.thief { --mk: #ff3a24; } .mk.job { --mk: var(--cy); }
.mk.thief i { width: 18px; height: 11px; margin-top: -11px; opacity: .95; }
.mk.off i { width: 26px; height: 15px; margin: -7px 0 0; opacity: .78; clip-path: polygon(50% 0, 100% 72%, 100% 100%, 50% 34%, 0 100%, 0 72%); animation: none; }
.mk.thief.off i { width: 36px; height: 21px; margin-top: -10px; opacity: .95; }      /* a thief behind you is the one arrow that matters */
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-5px); } }

/* ---- panels: title, pause, the opening, the merchant, the awards ---- */
.panel { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(4, 5, 10, .72); text-shadow: 2px 2px 0 #000; z-index: 5; }
#menu { background: radial-gradient(ellipse at center, rgba(5, 6, 12, .3), rgba(5, 6, 12, .78)); }
#menu { justify-content: flex-start; padding-top: 64px; box-sizing: border-box; }
.panel h1 { font-size: 104px; margin: 0; color: var(--gold); font-weight: normal; letter-spacing: 4px; line-height: .9; text-shadow: 4px 4px 0 #000; }
.panel h2 { font-size: 44px; margin: 0 0 10px; color: var(--gold); font-weight: normal; letter-spacing: 1px; }
.panel p { margin: 5px 0; font-size: 24px; max-width: 900px; text-align: center; }
.panel p.dim { color: var(--dim); }
.btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; min-width: 380px; }
.btn { font: inherit; font-size: 30px; color: var(--cream); background: #1b1e2c; border: 3px solid var(--cream); box-shadow: 4px 4px 0 #000; padding: 6px 18px; text-align: center; cursor: pointer; pointer-events: auto; }
.btn.sel, .btn:hover { background: var(--cream); color: #10121c; text-shadow: none; }
.btn.off { opacity: .45; }
.keys { margin-top: 20px; padding: 10px 16px; font-size: 21px; color: var(--dim); display: grid; grid-template-columns: repeat(3, auto auto); gap: 7px 10px; align-items: center; background: rgba(8, 9, 14, .5); border: 2px solid var(--ink); }
.keys kbd { justify-self: end; margin: 0; } .keys span { margin-right: 14px; }
.keys .cap { grid-column: 1 / -1; text-align: center; margin-bottom: 2px; }
.foot { margin-top: 12px; font-size: 22px; color: var(--dim); }
/* joining with a code: a box per letter, so a controller can spell it */
.codebox { display: flex; gap: 8px; margin: 14px 0 4px; }
.codebox b { width: 46px; height: 58px; font-size: 52px; line-height: 58px; text-align: center; font-weight: normal; color: var(--gold); background: #000; border: 3px solid #6b7088; }
.codebox b.at { border-color: var(--cream); animation: blink 1s steps(2) infinite; }
/* the opening: the whole game in three lines */
#intro { background: rgba(4, 5, 10, .8); }
#intro .rules { margin: 6px 0 4px; text-align: left; }
#intro .rules div { display: flex; align-items: center; gap: 16px; font-size: 31px; margin: 11px 0; max-width: 940px; }
#intro .rules b { flex: none; width: 46px; height: 46px; line-height: 44px; text-align: center; font-size: 38px; font-weight: normal; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); box-shadow: 3px 3px 0 #000; text-shadow: none; }
#intro .rules em { font-style: normal; color: var(--yel); }

/* the merchant (merchant_panel.js): pictures in cards, five groups, the next raid on top, one strip that explains */
#shop { justify-content: flex-start; padding-top: 8px; background: rgba(4, 5, 10, .93); }
#shop .mp { width: 1220px; display: flex; flex-direction: column; gap: 6px; }
.mp-top { display: flex; align-items: center; gap: 18px; }
.mp-top .who { flex: 1; text-align: left; } .mp-top h2 { font-size: 36px; margin: 0; line-height: 1; } .mp-top .dim { font-size: 20px; color: var(--dim); }
.mp-top .purse { display: flex; align-items: center; gap: 16px; padding: 4px 14px; border: 3px solid var(--ink); outline: 2px solid #6b7088; background: #10131ccc; }
.mp-top .purse .cap { font-size: 17px; line-height: .95; text-align: right; }
.mp-top .lt { display: inline-flex; align-items: center; gap: 6px; } .mp-top .lt .ic { width: 32px; height: 32px; } .mp-top .lt b { font-weight: normal; font-size: 38px; } .mp-top .lt small { font-size: 18px; color: var(--dim); }
.lt.g b { color: #ffd040; }
.mp-top .raidp { color: var(--red); font-size: 20px; }
.mp-top .x { pointer-events: auto; cursor: pointer; font-size: 22px; padding: 4px 10px; border: 3px solid var(--ink); background: #2a2f4a; box-shadow: 3px 3px 0 #000; } .mp-top .x:hover { background: #3c4366; }
.mp-raid { display: flex; align-items: stretch; gap: 8px; }
.mp-raid .lbl { width: 168px; flex: none; display: flex; flex-direction: column; justify-content: center; text-align: left; padding: 0 10px; background: #3a1410cc; border: 3px solid var(--ink); outline: 2px solid #8a3a2a; }
.mp-raid .lbl b { font-weight: normal; font-size: 30px; color: var(--yel); } .mp-raid .lbl span { font-size: 18px; color: #ffd9cc; line-height: 1; }
.mp-raid .row { display: flex; gap: 8px; flex: 1; } .mp-raid .none { margin: 0; align-self: center; font-size: 24px; color: var(--dim); }
.mp-raid .mc { flex: 1; max-width: 340px; height: 84px; display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto 1fr auto; column-gap: 8px; padding: 4px 8px 4px 4px; }
.mp-raid .mc .pic { grid-row: 1 / 4; width: 70px; height: 70px; margin: 0; }
.mp-raid .mc { text-align: left; align-items: start; } .mp-raid .mc b { min-height: 0; font-size: 22px; justify-content: flex-start; } .mp-raid .mc .cost { position: static; justify-content: flex-start; }
.mp-raid .mc .why { position: static; font-size: 17px; color: var(--yel); } .mp-raid .mc .have, .mp-raid .mc .pips { display: none; }
.mp-tabs { display: flex; gap: 8px; justify-content: center; align-items: center; }
.mp-tabs .tb { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 7px; font-size: 24px; padding: 3px 14px 3px 8px; border: 3px solid var(--ink); background: #1c2030; color: var(--dim); box-shadow: 3px 3px 0 #000; }
.mp-tabs .tb img { width: 24px; height: 24px; image-rendering: pixelated; } .mp-tabs .tb:hover { color: var(--cream); }
.mp-tabs .tb.sel { background: var(--gold); color: var(--ink); text-shadow: none; } .mp-tabs .k kbd { font-size: 20px; }
.mp-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; max-height: 290px; overflow-y: auto; align-content: start; padding: 2px 4px 4px; scrollbar-width: thin; scrollbar-color: #6b7088 transparent; position: relative; }
.mp-more { height: 18px; margin-top: -4px; position: relative; } .mp-more.on::after { content: 'MORE BELOW'; position: absolute; left: 50%; transform: translateX(-50%); top: 0; font-size: 18px; color: var(--ink); background: var(--yel); padding: 0 6px; text-shadow: none; animation: blink 1s steps(2) infinite; }
.mc { position: relative; height: 134px; pointer-events: auto; cursor: pointer; display: flex; flex-direction: column; align-items: center; padding: 4px 4px 3px; border: 3px solid var(--ink); outline: 2px solid #4a4f66; background: #161a28; box-shadow: 3px 3px 0 #000; text-align: center; }
.mc .pic { position: relative; width: 66px; height: 66px; flex: none; }
.pic { position: relative; display: inline-block; } .pic img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.pic .upb { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; } .pic .bd { position: absolute; right: -4px; bottom: -2px; width: 26px; height: 26px; }
.pic .bd.tx { width: auto; height: auto; font-style: normal; font-size: 20px; color: var(--yel); }
.mc b { font-weight: normal; font-size: 20px; line-height: .9; color: var(--gold); min-height: 36px; display: flex; align-items: center; justify-content: center; }
.mc .cost, .mp-detail .cost { display: flex; gap: 6px; justify-content: center; font-size: 22px; } .mc .cost span, .mp-detail .cost span { margin: 0; }
.mc .pips { position: absolute; right: 5px; top: 5px; display: flex; flex-direction: column; gap: 3px; } .mc .pips i { width: 10px; height: 10px; border: 2px solid var(--ink); background: #2a2f44; } .mc .pips i.on { background: var(--green); }
.mc .have { position: absolute; left: 4px; top: 3px; font-size: 16px; color: var(--green); } .mc .have.no { color: #9a9fb5; }
.mc.can { outline-color: #b9c0d8; background: #1e2336; }
.mc.lacks .pic img:first-child { opacity: .75; }
.mc.poor .pic img { filter: grayscale(.45) brightness(.72); } .mc.done .pic img { filter: grayscale(.8) brightness(.5); } .mc.poor b, .mc.done b { color: #9a9fb5; }
.mc.done .cost { visibility: hidden; }
.mc .stamp { position: absolute; left: 50%; top: 30px; transform: translateX(-50%) rotate(-8deg); font-size: 22px; padding: 0 6px; color: var(--cream); background: #3a3f55; border: 2px solid var(--ink); white-space: nowrap; }
.mc.sel { outline: 3px solid var(--yel); background: #2e3552; z-index: 1; }
.mc.sel.can { animation: lift .6s steps(2) infinite; }
@keyframes lift { 50% { transform: translateY(-2px); } }
.mc.hit { animation: hit .5s steps(4); } @keyframes hit { 0% { background: var(--green); } }
.mc .bought { position: absolute; left: 50%; top: 26px; font-size: 30px; color: var(--ink); background: var(--green); border: 3px solid var(--ink); padding: 0 8px; text-shadow: none; transform: translateX(-50%) rotate(-10deg); animation: stampin .25s steps(3), fade 1.4s 1s steps(4) forwards; pointer-events: none; }
@keyframes stampin { 0% { transform: translateX(-50%) rotate(-10deg) scale(2.2); opacity: 0; } } @keyframes fade { to { opacity: 0; } }
.mc.nope, .mp-detail .say.nope { animation: shake .3s steps(6); } @keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.cost .g { color: #ffd040; } .cost .short { color: var(--red); }
.cost .ic { width: 20px; height: 20px; vertical-align: -3px; margin-right: 2px; }
.mp-detail { display: flex; align-items: center; gap: 14px; height: 112px; padding: 6px 12px; border: 3px solid var(--ink); outline: 2px solid #6b7088; background: #10131cee; text-align: left; }
.mp-detail .pic.big { width: 96px; height: 96px; flex: none; }
.mp-detail .txt { flex: 1; } .mp-detail .txt b { font-weight: normal; font-size: 30px; color: var(--gold); } .mp-detail .txt em { font-style: normal; font-size: 20px; color: var(--green); margin-left: 8px; }
.mp-detail .txt p { margin: 2px 0; font-size: 24px; text-align: left; max-width: none; }
.mp-detail .then { color: #cfe8c0; display: flex; align-items: center; gap: 8px; } .mp-detail .then img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.mp-detail .warn { color: var(--yel); font-size: 21px !important; }
.mp-detail .act { flex: none; width: 300px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mp-detail .cost.big { font-size: 30px; } .mp-detail .cost.big .ic { width: 28px; height: 28px; }
.mp-detail .say { font-size: 22px; text-align: right; } .mp-detail .say.g { color: var(--green); } .mp-detail .say.k { color: #ff8a70; } .mp-detail .say .cost { display: inline-flex; font-size: 24px; }
.mp-detail .buy { pointer-events: auto; cursor: pointer; font-size: 26px; }
.mp-foot { font-size: 20px; color: var(--dim); }
.mp-fly { position: fixed; z-index: 30; image-rendering: pixelated; pointer-events: none; transition: all .7s cubic-bezier(.5, -0.3, .8, .6); }
#awards h2 { font-size: 60px; margin-bottom: 0; }
#awards .aws { display: grid; grid-template-columns: repeat(2, auto); gap: 5px 34px; margin-top: 14px; }
#awards .aw { font-size: 27px; color: var(--dim); text-align: left; } #awards .aw b { color: var(--yel); font-weight: normal; } #awards .aw em { font-style: normal; color: var(--cream); }

/* ---- the merchant (merchant_panel.js): you talk to him, then look at his cart */
.mt { width: 1220px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; text-align: left; }
.mt .mtk { display: inline-block; line-height: 1.1; font: inherit; font-size: .85em; background: var(--cream); color: var(--ink); padding: 0 6px 2px; text-shadow: none; border-bottom: 3px solid #8a8070; }
.mt .purse { display: flex; align-items: center; gap: 16px; padding: 4px 14px; border: 3px solid var(--ink); outline: 2px solid #6b7088; background: #10131cee; height: 52px; }
.mt .purse .cap { font-size: 16px; line-height: .95; text-align: right; color: var(--dim); }
.mt .purse .lt { display: inline-flex; align-items: center; gap: 6px; } .mt .purse .lt .ic { width: 28px; height: 28px; } .mt .purse .lt b { font-weight: normal; font-size: 34px; }
.mt .purse .raidp { color: var(--red); font-size: 18px; }
.mt-keys { font-size: 20px; color: var(--dim); display: flex; gap: 6px; align-items: center; } .mt-keys .r { margin-left: auto; color: var(--gold); }
/* his cart, after Drink The Ocean's shop: one light board with a dark frame, a title bar with the purse and a close button,
   big topic tabs, roomy cards that each end in one button (price / BUILT / locked), and the highlighted thing explained on the right */
.mt-cart { height: calc(100vh / var(--ui, 1) - 40px); max-height: 690px; gap: 10px; padding: 12px 14px 10px; background: #efe2bf; color: #2a1d10; border: 4px solid #2a1d10; box-shadow: 0 0 0 4px #6a4a20, 10px 12px 0 4px rgba(0, 0, 0, .55); text-shadow: none; }
.mt-cart .mtk { background: #2a1d10; color: #efe2bf; border-bottom-color: #000; }
.mt-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: stretch; }
.mt-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #6a4a20; color: #efe2bf; border: 3px solid #2a1d10; box-shadow: 0 4px 0 #2a1d10; font-size: 40px; letter-spacing: 1px; height: 58px; }
.mt-head img { width: 40px; height: 40px; image-rendering: pixelated; }
.mt-cart .purse { height: 58px; background: #2a1d10; border: 3px solid #2a1d10; outline: none; box-shadow: 0 4px 0 #000; text-shadow: 2px 2px 0 #000; }
.mt-cart .purse .cap { color: #c9b48a; }
.mt-top .x { cursor: pointer; width: 64px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f7efd9; color: #2a1d10; border: 3px solid #2a1d10; box-shadow: 0 4px 0 #2a1d10; font-size: 40px; line-height: .8; }
.mt-top .x small { font-size: 15px; } .mt-top .x:hover { background: #fff; }
.mt-bubble { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 16px; background: #fff6dc; color: #2a1d10; border: 3px solid #ff8a3a; font-size: 28px; line-height: 1.05; text-shadow: none; }
.mt-bubble .who { flex: none; font-size: 18px; color: #fff6dc; background: #6a4a20; padding: 1px 8px 2px; }
.mt-tabs { display: flex; gap: 8px; }
.mt-tab { flex: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 8px; font-size: 24px; white-space: nowrap; background: #f7efd9; color: #2a1d10; border: 3px solid #2a1d10; box-shadow: 0 4px 0 #2a1d10; }
.mt-tab:hover { background: #fff; } .mt-tab.sel { background: #ffc531; } .mt-tab .n { font-size: 18px; background: #ff8a3a; color: #2a1d10; padding: 0 5px 1px; }
.mt-body { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 12px; flex: 1; min-height: 0; }
.mt-shelf { overflow-y: auto; padding: 8px 8px 10px; scrollbar-width: thin; scrollbar-color: #6a4a20 transparent; }
.mt-shelf h3 { font-size: 22px; color: #a0461a; margin: 2px 0 6px; font-weight: normal; }
.mt-shelf .none { font-size: 26px; color: #6a4a20; text-align: left; margin: 8px 4px; }
.mt-shelf .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; margin-bottom: 12px; }
.mt-card { position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 8px 9px; background: #f7efd9; border: 3px solid #6a4a20; box-shadow: 0 4px 0 #6a4a20; }
.mt-card:hover { background: #fffaf0; }
.mt-card .pic { width: 78px; height: 78px; }
.mt-card b { font-weight: normal; font-size: 23px; color: #2a1d10; text-align: center; line-height: .92; min-height: 42px; display: flex; align-items: center; }
.mt-card .tg { position: absolute; top: 4px; left: 4px; font-size: 15px; padding: 1px 5px 2px; color: #2a1d10; background: #ffc531; border: 2px solid #2a1d10; }
.mt-card .tg.new { background: #ff8a3a; } .mt-card .tg.own { background: #b9e59a; } .mt-card .tg.two { left: auto; right: 5px; background: #bfe0ff; }
.mt-card .pips { position: absolute; top: 7px; right: 7px; display: flex; gap: 3px; } .mt-card .pips i { width: 10px; height: 10px; border: 2px solid #2a1d10; background: #f7efd9; } .mt-card .pips i.on { background: #6aa83a; }
/* the one button on every card */
.mt-card .cb { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 10px; height: 36px; font-size: 24px; color: #2a1d10; background: #ffc531; border: 3px solid #2a1d10; box-shadow: 0 3px 0 #2a1d10; }
.mt-card .cb .ic { width: 22px; height: 22px; }
.mt-card .cb span { display: inline-flex; align-items: center; gap: 3px; }
.mt-card .cb .short { color: #c0281e; }
.mt-card.is-poor .cb { background: #e9dcbc; color: #7a6040; border-color: #9a8060; box-shadow: 0 3px 0 #9a8060; }
.mt-card.is-poor .cb span:not(.short) { color: #7a6040; }
.mt-card.is-done .cb { background: #6a4a20; color: #efe2bf; }
.mt-card.is-poor .pic img, .mt-card.is-done .pic img { filter: none; }
.mt-card.is-poor .pic, .mt-card.is-done .pic { opacity: .8; }
.mt-card.is-locked { cursor: default; background: #e9dcbc; border-color: #9a8060; box-shadow: 0 4px 0 #9a8060; }
.mt-card.is-locked .pic img { filter: brightness(0); opacity: .28; } .mt-card.is-locked b { color: #9a8060; }
.mt-card.is-locked .cb { background: transparent; color: #9a8060; border-color: #9a8060; box-shadow: none; font-size: 22px; }
.mt-card.is-locked .cb img { width: 18px; height: 20px; image-rendering: pixelated; opacity: .8; }
.mt-card.sel { outline: 4px solid #ff8a3a; outline-offset: 2px; background: #fffaf0; z-index: 1; }
.mt-card.hit { animation: hitc .5s steps(4); } @keyframes hitc { 0% { background: #b9e59a; } }
/* the highlighted thing, explained */
.mt-how { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 0; background: #f7efd9; border: 3px solid #6a4a20; box-shadow: 0 4px 0 #6a4a20; min-height: 0; overflow-y: auto; color: #2a1d10; scrollbar-width: thin; }
.mt-how.empty p { font-size: 24px; color: #6a4a20; text-align: left; }
.mt-how .hd { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.mt-how .hd .pic { width: 92px; height: 92px; } .mt-how .hd b { font-weight: normal; font-size: 34px; color: #2a1d10; line-height: 1; }
.mt-how .hd p { margin: 4px 0 0; font-size: 23px; text-align: left; line-height: 1.02; max-width: none; }
.mt-how .chips { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; } .mt-how .chip { font-size: 17px; padding: 0 6px 1px; border: 2px solid #6a4a20; color: #6a4a20; }
.mt-how .chip.g { border-color: #4a8a2a; color: #3a7a1a; } .mt-how .chip.b { border-color: #2a6aa0; color: #2a5a90; }
.mt-how .lb { font-size: 19px; color: #a0461a; }
.mt-how ol { margin: 0; padding-left: 26px; font-size: 22px; line-height: 1.08; } .mt-how ol li { margin-bottom: 3px; } .mt-how ol li::marker { color: #a0461a; }
.mt-how dl { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 3px 10px; margin: 0; font-size: 20px; line-height: 1.05; }
.mt-how dt { color: #a0461a; font-size: 17px; padding-top: 2px; } .mt-how dd { margin: 0; } .mt-how .q { color: #8a7050; }
.mt-buy { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0 12px; border-top: 2px dashed #c9b48a; position: sticky; bottom: 0; background: #f7efd9; }
.mt-cart .cost span { color: #2a1d10; } .mt-cart .cost .short { color: #c0281e; }
.mt-buy .cost { display: flex; gap: 14px; } .mt-buy .cost span { display: inline-flex; align-items: center; gap: 4px; } .mt-buy .cost.big { font-size: 30px; } .mt-buy .cost .ic { width: 26px; height: 26px; }
.mt-buy .no { color: #c0281e; font-size: 22px; text-align: right; } .mt-buy .no .ok { color: #3a7a1a; font-size: 26px; }
.mt-buy .buy { cursor: pointer; font-size: 30px; background: #ffc531; color: #2a1d10; padding: 3px 18px 5px; border: 3px solid #2a1d10; box-shadow: 0 4px 0 #2a1d10; }
.mt-buy .buy:hover { background: #ffd65e; }
.mt-buy.nope { animation: shake .3s steps(6); }
.mt-cart .mt-keys { color: #6a4a20; } .mt-cart .mt-keys .r { color: #a0461a; }
/* (the catapult) the window that shows the field from above while you aim */
/* (players5) joining the mob: a cartoon cloud of dust over the view for a moment (ui.js mobFx), then the edges of the view go red while you are one of them */
#mobjoin { position: fixed; inset: 0; display: none; pointer-events: none; overflow: hidden; }
#mobjoin i { position: absolute; width: 52vmin; height: 52vmin; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #b8a27e 0 22%, #8c7656 46%, #6e5a40 100%); border: 4px solid #1c140d; box-sizing: border-box; }
#mobjoin i:nth-child(3n+1) { background: radial-gradient(circle at 36% 30%, #c8b48e 0 22%, #a08a68 46%, #7c6648 100%); } #mobjoin i:nth-child(3n+2) { background: radial-gradient(circle at 36% 30%, #9c8664 0 22%, #76624a 46%, #5a4834 100%); }
#mobvig { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s; background: radial-gradient(ellipse 75% 72% at 50% 50%, rgba(0, 0, 0, 0) 62%, rgba(120, 16, 8, .34) 84%, rgba(96, 8, 4, .62) 100%); }
#mobvig.on { opacity: 1; }
#hud.mob #status { right: 34%; }
#catwin { position: fixed; display: none; z-index: 3; pointer-events: none; border: 3px solid var(--ink); outline: 2px solid var(--yel); box-sizing: border-box; }
#catwin span { position: absolute; left: 6px; top: 4px; font-size: 20px; color: var(--yel); text-shadow: 2px 2px 0 #000; }

/* (the smith) his board is the merchant's, a little tighter, with bars for a weapon against the one you carry */
.mt-cart.sm .mt-card { padding: 16px 6px 6px; gap: 2px; } .mt-cart.sm .mt-card .pic { width: 54px; height: 54px; } .mt-cart.sm .mt-card b { min-height: 24px; font-size: 19px; }
.mt-cart.sm .mt-card .cb { height: 30px; font-size: 21px; } .mt-cart.sm .mt-card .tg { font-size: 13px; top: 3px; }
.mt-cart.sm .mt-shelf { padding: 4px 8px 4px; } .mt-cart.sm .mt-shelf .grid { margin-bottom: 4px; gap: 8px 10px; } .mt-cart.sm .mt-shelf h3 { margin: 0 0 3px; font-size: 20px; }
.sm-bars dd { display: flex; align-items: center; }
.sm-bar { position: relative; display: block; width: 100%; height: 16px; background: #e9dcbc; border: 2px solid #6a4a20; }
.sm-bar b { position: absolute; left: 0; top: 0; bottom: 0; background: #ffc531; } .sm-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #6a4a20; opacity: .6; z-index: 1; }
.mt-cart.sm { gap: 8px; } .mt-cart.sm .mt-bubble { min-height: 40px; font-size: 25px; } .mt-cart.sm .mt-card .pic { width: 50px; height: 50px; }
#loot .g.spent { animation: golddrop .7s steps(7); } #loot .g.spent b { color: var(--cream); }      /* (pacing, r4) spent at the merchant or the smith: down, but not in a thief's red */
