:root{font-family:PingFang SC,Microsoft YaHei,Noto Sans CJK SC,system-ui,sans-serif;color:#292620;background:#f6eedc;--ink:#292620;--paper:#fffaeb;--muted:#685443;--line:#d8c7a9;--pink:#d99595;--gold:#efbc67;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:0;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='93' height='87' viewBox='0 0 93 87'%3E%3Cpath fill='%23795d38' fill-opacity='.13' d='M8 9h1v1H8zm29 18h1v1h-1zm17-23h1v1h-1zm24 20h1v1h-1zM18 50h1v1h-1zm52 19h1v1h-1zM6 81h1v1H6zm39-12h1v1h-1zm45 13h1v1h-1zM85 50h1v1h-1zm-53 9h1v1h-1z'/%3E%3C/svg%3E")}button{color:inherit;font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,[tabindex="0"]:focus-visible{outline:3px solid #855135;outline-offset:3px}button,a{-webkit-tap-highlight-color:transparent}.site{max-width:1240px;margin:auto;padding:0 clamp(14px,4vw,55px) max(16px,env(safe-area-inset-bottom))}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:77px;border-bottom:1px solid var(--line)}.brand{display:flex;gap:10px;align-items:center;color:var(--ink);text-decoration:none;font-size:20px;font-weight:900;line-height:1.05;white-space:nowrap}.brand img{width:43px;height:43px;rotate:-7deg}.brand b{display:block;margin-top:5px;font:800 10px/1 ui-monospace,monospace;letter-spacing:.19em}.top-actions{display:flex;align-items:center;gap:9px}.outline-btn,.icon-btn,.primary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1.5px solid var(--ink);border-radius:8px;padding:0 12px;background:var(--paper);font-size:13px;font-weight:750;white-space:nowrap}.icon-btn{width:44px;padding:0}.primary{background:var(--gold);box-shadow:2px 3px 0 var(--ink)}.layout{display:grid;grid-template-columns:minmax(142px,1fr) minmax(370px,505px) minmax(142px,.8fr);gap:clamp(20px,4vw,66px);align-items:start;padding:39px 0 0}.intro{padding-top:50px;min-width:0}.eyebrow{display:flex;gap:8px;align-items:center;font-size:12px;font-weight:850;letter-spacing:.17em;color:var(--muted);margin-bottom:15px}.eyebrow span{width:9px;height:9px;rotate:45deg;background:var(--pink);border:1px solid var(--ink)}.intro-title{font-size:clamp(58px,7.6vw,106px);line-height:.99;font-weight:950;letter-spacing:-.11em;margin-left:-.09em;white-space:nowrap}.intro-title span{position:relative;isolation:isolate}.intro-title span:after{content:"";position:absolute;z-index:-1;left:5%;right:-6%;bottom:8%;height:33%;background:var(--pink);rotate:-6deg;border-radius:4px 6px 3px 8px}.intro-quote{color:var(--muted);line-height:1.75;font-size:clamp(13px,1.45vw,17px);font-weight:650;margin:25px 0 8px}.intro-cat{width:min(180px,100%);height:auto;rotate:-5deg}.level-head{display:flex;justify-content:space-between;align-items:end;gap:8px;margin:0 0 13px}.level-number{margin:0 0 5px;font-size:12px;font-weight:800;letter-spacing:.13em;color:#795232}h1{font-size:clamp(24px,4vw,37px);line-height:1.13;letter-spacing:.01em;margin:0;font-weight:900}.counter{display:flex;align-items:center;gap:5px;white-space:nowrap;background:#ead9ba;border:1px solid #ceb58e;border-radius:20px;padding:5px 9px;color:#503a2a;font-size:12px}.counter svg{width:16px;height:16px}.game-paper{position:relative;background:var(--paper);border:1.5px solid var(--ink);border-radius:15px 13px 12px 14px;box-shadow:4px 5px #ddc9a5;padding:clamp(11px,2.5vw,23px)}.box-frame{position:relative;padding:clamp(8px,2vw,16px) clamp(8px,2vw,16px) 0;background:#c99459;border:2px solid var(--ink);border-radius:8px 10px 8px 6px;box-shadow:2px 4px #5a3c28;overflow:visible}.box-art{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;pointer-events:none}.box-tape{position:absolute;z-index:4;pointer-events:none;width:64px;height:16px;top:-7px;left:50%;transform:translate(-50%) rotate(-4deg);background:#e9c793;opacity:.89;clip-path:polygon(3% 6%,99% 0,95% 24%,100% 39%,97% 64%,100% 95%,0 100%,3% 65%,0 42%,5% 21%)}.board{position:relative;max-width:min(100%,calc(var(--cols) / var(--rows) * 345px));margin-inline:auto;aspect-ratio:var(--cols)/var(--rows);background:#b77d49;outline:1.5px solid #634028;box-shadow:0 0 0 2px #b37a45;isolation:isolate}.grid{display:grid;position:absolute;inset:0;grid-template-columns:repeat(var(--cols),1fr);grid-template-rows:repeat(var(--rows),1fr)}.cell{min-width:0;min-height:0;border:0;border-right:1px dashed #9f714e;border-bottom:1px dashed #9f714e;background:#ebc18c;padding:0}.cell:nth-child(2n){background:#e9bd86}.cell:hover{background:#f1cc97}.cell.blocked{background:repeating-linear-gradient(135deg,#c89161 0 5px,#dda774 5px 10px)}.cell svg{display:block;width:77%;height:77%;margin:auto}.box-bottom{position:relative;display:flex;align-items:center;justify-content:space-between;height:29px;padding:0 3px;color:#573b28;font-size:10px;font-weight:850;letter-spacing:.17em}.box-bottom span:first-child{font-size:15px;letter-spacing:.02em}.status{font-size:13px;color:#634731;min-height:34px;margin:0;padding:9px 1px 5px;line-height:1.4}.tray{background:#f2e5c9;border:1px dashed #ba9a72;border-radius:9px;padding:8px 9px 9px}.tray-head{display:flex;align-items:center;justify-content:space-between;padding:0 2px 6px}.tray-head h2{font-size:13px;margin:0;font-weight:850}.tray-head span{font-size:11px;color:var(--muted)}.tray-pieces{--tray-unit:clamp(25px,7vw,34px);display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px 9px;min-height:54px}.cat-piece{padding:0;border:0;background:none;display:block;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}.cat-piece.in-tray{position:relative;width:calc(var(--w)*var(--tray-unit));height:calc(var(--h)*var(--tray-unit));min-width:44px;min-height:44px}.cat-piece.in-board,.hint-cell,.preview-cell,.cursor{position:absolute;left:calc(var(--x)*100%/var(--cols));top:calc(var(--y)*100%/var(--rows));width:calc(var(--w,1)*100%/var(--cols));height:calc(var(--h,1)*100%/var(--rows))}.cat-piece.in-board{pointer-events:none;z-index:2}.cat-piece.in-board:not(:disabled) .hit-cell{pointer-events:auto}.cat-piece.chosen{z-index:3}.cat-piece.chosen .cat-art{filter:drop-shadow(0 0 1.2px #292620)}.cat-piece.pickup .cat-visual{opacity:.27}.hit-cell{position:absolute;display:block}.cat-visual,.cat-art{display:block;width:100%;height:100%;pointer-events:none}.in-tray .cat-visual{position:absolute;inset:0}.drag-float{position:fixed;z-index:20;left:0;top:0;transform:translate3d(var(--gx,-999px),var(--gy,-999px),0);width:var(--gw,0);height:var(--gh,0);pointer-events:none;opacity:.8}.drag-float[hidden]{display:none}.preview{position:absolute;inset:0;z-index:5;pointer-events:none}.preview-cell,.hint-cell{display:grid;place-items:center;border:2px dashed #255633;background:#d4f2bc99;color:#22492b;font-weight:900}.preview-cell[hidden]{display:none}.preview[data-valid=false] .preview-cell{border-color:#852f28;background:#ffd2c899;color:#852f28}.hint-cell{border-color:#6c4676;background:#f6e1ff7a;color:#5c3865;pointer-events:none;z-index:1}.board-keys{position:absolute;inset:0;pointer-events:none}.board-keys:focus-visible{z-index:6}.cursor{display:none;border:2px dotted #292620;place-items:center}.cursor:after{content:"";width:7px;height:7px;border:2px solid #292620;background:#fff9eb;border-radius:50%}.board-keys:focus-visible .cursor{display:grid}.toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:9px}.tool,.return-btn{min-height:44px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 3px;border:1px solid #917656;border-radius:7px;background:#fff7e7;font-size:12px;font-weight:800}.tool:disabled{opacity:.49}.tool-hint:not(:disabled){background:#f3d799;border-color:#a37b44}.tool svg,.return-btn svg{width:17px;height:17px;flex:none}.return-btn{margin-top:7px;width:100%;background:#efddc0}.win{text-align:center;background:#f7e4d4;border:1px dashed #b88373;border-radius:8px;padding:8px 6px 10px}.win strong{display:block;margin-bottom:6px;font-size:18px}.win div,.dialog-actions{display:flex;justify-content:center;gap:8px}.help-note{position:relative;margin-top:170px;justify-self:start;background:#f2dfa9;border:1.5px solid #806444;box-shadow:3px 4px #dcc597;rotate:4deg;padding:19px 14px 6px;width:min(100%,166px);border-radius:4px 2px 7px 3px}.help-note>svg{color:#805530}.help-note h2{font-size:18px;margin:4px 0 3px}.help-note p{font-size:13px;line-height:1.65;color:#604730;margin:0}.help-note button,footer button{display:inline-flex;align-items:center;gap:5px;min-height:44px;border:0;background:none;padding:0;font-size:12px;font-weight:750}.help-note button svg,footer svg{width:15px;height:15px}.note-tape{position:absolute;top:-8px;left:30%;width:45%;height:15px;background:#e6af80;opacity:.76;rotate:-10deg;clip-path:polygon(1% 4%,99% 1%,95% 31%,100% 52%,97% 100%,0 99%,5% 67%)}footer{color:#685443;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:24px 0 0;border-top:1px solid var(--line);font:700 10px/1.4 ui-monospace,monospace;letter-spacing:.06em}footer button{font-family:inherit}dialog{border:2px solid var(--ink);border-radius:12px;background:var(--paper);color:var(--ink);width:min(92vw,450px);padding:0;box-shadow:4px 5px #744a30;max-height:85dvh}dialog::backdrop{background:#38291e70}.dialog-content{padding:16px}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.dialog-head h2{margin:0;font-size:22px}.level-picker{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.level-picker button{min-height:50px;border:1px solid #9c815d;background:#f4dfb7;border-radius:6px;font-size:10px;display:grid;place-content:center;justify-items:center}.level-picker button strong{font-size:16px}.level-picker button svg{width:13px;height:13px}.level-picker button:disabled{background:#eee5d4;color:#685f51}.level-picker button[aria-current]{border:2px solid var(--ink);background:#efbd72}.instructions{padding-left:1.3em;line-height:1.7}.instructions li+li{margin-top:7px}@keyframes land{0%{transform:translateY(-3px) scale(.97)}65%{transform:scale(1.025,.96)}to{transform:none}}@keyframes bad{25%,75%{transform:translate(-2px)}50%{transform:translate(2px)}}@keyframes bump{30%{transform:rotate(-.8deg) scale(1.011)}65%{transform:rotate(.6deg)}to{transform:none}}.mood-land{animation:land .24s ease-out}.mood-bad{animation:bad .23s ease}.celebrate{animation:bump .48s ease-out}@media(hover:hover){button:not(:disabled):is(.tool,.outline-btn,.icon-btn,.primary,.return-btn):hover{background:#efc580}}@media(max-width:920px){.layout{grid-template-columns:minmax(130px,180px) minmax(0,505px);justify-content:center;gap:27px}.help-note{display:none}}@media(max-width:640px){.site{max-width:505px;padding-inline:12px}.topbar{min-height:59px}.brand{font-size:17px;gap:6px}.brand img{width:35px;height:35px}.brand b{font-size:9px;margin-top:3px}.top-actions{gap:6px}.top-actions .outline-btn{padding-inline:8px}.top-actions .outline-btn svg{width:17px}.layout{display:block;padding-top:12px}.intro{display:none}.level-head{margin-bottom:8px}.level-number{margin-bottom:3px}.game-paper{box-shadow:3px 4px #ddc9a5}footer{margin-top:15px}}@media(prefers-reduced-motion:reduce){.mood-land,.mood-bad,.celebrate{animation:none}}
