/* ============================================================
   SealedDex — Pokémon booster & ETB collection tracker
   Ported from the design handoff (design_handoff_sealeddex/prototype/styles.css).
   The first section is the design's framework-agnostic CSS, reused as-is
   (brand defaulted to the production Poké-red accent). The Blazor integration
   section at the bottom covers markup shapes specific to this app.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
  /* base palette */
  --ink:        #1B1430;
  --ink-soft:   #4A4166;
  --muted:      #8B83A3;
  --canvas:     #FBF6EE;
  --surface:    #FFFFFF;
  --surface-2:  #F4EEE3;
  --border:     #ECE4D6;
  --border-2:   #E0D6C5;

  /* brand + pops — production accent is Poké-red (handoff default) */
  --brand:      #E3350D;
  --brand-ink:  #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--canvas));
  --coral:      #FF5A6A;
  --sun:        #FFC53D;
  --mint:       #1FBF8F;
  --sky:        #33B4F2;

  /* shape (pack corner is tweakable -> --radius-pack) */
  --radius-pack: 20px;
  --radius-card: 22px;
  --radius-pill: 999px;

  /* layout (density tweakable) */
  --grid-min: 184px;
  --grid-gap: 22px;

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;

  --shadow-sm: 0 2px 8px rgba(27,20,48,.06);
  --shadow-md: 0 10px 30px rgba(27,20,48,.10);
  --shadow-lg: 0 24px 60px rgba(27,20,48,.16);
  --shadow-pack: 0 14px 34px rgba(27,20,48,.20);

  --ease: cubic-bezier(.4,0,.2,1);
}

/* dark mode */
.app.dark {
  --bg-sparkle: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'150'%20height%3D'150'%20viewBox%3D'0%200%20150%20150'%3E%3Cg%20fill%3D'%23C9BEF5'%20fill-opacity%3D'0.08'%3E%3Cpath%20d%3D'M32%2020l3.4%2010.2%2010.2%203.4-10.2%203.4-3.4%2010.2-3.4-10.2-10.2-3.4%2010.2-3.4z'%2F%3E%3Cpath%20d%3D'M112%2092l2.6%207.8%207.8%202.6-7.8%202.6-2.6%207.8-2.6-7.8-7.8-2.6%207.8-2.6z'%2F%3E%3Ccircle%20cx%3D'104'%20cy%3D'30'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'24'%20cy%3D'112'%20r%3D'2.6'%2F%3E%3Ccircle%20cx%3D'78'%20cy%3D'66'%20r%3D'2'%2F%3E%3Ccircle%20cx%3D'134'%20cy%3D'56'%20r%3D'1.8'%2F%3E%3Ccircle%20cx%3D'58'%20cy%3D'128'%20r%3D'1.8'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --ink:        #F4EFFA;
  --ink-soft:   #C8BFE0;
  --muted:      #897FA8;
  --canvas:     #120E22;
  --surface:    #1E1838;
  --surface-2:  #271F47;
  --border:     #2E2650;
  --border-2:   #3A3162;
  --brand-soft: color-mix(in srgb, var(--brand) 26%, var(--canvas));
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 12px 32px rgba(0,0,0,.4);
  --shadow-lg: 0 28px 64px rgba(0,0,0,.5);
  --shadow-pack: 0 18px 40px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.app {
  --bg-sparkle: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'150'%20height%3D'150'%20viewBox%3D'0%200%20150%20150'%3E%3Cg%20fill%3D'%231B1430'%20fill-opacity%3D'0.06'%3E%3Cpath%20d%3D'M32%2020l3.4%2010.2%2010.2%203.4-10.2%203.4-3.4%2010.2-3.4-10.2-10.2-3.4%2010.2-3.4z'%2F%3E%3Cpath%20d%3D'M112%2092l2.6%207.8%207.8%202.6-7.8%202.6-2.6%207.8-2.6-7.8-7.8-2.6%207.8-2.6z'%2F%3E%3Ccircle%20cx%3D'104'%20cy%3D'30'%20r%3D'3'%2F%3E%3Ccircle%20cx%3D'24'%20cy%3D'112'%20r%3D'2.6'%2F%3E%3Ccircle%20cx%3D'78'%20cy%3D'66'%20r%3D'2'%2F%3E%3Ccircle%20cx%3D'134'%20cy%3D'56'%20r%3D'1.8'%2F%3E%3Ccircle%20cx%3D'58'%20cy%3D'128'%20r%3D'1.8'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --bg-glow1: color-mix(in srgb, #8C93E6 11%, transparent);
  --bg-glow2: color-mix(in srgb, var(--sky) 11%, transparent);
  --bg-glow3: color-mix(in srgb, var(--sun) 8%, transparent);
  --bg-glow4: transparent;
  --bg-sheen: transparent;
  min-height: 100vh;
  background:
    var(--bg-sheen),
    radial-gradient(1100px 460px at 88% -8%, var(--bg-glow1), transparent 60%),
    radial-gradient(880px 420px at -6% 2%, var(--bg-glow2), transparent 55%),
    radial-gradient(760px 520px at 18% 108%, var(--bg-glow3), transparent 60%),
    radial-gradient(700px 460px at 102% 78%, var(--bg-glow4), transparent 58%),
    var(--bg-sparkle),
    var(--canvas);
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  transition: background-color .3s var(--ease);
}
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -.01em; line-height: 1.05; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }

.num { font-variant-numeric: tabular-nums; }

/* ---------------- shell ---------------- */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 28px 96px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 22px;
}
.brandmark { display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.brandmark .logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 50%, var(--sky)));
  display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
  position: relative; overflow: hidden;
}
.brandmark .logo svg { width: 22px; height: 22px; }
/* Brand mark as SVG artwork (icon-mark.svg) — no background tile; sized by height. */
.brandmark .logo--mark, .login-brand .logo--mark { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; overflow: visible; display: inline-flex; }
.brandmark .logo--mark img { width: auto; height: 52px; display: block; }
.login-brand .logo--mark img { width: auto; height: 46px; display: block; }
.brandmark .wm { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; color: var(--ink); }
.brandmark .wm b { color: var(--brand); }

.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  font-weight: 600; font-size: 14.5px; color: var(--ink-soft);
  padding: 8px 14px; border-radius: var(--radius-pill); text-decoration: none;
  transition: all .18s var(--ease); white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }

.spacer { flex: 1; }

.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search input {
  border: 1px solid var(--border-2); background: var(--surface);
  border-radius: var(--radius-pill); padding: 9px 36px 9px 38px;
  font-size: 14px; color: var(--ink); width: 230px; outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search input::placeholder { color: var(--muted); }
/* clear-search button — sits at the right edge; only rendered when there's a query */
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  border-radius: 50%; transition: color .15s var(--ease), background .15s var(--ease);
}
.search-clear:hover { color: var(--ink); background: var(--surface-2); }
.search-clear svg { position: static; left: auto; width: 15px; height: 15px; color: inherit; }
/* Mobile-only chrome — shown by the (max-width:720px) rules below. */
.search--mobile { display: none; }
.tabbar { display: none; }

.loginbtn { padding: 9px 17px; font-size: 14px; flex: none; color: var(--ink-soft); }
.loginbtn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.loginbtn svg { width: 16px; height: 16px; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; }
.user-chip svg { width: 16px; height: 16px; color: var(--muted); }
.topbar-inner form { margin: 0; }

