@font-face {
  font-family: "Kalameh";
  src: url("../fonts/Kalameh-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kalameh";
  src: url("../fonts/Kalameh-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kalameh";
  src: url("../fonts/Kalameh-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kalameh";
  src: url("../fonts/Kalameh-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kalameh";
  src: url("../fonts/Kalameh-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kalameh";
  src: url("../fonts/Kalameh-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   The campaign page in Yalda's design system (/ui/yalda.css):
   white cards on the cream page, crimson as the one strong colour,
   soft tints, rounded corners, a floating glass navigation.
   ========================================================= */
body.theme-yalda {
  --page-max: 1288px; /* the glass top bar lines up with the sections below */

  --bs-body-font-family: var(--font-sans);
  --bs-body-line-height: 1.7;
  --bs-body-color: var(--foreground);
  --bs-body-bg: var(--background);
  --bs-link-color-rgb: 155, 27, 48;
  --bs-link-hover-color-rgb: 126, 22, 39;

  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

.container-xxl {
  --bs-gutter-x: 2rem;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* =========================================================
   Banner slider
   The slide in view is the track; its neighbours sit beside it, one slide
   width plus --gap away, and show at the sides as far as --peek allows.
   Sizes come from the slider's own width (percent margins), so nothing
   depends on container queries.
   ========================================================= */
/* on a phone 16px under the header, so the slider starts as far below the logo (26px) as the
   first section of the club and the cart pages does. Below it, as much as a section has
   (.y-section): the slider stands as far from the first section as every section from the next. */
.y-hero {
  padding-top: 16px;
  padding-bottom: 16px;
}
@media (min-width: 768px) {
  .y-hero {
    padding-top: 20px;
  }
}
@media (min-width: 992px) {
  .y-hero {
    padding-bottom: 24px;
  }
}

.y-slider {
  /* on a phone the slider runs to the screen's edges; the banner in view lines up
     with the sections below (16px in), and the neighbours show in that margin */
  --peek: 16px;
  --gap: 6px;
  --ratio: 16 / 9;
  --slide-radius: var(--radius-xl);
  position: relative;
  width: 100%;
  margin-inline: auto;
  padding-block: 4px 8px;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.y-slider__track {
  position: relative;
  margin-inline: var(--peek);
  aspect-ratio: var(--ratio);
}

.y-slide {
  position: absolute;
  inset: 0;
  border-radius: var(--slide-radius);
  overflow: hidden;
  background: var(--muted);
  box-shadow: var(--shadow-card);
  will-change: transform;
  /* Safari clips transformed children to the radius only with this */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
/* until the script has placed them, only the first slide shows */
.y-slide:not(:first-child) {
  visibility: hidden;
}
.y-slide a {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;
}
.y-slide img {
  display: block;
  width: 100%;
  height: 100%;
  /* the banners' plain ends are trimmed; their content is in the middle */
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}

.y-slider__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgb(43 26 29 / 0.3);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transform: translateX(-50%);
}
.y-dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.65);
  cursor: pointer;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}
.y-dot::after {
  content: "";
  position: absolute;
  inset: -8px -4px;
}
.y-dot.active {
  width: 20px;
  background: #fff;
}

/* arrows: in the middle of each peeking neighbour, shown on a desktop only */
.y-slider__nav {
  position: absolute;
  inset: 4px 0 8px;
  pointer-events: none;
}
.y-arrow {
  position: absolute;
  top: 50%;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.96);
  color: var(--foreground);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.y-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
}
.y-arrow:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}
.y-arrow:focus-visible,
.y-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(227 160 171 / 0.7);
}
/* right to left: the previous slide is on the right */
.y-arrow--prev {
  right: calc((var(--peek) - var(--gap)) / 2 - 22px);
}
.y-arrow--next {
  left: calc((var(--peek) - var(--gap)) / 2 - 22px);
}

@media (min-width: 576px) {
  /* the slider's outer edges line up with the sections below (.container-xxl: 16px in from
     each side, and from 1400px up 1320px at most including that padding) */
  .y-slider {
    width: calc(100% - 32px);
    --peek: 36px;
    --gap: 12px;
    --ratio: 2.5;
  }
}

@media (min-width: 1400px) {
  .y-slider {
    width: 1288px;
  }
}

@media (min-width: 992px) {
  /* the same width as the sections below, with a neighbour peeking in on each side */
  .y-slider {
    --peek: 11.8%;
    --gap: 24px;
    --ratio: 2.6;
    --slide-radius: var(--radius-2xl);
  }
  .y-arrow {
    display: grid;
  }
  .y-slider__dots {
    bottom: 14px;
    gap: 7px;
    padding: 6px 10px;
  }
  .y-dot {
    width: 8px;
    height: 8px;
  }
  .y-dot.active {
    width: 24px;
  }
}

/* =========================================================
   Sections
   ========================================================= */
.y-section {
  padding-block: 16px;
}
@media (min-width: 992px) {
  .y-section {
    padding-block: 24px;
  }
}

/* every section's heading, the same everywhere: the title in the page's ink by a short accent bar
   (the section's colour: pomegranate, or the gift boxes' blue inside their box), and under it, if
   there is one, a quiet line */
.y-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin-bottom: 16px;
}
.y-title__text {
  position: relative;
  margin: 0;
  padding-inline-start: 14px;
  color: var(--foreground);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
}
.y-title__text::before {
  content: "";
  position: absolute;
  inset-block: 0.28em;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--primary);
}
.y-title__desc {
  margin: 0;
  padding-inline-start: 14px;
  color: var(--muted-foreground);
  font-size: 13.5px;
  line-height: 1.7;
}
@media (min-width: 768px) {
  .y-title__text {
    font-size: 22px;
  }
  .y-title__desc {
    font-size: 14px;
  }
}
@media (min-width: 992px) {
  .y-title {
    margin-bottom: 20px;
  }
  .y-title__text {
    font-size: 24px;
  }
}

/* a product goes into the cart with the + on its card (/ui/cart.js, /ui/shop.css) */

/* ===== Our offer: the bundles, a row in a box of gold ======
   The box is the collections' box (.y-coll) in Yalda's gold: its tint and edges, the title's
   bar, the arrows, the +, the cards' grounds. The row scrolls as the page does, nothing more: no
   timer, no snapping. 3.5 cards across a computer, 2.5 a tablet, 1.5 a phone; the row starts at
   the box's padding and runs off its far edge, where the half card shows there is more. */
/* (.y-coll comes later in this file: twice the class, so these win over its own) */
.y-coll.y-coll--gold {
  --tint: #f6e7b8;
  --edge: #ead7a1;
  --primary: #8f6b0c;
  --primary-hover: #765809;
  --primary-soft: #fbf3d9;
  --ring: #e3c76a;
  --accent: #fcf6e4;
  --accent-foreground: #5c4507;
  --muted: #fbf5e4;
  --border: #f0e3bd;
  --input: #e9d6a0;
  position: relative;
  background:
    radial-gradient(120% 140px at 85% 0, rgb(255 236 170 / 0.75), rgb(255 255 255 / 0) 70%),
    linear-gradient(180deg, var(--tint) 0, rgb(255 255 255 / 0) 190px),
    var(--card);
  box-shadow:
    0 1px 3px rgb(143 107 12 / 0.08),
    0 18px 40px -28px rgb(143 107 12 / 0.45);
}
.y-scroll {
  --per: 1.5;
  --gap: 12px;
  container-type: inline-size;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 2px 0 16px;
  padding-inline-start: var(--pad);
  /* no scrollbar: the half card, the arrows, the finger and the mouse's drag move it */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.y-scroll::-webkit-scrollbar {
  display: none;
}
.y-scroll:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -2px;
}
/* a mouse drags the row; while it does, the cards take no clicks */
@media (hover: hover) and (pointer: fine) {
  .y-scroll {
    cursor: grab;
  }
  .y-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
  }
  .y-scroll.is-dragging .y-scroll__track > * {
    pointer-events: none;
  }
}
/* The track is as wide as the row; the cards run on past its far end and the row scrolls over
   them. (Not width: max-content: Safari measures that from the cards' text laid out on one line,
   not from their widths, and leaves the row an empty stretch to scroll on after its last card.) */
.y-scroll__track {
  display: flex;
  gap: var(--gap);
}
/* the row's far end: as much room after the last card as before the first (the gap before it
   taken back, so it is never nothing wide, which would add no room) */
.y-scroll__track::after {
  content: "";
  flex: 0 0 var(--pad);
  margin-inline-start: calc(var(--gap) * -1);
}
/* a card's width: what of the row is in view (100cqi: the row's width less its padding), less
   the gaps in view, by the cards in view */
.y-scroll__track > * {
  flex: 0 0 calc((100cqi - var(--gap) * (var(--per) - 0.5)) / var(--per));
  min-width: 0;
}
@media (min-width: 576px) {
  .y-scroll {
    --per: 2.5;
    --gap: 14px;
  }
}
@media (min-width: 992px) {
  .y-scroll {
    --per: 3.5;
    --gap: 16px;
  }
}
/* So few bundles that they all fit (as many as the whole cards the row shows, or fewer: main.js
   sets is-fit and --fit, the whole cards in view): no scrolling, no half card, no arrows; the
   cards as wide as when the row scrolls, side by side in the middle of the box. */
.y-scroll.is-fit {
  overflow: hidden;
  padding-inline: var(--pad);
  cursor: auto;
}
.y-scroll.is-fit .y-scroll__track {
  justify-content: center;
}
.y-scroll.is-fit .y-scroll__track::after {
  content: none;
}
.y-scroll.is-fit .y-scroll__track > * {
  flex-basis: calc((100cqi - var(--gap) * (var(--fit) - 1)) / var(--fit));
}
.y-coll.is-fit .y-rail-nav {
  display: none;
}
/* the gift boxes' row: smaller cards side by side, split by thin lines (.m-card), no gaps */
.y-scroll--mini {
  --per: 2.5;
  --gap: 0px;
  padding-bottom: 12px;
}
@media (min-width: 576px) {
  .y-scroll--mini {
    --per: 3.5;
  }
}
@media (min-width: 768px) {
  .y-scroll--mini {
    --per: 4.5;
  }
}
@media (min-width: 992px) {
  .y-scroll--mini {
    --per: 5.5;
  }
}
@media (min-width: 1200px) {
  .y-scroll--mini {
    --per: 6.5;
  }
}

.b-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
  border-color: var(--border);
  box-shadow: 0 6px 18px -14px rgb(143 107 12 / 0.55);
  -webkit-user-drag: none;
}
.b-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* the products' photos are on white: so is their ground, with a thin line round it */
  border: 1px solid var(--border);
  background: #fff;
}
.b-card__media img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  pointer-events: none;
}
.b-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline: 4px;
}

