/* ================================================================
   Tornell Family Sale — public design system
   "Sunny neighborhood yard-sale poster": cream paper + warm ink +
   one coral accent. Fraunces (display) + Nunito Sans (body).
   Dark mode = deep warm brown, never gray-blue.
   ================================================================ */

/* ---------- Tokens ---------- */
:root {
  /* paper + ink */
  --paper: #FBF6EE;
  --paper-2: #F3EADC;          /* deeper cream: wells, thumbnails, strips */
  --card: #FFFCF6;
  --ink: #3B3128;
  --ink-soft: #6E6055;         /* secondary text — 5.6:1 on paper */
  --line: #E7DBC8;
  --line-strong: #D6C6AC;

  /* the one accent, two intensities:
     --coral   = bright, LARGE text + decorative only (3.3:1 on cream)
     --coral-deep = darkened for small text, links, button bg (5:1+) */
  --coral: #E4674A;
  --coral-deep: #B4472E;
  --coral-soft: #F9E2DA;

  --btn-bg: var(--coral-deep);
  --btn-ink: #FFFDF8;

  /* swing tag */
  --tag-paper: #FFF8EB;
  --tag-edge: #DCC9A8;
  --tag-string: #B49B72;

  /* stamps + ribbons */
  --stamp: #B33A24;
  --ribbon-bg: #F5CE6E;
  --ribbon-ink: #4A3822;

  /* pastel category ramp (chip + placeholder tints) */
  --chip-baby: #F8DFE0;
  --chip-toys: #F9E4C6;
  --chip-clothes: #F1EBC6;
  --chip-tools: #DDEBD7;
  --chip-furniture: #D8E8E1;
  --chip-kitchen: #DBE4F0;
  --chip-hobby: #EADFF0;
  --chip-other: #EAE3D6;

  --shadow-card: 0 1px 2px rgba(59, 49, 40, 0.05), 0 10px 24px -12px rgba(59, 49, 40, 0.25);
  --shadow-card-hover: 0 2px 4px rgba(59, 49, 40, 0.06), 0 16px 32px -12px rgba(59, 49, 40, 0.3);
  --radius: 14px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #221A13;
    --paper-2: #2C231A;
    --card: #2B221A;
    --ink: #F1E7D8;
    --ink-soft: #BCA995;
    --line: #453729;
    --line-strong: #5A4936;

    --coral: #F0805F;
    --coral-deep: #F0805F;       /* links: 5.9:1 on dark paper */
    --coral-soft: #4A2E24;

    --btn-bg: #E4674A;
    --btn-ink: #2A1B12;          /* dark ink on coral: 4.5:1 */

    --tag-paper: #33281D;
    --tag-edge: #5A4936;
    --tag-string: #8A7455;

    --stamp: #F0805F;
    --ribbon-bg: #8A6A2C;
    --ribbon-ink: #FBF1DC;

    --chip-baby: #4A3236;
    --chip-toys: #4A3A24;
    --chip-clothes: #45402A;
    --chip-tools: #32402E;
    --chip-furniture: #2E3E39;
    --chip-kitchen: #303845;
    --chip-hobby: #3E3345;
    --chip-other: #3C342A;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 32px -12px rgba(0, 0, 0, 0.65);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* paper grain — tiny turbulence tile, very quiet */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

img,
video {
  max-width: 100%;
}

a {
  color: var(--coral-deep);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--coral-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Masthead (the poster moment) ---------- */
.masthead {
  text-align: center;
  padding: 1.9rem 1rem 0.4rem;
}

.bunting {
  display: block;
  width: min(300px, 62vw);
  margin: 0 auto 0.55rem;
}

.brand-name {
  font-size: clamp(2.1rem, 7.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand-name a {
  color: inherit;
  text-decoration: none;
}

.brand-name .accent {
  color: var(--coral);
}

.tagline {
  margin: 0.55rem auto 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* mini masthead on detail pages */
.masthead-mini {
  padding: 1.1rem 1rem 0.2rem;
}

.masthead-mini .brand-name {
  font-size: 1.45rem;
}

.back-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ---------- Toolbar: chips + search ---------- */
.toolbar {
  margin: 1.4rem auto 1.6rem;
}

.chip-row {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.3rem 0.15rem 0.55rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line-strong);
  background: var(--chip-tint, var(--card));
  color: var(--ink);
  border-radius: 999px;
  padding: 0.34rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.chip .count {
  font-weight: 800;
  font-size: 0.74rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0.05rem 0.42rem;
}

@media (prefers-color-scheme: dark) {
  .chip .count {
    background: rgba(0, 0, 0, 0.28);
    color: var(--ink);
  }
}

.chip[aria-pressed="true"] {
  background: var(--coral-deep);
  border-color: var(--coral-deep);
  color: #fffdf8;
}

.chip[aria-pressed="true"] .count {
  background: rgba(255, 255, 255, 0.22);
  color: #fffdf8;
}

@media (prefers-color-scheme: dark) {
  .chip[aria-pressed="true"] {
    background: var(--coral);
    border-color: var(--coral);
    color: #2a1b12;
  }

  .chip[aria-pressed="true"] .count {
    background: rgba(0, 0, 0, 0.18);
    color: #2a1b12;
  }
}

.search-row {
  margin-top: 0.55rem;
}

.search-box {
  position: relative;
  max-width: 26rem;
}

.search-box input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
}

.search-box input::placeholder {
  color: var(--ink-soft);
  opacity: 0.85;
}

.search-box .search-glyph {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
  opacity: 0.75;
}

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 520px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.img-well {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  overflow: hidden;
}

.img-well img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* no-photo placeholder — pastel tint + big emoji, a little shy */
.ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: var(--chip-tint, var(--paper-2));
}

.ph .ph-emoji {
  font-size: 3rem;
  line-height: 1;
}

.ph .ph-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.cat-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  background: var(--chip-tint, var(--card));
  border: 1px solid rgba(59, 49, 40, 0.14);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(59, 49, 40, 0.14);
}

/* pending: "spoken for 🤞" banner across the photo's top-left */
.ribbon {
  position: absolute;
  top: 0.8rem;
  left: -0.5rem;
  background: var(--ribbon-bg);
  color: var(--ribbon-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.85rem 0.28rem 1rem;
  border-radius: 0 999px 999px 0;
  rotate: -2deg;
  box-shadow: 0 2px 6px rgba(59, 49, 40, 0.22);
}

.card-body {
  padding: 0.8rem 0.95rem 1rem;
}

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.card .meta {
  margin: 0.25rem 0 0.65rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Swing-tag price ---------- */
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--tag-paper);
  border: 1px solid var(--tag-edge);
  border-radius: 7px;
  padding: 0.18rem 0.7rem 0.22rem 1.45rem;
  margin-left: 0.55rem; /* room for the string tick */
  box-shadow: 0 1px 2px rgba(59, 49, 40, 0.12);
  rotate: -2.5deg;
  transform-origin: 0.85rem 50%;
}

/* punched hole */
.tag::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  translate: 0 -50%;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--tag-edge);
  box-shadow: inset 0 1px 1px rgba(59, 49, 40, 0.25);
}

