*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{--bg:#fff;--text:#111;--muted:#747474;--line:#e9e9e9;--soft:#f7f7f7;--soft2:#f2f2f2;--danger:#d83232;--danger-bg:#fff2f2;--focus:rgba(17,17,17,.08);--radius:11px;--max:960px;--scroll:#c9c9c9;--scroll-hover:#9f9f9f}
html{background:var(--bg);scrollbar-width:thin;scrollbar-color:var(--scroll) transparent}
html::-webkit-scrollbar,body::-webkit-scrollbar,.custom-scroll::-webkit-scrollbar,.textarea::-webkit-scrollbar{width:9px;height:9px}
html::-webkit-scrollbar-track,body::-webkit-scrollbar-track,.custom-scroll::-webkit-scrollbar-track,.textarea::-webkit-scrollbar-track{background:transparent}
html::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb,.custom-scroll::-webkit-scrollbar-thumb,.textarea::-webkit-scrollbar-thumb{background:var(--scroll);border:2px solid #fff;border-radius:999px}
html::-webkit-scrollbar-thumb:hover,body::-webkit-scrollbar-thumb:hover,.custom-scroll::-webkit-scrollbar-thumb:hover,.textarea::-webkit-scrollbar-thumb:hover{background:var(--scroll-hover)}
*{scrollbar-width:thin;scrollbar-color:var(--scroll) transparent}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
body{min-height:100vh}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button{cursor:pointer}.site-header{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.header-inner{width:min(var(--max),calc(100% - 28px));min-height:62px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{font-size:18px;font-weight:800;white-space:nowrap}.nav{display:flex;gap:5px;overflow-x:auto;padding:2px 0;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav a{padding:8px 10px;border-radius:8px;color:#666;font-size:14px;white-space:nowrap;transition:background .16s,color .16s,transform .16s}.nav a:hover,.nav a.active{background:#f4f4f4;color:#111}.nav a:active{transform:scale(.97)}.container{width:min(var(--max),calc(100% - 28px));margin:auto}.hero{min-height:45vh;display:flex;align-items:center;justify-content:center;text-align:center;padding:70px 0 48px}.hero h1{margin:0;font-size:clamp(40px,8vw,68px);letter-spacing:-.05em;line-height:1.05}.hero p{max-width:640px;margin:18px auto 0;color:var(--muted);line-height:1.8;font-size:15px}.eyebrow{font-size:12px;color:#aaa;margin-bottom:12px}.tool-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line);border-left:1px solid var(--line);margin-bottom:60px}.tool-item{min-height:145px;padding:24px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);transition:background .15s,transform .15s}.tool-item:hover{background:#fafafa}.tool-item:active{transform:scale(.992)}.tool-item .n{color:#aaa;font-size:12px;margin-bottom:22px}.tool-item h2{margin:0 0 7px;font-size:20px}.tool-item p{margin:0;color:var(--muted);font-size:14px;line-height:1.65}.footer{text-align:center;color:#aaa;font-size:12px;padding:20px 0 34px}.page-main{min-height:calc(100vh - 63px);display:flex;flex-direction:column}.page-head{text-align:center;padding:38px 0 10px}.page-head h1{margin:0 0 8px;font-size:clamp(28px,6vw,42px);letter-spacing:-.03em}.page-head p{margin:0;color:var(--muted);font-size:14px;line-height:1.7}.toolbar{width:min(880px,calc(100% - 28px));margin:18px auto 0;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.field,.duration-control{display:flex;align-items:center;gap:7px;color:#555;font-size:14px}.field-label{color:#666;white-space:nowrap}.btn,.input,.textarea,.select{border:1px solid #d5d5d5;background:#fff;color:#111;border-radius:var(--radius);outline:none;transition:border-color .16s,box-shadow .16s,background .16s,transform .12s}.btn{height:42px;padding:0 16px;font-weight:600}.btn:hover{background:#f6f6f6;border-color:#c7c7c7}.btn:active{transform:scale(.97)}.btn.primary{background:#111;color:#fff;border-color:#111}.btn.primary:hover{background:#292929}.btn.secondary{background:#fafafa}.btn:disabled{opacity:.38;cursor:not-allowed;transform:none}.input,.select{height:42px;padding:0 12px}.input:hover,.textarea:hover,.select:hover{border-color:#bfbfbf}.input:focus,.textarea:focus,.select:focus{border-color:#111;box-shadow:0 0 0 4px var(--focus)}.input[type=number]{appearance:textfield;-moz-appearance:textfield}.input[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.textarea{width:100%;min-height:155px;padding:14px 15px;resize:vertical;line-height:1.65}.select-wrap{position:relative;display:inline-flex;align-items:center}.select-wrap::after{content:"";position:absolute;right:14px;top:50%;width:7px;height:7px;border-right:1.5px solid #777;border-bottom:1.5px solid #777;transform:translateY(-70%) rotate(45deg);pointer-events:none}.select{appearance:none;-webkit-appearance:none;padding:0 38px 0 12px;cursor:pointer;min-width:100px}.check-control{position:relative;display:inline-flex;align-items:center;gap:9px;cursor:pointer;user-select:none;color:#555;font-size:14px}.check-control input{appearance:none;-webkit-appearance:none;width:20px;height:20px;margin:0;border:1px solid #c9c9c9;border-radius:6px;background:#fff;display:grid;place-items:center;transition:background .16s,border-color .16s,box-shadow .16s,transform .12s}.check-control input::after{content:"";width:8px;height:4px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) scale(0);margin-top:-2px;transition:transform .13s ease}.check-control input:hover{border-color:#8f8f8f}.check-control input:focus-visible{box-shadow:0 0 0 4px var(--focus)}.check-control input:checked{background:#111;border-color:#111}.check-control input:checked::after{transform:rotate(-45deg) scale(1)}.check-control:active input{transform:scale(.92)}.block-controls{width:min(680px,calc(100% - 28px));margin:18px auto 0}.inline-actions{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.center-stage{flex:1;min-height:420px;display:flex;align-items:center;justify-content:center;text-align:center;padding:28px 16px 86px}.result-wrap{width:min(740px,94vw);display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}.result-text{max-width:100%;font-size:clamp(44px,11vw,96px);font-weight:800;letter-spacing:-.05em;line-height:1.08;word-break:break-word}.result-text.medium{font-size:clamp(34px,8vw,70px)}.result-text.small{font-size:clamp(25px,6vw,50px)}.result-sub{color:#888;font-size:14px;line-height:1.6}.result-image{display:none;max-width:100%;max-height:62vh;object-fit:contain}.empty{color:#aaa;line-height:1.8}.status{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);border:1px solid #e7e7e7;background:rgba(255,255,255,.96);color:#666;border-radius:999px;padding:8px 13px;font-size:12px;white-space:nowrap;z-index:20;box-shadow:0 4px 18px rgba(0,0,0,.04)}.upload-wrap{position:relative}.upload-wrap input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.upload-wrap:has(input:disabled){opacity:.38;pointer-events:none}.image-strip{position:fixed;top:78px;right:12px;display:flex;flex-direction:column;gap:6px;max-height:calc(100vh - 110px);overflow:auto;padding:2px}.thumb{width:56px;height:56px;position:relative;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}.thumb img{width:100%;height:100%;object-fit:cover}.thumb-delete{position:absolute;top:4px;right:4px;width:23px;height:23px;padding:0;border:0;border-radius:7px;background:rgba(255,255,255,.96);color:var(--danger);box-shadow:0 2px 9px rgba(0,0,0,.13);display:grid;place-items:center;transition:transform .12s,background .16s}.thumb-delete:hover{background:var(--danger-bg)}.thumb-delete:active{transform:scale(.9)}.thumb-delete svg{width:13px;height:13px;display:block}.options-grid{width:min(740px,calc(100% - 28px));margin:18px auto 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.option-line{position:relative}.option-line .input{width:100%;height:50px;padding:0 45px 0 14px}.option-delete{position:absolute;top:7px;right:7px;width:36px;height:36px;border:0;border-radius:9px;background:transparent;color:#aaa;display:grid;place-items:center;transition:background .16s,color .16s,transform .12s}.option-delete:hover{background:var(--danger-bg);color:var(--danger)}.option-delete:active{transform:scale(.91)}.option-delete:disabled{opacity:.3;cursor:not-allowed}.option-delete svg{width:17px;height:17px;display:block}.input.w90{width:90px}.input.w76{width:76px}.result-hidden{display:none}.muted-count{font-size:13px;color:#777}.dice-row{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;max-width:760px}.die{width:86px;height:86px;border:1px solid #d9d9d9;border-radius:18px;display:grid;place-items:center;background:#fff;font-size:34px;font-weight:800;box-shadow:0 5px 18px rgba(0,0,0,.035);transition:transform .12s}.die.flash{animation:dieFlash .11s linear}.flash{animation:flash .11s linear}.winner{animation:winner .42s cubic-bezier(.2,.8,.2,1)}@keyframes flash{from{opacity:.32;transform:scale(.985);filter:blur(1px)}to{opacity:1;transform:scale(1);filter:blur(0)}}@keyframes winner{0%{opacity:.35;transform:scale(.91)}68%{transform:scale(1.025)}100%{opacity:1;transform:scale(1)}}@keyframes dieFlash{from{transform:rotate(-5deg) scale(.93)}to{transform:rotate(0) scale(1)}}
@media(max-width:720px){html::-webkit-scrollbar,body::-webkit-scrollbar{width:6px;height:6px}.header-inner{width:100%;padding:7px 12px 8px;min-height:unset;flex-direction:column;align-items:stretch;gap:5px}.brand{text-align:center}.nav{padding-bottom:1px}.nav a{font-size:13px;padding:7px 9px}.hero{min-height:38vh;padding:48px 0 36px}.hero p{font-size:14px}.tool-list{grid-template-columns:1fr}.tool-item{min-height:122px;padding:20px}.page-main{min-height:calc(100vh - 92px)}.page-head{padding:26px 0 8px}.toolbar{margin-top:14px;gap:8px}.btn,.input,.select{height:39px;font-size:13px}.select{padding-right:33px}.center-stage{min-height:350px;padding-bottom:108px}.image-strip{top:auto;right:auto;left:50%;bottom:52px;transform:translateX(-50%);width:calc(100% - 24px);flex-direction:row;max-height:none;overflow-x:auto}.thumb{flex:0 0 46px;width:46px;height:46px}.options-grid{grid-template-columns:1fr}.option-line .input{height:48px}.option-delete{top:6px;right:6px}.status{bottom:10px}.block-controls{margin-top:14px}.die{width:70px;height:70px;border-radius:15px;font-size:28px}}


/* Custom countdown select card */
.custom-select{position:relative;display:inline-block;min-width:108px}
.custom-select-trigger{width:100%;height:42px;padding:0 11px 0 13px;border:1px solid #d5d5d5;border-radius:var(--radius);background:#fff;color:#111;display:flex;align-items:center;justify-content:space-between;gap:14px;font-weight:500;outline:none;transition:border-color .16s,box-shadow .16s,background .16s,transform .12s}
.custom-select-trigger:hover{border-color:#bdbdbd;background:#fafafa}
.custom-select-trigger:focus-visible{border-color:#111;box-shadow:0 0 0 4px var(--focus)}
.custom-select-trigger:active{transform:scale(.98)}
.custom-select-trigger svg{width:17px;height:17px;color:#777;transition:transform .18s ease}
.custom-select.open .custom-select-trigger svg{transform:rotate(180deg)}
.custom-select-card{position:absolute;left:50%;top:calc(100% + 8px);z-index:80;width:164px;max-height:252px;overflow:auto;padding:7px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;background:#fff;border:1px solid #e2e2e2;border-radius:14px;box-shadow:0 16px 42px rgba(0,0,0,.12);opacity:0;visibility:hidden;transform:translate(-50%,-5px) scale(.98);transform-origin:top center;transition:opacity .16s ease,transform .16s ease,visibility .16s}
.custom-select.open .custom-select-card{opacity:1;visibility:visible;transform:translate(-50%,0) scale(1)}
.custom-select-option{height:38px;padding:0 9px;border:0;border-radius:9px;background:#fff;color:#555;font-size:13px;font-weight:500;text-align:center;transition:background .14s,color .14s,transform .1s}
.custom-select-option:hover{background:#f4f4f4;color:#111}
.custom-select-option:active{transform:scale(.95)}
.custom-select-option.selected{background:#111;color:#fff}
.custom-select.disabled{opacity:.42;pointer-events:none}
.custom-select-card::-webkit-scrollbar{width:6px;height:6px}
.custom-select-card::-webkit-scrollbar-track{background:transparent}
.custom-select-card::-webkit-scrollbar-thumb{background:#d2d2d2;border-radius:999px}
.custom-select-card::-webkit-scrollbar-thumb:hover{background:#aaa}
.custom-select-card{scrollbar-width:thin;scrollbar-color:#d2d2d2 transparent}

/* Luck: daily three draws */
.luck-stage{padding-top:18px}
.luck-result-wrap{gap:20px}
.luck-results{width:min(620px,92vw);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:2px}
.luck-item{min-height:92px;padding:15px 12px;border:1px solid #e7e7e7;border-radius:14px;background:#fff;display:flex;flex-direction:column;justify-content:center;gap:7px;text-align:left}
.luck-item-index{font-size:11px;color:#aaa}
.luck-item-value{font-size:18px;font-weight:750;line-height:1.3;color:#111}
.luck-item-time{font-size:11px;color:#aaa}
.luck-item.latest{border-color:#cfcfcf;background:#fafafa;animation:luckIn .34s ease-out}
@keyframes luckIn{from{opacity:.2;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

@media(max-width:720px){
  .custom-select-trigger{height:39px;font-size:13px}
  .custom-select-card{width:156px}
  .luck-results{grid-template-columns:1fr;width:min(430px,94vw)}
  .luck-item{min-height:74px;padding:12px 13px}
}


/* ===== 3D fortune drawing ===== */
.luck-stage{align-items:flex-start;padding-top:24px}
.luck-result-wrap{gap:18px}
.fortune-scene{--wood:#c78c49;--wood-dark:#8f5525;--red:#7e1f1a;position:relative;width:300px;height:330px;display:grid;place-items:end center;perspective:900px;perspective-origin:50% 36%;margin:0 auto 2px;user-select:none}
.fortune-floor-shadow{position:absolute;left:50%;bottom:11px;width:200px;height:34px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(56,30,12,.24),rgba(56,30,12,0) 70%);filter:blur(5px)}
.fortune-tube-wrap{position:relative;width:210px;height:305px;transform-style:preserve-3d;transform:rotateX(-2deg)}
.fortune-tube{position:absolute;inset:0;transform-style:preserve-3d;transform-origin:50% 82%}
.fortune-rim{position:absolute;z-index:12;left:31px;top:102px;width:148px;height:42px;border-radius:50%;background:linear-gradient(180deg,#562019 0%,#9e4737 35%,#4d1813 78%,#2d0e0b 100%);box-shadow:inset 0 5px 8px rgba(255,255,255,.12),inset 0 -7px 12px rgba(0,0,0,.28),0 5px 9px rgba(0,0,0,.16);transform:rotateX(64deg)}
.fortune-rim::after{content:"";position:absolute;inset:8px 13px;border-radius:50%;background:radial-gradient(ellipse at 50% 62%,#3b1810 0 47%,#160806 72%);box-shadow:inset 0 3px 8px rgba(0,0,0,.7)}
.tube-body{position:absolute;z-index:10;left:38px;top:118px;width:134px;height:158px;border-radius:18px 18px 43px 43px/14px 14px 27px 27px;background:linear-gradient(90deg,#571815 0%,#8c2922 12%,#b74836 31%,#76221c 58%,#a73a2e 80%,#501512 100%);box-shadow:inset 9px 0 18px rgba(255,255,255,.07),inset -12px 0 22px rgba(0,0,0,.25),0 17px 25px rgba(72,28,14,.18);border:1px solid #6a211b;transform:translateZ(3px)}
.tube-body::before,.tube-body::after{content:"";position:absolute;left:8px;right:8px;height:4px;border-radius:999px;background:linear-gradient(90deg,#d99d53,#8f5428,#d8a05f);box-shadow:0 1px 2px rgba(0,0,0,.25)}
.tube-body::before{top:18px}.tube-body::after{bottom:19px}
.tube-body span{position:absolute;top:53px;left:22px;font-size:12px;letter-spacing:.18em;color:#eac68d;writing-mode:vertical-rl;opacity:.75}
.tube-body b{position:absolute;top:40px;left:50%;transform:translateX(-50%);font-family:serif;font-size:50px;font-weight:600;color:#ebc782;text-shadow:0 2px 0 rgba(74,25,17,.8),0 0 12px rgba(255,210,125,.16)}
.tube-base{position:absolute;z-index:9;left:32px;top:258px;width:146px;height:31px;border-radius:50%;background:linear-gradient(180deg,#7a291f,#4c1712);box-shadow:0 10px 16px rgba(64,28,13,.18),inset 0 3px 4px rgba(255,255,255,.08)}
.tube-stick,.drawn-stick{position:absolute;z-index:7;top:22px;left:96px;width:13px;height:154px;border-radius:6px 6px 3px 3px;background:linear-gradient(90deg,#8f5a27 0%,#dca85d 27%,#f0c97e 50%,#c58a42 78%,#80501f 100%);border:1px solid rgba(111,69,28,.35);box-shadow:1px 5px 7px rgba(39,20,7,.18);transform-origin:50% 94%}
.tube-stick::before,.drawn-stick::before{content:"";position:absolute;top:8px;left:3px;width:5px;height:45px;border-radius:4px;background:rgba(95,47,18,.15)}
.s1{transform:translateX(-55px) rotate(-13deg) translateZ(-13px)}.s2{transform:translateX(-40px) rotate(-8deg) translateZ(4px)}.s3{transform:translateX(-26px) rotate(-4deg) translateZ(-7px)}.s4{transform:translateX(-11px) rotate(-2deg) translateZ(8px)}.s5{transform:translateX(7px) rotate(2deg) translateZ(-2px)}.s6{transform:translateX(23px) rotate(5deg) translateZ(7px)}.s7{transform:translateX(39px) rotate(8deg) translateZ(-8px)}.s8{transform:translateX(53px) rotate(12deg) translateZ(3px)}.s9{transform:translateX(0) rotate(0deg) translateZ(-14px)}
.drawn-stick{z-index:20;left:99px;top:35px;height:190px;width:16px;opacity:0;transform:translateY(40px) rotate(0deg) translateZ(30px);background:linear-gradient(90deg,#a76a2d,#f0c77c 32%,#ffe0a2 53%,#c78b42 82%,#8a5526);box-shadow:3px 8px 18px rgba(50,26,8,.24)}
.stick-head{position:absolute;top:8px;left:50%;transform:translateX(-50%);width:20px;height:20px;border-radius:5px;background:#8c281e;color:#f6d592;font-size:11px;font-family:serif;display:grid;place-items:center;box-shadow:0 2px 4px rgba(0,0,0,.18)}
.stick-text{position:absolute;top:38px;left:50%;transform:translateX(-50%);font-family:serif;font-weight:700;font-size:12px;line-height:1.08;writing-mode:vertical-rl;color:#5e3118;letter-spacing:.08em;white-space:nowrap;max-height:132px;overflow:hidden}
.fortune-scene.is-shaking .fortune-tube{animation:tubeShake .26s ease-in-out infinite alternate}
.fortune-scene.is-shaking .tube-stick{animation:stickRattle .19s ease-in-out infinite alternate}
.fortune-scene.is-shaking .s2,.fortune-scene.is-shaking .s5,.fortune-scene.is-shaking .s8{animation-delay:-.07s}.fortune-scene.is-shaking .s3,.fortune-scene.is-shaking .s6{animation-delay:-.12s}
.fortune-scene.is-revealing .drawn-stick{animation:drawStick 1s cubic-bezier(.16,.78,.22,1) forwards}
@keyframes tubeShake{0%{transform:translate3d(-5px,1px,0) rotateZ(-2.8deg) rotateY(-2deg)}100%{transform:translate3d(5px,-2px,0) rotateZ(3deg) rotateY(2deg)}}
@keyframes stickRattle{0%{margin-top:-3px}100%{margin-top:7px}}
@keyframes drawStick{0%{opacity:0;transform:translateY(48px) rotate(-3deg) translateZ(30px)}18%{opacity:1}70%{transform:translateY(-119px) rotate(3deg) translateZ(54px)}100%{opacity:1;transform:translateY(-106px) rotate(1deg) translateZ(58px)}}
.current-fortune{display:flex;align-items:center;gap:10px;min-height:46px;padding:9px 14px;border:1px solid #e7e0d7;border-radius:12px;background:#fffdf9;color:#6a4021}
.current-fortune.result-hidden{display:none}.current-fortune-label{font-size:12px;color:#a07d5d}.current-fortune strong{font-size:20px;font-family:serif;letter-spacing:.04em}
.luck-empty{margin-top:-4px}
.luck-advice{width:min(620px,92vw);padding:20px 21px;border:1px solid #e3e3e3;border-radius:16px;background:linear-gradient(180deg,#fff,#fafafa);text-align:left;box-shadow:0 8px 28px rgba(0,0,0,.035)}
.luck-advice.result-hidden{display:none}.luck-advice-kicker{font-size:11px;color:#aaa;letter-spacing:.12em;margin-bottom:7px}.luck-advice h2{font-size:20px;margin:0 0 9px}.luck-advice p{margin:0;color:#666;line-height:1.75;font-size:14px}.advice-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}.advice-tag{padding:6px 9px;border-radius:999px;background:#f2f2f2;color:#555;font-size:12px}

/* ===== Real 3D dice ===== */
.dice-center-stage{padding-top:20px}.dice-result-wrap{gap:18px}.dice-table{position:relative;width:min(760px,94vw);min-height:230px;display:flex;align-items:center;justify-content:center;perspective:1000px;perspective-origin:50% 36%;border-radius:28px;background:radial-gradient(ellipse at center,rgba(0,0,0,.025),rgba(0,0,0,0) 66%)}
.dice-table::after{content:"";position:absolute;left:12%;right:12%;bottom:31px;height:28px;border-radius:50%;background:radial-gradient(ellipse,rgba(0,0,0,.16),rgba(0,0,0,0) 72%);filter:blur(8px);pointer-events:none}
.dice-row-3d{position:relative;z-index:2;display:flex;gap:30px;align-items:center;justify-content:center;flex-wrap:wrap;padding:54px 22px 68px;transform-style:preserve-3d}
.die-scene{--size:82px;width:var(--size);height:var(--size);perspective:620px;perspective-origin:50% 42%;filter:drop-shadow(0 17px 11px rgba(0,0,0,.14))}
.die-cube{position:relative;width:100%;height:100%;transform-style:preserve-3d;transform:rotateX(-18deg) rotateY(26deg);transition:transform .28s cubic-bezier(.2,.75,.25,1);will-change:transform}
.die-cube.is-rolling{transition:transform .18s linear}
.die-face{position:absolute;inset:0;border:1px solid #d9d9d9;border-radius:17px;background:linear-gradient(145deg,#fff 0%,#f7f7f7 58%,#ececec 100%);box-shadow:inset 6px 6px 12px rgba(255,255,255,.9),inset -7px -7px 13px rgba(0,0,0,.055);backface-visibility:hidden;display:grid;place-items:center}
.die-face.front{transform:translateZ(calc(var(--size)/2))}.die-face.back{transform:rotateY(180deg) translateZ(calc(var(--size)/2))}.die-face.right{transform:rotateY(90deg) translateZ(calc(var(--size)/2))}.die-face.left{transform:rotateY(-90deg) translateZ(calc(var(--size)/2))}.die-face.top{transform:rotateX(90deg) translateZ(calc(var(--size)/2))}.die-face.bottom{transform:rotateX(-90deg) translateZ(calc(var(--size)/2))}
.pips{position:relative;width:64%;height:64%}.pip{position:absolute;width:13px;height:13px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#4f4f4f,#111 64%,#000);box-shadow:inset 1px 1px 2px rgba(255,255,255,.22),0 1px 1px rgba(255,255,255,.7)}
.pip.tl{left:0;top:0}.pip.tc{left:50%;top:0;transform:translateX(-50%)}.pip.tr{right:0;top:0}.pip.ml{left:0;top:50%;transform:translateY(-50%)}.pip.mc{left:50%;top:50%;transform:translate(-50%,-50%)}.pip.mr{right:0;top:50%;transform:translateY(-50%)}.pip.bl{left:0;bottom:0}.pip.bc{left:50%;bottom:0;transform:translateX(-50%)}.pip.br{right:0;bottom:0}
.die-number-face{font-weight:850;font-size:27px;letter-spacing:-.04em;color:#171717}.die-number-face small{position:absolute;right:8px;bottom:7px;color:#aaa;font-size:9px;font-weight:650;letter-spacing:0}
.die-cube.is-final{transition:transform .72s cubic-bezier(.12,.82,.22,1.04)}
.dice-sum{font-size:15px;color:#555;min-height:24px}.dice-empty span{font-size:12px;color:#bbb}
@media(max-width:720px){.fortune-scene{width:260px;height:300px;transform:scale(.9);transform-origin:center bottom;margin-top:-16px;margin-bottom:-15px}.luck-advice{padding:17px}.luck-results{margin-top:0}.dice-table{min-height:210px}.dice-row-3d{gap:22px;padding:52px 14px 62px}.die-scene{--size:68px}.die-face{border-radius:14px}.pip{width:10px;height:10px}.die-number-face{font-size:23px}}
@media(max-width:430px){.dice-row-3d{gap:18px}.die-scene{--size:62px}.fortune-scene{transform:scale(.84);margin-top:-30px;margin-bottom:-24px}}


/* ===== Complete site footer ===== */
.site-footer{margin-top:auto;border-top:1px solid var(--line);background:#fafafa;color:#555}
.footer-inner{width:min(var(--max),calc(100% - 28px));margin:0 auto;padding:34px 0 18px}
.footer-main{display:grid;grid-template-columns:minmax(260px,1.6fr) minmax(150px,.8fr) minmax(150px,.8fr);gap:42px;padding-bottom:28px}
.footer-brand{display:inline-block;font-size:18px;font-weight:800;color:#111;margin-bottom:9px}
.footer-about p{max-width:410px;margin:0;color:#777;font-size:13px;line-height:1.75}
.footer-title{font-size:12px;font-weight:750;color:#999;margin-bottom:11px;letter-spacing:.06em}
.footer-links{display:grid;gap:9px}.footer-links a{width:max-content;max-width:100%;font-size:13px;color:#555;transition:color .15s,transform .15s}.footer-links a:hover{color:#111;transform:translateX(2px)}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-top:16px;border-top:1px solid #e7e7e7;color:#999;font-size:11px}
.legal-page{width:min(820px,calc(100% - 28px));margin:0 auto;padding:46px 0 72px}.legal-head{margin-bottom:32px}.legal-kicker{font-size:11px;color:#aaa;letter-spacing:.12em;margin-bottom:9px}.legal-head h1{margin:0 0 10px;font-size:clamp(30px,6vw,46px);letter-spacing:-.035em}.legal-head p{margin:0;color:#777;line-height:1.75;font-size:14px}.legal-content{display:grid;gap:28px}.legal-section{padding-top:24px;border-top:1px solid var(--line)}.legal-section h2{margin:0 0 10px;font-size:18px}.legal-section p,.legal-section li{color:#666;font-size:14px;line-height:1.82}.legal-section p{margin:0}.legal-section ul{margin:8px 0 0;padding-left:20px}.legal-note{margin-top:10px;color:#999!important;font-size:12px!important}

/* ===== Image shuffle / draw cards ===== */
.image-card-stage{padding-top:22px}.card-table{position:relative;width:min(760px,94vw);height:min(520px,64vh);min-height:400px;display:flex;align-items:center;justify-content:center;perspective:1200px;perspective-origin:50% 42%;overflow:visible}.card-table-shadow{position:absolute;left:50%;top:63%;width:285px;height:44px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(0,0,0,.14),rgba(0,0,0,0) 70%);filter:blur(8px);opacity:0;transition:opacity .25s}.card-table.has-cards .card-table-shadow{opacity:1}.card-deck{position:absolute;width:210px;height:286px;transform-style:preserve-3d;transition:transform .4s cubic-bezier(.2,.8,.2,1)}.shuffle-card,.draw-card{position:absolute;width:210px;height:286px;border-radius:17px;transform-style:preserve-3d}.shuffle-card{left:0;top:0;background:#171717;border:1px solid #252525;box-shadow:0 8px 22px rgba(0,0,0,.12);overflow:hidden;transform:translate3d(0,0,0)}.shuffle-card::after,.draw-card-back::after{content:"";position:absolute;inset:9px;border:1px solid rgba(255,255,255,.32);border-radius:12px;pointer-events:none}.card-back-pattern{position:absolute;inset:14px;border-radius:9px;background-color:#232323;background-image:linear-gradient(45deg,rgba(255,255,255,.07) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.07) 75%),linear-gradient(-45deg,rgba(255,255,255,.07) 25%,transparent 25%,transparent 75%,rgba(255,255,255,.07) 75%);background-size:18px 18px;background-position:0 0,0 9px}.card-back-pattern::after{content:"YOYO";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-25deg);font-weight:850;font-size:25px;letter-spacing:.13em;color:rgba(255,255,255,.17)}.card-back-pattern.large{inset:14px}.c1{transform:translate3d(-5px,6px,-6px) rotate(-1.5deg)}.c2{transform:translate3d(4px,4px,-5px) rotate(1deg)}.c3{transform:translate3d(-3px,2px,-4px) rotate(-.7deg)}.c4{transform:translate3d(3px,1px,-3px) rotate(.8deg)}.c5{transform:translate3d(-2px,0,-2px) rotate(-.4deg)}.c6{transform:translate3d(2px,-1px,-1px) rotate(.4deg)}.c7{transform:translate3d(0,-2px,0)}
.card-table.is-shuffling .c1{animation:shuffleLeft .52s ease-in-out infinite alternate var(--delay,0s)}.card-table.is-shuffling .c2{animation:shuffleRight .47s ease-in-out infinite alternate var(--delay,0s)}.card-table.is-shuffling .c3{animation:shuffleLeft2 .56s ease-in-out infinite alternate var(--delay,0s)}.card-table.is-shuffling .c4{animation:shuffleRight2 .5s ease-in-out infinite alternate var(--delay,0s)}.card-table.is-shuffling .c5{animation:shuffleLeft .44s ease-in-out infinite alternate var(--delay,0s)}.card-table.is-shuffling .c6{animation:shuffleRight .58s ease-in-out infinite alternate var(--delay,0s)}.card-table.is-shuffling .c7{animation:topCardShuffle .48s ease-in-out infinite alternate var(--delay,0s)}
.card-table.is-cutting .c1,.card-table.is-cutting .c2,.card-table.is-cutting .c3{animation:cutLeft .7s cubic-bezier(.2,.8,.2,1) infinite alternate}.card-table.is-cutting .c4,.card-table.is-cutting .c5,.card-table.is-cutting .c6,.card-table.is-cutting .c7{animation:cutRight .7s cubic-bezier(.2,.8,.2,1) infinite alternate}
@keyframes shuffleLeft{0%{transform:translate3d(-5px,4px,0) rotate(-1deg)}48%{transform:translate3d(-138px,-7px,18px) rotate(calc(-7deg + var(--jitter,0deg)))}100%{transform:translate3d(2px,-3px,4px) rotate(.5deg)}}
@keyframes shuffleRight{0%{transform:translate3d(4px,3px,1px) rotate(1deg)}48%{transform:translate3d(140px,7px,20px) rotate(calc(8deg + var(--jitter,0deg)))}100%{transform:translate3d(-2px,-4px,6px) rotate(-.5deg)}}
@keyframes shuffleLeft2{0%{transform:translate3d(0,2px,2px)}50%{transform:translate3d(-108px,28px,23px) rotate(calc(-10deg + var(--jitter,0deg)))}100%{transform:translate3d(5px,-3px,7px)}}
@keyframes shuffleRight2{0%{transform:translate3d(0,0,3px)}50%{transform:translate3d(108px,-25px,25px) rotate(calc(9deg + var(--jitter,0deg)))}100%{transform:translate3d(-4px,-4px,8px)}}
@keyframes topCardShuffle{0%{transform:translate3d(0,-2px,10px)}50%{transform:translate3d(125px,-36px,38px) rotate(11deg)}100%{transform:translate3d(-4px,-5px,12px)}}
@keyframes cutLeft{0%{transform:translate3d(-75px,0,12px) rotate(-3deg)}100%{transform:translate3d(14px,-5px,4px) rotate(.6deg)}}
@keyframes cutRight{0%{transform:translate3d(78px,-8px,18px) rotate(4deg)}100%{transform:translate3d(-10px,3px,8px) rotate(-.5deg)}}
.draw-card{z-index:20;left:50%;top:50%;opacity:0;pointer-events:none;transform:translate(-50%,-50%) translate3d(0,0,70px)}.draw-card-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .82s cubic-bezier(.17,.82,.22,1);transform:rotateY(180deg)}.draw-card-face{position:absolute;inset:0;border-radius:17px;overflow:hidden;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:0 24px 50px rgba(0,0,0,.18)}.draw-card-back{background:#171717;transform:rotateY(180deg);border:1px solid #252525}.draw-card-front{background:#fff;border:1px solid #dedede;display:flex;align-items:center;justify-content:center;padding:8px}.draw-card-front img{display:block;width:100%;height:100%;object-fit:contain;border-radius:11px;background:#fff}.card-table.is-drawing .draw-card{opacity:1;animation:drawFromDeck .72s cubic-bezier(.14,.83,.2,1) forwards}.card-table.show-result .draw-card{opacity:1;transform:translate(-50%,-50%) translate3d(0,-16px,110px)}.card-table.show-result .draw-card-inner{transform:rotateY(0deg)}.card-table.show-result .card-deck{transform:translate3d(-120px,42px,-80px) scale(.82) rotate(-9deg);opacity:.6}.card-table.result-static .card-deck{transform:translate3d(-120px,42px,-80px) scale(.82) rotate(-9deg);opacity:.5}.card-table.result-static .draw-card{transform:translate(-50%,-50%) translate3d(0,-16px,110px)}
@keyframes drawFromDeck{0%{transform:translate(-50%,-50%) translate3d(0,0,32px) scale(.98);opacity:.2}58%{transform:translate(-50%,-50%) translate3d(90px,-76px,100px) rotate(8deg);opacity:1}100%{transform:translate(-50%,-50%) translate3d(0,-16px,110px) rotate(0)}}
.card-empty{position:absolute;z-index:30;margin:0}.card-table.has-cards .card-empty{display:none}.card-table:not(.has-cards) .card-deck,.card-table:not(.has-cards) .draw-card,.card-table:not(.has-cards) .card-table-shadow{display:none}

@media(max-width:720px){.footer-main{grid-template-columns:1fr 1fr;gap:28px 22px}.footer-about{grid-column:1/-1}.footer-bottom{align-items:flex-start;flex-direction:column;gap:6px}.legal-page{padding:34px 0 56px}.card-table{height:430px;min-height:360px}.card-deck,.shuffle-card,.draw-card{width:166px;height:228px;border-radius:14px}.shuffle-card::after,.draw-card-back::after{inset:7px;border-radius:10px}.card-back-pattern{inset:11px}.card-table.show-result .card-deck,.card-table.result-static .card-deck{transform:translate3d(-86px,42px,-80px) scale(.78) rotate(-9deg)}}
@media(max-width:430px){.footer-main{grid-template-columns:1fr}.footer-about{grid-column:auto}.card-table{height:390px;min-height:340px}.card-deck,.shuffle-card,.draw-card{width:148px;height:204px}.card-table.show-result .card-deck,.card-table.result-static .card-deck{transform:translate3d(-72px,48px,-80px) scale(.7) rotate(-9deg)}}


/* ===== 3D 数字摇号机 ===== */
.number-lottery-stage{padding-top:20px}.number-lottery{width:min(760px,96vw);display:flex;flex-direction:column;align-items:center;gap:24px}.lottery-machine{position:relative;width:390px;height:470px;perspective:1000px;transform-style:preserve-3d}.lottery-globe{position:absolute;left:50%;top:0;width:318px;height:318px;transform:translateX(-50%) translateZ(30px);border-radius:50%;overflow:hidden;border:2px solid rgba(120,145,160,.34);background:radial-gradient(circle at 35% 28%,rgba(255,255,255,.92) 0 10%,rgba(226,244,252,.34) 28%,rgba(188,220,235,.17) 58%,rgba(129,167,187,.12) 76%,rgba(255,255,255,.5) 100%);box-shadow:inset -28px -34px 58px rgba(57,103,126,.12),inset 18px 22px 44px rgba(255,255,255,.9),0 28px 46px rgba(33,64,82,.13);backdrop-filter:blur(1.5px)}
.lottery-globe::before{content:"";position:absolute;inset:10px;border-radius:50%;border:1px solid rgba(255,255,255,.75);box-shadow:inset 0 0 28px rgba(255,255,255,.7);z-index:6;pointer-events:none}.lottery-globe::after{content:"";position:absolute;left:52px;right:52px;bottom:20px;height:24px;border-radius:50%;background:rgba(66,98,117,.12);filter:blur(9px);z-index:1}.lottery-glass-shine{position:absolute;z-index:8;left:48px;top:30px;width:72px;height:142px;border-radius:50%;background:linear-gradient(100deg,rgba(255,255,255,.78),rgba(255,255,255,.06));transform:rotate(27deg);filter:blur(.2px);pointer-events:none}.lottery-glass-ring{position:absolute;z-index:7;inset:0;border-radius:50%;box-shadow:inset 0 0 0 7px rgba(255,255,255,.18),inset 0 0 0 11px rgba(95,139,159,.04);pointer-events:none}.lottery-question{position:absolute;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);font-size:92px;font-weight:900;color:rgba(69,100,116,.08);transition:opacity .2s}.number-balls{position:absolute;z-index:4;inset:20px;border-radius:50%;transform-style:preserve-3d}.mixer-ball{--size:40px;position:absolute;left:50%;top:50%;width:var(--size);height:var(--size);margin:calc(var(--size)/-2);border-radius:50%;display:grid;place-items:center;font-size:18px;font-weight:900;color:#222;background:radial-gradient(circle at 32% 25%,#fff 0 12%,#f6f6f6 22%,#e8e8e8 58%,#bcbcbc 100%);border:1px solid rgba(0,0,0,.12);box-shadow:inset -7px -8px 12px rgba(0,0,0,.12),inset 5px 5px 9px rgba(255,255,255,.85),0 8px 12px rgba(32,54,66,.16);transform:translate3d(var(--x1),var(--y1),0) rotate(var(--rot));will-change:transform}.lottery-machine.is-mixing .mixer-ball{animation:numBallMix var(--dur) cubic-bezier(.45,.02,.53,.98) infinite var(--delay)}.lottery-machine.is-slowing .mixer-ball{animation-duration:calc(var(--dur)*1.75)}@keyframes numBallMix{0%{transform:translate3d(var(--x1),var(--y1),4px) rotate(0)}31%{transform:translate3d(var(--x2),var(--y2),48px) rotate(150deg)}62%{transform:translate3d(var(--x3),var(--y3),-22px) rotate(290deg)}100%{transform:translate3d(var(--x1),var(--y1),4px) rotate(360deg)}}
.lottery-machine.is-mixing .lottery-globe{animation:globePulse .42s ease-in-out infinite alternate}.lottery-machine.is-slowing .lottery-globe{animation-duration:.82s}@keyframes globePulse{from{transform:translateX(-50%) translateZ(30px) rotate(-.7deg)}to{transform:translateX(-50%) translateZ(30px) rotate(.7deg)}}
.lottery-throat{position:absolute;left:50%;top:294px;width:96px;height:64px;transform:translateX(-50%);z-index:0;background:linear-gradient(90deg,#c5c9cc,#f8f8f8 32%,#dadde0 65%,#b7bcc0);border:1px solid #aaa;border-radius:12px 12px 19px 19px;box-shadow:inset 0 5px 10px rgba(255,255,255,.9),0 8px 15px rgba(0,0,0,.12)}.lottery-throat span{position:absolute;left:18px;right:18px;top:14px;height:12px;border-radius:50%;background:#7b858a;box-shadow:inset 0 3px 5px rgba(0,0,0,.3)}.lottery-base{position:absolute;left:50%;top:342px;width:250px;height:102px;transform:translateX(-50%) rotateX(2deg);border-radius:22px 22px 28px 28px;background:linear-gradient(145deg,#292b2e,#111214 56%,#26282b);box-shadow:inset 0 1px 0 rgba(255,255,255,.16),inset 0 -16px 28px rgba(0,0,0,.25),0 22px 36px rgba(0,0,0,.18);z-index:3}.lottery-base::after{content:"";position:absolute;left:20px;right:20px;bottom:-12px;height:20px;border-radius:50%;background:rgba(0,0,0,.22);filter:blur(7px);z-index:-1}.lottery-base-label{position:absolute;left:22px;top:25px;color:#fff;font-size:12px;font-weight:800;letter-spacing:.17em}.lottery-indicator{position:absolute;right:22px;top:24px;display:flex;gap:6px}.lottery-indicator i{width:8px;height:8px;border-radius:50%;background:#555;box-shadow:0 0 0 1px rgba(255,255,255,.08)}.lottery-machine.is-mixing .lottery-indicator i:nth-child(1){background:#6de491;box-shadow:0 0 11px #54d77c}.lottery-machine.is-mixing .lottery-indicator i:nth-child(2){background:#f2c55f;box-shadow:0 0 11px #e4b545}.lottery-machine.is-mixing .lottery-indicator i:nth-child(3){animation:indicatorBlink .42s linear infinite;background:#ef6c6c}@keyframes indicatorBlink{50%{opacity:.25}}
.lottery-chute{position:absolute;z-index:8;left:50%;top:384px;width:235px;height:82px;transform:translateX(-50%);pointer-events:none}.chute-track{position:absolute;left:74px;top:11px;width:104px;height:42px;border-radius:8px 8px 25px 25px;background:linear-gradient(180deg,#686d70,#323638);box-shadow:inset 0 4px 8px rgba(0,0,0,.38),0 4px 8px rgba(0,0,0,.13);transform:rotate(9deg)}.exit-ball{position:absolute;left:104px;top:4px;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-size:18px;font-weight:900;color:#111;background:radial-gradient(circle at 30% 24%,#fff,#f6f6f6 32%,#d2d2d2 72%,#a7a7a7);border:1px solid rgba(0,0,0,.16);box-shadow:inset -8px -9px 13px rgba(0,0,0,.13),0 9px 14px rgba(0,0,0,.18);opacity:0;transform:translate3d(-18px,-68px,40px) scale(.65)}.lottery-machine.is-ejecting .exit-ball{opacity:1;animation:ejectBall .82s cubic-bezier(.18,.76,.26,1) forwards}@keyframes ejectBall{0%{transform:translate3d(-18px,-68px,40px) rotate(-160deg) scale(.65)}45%{transform:translate3d(18px,-18px,60px) rotate(90deg) scale(1)}75%{transform:translate3d(54px,9px,25px) rotate(250deg) scale(1)}100%{transform:translate3d(72px,20px,0) rotate(360deg) scale(1)}}.lottery-machine.result-static .exit-ball,.lottery-machine.show-result .exit-ball{opacity:1;transform:translate3d(72px,20px,0) scale(1)}
.number-result-panel{width:min(720px,94vw);min-height:108px;display:flex;flex-direction:column;align-items:center;gap:12px}.number-result-label{font-size:12px;color:#999;letter-spacing:.16em}.number-result-balls{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;min-height:62px}.number-result-placeholder{color:#aaa;font-size:14px;font-weight:500}.number-output-ball{width:58px;height:58px;min-width:58px;padding:0 8px;border-radius:50%;display:grid;place-items:center;font-size:18px;font-weight:900;letter-spacing:-.03em;background:radial-gradient(circle at 31% 24%,#fff 0 12%,#f5f5f5 24%,#dedede 70%,#b9b9b9 100%);border:1px solid #c6c6c6;box-shadow:inset -8px -9px 14px rgba(0,0,0,.1),inset 6px 6px 10px rgba(255,255,255,.85),0 9px 17px rgba(0,0,0,.09);animation:resultBallIn .45s cubic-bezier(.2,.8,.2,1) both var(--delay)}@keyframes resultBallIn{from{opacity:0;transform:translateY(-22px) rotate(-90deg) scale(.72)}to{opacity:1;transform:none}}

/* ===== 3D 随机决定纸箱 ===== */
.decision-box-stage{padding-top:20px}.decision-machine{width:min(790px,96vw);display:flex;flex-direction:column;align-items:center;gap:16px}.decision-scene{width:100%;height:410px;display:grid;place-items:center;perspective:1050px}.decision-box-wrap{position:relative;width:360px;height:330px;transform-style:preserve-3d;transform:rotateX(-5deg) rotateY(-4deg)}.decision-box-3d{position:absolute;left:50%;bottom:28px;width:260px;height:190px;transform:translateX(-50%) rotateX(-4deg);transform-style:preserve-3d;z-index:6}.box-panel{position:absolute;background:linear-gradient(145deg,#c99655,#b67e40 58%,#9d6935);border:1px solid rgba(102,63,24,.3);box-shadow:inset 0 0 0 1px rgba(255,255,255,.09)}.box-front{left:0;top:0;width:260px;height:190px;transform:translateZ(82px);display:flex;flex-direction:column;align-items:center;justify-content:center;color:rgba(72,40,13,.72);text-shadow:0 1px rgba(255,255,255,.18);z-index:5}.box-back{left:0;top:0;width:260px;height:190px;transform:translateZ(-82px) rotateY(180deg)}.box-left{left:0;top:0;width:164px;height:190px;transform-origin:left center;transform:rotateY(90deg) translateX(-82px)}.box-right{right:0;top:0;width:164px;height:190px;transform-origin:right center;transform:rotateY(-90deg) translateX(82px)}.box-front::before,.box-back::before,.box-left::before,.box-right::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,rgba(80,45,16,.035) 0 1px,transparent 1px 5px);pointer-events:none}.box-print{font-size:34px;font-weight:900;letter-spacing:.08em}.box-print-sub{font-size:13px;font-weight:800;letter-spacing:.18em;margin-top:6px}.box-flap{position:absolute;top:-68px;width:132px;height:86px;background:linear-gradient(145deg,#d6a667,#b97e3d);border:1px solid rgba(105,65,26,.28);transform-origin:bottom;z-index:3;box-shadow:inset 0 1px rgba(255,255,255,.18)}.flap-left{left:-2px;transform:rotateX(-58deg) rotateZ(-4deg)}.flap-right{right:-2px;transform:rotateX(-58deg) rotateZ(4deg)}.flap-back{left:64px;top:-74px;width:132px;transform:translateZ(-70px) rotateX(-70deg)}.box-inner-shadow{position:absolute;left:22px;right:22px;top:-5px;height:40px;background:rgba(55,29,8,.43);filter:blur(8px);transform:translateZ(45px);border-radius:50%;z-index:4}.decision-slip-cloud{position:absolute;left:50%;top:72px;width:230px;height:145px;transform:translateX(-50%) translateZ(50px);z-index:8;pointer-events:none;overflow:visible}.box-slip{position:absolute;left:50%;top:50%;max-width:125px;padding:6px 10px;border-radius:3px;background:#fffef7;border:1px solid #e6dfcc;box-shadow:0 5px 9px rgba(62,36,14,.14);font-size:10px;color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate3d(var(--x),var(--y),0) rotate(var(--r));opacity:.72}.decision-machine.is-shaking .decision-box-wrap{animation:boxShake .29s ease-in-out infinite}.decision-machine.is-slowing .decision-box-wrap{animation-duration:.58s}.decision-machine.is-shaking .box-slip{animation:slipTumble var(--dur) ease-in-out infinite var(--delay)}.decision-machine.is-slowing .box-slip{animation-duration:calc(var(--dur)*1.8)}@keyframes boxShake{0%{transform:rotateX(-5deg) rotateY(-4deg) translate3d(-7px,1px,0) rotateZ(-1.8deg)}50%{transform:rotateX(-3deg) rotateY(4deg) translate3d(7px,-3px,12px) rotateZ(1.7deg)}100%{transform:rotateX(-5deg) rotateY(-4deg) translate3d(-5px,2px,0) rotateZ(-1.3deg)}}@keyframes slipTumble{0%{transform:translate3d(var(--x),var(--y),0) rotate(var(--r)) rotateX(0)}35%{transform:translate3d(var(--x2),-48px,78px) rotate(38deg) rotateX(120deg)}68%{transform:translate3d(var(--x3),32px,38px) rotate(-28deg) rotateX(240deg)}100%{transform:translate3d(var(--x),var(--y),0) rotate(var(--r)) rotateX(360deg)}}
.drawn-slip{position:absolute;z-index:20;left:50%;top:100px;width:210px;min-height:72px;padding:16px 18px;display:grid;place-items:center;text-align:center;background:linear-gradient(180deg,#fffef9,#f7f2df);border:1px solid #ddd3b9;border-radius:6px;box-shadow:0 20px 40px rgba(71,44,20,.22),inset 0 1px #fff;transform:translateX(-50%) translate3d(0,122px,-20px) rotateX(78deg) rotateZ(-4deg) scale(.72);opacity:0;transform-origin:center bottom}.drawn-slip::before{content:"";position:absolute;left:10px;right:10px;top:9px;border-top:1px dashed #d7ccb1}.drawn-slip span{font-size:19px;font-weight:800;line-height:1.35;word-break:break-word}.decision-machine.is-drawing .drawn-slip{opacity:1;animation:drawPaper .9s cubic-bezier(.13,.82,.22,1) forwards}.decision-machine.show-result .drawn-slip,.decision-machine.result-static .drawn-slip{opacity:1;transform:translateX(-50%) translate3d(0,-38px,120px) rotateX(0) rotateZ(1deg) scale(1)}@keyframes drawPaper{0%{opacity:.2;transform:translateX(-50%) translate3d(0,118px,-20px) rotateX(78deg) rotateZ(-5deg) scale(.7)}45%{opacity:1;transform:translateX(-50%) translate3d(42px,16px,105px) rotateX(18deg) rotateZ(8deg) scale(.95)}100%{opacity:1;transform:translateX(-50%) translate3d(0,-38px,120px) rotateX(0) rotateZ(1deg) scale(1)}}.decision-machine.show-result .decision-box-wrap,.decision-machine.result-static .decision-box-wrap{transform:rotateX(-5deg) rotateY(-4deg) translateY(18px) scale(.93);transition:transform .5s ease}.decision-result-panel{width:min(700px,94vw);min-height:116px;display:flex;flex-direction:column;align-items:center;gap:8px}.decision-result-label{font-size:12px;color:#999;letter-spacing:.16em}.decision-result-wrap{min-height:70px}.decision-result-wrap .result-text{font-size:clamp(30px,7vw,58px)}

@media(max-width:720px){.lottery-machine{width:330px;height:410px;transform:scale(.9);transform-origin:top center;margin-bottom:-38px}.number-result-panel{min-height:94px}.number-output-ball{width:52px;height:52px;min-width:52px;font-size:16px}.decision-scene{height:360px}.decision-box-wrap{transform:scale(.87) rotateX(-5deg) rotateY(-4deg)}.decision-machine.is-shaking .decision-box-wrap{animation-name:boxShakeMobile}.decision-machine.show-result .decision-box-wrap,.decision-machine.result-static .decision-box-wrap{transform:scale(.82) rotateX(-5deg) rotateY(-4deg) translateY(14px)}@keyframes boxShakeMobile{0%{transform:scale(.87) rotateX(-5deg) rotateY(-4deg) translate3d(-6px,1px,0) rotateZ(-1.8deg)}50%{transform:scale(.87) rotateX(-3deg) rotateY(4deg) translate3d(6px,-3px,10px) rotateZ(1.7deg)}100%{transform:scale(.87) rotateX(-5deg) rotateY(-4deg) translate3d(-5px,2px,0) rotateZ(-1.3deg)}}}
@media(max-width:430px){.number-lottery-stage{padding-left:6px;padding-right:6px}.lottery-machine{transform:scale(.78);margin-bottom:-88px}.decision-scene{height:320px}.decision-box-wrap{transform:scale(.74) rotateX(-5deg) rotateY(-4deg)}.decision-machine.is-shaking .decision-box-wrap{animation-name:boxShakeSmall}.decision-machine.show-result .decision-box-wrap,.decision-machine.result-static .decision-box-wrap{transform:scale(.71) rotateX(-5deg) rotateY(-4deg) translateY(12px)}@keyframes boxShakeSmall{0%{transform:scale(.74) rotateX(-5deg) rotateY(-4deg) translate3d(-6px,1px,0) rotateZ(-1.8deg)}50%{transform:scale(.74) rotateX(-3deg) rotateY(4deg) translate3d(6px,-3px,10px) rotateZ(1.7deg)}100%{transform:scale(.74) rotateX(-5deg) rotateY(-4deg) translate3d(-5px,2px,0) rotateZ(-1.3deg)}}}


/* ===== 随机开始时设置栏平滑折叠 ===== */
.random-settings{
  max-height:1200px;
  opacity:1;
  transform:translateY(0);
  overflow:visible;
  transition:max-height .42s cubic-bezier(.2,.8,.2,1),opacity .24s ease,transform .36s cubic-bezier(.2,.8,.2,1),margin .42s cubic-bezier(.2,.8,.2,1),padding .36s ease;
  will-change:max-height,opacity,transform;
}
body.random-running .random-settings{
  max-height:0!important;
  opacity:0;
  transform:translateY(-12px) scale(.985);
  margin-top:0!important;
  margin-bottom:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  overflow:hidden;
  pointer-events:none;
}
body.random-running .center-stage{
  transition:padding-top .4s cubic-bezier(.2,.8,.2,1),min-height .4s cubic-bezier(.2,.8,.2,1);
}

/* ===== 数字摇号：结果在上方 + 小型 3D 机器 ===== */
.number-lottery-stage{padding-top:14px}
.number-lottery{gap:4px}
.number-result-panel{order:0;min-height:92px;margin-bottom:2px}
.lottery-machine{order:1;transform:scale(.72);transform-origin:top center;margin-bottom:-126px}
.number-output-ball{width:54px;height:54px;min-width:54px;font-size:17px}

/* ===== 自定义内容：3D 纸团揉皱 / 展开 ===== */
.crumple-stage{padding-top:16px}
.crumple-machine{width:min(720px,96vw);display:flex;flex-direction:column;align-items:center;gap:10px}
.crumple-scene{position:relative;width:min(620px,92vw);height:350px;display:grid;place-items:center;perspective:1100px;overflow:visible}
.paper-floor-shadow{position:absolute;left:50%;bottom:56px;width:210px;height:34px;transform:translateX(-50%);border-radius:50%;background:rgba(0,0,0,.12);filter:blur(15px);opacity:.35;transition:width .5s,opacity .5s,transform .5s}
.paper-sheet{position:relative;width:300px;min-height:205px;padding:34px 30px;display:grid;place-items:center;background:linear-gradient(150deg,#fffef9,#f7f2e4 64%,#efe6d0);border:1px solid #ded4bd;border-radius:8px;box-shadow:0 24px 46px rgba(72,54,25,.15),inset 0 1px rgba(255,255,255,.9);transform-style:preserve-3d;transform:rotateX(4deg) rotateY(-4deg) rotateZ(-1deg);transform-origin:center;overflow:hidden;will-change:transform,border-radius,clip-path,filter}
.paper-sheet::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(14deg,rgba(116,95,54,.035) 0 1px,transparent 1px 9px),repeating-linear-gradient(102deg,rgba(116,95,54,.025) 0 1px,transparent 1px 13px);pointer-events:none}
.paper-sheet::after{content:"";position:absolute;inset:10px;border:1px dashed rgba(137,112,65,.18);border-radius:5px;pointer-events:none}
.paper-result{position:relative;z-index:4;max-width:100%;font-size:clamp(30px,6.4vw,58px);font-weight:850;letter-spacing:-.04em;line-height:1.2;word-break:break-word;color:#171717;text-shadow:0 1px #fff}
.paper-crease{position:absolute;z-index:2;display:block;background:linear-gradient(90deg,transparent,rgba(110,86,44,.22),transparent);height:1px;transform-origin:center;opacity:.65}
.crease-a{width:128%;left:-14%;top:36%;transform:rotate(18deg)}
.crease-b{width:120%;left:-10%;top:62%;transform:rotate(-24deg)}
.crease-c{width:95%;left:4%;top:49%;transform:rotate(72deg)}
.crease-d{width:88%;left:7%;top:28%;transform:rotate(-66deg)}
.crumple-empty{min-height:24px}
.crumple-machine.is-crumpling .paper-sheet{animation:paperCrumple .62s cubic-bezier(.36,.04,.18,1) forwards}
.crumple-machine.is-crumpling .paper-floor-shadow{animation:paperShadowTighten .62s ease forwards}
@keyframes paperCrumple{
  0%{transform:rotateX(4deg) rotateY(-4deg) rotateZ(-1deg) scale(1);border-radius:8px;clip-path:polygon(0 0,100% 0,100% 100%,0 100%);filter:none}
  38%{transform:rotateX(55deg) rotateY(-32deg) rotateZ(24deg) scale(.72,.62);border-radius:18% 28% 24% 20%;clip-path:polygon(8% 7%,88% 0,100% 21%,90% 82%,73% 100%,16% 92%,0 68%,6% 24%);filter:contrast(1.03)}
  72%{transform:rotateX(112deg) rotateY(74deg) rotateZ(-42deg) scale(.45,.41);border-radius:38% 46% 42% 44%;clip-path:polygon(17% 0,71% 7%,100% 31%,85% 78%,61% 100%,22% 91%,0 63%,8% 20%);filter:contrast(1.08) saturate(.92)}
  100%{transform:rotateX(155deg) rotateY(118deg) rotateZ(34deg) scale(.31,.3);border-radius:48% 42% 46% 39%;clip-path:polygon(21% 2%,66% 0,94% 18%,100% 62%,73% 96%,32% 100%,5% 76%,0 30%);filter:contrast(1.12) saturate(.88)}
}
@keyframes paperShadowTighten{to{width:92px;opacity:.52;transform:translateX(-50%) scaleY(.65)}}
.crumple-machine.is-mixing .paper-sheet{border-radius:48% 42% 46% 39%;clip-path:polygon(21% 2%,66% 0,94% 18%,100% 62%,73% 96%,32% 100%,5% 76%,0 30%);animation:paperBallMix .72s cubic-bezier(.48,.03,.52,.97) infinite;box-shadow:inset -24px -20px 28px rgba(93,74,39,.18),inset 18px 15px 22px rgba(255,255,255,.66),0 22px 36px rgba(72,54,25,.2)}
.crumple-machine.is-slowing .paper-sheet{animation-duration:1.28s}
.crumple-machine.is-mixing .paper-result{opacity:.12;transform:scale(.7)}
.crumple-machine.is-mixing .paper-floor-shadow{width:100px;opacity:.48;transform:translateX(-50%) scaleY(.65);animation:paperBallShadow .72s ease-in-out infinite alternate}
@keyframes paperBallMix{
  0%{transform:translate3d(-86px,32px,55px) rotateX(185deg) rotateY(130deg) rotateZ(40deg) scale(.31,.3)}
  25%{transform:translate3d(72px,-42px,125px) rotateX(310deg) rotateY(265deg) rotateZ(142deg) scale(.33,.31)}
  52%{transform:translate3d(94px,24px,45px) rotateX(455deg) rotateY(390deg) rotateZ(218deg) scale(.30,.32)}
  78%{transform:translate3d(-58px,-55px,145px) rotateX(590deg) rotateY(535deg) rotateZ(318deg) scale(.34,.30)}
  100%{transform:translate3d(-86px,32px,55px) rotateX(720deg) rotateY(650deg) rotateZ(400deg) scale(.31,.3)}
}
@keyframes paperBallShadow{from{transform:translateX(-50%) scale(.75,.48)}to{transform:translateX(-50%) translateX(26px) scale(1.08,.68)}}
.crumple-machine.is-unfolding .paper-sheet{animation:paperUnfold 1.12s cubic-bezier(.12,.76,.2,1) forwards}
.crumple-machine.is-unfolding .paper-result{animation:paperTextReveal 1.12s ease forwards}
.crumple-machine.is-unfolding .paper-floor-shadow{animation:paperShadowOpen 1.12s ease forwards}
@keyframes paperUnfold{
  0%{transform:translate3d(24px,-28px,120px) rotateX(625deg) rotateY(548deg) rotateZ(315deg) scale(.31,.3);border-radius:48% 42% 46% 39%;clip-path:polygon(21% 2%,66% 0,94% 18%,100% 62%,73% 96%,32% 100%,5% 76%,0 30%)}
  34%{transform:translate3d(-22px,-18px,105px) rotateX(382deg) rotateY(264deg) rotateZ(126deg) scale(.52,.46);border-radius:31% 25% 28% 34%;clip-path:polygon(8% 4%,88% 0,100% 19%,93% 88%,72% 100%,13% 94%,0 70%,5% 17%)}
  70%{transform:translate3d(12px,-8px,48px) rotateX(54deg) rotateY(-22deg) rotateZ(7deg) scale(.9,.84);border-radius:12px;clip-path:polygon(1% 1%,99% 0,100% 98%,0 100%)}
  100%{transform:translate3d(0,0,0) rotateX(4deg) rotateY(-4deg) rotateZ(-1deg) scale(1);border-radius:8px;clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}
}
@keyframes paperTextReveal{0%,56%{opacity:0;filter:blur(7px);transform:scale(.82)}100%{opacity:1;filter:blur(0);transform:scale(1)}}
@keyframes paperShadowOpen{0%{width:96px;opacity:.5}100%{width:210px;opacity:.35;transform:translateX(-50%)}}
.crumple-machine.result-static .paper-sheet{transform:rotateX(4deg) rotateY(-4deg) rotateZ(-1deg);border-radius:8px;clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}
.crumple-machine.result-static .paper-result{opacity:1}

@media(max-width:720px){
  .lottery-machine{transform:scale(.66);margin-bottom:-158px}
  .number-result-panel{min-height:84px}
  .number-output-ball{width:48px;height:48px;min-width:48px;font-size:15px}
  .crumple-scene{height:310px}
  .paper-sheet{width:270px;min-height:184px;padding:30px 24px}
}
@media(max-width:430px){
  .lottery-machine{transform:scale(.59);margin-bottom:-190px}
  .crumple-scene{height:285px}
  .paper-sheet{width:238px;min-height:168px;padding:27px 20px}
  .paper-result{font-size:clamp(26px,9vw,42px)}
}

/* ===== 自定义倒计时下拉：全站层级修复 ===== */
/* random-settings 本身有 transform 动画，会形成新的 stacking context。
   明确给设置层一个高层级，确保下拉卡片永远位于 3D 动画场景上方。 */
.random-settings{
  position:relative;
  z-index:120;
}
.toolbar.random-settings,
.block-controls.random-settings,
.options-grid.random-settings{
  isolation:isolate;
}
.random-settings.select-open-layer{
  z-index:5000!important;
  overflow:visible!important;
}
.custom-select{
  position:relative;
  z-index:1;
}
.custom-select.open{
  z-index:5100;
}
.custom-select-card{
  z-index:5200!important;
}
/* 动画区域统一压在设置层下面，避免 perspective / transform 产生的子层覆盖菜单。 */
.center-stage,
.fortune-scene,
.lottery-machine,
.decision-machine,
.dice-scene,
.card-scene,
.paper-scene{
  position:relative;
  z-index:1;
}
body.random-running .random-settings{
  z-index:0;
}

/* ===== 首页大标题“随机 ⇅ ?? ⇅ 随机”循环滚轮 ===== */
.hero-title-random{
  display:inline-flex;
  align-items:baseline;
  white-space:nowrap;
}
.hero-random-slot{
  position:relative;
  display:inline-block;
  width:2.08em;
  height:1.08em;
  overflow:hidden;
  overflow:clip;
  contain:paint;
  clip-path:inset(.015em 0 .015em 0);
  vertical-align:-.075em;
  margin-left:.02em;
}
.hero-random-track{
  position:absolute;
  left:0;
  top:0;
  width:100%;
  display:flex;
  flex-direction:column;
  will-change:transform;
  transform:translateZ(0);
  backface-visibility:hidden;
  animation:heroRandomRoll 5.4s cubic-bezier(.76,0,.24,1) infinite;
}
.hero-random-item{
  width:100%;
  height:1.22em;
  line-height:1.04em;
  flex:0 0 1.22em;
  display:flex;
  align-items:flex-start;
  text-align:left;
  padding-top:.015em;
}
.hero-random-item.question{
  letter-spacing:.02em;
}
@keyframes heroRandomRoll{
  0%,24%{transform:translate3d(0,0,0)}
  34%,58%{transform:translate3d(0,-1.22em,0)}
  68%,94%{transform:translate3d(0,-2.44em,0)}
  100%{transform:translate3d(0,-2.44em,0)}
}
@media (prefers-reduced-motion: reduce){
  .hero-random-track{animation:none!important;transform:none!important}
}



/* 图片随机：首屏倒计时值在首次绘制前从 localStorage 预读取，避免默认 5 秒闪烁 */
html.img-duration-booting #imgDurationLabel {
  font-size: 0 !important;
}
html.img-duration-booting #imgDurationLabel::after {
  font-size: 14px;
  line-height: inherit;
  white-space: nowrap;
}
html.img-duration-booting[data-img-duration="1"] #imgDurationLabel::after { content: "1 秒"; }
html.img-duration-booting[data-img-duration="3"] #imgDurationLabel::after { content: "3 秒"; }
html.img-duration-booting[data-img-duration="5"] #imgDurationLabel::after { content: "5 秒"; }
html.img-duration-booting[data-img-duration="8"] #imgDurationLabel::after { content: "8 秒"; }
html.img-duration-booting[data-img-duration="10"] #imgDurationLabel::after { content: "10 秒"; }
html.img-duration-booting[data-img-duration="15"] #imgDurationLabel::after { content: "15 秒"; }
html.img-duration-booting[data-img-duration="20"] #imgDurationLabel::after { content: "20 秒"; }
html.img-duration-booting[data-img-duration="30"] #imgDurationLabel::after { content: "30 秒"; }
@media (max-width:720px){
  html.img-duration-booting #imgDurationLabel::after { font-size:13px; }
}


/* ===== Site logo in header / footer ===== */
.brand,.footer-brand{display:inline-flex;align-items:center;gap:8px}
.site-logo{display:block;flex:0 0 auto;object-fit:contain}
.site-logo-header{width:28px;height:28px}
.site-logo-footer{width:30px;height:30px}
@media(max-width:720px){
  .brand{justify-content:center}
  .site-logo-header{width:25px;height:25px}
  .site-logo-footer{width:28px;height:28px}
}
