/* Load more button */
:root {
  --fondo: #ffffff;
  --testo: #17161a;             /* the ink of titles and the pill */
  --tenue: #8b8992;             /* prices and the count */
  --filo: rgba(23, 22, 26, 0.09);  /* hairlines */
  --scheletro: #f1f0ee;         /* the skeleton blocks */
  --luce: rgba(255, 255, 255, 0.85); /* the shimmer on the skeletons */
  --accento: #c65f37;           /* the one accent: the clay of the progress line */
  --pill: #17161a;              /* the pill */
  --pill-testo: #fbfaf8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(13px, min(1.9vw, 3.1vh), 18px); }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.stage { height: 100vh; display: grid; place-items: center; padding: 3vmin; }
.feed { width: min(36rem, 92vw); display: grid; gap: 1.1rem; }

/* ---- the list: a window that the grid glides inside ---- */
.view {
  position: relative; overflow: hidden;
  height: var(--vh, 22rem);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 1.2rem, #000 calc(100% - 1.2rem), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 1.2rem, #000 calc(100% - 1.2rem), transparent 100%);
}
.grid {
  list-style: none; display: grid; gap: var(--gap, .9rem);
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  padding: 1.2rem 0;
}
.card { position: relative; outline: none; border-radius: .9rem; }
.card:focus-visible { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--testo); }
.card__glaze {
  position: relative; aspect-ratio: 5 / 4; border-radius: .9rem; overflow: hidden;
  background: var(--g, #ddd);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}
/* the glaze: a soft pool of light and a darker rim, like a fired surface */
.card__glaze::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 32% 26%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 62%),
    radial-gradient(120% 90% at 70% 110%, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0) 60%);
}
.card__glaze::after {
  content: ""; position: absolute; left: 50%; top: 54%; width: 34%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%), var(--g2, rgba(0,0,0,.12));
  box-shadow: 0 .5rem 1rem -.4rem rgba(0, 0, 0, .25);
}
.card__meta { display: flex; justify-content: space-between; gap: .4rem; padding: .55rem .15rem 0; font-size: .78rem; line-height: 1.25; }
.card__title { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__price { color: var(--tenue); font-variant-numeric: lining-nums; }

/* skeleton: the same card, empty, with a light passing */
.card__skel { position: absolute; inset: 0; pointer-events: none; }
.skel__block { aspect-ratio: 5 / 4; border-radius: .9rem; background: var(--scheletro); overflow: hidden; position: relative; }
.skel__row { display: flex; justify-content: space-between; padding: .62rem .15rem 0; }
.skel__bar { height: .55rem; border-radius: 99px; background: var(--scheletro); position: relative; overflow: hidden; }
.skel__bar:first-child { width: 58%; }
.skel__bar:last-child { width: 18%; }
.shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, var(--luce) 50%, transparent 80%); transform: translateX(-100%); }

/* ---- the foot: count, hairline, pill ---- */
.foot { display: grid; justify-items: center; gap: .7rem; }
.count { display: flex; align-items: baseline; gap: .32em; font-size: .8rem; color: var(--tenue); }
.count b { font-weight: 560; color: var(--testo); }
.num { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; vertical-align: bottom; color: var(--testo); font-weight: 560; font-variant-numeric: lining-nums; }
.num__in { display: inline-block; }
.track { width: min(9rem, 40vw); height: 2px; border-radius: 2px; background: var(--filo); overflow: hidden; }
.track__fill { display: block; height: 100%; width: 100%; background: var(--accento); transform-origin: 0 50%; transform: scaleX(.25); border-radius: inherit; }

.action { position: relative; height: 60px; display: grid; place-items: center; margin-top: .2rem; }
.pill {
  position: relative; height: 60px; padding: 0 1.9rem 0 2.1rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--pill-testo); isolation: isolate; outline: none; font-size: .98rem; font-weight: 560;
}
.pill__bg { position: absolute; inset: 0; border-radius: inherit; z-index: -2; background: linear-gradient(180deg, #2a2930, var(--pill)); box-shadow: 0 10px 24px -12px rgba(23, 22, 26, .55), inset 0 1px 0 rgba(255, 255, 255, .12); }
.pill__light { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -1; pointer-events: none; }
.pill__light span { position: absolute; top: 0; bottom: 0; width: 45%; left: 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255, 244, 236, .3), rgba(255,255,255,0)); transform: translateX(-120%); opacity: 0; }
.pill:focus-visible .pill__bg { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--testo); }
.pill__label { display: block; height: 1.3em; overflow: hidden; font-variation-settings: 'wdth' 100; }
.roll { display: flex; flex-direction: column; }
.roll > span { height: 1.3em; line-height: 1.3em; white-space: nowrap; text-align: center; }
.pill__arrow { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .8rem; pointer-events: none; }
.done__line { height: 1px; width: 3.2rem; background: var(--testo); opacity: .35; transform-origin: 100% 50%; transform: scaleX(0); }
.done__line--r { transform-origin: 0 50%; }
.done__text { font-size: .86rem; color: var(--tenue); opacity: 0; white-space: nowrap; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