/* ---------------- buttons ---------------- */
.btn {
  border: none; border-radius: var(--radius-pill); font-weight: 600; font-size: 14px;
  padding: 10px 18px; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; cursor: pointer;
  transition: transform .12s var(--ease), filter .18s var(--ease), background .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 34%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ---------------- chips / pills ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--ink-soft);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ============================================================
   PACK — the booster pack placeholder
   ============================================================ */
.pack {
  position: relative; aspect-ratio: 100 / 180;
  border-radius: var(--radius-pack); overflow: hidden;
  background: linear-gradient(160deg, var(--c1, #6C4CF1), var(--c2, #33B4F2));
  box-shadow: var(--shadow-pack);
  display: flex; flex-direction: column;
  color: #fff; isolation: isolate;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  cursor: pointer;
}
.pack::before { /* top gloss */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 30%, rgba(0,0,0,.18));
  z-index: 2; pointer-events: none;
}
.pack-foil { /* holographic sheen */
  position: absolute; inset: -40% -10%; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255,255,255,.0) 40%,
    rgba(255,255,255,.55) 48%,
    rgba(180,230,255,.35) 52%,
    rgba(255,210,120,.25) 56%,
    transparent 66%);
  transform: translateX(-30%) rotate(0deg); opacity: .0;
  transition: transform .7s var(--ease), opacity .3s var(--ease);
  mix-blend-mode: screen;
}
.pack:hover { transform: translateY(-7px) scale(1.012); box-shadow: var(--shadow-lg); }
.pack:hover .pack-foil { opacity: 1; transform: translateX(40%) rotate(0deg); }

.pack-top {
  position: relative; z-index: 4; padding: 13px 14px 0;
  display: flex; align-items: center; gap: 7px;
}
.pack-sym {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  background: rgba(255,255,255,.22); display: grid; place-items: center;
  backdrop-filter: blur(2px); font-size: 11px;
}
.pack-set { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; line-height: 1.05; text-shadow: 0 1px 3px rgba(0,0,0,.25); }

.pack-art {
  position: relative; z-index: 4; flex: 1;
  margin: 10px 14px; border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 18%, rgba(255,255,255,.34), rgba(255,255,255,.05) 60%, rgba(0,0,0,.12));
  border: 1px solid rgba(255,255,255,.30);
  display: grid; place-items: center; overflow: hidden;
}
.pack-orb {
  width: 64%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, rgba(255,255,255,.9), rgba(255,255,255,.25) 38%, rgba(255,255,255,0) 64%),
              radial-gradient(circle at 64% 70%, var(--c1, #6C4CF1), transparent 60%);
  box-shadow: inset 0 0 24px rgba(255,255,255,.4), 0 4px 18px rgba(0,0,0,.18);
  position: relative;
}
.pack-orb::after { /* sparkle */
  content: ''; position: absolute; top: 16%; left: 22%;
  width: 18%; height: 18%; border-radius: 50%;
  background: radial-gradient(circle, #fff, transparent 70%);
  opacity: .85;
}
.pack-artlabel {
  position: absolute; bottom: 8px; left: 0; right: 0; text-align: center;
  font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.78);
}
.pack-bottom {
  position: relative; z-index: 4; padding: 0 14px 13px;
  display: flex; align-items: center; justify-content: space-between;
}
.pack-wm { font-family: var(--font-display); font-weight: 700; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.pack-count {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-pill);
  background: rgba(0,0,0,.22); backdrop-filter: blur(2px);
}

/* photo pack — real backend artwork fills the whole tile */
/* Owned tile with real art: neutral backdrop so transparent PNGs (esp. ETB box scans) don't
   reveal the type gradient behind them. Opaque booster art covers the tile so this never shows. */
.pack--photo { background: var(--surface-2); }
.pack-photo { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ETB (Elite Trainer Box) — a sealed box, distinct from the tall packs.
   ETB art is roughly square (~1:1), so the tile is square rather than tall. */
.pack--etb { aspect-ratio: 1 / 1; }
.etb-tag {
  position: absolute; top: 10px; left: 10px; z-index: 6;
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 6px; color: #fff;
  background: rgba(0,0,0,.34); backdrop-filter: blur(2px); border: 1px solid rgba(255,255,255,.3);
}
.pack--etb .pack-art { border-radius: 9px; }
.etb-box {
  width: 70%; aspect-ratio: 5 / 4; border-radius: 7px; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.14));
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 6px 16px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.5);
}
.etb-box::before { /* lid seam */
  content: ''; position: absolute; left: 0; right: 0; top: 32%; height: 2px;
  background: rgba(0,0,0,.18); box-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.etb-box::after { /* window panel */
  content: ''; position: absolute; left: 22%; right: 22%; top: 46%; bottom: 14%;
  border-radius: 4px; background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.8), rgba(255,255,255,.2) 70%);
}
.pack--etb.pack--ghost .etb-tag { background: var(--surface-2); color: var(--muted); border-color: var(--border-2); }

/* ghost (missing) pack */
.pack--ghost {
  background: var(--surface);
  border: 2px dashed var(--border-2);
  box-shadow: none; color: var(--muted);
}
.app.dark .pack--ghost { background: var(--surface-2); }
.pack--ghost::before { display: none; }
.pack--ghost .pack-foil { display: none; }
.pack--ghost .pack-ghostinner {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 16px;
}
.pack--ghost .ghost-plus {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
  transition: transform .18s var(--ease), background .18s var(--ease);
}
.pack--ghost .ghost-plus svg { width: 24px; height: 24px; }
.pack--ghost:hover { border-color: var(--brand); transform: translateY(-4px); }
.pack--ghost:hover .ghost-plus { transform: scale(1.1) rotate(90deg); background: var(--brand); color: #fff; }
.pack--ghost .ghost-label { font-size: 12px; font-weight: 600; }
.pack--ghost .ghost-variant { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--border-2); }

/* missing (not owned) pack that DOES have artwork — show it dimmed with an add affordance */
.pack--missing { background: var(--surface-2); box-shadow: var(--shadow-sm); }
.pack--missing .pack-photo { opacity: .4; filter: saturate(.7); transition: opacity .25s var(--ease), filter .25s var(--ease); }
.pack--missing::before { display: none; }
.pack--missing:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pack--missing:hover .pack-photo { opacity: .9; filter: saturate(1); }
.pack-missing-overlay {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 16px;
  background: radial-gradient(120% 80% at 50% 50%, rgba(255,255,255,.55), rgba(255,255,255,.2) 70%, transparent);
  transition: opacity .25s var(--ease);
}
.pack--missing:hover .pack-missing-overlay { opacity: .85; }
.pack--missing .ghost-plus {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.pack--missing .ghost-plus svg { width: 24px; height: 24px; }
.pack--missing:hover .ghost-plus { transform: scale(1.1) rotate(90deg); background: var(--brand); color: #fff; }
.pack--missing .ghost-label { font-size: 12px; font-weight: 700; color: var(--ink); text-shadow: 0 1px 2px rgba(255,255,255,.7); }
.pack--missing .ghost-variant { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); text-shadow: 0 1px 2px rgba(255,255,255,.7); }

/* owned badge + qty stepper */
.owned-badge {
  position: absolute; top: 10px; right: 10px; z-index: 6;
  width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: #fff;
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(0,0,0,.25);
  border: 2px solid rgba(255,255,255,.55);
}
.owned-badge svg { width: 14px; height: 14px; }
.qty-badge {
  position: absolute; top: 8px; right: 8px; z-index: 6;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--radius-pill);
  background: var(--ink); color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,.25); border: 2px solid rgba(255,255,255,.5);
}

