/* An openable keepsake cabinet, not a single promotional banner. */
.cw-badge-shelf{padding:24px 0;border-bottom:1px solid #e4e1e9}
.cw-badge-shelf>button{display:block;width:100%;text-align:left;border:0;background:none;padding:0;color:#161419;font-family:inherit;cursor:pointer}
.cw-shelf-heading,.cw-shelf-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cw-shelf-heading strong{display:block;font-size:23px;line-height:1.12;letter-spacing:-.04em}
.cw-shelf-heading small{display:block;color:#68616e;font-size:13px;margin-top:7px}
.cw-shelf-heading>span:last-child{font-size:24px}
.cw-shelf-medals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));justify-items:center;gap:8px;padding:18px 0;background:transparent;border:0;margin:18px 0 14px}
.cw-shelf-footer{font-size:12px;color:#68616e}.cw-shelf-footer b{color:#6422cb;font-weight:700}
.cw-medal{display:block;position:relative;width:72px;max-width:100%;aspect-ratio:1;flex-shrink:1}
.cw-medal svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 3px 1px #1c102520)}
.cw-medal-edge{fill:#dcd5e6;stroke:#8f849b;stroke-width:1}
.cw-medal-inner{fill:#f9f6ff;stroke:#b7a9c9;stroke-width:1}
.cw-medal-symbol{fill:#7020ff}
.cw-medal.collected .cw-medal-edge{fill:#baa8da;stroke:#725992}
.cw-medal.collected .cw-medal-inner{fill:#7020ff;stroke:#dec6ff}
.cw-medal.collected .cw-medal-symbol{fill:#d6ff32}
.cw-medal.milestone.collected .cw-medal-inner{fill:#17141c}.cw-medal.campaign.collected .cw-medal-inner{fill:#d6ff32}.cw-medal.campaign.collected .cw-medal-symbol{fill:#272031}
.cw-medal.uncollected .cw-medal-symbol{fill:#938a9d}.cw-medal.empty{opacity:.4}.cw-medal.empty .cw-medal-symbol{fill:#bab3c2}
.cw-medal>i{position:absolute;right:0;bottom:0;width:19px;height:19px;border-radius:50%;border:2px solid #fff;background:#d6ff32;color:#151318;font:700 11px/15px sans-serif;text-align:center}
.cw-collection-open{overflow:hidden}
dialog.cw-collection{box-sizing:border-box;width:min(100%,520px);height:min(92dvh,920px);max-width:100%;max-height:92dvh;margin:auto auto 0;padding:0 20px 30px;border:1px solid #ddd7e5;border-bottom:0;border-radius:22px 22px 0 0;background:#fcfbfd;color:#161419;overflow:auto;overscroll-behavior:contain;font-family:'Satoshi',sans-serif;animation:cw-sheet-in .24s cubic-bezier(.22,1,.36,1)}
.cw-collection::backdrop{background:#0e0916a6}
.cw-collection>header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;background:#fcfbfdf5;border-bottom:1px solid #e4dfea}
.cw-collection h2{font-size:17px;letter-spacing:-.02em;margin:0}
.cw-collection button{font:inherit;cursor:pointer;min-height:44px;color:inherit}
.cw-collection header button{font-size:28px;width:44px;border:0;border-radius:50%;background:#f0edf4;font-weight:400}
.cw-collection-intro{padding:24px 0 12px}.cw-collection-intro h3{font-size:36px;font-weight:900;line-height:1;letter-spacing:-.055em;margin:0 0 12px;color:#161419}.cw-collection-intro p{color:#68616e;font-size:13px;margin:0}
.cw-badge-filters{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 20px}
.cw-badge-filters button{border:1px solid #ded8e6;background:none;border-radius:99px;padding:8px 12px;font-size:12px;font-weight:650}
.cw-badge-filters button[aria-pressed=true]{background:#17141c;color:white;border-color:#17141c}
.cw-badge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px}
.cw-badge-grid>button{display:grid;grid-template-rows:112px 54px 18px;justify-items:center;align-items:start;row-gap:10px;min-width:0;padding:10px 4px;border:0;border-radius:12px;background:transparent;box-shadow:none;text-align:center;transition:transform .14s ease}
.cw-badge-grid .cw-medal{width:92px;margin:0 0 16px}
.cw-badge-grid small{font-size:10px;line-height:1.4;color:#6c6278;margin-bottom:7px}
.cw-badge-grid strong{display:flex;align-items:center;justify-content:center;min-height:54px;font-size:15px;line-height:18px;letter-spacing:-.025em;max-width:100%;text-wrap:balance;overflow-wrap:anywhere}
.cw-badge-grid button>span:last-child{font-size:11px;line-height:18px;color:#68616e;margin:0}
.cw-badge-detail{padding-top:12px}.cw-badge-detail>button{background:none;border:0;padding:8px 0;font-size:13px;color:#6422cb}
.cw-badge-object{display:grid;place-items:center;padding:22px 0 20px;background:radial-gradient(ellipse at center,#e9e0fa 0,transparent 68%)}
.cw-badge-object .cw-medal{width:148px}.cw-badge-object .cw-medal>i{width:26px;height:26px;font-size:14px;line-height:22px}
.cw-edition{display:block;text-align:center;color:#64596f;font-size:12px;margin-top:4px}
.cw-badge-detail h3{font-size:32px;line-height:1.05;letter-spacing:-.045em;text-align:center;max-width:340px;margin:12px auto;text-wrap:balance;color:#161419}
.cw-badge-state{display:table;margin:14px auto;padding:7px 12px;border-radius:99px;background:#ece8f1;color:#5e526b;font-size:12px}
.cw-badge-state.is-collected{background:#d6ff32;color:#161419}
.cw-badge-detail p{font-size:14px;line-height:1.6;color:#68616e}.cw-badge-detail>p{text-align:center}
.cw-badge-detail section{background:white;border:1px solid #e4dfea;border-radius:12px;padding:18px;margin-top:24px}
.cw-badge-detail h4{margin:0;font-size:16px}.cw-badge-detail section p{margin:8px 0 12px}.cw-badge-detail small{display:block;font-size:12px;line-height:1.6;color:#68616e;margin-top:6px}
.cw-badge-detail progress{display:block;width:100%;height:8px;accent-color:#7020ff;margin:15px 0 9px}
.cw-badge-detail p.cw-private-note{font-size:11px;color:#786f83;line-height:1.5;margin:18px 0}
.cw-badge-message{padding:28px 0;color:#68616e;line-height:1.6;font-size:14px}
.cw-collection-skeleton{display:flex;gap:12px;margin-top:24px}.cw-collection-skeleton i{width:72px;height:72px;border-radius:50%;background:#eee9f4;animation:cw-breathe 1.8s ease-in-out infinite}
.cw-collection :is(button,summary):focus-visible,.cw-badge-shelf button:focus-visible{outline:3px solid #7020ff;outline-offset:3px}
.cw-badge-grid button:active,.cw-badge-filters button:active{transform:scale(.96)}
@media(hover:hover){.cw-badge-grid>button:hover strong{text-decoration:underline;text-underline-offset:4px}}
@keyframes cw-sheet-in{from{transform:translateY(24px)}to{transform:translateY(0)}}
/* Badge detail is inside the same native dialog, never a nested page overlay. */
.cw-collection{--badge-paper:#fcfbf7;-webkit-font-smoothing:antialiased}
dialog.cw-collection{background:var(--badge-paper);padding-bottom:max(28px,env(safe-area-inset-bottom));color:#23251f}
/* WKWebView needs a dedicated scrolling region inside the top-layer dialog. */
dialog.cw-collection[open]{display:flex;flex-direction:column;overflow:hidden}
.cw-collection>header{flex:none}
.cw-collection>#creator-achievements{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:16px}
.cw-collection>header{background:var(--badge-paper)}
.cw-medal>img{display:block;width:100%;height:100%;object-fit:contain}
.cw-medal.uncollected>img,.cw-medal.uncollected>svg{filter:grayscale(1);opacity:.62}
.cw-medal .cw-badge-lock{display:grid;place-items:center;background:#f8f7f2;color:#66685f;border-color:white;width:22px;height:22px}
.cw-medal .cw-badge-lock svg{width:13px;height:13px;filter:none}
.cw-badge-object .cw-medal .cw-badge-lock{display:none}
.cw-badge-group{margin:26px 0 0}.cw-badge-group>h4{margin:0;font-size:17px;line-height:1.3;letter-spacing:-.025em}
.cw-badge-group>p{font-size:12px;line-height:1.5;color:#66685f;margin:6px 0 14px;text-wrap:pretty}
/* Every category uses the same invisible display slot, even with one badge.
   Artwork keeps its own silhouette; no white cards or stretched featured rows. */
.cw-collection .cw-badge-grid .cw-medal{width:112px;height:112px;margin:0;align-self:center}
.cw-collection .cw-badge-grid>button{background:transparent;border:0;box-shadow:none}
.cw-badge-review-note,.cw-badge-sample{border:1px solid #dedbd1;border-radius:10px;background:#f1eee5;padding:11px 12px;font-size:12px!important;line-height:1.5!important;color:#595c51!important;text-align:left!important;margin:8px 0 16px}
.cw-badge-sample{background:#edf1fc;border-color:#c8d3ec}
.cw-collection .cw-badge-object{background:transparent;padding:16px 0}
.cw-collection .cw-badge-object .cw-medal{width:160px;height:160px}
.cw-art-preview{text-align:center;margin:0!important}.cw-badge-detail p{text-wrap:pretty}
.cw-badge-detail .cw-criteria-note{font-size:12px;color:#67695e;border-top:1px solid #e5e3dc;padding-top:12px}
.cw-badge-detail .cw-edition-ended{background:#f2ede5;border-radius:8px;padding:10px;font-weight:650}
.cw-next-tier{display:flex;align-items:center;gap:15px;margin:12px 0}.cw-next-tier .cw-medal{width:70px;height:70px}
.cw-next-tier b{font-size:15px}.cw-next-tier small{margin-top:2px}
.cw-tier-history ol{list-style:none;padding:0;margin:8px 0 0}.cw-tier-history li{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #ebe9e1}.cw-tier-history li:last-child{border:0}
.cw-tier-history .cw-medal{width:48px;height:48px}.cw-tier-history b{font-size:13px}.cw-tier-history small{margin-top:2px;font-variant-numeric:tabular-nums}
.cw-collection .cw-tier-preview{display:block;width:100%;padding:12px;margin:20px 0 0;background:#252820;color:#fff;border:0;border-radius:10px;font-size:13px;font-weight:700}
.cw-collection progress,.cw-badge-detail small{font-variant-numeric:tabular-nums}
.cw-medal.milestone[data-level="1"] .cw-medal-edge{fill:#bb764d}.cw-medal.milestone[data-level="1"] .cw-medal-inner{fill:#f0b68a}.cw-medal.milestone[data-level="1"] .cw-medal-symbol{fill:#774527}
.cw-medal.milestone[data-level="2"] .cw-medal-edge{fill:#a5b4c4}.cw-medal.milestone[data-level="2"] .cw-medal-inner{fill:#bbdff4}.cw-medal.milestone[data-level="2"] .cw-medal-symbol{fill:#266995}
.cw-medal.milestone[data-level="3"] .cw-medal-edge{fill:#dcb661}.cw-medal.milestone[data-level="3"] .cw-medal-inner{fill:#263955}.cw-medal.milestone[data-level="3"] .cw-medal-symbol{fill:#efd69f}
/* Core loading logic is untouched. No fabricated percentage or minimum delay. */
.cw-collection #cw-collection-title:focus{outline:none}
.cw-badge-reveal{text-align:center;padding:32px 4px 24px;display:grid;justify-items:center;gap:12px}
.cw-reveal-kicker{text-transform:uppercase;letter-spacing:.12em;font-size:11px;color:#6422cb;font-weight:700}
.cw-reveal-art{display:grid;place-items:center;width:240px;max-width:100%;height:220px;background:radial-gradient(ellipse,#d6ff3245,transparent 68%)}
.cw-reveal-art .cw-medal{width:180px;height:180px;animation:cw-badge-arrive .55s cubic-bezier(.2,0,0,1) both}
.cw-reveal-art .cw-medal{isolation:isolate;overflow:hidden}
.cw-reveal-art .cw-medal::after{content:'';position:absolute;inset:15%;pointer-events:none;background:linear-gradient(115deg,transparent 35%,#fff9 49%,transparent 62%);mix-blend-mode:screen;transform:translateX(-130%);animation:cw-award-shine .8s .5s ease-out both}
@keyframes cw-award-shine{0%{transform:translateX(-130%);opacity:0}30%{opacity:.75}100%{transform:translateX(130%);opacity:0}}
@media(prefers-reduced-motion:reduce){.cw-reveal-art .cw-medal::after{display:none;animation:none}}
.cw-badge-reveal h3{font-size:32px;line-height:1.05;letter-spacing:-.045em;text-wrap:balance;margin:0;max-width:350px}
.cw-badge-reveal p{margin:0;font-size:16px;line-height:1.5}
.cw-badge-reveal .cw-reveal-description{font-size:14px;color:#68616e;max-width:320px;text-wrap:pretty}
.cw-badge-reveal>button{width:100%;min-height:48px;border:0;border-radius:12px;padding:14px 18px;background:#d6ff32;color:#17141c;font-weight:700;margin-top:16px;transition:transform .15s ease-out}
.cw-badge-reveal>button:active{transform:scale(.96)}
.cw-badge-reveal>small{font-size:12px;color:#68616e;line-height:1.5}
.cw-badge-grid>button.cw-badge-just-earned{box-shadow:0 0 0 2px #7020ff;background:transparent}
@keyframes cw-badge-arrive{from{opacity:0;transform:translateY(12px) scale(.85)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.cw-reveal-art .cw-medal{animation:none}.cw-badge-reveal>button{transition:none}.cw-badge-reveal>button:active{transform:none}}
/* The initial frame cannot depend on a class added by a later script. */
#gateLoading.gate{background:#101014;color:#fff}
#gateLoading.gate .boot-world{display:grid;justify-items:center;gap:32px;background:none;border:0;box-shadow:none;max-width:360px;padding:28px}
#gateLoading.gate .boot-orbit{display:block;width:112px;height:112px;border:1px solid #ffffff16;animation:none}
#gateLoading.gate .boot-orbit:before{inset:-1px;width:auto;height:auto;border:1px solid transparent;border-top-color:#d6ff32;border-left-color:#8d56ef;border-radius:50%;background:none;box-shadow:none;animation:cw-orbit 2.8s linear infinite}
#gateLoading.gate .boot-orbit:after{content:'';position:absolute;inset:11px;border:1px solid #ffffff0c;border-right-color:#a778ff;border-radius:50%;animation:cw-orbit 4.8s linear reverse infinite}
#gateLoading.gate .boot-star{color:#d6ff32;animation:cw-breathe 2.8s ease-in-out infinite;transform:none}
#gateLoading.gate .boot-star svg{width:38px;height:38px}
#gateLoading.gate .boot-world b{font-family:'Satoshi',sans-serif;font-size:23px;letter-spacing:-.035em;line-height:1.2}
#gateLoading.gate .boot-world small{display:block;font-size:13px;line-height:1.6;color:#aba5b6;max-width:270px;margin-top:12px}
body.cw-collectibles-preview .creator-warmup{background:#f7f5fb!important;border:1px solid #e8e2f0!important;box-shadow:none!important;border-radius:14px!important}
body.cw-collectibles-preview .creator-warmup-orbit{background:none!important;border:1px solid #d9d1e5!important;border-top-color:#7020ff!important;box-shadow:none!important;border-radius:50%!important;animation:cw-orbit 2.8s linear infinite!important}
body.cw-collectibles-preview .creator-warmup-orbit i{color:#7020ff!important;animation:cw-orbit 2.8s linear reverse infinite!important}
body.cw-collectibles-preview .creator-warmup-lines i{background:#e6deef!important;animation:cw-breathe 2.8s ease-in-out infinite!important}
@keyframes cw-orbit{to{transform:rotate(360deg)}}
@keyframes cw-breathe{0%,100%{opacity:.5}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.cw-collection,.cw-collection-skeleton i,#gateLoading.gate .boot-orbit:before,#gateLoading.gate .boot-orbit:after,#gateLoading.gate .boot-star,body.cw-collectibles-preview .creator-warmup-orbit,body.cw-collectibles-preview .creator-warmup-orbit i,body.cw-collectibles-preview .creator-warmup-lines i{animation:none!important}.cw-badge-grid>button,.cw-badge-filters button{transition:none}}
.cw-fypi-object{position:relative;display:block;width:100%;height:100%;border-radius:50%;background:radial-gradient(circle at 32% 22%,#c2a4ff,#7020ff 65%,#34134c);border:4px solid #d6ff32;box-shadow:inset 0 0 0 3px #2c164c,0 3px 0 #32154d;isolation:isolate}
.cw-fypi-object>img{position:absolute;width:94%;height:94%;object-fit:cover;border-radius:50%;left:3%;top:3%}
.cw-fypi-object .cw-fypi-stars{position:absolute;z-index:1;top:2%;left:0;width:100%;text-align:center;font-size:15px;line-height:1;color:#e9ff9c;letter-spacing:2px}
.cw-fypi-object>b{position:absolute;bottom:-3%;left:18%;width:64%;padding:2% 0;text-align:center;border-radius:6px;background:linear-gradient(115deg,#ecffa8,#d6ff32);border:2px solid #32154d;color:#32154d;font:900 20px/1 'Satoshi',sans-serif;letter-spacing:-.04em}
.cw-fypi-object .cw-fypi-heart{position:absolute;right:-2%;top:57%;color:#ff83c2;font-size:26px;line-height:1;text-shadow:1px 2px #32154d}
.cw-medal.uncollected>.cw-fypi-object{filter:grayscale(1);opacity:.62}
.cw-reveal-art .cw-fypi-object>b{font-size:30px}.cw-reveal-art .cw-fypi-stars{font-size:21px}
dialog.cw-collection.cw-celebrating{inset:0;margin:auto;width:min(440px,calc(100% - 28px));height:fit-content;max-height:calc(100dvh - 40px);padding:16px 24px 24px;border:0;border-radius:24px;background:#17131e;color:#fff}
/* Safari collapses an auto-height flex dialog's flex:1 scroll child.
   Use the content's natural height and scroll the bounded sheet instead. */
dialog.cw-collection.cw-celebrating[open]{display:block;overflow-y:auto}
.cw-collection.cw-celebrating>#creator-achievements{overflow:visible;padding-bottom:0}
.cw-collection.cw-celebrating>header{background:transparent;border:0;padding:0;height:32px;justify-content:flex-end}
.cw-celebrating #cw-collection-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.cw-celebrating>header button{background:transparent;color:#fff;border:0}
.cw-celebrating .cw-badge-reveal{padding:0;gap:12px}
.cw-celebrating .cw-reveal-kicker{color:#d6ff32}
.cw-celebrating .cw-badge-reveal h3{color:#fff;font-size:32px}
.cw-celebrating .cw-reveal-description,.cw-celebrating .cw-badge-reveal>small{color:#bfb5cc}
.cw-celebrating .cw-reveal-art{position:relative;height:208px;background:radial-gradient(ellipse,#a070ff38,transparent 70%)}
.cw-reveal-spark{position:absolute;top:16%;right:0;color:#d6ff32;font-size:28px;animation:cw-spark-in .65s .12s both ease-out}
.cw-reveal-spark:last-child{top:auto;right:auto;bottom:12%;left:0;color:#c6a8ff;font-size:20px;animation-delay:.22s}
@keyframes cw-spark-in{from{opacity:0;transform:scale(.25) rotate(-30deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@media(prefers-reduced-motion:reduce){.cw-reveal-spark{animation:none}}
/* Collection 2026: recognition is readable without motion or a loaded image. */
.cw-medal .cw-tier-number{position:absolute;z-index:2;bottom:0;left:50%;transform:translateX(-50%);padding:4px 12px;min-width:42px;border-radius:7px;background:#17131e;color:#d6ff32;border:2px solid #d5cedf;font:900 18px/1 Satoshi,Arial,sans-serif;box-shadow:0 3px 0 #17131e;font-variant-numeric:tabular-nums}
.cw-medal.uncollected .cw-tier-number{color:#eee;background:#666;border-color:#aaa}
.cw-tiered-art[data-level="2"] .cw-tier-number{border-color:#a77aff;background:#7020ff;color:#fff}
.cw-tiered-art[data-level="3"] .cw-tier-number{border-color:#f7dc88;background:#d6ff32;color:#111}
.cw-tiered-art[data-level="4"] .cw-tier-number{border-color:#ffe6a0;background:#ffe6a0;color:#111}
.cw-medal.uncollected.cw-tiered-art .cw-tier-number{color:#eee;background:#666;border-color:#aaa}
.cw-medal.uncollected img{filter:grayscale(1);opacity:.5}
.cw-reveal-art .cw-tier-number{font-size:24px;padding:5px 18px}
dialog.cw-collection.cw-celebrating[open]{display:block;height:fit-content;min-height:min(520px,calc(100dvh - 40px));overflow:auto;max-height:calc(100dvh - 40px)}
.cw-collection.cw-celebrating>#creator-achievements{display:block;flex:none;min-height:0;height:auto;max-height:none;overflow:visible}
.cw-collection.cw-celebrating>header{height:44px;position:static}
.cw-celebrating .cw-reveal-kicker{padding:6px 16px;background:#d6ff32;color:#111;border-radius:100px;font-size:10px;letter-spacing:.16em}
.cw-celebrating h2.cw-reveal-announcement{font-size:clamp(27px,7.5vw,36px);line-height:1.04;font-weight:900;letter-spacing:-.045em;text-wrap:balance;max-width:340px;color:#fff;margin:8px 0 0}
.cw-celebrating .cw-reveal-art{height:200px;margin:4px 0}
.cw-celebrating .cw-badge-reveal h3{font-size:25px;line-height:1.1;letter-spacing:-.035em}
.cw-celebrating .cw-badge-reveal>strong{font-size:14px;color:#d6ff32}
.cw-celebrating .cw-badge-reveal>button{margin-top:10px;font-weight:800;min-height:52px}
.cw-badge-reveal .cw-reveal-description{max-width:290px}
.cw-reveal-art .cw-medal{animation:cw-badge-arrive .55s cubic-bezier(.2,0,0,1) both}
@media(max-height:680px){.cw-celebrating .cw-reveal-art{height:155px}.cw-reveal-art .cw-medal{width:145px;height:145px}.cw-celebrating .cw-badge-reveal{gap:8px}}
@media(prefers-reduced-motion:reduce){.cw-reveal-art .cw-medal{animation:none}}
