@font-face{font-family:DM Sans;src:url(/assets/fonts/dm-sans.woff) format("woff");font-weight:100 1000;font-display:swap}
@font-face{font-family:Barlow Condensed;src:url(/assets/fonts/barlow-extra.woff) format("woff");font-weight:800;font-display:swap}
*{box-sizing:border-box}
[hidden]{display:none!important}
:root{color-scheme:dark}
body{margin:0;min-height:100vh;color:#f6f4ed;font:16px/1.5 "DM Sans",sans-serif}
body { background:#111b22; isolation:isolate; }
body::before {
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg,#080d1533,#080e1530 55%,#0a101b5c),
    url("assets/collector-desk.webp") center / cover no-repeat, #142029;
}
@media(max-width:600px) {
  body::before { background-position:center,12% center; }
}
header,main{max-width:1152px;margin:auto;padding:0 clamp(16px,5vw,48px)}
header{min-height:64px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #343840}
a{color:#e7d4a3}
.brand{color:inherit;display:flex;align-items:center;gap:9px;font-weight:800;text-decoration:none}
.back{font-size:.9rem}
main{padding-bottom:48px}
h1,h2{font-family:"Barlow Condensed",sans-serif;line-height:1;margin:0}
h1{margin-top:clamp(32px,6vw,72px);font-size:clamp(44px,7vw,76px)}
h2{margin:24px 0 14px;font-size:28px}
#totals{margin:8px 0;color:#e8d4a6;font-variant-numeric:tabular-nums}
.toolbar,.sync,label{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.toolbar{justify-content:space-between;align-items:center;padding:18px 0;margin-bottom:10px;border-bottom:1px solid #343840}
.sync,label{color:#c8c9d3;font-size:.875rem}
button,select,#login{border:1px solid #50545f;border-radius:8px;background:#1c202a;color:#f4f2ec;padding:8px 12px;min-height:44px;font:inherit;cursor:pointer}
:focus-visible{outline:2px solid #f1cd85;outline-offset:4px}
button:disabled{opacity:.55;cursor:wait}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr));gap:clamp(10px,2vw,20px)}
.tile{--edge:#a2a7b5;background:#191d26;border:1px solid #393c47;border-radius:12px;overflow:hidden;min-width:0}
.tile[data-rarity=Legendary]{--edge:#ffa351}
.tile[data-rarity=Epic]{--edge:#c18cff}
.tile[data-rarity=Rare]{--edge:#78b7ff}
.art{position:relative;aspect-ratio:1;background:#222731;border-bottom:2px solid var(--edge)}
.art img{width:100%;height:100%;object-fit:contain;display:block}
.art .missing-art{object-fit:scale-down;padding:25%;opacity:.7}
.copies{position:absolute;top:7px;right:7px;border-radius:6px;background:#11131aea;color:white;padding:2px 8px;font-weight:750;font-variant-numeric:tabular-nums}
.caption{padding:10px}
.caption h3{margin:0;font-size:1rem;line-height:1.2}
.caption p{font-size:.75rem;color:var(--edge);margin:5px 0 0}
#status.busy::before{content:"";display:inline-block;width:8px;height:8px;margin-right:7px;background:#a8f52a;border-radius:50%;animation:pulse 1.2s ease-in-out infinite alternate}
@keyframes pulse{to{opacity:.35}}
@media(max-width:550px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{align-items:flex-start;flex-direction:column}.caption h3{font-size:.92rem}}
@media(prefers-reduced-motion:reduce){#status.busy::before{animation:none}}

#totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0}
#totals div{background:#191d26;border:1px solid #3d414b;border-radius:10px;padding:12px 15px}
#totals dt{font-size:.78rem;color:#cbcbd4}
#totals dd{margin:2px 0 0;font:800 clamp(26px,4vw,36px) "Barlow Condensed",sans-serif;color:#f3f0e8}
#totals #total-gold{color:#f6cc72}
.tile{box-shadow:1px 2px #aaa392,2px 4px #655d51,3px 6px #333138,4px 8px 9px #080a0f80}
.grid{row-gap:22px}
@media(max-width:560px){#totals{grid-template-columns:repeat(2,minmax(0,1fr))}}

header,.toolbar{background-color:#101219d9}
.toolbar{padding-inline:14px;border-radius:10px}
h1,h2,#empty{text-shadow:0 2px 5px #090b14}
