/* LOOK AND LAYOUT
   Written "mobile first": the plain rules are for phones,
   and the @media rules further down add room on bigger screens.
   No outside fonts or files, so the page stays fast and works offline. */

/* Colors and sizes in one place, so the look is easy to change later. */
:root {
  --bg: #fff8f1;          /* warm cream page */
  --surface: #ffffff;     /* cards */
  --tint: #ffeef3;        /* soft pink panels */
  --text: #2b2340;        /* deep purple-gray, easy to read */
  --muted: #6b6280;       /* secondary text (passes contrast on cream and white) */
  --accent: #c93a63;      /* pink buttons: deep enough for white text to be readable */
  --accent-dark: #a82e52;
  --accent-soft: #e8507a; /* decorative pink (icons, heart) */
  --line: #f1e4dc;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(43, 35, 64, 0.06), 0 6px 18px rgba(43, 35, 64, 0.07);
  /* Rounded system font where available (iPhone, Mac), normal system font elsewhere. */
  --font-display: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.sheet-open { overflow: hidden; } /* page stops scrolling behind the open sheet */

button { font: inherit; color: inherit; }

/* Visible outline when moving around with a keyboard. */
:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Text for screen readers only (visually hidden). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 8px;
}

/* ---------- Welcome ---------- */
.welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: 36px 16px 22px;
}
.welcome > :not(.glow):not(.spark) { position: relative; }
.welcome-mark {
  width: 30px;
  height: 30px;
  fill: var(--accent-soft);
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 10px rgba(232, 80, 122, 0.35));
  transform-origin: center;
  animation: beat 4s ease-in-out infinite;
}
@keyframes beat { 0%, 86%, 100% { transform: scale(1); } 92% { transform: scale(1.14); } }

