/* Storybook Collectibles v2: isolated full pages, not legacy Reward Chamber overrides. */
body.collection-view{margin:0;padding:0;background:#f5f1e5;color:#233b52;overflow:visible}
body.collection-view .shell{display:block;width:100%;max-width:none;margin:0;padding:0!important;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;overflow:visible}
body.collection-view #main{max-width:none;margin:0;padding:0;background:#f5f1e5}
body.collection-view .shell>footer,body.collection-view #family-menu{display:none!important}
.collection-page{--ink:#233b52;--brown:#987551;--muted:#586b70;max-width:1320px;min-height:100svh;margin:auto;padding:14px 28px max(32px,env(safe-area-inset-bottom));font:400 15px/1.5 Nunito,'Segoe UI',sans-serif;background:radial-gradient(ellipse at 0 0,#dbece0,transparent 46%),linear-gradient(130deg,#fbf9ed,#f7f0e2)}
.collection-page *{min-width:0;box-sizing:border-box}
.collection-page h1,.collection-page h2,.collection-page h3,.collection-page p{margin:0}
.collection-page h1{font-size:44px;line-height:1.15;font-weight:900;letter-spacing:-.025em}
.collection-page h2{font-size:22px;line-height:1.3;font-weight:850}
.collection-page h3{font-size:15px;line-height:1.3;font-weight:850;overflow-wrap:anywhere}
.collection-nav{width:100%;max-width:1224px;margin-inline:auto;display:flex;align-items:center;justify-content:flex-end;min-height:52px;gap:12px;margin-bottom:12px}
.collection-home{display:flex;align-items:center;justify-content:center;width:52px;height:52px;min-width:44px;min-height:44px;padding:2px;border:0;background:transparent;border-radius:50%;cursor:pointer}
.collection-home-badge{width:48px;height:48px;object-fit:contain}
.collection-logo{width:142px;height:auto;object-fit:contain}
.collection-heading{margin-bottom:20px}
.collection-subtitle{font-size:16px;color:#466969;margin-top:7px!important}
.collection-explorer{font-weight:750;color:#386b65;font-size:13px;margin-top:12px!important;overflow-wrap:anywhere}
.collection-wallet{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1.5px solid #b9956d;border-radius:20px;background:linear-gradient(110deg,#fffaf0,#fcf1da);padding:17px 22px;box-shadow:0 4px 0 #b5956b20;margin-bottom:14px}
.collection-wallet:empty{display:none}
.collection-wallet-amount{display:flex;align-items:center;gap:13px}
.collection-coin{width:22px;height:22px;flex:0 0 auto}
.collection-wallet .collection-coin{width:46px;height:46px}
.collection-wallet-amount>div{display:grid;gap:1px}.collection-wallet-amount span{font-size:12px;color:#825c3b}
.collection-balance{font-size:27px;line-height:1.25;font-weight:900}
.collection-wallet small{font-size:12px;color:#586b70}
.collection-owned-count{display:flex;flex-direction:column;gap:3px;border-left:1px solid #dfcbb1;padding-left:22px;text-align:center}
.collection-owned-count span{font-size:11px;color:#825c3b}.collection-owned-count strong{font-size:24px}
.collection-feedback{font-size:13px;color:#386b65;margin:12px 0!important;overflow-wrap:anywhere}
.collection-feedback:empty{display:none}
.collection-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:22px 0 13px}
.collection-section-heading h2{flex:1}.collection-count{font-size:12px;color:#586b70;white-space:nowrap}
.collection-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;align-items:stretch}
.collection-card{--edge:#d1b18b;--glow:#c5b49212;--wash:#fffdf6;position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 12px 13px;border:1.5px solid var(--edge);border-radius:18px 16px 19px 17px;background:radial-gradient(ellipse at 50% 28%,#ffffffde,var(--wash) 74%);box-shadow:0 4px 0 #bdab8d15,0 0 18px var(--glow);text-align:center}
.collection-card::before{content:'';position:absolute;inset:5px;border:1px solid var(--edge);border-radius:13px;opacity:.3;pointer-events:none;z-index:-1}
.collection-card::after{content:'';position:absolute;inset:7px;pointer-events:none;opacity:.6;background:radial-gradient(circle at 3px 3px,var(--edge) 0 2px,transparent 3px),radial-gradient(circle at calc(100% - 3px) 3px,var(--edge) 0 2px,transparent 3px),radial-gradient(circle at 3px calc(100% - 3px),var(--edge) 0 2px,transparent 3px),radial-gradient(circle at calc(100% - 3px) calc(100% - 3px),var(--edge) 0 2px,transparent 3px)}
.collection-card[data-rarity=Rare]{--edge:#78bdd6;--wash:#e9f8fc;--glow:#56bde82b}
.collection-card[data-rarity=Epic]{--edge:#bd8ddf;--wash:#f5eaff;--glow:#b373df30}
.collection-card[data-rarity=Legendary]{--edge:#d8a342;--wash:#fff1c3;--glow:#efbc4a45;background:radial-gradient(ellipse at 50% 25%,#fff8d3,#fff1c3 42%,#fff8eb 85%);box-shadow:0 4px 0 #c6a26b20,0 0 24px var(--glow),inset 0 0 16px #ffda6525}
.collection-card[data-rarity=Rare]::after,.collection-card[data-rarity=Epic]::after,.collection-card[data-rarity=Legendary]::after{background:var(--edge);mask:url('assets/collectibles/card-ornaments.svg') center/100% 100% no-repeat;opacity:.75}
.collection-art{display:block;width:100%;aspect-ratio:1;height:auto;object-fit:contain;position:relative;z-index:1}
.collection-art-button{display:block;align-self:stretch;min-height:44px;min-width:44px;border:0;border-radius:12px;background:none;padding:0;cursor:pointer}
.collection-tags{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap}
.collection-rarity{font-size:11px;color:#725d47;border-radius:20px;background:#efeadf;padding:2px 10px;font-weight:750}
[data-rarity=Rare] .collection-rarity{background:#d3effb;color:#315d7e}[data-rarity=Epic] .collection-rarity{background:#ebd9fa;color:#704e90}[data-rarity=Legendary] .collection-rarity{background:#ffe3a0;color:#7d5425}
.collection-plus{font-size:10px;font-weight:900;color:#704e90;background:#ebd9fa;border:1px solid #c8a2e5;padding:2px 7px;border-radius:7px}
.collection-price{display:flex;align-items:center;justify-content:center;gap:5px;font-size:12px;color:#725335}
.collection-price .collection-coin{width:18px;height:18px}
.collection-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:10px 15px;border:1px solid #8db5ad;border-radius:12px;background:#d3ece6;color:#244e50;font:800 13px/1.35 Nunito,'Segoe UI',sans-serif;cursor:pointer;transition:transform .15s,box-shadow .15s;box-shadow:0 2px 0 #a8c5bd}
.collection-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 0 #a8c5bd}
.collection-card>.collection-button{width:100%;margin-top:auto;padding:9px 5px;font-size:12px}
.collection-button:disabled{opacity:1;background:#eceee9;border-color:#d9dcd4;color:#58676b;box-shadow:none;cursor:default}
.collection-owned{display:inline-block;padding:6px 14px;color:#386b65;background:#deeee5;border-radius:99px;font-size:12px;font-weight:800;margin-top:auto}
.collection-filters{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 12px}
.collection-filter{min-height:44px;min-width:44px;padding:9px 15px;border:1px solid #d8c8ac;border-radius:99px;background:#fffaf0;color:#6c513c;font:750 13px/1.35 Nunito,'Segoe UI',sans-serif;cursor:pointer}
.collection-filter[aria-pressed=true]{background:#dcebdd;color:#38614f;border-color:#9bb99c;box-shadow:0 0 0 2px #fff9ef}
.collection-shop-links{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.collection-family-link{min-height:44px;padding:10px 16px;border:1px solid #d7bd8c;border-radius:12px;background:#fff2cf;color:#74502e;font:750 13px Nunito,'Segoe UI',sans-serif;cursor:pointer}
.collection-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:8px;color:#386b65;background:none;border:0;font:750 13px/1.4 Nunito,'Segoe UI',sans-serif;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.collection-empty{text-align:center;border:1.5px solid #d5c1a6;border-radius:22px;background:#fffaf0;padding:25px;display:flex;align-items:center;flex-direction:column;gap:12px;min-height:330px}
.collection-empty>img{width:180px;height:162px}.collection-empty>p{color:#586b70;font-size:14px}
.collection-empty h2{font-size:25px}.collection-empty .collection-button{margin-top:5px}
.collection-bag-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:22px;color:#586b70;font-size:13px}
.collection-loading,.collection-error,.collection-empty-message{padding:24px;background:#fffaf0;border:1px solid #d8c8ac;border-radius:16px;color:#586b70}
.collection-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow-y:auto;padding:20px;border:1.5px solid #a18462;border-radius:22px;background:#fff8ec;color:#233b52;box-shadow:0 18px 60px #364e4540;font:400 14px/1.5 Nunito,'Segoe UI',sans-serif}
.collection-dialog::backdrop{background:#243b465c;backdrop-filter:blur(3px)}
.collection-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.collection-dialog-header h2{font-size:21px;margin:0}
.collection-purchase-summary{display:flex;flex-direction:column;align-items:center;gap:8px}.collection-purchase-summary>.collection-art,.collection-detail-art{width:190px;height:190px;object-fit:contain;display:block;margin:auto}
.collection-detail-art{margin:12px auto}.collection-dialog .collection-tags{margin:8px 0}.collection-confirm-price{font-size:20px;font-weight:850;color:#7b5935}
.collection-dialog-actions{display:flex;justify-content:center;gap:10px;margin-top:16px;flex-wrap:wrap}.collection-dialog-feedback{font-size:13px;color:#805336;margin:12px 0 0!important;overflow-wrap:anywhere}.collection-acquired{display:block;margin-top:10px;font-size:12px;color:#586b70}.collection-note{margin-top:12px!important;color:#586b70;font-size:12px}
.collection-page :focus-visible,.collection-dialog :focus-visible{outline:3px solid #365e78;outline-offset:3px}
/* Family management reuses existing PIN/approval behavior, within a light full-page surface. */
.collection-page .hub-shell{max-width:none;margin:0;background:#fffaf0;border:1.5px solid #d8c8ac;padding:20px;border-radius:20px;color:#233b52}
.collection-page .hub-content h3{color:#233b52}.collection-page .hub-action{min-height:44px;background:#d3ece6;color:#244e50;border:1px solid #8db5ad}
.collection-page .hub-action:disabled{background:#eceee9;color:#58676b;border-color:#d9dcd4}.collection-page .hub-reward-row{border-color:#d8c8ac;background:#fffdf6}
.collection-page .hub-parent{background:#f7f1e5;border-color:#d8c8ac}.collection-page .hub-input{border-color:#c8b59a;background:#fffdf7;min-height:44px}.collection-page .hub-history,.collection-page .hub-manage-row{border-color:#d8c8ac}.collection-page .hub-feedback{color:#386b65}
@media(min-width:1700px){.collection-page{max-width:1500px}.collection-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1100px){.collection-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* One horizontal category strip follows the mobile catalog; the page keeps vertical scroll. */
@media(max-width:900px){
 .collection-filters{position:sticky;top:max(6px,env(safe-area-inset-top));z-index:5;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-padding-inline:8px;scrollbar-width:thin;padding:8px;margin:14px 0 12px;background:#f8f4e9;border:1px solid #e1d5bd;border-radius:16px;box-shadow:0 3px 8px #675a3e10}
 .collection-filter{flex:0 0 auto;white-space:nowrap}
 .collection-card,.collection-category h2{scroll-margin-top:92px}
}
@media(max-width:760px){.collection-page{padding:10px max(16px,env(safe-area-inset-right)) max(26px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.collection-nav{min-height:48px;margin-bottom:10px}.collection-home{width:48px;height:48px}.collection-home-badge{width:44px;height:44px}.collection-logo{width:116px}.collection-page h1{font-size:34px}.collection-page h2{font-size:20px}.collection-subtitle{font-size:14px}.collection-heading{margin-bottom:17px}.collection-wallet{padding:14px;gap:8px;border-radius:18px}.collection-wallet .collection-coin{width:33px;height:33px}.collection-wallet-amount{gap:8px}.collection-balance{font-size:23px}.collection-wallet small{font-size:11px}.collection-owned-count{padding-left:11px}.collection-owned-count span{font-size:10px}.collection-owned-count strong{font-size:21px}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.collection-card{padding:10px 9px;gap:7px}.collection-page .collection-card h3{font-size:14px;min-height:2.6em}.collection-rarity{font-size:11px;padding:2px 8px}.collection-price{font-size:12px}.collection-card>.collection-button{font-size:12px}.collection-filter{font-size:12px;padding:9px 12px}.collection-tags{min-height:22px}.collection-shop-links{gap:5px}.collection-section-heading{margin:20px 0 12px}.collection-count{font-size:11px}.collection-empty{padding:20px 14px;min-height:310px}.collection-empty>img{width:150px;height:135px}.collection-empty h2{font-size:23px}.collection-dialog{padding:16px}.collection-page .hub-shell{padding:14px}.collection-page .hub-reward-row{align-items:stretch;flex-direction:column}.collection-page .hub-parent{padding:10px}}
@media(prefers-reduced-motion:reduce){.collection-page *,.collection-dialog *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
