:root{--cream:#fff6d7;--yellow:#f6d66d;--ink:#173b30;--muted:#69776a;--bg:#f7f6ec;--board:#172f29;--line:#dfdfcd;--accent:#e8b940}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}body::before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 0 0,#fbeabb66,transparent 45%),radial-gradient(ellipse at 100% 100%,#dfe8dc66,transparent 45%);z-index:-1}.app{max-width:960px;margin:auto;padding:28px 36px 18px}header{display:flex;align-items:center;justify-content:space-between;padding-bottom:26px;border-bottom:1px solid var(--line);margin-bottom:28px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:24px;font-weight:800;letter-spacing:1px}.brand img{width:47px;height:47px;object-fit:contain}.brand small{display:block;font-size:10px;letter-spacing:2px;font-weight:600;margin-top:3px;color:var(--muted)}.edition{font-size:14px;color:var(--muted)}.spark{color:var(--accent);font-size:23px;margin-left:12px}main{display:grid;grid-template-columns: minmax(0,440px) minmax(0,264px);gap:32px;justify-content:center;align-items:start}.game-shell{background:var(--board);border-radius:22px;overflow:hidden;box-shadow:0 12px 30px #173b3014;border:1px solid #314a3e;padding:0 22px}.board-top,.board-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#aabfb0;font-size:12px;min-height:46px}.board-top>span:first-child{color:#e9edcc;font-size:14px;font-weight:600}.board-top i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--yellow);margin-right:5px}.board-bottom{min-height:39px}.board-wrap{position:relative;border:1px solid #456150;border-radius:8px;overflow:hidden;background:#11261f}#board{width:100%;height:auto;aspect-ratio:1/2;display:block}.overlay{position:absolute;inset:0;background:#142c25eb;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:22px;color:var(--cream);backdrop-filter:blur(3px)}.overlay.hidden{display:none}.overlay img{width:90px;height:90px;object-fit:contain;margin-bottom:14px;filter:drop-shadow(0 12px 12px #0004);animation:bob 3.5s ease-in-out infinite}.eyebrow{font-size:10px;letter-spacing:1.5px;color:#bcccab;margin:8px 0}.overlay h1{font-size:23px;line-height:1.5;margin:12px 0 6px;font-weight:700}.overlay p:not(.eyebrow){font-size:14px;color:#bac7b5;line-height:1.8;max-width:230px;margin:0 0 26px}.overlay .primary{width:190px}.overlay small{margin-top:18px;font-size:12px;color:#aebca5}.sidebar{display:grid;gap:18px}.label{font-size:14px;color:var(--muted);display:flex;justify-content:space-between}.label span{font-size:11px;letter-spacing:1.2px;color:#84907e}.score-card{background:#f7e8af;border:1px solid #e5d492;padding:21px 22px;border-radius:18px}.score-card>strong{display:block;font-size:42px;line-height:1.3;font-weight:750;letter-spacing:1px;font-variant-numeric:tabular-nums;margin:9px 0 17px}.record{display:flex;justify-content:space-between;font-size:14px;padding-top:14px;border-top:1px solid #d9ce99;color:#626e4c}.record b{color:var(--ink);font-variant-numeric:tabular-nums}.stats{display:grid;grid-template-columns:1fr 1fr;gap:14px}.stats>div{padding:15px 19px;background:#fffdf3;border:1px solid var(--line);border-radius:16px}.stats strong{display:block;margin-top:4px;font-size:27px;font-weight:650;font-variant-numeric:tabular-nums}.next-card{border:1px solid var(--line);border-radius:16px;background:#fffdf3;padding:19px 22px}#next{display:block;width:100%;height:116px;object-fit:contain;margin:6px 0}.progress-label{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.progress{height:5px;border-radius:3px;background:#eae9d8;margin-top:9px;overflow:hidden}.progress>div{height:100%;background:#a8b384;width:0;transition:width .3s}.actions{display:grid;gap:10px}button{font:inherit;cursor:pointer;border:0;user-select:none;-webkit-user-select:none;touch-action:manipulation;transition:background .15s,transform .1s;min-height:48px}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible{outline:3px solid #5c9f83;outline-offset:4px}button:disabled{opacity:.5;cursor:default}.primary{display:flex;justify-content:center;align-items:center;gap:24px;background:var(--yellow);color:#2d4328;font-weight:700;border-radius:12px;border:1px solid #dfbf59}.primary:hover{background:#f9df87}.primary span{font-size:12px}.secondary{background:#e9ecdf;border:1px solid #d6deca;border-radius:12px;color:var(--ink);font-size:14px}.secondary kbd{margin-left:24px;background:#f8faf0}.keys{border-top:1px solid var(--line);padding-top:18px}.keys h2{font-size:14px;margin:0 0 13px;font-weight:650}.keys dl{margin:0;display:grid;gap:10px}.keys dl>div{display:flex;align-items:center;justify-content:space-between;font-size:13px}.keys dt{color:#73816a}.keys dd{margin:0;color:var(--muted)}kbd{display:inline-block;border:1px solid #d4dbc9;border-bottom-width:2px;background:#fffdf5;border-radius:5px;min-width:25px;text-align:center;padding:2px 5px;font:12px system-ui;color:#566a52}.gentle{font-size:13px;line-height:1.8;color:#7d886e;margin:0}.touch-controls{display:none}footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);margin-top:28px;padding-top:18px;font-size:12px;color:#85917f}@keyframes bob{50%{transform:translateY(-6px)}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}@media(pointer:coarse){.touch-controls{display:block;max-width:440px;margin:18px auto 0}.keys{display:none}.touch-row{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.touch-controls button{background:#fffdf3;border:1px solid #d5ddc8;border-bottom:3px solid #d5ddc8;border-radius:12px;font-size:25px;touch-action:none;min-height:61px}.touch-controls small{display:block;font-size:11px;color:var(--muted);margin:2px 0 5px}.touch-controls .drop-button{width:100%;font-size:15px;font-weight:700;background:var(--yellow);border-color:#e0c566;margin-top:9px;min-height:44px}}@media(max-width:640px){.app{padding:16px 14px 20px;max-width:460px}header{padding-bottom:14px;margin-bottom:16px}.brand{font-size:20px;gap:9px}.brand img{width:40px;height:40px}.brand small{font-size:8px}.edition{font-size:12px;max-width:112px;text-align:right;line-height:1.6}.spark{display:none}main{grid-template-columns:minmax(0,1fr) 106px;gap:12px;align-items:start}.game-shell{padding:0 9px;border-radius:16px}.board-top{min-height:35px;justify-content:center}.board-top>span:first-child{font-size:12px}#game-state{display:none}.board-bottom{min-height:27px;font-size:10px;justify-content:center}.board-bottom>span:first-child{display:none}.sidebar{gap:10px}.score-card{padding:12px 10px;border-radius:12px}.score-card .label{font-size:12px}.label span{display:none}.score-card>strong{font-size:23px;margin:8px 0 12px;letter-spacing:0}.record{font-size:11px;gap:5px;flex-wrap:wrap;padding-top:8px}.stats{gap:6px}.stats>div{padding:9px 7px;border-radius:10px}.stats .label{font-size:11px}.stats strong{font-size:20px}.next-card{padding:12px 9px;border-radius:12px}.next-card .label{font-size:12px}#next{height:68px;margin:6px 0}.progress-label{font-size:10px;flex-direction:column;gap:4px}.primary{font-size:13px;gap:8px;min-height:42px;border-radius:10px}.secondary{font-size:12px;min-height:40px}.secondary kbd{display:none}.actions{gap:8px}.keys,.gentle{display:none}.overlay{padding:12px}.overlay img{width:66px;height:66px;margin-bottom:6px}.eyebrow{font-size:7px;letter-spacing:.6px}.overlay h1{font-size:17px;margin-top:8px}.overlay p:not(.eyebrow){font-size:12px;margin-bottom:18px}.overlay .primary{width:150px}.overlay small{font-size:10px;line-height:1.6;margin-top:12px}.touch-controls{display:block;margin-top:14px}.touch-row{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.touch-controls button{background:#fffdf3;border:1px solid #d5ddc8;border-bottom:3px solid #d5ddc8;border-radius:11px;font-size:24px;touch-action:none;min-height:57px}.touch-controls small{display:block;font-size:10px;color:var(--muted);margin:1px 0 4px}.touch-controls .drop-button{width:100%;font-size:14px;font-weight:700;background:var(--yellow);border-color:#e0c566;margin-top:8px;min-height:41px}footer{margin-top:18px;font-size:10px;padding-top:14px;gap:8px}}@media(max-width:350px){main{grid-template-columns:minmax(0,1fr) 92px;gap:8px}.app{padding-left:10px;padding-right:10px}.overlay h1{font-size:15px}.overlay .primary{width:130px}.board-bottom{font-size:8px}.score-card>strong{font-size:20px}}

/* Rounded mochi art: masks remove isolated alpha flecks around the sprite. */
.brand img,.overlay img{border-radius:30%;}

.shop-button{width:100%;min-height:36px;margin-top:14px;border:1px solid #d6c786;border-radius:10px;background:#fff8dc;color:var(--ink);font-size:14px;font-weight:650;display:flex;align-items:center;justify-content:center;gap:7px}.shop-button:hover{background:#fffbed}#shop-dialog{width:min(360px,calc(100vw - 40px));min-height:190px;padding:54px 24px;border:1px solid #e0d49f;border-radius:24px;background:var(--cream);color:var(--ink);box-shadow:0 20px 70px #0d261f33;overflow:visible}#shop-dialog::backdrop{background:#102c2577;backdrop-filter:blur(5px)}#shop-dialog p{margin:22px 0;text-align:center;font-size:23px;font-weight:650;letter-spacing:2px}#shop-close{position:absolute;right:12px;top:10px;width:36px;min-height:36px;border-radius:50%;background:transparent;color:#6b795d;font-size:26px;line-height:1}#shop-close:hover{background:#eddfaf}@media(max-width:640px){.shop-button{min-height:34px;font-size:12px;gap:5px;margin-top:10px}.shop-button svg{width:14px;height:14px}}
/* Wallet and seven friends */
.wallet-mini{display:flex;justify-content:space-between;gap:8px;margin-top:12px;padding-top:11px;border-top:1px solid #d9ce99;font-size:14px;color:#626e4c}.wallet-mini b{color:var(--ink);font-variant-numeric:tabular-nums}.buff-status{margin:0;padding:10px 12px;background:#e5edcf;border:1px solid #cbd9ac;border-radius:12px;font-size:14px;line-height:1.5}.buff-status[hidden]{display:none}
#shop-dialog{width:min(820px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:24px;border-radius:24px;overflow:auto;overscroll-behavior:contain;background:#f8f5e8}#shop-dialog p{margin:0;text-align:left;letter-spacing:0;font-size:14px;font-weight:400;line-height:1.6}#shop-dialog::backdrop{background:#102c2580;backdrop-filter:blur(5px)}.shop-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.shop-kicker{color:#788563;font-size:12px;font-weight:650;letter-spacing:1.5px}.shop-header h2{font-size:25px;margin:5px 0 0;line-height:1.3}#shop-close{position:static;flex-shrink:0;width:42px;min-height:42px;background:#ebe9db}.shop-wallet{display:flex;align-items:center;gap:16px;background:#f6e6a8;border:1px solid #e2cf88;padding:15px 18px;border-radius:16px;flex-wrap:wrap}.shop-wallet>span{font-size:14px;color:#626e4c}.shop-wallet strong{font-size:27px;font-variant-numeric:tabular-nums}.shop-wallet small{margin-left:auto;color:#6a7352;font-size:14px}#shop-dialog .shop-notice{margin:13px 0 18px;color:#727b63;font-size:14px}.shop-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.shop-item{display:grid;grid-template-columns:86px minmax(0,1fr);gap:14px;padding:16px;background:#fffdf6;border:1px solid #e1dfcb;border-radius:18px;align-items:start}.item-art{height:100px;background:#fff;border-radius:13px;overflow:hidden;display:flex;align-items:center;justify-content:center}.item-art img{width:100%;height:100%;object-fit:contain}.item-copy h3{font-size:19px;margin:0 0 5px;line-height:1.4}#shop-dialog .item-copy p{color:#697461;font-size:14px;min-height:45px}.item-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;flex-wrap:wrap}.item-price{font-size:16px;font-weight:750;color:#87702d;white-space:nowrap}.item-footer button{min-height:38px;padding:8px 12px;background:#f6d66d;border:1px solid #dfbf59;color:#2d4328;border-radius:10px;font-size:14px;font-weight:650}.item-footer button:disabled{background:#ebeade;border-color:#e1dfcb;color:#7a826c;opacity:.75}.item-reason{display:block;min-height:20px;font-size:12px;color:#8a8064;margin-top:6px}#shop-dialog .shop-feedback{min-height:24px;margin-top:15px;color:#99722f;font-size:14px}
#board:focus-visible{outline:3px solid var(--yellow);outline-offset:-3px}.target-panel{position:absolute;left:8px;right:8px;top:8px;padding:12px;background:#fff6d7f5;border:1px solid #e3ce7d;border-radius:12px;box-shadow:0 5px 16px #102c2533;color:#173b30}.target-panel[hidden]{display:none}.target-panel strong{font-size:15px;display:block}.target-panel p{font-size:13px;line-height:1.5;margin:5px 0 10px}.target-panel>div{display:flex;gap:8px}.target-panel button{min-height:38px;padding:6px 12px;font-size:13px;flex:1;border-radius:9px}.target-panel #target-cancel{background:#e7ebdc;color:var(--ink)}
@media(max-width:640px){.wallet-mini{font-size:11px;margin-top:8px;padding-top:8px;gap:4px;flex-wrap:wrap}.buff-status{font-size:11px;padding:7px 8px}.shop-items{grid-template-columns:1fr;gap:10px}#shop-dialog{padding:18px 14px;max-height:calc(100dvh - 24px)}.shop-header h2{font-size:22px}.shop-header{margin-bottom:14px}.shop-wallet{padding:11px 14px;gap:10px}.shop-wallet strong{font-size:24px}.shop-wallet small{width:100%;margin-left:0;font-size:13px}#shop-dialog .shop-notice{font-size:13px;margin:11px 0 14px}.shop-item{grid-template-columns:80px minmax(0,1fr);gap:12px;padding:13px}.item-art{height:100px}.item-copy h3{font-size:18px}#shop-dialog .item-copy p{font-size:14px;min-height:0}.item-footer{margin-top:10px}.target-panel{left:4px;right:4px;padding:8px;top:5px}.target-panel strong{font-size:13px}.target-panel p{font-size:12px;line-height:1.4;margin-bottom:7px}.target-panel button{font-size:12px;padding:5px 7px;min-height:34px}}

/* Keep every board cell available for tool selection. */
.target-panel{position:static;margin:9px 0;box-shadow:none}

.shop-header{position:sticky;top:-24px;background:#f8f5e8;z-index:2;padding:6px 0}@media(max-width:640px){.shop-header{top:-18px}}

footer{display:block}.footer-meta{display:flex;justify-content:space-between;gap:8px}.legal-notice{margin-top:15px;text-align:center;color:var(--muted);font-size:13px;line-height:1.8}.legal-notice p{margin:0}@media(max-width:640px){.legal-notice{font-size:12px;margin-top:12px}}

.legal-notice p+p{margin-top:14px}
