/*
  Shop tab (#/shop): Unity ShopScreen.prefab, ShopHeroCard.prefab, ShopPackCard.prefab, ShopPassCard.prefab.
  Every number is a prefab number in canvas units, drawn as calc(N * unit):
    --u    one canvas unit (the page)                     banner, notice, shelves, headings
    --cu   one card unit (card internals)                 = --u on a phone, a little larger on a wide screen
    --hu   one hero unit: the hero's authored 1040 x 620 composition scaled to its slot (ShopHeroCardFitter)
  Phone (< 760 px) is the prefab. Wide (>= 760 px) is a deliberate composition: the whole panel scrolls,
  the hero lays its parts out in three columns and the shelves become card grids.
*/

.shop {
  --shop-ink: #1e2a44;
  --shop-blue: #1f5a99;
  --cu: var(--u);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* the prefab's Panel: 20u gutters, 20u under the hub header, 16u above the tab bar */
  /* --fold-trim: how far the panel stops short of this edge so that its bottom falls on a clean row (Shop.js useCleanFold) */
  padding: calc(20 * var(--u)) calc(20 * var(--u)) calc(16 * var(--u) + var(--fold-trim, 0px));
}

.shop-panel {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: calc(48 * var(--u));
  background: #f6f4f1;
  box-shadow: 0 0 calc(24 * var(--u)) rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.shop-body {
  flex: 1;
  min-height: 0;
}

.shop-content {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(24 * var(--u));
}

/* ---- Banner (HubTabBanner + the Shop's RightArt) --------------------------------------------------- */
.shop-banner {
  --bu: var(--u);
  position: relative;
  flex: none;
  height: calc(300 * var(--bu));
  background: #9ecceb;
  overflow: hidden;
}
.shop-banner__art {
  position: absolute;
  left: 0;
  bottom: calc(-72 * var(--bu));
  width: calc(1664 * var(--bu));
  height: calc(480 * var(--bu));
  max-width: none;
}
.shop-banner__chest {
  position: absolute;
  max-width: none;
  object-fit: contain;
}
.shop-banner__chest--gems {
  right: calc(270 * var(--bu));
  bottom: calc(30 * var(--bu));
  width: calc(286 * var(--bu));
  height: calc(166 * var(--bu));
}
.shop-banner__chest--tickets {
  right: calc(16 * var(--bu));
  bottom: calc(24 * var(--bu));
  width: calc(286 * var(--bu));
  height: calc(171 * var(--bu));
}
.shop-banner__title {
  --fs: calc(52 * var(--bu));
  position: absolute;
  left: calc(44 * var(--bu));
  top: calc(48 * var(--bu));
  width: calc(620 * var(--bu));
  height: calc(66 * var(--bu));
  line-height: calc(66 * var(--bu));
  font-weight: var(--w-black);
  letter-spacing: -0.01em;
  color: var(--shop-ink);
  text-transform: uppercase;
}
.shop-banner__subtitle {
  position: absolute;
  left: calc(46 * var(--bu));
  top: calc(118 * var(--bu));
  width: calc(52% - 46 * var(--bu));
  max-width: calc(410 * var(--bu));
  font-weight: var(--w-semibold);
  font-size: calc(27 * var(--bu));
  line-height: 1.2;
  color: var(--shop-blue);
}

/* ---- Notice ----------------------------------------------------------------------------------------- */
.shop-notice-wrap {
  flex: none;
  padding: 0 calc(24 * var(--u)) calc(10 * var(--u));
}
.shop-notice {
  margin: 0;
  min-height: calc(76 * var(--u));
  padding: calc(12 * var(--u)) calc(26 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(30 * var(--u));
  background: #ececef;
  color: #031c26;
  font-weight: var(--w-semibold);
  font-size: calc(26 * var(--u));
  line-height: 1.25;
  text-align: center;
}

/* ---- Fitted one-line labels (TMP auto-size): largest size is --fs, FitText moves --fit ---------------- */
.shop-fit {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: calc(var(--fit, 1) * var(--fs, 16px));
}

/* ---- Hero (ShopHeroCard) ------------------------------------------------------------------------------ */
.shop-hero-slot {
  container-type: inline-size;
  display: flex;
  justify-content: center;
}
.shop-hero {
  /* the authored composition scaled to the slot, never larger than authored */
  --hu: min(var(--u), calc(100cqw / 1040));
  --cu: var(--hu);
  position: relative;
  flex: none;
  width: calc(1040 * var(--hu));
  height: calc(620 * var(--hu));
  border-radius: calc(48 * var(--hu));
  background: #fff;
  box-shadow: 0 calc(12 * var(--hu)) calc(22 * var(--hu)) rgba(13, 26, 51, 0.12);
  overflow: hidden;
}
.shop-hero__frame {
  position: absolute;
  inset: calc(10 * var(--hu));
  background-size: 100% 100%;
  background-position: center;
}
.shop-hero__left,
.shop-hero__mid {
  display: contents;
}
.shop-hero__ribbon {
  position: absolute;
  left: calc(52 * var(--hu));
  top: calc(30 * var(--hu));
  width: calc(272 * var(--hu));
  height: calc(50 * var(--hu));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(14 * var(--hu));
  background: #ff4c3d;
  color: #fff;
}
.shop-hero__ribbon-label {
  --fs: calc(27 * var(--hu));
  flex: 1;
  text-align: center;
  font-weight: var(--w-extrabold);
  letter-spacing: 0.015em;
  line-height: calc(50 * var(--hu));
}
.shop-hero__title {
  --fs: calc(48.7 * var(--hu));
  position: absolute;
  left: calc(52 * var(--hu));
  top: calc(98 * var(--hu));
  width: calc(384 * var(--hu));
  height: calc(58 * var(--hu));
  line-height: calc(58 * var(--hu));
  font-weight: var(--w-black);
  letter-spacing: -0.01em;
  color: var(--shop-ink);
}
.shop-hero__subtitle {
  position: absolute;
  left: calc(52 * var(--hu));
  top: calc(160 * var(--hu));
  width: calc(300 * var(--hu));
  height: calc(72 * var(--hu));
  font-weight: var(--w-bold);
  font-size: calc(29 * var(--hu));
  line-height: 1.2;
  color: var(--shop-blue);
}
.shop-hero__countdown {
  position: absolute;
  left: calc(52 * var(--hu));
  top: calc(280 * var(--hu));
  min-width: calc(246 * var(--hu));
  padding: calc(11 * var(--hu)) calc(21 * var(--hu)) calc(7 * var(--hu)) calc(26 * var(--hu));
  display: flex;
  align-items: center;
  gap: calc(14 * var(--hu));
  border-radius: calc(42 * var(--hu));
  background: #0b2151;
  color: #fff;
}
.shop-hero__clock {
  width: calc(44 * var(--hu));
  height: calc(44 * var(--hu));
  flex: none;
  object-fit: contain;
}
.shop-hero__countdown-text {
  /* may shrink inside the pill's max-width; the two lines then fit themselves (FitText) */
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}
.shop-hero__countdown-caption {
  --fs: calc(20.25 * var(--hu));
  height: calc(24 * var(--hu));
  font-weight: var(--w-medium);
  line-height: calc(24 * var(--hu));
}
.shop-hero__countdown-value {
  --fs: calc(27.4 * var(--hu));
  height: calc(34 * var(--hu));
  font-weight: var(--w-bold);
  line-height: calc(34 * var(--hu));
  font-variant-numeric: tabular-nums;
}
.shop-hero__save {
  position: absolute;
  left: calc(45 * var(--hu));
  top: calc(382 * var(--hu));
  width: calc(208 * var(--hu));
  height: calc(100 * var(--hu));
  background-size: 100% 100%;
  text-align: center;
  color: #2e2200;
}
.shop-hero__save-word {
  position: absolute;
  inset: calc(12 * var(--hu)) 0 auto 0;
  width: calc(186 * var(--hu));
  font-weight: var(--w-extrabold);
  font-size: calc(30 * var(--hu));
  line-height: calc(34 * var(--hu));
}
.shop-hero__save-percent {
  position: absolute;
  inset: calc(44 * var(--hu)) 0 auto 0;
  width: calc(186 * var(--hu));
  font-weight: var(--w-black);
  --fs: calc(42.15 * var(--hu));
  line-height: calc(50 * var(--hu));
}
/* The same tag scales uniformly for a longer money value; keep the primary saving readable. */
.shop-hero__save--money { width: calc(312 * var(--hu)); height: calc(150 * var(--hu)); }
.shop-hero__save--money .shop-hero__save-word {
  top: calc(18 * var(--hu)); width: calc(279 * var(--hu));
  font-size: calc(36 * var(--hu)); line-height: calc(42 * var(--hu));
}
.shop-hero__save--money .shop-hero__save-percent {
  top: calc(62 * var(--hu)); width: calc(279 * var(--hu)); height: calc(70 * var(--hu));
  --fs: calc(48 * var(--hu)); line-height: calc(70 * var(--hu));
}
.shop-hero__chest {
  position: absolute;
  left: calc(394 * var(--hu));
  top: calc(130 * var(--hu));
  width: calc(324 * var(--hu));
  height: calc(304 * var(--hu));
  object-fit: contain;
}
.shop-hero__chips {
  position: absolute;
  left: calc(720 * var(--hu));
  top: calc(32 * var(--hu));
  width: calc(296 * var(--hu));
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--hu));
}
.shop-chip {
  position: relative;
  flex: none;
  width: 100%;
  height: calc(96 * var(--hu));
  border-radius: calc(26 * var(--hu));
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--hu)) #e3e7ec,
    0 calc(12 * var(--hu)) calc(10 * var(--hu)) rgba(13, 26, 51, 0.08);
}
.shop-chip__icon {
  position: absolute;
  left: calc(20 * var(--hu));
  top: 50%;
  width: calc(72 * var(--hu));
  height: calc(72 * var(--hu));
  transform: translateY(-50%);
  object-fit: contain;
}
.shop-chip__text {
  position: absolute;
  left: calc(115 * var(--hu));
  /* clear of the chip's rounded end, so a long count shrinks before it reaches the edge */
  right: calc(14 * var(--hu));
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(-2 * var(--hu));
  color: var(--shop-ink);
}
.shop-chip__caption {
  --fs: calc(18.55 * var(--hu));
  height: calc(22 * var(--hu));
  line-height: calc(22 * var(--hu));
  font-weight: var(--w-bold);
}
.shop-chip__value {
  --fs: calc(35.4 * var(--hu));
  height: calc(42 * var(--hu));
  line-height: calc(42 * var(--hu));
  font-weight: var(--w-extrabold);
}
.shop-hero__buy {
  position: absolute;
  left: calc(355 * var(--hu));
  top: calc(445 * var(--hu));
  width: calc(310 * var(--hu));
  height: calc(70 * var(--hu));
  --pill-fs-base: 40;
  --pill-pad: 20;
}
.shop-hero__yousave {
  position: absolute;
  left: calc(836 * var(--hu));
  top: calc(457 * var(--hu));
  height: calc(46 * var(--hu));
  padding: 0 calc(18 * var(--hu));
  display: flex;
  align-items: center;
  transform: translateX(-50%);
  border-radius: calc(21 * var(--hu));
  background: rgba(8, 51, 23, 0.55);
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--hu));
  white-space: nowrap;
}

