:root{font:16px/1.4 ui-rounded,"Avenir Next",system-ui,sans-serif;color:#482b50;background:#f9e8f1;color-scheme:light}
*{box-sizing:border-box}body{margin:0;overscroll-behavior:none}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;font-weight:750;color:#482b50;background:#fff3f9;border:2px solid #d596b6;border-radius:13px;min-height:40px;padding:7px 15px;cursor:pointer}button:hover{background:#ffe0ef}button:focus-visible,a:focus-visible{outline:3px solid #693e96;outline-offset:3px}button:disabled{opacity:.5;cursor:default}button:active,button.pressed{background:#dca4d5;transform:translateY(1px)}
#game{height:100dvh;display:flex;flex-direction:column;background:#f9e8f1;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}header{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px;background:linear-gradient(100deg,#f6b8d2,#ddd0f4)}header strong{font-size:20px}header strong span{font-size:14px;font-weight:500;margin-left:12px}nav{display:flex;gap:8px}nav button{font-size:14px}
#stage{position:relative;flex:1;min-height:0;background:#161125;overflow:hidden}canvas{width:100%;height:100%;display:block;outline:none;touch-action:none}#loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(ellipse at 50% 30%,#fbe5f0,#dacdf1);padding:24px;gap:12px}#loading img{max-width:min(70vw,440px);height:auto;max-height:32vh;object-fit:contain}#loading p{margin:0}#status{font-size:20px;font-weight:750}#detail{font-size:14px;max-width:36em}#start{background:#a15482;border-color:#8e426e;color:white;min-width:210px;min-height:52px;margin-top:8px}progress{width:min(320px,75vw);accent-color:#ab5595;height:12px}#touch{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px;background:#f8e5f0;touch-action:none;user-select:none}.directions,.actions{display:flex;gap:8px}#touch button{min-width:52px;min-height:46px}#touch .jump{background:#e8bbef;min-width:88px}footer{display:flex;justify-content:space-between;gap:12px;padding:3px 18px 6px;font-size:12px}footer a{color:#633b73}dialog{border:2px solid #d596b6;border-radius:22px;padding:24px;max-width:min(500px,92vw);background:#fff6fb;color:#482b50}dialog::backdrop{background:#25152abb}dialog h1{font-size:24px;margin-top:0}dl{display:grid;grid-template-columns:1fr 1fr;gap:8px}dt{font-weight:700}dd{margin:0}#close-help{display:block;margin-left:auto}[hidden]{display:none!important}
@media(max-width:800px){header{padding:6px 10px;min-height:48px}header strong{font-size:16px}header strong span{display:none}nav button{padding:5px 10px;min-height:36px;font-size:13px}#touch{padding:6px 8px;gap:8px}.directions,.actions{gap:5px}#touch button{min-width:42px;min-height:48px;padding:6px 8px;font-size:14px}#touch .jump{min-width:62px}footer{padding:3px 10px;font-size:12px}}
@media(max-width:520px){header{flex-wrap:wrap;justify-content:center;gap:5px}header strong{display:none}#touch{flex-wrap:wrap;justify-content:center}#touch button{min-width:48px}footer{font-size:11px}#save-status{max-width:65%}}
@media(max-height:480px){header{min-height:40px;padding:3px 8px}header strong span{display:none}nav button{min-height:32px}#touch{padding:3px 8px}#touch button{min-height:38px}footer{display:none}#loading img{max-height:27vh}#status{font-size:16px}#detail{font-size:12px}#start{min-height:40px;margin:0}}
