/*
[INPUT]: index.html 的语义类名与原商店截图的奶油色、金黄、木色视觉参考。
[OUTPUT]: 自适应竖屏游戏外观及键盘焦点、对话框布局。
[POS]: 独立视觉层，不承载玩法和关卡状态。
[PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
*/
:root{font-family:ui-rounded,"Arial Rounded MT Bold","PingFang SC",system-ui,sans-serif;color:#875526;background:#efe3cc;font-synthesis:none;--cream:#fff1cf;--wood:#b77932;--ink:#8a5324;--yellow:#ffd752}*{box-sizing:border-box}body{margin:0;min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at 30% 20%,#fff7e4,transparent 65%),#eee1c7}button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #4b8cd4;outline-offset:4px}button:disabled{opacity:.45;cursor:default}button{color:inherit}button svg{width:26px;height:26px;fill:currentColor}button:active:not(:disabled){transform:translateY(2px)}.symbols{display:none}.game-shell{width:min(100%,520px);height:min(940px,100dvh);min-height:540px;background:var(--cream);position:relative;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 16px 90px #73511b26}.topbar{height:102px;padding:22px 24px 20px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(#ffe663,#ffcc46);border-bottom:4px solid #f4bb56;box-shadow:0 3px 0 #fff8e4;flex:none}.wood-button{width:49px;height:49px;border:1.5px solid #fff3c7;border-bottom:3px solid #875126;border-radius:14px;background:linear-gradient(#c68b3d,#ac6d2b);color:#fff0c4;display:grid;place-items:center}.level-pill{height:58px;display:flex;align-items:center;gap:18px;padding:5px 6px 5px 20px;background:#b7762d;border-radius:40px;color:#fff0c9;box-shadow:inset 0 2px 2px #915a24;font-weight:850;letter-spacing:1px}.level-pill span{font-size:16px;text-shadow:0 2px #8b5122}.level-pill strong{display:grid;place-items:center;min-width:112px;height:46px;padding:0 15px;border-radius:30px;background:#fff1cb;border:1px solid #fff9e9;color:#b3702b;font-size:30px;letter-spacing:2px}.game-meta{display:flex;justify-content:space-between;padding:22px 28px 10px;font-size:12px;font-weight:650;letter-spacing:.04em;color:#a78454}.progress-track{height:5px;margin:0 28px;border-radius:6px;background:#eedcb6;overflow:hidden;flex:none}.progress-track div{height:100%;width:0;background:#e9b438;transition:width .4s ease;border-radius:6px}.board-wrap{position:relative;flex:1;min-height:220px}#board{width:100%;height:100%;display:block;touch-action:none;user-select:none;cursor:grab}#board:active{cursor:grabbing}#tutorial{position:absolute;bottom:10px;left:0;right:0;display:flex;align-items:center;flex-direction:column;gap:7px;pointer-events:none;color:#9e793f;transition:opacity .3s}#tutorial .gesture{font-family:Georgia,serif;font-size:32px;line-height:28px;color:#c5994e}#tutorial strong{font-size:14px}#tutorial span:last-child{font-size:11px;color:#b39a75}#tutorial.gone{opacity:0}#toast{position:absolute;top:14px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;background:#8c6026e8;color:#fff5dc;padding:10px 17px;border-radius:22px;font-size:12px;opacity:0;transition:opacity .2s;pointer-events:none;z-index:5}#toast.show{opacity:1}.toolbar{display:flex;gap:42px;justify-content:center;padding:24px 20px 17px;flex:none}.tool{border:0;background:none;padding:0;display:flex;align-items:center;flex-direction:column;gap:9px;font-size:12px;font-weight:700;color:#9b713b}.tool span{width:68px;height:66px;display:grid;place-items:center;border-radius:22px;background:linear-gradient(#fff3b0,#ffda64);border:2px solid #b9762b;border-bottom-width:4px;box-shadow:inset 0 2px 0 white,0 2px 0 #e7cba0;color:#b87a2e}.tool svg{width:29px;height:29px}.tool .hint-icon{color:#e1a520}.bottom-note{display:flex;align-items:center;justify-content:center;gap:9px;font-size:9px;letter-spacing:1px;color:#bfac89;padding:9px 12px 19px;flex:none}.bottom-note i{height:3px;width:3px;background:#cbb690;border-radius:50%}#selection-controls{align-items:center;justify-content:center;gap:10px;font-size:11px;position:absolute;bottom:137px;left:0;right:0;pointer-events:none}#selection-controls:not([hidden]){display:flex}#selection-controls span{background:#fff5dfcc;padding:6px 8px;border-radius:12px}#selection-controls button{pointer-events:auto;width:35px;height:32px;border:1px solid #e2c895;background:#fff9e7;border-radius:12px;font-size:22px}dialog{border:0;border-radius:25px;padding:25px;max-width:460px;width:calc(100% - 34px);background:#fff5db;color:var(--ink);box-shadow:0 20px 100px #49301a33}dialog::backdrop{background:#66432066;backdrop-filter:blur(5px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.dialog-heading h2{font-size:21px;margin:0}.dialog-heading>button{border:0;background:#efdfbf;border-radius:50%;width:31px;height:31px;font-size:22px}.tabs{display:flex;background:#ead9b6;border-radius:12px;padding:4px;margin-bottom:16px}.tabs button{flex:1;border:0;border-radius:9px;padding:9px;background:transparent;font-size:13px}.tabs button.active{background:#fff9e8;box-shadow:0 2px 5px #5d3c1d11}.search-label input{width:100%;border:1px solid #e7d4ac;background:#fffaf0;padding:10px 14px;border-radius:12px;margin-bottom:16px;font-size:13px;color:var(--ink)}#level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;max-height:45dvh;overflow:auto;padding:3px}#level-grid button{border:1px solid #e7d5b3;background:#fffaf0;border-radius:12px;min-height:46px;font-size:13px;position:relative}#level-grid button.current{background:#ffdd6c;border-color:#d5a340}#level-grid button.completed::after{content:'✓';position:absolute;right:4px;top:0;color:#5a9d63;font-size:10px}.dialog-note{font-size:10px;text-align:center;color:#ae9470;margin:17px 0 0}.setting-row{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:12px 0;border-bottom:1px solid #e8d7b7}.setting-row input{accent-color:#c18a35;width:20px;height:20px}.how-to h3{font-size:15px;margin-top:25px}.how-to p{font-size:13px;line-height:1.8;color:#a18052}.primary{width:100%;border:1px solid #b4772a;border-bottom:4px solid #a76a24;background:linear-gradient(#ffe574,#ffcc41);padding:14px 22px;border-radius:16px;font-size:16px;font-weight:750;display:flex;align-items:center;justify-content:center;gap:14px;margin-top:22px}.primary svg{width:19px;height:19px}.text-button{display:block;margin:16px auto 0;border:0;background:none;font-size:12px;color:#b18c5a}#result-dialog{text-align:center;padding:35px}.result-mark{margin:0 auto 20px;display:grid;place-items:center;width:84px;height:84px;border:5px solid #fff9e5;outline:2px solid #eab644;border-radius:50%;background:linear-gradient(#ffe97c,#ffc934);color:#a36e23;font-size:47px;box-shadow:0 6px 14px #c7953b25}.eyebrow{font-size:10px;letter-spacing:2px;color:#bf9a52}#result-title{font-size:24px;margin:12px 0}#result-detail{color:#a38657;font-size:13px}#result-dialog.failed .result-mark{background:#ffb37a}@media(min-width:650px){.game-shell{border-radius:28px;border:1px solid #f6ecd5;height:min(900px,94dvh)}body{padding:3dvh 0}}@media(max-height:700px){.topbar{height:82px;padding:14px 22px}.game-meta{padding-top:16px}.toolbar{padding-top:16px;padding-bottom:10px;gap:36px}.tool span{width:58px;height:56px}.bottom-note{padding-bottom:12px}#tutorial{bottom:0}#selection-controls{bottom:117px}.level-pill{height:50px}.level-pill strong{height:39px;font-size:26px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