/* ---- Buy pill (BaseButtonGreen, disabled: the shared flat grey face inside a light ring) ---------------- */
.shop-pill.btn {
  --pill-fs: var(--pill-fs-base, 26);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  /* the label area of BaseButton: about 84 % of the pill, so the text never touches the ring */
  padding: 0 calc(var(--pill-pad, 14) * var(--cu));
  gap: 0;
}
.shop-pill.btn:disabled {
  --btn-base: #b8bdc5;
  background: #b8bdc5;
  color: #fff;
  box-shadow: inset 0 0 0 calc(6 * var(--cu)) #e2e4e7;
  text-shadow: 0 calc(2 * var(--cu)) 0 rgba(27, 37, 89, 0.16);
}
/* TRY AGAIN (BaseButtonSlateCompact): slate face inside a light ring, 88u tall including the ring */
.shop-state__retry.btn {
  --btn-font: calc(28 * var(--u));
  background: linear-gradient(180deg, #626f9d, #576797);
  box-shadow: inset 0 0 0 calc(7 * var(--u)) #bec3d7;
  text-shadow: 0 calc(2 * var(--u)) 0 rgba(27, 37, 89, 0.3);
}
.shop-state__retry.btn:disabled {
  background: #b8bdc5;
  box-shadow: inset 0 0 0 calc(7 * var(--u)) #e2e4e7;
}
.shop-pill__label {
  --fs: calc(var(--pill-fs) * var(--cu));
  flex: 1;
  text-align: center;
  line-height: 1.2;
}

/* ---- Shelves (SpecialSection / TicketsSection / GemsSection / PassesSection) --------------------------- */
.shop-shelf {
  /* --fold-lift: how far each shelf is drawn up into its own top padding (Shop.js useCleanFold) */
  margin-top: calc(-1 * var(--fold-lift, 0px));
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding: calc(26 * var(--u)) calc(44 * var(--u)) 0;
}
.shop-heading {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  height: calc(46 * var(--u));
}
.shop-heading__disc {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  border-radius: 50%;
}
.shop-heading__disc--gold {
  background: #fdefc9;
}
.shop-heading__disc--blue {
  background: #ddeffc;
}
.shop-heading__disc img {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  object-fit: contain;
}
.shop-heading__text {
  margin-left: calc(40 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  line-height: calc(44 * var(--u));
  color: var(--shop-ink);
  white-space: nowrap;
}
.shop-shelf--special .shop-heading__text {
  margin-left: 0;
}
.shop-heading__caption {
  margin: 0 0 0 calc(98 * var(--u));
  height: calc(34 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(26 * var(--u));
  line-height: calc(34 * var(--u));
  color: rgba(27, 37, 89, 0.8);
  white-space: nowrap;
}
.shop-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(calc(120 * var(--u)), 1fr);
  gap: calc(14 * var(--u));
}
.shop-row--tickets {
  height: calc(272 * var(--u));
}
.shop-row--gems {
  height: calc(254 * var(--u));
}
.shop-row--special,
.shop-row--passes {
  height: calc(196 * var(--u));
  grid-auto-columns: minmax(calc(200 * var(--u)), 1fr);
}
.shop-row--helpers {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: calc(300 * var(--u));
}
.shop-row--coins { height: calc(254 * var(--u)); }
.shop-row--helpers .shop-card--pass { min-height: 0; }
@media(max-width:759px){.shop-banner {height:calc(200 * var(--bu));}.shop-banner__title {top:calc(16 * var(--bu));}.shop-banner__subtitle {top:calc(88 * var(--bu));}}

/* Match the authored native gameplay hero and supply cards at phone size. */
@media (max-width: 759px) {
  .shop-row--helpers { grid-auto-rows: max(calc(420 * var(--u)), 168px); }
  .shop-row--coins { height: max(calc(420 * var(--u)), 168px); }
  .shop-shelf--helpers .shop-card__title,
  .shop-shelf--coins .shop-card__title { --fs: max(calc(44 * var(--cu)), 14px); height: 26px; line-height: 26px; }
  .shop-shelf--helpers .shop-card__art,
  .shop-shelf--coins .shop-card__art { top: 34px; bottom: 60px; }
  .shop-shelf--helpers .shop-card__buy,
  .shop-shelf--coins .shop-card__buy { bottom: 10px; width: calc(100% - 24px); height: 44px; }
  .shop-shelf--helpers .shop-pill__label,
  .shop-shelf--coins .shop-pill__label { --fs: 18px; }
  .shop-hero--gameplay { height: calc(620 * var(--hu)); }
  .shop-hero--gameplay .shop-hero__frame { background-size: cover; background-position: center bottom; }
  .shop-hero--gameplay .shop-hero__title { left: calc(44 * var(--hu)); top: calc(90 * var(--hu)); width: calc(700 * var(--hu)); height: calc(88 * var(--hu)); --fs: calc(62 * var(--hu)); }
  .shop-hero--gameplay .shop-hero__subtitle { left: calc(44 * var(--hu)); top: calc(183 * var(--hu)); width: calc(650 * var(--hu)); height: calc(130 * var(--hu)); font-size: max(calc(36 * var(--hu)), 12px); }
  .shop-hero--gameplay .shop-hero__chest { left: calc(735 * var(--hu)); top: calc(93 * var(--hu)); width: calc(255 * var(--hu)); height: calc(215 * var(--hu)); }
  .shop-hero--gameplay .shop-hero__chips { left: calc(44 * var(--hu)); right: auto; top: calc(330 * var(--hu)); width: calc(952 * var(--hu)); display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:calc(12 * var(--hu)); }
  .shop-hero--gameplay .shop-chip { height: calc(110 * var(--hu)); padding:calc(10 * var(--hu));gap:calc(6 * var(--hu)); }
  .shop-hero--gameplay .shop-chip__value { --fs: max(calc(50 * var(--hu)), 16px); height: auto; line-height: 1.2; }
  .shop-hero--gameplay .shop-hero__buy { left: calc(44 * var(--hu)); top: calc(469 * var(--hu)); width: calc(952 * var(--hu)); height: max(calc(116 * var(--hu)), 44px); }
  .shop-hero--gameplay .shop-pill__label { --fs: 18px; }
}

/* ---- Cards (ShopPackCard / ShopPassCard) ---------------------------------------------------------------- */
.shop-card {
  position: relative;
  min-width: 0;
  height: 100%;
  border-radius: calc(28 * var(--cu));
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--cu)) #e9ecf0,
    0 calc(12 * var(--cu)) calc(14 * var(--cu)) rgba(13, 26, 51, 0.08);
  color: var(--shop-ink);
}
.shop-card__title {
  --fs: calc(25 * var(--cu));
  position: absolute;
  left: calc(8 * var(--cu));
  right: calc(8 * var(--cu));
  top: calc(14 * var(--cu));
  height: calc(40 * var(--cu));
  line-height: calc(40 * var(--cu));
  text-align: center;
  font-weight: var(--w-bold);
}
.shop-card__art {
  position: absolute;
  left: calc(8 * var(--cu));
  right: calc(8 * var(--cu));
  top: calc(54 * var(--cu));
  bottom: calc(96 * var(--cu));
}
.shop-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.shop-card__badge {
  position: absolute;
  left: 50%;
  bottom: calc(14 * var(--cu));
  height: calc(36 * var(--cu));
  padding: 0 calc(14 * var(--cu));
  display: flex;
  align-items: center;
  transform: translateX(-50%);
  border-radius: calc(18 * var(--cu));
  background: #fe275a;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(20 * var(--cu));
  white-space: nowrap;
}
.shop-card__buy {
  position: absolute;
  left: 50%;
  bottom: calc(44 * var(--cu));
  width: calc(190 * var(--cu));
  height: calc(48 * var(--cu));
  transform: translateX(-50%);
}
.shop-card__caption {
  margin: 0;
  position: absolute;
  left: calc(6 * var(--cu));
  right: calc(6 * var(--cu));
  bottom: calc(14 * var(--cu));
  height: calc(30 * var(--cu));
  line-height: calc(30 * var(--cu));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(21 * var(--cu));
  color: #2e9e2e;
  white-space: nowrap;
}
.shop-card--pass .shop-card__caption {
  position: absolute;
  top: calc(100% + 5 * var(--cu));
  bottom: auto;
  left: 0;
  right: 0;
  height: calc(26 * var(--cu));
  line-height: calc(26 * var(--cu));
  font-size: calc(20 * var(--cu));
}
.shop-card__pass-art {
  position: absolute;
  left: calc(28 * var(--cu));
  top: 50%;
  width: calc(116 * var(--cu));
  height: calc(116 * var(--cu));
  transform: translateY(-50%);
  object-fit: contain;
}
.shop-card__pass-text {
  position: absolute;
  left: calc(168 * var(--cu));
  right: calc(264 * var(--cu));
  top: calc(13 * var(--cu));
  bottom: calc(13 * var(--cu));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(1 * var(--cu));
}
.shop-card__pass-title {
  min-height: calc(48 * var(--cu));
  display: flex;
  align-items: flex-end;
  font-weight: var(--w-bold);
  font-size: calc(24 * var(--cu));
  line-height: 1.15;
}
.shop-card__pass-desc {
  min-height: calc(44 * var(--cu));
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-weight: var(--w-medium);
  font-size: calc(18 * var(--cu));
  line-height: 1.2;
  color: #4a5e85;
}
.shop-card__pass-cta {
  --pill-pad: 18;
  position: absolute;
  right: calc(28 * var(--cu));
  top: 50%;
  width: calc(212 * var(--cu));
  height: calc(46 * var(--cu));
  transform: translateY(-50%);
}