.b-card__price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.b-card__price,
.m-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--foreground);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.b-card__price {
  font-size: 20px;
  line-height: 1.4;
}
.price-unit {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}
.b-card__name {
  margin: 0;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}
/* as on Sabad: what the bundle holds, or the description written for it in the panel */
.b-card__summary {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.8;
}
@media (min-width: 992px) {
  .b-card {
    padding: 12px;
  }
  .b-card__price {
    font-size: 24px;
  }
  .b-card__name {
    font-size: 16px;
  }
}

/* ===== The competition ===== */
.y-club {
  display: grid;
  gap: 20px;
  padding: 20px;
}
@media (min-width: 768px) {
  .y-club {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 32px;
    padding: 28px;
  }
}
.y-club__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
/* the game's logo (its picture holds the name and its line, cut to the drawing) */
.y-club__logo {
  width: min(100%, 300px);
  margin: 0 0 6px;
  line-height: 0;
}
.y-club__logo img {
  display: block;
  width: 100%;
  height: auto;
}
/* the game's line, as the club page has it under the same logo (.c-lead), then the button */
.y-club__ask {
  margin: 0 0 8px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
}
@media (min-width: 992px) {
  .y-club__logo {
    width: 380px;
  }
  .y-club__ask {
    font-size: 16px;
  }
}
.y-club__board-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
/* «جدول کامل»: the first three are shown here, the whole table is on the game page */
.y-club__all {
  margin-inline-start: auto;
  font-size: 13px;
}
.y-club__ranks > li {
  min-height: 52px;
}
/* the medal of the first three: .ui-rank in /ui/yalda.css */
.y-club__n {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.y-club__who {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.y-club__score {
  color: var(--foreground);
  font-weight: 800;
}

/* ===== The scale: one picture on the page itself ======
   See-through, no card, cut to its drawing (1040 × 673): the salty bag's middle is at x 180, the
   sweet bag's at 857, each 32.5% of the picture's width from its middle. At 78% of the width the
   cards' rows take (at most 700 of their 900px), each bag's middle is over its pair's: on a phone,
   where the pairs are each half the row, and from 768px up, where they are 40px apart. */
.y-scale {
  display: block;
  width: min(78%, 700px);
  height: auto;
  margin: 0 auto;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* the four mixes under the scale: the sweet pair under the sweet bag, the salty pair under the
   salty one (see .y-scale), the pairs further apart than their cards. On a phone each pair one
   card under the other. */
/* the nuts' cards edged in the pomegranate's pink: the card, its picture and «+ n −» (not the
   theme's cream border, which reads gold here) */
.y-nuts {
  --edge: #ebc8cf;
  --border: #f2d9de;
}
.y-nuts__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 900px;
  margin: 20px auto 0;
}
.y-nuts__group {
  min-width: 0;
}
.y-nuts__cards {
  display: grid;
  gap: 10px;
}
.n-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: 0 6px 18px -12px rgb(155 27 48 / 0.35);
}
.n-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #fff;
}
.n-card__media img {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  object-fit: contain;
}
.is-out .n-card__media img {
  opacity: 0.55;
  filter: grayscale(0.5);
}
/* two lines' room on a phone, where a long name wraps: the two pairs' cards stay level */
.n-card__name {
  min-height: 3.4em;
  margin: 0;
  padding-inline: 2px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}
