/* ============================================================
   Wigglitz collector — layout & components
   ============================================================ */
#app { max-width: var(--maxw); margin: 0 auto; position: relative; }
#screen {
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
}

.ic { display: inline-flex; }
.ic svg { width: 1em; height: 1em; display: block; }

/* ---------- Buttons ---------- */
.btn {
  border: none; border-radius: 999px; font-weight: 800; font-size: 1rem;
  padding: 13px 22px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; transition: transform .12s ease, filter .12s ease;
}
.btn .ic { font-size: 1.15rem; }
.btn:active { transform: scale(.96); }
.btn--primary { background: var(--teal-500); color: #fff; box-shadow: var(--shadow-teal); }
.btn--ghost { background: var(--teal-050); color: var(--teal-700); }
.btn--danger { background: #fff; color: var(--salmon); border: 2px solid var(--salmon); }

/* ---------- Tab bar ---------- */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-top: var(--hairline);
  box-shadow: 0 -4px 18px rgba(19,19,19,.04);
  display: flex; align-items: flex-start; justify-content: space-around;
  z-index: 30;
}
.tab {
  flex: 1; background: none; border: none; padding: 9px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted);
}
.tab__icon { font-size: 1.45rem; display: inline-flex; }
.tab__label { font-size: .66rem; font-weight: 700; }
.tab.is-active { color: var(--teal-700); }
/* each tab its own colour so the bar is fun, not grey */
.tab[data-tab="worlds"] .tab__icon { color: #2ba6f5; }
.tab[data-tab="games"]  .tab__icon { color: #a15ee0; }
.tab[data-tab="wiggle"] .tab__icon { color: #ef6b6b; }
.tab[data-tab="shelf"]  .tab__icon { color: #f5a63a; }
.tab.is-active .tab__label { color: var(--ink); font-weight: 800; }

/* raised, emphasized center tab */
.tab--center {
  flex: 0 0 auto; position: relative;
}
.tab--center .tab__icon {
  width: 62px; height: 62px; margin-top: -26px;
  border-radius: 50%; background: var(--teal-500); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; box-shadow: var(--shadow-teal);
  border: 4px solid var(--bg);
}
.tab--center.is-active .tab__icon { background: var(--teal-700); }
.tab--center .tab__label { color: var(--teal-700); font-weight: 800; margin-top: 2px; }

/* ---------- Collection header ---------- */
.collection { padding: 0; }
.chead {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 14px 16px; border-bottom: var(--hairline);
}
.chead__logo { height: 60px; width: auto; }
.chead__info {
  position: absolute; right: 14px; top: 14px;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--teal-050); color: var(--teal-700); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}

/* Scan button — primary action of the whole app */
.scanbtn {
  position: sticky; top: 86px; z-index: 9;
  margin: 12px 14px; width: calc(100% - 28px);
  border: none; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #17c2af, #109384); color: #fff;
  padding: 15px; display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: var(--shadow-teal), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .12s ease;
}
.scanbtn:active { transform: scale(.98); }
.scanbtn__ic { font-size: 1.7rem; display: inline-flex; }
.scanbtn__tx { font-size: 1.2rem; font-weight: 800; letter-spacing: .01em; }

/* ---------- Progress ---------- */
.progress { margin: 0 16px 16px; }
.progress__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.progress__count { font-size: .95rem; color: var(--ink-700); }
.progress__count b { color: var(--teal-700); font-size: 1.1rem; }
.progress__pct { font-size: .85rem; font-weight: 800; color: var(--muted); }
.progress__track {
  height: 14px; border-radius: 999px; background: var(--track);
  overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.progress__fill {
  height: 100%; border-radius: 999px; background: var(--fill);
  min-width: 14px; transition: width .5s ease;
}

/* ---------- Series ---------- */
.series-list { padding: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.series { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-1); border: var(--hairline); overflow: hidden; }
.series__head {
  width: 100%; border: none; background: var(--card);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
}
.series__title { height: 30px; width: auto; max-width: 58%; object-fit: contain; }
.series__count {
  margin-left: auto; font-size: .82rem; font-weight: 800; color: var(--teal-700);
  background: var(--teal-050); padding: 4px 11px; border-radius: 999px;
}
.series__chev { color: var(--muted); font-size: 1.1rem; display: inline-flex; transition: transform .22s ease; }
.series.is-open .series__chev { transform: rotate(90deg); }

.series__grid {
  display: none; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; padding: 4px 12px 14px;
}
.series.is-open .series__grid { display: grid; }
@media (min-width: 460px) { .series__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* per-series theme colours: soft card tint + matching grid + cell tone */
.series--original      { background: #dff7ee; } .series--original .series__head { background: #dff7ee; } .series--original .fig { background: #f0fcf7; }
.series--puppies       { background: #fdeed8; } .series--puppies .series__head { background: #fdeed8; } .series--puppies .fig { background: #fef8ec; }
.series--fantasy       { background: #ecdff8; } .series--fantasy .series__head { background: #ecdff8; } .series--fantasy .fig { background: #f7f0fd; }
.series--ocean         { background: #d9f0fb; } .series--ocean .series__head { background: #d9f0fb; } .series--ocean .fig { background: #eef9fe; }
.series--foodz         { background: #ffe8d6; } .series--foodz .series__head { background: #ffe8d6; } .series--foodz .fig { background: #fff5eb; }
.series--farm          { background: #e8f3d7; } .series--farm .series__head { background: #e8f3d7; } .series--farm .fig { background: #f4faea; }
.series--dino          { background: #ddf2dc; } .series--dino .series__head { background: #ddf2dc; } .series--dino .fig { background: #eff9ee; }
.series--stars-stripes { background: #e2e9fb; } .series--stars-stripes .series__head { background: #e2e9fb; } .series--stars-stripes .fig { background: #f0f4fd; }

/* ---------- Figure cell ---------- */
.fig {
  border: none; background: var(--bg-soft); border-radius: var(--r-md);
  padding: 8px 6px 7px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: transform .12s ease;
  min-width: 0; overflow: hidden; /* long names must never widen the tile */
}
.fig:active { transform: scale(.94); }
.fig__art { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.fig__art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fig__name {
  font-size: .72rem; font-weight: 700; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fig.is-locked .fig__art img { filter: brightness(0); opacity: .16; }
.fig.is-locked .fig__name { color: var(--muted); }
.fig.is-owned { background: var(--teal-050); }

/* ---------- Placeholder screens ---------- */
.placeholder {
  min-height: 70dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 32px; gap: 12px;
}
.placeholder__mark { width: 72px; height: 72px; opacity: .5; }
.placeholder__mark img { width: 100%; height: 100%; }
.placeholder h2 { font-size: 1.5rem; color: var(--teal-700); }
.placeholder p { color: var(--muted); max-width: 320px; }

/* ---------- Bottom sheet ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(19,19,19,.5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.scrim.is-in { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-width: var(--maxw);
  background: var(--bg); border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 26px 18px calc(20px + var(--safe-b));
  transform: translateY(16px); transition: transform .22s ease;
  max-height: 92dvh; overflow-y: auto;
}
/* drag-handle bar: quiet signal that it's a sheet */
.sheet::before {
  content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 42px; height: 5px; border-radius: 999px; background: rgba(19,19,19,.14);
}
.sheet--full::before { display: none; }
.scrim.is-in .sheet { transform: translateY(0); }
.sheet__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--teal-050); color: var(--ink-700); font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
}
.sheet--full {
  max-width: var(--maxw); height: 100dvh; max-height: 100dvh;
  border-radius: 0; padding: 0;
  display: flex; flex-direction: column;
}
/* THE white-screen bug: this wrapper had no height, so the scan screen
   (whose children are absolutely positioned) collapsed to 0px tall,
   showing only the sheet's white background. */
.sheet--full .sheet__body { flex: 1; min-height: 0; height: 100%; }

/* ---------- Figure detail ---------- */
.detail { text-align: center; padding-top: 6px; }
.detail__stage {
  width: 100%; height: 260px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, var(--teal-050), var(--bg) 70%);
  border-radius: var(--r-lg); margin-bottom: 12px;
}
.detail__stage img, .char-view { max-width: 80%; max-height: 240px; object-fit: contain; }
.detail__stage--sil img { filter: brightness(0); opacity: .16; }
.detail__stage--3d { padding: 0; overflow: hidden; }
.detail__stage--3d .vw__canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.detail__spinhint { text-align: center; color: var(--muted); font-size: .72rem; font-weight: 700; margin: -6px 0 6px; letter-spacing: .04em; }
.detail__actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.da {
  border: none; background: var(--teal-050); color: var(--teal-700);
  border-radius: var(--r-md); padding: 10px 4px; font-family: inherit; font-weight: 800;
  font-size: .68rem; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.da .ic { font-size: 1.15rem; }
.da:active { transform: scale(.94); }
.detail__flag {
  margin-top: 14px; border: var(--hairline); background: #fff; width: 100%;
  color: var(--teal-700); font-family: inherit; font-weight: 800; font-size: .82rem;
  padding: 10px; border-radius: var(--r-md);
}
.detail__remove {
  margin-top: 10px; border: none; background: none; width: 100%;
  color: var(--salmon); font-family: inherit; font-weight: 700; font-size: .82rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.detail__name { font-size: 1.5rem; }
.detail__chips { display: flex; gap: 8px; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
.chip { font-size: .8rem; font-weight: 800; padding: 5px 13px; border-radius: 999px; background: var(--teal-050); color: var(--teal-700); }
.chip--rarity { background: #fdf1e5; color: #b06a25; }
.detail__unlocked { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.detail__cta { margin-top: 16px; width: 100%; }

/* ---------- Scan ---------- */
.scan { height: 100%; display: flex; flex-direction: column; background: #000; }
.scan__view { position: relative; flex: 1; overflow: hidden; }
.scan__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan__topbar {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 0; right: 0;
  display: flex; justify-content: center; z-index: 3;
}
#scanLabel {
  background: rgba(0,0,0,.45); color: #fff; font-weight: 800; font-size: .95rem;
  padding: 10px 22px; border-radius: 999px; backdrop-filter: blur(6px);
  max-width: 82%; text-align: center;
}
/* the circle: everything outside it is softly darkened; green ring fills around it */
.scan__circle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%);
  width: min(76vw, 340px); aspect-ratio: 1; z-index: 2;
  border-radius: 50%;
  box-shadow: 0 0 0 2000px rgba(0,0,0,.44); /* mask outside the circle */
}
.scan__circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.scan__ring-track { fill: none; stroke: rgba(255,255,255,.35); stroke-width: 6; }
.scan__ring-fill {
  fill: none; stroke: #35e07f; stroke-width: 7; stroke-linecap: round;
  transition: stroke-dashoffset .18s linear;
  filter: drop-shadow(0 0 6px rgba(53,224,127,.7));
}
.scan__fallback {
  position: absolute; bottom: calc(26px + var(--safe-b)); left: 0; right: 0; z-index: 3;
  margin: 0 auto; width: fit-content;
  border: none; background: rgba(0,0,0,.4); color: rgba(255,255,255,.85);
  font-weight: 700; font-size: .82rem; padding: 9px 18px; border-radius: 999px;
}

/* ---------- Picker ---------- */
.picker__title { text-align: center; font-size: 1.2rem; margin-bottom: 12px; }
.picker__search {
  width: 100%; border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; font-family: inherit; font-weight: 700; font-size: 1rem;
  margin-bottom: 14px; background: var(--bg-soft);
}
.picker__search:focus { outline: none; border-color: var(--teal-500); }
.picker__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pk {
  border: 2px solid transparent; background: var(--bg-soft); border-radius: var(--r-md);
  padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pk img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pk__name { font-size: .72rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pk__series { font-size: .62rem; color: var(--muted); font-weight: 700; }
.pk--prefer { border-color: var(--teal-500); background: var(--teal-050); }

/* ---------- About ---------- */
.about { text-align: center; padding-top: 4px; }
.about__logo { height: 46px; margin: 4px auto 6px; }
.about__tag { color: var(--muted); margin-bottom: 18px; }
.about__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-top: 1px solid var(--line); font-weight: 800;
}
.toggle {
  width: 52px; height: 30px; border-radius: 999px; border: none;
  background: var(--track); position: relative; transition: background .18s ease;
}
.toggle.is-on { background: var(--teal-500); }
.toggle__knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: transform .18s ease; box-shadow: var(--shadow-1);
}
.toggle.is-on .toggle__knob { transform: translateX(22px); }
.about__zb {
  border-top: 1px solid var(--line); margin-top: 6px; padding-top: 18px; text-align: center;
}
.about__zb-logo {
  display: inline-block; font-weight: 800; letter-spacing: .04em; color: var(--ink);
  border: 2px dashed var(--teal-100); border-radius: var(--r-md);
  padding: 14px 24px; margin-bottom: 10px;
}
.about__zb p { color: var(--muted); font-size: .9rem; }
.about__reset { width: 100%; margin-top: 22px; }
.about__ver { color: var(--muted); font-size: .75rem; margin-top: 14px; }
.about__errlog {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm);
  background: #f6f7f8; border: var(--hairline);
  color: var(--muted); font-size: .68rem; text-align: left; word-break: break-all;
}

/* ---------- Wiggle Room ---------- */
.wr-host { position: relative; width: 100%; height: calc(100dvh - var(--tabbar-h) - var(--safe-b)); }
.wr { position: absolute; inset: 0; overflow: hidden; }
.wr__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wr__top {
  position: absolute; top: 0; left: 0; right: 0; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.wr__title { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.wr__envs { margin-left: auto; display: flex; gap: 6px; }
.wr__env {
  border: none; background: rgba(255,255,255,.72); color: var(--teal-700);
  font-weight: 800; font-size: .78rem; padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.wr__env.is-on { background: var(--teal-500); color: #fff; }

/* theme dropdown */
.wr__dd { position: relative; margin-left: auto; }
.wr__dd-btn {
  border: none; background: rgba(255,255,255,.9); color: var(--teal-700);
  font-weight: 800; font-size: .82rem; padding: 8px 13px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-1);
}
.wr__dd-btn .ic { font-size: .85rem; transform: rotate(90deg); }
.wr__dd-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 5;
  background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-2);
  padding: 6px; min-width: 150px; display: flex; flex-direction: column; gap: 2px;
}
.wr__dd-menu[hidden] { display: none; }
.wr__dd-item {
  border: none; background: none; text-align: left; font-weight: 700; font-size: .92rem;
  color: var(--ink); padding: 10px 12px; border-radius: 10px;
}
.wr__dd-item.is-on { background: var(--teal-050); color: var(--teal-700); }
.wrpick__hint { text-align: center; color: var(--muted); font-size: .82rem; margin: -4px 0 14px; }
.wr__bottom {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.66); backdrop-filter: blur(6px);
  box-shadow: 0 3px 12px rgba(0,0,0,.1);
}
.wr__grp { display: flex; gap: 10px; }
.wr__btn--round { width: 44px; padding: 10px 0; justify-content: center; }
.wr__btn {
  border: none; background: rgba(255,255,255,.9); color: var(--teal-700);
  font-weight: 800; font-size: .9rem; padding: 12px 16px; border-radius: 999px;
  box-shadow: var(--shadow-1); display: inline-flex; align-items: center; gap: 6px;
}
.wr__btn .ic { font-size: 1.2rem; }
.wr__btn:active { transform: scale(.95); }
.wr__btn.is-off { background: var(--teal-500); color: #fff; } /* zero-g active */
.wrpick__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  max-height: 46dvh; overflow-y: auto; margin-bottom: 14px;
}
.wrpick__apply { width: 100%; }

/* ---------- Worlds ---------- */
.worlds {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  height: calc(100dvh - var(--tabbar-h) - var(--safe-b));
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.worlds::-webkit-scrollbar { display: none; }
.world {
  flex: 0 0 100%; scroll-snap-align: start; position: relative; overflow: hidden;
  display: flex; flex-direction: column; padding: 16px 14px 40px;
}
.world__head { position: relative; z-index: 2; text-align: center; }
.world__title { height: 44px; width: auto; margin: 6px auto 4px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.world__prog { display: inline-block; background: rgba(255,255,255,.88); color: var(--teal-700);
  font-weight: 800; font-size: .78rem; padding: 4px 13px; border-radius: 999px; }
.world__stage { position: relative; z-index: 2; flex: 1; display: flex; flex-wrap: wrap;
  align-content: center; justify-content: center; gap: 4px; }
.world__fig { border: none; background: none; width: 30%; max-width: 128px; padding: 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: bob 3s ease-in-out infinite; animation-delay: var(--d); }
.world__fig img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 7px 6px rgba(0,0,0,.2)); }
.world__fig span { font-size: .66rem; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.world__empty { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center;
  justify-content: center; text-align: center; color: #fff; font-weight: 700; line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0,0,0,.4); padding: 40px; }
.worlds__dots { position: fixed; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 20; pointer-events: none; }
.world__dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,.22); transition: all .2s; }
.world__dot.is-on { background: var(--teal-700); width: 18px; border-radius: 999px; }
.world--original { background: linear-gradient(160deg, #7af0d6, #22a58d); }
.world--puppies  { background: linear-gradient(160deg, #ffe1a6, #8ccf68); }
.world--fantasy  { background: linear-gradient(160deg, #bd91ff, #6a3fb0); }
.world--ocean    { background: linear-gradient(180deg, #2ec6e0, #0a5a8c); }
.world--foodz    { background: linear-gradient(160deg, #ffce88, #ff875a); }
.world--farm     { background: linear-gradient(170deg, #c2ea9c, #6aab4a); }
.world--dino     { background: linear-gradient(160deg, #84d98a, #2c8a57); }
.world--stars-stripes { background: linear-gradient(160deg, #7aa8ff, #d75a6a); }

/* ---------- Shelf ---------- */
.shead { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px; }
.shead h1 { font-size: 1.6rem; color: var(--teal-700); }
.shead__add { border: none; background: var(--teal-500); color: #fff; font-weight: 800;
  padding: 9px 17px; border-radius: 999px; box-shadow: var(--shadow-teal); font-family: inherit; }
.shelf {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 1.5%;
  padding: 20px 14px 120px; min-height: 60dvh;
  background: repeating-linear-gradient(180deg, transparent 0 116px, #e7cba3 116px 118px, #c79a68 118px 122px);
}
.shelf__item { width: 32%; height: 118px; display: flex; align-items: flex-end; justify-content: center;
  touch-action: none; }
.shelf__item img { max-width: 90%; max-height: 106px; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 4px 3px rgba(0,0,0,.22)); }
.shelf__hint { width: 100%; text-align: center; color: var(--muted); padding: 60px 30px;
  font-weight: 700; line-height: 1.7; }
.shelf__trash { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 30; background: var(--salmon); color: #fff; text-align: center; font-weight: 800; padding: 16px; }
.shelf__ghost { position: fixed; width: 92px; height: 92px; object-fit: contain; transform: translate(-50%, -50%);
  pointer-events: none; z-index: 40; opacity: .88; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }

/* ---------- Celebration ---------- */
.celebrate {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10,60,50,.62);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.celebrate.is-in { opacity: 1; }
.celebrate__fx { position: absolute; inset: 0; pointer-events: none; }
.celebrate__card {
  position: relative; text-align: center; color: #fff; padding: 20px; max-width: 380px;
}
.celebrate__eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--teal); }
.celebrate__stage {
  width: 260px; height: 260px; margin: 8px auto;
  display: flex; align-items: center; justify-content: center;
  transform: scale(.4); opacity: 0;
  animation: burstIn .55s cubic-bezier(.2,1.3,.4,1) forwards;
}
.celebrate__stage img { max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.4)); }
@keyframes burstIn {
  0% { transform: scale(.3) rotate(-25deg); opacity: 0; }
  70% { transform: scale(1.08) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.celebrate__name { font-size: 1.8rem; margin-top: 4px; }
.celebrate__meta { color: rgba(255,255,255,.85); font-weight: 700; margin-top: 2px; }
.celebrate__since {
  margin-top: 10px; padding: 7px 14px; display: inline-block;
  background: rgba(255,255,255,.14); border-radius: 999px;
  color: rgba(255,255,255,.92); font-weight: 700; font-size: .82rem;
}
/* already-owned: calmer amber eyebrow instead of the celebratory teal */
.celebrate--dupe .celebrate__eyebrow { color: var(--yellow, #f8ac51); }
.celebrate__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.celebrate__actions .btn--ghost { background: rgba(255,255,255,.16); color: #fff; }
