/* Vault Pad: a bank vault at night, C64 (Pepto) colours only. Silkscreen for words, Plex Mono for every number.
   Pixel art on its native grid at integer scales (--s for the door scene, --ds for the dial). steps() motion only. */
:root {
  --ink: #000000; --night: #352879; --blue: #6C5EB5; --floor: #433900; --brass: #6F4F25; --tan: #9A6759;
  --g1: #444444; --g2: #6C6C6C; --g3: #959595; --acc: #B8C76F; --lamp: #70A4B2; --paper: #FFFFFF; --green: #588D43; --red: #68372B;
  --silk: "Silkscreen", ui-monospace, monospace; --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --s: 2; --ds: 3; --u: calc(var(--s) * 1px);
  --brick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='116' height='42' shape-rendering='crispEdges'%3E%3Crect width='116' height='42' fill='%23352879'/%3E%3Cg fill='%236C5EB5'%3E%3Crect y='19' width='116' height='2'/%3E%3Crect y='40' width='116' height='2'/%3E%3Crect x='0' width='2' height='19'/%3E%3Crect x='58' width='2' height='19'/%3E%3Crect x='29' y='21' width='2' height='19'/%3E%3Crect x='87' y='21' width='2' height='19'/%3E%3C/g%3E%3C/svg%3E");
  --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' shape-rendering='crispEdges'%3E%3Cpath d='M2 2h2v2h2v2h2v2h2v2h2v2h2v2H10v2H8v2H6v-2H4V2z' fill='%23000'/%3E%3Cpath d='M4 4h2v2h2v2h2v2h2v2H8v2H6v2H4z' fill='%23B8C76F'/%3E%3C/svg%3E") 2 2;
  color-scheme: dark;
}
@media (min-width: 1200px) and (min-height: 820px) { :root { --s: 3; --ds: 4; } }
@media (min-width: 1760px) and (min-height: 1000px) { :root { --s: 4; --ds: 5; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--night); color: var(--paper); font: 500 15px/1.55 var(--mono); cursor: var(--cur), default; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--acc); }
a, button, [role=button], summary, label[for], .ca, .drop, canvas#board { cursor: pointer; }
.dial { cursor: grab; }
.dial.grab { cursor: grabbing; }
.num { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--silk); font-weight: 700; letter-spacing: 1px; }
.pix { image-rendering: pixelated; }

/* ------------------------------------------------------------------ buttons + chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 14px; border: 3px solid var(--ink); font: 700 14px/1 var(--silk); letter-spacing: 1px; text-decoration: none; color: var(--ink); white-space: nowrap; transition: transform 80ms steps(2), box-shadow 80ms steps(2), background-color 0s; }
.btn.plate { background: var(--acc); box-shadow: 0 6px 0 var(--ink); }
.btn.plate:hover { background: var(--lamp); }
.btn.plate:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.btn.steel { background: var(--g2); color: var(--paper); box-shadow: inset 0 3px 0 var(--g3), 0 4px 0 var(--ink); }
.btn.steel:hover { background: var(--lamp); color: var(--ink); box-shadow: inset 0 3px 0 var(--paper), 0 4px 0 var(--ink); }
.btn.steel:active { transform: translateY(4px); box-shadow: inset 0 3px 0 var(--g3), 0 0 0 var(--ink); }
[hidden] { display: none !important; }
.btn:disabled, .btn:disabled:hover, .btn.busy, .btn.busy:hover { background: var(--g1); color: var(--g3); box-shadow: 0 4px 0 var(--ink); cursor: not-allowed; transform: none; }
.btn.busy { cursor: progress; }
.btn.big { font-size: 20px; padding: 16px 26px; min-height: 58px; }
.btn.sm { font-size: 12px; padding: 8px 10px; min-height: 36px; }
.btn.sq { width: 40px; padding: 0; font-family: var(--mono); font-size: 20px; }
.lk { font: 700 13px/1 var(--silk); letter-spacing: 1px; color: var(--acc); text-decoration: none; padding: 11px 4px; display: inline-block; border-bottom: 2px solid transparent; }
.lk:hover { color: var(--lamp); border-bottom-color: var(--lamp); }
.ca { display: inline-flex; align-items: center; gap: 8px; background: var(--brass); border: 3px solid var(--ink); padding: 3px 3px 3px 10px; color: var(--paper); box-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.ca b { font: 700 12px/1 var(--silk); color: var(--acc); letter-spacing: 1px; }
.ca .num { font-size: 14px; }
.cbtn { border: 2px solid var(--ink); background: var(--acc); color: var(--ink); font: 700 11px/1 var(--silk); letter-spacing: 1px; padding: 7px 9px; min-height: 34px; min-width: 40px; }
.cbtn:hover { background: var(--lamp); }
.ca-off .cbtn, .cbtn:disabled { background: var(--g1); color: var(--g3); cursor: default; }
.copied .cbtn, .cachip.copied .cl { background: var(--lamp); }
/* per-coin CA row (core.caRow) */
.carow { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.carow .lab { font: 700 11px/1 var(--silk); color: var(--g3); letter-spacing: 1px; }
.cachip { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--paper); border: 2px solid var(--g2); padding: 4px 4px 4px 8px; min-height: 32px; }
.cachip .num { font-size: 13px; }
.cachip .cl { font: 700 10px/1 var(--silk); background: var(--acc); color: var(--ink); padding: 5px 6px; letter-spacing: 1px; }
.cachip:hover .cl { background: var(--lamp); }
.carow .lk { font-size: 11px; padding: 11px 4px; }

