@font-face{font-family:'Patrick Hand';src:url('./patrick-hand.woff2') format('woff2')}
@font-face{font-family:'Caveat';font-weight:600;src:url('./caveat.woff2') format('woff2')}
:root { --ink: #1a30c0; --red: #d02030; --paper: #f6f3e6; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); font-family: 'Patrick Hand', 'Caveat', 'Comic Sans MS', 'Marker Felt', 'Segoe Print', cursive; }
canvas#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; color: var(--ink); user-select: none; overflow: hidden; }
.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); }
.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; gap: 3px; margin-top: -8px; align-items: flex-end; }
.tally i { display: block; width: 4px; height: 20px; background: var(--ink); transform: rotate(4deg); border-radius: 2px; opacity: .9; }
.tally i:nth-child(5n) { width: 4px; margin-right: 10px; transform: rotate(-8deg); }
.health { margin-bottom: 8px; font-size: 26px; display: flex; align-items: center; gap: 10px; }
.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; }
.low .bar { border-color: var(--red); } .low .fill { background: repeating-linear-gradient(-55deg, var(--red) 0 2.5px, transparent 2.5px 6px); }
.crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; --s: 10px; filter: drop-shadow(0 0 1px rgba(255,255,255,.9)); }
.crosshair i { position: absolute; background: var(--red); border-radius: 2px; transition: top .06s, left .06s; }
.ch-t { width: 3px; height: 12px; left: -1.5px; top: calc(-1 * var(--s) - 12px); }
.ch-b { width: 3px; height: 12px; left: -1.5px; top: var(--s); }
.ch-l { width: 12px; height: 3px; top: -1.5px; left: calc(-1 * var(--s) - 12px); }
.ch-r { width: 12px; height: 3px; top: -1.5px; left: var(--s); }
.ch-dot { width: 3px; height: 3px; left: -1.5px; top: -1.5px; border-radius: 50%; }
.crosshair.katana i { background: var(--ink); } .crosshair.katana .ch-t, .crosshair.katana .ch-b { height: 16px; }
.crosshair.katana .ch-l, .crosshair.katana .ch-r { display: none; }
.grapple-ret { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border: 2.5px dashed var(--ink); border-radius: 50%; opacity: 0; transition: opacity .1s, transform .12s; transform: scale(1.6) rotate(0deg); }
.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(250,248,238,.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; }
.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: flex-start; justify-content: center; pointer-events: auto; cursor: pointer; background: rgba(246, 243, 230, .55); overflow-y: auto; }
.screen.show { display: flex; }
.panel { text-align: center; max-width: 980px; margin: auto; padding: 26px 48px; background: rgba(250, 248, 238, .93); box-shadow: 6px 6px 0 rgba(26,48,192, .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 { font-size: 36px; } .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: 0; }
.slots { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-bottom: 6px; font-size: 20px; opacity: .85; }
.slot { display: flex; gap: 8px; align-items: baseline; opacity: .55; transform: rotate(1deg); }
.slot.active { opacity: 1; font-size: 24px; border-bottom: 2px solid var(--ink); }
.slot.empty { color: var(--red); }
.slot .num { font-size: 15px; opacity: .8; border: 1.5px solid var(--ink); border-radius: 4px 6px 4px 5px; padding: 0 4px; }
.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: calc(1.2% + 52px); 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: var(--ink); }
.settings input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--ink); }
.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(246,243,230,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(26,48,192,.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%; }
/* focus-slash target marker */
.focus-mark { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; transition: opacity .1s; }
.focus-mark.on { opacity: 1; animation: fm .5s ease-in-out infinite alternate; }
.focus-mark i { position: absolute; width: 20px; height: 20px; border: 3px solid var(--red); }
.focus-mark i:nth-child(1) { left: -30px; top: -30px; border-right: 0; border-bottom: 0; }
.focus-mark i:nth-child(2) { left: 10px; top: -30px; border-left: 0; border-bottom: 0; }
.focus-mark i:nth-child(3) { left: -30px; top: 10px; border-right: 0; border-top: 0; }
.focus-mark i:nth-child(4) { left: 10px; top: 10px; border-left: 0; border-top: 0; }
@keyframes fm { from { transform: scale(1); } to { transform: scale(1.18); } }
#hud.nogame .scope, #hud.nogame .focus-mark { display: none; }
/* katana focus gauge */
.focus-meter { position: absolute; left: 4.5%; top: 50%; transform: translateY(-50%) rotate(-1.5deg); opacity: 0; transition: opacity .25s; text-align: center; mix-blend-mode: multiply; }
.focus-meter.on { opacity: 1; }
.fm-label { font-size: 17px; letter-spacing: 2px; color: var(--ink); opacity: .8; margin-bottom: 4px; }
.fm-tube { position: relative; width: 26px; height: 168px; border: 3px solid var(--ink); border-radius: 8px 11px 7px 10px / 11px 7px 10px 8px; overflow: hidden; }
.fm-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: repeating-linear-gradient(-52deg, var(--ink) 0 3px, transparent 3px 7px); transition: height .18s; }
.fm-tube i { position: absolute; left: 50%; bottom: 100%; width: 16px; height: 22px; margin-left: -8px; background: var(--red); opacity: 0; clip-path: polygon(50% 0, 78% 42%, 66% 38%, 82% 78%, 50% 100%, 18% 78%, 34% 38%, 22% 42%); }
.focus-meter.ready .fm-tube { border-color: var(--red); box-shadow: 0 0 0 3px rgba(208,32,48,.18); }
.focus-meter.ready .fm-fill { background: repeating-linear-gradient(-52deg, var(--red) 0 3px, transparent 3px 7px); }
.focus-meter.ready .fm-tube i { opacity: 1; animation: flame .42s ease-in-out infinite alternate; }
.focus-meter.ready .fm-f2 { margin-left: -18px; height: 16px; animation-delay: .14s; }
.focus-meter.ready .fm-f3 { margin-left: 3px; height: 18px; animation-delay: .27s; }
@keyframes flame { from { transform: translateY(4px) scaleY(.78) rotate(-5deg); } to { transform: translateY(-3px) scaleY(1.15) rotate(6deg); } }
.fm-ready { font-size: 15px; color: var(--red); letter-spacing: 1px; margin-top: 5px; opacity: 0; }
.focus-meter.ready .fm-ready { opacity: 1; animation: blink 1s infinite; }
#hud.nogame .focus-meter { display: none; }
/* map picker */