/* Soft colored glows drifting slowly behind the name. */
.glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.55;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.glow.g1 { width: 220px; height: 220px; left: -60px; top: -70px; background: #ffc2d4; }
.glow.g2 { width: 200px; height: 200px; right: -50px; top: 10px; background: #ffe2a8; animation-delay: -5s; }
.glow.g3 { width: 160px; height: 160px; left: 38%; top: 60px; background: #e3d4ff; animation-delay: -9s; opacity: 0.4; }
@keyframes drift { to { transform: translate(26px, 18px) scale(1.12); } }

/* Little twinkling sparkles. */
.spark {
  position: absolute;
  z-index: -1;
  width: 14px;
  height: 14px;
  fill: var(--accent-soft);
  animation: twinkle 3.2s ease-in-out infinite;
}
.spark.s1 { left: calc(50% - 74px); top: 38px; }
.spark.s2 { left: calc(50% + 52px); top: 30px; width: 10px; height: 10px; animation-delay: -1.2s; }
.spark.s3 { left: calc(50% + 70px); top: 70px; width: 8px; height: 8px; animation-delay: -2.2s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7) rotate(0); }
  50% { opacity: 1; transform: scale(1.1) rotate(20deg); }
}

.shop-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.shop-name-owner,
.shop-name-main { display: block; }
.shop-name-owner {
  margin-bottom: 2px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
}
.shop-name-main { white-space: nowrap; } /* keep "Tiny Treasures" on one line */
.welcome-line {
  margin: 10px auto 0;
  max-width: 28ch;
  font-size: 1.05rem;
  color: var(--muted);
}

/* Small uppercase labels above each section. */
.section-label {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Shop identity stays at the top once the buying instructions scroll away. */
.sticky-shop-heading {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -16px 20px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 241, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 750;
}
.sticky-shop-heading svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: var(--accent-soft);
}

/* ---------- Catalog filters ---------- */
.catalog-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.catalog-heading .section-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}
.catalog-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.filter-chip {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid #ded4cb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.filter-chip:hover { transform: translateY(-1px); border-color: var(--accent); }
.filter-chip.is-active {
  border-color: #e4d36d;
  background: #f7edaa;
  color: #332d1f;
}
.catalog-empty {
  grid-column: 1 / -1;
  padding: 28px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  text-align: center;
}

/* ---------- How to buy ---------- */
.how-to-buy {
  background: var(--tint);
  border-radius: var(--radius);
  padding: 18px 12px 20px;
  margin-bottom: 32px;
  text-align: center;
  border: 1px solid #fbd9e3;
  counter-reset: step;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  line-height: 1.3;
}
.step-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.step-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step { position: relative; counter-increment: step; }
.step-icon::after {
  content: counter(step);
  position: absolute;
  top: -4px;
  right: calc(50% - 30px);
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}
.step-icon { position: relative; }
.step-text strong { font-weight: 700; }

/* ---------- Item grid: 2 columns on a phone ---------- */
.catalog {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Pop-in: each card starts small and faded, then pops in (app.js adds .in, one after another). */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.94);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* One card. It is a real button, so keyboards and screen readers can open it too. */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(180deg, #fff, #fffaf7);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(43, 35, 64, 0.06), 0 1px 2px rgba(43, 35, 64, 0.05), 0 8px 22px rgba(201, 58, 99, 0.08);
  /* --rx / --ry are set by app.js for the desktop tilt */
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:active { transform: scale(0.965); }
/* Moving light that follows the mouse on desktop. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 60%);
}
.card-photo {
  position: relative;
  aspect-ratio: 1 / 1; /* square photos, so the grid lines up */
  overflow: hidden;
  background: var(--tint);
}
.card-photo img,
.art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease);
}
.card-photo img { object-fit: cover; }
/* Gradient stand-in shown when an item has no photo yet. */
.art {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c1, #ffd6e2), var(--c2, #f58aa9));
}
.art svg { width: 38%; height: 38%; fill: #fff; fill-opacity: 0.85; }
/* Soft sheen so photos feel a little glossy. */
.card-photo::after,
.sheet-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 45%);
}
.card-body {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px;
  flex: 1;
}
.card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.card-price {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--tint);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}
.card-more {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
  transition: background 0.2s, transform 0.25s var(--ease);
}
.card-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Quiet tax note under the price ("Tax included" / "+ tax"). Muted color passes contrast. */
.price-note {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* "3 left" tag. Stays hidden unless an item has a quantity above 1 (none do today). */
.qty-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.qty-tag[hidden] { display: none; }

/* Sold items: calm, flat, clearly not for sale. Tilted "Found a home" stamp, no Buy button. */
.card.is-sold {
  box-shadow: none;
  background: repeating-linear-gradient(135deg, #fffaf5 0 8px, #fff4ec 8px 16px);
  border: 1.5px dashed #e3d2c8;
}
.is-sold .art,
.is-sold .card-photo img { filter: saturate(0.25); opacity: 0.6; }
.is-sold .card-name,
.is-sold .card-price { color: var(--muted); }
.is-sold .card-price { background: transparent; padding-left: 0; }
.sold-note {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.found-tag {
  position: absolute;
  right: 8px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px 6px 9px;
  border: 1.5px solid var(--accent-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: rotate(-6deg);
  box-shadow: 0 1px 3px rgba(43, 35, 64, 0.12);
}
.found-tag svg { width: 12px; height: 12px; fill: var(--accent-soft); }

/* Loading cards: shimmer while the list loads. */
.skeleton {
  list-style: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sk-photo,
.sk-line {
  background: linear-gradient(100deg, #f6e9e2 30%, #fff6f0 50%, #f6e9e2 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}
.sk-photo { aspect-ratio: 1 / 1; }
.sk-body { display: grid; gap: 10px; padding: 14px 12px 16px; }
.sk-line { height: 12px; width: 80%; border-radius: 6px; }
.sk-line.s { width: 40%; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* Hover effects only where a mouse exists (not phones). */
@media (hover: hover) {
  .card:not(.is-sold):hover {
    box-shadow: 0 2px 4px rgba(43, 35, 64, 0.08), 0 18px 36px rgba(201, 58, 99, 0.18);
    transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  }
  .card:not(.is-sold):hover::after { opacity: 1; }
  .card:hover .art,
  .card:hover .card-photo img { transform: scale(1.05); }
  .card:hover .card-more { background: var(--accent); color: #fff; transform: translateX(2px); }
}

/* Buy button: 52px tall so it's easy to tap, with a slow shimmer sweep. */
.buy-button {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4446d, #c93a63 55%, #b8305a);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(201, 58, 99, 0.3);
  transition: background 0.15s, transform 0.12s var(--ease), box-shadow 0.2s;
}
.buy-button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: sweep 3.6s ease-in-out 1s infinite;
}
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.buy-button:active { transform: scale(0.97); }
@media (hover: hover) { .buy-button:hover { background: var(--accent-dark); } }

/* Tiny hearts that fly out when Buy is tapped. */
.burst {
  position: fixed;
  z-index: 40;
  width: 16px;
  height: 16px;
  fill: var(--accent-soft);
  pointer-events: none;
  animation: pop 0.8s ease-out forwards;
}
@keyframes pop {
  from { opacity: 1; transform: translate(0, 0) scale(0.6); }
  to { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.2) rotate(40deg); }
}

/* Friendly error box if the list can't load. */
.load-error {
  max-width: 320px;
  margin: 8px auto 0;
  text-align: center;
  color: var(--muted);
}

.notice {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Detail sheet ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(43, 35, 64, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.scrim.on { opacity: 1; }
/* On phones the sheet slides up from the bottom. */
.sheet {
  position: fixed;
  z-index: 21;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #fff3f6 0, var(--bg) 220px);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 40px rgba(43, 35, 64, 0.25);
  transform: translateY(105%);
  transition: transform 0.38s var(--ease);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.sheet.on { transform: none; }
.sheet-grab {
  display: block;
  width: 44px;
  height: 5px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: #e0d0c6;
}
.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(43, 35, 64, 0.18);
  cursor: pointer;
  transition: transform 0.15s;
}
.sheet-close:active { transform: scale(0.92); }
.sheet-close svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.sheet-photo {
  position: relative;
  width: calc(100% - 32px);
  max-height: 52dvh;
  margin: 10px 16px 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background: var(--tint);
  box-shadow: 0 14px 30px rgba(43, 35, 64, 0.2);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.sheet-photo img,
.sheet-photo .art { transition: none; }
.sheet.on .sheet-photo { animation: bob 5s ease-in-out 0.6s infinite; }
@keyframes bob { 50% { translate: 0 -5px; } }
.sheet-body { padding: 18px 20px 4px; }
.sheet-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.sheet-price {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-dark); /* darker pink so it passes contrast on cream */
}
.sheet-price .price-note { display: inline; margin: 0 0 0 6px; font-family: var(--font-body); font-size: 0.8rem; }
.sheet-desc { margin: 12px 0 0; color: var(--muted); }
.sheet-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.82rem;
  font-weight: 600;
}
.sheet-meta[hidden] { display: none; }
.sheet-meta svg { width: 13px; height: 13px; fill: var(--accent-soft); }
.sheet-body .qty-tag { margin: 12px 8px 0 0; padding: 6px 12px; font-size: 0.82rem; }
.sheet-actions { padding: 18px 20px 4px; }
.buy-note { margin: 10px 0 0; text-align: center; font-size: 0.82rem; color: var(--muted); }
.sold-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border-radius: 999px;
  background: var(--tint);
  font-weight: 600;
}
.sold-panel svg { width: 14px; height: 14px; fill: var(--accent-soft); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1080px;
  margin: 48px auto 0;
  padding: 32px 16px 44px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: -43px auto 18px;
  padding: 0 10px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 88C20 66 8 50 14 34c6-15 26-17 36-3 10-14 30-12 36 3 6 16-6 32-36 54z' fill='%23e8507a'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-sizing: content-box;
}
.site-footer p { margin: 0 0 6px; }
.footer-contact {
  color: var(--text);
  font-weight: 600;
}
.site-footer .footer-credit { margin-top: 14px; font-size: 0.82rem; }
.footer-credit a {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
  /* Bigger tap area without changing how it looks. */
  display: inline-block;
  padding: 10px 4px;
  margin: -10px 0;
}

/* Respect people who turn off animations on their device: nothing moves, everything still works. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .sk-photo, .sk-line { background: #f6e9e2; }
  .glow, .spark { display: none; }
  .card, .sheet-photo { transform: none !important; }
}

/* ---------- Tablets: 3 columns, sheet becomes a centered card ---------- */
@media (min-width: 640px) {
  .welcome { padding: 52px 16px 30px; }
  .shop-name { font-size: 2.9rem; }
  .shop-name-owner { font-size: 1.6rem; }
  .how-to-buy { padding: 18px 24px 20px; }
  .steps { gap: 16px; }
  .step {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: 10px;
    font-size: 0.95rem;
  }
  .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .catalog-heading .section-label { font-size: 1.75rem; }
  main { padding-bottom: 16px; }

  .sheet {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(440px, 92vw);
    max-height: 90dvh;
    border-radius: 26px;
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
    transition: transform 0.35s var(--ease), opacity 0.25s ease;
    padding-bottom: 20px;
  }
  .sheet.on { opacity: 1; transform: translate(-50%, -50%); }
  .sheet-grab { display: none; }
  .sheet-photo { margin-top: 16px; }
}

/* ---------- Desktops: 4 columns ---------- */
@media (min-width: 960px) {
  .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
}

/* Sold item open in the sheet: photo a little quieter, like the card. */
.sheet.is-sold .sheet-photo img,
.sheet.is-sold .sheet-photo .art { filter: saturate(0.35); opacity: 0.8; }
.sheet-photo .found-tag { right: 12px; bottom: 14px; font-size: 0.85rem; }
