@import url('https://fonts.googleapis.com/css2?family=Tiny5&family=IBM+Plex+Mono:wght@400;500&display=swap');
:root{color-scheme:dark;--ink:#100d17;--panel:#211927;--line:#77556f;--cream:#e6d6cc;--rose:#c494a7;--muted:#a48a9f}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--cream);font-family:'IBM Plex Mono',monospace;background-image:radial-gradient(ellipse at 50% 40%,#3c274133,transparent 65%)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:2px solid #e9c895;outline-offset:4px}button:disabled{cursor:default}main{max-width:800px;margin:auto;padding:25px 28px 22px}header{display:flex;justify-content:space-between;align-items:center}.brand{color:#e1b8c6;text-decoration:none;font-family:Tiny5,monospace;font-size:22px;letter-spacing:2px}.brand span{display:block;font-family:'IBM Plex Mono',monospace;font-size:8px;letter-spacing:1.8px;color:var(--muted);margin:4px 0 0 22px}#sound{font-size:10px;padding:9px 10px;background:#231b2b;border:1px solid var(--line);box-shadow:2px 2px 0 #050409}.heading{text-align:center;margin:25px 0 20px}.eyebrow,.small{font-size:8px;letter-spacing:2px;color:var(--muted)}h1{font-family:Tiny5,monospace;font-size:53px;font-weight:400;line-height:1.05;margin:11px 0 9px;text-shadow:3px 3px 0 #472d44}h1 em{font-style:normal;color:#c493aa}.heading p{font-size:10px;color:#ab94ac;margin:0}p{margin:0}.game{max-width:620px;margin:auto;background:#1c1624;border:2px solid #785771;box-shadow:0 0 0 4px #17101e,0 0 0 5px #39283f,0 24px 80px #0005;overflow:hidden}.hud{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;border-bottom:1px solid #5d405c;background:#241b2b;font-size:10px;color:#d7b8cd}.dot{display:inline-block;width:5px;height:5px;background:#e0bc86;margin-right:6px;box-shadow:0 0 8px #e0bc8644}.hud button{border:0;background:none;color:#c0a5c0;font-size:10px}.scene{position:relative;background:#100e17;aspect-ratio:384/320;overflow:hidden}canvas{display:block;width:100%;height:100%;image-rendering:pixelated}canvas#world{touch-action:none}.vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 65px 8px #10091988}.overlay{position:absolute;inset:0;background:#120e1aed;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px}.overlay[hidden],.dialog[hidden]{display:none}.heroCat{margin:8px auto;width:104px;height:68px}.heroCat canvas{width:104px;height:68px}h2{font-family:Tiny5,monospace;font-size:32px;font-weight:400;margin:4px 0 12px;line-height:1.1}.overlay p{font-size:11px;line-height:1.9;color:#baa3bc}.primary{background:#c49aa9;color:#251c2e;border:2px solid #eed8cb;box-shadow:3px 3px 0 #50334c;padding:12px 20px;margin-top:20px;min-width:180px;font-size:11px}.primary span{margin-left:18px}.primary:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #50334c}.overlay>small{font-size:8px;color:#948098;margin-top:16px}.quest{display:flex;align-items:center;gap:12px;padding:13px 16px;border-top:1px solid #9c7289;border-bottom:1px solid #50354d;background:#2b1e30}.quest>span{font-size:24px;color:#dfc18c}.quest>div{flex:1;min-width:0}.quest small{font-size:7px;color:#ae879e;letter-spacing:1.5px}.quest p{font-size:10px;line-height:1.7;margin-top:4px}.quest b{font-size:11px;font-weight:400;color:#e6c8b8;white-space:nowrap}#inventory{width:72px;height:24px;flex:none}.controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 23px;background:#1d1627}.controlNote{font-size:10px;line-height:1.8;color:#cbb0c4}.controlNote span{font-size:8px;color:#99829f}.action{width:75px;height:75px;flex-shrink:0;border:2px solid #a77a96;background:#483047;box-shadow:3px 3px 0 #0b0813,inset 0 0 0 3px #63415b;color:#edd8c5;font-size:28px}.action small{display:block;font-size:7px;letter-spacing:.7px;margin-top:5px}.action:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #0b0813}#joystick{position:relative;flex-shrink:0;width:112px;height:112px;border:2px solid #67465f;background:#2d2138;box-shadow:inset 0 0 0 5px #20172b,3px 3px 0 #100a1a;touch-action:none;user-select:none}#joystick>span{position:absolute;font-size:8px;color:#94759b;pointer-events:none}.joy-up{left:50px;top:8px}.joy-down{left:50px;bottom:8px}.joy-left{left:9px;top:48px}.joy-right{right:9px;top:48px}#knob{position:absolute;left:32px;top:32px;width:44px;height:44px;display:grid;place-items:center;font-size:25px;color:#e2c3d2;background:#674961;border:2px solid #b18a9f;box-shadow:3px 3px 0 #180f23,inset 2px 2px 0 #89647d;pointer-events:none;will-change:transform}#dash{display:block;background:#302136;border:1px solid #77516c;padding:7px 12px;font-size:9px;color:#c8a3bb;margin-top:9px}#dash:disabled{opacity:.4}footer{max-width:620px;margin:18px auto 0;display:flex;justify-content:space-between;font-size:8px;line-height:1.6;color:#80718a}footer button{background:none;border:0;color:#ac8aab;font-size:8px}.dialog{position:absolute;inset:0;padding:12px;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:8px;background:linear-gradient(#17101ef2,#21152bf2)}#conversation{position:absolute;left:0;top:3px;width:100%;height:56%;object-fit:contain;object-position:center bottom;pointer-events:none}.dialog-content{position:relative;z-index:1;display:flex;flex-direction:column;flex:none;max-height:45%;min-height:105px;background:#15101cf7;border:2px solid #e1c9cd;padding:11px 14px;box-shadow:3px 3px 0 #624159}.dialog #speaker{flex-shrink:0;font-size:11px;color:#d2a5b8;margin-bottom:7px}.dialog #speech{flex:1;font-size:12px;line-height:1.65;min-height:30px;max-height:78px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#8c657e transparent}.dialog #next{flex-shrink:0;display:block;margin-left:auto;min-height:29px;background:none;border:0;font-size:10px;color:#d7b7c8;padding:7px 0 0}.dialog.bedside{background:linear-gradient(transparent 45%,#17102055)}.dialog.bedside #conversation{display:none}.dialog.bedside .dialog-content{border-color:#b797b2;background:#1c1421ed}#map h2{font-size:24px}#rooms{position:relative;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:43px 43px 43px;gap:12px 8px;width:100%;max-width:355px;margin:12px 0 0}#rooms:before{content:'';position:absolute;inset:22px 15%;border:3px solid #674761;z-index:0}#rooms button{position:relative;background:#2b2035;border:2px solid #826082;font-size:9px;padding:5px;z-index:1;color:#d9b9cb}#rooms button:nth-child(1){grid-area:2/2}#rooms button:nth-child(2){grid-area:2/1}#rooms button:nth-child(3){grid-area:2/3}#rooms button:nth-child(4){grid-area:3/1}#rooms button:nth-child(5){grid-area:3/3}#rooms button:nth-child(6){grid-area:1/2}#rooms button.current{border-color:#ebcda2;color:#f4ddbe;background:#4c344c}@media(max-width:550px){main{padding:15px 12px}.brand{font-size:19px}.brand span{font-size:7px}.heading{margin:20px 0 18px}h1{font-size:43px}.heading p{font-size:9px}.game{border-width:1px}.hud{padding:11px 12px;font-size:9px}.scene{min-height:260px}.controls{padding:13px 16px}.controlNote{font-size:9px;max-width:116px}.controlNote span{font-size:7px}.quest{padding:11px 12px;gap:9px}.quest p{font-size:9px}#inventory{width:54px;height:18px}.overlay .small{font-size:7px;letter-spacing:1.1px}.overlay h2{font-size:28px}.overlay p{font-size:10px}.primary{margin-top:15px}footer>span{display:none}footer{justify-content:center}.dialog{padding:9px}.dialog-content{padding:9px 11px;max-height:47%}.dialog #speech{font-size:11px;line-height:1.55;max-height:72px}#conversation{height:53%}}@media(max-width:380px){.controls{padding:12px 10px;gap:7px}#joystick{width:102px;height:102px}#knob{left:27px;top:27px}.joy-up,.joy-down{left:45px}.joy-left,.joy-right{top:43px}.action{width:65px;height:70px}#inventory{display:none}.quest p{font-size:9px}}@media(max-height:740px) and (max-width:550px){.heading{margin:12px 0}.heading p{display:none}h1{font-size:37px;margin:7px 0}.controls{padding:10px 14px}#joystick{width:94px;height:94px}#knob{left:23px;top:23px}.joy-up,.joy-down{left:41px}.joy-left,.joy-right{top:39px}.quest{padding:9px 12px}}

#conversation{image-rendering:auto}.dialog:not(.bedside){background:linear-gradient(#100a19f5,#1d1227f5)}

.action{transition:background-color .16s,border-color .16s}.action.ready{border-color:#f1d5a7;background:#65415d}.action small{font-size:7px;letter-spacing:0}.action:disabled{opacity:.5}.controls{user-select:none;-webkit-user-select:none}main{padding-bottom:max(22px,env(safe-area-inset-bottom))}#speech{overscroll-behavior:contain}.scene{isolation:isolate}
@media(max-width:550px){main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.scene{min-height:0}.hud button,#sound,footer button{min-height:36px}.dialog #next{min-height:36px;padding:6px 3px}.dialog-content{max-height:51%}.dialog #speech{font-size:12px;line-height:1.5}.action{min-height:72px}.heading{margin:13px 0}}
@media(orientation:landscape) and (max-height:550px){main{max-width:900px;padding:8px 16px}.heading,footer{display:none}header{margin-bottom:8px}header .brand span{display:none}.game{position:relative;max-width:800px;padding-right:162px}.scene{height:calc(100dvh - 152px);min-height:240px;aspect-ratio:auto}#world{object-fit:contain}.hud{padding:7px 12px}.quest{padding:7px 12px}.controls{position:absolute;right:0;top:0;bottom:0;width:162px;flex-direction:column;justify-content:center;padding:8px;gap:8px}.controlNote{font-size:0;text-align:center}.controlNote span{display:none}#dash{margin:0}.action{height:66px;width:86px}.dialog-content{min-height:110px}#map{overflow-y:auto;justify-content:flex-start}#map .small{display:none}#map h2{font-size:18px;margin:0}#rooms{grid-template-rows:32px 32px 32px 32px;gap:5px;margin:5px 0}#closeMap{margin-top:8px;padding:8px}}
#rooms{grid-template-rows:43px 43px 43px 38px}#rooms button:nth-child(7){grid-area:4/2}.dialog.memory:before{content:'ТИХОЕ ВОСПОМИНАНИЕ';position:absolute;top:8px;left:0;right:0;text-align:center;font-size:7px;letter-spacing:2px;color:#c0a8bd;z-index:2}.dialog.memory #conversation{opacity:.8}#world{image-rendering:auto}