/* hover-to-remove overlay (only on removable owned packs) */
.pack .remove-hint {
  position: absolute; inset: 0; z-index: 7;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(20,12,32,.46); color: #fff; font-weight: 700; font-size: 12.5px;
  letter-spacing: .02em; opacity: 0; transition: opacity .15s var(--ease);
  backdrop-filter: blur(1px); pointer-events: none;
}
.pack .remove-hint svg { width: 15px; height: 15px; }
.pack.is-removable:hover .remove-hint { opacity: 1; }
.pack.is-removable:hover .pack-foil { opacity: 0; }

/* ---------------- pack tile wrapper (with controls) ---------------- */
.packtile { display: flex; flex-direction: column; gap: 10px; }
.packtile-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
/* Let the name column truncate rather than push the stepper/Own button past the tile edge — matters
   at the tight 3-up mobile pack size where name + control don't both fit at full width. */
.packtile-meta > div { min-width: 0; }
.packtile-meta .stepper, .packtile-meta .packtile-own { flex: none; }
.packtile-name { font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.1;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.packtile-type { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.packtile-own { padding: 7px 12px; font-size: 13px; }
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--surface-2); border-radius: var(--radius-pill); padding: 2px; }
.stepper button {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: transparent; color: var(--ink);
  display: grid; place-items: center; font-weight: 700; transition: background .15s var(--ease);
}
.stepper button:hover { background: var(--surface); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper button svg { width: 14px; height: 14px; }
.stepper .qv { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }

/* ---------------- progress ---------------- */
.pbar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--sky))); transition: width .6s var(--ease); }
.pbar.complete > span { background: linear-gradient(90deg, var(--mint), #2fd6a2); }

/* segmented pip progress */
.pips { display: flex; gap: 5px; }
.pips .pip { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); }
.pips .pip.on { background: var(--brand); }
.pips.complete .pip.on { background: var(--mint); }

/* ---------------- expansion card (browse) ---------------- */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
/* era/series section header — spans all columns, sticks under the top bar */
.exp-grid-head {
  grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; position: sticky; top: 80px; z-index: 6;
  background: var(--canvas); padding: 10px 0 11px; margin-top: 10px;
  border-bottom: 1px solid var(--border);
}
.exp-grid-head:first-child { margin-top: 0; }
.exp-grid-head h2 { font-size: 21px; }
/* full-width in-feed sponsor row, interleaved between cards */
.exp-grid-sponsor { grid-column: 1 / -1; }
.exp-grid-sponsor .sponsor { margin-top: 4px; margin-bottom: 4px; }
.exp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 18px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
}
.exp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.exp-card-head { display: flex; align-items: flex-start; gap: 12px; }
.exp-sym {
  width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 19px;
  box-shadow: var(--shadow-sm);
}

/* Wide set-logo banner (replaces the square exp-sym). Shows the Bulbapedia logo on a neutral
   panel so the logo art provides the colour, falling back to initials when none was imported. */
.set-mark {
  height: 46px; width: 108px; flex: none; border-radius: 13px;
  display: grid; place-items: center; overflow: hidden; padding: 5px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.set-mark-logo {
  max-width: 100%; max-height: 100%; width: auto; object-fit: contain;
}
.set-mark-initials { font-family: var(--font-display); font-weight: 700; color: var(--ink-soft); font-size: 19px; }
.tl-card .set-mark { height: 44px; width: 104px; border-radius: 12px; }
.tl-card .set-mark-initials { font-size: 16px; }
.closest-row .set-mark { height: 40px; width: 96px; border-radius: 11px; }
.closest-row .set-mark-initials { font-size: 15px; }

.exp-card h3 { font-size: 18px; }
/* mini-preview "shelf": booster packs + ETB boxes, bottom-aligned. Fixed sizing
   (flex-basis + max-width, shrink-only) keeps every thumbnail consistent regardless
   of count (1–4 boosters, 0+ ETBs); items shrink on narrow cards so 4+2 never overflows. */
.exp-mini { display: flex; gap: 7px; align-items: flex-end; min-height: 80px; }
.exp-mini .mp {
  flex: 0 1 46px; min-width: 0; max-width: 46px; aspect-ratio: 100/150; border-radius: 9px;
  background: linear-gradient(160deg, var(--c1), var(--c2)); position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.exp-mini .mp.off { background: var(--surface-2); box-shadow: none; border: 1.5px dashed var(--border-2); }
.exp-mini .mp::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(255,255,255,.25), transparent 40%); }
.exp-mini .mp.off::after { display: none; }
.exp-mini-sep { width: 1px; align-self: stretch; background: var(--border-2); margin: 6px 2px; flex: none; }
.exp-mini .me {
  flex: 0 1 58px; min-width: 0; max-width: 58px; align-self: flex-end; aspect-ratio: 5 / 4;
  border-radius: 8px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: var(--shadow-sm);
}
.exp-mini .me::before { content:''; position:absolute; left:0; right:0; top:32%; height:2px; background: rgba(0,0,0,.22); }
.exp-mini .me::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(255,255,255,.24), transparent 50%); }
.exp-mini .me.off { background: var(--surface-2); box-shadow: none; border: 1.5px dashed var(--border-2); }
.exp-mini .me.off::before, .exp-mini .me.off::after { display: none; }
/* UPC boxes are physically larger/longer than ETBs — reflect that in the grid mini-shelf. */
.exp-mini .me[data-ptype="upc"] { flex-basis: 76px; max-width: 76px; aspect-ratio: 19 / 11; }
.complete-ribbon {
  position: absolute; top: 14px; right: -34px; transform: rotate(45deg);
  background: var(--mint); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 40px; box-shadow: var(--shadow-sm);
}

/* ---------------- view toggle (segmented) ---------------- */
.viewtoggle { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.viewtoggle button {
  border: none; background: transparent; color: var(--ink-soft); font-weight: 600; font-size: 13px;
  padding: 7px 14px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 6px;
  transition: all .16s var(--ease);
}
.viewtoggle button svg { width: 15px; height: 15px; }
.viewtoggle button:hover { color: var(--ink); }
.viewtoggle button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------------- timeline ---------------- */
.timeline { position: relative; margin-top: 6px; padding-bottom: 30px; }
.tl-spine {
  position: absolute; left: 88px; top: 14px; bottom: 30px; width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 40%, var(--sky)) 55%, var(--border-2));
  border-radius: 3px;
}
.tl-spine::after { /* fade tail into the past */
  content: ''; position: absolute; left: 0; right: 0; bottom: -30px; height: 60px;
  background: linear-gradient(180deg, var(--border-2), transparent);
}