/* ---- Full-body states (loading / empty / error) ------------------------------------------------------------- */
.shop-state {
  min-height: 100%;
  padding: calc(60 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(20 * var(--u));
  text-align: center;
}
.shop-state__icon {
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  object-fit: contain;
}
.shop-state__label {
  max-width: 24em;
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.3;
  color: #031c26;
}
.shop-state__skeleton {
  width: min(100%, calc(480 * var(--u)));
  display: grid;
  gap: calc(14 * var(--u));
}
.shop-state__skeleton span {
  height: calc(22 * var(--u));
  border-radius: 999px;
  background: rgba(128, 136, 144, 0.26);
}
.shop-state__skeleton span:nth-child(even) {
  width: 66%;
}
.shop-state__retry.btn {
  min-width: calc(300 * var(--u));
}

/* Phone product information keeps readable type rather than shrinking with the artwork. */
@media (max-width: 759px) {
  /* the starter pack stands in the same column as the notice bar above it (24 units a side) instead of running to the
     panel's edge; the hero scales to the narrower slot (ShopHeroCardFitter) */
  .shop-hero-slot {
    padding: 0 calc(24 * var(--u));
  }
  /* the four reward chips keep as much air from the frame's right edge (42 units) as the ribbon has from its left */
  .shop-hero__chips {
    left: calc(722 * var(--hu));
    width: calc(266 * var(--hu));
  }
  .shop-chip__icon {
    left: calc(16 * var(--hu));
  }
  .shop-chip__text {
    left: calc(108 * var(--hu));
    right: calc(12 * var(--hu));
  }
  /* the chest's lid ends clear of the chips' left edge */
  .shop-hero__chest {
    top: calc(126 * var(--hu));
    width: calc(312 * var(--hu));
    height: calc(293 * var(--hu));
  }
  /* the buy pill rises a little so the meadow's edge shows below it (it nearly touched the picture's bottom edge) */
  .shop-hero__buy {
    top: calc(437 * var(--hu));
  }
  .shop-hero__yousave {
    top: calc(449 * var(--hu));
  }
  /* One column on a phone: the notice bar, the starter pack, the shelf headings and every card share the 24-unit sides,
     so the 4-up ticket cards gain a few pixels each and the buy pills a readable label. */
  .shop-shelf {
    padding-inline: calc(24 * var(--u));
  }
  .shop-row {
    gap: calc(10 * var(--u));
  }
  /* a buy pill leaves 8 px on each side of its card (the 4-up ticket cards are narrower than the prefab's 227). Its label
     keeps 3 px of clear face from the pill's ring at both ends: --pill-pad is the ring plus that air, and the type is
     set tighter with a thinner outline, so the word is as large as the straight part of the pill allows */
  .shop-card__buy {
    --pill-pad: 15;
    width: min(calc(190 * var(--cu)), calc(100% - 16px));
  }
  .shop-card .shop-pill__label {
    letter-spacing: 0;
    /* the outline reaches past the glyphs; the label clips at its box, so it gets a little room on each side */
    padding-inline: 0.1em;
    -webkit-text-stroke-width: calc(2.5 * var(--cu));
  }
  /* two even lines (never "TriviAI" alone) that end above the hills: the title and subtitle rise a little and the
     scenery sinks the same way, the chests stay where the prefab puts them */
  .shop-banner__title {
    top: calc(28 * var(--bu));
  }
  .shop-banner__subtitle {
    top: calc(94 * var(--bu));
    text-wrap: balance;
  }
  .shop-banner__art {
    bottom: calc(-100 * var(--bu));
  }
  .shop-hero__countdown {
    /* ends at least 20 units before the chest (its box starts at 394): a narrow phone or a longer language
       shrinks the two lines instead of pushing the pill into the chest */
    max-width: calc(322 * var(--hu));
    padding: 5px 7px 5px 6px;
    gap: 4px;
  }
  .shop-hero__countdown-caption,
  .shop-hero__countdown-value {
    height: auto;
    line-height: 1.2;
  }
  .shop-hero__countdown-caption { --fs: max(11px, calc(20.25 * var(--hu))); }
  .shop-hero__countdown-value { --fs: max(12px, calc(27.4 * var(--hu))); }
  /* the title ends before the chest's lid (its box starts at 394 units; the lid's rim at about 425) */
  .shop-hero__title { width: calc(352 * var(--hu)); }
  .shop-chip__value { --fs: max(12px, calc(35.4 * var(--hu))); height: auto; line-height: 1.25; }
  .shop-card__title {
    --fs: max(12px, calc(25 * var(--cu)));
    /* a little more air beside "100 Tickets" on a narrow card (FitText shrinks it rather than crowd the rim) */
    left: calc(12 * var(--cu));
    right: calc(12 * var(--cu));
  }
  .shop-card__badge {
    height: auto;
    min-height: 17px;
    padding: 2px 6px;
    font-size: max(11px, calc(20 * var(--cu)));
    line-height: 1.15;
  }
  .shop-row--special,
  .shop-row--passes { height: auto; }
  .shop-card--pass {
    height: auto;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 9px 12px;
    padding: 12px;
  }
  .shop-card__pass-art {
    position: static;
    width: 42px;
    height: 42px;
    transform: none;
  }
  .shop-card__pass-text { position: static; gap: 4px; }
  .shop-card__pass-title { min-height: 0; font-size: 12px; line-height: 1.2; }
  .shop-card__pass-desc {
    display: block;
    min-height: 0;
    overflow: visible;
    font-size: 11px;
    line-height: 1.3;
  }
  .shop-card__pass-cta {
    position: static;
    grid-column: 1 / -1;
    justify-self: end;
    width: 108px;
    height: 28px;
    transform: none;
  }
  .shop-card__pass-cta .shop-pill__label { --fs: 12px; }
}

/* ======================================================================================================
   Wide layout (>= 760 px): a centred column, the whole panel scrolls, the hero and the shelves re-flow
   ====================================================================================================== */
.layout-wide .shop {
  --cu: calc(var(--u) * 1.5);
  padding: 14px 24px calc(20px + var(--fold-trim, 0px));
}
.layout-wide .shop-panel {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(27, 37, 89, 0.28) transparent;
  border-radius: calc(56 * var(--u));
}
.layout-wide .shop-body {
  overflow: visible;
}
/* The whole panel scrolls here, so whatever the window's bottom edge reaches (a heading, a buy pill) fades into the
   panel instead of being cut through the middle. */
.layout-wide .shop-panel::after {
  content: '';
  display: block;
  position: sticky;
  bottom: 0;
  height: calc(36 * var(--u));
  margin-top: calc(-36 * var(--u));
  background: linear-gradient(to bottom, rgba(246, 244, 241, 0), #f6f4f1 88%);
  pointer-events: none;
}
.layout-wide .shop-content {
  padding-bottom: 36px;
}
.layout-wide .shop-banner {
  --bu: calc(var(--u) * 1.3);
  /* where the top of the leftmost bush stands, measured from the banner's top: always below the title block, so the
     subtitle is read against sky and never against the hills (each banner height below sets its own) */
  --crest: calc(160 * var(--bu));
}
/* The art holds a trophy at its right (Leaderboards' hero); the phone crops it away by showing the left 62 % of a
   1664-unit image. On a wide banner the same crop is kept: the image is scaled so its 8 %..58.5 % span the banner (past the left bush, before the trophy's confetti).
   It hangs from the top, so the leftmost bush (63.8 % down the image) stands at --crest whatever the banner's height. */
.layout-wide .shop-banner__art {
  left: -15.84%;
  top: var(--crest);
  bottom: auto;
  width: calc(100% / 0.505);
  height: auto;
  transform: translateY(-63.8%);
}
.layout-wide .shop-banner__title {
  top: calc(40 * var(--bu));
}
.layout-wide .shop-banner__subtitle {
  top: calc(108 * var(--bu));
  /* clear of the gem chest (270 + 286 units from the right edge) whatever the column width */
  width: calc(100% - 626 * var(--bu));
  max-width: none;
  /* the same daylight halo as the offer's pitch: legible where the hills rise behind the line */
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.8),
    0 0 7px rgba(255, 255, 255, 0.7);
}
.layout-wide .shop-notice-wrap {
  padding: 18px 36px 0;
}
.layout-wide .shop-notice {
  min-height: 52px;
  font-size: 17px;
}
.layout-wide .shop-hero-slot {
  padding: 22px 36px 0;
}
.layout-wide .shop-hero {
  /* 1184 hero units hold the three columns, the gaps and the padding: a narrower column (a tablet) scales it down */
  --hu: min(calc(var(--u) * 1.32), calc(100cqw / 1184));
  width: 100%;
  height: auto;
  min-height: calc(540 * var(--hu));
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: calc(24 * var(--hu));
  padding: calc(44 * var(--hu)) calc(40 * var(--hu));
}
.layout-wide .shop-hero__frame {
  background-size: cover;
  background-position: center bottom;
}
/* the meadow's own sunlit haze, carried over the text column so the pitch never sits on a dark bush */
.layout-wide .shop-hero__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 36% 64% at 17% 50%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}
.layout-wide .shop-hero__left,
.layout-wide .shop-hero__mid {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: none;
}
.layout-wide .shop-hero__left {
  width: calc(420 * var(--hu));
  gap: calc(14 * var(--hu));
}
.layout-wide .shop-hero__mid {
  width: calc(340 * var(--hu));
  align-items: center;
  gap: calc(10 * var(--hu));
}
.layout-wide .shop-hero__ribbon,
.layout-wide .shop-hero__title,
.layout-wide .shop-hero__subtitle,
.layout-wide .shop-hero__countdown,
.layout-wide .shop-hero__save,
.layout-wide .shop-hero__chest,
.layout-wide .shop-hero__buy,
.layout-wide .shop-hero__yousave,
.layout-wide .shop-hero__chips {
  position: relative;
  left: auto;
  top: auto;
}
.layout-wide .shop-hero__title {
  width: 100%;
}
.layout-wide .shop-hero__subtitle {
  width: 100%;
  height: auto;
  text-wrap: balance;
  /* a soft daylight halo: the pitch stays readable where the meadow's bushes rise behind the text column */
  text-shadow:
    0 0 calc(3 * var(--hu)) rgba(255, 255, 255, 0.8),
    0 0 calc(10 * var(--hu)) rgba(255, 255, 255, 0.7);
}
.layout-wide .shop-hero__save {
  flex: none;
}
.layout-wide .shop-hero__buy {
  flex: none;
}
.layout-wide .shop-hero__yousave {
  transform: none;
}
.layout-wide .shop-hero__chips {
  flex: none;
}

