* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #07090b; overflow: hidden; touch-action: none; }
body { font: 14px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: #dfe7ea; user-select: none; -webkit-user-select: none; }
#wrap { position: fixed; inset: 0; }
#view { width: 100%; height: 100%; display: block; image-rendering: auto; }
#flash { position: absolute; inset: 0; pointer-events: none; background: #c8102e; opacity: 0; }
#mini { position: absolute; top: 12px; right: 12px; width: 168px; height: 168px; display: none; opacity: .85; border-radius: 8px; background: rgba(7, 9, 11, .7); }

#say { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); max-width: min(720px, 92vw);
  padding: 8px 14px; border-radius: 8px; background: rgba(7, 9, 11, .78); color: #f4e9ff; text-align: center;
  opacity: 0; transition: opacity .25s; pointer-events: none; font-style: italic; }
#say.on { opacity: 1; }

#hud { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 17, .86); border-top: 2px solid #1f6b5c; pointer-events: none; }
.box { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 6px; background: #121a1f; }
.box.grow { flex: 1; justify-content: space-between; min-width: 0; }
.box.right { justify-content: flex-end; }
.lbl { font-size: 11px; letter-spacing: .12em; color: #6fb7a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box b { font-size: 22px; color: #f2f5f6; min-width: 2.2ch; text-align: right; }
#hp.low { color: #ff5b6e; }
#kills { font-size: 12px; color: #8a9aa1; white-space: nowrap; }
#ppe { display: flex; gap: 3px; }
#ppe img { width: 22px; height: 22px; image-rendering: pixelated; opacity: .18; filter: grayscale(1); transition: opacity .3s; }
#ppe img.on { opacity: 1; filter: none; }
.bar { position: relative; width: 110px; height: 12px; border-radius: 6px; background: #05080a; border: 1px solid #2a3a40; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: #3fdc6b; transition: width .2s, background .3s;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.2); }
.bar.blue i { background: #4f9cff; width: 0; }
.stack { display: flex; flex-direction: column; gap: 3px; }
#prot { font-size: 10px; color: #8fb7ff; white-space: nowrap; }
.ppebox { transition: background .15s, box-shadow .15s; }
.ppebox.soak { background: #16304f; box-shadow: 0 0 12px #4f9cff; }
#wicon { width: 34px; height: 34px; image-rendering: pixelated; background: #0a1013; border-radius: 6px; border: 1px solid #2a3a40; }
.wbox .lbl { color: #ffd36b; }
#slots { display: flex; gap: 2px; }
#slots i { font-style: normal; font-size: 9px; width: 13px; height: 13px; line-height: 13px; text-align: center; border-radius: 3px; background: #0a1013; color: #2e3b40; }
#slots i.own { color: #9fb3bb; background: #1c272c; }
#slots i.dry { color: #5d4a4a; }
#slots i.cur { color: #07090b; background: #ffd36b; }
#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); padding: 6px 12px; border-radius: 6px; background: rgba(26, 143, 60, .85);
  color: #fff; font-weight: bold; letter-spacing: .06em; opacity: 0; transition: opacity .2s; pointer-events: none; }
#prompt.on { opacity: 1; }
.touchy #prompt { display: none; }
.readybox { display: none; }
.readybox.on { display: flex; }
#readyicon { width: 28px; height: 28px; image-rendering: pixelated; }
#bagbtn, #mixbtn, #throwbtn { position: absolute; display: grid; place-items: center; border-radius: 12px; color: #fff; font-weight: bold; }
#bagbtn { left: 12px; top: 12px; width: 48px; height: 48px; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.2); font-size: 24px; }
#mixbtn { left: 50%; top: 56%; transform: translateX(-50%); padding: 12px 22px; background: rgba(26,143,60,.85); border: 2px solid #3fdc6b; display: none; }
#mixbtn.on { display: grid; }
#throwbtn { right: 200px; bottom: 36px; width: 56px; height: 56px; background: rgba(255, 211, 107, .2); border: 2px solid rgba(255, 211, 107, .6); border-radius: 50%; display: none; }
#throwbtn.on { display: grid; }
#throwbtn img { width: 32px; height: 32px; image-rendering: pixelated; pointer-events: none; }
#bag { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(7, 9, 11, .82); z-index: 5; }
#bag.hide { display: none; }
#bag .panel { width: min(720px, 100%); max-height: 100%; overflow: auto; padding: 18px 20px; border-radius: 12px; background: #10171b; border: 2px solid #1f6b5c; }
#bag h2 { color: #b6ff3b; letter-spacing: .1em; margin-bottom: 6px; }
#bag h3 { color: #6fb7a6; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 14px 0 6px; }
#bag .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
#bag .item, #bag .recipe { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: #172126; }
#bag .item.none { opacity: .35; }
#bag .item[data-ready] { cursor: pointer; }
#bag .item.ready { background: #3a3212; outline: 2px solid #ffd36b; }
#bag img { width: 36px; height: 36px; image-rendering: pixelated; flex: none; }
#bag span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
#bag small { color: #8a9aa1; font-size: 11px; }
#bag em { font-style: normal; font-weight: bold; color: #ffd36b; }
#bag .recipe { margin-bottom: 6px; }
#bag .recipe.cant { opacity: .45; }
#bag button { font: inherit; font-weight: bold; letter-spacing: .1em; padding: 8px 14px; border: 0; border-radius: 8px; background: #1a8f3c; color: #fff; cursor: pointer; }
#bag button:disabled { background: #33403f; color: #6f7f80; cursor: default; }
#bag .close { display: block; margin: 16px auto 0; background: #1f6b5c; }
#bag .hint { color: #8a9aa1; font-style: italic; font-size: 13px; }
#shield { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 60px 18px #4f9cff; }

#touch { position: absolute; inset: 0 0 56px 0; display: none; }
.touchy #touch { display: block; }
#stick { position: absolute; left: 28px; bottom: 28px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .07); border: 2px solid rgba(255, 255, 255, .14); }
#knob { position: absolute; left: 38px; top: 38px; width: 44px; height: 44px; border-radius: 50%; background: rgba(111, 183, 166, .55); }
#fire, #swap, #jump { position: absolute; display: grid; place-items: center; border-radius: 50%; font-weight: bold; color: #fff; }
#fire { right: 28px; bottom: 32px; width: 92px; height: 92px; background: rgba(200, 16, 46, .5); border: 2px solid rgba(255, 120, 140, .5); }
#jump { right: 44px; bottom: 140px; width: 60px; height: 60px; background: rgba(111, 183, 166, .35); border: 2px solid rgba(111, 183, 166, .6); font-size: 26px; }
#swap { right: 136px; bottom: 40px; width: 56px; height: 56px; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .2); font-size: 22px; }

#screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 24px; background: rgba(7, 9, 11, .9); text-align: center; animation: fade .35s ease; }
#screen.hide { display: none; }
#screen h1 { font-size: clamp(30px, 7vw, 80px); letter-spacing: .1em; color: #b6ff3b; line-height: 1; }
#screen h2 { font-size: clamp(20px, 4vw, 32px); color: #b6ff3b; letter-spacing: .08em; }
#screen .sub { color: #c86bff; letter-spacing: .2em; font-size: 13px; text-transform: uppercase; }
#screen .journal { max-width: 640px; color: #e8dcf2; font-style: italic; font-size: 16px; }
#screen .stats { color: #8a9aa1; }
#screen .keys { color: #8a9aa1; font-size: 12px; max-width: 640px; }
#screen .keys b { color: #dfe7ea; }
#screen button { font: inherit; font-size: 16px; letter-spacing: .12em; padding: 12px 28px; border-radius: 8px; border: 0;
  background: #1f6b5c; color: #fff; cursor: pointer; transition: transform .15s, background .15s; }
#screen button:hover { background: #26876f; transform: scale(1.04); }
@keyframes fade { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .box { padding: 3px 6px; gap: 5px; }
  .box b { font-size: 17px; }
  .box.grow #lvl { display: none; }
  #kills { font-size: 10px; }
  #ppe img { width: 16px; height: 16px; }
  .bar { width: 64px; height: 9px; }
  #prot { display: none; }
  #wicon { width: 26px; height: 26px; }
  #slots i { width: 10px; height: 11px; line-height: 11px; font-size: 8px; }
  #say { bottom: 64px; font-size: 12px; }
}

/* Specimen Zero's health */
#bossbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: min(520px, 80vw); display: none; flex-direction: column; align-items: center; gap: 3px; z-index: 4; pointer-events: none; }
#bossbar.on { display: flex; }
#bossbar span { font-size: 12px; letter-spacing: .3em; color: #ff8a9a; text-shadow: 0 0 6px #000; }
#bossbar .bar { width: 100%; height: 12px; border-radius: 6px; background: rgba(20, 4, 8, .8); border: 1px solid #8a1a2a; overflow: hidden; }
#bossbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #b3121f, #ff3b4e); transition: width .15s; }
#bossbar.rage i { background: linear-gradient(90deg, #ff3b4e, #ffb020); animation: pulse .6s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
body.atstation #bossbar, body.atbench #bossbar { display: none; }
