@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');
:root{--ink:#34302b;--muted:#928b7e;--paper:#f6f2e8;--orange:#e66d48;--line:#dcd6c8;--green:#698e78}*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:'DM Sans','Noto Sans SC',sans-serif;background:#ede9df;background-image:radial-gradient(#91867916 .7px,transparent .8px);background-size:5px 5px}.app{display:flex;min-height:100vh}.sidebar{width:242px;flex:none;background:#f8f5ed;border-right:1px solid #ddd7cb;display:flex;flex-direction:column;padding:28px 20px 18px;max-height:100vh;position:sticky;top:0}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;background:var(--orange);color:#fff9ea;width:39px;height:39px;font-size:26px;transform:rotate(-8deg)}.brand b{display:block;font-size:20px;letter-spacing:.08em}.brand small{display:block;font-size:8px;letter-spacing:.22em;color:var(--muted);margin-top:3px}.side-intro{margin:43px 0 29px}.side-intro span,.eyebrow,.date-label,.kicker,.stage-label,.side-foot,footer,.library-title{font-size:9px;font-weight:700;letter-spacing:.16em}.side-intro span{color:var(--orange)}.side-intro p{font-size:13px;line-height:1.8;color:#797266;margin:10px 0 0}.library-title{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:12px;color:#80796d}.library-title span:last-child{color:var(--orange)}#levels{overflow-y:auto;scrollbar-width:thin;flex:1;padding:4px 0}.group-title{font-size:10px;font-weight:700;color:#aaa295;letter-spacing:.12em;margin:18px 0 7px}.level-btn{border:0;background:transparent;width:100%;height:37px;border-radius:5px;text-align:left;display:flex;align-items:center;gap:10px;color:#6f695f;cursor:pointer;padding:0 9px;font:600 12px inherit}.level-btn .idx{font-size:10px;font-family:monospace;color:#aaa195}.level-btn .state{margin-left:auto;color:#8b9e85}.level-btn.current{background:#eee7d9;color:#29251f}.level-btn.current .idx{color:var(--orange)}.level-btn:disabled{opacity:.42;cursor:not-allowed}.side-foot{border-top:1px solid var(--line);padding-top:16px;color:#b1a99c;font-size:8px}.side-foot span{float:right;color:var(--orange);font-size:17px}main{flex:1;min-width:0;padding:30px 4.3% 20px;max-width:1600px;margin:auto}header{display:flex;justify-content:space-between;align-items:center;margin:4px 0 27px}.eyebrow{color:#8e887d}.eyebrow span{font-size:15px;color:var(--orange);margin-right:8px}.eyebrow i{display:inline-block;height:10px;width:1px;background:#c9c1b3;margin:0 12px;vertical-align:middle}h1{font-size:clamp(30px,3vw,43px);letter-spacing:.02em;line-height:1.2;margin:13px 0 8px;font-weight:800}h1 span{color:var(--orange)}h1 .period{color:#e1aa55}.subtitle{color:#958d80;font-size:13px;margin:0}.header-right{text-align:right}.date-label{color:#a6a094}.header-stamp{display:flex;align-items:center;justify-content:flex-end;gap:7px;font-size:37px;font-weight:800;line-height:1;color:#d5cec0;margin-top:10px}.header-stamp small{font-size:7px;line-height:1.3;text-align:left;letter-spacing:.1em}.game-card{background:#fbf9f3;border:1px solid #e3ddd0;border-radius:9px;box-shadow:0 12px 35px #5f51440b;overflow:hidden}.card-top{display:flex;justify-content:space-between;align-items:center;padding:20px 26px 16px;border-bottom:1px solid #ebe5d9}.level-heading{display:flex;align-items:center;gap:14px}.level-number{font-family:Georgia,serif;font-size:39px;color:#e5a27f;line-height:1}.kicker{color:#a09a8f;font-size:9px}.level-heading h2{margin:5px 0 0;font-size:19px}.card-top-right{display:flex;align-items:center;gap:15px}.placed{font-size:12px;color:#aaa396;text-align:right}.placed b{font-size:22px;color:var(--orange)}.placed small{display:block;font-size:9px;letter-spacing:.12em}.level-open{display:none}.stage-wrap{position:relative;margin:0 20px}.stage-label{position:absolute;top:19px;z-index:1;color:#8c8579;pointer-events:none}.stage-label small{font-size:8px;color:#b8b1a5;margin-left:7px}.stage-label span{color:var(--orange);font-size:15px}.left-label{left:3%}.right-label{left:62%}#board{display:block;width:100%;max-height:570px;touch-action:none;user-select:none}.mat{fill:#f1ede3;stroke:#d3cab9;stroke-width:1.5;stroke-dasharray:3 7}.divider{stroke:#e0d9cb;stroke-width:1.5;stroke-dasharray:3 7}.target{fill:#c9c3b6;fill-opacity:.45;stroke:#a8a192;stroke-width:1.5;stroke-dasharray:4 5;stroke-linejoin:round}.target.filled{fill:#d8d4c9;fill-opacity:.55}.hint-poly{fill:#e7a57f;fill-opacity:.25;stroke:#e66d48;stroke-width:3;stroke-dasharray:6 5;animation:pulse 1s infinite alternate}.piece{cursor:grab;outline:none;touch-action:none}.piece.dragging{cursor:grabbing}.piece .piece-outline{stroke:#fff9ec;stroke-width:2;stroke-linejoin:round}.piece.selected .selection{opacity:1}.selection{fill:none;stroke:#35312b;stroke-width:2;stroke-dasharray:4 5;stroke-linejoin:round;opacity:0}.piece.placed-piece{cursor:default}.piece.placed-piece .piece-outline{stroke:#fff9ec;stroke-width:3}.toolbar{border-top:1px solid #ebe5d9;padding:15px 24px;display:flex;align-items:center;justify-content:space-between;gap:15px}.tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.tools button,.level-open{background:#f5f1e7;border:1px solid #e7e0d2;border-radius:5px;padding:9px 11px;color:#5e574d;font:600 11px 'DM Sans','Noto Sans SC',sans-serif;cursor:pointer;white-space:nowrap}.tools button:hover,.tools button:focus-visible{background:#eee4d4;border-color:#d1c2ad}.tools button span{font-size:15px;color:#d77751;vertical-align:-1px;margin-right:3px}kbd{font:9px sans-serif;color:#aaa091;margin-left:4px}.tool-sep{height:25px;border-left:1px solid #e6dfd2;margin:0 4px}.tip{font-size:10px;color:#aaa396;white-space:nowrap}.tip span{color:var(--orange);font-size:16px;margin-left:5px}footer{display:flex;justify-content:space-between;color:#aaa295;margin-top:17px;font-size:9px}footer span:first-child{letter-spacing:.06em}footer span:first-child:first-letter{color:var(--orange)}.win{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:28px;background:#f8f4eaeF;text-align:center;animation:appear .4s ease}.win[hidden]{display:none}.win>span{font-size:50px;color:#e5aa70}.win small{display:block;color:var(--orange);font-weight:700;letter-spacing:.18em}.win strong{display:block;font-size:32px;margin-top:12px}.win p{font-size:13px;color:#938a7d}.win button{background:var(--orange);color:white;border:0;border-radius:5px;padding:12px 24px;font-weight:700;cursor:pointer}.win button span{margin-left:15px}@keyframes appear{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{to{opacity:.35}}.shade{display:none}@media(max-width:900px){.sidebar{width:205px;padding-left:15px;padding-right:15px}main{padding-left:3%;padding-right:3%}.tip{display:none}.header-right{display:none}}@media(max-width:650px){.sidebar{position:fixed;z-index:12;left:0;top:0;bottom:0;max-height:none;width:260px;transform:translateX(-100%);transition:transform .25s;box-shadow:5px 0 25px #332b2520}.sidebar.open{transform:translateX(0)}.shade:not([hidden]){display:block;position:fixed;inset:0;background:#312a2380;z-index:11}main{padding:21px 14px;width:100%}header{margin:0 0 20px}h1{font-size:30px;margin:10px 0 6px}.subtitle{font-size:11px}.card-top{padding:15px}.level-number{font-size:32px}.level-heading h2{font-size:16px}.level-open{display:block}.stage-wrap{margin:0 5px}.stage-label{top:8px;font-size:8px}.stage-label small{display:none}#board{min-height:0}.toolbar{padding:11px}.tools{gap:5px}.tools button{padding:8px;font-size:10px}.tools button span{font-size:13px}.tool-sep{display:none}kbd{display:none}footer span:last-child{display:none}.win strong{font-size:23px}.win>span{font-size:30px}.win p{font-size:11px}}
