@font-face{font-family:Pangolin;src:url("assets/Pangolin-Regular.ttf") format("truetype");font-display:swap}
:root{--paper:#f5f0e3;--ink:#36362f;--muted:#6d6b60;--red:#b84333;--green:#4c755b;--line:#d7ded5;--scale:1;--turn:0deg;--stage-width:390px;--stage-height:844px;--viewport-width:100vw;--viewport-height:100dvh;--font:Pangolin,"Segoe Print","Comic Sans MS",cursive}
*{box-sizing:border-box;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}img,svg,canvas,a{-webkit-user-drag:none}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none;touch-action:none}body{position:fixed;inset:0;width:var(--viewport-width);height:var(--viewport-height);font-family:var(--font);color:var(--ink);background:var(--paper);display:flex;align-items:center;justify-content:center}
button,a{touch-action:none}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px dashed var(--red);outline-offset:4px}button:not(:disabled):not(.attack):active{translate:0 2px}button{border:0}a{color:inherit;text-decoration:none}[hidden]{display:none!important}
#stage{width:var(--stage-width);height:var(--stage-height);flex-shrink:0;position:relative;transform:rotate(var(--turn)) scale(var(--scale));overflow:hidden;isolation:isolate;touch-action:none}
#world{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.screen{position:absolute;inset:0}.eyebrow{font:12px/1.2 var(--font);letter-spacing:2.4px;display:block;color:var(--muted)}
.game-heading{position:absolute;top:107px;left:50%;width:356px;height:112px;transform:translateX(-50%);z-index:1;pointer-events:none}.logo{margin:0;width:100%;height:100%;line-height:0}.logo svg{display:block;width:100%;height:100%}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.side-tools{position:absolute;top:18px;left:16px;z-index:2;display:flex;flex-direction:column;gap:15px}.tool{position:relative;background:var(--paper);border:1.8px solid var(--ink);border-radius:42% 52% 47% 43%;width:57px;height:57px;display:flex;align-items:center;justify-content:center;flex-direction:column;transform:rotate(-4deg);box-shadow:2px 2px 0 #dcd7cb}.tool:nth-child(2){margin-top:138px;transform:rotate(3deg)}.tool:nth-child(3){transform:rotate(-3deg)}.tool svg{width:27px;height:27px}.tool>span:last-of-type{font-size:10px;line-height:1.15;margin-top:2px}.notice-dot{position:absolute;right:-3px;top:-3px;width:12px;height:12px;border:2px solid var(--paper);background:var(--red);border-radius:50%}
.wallet{position:absolute;right:18px;top:22px;min-width:97px;height:43px;padding:4px 12px;display:flex;align-items:center;justify-content:center;gap:8px;border:1.8px solid var(--ink);border-radius:11px 19px 13px 17px;transform:rotate(3deg);background:var(--paper);font-size:24px;box-shadow:2px 2px #e3ded2}.wallet svg{width:29px;height:29px}.wallet strong{font-weight:400;font-variant-numeric:tabular-nums}
.menu-note{position:absolute;bottom:218px;right:max(36px,calc((100% - 600px)/2));transform:rotate(-6deg);text-align:center}.menu-note span{font-size:12px;color:var(--muted);display:block}.menu-note b{font-size:24px;font-weight:400;border-bottom:2px solid var(--red);display:inline-block;line-height:1.4}
.menu-bottom{position:absolute;left:37px;right:37px;bottom:17px;max-width:600px;margin-inline:auto}.button{width:100%;min-height:52px;padding:11px 16px;border:2px solid var(--ink);border-radius:7px 11px 8px 13px;background:var(--paper);font-size:21px;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:3px 4px 0 var(--ink);position:relative}.button.primary{background:var(--red);color:#fff9ee;border-color:var(--ink)}.button:disabled{background:#e1ddcf;color:#777365;box-shadow:1px 2px var(--ink)}.button.play{height:75px;font-size:41px;letter-spacing:2px;transform:rotate(-2deg);justify-content:space-between;padding:10px 26px}.arrow{font-family:var(--font);font-weight:400}.equipment{margin-top:15px;height:61px;justify-content:flex-start;text-align:left;font-size:17px;box-shadow:2px 3px var(--ink)}.equipment svg{width:38px;height:38px}.equipment #equipped-name{display:block;font-size:13px;color:var(--muted)}.equipment .arrow{margin-left:auto;font-size:32px}.author{text-align:center;font-size:12px;color:var(--muted);margin:14px 0 0}
.float-doodles{position:absolute;left:50%;top:50%;width:290px;height:264px;transform:translate(-50%,-50%)}.float-doodles>span{position:absolute;width:72px;height:85px;animation:float 3.2s ease-in-out infinite}.float-doodles>span:nth-child(1){left:0;top:0;rotate:-25deg}.float-doodles>span:nth-child(2){right:20px;top:40px;rotate:12deg;animation-delay:-1s}.float-doodles>span:nth-child(3){left:28px;bottom:0;rotate:-14deg;animation-delay:-2s}.float-doodles>span:nth-child(4){right:0;bottom:0;rotate:25deg;animation-delay:-.5s}.float-doodles svg{width:100%;height:100%}.loading-bottom{position:absolute;left:48px;right:48px;bottom:140px;max-width:480px;margin-inline:auto;text-align:center}.loading-bottom>span{font-size:42px;display:block;rotate:-3deg}.loading-bottom p{font-size:16px;color:var(--muted)}progress{width:100%;height:23px;appearance:none;background:var(--paper);border:2px solid var(--ink);border-radius:10px 15px 12px 7px;overflow:hidden}progress::-webkit-progress-bar{background:var(--paper)}progress::-webkit-progress-value{background:repeating-linear-gradient(60deg,#505044 0 2px,#737367 2px 4px);transition:width .12s}progress::-moz-progress-bar{background:#505044}
.fight-top{position:absolute;top:21px;left:19px;right:19px;display:flex;align-items:center;height:42px;gap:13px}.small-button{display:flex;align-items:center;justify-content:center;width:43px;height:43px;flex-shrink:0;border:1.6px solid var(--ink);border-radius:10px 8px 12px 7px;background:var(--paper)}.small-button svg{width:24px;height:24px}.level-label{font-size:18px}.wallet.small{position:static;margin-left:auto;min-width:80px;height:38px;font-size:20px;padding:4px 9px}.wallet.small svg{width:25px;height:25px}
.health-caption{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:16px}.health-caption b{font-weight:400}.health-caption>span{font-size:14px;font-variant-numeric:tabular-nums}.enemy-health{position:absolute;top:92px;left:29px;right:29px;max-width:550px;margin-inline:auto}.meter{height:19px;background:#ebe6d9;border:1.7px solid var(--ink);border-radius:7px 10px 6px 8px;padding:2px;overflow:hidden}.meter>span{display:block;height:100%;width:100%;background:repeating-linear-gradient(-55deg,#b84333 0 3px,#c45b44 3px 5px);border-radius:3px;transition:width .16s linear}.player-health .meter>span{background:repeating-linear-gradient(-55deg,#4c755b 0 3px,#65866a 3px 5px)}
.intent{position:absolute;top:163px;left:57px;right:57px;min-height:30px;text-align:center;font-size:15px;color:var(--muted)}.intent.warning{color:var(--red);font-size:17px}.combat-bottom{position:absolute;left:24px;right:24px;bottom:18px;max-width:550px;margin-inline:auto}.player-health{margin:0 3px 14px}.attack-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.attack{position:relative;overflow:hidden;height:100px;background:linear-gradient(0deg,#ddd8c9 calc(var(--cooldown,0)*100%),var(--paper) 0);border:2px solid var(--ink);border-radius:11px 7px 14px 8px;box-shadow:2px 3px var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;isolation:isolate}.attack:nth-child(2){rotate:2deg}.attack:nth-child(3){rotate:-2deg}.attack svg{width:37px;height:37px}.attack b{font-size:18px;font-weight:400}.attack small{font-size:12px;color:var(--muted)}.attack .cooldown-label{position:absolute;top:4px;right:5px;font-size:11px;color:var(--red)}.attack:disabled{color:#666052;box-shadow:1px 1px var(--ink)}.weapon-attack{border-color:var(--red)}.bandage-button{height:46px;width:100%;margin-top:14px;background:#e8eddd;border:1.7px solid var(--ink);border-radius:6px 9px 8px 11px;display:flex;align-items:center;gap:9px;padding:5px 12px}.bandage-button svg{width:28px;height:28px}.bandage-button b{font-weight:400;font-size:18px}.bandage-button>span:nth-of-type(2){font-size:13px;color:#3d5946}.bandage-button strong{font-weight:400;margin-left:auto;font-size:19px}.bandage-button:disabled{background:#e1ddcf;color:#777365}.controls-hint{font-size:11px;text-align:center;color:var(--muted);margin:11px -8px 0}
#battle-effects{position:absolute;inset:0;pointer-events:none}.damage-float{position:absolute;font-size:36px;animation:damage .72s ease-out forwards;font-weight:bold;text-shadow:2px 2px var(--paper)}.damage-float.player{color:var(--red)}.damage-float.heal{color:var(--green)}
.result-screen{background:var(--paper);display:flex;align-items:center;justify-content:center}.result-content{text-align:center;width:306px}.result-doodle{display:block;width:99px;height:99px;margin:37px auto 22px;color:var(--red);rotate:-10deg}.result-doodle svg{width:100%;height:100%}.result-content h1{font-size:57px;line-height:1;margin:20px 0;color:var(--red);font-weight:400;rotate:-5deg}.result-content p{font-size:19px;line-height:1.4}.result-reward{font-size:30px;display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;margin:21px 0 31px}.result-reward svg{width:42px;height:42px}.result-content .button+.button{margin-top:16px}.result-screen.loss h1,.result-screen.loss .result-doodle{color:var(--ink)}.result-screen.loss .result-reward{font-size:17px;color:var(--muted)}
dialog{position:fixed;inset:auto;left:calc(var(--viewport-width)/2);top:calc(var(--viewport-height)/2);margin:0;transform:translate(-50%,-50%) rotate(var(--turn)) scale(var(--scale));width:352px;max-width:none;max-height:calc(var(--stage-height) - 96px);touch-action:pan-y;padding:22px 20px 24px;border:2px solid var(--ink);border-radius:9px 14px 11px 7px;background:var(--paper);color:var(--ink);font:18px/1.35 var(--font);box-shadow:5px 6px 0 #36362f;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}dialog::backdrop{background:#36362f}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}.panel-header h2{font-size:32px;font-weight:400;margin:5px 0 0;rotate:-2deg}.panel-header .eyebrow{font-size:10px}.close{font:29px/1 var(--font)}.panel-description{font-size:15px;margin:0 0 16px;color:var(--muted)}.panel-balance{display:flex;align-items:center;gap:8px;border-bottom:1px dashed #767366;padding-bottom:15px;margin-bottom:15px}.panel-balance svg{width:31px;height:31px}.panel-balance b{font-size:23px;font-weight:400}.shop-tabs{display:flex;gap:6px;margin-bottom:18px}.shop-tabs button{padding:8px 10px;background:var(--paper);border:1px solid #888173;border-radius:6px;font-size:15px;flex:1}.shop-tabs button[aria-pressed="true"]{background:var(--ink);color:var(--paper)}.item-card{display:grid;grid-template-columns:48px 1fr;gap:4px 12px;padding:14px 0;border-top:1px dashed #9a9584}.item-card:first-child{border-top:0;padding-top:2px}.item-icon{width:45px;height:45px;align-self:center}.item-icon svg{width:100%;height:100%}.item-info b{font-size:20px;font-weight:400;display:block}.item-info p{font-size:13px;color:var(--muted);margin:4px 0 10px}.item-card .buy{grid-column:2;width:100%;font-size:16px;min-height:36px;padding:6px 9px;border:1.4px solid var(--ink);border-radius:6px 8px 5px 7px;background:var(--paper);display:flex;align-items:center;justify-content:center;gap:7px}.buy svg{width:23px;height:23px}.buy:not(:disabled){background:#e5ecd9}.buy:disabled{color:#6d6b60;background:#ece7da;border-style:dashed}.daily-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}.day-card{border:1.5px dashed #9a9584;border-radius:7px 5px 9px 6px;padding:9px 4px;text-align:center;position:relative}.day-card>span{font-size:13px;display:block}.day-card svg{width:36px;height:36px;margin:7px 0 4px}.day-card small{display:block;font-size:12px}.day-card.current{border:2px solid var(--red);background:#ede9d8;rotate:-2deg}.day-card.done{background:#e2e9d9;border-style:solid}.day-card.done:after{content:"✓";position:absolute;right:5px;top:2px;color:var(--green)}.day-card:last-child{grid-column:1/-1;display:flex;align-items:center;justify-content:space-around;background:#e9e7d8}.day-card:last-child small{font-size:14px}.daily-note{font-size:13px;color:var(--muted);text-align:center;margin:12px 0 0}.pause-art{margin:8px auto 22px;width:80px;height:80px;color:var(--muted)}.pause-art svg{width:100%;height:100%}.pause-actions{display:flex;flex-direction:column;gap:14px}.pause-actions p{font-size:13px;color:var(--muted);text-align:center;margin:0}
#toast{position:absolute;z-index:20;left:22px;right:22px;bottom:285px;margin:0 auto;max-width:550px;padding:13px 16px;text-align:center;border:1.5px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:3px 3px var(--ink);font-size:17px;pointer-events:none}
@keyframes float{0%,100%{translate:0 0;rotate:-6deg}50%{translate:8px -16px;rotate:5deg}}@keyframes damage{0%{translate:0 0}100%{translate:0 -65px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition:none!important}.float-doodles>span{animation:none}}
@media(pointer:coarse){.controls-hint{font-size:0}.controls-hint:after{content:"Удары восстанавливаются после нажатия";font-size:11px}}
.panel-feedback{position:sticky;bottom:0;background:#e2ead7;border:1px solid var(--green);padding:10px 12px;border-radius:7px;font-size:15px;box-shadow:0 2px 0 #dcd7cb;margin:14px 0 0}
.sound-settings{position:absolute;left:50%;top:18px;transform:translateX(-50%) rotate(2deg)}.sound-symbol{font-size:29px;line-height:1}.sound-start{min-height:64px;font-size:23px;transform:rotate(-2deg)}
.sound-toggle{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0 20px;border-bottom:1px dashed #9a9584;font-size:23px}.sound-toggle input{width:26px;height:26px;accent-color:var(--red);cursor:pointer}.sound-control{display:block;margin:23px 0}.sound-control>span{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:21px}.sound-control output{font-size:18px;color:var(--muted)}.sound-control input{display:block;width:100%;height:34px;margin:0;accent-color:var(--red);touch-action:pan-x;cursor:pointer}.sound-control input:focus-visible,.sound-toggle input:focus-visible{outline:2px dashed var(--red);outline-offset:4px}.audio-credits{font-size:13px;line-height:1.5;color:var(--muted);margin:22px 0 0}.audio-credits a{text-decoration:underline}.audio-status{font-size:14px;line-height:1.4;color:var(--muted);margin:16px 0 0}