/* A landscape column (a laptop, a desktop, a landscape tablet): the featured offer is a banner-shaped card about a
   third of the window tall, so the catalogue starts above the fold. The text column takes the free width (the
   pitch stays on one line), the chest stands over its buy pill and the four reward chips sit two by two. */
@container (min-width: 740px) {
  .layout-wide .shop-hero {
    /* 1500 units: text 520 + chest 300 + chips 2 x 230 + 10, two 28-unit gaps, the sides and a little air;
       the chest's column takes whatever is left over */
    --hu: min(calc(var(--u) * 1.1), calc(100cqw / 1500));
    min-height: 0;
    justify-content: space-between;
    gap: calc(28 * var(--hu));
    padding: calc(34 * var(--hu)) calc(44 * var(--hu)) calc(40 * var(--hu)) calc(52 * var(--hu));
  }
  .layout-wide .shop-hero__frame {
    background-position: center 74%;
  }
  .layout-wide .shop-hero__left {
    flex: 0 1 calc(520 * var(--hu));
    width: auto;
    min-width: calc(400 * var(--hu));
    gap: calc(12 * var(--hu));
  }
  .layout-wide .shop-hero__title {
    max-width: calc(470 * var(--hu));
  }
  .layout-wide .shop-hero__subtitle {
    width: 100%;
    margin-bottom: calc(8 * var(--hu));
  }
  /* the chest's column takes any spare width, so it stands centred between the pitch and the chips */
  .layout-wide .shop-hero__mid {
    flex: 1 1 calc(300 * var(--hu));
    width: auto;
    min-width: calc(290 * var(--hu));
    /* the buy pill has air above it (the chest's base) as well as below it (the meadow's edge) */
    gap: calc(22 * var(--hu));
  }
  .layout-wide .shop-hero__chest {
    width: calc(226 * var(--hu));
    height: calc(212 * var(--hu));
  }
  .layout-wide .shop-hero__buy {
    width: calc(290 * var(--hu));
  }
  .layout-wide .shop-hero__chips {
    display: grid;
    /* icon and count only (owner rule: resources show their icon and a numeral): room for "×100" with air on its right */
    grid-template-columns: repeat(2, calc(230 * var(--hu)));
    gap: calc(10 * var(--hu));
    width: auto;
  }
  .layout-wide .shop-chip__icon {
    left: calc(18 * var(--hu));
    width: calc(68 * var(--hu));
    height: calc(68 * var(--hu));
  }
  .layout-wide .shop-chip__text {
    left: calc(102 * var(--hu));
    right: calc(16 * var(--hu));
  }
}
/* A broad column (a full HD monitor): the same card at a larger scale instead of wider gaps. */
@container (min-width: 1200px) {
  .layout-wide .shop-hero {
    --hu: min(calc(var(--u) * 1.25), calc(100cqw / 1500));
  }
}

