:root{font-family:"PingFang SC","Microsoft YaHei",sans-serif;color:#563a29;background:#fff4db;font-synthesis:none;-webkit-tap-highlight-color:transparent}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:radial-gradient(circle at 8% 26%,#ffdf8a60 0,transparent 35%),radial-gradient(circle at 95% 78%,#ffc7ab40 0,transparent 40%),#fff4db}button{font:inherit;cursor:pointer;border:0;touch-action:manipulation;color:inherit}button:focus-visible{outline:3px solid #c56826;outline-offset:3px}button:disabled{cursor:default;opacity:.42}button:active:not(:disabled){transform:translateY(2px)}.game{width:min(100%,456px);margin:auto;padding:calc(20px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));position:relative}header{display:flex;align-items:center;justify-content:space-between;padding:0 5px 23px}h1{font-size:30px;letter-spacing:-1px;margin:0;font-weight:950;transform:rotate(-3deg);position:relative}h1 span{color:#ed763b}h1 i{font-size:21px;color:#f4b426;position:absolute;top:-10px;right:-22px;font-style:normal}.icon-button{width:42px;height:42px;border-radius:50%;background:#fffaf0;border:1.5px solid #ecd6ae;display:grid;place-items:center}.icon-button svg{width:20px;fill:none;stroke:#76543c;stroke-width:3;stroke-linecap:round}.dashboard{padding:0 7px 22px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.level{font-size:15px;font-weight:700}.level b{font-size:19px;margin:0 3px}.score{justify-self:end;font-size:12px;color:#967c60;display:flex;align-items:baseline;gap:8px}.score strong{font-size:22px;color:#67442e;font-variant-numeric:tabular-nums}.timer{grid-column:1/-1;display:flex;align-items:center;gap:7px;margin-top:0}.timer svg{width:20px;height:20px;fill:none;stroke:#c4894c;stroke-width:1.8;stroke-linecap:round}.timer b{font-size:22px;font-variant-numeric:tabular-nums;letter-spacing:1px}.timer span{margin-left:auto;font-size:13px;color:#9d8060;font-weight:600}.time-track{grid-column:1/-1;height:8px;border-radius:10px;background:#eddfc6;margin-top:-9px;overflow:hidden}.time-track div{height:100%;width:100%;background:#f2ae44;border-radius:10px;transition:width .2s linear}.time-track.low div{background:#ec745b}.board-shell{position:relative;padding:19px;border-radius:24px;background:#cce7df;border:2px solid #b6d5cb;box-shadow:0 5px 0 #abc7b6,0 11px 25px #9d7c2a0b}.board-shell:before{content:"";position:absolute;inset:7px;border:1px solid #ffffff60;border-radius:17px;pointer-events:none}#board{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.tile{min-width:0;aspect-ratio:1;position:relative;border-radius:10px;background:#fffdf7;box-shadow:0 3px 0 #9ebdaf;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 1px;gap:1px;transition:transform .12s,opacity .15s,box-shadow .12s;user-select:none;-webkit-user-select:none}.tile svg{width:63%;height:63%;overflow:visible;fill:var(--fill);stroke:var(--ink);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.tile span{font-size:10px;font-weight:650;color:var(--ink);line-height:1.2}.tile.selected{background:#fff3b2;box-shadow:0 0 0 2.5px #ed9d30,0 3px 0 #d89b40;transform:translateY(-2px)}.tile.hint{animation:hint .7s ease-in-out infinite alternate}.tile.removing{transform:scale(.5);opacity:0}.tile.empty{visibility:hidden;pointer-events:none;box-shadow:none}.tile.wrong{animation:shake .22s}.tools{display:flex;justify-content:center;gap:45px;margin:30px auto 0}.tools>button{background:transparent;display:flex;flex-direction:column;align-items:center;gap:10px;font-size:13px;font-weight:700;padding:0}.tool-icon{display:grid;place-items:center;width:58px;height:53px;border-radius:17px;position:relative;border:1.5px solid #ffffffa0}.tool-icon svg{width:29px;height:29px;fill:none;stroke:#77512a;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}.yellow{background:#ffdc78;box-shadow:0 4px 0 #dfb95a}.green{background:#bee4c6;box-shadow:0 4px 0 #95bb9d}.pink{background:#ffc6ae;box-shadow:0 4px 0 #dca089}.tool-icon small{position:absolute;right:-6px;top:-6px;background:#fffdf8;min-width:21px;height:21px;border:1.5px solid #dfcaaa;border-radius:50%;font-size:11px;display:grid;place-items:center}#lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}#route{fill:none;stroke:#fb9a28;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 3px #fff)}#combo{position:absolute;top:43%;left:0;width:100%;text-align:center;font-size:25px;font-weight:900;color:#db6d2d;text-shadow:0 2px #fff6df;pointer-events:none;opacity:0}#combo.pop{animation:combo .7s both}#toast{position:fixed;z-index:5;bottom:max(30px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#67472fe8;color:white;font-size:13px;border-radius:24px;padding:10px 18px;pointer-events:none;opacity:0;transition:opacity .2s;white-space:nowrap}#toast.show{opacity:1}.overlay{position:fixed;inset:0;background:#44332366;backdrop-filter:blur(7px);z-index:10;display:grid;place-items:center;padding:24px}.overlay[hidden]{display:none}.modal{width:min(100%,310px);padding:30px 26px 24px;text-align:center;background:#fff8e8;border-radius:26px;box-shadow:0 8px 0 #b4966f55}.modal-symbol{margin:auto;color:#ed9f37;background:#ffebac;width:64px;height:64px;display:grid;place-items:center;border-radius:21px;font-size:32px;font-weight:900}.modal h2{font-size:24px;margin:21px 0 25px}.modal p{font-size:15px;color:#947350;margin:-12px 0 26px}.modal button{width:100%;border-radius:14px;font-weight:750;padding:14px}.primary{background:#f4ad44;box-shadow:0 3px 0 #cf8f31}.secondary{margin-top:12px;background:transparent;color:#98795d}.board-shell.paused #board{visibility:hidden}@keyframes hint{to{background:#fff0a3;box-shadow:0 0 0 3px #e4a236}}@keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}@keyframes combo{0%{opacity:0;transform:translateY(12px) scale(.8)}25%{opacity:1;transform:translateY(0) scale(1)}75%{opacity:1}100%{opacity:0;transform:translateY(-18px)}}@media(min-width:600px){.game{padding-top:38px}}@media(max-width:360px){.game{padding-left:12px;padding-right:12px}.board-shell{padding:16px}#board{gap:5px}.tools{gap:38px;margin-top:26px}header{padding-bottom:17px}.dashboard{padding-bottom:17px}}@media(max-height:740px) and (min-width:361px){.game{padding-top:12px}header{padding-bottom:12px}.dashboard{padding-bottom:14px;gap:11px}.tools{margin-top:22px}}@media(prefers-reduced-motion:reduce){*,*:before{animation-duration:.01ms!important;transition:none!important}}
#lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}#route{fill:none;stroke:#e99228;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 3px #fff8dc)}#combo{position:absolute;left:0;right:0;top:42%;text-align:center;pointer-events:none;font-weight:900;font-size:32px;color:#ee873b;text-shadow:0 2px white,2px 0 white,-2px 0 white,0 -2px white;opacity:0}#combo.pop{animation:combo .75s both}.tools button{padding:0;background:transparent;display:flex;flex-direction:column;align-items:center;gap:12px;font-weight:700;font-size:13px;min-width:70px}.tool-icon{position:relative;display:grid;place-items:center;width:62px;height:58px;border-radius:18px;border:1.5px solid #e3c57d;box-shadow:0 4px 0 #d9bd7c}.tool-icon svg{width:28px;height:28px;fill:none;stroke:#997133;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.tool-icon small{position:absolute;right:-5px;top:-6px;background:#fffdf4;border:1.5px solid #e9d4aa;border-radius:50%;height:23px;width:23px;display:grid;place-items:center;font-size:12px;color:#967146}.yellow{background:#ffdf88}.green{background:#d4e6ca;border-color:#b7cfac;box-shadow:0 4px 0 #aabf9e}.green svg{stroke:#65835b}.pink{background:#f7d6c7;border-color:#dfb6a6;box-shadow:0 4px 0 #d4ad9c}.pink svg{stroke:#bd8062}#toast{position:fixed;bottom:calc(34px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#65472be8;color:#fff7e7;padding:11px 20px;border-radius:24px;font-size:13px;pointer-events:none;opacity:0;white-space:nowrap;z-index:11;transition:opacity .15s}#toast.show{opacity:1}

@media (min-width: 600px) {
  .game-viewport { height: 100vh; height: 100dvh; overflow: hidden; }
  .game { width: 456px; transform: scale(var(--game-scale, 1)); transform-origin: top center; }
  .modal { max-height: calc(100dvh - 48px); overflow: auto; }
}
