/* On-screen HUD: rail, board, purse, roll controls, buffs, reveal, toasts, dialogue, small overlays. */

#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }

/* ---------- top right: who is playing ---------- */
.tr-board { position: absolute; right: 12px; top: 12px; width: min(320px, 46vw); font-size: 14px; }
.tr-board .hd, .tr-board .rw { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; }
.tr-board .hd { font: 600 12px var(--head); color: var(--dim); border-bottom: 1px solid var(--line2); cursor: pointer; }
.tr-board .hd span:nth-child(2) { margin-left: auto; }
.tr-board .hd .fold { width: 12px; margin-left: 0; text-align: center; color: var(--accent); }
.tr-board .rw { font: 600 15px var(--head); }
.tr-board .rw .n { color: var(--accent); font-variant-numeric: tabular-nums; }
.tr-board.folded .rw, .tr-board.folded .others { display: none; }
.tr-board.folded .hd { border-bottom: 0; }
.tr-board .others { max-height: 42vh; overflow-y: auto; }
.tr-board .others .rw { gap: 8px; padding-top: 3px; padding-bottom: 3px; font-size: 13px; border-top: 1px solid var(--line2); }
.tr-board .others .rw b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--good); }
.tr-board .others .au { align-self: center; font: 400 11px var(--body); color: var(--dim); white-space: nowrap; }