/* grenades */
.nades { display: inline-flex; gap: 3px; margin-left: 12px; vertical-align: middle; }
.nades i { width: 13px; height: 15px; border: 2.5px solid var(--ink); border-radius: 50% 50% 45% 45%; display: inline-block; position: relative; top: -2px; }
.nades i::after { content: ''; position: absolute; left: 3px; top: -6px; width: 3px; height: 5px; background: 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); }
#hud.pad .kbonly, #hud:not(.pad) .padonly { display: none; }
.tpon { display: none; } #hud.trackpad .tpon { display: block; } #hud.trackpad .tpoff { display: none; }

/* ---- main menu ---- */
.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 .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.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:hover:not(:disabled) { filter: brightness(1.15); }
.feed { color: var(--red); }


/* 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); }

/* Battle of Doodle: offline solo edition */
.ps5-controls { display: none !important; }
/* minimap under the score */
.minimap { display: block; width: 180px; height: 180px; margin-top: 12px; transform: rotate(1.5deg); border-radius: 4px 7px 5px 6px; }
/* compass bar, top centre */
.compass { position: absolute; left: 50%; top: 1.2%; width: 620px; height: 43px; margin-left: -310px; mix-blend-mode: multiply; }
#hud.nogame .compass { display: none; }
/* ---- touch controls (phones / tablets) ---- */
#touch { position: fixed; inset: 0; z-index: 20; display: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#touch.show { display: block; }
#touch .stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border: 3px dashed var(--ink); border-radius: 50%; display: none; pointer-events: none; }
#touch .stick.on { display: block; }
#touch .stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(26,48,192,.3); border: 3px solid var(--ink); }
#touch .runlock { position: absolute; margin-left: -28px; width: 56px; text-align: center; color: var(--ink); font-size: 22px; line-height: 1; opacity: 0; pointer-events: none; }
#touch .runlock small { display: block; font-size: 11px; }
#touch .runlock.vis { opacity: .55; } #touch .runlock.on { opacity: 1; color: var(--red); }
#touch .tb { position: absolute; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 13px; letter-spacing: .5px; touch-action: none; opacity: .55; filter: drop-shadow(0 0 1.5px rgba(250,247,238,.9)); }
#touch .tb.on { background: var(--ink); color: var(--paper); opacity: .9; }
#touch .tb.sub { width: 40px; height: 40px; font-size: 19px; opacity: .45; }
#touch .fire { right: 22px; bottom: 26px; width: 72px; height: 72px; font-size: 16px; border-color: var(--red); color: var(--red); border-width: 2.5px; }
#touch .fire.on { background: var(--red); color: var(--paper); }
#touch .jump { right: 106px; bottom: 20px; width: 60px; height: 60px; }
#touch .aim { right: 32px; bottom: 112px; }
#touch .grapple { right: 108px; bottom: 92px; }
#touch .crouch { right: 178px; bottom: 24px; }
#touch .dash { right: 176px; bottom: 76px; }
#touch .melee { right: 156px; bottom: 132px; }
#touch .grenade { right: 94px; bottom: 158px; }
#touch .pause { left: 8px; top: 8px; width: 36px; height: 36px; font-size: 11px; }
body:not(.touch) .touchonly { display: none !important; }
/* HUD rearranged around the thumbs */
body.touch .hud-tl { left: 58px; top: 8px; font-size: 20px; }
body.touch .minimap { width: min(104px, 27vh); height: min(104px, 27vh); margin-top: 6px; }
body.touch #combo:empty { display: none; }
body.touch .compass { width: 52vw; height: calc(52vw / 14.4); margin-left: -26vw; top: 6px; }
body.touch .bossbar { top: calc(6px + 52vw / 14.4 + 36px); transform: scale(.75); }
body.touch .hud-tr { top: 8px; font-size: 20px; }
body.touch .hud-bl { left: 12px; top: 150px; bottom: auto; transform: scale(.5); transform-origin: top left; } /* top is kept under the minimap by updateTouchUI */
body.touch .hud-br { bottom: auto; top: calc(6px + 52vw / 14.4 + 4px); right: auto; left: 50%; transform: translateX(-50%) scale(.72); transform-origin: top center; }
body.touch .slots { flex-direction: row; gap: 14px; align-items: baseline; }
body.touch .slot { padding: 2px 4px; }
body.touch .hud-br .weapon, body.touch .hud-br .hint { display: none; }
body.touch .tip { bottom: 30%; font-size: 17px; }
body.touch .killfeed { top: 58%; font-size: 17px; right: 110px; }
body.touch .msg-main { font-size: 54px; }
body.touch .panel { padding: 12px 18px; max-height: 100vh; overflow-y: auto; box-sizing: border-box; }
body.touch .panel h1 { font-size: 46px; }
body.touch .panel h2 { font-size: 19px; margin: 2px 0 8px; }
body.touch .panel .cols, body.touch .settings label:has(#setTrack) { display: none; }
body.touch .panel .go { font-size: 16px; margin-top: 6px; }
body.touch .mainbtns button.start { min-width: 0; font-size: 36px; padding: 10px 30px; }
#rotate { display: none; }
@media (orientation: portrait) {
  body.touch #rotate { display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; background: var(--paper); color: var(--ink); text-align: center; }
  body.touch #rotate div { font-size: 72px; line-height: 1.1; }
  body.touch #rotate b { display: block; font-size: 30px; }
  body.touch #rotate span { display: block; font-size: 18px; opacity: .7; }
}

/* ---- Pandu Play: link back to the game index, shown whenever a menu screen is up ---- */
.pp-back { display: none; position: fixed; left: 14px; top: 10px; z-index: 30; color: var(--ink); font-size: 22px; text-decoration: none; border-bottom: 2px solid var(--ink); transform: rotate(-1deg); }
#hud:has(.screen.show) ~ .pp-back { display: block; }
.pp-back:hover, .pp-back:focus-visible { color: var(--red); border-color: var(--red); }
