.collection-panel,.collection-chests{display:flex;flex-direction:column;gap:12px;min-height:0}
.collection-chest,.collection-set,.collection-item{color:#453528}
.collection-panel header,.collection-chests header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.collection-panel h1,.collection-chests h1{font-size:30px;margin:0}
.collection-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.collection-item{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 5px;min-width:0;border:2px solid #c8a572;border-radius:18px;background:linear-gradient(var(--cream-200),#ead3a1);box-shadow:0 4px 0 #89704c}
.collection-item img{width:66px;height:66px;object-fit:contain}.collection-item b{font-size:16px;line-height:1.1}.collection-item small{font:700 13px/1.2 system-ui}
.collection-set{padding:12px;text-align:center;border:2px solid #c8a572;border-radius:20px;background:var(--cream-300)}.collection-set h2{font-size:23px;margin:0 0 8px}.collection-set p{margin:6px 0;font:600 14px/1.25 system-ui}
.collection-set-icons{display:flex;justify-content:center;gap:18px}.collection-set-icons>span{display:flex;flex-direction:column;align-items:center}.collection-set-icons img{width:50px;height:50px;object-fit:contain}.collection-set-icons .is-locked{filter:grayscale(1)}
.collection-bonus{text-align:center;font:700 16px/1.2 system-ui}
.collection-detail>img{width:140px;height:140px;object-fit:contain}.collection-detail h1{font-size:30px}.collection-help p{font:600 15px/1.3 system-ui}
.collection-entry{display:flex;align-items:center;justify-content:center;gap:3px;padding:4px 8px;min-height:52px}.collection-entry img{width:34px;height:34px;object-fit:contain}.collection-entry b{font-size:16px}
.collection-chest{display:grid;grid-template-columns:80px minmax(0,1fr);gap:5px 12px;align-items:center;background:var(--cream-300);border:2px solid var(--rarity-standard);border-radius:20px;padding:12px}.collection-chest[data-tier=epic]{border-color:var(--rarity-epic);background:#ece0fc}.collection-chest h2{grid-column:1/-1;text-align:center;margin:0;font-size:23px}.collection-chest>img{width:80px;height:85px;object-fit:contain;grid-row:2/4}.collection-chest>small{font:600 12px/1.2 system-ui}.collection-chest>div{display:flex;gap:10px;grid-column:1/-1}.collection-chest>div>button{flex:1;min-width:0}
.collection-discovery .discovery-art img{position:absolute;width:min(118px,calc(100% - 14px));height:min(118px,calc(100% - 14px));object-fit:contain}
.collection-discovery+.equipment-actions{grid-template-columns:1fr}
.collection-chest[data-tier=rare],.login-chest[data-tier=rare]{border-color:var(--rarity-rare);background:#e1f2ff}
.collection-chest[data-tier=legendary],.login-chest[data-tier=legendary]{border-color:var(--rarity-legendary);background:#ffedbc}
.login-reward span{display:flex;align-items:center;justify-content:center;gap:3px;font:800 16px/1.2 system-ui}
.login-chest[data-tier=epic]{border-color:var(--rarity-epic);background:#e8d6fb}
.login-reward{display:flex;justify-content:center;gap:20px;padding:20px}.login-reward img{width:80px;height:80px;object-fit:contain}
@media(prefers-reduced-motion:no-preference){.collection-reveal>img{animation:collection-pop .75s cubic-bezier(.16,.7,.25,1.2) both}@keyframes collection-pop{0%{opacity:0;transform:scale(.2) rotate(-20deg)}55%{opacity:1;transform:scale(1.16) rotate(8deg)}100%{transform:none}}}
@media(max-height:800px){.collection-panel,.collection-chests{gap:8px}.collection-item{padding:7px 4px}.collection-set{padding:8px}.collection-chest{padding:8px;gap:4px 10px}.collection-chest>img{height:64px}.collection-detail>img{width:100px;height:100px}}
@media(max-height:730px){.collection-chests{gap:6px}.collection-chest{padding:6px;gap:3px 10px}.collection-chest>img{height:56px}}
/* Y03: Store uses the same bounded viewport shell as the other primary tabs. */
#online:has(.store-panel) #content{flex:1;min-height:0;display:flex;flex-direction:column}
#online:has(.store-panel) #tabs{flex:none;margin-top:auto}
#online .store-panel{align-self:stretch;flex:1;min-height:0;display:flex;flex-direction:column;gap:12px;margin:0}
#online .store-panel>h1,#online .store-panel>h2{margin:0}
/* One collection shelf, followed by its set. Ownership never changes rarity. */
.collection-panel{height:100%;justify-content:center;padding-bottom:8px;box-sizing:border-box}
.collection-panel>header{flex:none}.collection-bonus{padding:9px 12px;border:1px solid #a78c66;border-radius:14px;background:#332b38;color:#ffebbb}
.collection-item{position:relative;min-height:152px;justify-content:center;gap:9px;background:linear-gradient(var(--card-face),#ebd1a0);border-color:#c5a068}
.collection-item .eq-slot-icon{display:grid;place-items:center;width:72px;height:72px;border-radius:15px;border:2px solid var(--rarity-color,#b39770);box-sizing:border-box}
.collection-item b{min-height:35px;display:flex;align-items:center;justify-content:center}.collection-item small{color:#574437}
.collection-set{position:relative;background:linear-gradient(135deg,var(--cream-250),#e7cf9f);padding:12px 16px}
.collection-set>header{display:flex;justify-content:space-between;align-items:center}.collection-set h2{margin:0;font-size:22px}.collection-set>header>b{padding:4px 10px;background:#574039;color:var(--cream-350);border-radius:var(--vs-radius);font:800 14px/1.2 system-ui}
.collection-set-icons{position:relative;margin:10px 0 5px;gap:28px}.collection-set-icons>span{position:relative;border-radius:50%;background:#d7be90;padding:5px 10px}.collection-set-icons .is-owned{background:#ffe7a1}.collection-set.is-active{border-color:#d49c36}
/* Y07: four direct selectors, one stable chest stage; no two-card pager. */
.collection-chests{height:100%;box-sizing:border-box;gap:14px}
.collection-chests>header h1{font-size:27px;line-height:1.05}
.collection-chest-selector{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:2px 2px 6px}
.collection-chest-choice{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:74px;padding:6px;border:2px solid var(--rarity-standard);border-radius:15px;background:#dbd7d0;box-shadow:0 4px #554633}
.collection-chest-choice[data-tier=rare]{border-color:var(--rarity-rare);background:#dcefff}.collection-chest-choice[data-tier=epic]{border-color:var(--rarity-epic);background:#ebdcff}.collection-chest-choice[data-tier=legendary]{border-color:var(--rarity-legendary);background:#ffe9b3}
.collection-chest-choice[aria-pressed=true]{box-shadow:0 4px #9d7432,inset 0 0 0 3px #ffe588}
.collection-chest-choice img{width:54px;height:54px;object-fit:contain}.collection-chest-choice b{position:absolute;right:4px;bottom:3px;min-width:20px;border-radius:9px;padding:1px 4px;background:#352e39;color:var(--cream-350);font:800 12px/1.2 system-ui}
.collection-chests>.collection-chest{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px;padding:16px;background:radial-gradient(ellipse at 50% 35%,var(--paper),var(--row-inset));border-width:3px}
.collection-chests>.collection-chest[data-tier=rare]{background:radial-gradient(ellipse at 50% 35%,#f5fdff,#cbdff0)}.collection-chests>.collection-chest[data-tier=epic]{background:radial-gradient(ellipse at 50% 35%,#faf5ff,#d9c5ed)}.collection-chests>.collection-chest[data-tier=legendary]{background:radial-gradient(ellipse at 50% 35%,#fff9de,#f1d18c)}
.collection-chest .collection-chest-stage{flex:1;min-height:80px;display:grid;place-items:center;width:100%}.collection-chest-stage>img{height:100%;max-height:220px;max-width:75%;min-height:0;object-fit:contain;filter:drop-shadow(0 9px 7px #352c3833)}
.collection-chest-actions{display:flex;width:100%;padding-bottom:5px}.collection-chest-actions>button{flex:1}
/* Y12/Y21/Y22 and AA09: the Log In panel styles live in gifts-ui.css. */
.daily-reward-receipt .login-reward{align-items:center;padding:24px 0;gap:24px}.daily-reward-receipt .login-reward>span{flex-direction:column;font-size:30px;gap:12px}.daily-reward-receipt .login-reward img{width:110px;height:110px}
/* AB20: a three-reward receipt (Act encyclopedia: Gems + both key kinds) keeps every
   item inside the panel at Mini width; one- and two-item receipts are unchanged. */
.daily-reward-receipt .login-reward:has(>span:nth-child(3)){gap:10px}.daily-reward-receipt .login-reward:has(>span:nth-child(3))>span{font-size:26px;gap:10px;min-width:0}.daily-reward-receipt .login-reward:has(>span:nth-child(3)) img{width:80px;height:80px}
.daily-reward-receipt .login-chest{border-radius:18px;border:2px solid #b9bec7;background:#eef0f3;padding:8px}
/* AC06: the receipt chest tile carries its own tier colour (was always epic purple). */
.daily-reward-receipt .login-chest[data-tier=rare]{border-color:var(--rarity-rare);background:#e1f2ff}.daily-reward-receipt .login-chest[data-tier=epic]{border-color:var(--rarity-epic);background:#e8d6fb}.daily-reward-receipt .login-chest[data-tier=legendary]{border-color:var(--rarity-legendary);background:#ffedbc}
.collection-wallet{display:flex;justify-content:center;gap:12px;font:700 12px/1.3 system-ui;text-align:center}.collection-wallet>span{flex:1;padding:7px;border:1px solid #ac9271;border-radius:10px;background:#4d3b42;color:var(--cream-300)}.collection-wallet b{display:block;font-size:16px}
.collection-chest .collection-outcomes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:100%;font:700 12px/1.25 system-ui;text-align:center}.collection-outcomes>span{padding:4px;border-radius:7px;background:#ffffff66}
.collection-odds p{display:flex;justify-content:space-between;gap:12px;padding:7px 0;margin:0;border-bottom:1px solid #cbb083}.collection-odds b{white-space:nowrap}
.collection-upgrade{border:1px solid #cbb083;border-radius:14px;padding:8px}.collection-upgrade p{margin:6px 0;font:700 13px/1.3 system-ui}.collection-detail .collection-wallet{margin-top:8px}.collection-detail>p{font:600 14px/1.3 system-ui}
.collection-draw-receipt>img{width:140px;height:140px;object-fit:contain}.collection-draw-receipt h2{font-size:32px;margin:8px}.collection-draw-receipt p{font-size:18px}
.collection-batch-dialog{text-align:center}.collection-batch-dialog h1{margin:0;font-size:28px}.collection-batch-dialog>img{width:120px;height:120px;object-fit:contain}.collection-batch-dialog h2{margin:4px 0;font-size:23px}.collection-batch-dialog p{font:600 14px/1.3 system-ui}.collection-batch-dialog .exchange-stepper{margin:14px auto}
.collection-batch-receipt h1{font-size:28px}.collection-batch-receipt>p{margin:4px 0 12px;font-size:15px}.collection-batch-rewards{display:grid;gap:6px;width:100%}.collection-batch-rewards>div{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:48px;padding:3px 8px;border:1px solid #cbb083;border-radius:var(--vs-radius);background:var(--cream-300);text-align:left}.collection-batch-rewards img{width:42px;height:42px;object-fit:contain}.collection-batch-rewards span{font:700 13px/1.2 system-ui}.collection-batch-rewards b{font:800 17px/1.2 system-ui;white-space:nowrap}
@media(max-height:730px){.collection-batch-dialog>img{width:90px;height:90px}.collection-batch-rewards{gap:4px}.collection-batch-rewards>div{min-height:42px}.collection-batch-rewards img{width:38px;height:38px}}
@media(max-height:730px){.collection-wallet>span{padding:4px}.collection-detail>img{width:76px;height:76px}.collection-detail h1{margin:8px 0;font-size:26px}.collection-detail .collection-wallet{font-size:11px}.collection-upgrade{padding:6px}}
@media(max-height:730px){.collection-panel{gap:8px}.collection-item{min-height:130px;padding:7px 4px;gap:5px}.collection-item .eq-slot-icon{width:64px;height:64px}.collection-set-icons{margin:5px 0}.collection-set-icons img{width:40px;height:40px}.collection-chests{gap:10px}.collection-chest-choice{min-height:62px}.collection-chest-choice img{width:44px;height:44px}.collection-chests>.collection-chest{padding:12px;gap:8px}.collection-chest-stage>img{max-height:140px}}
/* AA11: opening-points track at the top, chest stage, rarity selector at the bottom. */
.collection-track [data-tier=standard],.collection-track-points>[data-tier=standard]{--rarity:var(--rarity-standard);--rarity-soft:#e3e0da}
.collection-track [data-tier=rare],.collection-track-points>[data-tier=rare]{--rarity:var(--rarity-rare);--rarity-soft:#dcefff}
.collection-track [data-tier=epic],.collection-track-points>[data-tier=epic]{--rarity:var(--rarity-epic);--rarity-soft:#ebdcff}
.collection-track [data-tier=legendary],.collection-track-points>[data-tier=legendary]{--rarity:var(--rarity-legendary);--rarity-soft:#ffe9b3}
.collection-track{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px 12px;border:2px solid #c8a572;border-radius:18px;background:linear-gradient(var(--cream-200),#ebd3a2);color:#453528;box-shadow:0 4px #5a4632}
.collection-track header{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}
.collection-track h2{margin:0;font-size:20px;line-height:1.1;white-space:nowrap}
.collection-track header b{font:800 14px/1.2 system-ui;white-space:nowrap;color:#5b4433}
.collection-track-count{display:inline-flex;align-items:center;gap:4px}.collection-track-count img{width:20px;height:20px;object-fit:contain}
/* AC14: chest-point tokens flying from the chest to the meter (fixed, above the screen). */
.chest-point-fx{position:fixed;left:0;top:0;z-index:60;width:32px;height:32px;pointer-events:none;opacity:0;will-change:transform,opacity;filter:drop-shadow(0 2px 2px #0a2a2e88)}
@media(prefers-reduced-motion:reduce){.chest-point-fx{display:none}}
.collection-track-bar{position:relative;height:14px;margin:9px 16px 8px 2px;border:2px solid #5c4636;border-radius:9px;background:#4b3b40;box-sizing:border-box}
.collection-track-fill{position:absolute;left:0;top:0;bottom:0;max-width:100%;border-radius:7px;background:linear-gradient(#ffe68a,#f4a531)}
.collection-track-node{position:absolute;top:50%;left:calc(var(--at) * 1%);display:grid;place-items:center;width:32px;height:32px;border:2px solid var(--rarity);border-radius:50%;background:var(--rarity-soft);box-sizing:border-box;box-shadow:0 2px #5c4636;transform:translate(-50%,-50%)}
.collection-track-node img{width:24px;height:24px;object-fit:contain}
.collection-track-node.is-next{box-shadow:0 2px #5c4636,0 0 0 3px #ffe588}
.collection-track-node.is-ready{background:var(--honey-300);box-shadow:0 2px #5c4636,0 0 0 3px var(--shine-100)}
.collection-track-node.is-claimed img{filter:grayscale(.75)}
.collection-track-node i{position:absolute;right:-7px;top:-7px;display:grid;place-items:center;width:17px;height:17px;border:2px solid #f0f4de;border-radius:50%;background:#426c48;color:#fffadf;font:900 10px/1 system-ui;font-style:normal;box-sizing:border-box}
.collection-track-reward{position:relative;display:grid;place-items:center;width:66px;height:60px;border:2px solid var(--rarity);border-radius:15px;background:var(--rarity-soft);box-sizing:border-box;box-shadow:0 3px #5c4636}
.collection-track-reward img{width:48px;height:48px;object-fit:contain}
.collection-track-reward b{position:absolute;right:3px;bottom:2px;min-width:20px;border-radius:9px;padding:1px 4px;background:#352e39;color:var(--cream-350);font:800 12px/1.2 system-ui;text-align:center}
/* AC639: shared 32px compact face in a stationary 44px target. */
#online .collection-track>button.collection-track-claim{width:88px;height:44px;min-height:44px;margin:0;padding:4px 12px}
/* AC639 lead review: a ready claim keeps the warm orange face of the old Claim. */
#online .collection-track>button.collection-track-claim.is-warm:not(:disabled){--small-top:var(--btn-claim-top);--small-bottom:var(--btn-claim-bottom);--small-edge:var(--btn-claim-edge);--small-lip:var(--btn-claim-lip);--small-shine:var(--btn-claim-shine)}
.collection-chests.has-track>.collection-chest-selector{padding:0 2px 6px}
.collection-points-gain{margin:10px 0 0;font:800 15px/1.2 system-ui;color:#6b4a1f}
.collection-track-points{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 12px}
.collection-track-points>span{display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 2px 4px;border:2px solid var(--rarity);border-radius:var(--vs-radius);background:var(--rarity-soft)}
.collection-track-points img{width:38px;height:38px;object-fit:contain}.collection-track-points b{font:800 15px/1.1 system-ui}
.collection-track-receipt .collection-batch-rewards>div{grid-template-columns:52px minmax(0,1fr) auto;min-height:58px}.collection-track-receipt .collection-batch-rewards img{width:50px;height:50px}
@media(max-height:800px){.collection-chests.has-track{gap:10px}.collection-chests.has-track>.collection-chest{padding:12px;gap:8px}}
@media(max-height:730px){.collection-chests.has-track{gap:8px}.collection-chests.has-track>header h1{font-size:25px}.collection-track{padding:7px 10px 9px;gap:10px}.collection-track header{margin-bottom:7px}.collection-track h2{font-size:18px}.collection-track-reward{width:58px;height:52px}.collection-track-reward img{width:40px;height:40px}.collection-chests.has-track>.collection-chest{padding:8px 12px;gap:5px}.collection-chests.has-track .collection-chest-stage>img{max-height:120px}.collection-track-points img{width:32px;height:32px}}
/* AA04 (build 36 feedback): the activation path is visible on the shelf. */
.collection-wallet>span{display:grid;grid-template-columns:auto auto;justify-content:center;align-items:center;column-gap:6px;row-gap:1px}.collection-wallet>span>img{width:28px;height:28px;object-fit:contain}.collection-wallet>span>b{font-size:18px;line-height:1}.collection-wallet>span>small{grid-column:1/-1;font:inherit;line-height:1.15}
/* Visual polish v1: a resource the next Upgrade still needs more of shows its count in the shared short red. */
.collection-wallet>span.is-short>b{color:#ff8a7a}
.collection-meter{position:relative;display:block;width:84%;height:10px;flex:none;border:1.5px solid #8e6f45;border-radius:7px;background:#5c4637;box-shadow:inset 0 2px #2d211b66;overflow:hidden;box-sizing:border-box}
.collection-meter>i{position:absolute;left:0;top:0;bottom:0;border-radius:5px;background:linear-gradient(var(--honey-200),#f2a331);box-shadow:inset 0 1.5px #fff7cf}
.collection-meter.is-detail{width:min(220px,80%);height:14px;margin:6px auto 2px;border-radius:9px}
.collection-item>small{text-align:center;text-wrap:balance}
.collection-cta{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:76%;min-height:28px;padding:2px 10px 4px;box-sizing:border-box;border:2px solid #3b1f14;border-radius:var(--vs-radius);background:linear-gradient(#ffc76a,#f0892c);box-shadow:inset 0 2px #ffe9b8,inset 0 -3px #b65a1d,0 3px #3b1f14;color:#fff;font:17px/1 Lucky,system-ui,sans-serif;-webkit-text-stroke:2.5px #3b1f14;paint-order:stroke fill;text-shadow:none;white-space:nowrap}
.collection-item.is-ready{border-color:#db901e;background:linear-gradient(var(--card-face),#ffe09a);box-shadow:0 4px 0 #ad712c}
.collection-item.is-ready:after{content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:0 0 12px 5px #ffcf4ddd;pointer-events:none}
.collection-item.is-ready .eq-slot-icon{border-color:#e9a43a;background:radial-gradient(circle,#fff6cf 0 45%,#ffe1a0)}
@media(prefers-reduced-motion:no-preference){
 .collection-item.is-ready:after{animation:collection-ready-glow 1.8s ease-in-out var(--ready-delay,0ms) infinite alternate}
 .collection-item.is-ready .collection-cta{animation:collection-ready-cta 1.8s ease-in-out var(--ready-delay,0ms) infinite alternate}
 #modal .collection-ready-action:not(:disabled){animation:collection-ready-cta 1.8s ease-in-out infinite alternate}
}
@keyframes collection-ready-glow{from{opacity:.3;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
@keyframes collection-ready-cta{from{transform:scale(1)}to{transform:scale(1.06)}}
#modal .equipment-actions>button.collection-ready-action:not(:disabled){--small-top:var(--btn-commit-top);--small-bottom:var(--btn-commit-bottom);--small-edge:var(--btn-commit-edge);--small-lip:var(--btn-commit-lip);--small-shine:var(--btn-commit-shine)}
.collection-source{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:4px 12px;border:2px solid #a78c66;border-radius:14px;background:#332b38;color:#ffebbb;font:700 15px/1.2 system-ui}
.collection-source>img{flex:none;width:34px;height:34px;object-fit:contain}.collection-source>b{font:26px/1 Lucky,system-ui;color:#ffd77a}
/* AA05: the Collectibles guide (items, stars, set), separate from the chest odds. */
.collection-guide h2{margin:4px 0 8px;font-size:23px;text-align:center}
.collection-guide-row{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:10px;margin:0;padding:8px 0;border-bottom:1px solid #cbb083;text-align:left}
.collection-guide-row:last-of-type{border-bottom:0}
.collection-guide-row>img,.collection-guide-glyph{width:48px;height:48px;object-fit:contain}
.collection-guide-glyph{display:grid;place-items:center;border-radius:50%;background:var(--row-inset);color:#5a4433}.collection-guide-glyph>svg{position:static;width:24px;height:28px;color:#5a4433}
.collection-guide-glyph.is-star{color:#e59a2d;font:30px/1 system-ui;-webkit-text-stroke:1.5px #6b4520}
.collection-guide .collection-set-icons{margin:4px 0 8px}
/* AA04: one-time explanation for new collectors. */
.collection-intro h1{margin:0 0 10px;font-size:27px;text-align:center}
.collection-intro ol{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.collection-intro li{display:grid;grid-template-columns:26px 56px minmax(0,1fr);align-items:center;gap:8px;padding:7px 8px;border:1px solid #cbb083;border-radius:14px;background:var(--cream-300);font:600 15px/1.3 system-ui;text-align:left}
.collection-intro li>img,.collection-intro-pair{width:56px;height:52px;object-fit:contain}
.collection-intro-pair{display:flex;align-items:center;justify-content:center}.collection-intro-pair>img{width:30px;height:30px;object-fit:contain}.collection-intro-pair>img+img{margin-left:-4px}
.collection-intro-pair.is-set>img{width:22px;height:22px;margin-left:-2px}
.collection-intro-step{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#58423c;color:var(--cream-350);font:800 14px/1 system-ui}
#modal:has(.collection-intro) .equipment-actions{grid-template-columns:1fr}
@media(max-height:730px){.collection-wallet>span>img{width:22px;height:22px}.collection-wallet>span>b{font-size:16px}.collection-source{min-height:44px;font-size:14px}.collection-source>img{width:28px;height:28px}.collection-cta{min-height:26px;font-size:16px}.collection-guide-row{padding:5px 0}.collection-guide-row>img,.collection-guide-glyph{width:40px;height:40px}.collection-intro li{padding:5px 8px;font-size:14px}}
.collection-guide-row>span>b,.collection-guide-row>span>small{display:block}.collection-guide-row>span>small{font:inherit}
@media(max-height:800px){.collection-panel{gap:6px;padding-bottom:4px}.collection-bonus{padding:5px 12px}.collection-panel .collection-wallet>span{padding:3px 6px}.collection-item{min-height:0;padding:6px 4px;gap:4px}.collection-item .eq-slot-icon{width:56px;height:56px}.collection-item img{width:52px;height:52px}.collection-item b{min-height:32px}.collection-set{padding:6px 12px}.collection-set h2{font-size:20px}.collection-set-icons{margin:3px 0}.collection-set-icons img{width:36px;height:36px}.collection-set p{margin:3px 0}}
@media(max-height:800px){.collection-panel>.collection-source{margin-top:2px}.collection-panel .collection-wallet>span>img{width:22px;height:22px}.collection-panel .collection-wallet>span>b{font-size:16px}}
/* Fixed portrait shelf: the panel keeps a little breathing room in every language on tall
   screens. Up to 800px the compact shelf rules (gap 6px) apply instead: with the AA04
   shard meters and the source row the roomy spacing overflowed 375x712 and 393x752. */
@media(min-height:801px){.collection-panel{gap:10px}.collection-panel .collection-set{padding:10px 14px}.collection-panel .collection-set-icons{margin:8px 0 4px}}
/* The shelf's corner "!" hangs outside its card (SCREEN_RULES → Attention badges). The
   panel borrows #content's side padding so the rightmost badge stays inside it. */
#online .collection-panel{padding-inline:10px;margin-inline:-10px}
/* Y09 (build 34/36 feedback): the Collectibles shelf starts under the HUD and the
   Old Memory set card grows into the rest of the fixed portrait viewport. */
.collection-panel.is-shelf{justify-content:flex-start;gap:10px;padding-bottom:6px}
.collection-chips{display:grid;gap:8px;flex:none}
.collection-chip{display:grid;align-items:center;column-gap:8px;padding:6px 10px;border:2px solid #8e6f45;border-radius:16px;background:linear-gradient(#4a3a44,#382c36);box-shadow:inset 0 2px #ffffff14,0 3px #20181f;color:var(--cream-300);box-sizing:border-box;min-width:0}
.collection-chip>b{font:800 17px/1.1 system-ui;color:var(--honey-200);min-width:0}
.collection-chip>small{font:700 12px/1.15 system-ui;color:#e9d6b2;min-width:0;overflow-wrap:anywhere}
.collection-chip.is-bonus{grid-template-columns:30px minmax(0,auto) minmax(0,1fr)}
.collection-chip.is-bonus>i{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--gold-100),#f0a533);box-shadow:0 2px #7a4a17;color:#7a3f10;font:900 18px/1 system-ui;font-style:normal}
.collection-chip.is-bonus>b{text-align:right;font-size:16px;text-wrap:balance}
.collection-chip-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.collection-chip-row>.collection-chip{grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto;row-gap:1px}
.collection-chip-row>.collection-chip>img{grid-row:1/3;width:40px;height:40px;object-fit:contain;filter:drop-shadow(0 2px 0 #00000055)}
.collection-chip-row>.collection-chip>b{font-size:20px}
.collection-set-hero{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:8px;padding:12px 12px 14px;box-sizing:border-box;box-shadow:0 4px 0 #89704c}
.collection-set-hero>header{flex:none}
.collection-set-hero .collection-set-state{padding:4px 10px;background:#574039;color:var(--cream-350);border-radius:var(--vs-radius);font:800 14px/1.2 system-ui}
.collection-set-hero .collection-set-state.is-active{background:linear-gradient(#7fd36b,#3f9b3a);color:#fff;box-shadow:0 2px #24621f;text-shadow:none}
.collection-set-hero.is-active{border-color:#e0a63a;background:radial-gradient(ellipse at 50% 30%,var(--cream-200),#f1d79c 75%);box-shadow:0 4px 0 #ad712c,0 0 14px 2px #ffcf4d88}
.collection-set-hero.is-ready{border-color:#db901e}
.collection-set-hero>.collection-items{flex:1 1 auto;min-height:0;align-items:stretch}
.collection-set-hero .collection-item{min-height:0;height:100%;justify-content:center;gap:6px;padding:8px 4px;box-sizing:border-box}
.collection-set-hero .collection-item>b{min-height:0;text-align:center}
.collection-set-hero .collection-item .eq-slot-icon{--member-art:clamp(64px,min(25vw,11.5vh),104px);width:var(--member-art);height:var(--member-art)}.collection-set-hero .collection-item .eq-slot-icon>img{width:86%;height:86%}
.collection-set-hero .collection-item>b{font-size:clamp(14px,1.9vh,17px)}
.collection-set-hero .collection-item.is-locked .eq-slot-icon>img{filter:grayscale(1) brightness(.85)}
.collection-set-hero .collection-item.is-locked{background:linear-gradient(#efe4cc,#d9c49b)}
.collection-set-hero .collection-item.is-owned .eq-slot-icon{background:radial-gradient(circle,#fff6cf 0 45%,#ffe1a0)}
.collection-set-hero .collection-item.is-ready{border-color:#db901e;background:linear-gradient(var(--card-face),#ffe09a);box-shadow:0 4px 0 #ad712c,0 0 12px 3px #ffcf4dcc}
.collection-member-meter{position:relative;display:block;width:80%;height:9px;flex:none;border:1.5px solid #8e6f45;border-radius:6px;background:#5c4637;overflow:hidden;box-sizing:border-box}
.collection-member-meter>i{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(var(--honey-200),#f2a331)}
.collection-ready-tag{padding:2px 8px;border-radius:10px;background:#3f9b3a;color:#fff!important;box-shadow:0 2px #24621f}
.collection-item .is-locked-text{color:#7a6a5c}
.collection-set-step{display:flex;flex-direction:column;align-items:stretch;gap:6px;flex:none}
.collection-set-step>p{margin:0;font:700 14px/1.25 system-ui;color:#4b3a2c;text-wrap:balance}
.collection-set-step>button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:0}
.collection-set-step>button>img{width:34px;height:34px;object-fit:contain;flex:none}
.collection-set-cta:not(:disabled){animation:collection-set-cta 1.6s ease-in-out infinite alternate}
@media(prefers-reduced-motion:reduce){.collection-set-cta:not(:disabled){animation:none}}
@keyframes collection-set-cta{from{transform:scale(1)}to{transform:scale(1.04)}}
@media(max-height:730px){.collection-panel.is-shelf{gap:6px;padding-bottom:4px}.collection-chips{gap:6px}.collection-chip{padding:4px 10px}.collection-chip-row>.collection-chip>img{width:32px;height:32px}.collection-chip-row>.collection-chip{grid-template-columns:32px minmax(0,1fr)}.collection-chip-row>.collection-chip>b{font-size:17px}.collection-chip.is-bonus>i{width:24px;height:24px;font-size:15px}.collection-chip.is-bonus{grid-template-columns:24px minmax(0,auto) minmax(0,1fr)}.collection-set-hero{padding:8px 10px 10px;gap:6px}.collection-set-hero h2{font-size:20px}.collection-set-hero .collection-item{padding:5px 3px;gap:4px}.collection-set-hero .collection-item .eq-slot-icon{width:56px;height:56px}.collection-set-hero .collection-item img{width:50px;height:50px}.collection-set-step>p{font-size:13px}}

/* AB13 (build 39): collectible chest opening. Presentation of an already-settled
   result; transform/opacity only. Timeline: drop (0-.32s), rising shake
   (.32-1.18s), lid burst + flash + rays + sparks (1.18s), reward cards rise out
   of the chest from --reveal, dealt --step apart. .is-ready is the end state
   (Skip, tap, timer or reduced motion). */
/* AC05 reopened (build 52): the dialog is a transparent column holding the card
   (the section, which draws the frame, ring and glow) and, under it, the tap hint,
   so "Tap anywhere to continue" sits outside and below the card, in flow. */
#modal.collection-opening-modal{width:min(420px,calc(100vw - 20px));padding:0;gap:0;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--cream-300)}
/* Card and foot centre in the safe frame, not the whole screen (a ten-chest batch
   nearly fills it). */
#modal.collection-opening-modal[open]{translate:0 calc((var(--safe-top,env(safe-area-inset-top,0px)) - var(--safe-bottom,env(safe-area-inset-bottom,0px))) / 2)}
#modal.collection-opening-modal>.collection-opening{border:3px solid #201d28;border-radius:21px;background-color:var(--ink-plum);box-shadow:0 0 0 3px var(--co-ring,#e2ac4c),0 0 26px 2px color-mix(in srgb,var(--co-ring,#e2ac4c) 45%,transparent),0 18px 45px #0f0b1dc9}
#modal.collection-opening-modal::backdrop{background:#100e18d9;-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
#modal.collection-opening-modal:has([data-tier=standard]){--co-ring:#b9bec7}#modal.collection-opening-modal:has([data-tier=rare]){--co-ring:var(--rarity-rare)}#modal.collection-opening-modal:has([data-tier=epic]){--co-ring:var(--rarity-epic)}#modal.collection-opening-modal:has([data-tier=legendary]){--co-ring:var(--rarity-legendary)}
/* AC04 (build 41): per-tier look. --tier colours the frame, glow, rays, sparks and
   the tier pill; --amp scales the shake; --ray-step (JS) sets the ray count. */
.collection-opening{--tier:#c9ced6;--amp:.6;--rays:.32;--stack-gap:8px;position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--stack-gap);min-height:min(430px,calc(100dvh - 60px));padding:16px 14px 6px;box-sizing:border-box;overflow:hidden;border-radius:18px;text-align:center;background:radial-gradient(ellipse at 50% 40%,color-mix(in srgb,var(--tier) 38%,var(--ink-plum)) 0%,#221e2a 72%)}
.collection-opening[data-tier=rare]{--tier:var(--rarity-rare);--amp:1;--rays:.45}.collection-opening[data-tier=epic]{--tier:var(--rarity-epic);--amp:1.3;--rays:.6}.collection-opening[data-tier=legendary]{--tier:var(--rarity-legendary);--amp:1.7;--rays:.78}
.collection-opening>header,.collection-opening-rewards{position:relative;z-index:1}
.collection-opening>header h1{margin:0;color:var(--cream-50);font:clamp(28px,8vw,36px)/1.05 Lucky,sans-serif;-webkit-text-stroke:var(--label-stroke,2px) #3b2a22;paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,2px) #3b2a22)}
.collection-opening .co-tier{display:inline-block;margin:6px 0 0;padding:3px 12px;border:2px solid color-mix(in srgb,var(--tier) 80%,#fff);border-radius:999px;background:color-mix(in srgb,var(--tier) 30%,#221e2a);color:var(--cream-50);font:800 13px/1.2 system-ui}
/* The chest stage: glow, rays, flash, chest and sparks share one centre. */
.co-hero{position:relative;z-index:0;flex:none;width:150px;height:150px}
.co-hero>*{position:absolute;left:50%;top:50%;pointer-events:none}
.co-stage{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.co-stage>*{position:absolute;left:var(--hero-x,50%);top:var(--hero-y,38%)}
.co-glow{width:260px;height:260px;margin:-130px 0 0 -130px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--tier) 75%,#fff) 0,color-mix(in srgb,var(--tier) 40%,transparent) 35%,transparent 68%);opacity:.6}
.co-rays{width:560px;height:560px;margin:-280px 0 0 -280px;opacity:var(--rays);-webkit-mask-image:radial-gradient(circle,#000 14%,transparent 66%);mask-image:radial-gradient(circle,#000 14%,transparent 66%)}
.co-rays>i{position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--tier) 60%,#fff) 0 calc(var(--ray-step,30deg) * .32),transparent calc(var(--ray-step,30deg) * .32) var(--ray-step,30deg));animation:co-rays-spin 16s linear infinite}
.co-flash{width:720px;height:720px;margin:-360px 0 0 -360px;border-radius:50%;background:radial-gradient(circle,#fff 0,#fffbe8dd 18%,color-mix(in srgb,var(--tier) 50%,transparent) 40%,transparent 66%);opacity:0}
/* Flash and sparks play over the chest and the rising cards. */
.co-stage.is-front{z-index:3}
.co-chest{width:150px;height:150px;margin:-75px 0 0 -75px}
.co-shake{position:absolute;inset:0;transform-origin:50% 88%}
.co-shake>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 8px #0007)}
/* The lid is the closed art above the seam; it tilts back on its back hinge (the
   seam line) and never leaves the chest, then the opened art takes over. */
.co-lid{clip-path:inset(0 0 55% 0);transform-origin:50% 24%}.co-body{clip-path:inset(44% 0 0 0)}
/* Light leaking through the seam while the lid lifts on its back hinge. */
.co-shake>.co-leak{position:absolute;left:20%;top:38%;width:60%;height:14%;border-radius:50%;background:radial-gradient(ellipse,#fff 0,color-mix(in srgb,var(--tier) 70%,#fff) 40%,transparent 72%);opacity:0}
.co-open{opacity:0}
.collection-opening.is-ready .co-body,.collection-opening.is-ready .co-lid{opacity:0}
.collection-opening.is-ready .co-open{opacity:1}
.co-sparks{width:0;height:0;z-index:2}
.co-sparks>i{position:absolute;left:-6px;top:-6px;width:12px;height:12px;opacity:0;background:radial-gradient(circle,#fff 0,#fff3b0 35%,var(--tier) 62%);clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%)}
.collection-opening[data-tier=legendary] .co-sparks>i{width:16px;height:16px;left:-8px;top:-8px}
.co-confetti{width:0;height:0;z-index:2}
.co-confetti>i{position:absolute;left:-4px;top:-6px;width:8px;height:12px;border-radius:2px;background:#ffd25a;opacity:0}
.co-confetti>i:nth-child(3n){background:var(--gold-50)}.co-confetti>i:nth-child(3n+1){background:#ff9f3a}
.collection-opening-rewards{display:flex;flex-direction:column;align-items:stretch;gap:6px;width:100%;max-width:330px}
.collection-opening-card{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;padding:4px 12px 4px 8px;box-sizing:border-box;border:3px solid #211d28;border-radius:14px;background:linear-gradient(var(--cream-200),#ecd29d);box-shadow:inset 0 2px var(--card-face),0 4px var(--panel-night);color:#3b2c22;text-align:left}
.collection-opening-card img{width:40px;height:40px;object-fit:contain}
.collection-opening-card span{font:800 14px/1.15 system-ui;min-width:0}
.collection-opening-card b{font:22px/1 Lucky,sans-serif;color:var(--cream-50);-webkit-text-stroke:var(--label-stroke,2px) var(--ink-plum-2);paint-order:stroke fill;filter:drop-shadow(0 var(--label-drop,2px) var(--ink-plum-2));white-space:nowrap}
.collection-opening.is-single .collection-opening-rewards{align-items:center}
.collection-opening.is-single .collection-opening-card{grid-template-columns:none;grid-template-rows:auto auto auto;justify-items:center;gap:4px;width:min(170px,60%);padding:10px 8px 12px;border-width:4px;border-radius:18px;text-align:center;box-shadow:inset 0 3px var(--card-face),0 6px var(--panel-night),0 0 26px 6px color-mix(in srgb,var(--tier) 60%,transparent)}
.collection-opening.is-single .collection-opening-card img{width:72px;height:72px;filter:drop-shadow(0 3px 2px #15212277)}
.collection-opening.is-single .collection-opening-card b{order:2;font-size:30px}
.collection-opening.is-single .collection-opening-card span{order:3;font-size:13px}
/* AC106: a single Legendary pays two cards (its roll + the guaranteed Gems), side by side. */
.collection-opening.is-single .co-pair{display:flex;justify-content:center;gap:10px;width:100%}
.collection-opening.is-single .co-pair .collection-opening-card{width:min(150px,46%)}
/* AC14: the chest-points gain is a small token chip, part of the reward boxes. */
.collection-opening .collection-points-gain{display:flex;align-items:center;justify-content:center;gap:6px;align-self:center;margin:4px 0 0;padding:3px 12px 3px 5px;border:2px solid #3f8f96;border-radius:999px;background:#163d45;color:#d9fbff;font:800 14px/1.2 system-ui}
.collection-points-gain img{width:24px;height:24px;object-fit:contain}
/* AC05: the foot follows the reward boxes; the hint's words sit at its top. */
/* AC05 reopened (build 53): the hint's letters start ~24px under the card's ring
   (8px read as glued to it): one token, --tap-hint-gap (gate TAP_HINT_GAP). */
#modal.collection-opening-modal>.collection-opening-foot{position:relative;z-index:1;display:grid;place-items:start center;min-height:44px;width:100%;margin-top:calc(var(--tap-hint-gap,24px) + 1px)}
.collection-opening-foot>*{grid-area:1/1}
#modal .collection-opening-skip{min-height:44px;margin:0;padding:4px 22px}
.collection-opening{cursor:pointer}
#modal:has(.collection-opening.is-ready) .collection-opening-skip,#modal:has(.collection-opening.is-playing) .collection-opening-continue{visibility:hidden}
/* The foot (Skip while playing, then the hint in the same slot) starts 8px under
   the card's border (5px under its ring): the dialog keeps the height it had with
   the foot inside the card, so a ten-chest batch still fits. */
#modal.collection-opening-modal .collection-opening-continue{margin:0;padding:0 12px}
#modal:has(.collection-opening.is-ready) .collection-opening-continue{pointer-events:auto;animation:dismiss-hint-in .35s ease-out .1s both,dismiss-hint-breathe 1.8s ease-in-out .5s infinite alternate}
.collection-opening.is-batch .co-hero{width:104px;height:104px}.collection-opening.is-batch .co-chest{width:104px;height:104px;margin:-52px 0 0 -52px}
/* Timeline (--reveal per tier): drop, shake (stronger per tier), the lid tilts
   back on its hinge, flash, the open chest pops, rays and sparks burst, then
   the title pill and cards rise out of the chest. */
.collection-opening.is-playing .co-chest{animation:co-drop .32s cubic-bezier(.2,.9,.3,1.2) both}
.collection-opening.is-playing .co-shake{animation:co-shake calc(var(--reveal) - 560ms) ease-in .32s both,co-open-pop .45s cubic-bezier(.2,.9,.3,1.4) calc(var(--reveal) - 60ms) both}
.collection-opening.is-playing .co-lid{animation:co-lid-hinge .34s cubic-bezier(.3,0,.6,1) calc(var(--reveal) - 340ms) both,co-hide .01s linear calc(var(--reveal) - 30ms) both}
.collection-opening.is-playing .co-leak{animation:co-leak .34s ease-in calc(var(--reveal) - 340ms) both,co-hide .01s linear calc(var(--reveal) - 30ms) forwards}
.collection-opening.is-ready .co-leak{display:none}
.collection-opening.is-playing .co-body{animation:co-hide .01s linear calc(var(--reveal) - 30ms) both}
.collection-opening.is-playing .co-open{animation:co-show .01s linear calc(var(--reveal) - 30ms) both}
.collection-opening.is-playing .co-glow{--ac640-opacity:.6;animation:ac640-light-in .4s ease-out var(--reveal) both}
.collection-opening.is-playing .co-flash{animation:co-flash .55s ease-out calc(var(--reveal) - 60ms) both}
.collection-opening[data-tier=legendary].is-playing .co-flash{animation:co-flash-double .9s ease-out calc(var(--reveal) - 60ms) both}
.collection-opening.is-playing .co-rays{animation:co-rays-in .4s var(--ease-out) var(--reveal) both}
.collection-opening.is-playing .co-sparks>i{animation:co-spark .8s cubic-bezier(.15,.7,.35,1) calc(var(--reveal) - 20ms) both}
.collection-opening.is-playing .co-confetti>i{animation:co-confetti 1.3s cubic-bezier(.2,.6,.4,1) calc(var(--reveal) + var(--t) * 40ms) both}
.collection-opening.is-playing>header{animation:co-fade-up .4s ease-out calc(var(--reveal) + 60ms) both}
.collection-opening.is-playing .collection-opening-card{animation:co-card .56s cubic-bezier(.18,.85,.3,1.3) calc(var(--reveal) + var(--i) * var(--step)) both}
.collection-opening.is-playing .collection-points-gain{animation:co-fade-up .4s ease-out calc(var(--reveal) + 260ms) both}
.collection-opening.is-ready .co-flash,.collection-opening.is-ready .co-sparks,.collection-opening.is-ready .co-confetti{display:none}
@keyframes co-drop{from{opacity:0;transform:translateY(-70px) scale(.7)}to{opacity:1;transform:none}}
@keyframes co-shake{0%{transform:none}10%{transform:rotate(calc(var(--amp) * -2deg))}20%{transform:rotate(calc(var(--amp) * 2deg))}30%{transform:rotate(calc(var(--amp) * -3deg)) translateY(calc(var(--amp) * -2px))}40%{transform:rotate(calc(var(--amp) * 4deg))}50%{transform:rotate(calc(var(--amp) * -5deg)) translateY(calc(var(--amp) * -5px))}60%{transform:rotate(calc(var(--amp) * 6deg))}70%{transform:rotate(calc(var(--amp) * -7deg)) translateY(calc(var(--amp) * -8px))}80%{transform:rotate(calc(var(--amp) * 7deg)) translateY(calc(var(--amp) * -3px))}90%{transform:rotate(calc(var(--amp) * -4deg)) translateY(2px) scale(1.06,.92)}100%{transform:translateY(4px) scale(1.1,.86)}}
@keyframes co-open-pop{0%{transform:translateY(4px) scale(1.1,.86)}45%{transform:translateY(-6px) scale(.94,1.1)}100%{transform:none}}
@keyframes co-lid-hinge{0%{transform:none}35%{transform:perspective(300px) rotateX(14deg)}55%{transform:perspective(300px) rotateX(8deg)}100%{transform:perspective(300px) rotateX(46deg)}}
@keyframes co-leak{0%{opacity:0;transform:scale(.6,.4)}40%{opacity:.8}100%{opacity:1;transform:scale(1.1,1.6)}}
@keyframes co-hide{to{opacity:0}}
@keyframes co-show{from{opacity:0}to{opacity:1}}
@keyframes co-flash{0%{opacity:0}25%{opacity:1}100%{opacity:0}}
@keyframes co-flash-double{0%{opacity:0}15%{opacity:1}35%{opacity:.25}55%{opacity:.9}100%{opacity:0}}
@keyframes co-rays-in{from{opacity:0;transform:scale(.35)}to{opacity:var(--rays);transform:none}}
@keyframes co-rays-spin{to{transform:rotate(360deg)}}
@keyframes co-spark{0%{opacity:0;transform:rotate(var(--a)) translateY(0) scale(.4)}20%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1)}}
@keyframes co-confetti{0%{opacity:0;transform:translate(0,0) rotate(0)}12%{opacity:1;transform:translate(calc(var(--x) * .5),-70px) rotate(calc(var(--r) * .5))}100%{opacity:0;transform:translate(var(--x),40px) rotate(var(--r))}}
@keyframes co-fade-up{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes co-card{0%{opacity:0;transform:translateY(-90px) scale(.3) rotate(-6deg)}60%{opacity:1}100%{opacity:1;transform:none}}
body:has(#modal:not([open])) .co-rays>i{animation-play-state:paused}
/* Build 41: with the AC04 opened chest kept above the rewards and the AC05
   continue under them, a seven-row batch overflowed 375x812 (safe area 728px).
   Phones up to 820px tall get a smaller batch chest and tighter rows. */
@media(max-height:820px){.collection-opening.is-batch .co-hero,.collection-opening.is-batch .co-chest{width:88px;height:88px}.collection-opening.is-batch .co-chest{margin:-44px 0 0 -44px}.collection-opening.is-batch .collection-opening-rewards{gap:4px}}
@media(max-height:730px){.collection-opening{--stack-gap:5px;padding:10px 12px 4px}.co-hero,.co-chest{width:112px;height:112px}.co-chest{margin:-56px 0 0 -56px}.collection-opening.is-batch .co-hero,.collection-opening.is-batch .co-chest{width:76px;height:76px}.collection-opening.is-batch .co-chest{margin:-38px 0 0 -38px}.collection-opening-card{min-height:40px;padding-block:2px}.collection-opening-card img{width:34px;height:34px}.collection-opening.is-single .collection-opening-card img{width:60px;height:60px}.collection-opening-rewards{gap:5px}}
@media(prefers-reduced-motion:reduce){.collection-opening *,.collection-opening{animation:none!important}#modal:has(.collection-opening.is-ready) .collection-opening-continue{animation:none;opacity:1}}

/* AC12 (build 41, Capybara Go reference): Old Memory set layout. Member cards are
   rarity-tinted art tiles with the stars on the tile (five slots: 1-5★ gold,
   6-10★ ruby over the same slots), the name and one status line below. The set
   bonus is a clean list: only reached tiers are highlighted and checked (AC199).
   Fixed portrait screen; nothing scrolls. */
.collection-set-hero>.collection-items{flex:1 1 auto;min-height:0;align-items:center;gap:8px;grid-template-rows:minmax(0,1fr)}
.collection-set-hero .collection-item{height:auto;max-height:100%;min-height:0;justify-content:center;gap:5px;padding:7px 4px 9px;border-radius:16px;background:linear-gradient(var(--cream-50),#f1dfb8)}
.collection-set-hero .collection-item>b{font:800 clamp(13px,1.8vh,16px)/1.1 system-ui;min-height:2.2em;display:flex;align-items:center}
.collection-set-hero .collection-item .collection-item-tile{--tile:#b39770;--tile-light:#f6ead2;--tile-edge:#7d6446;--member-art:clamp(70px,min(27vw,13vh),118px);position:relative;flex:0 1 var(--member-art);min-height:60px;container-type:inline-size;width:auto;height:auto;max-width:100%;aspect-ratio:1;border-radius:13px;border:2px solid var(--tile-edge);background:radial-gradient(circle at 50% 38%,var(--tile-light) 0 30%,var(--tile) 100%);box-shadow:inset 0 2px #ffffffb0,inset 0 -4px #00000026}
.collection-set-hero .collection-item-tile[data-tier=rare]{--tile:var(--rarity-rare);--tile-light:#e3f4ff;--tile-edge:#2f7fbf}.collection-set-hero .collection-item-tile[data-tier=epic]{--tile:var(--rarity-epic);--tile-light:#f1e6ff;--tile-edge:#6d3fb0}.collection-set-hero .collection-item-tile[data-tier=legendary]{--tile:var(--rarity-legendary);--tile-light:var(--cream-250);--tile-edge:#b9781a}
.collection-set-hero .collection-item .collection-item-tile>img{width:74%;height:74%;margin-bottom:14%;filter:drop-shadow(0 3px 2px #3a2a1c55)}
.collection-set-hero .collection-item.is-locked .collection-item-tile{filter:saturate(.25)}
/* AC185: unactivated members use the existing muted card and greyscale art.
   Keep readiness borders and all detail/activation actions available. */
.collection-set-hero .collection-item.is-inactive{background:linear-gradient(#efe4cc,#d9c49b)}
.collection-set-hero .collection-item.is-inactive .collection-item-tile{filter:saturate(.25)}
.collection-set-hero .collection-item.is-inactive .collection-item-tile>img{filter:grayscale(1) brightness(.85)}
.collection-star-row{display:flex;justify-content:center;gap:1px;color:#00000038;font:900 clamp(14px,1.9vh,18px)/1 system-ui;-webkit-text-stroke:.8px #5a4027;letter-spacing:0}
.collection-star-row>i{font-style:normal;filter:drop-shadow(0 1px #ffffff55)}
.collection-star-row>i.is-on{color:#ffcc33;filter:drop-shadow(0 1px #9a5b12)}
.collection-star-row>i.is-high{color:#ff4f7a;filter:drop-shadow(0 1px #8a1838)}
/* AC84 (build 49, ASC AC_GVlDts7pJnmDxaRLsV_E): the five tile stars are small
   (about half the tile width) with breathing room to the tile edges, never a band
   across the card. Audit: b49-rules-ui-audit.mjs (star row <= 62% of a 72px+
   tile and >= 6px from its sides; <= 80% and >= 4px on the compact 44-56px tiles). */
.collection-item-tile>.collection-star-row{position:absolute;left:50%;bottom:6cqi;transform:translateX(-50%);gap:0;padding:1px 4cqi;border-radius:9px;background:#3c2c2acc;font-size:clamp(6px,9cqi,12px);white-space:nowrap}
.collection-item-tile>.collection-star-row>i{-webkit-text-stroke:.6px #2a1c16}
.collection-item-tile>.collection-star-row>i:not(.is-on):not(.is-high){color:#8c7a6a}
.collection-star-row.is-detail{font-size:26px;gap:3px;margin:2px 0}
.collection-set-hero .collection-item>small{font:700 12px/1.15 system-ui}
.collection-set-bonus{flex:none;display:flex;flex-direction:column;gap:4px;padding:6px 8px 7px;border-radius:14px;background:#00000010;border:1.5px solid #c8a572}
.collection-set-bonus>h3{margin:0;font:900 14px/1.1 system-ui;color:#5a4433;text-align:left}
.collection-tiers{display:flex;flex-direction:column;gap:4px;margin:0;padding:0;list-style:none}
/* AC71 (build 47, ASC AAAlDHlizO7Di1-dh_H2Xzk): the star-count badge is a small
   pill (18px, 11px type) and the row keeps inner padding around it (4px block,
   6px before the badge, 10px after the check), so the badge never fills the row. */
.collection-tiers>li{display:grid;grid-template-columns:32px minmax(0,1fr) 20px;align-items:center;gap:8px;min-height:28px;padding:4px 10px 4px 6px;border-radius:10px;background:var(--row-face);color:#8a7560;text-align:left;box-sizing:border-box}
.collection-tiers>li>span{font:800 13px/1.15 system-ui}
.collection-tier-badge{display:grid;place-items:center;height:18px;padding:0 4px;border-radius:9px;background:#9a876f;color:#fff;font:900 11px/1 system-ui;letter-spacing:.01em}
.collection-tier-badge.is-high{background:#a17d8a}
.collection-tiers>li>i{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;font:900 13px/1 system-ui;font-style:normal;color:#fff}
.collection-tiers>li.is-on>.collection-tier-badge{background:linear-gradient(#ffd75a,#f0a028);color:#6b3a0a;box-shadow:0 1px #9a5b12}
.collection-tiers>li.is-on>.collection-tier-badge.is-high{background:linear-gradient(#ff8aa6,#e2325f);color:#fff;box-shadow:0 1px #8a1838}
.collection-tiers>li.is-on{background:linear-gradient(#e9f9dc,#cdeeb6);color:#24521f}
.collection-tiers>li.is-on>i{background:#3f9b3a;box-shadow:0 1px #24621f}
@media(max-height:860px){.collection-set-bonus{padding:5px 6px;gap:3px}.collection-set-bonus>h3{display:none}.collection-tiers{gap:3px}.collection-tiers>li{min-height:26px;padding-block:3px}.collection-panel.is-shelf{gap:8px}.collection-chips{gap:6px}.collection-chip{padding:4px 10px}.collection-chip-row>.collection-chip{grid-template-columns:32px minmax(0,1fr)}.collection-chip-row>.collection-chip>img{width:32px;height:32px}.collection-chip-row>.collection-chip>b{font-size:17px}.collection-set-hero{padding:10px 10px 12px;gap:6px}}
@media(max-height:730px){.collection-set-hero .collection-item{padding:5px 4px 6px;gap:3px}.collection-set-hero .collection-item .collection-item-tile{--member-art:clamp(62px,11vh,80px)}.collection-set-hero .collection-item>b{flex:none;min-height:0;font-size:13px;line-height:1.15}.collection-set-hero .collection-item .collection-item-tile{min-height:44px}.collection-star-row{font-size:13px}.collection-set-bonus>h3{display:none}.collection-tiers>li{min-height:22px;padding-block:2px}.collection-tiers>li>span{font-size:12px}.collection-tier-badge{height:16px;font-size:10px}.collection-tiers>li>i{width:18px;height:18px;font-size:12px}}
/* AC11 (build 41): the selected chest states what it can drop and how likely, in
   at most two centred lines; each entry (icon, name, share) never breaks inside. */
.collection-chest .collection-chest-odds{display:flex;flex-direction:column;align-items:center;gap:2px;margin:0;width:100%;font:700 13px/1.3 system-ui;color:#4b3a2c}
.collection-chest-odds-line{display:flex;justify-content:center;gap:10px;white-space:nowrap}
.collection-chest-odds-line>span{display:inline-flex;align-items:center;gap:4px}
.collection-chest-odds img{width:20px;height:20px;object-fit:contain;flex:none}
.collection-chest-odds b{font-weight:900;color:#7a3f10}
@media(max-width:380px){.collection-chest .collection-chest-odds{font-size:12px}.collection-chest-odds-line{gap:8px}.collection-chest-odds-line>span{gap:3px}.collection-chest-odds img{width:18px;height:18px}}
/* AC27 (build 42, ASC AD_lD93jmYwdTFBmsRfHA5E): the encyclopedia receipt names its
   source in a small ribbon badge over a short one-line title ("Act I complete!"),
   instead of one long sentence that crowded the Close cross. */
.daily-reward-receipt.has-badge{gap:4px}
.daily-reward-receipt .receipt-badge{display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:4px 12px 3px;border:2px solid #5a3a1c;border-radius:999px;background:linear-gradient(#ffd977,#e9a83a);box-shadow:0 2px #5a3a1c;color:var(--cream-50);font:14px/1 Lucky,system-ui;letter-spacing:.06em;text-transform:uppercase;-webkit-text-stroke:.16em #5a3a1c;paint-order:stroke fill;white-space:nowrap}
.daily-reward-receipt .receipt-badge::before,.daily-reward-receipt .receipt-badge::after{content:"";width:7px;height:7px;background:var(--cream-50);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);filter:drop-shadow(0 0 1px #5a3a1c)}
.daily-reward-receipt.has-badge h1{white-space:nowrap}
/* AC47: the selection rattle pivots on the chest's base (collectibles-ui.js wiggleCollectionChest). */
.collection-chests .collection-chest-stage>img{transform-origin:50% 88%}
/* AC46: class odds (one share per collectible class, one for the other rewards). */
.collection-chest-odds.is-classes span[data-class=other] img+img{margin-left:-6px}
/* AC122 (build 55): the count stays visible beside Claim. Where the title and the
   count do not fit one line next to Claim (pl, ja), the count wraps under the title. */
.collection-track.is-ready header{flex-wrap:wrap;row-gap:2px}
/* AC811 (build 184, owner: "Coś skacze ten button"): when the flying chest points land, the reward tile (66px) turned
   into Claim (88px) and the header began to wrap, so the bar, the count and the whole card moved. Both states now share
   one 88px side slot at least as tall as the tile, and the header wraps the same way in both. */
.collection-track{grid-template-columns:minmax(0,1fr) 88px;grid-auto-rows:minmax(60px,auto)}
.collection-track>.collection-track-reward{justify-self:center}
.collection-track header{flex-wrap:wrap;row-gap:2px}
@media(max-height:730px){.collection-track{grid-auto-rows:minmax(52px,auto)}}

/* AC453: equal member-card rows separate stars, two-line names and shard progress. */
.collection-set-hero>.collection-items{align-items:stretch}
.collection-set-hero .collection-item{height:100%;box-sizing:border-box}
.collection-set-hero .collection-item>b{height:2.2em;min-height:2.2em;flex:none}
.collection-member-status{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;width:100%;height:34px;min-height:34px;flex:none;text-align:center}
.collection-member-status>small{font:700 12px/1.15 system-ui;color:#574437}

html:lang(ko) .collection-set-hero .collection-item>b{word-break:keep-all;overflow-wrap:normal}
/* AC611/AC612: use the installed collectible-chest art and its painted centre
   (282/512px vertically), not the transparent image box's centre. */
.collection-set-step .ui-icon-art{width:34px;height:34px}
.collection-set-step .ui-icon-art img{width:34px;height:34px}
.collection-set-source .ui-icon-art img{width:34px;height:34px;transform:translateY(-1.76px)}
/* AC631: the chest's transparent side margins (36/512 each side) leave the row's ink 2.4px short of
   its box on the icon side; pull the icon in so the painted group is centred on the face. */
.collection-set-source .ui-icon-art{margin-inline-start:-2.4px}
.collection-shard-sources{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;margin:6px 0}
.collection-shard-sources img{width:32px;height:32px;object-fit:contain;transform:translateY(-1.63px)}
.collection-detail .panel-info-header h1{margin:0}
/* AC636 (build 131 feedback): the item sheet's in-place upgrade motion. Two pointer-transparent layers inside
   the sheet (behind and in front of its content) carry the glow, the shared star-burst rays, the flying
   cost tokens, the star sparkles and the bonus highlight. They stay inside the dialog's padding box, so they
   never widen or scroll it; transform/opacity only; reduced motion never builds them. */
.collection-detail[data-collectible]{position:relative;isolation:isolate}
.collection-detail>[data-cd=progress]{display:inline-block}.collection-detail>[data-cd=bonus]{width:fit-content;margin-left:auto;margin-right:auto}
.cu-fx{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;border-radius:20px 20px 0 0}
.cu-fx.is-front{z-index:2}
.cu-fx>*{position:absolute;pointer-events:none;will-change:transform,opacity}
.cu-glow{width:var(--size);height:var(--size);margin:calc(var(--size) / -2) 0 0 calc(var(--size) / -2);border-radius:50%;background:radial-gradient(circle,var(--cream-250) 0,#ffe07acc 26%,#ffc04a66 48%,#ffc04a00 70%);opacity:0}
.cu-fx>.gem-starburst{--gem-color:#f5a21f}
.cu-token{left:0;top:0;width:28px;height:28px;margin:-14px 0 0 -14px;object-fit:contain;opacity:0;filter:drop-shadow(0 2px 2px #4a2c1a88)}
.cu-spark{width:16px;height:16px;margin:-8px 0 0 -8px;color:#ffcc33;font:900 15px/16px system-ui;text-align:center;filter:drop-shadow(0 1px #9a5b12) drop-shadow(0 0 6px #fff6);opacity:0}
.cu-hl{width:var(--w);height:var(--h);margin:calc(var(--h) / -2) 0 0 calc(var(--w) / -2);border-radius:999px;background:radial-gradient(closest-side,#ffd65ad9,#ffd65a00);opacity:0}
@media(prefers-reduced-motion:reduce){.cu-fx{display:none}}

.collection-opening .co-rays>i{animation-delay:calc(var(--reveal) + 400ms)}
/* AC646: art-led three-column shelf. Only the member list scrolls; set, resources and Back stay fixed. */
.collection-set-hero>.collection-items{flex:1 1 auto;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:max-content;align-content:start;align-items:stretch;gap:8px;padding:4px 3px 7px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}
.collection-set-hero .collection-item{height:auto;max-height:none;min-height:146px;justify-content:start;gap:4px;padding:6px 3px;border-radius:var(--vs-radius);box-shadow:0 3px 0 #89704c}
.collection-set-hero .collection-item .collection-item-tile{flex:none;width:66px;height:66px;min-height:0;max-width:100%;aspect-ratio:1;--member-art:66px;border-radius:10px}
.collection-set-hero .collection-item>b{height:2.3em;min-height:2.3em;max-width:100%;font:800 13px/1.15 system-ui;overflow-wrap:normal;justify-content:center}
.collection-set-hero .collection-member-status{height:29px;min-height:29px;gap:3px;justify-content:center}
.collection-set-hero .collection-member-status>small{font-size:11px;line-height:1.15}
.collection-set-hero .collection-member-meter{height:7px;max-width:80px}
@media(max-height:730px){.collection-set-hero .collection-item{min-height:132px;padding:4px 3px;gap:3px}.collection-set-hero .collection-item .collection-item-tile{width:56px;height:56px}.collection-set-hero .collection-item>b{font-size:12px}}

/* Keep the complete attention badge inside its card, clear of the scrolling clip. */
.collection-set-hero .collection-item>.attention-badge{top:3px;right:3px}

/* A fixed compact set summary leaves the member list enough room for a 15-item shelf. */
.collection-set-hero .collection-item{min-height:128px;padding:4px 3px;gap:3px}
.collection-set-hero .collection-item .collection-item-tile{width:56px;height:56px}
.collection-set-hero .collection-member-status{height:24px;min-height:24px;gap:2px}
.collection-set-hero .collection-member-meter{height:5px}
.collection-set-hero .collection-ready-tag{padding:1px 6px}
.collection-set-hero .collection-item-tile>.collection-star-row{font-size:8px;padding:1px 3px;bottom:3px}
.collection-set-hero .collection-set-bonus{padding:5px 6px;gap:0}
.collection-set-hero .collection-set-bonus>h3{display:none}
.collection-set-hero .collection-tiers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.collection-set-hero .collection-tiers>li{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px 3px;min-height:60px;text-align:center}
.collection-set-hero .collection-tiers>li>span{font:800 12px/1.15 system-ui;min-height:2.3em;display:flex;align-items:center;justify-content:center;text-wrap:balance}
/* Visual polish r2 (finding 256): stats wrap only between whole chips. */
.collection-tiers>li>span:has(>.stat-chip){display:flex;flex-wrap:wrap;align-items:center;align-content:center;gap:0 5px}
.collection-set-hero .collection-tiers>li>span:has(>.stat-chip){justify-content:center}
.collection-tiers .stat-chip{white-space:nowrap}
.collection-set-hero .collection-tier-badge{width:34px;flex:none}
.collection-set-hero .collection-tiers>li>i{position:absolute;right:3px;top:3px;width:14px;height:14px;font-size:10px}
.collection-set-step .collection-set-cta .ui-icon-art,.collection-set-step .collection-set-cta .ui-icon-art img{width:24px;height:24px}

/* Visual polish (layout lane): a short set (one row of cards) no longer leaves an empty band above the bonus row:
   the item list and the set card take their content height, and a long set still scrolls inside the list. */
.collection-set-hero{flex:0 1 auto}
.collection-set-hero>.collection-items{flex:0 1 auto}
/* Visual polish (bugs lane): the shelf's Activate / Unlock for a "Ready!" item wears the same warm ready face as the
   item sheet's ready action (above), so the button never looks disabled beside a Ready! card; disabled stays grey. */
#online .collection-set-step>button.collection-set-cta:not(:disabled){--small-top:#ffc76a;--small-bottom:#f0892c;--small-edge:#3b1f14;--small-lip:#b65a1d;--small-shine:#ffe9b8}
/* Visual polish r2 (finding 196): the item title is centred under the art like the rest of the
   detail; the (?) keeps its place at the header's right edge. */
#modal .collection-detail>.panel-info-header{padding:0 48px;text-align:center}
/* Visual polish r2 (finding 197): the chest stands on a soft warm light pool (static glow, no rays). */
.collection-chests .collection-chest .collection-chest-stage{position:relative}
.collection-chests .collection-chest .collection-chest-stage:before{content:'';position:absolute;left:50%;top:50%;width:min(86%,260px);aspect-ratio:1.6;translate:-50% -38%;border-radius:50%;background:radial-gradient(closest-side,#fff8d8 0,#ffd977 34%,#f5b84f80 62%,transparent);pointer-events:none}
.collection-chests .collection-chest .collection-chest-stage:after{content:'';position:absolute;left:50%;bottom:6%;width:min(58%,190px);height:14%;translate:-50% 0;border-radius:50%;background:radial-gradient(closest-side,#5a3d2166,transparent);pointer-events:none}
.collection-chests .collection-chest .collection-chest-stage>img{position:relative;z-index:1}
/* Visual polish r2 (finding 198): the chosen chest lifts with a thick glowing gold rim; the others step back. */
.collection-chest-choice{transition:translate .16s ease-out,scale .16s ease-out,opacity .16s ease-out}
.collection-chest-choice[aria-pressed=false]{opacity:.7}
.collection-chest-choice[aria-pressed=true]{z-index:1;translate:0 -3px;scale:1.06;border-color:#f2b93b;box-shadow:0 4px #9d7432,inset 0 0 0 3px #ffe588,0 0 12px 3px #ffd34d99}
@media(prefers-reduced-motion:reduce){.collection-chest-choice{transition:none}}
