html,body{width:100%;height:100%;margin:0;overflow:hidden}
#game-tools-toggle{position:fixed;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));z-index:12;width:36px;height:36px;padding:0!important;margin:0!important;border:1px solid #ffffff50;border-radius:50%;background:#20252caa;color:#fff;font:22px/1 system-ui;cursor:pointer;touch-action:manipulation;opacity:.65}
#game-tools-toggle:hover,#game-tools-toggle:focus-visible{opacity:1}
#game-tools{position:fixed;z-index:11;top:50px;right:8px;width:min(420px,calc(100vw - 16px));max-height:calc(100dvh - 64px);overflow:auto;padding:14px;box-sizing:border-box;border-radius:12px;background:#20252cf5;color:#fff;font:14px/1.5 system-ui;box-shadow:0 6px 30px #0006;text-align:left}
#game-tools[hidden]{display:none!important}
#game-tools header,#game-tools footer,#game-tools #gamemenu,#game-tools #credits,#game-tools .touch-controls{position:static!important;inset:auto!important;width:auto!important;height:auto!important;background:transparent!important;color:inherit!important;display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 0!important;margin:0!important}
#game-tools header{display:block!important}#game-tools h1{margin:0;font-size:18px}#game-tools a{color:#cfebff}#game-tools button{background:#343b46;color:white;border:1px solid #ffffff50;padding:8px 10px;border-radius:5px;font:inherit;touch-action:manipulation}
#game-tools #gamemenu{display:block!important}#game-tools #gamemenu>ul{justify-content:flex-start}#game-tools #gamemenu ul ul{color:#111}#game-tools #gamemenu button{color:white}
#game-tools #status,#game-tools #save-status{flex-basis:100%}
body>.touch-controls{display:none!important}
body.touch-input>.touch-controls{position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;display:flex!important;justify-content:center;flex-wrap:wrap;gap:5px;z-index:6;padding:0 6px;pointer-events:none;background:transparent!important}
body.touch-input>.touch-controls button{pointer-events:auto;min-width:38px;min-height:38px;padding:7px 10px;margin:0;border:1px solid #ffffff60;border-radius:8px;background:#20252cc9;color:white;font:14px system-ui;touch-action:none}
#puzzlecanvascontain{left:8px!important;right:8px!important;top:8px!important;bottom:calc(var(--touch-controls-height,0px) + 34px)!important}
#statusbar{bottom:calc(var(--touch-controls-height,0px) + 12px)!important;left:8px!important;right:8px!important;pointer-events:none}
#game-ui-error{position:fixed;inset:0;z-index:30;display:grid;place-content:center;padding:32px;background:#151923f5;color:white;font:18px system-ui;text-align:center}
#save-error{z-index:30!important}#loading{z-index:20!important}

#game-tools [data-wrapper-copy]{display:none!important}body>#status,body>#save-status{display:none!important}
#loading:not([data-error]),#cover:not([data-error]){font-size:0!important;color:transparent!important}
#loading:not([data-error])::after,#cover:not([data-error])::after{content:"";display:block;width:28px;height:28px;border:3px solid #8885;border-top-color:#aaa;border-radius:50%;animation:game-loading 1s linear infinite}
@keyframes game-loading{to{transform:rotate(360deg)}}