/* ---------- left: menu rail ---------- */
.sidebar { position: absolute; left: 10px; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge), 0 8px 18px rgba(0, 0, 0, .3); }
.sidebar button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 9px; background: none; border: 0; border-radius: 2px; }
.sidebar button:hover { background: var(--panel2); }
.sidebar button.on { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.sidebar button svg { width: 100%; height: 100%; fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar button:hover svg, .sidebar button.on svg { stroke: var(--ink); }
.sidebar button.adminbtn svg { stroke: #e8895a; }
.sidebar .lbl { position: absolute; left: calc(100% + 10px); top: 50%; z-index: 2; transform: translateY(-50%); padding: 3px 9px; font: 600 13px var(--head); white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity .1s; }
.sidebar button:hover .lbl { opacity: 1; }
.sidebar .dot { position: absolute; right: 1px; top: 1px; display: none; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; font: 700 11px var(--head); color: var(--accent-ink); background: var(--accent); border-radius: 9px; }
.sidebar .dot.on { display: grid; }

/* ---------- bottom left: time, biome, purse ---------- */
.bl { position: absolute; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 5px; width: 212px; }
.bl .ver { margin-bottom: 3px; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .72); text-shadow: 0 1px 2px #000, 0 0 4px rgba(0, 0, 0, .7); }
.bl .ver .tod { display: block; font: 700 20px/1.1 var(--head); color: #fff; }
.bl .ver .bm { color: var(--accent); }
.cur { display: flex; align-items: center; height: 34px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); }
.cur .ic { display: grid; place-items: center; flex: none; align-self: stretch; width: 34px; font: 700 16px var(--head); color: #11161b; background: var(--c); border-radius: 2px 0 0 2px; }
.cur span.v { flex: 1; padding: 0 12px; font: 700 18px var(--head); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- bottom centre: roll ---------- */
.roll-zone { position: absolute; left: 50%; bottom: 10px; display: flex; align-items: flex-end; gap: 12px; transform: translateX(-50%); }
.rollwrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lastroll { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); white-space: nowrap; font: 700 13px var(--head); text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .8); pointer-events: none; }
.roll-btn { position: relative; width: 220px; height: 60px; overflow: hidden; font: 700 30px/1 var(--head); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); transition: background .1s; }
.roll-btn:hover { background: var(--panel2); }
.roll-btn:active { transform: translateY(1px); }
.roll-btn .cd { position: absolute; left: 0; bottom: 0; width: 0; height: 4px; background: var(--accent); }
.roll-btn.bonus { animation: bonus-ring 1s ease-in-out infinite; }
@keyframes bonus-ring { 50% { box-shadow: 0 0 0 2px var(--edge), 0 0 0 6px var(--accent); } }
.bonus-ct { font: 600 15px var(--head); color: var(--ink); text-shadow: 0 1px 2px #000; }
.bonus-ct.next { color: var(--accent); }
.statline { padding: 2px 10px; font-size: 12px; color: var(--dim); background: rgba(14, 19, 24, .82); border-radius: 2px; cursor: pointer; }
.statline b { color: var(--ink); font-family: var(--head); }
.tgl { width: 136px; height: 38px; margin-bottom: 16px; font: 600 14px var(--head); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); }
.tgl:hover { background: var(--panel2); }
.tgl:active { transform: translateY(1px); }
.tgl.on { color: var(--good); border-color: #46794f; }
.tgl.locked { color: var(--faint); }

/* ---------- bottom right: gear slots and buffs ---------- */
.buffs { position: absolute; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; align-items: flex-end; gap: 5px; max-width: min(640px, calc(50vw - 310px)); }
.buffs .total { position: absolute; left: 0; bottom: calc(100% + 4px); padding: 1px 8px; font-size: 12px; color: var(--dim); white-space: nowrap; background: rgba(14, 19, 24, .82); border: 0; border-radius: 2px; }
.buffs .total:hover { color: var(--ink); }
.bf { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 60px; padding-bottom: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); }
.bf .gem { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--c); }
.bf .t { position: absolute; top: 3px; left: 0; right: 0; font-size: 11px; text-align: center; color: var(--dim); }
.bf .x { font: 700 14px var(--head); }
.bf.empty { border-style: dashed; box-shadow: none; background: rgba(26, 32, 39, .6); }
.bf.empty .t { top: 50%; transform: translateY(-50%); font: 600 15px var(--head); color: var(--faint); }
.bf-ico { position: absolute; left: 50%; top: 42%; width: 36px; height: 36px; object-fit: contain; transform: translate(-50%, -50%); pointer-events: none; image-rendering: auto; }
.bf .gem { opacity: 0.35; }
.bf:has(.bf-ico) .gem { display: none; }
.bf.gear-slot .x { font-size: 11px; }

/* ---------- top centre: biome timer ---------- */
.biome-chip { position: absolute; top: 12px; left: 50%; min-width: 200px; padding: 6px 16px 8px; text-align: center; font-size: 14px; border-top: 3px solid var(--c, var(--line)); transform: translateX(-50%); transition: opacity .3s; }
.biome-chip b { font: 700 15px var(--head); }
.biome-chip .bar { height: 4px; margin-top: 5px; background: var(--inset); }
.biome-chip .bar i { display: block; width: 100%; height: 100%; background: var(--c, var(--accent)); }

/* ---------- merchant tracker, zoom, online badge, chat ---------- */
.tracker { position: absolute; top: 54px; left: 84px; z-index: 5; min-width: 200px; padding: 8px 10px; font-size: 13px; }
.tracker .tr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-left: 7px; border-left: 3px solid var(--c); }
#zoomctl { position: fixed; left: 232px; bottom: 12px; z-index: 12; display: flex; align-items: center; gap: 3px; padding: 4px; pointer-events: auto; }
#zoomctl button { min-width: 28px; height: 28px; padding: 0 6px; font: 600 13px var(--head); background: var(--panel2); border: 1px solid var(--line); border-radius: 2px; }
#zoomctl button:hover { border-color: var(--dim); }
#zoomctl span { display: none; }
body.in-sanctuary #zoomctl { display: none; }

#onlinebadge { position: fixed; left: 10px; top: 10px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
#onlinebadge .ot { cursor: pointer; }
#onlinebadge .ochat { padding: 2px 9px; font: 600 12px var(--head); background: var(--panel2); border: 1px solid var(--line); border-radius: 2px; }
#onlinebadge .ochat:hover { border-color: var(--dim); }
#onlinebadge .oun { padding: 0 6px; font: 700 11px var(--head); font-style: normal; color: #fff; background: #c8453f; border-radius: 9px; }