.layout-wide .shop-shelf {
  gap: 14px;
  padding: 30px 36px 0;
}
.layout-wide .shop-heading {
  height: calc(46 * var(--u) * 1.3);
  gap: calc(14 * var(--u) * 1.3);
}
.layout-wide .shop-shelf--special .shop-heading__text {
  margin-left: 0;
}
.layout-wide .shop-heading__disc {
  width: calc(46 * var(--u) * 1.3);
  height: calc(46 * var(--u) * 1.3);
}
.layout-wide .shop-heading__disc img {
  width: calc(34 * var(--u) * 1.3);
  height: calc(34 * var(--u) * 1.3);
}
.layout-wide .shop {
  --heading-indent: calc(60 * var(--u) * 1.3 + 10 * var(--u));
}
.layout-wide .shop-heading__text {
  margin-left: calc(10 * var(--u));
  font-size: calc(32 * var(--u) * 1.3);
}
.layout-wide .shop-heading__caption {
  margin-left: var(--heading-indent);
  height: auto;
  margin-top: -6px;
  font-size: calc(26 * var(--u) * 1.3);
}
.layout-wide .shop-shelf {
  container-type: inline-size;
}
.layout-wide .shop-row {
  /* card units: 1.5x a phone's, scaled down when four 205-unit cards no longer fit the column (a tablet) */
  --cu: min(calc(var(--u) * 1.5), calc((100cqw - 48px) / 820));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  /* auto-fit: three or four cards share the row, a long shelf wraps */
  grid-template-columns: repeat(auto-fit, minmax(calc(205 * var(--cu)), 1fr));
  gap: calc(16 * var(--cu));
}
.layout-wide .shop-row--tickets,
.layout-wide .shop-row--gems,
.layout-wide .shop-row--special,
.layout-wide .shop-row--passes {
  height: auto;
}
.layout-wide .shop-row--tickets .shop-card,
.layout-wide .shop-row--gems .shop-card {
  height: calc(268 * var(--cu));
}
/* A compact card on a wide screen is balanced from top to bottom: the title, the picture and the buy pill share the
   height with the same air above the title as below the pill, and the picture and the pill keep a margin from the
   card's sides. The prefab's empty band under the pill is only kept when the card carries a "You save" caption. */
