/* The Sets tab, the completion dialog and the profile badges. Mobile first: one column up to 640px, two after. */
.set-intro { margin: 0 0 12px; }
.set-list { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.set-box { min-width: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.set-box.complete { border-color: var(--gold); }
.set-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.set-head > div { min-width: 0; }
.set-head h2 { margin: 0 0 2px; font-size: 18px; overflow-wrap: anywhere; }
.set-meta { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.set-count { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--page); color: var(--gold); font-size: 15px; white-space: nowrap; }
.set-bar { display: block; height: 8px; margin: 10px 0 12px; overflow: hidden; border-radius: 999px; background: var(--page); }
.set-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.set-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 420px) { .set-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.set-card { min-width: 0; text-align: center; }
.set-img { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--page); border: 2px solid var(--line); }
.set-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.set-card.have .set-img { border-color: var(--gold); }
/* A missing card is only its shape: flat black, dimmed, with no detail left to read. */
.set-card.miss .set-img img { filter: brightness(0) contrast(2); opacity: .28; }
[data-theme="light"] .set-card.miss .set-img img { opacity: .4; }
.set-card b { display: block; margin-top: 4px; font-size: 11px; line-height: 1.2; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.set-card.miss b { color: var(--muted); font-weight: 600; }
.set-foot { margin-top: 12px; }
.set-foot .btn { width: 100%; min-height: 44px; }
.set-done { display: block; text-align: center; color: var(--gold); font-weight: 800; min-height: 44px; line-height: 44px; }
@media (min-width: 640px) { .set-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.set-win { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .72); overflow: hidden; }
.set-win-card { position: relative; width: min(100%, 360px); max-height: 100%; overflow-y: auto; box-sizing: border-box; padding: 24px 20px; text-align: center; background: var(--surface); border: 2px solid var(--gold); border-radius: 20px; animation: set-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.set-win-card h2 { margin: 8px 0 4px; font-size: 24px; }
.set-win-card p { margin: 4px 0; overflow-wrap: anywhere; }
.set-win-badge { display: block; font-size: 56px; line-height: 1; }
.set-win-coins { display: block; margin: 10px 0 4px; color: var(--gold); font-size: 26px; }
.set-win-title { color: var(--muted); }
.set-win-card .btn { margin-top: 14px; min-width: 160px; min-height: 44px; }
.set-rain i { position: absolute; top: -40px; left: var(--x); font-style: normal; font-size: 28px; animation: set-fall 2.4s var(--d) ease-in both; }
@keyframes set-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes set-fall { to { transform: translateY(110vh) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .set-win-card, .set-rain i { animation: none; } .set-rain { display: none; } }

.set-chips { margin: 12px 0; }
.set-chips ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.set-chips li { padding: 6px 10px; border: 1px solid var(--gold); border-radius: 999px; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