#chatbox { position: fixed; left: 10px; bottom: 190px; z-index: 31; width: min(340px, 60vw); pointer-events: none; }
#chatbox .log { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; max-height: max(60px, calc(100vh - 510px)); overflow: hidden; }   /* never grows up into the merchant tracker */
#chatbox .cl { padding: 2px 8px; font-size: 13px; line-height: 1.35; word-break: break-word; background: rgba(14, 19, 24, .72); border-radius: 2px; transition: opacity 2.5s; }
#chatbox .cl b { color: var(--good); }
#chatbox .cl.me b { color: var(--disc); }
#chatbox .cl.old { opacity: 0; }
/* the admin tag only appears for accounts the database lists as admins */
.adm { font-weight: 700; color: #ffd23f; text-shadow: 0 0 6px rgba(255, 190, 40, .85), 0 0 12px rgba(255, 170, 0, .5); }
/* chat tags: owner, admin, VIP+, VIP */
.tg { font-weight: 700; white-space: nowrap; }
.tg-owner { color: #e53935; text-shadow: 0 0 5px rgba(229, 57, 53, .95), 0 0 12px rgba(198, 40, 40, .8), 0 0 20px rgba(183, 28, 28, .55); }
.tg-admin { color: #ff8a80; text-shadow: 0 0 6px rgba(255, 138, 128, .85), 0 0 12px rgba(255, 82, 82, .45); }
.tg-cohost { color: #ff9e9e; }
.tg-vip { color: #ffe14d; text-shadow: 0 0 6px rgba(255, 214, 0, .85), 0 0 12px rgba(255, 193, 7, .5); }
.tg-vipplus { color: #8fe9ff; text-shadow: 0 0 6px rgba(111, 220, 255, .9), 0 0 12px rgba(64, 196, 255, .55); }
#chatinput { width: 100%; margin-top: 6px; padding: 6px 8px; font-size: 13px; color: var(--ink); background: var(--inset); border: 1px solid var(--line); border-radius: var(--r); outline: none; pointer-events: auto; }
#chatinput:focus { border-color: var(--accent); }

#announce { position: fixed; left: 50%; top: 10px; z-index: 60; max-width: min(720px, 92vw); padding: 8px 22px 10px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); transform: translate(-50%, -140%); transition: transform .35s; pointer-events: none; }
#announce.on { transform: translate(-50%, 0); }
#announce .at { display: block; font: 600 12px var(--head); color: var(--accent); }
#announce .am { display: block; font-size: 16px; word-break: break-word; }
#announce.glitchy { border-top-color: #00e5ff; animation: ann-glitch .25s steps(2) infinite; }
#announce.glitchy .at { color: #ff1744; text-shadow: 2px 0 #00e5ff, -2px 0 #ff1744; }
#announce.glitchy .am { text-shadow: 2px 0 rgba(0, 229, 255, .8), -2px 0 rgba(255, 23, 68, .8); }
@keyframes ann-glitch {
  0% { transform: translate(-50%, 0) skewX(0); }
  25% { transform: translate(calc(-50% + 4px), 1px) skewX(-6deg); }
  50% { transform: translate(calc(-50% - 5px), -1px) skewX(5deg); }
  75% { transform: translate(calc(-50% + 2px), 0) skewX(-2deg); }
  100% { transform: translate(-50%, 0) skewX(0); }
}
body.reduced-flash #announce.glitchy { animation: none; }

#sysmsg { position: fixed; left: 14px; bottom: 250px; z-index: 40; padding: 5px 10px; font-size: 13px; color: var(--accent); background: rgba(14, 19, 24, .8); border-left: 3px solid var(--disc); opacity: 0; pointer-events: none; }
#sysmsg.on { animation: sysmsg 6s ease-out; }
@keyframes sysmsg { 0% { opacity: 0; transform: translateX(-12px); } 8%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#holehint { position: fixed; left: 50%; bottom: 120px; z-index: 40; display: none; padding: 6px 14px; font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); pointer-events: none; transform: translateX(-50%); }
#holehint.on { display: block; }

/* ---------- walk-up prompt and dialogue ---------- */
#npcprompt { position: absolute; left: 50%; bottom: 150px; z-index: 6; padding: 8px 16px; font: 700 16px var(--head); border-color: var(--accent); transform: translateX(-50%); cursor: pointer; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translate(-50%, -4px); } }
#npcdlg { position: absolute; left: 50%; bottom: 60px; z-index: 7; width: clamp(520px, calc(100% - 500px), 800px); max-width: calc(100% - 16px); padding: 14px; transform: translateX(-50%); }
#npcdlg .dlg-main { display: flex; gap: 18px; min-height: 150px; cursor: pointer; }
#npcdlg .portrait { display: grid; place-items: center; flex: none; width: 140px; height: 140px; font: 700 64px var(--head); color: #fff; border: 2px solid var(--edge); border-radius: var(--r); text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
#npcdlg .dlg-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
#npcdlg .nm { font: 700 24px var(--head); }
#npcdlg .rule { height: 1px; margin: 6px 0 10px; background: var(--line2); }
#npcdlg .say-text { flex: 1; font-size: 16px; line-height: 1.55; }
#npcdlg .skip { margin-top: 6px; font-size: 12px; color: var(--faint); }
#npcdlg .dlg-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
#npcdlg .dbtn { flex: 1; min-width: 120px; padding: 9px 8px; font: 700 clamp(13px, 1.5vw, 17px) var(--head); white-space: nowrap; background: var(--panel2); border: 1px solid var(--line); border-bottom: 3px solid var(--edge); border-radius: var(--r); }
#npcdlg .dbtn:hover { background: var(--raise); }
#npcdlg .dbtn.go, #npcdlg .dbtn.warn { color: var(--accent); }
#npcdlg .dbtn.bad { color: var(--bad); }

/* ---------- aura reveal ---------- */
#stage { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; pointer-events: none; }
.reveal { --c: #fff; --s: 1; position: absolute; left: 50%; top: 40%; width: min(92vw, 900px); text-align: center; transform: translate(-50%, -50%); cursor: pointer; pointer-events: auto; }
.reveal .rolling { font: 600 calc(30px * var(--s)) var(--head); color: rgba(255, 255, 255, .7); filter: blur(1.6px); }
.reveal .tierlbl { font: 600 16px var(--head); color: var(--c); opacity: 0; animation: rise .5s .05s forwards; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.reveal .nm { font: 700 calc(var(--fs, 44px) * var(--s)) var(--head); color: #fff; text-shadow: 0 0 6px var(--c), 0 0 22px var(--c), 0 3px 0 rgba(0, 0, 0, .5); word-break: break-word; opacity: 0; animation: slam .55s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.reveal .odds { margin-top: 6px; font: 600 calc(18px * var(--s)) var(--head); opacity: 0; animation: rise .5s .2s forwards; text-shadow: 0 2px 4px #000, 0 0 10px var(--c); }
.reveal .sub { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .85); opacity: 0; animation: rise .5s .35s forwards; text-shadow: 0 1px 3px #000; }
.reveal .tag { display: inline-block; margin: 0 4px; padding: 0 8px; font: 700 12px/20px var(--head); border: 1px solid; border-radius: 2px; background: rgba(0, 0, 0, .4); }
.reveal .tag.new { color: var(--good); }
.reveal .tag.best, .reveal .tag.bonus { color: var(--accent); }
.reveal .ring { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border: 3px solid var(--c); border-radius: 50%; opacity: 0; animation: ring 1.1s ease-out forwards; pointer-events: none; }
.reveal .rays { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--c) 0 4deg, transparent 4deg 16deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 62%); mask: radial-gradient(circle, #000 0, transparent 62%); opacity: 0; animation: rays 3s linear forwards; pointer-events: none; }
.reveal.out { animation: fadeout .45s forwards; }
.reveal.quick { top: 56%; width: auto; pointer-events: none; }
.reveal.quick .nm { font-size: 22px; animation: rise .15s forwards; }
.reveal.quick .odds { font-size: 13px; animation: rise .15s forwards; }
.reveal.quick .tierlbl, .reveal.quick .sub { display: none; }
@keyframes slam { 0% { transform: scale(2.6); opacity: 0; filter: blur(8px); } 60% { opacity: 1; filter: blur(0); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(70); opacity: 0; } }
@keyframes rays { 0% { opacity: 0; transform: rotate(0) scale(.6); } 15% { opacity: .55; } 100% { opacity: 0; transform: rotate(60deg) scale(1.2); } }
@keyframes fadeout { to { opacity: 0; transform: translate(-50%, -60%); } }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-9px, 4px); } 40% { transform: translate(8px, -6px); } 60% { transform: translate(-6px, -3px); } 80% { transform: translate(5px, 5px); } }
body.shake #world, body.shake #hud { animation: shake .5s; }
body.anim-off .reveal, body.anim-off .reveal * { animation-duration: .01s !important; animation-delay: 0s !important; }
#flash { position: fixed; inset: 0; z-index: 9; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
body.reduced-flash #flash { display: none; }

/* ---------- toasts, banner, tooltip, modal ---------- */
#toasts { position: fixed; right: 12px; bottom: 150px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.toast { --k: var(--line); width: min(340px, calc(100vw - 24px)); padding: 8px 12px 9px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--k); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); animation: toast-in .2s ease-out; }
.toast.out { animation: toast-out .3s forwards; }
.toast h4 { margin: 0 0 2px; font: 700 15px var(--head); }
.toast p { margin: 0; font-size: 12px; color: var(--dim); }
.toast.good { --k: var(--good); }
.toast.warn { --k: var(--accent); }
.toast.bad { --k: var(--bad); }
.toast.disc { --k: var(--disc); }
@keyframes toast-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes toast-out { to { transform: translateX(40px); opacity: 0; } }

#banner { position: fixed; left: 0; right: 0; top: 74px; z-index: 35; text-align: center; pointer-events: none; }
#banner .b { display: inline-block; min-width: min(480px, 90vw); padding: 10px 36px 12px; font: 700 24px var(--head); color: #fff; background: rgba(12, 16, 20, .88); border-top: 3px solid var(--c); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); animation: banner 4.2s forwards; }
#banner .b small { display: block; margin-top: 2px; font: 400 13px var(--body); color: var(--dim); text-shadow: none; }
@keyframes banner { 0% { opacity: 0; transform: translateY(-14px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }

#tooltip { position: fixed; z-index: 100; max-width: 320px; padding: 7px 10px; font-size: 13px; line-height: 1.5; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); opacity: 0; pointer-events: none; transition: opacity .1s; }
#tooltip.on { opacity: 1; }
#tooltip .l { display: flex; justify-content: space-between; gap: 14px; }

#modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(8, 11, 14, .72); }
#modal.on { display: grid; animation: fade-in .15s; }
@keyframes fade-in { from { opacity: 0; } }
.dlg { width: min(460px, calc(100vw - 24px)); padding: 18px 20px; }
.dlg h3 { margin: 0 0 8px; font: 700 18px var(--head); }
.dlg p { margin: 0; font-size: 14px; line-height: 1.55; }
.dlg .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* full-screen fades: area changes and the cutscene title */
#fade { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; font: 600 26px var(--head); color: #bbb; background: #000; opacity: 0; pointer-events: none; transition: opacity .9s; }
#fade.on { opacity: 1; }
#cine { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(0, 10, 25, .78), rgba(0, 0, 0, .92)); opacity: 0; pointer-events: none; }
#cine .t { font: 700 clamp(32px, 6vw, 72px) var(--head); color: #d9f1ff; text-shadow: 0 0 24px #4fc3f7; }
#cine .s { margin-top: 10px; font-size: clamp(14px, 2vw, 22px); color: #9fc7e0; }
#cine.on { animation: cine-fade 4.2s ease-in-out forwards; }
@keyframes cine-fade { 0% { opacity: 0; } 18% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- start-up gate: photosensitivity warning, one-tab notice, update notice ---------- */
.gate { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 16px; background: #080b0e; }
.gate.on { display: grid; }
.gate .gbox { max-width: 520px; padding: 22px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 0 0 2px var(--edge); }
.gate h2 { margin: 0 0 10px; font: 700 21px var(--head); color: var(--accent); }
.gate p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; }
.gate .gck { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; font-size: 14px; cursor: pointer; }
.gate .gck input { flex: none; margin-top: 1px; }
.gate .btn { margin-top: 12px; padding: 8px 22px; font-size: 16px; }

/* ---------- The Bank: a slot machine next to Jake's Workshop ---------- */
.spot.bankspot .blk { display: none; }
.spot.bankspot { --wood: #8a5a32; --wood2: #5c3a1e; --trim: #d8a533; width: 54px; height: 76px; }
.bankspot .bk-body { position: absolute; inset: 0; border-radius: 4px 4px 2px 2px; background: linear-gradient(90deg, var(--wood2), var(--wood) 30%, var(--wood) 70%, var(--wood2)); box-shadow: 0 0 0 2px #2d1a0b, 0 5px 0 1px rgba(0, 0, 0, .35); }
.bankspot .bk-top { position: absolute; left: 4px; right: 4px; top: 5px; height: 14px; border-radius: 2px; background: #1c1209; color: var(--trim); font: 700 8px/14px var(--head); letter-spacing: .12em; text-align: center; }
.bankspot .bk-reels { position: absolute; left: 6px; right: 6px; top: 24px; height: 22px; display: flex; gap: 2px; padding: 2px; background: #1c1209; border-radius: 2px; }
.bankspot .bk-reels i { flex: 1; border-radius: 1px; background: linear-gradient(#f3ead4 0 40%, #d9cdae 40% 60%, #f3ead4 60%); }
.bankspot .bk-tray { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 9px; border-radius: 0 0 3px 3px; background: #1c1209; }
.bankspot .bk-lever { position: absolute; right: -7px; top: 22px; width: 4px; height: 24px; border-radius: 2px; background: #9a9a9a; }
.bankspot .bk-lever::before { content: ""; position: absolute; left: -2px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #c62828; }
.spot.bankspot.max { --wood: #6f4aa0; --wood2: #3f2766; --trim: #e6c8ff; }
.bankspot.max .bk-body { box-shadow: 0 0 0 2px #1d1033, 0 5px 0 1px rgba(0, 0, 0, .35); }
.bankspot.broken .bk-body { filter: saturate(.55) brightness(.8); transform: rotate(-3deg); }
.bankspot.broken .bk-top { color: #c62828; }
.bankspot.broken .bk-reels i:nth-child(2) { transform: translateY(5px); }
.bankspot.broken .bk-lever { transform: rotate(28deg); transform-origin: 50% 100%; }
.bankspot .nametag { top: calc(100% + 4px); }

/* the Bank window */
.bk-box { padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2); }
.bk-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.bk-row span { color: var(--dim, #9aa); }
.bk-need { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.bk-need i { width: 10px; height: 20px; border-radius: 3px; }
.bk-need span { flex: 1; }
.bk-need b { color: #ef9a9a; }
.bk-box + .tools { margin-top: 10px; }
.bk-need.ok b { color: #8bc34a; }