.layout-wide .shop-card--pack .shop-card__title {
  top: calc(18 * var(--cu));
  left: calc(14 * var(--cu));
  right: calc(14 * var(--cu));
}
.layout-wide .shop-card--pack .shop-card__art {
  left: calc(18 * var(--cu));
  right: calc(18 * var(--cu));
  top: calc(60 * var(--cu));
  bottom: calc(88 * var(--cu));
}
.layout-wide .shop-card--pack .shop-card__buy {
  --pill-pad: 22;
  bottom: calc(24 * var(--cu));
  width: min(calc(190 * var(--cu)), calc(100% - 44 * var(--cu)));
}
.layout-wide .shop-card--pack:has(.shop-card__caption) .shop-card__art {
  bottom: calc(96 * var(--cu));
}
.layout-wide .shop-card--pack:has(.shop-card__caption) .shop-card__buy {
  bottom: calc(44 * var(--cu));
}
.layout-wide .shop-row--special,
.layout-wide .shop-row--passes {
  grid-template-columns: repeat(auto-fit, minmax(calc(560 * var(--cu)), 1fr));
}
.layout-wide .shop-row--special .shop-card,
.layout-wide .shop-row--passes .shop-card {
  height: calc(190 * var(--cu));
}
.layout-wide .shop-state__retry.btn {
  --btn-font: calc(28 * var(--u) * 1.2);
  min-width: calc(478 * var(--u) * 1.2);
}
.layout-wide .shop-state {
  min-height: 360px;
  gap: calc(20 * var(--u) * 1.3);
}
.layout-wide .shop-state__icon {
  width: calc(64 * var(--u) * 1.3);
  height: calc(64 * var(--u) * 1.3);
}
.layout-wide .shop-state__label {
  font-size: calc(28 * var(--u) * 1.3);
}
.layout-wide .shop-state__skeleton {
  width: min(100%, calc(480 * var(--u) * 1.3));
}

/* Tablet scenery leaves room for the complete original featured offer. */
@media (min-width: 760px) and (max-width: 1199px) {
  .layout-wide .shop-banner {
    height: 144px;
    --crest: 112px;
  }
  .layout-wide .shop-banner__title {
    left: 26px;
    top: 16px;
    width: calc(100% - 370px);
    height: 40px;
    font-size: 32px;
  }
  .layout-wide .shop-banner__subtitle {
    left: 28px;
    top: 60px;
    width: calc(100% - 370px);
    height: 64px;
    font-size: 17px;
    line-height: 1.25;
    /* two even lines when it must wrap (a portrait tablet), never one word left alone beside the chests */
    text-wrap: balance;
  }
  .layout-wide .shop-banner__chest {
    width: 164px;
    height: 110px;
    bottom: 14px;
  }
  .layout-wide .shop-banner__chest--gems {
    right: 186px;
  }
  .layout-wide .shop-banner__chest--tickets {
    right: 14px;
  }
  .layout-wide .shop-hero-slot {
    padding: 16px 36px 0;
  }
}
/* A landscape tablet has the width for one subtitle line, so the title block rises and the scenery is lowered further */
@media (min-width: 760px) and (max-width: 1199px) and (min-aspect-ratio: 1/1) {
  .layout-wide .shop-banner {
    height: 130px;
    --crest: 84px;
  }
  .layout-wide .shop-banner__title {
    top: 12px;
  }
  .layout-wide .shop-banner__subtitle {
    top: 54px;
  }
  .layout-wide .shop-banner__chest {
    bottom: 10px;
  }
  .layout-wide .shop-hero-slot {
    padding-top: 12px;
  }
  .layout-wide .shop-shelf {
    padding-top: 22px;
  }
}
/* 1180 x 820: a little more air above the tickets, so the window's bottom edge falls between the ticket pictures and
   their buy pills instead of on a pill */
@media (min-width: 1100px) and (max-width: 1199px) and (min-aspect-ratio: 1/1) {
  .layout-wide .shop-shelf {
    padding-top: 33px;
  }
}
@media (min-width: 760px) and (max-width: 1199px) and (max-height: 640px) {
  .layout-wide .shop-banner {
    height: 124px;
    --crest: 84px;
  }
  .layout-wide .shop-banner__title {
    top: 12px;
    height: 34px;
    width: calc(100% - 324px);
    font-size: 28px;
  }
  .layout-wide .shop-banner__subtitle {
    top: 52px;
    width: calc(100% - 324px);
    height: 58px;
    font-size: 16px;
  }
  .layout-wide .shop-banner__chest {
    width: 142px;
    height: 96px;
    bottom: 12px;
  }
  .layout-wide .shop-banner__chest--gems {
    right: 164px;
  }
}

/* Short desktop windows give the featured offer priority over banner scenery. */
@media (min-width: 1200px) and (max-height: 760px) {
  .layout-wide .shop-banner {
    height: 140px;
    --crest: 92px;
  }
  .layout-wide .shop-banner__title {
    top: 14px;
  }
  .layout-wide .shop-banner__subtitle {
    top: 58px;
  }
  .layout-wide .shop-banner__chest {
    width: 190px;
    height: 112px;
    bottom: 14px;
  }
  .layout-wide .shop-banner__chest--gems {
    right: 184px;
  }
  .layout-wide .shop-banner__chest--tickets {
    right: 14px;
  }
}
@media (min-width: 1200px) and (max-height: 640px) {
  .layout-wide .shop-banner {
    height: 112px;
    --crest: 82px;
  }
  .layout-wide .shop-banner__title {
    top: 10px;
  }
  .layout-wide .shop-banner__subtitle {
    top: 50px;
    width: calc(100% - 340px);
  }
  .layout-wide .shop-banner__chest {
    width: 140px;
    height: 90px;
    bottom: 10px;
  }
  .layout-wide .shop-banner__chest--gems {
    right: 146px;
  }
  .layout-wide .shop-banner__chest--tickets {
    right: 14px;
  }
  .layout-wide .shop-hero-slot {
    padding: 16px 36px 0;
  }
  .layout-wide .shop-hero {
    --hu: min(var(--u), calc(100cqw / 1500));
  }
}

/* A tall, broad window (a full HD monitor): the banner gives up some scenery so the first screen holds the whole
   starter pack and the ticket tiles with their buy pills, notice bar included. */