.n-card__buy {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-inline: 2px;
}
.n-card__price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.n-card .price-unit {
  font-size: 11px;
}
@media (min-width: 768px) {
  .y-nuts__groups {
    gap: 40px;
    margin-top: 24px;
  }
  .y-nuts__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .n-card__name {
    min-height: 0;
  }
}
@media (min-width: 992px) {
  .n-card {
    padding: 10px 10px 14px;
  }
  .n-card__name {
    font-size: 15px;
  }
  .n-card__price {
    font-size: 16px;
  }
}

/* ===== A collections box: the gift boxes ======
   In the manner of a «deals» box: a soft tint at the top fading to white, the title and the
   arrows, and the products side by side, split by thin lines and running off the box's far side
   (the one beyond it peeks in, so the row reads as one to slide). */
.y-coll {
  --tint: #f8e1e5;
  --edge: #efd3d8;
  --pad: 14px;
  overflow: hidden;
  padding: var(--pad) 0 4px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-2xl);
  background:
    linear-gradient(180deg, var(--tint) 0, rgb(255 255 255 / 0) 170px),
    var(--card);
  box-shadow: var(--shadow-card);
}
.y-coll__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-inline: var(--pad);
}
/* the section's heading (.y-title) on the box's first line, the arrows across from it */
.y-coll__head .y-title {
  margin-bottom: 0;
}

