* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; color: #cfd3d6; font-family: 'Consolas', 'Courier New', monospace; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at center, rgba(20,22,26,.82), rgba(0,0,0,.96)); z-index: 20; text-align: center; padding: 16px; }
.title { font-size: clamp(42px, 9vw, 96px); letter-spacing: .35em; color: #b8bec4; text-shadow: 0 0 18px rgba(170,30,30,.55), 0 0 2px #000; font-weight: bold; padding-left: .35em; }
.title.red { color: #a3221c; }
.subtitle { color: #7d8489; letter-spacing: .15em; font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 10px; width: min(340px, 100%); }
.form label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: #8b9296; letter-spacing: .1em; }
.form input { flex: 1; background: #0d0f11; border: 1px solid #333a40; color: #d8dde0; padding: 8px 10px; font-family: inherit; font-size: 14px; }
.form button { margin-top: 6px; background: #3a1210; border: 1px solid #7a2420; color: #e9d6d3; padding: 12px; letter-spacing: .2em; font-family: inherit; font-size: 14px; cursor: pointer; }
.form button:hover { background: #571915; }
.error { color: #d0564d; font-size: 13px; min-height: 16px; }
.controls { max-width: 640px; font-size: 12px; line-height: 1.8; color: #6d7377; }
.controls b { color: #a9b0b4; font-weight: normal; border: 1px solid #333; padding: 0 4px; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: rgba(220,220,220,.7); border-radius: 50%; box-shadow: 0 0 3px #000; }
#crosshair.active { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: transparent; border: 2px solid rgba(230,200,120,.9); }
#objective { position: absolute; top: 18px; left: 20px; max-width: 420px; background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,0)); padding: 10px 14px; border-left: 2px solid #8a2a22; }
#objective .label { font-size: 11px; color: #a84238; letter-spacing: .2em; }
#obj-text { font-size: 15px; color: #dfe3e6; margin-top: 3px; }
#obj-hint { font-size: 12px; color: #7f878c; margin-top: 3px; }
#objective.flash { animation: objflash 1.2s ease-out; }
@keyframes objflash { 0% { background: rgba(160,40,30,.6); } 100% { background: linear-gradient(90deg, rgba(0,0,0,.6), rgba(0,0,0,0)); } }
#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); background: rgba(0,0,0,.65); border: 1px solid #3c4348; padding: 7px 14px; font-size: 14px; color: #e8e2c9; white-space: nowrap; }
#prompt.locked { color: #e58a7f; border-color: #6e2a24; }
#messages { position: absolute; left: 20px; bottom: 120px; width: min(460px, 70vw); display: flex; flex-direction: column; gap: 4px; }
#messages div { font-size: 13px; color: #b9c0c4; text-shadow: 0 0 3px #000; animation: msgfade 7s forwards; }
#messages .objective { color: #e3c97d; } #messages .alarm { color: #ff6a5c; } #messages .death { color: #c0504a; } #messages .denied { color: #e58a7f; }
@keyframes msgfade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
body.solo #players { display: none; }
#players { position: absolute; top: 18px; right: 20px; font-size: 12px; text-align: right; line-height: 1.6; }
#players .dead { opacity: .45; text-decoration: line-through; }
#status { position: absolute; left: 20px; bottom: 26px; width: 240px; }
#health { position: relative; height: 18px; background: rgba(0,0,0,.6); border: 1px solid #333; }
#health-bar { height: 100%; width: 100%; background: linear-gradient(90deg, #6a1813, #a8312a); transition: width .2s; }
#health-num { position: absolute; right: 6px; top: 0; font-size: 12px; line-height: 18px; color: #eee; }
#stamina { height: 4px; margin-top: 4px; background: rgba(0,0,0,.6); }
#stamina-bar { height: 100%; width: 100%; background: #6e7c86; }
#weapon { position: absolute; right: 24px; bottom: 26px; text-align: right; }
#weapon-name { font-size: 12px; letter-spacing: .25em; color: #8c9398; }
#ammo { font-size: 30px; color: #e3e6e8; }
#ammo-res { color: #7d8489; font-size: 20px; }
#inventory { position: absolute; right: 24px; bottom: 100px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
#inventory div { font-size: 12px; color: #d8c27a; background: rgba(0,0,0,.5); padding: 3px 8px; border: 1px solid #4b4430; }
#countdown { position: absolute; top: 90px; left: 50%; transform: translateX(-50%); font-size: 22px; color: #ff6a5c; letter-spacing: .2em; text-shadow: 0 0 8px #000; }
#weapon-slots { display: flex; gap: 4px; justify-content: flex-end; margin-bottom: 6px; }
#weapon-slots div { font-size: 10px; padding: 3px 6px; border: 1px solid #333; background: rgba(0,0,0,.5); color: #555; letter-spacing: .05em; }
#weapon-slots div.owned { color: #a9b0b4; border-color: #4a4f52; }
#weapon-slots div.active { color: #111; background: #d8c27a; border-color: #d8c27a; }
#power { position: absolute; left: 20px; bottom: 58px; width: 240px; }
#power-label { font-size: 10px; letter-spacing: .25em; color: #b89a3a; margin-bottom: 2px; }
#power-label.ready { color: #ffd34a; animation: threatpulse .5s infinite alternate; }
#power-meter { height: 6px; background: rgba(0,0,0,.6); border: 1px solid #3a3320; }
#power-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #8a6a12, #ffd34a); transition: width .3s; }
#kills { position: absolute; right: 20px; top: 70px; font-size: 12px; color: #d8c27a; letter-spacing: .1em; text-shadow: 0 0 4px #000; }
#runclock { position: absolute; right: 20px; top: 90px; text-align: right; text-shadow: 0 0 4px #000; }
#clock { font-size: 20px; color: #e3e6e8; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
#clock::before { content: 'TIME '; font-size: 10px; color: #8c9398; letter-spacing: .2em; }
#best { display: block; font-size: 10px; color: #8c9398; letter-spacing: .15em; margin-top: 1px; }
#victory-text table { margin: 10px auto 0; border-collapse: collapse; font-size: 13px; }
#victory-text td { padding: 2px 10px; text-align: left; color: #b9c0c4; }
#victory-text td.t { text-align: right; color: #e3c97d; font-variant-numeric: tabular-nums; }
#victory-text .runtime { font-size: 30px; color: #fff; letter-spacing: .1em; }
#victory-text .record { color: #ffd34a; font-size: 18px; letter-spacing: .3em; animation: threatpulse .5s infinite alternate; }
#killpop { position: absolute; left: 50%; top: 38%; transform: translateX(-50%); text-align: center; pointer-events: none; }
#killpop div { font-size: 18px; font-weight: bold; color: #ffd34a; letter-spacing: .15em; text-shadow: 0 0 10px #000, 0 0 3px #000; animation: killfloat 1.4s ease-out forwards; }
#killpop div.big { font-size: 34px; color: #ff6a3a; }
@keyframes killfloat { 0% { opacity: 0; transform: translateY(10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) scale(1); } }
#bossbar { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: min(460px, 60vw); text-align: center; }
#boss-name { font-size: 12px; letter-spacing: .35em; color: #e0c9b0; text-shadow: 0 0 6px #000; }
#boss-meter { height: 10px; margin-top: 4px; background: rgba(0,0,0,.7); border: 1px solid #5a2a20; }
#boss-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #6a1010, #c8342a); transition: width .2s; }
#hitmark { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; opacity: 0; transition: opacity .15s;
  background: linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%); }
#hitmark.kill { background: linear-gradient(45deg, transparent 43%, #ff4a3a 43%, #ff4a3a 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #ff4a3a 43%, #ff4a3a 57%, transparent 57%); }
#powerglow { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(ellipse at center, transparent 45%, rgba(255,190,40,.35)); }
#powerglow.on { opacity: 1; animation: glowpulse 1s infinite alternate; }
@keyframes glowpulse { from { filter: brightness(.8); } to { filter: brightness(1.3); } }
#threat { position: absolute; top: 130px; left: 50%; transform: translateX(-50%); font-size: 18px; letter-spacing: .3em; color: #d8c9b0; text-shadow: 0 0 10px #000, 0 0 4px #000; opacity: .85; }
#threat.hunting { color: #ff4a3a; font-size: 22px; animation: threatpulse .6s infinite alternate; }
@keyframes threatpulse { from { opacity: .55; } to { opacity: 1; } }
#damage { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(140,0,0,.75)); opacity: 0; transition: opacity .35s; }
#clickcatch { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.7); padding: 10px 18px; border: 1px solid #444; pointer-events: auto; cursor: pointer; }

#note { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); background: #d9d3c2; color: #24211c; padding: 22px 26px; z-index: 30; box-shadow: 0 0 40px #000; font-family: 'Courier New', monospace; }
#note.terminal { background: #050b07; color: #6fdc8c; border: 1px solid #1f5a33; text-shadow: 0 0 4px rgba(111,220,140,.5); }
.note-title { font-weight: bold; margin-bottom: 12px; letter-spacing: .1em; }
#note pre { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.55; }
.note-close { margin-top: 14px; font-size: 11px; opacity: .6; }

/* ---- mission select ---- */
.form button.secondary { background: #14181b; border-color: #3a4146; font-size: 11px; padding: 9px; }
#missions { position: fixed; inset: 0; z-index: 30; background: radial-gradient(ellipse at top, #15191d, #030405); overflow-y: auto; padding: 16px; }
.ms-top { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto 10px; }
.ms-title { font-size: 28px; letter-spacing: .4em; color: #b8bec4; text-shadow: 0 0 12px rgba(170,30,30,.5); }
.ms-stats { color: #d8c27a; font-size: 12px; letter-spacing: .15em; flex: 1; }
.ms-back, .ms-start, .end-buttons button { background: #161a1d; border: 1px solid #3a4146; color: #d8dde0; padding: 9px 16px; letter-spacing: .2em; font-family: inherit; cursor: pointer; }
.ms-back:hover, .end-buttons button:hover { background: #3a1210; border-color: #7a2420; }
.ms-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 860px) { .ms-body { grid-template-columns: 1fr; } }
.ms-chapter { margin-bottom: 16px; }
.ms-ch-name { font-size: 12px; letter-spacing: .3em; color: #a84238; }
.ms-ch-blurb { font-size: 12px; color: #7d8489; margin: 3px 0 8px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; }
.ms-tile { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; text-align: left; gap: 2px 6px; padding: 8px; background: #111417; border: 1px solid #2c3236; color: #c9cfd3; font-family: inherit; cursor: pointer; min-height: 52px; }
.ms-tile .n { grid-row: span 2; font-size: 18px; color: #6d7377; align-self: center; }
.ms-tile .nm { font-size: 11px; letter-spacing: .05em; }
.ms-tile .st { font-size: 12px; color: #ffd34a; letter-spacing: .1em; }
.ms-tile:hover:not(.locked) { border-color: #7a2420; background: #1a1012; }
.ms-tile.sel { border-color: #d8c27a; background: #1d1a12; }
.ms-tile.done .n { color: #d8c27a; }
.ms-tile.locked { opacity: .45; cursor: not-allowed; }
.ms-brief { background: rgba(10,12,14,.9); border: 1px solid #2c3236; padding: 16px; align-self: start; position: sticky; top: 0; }
.ms-b-ch { font-size: 10px; letter-spacing: .3em; color: #a84238; }
.ms-b-name { font-size: 22px; letter-spacing: .12em; color: #e3e6e8; margin: 4px 0 8px; }
.ms-b-text { font-size: 13px; color: #a9b0b4; line-height: 1.5; }
.ms-b-head { font-size: 10px; letter-spacing: .3em; color: #8c9398; margin: 14px 0 5px; }
.ms-b-obj { padding-left: 18px; font-size: 12px; color: #d8dde0; line-height: 1.7; }
.ms-b-meta { font-size: 11px; color: #d8c27a; letter-spacing: .1em; margin-top: 10px; }
.ms-b-best { font-size: 12px; color: #9fd0a0; margin-top: 4px; }
.ms-start { width: 100%; margin-top: 14px; background: #3a1210; border-color: #7a2420; padding: 12px; font-size: 14px; }
.ms-start:hover { background: #571915; }
.ms-hint { color: #6d7377; font-size: 13px; }
.end-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
#victory-text .stars { font-size: 34px; color: #ffd34a; letter-spacing: .2em; }
#objective .mission { font-size: 10px; letter-spacing: .25em; color: #d8c27a; }
#pause { z-index: 40; background: rgba(4,5,7,.82); }
.pause-col { display: flex; flex-direction: column; gap: 9px; width: min(380px, 100%); }
.pause-col button { background: #161a1d; border: 1px solid #3a4146; color: #d8dde0; padding: 11px; letter-spacing: .2em; font-family: inherit; font-size: 13px; cursor: pointer; }
.pause-col button:hover { background: #3a1210; border-color: #7a2420; }
.pause-col button.small { font-size: 11px; padding: 7px; color: #8c9398; }
.pause-col label { display: grid; grid-template-columns: 1fr 150px 42px; align-items: center; gap: 8px; font-size: 12px; color: #a9b0b4; text-align: left; }
.pause-col label input[type=checkbox] { justify-self: start; width: 18px; height: 18px; }
.pause-col label span { font-size: 11px; color: #d8c27a; text-align: right; }
.set-head { font-size: 10px; letter-spacing: .3em; color: #a84238; margin-top: 6px; text-align: left; }
.pause-info { font-size: 11px; color: #6d7377; margin-top: 6px; line-height: 1.6; }
#devstats { position: fixed; top: 110px; left: 20px; z-index: 15; font-size: 11px; background: rgba(0,0,0,.7); color: #8fe08f; padding: 6px 10px; white-space: pre; pointer-events: none; }
.leaderboard table { border-collapse: collapse; font-size: 13px; margin: 0 auto; min-width: min(460px, 100%); }
.leaderboard th { font-size: 10px; letter-spacing: .2em; color: #8c9398; font-weight: normal; padding: 3px 10px; text-align: left; border-bottom: 1px solid #333a40; }
.leaderboard td { padding: 4px 10px; color: #b9c0c4; text-align: left; font-variant-numeric: tabular-nums; }
.leaderboard td.rank { color: #8c9398; width: 34px; }
.leaderboard td.time { color: #e3c97d; text-align: right; }
.leaderboard tr.r1 td.rank { color: #ffd34a; } .leaderboard tr.r2 td.rank { color: #d8dde0; } .leaderboard tr.r3 td.rank { color: #d0894a; }
.leaderboard tr.me td { background: rgba(216,194,122,.16); color: #fff; }
.leaderboard .empty { color: #6d7377; font-size: 13px; }
#menu-lb { width: min(520px, 100%); }
#menu-lb .lb-head { font-size: 11px; letter-spacing: .3em; color: #a84238; margin-bottom: 6px; }
#lb-overlay { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 25; background: rgba(5,6,8,.92); border: 1px solid #333a40; padding: 18px 22px; width: min(560px, calc(100vw - 32px)); text-align: center; }
#lb-overlay .lb-title { font-size: 12px; letter-spacing: .3em; color: #d8c27a; margin-bottom: 10px; }
#lb-overlay .lb-hint { font-size: 10px; color: #6d7377; margin-top: 10px; letter-spacing: .15em; }
#victory { justify-content: flex-start; overflow-y: auto; padding-top: 28px; gap: 10px; }
#victory .title { font-size: clamp(36px, 6vw, 64px); }
#victory-text .vt-cols { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; align-items: flex-start; margin-top: 14px; }
#victory-text .vt-head { font-size: 10px; letter-spacing: .3em; color: #a84238; margin-bottom: 6px; text-align: left; }
#victory-text table.splits { margin: 0; font-size: 12px; max-width: 520px; }
#victory-text table.splits td { padding: 2px 8px; }
#victory-text .rank { font-size: 15px; color: #d8c27a; letter-spacing: .15em; margin-top: 4px; }
#victory-text { font-size: 15px; line-height: 1.8; }
.pause-col input[type=range] { accent-color: #a8312a; } .pause-col input[type=checkbox] { accent-color: #a8312a; }

/* ---- wallet & rewards panel ---- */
#wallet { position: fixed; top: 16px; right: 16px; z-index: 40; width: min(320px, calc(100vw - 32px)); font-size: 12px; }
#wallet:empty { display: none; }
#wallet .w-head { width: 100%; display: flex; align-items: center; gap: 8px; background: #120d18; border: 1px solid #4a2d6a; color: #d9c8f0; padding: 10px 12px; letter-spacing: .2em; font-family: inherit; font-size: 11px; cursor: pointer; }
#wallet .w-head:hover { background: #1c1426; }
#wallet .w-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; box-shadow: 0 0 0 2px #222; }
#wallet .w-dot.on { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
#wallet .w-body { display: none; background: rgba(10,8,14,.96); border: 1px solid #4a2d6a; border-top: 0; padding: 12px; flex-direction: column; gap: 10px; }
#wallet.open .w-body { display: flex; }
#wallet .w-pitch { color: #c9cfd3; line-height: 1.5; }
#wallet .w-pitch b { color: #ffcf5a; }
#wallet button { font-family: inherit; cursor: pointer; letter-spacing: .15em; }
#wallet .w-connect { background: linear-gradient(90deg, #6a2ed0, #9945ff); border: 0; color: #fff; padding: 11px; font-size: 12px; }
#wallet .w-connect:hover { filter: brightness(1.15); }
#wallet .w-fine { color: #6b7378; font-size: 10px; }
#wallet .w-row { display: flex; justify-content: space-between; align-items: center; }
#wallet .w-addr { color: #fff; font-size: 14px; letter-spacing: .05em; }
#wallet .w-net { color: #8b6fb0; font-size: 10px; text-transform: uppercase; letter-spacing: .2em; }
#wallet .w-hold { padding: 7px 9px; border: 1px solid #333a40; }
#wallet .w-hold.yes { border-color: #2e7a4a; color: #6ee79a; background: rgba(40,120,70,.12); }
#wallet .w-hold.no { color: #b0a08a; }
#wallet .w-err { color: #c07a5a; }
#wallet .w-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#wallet .w-stats div { background: #15121a; padding: 8px; display: flex; flex-direction: column; }
#wallet .w-stats b { font-size: 18px; color: #ffcf5a; }
#wallet .w-stats span { color: #7a7f84; font-size: 10px; letter-spacing: .1em; }
#wallet .w-claims { display: flex; flex-direction: column; gap: 3px; max-height: 170px; overflow-y: auto; }
#wallet .w-claim { display: grid; grid-template-columns: 1fr auto 62px; gap: 8px; padding: 5px 7px; background: #111; }
#wallet .w-st { text-align: right; font-size: 10px; color: #d9a13a; }
#wallet .w-claim.paid .w-st, #wallet .w-claim.paid a { color: #6ee79a; }
#wallet .w-claim.rejected { opacity: .5; }
#wallet .w-empty { color: #6b7378; }
#wallet .w-actions { display: flex; gap: 6px; }
#wallet .w-actions button { flex: 1; background: #161a1d; border: 1px solid #3a4146; color: #c9cfd3; padding: 7px; font-size: 10px; }
#wallet .w-note { color: #e6c27a; line-height: 1.4; }
#wallet .w-note a { color: #b48cff; }

/* ---- mystery box reveal ---- */
#mbox { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 35; display: flex; flex-direction: column; align-items: center; gap: 18px; pointer-events: none; --tier: #9aa3a8; padding: 28px 48px; border-radius: 18px; background: radial-gradient(ellipse at center, rgba(8,5,14,.92) 0%, rgba(8,5,14,.8) 60%, rgba(8,5,14,0) 100%); }
#mbox.hidden { display: none; }
#mbox .mb-box { position: relative; width: 110px; height: 90px; animation: mb-shake .6s ease-in-out; }
#mbox .mb-body { position: absolute; bottom: 0; width: 110px; height: 70px; background: linear-gradient(#6a3aa0, #3a1a60); border: 3px solid #e8b84a; display: grid; place-items: center; color: #ffd76a; font-size: 34px; font-weight: bold; }
#mbox .mb-lid { position: absolute; top: 0; left: -6px; width: 122px; height: 24px; background: #7a46b8; border: 3px solid #e8b84a; transition: transform .5s cubic-bezier(.2,1.6,.4,1), opacity .5s; }
#mbox.open .mb-lid { transform: translate(30px, -60px) rotate(35deg); opacity: 0; }
#mbox.open .mb-body { box-shadow: 0 -30px 70px 20px var(--tier); color: var(--tier); }
#mbox .mb-text { text-align: center; opacity: 0; transform: translateY(10px); transition: all .4s .1s; text-shadow: 0 2px 6px #000; }
#mbox.open .mb-text { opacity: 1; transform: none; }
#mbox .mb-tier { font-size: 30px; letter-spacing: .35em; color: var(--tier); font-weight: bold; }
#mbox .mb-prize { font-size: 40px; color: #ffcf5a; font-weight: bold; margin-top: 4px; }
#mbox .mb-sub, #mbox .mb-loot { font-size: 12px; color: #c9cfd3; margin-top: 6px; letter-spacing: .1em; }
#mbox .mb-note { font-size: 13px; color: #e6c27a; margin-top: 10px; max-width: 420px; }
@keyframes mb-shake { 0%,100% { transform: rotate(0) } 20% { transform: rotate(-7deg) } 40% { transform: rotate(6deg) } 60% { transform: rotate(-5deg) } 80% { transform: rotate(4deg) } }

/* ---- map ---- */
#minimap { position: fixed; right: 16px; top: 128px; width: 170px; height: 170px; border: 1px solid #3a4146; border-radius: 50%; background: #07080a; box-shadow: 0 0 0 3px rgba(0,0,0,.6), 0 0 18px rgba(0,0,0,.8); opacity: .92; pointer-events: none; }
#bigmap { position: fixed; inset: 0; z-index: 32; background: rgba(4,5,7,.93); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; pointer-events: none; }
#bigmap.hidden { display: none; }
#bigmap canvas { border: 1px solid #3a4146; max-width: 100%; image-rendering: pixelated; }
#bigmap .bm-head { width: min(1400px, 100%); display: flex; justify-content: space-between; letter-spacing: .3em; color: #b8bec4; font-size: 14px; }
#bigmap .bm-hint { letter-spacing: .1em; font-size: 11px; color: #7a8288; }
#bigmap .bm-area { color: #4ade80; font-size: 12px; letter-spacing: .2em; }
@media (max-width: 700px) { #minimap { width: 120px; height: 120px; top: 110px; } }
.menu-pitch { color: #8b9296; font-size: 12px; text-align: center; letter-spacing: .05em; line-height: 1.5; margin-top: 4px; }

/* ---- wallet field + reward feed ---- */
#in-wallet { font-size: 12px; letter-spacing: 0; }
#in-wallet.bad { border-color: #a3221c; }
#in-wallet.good { border-color: #2e7a4a; }
.wallet-hint { font-size: 11px; color: #7a8288; line-height: 1.4; margin-top: -4px; }
.wallet-hint a { color: #b48cff; }
#mbox .mb-note.ok { color: #6ee79a; }
#feed { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(560px, calc(100vw - 32px)); }
#feed .feed-item { background: linear-gradient(90deg, rgba(40,24,6,.92), rgba(70,44,8,.92)); border: 1px solid #c8962e; color: #f3e6c8; padding: 8px 14px; border-radius: 20px; font-size: 13px; letter-spacing: .04em; box-shadow: 0 0 18px rgba(255,190,60,.35); animation: feed-in .4s ease-out; transition: opacity .7s, transform .7s; text-align: center; }
#feed .feed-item .amt { color: #ffcf5a; }
#feed .feed-item.out { opacity: 0; transform: translateY(-10px); }
@keyframes feed-in { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
#wallet .w-claim.ineligible { opacity: .6; }
#wallet .w-claim.ineligible .w-st { color: #c07a5a; }

/* ---- touch controls (phones / tablets) ---- */
#touch { position: fixed; inset: 0; z-index: 20; pointer-events: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#touch.hidden { display: none; }
#touch .t-stick-zone { position: absolute; left: 0; top: 22%; bottom: 0; width: 45%; pointer-events: auto; }
#touch .t-look-zone { position: absolute; right: 0; top: 14%; bottom: 0; width: 55%; pointer-events: auto; }
#touch .t-stick { position: fixed; width: 130px; height: 130px; border-radius: 50%; border: 2px solid rgba(255,255,255,.28); background: radial-gradient(circle, rgba(255,255,255,.08), rgba(255,255,255,.02)); transform: translate(-50%, -50%); pointer-events: none; }
#touch .t-stick.hidden { display: none; }
#touch .t-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.38); box-shadow: 0 0 12px rgba(0,0,0,.5); transform: translate(-50%, -50%); }
#touch .t-sprint { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-size: 10px; letter-spacing: .2em; color: #ffcf5a; opacity: 0; transition: opacity .15s; }
#touch .t-stick.sprinting { border-color: #ffcf5a; }
#touch .t-stick.sprinting .t-sprint { opacity: 1; }
#touch .t-btn { position: absolute; pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(18,18,22,.42); border: 2px solid rgba(255,255,255,.32); color: #f2f2f2; font: 600 20px system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 0; touch-action: none; backdrop-filter: blur(2px); }
#touch .t-btn small { font-size: 8px; letter-spacing: .12em; margin-top: 3px; opacity: .85; }
#touch .t-btn.on { background: rgba(255,255,255,.32); transform: scale(.94); }
#touch .t-fire { width: 104px; height: 104px; right: calc(34px + env(safe-area-inset-right)); bottom: calc(118px + env(safe-area-inset-bottom)); background: rgba(150,24,20,.5); border-color: rgba(255,120,110,.6); font-size: 14px; letter-spacing: .2em; }
#touch .t-fire.on { background: rgba(210,40,30,.75); }
#touch .t-crouch { right: calc(54px + env(safe-area-inset-right)); bottom: calc(26px + env(safe-area-inset-bottom)); }
#touch .t-reload { right: calc(156px + env(safe-area-inset-right)); bottom: calc(52px + env(safe-area-inset-bottom)); }
#touch .t-use { right: calc(162px + env(safe-area-inset-right)); bottom: calc(146px + env(safe-area-inset-bottom)); border-color: rgba(120,220,140,.6); }
#touch .t-weapon { right: calc(150px + env(safe-area-inset-right)); bottom: calc(238px + env(safe-area-inset-bottom)); }
#touch .t-light { right: calc(52px + env(safe-area-inset-right)); bottom: calc(246px + env(safe-area-inset-bottom)); }
#touch .t-power { right: calc(254px + env(safe-area-inset-right)); bottom: calc(40px + env(safe-area-inset-bottom)); border-color: rgba(255,200,80,.6); }
#touch .t-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); pointer-events: auto; height: 36px; min-width: 52px; padding: 0 12px; border-radius: 18px; background: rgba(18,18,22,.55); border: 1px solid rgba(255,255,255,.3); color: #eee; font: 600 12px system-ui, sans-serif; letter-spacing: .15em; touch-action: none; }
#touch .t-map { left: calc(50% - 104px); }
#touch .t-pause { left: calc(50% - 36px); }
/* HUD moved out from under the thumbs */
body.touch #status { top: 112px; bottom: auto; width: 170px; }
body.touch #power { top: 146px; bottom: auto; width: 170px; }
body.touch #messages { top: 176px; bottom: auto; width: 42vw; font-size: 11px; }
body.touch #minimap { width: 118px; height: 118px; top: 116px; }
body.touch #weapon { top: 230px; bottom: auto; transform: scale(.8); transform-origin: top right; }
body.touch #inventory { top: 320px; bottom: auto; }
body.touch #prompt { top: auto; bottom: 26%; height: auto; max-width: 70vw; white-space: normal; text-align: center; font-size: 13px; letter-spacing: .04em; color: #f2ecd6; background: rgba(0,0,0,.78); border-radius: 6px; }
body.touch #menu .controls { display: none; }
body.touch #objective { max-width: calc(50vw - 140px); min-width: 180px; padding: 6px 10px; background: rgba(0,0,0,.62); }
body.touch #objective #obj-text { font-size: 12px; }
body.touch #kills, body.touch #runclock { font-size: 11px; }
@media (max-height: 500px) { body.touch #objective #obj-hint { display: none; } }
/* the button cluster scales down on short (landscape phone) screens */
#touch .t-pad { position: absolute; right: 0; bottom: 0; width: 360px; height: 330px; pointer-events: none; transform-origin: 100% 100%; }
@media (max-height: 520px) { body.touch #touch .t-pad { transform: scale(.78); } }
@media (max-height: 400px) { body.touch #touch .t-pad { transform: scale(.68); } }
@media (max-height: 520px) {
  body.touch #minimap { width: 92px; height: 92px; top: 8px; right: 8px; }
  body.touch #kills { top: 10px; right: 110px; }
  body.touch #runclock { top: 26px; right: 110px; }
  body.touch #runclock #best { display: none; }
  body.touch #weapon { top: 50px; right: 106px; transform: scale(.7); }
  body.touch #inventory { display: none; }
  body.touch #status { top: 84px; }
  body.touch #power { top: 112px; }
  body.touch #messages { top: 136px; }
}



#btn-enter { margin-top: 10px; padding: 14px 54px; font-size: 20px; letter-spacing: .3em; background: #1a0607; color: #e8d6d6; border: 1px solid #8a1a1a; cursor: pointer; animation: enterPulse 1.6s ease-in-out infinite; }
#btn-enter:hover { background: #3a0b0d; color: #fff; }
#btn-enter.hidden { display: none; }
/* loading screen hero: full-screen looping video behind the logo, progress and ENTER button */
#loading.hero { background: #000 url(/assets/video/hero.jpg) center / cover no-repeat; }
#hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
#hero-video.on { opacity: 1; }
#loading.hero .hero-shade { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,.25), rgba(0,0,0,.75)); }
#loading.hero > :not(video):not(.hero-shade) { position: relative; z-index: 1; }
#loading.hero > button.fs-corner { position: absolute; right: auto; left: max(14px, env(safe-area-inset-left)); }   /* (top-right belongs to the wallet panel) */
#loading.hero > button.hero-corner { position: absolute; z-index: 2; padding: 9px 14px; font: 600 13px/1 system-ui, sans-serif; letter-spacing: .1em; color: #e8d6d6; background: rgba(20, 6, 7, .9); border: 1px solid #6a1a1a; border-radius: 6px; cursor: pointer; min-width: 92px; }
#loading.hero > button.hero-corner:hover { background: #3a0b0d; color: #fff; }
/* loading progress: share of the loading work done (steps weighted by how long they take) */
#load-bar { width: min(320px, 70vw); height: 4px; margin: 12px auto 0; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
#load-fill { width: 2%; height: 100%; background: linear-gradient(90deg, #6a1010, #c22a20); transition: width .6s ease-out; }
#load-sub { min-height: 16px; margin-top: 8px; font: 12px/1.3 system-ui, sans-serif; color: #8a7a7a; letter-spacing: .05em; }
#loading.done #load-bar, #loading.done #load-sub { visibility: hidden; }
/* creature models still arriving in the background (menu corner) */
#bg-load { position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); font: 12px/1.3 system-ui, sans-serif; color: #8a7a7a; letter-spacing: .05em; pointer-events: none; z-index: 30; }
#bg-load.hidden { display: none; }
/* fullscreen toggle in the loading screen corner (phones and laptops) */
.fs-corner { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); padding: 9px 16px; font: 600 13px/1 system-ui, sans-serif; letter-spacing: .12em; color: #e8d6d6; background: rgba(20, 6, 7, .75); border: 1px solid #6a1a1a; border-radius: 6px; cursor: pointer; z-index: 5; }
.fs-corner:hover { background: #3a0b0d; color: #fff; }
@keyframes enterPulse { 0%,100% { box-shadow: 0 0 0 rgba(170,30,30,0); } 50% { box-shadow: 0 0 22px rgba(200,40,40,.65); } }

/* game logo (square art with black around it): crop to the lettering, blend the black into the screen */
.logo { width: min(760px, 92vw); aspect-ratio: 2.1 / 1; object-fit: cover; object-position: 50% 47%; mix-blend-mode: screen; pointer-events: none; user-select: none; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); }
@media (max-height: 520px) { .logo { width: min(460px, 70vw); } }

/* mobile: fullscreen buttons only on touch devices; rotate-to-landscape notice in portrait */
.touch-only { display: none; }
body.touch .touch-only { display: block; }
#touch .t-fs { left: calc(50% + 32px); min-width: 44px; padding: 0 12px; font-size: 12px; letter-spacing: .08em; white-space: nowrap; }
#rotate { display: none; position: fixed; inset: 0; z-index: 200; background: #050505; color: #ddd; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; font-family: system-ui, sans-serif; }
#rotate b { font-size: 22px; letter-spacing: .12em; color: #e04040; }
#rotate span { font-size: 14px; color: #9aa; line-height: 1.5; }
#rotate .rot-phone { font-size: 64px; animation: rotPhone 2s ease-in-out infinite; }
@keyframes rotPhone { 0%, 25% { transform: rotate(0deg); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@media (orientation: portrait) { body.touch #rotate { display: flex; } }
/* phones: messages get a dark backing so they stay readable over bright walls / the flashlight */
body.touch #messages div { align-self: flex-start; max-width: 100%; background: rgba(0,0,0,.62); padding: 2px 8px; border-radius: 4px; letter-spacing: .04em; text-shadow: none; }
body.touch #objective #obj-text, body.touch #messages div { letter-spacing: .03em; }
body.touch #weapon { background: rgba(0,0,0,.5); padding: 4px 10px; border-radius: 6px; }
