*{box-sizing:border-box}body{margin:0;min-height:100dvh;overflow:hidden;color:#fff7d4;background:#123b30 url('assets/fortune-orbs-hero.webp') center/cover fixed;font-family:ui-rounded,"PingFang SC",sans-serif}.app{min-height:100dvh;padding:clamp(10px,2vw,24px);display:grid;grid-template-rows:auto auto auto 1fr auto;gap:10px;background:linear-gradient(#09291ca8,#09291ce8)}header{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#ffe8a0}header a,header button,footer button{color:inherit;text-decoration:none;border:1px solid #ffe09980;background:#123b2bb8;border-radius:999px;padding:7px 11px}.title{text-align:center}.title p{margin:0;color:#f8d67e;letter-spacing:5px;font-size:10px}.title h1{font-size:clamp(30px,5vw,48px);margin:4px 0;color:#fff3c8;text-shadow:0 3px 12px #072016}.title small{color:#e3f0cf}.hud{display:grid;grid-template-columns:1.5fr .75fr .75fr;max-width:760px;width:100%;margin:auto;border:1px solid #f8df9444;border-radius:16px;background:#0a2b20df;overflow:hidden}.hud div{padding:9px 13px;border-right:1px solid #ead78133}.hud div:last-child{border:0}.hud b{display:block;color:#fff0ba;font-size:16px}.hud span,.hud em{display:block;color:#c7ddc2;font-size:10px;font-style:normal;margin-top:2px}#board{width:min(760px,100%);min-height:0;aspect-ratio:1.55;margin:auto;position:relative;overflow:hidden;border:5px solid #c89b45;border-radius:28px;background:radial-gradient(circle at 50% 43%,#3e7b57,#113a2b 72%);box-shadow:inset 0 0 0 5px #0b281dcc,inset 0 0 50px #ecbf6555,0 15px 40px #05150dcc}.glow{position:absolute;inset:0;background:radial-gradient(circle at center,#ffe78e20,transparent 43%);pointer-events:none}.orb{position:absolute;width:clamp(58px,10vw,88px);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;user-select:none;touch-action:none;cursor:grab;border:3px solid #fff7c180;box-shadow:inset 9px 10px 13px #ffffff55,inset -10px -12px 18px #003a2a88,0 7px 14px #001c1288;color:#fffde2;font-size:clamp(24px,4vw,38px);text-shadow:0 2px 2px #163421;font-weight:900}.orb:before{content:"";position:absolute;top:13%;left:18%;width:30%;height:18%;border-radius:50%;background:#fff9df9c;filter:blur(2px)}.orb[data-level="1"]{background:radial-gradient(circle at 35% 25%,#d7ffab,#20a85d 54%,#087044)}.orb[data-level="2"]{background:radial-gradient(circle at 35% 25%,#baffff,#1baec0 54%,#08708a)}.orb[data-level="3"]{background:radial-gradient(circle at 35% 25%,#fff8bb,#e3aa2f 54%,#95610a)}.orb[data-level="4"]{background:radial-gradient(circle at 35% 25%,#ffd0e5,#e84c70 54%,#9b1233)}.orb[data-level="5"]{background:radial-gradient(circle at 35% 25%,#f5e7ff,#9764d6 54%,#52248c)}.orb.drag{cursor:grabbing;z-index:5;filter:brightness(1.2);transform:scale(1.08)}.burst{position:absolute;width:120px;height:120px;border:4px solid #ffe486;border-radius:50%;pointer-events:none;animation:burst .55s ease-out forwards}@keyframes burst{to{transform:scale(2);opacity:0}}footer{max-width:760px;width:100%;margin:auto;display:flex;justify-content:space-between;align-items:center;color:#e6edce;font-size:12px}#result{position:fixed;inset:0;display:grid;place-items:center;background:#071d16ba;z-index:10}#result article{width:min(390px,86vw);padding:30px;border:1px solid #ffe19a;background:linear-gradient(145deg,#26563c,#0b2b20);border-radius:26px;text-align:center;box-shadow:0 22px 60px #000}.result{}#result p{color:#ffe18e;letter-spacing:5px}#result h2{font-size:32px;margin:8px}#result b{display:block;margin:14px;font-size:22px;color:#fff5bf}#result button{border:0;border-radius:12px;padding:12px 25px;background:linear-gradient(90deg,#d19b35,#ffefa7,#cf9030);color:#173324;font-weight:800;font-size:16px}@media(max-width:600px){.app{gap:7px}.title h1{font-size:31px}.title small{font-size:11px}.hud{border-radius:12px}.hud div{padding:7px 9px}.hud b{font-size:14px}#board{border-width:3px;border-radius:19px;aspect-ratio:1.15}.orb{width:58px}footer{font-size:10px}}
#result[hidden]{display:none}
.orb{border:0;box-shadow:0 8px 18px #001a1288;background-color:transparent!important;background-repeat:no-repeat;background-size:cover;background-position:center;color:transparent;text-shadow:none}.orb:before{display:none}.orb[data-level="1"]{background-image:url('assets/orb-1.webp')}.orb[data-level="2"]{background-image:url('assets/orb-2.webp')}.orb[data-level="3"]{background-image:url('assets/orb-3.webp')}.orb[data-level="4"]{background-image:url('assets/orb-4.webp')}.orb[data-level="5"]{background-image:url('assets/orb-5.webp')}.orb[data-level="6"]{background-image:url('assets/orb-6.webp')}
/* 让每颗素材完整缩放到棋子内，避免只截到玉珠中心。 */
.orb[data-level]{background-size:cover!important;background-position:center!important}
.orb{transition:filter .18s ease,transform .18s ease;will-change:left,top,transform}.orb:hover{filter:brightness(1.12) saturate(1.15);transform:translateY(-2px)}.orb.drag{filter:brightness(1.22) saturate(1.25);transform:scale(1.11);z-index:5}.spark{position:absolute;width:8px;height:8px;border-radius:50%;pointer-events:none;background:radial-gradient(circle,#fff 0 18%,#fff5a4 25%,#e7a32e 72%);box-shadow:0 0 12px #fff3a6;animation:sparkle .7s cubic-bezier(.12,.68,.3,1) var(--delay) forwards;z-index:6}@keyframes sparkle{to{transform:translate(var(--x),var(--y)) scale(.1);opacity:0}}.impact{animation:impact .3s ease-out}.burst{z-index:5;background:radial-gradient(circle,#fffbdc 0 5%,#ffd65e80 7% 22%,transparent 24%);border:3px solid #ffe486;box-shadow:0 0 22px #ffe580;animation:burst .64s ease-out forwards}@keyframes impact{25%{transform:translate(3px,-2px)}50%{transform:translate(-3px,2px)}75%{transform:translate(2px,1px)}}
/* 更鲜亮的玉台与更有存在感的宝珠。 */
.app{background:linear-gradient(#06321b66,#082719a6)}
#board{background:radial-gradient(circle at 48% 40%,#69b778 0%,#28694d 44%,#123d2e 100%);box-shadow:inset 0 0 0 5px #0b281dcc,inset 0 0 70px #ffe17d55,0 15px 42px #031208cc}
.orb{width:clamp(58px,9.5vw,92px);filter:drop-shadow(0 8px 8px #00190fcc)}
#result small{display:block;margin:0 auto 12px;max-width:260px;line-height:1.6;color:#e8f1cf}
@media(max-width:600px){.orb{width:60px}}
.hud{grid-template-columns:1.45fr .7fr .7fr .55fr}.progress-wrap{width:min(760px,100%);height:7px;margin:auto;border-radius:99px;overflow:hidden;background:#09251bc9;box-shadow:inset 0 1px 2px #00190d}.progress-wrap i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#e7ab37,#fff2a5,#56d8a2);box-shadow:0 0 14px #ffe681;transition:width .3s ease}.orb.blessed{filter:drop-shadow(0 0 11px #fff09b) drop-shadow(0 8px 8px #00190fcc);animation:blessing 1.35s ease-in-out infinite}.orb.blessed:after{content:'✦';position:absolute;right:-8px;top:-10px;font-size:23px;color:#fff5a6;text-shadow:0 0 9px #ffb92d;animation:twinkle .9s ease-in-out infinite}.burst.grand{width:145px;height:145px;border-width:5px}@keyframes blessing{50%{filter:brightness(1.2) saturate(1.2) drop-shadow(0 0 16px #fff5a0)}}@keyframes twinkle{50%{transform:scale(1.35) rotate(35deg)}}
@media(max-width:600px){.hud{grid-template-columns:1.35fr .75fr .75fr .55fr}.hud div{padding:7px 6px}.hud b{font-size:12px}.hud em{font-size:9px}.progress-wrap{height:5px}}
/* 棋盘固定在可视区域内，所有 12 至 15 颗珠子首屏可操作。 */
.app{height:100dvh;min-height:0;grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
#board{height:100%;aspect-ratio:auto}
@media(max-width:600px){.app{padding:max(8px,env(safe-area-inset-top)) 9px max(8px,env(safe-area-inset-bottom));gap:5px}.title h1{margin:1px 0;font-size:28px}.title p{font-size:9px}.title small{font-size:10px}.hud{border-radius:10px}#board{border-radius:16px}footer{min-height:16px}}
.difficulty{display:flex;justify-content:center;gap:8px}.difficulty button{border:1px solid #ffe6a477;background:#0a2b20bb;color:#dfe9c4;padding:6px 16px;border-radius:99px;font:600 12px/1 ui-rounded,"PingFang SC",sans-serif}.difficulty button.active{color:#1b3726;background:linear-gradient(100deg,#efbd49,#fff2ae);box-shadow:0 0 14px #f4cf6d66}.rule{max-width:760px;width:100%;margin:0 auto;color:#f6e5a7;font-size:11px;text-align:center;min-height:14px;text-shadow:0 1px 3px #042416}.app{grid-template-rows:auto auto auto auto auto minmax(0,1fr) auto}.orb{transition:filter .18s ease,transform .18s ease,left .12s ease,top .12s ease}@media(max-width:600px){.difficulty{gap:6px}.difficulty button{padding:5px 13px;font-size:11px}.rule{font-size:10px}.app{grid-template-rows:auto auto auto auto auto minmax(0,1fr) auto}.orb{width:52px}}
.app{grid-template-rows:auto auto auto auto auto auto minmax(0,1fr) auto}
@media(max-width:600px){.app{grid-template-rows:auto auto auto auto auto auto minmax(0,1fr) auto}}
/* 更开阔的玉盘，给随机排布留出充足策略空间。 */
.app{padding:clamp(7px,1.25vw,16px);gap:6px}
.title h1{font-size:clamp(28px,4.2vw,43px);margin:2px 0}.title p{line-height:1}.title small{line-height:1.2}
#board{width:min(920px,100%);border-width:5px;border-radius:30px}
@media(min-width:900px){#board{min-height:410px}.hud,.progress-wrap,.rule,footer{max-width:820px}}
@media(max-width:600px){.app{gap:4px}.title h1{font-size:27px}#board{border-radius:18px}}
#result .blessing{margin:12px auto 18px;max-width:275px;padding:10px 13px;border-radius:12px;background:#fff5c516;color:#fff3c1;font-size:14px;line-height:1.65;letter-spacing:.3px}
/* 文字改用更具东方气质的衬线字，核心数字则保持清晰易读。 */
body{font-family:"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",sans-serif}h1,h2,.title p,#result-title{font-family:"STKaiti","KaiTi","Songti SC","Noto Serif CJK SC",serif;font-weight:800}.title h1{letter-spacing:.09em;text-shadow:0 3px 0 #684515,0 9px 25px #062419}.hud b{font-family:"Georgia","Songti SC",serif;letter-spacing:.03em}.title small,#mission,.rule,footer{font-family:"STKaiti","KaiTi","Songti SC",serif;font-size:13px}.difficulty button{font-family:"STKaiti","KaiTi","Songti SC",serif;font-size:14px}
#celebration-layer{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:9}.firework,.halo{position:absolute;border-radius:50%;border:3px solid #fff3a6;box-shadow:0 0 12px #ffd75d,0 0 30px #ff9368;animation:firework 1.35s ease-out var(--delay) both}.firework{width:14px;height:14px}.halo{width:65px;height:65px;border-color:#85f4d4;box-shadow:0 0 20px #8bffe5;animation-name:halo}.confetti,.petal,.gold-coin,.victory-star{position:absolute;animation:drift 1.8s cubic-bezier(.14,.62,.21,1) var(--delay) both}.confetti{width:8px;height:15px;border-radius:2px;background:linear-gradient(#ffdd68,#f177b2);box-shadow:10px 7px #79eddd,-10px 13px #9c82ef}.petal:after{content:'✿';color:#ffc1dd;font-size:25px;text-shadow:0 0 8px #fff}.gold-coin:after{content:'✦';color:#ffe066;font-size:28px;text-shadow:0 0 12px #ffab38}.victory-star:after{content:'✧';color:#fff9d1;font-size:30px;text-shadow:0 0 14px #ffcc55}.lucky-cloud{position:absolute;font-style:normal;animation:cloud-float 2.5s ease-in-out var(--delay) both}.lucky-cloud:after{content:'☁';font-size:66px;color:#e5fff2cc;text-shadow:0 0 18px #7ee2c7}.ribbon{position:absolute;width:92px;height:18px;background:linear-gradient(90deg,transparent,#ffd95e,#fff4b0,#ffad72,transparent);filter:drop-shadow(0 0 7px #ffcb69);transform:rotate(-25deg);animation:ribbon 1.5s ease-out var(--delay) both}.cheer-word{position:absolute;color:#fff7c4;font-family:"STKaiti","KaiTi",serif;font-size:clamp(22px,3.8vw,42px);text-shadow:0 2px 0 #a8492b,0 0 18px #ffcd55;animation:cheer-pop 1.35s cubic-bezier(.15,.72,.27,1) both}.praise{position:absolute;z-index:7;color:#fff0a4;font-family:"STKaiti","KaiTi",serif;font-size:20px;text-shadow:0 2px 7px #8b4a16;pointer-events:none;animation:praise-rise 1s ease-out both}@keyframes firework{0%{transform:scale(.1);opacity:1}70%{transform:scale(8);opacity:.8}100%{transform:scale(11);opacity:0}}@keyframes halo{to{transform:scale(5);opacity:0}}@keyframes drift{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}@keyframes cloud-float{0%{transform:translateX(-40px);opacity:0}25%{opacity:.8}100%{transform:translateX(160px) translateY(-30px);opacity:0}}@keyframes ribbon{0%{transform:translateX(-90px) rotate(-25deg);opacity:0}30%{opacity:1}100%{transform:translateX(240px) rotate(18deg);opacity:0}}@keyframes cheer-pop{0%{transform:scale(.25) translateY(35px);opacity:0}20%{opacity:1}65%{transform:scale(1.18) translateY(-10px);opacity:1}100%{transform:scale(.95) translateY(-42px);opacity:0}}@keyframes praise-rise{to{transform:translateY(-54px) scale(1.18);opacity:0}}@keyframes screen-flash{0%{opacity:0}18%{opacity:1}100%{opacity:0}}#result.show article{animation:victory-card .7s cubic-bezier(.14,.8,.24,1) both}@keyframes victory-card{0%{transform:scale(.55) translateY(36px);opacity:0}65%{transform:scale(1.04) translateY(-5px)}100%{transform:scale(1);opacity:1}}
/* 通关祝福作为结算页的情绪主角：高对比色彩、闪光和跳动。 */
#result .blessing{position:relative;isolation:isolate;margin:16px auto 20px;max-width:300px;padding:14px 22px;border:1px solid #fff1a6;border-radius:16px;background:linear-gradient(120deg,#8d3d2b,#d77735 33%,#f3c64c 50%,#d77735 67%,#8d3d2b);background-size:240% 100%;color:#fffde0;font-family:"STKaiti","KaiTi","Songti SC",serif;font-size:18px;font-weight:800;line-height:1.55;letter-spacing:1px;text-shadow:0 2px 1px #6c2f20,0 0 10px #fff4a4;box-shadow:0 0 0 3px #fff5b72b,0 0 24px #ffc854aa;animation:blessing-shimmer 2.1s linear infinite,blessing-bounce 1.05s ease-in-out infinite}
#result .blessing:before,#result .blessing:after{position:absolute;top:50%;font-size:25px;color:#fffbd3;text-shadow:0 0 12px #fff29b;animation:blessing-star .8s ease-in-out infinite alternate}#result .blessing:before{content:'✦';left:-15px}#result .blessing:after{content:'✧';right:-15px;animation-delay:.35s}
#result.show .blessing{animation:blessing-in .55s cubic-bezier(.18,.9,.25,1) both,blessing-shimmer 2.1s linear .55s infinite,blessing-bounce 1.05s ease-in-out .55s infinite}
@keyframes blessing-in{0%{opacity:0;transform:scale(.35) rotate(-5deg)}68%{opacity:1;transform:scale(1.1) rotate(2deg)}100%{transform:scale(1) rotate(0)}}@keyframes blessing-shimmer{to{background-position:240% 0}}@keyframes blessing-bounce{50%{transform:translateY(-6px) scale(1.025);filter:brightness(1.13)}}@keyframes blessing-star{to{transform:scale(1.5) rotate(25deg);opacity:.6}}
.orb[data-level="7"],.preview-orb[data-level="7"]{background-image:url('assets/orb-7.webp')}.orb[data-level="8"],.preview-orb[data-level="8"]{background-image:url('assets/orb-8.webp')}.orb[data-level="9"],.preview-orb[data-level="9"]{background-image:url('assets/orb-9.webp')}.orb[data-level="10"],.preview-orb[data-level="10"]{background-image:url('assets/orb-10.webp')}.orb[data-level="11"],.preview-orb[data-level="11"]{background-image:url('assets/orb-11.webp')}
.next-preview{display:flex;align-items:center;justify-content:center;gap:10px;margin:10px auto 16px;color:#fff2b4;font-family:"STKaiti","KaiTi",serif;font-size:15px;font-weight:700}.next-preview[hidden]{display:none}.preview-orb{display:block;width:54px;aspect-ratio:1;border-radius:50%;background-size:cover;background-position:center;filter:drop-shadow(0 0 9px #ffe57f);animation:preview-pulse 1.4s ease-in-out infinite}@keyframes preview-pulse{50%{transform:scale(1.12) rotate(4deg);filter:brightness(1.15) drop-shadow(0 0 16px #ffdf6b)}}
/* 锦鲤珠放大取景，裁去生成图边缘的暗色场景，保证圆形宝珠与底图一致。 */
.orb[data-level="9"],.preview-orb[data-level="9"]{background-size:126%!important;background-position:center 54%!important}
/* 通关时只让祝福语闪动，结算卡片和遮罩保持稳定，烟花在弹窗后方播放。 */