/* ------------------------------------------------------------------ header */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 20px; background: var(--g1); border-bottom: 4px solid var(--ink); box-shadow: inset 0 3px 0 var(--g2); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; min-width: 40px; text-decoration: none; color: var(--acc); }
.brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.brand .wm { font: 700 18px/1 var(--silk); letter-spacing: 2px; margin: 0; }
.tnav { display: flex; gap: 4px; margin-left: 12px; }
.tnav a { font: 400 13px/1 var(--silk); letter-spacing: 2px; color: var(--paper); text-decoration: none; padding: 12px 8px; border-bottom: 3px solid transparent; }
.tnav a:hover { color: var(--lamp); }
.tnav a[aria-current=page] { color: var(--acc); border-bottom-color: var(--acc); }
.top .sp { flex: 1; }
.top .btn { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.lever { position: relative; width: 40px; height: 40px; border: 3px solid var(--ink); background: var(--g2); padding: 0; box-shadow: 0 4px 0 var(--ink); }
.lever .lslot { position: absolute; left: 14px; top: 5px; width: 6px; height: 24px; background: var(--ink); }
.lever .knob { position: absolute; left: -5px; top: 14px; width: 16px; height: 10px; background: var(--g3); border: 2px solid var(--ink); transition: transform 120ms steps(2); }
.lever[aria-checked=true] .knob { transform: translateY(-14px); background: var(--acc); }
.lever:hover { background: var(--lamp); }

/* ------------------------------------------------------------------ the door scene */
.door { position: relative; background: var(--night) var(--brick) center top / calc(116 * var(--u)) calc(42 * var(--u)); image-rendering: pixelated; }
.sign { position: relative; z-index: 2; text-align: center; padding: calc(6 * var(--u)) 16px calc(5 * var(--u)); }
.nameplate { display: inline-block; margin: 0; font: 700 calc(14 * var(--u))/1 var(--silk); letter-spacing: calc(1 * var(--u)); color: var(--acc); background: var(--brass); border: 4px solid var(--ink); box-shadow: inset 0 4px 0 var(--tan), 0 8px 0 var(--ink); padding: calc(4 * var(--u)) calc(9 * var(--u)) calc(3 * var(--u)); }
.nameplate.sm { font-size: 40px; padding: 12px 22px 10px; }
.line { display: table; margin: calc(5 * var(--u)) auto 0; font: 400 14px/1.4 var(--silk); letter-spacing: 2px; color: var(--paper); background: var(--ink); padding: 6px 12px; }
.dz { position: relative; display: grid; grid-template-columns: 1fr calc(232 * var(--u)) 1fr; align-items: center; gap: 24px; padding: 0 20px; max-width: 1920px; margin: 0 auto; }
.dfw { grid-column: 2; display: flex; justify-content: center; }
.dfig { position: relative; flex: none; width: calc(232 * var(--u)); height: calc(172 * var(--u)); }
.dimg, .dopen { position: absolute; left: calc(-54 * var(--u)); top: 0; width: calc(320 * var(--u)); height: calc(172 * var(--u)); max-width: none; image-rendering: pixelated; }
.dopen { height: calc(180 * var(--u)); top: calc(-1 * var(--u)); clip-path: circle(calc(84 * var(--u)) at calc(162 * var(--u)) calc(87 * var(--u))); visibility: hidden; }
.dial { position: absolute; z-index: 2; width: calc(64px * var(--ds)); height: calc(64px * var(--ds)); left: calc(106 * var(--u) - 32px * var(--ds)); top: calc(86 * var(--u) - 32px * var(--ds)); border-radius: 50%; touch-action: none; -webkit-user-select: none; user-select: none; }
.dial img { display: block; width: 100%; height: 100%; image-rendering: pixelated; transition: transform 160ms steps(2); pointer-events: none; }
.dial:focus-visible { outline: 3px dashed var(--lamp); outline-offset: 4px; }
.band { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--ink); border: calc(1 * var(--u)) solid var(--g3); box-shadow: 0 0 0 calc(1 * var(--u)) var(--ink), 0 calc(3 * var(--u)) 0 var(--ink); padding: calc(3 * var(--u)) calc(3 * var(--u)) calc(2 * var(--u)); white-space: nowrap; }
.slots { display: flex; justify-content: center; gap: calc(2 * var(--u)); }
.slot { position: relative; width: calc(16 * var(--u)); height: calc(21 * var(--u)); padding: 0; border: calc(1 * var(--u)) solid var(--g1); background: #000; color: var(--paper); font: 500 calc(16 * var(--u))/1 var(--mono); display: grid; place-items: center; }
.slot .num { font-size: inherit; }
.slot::after { content: ""; position: absolute; left: calc(2 * var(--u)); right: calc(2 * var(--u)); bottom: calc(1 * var(--u)); height: calc(1 * var(--u)); background: transparent; }
.slot.on { color: var(--acc); border-color: var(--g3); }
.slot.on::after { background: var(--acc); }
.slot:hover { border-color: var(--lamp); }
.pips { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: calc(2 * var(--u)); font: 400 max(10px, calc(4 * var(--u)))/1 var(--silk); letter-spacing: 1px; color: var(--g3); }
.pl4 { display: inline-flex; gap: 3px; }
.pl4 i { width: max(6px, calc(2 * var(--u))); height: max(6px, calc(2 * var(--u))); background: var(--g1); border: 1px solid var(--g2); }
.pl4 i.on { background: var(--acc); border-color: var(--acc); }
.pips.win { color: var(--acc); }
.demotag { position: absolute; z-index: 4; left: calc(106 * var(--u)); top: calc(30 * var(--u) - 16px); transform: translateX(-50%); font: 700 13px/1 var(--silk); letter-spacing: 3px; background: var(--acc); color: var(--ink); border: 3px solid var(--ink); padding: 5px 8px 4px; }
.stamp { position: absolute; z-index: 5; left: calc(106 * var(--u)); top: calc(86 * var(--u)); width: calc(40 * var(--u)); height: calc(26 * var(--u)); margin: calc(-13 * var(--u)) 0 0 calc(-20 * var(--u)); display: grid; place-items: center; font: 700 calc(9 * var(--u))/1 var(--silk); letter-spacing: 2px; color: var(--ink); background: var(--acc); border: calc(1.5 * var(--u)) solid var(--ink); box-shadow: calc(2 * var(--u)) calc(2 * var(--u)) 0 var(--ink); visibility: hidden; transform: rotate(-6deg); }
.dfig.opening .dimg { animation: doorgo 4.2s steps(1) both; }
.dfig.opening .dopen { visibility: visible; }
.dfig.opening .dial, .dfig.opening .band { animation: doorgo 4.2s steps(1) both; }
.dfig.opening .stamp { visibility: visible; animation: slam 4.2s steps(3) both; }
@keyframes doorgo { 0% { opacity: 1; } 8% { opacity: .66; } 14% { opacity: .33; } 20% { opacity: 0; } 86% { opacity: 0; } 92% { opacity: .5; } 100% { opacity: 1; } }
@keyframes slam { 0%, 18% { transform: rotate(-6deg) scale(1.8); opacity: 0; } 26% { transform: rotate(-6deg) scale(1); opacity: 1; } 84% { opacity: 1; } 100% { opacity: 0; transform: rotate(-6deg) scale(1); } }

.pl { min-width: 0; }
.pl-l { justify-self: end; }
.pl-r { justify-self: start; }
.plate { position: relative; background: var(--g1); border: 4px solid var(--ink); box-shadow: inset 0 4px 0 var(--g2), 0 8px 0 var(--ink); padding: 16px 18px 18px; width: min(300px, 100%); }
.plate .lab, .lab { display: block; font: 700 12px/1 var(--silk); letter-spacing: 2px; color: var(--g3); margin-bottom: 10px; }
.crow { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.crow img { width: 48px; height: 48px; object-fit: cover; border: 3px solid var(--ink); background: var(--night); image-rendering: pixelated; flex: none; }
.csym { display: block; font: 700 22px/1.1 var(--silk); color: var(--paper); letter-spacing: 1px; overflow-wrap: anywhere; }
.cname { display: block; font-size: 13px; color: var(--g3); line-height: 1.3; }
.kv2 { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; align-items: baseline; }
.kv2 > span, .kv2 dt { font: 400 11px/1.3 var(--silk); letter-spacing: 1px; color: var(--g3); }
.kv2 > b, .kv2 dd { margin: 0; text-align: right; white-space: nowrap; font-size: 15px; color: var(--paper); font-weight: 500; }
.st[data-st=armed] { color: var(--acc); }
.st { font: 700 12px/1.3 var(--silk); letter-spacing: 1px; }
.cca { margin-bottom: 12px; }
.potplate .pot { display: inline-block; font-size: calc(10px + 6 * var(--u)); line-height: 1; color: var(--acc); margin: 2px 0 2px; }
.potplate .unit { font: 700 14px/1 var(--silk); color: var(--acc); margin-left: 6px; }
.potplate .kv2 { margin: 16px 0 0; }

.floor { position: relative; z-index: 1; margin-top: calc(-1 * var(--u)); background: var(--brass) repeating-linear-gradient(90deg, transparent 0 calc(48 * var(--u) - var(--u)), var(--floor) calc(48 * var(--u) - var(--u)) calc(48 * var(--u))); border-top: calc(1 * var(--u)) solid var(--ink); box-shadow: inset 0 calc(2 * var(--u)) 0 var(--tan); padding: 18px 20px 20px; }
.console { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.padlinks { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-self: start; }
.safenav { display: flex; align-items: center; gap: 10px; justify-self: end; }
.safenav .num { min-width: 52px; text-align: center; background: var(--ink); padding: 8px 6px; }
.tryf { display: flex; align-items: center; justify-content: center; gap: 10px 14px; flex-wrap: wrap; width: 620px; max-width: 100%; }
.amt { display: inline-flex; align-items: center; gap: 0; background: var(--ink); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.amt .lab { margin: 0; padding: 0 10px; color: var(--g3); }
.amt input { width: 104px; height: 52px; border: 3px solid var(--g2); border-right: 0; background: #000; color: var(--acc); font-size: 22px; padding: 0 8px; text-align: right; }
.amt input:focus { outline: none; border-color: var(--lamp); }
.amt .u { font: 700 13px/1 var(--silk); color: var(--g3); align-self: stretch; display: flex; align-items: center; padding: 0 10px; border: 3px solid var(--g2); border-left: 0; background: #000; }
.minr { flex-basis: 100%; white-space: normal; text-align: center; font-size: 13px; color: var(--paper); background: var(--ink); padding: 6px 10px; }

.rivets { height: 24px; background: var(--g2) url(/assets/art/tile-steel.png) 0 0 / 64px 64px; image-rendering: pixelated; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.sh { font-size: clamp(30px, 4.4vw, 56px); line-height: 1; margin: 0 0 10px; color: var(--paper); }
.sub { max-width: 560px; margin: 0 0 26px; font-size: 15px; color: var(--paper); }

/* ------------------------------------------------------------------ the tape */
.tape { --ls: 2; position: relative; background: var(--night) url(/assets/art/lobby.png) center bottom / calc(320px * var(--ls)) calc(180px * var(--ls)) no-repeat; image-rendering: pixelated; padding: 64px 20px calc(66px * var(--ls)); }
@media (min-width: 640px) { .tape { --ls: 3; } } @media (min-width: 960px) { .tape { --ls: 4; } } @media (min-width: 1280px) { .tape { --ls: 5; } } @media (min-width: 1600px) { .tape { --ls: 6; } } @media (min-width: 1920px) { .tape { --ls: 7; } }
.tape .sub, .depo .sub, .rules .rnote { background: var(--ink); display: inline-block; padding: 8px 12px; }
.tin { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.printer { position: relative; width: min(100%, 560px); padding-top: 0; }
.pimg { display: block; width: 360px; height: 176px; image-rendering: pixelated; margin: 0 auto; position: relative; z-index: 2; }
.paper { position: relative; z-index: 1; width: min(100%, 300px + 12vw); max-width: 520px; margin: -64px auto 0; padding: 70px 18px 26px; background: var(--paper); color: var(--ink); border-left: 3px solid var(--g3); border-right: 3px solid var(--g3); min-height: 200px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 12px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 16px 12px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 12px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 16px 12px repeat-x; }
.tl { display: grid; grid-template-columns: 54px 52px 78px 1fr auto; gap: 8px; align-items: center; margin: 0; padding: 7px 0; border-bottom: 2px dotted var(--g3); font-size: 14px; }
.tl.head, .tl.rv, .tl.dim { display: block; font-size: 12px; color: var(--g1); letter-spacing: .5px; }
.tl.rv { color: var(--ink); font-weight: 500; background: var(--acc); padding: 6px 8px; border: 0; margin: 6px 0; }
.tl .n { color: var(--g2); font-size: 12px; }
.tl .g { font-size: 18px; letter-spacing: 2px; }
.tl .pp { display: inline-flex; align-items: center; gap: 3px; }
.tl .pp i { width: 9px; height: 9px; background: #fff; border: 2px solid var(--ink); }
.tl .pp i.on { background: var(--ink); }
.tl .pp b { margin-left: 6px; font-size: 14px; }
.tl .pp.wait { font: 700 11px/1 var(--silk); letter-spacing: 2px; color: var(--g2); }
.tl .w { color: var(--ink); font-size: 12px; text-decoration: none; border-bottom: 1px solid var(--g3); justify-self: start; padding: 9px 0 6px; }
.tl .w:hover { color: var(--blue); }
.tl .a { font-size: 12px; color: var(--g2); }
.tl.me { background: #eef2d9; }
.tl.me .w { font-weight: 500; color: var(--ink); }
.tl.hit .g { background: var(--acc); }
.tl.pr { animation: print 480ms steps(4) both; }
.tl.lk { display: block; font: 700 13px/1 var(--silk); color: var(--blue); }
@keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.board { background: var(--g1); border: 4px solid var(--ink); box-shadow: inset 0 4px 0 var(--g2), 0 8px 0 var(--ink); padding: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 20px; align-items: start; }
.bnum { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bnum b { font-size: 44px; line-height: 1; color: var(--acc); }
.bnum span { font: 400 12px/1.2 var(--silk); letter-spacing: 1px; color: var(--g3); }
.bwrap { position: relative; width: clamp(220px, 21vw, 300px); aspect-ratio: 1; border: 3px solid var(--ink); background: var(--ink); }
#board { display: block; width: 100%; height: 100%; image-rendering: pixelated; touch-action: manipulation; }
.bhov { position: absolute; left: 0; bottom: -32px; font-size: 12px; background: var(--ink); padding: 3px 8px; white-space: nowrap; }
.tumb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tc { display: grid; gap: 2px; }
.th { font: 400 10px/1.4 var(--silk); letter-spacing: 1px; color: var(--g3); margin-bottom: 4px; white-space: nowrap; }
.tc { min-width: 0; }
.tr { display: flex; align-items: center; gap: 5px; height: 23px; min-width: 0; overflow: hidden; }
.tr b { width: 12px; font-size: 14px; color: var(--paper); }
.tr i { display: block; height: 10px; width: calc(var(--w) * 3px); max-width: calc(100% - 17px); background: var(--acc); }
.tr.out b { color: var(--g2); }
.board .btn { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
.left4 { cursor: pointer; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.left4 .lab { margin: 0 6px 0 0; }
.left4 button { font-size: 17px; border: 3px solid var(--ink); background: var(--acc); color: var(--ink); padding: 6px 10px; min-height: 40px; box-shadow: 0 4px 0 var(--ink); }
.left4 button:hover { background: var(--lamp); }

/* ------------------------------------------------------------------ the depository */
.depo { background: var(--night); padding: 64px 20px 72px; }
.din { max-width: 1400px; margin: 0 auto; }
.boxes { --bw: 120px; min-height: calc(var(--bw) * 2.4); display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--bw), 1fr)); gap: 0; background: var(--night); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); padding: 6px; }
.box { position: relative; display: block; aspect-ratio: 40 / 45; image-rendering: pixelated; text-decoration: none; color: var(--ink); }
.box img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.box .b1 { visibility: hidden; }
.box.inv .b1 { visibility: visible; }
.box.coin:hover .b0 { visibility: hidden; }
.box.coin:hover .b1 { visibility: visible; }
.box .bl2 { position: absolute; left: 10%; right: 10%; top: 16%; text-align: center; font: 700 12px/1 var(--silk); letter-spacing: 1px; background: var(--acc); border: 2px solid var(--ink); padding: 4px 2px 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.box .bp { position: absolute; left: 14%; right: 14%; bottom: 14%; text-align: center; font-size: 14px; color: var(--acc); background: var(--ink); padding: 3px 2px; }
.box .bs { position: absolute; right: 9%; top: 9%; width: 8px; height: 8px; background: var(--g3); border: 1px solid var(--ink); }
.box .bs[data-st=armed] { background: var(--acc); }
.box.coin:hover .bl2, .box.coin:hover .bp, .box.coin:hover .bs { visibility: hidden; }
.box.cur { outline: 4px solid var(--acc); outline-offset: -4px; z-index: 1; }
.box.inv .it { position: absolute; left: 4%; right: 4%; bottom: 8%; font: 700 11px/1.2 var(--silk); text-align: center; color: var(--paper); background: var(--ink); padding: 4px 2px; }
.box.inv:hover .it { background: var(--lamp); color: var(--ink); }
.ledger { margin-top: 34px; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.lhead, .lrow { display: grid; grid-template-columns: minmax(180px, 1.4fr) 1fr .8fr .6fr .6fr .8fr minmax(250px, 1.6fr); gap: 12px; align-items: center; padding: 10px 16px; }
.lhead { font: 700 11px/1 var(--silk); letter-spacing: 1px; color: var(--g2); border-bottom: 3px solid var(--ink); }
.lrow { border-bottom: 2px dotted var(--g3); font-size: 15px; }
.lrow:last-child { border-bottom: 0; }
.lc { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--ink); text-decoration: none; min-width: 0; }
.lc img { width: 28px; height: 28px; object-fit: cover; border: 2px solid var(--ink); image-rendering: pixelated; }
.lc b { font: 700 14px/1 var(--silk); }
.lc span { font-size: 12px; color: var(--g2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc:hover b { color: var(--blue); }
.lrow em { font: 700 10px/1 var(--silk); font-style: normal; color: var(--g2); margin-left: 4px; }
.lrow em[data-st=armed] { color: var(--green); }
.ledger .carow .lab { color: var(--g2); }
.ledger .lk { color: var(--blue); }
.linv { margin: 0; padding: 22px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; }

/* ------------------------------------------------------------------ rules */
.rules { background: var(--g1) url(/assets/art/tile-steel.png) 0 0 / 256px 256px; image-rendering: pixelated; padding: 64px 20px 70px; }
.rin { max-width: 1280px; margin: 0 auto; }
.rules .sh { display: inline-block; background: var(--ink); padding: 10px 14px 8px; }
.steps { list-style: none; padding: 0; margin: 26px 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { background: var(--paper); color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); padding: 18px 18px 20px; position: relative; }
.steps .n { position: absolute; right: 12px; top: 10px; font-size: 40px; line-height: 1; color: var(--g3); }
.steps h3 { margin: 0 0 10px; font-size: 22px; }
.steps p { margin: 0; font-size: 14px; }
.steps li:nth-child(4) { background: var(--acc); }
.rnote { font-size: 14px; margin: 0; max-width: 900px; }

/* ------------------------------------------------------------------ the last safe opened */
/* ------------------------------------------------------------------ how it works: the night round film (own player) */
.how { background: var(--night); background-image: var(--brick); background-size: 232px 84px; image-rendering: pixelated; padding: 64px 20px 72px; }
.hin { max-width: 1120px; margin: 0 auto; }
.how .sh { display: inline-block; background: var(--ink); padding: 10px 14px 8px; }
.how .sub { background: var(--ink); display: inline-block; padding: 8px 12px; }
.player { background: var(--g2); border: 4px solid var(--ink); box-shadow: inset 0 4px 0 var(--g3), inset 0 -4px 0 var(--g1), 0 10px 0 var(--ink); padding: 14px; }
.vp-scr { position: relative; background: var(--ink); border: 4px solid var(--ink); aspect-ratio: 16 / 9; }
.vp-scr video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--ink); cursor: pointer; }
.vp-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.vp-big:active { transform: translate(-50%, calc(-50% + 6px)); }
.vp-tri { display: inline-block; width: 0; height: 0; border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.vp-pp.on .vp-tri { width: 14px; height: 16px; border: 0; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.vp-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.vp-pp { width: 48px; }
.vp-tl { position: relative; flex: 1; height: 36px; background: var(--ink); border: 4px solid var(--ink); box-shadow: inset 0 0 0 4px var(--g1); cursor: pointer; touch-action: none; }
.vp-fill { position: absolute; left: 4px; top: 4px; bottom: 4px; max-width: calc(100% - 8px); background: var(--acc); }
.vp-k { position: absolute; top: -8px; width: 14px; height: 44px; margin-left: -7px; background: var(--paper); border: 4px solid var(--ink); }
.player.drag .vp-k { background: var(--lamp); }
.vp-t { min-width: 112px; text-align: center; background: var(--ink); color: var(--acc); padding: 8px 8px; font-size: 14px; }
.vp-vol { display: flex; gap: 0; align-items: stretch; cursor: pointer; }
.vp-vol button { position: relative; width: 16px; height: 40px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.vp-vol button::before { content: ""; position: absolute; left: 2px; right: 2px; bottom: 4px; background: var(--g1); border: 3px solid var(--ink); }
.vp-vol button:nth-child(1)::before { height: 14px; } .vp-vol button:nth-child(2)::before { height: 20px; } .vp-vol button:nth-child(3)::before { height: 26px; } .vp-vol button:nth-child(4)::before { height: 32px; }
.vp-vol button.on::before { background: var(--acc); }
.player:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 18px; background: var(--ink); }
.player:fullscreen .vp-scr { max-height: calc(100vh - 90px); margin: 0 auto; width: min(100%, calc((100vh - 90px) * 16 / 9)); }
@media (max-width: 640px) { .vp-vol, .vp-m { display: none; } .vp-t { min-width: 0; font-size: 12px; } .player { padding: 8px; } }
.opened { background: var(--night); padding: 0 0 0; border-bottom: 4px solid var(--ink); }
.oin { position: relative; max-width: calc(320 * var(--u) + 360px); margin: 0 auto; display: grid; grid-template-columns: calc(320 * var(--u)) 1fr; align-items: center; gap: 0; }
.ofig { width: calc(320 * var(--u)); height: calc(180 * var(--u)); }
.oimg { display: block; width: 100%; height: 100%; image-rendering: pixelated; max-width: none; }
.slip { position: relative; margin: 32px 20px 32px -40px; z-index: 2; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 20px 20px 22px; }
.slip .lab { color: var(--g2); }
.slip .code { display: flex; gap: 8px; margin: 4px 0 16px; }
.slip .code b { display: grid; place-items: center; width: 52px; height: 66px; background: var(--ink); color: var(--acc); font-size: 44px; line-height: 1; }
.slip .kv2 dt { color: var(--g2); }
.slip .kv2 dd { color: var(--ink); }
.slip .kv2 a { color: var(--blue); }
.slip .sl { margin: 10px 0 0; font-size: 14px; }
.slip .sl.big { font: 700 22px/1.25 var(--silk); }
.stamp2 { position: absolute; right: 16px; top: 14px; font: 700 18px/1 var(--silk); letter-spacing: 3px; color: var(--ink); background: var(--acc); border: 3px solid var(--ink); padding: 8px 10px 6px; transform: rotate(-8deg); box-shadow: 3px 3px 0 var(--ink); }

/* ------------------------------------------------------------------ footer */
.foot { background: var(--ink); border-top: 4px solid var(--g1); padding: 34px 20px 40px; }
.fin { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 4px; justify-content: flex-end; }
.foot nav a { font: 400 13px/1 var(--silk); letter-spacing: 2px; color: var(--paper); text-decoration: none; padding: 12px 8px; }
.foot nav a:hover { color: var(--lamp); }
.trust { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--g3); max-width: 900px; }
.fine { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; font: 400 12px/1 var(--silk); letter-spacing: 1px; color: var(--g3); }
.fine a { color: var(--g3); }
.fca { box-shadow: none; }

/* ------------------------------------------------------------------ inner pages */
body.inner { min-height: 100vh; display: flex; flex-direction: column; background: var(--night) var(--brick) 0 0 / 232px 84px; }
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 20px 72px; }
.ph { display: inline-block; font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 12px 0 18px; color: var(--acc); background: var(--brass); border: 4px solid var(--ink); box-shadow: inset 0 4px 0 var(--tan), 0 8px 0 var(--ink); padding: 14px 22px 10px; }
.lead { font-size: 17px; max-width: 760px; margin: 0 0 30px; background: var(--ink); padding: 12px 16px; }
.sheet { background: var(--paper); color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); padding: 22px 22px 26px; margin-bottom: 26px; }
.sheet.dark { background: var(--g1); color: var(--paper); box-shadow: inset 0 4px 0 var(--g2), 0 8px 0 var(--ink); }
.sheet a { color: var(--blue); }
.sheet.dark a { color: var(--acc); }
.sh2 { font-size: 22px; margin: 0 0 18px; }
.sh3 { font-size: 18px; margin: 24px 0 10px; }
.lgrid, .dgrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; align-items: start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .flab { font: 700 12px/1 var(--silk); letter-spacing: 2px; color: var(--g1); }
.field input, .field textarea { width: 100%; border: 3px solid var(--ink); background: #fff; color: var(--ink); font: 500 16px/1.4 var(--mono); padding: 10px 12px; min-height: 46px; box-shadow: inset 0 3px 0 #e2e2e2; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--lamp); }
.field small { font-size: 12px; color: var(--g1); }
.drop { display: flex; align-items: center; gap: 14px; min-height: 76px; border: 3px dashed var(--ink); padding: 6px 14px; font: 400 12px/1.4 var(--silk); letter-spacing: 1px; background: #f2f2f2; }
.drop:hover { background: #e8eecd; }
.drop img { width: 64px; height: 64px; object-fit: cover; border: 2px solid var(--ink); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 0 18px; }
.kv dt { font: 400 12px/1.4 var(--silk); letter-spacing: 1px; color: var(--g3); }
.kv dd { margin: 0; text-align: right; font-size: 15px; }
.cap { font-size: 13px; color: inherit; opacity: .85; margin: 14px 0 18px; }
.claimbar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.claimbar .cap { max-width: 520px; background: var(--ink); padding: 8px 12px; margin: 0; opacity: 1; }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px dotted var(--g3); }
.mrow img { width: 40px; height: 40px; object-fit: cover; border: 2px solid var(--ink); image-rendering: pixelated; }
.mrow .t { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: grid; }
.mrow .t b { font: 700 14px/1.2 var(--silk); }
.mrow .t span { font-size: 12px; opacity: .8; }
.mrow .r { font-size: 15px; white-space: nowrap; }
.tag { font: 700 11px/1 var(--silk); letter-spacing: 2px; background: var(--g3); color: var(--ink); padding: 4px 6px; }
.empty { display: grid; gap: 6px; padding: 8px 0; font-size: 14px; }
.empty b { font: 700 14px/1.2 var(--silk); letter-spacing: 1px; }
.kill { font: 700 clamp(24px, 4vw, 44px)/1.15 var(--silk); margin: 0 0 12px; background: var(--ink); display: inline-block; padding: 14px 18px; }
.kill .num { color: var(--acc); font-size: 1.25em; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 28px; }
.stat { background: var(--g1); border: 4px solid var(--ink); box-shadow: inset 0 4px 0 var(--g2), 0 8px 0 var(--ink); padding: 16px; display: grid; gap: 8px; }
.stat b { font-size: 30px; line-height: 1; color: var(--acc); }
.stat span { font: 400 11px/1.3 var(--silk); letter-spacing: 1px; color: var(--g3); }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { font: 700 11px/1 var(--silk); letter-spacing: 1px; text-align: left; padding: 10px 8px; border-bottom: 3px solid var(--ink); white-space: nowrap; }
td { padding: 10px 8px; border-bottom: 2px dotted var(--g3); white-space: nowrap; }
.dl { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.dl li { font-size: 15px; }
.tp { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 15px; }

/* 404 */
body.nf { min-height: 100vh; display: flex; flex-direction: column; background: var(--night); }
.nfm { flex: 1; display: grid; place-items: center; align-content: center; gap: 0; padding: 24px 16px 48px; }
.nfig { width: calc(320 * var(--u)); max-width: calc(100vw - 32px); aspect-ratio: 320 / 180; overflow: hidden; display: flex; justify-content: center; }
.nfig img { width: calc(320 * var(--u)); height: calc(180 * var(--u)); max-width: none; image-rendering: pixelated; flex: none; }
.nft { text-align: center; margin-top: 18px; display: grid; justify-items: center; gap: 14px; }
.nft p { margin: 0; background: var(--ink); padding: 8px 14px; font-size: 16px; }

/* ------------------------------------------------------------------ chrome bits */
.tip { position: fixed; z-index: 120; max-width: 280px; background: var(--ink); color: var(--paper); font: 400 12px/1.4 var(--silk); letter-spacing: 1px; padding: 8px 10px; outline: 3px solid var(--blue); box-shadow: 6px 6px 0 var(--ink); pointer-events: none; }
.curlab { position: fixed; left: 0; top: 0; z-index: 121; pointer-events: none; font: 700 11px/1 var(--silk); letter-spacing: 2px; background: var(--acc); color: var(--ink); border: 2px solid var(--ink); padding: 4px 6px 3px; visibility: hidden; }
.curlab.on { visibility: visible; }
.tstack { position: fixed; right: 16px; bottom: 16px; z-index: 110; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); font-size: 14px; }
.toast.ok { border-left: 12px solid var(--acc); }
.toast.err { border-left: 12px solid var(--g1); animation: shake 240ms steps(4); }
.toast .tt { flex: 1; }
.toast a { font: 700 12px/1.4 var(--silk); letter-spacing: 1px; color: var(--blue); white-space: nowrap; }
.toast .tx { border: 0; background: none; color: var(--ink); font: 500 22px/1 var(--mono); padding: 0 4px; min-width: 32px; min-height: 32px; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.dlg { border: 4px solid var(--ink); padding: 26px 24px 22px; background: var(--g1); color: var(--paper); box-shadow: inset 0 4px 0 var(--g2), 10px 10px 0 var(--ink); width: min(420px, calc(100vw - 32px)); font-family: var(--mono); }
.dlg::backdrop { background: rgba(0, 0, 0, .6); }
.dlg h2 { font-size: 24px; margin: 0 0 16px; }
.dlg-x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 3px solid var(--ink); background: var(--g2); color: var(--paper); font: 500 24px/1 var(--mono); }
.dlg-x:hover { background: var(--lamp); color: var(--ink); }
.wp-list { display: grid; gap: 10px; }
.wp-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); font: 700 14px/1 var(--silk); letter-spacing: 1px; text-align: left; box-shadow: 0 4px 0 var(--ink); }
.wp-item:hover { background: var(--acc); }
.wp-item img { width: 28px; height: 28px; }
.wp-dot { width: 28px; height: 28px; background: var(--blue); }
.wp-get { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font: 700 14px/1 var(--silk); letter-spacing: 1px; }
.wp-get a { color: var(--acc); }
.wp-err { color: var(--ink); background: var(--paper); padding: 6px 8px; }
.wp-off { margin-top: 14px; }
.wp-cur .mono { font-family: var(--mono); }
.btn.ghost { background: var(--g2); color: var(--paper); }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1100px) { .brand .wm, .lever { display: none; } .top { gap: 10px; } }
@media (max-width: 1199px) {
  .tin { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .lhead { display: none; }
  .lrow { grid-template-columns: 1fr 1fr 1fr; }
  .lrow .lc { grid-column: 1 / -1; }
  .lrow > span:last-child { grid-column: 1 / -1; }
  .oin { grid-template-columns: 1fr; max-width: none; justify-items: center; }
  .ofig { max-width: 100vw; overflow: hidden; display: flex; justify-content: center; }
  .oimg { width: calc(320 * var(--u)); flex: none; }
  .slip { margin: -40px 16px 40px; width: min(440px, calc(100% - 32px)); }
  .mgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 979px) {
  .top .ca { display: none; }
  .door { display: flex; flex-direction: column; }
  .dz { display: contents; }
  .sign { order: 1; }
  .dfw { order: 2; overflow: hidden; width: 100%; }
  .floor { order: 3; margin-top: 0; }
  .pl-r { order: 4; } .pl-l { order: 5; }
  .pl { justify-self: auto; padding: 18px 16px 0; display: flex; justify-content: center; background: var(--brass); }
  .pl-l { padding-bottom: 28px; }
  .plate { width: min(440px, 100%); }
  .console { grid-template-columns: 1fr; justify-items: center; }
  .tryf { order: 1; width: 100%; } .padlinks { order: 2; justify-self: center; justify-content: center; } .safenav { order: 3; justify-self: center; }
  .lgrid, .dgrid { grid-template-columns: 1fr; }
  .stats4 { grid-template-columns: 1fr 1fr; }
  .mgrid { grid-template-columns: 1fr; }
  .fin { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .top { height: auto; flex-wrap: wrap; gap: 8px; padding: 8px 12px 0; }
  .brand .wm { display: none; }
  .tnav { order: 9; width: 100%; margin: 0 -12px; padding: 0 6px; overflow-x: auto; background: var(--ink); }
  .tnav a { padding: 11px 9px; font-size: 12px; letter-spacing: 1px; }
  .top .btn { padding: 8px 10px; font-size: 12px; min-height: 40px; }
  .lever { display: none; }
  .tape { padding: 44px 16px calc(66px * var(--ls)); }
  .depo, .rules { padding: 44px 16px 52px; }
  .boxes { --bw: 84px; }
  .box .bl2 { font-size: 10px; } .box .bp { font-size: 11px; }
  .board { grid-template-columns: 1fr; justify-items: center; }
  .bwrap { width: min(300px, 100%); height: auto; aspect-ratio: 1; }
  .tumb { width: 100%; }
  .pimg { width: 270px; height: 132px; }
  .paper { margin-top: -48px; padding: 56px 12px 24px; }
  .tl { grid-template-columns: 46px 46px 1fr auto; font-size: 13px; }
  .tl .a { display: none; }
  .tl .g { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .page { padding: 20px 16px 56px; }
  .tryf { gap: 10px; }
  .btn.big { font-size: 17px; padding: 14px 18px; }
  .amt input { width: 88px; font-size: 20px; }
}
@media (max-width: 360px) {
  .nameplate { font-size: 28px; }
  .top .pbtn .bl { font-size: 11px; }
  .amt .lab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .dfig.opening .dimg, .dfig.opening .dial, .dfig.opening .band { animation: none; opacity: 0; }
  .dfig.opening .stamp { animation: none; }
}
