:root{font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#344538;background:#f5f1e8;font-synthesis:none;--green:#426b53;--muted:#909889;--line:#dedfd3}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 18% 22%,#e4e9dba8,transparent 44%),radial-gradient(ellipse at 85% 74%,#e9dfccaa,transparent 40%),#f5f1e8}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #e4b04b;outline-offset:4px}button:disabled{cursor:default;opacity:.38}button{border:0}a{color:inherit;text-decoration:none}.app{width:min(100%,440px);margin:0 auto;min-height:100svh;padding:22px 24px 15px;position:relative;background:#fbfaf4;box-shadow:0 0 90px #47523c08}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.brand{display:flex;align-items:center;gap:10px;font-size:23px;font-weight:850;letter-spacing:2px}.brand-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:13px;background:#4b735b;color:#fff9e8;font-size:27px;box-shadow:inset 0 -4px #36593f;transform:rotate(-8deg)}.brand small{display:block;font-size:9px;font-weight:500;letter-spacing:3px;color:#89917f;margin-top:2px}.header-tools{display:flex;gap:6px}.icon-button{width:29px;height:30px;background:transparent;font-size:19px;color:#778170;border-radius:9px}.icon-button:hover{background:#eeeee2}.levelbar{display:flex;align-items:center;gap:10px;margin-bottom:20px}.level-pill{display:flex;align-items:center;gap:5px;background:#eaf0e4;color:#4b6850;font-size:11px;border:1px solid #dce6d4;border-radius:30px;padding:8px 11px;white-space:nowrap}.level-pill b{font-size:14px}.status-dot{width:5px;height:5px;background:#70a17c;border-radius:50%;margin-right:2px}.chevron{margin-left:4px}.level-title{font-size:12px;font-weight:600}.level-total{font-size:10px;color:#a1a596;margin-left:auto}.section-label{display:flex;justify-content:space-between;font-size:10px;letter-spacing:.4px;color:#88917f;margin-bottom:10px}.section-label em{font-style:normal;font-size:9px;color:#a5aa9c;margin-left:6px}.boxes{display:grid;grid-template-columns:1fr 1fr;gap:13px}.box{background:linear-gradient(135deg,#ffffffa8,var(--wash));border:1px solid var(--border);border-bottom-width:4px;border-radius:13px;padding:11px 12px 12px;position:relative;min-height:84px;box-shadow:0 4px 8px #364a2d04}.box-head{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--dark);font-weight:600;margin-bottom:10px}.box-head .shape{font-size:12px}.box-head small{font-weight:400;font-size:9px;opacity:.6}.box-holes{display:flex;justify-content:space-around;gap:7px}.box-hole{width:29px;height:29px;border-radius:50%;background:#555e4311;box-shadow:inset 0 2px 3px #50523e13,inset 0 0 0 1px #63754c0c;display:grid;place-items:center}.box.done{--wash:#eef2e8;--border:#e5eadb;--dark:#90a185;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;color:#8b9b81;font-size:11px}.box.done b{font-size:24px}.board-section{margin-top:21px}.board-top{display:flex;justify-content:space-between;align-items:center;color:#89917e;font-size:10px;margin:0 1px 9px}.board-top span:first-child{display:flex;align-items:center;gap:5px}.board-top i{width:5px;height:5px;border-radius:50%;background:#b8c29f}.arena{aspect-ratio:360/370;position:relative;isolation:isolate;overflow:hidden;border:1px solid #d9decf;border-bottom:5px solid #d2d8c5;border-radius:23px;background:linear-gradient(145deg,#e8eddf,#e0e7d5);box-shadow:inset 0 3px 12px #5d70430a,0 4px 12px #6a724007}.pegboard{position:absolute;inset:12px;background-image:radial-gradient(#81916a33 1px,transparent 1.5px);background-size:18px 18px;mask-image:linear-gradient(transparent,#000 20%,#000 85%,transparent)}.arena-corner{position:absolute;width:8px;height:8px;border-radius:50%;background:#d0d7c3;box-shadow:inset 0 1px 2px #7d895c44}.top-left{left:13px;top:13px}.top-right{right:13px;top:13px}.bottom-left{left:13px;bottom:14px}.bottom-right{right:13px;bottom:14px}#plates{position:absolute;inset:0}.plate{position:absolute;transform:translate(-50%,-50%) rotate(var(--angle));height:15.68%;border-radius:14px;background:linear-gradient(180deg,#fbecd0 0%,#f4ddb8 36%,#eed2a5 100%);border:1px solid #b799674f;border-top:2px solid #fff3d7;box-shadow:0 4px 0 #b99967,0 7px 6px #43532d30,inset 0 -3px 5px #aa82571c;transition:filter .2s;pointer-events:none}.plate:before{content:"";position:absolute;inset:9px 8px;border-top:1px solid #bc915b24;border-bottom:1px solid #b5895720;border-radius:35%;pointer-events:none}.grain{position:absolute;inset:18px 13px 10px;background:repeating-linear-gradient(0deg,transparent 0px,transparent 7px,#bd946220 8px,transparent 9px);border-radius:50%;pointer-events:none}.plate-tag{position:absolute;left:22%;top:9px;font:8px Georgia,serif;letter-spacing:1px;color:#9a754947}.hole,.screw{position:absolute;left:var(--left);top:50%;width:36px;height:36px;margin:-18px 0 0 -18px;border-radius:50%}.hole{width:25px;height:25px;margin:-12.5px 0 0 -12.5px;background:#907a4a;box-shadow:inset 0 3px 5px #443e2477,0 1px #fff0cf}.screw{padding:0;background:transparent;pointer-events:auto;border:0;z-index:2;display:grid;place-items:center;transition:filter .15s,scale .15s;touch-action:manipulation}.screw svg{width:36px;height:36px;filter:drop-shadow(0 3px 1px #48321d55);overflow:visible}.screw:hover{scale:1.08}.screw.blocked{cursor:not-allowed}.screw.blocked svg{filter:brightness(.83) drop-shadow(0 2px 2px #48321d55)}.screw.hinted:after{content:"";position:absolute;inset:-5px;border:2px solid #fff9d8;border-radius:50%;box-shadow:0 0 0 3px #5f947855;animation:pulse .8s ease-in-out infinite}.board-wordmark{position:absolute;left:0;right:0;bottom:12px;text-align:center;letter-spacing:2px;color:#8d9a7d;font-size:6px;pointer-events:none}.progress-track{height:3px;border-radius:4px;background:#e5e9de;margin:11px 14px 0;overflow:hidden}.progress-track div{height:100%;width:0;background:#82a587;transition:width .4s}.storage{margin-top:20px}.buffer{display:flex;justify-content:center;gap:10px;background:#f0f0e6;padding:11px 10px;border-radius:13px;border:1px solid #e7e8dc;transition:background .2s}.buffer.warning{background:#f8e3d9}.buffer-slot{width:39px;height:39px;display:grid;place-items:center;border-radius:50%;background:#e6e7dc;box-shadow:inset 0 2px 4px #3d543114;border:1px dashed #cbd1bf}.buffer-slot svg,.box-hole svg{width:29px;height:29px;filter:drop-shadow(0 2px 1px #463d2538)}.buffer-slot:empty:after{content:"·";color:#b5bba9}.tip{min-height:16px;text-align:center;font-size:10px;letter-spacing:.2px;color:#929987;margin:12px 0 17px}.tip.warn{color:#ba7356}.tools{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.tools button{border:1px solid #e3e6d8;background:#fdfcf8;border-radius:12px;display:flex;flex-direction:column;align-items:center;padding:10px 0 8px;box-shadow:0 3px 0 #e7e8dc}.tools button:hover:not(:disabled){background:#f0f3e9;transform:translateY(-1px)}.tools button:active:not(:disabled){transform:translateY(2px);box-shadow:none}.tools span{font-size:25px;line-height:28px;color:#698565;font-family:system-ui}.tools b{font-size:10px;font-weight:500;margin:3px 0 4px}.tools small{font-size:8px;color:#a2a694}footer{display:flex;justify-content:center;gap:5px;align-items:center;color:#a6ac9b;font-size:9px;margin-top:21px}footer #moves{margin-left:auto;font-variant-numeric:tabular-nums}.footer-dot{width:4px;height:4px;background:#b3bea2;border-radius:50%}.desktop-note{position:fixed;left:max(35px,calc(50% - 560px));top:25%;display:flex;flex-direction:column;align-items:flex-start;gap:28px;color:#64725a;font-size:19px;line-height:1.9;letter-spacing:2px}.desktop-note strong{font-weight:600;color:#40583f}.mini-logo{background:#dce5d1;color:#64865a;width:57px;height:57px;display:grid;place-items:center;border-radius:20px;font-size:36px;transform:rotate(-12deg)}.desktop-note small{font-size:8px;line-height:2;letter-spacing:2px;color:#a0a794}.desktop-tag{position:fixed;left:calc(50% + 350px);top:43%;color:#8b977d}.desktop-tag>span{font-size:9px;letter-spacing:3px}.desktop-tag p{font-family:Georgia,"Songti SC",serif;font-size:35px;line-height:1.4;letter-spacing:7px;color:#9ba38b}.doodle{font-size:70px;color:#d0b674;transform:rotate(12deg);margin-top:40px}.modal-backdrop{position:fixed;inset:0;z-index:100;background:#25362455;backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;padding:22px}.modal-backdrop[hidden]{display:none}.modal-card{position:relative;width:min(100%,360px);border-radius:25px;background:#fcfbf4;box-shadow:0 18px 100px #19291138;padding:30px;text-align:center;max-height:90svh;overflow:auto;animation:modal-in .3s ease}.modal-close{position:absolute;right:13px;top:11px;background:transparent;font-size:24px;color:#94a08a}.modal-eyebrow{font-size:9px;letter-spacing:3px;color:#94a282;margin:15px 0 9px}.modal-card h2{font-size:26px;letter-spacing:2px;margin:0 0 13px;color:#375139}.modal-card p{font-size:12px;color:#8a927c;line-height:1.9}.modal-stamp{font-size:48px;line-height:70px;color:#759569}.primary,.secondary{display:block;width:100%;border-radius:13px;padding:13px;font-weight:650;letter-spacing:1px;font-size:13px;margin-top:12px}.primary{background:#53775a;color:#fffcef;box-shadow:0 4px #375b3d}.secondary{background:#edf0e5;color:#768368}.rules{display:grid;gap:12px;text-align:left;margin:25px 0}.rule{display:flex;align-items:center;gap:12px;font-size:12px;line-height:1.7;color:#76816d}.rule>span{width:31px;height:31px;border-radius:10px;background:#e9eee0;display:grid;place-items:center;flex:none;color:#67805b;font-weight:bold}.rule b{color:#495e40}.stars{font-size:33px;letter-spacing:8px;color:#deb359;margin:8px}.stars .dim{color:#e2e5d7}.result-stats{display:flex;justify-content:space-around;margin:22px 0;padding:14px;background:#f0f2e8;border-radius:13px;font-size:10px;color:#89947c}.result-stats b{display:block;font-size:23px;margin-bottom:4px;color:#5d7855}.level-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:23px}.level-grid button{border:1px solid #e0e6d5;border-radius:12px;background:#eef2e6;padding:12px 3px;font-size:18px;color:#65825a}.level-grid small{display:block;font-size:10px;color:#c4a34f;margin-top:3px;letter-spacing:1px}.level-grid .current{border:2px solid #729669;background:#e5efdc}.toast{position:fixed;bottom:30px;left:50%;transform:translate(-50%,20px);background:#344f3de8;color:#faf9e9;padding:11px 20px;border-radius:30px;z-index:200;font-size:12px;pointer-events:none;opacity:0;transition:.2s;max-width:90%;white-space:nowrap}.toast.show{opacity:1;transform:translate(-50%,0)}.flying{position:fixed;z-index:90;pointer-events:none;width:36px;height:36px}.falling{position:absolute;pointer-events:none!important}.confetti{position:fixed;width:7px;height:12px;border-radius:2px;pointer-events:none;z-index:120}@keyframes pulse{50%{scale:1.18;opacity:.65}}@keyframes modal-in{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}@media(min-width:900px){.app{margin:25px auto;min-height:0;border-radius:28px;border:1px solid #e8e8da;box-shadow:0 20px 80px #3646260c;padding-top:23px;padding-bottom:20px}}@media(max-width:1000px){.desktop-note,.desktop-tag{display:none}}@media(max-width:380px){.app{padding:16px 17px 12px}.topbar{margin-bottom:17px}.levelbar{margin-bottom:16px}.board-section{margin-top:16px}.storage{margin-top:15px}.buffer{gap:7px}.buffer-slot{width:34px;height:34px}.tools{gap:7px}.tip{margin-bottom:12px}.brand{font-size:21px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Scale screw hit areas with the physical boards on every viewport. */
.screw{width:14%;height:auto;aspect-ratio:1;margin:0;transform:translate(-50%,-50%)}.screw svg{width:100%;height:100%}.hole{width:10%;height:auto;aspect-ratio:1;margin:0;transform:translate(-50%,-50%)}
@media(max-height:900px){
.app{padding:13px 21px 10px;min-height:100svh}.topbar{margin-bottom:12px}.brand{font-size:21px}.brand-icon{width:32px;height:32px;border-radius:11px;font-size:25px}.brand small{font-size:8px}.levelbar{margin-bottom:11px}.level-pill{padding:5px 10px}.level-pill b{font-size:12px}.level-title{font-size:11px}.section-label{margin-bottom:6px;font-size:9px}.box{min-height:67px;padding:8px 10px}.box-head{margin-bottom:6px;font-size:9px}.box-hole{width:25px;height:25px}.box-hole svg{width:25px;height:25px}.board-section{margin-top:12px}.board-top{margin-bottom:6px;font-size:9px}.arena{width:min(100%,calc((100svh - 433px)*.973));margin:auto;border-radius:18px}.progress-track{margin-top:6px}.storage{margin-top:12px}.buffer{padding:8px;gap:9px}.buffer-slot{width:32px;height:32px}.buffer-slot svg{width:27px;height:27px}.tip{font-size:9px;margin:8px 0 10px;min-height:13px}.tools button{padding:5px 0 5px}.tools span{font-size:22px;line-height:23px}.tools b{margin:1px 0 2px;font-size:9px}.tools small{font-size:8px}footer{margin-top:12px;font-size:8px}.plate{border-radius:11px}.plate-tag{font-size:6px;top:6px}.board-wordmark{font-size:5px;letter-spacing:1px}
}
@media(min-width:900px) and (max-height:900px){.app{margin:5px auto;min-height:0}.arena{width:min(100%,calc((100svh - 453px)*.973))}}
@media(max-height:650px){.arena{width:min(100%,245px)}.app{min-height:640px}}
body{display:flow-root}
/* Binance and Flap background accents, kept outside the interactive layers. */
body{background:radial-gradient(ellipse at 12% 15%,#f9e9a270,transparent 40%),radial-gradient(ellipse at 87% 78%,#dfecc8a8,transparent 45%),#f5f1e8}
.brand-background{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}.app,.desktop-note,.desktop-tag{z-index:1}.desktop-note,.desktop-tag{pointer-events:none}
.ambient-coin{position:absolute;width:110px;height:110px;border-radius:50%;border:2px solid #e4c66b66;background:linear-gradient(140deg,#fff6ce,#f0b90b17);display:grid;place-items:center;color:#d7b04255;box-shadow:inset 0 0 0 7px #fff8d83d,0 8px 30px #ba9b3308}.ambient-coin svg{width:59%;height:59%}.coin-a{left:7%;top:5%;transform:rotate(-19deg)}.coin-b{right:8%;top:8%;width:162px;height:162px;transform:rotate(16deg);opacity:.7}.coin-c{left:17%;bottom:-43px;width:196px;height:196px;transform:rotate(25deg);opacity:.42}
.ambient-flap{position:absolute;font:italic 800 58px/1 Georgia,serif;color:#78975025;letter-spacing:-3px;border:2px solid #829e4823;border-radius:22px;padding:15px 25px;background:#e7efce22;transform:rotate(-14deg)}.ambient-flap i{font:normal 38px system-ui}.flap-a{left:4%;bottom:12%}.flap-b{right:-22px;top:40%;font-size:83px;transform:rotate(15deg);opacity:.45}.bg-spark{position:absolute;color:#c4a15050;font-size:31px}.spark-a{left:29%;top:12%}.spark-b{right:18%;bottom:8%;font-size:48px}.bg-ring{position:absolute;border:1px dashed #b5bf8c45;border-radius:50%}.ring-a{width:240px;height:240px;right:1%;bottom:-90px}.ring-b{width:150px;height:150px;left:-65px;top:42%}
.bnb-badge{background:linear-gradient(135deg,#f8d66b,#f0b90b);color:#63521b;box-shadow:0 5px 0 #c5a34233}.bnb-badge svg{width:34px;height:34px}.flap-sticker{position:relative;width:150px;margin-top:32px;padding:14px 16px 11px;transform:rotate(-9deg);border-radius:13px;background:#e6efc6;border:1px solid #b8cb8c;box-shadow:0 5px 0 #becd963b;color:#526a39}.flap-sticker>span{font:italic 800 38px/1 Georgia,serif;letter-spacing:-2px}.flap-sticker>i{font:25px system-ui;margin-left:11px;color:#789349}.flap-sticker>small{display:block;letter-spacing:2px;font:7px/2.3 system-ui;color:#89986b}
.board-branding{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:0}.board-bnb{position:absolute;left:21px;top:22px;display:flex;align-items:center;gap:5px;color:#bda13c70;transform:rotate(-8deg)}.board-bnb svg{width:27px;height:27px}.board-bnb b{font:700 11px system-ui;letter-spacing:1px}.board-flap{position:absolute;right:22px;bottom:34px;font:italic bold 24px Georgia,serif;color:#61794654;transform:rotate(-9deg)}.board-flap i{font:19px system-ui}.board-diamond{position:absolute;right:24px;top:22px;font:30px system-ui;color:#bfaa6640}.board-wordmark{color:#839069}
@media(max-width:1000px){.ambient-coin,.ambient-flap,.bg-ring,.bg-spark{opacity:.28}.board-bnb{top:21px;left:19px}.board-flap{right:17px;bottom:31px}}
@media(max-height:750px){.board-bnb svg{width:22px;height:22px}.board-bnb b{font-size:9px}.board-flap{font-size:21px;bottom:25px}}
/* Wallet and social controls share the same calm workshop palette. */
.social-tools{display:flex;gap:7px;align-items:center}.social-x{display:grid;place-items:center;width:30px;height:30px;border:1px solid #dbe1d1;background:#edf1e5;border-radius:10px;font:19px system-ui;color:#486347}.social-x:hover{background:#e0e8d4}.wallet-button{padding:8px 11px;min-height:31px;border-radius:10px;background:#53775a;color:#fffbea;font-size:10px;font-weight:600;box-shadow:0 2px #395d4033;white-space:nowrap}.wallet-button:hover{background:#45694e}.wallet-button.connected{background:#e6eedd;color:#4f6d43;box-shadow:inset 0 0 0 1px #cbd9bc;font:10px ui-monospace,monospace}.wallet-button.wrong-network{background:#eedba9;color:#896825}.levelbar .header-tools{margin-left:auto;gap:1px}.levelbar .icon-button{height:25px;width:25px;font-size:16px}.wallet-dialog{width:min(360px,calc(100% - 36px));border:1px solid #dde4d2;border-radius:24px;background:#fcfbf4;padding:27px;text-align:center;color:#40583d;box-shadow:0 20px 100px #24351b44;max-height:85svh;overflow:auto}.wallet-dialog::backdrop{background:#25362466;backdrop-filter:blur(6px)}.wallet-dialog h2{font-size:23px;margin:12px 0}.wallet-note{font-size:11px;line-height:1.9;color:#8c9780;margin-bottom:20px}.wallet-choice{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#edf1e5;border:1px solid #dce4d0;border-radius:12px;width:100%;padding:13px 14px;font-size:12px;margin-top:9px;color:#506b43}.wallet-choice:hover:not(:disabled){background:#e0eacf}.wallet-choice.disconnect{background:transparent;border-color:#e3dcd1;color:#9b7b63;justify-content:center}.wallet-empty{font-size:12px;color:#7e8d70;line-height:1.9;text-align:left}.wallet-message{min-height:17px;font-size:11px;color:#5a8150;line-height:1.7;margin-bottom:0}.wallet-message.error{color:#bb7055}.wallet-address{font:12px/1.8 ui-monospace,monospace;word-break:break-all;padding:12px;background:#f0f2e8;border-radius:10px;user-select:all}.wallet-network{color:#6d8c59;font-size:11px}
/* Supplied FLAP artwork. */
.ambient-flap.logo-plaque{padding:19px 21px 17px;background:#161a0de6;border:1px solid #b8c58b55;border-radius:15px;box-shadow:0 6px 0 #b9c79d33;opacity:.8;line-height:0;letter-spacing:0}.logo-plaque img{width:143px;height:18px;display:block}.flap-a.logo-plaque{left:5%;bottom:12%;transform:rotate(-12deg)}.flap-b.logo-plaque{right:5%;top:auto;bottom:10%;transform:rotate(12deg);opacity:.35}.flap-sticker{background:#171c0f;border-color:#3e4c25;width:185px;padding:20px 20px 12px}.flap-sticker>img{display:block;width:143px;height:18px}.flap-sticker>small{color:#bccc85;margin-top:6px}.board-flap{background:#1b210c;display:block;padding:6px 7px;border-radius:6px;opacity:.72;bottom:30px;right:17px;line-height:0;transform:rotate(-8deg)}.board-flap img{display:block;width:72px;height:auto}.board-flap i{display:none}@media(max-width:1000px){.flap-a.logo-plaque{left:2%;opacity:.35}.flap-b.logo-plaque{right:2%;opacity:.3}.board-flap{bottom:30px;right:16px}}@media(max-height:750px){.board-flap{bottom:24px;padding:5px 6px}.board-flap img{width:60px}}
.wallet-rewards{margin:0 0 20px;padding:14px 15px;border:1px solid #dce4cc;border-radius:14px;background:#edf2e3;text-align:left}.wallet-rewards>span{display:block;font-size:12px;font-weight:700;color:#526b3e}.wallet-rewards p{margin:8px 0;font-size:12px;line-height:1.8;color:#536649}.wallet-rewards small{display:block;font-size:10px;line-height:1.6;color:#7b896d}
