:root{--paper:#f8f5ed;--ink:#252d30;--muted:#6f7776;--line:#dedfd4;--accent:#db6446;--mint:#b7d9c8;--blue:#b6cbdc;--yellow:#f1d584;--danger:#b94240;--radius:22px;font-family:'Avenir Next','PingFang SC','Microsoft YaHei',sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a,input{touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}a{color:inherit}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible{outline:3px solid #337a9f;outline-offset:4px}.shell{max-width:1080px;margin:auto;padding:22px 28px 40px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid var(--line)}.brand{font-size:13px;font-weight:800;letter-spacing:.1em;text-decoration:none}.top-actions{display:flex;gap:7px}.quiet{border:1px solid var(--line);background:transparent;border-radius:30px;padding:8px 13px;font-size:12px;min-height:36px}.heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:24px 0 20px}.eyebrow{font-size:11px;letter-spacing:.2em;font-weight:800;color:var(--accent);margin:0 0 8px}.heading h1{font-size:32px;letter-spacing:-.04em;margin:0 0 7px;font-weight:850}.subtitle{font-size:13px;line-height:1.6;color:var(--muted);margin:0}.game-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(250px,.75fr);gap:22px;align-items:start}.stage{position:relative;overflow:hidden;border-radius:var(--radius);background:#e6ece4;border:1px solid #d4dbd0;padding:18px}.stage-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;margin-bottom:14px;font-weight:700}.stage-label{letter-spacing:.1em;font-size:10px;color:var(--muted)}.stats{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:16px}.stat{flex:1;min-width:76px;padding:12px 15px;border:1px solid var(--line);border-radius:15px;background:#fffdf7}.stat small{display:block;font-size:10px;color:var(--muted);margin-bottom:5px}.stat b{font-variant-numeric:tabular-nums;font-size:23px;font-weight:800}.panel{padding:19px;border:1px solid var(--line);border-radius:var(--radius);background:#fffdf7}.panel+.panel{margin-top:13px}.panel h2{font-size:15px;margin:0 0 14px}.panel p{font-size:13px;line-height:1.75;color:var(--muted);margin:8px 0}.btn{min-height:44px;border:1.5px solid var(--ink);border-radius:12px;padding:10px 17px;background:var(--ink);color:#fffdf7;font-weight:750;transition:transform .14s,background .14s}.btn:hover:not(:disabled){transform:translateY(-2px)}.btn.secondary{color:var(--ink);background:transparent;border-color:#c5cbc1}.btn.accent{background:var(--accent);border-color:var(--accent)}.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.row.spread{justify-content:space-between}.wide{width:100%}.feedback{padding:13px 15px;border-radius:12px;background:#edf1e7;min-height:65px;font-size:13px;line-height:1.6;margin:12px 0;white-space:pre-line}.feedback.bad{background:#f9e0d9;color:#8e352f}.feedback.good{background:#dceede;color:#2e644b}.grid{display:grid;gap:5px;aspect-ratio:1;width:100%;position:relative}.cell{position:relative;min-width:0;border:1px solid #d2dacc;border-radius:11px;background:#f8faf3;display:flex;align-items:center;justify-content:center;aspect-ratio:1;font-weight:800;font-size:20px;padding:2px;transition:background .15s,transform .16s}.cell svg{width:72%;height:72%;overflow:visible}.cell small{position:absolute;bottom:3px;right:5px;font-size:10px;line-height:1}.cell .tag{position:absolute;top:3px;left:4px;font-size:9px;font-weight:700}.cell.blocked{background:#b9c7b7;border-color:#b0bcaa;background-image:repeating-linear-gradient(45deg,transparent,transparent 5px,#acbba644 5px,#acbba644 7px)}.cell.selected{outline:3px solid var(--accent);outline-offset:-3px}.cell.preview{box-shadow:inset 0 0 0 3px #649d83}.cell.danger{background:#f1c9be}.cell.ghost{background:#d1e1ee}.cell.target{background:#ecd38e}.cell.shadow{background:#b7c6b4}.cell.hit{animation:pop .36s}.cell.path{background:#c7e5ce}.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin:14px 0 0}.legend span{display:flex;gap:5px;align-items:center}.dot{width:9px;height:9px;border-radius:3px;background:var(--mint)}.choices{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.choice{text-align:left;min-height:72px;border:1px solid #d5d9ce;border-radius:13px;background:#f9f8ef;padding:11px;transition:transform .15s,border-color .15s}.choice strong{font-size:14px;display:block}.choice small{display:block;font-size:11px;line-height:1.5;color:var(--muted);margin-top:5px}.choice.active{border:2px solid var(--accent);padding:10px;background:#fff0df}.choice:hover:not(:disabled){border-color:var(--accent)}.direction-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;max-width:260px;margin:12px auto}.direction-pad .up{grid-column:2}.direction-pad .left{grid-column:1}.direction-pad button{min-height:48px;background:#f3f4eb;border:1px solid #c8cfc2;border-radius:11px;font-size:20px;font-weight:800}.direction-pad button.active{background:#f4d485;border-color:#ba9444}.direction-pad button small{display:block;font-size:10px;color:var(--muted)}details{font-size:12px;color:var(--muted);margin-top:18px;line-height:1.8}summary{cursor:pointer;font-weight:750}details p{margin:8px 0}.footer-note{font-size:10px;letter-spacing:.08em;color:var(--muted);margin-top:24px;text-align:center}.level-tabs{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:13px}.level-tabs button{border:1px solid var(--line);border-radius:99px;background:transparent;padding:7px 12px;font-size:11px}.level-tabs button.active{color:white;background:var(--ink);border-color:var(--ink)}.badge{display:inline-flex;border-radius:99px;padding:5px 9px;font-size:10px;background:#e9eedf;color:#486444;font-weight:700}.result{padding:18px;border:1px solid #d4ae58;background:#fff0c9;border-radius:16px;margin:12px 0}.result h2{margin:0 0 8px;font-size:22px}.result p{font-size:13px;line-height:1.6;margin:0 0 12px}.result:empty{display:none}.toast-particles{position:fixed;inset:0;pointer-events:none;z-index:20;overflow:hidden}.particle{position:absolute;width:8px;height:13px;animation:fall 1.1s ease-in forwards}.snake-head{background:#e9b849!important;border:2px solid #86661e!important}.snake-body{background:#8ab9a1!important;border-color:#5b8f78!important}.snake-blade{background:#729b8b!important;color:white}.enemy{background:#e6b5a7!important}.preview-line{color:#486e5b}.board-wrap{position:relative}.floating-label{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:var(--ink);color:white;padding:12px 20px;border-radius:12px;font-size:21px;pointer-events:none;white-space:nowrap;box-shadow:0 8px 30px #0002}.hidden{display:none!important}@keyframes pop{50%{transform:scale(1.12);filter:brightness(1.2)}}@keyframes fall{to{transform:translate(var(--dx),65vh) rotate(340deg);opacity:0}}@media(max-width:720px){.shell{padding:14px 14px 30px}.heading{margin:18px 0 16px}.heading h1{font-size:27px}.game-layout{grid-template-columns:1fr;gap:14px}.stage{padding:12px}.panel{padding:15px}.stats{margin-bottom:12px}.stat{padding:9px 12px}.stat b{font-size:21px}.cell{border-radius:8px}.topbar{padding-bottom:13px}.top-actions .quiet{padding:7px 9px}.heading>.badge{display:none}.direction-pad{max-width:250px}.footer-note{margin-top:20px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}body.still *,body.still *::before,body.still *::after{animation:none!important;transition:none!important}
.stat b{white-space:nowrap;font-size:clamp(18px,2.1vw,23px)}
@media(max-width:720px){body[data-game="snake"] .direction-pad,body[data-game="dice"] .direction-pad{grid-template-columns:repeat(4,1fr);max-width:none;margin:8px 0}body[data-game="snake"] .direction-pad .up,body[data-game="snake"] .direction-pad .left,body[data-game="dice"] .direction-pad .up,body[data-game="dice"] .direction-pad .left{grid-column:auto}body[data-game="snake"] .panel h2,body[data-game="dice"] .panel h2{margin-bottom:7px}body[data-game="snake"] .feedback,body[data-game="dice"] .feedback{min-height:46px;margin:8px 0;padding:9px 12px}.stat b{font-size:21px}}
@media(max-width:720px){body[data-game="snake"] .heading,body[data-game="dice"] .heading{margin:12px 0}body[data-game="snake"] .eyebrow,body[data-game="dice"] .eyebrow{display:none}body[data-game="snake"] .heading h1,body[data-game="dice"] .heading h1{font-size:24px}body[data-game="snake"] .grid,body[data-game="dice"] .grid{max-width:260px;margin:auto}body[data-game="snake"] .stage,body[data-game="dice"] .stage{padding:10px}body[data-game="snake"] .stage-head,body[data-game="dice"] .stage-head{margin-bottom:9px}body[data-game="snake"] .legend,body[data-game="dice"] .legend{margin-top:9px}body[data-game="snake"] .panel h2,body[data-game="dice"] .panel h2{display:none}body[data-game="snake"] .panel p,body[data-game="dice"] .panel p{margin:0 0 5px;font-size:11px}body[data-game="snake"] .panel,body[data-game="dice"] .panel{padding:12px}body[data-game="snake"] .stat,body[data-game="dice"] .stat{padding:8px 12px}}
