/* THE REAPER - blood red on near-black. Laid out for an iPhone 15 Pro Max
   first (430 x 740 in Safari), safe areas, 44 px touch targets. */
:root {
  --red: #d8253a; --red2: #ff3b4f; --ink: #07060a; --card: rgba(16, 13, 18, .94); --line: rgba(255, 255, 255, .1);
  --txt: #f2eee9; --mut: #a39c96; --gold: #ffc83a;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--txt); font: 15px/1.45 Inter, system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; }
body { height: 100dvh; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; width: 100%; height: 100%; touch-action: none; }
body.replaying #game canvas { filter: contrast(1.08) saturate(.82); }
#buildTag { position: fixed; right: calc(6px + var(--sr)); bottom: calc(4px + var(--sb)); font-size: 10px; color: rgba(255,255,255,.28); z-index: 900; pointer-events: none; }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 12px; padding: 13px 18px; min-height: 46px; font-weight: 800; letter-spacing: .02em; cursor: pointer; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn.red { background: linear-gradient(180deg, var(--red2), var(--red)); color: #fff; box-shadow: 0 6px 20px rgba(216, 37, 58, .35); }
.btn.ghost { background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }
.btn.sm { padding: 9px 14px; min-height: 40px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.link { background: none; border: 0; color: var(--red2); font-weight: 700; padding: 10px 4px; cursor: pointer; min-height: 44px; }
input { font: 16px Inter, sans-serif; width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--txt); margin-bottom: 10px; -webkit-user-select: text; user-select: text; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.1); border: 1px solid var(--line); font: 600 12px Inter, sans-serif; text-align: center; margin: 0 2px; }
.muted { color: var(--mut); } .small { font-size: 13px; }