/* string tick through the hole */
.tag::after {
  content: "";
  position: absolute;
  left: -0.42rem;
  top: 8%;
  width: 1.05rem;
  height: 0.55rem;
  border: 2px solid var(--tag-string);
  border-bottom: none;
  border-right: none;
  border-radius: 90% 0 0 0;
  rotate: -14deg;
}

.tag .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--coral-deep);
  white-space: nowrap;
}

.tag .price-ask {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--coral-deep);
  white-space: nowrap;
}

/* OBO — tiny rubber stamp on the tag */
.tag .obo {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  border-radius: 4px;
  padding: 0 0.24rem;
  rotate: 7deg;
  opacity: 0.85;
}

/* larger tag on the detail page */
.tag-lg {
  padding: 0.3rem 0.95rem 0.34rem 1.65rem;
  border-radius: 9px;
}

.tag-lg .price {
  font-size: 1.7rem;
  color: var(--coral);
}

.tag-lg .price-ask {
  font-size: 1.25rem;
}

@media (prefers-color-scheme: light) {
  /* bright coral is display-size only; keep 3:1+ by keeping it large */
  .tag-lg .price {
    color: var(--coral-deep);
  }
}

/* ---------- SOLD stamp ---------- */
.stamp-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.stamp {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 4px double var(--stamp);
  border-radius: 10px;
  padding: 0.08em 0.5em 0.12em 0.62em;
  rotate: -11deg;
  opacity: 0.9;
  background: color-mix(in srgb, var(--paper) 62%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--paper) 30%, transparent);
}

/* ---------- Sold strip (social proof) ---------- */
.sold-section {
  margin-top: 2.6rem;
}

.sold-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sold-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.sold-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sold-item a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink-soft);
  text-decoration: none;
  filter: grayscale(0.35);
}

.sold-item a:hover {
  color: var(--ink);
}

.sold-item .sold-emoji {
  flex: 0 0 auto;
}

.sold-item .sold-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sold-item .sold-date {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Empty / error states ---------- */
.state {
  text-align: center;
  padding: 3.2rem 1rem;
  color: var(--ink-soft);
}

.state .state-emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 0.6rem;
}

.state .state-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.state p {
  margin: 0.2rem 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 3rem 1rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.loading-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--coral);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-weight: 800;
  font-size: 1.02rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(59, 49, 40, 0.2);
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  translate: 0 1px;
}

.btn-quiet {
  background: transparent;
  color: var(--coral-deep);
  border: 1.5px solid var(--coral-deep);
  box-shadow: none;
}

