:root{color-scheme:light;--paper:#f8f5ec;--ink:#49553e;--muted:#5b6b50;--line:#dbe0cf;--accent:#796241;--ease:cubic-bezier(.23,1,.32,1)}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif;-webkit-font-smoothing:antialiased}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #4a7775;outline-offset:3px}button:disabled{cursor:default}[hidden]{display:none!important}.site-header{max-width:1000px;height:64px;margin:auto;padding:0 25px;border-bottom:1px solid #e1e3d5;display:flex;align-items:center;justify-content:space-between}.home-link{display:flex;align-items:center;gap:8px;min-height:44px;color:#4f6048;text-decoration:none;font-size:14px;font-weight:650}.header-note{font-size:11px;color:var(--muted)}.icon-button{width:44px;height:44px;border:1px solid #d7decb;border-radius:50%;color:var(--ink);background:#fcfaf2;font-size:18px}.game-shell{max-width:480px;padding:0 22px;margin:21px auto 0}.intro{text-align:center;margin-bottom:23px}.eyebrow{color:#6d664c;font-size:11px;letter-spacing:.5px;margin:0}.eyebrow span{color:#a77b3e;margin-right:4px}h1{font-size:31px;font-weight:750;letter-spacing:-1.3px;margin:7px 0;line-height:1.3}.intro>p:last-child{font-size:13px;color:var(--muted);margin:0}.level-heading{display:flex;align-items:center;justify-content:space-between;margin:0 2px 13px;gap:8px}.level-name{display:flex;align-items:center;gap:10px}.level-number{display:grid;place-items:center;min-width:38px;height:40px;border-radius:12px;background:#e9e6d5;color:#6d6248;font:italic 22px Georgia,serif}.small-label{font-size:10px;color:#586b4c;letter-spacing:.35px}.level-name h2{font-size:16px;margin:3px 0 0;letter-spacing:-.45px}.packed-count{white-space:nowrap;font-size:12px;color:#596746;background:#fcfaf3;border:1px solid #dae0cb;padding:9px 11px;border-radius:25px;font-variant-numeric:tabular-nums}.packing-table{border:1px solid #e1ddcb;background:#f2eddf;border-radius:18px;padding:10px 9px 9px;box-shadow:inset 0 1px 3px #a3926b0c}.table-label{display:flex;justify-content:space-between;gap:4px;margin:0 4px 7px;color:#6b624a;font-size:10px}.table-label>span:last-child{color:#5b6b50}.pieces{display:grid;grid-template-columns:repeat(var(--piece-count,2),minmax(0,1fr));gap:6px}.piece{position:relative;min-width:44px;min-height:77px;border:1px solid #d8d3c0;border-radius:12px;padding:5px 2px;background:#fbf9ed;color:#574f3e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;box-shadow:0 2px 0 #ded8c4;transition:background 120ms ease,border-color 120ms ease,transform 120ms var(--ease)}.piece svg{height:43px;width:60px;max-width:100%;overflow:visible;pointer-events:none}.piece-name{font-size:11px;white-space:nowrap;font-weight:600}.piece.selected{border:2px solid #7d6749;background:#fff9df;padding:4px 1px;box-shadow:0 2px 0 #bba575}.piece.packed{background:#e6ebdc;border-color:#d5ddc8;box-shadow:none}.piece.packed svg{opacity:.45}.packed-mark{position:absolute;right:4px;top:2px;font-size:14px;font-weight:700;color:#3f6543}.selection-row{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:53px;padding:3px 2px;margin-bottom:13px}.selection-row p{margin:0;display:flex;align-items:center;font-size:12px;color:#5c664d;min-width:0}.anchor-dot{display:inline-block;width:8px;height:8px;border:2px solid #6a573b;background:#fff8d9;border-radius:50%;margin-right:6px;flex-shrink:0}#selected-name{font-weight:700;color:#594d38}.selection-copy{font-size:11px;letter-spacing:-.2px}.rotate-button{display:flex;align-items:center;gap:7px;justify-content:center;min-width:84px;min-height:44px;padding:0 10px;border:1px solid #cfcfb9;border-radius:12px;background:#fbfaf2;color:#61543b;font-size:12px;flex-shrink:0}.rotate-button span{font-size:23px}.rotate-button:disabled{color:#70735d;background:#eeeee2;border-color:#dfe0d2}.bag-frame{position:relative;background:#d4b68e;padding:15px 15px 9px;border:1px solid #bc9c74;border-radius:25px 25px 23px 23px;box-shadow:0 5px 0 #b79670,0 18px 35px -26px #795f4399;isolation:isolate}.bag-frame:before{content:"";position:absolute;inset:5px;border:1px dashed #f8ead2;border-radius:20px;pointer-events:none;z-index:3}.bag-handle{position:absolute;width:78px;height:33px;left:calc(50% - 39px);top:-25px;border:9px solid #b28d63;border-bottom:0;border-radius:19px 19px 0 0;z-index:-1;box-shadow:inset 0 0 0 1px #97724c}.bag-tag{position:absolute;top:8px;right:25px;transform:rotate(6deg);background:#f7e8cb;border:1px solid #b79a73;border-radius:4px;padding:4px 6px;font-size:7px;letter-spacing:.9px;color:#6e5234;z-index:5}.bag-lining{background:#f2e7d0;padding:5px;border-radius:12px;box-shadow:inset 0 2px 5px #82684433;overflow:hidden}.board{position:relative;width:100%;aspect-ratio:var(--cols,3)/var(--rows,2);isolation:isolate}.board>svg,.cells{position:absolute;inset:0;display:block;width:100%;height:100%}.board>svg{pointer-events:none;overflow:visible}.cells{display:grid;grid-template-columns:repeat(var(--cols,3),1fr);grid-template-rows:repeat(var(--rows,2),1fr)}.cell{border:1px dashed #aa99714d;border-radius:7px;background:transparent;min-width:44px;min-height:44px;padding:0;position:relative;touch-action:manipulation}.cell:before{content:"";position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);height:4px;width:4px;border-radius:50%;background:#aa9772;opacity:.5}.cell.occupied{border-color:transparent}.cell.occupied:before,.cell.blocked:before{display:none}.cell.blocked{border:0;cursor:default}.cell.hint-target{box-shadow:inset 0 0 0 3px #6c7e4a}.cell.remove-target{box-shadow:inset 0 0 0 3px #9d5a40}.cell:focus-visible{outline-offset:-4px;z-index:8}.bag-stitch{height:22px;display:flex;justify-content:center;align-items:center;gap:10px;color:#4e3e27;font-size:8px;letter-spacing:.8px}.bag-stitch i{width:22px;border-top:1px solid #a9875d}.feedback{display:flex;align-items:center;justify-content:center;min-height:44px;margin:10px 0 1px;text-align:center;font-size:12px;line-height:1.55;color:#5a694d;word-break:keep-all}.feedback.error{color:#8e4633;font-weight:600}.feedback.success{color:#42663f}.controls{display:flex;gap:6px;justify-content:center}.controls>button{display:flex;justify-content:center;align-items:center;gap:5px;flex:1;min-height:44px;border:1px solid #d8ddcb;border-radius:11px;background:#fcfbf4;color:#526447;font-size:12px;padding:0 5px}.controls>button>span{font-size:18px}.controls>button:disabled{color:#7a806e;border-color:#e0e2d6;background:#f0f0e7}.completion{display:flex;align-items:center;justify-content:space-between;gap:9px;background:#e9eedc;border:1px solid #cdd9bc;border-radius:15px;padding:13px;margin:5px 0 9px}.completion h3{font-size:18px;letter-spacing:-.5px;margin:4px 0 0}.primary{min-height:44px;border:0;border-radius:11px;padding:0 15px;background:#557247;color:#fffcef;font-size:13px;font-weight:650;display:flex;justify-content:center;align-items:center;gap:9px;white-space:nowrap}.level-nav{max-width:360px;margin:21px auto 0}.nav-label{display:flex;justify-content:space-between;font-size:11px;color:#5a6a4e;margin:0 3px 8px}.levels{display:flex;gap:5px}.level-button{position:relative;flex:1;min-width:44px;height:44px;border:1px solid #d5dcc7;background:transparent;color:#546744;border-radius:50%;font-size:12px}.level-button.active{background:#e3ead4;border-color:#b5c79b;font-weight:700}.level-button.done:after{content:'·';position:absolute;bottom:0;left:0;right:0;color:#527347;font-size:22px}.quiet-note{font-size:11px;color:#5e6d52;text-align:center;margin:16px 0 0}footer{font-size:10px;color:#617052;text-align:center;padding:23px 12px;letter-spacing:.4px}dialog{border:1px solid #d7ddca;border-radius:24px;padding:29px 25px 23px;color:var(--ink);background:#fbf9ef;width:calc(100% - 32px);max-width:390px;max-height:calc(100svh - 24px);overflow:auto;box-shadow:0 18px 60px #34432933}dialog::backdrop{background:#3b473b66;backdrop-filter:blur(3px)}.close-help{position:absolute;right:5px;top:5px;border:0;background:transparent;color:#586a4c;width:44px;height:44px;font-size:26px}dialog h2{font-size:25px;letter-spacing:-1px;margin:9px 0 20px}dialog ol{padding-left:21px}dialog li{padding-left:4px;margin:16px 0;color:#526449;font-size:13px}dialog strong{font-size:14px}dialog li p{font-size:12px;line-height:1.8;margin:4px 0 0;color:#596b4d}.keyboard-note{font-size:10px;line-height:1.7;text-align:center;color:#5a6c4f;margin-top:20px}dialog .primary{width:100%;margin-top:15px}button:not(:disabled):active{transform:scale(.97)}@media(hover:hover)and(pointer:fine){.piece:not(:disabled):hover{background:#f5edd8}.rotate-button:not(:disabled):hover,.controls>button:not(:disabled):hover,.level-button:hover,.icon-button:hover{background:#e7ecd9}.primary:hover{background:#436138}.cell:not(:disabled):hover{box-shadow:inset 0 0 0 2px #86714966}}@media(max-width:500px){.site-header{height:56px;padding:0 18px}.header-note{font-size:10px}.game-shell{padding:0 17px;margin-top:17px}.intro{margin-bottom:18px}h1{font-size:28px}.eyebrow{font-size:10px}.intro>p:last-child{font-size:12px}.level-name h2{font-size:14px}.level-number{height:36px;min-width:34px;font-size:20px}.small-label{font-size:9px}.packed-count{font-size:11px;padding:8px 9px}.pieces{gap:4px}.piece{min-height:68px}.piece svg{height:36px}.piece-name{font-size:10px}.packing-table{padding:9px 7px 7px}.selection-row{margin-bottom:12px;min-height:51px}.selection-copy{font-size:10px}.bag-frame{padding:12px 12px 7px;border-radius:22px}.bag-stitch{font-size:7px;height:21px}.feedback{font-size:11px}.controls>button{font-size:11px}.completion{padding:11px}.completion h3{font-size:16px}.primary{font-size:12px;padding:0 12px}.level-nav{margin-top:17px}.quiet-note{font-size:10px}}@media(max-width:350px){.game-shell{padding:0 12px}.site-header{padding:0 13px}.header-note{display:none}.table-label{font-size:9px}.piece{min-width:44px}.selection-copy{font-size:9px}.rotate-button{min-width:76px;font-size:11px;gap:4px}.levels{gap:4px}.level-button{min-width:44px}.bag-frame{padding:10px 10px 6px}.bag-lining{padding:4px}.feedback{min-height:40px}.completion h3{font-size:15px}}@media(max-height:650px){.site-header{height:48px}.game-shell{margin-top:10px}.intro{margin-bottom:12px}.eyebrow{display:none}.intro h1{font-size:25px;margin:0 0 4px}.intro>p:last-child{font-size:11px}.level-heading{margin-bottom:9px}.piece{min-height:61px}.piece svg{height:31px}.selection-row{min-height:49px;margin-bottom:11px}.level-nav{margin-top:12px}footer{padding:18px 12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Only movable objects capture touch gestures; empty bag cells and the page still scroll. */
.piece:not(:disabled),.cell.occupied{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
body.dragging{cursor:grabbing;user-select:none;-webkit-user-select:none}
body.dragging .piece:active,body.dragging .cell:active{transform:none}
.drag-origin{opacity:.22}
#drag-ghost{position:fixed;left:0;top:0;pointer-events:none;z-index:90;opacity:.68;will-change:transform;filter:drop-shadow(0 7px 8px #4e50374d)}
#drag-ghost svg{display:block;width:100%;height:100%;overflow:visible}
#drag-ghost[data-legal=false]{filter:drop-shadow(0 2px 5px #9b4b3e88)}
#drag-status{position:fixed;left:50%;bottom:12px;transform:translateX(-50%);z-index:91;pointer-events:none;max-width:calc(100vw - 24px);width:max-content;padding:10px 14px;border:1px solid #9caf83;border-radius:14px;background:#f7faeb;color:#3f6135;font-size:12px;line-height:1.5;box-shadow:0 3px 16px #45523826;text-align:center}
#drag-status.invalid{background:#fff4e9;color:#854431;border-color:#c39b85}