.tl-yearhead { position: relative; padding-left: 132px; margin: 30px 0 16px; min-height: 44px; display: flex; align-items: center; gap: 14px; }
.tl-yearhead:first-child { margin-top: 8px; }
/* timeline year marker — placeholder CSS Premier Ball (data-ball="premier") */
.tl-yearnode {
  position: absolute; left: 88px; top: 50%; transform: translate(-50%, -50%);
  width: 32px; height: 32px; border-radius: 50%; z-index: 2;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 3px, #15101f 3px 5px, rgba(0,0,0,0) 5px),
    linear-gradient(#15101f 0 0) center / 100% 3.4px no-repeat,
    linear-gradient(to bottom, #F4EEE3 0 calc(50% - 1.7px), #15101f calc(50% - 1.7px) calc(50% + 1.7px), #fff calc(50% + 1.7px) 100%);
  border: 2px solid #15101f;
  box-shadow: 0 0 0 5px var(--canvas), var(--shadow-sm);
}
.tl-year { font-family: var(--font-display); font-weight: 700; font-size: 34px; color: var(--ink); line-height: 1; letter-spacing: -.02em; }
.tl-yearsub { font-size: 13px; font-weight: 600; color: var(--muted); }

.tl-row { position: relative; padding-left: 132px; margin-bottom: 14px; min-height: 40px; }
.tl-month {
  position: absolute; left: 0; top: 22px; width: 64px; text-align: right;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
/* timeline set marker — placeholder CSS Poké Ball, type set by data-ball (status) */
.tl-dot {
  position: absolute; left: 88px; top: 28px; transform: translate(-50%, -50%);
  width: 21px; height: 21px; border-radius: 50%; z-index: 2;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 2.7px, #15101f 2.7px 4.3px, rgba(0,0,0,0) 4.3px),
    linear-gradient(#15101f 0 0) center / 100% 2.8px no-repeat,
    linear-gradient(to bottom, var(--ball-top, #EE1515) 0 50%, var(--ball-bottom, #fff) 50% 100%);
  border: 1.6px solid #15101f;
  box-shadow: 0 0 0 3px var(--canvas);
  transition: transform .16s var(--ease);
}
.tl-dot[data-ball="poke"]  { --ball-top: #EE1515; }                 /* not started */
.tl-dot[data-ball="great"] { --ball-top: #2A75BB; }                 /* started */
.tl-dot[data-ball="ultra"] { --ball-top: #26262B; border-color: #C7A008; } /* one away */
.tl-dot[data-ball="master"] {                                       /* complete */
  --ball-top: #7B2FA0;
  box-shadow: 0 0 0 3px var(--canvas), 0 0 9px color-mix(in srgb, #B05CF6 75%, transparent);
}
.tl-row:hover .tl-dot { transform: translate(-50%, -50%) scale(1.22) rotate(8deg); }

.tl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 12px 18px; display: flex; align-items: center; gap: 18px; cursor: pointer; position: relative;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.tl-card:hover { transform: translateX(3px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.tl-card .exp-sym { width: 44px; height: 44px; font-size: 16px; border-radius: 12px; }
.tl-card-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.tl-card-title { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.tl-card-title h3 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-card-code { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; flex: none; }
.tl-prog { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tl-count { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tl-count b { color: var(--ink); font-weight: 700; }
.tl-count.done, .tl-count.done b { color: var(--mint); }
.tl-mini { display: flex; gap: 8px; flex: none; align-items: center; }
.tl-mini .mp { width: 44px; aspect-ratio: 100/150; border-radius: 9px; background: linear-gradient(160deg, var(--c1), var(--c2)); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.tl-mini .mp.off { background: var(--surface-2); box-shadow: none; border: 1.5px dashed var(--border-2); }
/* Actual pack/ETB artwork inside the timeline mini swatches; unowned are dimmed so ownership still reads. */
.tl-mini .mp-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-mini .off .mp-art { filter: grayscale(.6); opacity: .5; }
/* A swatch that actually holds artwork drops the type-gradient, so transparent art (ETB box
   scans) floats on a neutral backdrop instead of revealing the set colour behind it. */
.tl-mini .mp:has(> .mp-art), .tl-mini .mp-etb:has(> .mp-art),
.exp-mini .mp:has(> .mp-art) { background: var(--surface-2); }
.tl-mini .mp::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 45%); }
.tl-mini .mp.off::after { display: none; }
.tl-mini-sep { width: 1px; height: 66px; background: var(--border-2); margin: 0 4px; flex: none; }
.tl-mini .mp-etb {
  width: 66px; height: 66px; border-radius: 9px; flex: none; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: var(--shadow-sm);
}
/* UPC boxes are physically wider than ETBs (deferred until UPC ships). */
.tl-mini .mp-etb[data-ptype="upc"] { width: 90px; }
.tl-mini .mp-etb::before { content: ''; position: absolute; left: 0; right: 0; top: 32%; height: 2px; background: rgba(0,0,0,.22); }
.tl-mini .mp-etb::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(255,255,255,.26), transparent 50%); }
.tl-mini .mp-etb.off { background: var(--surface-2); box-shadow: none; border: 1.5px dashed var(--border-2); }
.tl-mini .mp-etb.off::before, .tl-mini .mp-etb.off::after { display: none; }
.tl-done-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--mint); padding: 3px 9px; border-radius: var(--radius-pill); }
.tl-arrow { flex: none; color: var(--muted); display: grid; place-items: center; }
.tl-card:hover .tl-arrow { color: var(--brand); }
.tl-arrow svg { width: 18px; height: 18px; }

/* in-feed sponsor slot — sits at a year-group boundary, aligned with the timeline rows
   (offset past the spine gutter) rather than spanning the full width. */
.tl-sponsor { position: relative; padding-left: 132px; margin: 26px 0; }
.tl-sponsor .sponsor { margin-top: 0; }

@media (max-width: 720px) {
  .tl-spine { left: 24px; }
  .tl-yearnode { left: 24px; }
  .tl-dot { left: 24px; }
  .tl-yearhead { padding-left: 56px; }
  .tl-row { padding-left: 56px; }
  .tl-sponsor { padding-left: 56px; }
  .tl-month { position: static; width: auto; text-align: left; margin: 0 0 6px 2px; display: block; }
  .tl-mini { display: none; }
  .tl-card { gap: 12px; padding: 12px 14px; }
  /* let set names wrap instead of truncating to "Stell..." */
  .tl-card-title { flex-wrap: wrap; gap: 3px 8px; }
  .tl-card-title h3 { white-space: normal; overflow: visible; text-overflow: clip; font-size: 16px; line-height: 1.15; }
  .tl-card-code { align-self: center; }
  .tl-prog { gap: 6px 14px; }
}

/* ---------------- stat cards ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 20px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.stat .stat-ico { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat .stat-ico svg { width: 18px; height: 18px; }
.stat .stat-label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.stat .stat-val { font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1; color: var(--ink); }
.stat .stat-sub { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }

/* ---------------- hero / section ---------------- */
.page-head { padding: 40px 0 26px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 600; }
.page-head .eyebrow + h1 { margin-top: 10px; }
.page-head .lede { font-size: 17px; color: var(--ink-soft); margin-top: 10px; max-width: 56ch; }
.manifesto { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.manifesto-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border-2);
  padding: 6px 13px; border-radius: var(--radius-pill);
}
.manifesto-pill svg { width: 14px; height: 14px; color: var(--coral); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 18px; flex-wrap: wrap; }
.section-head-spaced { margin-top: 34px; }
.section-head h2 { font-size: 24px; white-space: nowrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-soft);
  border-radius: var(--radius-pill); padding: 7px 14px; font-size: 13px; font-weight: 600;
  transition: all .15s var(--ease);
}
.filters button:hover { border-color: var(--brand); color: var(--brand); }
.filters button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------------- expansion detail ---------------- */
.exp-hero {
  border-radius: var(--radius-card); padding: 30px; color: var(--ink); position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
/* The set logo carries the header — show it large, no tile or colour blob.
   The grid centres the initials fallback for sets that have no logo art. */
.exp-hero .hsym {
  height: 132px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 52px; color: var(--ink-soft);
}
.exp-hero .hsym-logo { height: 100%; width: auto; max-width: 360px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(27,20,48,.18)); }
.exp-hero h1 { font-size: clamp(30px, 4vw, 46px); margin-top: 8px; }
.exp-hero-mid { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.exp-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.exp-hero .hprog { margin-left: auto; text-align: center; flex: none; }
.hprog-cap { color: var(--ink-soft); font-size: 13px; font-weight: 600; margin-top: 10px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink-soft); background: none; border: none; padding: 0; margin: 4px 0 18px; text-decoration: none; }
.back-link:hover { color: var(--brand); }
.back-link svg { width: 16px; height: 16px; }

/* ---------------- loading indicator (spinning Poké Ball) ---------------- */
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; font-size: 15px; }
.loading--center { flex-direction: column; justify-content: center; gap: 14px; padding: 60px 0; text-align: center; }
.loading-ball {
  position: relative; width: 40px; height: 40px; border-radius: 50%; box-sizing: border-box; flex: none;
  border: 3px solid #15131c;
  background: linear-gradient(#E3350D 0 calc(50% - 2px), #15131c calc(50% - 2px) calc(50% + 2px), #FAFAFA calc(50% + 2px) 100%);
  box-shadow: inset -5px -5px 10px rgba(0,0,0,.18), 0 3px 9px rgba(0,0,0,.22);
  animation: loading-pokeball-spin 1s cubic-bezier(.45,.05,.55,.95) infinite;
}
.loading-ball-btn {
  position: absolute; top: 50%; left: 50%; width: 13px; height: 13px; transform: translate(-50%,-50%);
  border-radius: 50%; background: #FAFAFA; border: 3px solid #15131c; box-sizing: border-box;
}
.loading-ball-btn::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; border: 1px solid rgba(21,19,28,.35); }
@keyframes loading-pokeball-spin {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(0deg); }   /* brief hold, like a thrown ball settling */
  100% { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) { .loading-ball { animation-duration: 2.6s; } }

/* ---------------- admin · collector insights ---------------- */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 12.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); padding: 7px 13px; border-radius: var(--radius-pill);
}
.admin-badge svg { width: 15px; height: 15px; }
.admin-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 820px) { .admin-cols { grid-template-columns: 1fr; } }
.admin-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow-sm);
}
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.admin-card-head h2 { font-size: 17px; }

/* bar chart */
.admin-chart { display: flex; align-items: flex-end; gap: 10px; height: 200px; }
.admin-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.admin-col-bar {
  width: 100%; max-width: 46px; border-radius: 9px 9px 4px 4px; position: relative;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000));
  min-height: 6px; transition: height .5s var(--ease);
}
.admin-col-val { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.admin-col-lab { font-size: 12px; font-weight: 600; color: var(--muted); }

/* labelled progress bars (providers / collects) */
.admin-bars { display: flex; flex-direction: column; gap: 14px; }
.admin-bar-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.admin-bar-top .num { color: var(--ink); font-weight: 700; }
.admin-track { height: 9px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.admin-track span { display: block; height: 100%; border-radius: var(--radius-pill); }

/* collectors table */
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.admin-table th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-table .ar { text-align: right; }
.admin-table .muted-cell { color: var(--muted); white-space: nowrap; }
.admin-user { display: flex; align-items: center; gap: 11px; }
.avatar--sm { width: 34px; height: 34px; font-size: 12.5px; flex: none; }
.admin-user-id { min-width: 0; }
.admin-user-name { font-weight: 700; color: var(--ink); line-height: 1.15; }
.admin-user-mail { font-size: 12px; color: var(--muted); }
.admin-prov { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.admin-seen { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.admin-seen i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.admin-seen--on { color: var(--mint); } .admin-seen--on i { background: var(--mint); }
.admin-seen--mid { color: #C98A12; } .admin-seen--mid i { background: var(--sun, #F2A413); }
.admin-seen--off { color: var(--muted); } .admin-seen--off i { background: var(--border-2); }
.admin-foot { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.admin-foot b { color: var(--ink-soft); font-weight: 700; }

.packs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr)); gap: var(--grid-gap); }

/* ---------------- ring ---------------- */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; text-align: center; font-family: var(--font-display); }

/* ---------------- divider / misc ---------------- */
.divider { height: 1px; background: var(--border); margin: 34px 0; border: none; }
.muted { color: var(--muted); }

/* ---------------- login modal (SSO only) ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(18,12,28,.52);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: overlayIn .2s var(--ease);
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg);
  padding: 32px 28px 24px; text-align: center;
  animation: modalIn .25s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px;
  border: none; background: transparent; color: var(--muted); display: grid; place-items: center;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }
.modal-close svg { width: 18px; height: 18px; }
.login-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.login-brand .logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #000));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 38%, transparent);
}
.login-brand .logo svg { width: 22px; height: 22px; }
/* Mark variant: no tile (must follow .login-brand .logo to win on source order). */
.login-brand .logo--mark { width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.login-brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.login-brand .wm b { color: var(--brand); }
.login-title { font-size: 23px; }
.login-sub { font-size: 14px; color: var(--ink-soft); margin: 8px auto 22px; max-width: 32ch; line-height: 1.5; }
.sso { display: flex; flex-direction: column; gap: 10px; }
.sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; padding: 12px 16px; border-radius: 11px; font-size: 14.5px; font-weight: 600;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border-2);
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.sso-btn:hover { background: var(--surface-2); border-color: var(--muted); }
.sso-btn:active { transform: translateY(1px); }
.sso-mark { display: inline-flex; width: 20px; height: 20px; flex: none; }
.login-fine { font-size: 11.5px; color: var(--muted); margin-top: 18px; line-height: 1.5; }

/* ---------------- sponsor slot (endemic, clearly labelled) ---------------- */
.sponsor {
  position: relative; margin-top: 40px;
  display: flex; align-items: center; gap: 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 18px 20px;
}
.sponsor-tag {
  position: absolute; top: -9px; left: 18px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); background: var(--canvas); padding: 2px 9px; border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.sponsor-logo {
  width: 50px; height: 50px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--ink-soft);
}
.sponsor-logo svg { width: 24px; height: 24px; }
.sponsor-main { flex: 1; min-width: 0; }
.sponsor-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); }
.sponsor-sub { font-size: 13px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.sponsor-cta { flex: none; padding: 9px 16px; text-decoration: none; }
.sponsor-cta svg { width: 15px; height: 15px; }
@media (max-width: 620px) {
  .sponsor { flex-wrap: wrap; }
  .sponsor-cta { width: 100%; justify-content: center; }
}

/* empty state (new collector) */
.empty {
  text-align: center; padding: 40px 24px 64px; display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.empty .empty-balls { display: flex; gap: 10px; margin-bottom: 4px; }
.empty .empty-ball {
  width: 30px; height: 30px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 3px, #15101f 3px 4.8px, rgba(0,0,0,0) 4.8px),
    linear-gradient(#15101f 0 0) center / 100% 3.2px no-repeat,
    linear-gradient(to bottom, var(--brand) 0 50%, #fff 50% 100%);
  border: 2px solid #15101f; opacity: .9;
}
.empty .empty-ball:nth-child(2) { background:
    radial-gradient(circle at 50% 50%, #fff 0 3px, #15101f 3px 4.8px, rgba(0,0,0,0) 4.8px),
    linear-gradient(#15101f 0 0) center / 100% 3.2px no-repeat,
    linear-gradient(to bottom, #2A75BB 0 50%, #fff 50% 100%); border: 2px solid #15101f; }
.empty .empty-ball:nth-child(3) { background:
    radial-gradient(circle at 50% 50%, #fff 0 3px, #15101f 3px 4.8px, rgba(0,0,0,0) 4.8px),
    linear-gradient(#15101f 0 0) center / 100% 3.2px no-repeat,
    linear-gradient(to bottom, var(--sun) 0 50%, #fff 50% 100%); border: 2px solid #15101f; }
.empty h2 { font-size: 28px; }
.empty p { font-size: 16px; color: var(--ink-soft); max-width: 44ch; margin: 0; line-height: 1.55; }

/* footer */
.footer {
  max-width: 1240px; margin: 0 auto; padding: 30px 28px 40px;
  border-top: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer .f-wm { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -.01em; }
.footer .f-wm b { color: var(--brand); }
.footer .f-creed { display: flex; gap: 8px; flex-wrap: wrap; }
.footer .f-creed span { font-size: 12px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.footer .f-creed span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .55; }
.footer .f-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer .f-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer .f-links a { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; transition: color .15s var(--ease); }
.footer .f-links a:hover { color: var(--brand); }
.footer .f-sep { width: 1px; height: 16px; background: var(--border-2); align-self: center; }
.footer .f-ext { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.footer .f-ext svg { width: 13px; height: 13px; }
.footer .f-ext svg:first-child { width: 14px; height: 14px; }
.footer .f-ext:hover { color: var(--brand); }
.footer .f-fine { flex-basis: 100%; margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }

/* ---------------- bulk add/clear (detail sections with > 2 items) ---------------- */
.addall {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--brand-soft); color: var(--brand); border: 1px solid transparent;
  cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.addall span { display: inline-flex; align-items: center; gap: 6px; }
.addall:hover { background: var(--brand); color: #fff; }
.addall:disabled { opacity: .6; cursor: default; }

/* ---------------- split detail hero: boosters ring + ETB track (neutral theme) ---------------- */
.exp-hero .hprog { display: flex; flex-direction: column; align-items: center; min-width: 150px; }
.exp-hero .hprog-track-lab { color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 9px; }
.exp-hero .hetb {
  display: flex; align-items: center; gap: 9px; margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--border); width: 100%; justify-content: center;
}
.exp-hero .hetb-lab { color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.exp-hero .hetb-pips { width: 46px; flex: none; }
.exp-hero .hetb-pips .pip { background: var(--border-2); height: 7px; }
.exp-hero .hetb-pips .pip.on { background: var(--brand); }
.exp-hero .hetb-pips.complete .pip.on { background: var(--mint); }
.exp-hero .hetb-val { color: var(--ink); font-size: 13px; font-weight: 700; }
.exp-hero .hetb-val.done { color: var(--mint); }
.exp-hero .hprog-status { color: var(--ink-soft); font-size: 13px; font-weight: 600; margin-top: 13px; display: inline-flex; align-items: center; gap: 5px; }
.exp-hero .hprog-status.done { color: var(--mint); background: var(--surface-2); padding: 5px 12px; border-radius: var(--radius-pill); font-weight: 700; }

/* ---------------- "one of our projects" sibling card (About) ---------------- */
.sister { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px 26px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.sister:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sister-mark { width: 60px; height: 60px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, #E3350D, #A81C06); box-shadow: 0 8px 20px rgba(227,53,13,.3); }
.sister-mark svg { width: 28px; height: 28px; }
.sister-main { flex: 1; min-width: 240px; }
.sister-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.sister-main h3 { font-size: 21px; margin-bottom: 7px; }
.sister-main p { font-size: 14.5px; line-height: 1.56; color: var(--ink-soft); margin: 0; max-width: 62ch; }
.sister-cta { flex: none; white-space: nowrap; }
.sister:hover .sister-cta { background: var(--surface-2); }
@media (max-width: 640px) { .sister-cta { width: 100%; justify-content: center; } }

/* ---------------- content pages (About / Privacy) ---------------- */
.legal-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 6px 0 4px; }
.hl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-sm); }
.hl-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 15px; }
.hl-ico svg { width: 22px; height: 22px; }
.hl-card h3 { font-size: 17.5px; margin-bottom: 7px; }
.hl-card p { font-size: 14px; line-height: 1.58; color: var(--ink-soft); margin: 0; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose > h2:first-child { margin-top: 0; }
.prose p { font-size: 16px; line-height: 1.68; color: var(--ink-soft); margin: 0 0 15px; text-wrap: pretty; }
.prose ul { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.prose li { font-size: 16px; line-height: 1.6; color: var(--ink-soft); padding-left: 26px; position: relative; }
.prose li::before { content: ''; position: absolute; left: 5px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a, .login-fine a { color: var(--brand); font-weight: 600; text-decoration: none; }
.prose a:hover, .login-fine a:hover { text-decoration: underline; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.duo-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-sm); }
.duo-col h3 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.duo-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.duo-col li { font-size: 15px; line-height: 1.5; color: var(--ink-soft); padding-left: 28px; position: relative; }
.duo-col .ticks li::before, .duo-col .crosses li::before { position: absolute; left: 0; top: -1px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.duo-col .ticks li::before { content: '\2713'; background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); }
.duo-col .crosses li::before { content: '\00D7'; background: color-mix(in srgb, var(--coral) 16%, transparent); color: var(--coral); font-size: 14px; }
@media (max-width: 720px) { .duo { grid-template-columns: 1fr; } }

/* Legal / policy pages (Privacy, Terms) */
.legal { max-width: 760px; margin: 0 auto; padding: 8px 0 24px; }
.legal h1 { margin: 0 0 4px; }
.legal h2 { margin: 28px 0 8px; font-size: 18px; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.7; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin: 4px 0; }
.legal a { color: var(--brand); }

/* add-to-collection pop */
@keyframes packPop {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-8px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes foilSweep {
  0% { opacity: 0; transform: translateX(-30%); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(45%); }
}
.pack--pop { animation: packPop .55s var(--ease); }
.pack--pop .pack-foil { animation: foilSweep .7s var(--ease); }

@media (max-width: 720px) {
  .shell, .topbar-inner { padding-left: 18px; padding-right: 18px; }
  .nav { display: none; }
  /* compact top bar: brandmark + spacer + login only */
  .topbar-inner > .search { display: none; }
  .topbar-inner { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .brandmark .logo--mark img { height: 44px; }
  .wm { font-size: 20px; }
  .loginbtn { padding: 8px 14px; }
  /* full-width mobile search row under the bar */
  .search--mobile { display: flex; flex: 1 1 100%; order: 5; }
  .search--mobile input { width: 100%; }
  :root { --grid-min: 140px; --grid-gap: 14px; }
  .exp-grid { grid-template-columns: 1fr; }
  .exp-grid-head { position: static; top: auto; }
  .exp-hero { padding: 22px; }
  .exp-hero .hprog { margin-left: 0; }
  /* shrink the detail hero so it doesn't eat the whole first screen */
  .exp-hero h1 { font-size: clamp(24px, 6.4vw, 32px); }
  .exp-hero .hprog .hprog-ring, .exp-hero .hprog svg { transform: scale(.85); }
  /* trim the landing hero so a set card peeks above the fold */
  .page-head { padding: 22px 0 18px; }
  .page-head h1 { font-size: clamp(28px, 7.6vw, 40px); }
  .page-head .lede { font-size: 15px; margin-top: 8px; }
  .manifesto { margin-top: 14px; }
  /* thumb-friendly but not huge: 3-up pack tap targets on the detail page (tiles are tall 100:150) */
  .packs-grid { --grid-min: 100px; gap: 12px; }
  /* the dashboard shelf is display-only — keep it compact (4-up) on mobile */
  .packs-grid.shelf-grid { --grid-min: 72px; gap: 10px; }
  .stepper button { width: 30px; height: 30px; }
  .stepper .qv { min-width: 22px; font-size: 14px; }
  /* sticky-header clearance for any in-page scroll */
  html { scroll-padding-top: 132px; }
  .back-link, .section-head, .exp-hero { scroll-margin-top: 132px; }
  /* filters: one swipeable row instead of wrapping to two lines */
  .section-head { align-items: stretch; }
  .filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
  /* timeline density: tighter month label + rows for more card width */
  .tl-month { font-size: 11px; margin: 0 0 4px 2px; opacity: .9; }
  .tl-row { margin-bottom: 10px; padding-left: 52px; }
  .tl-yearhead { padding-left: 52px; }
  .tl-sponsor { padding-left: 52px; }

  /* bottom tab bar */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px); border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; padding: 7px 4px; border-radius: 12px;
    color: var(--muted); font-family: var(--font-body); font-weight: 700; font-size: 11px;
    letter-spacing: .01em; min-height: 52px; justify-content: center; cursor: pointer;
  }
  .tab svg { width: 23px; height: 23px; }
  .tab.active { color: var(--brand); }
  /* keep content clear of the fixed bar */
  .shell { padding-bottom: 96px; }
  .footer { margin-bottom: 64px; }
}

/* smallest phones: reclaim top-bar space — Log in becomes icon-only */
@media (max-width: 400px) {
  .loginbtn .loginbtn-txt { display: none; }
  .loginbtn { padding: 9px; width: 40px; height: 40px; justify-content: center; border-radius: 50%; }
  .loginbtn svg { width: 18px; height: 18px; }
  .wm { font-size: 19px; }
  .brandmark .logo--mark img { height: 40px; }
}

/* App-specific (no auth in the prototype): on mobile the top bar is brand + auth
   button only — hide the signed-in username chip so the row never overflows. */
@media (max-width: 720px) {
  .topbar-inner .user-chip { display: none; }
  /* Our set codes are long slugs (e.g. "team-magma-vs-aqua") vs the prototype's
     short codes ("ME4"), and our wide logo SetMark leaves the card body narrow —
     let the body shrink (min-width:0) so a long code wraps instead of overflowing. */
  .tl-card-main { min-width: 0; }
  .tl-card-code { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
  /* Our neutral hero shows a large logo (not the prototype's 92px symbol); on
     narrow screens stack it full-width and scale to fit so wide logos don't clip. */
  .exp-hero .hsym { flex: 1 1 100%; height: auto; }
  .exp-hero .hsym-logo { height: auto; width: auto; max-width: 100%; max-height: 78px; }
}

/* ============================================================
   Blazor integration — markup shapes specific to this app
   ============================================================ */

/* Cards and pack tiles are real <a> links here, not click-handler divs. */
a.exp-card,
a.brandmark,
a.shelf-pack,
a.tl-card { text-decoration: none; color: inherit; }
a.sso-btn { text-decoration: none; }
a.shelf-pack { display: block; }

/* Expansion card internals (inline styles in the prototype). */
.exp-card-title { flex: 1; min-width: 0; }
.exp-card-sub { font-size: 13px; margin-top: 3px; font-weight: 500; }
.exp-card-foot { display: flex; flex-direction: column; gap: 12px; }
.exp-card-foot-row { display: flex; align-items: center; justify-content: space-between; padding-top: 11px; border-top: 1px solid var(--border); }

/* Split booster/ETB counters: one labelled "label · pips · owned/total" row per type. */
.splitcount { display: flex; flex-direction: column; gap: 8px; }
.sc-row { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 11px; }
.sc-lab { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.sc-val { font-size: 13px; font-weight: 700; color: var(--ink); min-width: 30px; text-align: right; }
.sc-val.done { color: var(--mint); }
.exp-card-count { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.exp-card-count.is-complete { color: var(--mint); }
.exp-card-view { font-size: 13px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }

/* Real artwork inside the mini booster/ETB tiles on a browse card. Mirrors the timeline:
   every item shows its art; not-yet-owned ones are dimmed rather than left blank. */
.exp-mini .mp-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.exp-mini .off .mp-art { filter: grayscale(.6); opacity: .5; }
.exp-mini .me:has(> .mp-art) { background: var(--surface-2); }

/* Dashboard "closest to complete" rows. */
.closest-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.closest-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 14px 18px; text-decoration: none; color: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.closest-row:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.closest-row .exp-sym { width: 40px; height: 40px; font-size: 15px; }
.closest-row .cr-body { flex: 1; min-width: 0; }
.closest-row .cr-name { font-weight: 700; font-size: 15px; }
.closest-row .cr-left { font-size: 12.5px; font-weight: 500; }
.closest-row .cr-bar { width: min(220px, 34vw); }
.closest-row .cr-count { font-weight: 700; min-width: 36px; text-align: right; }

/* Owned-items shelf, grouped one section per set. */
.shelf-group { margin-bottom: 30px; }
.shelf-group:last-child { margin-bottom: 0; }
.shelf-group-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  text-decoration: none; color: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.shelf-group-head:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.shelf-group-head .set-mark { height: 38px; width: 92px; border-radius: 10px; flex: none; }
.shelf-group-head .set-mark-initials { font-size: 14px; }
.shelf-group-head .sg-body { flex: 1; min-width: 0; }
.shelf-group-head .sg-name { font-weight: 700; font-size: 15px; line-height: 1.15; }
.shelf-group-head .sg-sub { font-size: 12.5px; font-weight: 500; }
.shelf-group-head .chip { flex: none; }
.shelf-group-head .sg-arrow { display: inline-flex; color: var(--muted); flex: none; }
.shelf-group-head .sg-arrow svg { width: 18px; height: 18px; }

/* Brand-tinted quantity chip on the shelf. */
.chip-brand { background: var(--brand-soft); color: var(--brand); }

/* "No results" placeholder. */
.browse-empty { text-align: center; padding: 80px 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state {
  border: 1px dashed var(--border-2); border-radius: var(--radius-card);
  padding: 2rem; text-align: center; background: var(--surface);
}
.empty-state code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* Blazor error toast (was provided by the template stylesheet we removed). */
#blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0; left: 0; width: 100%;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* =========================================================================
   "What do you collect?" — account menu, onboarding, preferences, hidden-sets
   (ported from the design prototype styles.css)
   ========================================================================= */

/* ---------------- account menu (signed-in) ---------------- */
.account { position: relative; flex: none; }
.avatar-btn { border: none; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(150deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #000));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease);
}
.avatar-btn:hover .avatar { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 38%, transparent); }
.avatar--lg { width: 44px; height: 44px; font-size: 16px; }
/* invisible click-away layer behind the open menu. Uses explicit vw/vh (not inset:0) because the
   sticky top bar's backdrop-filter makes it the containing block for fixed children — inset:0 would
   only cover the bar, so clicks below it wouldn't close the menu. */
.account-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 55; }
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: max-content; min-width: 256px; max-width: min(340px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; animation: modalIn .16s var(--ease);
}
.account-head { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.account-id { min-width: 0; }   /* allow the name/email to truncate instead of squishing the avatar */
.account-name { font-weight: 700; font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-provider { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.account-menu form { margin: 0; }
.account-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 11px; border: none; background: none; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.account-item:hover { background: var(--surface-2); color: var(--ink); }
.account-item svg { width: 18px; height: 18px; flex: none; }

/* one-time post-onboarding nudge pointing at the avatar */
.avatar-btn--hint .avatar { animation: avatarPulse 1.8s var(--ease) infinite; }
@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent), 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); }
  50% { box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent), 0 0 0 7px color-mix(in srgb, var(--brand) 0%, transparent); }
}
.avatar-hint {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 270px;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 15px;
  box-shadow: var(--shadow-lg); animation: modalIn .22s var(--ease);
}
.avatar-hint-arrow {
  position: absolute; top: -6px; right: 16px; width: 12px; height: 12px;
  background: var(--ink); transform: rotate(45deg); border-radius: 2px;
}
.avatar-hint-body { display: flex; gap: 11px; align-items: flex-start; }
.avatar-hint-ico {
  width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 30%, transparent); color: #fff;
}
.avatar-hint-ico svg { width: 17px; height: 17px; }
.avatar-hint-title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.avatar-hint-sub { font-size: 12.5px; line-height: 1.45; margin-top: 3px; color: rgba(255,255,255,.78); }
.avatar-hint-sub b { color: #fff; font-weight: 700; }
.avatar-hint-go {
  margin-top: 12px; width: 100%; border: none; cursor: pointer; border-radius: 9px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; padding: 9px;
  transition: filter .15s var(--ease);
}
.avatar-hint-go:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .avatar-btn--hint .avatar { animation: none; } }

/* ---------------- "sets hidden" note (browse) ---------------- */
.hidden-note {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 13px 18px; margin-bottom: 22px;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.45;
}
.hidden-note > svg { color: var(--muted); flex: none; }
.hidden-note b { color: var(--ink); font-weight: 700; }
.hidden-note-link {
  margin-left: auto; border: none; background: none; cursor: pointer; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: var(--brand);
}
.hidden-note-link:hover { text-decoration: underline; }

/* ---------------- product-type picker (onboarding + preferences) ---------------- */
.typepicker { display: flex; flex-direction: column; gap: 11px; }
.typecard {
  display: flex; align-items: center; gap: 15px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border-2); border-radius: 16px; padding: 15px 16px;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease);
}
.typecard:hover { border-color: var(--muted); transform: translateY(-1px); }
.typecard.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.typecard-ico {
  width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-soft); transition: background .16s var(--ease), color .16s var(--ease);
}
.typecard-ico svg { width: 24px; height: 24px; }
.typecard.on .typecard-ico { background: var(--brand); color: #fff; }
.typecard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.typecard-label { font-weight: 700; font-size: 15.5px; color: var(--ink); }
.typecard-blurb { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.typecard-check {
  width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border-2); color: #fff; transition: background .16s var(--ease), border-color .16s var(--ease);
}
.typecard.on .typecard-check { background: var(--brand); border-color: var(--brand); }
.typecard-check svg { width: 14px; height: 14px; }

/* ---------------- preferences panel (modal variant) ---------------- */
.modal--prefs { max-width: 460px; text-align: left; }
.prefs-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
}
.modal--prefs .login-sub { margin-left: 0; margin-right: 0; max-width: none; text-align: left; }
.prefs-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------------- onboarding guide (full-screen) ---------------- */
.onb {
  position: fixed; inset: 0; z-index: 120; overflow-y: auto;
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
  background:
    radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    var(--canvas);
  animation: overlayIn .25s var(--ease);
}
.onb-card {
  width: 100%; max-width: 520px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-lg);
  padding: 38px 40px 30px; animation: modalIn .28s var(--ease);
}
.onb-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.onb-brand .logo--mark img { height: 40px; }
.onb-brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); letter-spacing: -.02em; }
.onb-brand .wm b { color: var(--brand); }
.onb-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.onb-title { font-size: 32px; margin-top: 8px; }
.onb-sub { font-size: 15px; color: var(--ink-soft); line-height: 1.6; margin: 12px 0 26px; text-wrap: pretty; }
.onb-go { width: 100%; justify-content: center; margin-top: 24px; padding: 14px; font-size: 15.5px; }
.onb-fine {
  display: flex; align-items: center; gap: 9px; justify-content: center; text-align: center;
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; margin-top: 16px;
  background: var(--surface-2); border-radius: 12px; padding: 11px 14px;
}
.onb-fine > svg { flex: none; color: var(--muted); }
.onb-fine b { color: var(--ink); font-weight: 700; }
@media (max-width: 480px) {
  .onb-card { padding: 30px 24px 24px; border-radius: 22px; }
  .onb-title { font-size: 27px; }
}

/* =========================================================================
   Shareable read-only collection link (Share button, modal, /s/{token} view)
   ========================================================================= */
.share-btn { flex: none; margin-top: 14px; }
.share-btn svg { width: 16px; height: 16px; }
.modal--share { max-width: 480px; text-align: left; }
.modal--share .login-title { font-size: 22px; }
.share-url { display: flex; gap: 8px; margin-top: 4px; }
.share-url input {
  flex: 1; min-width: 0; border: 1px solid var(--border-2); background: var(--surface-2);
  border-radius: 11px; padding: 11px 14px; font-size: 13px; color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; outline: none;
}
.share-url input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.share-url .btn { flex: none; white-space: nowrap; }
.share-note {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.45;
  background: var(--surface-2); border-radius: 11px; padding: 11px 13px;
}
.share-note > svg { flex: none; color: var(--muted); }
.share-note b { color: var(--ink); font-weight: 700; }

/* read-only shared view */
.shareview { min-height: 100vh; padding-bottom: 96px; }
.sharebar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.sharebar .brandmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.sharebar .logo--mark img { height: 40px; }
.sharebar .wm { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -.02em; }
.sharebar .wm b { color: var(--brand); }
.share-readonly {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--border);
  padding: 7px 13px; border-radius: var(--radius-pill);
}
.share-readonly svg { width: 15px; height: 15px; color: var(--muted); }
.share-cta {
  position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 18px;
  max-width: 1240px; margin: 8px auto 0; padding: 16px 22px; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--shadow-lg);
}
.share-cta-main { flex: 1; min-width: 200px; }
.share-cta-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.share-cta-sub { font-size: 13.5px; color: rgba(255,255,255,.78); margin-top: 2px; }
.share-cta .btn { flex: none; }
/* read-only tiles/rows: no pointer affordance */
.packtile--static .pack, .closest-row--static, .shelf-group-head--static { cursor: default; }
@media (max-width: 560px) {
  .share-cta { gap: 12px; padding: 14px 16px; }
  .share-cta .btn { width: 100%; justify-content: center; }
  .sharebar { padding: 12px 16px; }
}