/* ---------- Detail page ---------- */
.detail-wrap {
  width: min(760px, 100% - 2.5rem);
  padding-bottom: 3rem;
}

.detail-title {
  font-size: clamp(1.5rem, 5.4vw, 2.1rem);
  font-weight: 700;
  margin: 0.9rem 0 0.8rem;
  overflow-wrap: anywhere;
}

/* gallery — mobile: scroll-snap strip; desktop: main + thumbs */
.gallery {
  margin-top: 0.4rem;
}

.gallery-strip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.6rem;
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-strip::-webkit-scrollbar {
  display: none;
}

.gallery-strip .slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.gallery-strip .slide img,
.gallery-strip .slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-strip .slide video {
  object-fit: contain;
  background: #17110c;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.gallery-dots .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--line-strong);
  border: none;
  padding: 0;
  cursor: pointer;
}

.gallery-dots .dot[aria-current="true"] {
  background: var(--coral);
}

.gallery-main {
  display: none;
}

.gallery-thumbs {
  display: none;
}

@media (min-width: 720px) {
  .gallery-strip,
  .gallery-dots {
    display: none;
  }

  .gallery-main {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--paper-2);
    border-radius: var(--radius);
    overflow: hidden;
  }

  .gallery-main .frame {
    position: absolute;
    inset: 0;
  }

  .gallery-main img,
  .gallery-main video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .gallery-main video {
    object-fit: contain;
    background: #17110c;
  }

  .gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.65rem;
  }

  .gallery-thumbs .thumb {
    position: relative;
    width: 84px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: var(--paper-2);
    cursor: pointer;
  }

  .gallery-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .gallery-thumbs .thumb[aria-current="true"] {
    border-color: var(--coral);
  }

  .gallery-thumbs .thumb .play-glyph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    color: #fffdf8;
    background: rgba(23, 17, 12, 0.45);
  }
}

/* single-photo galleries: hide the strip chrome */
.gallery.single .gallery-dots,
.gallery.single .gallery-thumbs {
  display: none;
}

/* gallery media box — anchors the SOLD stamp / pending ribbon overlays */
.g-box {
  position: relative;
}

.g-box .stamp-wrap {
  z-index: 4;
}

.g-box .ribbon {
  z-index: 4;
}

.gallery-ph {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
}

/* detail meta row */
.detail-tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.3rem 0 0.4rem;
}

.fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--chip-tint, var(--paper-2));
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.24rem 0.75rem;
}

.detail-desc {
  margin: 1.1rem 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.detail-extra {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* sold notice on detail */
.sold-note {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

/* ---------- Interest form ---------- */
.interest {
  margin-top: 1.8rem;
}

.interest-form {
  margin-top: 1rem;
  padding: 1.1rem 1.15rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 0.85rem;
}

.interest-form h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 0.25rem;
}

.field label {
  font-size: 0.86rem;
  font-weight: 800;
}

.field .hint {
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0.55rem 0.8rem;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 4.6rem;
}

.offer-field .offer-input {
  position: relative;
  max-width: 11rem;
}

.offer-field .offer-input::before {
  content: "$";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  translate: 0 -50%;
  font-weight: 800;
  color: var(--ink-soft);
  pointer-events: none;
}

.offer-field input {
  padding-left: 1.7rem;
}

.form-note {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--coral-deep);
  margin: 0;
}

.form-success {
  margin-top: 1rem;
  padding: 1.3rem 1.2rem;
  border-radius: var(--radius);
  background: var(--coral-soft);
  border: 1px solid color-mix(in srgb, var(--coral) 40%, var(--line));
  text-align: center;
}

.form-success .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.25rem;
}

/* honeypot — off-screen, NOT display:none (bots skip display:none) */
.hp-wrap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 2.6rem 1rem 1.6rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- Motion (all opt-in via reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* staggered card fade-up on first paint */
  .grid .card {
    opacity: 0;
    translate: 0 14px;
    animation: card-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
  }

  @keyframes card-in {
    to {
      opacity: 1;
      translate: 0 0;
    }
  }

  .card {
    transition: box-shadow 0.25s ease, translate 0.25s ease;
  }

  .card:hover {
    translate: 0 -3px;
  }

  /* price-tag micro-swing, pivoting on the punched hole */
  .card:hover .tag {
    animation: tag-swing 1s ease-in-out;
  }

  @keyframes tag-swing {
    0% { rotate: -2.5deg; }
    28% { rotate: -7deg; }
    58% { rotate: 0.5deg; }
    82% { rotate: -4deg; }
    100% { rotate: -2.5deg; }
  }

  /* gallery crossfade (desktop main viewer) */
  .gallery-main .frame {
    transition: opacity 0.32s ease;
  }

  .gallery-main .frame.fading {
    opacity: 0;
  }

  .loading-dot {
    animation: bounce 0.9s ease-in-out infinite;
  }

  @keyframes bounce {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
  }

  .btn,
  .chip {
    transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  }
}
