/* Numbers: Pixelify Sans draws 5 like an S, so digits come from Jersey 10 (just 0-9, saved in fonts/), sized to sit with the words */
@font-face { font-family: 'Lootle Digits'; src: url(fonts/jersey10-digits.woff2) format('woff2'); unicode-range: U+30-39; size-adjust: 128%; font-display: swap; }
:root {
  --bg: #0d0b16; --panel: #1a1528; --panel2: #231c36; --edge: #3a2f55; --ink: #efe6d2; --muted: #9a8fb0;
  --gold: #f2c14e; --steel: #d3dae2; --magic: #c39bff; --rope: #d9a066; --light: #ffb347; --heal: #ff6b5e; --block: #8fb8d9;
  --z0: #2c5a2f; --z1: #1d4a66; --z2: #4b2f66; --z3: #6e2a1e; --z4: #4a4458; --z5: #6a5418;
  --cell: min(calc((100vw - 92px) / 6), 60px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: 'Lootle Digits', 'Pixelify Sans', ui-monospace, monospace; font-size: 16px; min-height: 100vh;
  background: radial-gradient(ellipse at 50% -10%, #2a2045 0%, var(--bg) 60%) fixed;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
b { color: var(--gold); font-weight: 600; }
h2, h3 { font-family: 'Silkscreen', monospace; font-weight: 400; letter-spacing: 1px; margin: 14px 0 6px; }
h2 { font-size: 22px; } h3 { font-size: 14px; color: var(--muted); }
.sub { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }

header.top { max-width: 480px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 4px; }
.brand { font-family: 'Silkscreen', monospace; font-size: 20px; letter-spacing: 4px; cursor: pointer;
  color: var(--gold); text-shadow: 2px 0 #c0392b, -2px 0 #2f7fb0; }
.iconbtn { width: 34px; height: 34px; border: 2px solid var(--edge); background: var(--panel); color: var(--ink);
  font-family: 'Silkscreen', monospace; font-size: 16px; cursor: pointer; }
main { max-width: 480px; margin: 0 auto; padding: 0 12px 40px; }
.screen { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

.btn { font-family: 'Silkscreen', monospace; font-size: 16px; letter-spacing: 1px; color: var(--ink); cursor: pointer;
  background: var(--panel2); border: 3px solid #6fd6f0; box-shadow: 0 0 0 2px #0d0b16, 0 4px 0 2px #0a2a38; padding: 12px 18px; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 2px #0d0b16, 0 1px 0 2px #0a2a38; }
.btn.big { display: block; width: 100%; font-size: 20px; padding: 16px; margin: 18px 0 10px; }
.btn.small { font-size: 12px; padding: 8px 12px; }
.btn.ghost { border-color: var(--edge); box-shadow: none; background: transparent; }
.btn.hot { border-color: var(--gold); color: var(--gold); }

/* ---------- title ---------- */
.title { text-align: center; padding-top: 30px; }
.logo { font-family: 'Silkscreen', monospace; font-size: clamp(44px, 14vw, 72px); letter-spacing: 6px; color: var(--gold);
  text-shadow: 4px 0 #c0392b, -4px 0 #2f7fb0, 0 0 24px rgba(242,193,78,.35); }
.tagline { font-family: 'Silkscreen', monospace; color: #6fd6f0; letter-spacing: 8px; font-size: 14px; margin-top: 4px; }
.hero-big { display: flex; justify-content: center; gap: 4px; margin: 26px 0 10px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.pitch { color: var(--muted); line-height: 1.5; font-size: 16px; }
.meta { font-family: 'Silkscreen', monospace; font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.meta.warn { color: var(--light); margin-top: 6px; }

/* ---------- scout ---------- */
.zones { display: flex; flex-direction: column; gap: 6px; }
.zone { border: 2px solid rgba(255,255,255,.08); padding: 6px 8px; }
.zone.z0 { background: color-mix(in srgb, var(--z0) 55%, var(--bg)); } .zone.z1 { background: color-mix(in srgb, var(--z1) 55%, var(--bg)); }
.zone.z2 { background: color-mix(in srgb, var(--z2) 55%, var(--bg)); } .zone.z3 { background: color-mix(in srgb, var(--z3) 55%, var(--bg)); }
.zone.z4 { background: color-mix(in srgb, var(--z4) 70%, var(--bg)); } .zone.z5 { background: color-mix(in srgb, var(--z5) 60%, var(--bg)); }
.zname { font-family: 'Silkscreen', monospace; font-size: 12px; display: flex; justify-content: space-between; margin-bottom: 4px; }
.zname span { color: var(--muted); }
.zfloors { display: flex; gap: 6px; }
.sf { flex: 1; display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.25); padding: 3px 4px; }
.need { font-family: 'Silkscreen', monospace; font-size: 11px; line-height: 1.1; }
.need.steel { color: var(--steel); } .need.magic { color: var(--magic); } .need.rope { color: var(--rope); }
.need.light { color: var(--light); } .need.hurt { color: var(--heal); }
.bossrow { display: flex; gap: 10px; align-items: center; font-size: 14px; }

.recipes { display: flex; flex-direction: column; gap: 4px; }
.rline { display: flex; align-items: center; gap: 2px; background: var(--panel); padding: 4px 6px; }
.rline .ar { font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--muted); padding: 0 3px; white-space: nowrap; }
.rline .rinfo { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- packing ---------- */
.hud { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.timer { flex: 1; display: flex; align-items: center; gap: 8px; }
.tbar { flex: 1; height: 14px; border: 2px solid var(--edge); background: #0a0812; position: relative; }
.tbar i { position: absolute; inset: 0; right: auto; background: linear-gradient(90deg, #6fd6f0, #2f7fb0); }
.tbar.low i { background: linear-gradient(90deg, #ff6b5e, #8c2433); animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .5; } }
#tnum { font-family: 'Silkscreen', monospace; font-size: 22px; min-width: 44px; text-align: right; }
.packrow { display: flex; gap: 8px; justify-content: center; }
.board { display: grid; grid-template-columns: repeat(6, var(--cell)); grid-template-rows: repeat(6, var(--cell)); gap: 3px;
  padding: 5px; background: #3b2a1c; border: 3px solid #1b1424; box-shadow: inset 0 0 0 3px #5a3f28, 0 6px 0 #120d1c;
  touch-action: none; position: relative; }
.board::before { content: 'YOUR PACK'; position: absolute; top: -15px; left: 6px; font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--muted); }
.cell { background: #241a12; box-shadow: inset 2px 2px 0 #150f0a; position: relative; cursor: pointer; }
.cell.sel { outline: 3px solid var(--gold); outline-offset: -1px; z-index: 2; }
.cell.hover { background: #3a2a1a; }
.cell.lifting .tile { opacity: .25; }
.tile { position: absolute; inset: 2px; display: flex; align-items: center; justify-content: center; }
.tile img { width: 78%; height: 78%; }
.tile.t1 { background: #4a3826; box-shadow: inset 0 0 0 2px #b07a45; }
.tile.t2 { background: #3c4250; box-shadow: inset 0 0 0 2px #d3dae2; }
.tile.t3 { background: #4d3a12; box-shadow: inset 0 0 0 2px var(--gold), 0 0 10px rgba(242,193,78,.6); animation: shine 1.4s ease-in-out infinite; }
@keyframes shine { 50% { box-shadow: inset 0 0 0 2px #fff3c0, 0 0 16px rgba(242,193,78,.9); } }
.tile.ready { animation: ready .7s ease-in-out infinite; }
@keyframes ready { 50% { transform: scale(1.08); filter: brightness(1.3); } }
.tile.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.3); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.tile.drop { animation: drop .3s ease-in; }
@keyframes drop { from { transform: translateY(calc(var(--cell) * -1)); opacity: 0; } }
.tile.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ghosttile { position: fixed; left: 0; top: 0; width: 56px; height: 56px; pointer-events: none; z-index: 40; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 6px 4px rgba(0,0,0,.6)); }
.ghosttile img { width: 48px; height: 48px; }

.gauge { width: 50px; display: flex; flex-direction: column; border: 3px solid #1b1424; background: #0a0812; position: relative; }
.gauge::before { content: 'DEPTH'; position: absolute; top: -15px; left: 2px; font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--muted); }
.gf { flex: 1; display: flex; align-items: center; gap: 2px; padding-left: 3px; opacity: .45; position: relative; min-height: 0; }
.gf img { width: 14px; height: 14px; }
.gf.z0 { background: var(--z0); } .gf.z1 { background: var(--z1); } .gf.z2 { background: var(--z2); }
.gf.z3 { background: var(--z3); } .gf.z4 { background: var(--z4); } .gf.z5 { background: var(--z5); }
.gf.clear { opacity: 1; }
.gf.here { opacity: 1; outline: 2px solid var(--gold); outline-offset: -2px; z-index: 1; }
.gf .gn { font-family: 'Silkscreen', monospace; font-size: 9px; color: rgba(255,255,255,.7); }
.underboard { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; }
.next { display: flex; align-items: center; gap: 4px; background: var(--panel); padding: 4px 6px; border: 2px solid var(--edge); }
.next span { font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--muted); margin-right: 2px; }
.next #nextq { display: flex; gap: 3px; }
.next #nextq img:first-child { outline: 1px solid var(--gold); }
.proj { flex: 1; font-size: 14px; line-height: 1.15; text-align: center; }
.proj b { font-size: 18px; }
.proj .ptag { display: block; font-size: 12px; color: var(--muted); }
.proj.up { animation: pop .4s; }
.trash { background: var(--panel); border: 2px dashed #6e6880; padding: 4px 6px; display: flex; flex-direction: column; align-items: center; cursor: pointer; color: var(--muted); font-family: 'Silkscreen', monospace; font-size: 10px; }
.trash.hover { border-color: var(--heal); background: #3a1620; }
.chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.chip { background: var(--panel); border: 2px solid var(--edge); display: flex; flex-direction: column; align-items: center; padding: 3px 0; }
.chip b { font-family: 'Silkscreen', monospace; color: var(--ink); font-size: 16px; font-weight: 400; }
.chip span { font-size: 10px; color: var(--muted); font-family: 'Silkscreen', monospace; }
.chip.zero { opacity: .45; }
.chip.bump { animation: pop .35s; border-color: var(--gold); }
.packfoot { display: flex; justify-content: space-between; margin-top: 10px; }
.floattext { position: fixed; pointer-events: none; z-index: 45; font-family: 'Silkscreen', monospace; font-size: 13px; color: #fff;
  text-shadow: 2px 2px 0 #000; white-space: nowrap; transform: translate(-50%, 0); animation: floatup 1s ease-out forwards; }
.floattext.bad { color: var(--heal); }
@keyframes floatup { to { transform: translate(-50%, -40px); opacity: 0; } }

/* ---------- delve ---------- */
.dhud { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.hearts { display: flex; gap: 3px; }
.chips.mini { flex: 1; } .chips.mini .chip span { display: none; } .chips.mini .chip b { font-size: 13px; }
.shaftwrap { height: min(62vh, 520px); overflow: hidden; position: relative; border: 3px solid #1b1424; background: #07060c; }
.shaft { position: absolute; left: 0; right: 0; top: 0; transition: transform .6s ease; }
.zbanner { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'Silkscreen', monospace; font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,.85); }
.zbanner i { font-family: 'Lootle Digits', 'Pixelify Sans', monospace; font-style: normal; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: 0; }
.fl { height: 86px; position: relative; border-bottom: 8px solid #2b2236; }
.fl.z0, .zbanner.z0 { background: color-mix(in srgb, var(--z0) 60%, #07060c); } .fl.z1, .zbanner.z1 { background: color-mix(in srgb, var(--z1) 60%, #07060c); }
.fl.z2, .zbanner.z2 { background: color-mix(in srgb, var(--z2) 60%, #07060c); } .fl.z3, .zbanner.z3 { background: color-mix(in srgb, var(--z3) 60%, #07060c); }
.fl.z4, .zbanner.z4 { background: color-mix(in srgb, var(--z4) 75%, #07060c); } .fl.z5, .zbanner.z5 { background: color-mix(in srgb, var(--z5) 65%, #07060c); }
.fl .flab { position: absolute; left: 6px; top: 5px; font-family: 'Silkscreen', monospace; font-size: 10px; color: rgba(255,255,255,.55); }
.fl .obs { position: absolute; left: 60%; bottom: 2px; transition: opacity .4s, transform .4s; }
.fl .obs.beaten { opacity: 0; transform: translateY(-10px) rotate(20deg) scale(.7); }
.fl .chestsp { position: absolute; left: 84%; bottom: 2px; }
.fl .chestsp.opened { opacity: .35; }
.fl.chasm { border-bottom-color: transparent; }
.fl.chasm::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: linear-gradient(90deg, #2b2236 0 50%, #000 50% 74%, #2b2236 74%); }
.fl.chasm.bridged::after { background: linear-gradient(90deg, #2b2236 0 50%, transparent 50% 74%, #2b2236 74%),
  repeating-linear-gradient(90deg, #8b5a33 0 6px, #553320 6px 8px); }
.fl.chasm .obs { left: 52%; }
.fl.dark::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.88); z-index: 3; transition: background .5s; }
.fl.dark.lit::before { background: radial-gradient(circle at 45% 70%, transparent 0 60px, rgba(0,0,0,.6) 140px); }
.herosprite { position: absolute; left: 6%; top: 0; z-index: 5; transition: left .45s ease, top .5s ease-in; }
.herosprite.hit { animation: shake .3s; filter: brightness(2) saturate(0); }
.herosprite.dead { transform: rotate(90deg) translateX(10px); filter: grayscale(1); transition: transform .4s; }
.dpop { position: absolute; z-index: 6; font-family: 'Silkscreen', monospace; font-size: 12px; white-space: nowrap; text-shadow: 2px 2px 0 #000;
  animation: floatup2 1.3s ease-out forwards; pointer-events: none; }
@keyframes floatup2 { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
.dpop.steel { color: var(--steel); } .dpop.magic { color: var(--magic); } .dpop.rope { color: var(--rope); } .dpop.light { color: var(--light); }
.dpop.hurt { color: var(--heal); } .dpop.gold { color: var(--gold); } .dpop.good { color: #7ccf5a; } .dpop.block { color: var(--block); }
.dfoot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dlog { flex: 1; font-size: 14px; color: var(--muted); min-height: 36px; line-height: 1.25; }

/* ---------- end ---------- */
.end { text-align: center; padding-top: 10px; }
.endhead { font-family: 'Silkscreen', monospace; font-size: 26px; letter-spacing: 2px; margin-top: 10px; }
.endhead.slain { color: var(--gold); } .endhead.dead { color: var(--heal); } .endhead.stuck { color: var(--rope); }
.bigdepth { font-family: 'Silkscreen', monospace; font-size: 40px; margin-top: 8px; }
.bigdepth b { font-size: 64px; font-weight: 400; } .bigdepth span { color: var(--muted); font-size: 22px; }
.depthm { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); }
.why { margin: 10px 0; font-size: 16px; }
.depthbar { display: flex; gap: 2px; justify-content: center; margin: 10px 0; }
.depthbar i { width: 14px; height: 18px; background: #15111f; box-shadow: inset 0 0 0 1px #3a2f55; display: flex; align-items: center; justify-content: center; }
.depthbar i[class^="z"] { box-shadow: none; }
.depthbar i.z0 { background: var(--z0); } .depthbar i.z1 { background: var(--z1); } .depthbar i.z2 { background: var(--z2); }
.depthbar i.z3 { background: var(--z3); } .depthbar i.z4 { background: var(--z4); } .depthbar i.z5 { background: var(--z5); }
.depthbar i img { width: 10px; height: 10px; }
.packed { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.packed .tile { position: relative; inset: auto; width: 40px; height: 40px; }
.statsrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.stat { background: var(--panel); border: 2px solid var(--edge); padding: 6px 2px; }
.stat b { display: block; font-family: 'Silkscreen', monospace; font-size: 20px; font-weight: 400; color: var(--ink); }
.stat span { font-size: 11px; color: var(--muted); }
.countdown { font-family: 'Silkscreen', monospace; color: var(--muted); font-size: 13px; }
.countdown b { color: #6fd6f0; font-weight: 400; }
.endbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.endbtns .btn { white-space: nowrap; }
.hist { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.hrow { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.hrow span { width: 110px; color: var(--muted); }
.hrow i { display: block; height: 14px; background: #2f7fb0; min-width: 4px; font-style: normal; font-size: 11px; padding: 0 4px; text-align: right; }

/* ---------- modal + toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5,4,10,.82); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 12px; }
.modal.hidden { display: none; }
.mbox { max-width: 440px; width: 100%; background: var(--panel); border: 3px solid var(--edge); padding: 14px 16px; position: relative; }
.mbox p { line-height: 1.45; color: #d9cfe8; margin: 8px 0; }
.mclose { position: absolute; right: 8px; top: 8px; }
.toast { position: fixed; left: 50%; top: 64px; transform: translate(-50%, -20px); background: var(--gold); color: #1b1424; font-family: 'Silkscreen', monospace;
  font-size: 13px; padding: 8px 14px; z-index: 70; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; box-shadow: 0 4px 0 #a8761c; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== feel pass: sound button, merge juice, drop preview ===== */
.hright { display: flex; gap: 6px; }
.iconbtn.off { opacity: .4; text-decoration: line-through; }
.spark { position: fixed; width: 5px; height: 5px; z-index: 46; pointer-events: none; margin: -2px 0 0 -2px; animation: spark .6s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.flytile { position: fixed; z-index: 44; pointer-events: none; transition: transform .17s ease-in, opacity .17s ease-in; }
.flytile img { width: 70%; height: 70%; }
.tile.pop { animation: pop .38s ease-out .1s backwards; }
.floattext.good { color: #7ccf5a; } .floattext.gold { color: var(--gold); font-size: 15px; }
.floattext.combo { color: #6fd6f0; font-size: 18px; animation: comboup 1s ease-out forwards; }
@keyframes comboup { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -30px) scale(1); opacity: 0; } }
.cell.hv-merge { background: #24431f; box-shadow: inset 0 0 0 2px #7ccf5a; }
.cell.hv-move { background: #2a2a40; box-shadow: inset 0 0 0 2px #6fd6f0; }
.cell.hv-bad { background: #3a1620; box-shadow: inset 0 0 0 2px #e04a3f; }
.ghosttile.willmerge { filter: drop-shadow(0 0 6px #7ccf5a) drop-shadow(0 6px 4px rgba(0,0,0,.6)); transform-origin: center; }
.board.quake { animation: quake .35s; }
@keyframes quake { 20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, -1px); } 80% { transform: translate(2px, 1px); } }
.board.urgent { animation: urgent .5s; }
@keyframes urgent { 30% { box-shadow: inset 0 0 0 3px #e04a3f, 0 0 18px rgba(224,74,63,.6); } }
.gauge { padding: 0; }
.grows { display: flex; flex-direction: column; height: 100%; }
.gmark { position: absolute; right: -12px; top: 0; transform: translateY(-50%); transition: top .45s cubic-bezier(.3,1.4,.6,1); z-index: 3;
  filter: drop-shadow(0 0 3px rgba(242,193,78,.9)); }
.gmark.dead img { filter: grayscale(.6); } .gmark.slain { filter: drop-shadow(0 0 6px #f2c14e); }
.packrow { padding-right: 10px; }

/* ===== the dungeon stage ===== */
.dgold { display: flex; align-items: center; gap: 3px; font-family: 'Silkscreen', monospace; }
.dgold b { color: var(--gold); font-weight: 400; min-width: 26px; }
.dgold.bump { animation: pop .35s; }
.stagerow { display: flex; gap: 6px; align-items: stretch; }
.stage { position: relative; flex: 1; border: 3px solid #1b1424; box-shadow: 0 6px 0 #120d1c; background: #07060c; line-height: 0; }
.stage canvas { width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.dover { position: absolute; inset: 0; pointer-events: none; overflow: hidden; line-height: 1.2; }
.dover .dpop { transform: translate(-50%, 0); font-size: 12px; }
.dtitle { position: absolute; left: 0; right: 0; top: 16%; text-align: center; animation: titlein 1.6s ease-out forwards; }
.dtitle b { display: block; font-family: 'Silkscreen', monospace; font-weight: 400; font-size: clamp(14px, 4.6vw, 22px); letter-spacing: 3px; color: #fff; text-shadow: 3px 3px 0 #000, -2px 0 #c0392b, 2px 0 #2f7fb0; }
.dtitle i { display: block; font-style: normal; font-size: 12px; color: rgba(255,255,255,.75); text-shadow: 2px 2px 0 #000; margin-top: 2px; }
.dtitle.boss b { color: #ff8a7a; font-size: clamp(16px, 5.5vw, 26px); } .dtitle.win b { color: var(--gold); font-size: clamp(18px, 6vw, 30px); }
.dtitle.dead b { color: var(--heal); } .dtitle.stuck b { color: var(--rope); }
@keyframes titlein { 0% { opacity: 0; transform: translateY(-8px) scale(1.3); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.dmeter { width: 44px; position: relative; display: flex; }
.dmbar { width: 10px; display: flex; flex-direction: column; border: 2px solid #1b1424; background: #07060c; }
.dmbar i { flex: 1; opacity: .25; transition: opacity .3s; }
.dmbar i.lit { opacity: 1; }
.dmbar i.z0 { background: var(--z0); } .dmbar i.z1 { background: var(--z1); } .dmbar i.z2 { background: var(--z2); }
.dmbar i.z3 { background: var(--z3); } .dmbar i.z4 { background: var(--z4); } .dmbar i.z5 { background: var(--z5); }
.dmmarks { position: relative; flex: 1; }
.dmmarks span { position: absolute; left: 3px; font-family: 'Silkscreen', monospace; font-size: 8px; color: var(--muted); }
.dmhero { position: absolute; left: -4px; top: 2.5%; transform: translateY(-50%); transition: top .6s ease-in-out; display: flex; align-items: center; z-index: 2; }
.dmhero em { font-style: normal; font-family: 'Silkscreen', monospace; font-size: 9px; color: #6fd6f0; background: #0d0b16; padding: 0 2px; }
.bigdepth.landed b { animation: pop .4s; color: var(--gold); }
/* the dungeon gets more room on wide screens */
main:has(.delve) { max-width: 760px; }
/* item counts: big icon on the left, number on the right */
.chip { flex-direction: row; justify-content: center; gap: 3px; padding: 4px 2px; }
.chip img { width: 30px; height: 30px; flex: none; }
.chip .cv { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.chip b { font-size: 22px; }
.chip span { font-size: 9px; margin-top: 2px; }
.chips.mini .chip img { width: 28px; height: 28px; }
.chips.mini .chip b { font-size: 22px; }
@media (max-width: 400px) { .chip img { width: 24px; height: 24px; } .chip b { font-size: 18px; } .chips.mini .chip img { width: 22px; height: 22px; } .chips.mini .chip b { font-size: 18px; } }
