:root{--ink:#24364d;--muted:#718197;--accent:#237f9e;--paper:#f4f7fc;--gold:#b77f24;--pack-width:240px;--pack-height:388px;--card-width:272px;font-family:Inter,"SF Pro Display",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 50% 25%,#fff 0%,#f6f9fe 39%,#edf2f9 100%);overflow-x:hidden}button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;color:inherit}button:disabled{cursor:default}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #2588ad;outline-offset:6px}button{touch-action:manipulation}button img{pointer-events:none;user-select:none}[hidden]{display:none!important}.topbar{max-width:1320px;margin:auto;height:90px;display:flex;align-items:center;justify-content:space-between;padding:0 52px;position:relative;z-index:5}.brand{display:flex;align-items:center;gap:10px;font-size:21px;font-weight:650;letter-spacing:-.65px}.brand b{font-weight:350;color:#7890a9}.brand-mark{width:21px;height:21px;border:1.7px solid #3e5974;border-radius:50%;position:relative;background:linear-gradient(0deg,transparent 46%,#3e5974 47%,#3e5974 54%,transparent 55%)}.brand-mark:after{content:"";position:absolute;inset:6px;border:1.5px solid #3e5974;background:#f6f9fe;border-radius:50%}.top-actions{display:flex;align-items:center;gap:20px}.icon-button{width:38px;height:38px;display:grid;place-items:center;border:1px solid #d9e2ed;border-radius:50%;background:#ffffff90}.icon-button svg{width:18px;height:18px}.text-button{border:0;background:none;padding:10px 12px;font-size:14px;font-weight:500}.text-button:hover,.footer-link:hover{color:var(--accent)}.muted{color:#93a0b1;margin-left:2px}#collection-count{margin-left:8px;font-variant-numeric:tabular-nums}main{position:relative;min-height:calc(100svh - 158px);max-width:1280px;margin:auto}.scene-glow{position:absolute;left:50%;top:70px;transform:translateX(-50%);width:700px;max-width:98vw;height:640px;pointer-events:none;background:radial-gradient(ellipse,#dffbfa90 0%,#e4eaff44 48%,transparent 70%);filter:blur(30px)}.screen{position:relative;text-align:center;padding:25px 24px 12px;animation:screen-in .5s ease both}.screen-heading{position:relative;min-height:116px}.series{font-size:12px;letter-spacing:2px;color:#7b8c9e;margin:0 0 13px;font-weight:550}.screen h1{font-size:clamp(26px,3.6vw,38px);font-weight:580;letter-spacing:-1.3px;margin:0 0 13px;line-height:1.3}.hint{font-size:14px;color:var(--muted);margin:0;line-height:1.6}.quiet{font-size:12px;line-height:1.7;color:var(--muted);margin:14px 0 0}.screen-actions{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:24px}.primary{border:0;border-radius:32px;min-width:244px;padding:17px 34px;background:#2a3d55;color:white;box-shadow:0 9px 22px #304d7320;font-size:15px;font-weight:550;letter-spacing:1px;transition:transform .18s,background .18s,box-shadow .18s}.primary span{margin-left:18px;display:inline-block}.primary:hover{background:#344f6c;transform:translateY(-2px);box-shadow:0 12px 25px #304d7330}.primary:active{transform:translateY(1px)}.primary:disabled{opacity:.5;transform:none}.pack-choices{display:flex;justify-content:center;align-items:center;gap:36px;height:425px;perspective:1100px;position:relative}.pack-choice{width:var(--pack-width);height:var(--pack-height);position:relative;background:transparent;border:0;padding:0;transform:translateY(12px) rotateZ(var(--angle)) rotateY(var(--yaw)) scale(.86);transition:transform .65s cubic-bezier(.2,.8,.25,1),filter .5s;filter:saturate(.88);z-index:1}.pack-choice[aria-pressed=true]{transform:translateY(-2px) rotateZ(-2deg) rotateY(-5deg) scale(1);filter:none;z-index:2}.pack-choice:hover{filter:brightness(1.04)}.pack-choice:after{content:"";position:absolute;width:26px;height:3px;border-radius:3px;background:#507e9b;bottom:-25px;left:calc(50% - 13px);opacity:0;transition:opacity .4s}.pack-choice[aria-pressed=true]:after{opacity:1}.foil{height:100%;width:100%;position:relative;isolation:isolate;border-radius:2px 2px 5px 5px;box-shadow:13px 22px 27px -18px #162d5570,3px 2px 6px #27455835;overflow:hidden;background:#f0f1f5;transform-style:preserve-3d;user-select:none;pointer-events:none}.pack-art{position:absolute;top:12%;left:0;width:100%;height:87%;object-fit:cover;object-position:50% 45%;filter:saturate(.92)}.pack-header{position:absolute;top:4%;left:0;width:100%;height:20%;object-fit:contain;background:linear-gradient(110deg,#e2e5e7,#fff 32%,#f8f8fb 65%,#dce0e4)}.pack-logo{position:absolute;bottom:5%;width:86%;left:7%;filter:drop-shadow(0 2px 2px #3a264980)}.crimp{height:15px;width:100%;position:absolute;left:0;z-index:4;background:repeating-linear-gradient(90deg,#c6ced1 0,#fdfdfd 1px,#e4e9eb 2px,#c6ced1 3px);border-top:1px solid #c6cfd5;border-bottom:1px solid #abb6c330}.crimp.top{top:0}.crimp.bottom{bottom:0;height:13px}.foil:after{content:"";position:absolute;inset:0;z-index:5;pointer-events:none;background:linear-gradient(100deg,#65788521,transparent 9%,#fff5 11%,transparent 14%,transparent 42%,#fff6 44%,transparent 49%,#263a431a 85%,#fff7 91%,#5d677335 100%);mix-blend-mode:soft-light}.foil:before{content:"";position:absolute;inset:0;border-left:2px solid #ffffff70;border-right:2px solid #25445020;z-index:6}.back-button{border:0;background:none;color:var(--muted);position:absolute;left:8%;top:4px;font-size:13px;padding:10px}.tear-stage{width:var(--pack-width);height:var(--pack-height);position:relative;margin:26px auto 0;perspective:900px}.tear-pack{position:absolute;inset:0;transform:rotateZ(-2deg);transition:transform .15s}.tear-pack>.foil{clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}.tear-top{position:absolute;inset:0;clip-path:polygon(0 0,100% 0,100% 16%,0 16%);transform-origin:100% 16%;z-index:5;pointer-events:none}.tear-bottom{clip-path:polygon(0 16%,100% 16%,100% 100%,0 100%)!important}.tear-zone{position:absolute;z-index:8;left:-24px;right:-24px;top:calc(16% - 32px);height:64px;cursor:ew-resize;touch-action:none;border-radius:14px}.tear-guide{height:100%;display:flex;align-items:center;gap:7px;filter:drop-shadow(0 2px 4px #33516e40)}.tear-line{flex:1;border-top:2px dashed #fff}.tear-dot{width:27px;height:27px;border-radius:50%;background:#fff;border:6px solid #91dbe3;box-shadow:0 0 0 6px #ecffff80;animation:guide-pulse 1.7s ease-in-out infinite}.tear-arrow{color:#fff;background:#5688a799;border-radius:50%;font-size:22px;width:29px;height:29px;line-height:25px}.tear-spark{position:absolute;top:16%;left:0;width:36px;height:3px;background:white;filter:drop-shadow(0 0 5px #b4efff);opacity:0;pointer-events:none;z-index:9}.tear-meter{height:3px;width:112px;border-radius:5px;background:#dbe5ee;margin:6px 0 7px;overflow:hidden}.tear-meter span{display:block;height:100%;width:0;background:#5b9dac}.is-opening .tear-top{animation:tear-away .6s cubic-bezier(.15,.7,.4,1) forwards}.is-opening .tear-bottom{animation:pack-fall .85s .08s cubic-bezier(.5,0,.7,1) forwards}.is-opening .tear-zone{opacity:0}.reveal-stage{width:var(--card-width);height:calc(var(--card-width)*512/367);margin:8px auto 0;position:relative;perspective:1200px}.stack-card{position:absolute;inset:0;background:url('assets/card-back-web.webp') center/cover;border-radius:12px;box-shadow:0 9px 22px #1f345729}.stack-card-1{transform:translate(5px,3px) rotate(3deg)}.stack-card-2{transform:translate(-6px,4px) rotate(-4deg)}.flip-card{position:absolute;inset:0;border:0;background:none;padding:0;z-index:3;touch-action:pan-y;perspective:1200px;border-radius:12px;transform-origin:50% 60%;will-change:transform}.card-rotator{display:block;width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.2,.7,.15,1)}.flip-card.flipped .card-rotator{transform:rotateY(180deg)}.card-side{position:absolute;inset:0;display:block;backface-visibility:hidden;-webkit-backface-visibility:hidden;border-radius:12px;overflow:hidden;box-shadow:0 10px 32px #18375435}.card-side img{width:100%;height:100%;object-fit:cover;display:block}.card-obverse{transform:rotateY(180deg)}.card-sheen{position:absolute;inset:0;opacity:0;background:linear-gradient(115deg,transparent 15%,#fff9 45%,transparent 70%);transform:translateX(-130%);pointer-events:none}.flipped.rare .card-sheen{animation:sheen 1.1s .35s ease both}.rare-halo{position:absolute;inset:-100px;opacity:0;background:conic-gradient(from 0deg,transparent,#f9e9b380,transparent,#e1e8ff80,transparent,#f9e9b380,transparent);border-radius:50%;filter:blur(22px);transform:scale(.7);transition:opacity .8s,transform 1.4s}.reveal-stage.is-rare .rare-halo{opacity:1;transform:scale(1.15);animation:halo-spin 28s linear infinite}.reveal-info{height:29px;display:flex;gap:12px;align-items:center;justify-content:center;margin:22px 0 0;font-size:17px;color:var(--gold);letter-spacing:3px}#new-card{font-size:10px;letter-spacing:.7px;padding:3px 8px;border:1px solid #c5dce3;border-radius:4px;color:#4d8190;background:#ffffffa0}.reveal-actions{margin-top:8px}.card-dots{display:flex;gap:7px;margin-bottom:14px}.card-dots span{display:block;width:5px;height:5px;border-radius:50%;background:#c7d2df;transition:width .25s,background .25s}.card-dots span.current{width:18px;border-radius:6px;background:#456982}.card-dots span.done{background:#7398ab}.spark{position:absolute;width:4px;height:4px;border-radius:50%;background:#e9c474;z-index:4;pointer-events:none;animation:burst 1.2s ease-out forwards;left:50%;top:50%;box-shadow:0 0 8px white}.results-screen{padding-top:37px}.result-cards{display:flex;gap:16px;justify-content:center;align-items:flex-start;margin:62px auto 36px;max-width:1120px}.result-item{width:18%;max-width:190px;text-align:center;animation:result-in .65s var(--delay) both;position:relative}.result-item button{padding:0;border:0;background:none;display:block;width:100%;border-radius:8px;transition:transform .2s}.result-item button:hover{transform:translateY(-8px) rotate(-2deg)}.result-item button>img{width:100%;border-radius:8px;display:block;box-shadow:0 10px 24px #233d5725}.result-item.rare button>img{box-shadow:0 0 0 2px #e9cd8b88,0 10px 28px #b1964c30}.result-item h3{font-size:13px;font-weight:550;margin:16px 0 4px}.result-item p{font-size:12px;letter-spacing:2px;color:var(--gold);margin:0}.result-new{position:absolute;top:-10px;left:7px;padding:3px 7px;background:#42687f;color:white;border-radius:3px;font-size:9px;letter-spacing:.8px;pointer-events:none}.loading,.fatal{padding:180px 24px;text-align:center}.loading p{font-size:14px;color:var(--muted);margin-top:20px}.loader{display:inline-block;width:28px;height:28px;border:2px solid #d2dfe9;border-top-color:#537d9a;border-radius:50%;animation:halo-spin 1s linear infinite}footer{height:68px;display:flex;justify-content:center;align-items:center;gap:12px;font-size:11px;color:#8593a6;position:relative;z-index:3}.footer-dot{color:#a8b5c3}.footer-link{background:none;border:0;font-size:11px;color:#6c829b;padding:10px 4px;text-decoration:underline;text-underline-offset:3px}dialog{border:1px solid #e4ebf3;border-radius:20px;padding:30px;max-width:480px;width:calc(100% - 32px);box-shadow:0 30px 100px #102c5350;color:var(--ink);background:#fbfcff}dialog::backdrop{background:#253b5555;backdrop-filter:blur(6px)}dialog h2{font-size:21px;font-weight:600;letter-spacing:-.5px;margin:0}dialog h3{font-size:14px;margin:25px 0 8px}dialog p{font-size:13px;line-height:1.9;color:#6d7b8e}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.close-button{border:0;background:#eaf0f7;width:32px;height:32px;flex:none;border-radius:50%;font-size:22px;line-height:30px}.collection-dialog{max-width:850px;max-height:88svh}.collection-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:20px 16px}.collection-item{border:0;background:transparent;padding:0;position:relative;text-align:center}.collection-item>img{display:block;width:100%;border-radius:5px;box-shadow:0 3px 10px #183b5c17}.collection-item h3{font-size:11px;line-height:1.5;margin:8px 0 0;min-height:17px}.collection-item.empty>img{filter:grayscale(1);opacity:.3}.collection-item>span{position:absolute;top:4px;right:4px;background:#2a405ce0;color:white;font-size:10px;min-width:20px;padding:2px 5px;border-radius:4px}.card-dialog{max-width:445px;text-align:center;padding:24px;background:#eff5fd}.card-dialog>.close-button{position:absolute;right:12px;top:12px;z-index:1}.card-dialog>img{display:block;max-height:69svh;max-width:100%;width:auto;margin:auto;border-radius:12px;box-shadow:0 14px 35px #29395525}.card-dialog h2{font-size:18px;margin:20px 0 0}.card-dialog p{margin:5px 0 0;color:var(--gold);letter-spacing:3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes screen-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes guide-pulse{50%{box-shadow:0 0 0 10px #ecffff30}}@keyframes tear-away{to{transform:translate(100px,-140px) rotate(35deg);opacity:0}}@keyframes pack-fall{to{transform:translate(0,170px) rotate(7deg) scale(.8);opacity:0}}@keyframes halo-spin{to{transform:rotate(360deg)}}@keyframes sheen{30%{opacity:.7}100%{opacity:0;transform:translateX(130%)}}@keyframes result-in{from{opacity:0;transform:translateY(35px) rotate(-5deg)}to{opacity:1;transform:translateY(0) rotate(0)}}@keyframes burst{to{transform:translate(var(--dx),var(--dy)) scale(0);opacity:0}}
@media(min-width:1500px){:root{--pack-width:255px;--pack-height:414px;--card-width:290px}.pack-choices{height:455px}.screen{padding-top:40px}}
@media(max-width:700px){:root{--pack-width:208px;--pack-height:336px;--card-width:248px}.topbar{height:72px;padding:0 24px}.top-actions{gap:9px}.brand{font-size:19px}.top-actions .text-button{font-size:12px;padding-right:0}.screen{padding:24px 16px 10px}.screen-heading{min-height:106px}.screen h1{font-size:28px;letter-spacing:-.8px}.series{font-size:10px;letter-spacing:1.7px}.pack-choices{gap:0;height:360px;width:100%;margin:0 auto}.pack-choice{width:40vw;max-width:208px;flex-shrink:0;height:auto;aspect-ratio:208/336;margin:0 -7.5vw;transform:translateY(16px) rotateZ(var(--angle)) rotateY(var(--yaw)) scale(.83)}.pack-choice[aria-pressed=true]{transform:translateY(-8px) rotateZ(-2deg) rotateY(-4deg) scale(1)}.pack-choice:after{bottom:-19px}.screen-actions{margin-top:20px}.primary{min-width:236px;padding:16px 28px;font-size:14px}.back-button{position:static;display:block;margin:-13px auto 10px;font-size:11px;padding:0}.tear-stage{margin-top:22px}.tear-zone{left:-20px;right:-20px}.reveal-stage{margin-top:7px}.reveal-info{margin-top:21px}.reveal-actions{margin-top:7px}.reveal-actions .primary{padding:13px 26px}.results-screen{padding-top:24px}.result-cards{margin:35px auto 24px;max-width:440px;gap:28px 14px;flex-wrap:wrap}.result-item{width:calc((100% - 28px)/3);max-width:140px}.result-item h3{font-size:11px;margin-top:10px}.result-item p{font-size:10px}.collection-grid{grid-template-columns:repeat(3,1fr);gap:19px 12px}dialog{padding:24px}.card-dialog{max-width:355px}.card-dialog>img{max-height:65svh}main{min-height:calc(100svh - 138px)}footer{height:66px;gap:9px;font-size:10px}.footer-link{font-size:10px}}
@media(max-height:780px) and (min-width:701px){:root{--pack-width:204px;--pack-height:330px;--card-width:225px}.topbar{height:70px}.screen{padding-top:15px}.screen-heading{min-height:100px}.pack-choices{height:355px}.screen-actions{margin-top:18px}main{min-height:calc(100svh - 130px)}footer{height:60px}}
@media(max-height:720px) and (max-width:700px){:root{--pack-width:184px;--pack-height:298px;--card-width:214px}.topbar{height:62px}.screen{padding-top:10px}.screen-heading{min-height:96px}.pack-choices{height:304px}.pack-choice{max-width:180px}.screen h1{font-size:25px}.screen-actions{margin-top:15px}.quiet{margin-top:10px}.tear-stage{margin-top:8px}.reveal-info{margin-top:16px}.card-dots{margin-bottom:8px}footer{height:52px}main{min-height:calc(100svh - 114px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}.rare-halo{display:none}}
@media(min-width:701px) and (max-width:1100px){:root{--pack-width:210px;--pack-height:340px}.pack-choices{gap:24px;height:380px}}

/* Original skinned pack; the CSS pack remains the WebGL fallback. */
.rig-host{position:absolute;inset:-10% -50%;pointer-events:none;opacity:0;filter:drop-shadow(0 16px 14px #20395020)}.rig-host canvas{display:block;width:100%;height:100%}.has-rig .rig-host{opacity:1}.has-rig .tear-pack{visibility:hidden}.has-rig .tear-zone{top:10%}.has-rig.is-opening .rig-host{animation:none}.has-rig.is-opening .tear-guide{opacity:0}

/* The real mesh supplies thickness; the body gesture turns it in world space. */
.has-rig .rig-host{filter:none}.rotate-pack{display:none;position:absolute;inset:25% -10% 0;z-index:6;cursor:grab;touch-action:none;border-radius:20px}.has-rig .rotate-pack{display:block}.rotate-pack.dragging{cursor:grabbing}.rig-controls{display:none;align-items:center;gap:14px;font-size:11px;color:#718197}.rig-controls .text-button{font-size:11px;padding:6px 0;color:#4e7790}.has-rig .rig-controls{display:flex}.is-opening .rotate-pack,.is-opening .rig-controls{visibility:hidden}.has-rig .screen-actions{margin-top:16px}.rig-controls+#rig-fallback[hidden]+.tear-meter{margin-top:2px}
.rig-host{left:50%;right:auto;top:-10%;bottom:-10%;width:min(calc(var(--pack-width)*2),calc(100vw - 24px));transform:translateX(-50%)}

/* One WebGL scene for all three choices; transparent DOM buttons follow projected model bounds. */
.choice-stage{position:relative;width:min(960px,100%);margin:auto}.choice-rig{position:absolute;inset:0;pointer-events:none;opacity:0}.choice-rig canvas{display:block;width:100%;height:100%}.choices-3d .choice-rig{opacity:1}.choices-3d .pack-choices{display:block;width:100%;perspective:none}.choices-3d .pack-choice,.choices-3d .pack-choice[aria-pressed=true]{position:absolute;margin:0;max-width:none;aspect-ratio:auto;transform:none;transition:none;filter:none}.choices-3d .pack-choice>.foil{visibility:hidden}.choices-3d .pack-choice:after{bottom:-15px}.choices-3d .pack-choice:focus-visible{outline-offset:8px;border-radius:8px}

/* Main renderer: source geometry, native programs and scene timelines. */
.native-stage{width:min(720px,100%);height:clamp(360px,55svh,570px);position:relative;margin:12px auto 0;touch-action:none;cursor:grab;overflow:hidden;border-radius:16px;background:#f1f6fb}.native-stage canvas{width:100%;height:100%;display:block}.native-stage:active{cursor:grabbing}.mode-switch{display:flex;justify-content:center;gap:6px;margin:-6px auto 10px}.mode-switch button{border:1px solid #d4deea;background:transparent;border-radius:24px;padding:9px 30px;font-size:14px}.mode-switch button[aria-pressed=true]{color:white;background:#2a3d55;border-color:#2a3d55}.native-cut-control{width:min(340px,85vw);height:54px;position:relative;margin:-95px auto 42px;z-index:4}.native-cut-control .tear-zone{position:absolute;inset:0;height:54px;background:#34587935}.screen-heading{min-height:104px}.result-cards{flex-wrap:wrap}.runtime-details{font-size:11px;max-width:760px;margin:12px auto;padding:0 20px;color:#718197}.runtime-details pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto}footer{height:auto;min-height:68px;flex-wrap:wrap;padding:12px;gap:8px}#tear .native-stage{height:clamp(370px,58svh,580px)}.screen{animation:none}.card-sheen,.rare-halo,.tear-spark{display:none!important}
@media(max-width:700px){.native-stage{height:clamp(340px,53svh,530px);margin-top:6px}.screen-heading{min-height:98px}.mode-switch button{padding:8px 28px}.native-cut-control{margin-top:-82px;margin-bottom:28px}.screen-actions{margin-top:15px}#tear .native-stage{height:clamp(350px,57svh,530px)}}

#tear-host{position:relative}.native-cut-control{position:absolute;margin:0;max-width:100%;height:54px;transform:none}.native-cut-control .tear-zone{background:none}.is-opening .native-cut-control{visibility:hidden}

/* Headings remain in normal flow at every viewport; reserve no guessed text height. */
.screen .screen-heading{min-height:0;display:flex;flex-direction:column;align-items:center;gap:10px;margin:0 auto 20px;max-width:620px}
.screen .screen-heading h1,.screen .screen-heading p{margin:0}
.screen .screen-heading h1{line-height:1.35;letter-spacing:-.7px}
.screen .screen-heading .hint{max-width:34em;line-height:1.65;text-wrap:pretty}
.screen .screen-heading .back-button{position:static;align-self:flex-start;margin:0 0 4px;padding:8px 0}
.mode-switch{margin:0 auto 16px}
#choose .screen-actions{display:flex;flex-direction:column;align-items:center;gap:4px}
#choose .screen-actions .quiet{margin:4px 0 0}
.native-stage.is-grabbing{cursor:grabbing}
@media(max-width:700px){.screen .screen-heading{gap:8px;margin-bottom:16px}.screen .screen-heading .hint{font-size:12px;max-width:27em}.mode-switch{margin-bottom:10px}}

#native-reveal-host{width:min(600px,100%);height:clamp(380px,60svh,640px);margin:12px auto 0;overflow:hidden;border-radius:16px;background:#f1f6fb}
#native-reveal-host canvas{display:block;width:100%;height:100%}
.rare-preview-controls{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;max-width:100%}.rare-preview-controls select{font:inherit;font-size:12px;color:var(--ink);border:1px solid #d4deea;background:#ffffff90;border-radius:8px;padding:8px;max-width:100%}
@media(max-width:700px){#native-reveal-host{height:clamp(370px,57svh,550px)}}

/* Source badge graphic; text remains a browser font adapter. */
#native-reveal-host{position:relative}
#new-card,.result-new{position:absolute;z-index:3;top:0;left:0;border:0;border-radius:0;padding:4px 10px;color:white;background:transparent url('assets/original/ui/new-base.png') center/100% 100% no-repeat;font-size:12px;font-weight:650;letter-spacing:.5px;line-height:1.2;pointer-events:none;transform:translate(-10%,-35%)}
.result-new{font-size:10px;left:0;top:0}

.native-guide .tear-guide{visibility:hidden}

#native-rarity{position:relative;width:min(360px,100%);height:96px;margin:0 auto}
#native-rarity canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.native-rarity-icons{height:100%;display:flex;gap:6px;align-items:center;justify-content:center}
.native-rarity-icons img{will-change:transform,opacity}
#native-rarity:not([hidden])~.reveal-info #rarity{display:none}
/* Source badge UIGradient: color1 f47575, color2 e83ead, rotation -45. */
#new-card,.result-new{isolation:isolate;background:none;color:#fcfdfc}
#new-card::before,.result-new::before{content:"";position:absolute;inset:0;z-index:-1;background:transparent;mask:none}
#native-reveal-host{touch-action:none;cursor:grab;user-select:none}
#native-reveal-host.is-inspecting{cursor:grabbing}
/* Keep the disclosure camera's original portrait gate; wide panels expose the finite background mesh edges. */
#native-reveal-host{--disclosure-height:clamp(380px,60svh,640px);height:var(--disclosure-height);width:min(100%,calc(var(--disclosure-height)*.5625))}
@media(max-width:700px){#native-reveal-host{--disclosure-height:clamp(370px,57svh,550px)}}

#detail-native-card{width:min(320px,72vw);height:min(568px,65svh);margin:auto;touch-action:none;cursor:grab;user-select:none;overflow:hidden;border-radius:14px}
#detail-native-card canvas{display:block;width:100%;height:100%}
#detail-native-card.is-inspecting{cursor:grabbing}
/* Decoder stays in the document for Safari/iOS; pixels are composed by WebGL. */
.immersive-media-source{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.immersive-controls{position:absolute;inset:0;z-index:12;pointer-events:none}.immersive-controls[hidden],.immersive-controls button[hidden]{display:none}
.immersive-controls button{position:absolute;padding:0;margin:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none;pointer-events:auto;touch-action:manipulation}
.immersive-controls .immersive-pause{inset:0;width:100%;height:100%;border-radius:0;cursor:default}
.immersive-controls .immersive-exit{right:calc(16px * var(--immersive-ui-unit));bottom:calc(16px * var(--immersive-ui-unit));width:calc(88px * var(--immersive-ui-unit));height:calc(88px * var(--immersive-ui-unit));border-radius:50%;cursor:pointer}
.immersive-controls button:focus-visible{outline:2px solid #89c7dc;outline-offset:3px}
.source-skip-shadow,.source-skip-face{position:absolute;inset:0;pointer-events:none}.source-skip-face img{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.source-skip-face .source-skip-icon{width:72.7272727%;height:72.7272727%;left:13.6363636%;top:13.6363636%}
.source-skip-shadow img{position:absolute;left:-45.4545455%;top:-40.9090909%;width:209.0909091%;height:209.0909091%;pointer-events:none}
.immersive-message{position:absolute;inset:40% 20px auto;text-align:center;font-size:14px;color:#a32d25;pointer-events:none}

#native-reveal-host.is-immersive,#detail-native-card.is-immersive{position:fixed;inset:0;z-index:50;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border-radius:0;background:#12151b;touch-action:none;cursor:default}
#reveal-immersive{margin:0 auto 12px;display:block}#reveal-immersive[hidden],#detail-immersive[hidden]{display:none}

html.immersive-active{overflow:hidden}

.immersive-controls .immersive-exit::before{content:"";position:absolute;inset:calc(-10px * var(--immersive-ui-unit));}

/* Browser shell: keep verification tools reachable without filling the opening flow. */
.preview-tools{font-size:12px;margin-top:12px;max-width:100%}.preview-tools summary,.lab-tools summary{cursor:pointer;padding:10px;min-height:44px;display:list-item;box-sizing:border-box}.preview-tools[open]{padding-bottom:8px}.preview-tools .rare-preview-controls{flex-wrap:wrap;justify-content:center}.preview-tools select{max-width:100%}.lab-tools{font-size:11px}.lab-tools nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}.close-button{min-width:44px;min-height:44px}
.tear-meter #tear-meter-fill{width:100%;transform:scaleX(0);transform-origin:left;transition:none}
#app[data-state=tear] .native-stage,#app[data-state=tear] .native-stage:active{cursor:default}
@media(max-width:700px) and (max-height:740px){#choose .native-stage{height:clamp(250px,44svh,340px)}#choose .screen-heading{gap:5px;margin-bottom:10px}#choose .screen-heading h1{font-size:24px}#choose .screen-actions{margin-top:10px}#choose #selected-pack{margin:8px 0}}
@media(min-width:701px) and (max-height:800px){#choose .native-stage{height:clamp(260px,43svh,345px)}#choose .screen-heading{gap:7px;margin-bottom:14px}#choose #selected-pack{margin:10px 0}#choose .screen-actions{margin-top:12px}}

/* No uninitialized opaque canvas is ever presented during network/Shader preparation. */
#detail-native-card{position:relative}
.native-card-loading{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:16px;background:#f1f6fb;pointer-events:none}
.native-card-loading img{width:64%;max-height:72%;object-fit:contain;border-radius:4%}
.native-card-loading span{font-size:12px;color:#718197}
/* Width-responsive source portrait gate: scale the whole scene and HUD together.
   Height follows width; short browser windows scroll instead of cropping the scene.
   Source UI reference 750 x 1334; tap y=457, open y=357, footer height=152.
   The desktop toolbar and pack-count switch remain browser navigation adapters. */
:root{--game-width:min(100%,430px);--game-height:auto;--ui-unit:min(calc(100vw / 750),.5733333333px)}
.topbar{height:60px;padding:0 24px;max-width:900px}
main{min-height:var(--game-height);max-width:100%;}
#choose,#tear,#reveal{width:var(--game-width);height:auto;aspect-ratio:750/1334;padding:0;margin:0 auto;overflow:visible;background:#f1f6fb}
#choose .native-stage,#tear .native-stage,#native-reveal-host{position:absolute;inset:0;width:100%;height:100%;max-width:none;margin:0;border-radius:0}
#choice-host,#tear-host{position:absolute;inset:0}
#choose .screen-heading,#tear .screen-heading,#reveal .screen-heading{position:absolute;z-index:3;top:15.74%;left:5.333%;width:89.333%;margin:0;pointer-events:none;gap:0}
#choose .screen-heading h1,#tear .screen-heading h1,#reveal .screen-heading h1,#choose .series,#reveal-step{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
#choose .screen-heading .hint,#tear .screen-heading .hint,#reveal .screen-heading .hint{font-size:clamp(12px,calc(28 * var(--ui-unit)),20px);line-height:1.5;max-width:100%;text-align:center}
#tear .screen-heading{top:23.24%}
#tear .back-button{position:absolute;top:calc(-270 * var(--ui-unit));pointer-events:auto}
#choose .mode-switch{position:absolute;top:3%;left:0;right:0;z-index:4;margin:0;gap:6px}
#choose .mode-switch button{padding:7px 24px;font-size:12px}
#choose #selected-pack{position:absolute;left:0;right:0;bottom:calc(180 * var(--ui-unit));margin:0;font-size:12px;pointer-events:none}
#choose .screen-actions,#tear .screen-actions,#reveal .reveal-actions{position:absolute;z-index:4;bottom:calc(22 * var(--ui-unit));left:0;right:0;margin:0;gap:3px}
#choose .primary,#tear .primary,#reveal .primary{min-width:0;padding:12px 26px;font-size:13px}
#choose .screen-actions>.quiet,#tear .tear-meter,#reveal .card-dots,#reveal .reveal-info{display:none}
#choose .preview-tools{position:absolute;top:100%;font-size:11px;margin:0}
#choose:has(.preview-tools[open]){overflow:visible}
#reveal .reveal-actions{flex-direction:row;justify-content:center;gap:10px}
#reveal .reveal-actions .primary{background:transparent;color:var(--ink);box-shadow:none;padding:10px;font-size:12px;letter-spacing:0}
#reveal .reveal-actions .text-button{font-size:12px}
#native-rarity{position:absolute;z-index:3;top:76%;left:10%;width:80%;height:calc(128 * var(--ui-unit));margin:0;pointer-events:none}
.native-rarity-icons{gap:calc(4 * var(--ui-unit))}
.native-rarity-icons{--rating-icon-size:calc(116 * var(--ui-unit))}
#rare-preview-back,#reveal-immersive{position:absolute;z-index:4;bottom:8%;left:50%;transform:translateX(-50%);white-space:nowrap}
#reveal .native-card-loading img{width:73%}
#new-card{font-size:clamp(10px,calc(25 * var(--ui-unit)),16px)}
#tear .screen-actions{pointer-events:none}#tear .screen-actions button{pointer-events:auto}
#app .screen #native-reveal-host.is-immersive{position:fixed;width:100vw;height:100dvh;inset:0}
@media(max-width:700px){.topbar{height:48px;padding:0 14px}.brand{font-size:16px}.icon-button{height:30px;width:30px}#choose .native-stage,#tear .native-stage{height:100%;margin:0}#choose .screen-heading{margin:0;gap:0}#choose .screen-actions{margin:0}#choose #selected-pack{margin:0}}

/* PackUIResultCardLayoutLine2ListCell, source layout_elm_05 (750 x 603). */
#results{width:var(--game-width);padding:28px 0 18px;margin:auto}
#results .screen-heading{padding:0 20px}
#results h1{font-size:23px}
#result-cards{display:block;width:100%;margin:28px auto 16px;}
.source-result-pack{position:relative;width:100%;aspect-ratio:750/603;margin:0 0 18px}
.source-result-pack .result-item{position:absolute;max-width:none;animation:none;transition:none;text-align:center}
.source-result-pack .result-item h3,.source-result-pack .result-item p{display:none}
.source-result-pack .result-item button>img{border-radius:4%;box-shadow:none}
.source-result-pack .result-item.rare button>img{box-shadow:none}
.source-result-pack .result-item button:hover{transform:none}
.preview-tools{margin:8px auto;max-width:600px;text-align:center}
.preview-tools:not([open]) .rare-preview-controls{display:none}

#native-rarity .native-rarity-icons{justify-content:flex-start;gap:0}#native-reveal-host #new-card{transform:none}

/* Keep browser gesture help above the source NEW anchor. */
#reveal .screen-heading,#tear .screen-heading{top:10%;}

/* Original PackOpenUIDialog: asset pixels, RectTransforms and AnimationClips. */
#original-hud{position:absolute;top:0;left:50%;transform:translateX(-50%);width:var(--game-width);height:auto;aspect-ratio:750/1334;z-index:5;pointer-events:none;overflow:visible}
.source-hud-viewport{position:absolute;left:0;top:0;transform-origin:0 0;overflow:clip}
.source-hud-node{position:absolute;box-sizing:border-box;padding:0;margin:0;border:0;background:transparent;letter-spacing:0;font-weight:400;box-shadow:none}
.source-hud-image{position:absolute;inset:0;box-sizing:border-box;background-repeat:no-repeat;pointer-events:none}
.source-hud-label{white-space:nowrap;display:block;line-height:1.15}
.source-hud-node.source-hud-button{pointer-events:auto;cursor:pointer;touch-action:manipulation;border-radius:50%;min-width:0;min-height:0}
.source-hud-button::after{content:"";position:absolute;inset:-10px}
.source-hud-button:focus-visible{outline:4px solid #40bcd2;outline-offset:6px}
.source-hud-node[hidden],#original-hud[hidden]{display:none}
#choose-hint,#tear-instruction,#reveal-hint{visibility:hidden}
#reveal #next-card{position:absolute;left:50%;bottom:0;transform:translateX(-50%)}

/* Compact browser control: one box owns the face, label and subtle shadow. */
#fast-forward{right:18px;bottom:18px;width:86px;height:44px;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;border:1px solid #cbd8e3;border-radius:14px;background:#f8fbff;color:#43576c;font:600 13px/1 system-ui,sans-serif;box-shadow:0 2px 5px #33496314;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:background-color .12s,color .12s,border-color .12s}
#fast-forward::after{display:none}
#fast-forward svg{flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#fast-forward span{pointer-events:none}
#fast-forward[aria-pressed="true"]{background:#d8eef3;color:#176679;border-color:#90c6d2;box-shadow:inset 0 1px 2px #17667914}
#fast-forward:focus-visible{outline:2px solid #25849a;outline-offset:3px}
#fast-forward:disabled{opacity:.45;cursor:default}
@media(prefers-reduced-motion:reduce){#fast-forward{transition:none}}
#reveal-all{position:absolute;right:calc(130 * var(--ui-unit));bottom:0}

/* Original badge_layout_elm: ARM64 Color32 gradient + source font/sliced mesh. */
@font-face{font-family:PocketNew;src:url(assets/original/ui/hud/new-label.otf)}
#new-card,.result-new{width:49.589999999999996px;height:24.0px;padding:0;text-align:center;line-height:24.0px;font-family:PocketNew,sans-serif;font-size:15px;font-weight:400;letter-spacing:0;background:transparent var(--native-new-gradient,url('assets/original/ui/hud/new-gradient.png')) center/100% 100% no-repeat;color:rgba(252.00000017881393,253.0000001192093,252.00000017881393,1.0);isolation:isolate}
#new-card::before,.result-new::before{inset:-15px -21px -21px -15px;background:url('assets/original/ui/hud/new-shadow-sliced.png') center/100% 100% no-repeat;mask:none;z-index:-1}

/* Source pack artwork, compact selection above the original 3D scene. */
.pack-selector{display:flex;gap:10px;max-width:520px;margin:18px auto 8px;padding:0 16px;position:relative;z-index:2}
.pack-option{flex:1;min-width:0;display:grid;grid-template-columns:36px 1fr;align-items:center;gap:0 8px;padding:9px;border:1px solid #dbe5ef;border-radius:14px;background:#ffffffb8;color:#344d67;text-align:left;cursor:pointer}
.pack-option img{width:36px;height:58px;object-fit:contain;grid-row:span 2}
.pack-option span{font-weight:700;font-size:14px}.pack-option small{font-size:11px;color:#72859a}
.pack-option[aria-pressed="true"]{border-color:#6684a4;box-shadow:0 0 0 1px #6684a4;background:#fff}
.pack-option:disabled{cursor:wait;opacity:.65}.pool-count{text-align:center;font-size:12px;color:#72859a;margin:6px 12px 14px}
.collection-filter{display:flex;gap:12px;align-items:center;margin:16px 0}.collection-filter select{padding:8px 12px;border:1px solid #dbe5ef;border-radius:9px;background:white;color:#344d67}
@media(max-width:430px){.pack-selector{gap:7px;padding:0 10px}.pack-option{padding:7px;grid-template-columns:29px 1fr;gap:0 5px}.pack-option img{width:29px;height:48px}.pack-option span{font-size:12px}.pack-option small{font-size:10px}.pool-count{font-size:11px}}
#choose .pack-selector{position:absolute;top:10px;left:0;right:0;margin:0;padding:0 12px;max-width:none;z-index:5}
#choose .pack-option{padding:6px;grid-template-columns:30px 1fr;min-height:60px}
#choose .pack-option img{width:30px;height:44px}
#choose .mode-switch{top:82px}
#choose .pool-count{position:absolute;top:122px;left:0;right:0;margin:0;z-index:4;pointer-events:none;font-size:10px}

/* Browser controls have their own flow space; the source HUD keeps its original anchors. */
.pack-toolbar{width:min(100%,750px);margin:0 auto;padding:0 0 8px}
.pack-toolbar .pack-selector{max-width:none;margin:8px auto;padding:0 12px}
.pack-toolbar .mode-switch{margin:8px auto}
.pack-toolbar .pool-count{margin:6px 12px;font-size:11px}
/* A width-led portrait can be taller than the window: vertical swipes scroll selection. */
#app[data-state="choose"] .native-stage{touch-action:pan-y}

/* Browser navigation sits after the width-fitted source stage. */
#reveal{margin-bottom:110px}
.reveal-browser-actions{position:absolute;top:100%;left:0;right:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 16px;padding:12px}
#reveal .reveal-browser-actions .reveal-actions{position:static;display:flex;gap:20px;margin:0}
#reveal .reveal-browser-actions #next-card,#reveal .reveal-browser-actions #reveal-all,#reveal .reveal-browser-actions #rare-preview-back,#reveal .reveal-browser-actions #reveal-immersive{position:static;transform:none;margin:0;min-height:44px}
.dialog-heading{position:sticky;top:-24px;background:#fbfcff;z-index:3;padding:10px 0}
.card-dialog>.close-button{position:sticky;top:0;float:right;z-index:20}
html:has(dialog[open]){overflow:hidden}

/* Card catalog is a browser adapter; original pack camera remains width responsive. */
.pool-open{display:block;margin:0 auto;min-height:44px}
.pool-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 20px}
.pool-filters label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:#526b84}
.pool-filters select,.pool-filters input{min-width:0;width:100%;min-height:44px;padding:9px 10px;border:1px solid #dbe5ef;border-radius:9px;background:white;color:var(--ink);font:inherit;font-size:14px}
.pool-item>img{height:auto;aspect-ratio:367/512;object-fit:contain}
.pool-item .pool-meta{margin:4px 0 0;font-size:10px;line-height:1.6;color:#627b94;overflow-wrap:anywhere}
.pool-item:focus-visible{outline:3px solid #527d99;outline-offset:5px;border-radius:6px}
#pool-empty{text-align:center;padding:35px 0}
@media(max-width:360px){.pool-dialog{padding:18px}.pool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.series-control{display:flex;justify-content:center;align-items:center;gap:12px;padding:8px 12px;font-size:12px;color:#526b84}
.series-control select{max-width:75%;padding:9px 12px;border:1px solid #dbe5ef;border-radius:9px;background:white;color:var(--ink);font:inherit;min-height:44px}
.pack-boundary{text-align:center;font-size:11px;margin:8px 16px;line-height:1.7}
/* Six-card physical boosters have a separate browser result layout. */
.browser-result-pack{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 12px;padding:12px;margin:0 0 20px}
.browser-result-pack .result-item{position:relative;width:100%;max-width:none;animation:none;text-align:center}
.browser-result-pack .result-item button>img{width:100%;height:auto;aspect-ratio:800/1117;object-fit:contain;box-shadow:none}
.browser-result-pack .result-item h3{font-size:11px;overflow-wrap:anywhere}
.browser-result-pack .result-item p{font-size:10px}
#native-rarity .native-rarity-icons.is-printed{font-size:clamp(12px,2.5vw,20px);color:#526b84;white-space:nowrap}

/* Catalog scope and verified pool membership. */
.pool-overview{margin:0 0 18px}.pool-overview .quiet{line-height:1.7;overflow-wrap:anywhere}.pool-rarity-counts{display:flex;flex-wrap:wrap;gap:6px}.pool-rarity-counts button{border:1px solid #dbe5ef;background:#f5f8fc;color:#405975;border-radius:16px;padding:7px 10px;font:inherit;font-size:12px}.pool-rarity-counts button[aria-pressed=true]{background:#344e68;color:white;border-color:#344e68}#detail-membership{line-height:1.7;overflow-wrap:anywhere;max-width:100%}.pool-overview>.text-button{padding-left:0;margin-top:8px}

#detail-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0}#detail-position{font-size:12px;color:#627b94;white-space:nowrap}#detail-navigation button:disabled{opacity:.35;cursor:default}#detail-pools{border-top:1px solid #dbe5ef;margin-top:14px;padding-top:12px;text-align:left}#detail-pools h3{font-size:14px;margin:0 0 6px}.detail-pack-option{padding:10px 0;border-bottom:1px solid #e7edf4}.detail-pack-option p{font-size:12px;line-height:1.7;margin:0;overflow-wrap:anywhere}.detail-pack-option button{min-height:40px;padding:8px 0}.detail-pack-option button:disabled{opacity:.4;cursor:default}#detail-pools>.quiet{font-size:11px;line-height:1.6}

.card-dialog p.quiet,.card-dialog #detail-membership{color:#627b94;letter-spacing:normal;line-height:1.7}.card-dialog #detail-pools p{color:#405975;letter-spacing:normal;line-height:1.7}.card-dialog #detail-pools>.quiet{color:#627b94}
/* One portrait presentation on desktop and phones; no wide game canvas. */
.topbar,.pack-toolbar,footer,.preview-tools,.runtime-details{width:100%;max-width:430px;margin-left:auto;margin-right:auto}
.pack-toolbar{padding-left:12px;padding-right:12px;box-sizing:border-box}
.pack-toolbar .pack-boundary{display:none}
#choose,#tear{overflow:hidden}
/* Keep navigation outside the card viewport; only the renderer itself clips. */
#reveal{overflow:visible}
#tear .screen-heading,#app:has([data-pack-artwork=true]) #tear .screen-heading{top:1%}
#tear .back-button,#app:has([data-pack-artwork=true]) #tear .back-button{left:0;top:0;min-height:44px}
#tear .screen-heading .hint{margin-top:44px}
#app[data-state=tear] .is-opening .screen-heading{visibility:hidden}
@media(min-width:431px){body{background:#e8eef5}.topbar,.pack-toolbar,main,footer,.preview-tools{background:#f4f7fc}main{max-width:430px;margin:auto}.topbar{padding-left:14px;padding-right:14px}}


/* Published faces fill a different silhouette; retain the source hint clip in the top gap. */

/* Source scene/card/window tracks own presentation timing. */
.screen{animation:none}
/* Opening owns the stage until disclosure; browser controls must not cover it. */
#app[data-state=tear] .is-opening .screen-actions{visibility:hidden}

/* Atlas star: restore its 128px logical rect around the 106x101 trimmed image.
   Asymmetric top/bottom padding follows textureRectOffset in the source atlas. */

/* Shared original rarity slots: diamond, gold star, shiny star and crown. */
.rarity-rating{--rating-icon-size:20px;display:inline-flex;align-items:center;justify-content:center;gap:0;vertical-align:middle;letter-spacing:0;line-height:1.3}
img.rating-glyph{display:block;flex:none;box-sizing:border-box;width:var(--rating-icon-size);height:var(--rating-icon-size);max-width:none;aspect-ratio:1;object-fit:fill;border-radius:0;box-shadow:none;padding:calc(var(--rating-icon-size)*var(--rating-top)) calc(var(--rating-icon-size)*var(--rating-right)) calc(var(--rating-icon-size)*var(--rating-bottom)) calc(var(--rating-icon-size)*var(--rating-left));filter:url(#pocket-rarity-soft-edge)}
#native-rarity .rarity-rating{--rating-icon-size:calc(116 * var(--ui-unit));display:flex}
#detail-rarity{--rating-icon-size:26px;min-height:26px}
.pool-meta .rarity-rating{--rating-icon-size:17px}
.pool-rarity-counts button{display:inline-flex;align-items:center;gap:4px;min-height:36px}
.pool-rarity-counts .rarity-rating{--rating-icon-size:19px}
.result-item p .rarity-rating{--rating-icon-size:20px;min-height:20px}

/* Three visible pack choices need full-width labels on narrow portrait screens. */
@media(max-width:360px){
 .pack-selector:has(>.pack-option:not([hidden])~.pack-option:not([hidden])~.pack-option:not([hidden]))>.pack-option{grid-template-columns:1fr;grid-template-rows:42px auto auto;justify-items:center;text-align:center;row-gap:3px;padding:7px 4px}
 .pack-selector:has(>.pack-option:not([hidden])~.pack-option:not([hidden])~.pack-option:not([hidden]))>.pack-option img{grid-row:auto;width:26px;height:42px}
 .pack-selector:has(>.pack-option:not([hidden])~.pack-option:not([hidden])~.pack-option:not([hidden]))>.pack-option span{width:100%;min-height:2.6em;line-height:1.3;text-wrap:balance;display:grid;place-items:center}
}

#collection-status{max-width:430px;margin:20px auto 12px;padding:0 16px;text-align:center}

/* Promo volumes stay individually selectable without squeezing thirteen labels. */
.pack-selector.is-promo{overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:8px;overscroll-behavior-x:contain}
.pack-selector.is-promo .pack-option{flex:0 0 142px;scroll-snap-align:start}
#result-cards[data-cards-per-pack="4"] .browser-result-pack{grid-template-columns:repeat(2,minmax(0,1fr))}
#result-cards[data-cards-per-pack="1"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#result-cards[data-cards-per-pack="1"] .browser-result-pack{grid-template-columns:1fr;margin:0;padding:8px}
#result-cards[data-cards-per-pack="1"][data-pack-count="1"]{display:block;max-width:230px;margin:0 auto}

/* 来集卡 public shell (topbar is capped at 430px on every screen) */
html:not([data-debug]) .dev-only{display:none!important}
.laijika-brand{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;column-gap:9px;align-items:center;color:var(--ink);text-decoration:none;white-space:nowrap;letter-spacing:-.2px;font-size:inherit}
.laijika-mark{grid-row:1/3;width:30px;height:30px;border-radius:8px;background:#1c2737;color:#fff;display:grid;place-items:center;transform:rotate(-6deg)}
.laijika-mark svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.laijika-name{font-weight:750;font-size:17px;line-height:1.1}
.laijika-sub{font-size:10.5px;font-weight:500;color:#7890a9;letter-spacing:1px;line-height:1.3}
.topbar .top-actions{gap:8px}
.laijika-back{white-space:nowrap;color:var(--ink);text-decoration:none;display:inline-flex;align-items:center;gap:4px;border:1px solid #d9e2ed;border-radius:18px;padding:6px 11px!important;font-size:12.5px!important;background:#ffffffa0}
.laijika-back:hover{border-color:#256d66;color:#256d66}
.laijika-brand:focus-visible,.laijika-back:focus-visible{outline:3px solid #2588ad;outline-offset:4px}
#collection-open{white-space:nowrap}
@media(max-width:359px){.laijika-sub{display:none}.laijika-back{padding:6px 8px!important}#collection-total{display:none}.topbar .top-actions{gap:4px}}

/* Collection: real card images, greyed until collected */
.collection-item.empty>img{filter:grayscale(1) contrast(.85) brightness(1.08);opacity:.42}
.collection-item.empty h3,.collection-item.empty .pool-meta{color:#9aa6b5}
.collection-item.owned>img{box-shadow:0 0 0 1px #ffffff,0 4px 14px #1f5f8c33}
.collection-item{cursor:pointer}
.collection-item .pool-meta{font-size:10px;margin:2px 0 0;color:#8190a3}
.collection-filter[hidden]{display:none!important}
/* Probability notice */
.toolbar-links{display:flex;gap:4px;justify-content:center;flex-wrap:wrap}
.odds-dialog{max-width:900px}
.odds-table-wrap{overflow-x:auto;margin:6px 0 10px}
.odds-table{border-collapse:collapse;width:100%;font-size:12px;font-variant-numeric:tabular-nums}
.odds-table th,.odds-table td{padding:7px 8px;border-bottom:1px solid #e3eaf2;text-align:right;white-space:nowrap}
.odds-table thead th{font-weight:600;color:#5d6d82;background:#f1f5fa;position:sticky;top:0}
.odds-table tbody th{text-align:left;font-weight:500}
.odds-table td:nth-last-child(-n+2){font-weight:600;color:#24364d}
.odds-notes{margin:8px 0 0;padding-left:18px;font-size:12px;line-height:1.8;color:#6d7b8e}
.rarity-rating .rating-ghost{position:absolute;left:50%;top:50%;width:28px;height:28px;margin:-14px 0 0 -14px;opacity:0!important;pointer-events:none}

.runtime-details[hidden]{display:none!important}.public-notice{margin:24px auto;max-width:430px;padding:0 20px;text-align:center}