/* ---------- screens and cards ---------- */
.screen { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: calc(var(--mdts-h, 52px) + 12px) calc(14px + var(--sr)) calc(14px + var(--sb)) calc(14px + var(--sl)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen.dim { background: rgba(5, 4, 7, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px 20px; margin: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.card.wide { max-width: 560px; }
.card h2 { font: 700 26px/1.1 Oswald, Inter, sans-serif; letter-spacing: .02em; margin: 2px 0 14px; text-transform: uppercase; }
.card h3 { font: 700 15px Oswald, Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--red2); margin: 18px 0 6px; }
.card p { margin: 0 0 10px; }
.kick { display: block; font: 600 12px Oswald, sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--mut); }
.kick.red { color: var(--red2); }
.col { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.err { color: #ff7d8b; min-height: 18px; font-size: 13px; margin-bottom: 6px; }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys td:first-child { white-space: nowrap; width: 1%; padding-right: 12px; }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; margin: 12px 0; }
.chips div { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 9px 6px; text-align: center; }
.chips b { display: block; font: 700 20px Oswald, sans-serif; }
.chips small { color: var(--mut); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- the title card ---------- */
#title { align-items: flex-start; background: linear-gradient(90deg, rgba(7,6,10,.92) 0%, rgba(7,6,10,.65) 55%, rgba(7,6,10,.15) 100%); }
.tCard { width: 100%; max-width: 520px; margin: 0 auto 0 max(0px, calc((100vw - 1100px) / 2)); }
.tHead { padding: 8px 2px 4px; }
.logo { font: 700 clamp(48px, 15vw, 86px)/.9 Oswald, Impact, sans-serif; margin: 6px 0 8px; letter-spacing: .01em; text-shadow: 0 6px 30px rgba(0,0,0,.6); }
.logo span { color: var(--red); display: inline-block; position: relative; }
.logo span::after { content: ''; position: absolute; left: 2%; right: -6%; bottom: -.06em; height: .06em; background: linear-gradient(90deg, var(--red), transparent); }
.tag { color: #cfc8c2; max-width: 440px; margin: 0 0 14px; font-size: 15px; }
.mTabs { display: flex; gap: 6px; margin-bottom: 12px; }
.mTabs button { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); font-weight: 700; cursor: pointer; }
.mTabs button.on { background: var(--red); border-color: var(--red); color: #fff; }
.lvl { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 12px 10px; margin-bottom: 9px; position: relative; overflow: hidden; }
.lvl::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, var(--red)); }
.lvl[data-k="club"] { --c: #ff2a8a; } .lvl[data-k="gallery"] { --c: #f2eee9; } .lvl[data-k="subway"] { --c: #2fbf71; } .lvl[data-k="roof"] { --c: #05d9e8; } .lvl[data-k="penthouse"] { --c: #ffc83a; }
.lvNum { font: 700 34px/1 Oswald, sans-serif; color: var(--c); text-align: center; }
.lvTxt h3 { margin: 0; font: 700 18px/1.15 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.lvTxt p { margin: 3px 0 6px; color: var(--mut); font-size: 13px; line-height: 1.35; }
.lvMeta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; font-weight: 700; }
.lvMeta span { background: rgba(255,255,255,.07); border-radius: 99px; padding: 3px 9px; }
.lvMeta .best { color: var(--gold); } .lvMeta .tick { color: #6be39a; }
.lvl .go { min-width: 78px; }
.lvl.locked { opacity: .55; }
.tFoot { display: flex; flex-direction: column; align-items: flex-start; }
.who { color: var(--mut); font-size: 13px; margin: 0 0 6px; }
.who .link { padding: 0 2px; min-height: 0; }
.seg { display: flex; gap: 5px; margin-bottom: 8px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); font-weight: 700; font-size: 13px; cursor: pointer; }
.seg button.on { background: rgba(216,37,58,.25); border-color: var(--red); }
.board { list-style: none; margin: 8px 0 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.board li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board li.note { display: block; text-align: center; color: var(--mut); padding: 22px 14px; }
.board .rk { font: 700 17px Oswald, sans-serif; color: var(--mut); }
.board .top1 .rk { color: var(--gold); } .board .top2 .rk { color: #d6dbe2; } .board .top3 .rk { color: #d08a52; }
.board .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.board .nm small { display: block; font-weight: 500; color: var(--mut); font-size: 12px; }
.board .sc { font: 700 18px Oswald, sans-serif; }
.board li.me { background: rgba(216,37,58,.16); }
.myRank { text-align: center; color: var(--mut); font-size: 13px; }
.whoBox { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.whoBox b { display: block; } .whoBox small { color: var(--mut); }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 900; }
.statGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font: 700 20px Oswald, sans-serif; } .stat small { color: var(--mut); font-size: 11px; }
.ph { font: 700 13px Oswald, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin: 16px 0 6px; }
.recent { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.recent li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.recent li:last-child { border: 0; }

/* ---------- results ---------- */
.res { text-align: center; }
.resScore { font: 700 52px/1 Oswald, sans-serif; color: #fff; text-shadow: 0 0 30px rgba(216,37,58,.5); }
.resNew { color: var(--gold); font: 700 14px Oswald, sans-serif; letter-spacing: .2em; min-height: 18px; margin: 4px 0 10px !important; }
.rows { text-align: left; border-top: 1px solid var(--line); }
.rows div { display: flex; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows b { font-family: Oswald, sans-serif; font-size: 16px; }
.resMxc { color: var(--gold); font-weight: 800; min-height: 20px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.resMxc .mxc-coin { width: 20px; height: 20px; }
.resRank { color: var(--mut); font-size: 13px; min-height: 18px; }
.resEnd { color: #e8dcd0; font-size: 14px; }

/* ---------- the HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.hTop { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--st)) calc(12px + var(--sr)) 0 calc(12px + var(--sl)); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hLeft { width: min(210px, 48vw); }
#lvPill { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font: 600 12px Oswald, sans-serif; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 4px #000; }
#lvPill b { font-weight: 600; color: #e8e2dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#killTxt { font: 700 16px Oswald, sans-serif; color: #fff; }
#killBar, #hp { height: 5px; background: rgba(0,0,0,.5); border-radius: 3px; margin-top: 5px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
#killFill { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
#hp { height: 7px; margin-top: 7px; }
#hpFill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #e8e2dc, #fff); transition: width .2s; }
#hp.low #hpFill { background: var(--red2); animation: blink .6s infinite; }
#conBar { margin-top: 7px; font: 700 11px Oswald, sans-serif; letter-spacing: .18em; color: var(--gold); }
#conBar span { display: block; height: 5px; background: rgba(0,0,0,.5); border-radius: 3px; overflow: hidden; margin-top: 3px; }
#conFill { display: block; height: 100%; background: var(--gold); }
.hRight { display: flex; gap: 8px; align-items: flex-start; }
#score { text-align: right; text-shadow: 0 2px 8px #000; }
#scoreVal { display: block; font: 700 26px/1 Oswald, sans-serif; }
#multVal { font: 700 15px Oswald, sans-serif; color: var(--gold); font-style: normal; }
.hb { pointer-events: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.45); display: grid; place-items: center; cursor: pointer; }
.hb svg { width: 20px; height: 20px; }
#bossBar { position: absolute; top: calc(70px + var(--st)); left: 50%; transform: translateX(-50%); width: min(320px, 70vw); text-align: center; font: 700 12px Oswald, sans-serif; letter-spacing: .2em; color: var(--red2); text-shadow: 0 1px 4px #000; }
#bossBar span { display: block; height: 6px; background: rgba(0,0,0,.55); border-radius: 3px; overflow: hidden; margin-top: 4px; }
#bossFill { display: block; height: 100%; width: 100%; background: var(--red); }
/* crosshair: four ticks that open with spread, a dot */
#cross { position: absolute; left: 50%; top: 50%; --gap: 8px; }
#cross i { position: absolute; background: #fff; box-shadow: 0 0 2px #000; transition: transform .06s; }
#cross i:nth-child(1), #cross i:nth-child(2) { width: 2px; height: 8px; left: -1px; }
#cross i:nth-child(3), #cross i:nth-child(4) { height: 2px; width: 8px; top: -1px; }
#cross i:nth-child(1) { top: calc(-1 * var(--gap) - 8px); } #cross i:nth-child(2) { top: var(--gap); }
#cross i:nth-child(3) { left: calc(-1 * var(--gap) - 8px); } #cross i:nth-child(4) { left: var(--gap); }
#cross em { position: absolute; width: 3px; height: 3px; left: -1.5px; top: -1.5px; background: var(--red2); border-radius: 50%; }
#cross.ads i { opacity: .35; }
#hitm { position: absolute; left: 50%; top: 50%; opacity: 0; }
#hitm i { position: absolute; width: 2px; height: 9px; background: #fff; left: -1px; top: -4.5px; }
#hitm i:nth-child(1) { transform: rotate(45deg) translateY(-11px); } #hitm i:nth-child(2) { transform: rotate(135deg) translateY(-11px); }
#hitm i:nth-child(3) { transform: rotate(225deg) translateY(-11px); } #hitm i:nth-child(4) { transform: rotate(315deg) translateY(-11px); }
#hitm.on { animation: hitm .28s ease-out; }
#hitm.head i { background: var(--gold); } #hitm.kill i { background: var(--red2); height: 13px; }
@keyframes hitm { 0% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0; transform: scale(1); } }
.dmgDir { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; border-radius: 50%; border-top: 6px solid rgba(255, 40, 60, .85); filter: blur(1px); animation: fade .9s forwards; }
@keyframes fade { to { opacity: 0; } }
/* the stamps: DOUBLE TAP, HEADSHOT... */
#stamps { position: absolute; left: 0; right: 0; top: 58%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stamp { text-align: center; animation: stampIn .22s cubic-bezier(.2, 1.6, .4, 1); text-shadow: 0 3px 14px rgba(0,0,0,.8); transition: opacity .4s, transform .4s; }
.stamp b { display: block; font: 700 30px/1 Oswald, sans-serif; letter-spacing: .06em; font-style: italic; color: #fff; }
.stamp small { font: 600 14px Oswald, sans-serif; letter-spacing: .08em; color: var(--gold); }
.stamp.small b { font-size: 20px; color: #e8e2dc; }
.stamp.dt b { font-size: 42px; color: var(--red2); background: linear-gradient(transparent 58%, rgba(255,255,255,.95) 58%, rgba(255,255,255,.95) 66%, transparent 66%); -webkit-background-clip: text; }
.stamp.clear { position: fixed; top: 34%; left: 0; right: 0; }
.stamp.clear b { font-size: clamp(44px, 12vw, 84px); color: #fff; }
.stamp.clear small { font-size: 18px; color: #e8e2dc; }
.stamp.dead b { color: var(--red2); }
.stamp.out { opacity: 0; transform: translateY(-14px); }
@keyframes stampIn { from { transform: scale(2.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#prompt { position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); font: 700 14px Oswald, sans-serif; letter-spacing: .14em; background: rgba(0,0,0,.55); border: 1px solid var(--line); padding: 5px 12px; border-radius: 8px; white-space: nowrap; }
#reloadHint { position: absolute; left: 50%; top: calc(50% + 70px); transform: translateX(-50%); font: 700 14px Oswald, sans-serif; letter-spacing: .3em; color: var(--red2); animation: blink .7s infinite; }
#reloadBar { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); width: 60px; height: 3px; background: rgba(0,0,0,.5); }
#reloadBar i { display: block; height: 100%; width: 0; background: #fff; }
#ammo { position: absolute; right: calc(16px + var(--sr)); bottom: calc(16px + var(--sb)); text-align: right; text-shadow: 0 2px 8px #000; }
#ammo b { font: 700 40px/1 Oswald, sans-serif; } #ammo span { font: 600 18px Oswald, sans-serif; color: #cfc8c2; margin-left: 4px; }
#ammo em { font-style: normal; } #ammo small { display: block; font: 600 12px Oswald, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
#ammo.low b { color: var(--red2); }
#lockHint { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); pointer-events: auto; cursor: pointer; background: rgba(0,0,0,.6); padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); }
@keyframes blink { 50% { opacity: .35; } }

/* the edges go red when you're hurt */
#hurt { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(150, 0, 15, .55) 85%, rgba(90, 0, 8, .85)); }
#flash { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; }
#flash.go { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .75; } 100% { opacity: 0; } }
/* Con Jena: gold at the edges, speed lines, the title */
#conFx { position: fixed; inset: 0; z-index: 41; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(ellipse at center, transparent 55%, rgba(255, 190, 40, .3) 90%); }
#conFx i { position: absolute; inset: -20%; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,230,150,.08) 0deg 2deg, transparent 2deg 9deg); animation: spin 8s linear infinite; mask: radial-gradient(circle, transparent 40%, #000 75%); -webkit-mask: radial-gradient(circle, transparent 40%, #000 75%); }
body.con #conFx { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
#conTitle { position: fixed; left: 0; right: 0; top: 30%; z-index: 60; text-align: center; pointer-events: none; opacity: 0; }
#conTitle b { display: block; font: 700 clamp(56px, 16vw, 120px)/.9 Oswald, Impact, sans-serif; color: var(--gold); letter-spacing: .02em; text-shadow: 0 0 40px rgba(255, 170, 0, .6), 0 6px 0 #6b3a00; font-style: italic; }
#conTitle small { font: 700 18px Oswald, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 10px #000; }
#conTitle.go { animation: conIn 2.4s forwards; }
@keyframes conIn { 0% { opacity: 0; transform: scale(3) rotate(-6deg); } 12% { opacity: 1; transform: scale(.92) rotate(-3deg); } 18% { transform: scale(1.05) rotate(-3deg); } 80% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.1) rotate(-3deg); } }

/* the level's card */
#lcard { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#lcard div { text-align: center; opacity: 0; }
#lcard.go div { animation: card 3.1s forwards; }
#lcard b { font: 600 14px Oswald, sans-serif; letter-spacing: .4em; color: var(--red2); }
#lcard h2 { font: 700 clamp(40px, 11vw, 76px)/1 Oswald, sans-serif; margin: 6px 0; text-transform: uppercase; text-shadow: 0 4px 30px #000; }
#lcard span { color: #ddd5ce; font-size: 15px; text-shadow: 0 2px 8px #000; }
@keyframes card { 0% { opacity: 0; transform: translateY(14px); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- replays ---------- */
#bars i { position: fixed; left: 0; right: 0; height: 0; background: #000; z-index: 55; transition: height .5s; }
#bars i:first-child { top: 0; } #bars i:last-child { bottom: 0; }
body.replaying #bars i { height: 9vh; }
#replayUI { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.rpTop { position: absolute; top: calc(9vh + 10px); left: calc(16px + var(--sl)); right: calc(16px + var(--sr)); display: flex; justify-content: space-between; font: 700 14px Oswald, sans-serif; letter-spacing: .2em; }
.rec { display: flex; align-items: center; gap: 8px; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--red2); animation: blink 1s infinite; }
.rpLow { position: absolute; left: calc(18px + var(--sl)); bottom: calc(9vh + 18px); text-shadow: 0 3px 14px #000; }
.rpLow b { display: block; font: 700 clamp(30px, 8vw, 54px)/1 Oswald, sans-serif; font-style: italic; letter-spacing: .04em; }
.rpLow small { font: 600 15px Oswald, sans-serif; color: var(--gold); letter-spacing: .08em; }
#replayUI.cut .rpLow { animation: stampIn .3s cubic-bezier(.2, 1.6, .4, 1); }
.rpBtns { position: absolute; right: calc(14px + var(--sr)); top: calc(9vh + 36px); display: flex; gap: 8px; pointer-events: auto; }

/* ---------- touch controls (the stick is bottom left) ---------- */
#touch { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.tb { pointer-events: auto; position: absolute; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(10,8,12,.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; touch-action: none; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tb svg { width: 22px; height: 22px; fill: #fff; }
.tb span { font: 700 9px Oswald, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.tb.fire { width: 96px; height: 96px; right: calc(22px + var(--sr)); bottom: calc(42px + var(--sb)); background: radial-gradient(circle, rgba(216,37,58,.75), rgba(150,15,30,.55)); border: 2px solid rgba(255,90,100,.7); }
.tb.fire span { font-size: 16px; letter-spacing: .14em; }
.tb.fire.on { transform: scale(.94); background: radial-gradient(circle, rgba(255,60,80,.9), rgba(170,20,35,.7)); }
#tReload { right: calc(130px + var(--sr)); bottom: calc(36px + var(--sb)); }
#tRoll { right: calc(36px + var(--sr)); bottom: calc(150px + var(--sb)); }
#tThrow { right: calc(112px + var(--sr)); bottom: calc(120px + var(--sb)); opacity: .5; }
#tThrow.ready { opacity: 1; border-color: var(--gold); box-shadow: 0 0 18px rgba(255,200,58,.5); }
#tSwap { right: calc(188px + var(--sr)); bottom: calc(72px + var(--sb)); width: 52px; height: 52px; }
body.touch #ammo { bottom: auto; top: calc(64px + var(--st)); right: calc(14px + var(--sr)); }
body.touch #ammo b { font-size: 28px; }
body.touch #prompt { top: calc(50% + 40px); }

/* ---------- toast, loading ---------- */
#toast { position: fixed; left: 50%; top: calc(90px + var(--st)); transform: translate(-50%, -10px); background: rgba(14,12,16,.94); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 1200; opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#loading { position: fixed; inset: 0; z-index: 2000; background: var(--ink); display: flex; align-items: center; justify-content: center; transition: opacity .3s; }
#loading.gone { opacity: 0; pointer-events: none; }
.ld { text-align: center; width: 240px; }
.ld b { display: block; font: 700 40px Oswald, sans-serif; letter-spacing: .02em; }
.ld b span { color: var(--red); }
.ld .bar { height: 3px; background: rgba(255,255,255,.1); border-radius: 2px; margin: 14px 0 10px; overflow: hidden; }
.ld .bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.ld span { color: var(--mut); font-size: 13px; }

@media (min-width: 900px) {
  #title { align-items: center; }
  .tCard { margin-left: 6vw; }
}
@media (max-height: 500px) {
  .tb.fire { width: 80px; height: 80px; bottom: calc(20px + var(--sb)); }
  #tRoll { bottom: calc(110px + var(--sb)); } #tThrow { bottom: calc(92px + var(--sb)); } #tReload { bottom: calc(18px + var(--sb)); }
}
