@font-face{font-family:Oswald;src:url('../assets/oswald.ttf') format('truetype');font-weight:200 700;font-display:swap}
:root{--ink:#242119;--paper:#efdab0;--cream:#fff0c8;--red:#bc3525;--ochre:#d59c48;--sans:Arial,Helvetica,sans-serif;--poster:Oswald,'Arial Narrow',Impact,sans-serif;color-scheme:dark}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--ink);color:var(--paper);font-family:var(--sans)}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid var(--cream);outline-offset:5px}button{touch-action:manipulation}[hidden]{display:none!important}.stage{position:relative;width:100%;height:100%;max-width:2200px;margin:auto;isolation:isolate;overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.screen,.hud{position:absolute;inset:0}.hud{pointer-events:none;user-select:none}.hud button{pointer-events:auto}.hud-top{position:absolute;top:max(24px,env(safe-area-inset-top));left:38px;right:32px;display:flex;align-items:flex-start;gap:30px;text-shadow:0 1px 0 #f8e7bb}.eyebrow{font-family:var(--poster);font-size:12px;font-weight:500;letter-spacing:2px}.chapter{color:var(--ink);min-width:210px}.chapter strong{display:block;font-family:var(--poster);font-weight:700;font-size:28px;line-height:1.3}.journey{width:250px;margin:7px auto 0;color:var(--ink)}.journey-label{display:flex;justify-content:space-between;font-family:var(--poster);font-size:12px;letter-spacing:1.5px}.journey-label b{font-size:16px;line-height:1}.track{height:4px;background:#24211935;margin-top:13px;position:relative}.track i{display:block;height:100%;width:0;background:var(--red)}.track span{position:absolute;right:-10px;top:-10px;font-size:20px;color:var(--red)}.score{color:var(--ink);text-align:right;min-width:100px}.score strong{display:block;font:700 34px/1.1 var(--poster)}.icon-button{border:1px solid #24211970;background:#efdab090;width:44px;height:44px;color:var(--ink);font-size:22px;text-shadow:none}.caption{position:absolute;top:18%;left:50%;transform:translateX(-50%) rotate(-1deg);max-width:85%;padding:8px 22px;background:var(--ink);color:var(--cream);font:600 clamp(15px,2vw,23px) var(--poster);text-align:center;opacity:0;transition:opacity .2s;box-shadow:5px 5px 0 #bd3a29;white-space:pre-line}.caption.visible{opacity:1}.caption.caption-clearing{opacity:0;transition:none}.bonus-state{position:absolute;top:100px;left:38px;font:600 14px var(--poster);letter-spacing:1px;color:var(--ink)}.bonus-state span{display:block;width:max-content;background:var(--cream);padding:5px 10px;margin-bottom:5px;border-left:4px solid var(--red)}.hud-bottom{position:absolute;bottom:max(27px,env(safe-area-inset-bottom));left:38px;right:32px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.ammo-panel{background:var(--ink);padding:13px 18px 12px;min-width:190px;border-left:5px solid var(--red);box-shadow:4px 4px 0 #100e0950}.ammo-panel .eyebrow{color:#dac69c;font-size:11px}.ammo-value{display:flex;align-items:baseline;gap:12px}.ammo-value strong{font:600 46px/1.12 var(--poster);color:var(--cream)}.ammo-value>span{font:400 18px var(--poster);color:#c7ac80}.belt-track{height:4px;background:#66553c;margin:8px 0}.belt-track i{display:block;background:var(--ochre);height:100%;width:100%;transition:width .08s}.ammo-panel small{font:400 10px var(--poster);letter-spacing:1.3px}.ammo-panel.low .ammo-value strong{color:#ff7756}.actions{display:flex;gap:10px}.action-button{background:#e9d2a6;border:2px solid var(--ink);padding:13px 19px;font:600 15px var(--poster);color:var(--ink);box-shadow:3px 3px 0 #24211980}.action-button kbd{border:1px solid #24211955;padding:0 5px;margin-right:7px;font:inherit}.fire-button{display:none}.reload-state{width:220px;text-align:center;font:600 16px var(--poster);color:var(--cream);background:#242119d9;padding:13px 18px;position:absolute;left:50%;bottom:90px;transform:translateX(-50%)}.reload-state>div{height:4px;background:#806c47;margin-top:8px}.reload-state i{display:block;width:0;height:100%;background:var(--ochre)}.touch-hint{display:none}
.start-screen{color:var(--ink);background:#dfaa54;overflow:hidden}.cover-art{position:absolute;inset:0;background:url('../assets/cover.png') center right/cover no-repeat;filter:saturate(.92)}.cover-shade{position:absolute;inset:0;background:linear-gradient(90deg,#e6b966 0%,#e6b966ee 15%,#e6b96690 38%,transparent 60%)}.start-content{position:relative;padding:6vh 6vw;width:60%;max-width:940px;height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.edition{font:500 12px var(--poster);letter-spacing:2px;display:flex;align-items:center;gap:13px;margin-bottom:4vh}.edition>span:first-child{font-size:21px;color:var(--red)}.edition-line{height:1px;background:var(--ink);width:45px}.kicker{font:500 18px var(--poster);letter-spacing:4px;margin:0 0 4px}.start-content h1{font:700 clamp(80px,10.4vw,160px)/.98 var(--poster);letter-spacing:-3px;margin:0;color:var(--red);text-shadow:2px 2px 0 #f5d99d}.start-content h1 span{display:block;font-size:.295em;letter-spacing:2px;margin-top:15px;color:var(--ink)}.tagline{font:400 clamp(16px,1.8vw,24px)/1.42 var(--poster);margin:23px 0 26px}.primary-button{border:0;background:var(--red);color:var(--cream);font:600 23px var(--poster);letter-spacing:1px;padding:15px 25px;min-width:250px;box-shadow:5px 5px 0 var(--ink);display:flex;align-items:center;justify-content:space-between;gap:25px;transition:transform .12s,background .12s}.primary-button:hover{background:#a72b1e;transform:translate(-1px,-1px)}.primary-button:active{transform:translate(3px,3px);box-shadow:2px 2px 0 var(--ink)}.primary-button span{font-size:29px;line-height:1}.instructions{display:flex;gap:25px;margin:30px 0 0;flex-wrap:wrap}.instructions div{display:flex;flex-direction:column;gap:5px}.instructions b{font:600 13px var(--poster);letter-spacing:1px}.instructions span{font-size:11px;max-width:135px;line-height:1.4}.brief{font-size:11px;line-height:1.7;margin-top:23px;max-width:450px}.brief strong{font-weight:700}.cover-footer{position:absolute;bottom:17px;left:6vw;right:3vw;display:flex;justify-content:space-between;gap:20px;align-items:center;font:400 10px var(--poster);letter-spacing:1.3px}.text-button{background:transparent;border:0;border-bottom:1px solid currentColor;color:inherit;padding:8px 0;font:500 12px var(--poster);letter-spacing:1px}.shade-screen{background:#171610bd;display:grid;place-items:center;backdrop-filter:blur(5px)}.panel{background:var(--paper);color:var(--ink);padding:36px 44px;min-width:400px;max-width:90vw;border-top:8px solid var(--red);box-shadow:10px 10px 0 #17161090;display:flex;flex-direction:column;align-items:center}.panel>.eyebrow{letter-spacing:2.5px}.panel h2{font:700 66px/1.12 var(--poster);color:var(--red);margin:12px 0 0}.panel>p{font:400 17px/1.5 var(--poster);margin:10px 0 20px;max-width:400px;text-align:center}.panel .text-button{margin-top:18px}.settings{width:100%;margin:4px 0 25px}.settings label{display:flex;justify-content:space-between;align-items:center;gap:24px;font:400 14px var(--poster);margin:15px 0}.settings input[type=range]{accent-color:var(--red);width:160px}.settings .check-label{justify-content:flex-start;gap:10px}.settings input[type=checkbox]{accent-color:var(--red);width:16px;height:16px}.result-stats{display:flex;gap:35px;justify-content:space-between;margin:5px 0 25px}.result-stats div{display:flex;flex-direction:column;gap:4px}.result-stats span{font:400 10px var(--poster);letter-spacing:1px}.result-stats b{font:600 40px var(--poster)}.rotate-hint{display:none}.load-error{position:absolute;bottom:0;left:0;right:0;background:#8c2118;color:white;padding:15px;font-size:14px;z-index:20}
@media(min-aspect-ratio:21/9){.start-content{padding-top:3vh;padding-bottom:5vh}.edition{margin-bottom:2vh}.tagline{margin:16px 0}.instructions{margin-top:20px}.brief{margin-top:12px}}
@media(max-height:650px){.start-content{padding:20px 5vw 40px}.edition{margin-bottom:10px;font-size:9px}.kicker{font-size:12px}.start-content h1{font-size:clamp(60px,12vh,95px)}.start-content h1 span{margin-top:9px}.tagline{font-size:16px;margin:13px 0}.primary-button{font-size:19px;padding:10px 20px;min-width:200px}.instructions{margin-top:16px;gap:18px}.instructions span{font-size:9px}.brief{font-size:10px;margin-top:11px}.cover-footer{font-size:8px;bottom:7px}.cover-footer .text-button{font-size:9px}.panel{padding:16px 28px;min-width:340px}.panel h2{font-size:42px}.panel>p{font-size:15px;margin:5px 0 10px}.settings{margin-bottom:12px}.settings label{margin:10px 0}.panel .text-button{margin-top:8px}.hud-top{top:13px;left:18px;right:18px;gap:15px}.chapter{min-width:150px}.chapter strong{font-size:21px}.score strong{font-size:27px}.journey{width:180px;margin-top:4px}.hud-bottom{bottom:15px;left:18px;right:18px}.ammo-panel{padding:8px 12px;min-width:135px}.ammo-value strong{font-size:32px}.ammo-value>span{font-size:14px}.ammo-panel .eyebrow{font-size:9px}.ammo-panel small{font-size:8px}.bonus-state{top:78px;left:18px}.reload-state{bottom:55px}.caption{top:22%;font-size:17px}}
@media(pointer:coarse){.fire-button{display:block;border:2px solid #f4d89b;background:#b73625de;color:var(--cream);font:600 18px var(--poster);width:90px;height:70px;box-shadow:3px 3px 0 var(--ink)}.action-button kbd{display:none}.actions{align-items:flex-end}.action-button{padding:12px 14px}.touch-hint{display:block;position:absolute;bottom:max(4px,env(safe-area-inset-bottom));right:18px;font:400 8px var(--poster);letter-spacing:.7px;color:var(--paper);text-shadow:1px 1px #000}.instructions div:first-child b{font-size:0}.instructions div:first-child b:after{content:'ПРИЦЕЛ + ОГОНЬ';font-size:13px}.instructions div:first-child span{font-size:0}.instructions div:first-child span:after{content:'Ведите прицел, держите огонь';font-size:10px}.instructions div:nth-child(2) b{font-size:0}.instructions div:nth-child(2) b:after{content:'ФОКУС';font-size:13px}.instructions div:nth-child(2) span{font-size:0}.instructions div:nth-child(2) span:after{content:'Нажмите «ПРИЦЕЛ»';font-size:10px}.instructions div:nth-child(3){display:none}}
@media(max-aspect-ratio:1/1){.start-content{width:100%;padding:25px 8vw 60px;justify-content:flex-end}.cover-art{background-position:68% center}.cover-shade{background:linear-gradient(0deg,#e6b966 5%,#e6b966ed 40%,#e6b96610 90%)}.start-content h1{font-size:90px}.edition{display:none}.brief{margin-top:15px}.cover-footer>span{display:none}.cover-footer{justify-content:flex-end}.hud-top{gap:10px;left:12px;right:12px}.chapter{min-width:75px}.chapter strong{font-size:17px}.journey{width:110px}.score{min-width:45px}.score strong{font-size:24px}.hud-bottom{left:12px;right:12px}.caption{font-size:15px}.rotate-hint:not(.dismissed){display:flex;position:absolute;inset:0;background:#242119f5;z-index:30;align-items:center;justify-content:center;flex-direction:column;padding:30px;text-align:center}.rotate-hint>span{font-size:80px;color:var(--ochre)}.rotate-hint strong{font:600 28px var(--poster)}.rotate-hint p{line-height:1.5;font-size:15px}.panel{min-width:0;width:88vw;padding:24px}.panel h2{font-size:45px}.result-stats{gap:20px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.primary-button,.caption{transition:none}}
@media(pointer:fine){.rotate-hint:not(.dismissed){display:none}}
.focus-button{display:none}
@media(pointer:coarse){
  .focus-button{display:block;border:2px solid #f4d89b;background:#5f4930de;color:var(--cream);font:600 18px var(--poster);width:90px;height:70px;box-shadow:3px 3px 0 var(--ink)}
  .focus-button[aria-pressed="true"],.fire-button[aria-pressed="true"]{background:var(--red);}
  .actions{gap:8px;}
}
@media(pointer:coarse) and (max-aspect-ratio:1/1){
  .actions{gap:6px;max-width:190px;flex-wrap:wrap;justify-content:flex-end}
  .fire-button,.focus-button{width:78px;height:56px;font-size:14px}
}
@media(pointer:coarse){
  .hud-top{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
  .hud-bottom{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
}
.dialogue{position:absolute;z-index:4;top:clamp(78px,14vh,126px);left:50%;transform:translateX(-50%) rotate(-.7deg);display:flex;align-items:center;gap:11px;width:min(430px,calc(100vw - 28px));padding:9px 14px 9px 9px;background:#242119e8;color:var(--cream);border-left:5px solid var(--ochre);box-shadow:4px 4px 0 #17161070;pointer-events:none}.dialogue-portrait{width:56px;height:56px;flex:0 0 56px;border:2px solid var(--ochre);background-color:#9b6e3f;background-image:url('../assets/dialogue-portraits-v8.png');background-size:300% 100%;background-repeat:no-repeat;background-position:0 0}.dialogue-copy{min-width:0}.dialogue-copy strong{display:block;color:var(--ochre);font:600 11px/1 var(--poster);letter-spacing:1.4px}.dialogue-copy p{margin:5px 0 0;font:400 clamp(14px,1.5vw,18px)/1.18 var(--poster);overflow-wrap:anywhere}.achievement-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-height:none;overflow:visible;margin:0 0 18px}.achievement-card{display:flex;flex-direction:column;gap:3px;padding:8px 10px;background:#d59c4833;border-left:3px solid var(--red);text-align:left}.achievement-card strong{font:600 13px/1.15 var(--poster)}.achievement-card span{font:400 12px/1.25 var(--poster)}.achievement-empty{grid-column:1/-1;margin:0;padding:8px 0;font:400 12px var(--poster);opacity:.75;text-align:center}.result-panel{max-height:calc(100vh - 28px);overflow:auto}.dialogue[hidden]{display:none}
@media(max-width:600px){.dialogue{top:clamp(78px,14vh,126px);width:calc(100vw - 20px);padding:7px 10px 7px 7px}.dialogue-portrait{width:48px;height:48px;flex-basis:48px}.dialogue-copy p{font-size:14px}.achievement-grid{grid-template-columns:1fr;max-height:none}}
.desktop-control-hint{display:none;pointer-events:none}
#game{cursor:default}
#game.playing{cursor:none}
#game{user-select:none;-webkit-user-select:none}
.dialogue{width:min(430px,calc(100% - 28px))}
.dialogue{top:clamp(112px,23%,190px);left:14px;right:auto;transform:none;width:min(290px,26%);padding:0;border:0;box-shadow:none;background:none;color:var(--ink);gap:0;align-items:flex-start;flex-direction:column}
.dialogue[data-side="right"]{left:auto;right:14px;align-items:flex-end}
.dialogue-portrait{width:88px;height:88px;flex:0 0 88px;border:3px solid var(--ink);background-image:url('../assets/dialogue-portraits-v8.png');background-size:300% 400%;background-position:0 0;box-shadow:3px 3px 0 #211a1855;transform:rotate(-4deg);border-radius:46% 48% 20% 18%;--face-x:0%;--face-y:0%;background-position:var(--face-x) var(--face-y)}
.dialogue[data-side="right"] .dialogue-portrait{transform:rotate(4deg)}
.dialogue-portrait[data-speaker="anka"]{--face-x:50%}
.dialogue-portrait[data-speaker="petka"]{--face-x:100%}
.dialogue-portrait[data-emotion="angry"]{--face-y:33.333333%}
.dialogue-portrait[data-emotion="surprise"]{--face-y:66.666667%}
.dialogue-portrait[data-emotion="laugh"]{--face-y:100%}
.dialogue-copy{position:relative;margin-top:12px;padding:12px 14px;background:#fff5df;border:3px solid var(--ink);border-radius:18px 21px 17px 9px;box-shadow:3px 4px 0 #211a1838}
.dialogue-copy:before{content:'';position:absolute;top:-11px;left:31px;width:15px;height:15px;background:#fff5df;border-top:3px solid var(--ink);border-left:3px solid var(--ink);transform:skewY(30deg) rotate(20deg)}
.dialogue[data-side="right"] .dialogue-copy:before{left:auto;right:31px}
.dialogue-copy strong{position:relative;color:var(--red);font-size:11px;letter-spacing:1.2px}
.dialogue-copy p{font-size:clamp(14px,1.4vw,19px);line-height:1.25;margin-top:6px}
@media(max-width:800px),(max-height:570px){.dialogue{top:clamp(76px,21%,112px);width:min(190px,25%);left:8px}.dialogue[data-side="right"]{right:8px}.dialogue-portrait{width:54px;height:54px;flex-basis:54px;border-width:2px}.dialogue-copy{padding:8px 9px;margin-top:9px;border-width:2px;box-shadow:2px 2px 0 #211a1838}.dialogue-copy:before{top:-8px;width:10px;height:10px;border-width:2px;left:18px}.dialogue[data-side="right"] .dialogue-copy:before{right:18px}.dialogue-copy p{font-size:12px;line-height:1.23}.dialogue-copy strong{font-size:9px}}
@media(max-aspect-ratio:1/1){.dialogue{width:39%;top:120px}.dialogue-copy p{font-size:13px}}
#game:focus{outline:none}
#pause-screen .panel{min-width:0;max-width:calc(100% - 24px);max-height:calc(100% - 20px);overflow:auto}
@media(pointer:fine){
  body.playing{--game-gutter-x:clamp(32px,5vw,76px);--game-gutter-y:clamp(32px,5vh,60px)}
  body.playing .stage{width:calc(100% - 2*var(--game-gutter-x));height:calc(100% - 2*var(--game-gutter-y));margin:var(--game-gutter-y) auto;box-shadow:0 0 0 1px #d59c4855,0 12px 34px #0006}
  body.playing #pause{position:fixed;top:2px;right:var(--game-gutter-x);width:36px;height:28px;font-size:18px;border-color:#d59c4880;background:var(--ink);color:var(--paper)}
  body.playing #reload{position:fixed;bottom:4px;right:var(--game-gutter-x);padding:4px 12px;font-size:12px;box-shadow:none}
  body.playing .desktop-control-hint{display:block;position:fixed;left:var(--game-gutter-x);bottom:10px;max-width:calc(100% - 2*var(--game-gutter-x) - 120px);color:#bfa983;font:400 clamp(8px,.8vw,11px)/1.2 var(--poster);letter-spacing:.8px}
}