/* ===== The gift boxes: the same box, in the blue of the boxes' banner ======
   The theme's own colours, set again inside this box only: its tint and edges, the title, the +
   and the cart's «+ n −», the arrows and the cards' grounds all turn navy here, nowhere else. */
.y-coll--blue {
  --tint: #dbe4fa;
  --edge: #c7d3f2;
  --primary: #1f3a93;
  --primary-hover: #182e78;
  --primary-soft: #e7edfc;
  --ring: #9db1e8;
  --accent: #edf1fd;
  --accent-foreground: #142a6b;
  --muted: #eef2fb;
  --border: #dde4f4;
  --input: #cdd8f1;
}
/* the arrows on the title's line, the row under it */
.y-coll__head--solo {
  margin-bottom: 14px;
}

/* a narrow phone (360px): a little tighter */
@media (max-width: 379.98px) {
  .y-coll__head {
    gap: 8px;
  }
}

/* the arrows: from 768px up; a phone slides the row with the finger */
.y-rail-nav {
  display: none;
  gap: 8px;
  flex-shrink: 0;
}
.y-rail-nav .ui-btn--icon {
  width: 36px;
  height: 36px;
}
.y-rail-btn svg {
  width: 18px;
  height: 18px;
}
@media (min-width: 768px) {
  .y-coll {
    --pad: 20px;
    padding-top: 18px;
  }
  .y-coll__head--solo {
    margin-bottom: 18px;
  }
  .y-rail-nav {
    display: flex;
  }
}