@media (min-width: 1200px) and (min-height: 1000px) {
  .layout-wide .shop-banner {
    height: 196px;
    --crest: 130px;
  }
  .layout-wide .shop-banner__title {
    top: 22px;
  }
  .layout-wide .shop-banner__subtitle {
    top: 78px;
  }
  .layout-wide .shop-notice-wrap {
    padding-top: 14px;
  }
  .layout-wide .shop-hero-slot {
    padding-top: 18px;
  }
  .layout-wide .shop-shelf {
    padding-top: 24px;
  }
  /* with a store (no notice bar above the offer) the same window holds the whole GEMS heading and its caption, so the
     banner, the offer and the shelves sit a little closer: nothing ends on the bottom edge but the gem cards */
  .layout-wide .shop:not(.shop--notice) .shop-banner {
    height: 184px;
    --crest: 120px;
  }
  .layout-wide .shop:not(.shop--notice) .shop-hero-slot {
    padding-top: 12px;
  }
  .layout-wide .shop:not(.shop--notice) .shop-shelf {
    padding-top: 18px;
  }
}

/* A 1440 x 900 window: the offer is drawn a little larger and given more air, so the first screen ends on the
   ticket pictures and the buy pills stay below the fold as whole pills instead of being cut through their price. */
@media (min-width: 1200px) and (min-height: 800px) and (max-height: 999px) {
  .layout-wide .shop-hero {
    --hu: min(calc(var(--u) * 1.2), calc(100cqw / 1500));
  }
  .layout-wide .shop-hero-slot {
    padding-top: 30px;
  }
  .layout-wide .shop-shelf {
    padding-top: 36px;
  }
}

/* A 1280 x 720 laptop: the offer is drawn a little larger and the tickets start lower, so the window's bottom edge falls
   above the ticket numbers (the card's top edge only peeks in) instead of through them. */
@media (min-width: 1200px) and (min-height: 641px) and (max-height: 799px) {
  .layout-wide .shop-hero {
    --hu: min(calc(var(--u) * 1.2), calc(100cqw / 1500));
  }
  .layout-wide .shop-hero-slot {
    padding-top: 26px;
  }
  .layout-wide .shop-shelf {
    padding-top: 38px;
  }
  /* With the notice bar above the offer the same window is shorter by the bar: the banner, the gaps and the offer give
     up some height so the first row of tickets still shows its numbers whole, with the art peeking in below them,
     instead of the heading standing alone at the edge. */
  .layout-wide .shop--notice .shop-banner {
    height: 112px;
    --crest: 82px;
  }
  .layout-wide .shop--notice .shop-banner__title {
    top: 10px;
  }
  .layout-wide .shop--notice .shop-banner__subtitle {
    top: 55px;
  }
  .layout-wide .shop--notice .shop-banner__chest {
    width: 140px;
    height: 90px;
    bottom: 10px;
  }
  .layout-wide .shop--notice .shop-banner__chest--gems {
    right: 146px;
  }
  .layout-wide .shop--notice .shop-notice-wrap {
    padding-top: 10px;
  }
  .layout-wide .shop--notice .shop-hero {
    --hu: min(calc(var(--u) * 1.1), calc(100cqw / 1500));
  }
  .layout-wide .shop--notice .shop-hero-slot {
    padding-top: 14px;
  }
  .layout-wide .shop--notice .shop-shelf {
    padding-top: 28px;
  }
}

/* Mixed packages reuse the shop card/price/art system, with complete reward rows. */
.shop .shop-row--quizBundles,
.shop .shop-row--adventureBundles { display:grid;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:minmax(0,1fr);gap:12px; }
.shop .shop-card--bundle { position:relative;display:grid;width:100%;min-width:0;height:auto;min-height:124px;grid-template-columns:48px minmax(0,1fr) 96px;grid-template-rows:auto auto;gap:8px;padding:12px;align-items:center; }
.shop .shop-bundle__art { position:static;grid-column:1;grid-row:1;width:48px;height:44px;object-fit:contain; }
.shop .shop-bundle__title { position:static;grid-column:2;grid-row:1;width:auto;height:auto;font-weight:var(--w-bold);font-size:17px;line-height:1.2;white-space:normal;overflow-wrap:normal; }
.shop-checkout .popup__footer .btn { min-height:44px; }
.shop-checkout .popup__close { min-width:44px;min-height:44px; }
.shop .shop-bundle__contents { position:static;grid-column:1/4;grid-row:2;display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-evenly;gap:5px;padding:0;margin:0;list-style:none; }
.shop .shop-bundle__contents .shop-chip { position:static;display:flex;flex-direction:column;align-items:center;justify-content:center;width:auto;min-width:32px;height:48px;padding:3px;gap:3px; }
.shop .shop-bundle__contents .shop-chip__icon { position:static;inset:auto;transform:none;flex:none;width:24px;height:24px;object-fit:contain; }
.shop .shop-bundle__contents .shop-chip__text { position:static;inset:auto;transform:none;flex:none;display:block;width:auto;min-width:26px;height:auto; }
.shop .shop-bundle__contents .shop-chip__value { --fs:14px;position:static;width:auto;height:auto;line-height:1.2; }
.shop .shop-bundle__buy { position:static;grid-column:3;grid-row:1;width:96px;height:44px; }
.shop .shop-bundle__buy .shop-pill { width:100%;height:44px;min-height:44px; }
.shop .shop-bundle__buy .shop-pill__label { --fs:15px; }
.shop .shop-hero--gameplay .shop-hero__title { text-transform:uppercase; }
.shop .shop-pill { min-height:44px; }
.shop .shop-card--pack { min-height:148px; }
.shop .shop-card--pack .shop-card__art { top:36px;bottom:66px;left:12px;right:12px; }
.shop .shop-card--pack .shop-card__buy { height:44px;bottom:12px; }
.shop .shop-card--pack .shop-pill__label { --fs:16px; }
.shop .shop-card--pass { min-height:140px; }
.shop .shop-card--pass .shop-card__pass-cta { height:44px;bottom:12px; }
.shop .shop-card--pass .shop-card__pass-desc { font-size:14px;line-height:1.3; }

