:root { --ink: #2B1B17; --red: #9B3027; --paper: #F4EAE0; }
@font-face { font-family: 'Outlaw Bitter'; src: url('./assets/fonts/Bitter-Variable.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Outlaw Rye'; src: url('./assets/fonts/Rye-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); font-family: 'Outlaw Bitter', Georgia, serif; }
canvas#c { z-index: 0; position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#hud { z-index: 1; isolation: isolate; position: fixed; inset: 0; pointer-events: none; color: var(--ink); user-select: none; overflow: hidden; font-weight: 500; }
#hud .bounty-label, #hud .wave, #hud .msg-main, #hud .bossname, #hud .panel h1 { font-family: 'Outlaw Rye', Georgia, serif; font-weight: 400; letter-spacing: .025em; }
#hud .ammo, #hud .score b, #hud .slot .sammo { font-variant-numeric: tabular-nums; }
.language-control { position: absolute; z-index: 20; bottom: 8px; right: 16px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1.5px solid rgba(43,27,23,.35); border-radius: 7px; background: rgba(249,242,233,.88); color: var(--ink); font-size: 14px; mix-blend-mode: normal; pointer-events: auto; }
.language-control select { font: inherit; color: inherit; border: 0; background: transparent; cursor: pointer; outline-color: var(--ink); }
.hud-tl, .hud-tr, .hud-bl, .hud-br, .crosshair, .grapple-ret, .hitmarker, .dmg-ind, .message, .killfeed { mix-blend-mode: multiply; }
#hud.nogame .hud-tl, #hud.nogame .hud-tr, #hud.nogame .hud-bl, #hud.nogame .hud-br, #hud.nogame .crosshair, #hud.nogame .grapple-ret, #hud.nogame .killfeed { display: none; }
.hud-tl { position: absolute; left: 9%; top: 3%; font-size: 30px; transform: rotate(-1.5deg); }
.score { position: relative; display: flex; align-items: baseline; gap: 10px; width: max-content; padding-bottom: 4px; color: var(--ink); font-family: 'Outlaw Bitter', Georgia, serif; font-size: 23px; font-weight: 700; letter-spacing: .11em; text-shadow: .35px 0 currentColor, -.25px .2px currentColor; }
.score::after { content: ''; position: absolute; left: 1px; right: 2px; bottom: 0; border-bottom: 1px solid rgba(43, 27, 23, .58); transform: rotate(-.7deg); }
.score .bounty-label { font-size: .88em; }
.score b { font-size: 1.18em; letter-spacing: .025em; font-variant-numeric: tabular-nums; }
.hud-tr { position: absolute; right: 4%; top: 3%; text-align: right; font-size: 30px; transform: rotate(1deg); }
.hud-bl { position: absolute; left: 9%; bottom: 5%; }
.hud-br { position: absolute; right: 4%; bottom: 5%; text-align: right; }
.ammo b { font-size: 58px; } .ammo span { font-size: 28px; opacity: .8; } .reloading { font-size: 22px !important; color: var(--red); }
.tally { display: flex; flex-wrap: wrap; width: 240px; min-height: 36px; gap: 4px; margin-top: -4px; align-items: flex-end; }
.ammo-round { display: block; flex: 0 0 20px; width: 20px; height: 36px; transform: rotate(-2deg); }
.ammo-round:nth-child(2n) { transform: rotate(2deg); }
.tally[data-ammo-kind="shotgun"] .ammo-round { flex-basis: 23px; width: 23px; }
.health { margin-bottom: 8px; font-size: 26px; display: flex; align-items: center; gap: 10px; }
.hud-bl { mix-blend-mode: normal; }
.hud-bl .health, .hud-bl .ammo {
  position: relative; z-index: 0; isolation: isolate; width: max-content;
  padding: 5px 12px; margin-left: -12px;
}
.hud-bl .health::before, .hud-bl .ammo::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: rgba(244,234,224,.86);
  background-image: repeating-linear-gradient(2deg, transparent 0 10px, rgba(103,76,55,.035) 10px 11px);
  clip-path: polygon(1% 7%, 8% 2%, 21% 4%, 35% 0, 53% 4%, 72% 1%, 92% 4%, 100% 10%, 98% 31%, 100% 51%, 97% 75%, 99% 93%, 88% 98%, 67% 96%, 48% 100%, 29% 97%, 11% 100%, 2% 93%, 0 72%, 3% 50%, 1% 28%);
  filter: drop-shadow(1px 2px 1px rgba(43,27,23,.16)); pointer-events: none;
}
.hud-bl .health > *, .hud-bl .ammo > * { position: relative; z-index: 1; }
.bar { width: 210px; height: 16px; border: 2.5px solid var(--ink); border-radius: 6px 8px 5px 7px / 8px 5px 7px 6px; overflow: hidden; transform: rotate(-1deg); }
.fill { height: 100%; width: 100%; background: repeating-linear-gradient(-55deg, var(--ink) 0 2.5px, transparent 2.5px 6px); transition: width .15s; }
.health .health-bar { position: relative; box-sizing: border-box; height: 23px; border: 3px solid #493024; border-radius: 5px 7px 4px 6px / 6px 4px 7px 5px; overflow: hidden; background: linear-gradient(180deg, #7a5940, #523726); box-shadow: inset 0 0 0 1px rgba(236, 210, 167, .32), 1px 2px 0 rgba(43, 27, 23, .22); }
.health .health-bar::before { content: ""; position: absolute; z-index: 2; inset: 2px 3px; border: 1px dashed rgba(238, 216, 179, .56); border-radius: 2px; pointer-events: none; }
.health .health-bar::after { content: ""; position: absolute; z-index: 3; top: 4px; left: 5px; width: 5px; height: 5px; border-radius: 50%; background: #c59b5f; box-shadow: 191px 0 #c59b5f; pointer-events: none; }
.health .health-bar .fill { position: absolute; inset: 0 auto 0 0; background-color: #994536; background-image: repeating-linear-gradient(-55deg, rgba(43, 27, 23, .76) 0 2px, rgba(245, 215, 179, .18) 2px 4px, transparent 4px 7px), linear-gradient(180deg, #b25b45, #87382d); }
.health .health-seams { position: absolute; z-index: 1; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), rgba(43, 27, 23, .58) calc(20% - 1px) calc(20% + 1px), transparent calc(20% + 1px) 20%); pointer-events: none; }
.low .health-bar { border-color: #7f241e; box-shadow: inset 0 0 0 1px rgba(246, 180, 147, .36), 0 0 5px rgba(155, 48, 39, .35); }
.low .health-bar .fill { background-color: var(--red); background-image: repeating-linear-gradient(-55deg, rgba(43, 27, 23, .8) 0 2px, rgba(255, 210, 185, .2) 2px 4px, transparent 4px 7px), linear-gradient(180deg, #ba5140, #76251f); }
.crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; --s: 10px; mix-blend-mode: normal; }
.crosshair i { position: absolute; background: var(--ink); box-shadow: 0 0 0 1.5px var(--paper); border-radius: 2px; transition: top .06s, left .06s; }
.ch-t { width: 4px; height: 12px; left: -2px; top: calc(-1 * var(--s) - 12px); }
.ch-b { width: 4px; height: 12px; left: -2px; top: var(--s); }
.ch-l { width: 12px; height: 4px; top: -2px; left: calc(-1 * var(--s) - 12px); }
.ch-r { width: 12px; height: 4px; top: -2px; left: var(--s); }
.ch-dot { display: none; width: 3px; height: 3px; left: -1.5px; top: -1.5px; border-radius: 50%; }
.crosshair.knife i { background: var(--ink); } .crosshair.knife .ch-t, .crosshair.knife .ch-b { height: 16px; }
.crosshair.knife .ch-l, .crosshair.knife .ch-r { display: none; }
.grapple-ret { position: absolute; left: calc(50% + 45px); top: calc(50% + 32px); width: 18px; height: 18px; margin: -9px; border: 2px dashed var(--ink); border-radius: 50%; opacity: 0; transition: opacity .1s, transform .12s; transform: scale(1.6) rotate(0deg); }
.grapple-ret::after { content: ''; position: absolute; left: 12px; top: 15px; width: 9px; height: 9px; border-left: 2px solid var(--ink); transform: rotate(-25deg); }
.grapple-ret.on { opacity: .9; transform: scale(1) rotate(20deg); } .grapple-ret.attached { border-style: solid; transform: scale(.65); }
.hitmarker { position: absolute; left: 50%; top: 50%; opacity: 0; }
.hitmarker i { position: absolute; width: 3.5px; height: 36px; background: #e8801a; left: -1.75px; top: -18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(249,242,233,.85); }
.hitmarker i:first-child { transform: rotate(45deg); } .hitmarker i:last-child { transform: rotate(-45deg); }
.hitmarker.show { animation: hm .24s ease-out; }
.hitmarker.crit i { background: var(--red); width: 4.5px; height: 44px; top: -22px; left: -2.25px; }
.hitmarker.kill i { background: var(--red); width: 5px; height: 50px; top: -25px; left: -2.5px; }
@keyframes hm { 0% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0; transform: scale(1); } }
.message { position: absolute; left: 0; right: 0; top: 24%; text-align: center; }
.msg-main { font-size: 88px; color: var(--ink); transform: rotate(-2deg); opacity: 0; letter-spacing: 3px; line-height: 1; }
.msg-main.show { animation: scribble .55s ease-out forwards; }
@keyframes scribble { 0% { opacity: 0; transform: rotate(-7deg) scale(1.7); filter: blur(3px); } 55% { opacity: 1; transform: rotate(-1deg) scale(.95); filter: blur(0); } 100% { opacity: 1; transform: rotate(-2deg) scale(1); } }
.msg-sub { font-size: 32px; opacity: .85; }
/* Wave-intro subtitle sits on a quiet paper scrap over busy building fronts. */
.message .msg-sub {
  position: relative; display: table; box-sizing: border-box;
  max-width: min(720px, 78vw); margin: 10px auto 0; padding: 8px 20px 10px;
  color: var(--ink); font-size: clamp(19px, 2.2vw, 30px); line-height: 1.2;
  opacity: 1; background: rgba(244,234,224,.92);
  clip-path: polygon(1% 8%, 8% 2%, 20% 5%, 37% 0, 51% 4%, 67% 1%, 82% 5%, 96% 1%, 100% 10%, 98% 33%, 100% 55%, 97% 79%, 99% 93%, 90% 98%, 72% 96%, 53% 100%, 32% 97%, 13% 100%, 2% 93%, 3% 74%, 0 49%, 3% 29%);
  filter: drop-shadow(1px 2px 1px rgba(43,27,23,.18));
  text-shadow: none;
}
.message .msg-sub:empty { display: none; }
.killfeed { position: absolute; right: 4%; top: 28%; text-align: right; font-size: 27px; }
.killfeed div { animation: kf 1.7s ease-out forwards; } .killfeed .pts { color: var(--red); }
@keyframes kf { 0% { opacity: 0; transform: translateX(30px) rotate(3deg); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }
.dmg-ind { position: absolute; left: 50%; top: 50%; }
.dmg-ind i { position: absolute; left: -16px; top: -140px; width: 32px; height: 22px; transform-origin: 16px 140px; background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .9; animation: di 1s linear forwards; }
@keyframes di { to { opacity: 0; } }
.screen { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: auto; cursor: pointer; background: rgba(244, 234, 224, .55); }
.screen.show { display: flex; }
.panel { text-align: center; max-width: 980px; max-height: calc(100vh - 40px); overflow-y: auto; box-sizing: border-box; padding: 26px 48px; background: rgba(249, 242, 233, .93); box-shadow: 6px 6px 0 rgba(43,27,23, .15); border: 3px solid var(--ink); border-radius: 12px 18px 10px 16px / 16px 10px 18px 12px; transform: rotate(-.6deg); }
.panel h1 { font-size: 92px; margin: 0; letter-spacing: 3px; line-height: 1; }
.panel h2 { font-size: 36px; margin: 4px 0 14px; font-weight: normal; }
.panel .cols { display: flex; gap: 46px; justify-content: center; text-align: left; font-size: 22px; line-height: 1.35; }
.panel .cols b { color: var(--red); } .colhead { font-size: 26px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.panel .go { font-size: 34px; margin-top: 18px; animation: blink 1.2s infinite; } @keyframes blink { 50% { opacity: .35; } }
.panel .stats { font-size: 30px; line-height: 1.4; } .panel .stats b { color: var(--red); }
.panel .tip { font-size: 21px; opacity: .8; margin-top: 8px; }
.weapon { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(43, 27, 23, .48); font-size: 36px; text-shadow: .45px 0 currentColor; }
.hint { font-size: 20px; opacity: .8; }
.combo { font-size: 26px; color: var(--red); min-height: 30px; }
.timer { font-size: 24px; color: var(--red); }
@media (max-width: 900px) { .panel h1 { font-size: 56px; } .panel .cols { flex-direction: column; gap: 10px; font-size: 18px; } .msg-main { font-size: 56px; } }
/* v2 additions */
.crosshair.ads { opacity: 1; }
.crosshair.ads .ch-dot { display: block; }
.crosshair.ads i:not(.ch-dot) { display: none; }
.crosshair.ads + .grapple-ret { opacity: 0; }
.slots { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin: 0 0 6px auto; padding-right: 8px; border-right: 1px solid rgba(43, 27, 23, .38); font-size: 20px; opacity: 1; }
.slot { display: flex; gap: 8px; align-items: baseline; opacity: .78; transform: rotate(1deg); }
.slot.active { opacity: 1; font-size: 24px; border-bottom: 1px solid rgba(43, 27, 23, .7); }
.slot.empty { color: var(--red); }
.slot .num { font-size: 15px; opacity: .8; border: 1px solid rgba(43, 27, 23, .7); border-radius: 4px 6px 4px 5px; padding: 0 4px; }
.slot.active .num { color: var(--red); border-color: var(--red); }
.slot .sammo { font-size: 16px; opacity: .8; min-width: 54px; text-align: right; }
.modifier { font-size: 22px; color: var(--red); min-height: 26px; }
.bossbar { position: absolute; left: 50%; top: 6%; width: 420px; margin-left: -210px; text-align: center; font-size: 26px; display: none; }
.bossbar.show { display: block; mix-blend-mode: multiply; }
.bar.big { width: 420px; height: 20px; margin-top: 4px; }
.fill.red { background: repeating-linear-gradient(-55deg, var(--red) 0 3px, transparent 3px 7px); }
.tip { position: absolute; left: 0; right: 0; bottom: 17%; text-align: center; font-size: 26px; color: var(--ink); opacity: 0; transition: opacity .4s; mix-blend-mode: multiply; }
.tip.show { opacity: .9; }
.tip b { color: var(--red); }
#hud.nogame .tip, #hud.nogame .bossbar { display: none; }
.settings { display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 21px; margin-top: 12px; border-top: 2px solid var(--ink); padding-top: 10px; }
.settings label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.settings input[type=range] { width: 220px; accent-color: #2B1B17; }
.settings input[type=checkbox] { width: 17px; height: 17px; accent-color: #2B1B17; }
.settings select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 4px; padding: 2px 8px; }
.settings b { color: var(--red); min-width: 56px; text-align: left; }
.settings .k { opacity: .6; font-size: 17px; }
.beststat { font-size: 22px; opacity: .8; margin-top: 4px; }
/* sniper scope */
.scope { position: absolute; inset: 0; opacity: 0; transition: opacity .1s; pointer-events: none; }
.scope.on { opacity: 1; }
.scope .mask { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(244,234,224,0) 0 30vh, var(--paper) 30.6vh 100%); }
.scope .ring { position: absolute; left: 50%; top: 50%; width: 60.5vh; height: 60.5vh; margin: -30.25vh; border: 3.5px solid var(--ink); border-radius: 50%; box-shadow: inset 0 0 0 7px rgba(43,27,23,.12); }
.scope .cx { position: absolute; left: 50%; top: 50%; width: 60vh; height: 2.5px; margin: -1px -30vh; background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 17px); }
.scope .cy { position: absolute; left: 50%; top: 50%; width: 2.5px; height: 60vh; margin: -30vh -1px; background: repeating-linear-gradient(180deg, var(--ink) 0 14px, transparent 14px 17px); }
.scope .dot { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; background: var(--red); border-radius: 50%; }
#hud.nogame .scope { display:none; }
/* Quickdraw gauge */
/* Quickdraw: a small printed charcoal gauge above the health readout. */
.quickdraw-meter { position: absolute; left: 9%; bottom: calc(5% + 155px); width: 180px; transform: rotate(-1deg); opacity: 0; transition: opacity .2s; text-align: left; mix-blend-mode: multiply; }
.quickdraw-meter.on { opacity: 1; }
.fm-label { font-family: 'Outlaw Rye', Georgia, serif; font-size: 16px; letter-spacing: .025em; color: var(--ink); margin-bottom: 6px; }
.fm-tube { position: relative; width: 176px; height: 12px; border: 1.5px solid var(--ink); border-radius: 2px 4px 3px 1px; overflow: hidden; }
.fm-fill { position: absolute; left: 0; bottom: 0; height: 100%; width: 0%; background-color: rgba(43,27,23,.24); background-image: url('./assets/charcoal-gauge.svg'); background-size: 64px 16px; transition: width .14s linear; clip-path: polygon(0 0,98% 0,100% 18%,98% 40%,100% 63%,97% 82%,99% 100%,0 100%); }
.quickdraw-meter.ready .fm-tube { border-color: var(--red); }
.quickdraw-meter.ready .fm-label { color: var(--red); }
.fm-ready { font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: .025em; margin-top: 5px; opacity: 0; }
.quickdraw-meter.ready .fm-ready { opacity: 1; }
#hud.nogame .quickdraw-meter { display: none; }
/* map picker */
.mapsel { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 2px solid var(--ink); flex-wrap: wrap; }
.mapsel > span { font-size: 20px; opacity: .75; }
.mapbtn { font: inherit; font-size: 20px; color: var(--ink); background: transparent; border: 2.5px solid var(--ink); border-radius: 7px 10px 6px 9px / 10px 6px 9px 7px; padding: 4px 12px; cursor: pointer; opacity: .55; display: flex; flex-direction: column; align-items: center; line-height: 1.1; transform: rotate(-.6deg); }
.mapbtn i { font-style: normal; font-size: 14px; opacity: .75; }
.mapbtn:hover { opacity: .85; }
.mapbtn.on { opacity: 1; color: var(--paper); background: var(--ink); }

/* dynamite inventory */
.nades { display: inline-flex; gap: 3px; margin-left: 12px; vertical-align: middle; }
.nades .ammo-round { flex: 0 0 16px; width: 16px; height: 29px; }
/* lobby + modes */
.modes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0 4px; }
.modebtn { font: inherit; font-size: 21px; color: var(--ink); background: transparent; border: 2.5px solid var(--ink); border-radius: 7px 10px 6px 9px / 10px 6px 9px 7px; padding: 6px 14px; cursor: pointer; opacity: .6; display: flex; flex-direction: column; align-items: center; line-height: 1.1; transform: rotate(-.5deg); min-width: 130px; }
.modebtn i { font-style: normal; font-size: 14px; opacity: .8; }
.modebtn:hover { opacity: .9; } .modebtn.on { opacity: 1; color: var(--paper); background: var(--ink); }
.lobby { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 8px; }
.lobby .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.lobby input[type=text] { font: inherit; font-size: 24px; width: 130px; text-align: center; letter-spacing: 4px; text-transform: uppercase; color: var(--ink); border: 2.5px solid var(--ink); border-radius: 6px 9px 6px 8px; background: transparent; padding: 3px 6px; }
.lobby button, .bigbtn { font: inherit; font-size: 21px; color: var(--paper); background: var(--ink); border: 2.5px solid var(--ink); border-radius: 7px 10px 6px 9px / 10px 6px 9px 7px; padding: 5px 16px; cursor: pointer; transform: rotate(-.6deg); }
.lobby button.alt { color: var(--ink); background: transparent; }
.lobby button:disabled { opacity: .4; cursor: default; }
.code { font-size: 44px; letter-spacing: 8px; color: var(--red); border: 3px dashed var(--red); padding: 2px 18px; border-radius: 10px; }
.plist { display: flex; flex-direction: column; gap: 3px; min-width: 300px; font-size: 22px; }
.plist div { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1.5px solid rgba(43,27,23,.25); padding: 2px 8px; }
.plist .t0 { color: var(--ink); } .plist .t1 { color: var(--red); } .plist .host::after { content: ' (host)'; opacity: .6; font-size: 16px; }
.status { font-size: 19px; color: var(--red); min-height: 24px; }
.scoreboard { display: flex; flex-direction: column; gap: 4px; font-size: 24px; min-width: 360px; }
.scoreboard div { display: flex; justify-content: space-between; gap: 20px; padding: 2px 10px; border-bottom: 1.5px solid rgba(43,27,23,.25); }
.scoreboard .me { background: rgba(43,27,23,.08); }
.hud-tr .teamscore { font-size: 26px; } .hud-tr .teamscore b { color: var(--red); }
.checkpoints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; font-size: 19px; }
.checkpoints button { font: inherit; font-size: 19px; color: var(--ink); background: transparent; border: 2px solid var(--ink); border-radius: 6px 8px 5px 7px; padding: 3px 12px; cursor: pointer; }
.checkpoints button:hover { background: var(--ink); color: var(--paper); }
.namebox { font: inherit; font-size: 20px; width: 150px; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px 8px 5px 7px; background: transparent; padding: 2px 8px; }
#hud.pad .kbonly, #hud:not(.pad) .padonly { display: none; }

/* ---- main menu, online panel, scoreboard overlay ---- */
.mainbtns { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.mainbtns button { font: inherit; font-size: 30px; color: var(--paper); background: var(--ink); border: 3px solid var(--ink); border-radius: 9px 13px 8px 12px / 12px 8px 11px 9px; padding: 10px 34px; cursor: pointer; transform: rotate(-.8deg); line-height: 1.05; }
.mainbtns button i { display: block; font-style: normal; font-size: 16px; opacity: .8; letter-spacing: 1px; }
.mainbtns button:nth-child(2) { transform: rotate(.7deg); background: var(--red); border-color: var(--red); }
.mainbtns button:hover { filter: brightness(1.15); }
.mainbtns:has(.start) { flex-direction: column; align-items: center; gap: 12px; }
.mainbtns button.start { min-width: 420px; font-size: 54px; padding: 18px 48px; border-width: 4px; transform: rotate(-1deg); box-shadow: 6px 7px 0 rgba(0, 0, 0, .18); }
.mainbtns button.start i { font-size: 18px; margin-top: 4px; }
.mainbtns button.start:hover { transform: rotate(-1deg) scale(1.03); }
.mainbtns button.start + button { transform: rotate(.7deg); }
.online { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 6px; }
.online .sub { font-size: 19px; opacity: .75; }
.online .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.online .row.split { gap: 26px; }
.online button { font: inherit; font-size: 22px; color: var(--paper); background: var(--ink); border: 2.5px solid var(--ink); border-radius: 7px 10px 6px 9px / 10px 6px 9px 7px; padding: 6px 18px; cursor: pointer; }
.online button.alt { color: var(--ink); background: transparent; }
.online button.big { font-size: 26px; padding: 8px 26px; transform: rotate(-.6deg); }
.online button:disabled { opacity: .4; cursor: default; }
.online button:hover:not(:disabled) { filter: brightness(1.15); }
.online input[type=text] { font: inherit; font-size: 26px; width: 150px; text-align: center; letter-spacing: 5px; text-transform: uppercase; color: var(--ink); border: 2.5px solid var(--ink); border-radius: 6px 9px 6px 8px; background: transparent; padding: 3px 6px; }
.online input.namebox { letter-spacing: 0; text-transform: none; font-size: 22px; width: 180px; }
.online .radio { display: flex; gap: 14px; font-size: 19px; }
.online .radio label { display: flex; gap: 5px; align-items: center; cursor: pointer; }
.online .status { min-height: 26px; font-size: 20px; color: var(--red); }
.online .hint { font-size: 17px; opacity: .7; max-width: 520px; text-align: center; }
.online .code { font-size: 52px; letter-spacing: 10px; }
.online .plist { min-width: 340px; }
.online .plist .host span:first-child::after { content: ' · host'; opacity: .6; font-size: 16px; }
.online .plist .me { background: rgba(43,27,23,.08); }
.board { position: absolute; left: 50%; top: 18%; transform: translateX(-50%) rotate(-.5deg); background: rgba(249,242,233,.94); border: 3px solid var(--ink); border-radius: 12px 16px 10px 14px / 14px 10px 16px 12px; padding: 12px 22px; min-width: 380px; font-size: 24px; color: var(--ink); z-index: 5; }
.board h3 { margin: 0 0 6px; font-size: 30px; text-align: center; letter-spacing: 2px; }
.board div { display: flex; justify-content: space-between; gap: 24px; padding: 2px 8px; border-bottom: 1.5px solid rgba(43,27,23,.25); }
.board div.me { background: rgba(43,27,23,.1); }
.board .foot { font-size: 16px; opacity: .7; justify-content: center; border: 0; margin-top: 6px; }
.feed { color: var(--red); }

/* live mini leaderboard in the corner during online play */
.pvpscore { font-size: 20px; line-height: 1.2; text-align: right; }
.pvpscore .row { display: flex; justify-content: flex-end; gap: 10px; }
.pvpscore .row b { min-width: 28px; text-align: right; }
.pvpscore .row.me { color: var(--red); }
.pvpscore .row .rank { opacity: .6; }
.pvpscore .target { font-size: 15px; opacity: .65; margin-top: 2px; }

/* grapple breath: a sliver under the crosshair, only while it is not full */
.gstam { position: absolute; left: 50%; top: 50%; width: 64px; height: 5px; margin-left: -32px; margin-top: 26px; border: 1.5px solid var(--ink); border-radius: 3px; opacity: .8; mix-blend-mode: multiply; }
.gstam i { display: block; height: 100%; background: var(--ink); }
.gstam.low { border-color: var(--red); } .gstam.low i { background: var(--red); }

/* public lobby list on the online panel */
.lobbylist { display: flex; flex-direction: column; gap: 6px; align-items: center; width: 100%; max-width: 560px; margin-top: 4px; padding-top: 8px; border-top: 1.5px dashed rgba(43,27,23,.35); }
.lobbylist .rows { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.lobbyrow { display: grid; grid-template-columns: 96px 1fr auto auto; gap: 12px; align-items: center; font-size: 19px; padding: 3px 8px; border-bottom: 1.5px solid rgba(43,27,23,.2); }
.lobbyrow .code { font-size: 22px; letter-spacing: 3px; padding: 0 8px; border-width: 2px; }
.lobbyrow button { font-size: 18px; padding: 3px 12px; }

.practice-controls { margin: 14px auto; padding: 12px; max-width: 760px; border: 1px solid var(--ink); background: #9c78551a; font-size: 17px; }
.practice-controls > b, .practice-controls > span { display: block; }
.practice-controls > span { margin: 4px 0 10px; font-size: 14px; opacity: .75; }
.practice-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.practice-row input { width: 65px; padding: 6px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); }
.practice-row button { padding: 7px 11px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); cursor: pointer; }
.practice-row button:hover { color: var(--paper); background: var(--ink); }

/* DOM overlays are composited after the ink canvas, never inside its data buffer. */
.hud-br { mix-blend-mode: normal; }
.hud-br .slots { padding: 8px 12px; background: rgba(244,234,224,.94); clip-path: polygon(1% 2%, 97% 0, 100% 8%, 98% 96%, 3% 100%, 0 91%); }
.hud-br .weapon, .hud-br .hint { text-shadow: 1px 1px var(--paper), -1px -1px var(--paper), 1px -1px var(--paper), -1px 1px var(--paper); }

/* A small torn-paper backing protects the gang/countdown text on timber. */
.hud-tr { mix-blend-mode: normal; padding: 10px 16px 12px; max-width: min(420px, 70vw); background: rgba(244,234,224,.94); clip-path: polygon(1% 3%, 96% 0, 100% 7%, 98% 95%, 93% 98%, 4% 100%, 0 91%); }
@media (max-height: 600px) { .hud-tr { font-size: 24px; } .hud-tr .modifier, .hud-tr .timer { font-size: 18px; } }

.ammo #reserve { font-size: 38px; font-weight: 700; opacity: 1; }
.ammo .reserve-label { font-size: 14px; letter-spacing: .08em; margin-right: 8px; }
.dynamite-stock { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 5px; }
.dynamite-stock .nades { margin-left: 0; }
.dynamite-stock .ammo-round { width: 13px; height: 24px; }

.crosshair.firing i { background: var(--red); }

/* Keep the lasso hint clear of ammo and the weapon list. */
.tip { left: 22%; right: 22%; bottom: 23%; font-size: 18px; line-height: 1.3; mix-blend-mode: normal; text-shadow: 1px 1px var(--paper), -1px -1px var(--paper); }

/* Low-center lasso note on a light, irregular scrap; it clears the weapon hand. */
.tip {
  left: 44%; right: auto; bottom: 4%; width: min(440px, 70vw); box-sizing: border-box;
  padding: 11px 18px; transform: translateX(-50%) rotate(-.5deg);
  color: var(--ink); background: rgba(244,234,224,.96);
  background-image: repeating-linear-gradient(2deg, transparent 0 9px, rgba(103,76,55,.035) 9px 10px);
  clip-path: polygon(1% 8%, 8% 3%, 19% 5%, 31% 1%, 47% 4%, 63% 0, 79% 4%, 94% 2%, 100% 9%, 98% 29%, 100% 48%, 97% 72%, 99% 93%, 88% 98%, 72% 96%, 54% 100%, 36% 97%, 18% 100%, 3% 94%, 2% 75%, 0 55%, 3% 33%);
  filter: drop-shadow(1px 2px 1px rgba(43,27,23,.2));
  text-shadow: .4px .4px rgba(244,234,224,.8);
}
@media (max-width: 900px) {
  .tip { left: 43%; bottom: 3%; width: min(340px, 62vw); font-size: 15px; padding: 9px 13px; }
}

/* Bank purchases reuse the existing printed paper menu. */
.bank-shop-actions { display:grid; gap:.65rem; margin:1rem 0; }
.bank-shop-actions button:disabled { opacity:.5; cursor:default; }

.train-warning{position:absolute;top:16%;left:50%;transform:translateX(-50%);padding:12px 24px;background:#efe3d2;color:#5c3023;font-family:Georgia,serif;font-weight:bold;letter-spacing:.06em;clip-path:polygon(1% 4%,98% 0,100% 93%,2% 100%,0 12%);text-align:center;pointer-events:none}.train-warning[hidden]{display:none}

/* Replayability: ink sketches on paper; no canvas or WebGL objects. */
.upgrade-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}
.upgrade-card{background:#f3e7d5;color:#302219;border:3px double #6b5141;padding:18px 12px;transform:rotate(-1deg);min-width:0;white-space:normal}
.upgrade-card:nth-child(2){transform:rotate(1deg)}
.upgrade-card.rare{border-color:#7b5731}.upgrade-card.legendary{border-color:#a47630;border-width:5px}
.upgrade-card h2{font-size:24px;margin:10px 0}.upgrade-card p{font-size:17px;line-height:1.4}
.upgrade-card svg{width:52px;height:52px}.upgrade-card:focus-visible{outline:4px solid #9b4e34;outline-offset:4px}
.upgrade-card svg,.run-upgrades svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.run-upgrades{position:absolute;left:3%;top:130px;display:flex;gap:5px;max-width:32%;flex-wrap:wrap;pointer-events:auto}
.run-upgrades span{position:relative;background:#eadcc6;border:1px solid #715743;width:28px;height:31px;transform:rotate(-2deg)}
.run-upgrades svg{width:24px;height:24px}.run-upgrades b{font-size:10px;position:absolute;bottom:0;right:1px}
@media(max-width:700px){.upgrade-cards{gap:5px}.upgrade-card{padding:9px 5px}.upgrade-card h2{font-size:18px}.upgrade-card p{font-size:13px}}
.run-combo{position:absolute;left:3%;top:94px;width:180px;font-size:17px}.run-combo>div{height:5px;background:#ad9270}.run-combo i{display:block;height:100%;background:#783f2f;transform-origin:left}
.style-notice{position:absolute;right:4%;top:36%;max-width:26%;padding:7px 13px;background:#eee0cb;color:#563424;border-bottom:2px solid #967452;transform:rotate(-2deg);font-size:20px;pointer-events:none}
.wanted-poster{position:absolute;right:4%;top:20%;display:flex;flex-direction:column;gap:8px;max-width:260px;padding:20px;background:#ecd8b5;border:3px double #5d3c25;transform:rotate(3deg);animation:wanted-enter .4s ease-out;pointer-events:none;text-align:center}.wanted-poster>b{font-size:26px}.wanted-poster strong{font-size:22px}.wanted-poster span{font-size:16px}.elite-marker{position:absolute;transform:translate(-50%,-100%);background:#efdfc5cc;color:#85432c;font-size:13px;padding:2px 6px;pointer-events:none;white-space:nowrap}@keyframes wanted-enter{from{opacity:0;transform:translateY(-30px) rotate(8deg)}to{opacity:1;transform:translateY(0) rotate(3deg)}}
.run-combo[hidden],.style-notice[hidden],.elite-marker[hidden],.wanted-poster[hidden]{display:none!important}
.nogame .run-upgrades,.nogame .run-combo,.nogame .wanted-poster,.nogame .elite-marker,.nogame .style-notice,.combo[hidden]{display:none!important}
.daily-history{font-size:15px;margin:8px 0}.daily-history p{margin:4px}

/* Shared paper scraps for combat labels, including the inherited HUD routes. */
#hud {
  --notice-paper: rgba(244,234,224,.94);
  --notice-edge: polygon(1% 8%,8% 2%,20% 5%,37% 0,51% 4%,67% 1%,82% 5%,96% 1%,100% 10%,98% 33%,100% 55%,97% 79%,99% 93%,90% 98%,72% 96%,53% 100%,32% 97%,13% 100%,2% 93%,3% 74%,0 49%,3% 29%);
}
#hud .killfeed>div,#hud .message .msg-main,#hud .message .msg-sub,
#hud .tip,#hud .modifier,#hud .timer,#hud .style-notice {
  box-sizing:border-box;background:var(--notice-paper);clip-path:var(--notice-edge);
  padding:8px 16px 10px;text-shadow:none;mix-blend-mode:normal;
}
#hud .killfeed{max-width:29%;font-size:clamp(16px,1.8vw,24px);line-height:1.25;pointer-events:none}
#hud .killfeed>div{width:fit-content;margin:0 0 5px auto}
#hud .message .msg-main{display:table;margin:0 auto;max-width:78vw;font-size:clamp(34px,5vw,68px);letter-spacing:1px;padding:12px 25px}
#hud .message .msg-main.show{animation:paper-arrival .3s ease-out forwards}
#hud .modifier,#hud .timer{width:fit-content;max-width:100%;margin-left:auto;font-size:clamp(15px,1.7vw,22px)}
#hud .tip{width:fit-content;max-width:56%;left:50%;right:auto;transform:translateX(-50%) rotate(-.6deg)}
#hud .style-notice{border:0;line-height:1.25}
#hud .tip:empty,#hud .modifier:empty,#hud .timer:empty,
#hud .message .msg-main:empty,#hud .message .msg-sub:empty{display:none}
@keyframes paper-arrival{from{opacity:0;transform:translateY(-8px) rotate(-3deg)}to{opacity:1;transform:rotate(-1deg)}}

.quickdraw-meter { background:rgba(244,234,224,.94); padding:12px 15px; width:206px; mix-blend-mode:normal; clip-path:polygon(2% 0,98% 2%,100% 92%,96% 100%,0 96%); }
.quickdraw-meter .fm-fill { background-image:repeating-linear-gradient(125deg,transparent 0 4px,rgba(43,27,23,.5) 4px 6px); }
.quickdraw-meter.ready .fm-ready { animation:gatling-ready .75s ease-in-out infinite alternate; }
@keyframes gatling-ready { from{opacity:.5} to{opacity:1} }

/* Dust & Glory: printed noticeboard, shared by start, pause and death. */
#hud .panel.western-panel{width:min(700px,calc(100vw - 32px));padding:30px 38px;border:1px solid #6c4931;border-radius:0;transform:rotate(-.3deg);background:repeating-linear-gradient(97deg,transparent 0 6px,#80603d05 7px 8px),#efe1ca;box-shadow:0 0 0 5px #e4d2b4,0 0 0 6px #80603d,8px 12px 28px #281b1940;cursor:default}
#hud .western-panel h1{font-size:clamp(36px,6vw,65px);line-height:1.04;letter-spacing:.02em;color:#422b20}
#hud .western-panel h2{font-size:22px}
#hud .western-panel .menu-kicker{font-size:12px;letter-spacing:.17em;margin-bottom:12px}
#hud .western-panel .menu-star{font-size:34px;line-height:1;margin:4px 0 12px;color:#88623c}
#hud .western-panel h1 span{font-size:.57em;vertical-align:middle}
#hud .western-panel .menu-motto{font-size:20px;margin:12px 0 18px;font-style:italic}
.menu-rule{height:3px;border-top:1px solid #5e402b;border-bottom:1px solid #5e402b;margin-bottom:22px}
#hud .western-panel button{font:inherit;cursor:pointer;color:#422b20;border:1px solid #79593b;background:#e5d2b3;padding:10px 15px;border-radius:1px}
#hud .western-panel button:hover{background:#d7bd96}
#hud .western-panel button:focus-visible,#hud .western-panel summary:focus-visible,#hud .western-panel input:focus-visible{outline:3px solid #a14532;outline-offset:3px}
#hud .western-panel .menu-primary{display:block;width:100%;background:#593929;color:#f7e8cc;border:3px double #e1c9a4;font-size:32px;padding:15px 12px}
#hud .western-panel .menu-primary:hover{background:#754933}
#hud .western-panel button small{display:block;font:13px Georgia;margin-top:6px;opacity:.88}
.menu-secondary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.menu-sections{margin-top:22px;text-align:left}
#hud .western-panel details{border-top:1px solid #8b694750;margin:0;padding:0}
#hud .western-panel summary{cursor:pointer;padding:12px 3px;font-size:17px}
#hud .western-panel details[open]{padding-bottom:14px}
#hud .western-panel details p{font-size:15px;line-height:1.4}
#hud .western-panel .menu-name{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:16px;margin:10px 0}
#hud .western-panel .namebox{max-width:220px;width:50%;font:17px Georgia;background:#f7ebd7;border:1px solid #8c684b;color:#422b20;padding:8px;box-sizing:border-box}
.menu-records{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;font-size:13px;text-align:center}
.menu-records b{display:block;font-size:23px;margin-top:7px}
#hud .western-panel .menu-foot{font-size:11px;letter-spacing:.15em;margin:22px 0 0}
#hud .western-panel .cols{font-size:16px;gap:20px}
#hud .western-panel .colhead{font-size:20px}
#hud .western-panel .stats{font-size:19px;margin:20px 0;line-height:1.65}
#hud .western-panel .go{font-size:20px;animation:none}
#hud .western-panel .settings{font-size:16px;flex-wrap:wrap}
@media(max-width:540px){#hud .panel.western-panel{padding:24px 20px;max-height:calc(100dvh - 30px)}.menu-secondary{grid-template-columns:1fr}#hud .western-panel .menu-name{align-items:flex-start;flex-direction:column}#hud .western-panel .namebox{width:100%;max-width:none}}
@media(prefers-reduced-motion:reduce){#hud .panel.western-panel{transform:none}}
@media(max-height:720px){#hud .panel.western-panel{padding:20px 30px}#hud .western-panel .menu-star{display:none}#hud .western-panel h1{font-size:46px}#hud .western-panel .menu-motto{font-size:18px;margin:10px 0 14px}#hud .western-panel .menu-kicker{margin-bottom:10px}.menu-rule{margin-bottom:15px}#hud .western-panel .menu-primary{padding:10px;font-size:29px}#hud .western-panel summary{padding:9px 3px}.menu-sections{margin-top:15px}#hud .western-panel .menu-foot{margin-top:14px}}
/* Field guide and personal setup: printed rows rather than the inherited columns. */
#hud .western-panel .guide-intro{font-style:italic;font-size:18px;margin:4px 0 18px;color:#775039}
.frontier-guide section,.frontier-settings section{padding:12px 0;border-top:1px dashed #89674470}
#hud .western-panel .frontier-guide h3,#hud .western-panel .frontier-settings h3{font-size:19px;letter-spacing:.025em;margin:0 0 12px;color:#7c3c2c}
.guide-keys{margin:0}.guide-keys>div{display:grid;grid-template-columns:125px 1fr;gap:15px;padding:8px 0;border-bottom:1px solid #89674420;align-items:baseline}
.guide-keys dt,.guide-keys dd{margin:0;font-size:15px;line-height:1.4}.guide-keys kbd{font:700 13px Georgia;border:1px solid #88694b;padding:3px 6px;display:inline-block;background:#f5e8d2;box-shadow:1px 2px 0 #89674435}
#hud .western-panel .guide-note{font-size:13px;font-style:italic;color:#775039;margin:12px 0}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:18px;font-size:16px}
.frontier-settings small{display:block;font-size:13px;line-height:1.4;color:#775039;margin-top:5px}
.frontier-settings output{font:bold 19px Georgia;color:#7c3c2c;white-space:nowrap}.setting-range{width:100%;accent-color:#795139;margin:17px 0}
.setting-check{display:flex;gap:12px;align-items:flex-start;font-size:16px;margin:8px 0}.setting-check input{accent-color:#795139;width:18px;height:18px;flex-shrink:0}
#hud .western-panel .frontier-settings select{font:16px Georgia;color:#422b20;background:#f5e8d2;padding:8px;border:1px solid #88694b;min-width:125px}
@media(max-width:480px){.guide-keys>div{grid-template-columns:100px 1fr;gap:10px}.setting-row{align-items:flex-start;flex-wrap:wrap}.guide-keys dd{font-size:14px}}
