.collection-button{position:absolute;left:14px;top:12px;min-width:92px;height:44px;display:flex;align-items:center;gap:7px;padding:0 11px;border:3px solid #302431;border-radius:13px;background:#fff4dc;box-shadow:0 4px 0 #5d4145;font-size:12px;font-weight:900}
.collection-button svg{width:23px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.collection-badge{position:absolute;right:-6px;top:-6px;width:16px;height:16px;background:#e73d50;border:3px solid #fff4dc;border-radius:50%;animation:collectionPulse 1.2s ease-in-out infinite}
.collection-modal{z-index:70;padding:12px}
.collection-card{display:flex;flex-direction:column;width:min(690px,96vw);max-height:calc(100dvh - 24px);padding:20px;border:3px solid #392a3d;border-radius:24px;background:#fff4dc;box-shadow:0 8px 0 #30243155;overflow:hidden}
.collection-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.collection-heading h1{margin:0;font-size:25px}.collection-heading p{margin:5px 0 15px;font:13px/1.4 system-ui,sans-serif;color:#6a5260}
.collection-close{flex-shrink:0;width:40px;height:40px;border:2px solid #705867;border-radius:12px;background:#fffaf0;font-size:23px}
.collection-tabs{display:flex;gap:8px;margin-bottom:10px}
.collection-tab{flex:1;min-height:43px;padding:7px;border:2px solid #b9a092;border-radius:12px;background:#f0dfce;font-size:14px;font-weight:900}
.collection-tab[aria-selected=true]{background:#4b355d;border-color:#4b355d;color:white}
.tab-new{display:inline-block;width:9px;height:9px;margin-left:5px;border-radius:50%;background:#e73d50;box-shadow:0 0 0 2px #fff4dc}
.collection-summary{margin:2px 0 10px;font-size:13px;color:#705665}
.collection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;overflow-y:auto;min-height:0;padding:3px 3px 8px;overscroll-behavior:contain;touch-action:pan-y}
.collection-entry{position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:12px 5px;border:2px solid #d9c2a4;border-radius:14px;background:#fffaf0;text-align:center}
.collection-entry img{width:76px;height:76px;object-fit:contain;filter:drop-shadow(0 4px 2px #74554426)}
.collection-entry strong{font-size:12px}.collection-entry small{font:11px/1.3 system-ui,sans-serif;color:#705c66}
.collection-entry .rarity{padding:3px 6px;border-radius:6px;background:#eee2d1;font-size:10px}.collection-entry[data-rarity="Rare"] .rarity{background:#d6efe9}.collection-entry[data-rarity="Epic"] .rarity{background:#edd8f5}.collection-entry[data-rarity="Legendary"] .rarity{background:#ffe28b}
.collection-entry.locked{background:#eddfcc;border-style:dashed;color:#8b766d}.collection-unknown{display:grid;place-items:center;width:76px;height:76px;font-size:40px;color:#a58c7b}
.collection-entry .entry-new{position:absolute;top:5px;right:5px;padding:2px 5px;background:#b32341;color:white;border-radius:6px;font-size:9px}
.collection-open-secondary{display:block;margin:12px auto 0;padding:8px 16px;border:2px solid #ad927c;border-radius:10px;background:#fff4dc;font-size:13px}
.discovery-banner{position:fixed;z-index:45;top:20px;left:50%;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 24px);padding:9px 17px 9px 9px;border:3px solid #ae741d;border-radius:17px;background:linear-gradient(125deg,#fff6b3,#ffd45b);box-shadow:0 5px 18px #53392433;pointer-events:none;transform:translateX(-50%)}
.discovery-banner img{width:44px;height:44px;object-fit:contain;flex-shrink:0}.discovery-banner strong{display:block;font-size:13px}.discovery-banner span{font-size:11px}
.discovery-flying{position:fixed;z-index:65;width:54px;height:54px;object-fit:contain;pointer-events:none}
.save-error{position:fixed;z-index:90;bottom:12px;left:50%;transform:translateX(-50%);width:min(430px,94vw);padding:15px;border:3px solid #993447;border-radius:14px;background:#fff4dc;font-size:14px;text-align:center}.save-error button{display:block;margin:10px auto 0;padding:9px 16px;border-radius:8px;background:#4b355d;color:white}
button:focus-visible,.collection-grid:focus-visible{outline:3px solid #038dbc;outline-offset:3px}
@keyframes collectionPulse{50%{transform:scale(1.2)}}
@media(max-width:520px){.collection-card{padding:14px}.collection-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.collection-entry img,.collection-unknown{width:62px;height:62px}.collection-entry{padding:10px 3px}.collection-heading h1{font-size:22px}.discovery-banner{top:8px}}
@media(max-width:340px){.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.collection-badge{animation:none}}

/* First-time discoveries occupy two thirds of the actual game stage. */
.discovery-banner{z-index:90;max-width:none;display:flex;flex-direction:column;justify-content:center;gap:calc(12px * var(--discovery-scale));padding:calc(24px * var(--discovery-scale));border:calc(4px * var(--discovery-scale)) solid #302115;border-radius:calc(32px * var(--discovery-scale));background:radial-gradient(circle at 50% 45%,#fffce5,#ffdd71 80%);box-shadow:0 12px 45px #40211177;transform-origin:center;pointer-events:auto;text-align:center;color:#342218;}
.discovery-banner img{width:75%;height:60%;min-height:0;flex-shrink:1;object-fit:contain;filter:drop-shadow(0 6px 3px #68451b44)}
.discovery-banner strong{font-size:calc(30px * var(--discovery-scale));line-height:1.1}
.discovery-banner b{font-size:calc(24px * var(--discovery-scale))}
.discovery-banner span{font-size:calc(18px * var(--discovery-scale))}
.collection-arrival{animation:collectionArrival .45s ease-out}
@keyframes collectionArrival{50%{filter:brightness(1.5);scale:1.08}}
@media(prefers-reduced-motion:reduce){.collection-arrival{animation:none}}

#discoveryBanner{pointer-events:none}