/* Offer metadata has its own space; neither savings nor expiry can cover paid contents or a price. */
.shop-comparison-note { margin: 0; padding: 4px 12px; color: var(--shop-ink); font-size: 12px; line-height: 1.3; text-align: center; }
.shop .shop-card--pack { min-height: 190px; }
.shop .shop-card--pack .shop-card__art { bottom: 104px; }
.shop .shop-card--pack .shop-card__buy { width: calc(100% - 24px); max-width: 100%; }
.shop .shop-card__promos { position: absolute; left: 8px; right: 8px; bottom: 62px; height: 40px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.shop .shop-card__badge { position: static; transform: none; flex: none; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; width: max-content; max-width: 100%; height: auto; min-height: 22px; padding: 4px 8px; box-sizing: border-box; font-size: 11px; line-height: 1.2; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.shop .shop-card__badge > span { max-width: 100%; }
.shop .shop-card__pass-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; height: auto; bottom: auto; }
.shop .shop-card__pass-cta .shop-pill { flex: none; height: 44px; }
.shop .shop-bundle__buy { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; height: auto; min-height: 44px; }
.shop .shop-bundle__buy .shop-card__badge { margin-right: auto; }
.shop .shop-bundle__buy .shop-pill { flex: 0 0 35%; max-width: 160px; }
.shop .shop-card--bundle { grid-template-columns: 48px minmax(0, 1fr); }
.shop .shop-bundle__contents { grid-column: 1 / -1; }
.shop .shop-row--special, .shop .shop-row--passes {
  height: auto;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto;
}
.layout-wide .shop .shop-card--bundle { height: auto; }
.layout-wide .shop-hero__promos { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; width: 100%; }
.layout-wide .shop .shop-card--pack { min-height: 224px; }
.layout-wide .shop .shop-card--pack .shop-card__art { top: max(calc(64 * var(--cu)), 52px); }
.layout-wide .shop .shop-row--helpers, .layout-wide .shop .shop-row--coins { height: auto; grid-auto-rows: minmax(224px, auto); }
@media (max-width: 759px) {
  .shop-row--tickets, .shop-row--gems, .shop-row--coins { height: max(calc(420 * var(--u)), 190px); }
  .shop-row--helpers { grid-auto-rows: max(calc(420 * var(--u)), 190px); }
  .shop-hero { height: calc(640 * var(--hu)); }
  .shop-hero--gameplay {
    --promo-y: max(calc(320 * var(--hu)), calc(199 * var(--hu) + 58px));
    --chips-y: calc(var(--promo-y) + 110 * var(--hu));
    --buy-y: calc(var(--chips-y) + 139 * var(--hu));
    height: calc(var(--buy-y) + max(116 * var(--hu), 44px) + 35 * var(--hu));
  }
  .shop-hero--gameplay .shop-hero__subtitle { height: auto; }
  .shop-hero__promos { position: absolute; left: calc(44 * var(--hu)); top: calc(270 * var(--hu)); width: calc(620 * var(--hu)); height: calc(110 * var(--hu)); display: flex; align-items: center; gap: calc(24 * var(--hu)); }
  .shop-hero--gameplay .shop-hero__promos { top: var(--promo-y); width: calc(952 * var(--hu)); height: calc(100 * var(--hu)); }
  .shop-hero__promos .shop-hero__countdown, .shop-hero__promos .shop-hero__save { position: relative; inset: auto; flex: none; }
  .shop-hero:not(.shop-hero--gameplay) .shop-hero__promos {
    left: calc(52 * var(--hu));
    width: calc(344 * var(--hu));
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(10 * var(--hu));
  }
  .shop-hero:not(.shop-hero--gameplay) .shop-hero__countdown { max-width: 100%; }
  .shop-hero:not(.shop-hero--gameplay):has(.shop-hero__save--money) {
    height: max(calc(720 * var(--hu)), calc(568 * var(--hu) + 44px));
  }
  .shop-hero:not(.shop-hero--gameplay):has(.shop-hero__save--money) .shop-hero__buy { top: calc(532 * var(--hu)); }
  .shop-hero:not(.shop-hero--gameplay):has(.shop-hero__save--money):has(.shop-hero__countdown) {
    height: max(calc(720 * var(--hu) + 16px), calc(568 * var(--hu) + 60px));
  }
  .shop-hero:not(.shop-hero--gameplay):has(.shop-hero__save--money):has(.shop-hero__countdown) .shop-hero__buy { top: calc(532 * var(--hu) + 16px); }
  .shop-hero--gameplay:has(.shop-hero__save--money) { --chips-y: calc(var(--promo-y) + 160 * var(--hu)); }
  .shop-hero--gameplay:has(.shop-hero__save--money) .shop-hero__promos { height: calc(150 * var(--hu)); }
  .shop-hero--gameplay .shop-hero__chips { top: var(--chips-y); }
  .shop-hero--gameplay .shop-hero__buy { top: var(--buy-y); }
}
@media(max-width:759px){
 .shop .shop-hero--gameplay .shop-chip { display:flex;align-items:center;justify-content:center; }
 .shop .shop-hero--gameplay .shop-chip__icon { position:static;inset:auto;transform:none;width:calc(64 * var(--hu));height:calc(64 * var(--hu));flex:none; }
 .shop .shop-hero--gameplay .shop-chip__text { position:static;inset:auto;transform:none;flex:1;min-width:0;width:auto;height:auto; }
 .shop .shop-hero--gameplay .shop-chip__value { --fs:14px;height:auto;line-height:1.2; }
}
@media(min-width:760px){
 .shop .shop-row--quizBundles,.shop .shop-row--adventureBundles {grid-template-columns:repeat(auto-fit,minmax(300px,1fr));}
}

/* ---- What the goods are for, ladder labels and the bought-separately comparison (owner, 18 Nov 2026) ---------- */
.shop-heading__use {
  margin: 4px 0 8px;
  color: rgba(27, 37, 89, 0.82);
  font-weight: var(--w-medium);
  font-size: 13px;
  line-height: 1.35;
}
.shop-heading__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #1f6fd1;
  font: inherit;
  font-weight: var(--w-bold);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.shop-compare {
  margin: 0;
  color: #4a5e85;
  font-weight: var(--w-medium);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}
.shop-compare__price {
  font-weight: var(--w-bold);
  color: #31406b;
  text-decoration-thickness: 1.5px;
  white-space: nowrap;
}
.shop-card__ladder {
  flex: none;
  padding: 2px 7px;
  border-radius: 9px;
  background: #1b2559;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.shop-card__ladder--best { background: #0d8439; }
/* pack cards: picture, labels, comparison and pill each have their own band; a card with a comparison is taller */
.shop .shop-row--tickets, .shop .shop-row--gems, .shop .shop-row--coins, .shop .shop-row--helpers { height: auto; grid-auto-rows: auto; }
.shop .shop-card--pack { min-height: 190px; }
.shop .shop-card--pack:has(.shop-card__compare) { min-height: 236px; }
.shop .shop-card--pack .shop-card__art { top: 36px; bottom: 108px; }
.shop .shop-card--pack:has(.shop-card__compare) .shop-card__art { bottom: 146px; }
.shop .shop-card__promos { height: 44px; flex-direction: column; justify-content: flex-end; gap: 3px; }
.shop .shop-card--pack:has(.shop-card__compare) .shop-card__promos { bottom: 96px; }
.shop .shop-card__compare { position: absolute; left: 6px; right: 6px; bottom: 60px; height: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.shop .shop-card__compare .shop-compare__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* supply bundles and wide cards: the comparison sits between the saving and the pill */
.shop .shop-bundle__buy .shop-compare { margin-left: auto; text-align: right; }
.shop .shop-bundle__buy .shop-card__badge { margin-right: 0; }
.shop .shop-bundle__buy .shop-compare .shop-compare__label { display: block; }
.shop .shop-card__pass-cta .shop-compare .shop-compare__label { display: block; }
/* the starter hero: the comparison under the saving tag, on a light plate so it reads over the meadow */
.shop-hero__compare { width: max-content; max-width: calc(280 * var(--hu)); padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.92); text-align: left; }
.shop-hero__compare .shop-compare__label { display: block; }
@media (max-width: 759px) {
  .shop-hero:not(.shop-hero--gameplay):has(.shop-hero__compare) { height: calc(640 * var(--hu) + 30px); }
}
.layout-wide .shop .shop-card--pack:has(.shop-card__compare) { min-height: 236px; }