/* a card: the picture, the name, then the discount and old price over the price */
.m-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 12px;
  border-inline-end: 1px solid var(--border);
  -webkit-user-drag: none;
}
.m-card__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.m-card__media img {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  object-fit: contain;
  pointer-events: none;
}
/* no line after the row's last card */
.y-scroll__track > .m-card:last-child {
  border-inline-end: 0;
}

.m-card__name {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 0;
  overflow: hidden;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* a gift box's size, quiet under its name */
.m-card__size {
  margin: -4px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.6;
}
.m-card__buy {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}
.m-card__price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.m-card .price-unit {
  font-size: 11px;
}
@media (min-width: 992px) {
  .m-card {
    padding-inline: 14px;
  }
  .m-card__name {
    font-size: 14px;
  }
  .m-card__price {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .y-dot,
  .y-arrow {
    transition: none;
  }
}

/* ===== A product's picture, big ======
   Every card's picture is a button over the whole picture (the + above it, a button of its own);
   it opens the picture in a box in the middle of the screen, on white as on its card, with the
   product's name under it, over the page darkened (main.js, initZoom). */
.media-zoom {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.media-zoom:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: -3px;
}
.media-zoom img {
  transition: transform 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .media-zoom:hover img {
    transform: scale(1.04);
  }
  .y-scroll.is-dragging .media-zoom {
    cursor: grabbing;
  }
}
.y-zoom {
  width: min(92vw, 560px);
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-2xl);
  background: #fff;
  color: var(--foreground);
  box-shadow: 0 30px 80px -24px rgb(20 6 9 / 0.6);
}
.y-zoom:focus {
  outline: none;
}
.y-zoom::backdrop {
  background: rgb(26 9 13 / 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.y-zoom[open] {
  animation: y-zoom-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.y-zoom[open]::backdrop {
  animation: y-zoom-fade 0.24s ease-out;
}
.y-zoom__figure {
  margin: 0;
}
/* as big as the box, and short enough that the name under it stays on the screen */
.y-zoom__img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  padding: 6%;
  object-fit: contain;
}
/* the line over the name, and × with its edge and shadow: in the colour of the picture's
   section (--primary, set on the box as it opens: main.js, initZoom); var(--border) where the
   browser cannot mix colours */
.y-zoom__name {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  border-top: 1px solid color-mix(in srgb, var(--primary) 30%, #fff);
  color: var(--foreground);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.7;
  text-align: center;
}
.y-zoom__close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, #fff);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: var(--primary);
  box-shadow: 0 2px 8px -2px rgb(43 26 29 / 0.25);
  box-shadow: 0 3px 10px -3px color-mix(in srgb, var(--primary) 60%, transparent);
  cursor: pointer;
}
.y-zoom__close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.y-zoom__close:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
/* the page under the box stays still */
html.is-zoom-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}
@keyframes y-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}
@keyframes y-zoom-fade {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .media-zoom img {
    transition: none;
  }
  .y-zoom[open],
  .y-zoom[open]::backdrop {
    animation: none;
  }
}

/* ===== A banner's way to its section ======
   The nuts' and the boxes' banners lead to their sections (#nuts, #boxes): the page scrolls
   there smoothly (at once for a visitor who asks for less motion), and stops with the section's
   title clear of the top bar on a computer. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
#nuts,
#boxes {
  scroll-margin-top: 16px;
}
@media (min-width: 768px) {
  #nuts,
  #boxes {
    scroll-margin-top: 92px;
  }
}
