:root{--ink:#2d3e42;--muted:#87908a;--paper:#f8f6ed;--line:#deded1;--accent:#bc6f49}*{box-sizing:border-box}body{margin:0;background:#ebece4;color:var(--ink);font:13px -apple-system,BlinkMacSystemFont,"PingFang SC",system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;transition:background .15s}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid #b56c47;outline-offset:3px}button:disabled{opacity:.35;cursor:default}header{height:84px;padding:0 3.2%;background:#f8f7f0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.brand{text-decoration:none;color:var(--ink);display:flex;gap:12px;align-items:center;font-family:serif;font-size:23px;font-weight:700;letter-spacing:3px}.brand small{display:block;font:8px system-ui;letter-spacing:2px;margin-top:6px}.brand-mark{display:grid;place-items:center;width:40px;height:45px;border:1px solid #9fa99e;background:#e6e9dc;border-radius:4px;font-size:30px}.head-note{font-size:12px;color:#8a9287;letter-spacing:2px}.primary{background:var(--ink);color:#f5f0dc;border:0;padding:13px 20px;border-radius:5px;letter-spacing:1px}.primary:hover{background:#48605d}main{max-width:1800px;margin:auto;padding:0 3.2%}.intro{display:flex;justify-content:space-between;align-items:center;padding:27px 0 25px}.eyebrow{font-size:9px;letter-spacing:2px;color:#899186}h1{font-family:serif;font-size:30px;font-weight:600;letter-spacing:2px;margin:10px 0}h1 span{vertical-align:middle;font:10px system-ui;letter-spacing:1px;border:1px solid #c7cdbd;border-radius:3px;padding:4px 7px;margin-left:15px;color:#77816d}.intro p{font-size:12px;color:#899085;margin:0;letter-spacing:1px}.plain{border:0;background:none;color:#7c867a;font-size:12px}.game{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:24px;align-items:start}.left{min-width:0}.boardhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px;font-size:11px}.boardhead i{display:inline-block;width:6px;height:6px;background:#92a17b;border-radius:50%;margin-right:7px}.boardhead small{font-size:8px;letter-spacing:1.4px;margin-left:10px;color:#959e92}.boardhead button{background:none;border:1px solid #cbd1c3;border-radius:4px;padding:6px 10px;margin-left:6px;font-size:11px}.boardhead button[aria-pressed=true]{background:#344b47;color:#fff}.viewport{width:100%;overflow:auto;max-height:72vh;background:#cdd3c3;border:1px solid #bdc6b4;padding:20px;scrollbar-width:thin;scrollbar-color:#9aa88e #d8dece;border-radius:4px}.paper{position:relative;width:100%;box-shadow:0 5px 16px #38413930;padding:10px;background:#faf7e8;line-height:0}.paper:before{content:"";position:absolute;width:75px;height:19px;left:40%;top:-8px;background:#d7caa8a6;transform:rotate(-3deg);z-index:1;pointer-events:none}#board{display:block;width:100%;height:auto;touch-action:none;cursor:default}.loading{position:absolute;inset:0;display:grid;place-items:center;background:#f8f6ed;font-size:15px;line-height:1.5}.under{min-height:44px;display:flex;justify-content:space-between;align-items:center;gap:8px;color:#8b9485;font-size:10px}.zoom{display:flex;align-items:center;border:1px solid #cbd1c3;border-radius:4px;white-space:nowrap}.zoom button{border:0;background:transparent;padding:5px 8px;font-size:11px}.editbar{display:flex;gap:14px;align-items:center;background:#f8f7f0;border:1px solid #d9ded0;border-radius:5px;padding:13px 15px}.edit-label{font-size:12px;margin-right:auto;min-width:125px}.edit-label small{display:block;font-size:9px;color:#929a8b;margin-top:5px}.editbuttons{display:flex;gap:5px;flex-wrap:wrap}.editbuttons button,.undo{border:1px solid #d9ded0;background:#f8f7f0;border-radius:4px;padding:8px;font-size:11px}.editbuttons button:hover,.undo:hover{background:#e9ecdf}.undo{border:0;white-space:nowrap}.bottomnote{display:flex;justify-content:space-between;align-items:center;margin-top:13px;color:#92998d;font-size:10px}.bottomnote button{border:0;background:none;color:#90978b;font-size:10px;text-decoration:underline;text-underline-offset:4px}aside{background:#f9f7ec;border:1px solid #d9dcce;border-radius:5px;box-shadow:0 3px 0 #d9ddce;overflow:hidden}.booktop{padding:20px 20px 14px}.booktitle{font-family:serif;font-size:22px;margin:9px 0 15px;letter-spacing:1px}.booktitle span{float:right;font:11px system-ui;color:#8e9789;margin-top:9px;letter-spacing:1px}.progress{height:3px;background:#e2e4d6}.progress i{display:block;background:#9aab80;width:0;height:100%;transition:width .3s}.booktop p{font-size:10px;color:#969d8d;margin:12px 0 0}.tabs{display:flex;padding:0 20px;gap:18px;border-bottom:1px solid #dedfd2}.tabs button{background:none;border:0;padding:10px 1px;color:#9a9e90;font-size:11px;border-bottom:2px solid transparent}.tabs .active{color:#394e46;border-color:#b9754f}.sheet{padding:12px;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background-image:radial-gradient(#d5d9c9 0.7px,transparent .7px);background-size:8px 8px;max-height:550px;overflow:auto}.sticker{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;background:#faf8edcc;border:1px dashed #dddcc8;border-radius:13px;padding:7px 2px 5px;touch-action:none;user-select:none;min-height:93px}.sticker:hover{background:#fffdf5;border-color:#a9b491;box-shadow:0 3px 7px #57614612}.sticker.selected{border:1px solid #b87d51;background:#f3e9d1}.sticker.used{background:#e7e8de66;border-color:#d8dccc}.sticker.used canvas{opacity:.09;filter:grayscale(1)}.sticker.used:after{content:'已贴';position:absolute;top:32px;font-size:10px;letter-spacing:2px;color:#b0b5a5;transform:rotate(-12deg);border:1px solid #c3c8b8;padding:3px}.sticker canvas{width:100%;aspect-ratio:1;display:block;pointer-events:none}.sticker span{font-size:8px;color:#9a9e8b;pointer-events:none}.bookfoot{display:flex;justify-content:space-between;font-size:9px;color:#9da38f;border-top:1px solid #dedfd2;padding:14px}footer{display:flex;justify-content:space-between;padding:26px 0;color:#949c8b;font-size:10px;letter-spacing:1.3px}#toast{position:fixed;bottom:35px;left:50%;transform:translateX(-50%);background:#2e4440;color:#f9f4e5;padding:12px 22px;border-radius:6px;opacity:0;transition:.2s;pointer-events:none;z-index:20;font-size:12px}#ghost{position:fixed;width:100px;height:100px;z-index:100;pointer-events:none;display:none;filter:drop-shadow(4px 8px 5px #26362c55)}dialog{background:#faf7eb;border:1px solid #d6d9ca;border-radius:8px;max-width:480px;width:90%;padding:35px;color:var(--ink);box-shadow:0 20px 100px #182a3344}dialog::backdrop{background:#233e3e70;backdrop-filter:blur(3px)}dialog h2{font-family:serif;font-size:24px;font-weight:500}.close{position:absolute;right:15px;top:10px;border:0;background:none;font-size:25px;color:#8b9384}ol{padding-left:20px;color:#7b8676;font-size:12px;line-height:1.9}li{padding:6px 0}b{color:#405348}dialog .primary{margin-top:15px;width:100%}@media(min-width:1500px){.game{grid-template-columns:minmax(0,1fr) 360px}.sheet{max-height:650px}.sticker{min-height:110px}}@media(max-width:1000px){.game{grid-template-columns:minmax(0,1fr) 265px;gap:16px}.sheet{grid-template-columns:repeat(3,1fr);max-height:430px}.viewport{padding:12px}.editbar{flex-wrap:wrap}.editbuttons{order:3;width:100%}.head-note{display:none}.boardhead small{display:none}.intro h1{font-size:25px}}@media(max-width:700px){header{height:70px;padding:0 4%}.brand{font-size:19px}.brand small{font-size:6px}.brand-mark{width:33px;height:38px}.primary{font-size:11px;padding:11px 12px}.intro{padding:22px 0}.intro h1{font-size:24px}.intro h1 span{display:none}.intro p{font-size:10px}.game{display:flex;flex-direction:column;gap:20px}.left,aside{width:100%}.viewport{max-height:65vh;padding:10px}.paper{padding:6px}.sheet{grid-template-columns:repeat(4,1fr);max-height:320px}.sticker{min-height:105px}.sticker canvas{max-width:85px}.booktop{padding:16px 20px 8px}.booktitle{font-size:20px;margin-bottom:10px}.booktop p{margin:8px 0}.under{font-size:9px}.editbar{padding:10px}.editbuttons button{flex:1;font-size:10px;padding:9px 5px}.edit-label small{font-size:8px}footer{font-size:8px}footer span:last-child{display:none}.boardhead button{font-size:10px;padding:6px}.eyebrow{font-size:8px}main{padding:0 4%}}

/* Bottom floating sticker tray */
body{padding-bottom:244px}
.game{display:block}
.left{max-width:1280px;margin:0 auto}
.viewport{max-height:68vh}
aside{position:fixed;z-index:10;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(1120px,calc(100% - 40px));border-radius:16px;box-shadow:0 12px 45px #30403930,0 2px 8px #30403914;display:grid;grid-template-columns:210px minmax(0,1fr);background:#f9f7ecf5;backdrop-filter:blur(16px)}
.booktop{grid-column:1;grid-row:1 / 3;padding:20px;border-right:1px solid var(--line);display:flex;flex-direction:column;justify-content:center}
.booktitle{font-size:20px;margin:12px 0}.booktitle span{float:none;display:block;margin-top:8px}.booktop p{line-height:1.6}
.tabs{grid-column:2;padding:0 16px;gap:24px}
.sheet{grid-column:2;display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;max-height:none;padding:10px 14px 14px;scrollbar-width:thin;scrollbar-color:#b3bca5 transparent;overscroll-behavior-x:contain}
.sticker{touch-action:pan-x;flex:0 0 82px;min-height:94px;padding:6px}.sticker canvas{width:68px;max-width:68px}.sticker span{white-space:nowrap;font-size:9px}.bookfoot{display:none}
#toast{bottom:240px}
@media(max-width:700px){body{padding-bottom:218px}aside{width:calc(100% - 20px);bottom:max(10px,env(safe-area-inset-bottom));display:block;border-radius:14px}.booktop{display:block;padding:11px 14px 8px;border:0}.booktop>.eyebrow,.booktop p{display:none}.booktitle{font-size:16px;margin:0 0 8px}.booktitle span{float:right;display:inline;margin:3px 0 0;font-size:10px}.tabs{padding:0 14px;gap:24px}.tabs button{padding:8px 1px}.sheet{padding:8px 10px 10px;max-height:none}.sticker{flex-basis:72px;min-height:82px}.sticker canvas{width:58px;max-width:58px}.sticker span{font-size:8px}.viewport{max-height:58vh}#toast{bottom:215px;max-width:90%;width:max-content}}
