/* One card layout across Home, Browse, recommendations and saved-game lists.
   The established mobile Browse card is the reference; preserve its breakpoint rules. */
body[data-page] .game-card.compact-game-card,
body[data-page] .game-card.egg-wishlist-card {
  position:relative;
  min-width:0;
  container-type:inline-size;
  overflow:hidden;
  background:var(--surface,#0F1A3A);
  border:1px solid var(--border,#1E2D5C);
  border-radius:10px;
}
body[data-page] .game-card.compact-game-card {
  display:block;
  height:100%;
}
body[data-page] .game-card.compact-game-card > a {
  display:block;
  width:100%;
  min-width:0;
  height:auto;
  color:inherit;
  text-decoration:none;
}
body[data-page] .game-card.compact-game-card > a > img,
body[data-page] .game-card.compact-game-card > a > .artwork-fallback,
body[data-page] .game-card.egg-wishlist-card > a > img {
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  aspect-ratio:460/215;
  object-fit:contain;
  border-radius:0;
}
body[data-page] .game-card.compact-game-card > a > .artwork-fallback {
  display:grid;
  place-items:center;
}
body[data-page] .game-card.compact-game-card > a > .artwork-fallback > img {
  width:70px;
  height:70px;
  min-height:0;
  aspect-ratio:1;
  object-fit:contain;
}
body[data-page] .game-card.compact-game-card .card-body,
body[data-page] .game-card.egg-wishlist-card .card-body {
  box-sizing:border-box;
  display:grid;
  grid-template-columns:max-content max-content max-content minmax(0,1fr) max-content;
  grid-template-rows:auto auto;
  align-content:start;
  align-items:center;
  gap:9px 7px;
  width:100%;
  min-width:0;
  min-height:0;
  padding:13px 14px 14px;
}
body[data-page] .game-card.compact-game-card .card-body::before,
body[data-page] .game-card.egg-wishlist-card .card-body::before {
  content:none;
}
body[data-page] .game-card.compact-game-card .compact-game-title,
body[data-page] .game-card.egg-wishlist-card .card-body > h2 {
  grid-column:1/-1;
  grid-row:1;
  display:block;
  margin:0;
  min-width:0;
  min-height:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow-wrap:normal;
  -webkit-line-clamp:unset;
  font-size:15px;
  line-height:1.4;
  font-weight:700;
  color:var(--text,#E6ECFF);
}
body[data-page] .game-card.egg-wishlist-card .card-body > h2 > a {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit;
  text-decoration:none;
}
body[data-page] .game-card.compact-game-card [data-price-app],
body[data-page] .game-card.compact-game-card [data-price-app] .price-row,
body[data-page] .game-card.compact-game-card .egg-edition-card-price,
body[data-page] .game-card.compact-game-card .egg-edition-card-price .price-row,
body[data-page] .game-card.egg-wishlist-card .price-row {
  display:contents;
}
body[data-page] .game-card.compact-game-card .card-body .price,
body[data-page] .game-card.egg-wishlist-card .card-body .price {
  grid-column:1;
  grid-row:2;
  display:block;
  justify-self:start;
  align-self:center;
  margin:0;
  padding:0;
  border:0;
  min-width:0;
  font-size:clamp(19px,5.4cqw,23px);
  font-weight:800;
  line-height:1.3;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
body[data-page] .game-card.compact-game-card .card-body .discount,
body[data-page] .game-card.egg-wishlist-card .card-body .discount {
  grid-column:2;
  grid-row:2;
  justify-self:start;
  align-self:center;
  margin:0;
  padding:4px 7px;
  border-radius:999px;
  font-size:12px;
  line-height:1.3;
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .card-body del,
body[data-page] .game-card.egg-wishlist-card .card-body del {
  grid-column:3;
  grid-row:2;
  justify-self:start;
  align-self:center;
  min-width:0;
  margin:0;
  font-size:12px;
  line-height:1.3;
  color:var(--muted,#8A98C4);
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .card-body .stage,
body[data-page] .game-card.egg-wishlist-card .card-body .stage {
  grid-column:5;
  grid-row:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:end;
  align-self:center;
  width:fit-content;
  max-width:100%;
  min-height:28px;
  margin:0;
  padding:3px 9px 3px 5px;
  gap:5px;
  border:1px solid currentColor;
  border-radius:10px;
  background:color-mix(in srgb,currentColor 6%,transparent);
  font-size:12px;
  line-height:1.2;
  font-weight:700;
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .stage .stage-icon,
body[data-page] .game-card.egg-wishlist-card .stage .stage-icon {
  width:22px;
  height:22px;
  min-height:0;
  flex:0 0 22px;
  aspect-ratio:1;
  object-fit:contain;
}
body[data-page] .game-card.compact-game-card .card-body .catalog-status,
body[data-page] .game-card.compact-game-card .card-body [data-price-delayed] {
  grid-column:1/-1;
  grid-row:auto;
  justify-self:start;
  align-self:center;
  margin:0;
  font-size:12px;
}
body[data-page] .game-card.compact-game-card .card-body .catalog-status + .catalog-status {
  grid-row:auto;
}
body[data-page] .game-card.egg-wishlist-card {
  display:flex;
  flex-direction:column;
}
body[data-page] .game-card.egg-wishlist-card > a {
  display:block;
  flex:none;
}
body[data-page] .game-card.egg-wishlist-card .card-body {
  flex:1;
}
body[data-page] .game-card.egg-wishlist-card .card-body > p {
  grid-column:1/-1;
  grid-row:auto;
  margin:0;
  font-size:11px;
  color:var(--muted,#8A98C4);
}
/* Constrain compact cards by the available card width, not viewport width:
   sale details wrap beneath current price while the category stays right. */
@container (max-width:370px) {
  body[data-page] .game-card.compact-game-card .card-body,
  body[data-page] .game-card.egg-wishlist-card .card-body {
    grid-template-columns:max-content max-content minmax(0,1fr) max-content;
    grid-template-rows:auto auto auto;
  }
  body[data-page] .game-card.compact-game-card .card-body .stage,
  body[data-page] .game-card.egg-wishlist-card .card-body .stage {
    grid-column:4;
    grid-row:2;
    justify-self:end;
  }
  body[data-page] .game-card.compact-game-card .card-body .discount,
  body[data-page] .game-card.egg-wishlist-card .card-body .discount {
    grid-column:1;
    grid-row:3;
    justify-self:start;
  }
  body[data-page] .game-card.compact-game-card .card-body del,
  body[data-page] .game-card.egg-wishlist-card .card-body del {
    grid-column:2;
    grid-row:3;
    justify-self:start;
  }
}
/* Keep the user-selected List mode functional: it intentionally has a side image. */
body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a {
  display:grid;
  grid-template-columns:minmax(110px,200px) minmax(0,1fr);
  align-items:stretch;
}
body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a > img,
body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a > .artwork-fallback {
  height:100%;
  min-height:104px;
  aspect-ratio:auto;
  object-fit:cover;
}
@media (max-width:590px) {
  body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a {
    grid-template-columns:1fr;
  }
  body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a > img,
  body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a > .artwork-fallback {
    height:auto;
    min-height:0;
    aspect-ratio:460/215;
    object-fit:contain;
  }
}
/* Featured shelf keeps its content and order but uses the same card geometry. */
body[data-page="home"] .egg-curated-feature .egg-curated-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:auto;
}
body[data-page="home"] .egg-curated-feature .home-game-card:first-child {
  grid-row:auto;
  grid-column:auto;
}
body[data-page="home"] .egg-curated-feature .home-game-card:first-child > a {
  display:block;
  height:auto;
}
body[data-page="home"] .egg-curated-feature .home-game-card:first-child > a > img,
body[data-page="home"] .egg-curated-feature .home-game-card:first-child > a > .artwork-fallback {
  height:auto;
  max-height:none;
  min-height:0;
  aspect-ratio:460/215;
  object-fit:contain;
}
@media (max-width:820px) {
  body[data-page="home"] .egg-curated-feature .egg-curated-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:560px) {
  body[data-page="home"] .egg-curated-feature .egg-curated-grid {
    grid-template-columns:minmax(0,1fr);
  }
}
/* Controls remain anchored to artwork even when text grows or wraps. */
body[data-page] .game-card.compact-game-card > .egg-card-actions,
body[data-page] .game-card.egg-wishlist-card > .egg-card-actions {
  top:10px;
  left:10px;
  right:10px;
}
body[data-page] .game-card.compact-game-card > .egg-ignore-button,
body[data-page] .game-card.egg-wishlist-card > .egg-ignore-button {
  top:calc(46.739cqw - 54px);
  right:10px;
  bottom:auto;
  left:auto;
}

/* DLC tiles: match the unified artwork, title and pricing hierarchy. */
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell{container-type:inline-size}
body[data-page="game"] .egg-dlc-grid .egg-dlc-item{background:var(--surface,#0F1A3A)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-copy{min-height:0;gap:9px;padding:13px 14px 14px;background:var(--surface,#0F1A3A)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-copy>strong{display:block;width:100%;min-width:0;min-height:0;max-height:none;font-size:15px;font-weight:700;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;-webkit-line-clamp:unset}
body[data-page="game"] .egg-dlc-grid .egg-dlc-bottom{align-items:center;gap:7px;min-height:28px}
body[data-page="game"] .egg-dlc-grid .egg-dlc-bottom>.egg-dlc-price-group{display:inline-flex;align-items:center;gap:7px;flex:0 1 auto;min-width:0;max-width:100%}
body[data-page="game"] .egg-dlc-grid .egg-dlc-price-group>.egg-dlc-price{font-size:clamp(15px,5cqw,21px);line-height:1.3;font-weight:800}
body[data-page="game"] .egg-dlc-grid .egg-dlc-bottom>.egg-dlc-type{align-self:center;max-width:50%;min-height:28px;margin:0 0 0 auto;padding:4px 7px;border-radius:10px;font-weight:700;text-align:right}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell>.egg-card-actions{top:10px;left:10px;right:10px}

/* DLC price-stage badge on the right; retain the content subtype above. */
body[data-page="game"] .egg-dlc-grid .egg-dlc-copy>.egg-dlc-type{
  align-self:flex-start;
  max-width:100%;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  color:var(--muted,#8A98C4);
  font-size:11px;
  line-height:1.3;
  font-weight:600;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-copy .egg-dlc-bottom{
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;
  column-gap:7px;
  width:100%;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-bottom>.egg-dlc-price-group{
  display:flex;
  flex-wrap:wrap;
  column-gap:7px;
  row-gap:4px;
  align-items:center;
  justify-self:start;
  width:auto;
  max-width:100%;
  overflow:visible;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-bottom>.egg-dlc-stage{
  grid-column:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:end;
  align-self:center;
  gap:5px;
  min-height:28px;
  max-width:100%;
  margin:0;
  padding:3px 8px 3px 5px;
  border:1px solid currentColor;
  border-radius:10px;
  background:color-mix(in srgb,currentColor 6%,transparent);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-stage .stage-icon{
  flex:0 0 20px;
  width:20px;
  height:20px;
  min-height:0;
  aspect-ratio:1;
  object-fit:contain;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-stage.free{color:var(--hatched,#3DDC97)}

/* Price-stage edge treatment for every full game card, on desktop and touch.
   The category determines the edge color and follows live price updates. */
body[data-page] .game-card.game-card {
  --egg-edge-color:var(--muted,#8A98C4);
  border-color:var(--border,#1E2D5C);
  box-shadow:none;
  transition:border-color .15s ease,box-shadow .15s ease;
}
body[data-page] .game-card.game-card:has(.stage.incubating){--egg-edge-color:var(--incubating,#FF6B6B)}
body[data-page] .game-card.game-card:has(.stage.cracking){--egg-edge-color:var(--cracking,#7FA8FF)}
body[data-page] .game-card.game-card:has(.stage.hatched){--egg-edge-color:var(--hatched,#3DDC97)}
body[data-page] .game-card.game-card:has(.stage.cooked){--egg-edge-color:var(--cooked,#FF9A3D)}
body[data-page] .game-card.game-card:has(.stage.eggcube){--egg-edge-color:var(--text,#E6ECFF)}
body[data-page] .game-card.game-card:has(.stage.free){--egg-edge-color:var(--hatched,#3DDC97)}
/* Saved-card categories are also available before price markup refreshes. */
body[data-page] .game-card.egg-wishlist-card[data-wishlist-stage="incubating"]{--egg-edge-color:var(--incubating,#FF6B6B)}
body[data-page] .game-card.egg-wishlist-card[data-wishlist-stage="cracking"]{--egg-edge-color:var(--cracking,#7FA8FF)}
body[data-page] .game-card.egg-wishlist-card[data-wishlist-stage="hatched"]{--egg-edge-color:var(--hatched,#3DDC97)}
body[data-page] .game-card.egg-wishlist-card[data-wishlist-stage="cooked"]{--egg-edge-color:var(--cooked,#FF9A3D)}
body[data-page] .game-card.egg-wishlist-card[data-wishlist-stage="eggcube"]{--egg-edge-color:var(--text,#E6ECFF)}
body[data-page] .game-card.game-card:hover,
body[data-page="home"] .egg-curated-grid .game-card.game-card:hover{
  border-color:var(--egg-edge-color);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--egg-edge-color) 32%,transparent),
             0 0 18px color-mix(in srgb,var(--egg-edge-color) 38%,transparent);
}
body[data-page] .game-card.game-card:focus-visible,
body[data-page] .game-card.game-card :focus-visible {
  outline-color:var(--egg-edge-color);
}
/* DLC uses the exact same price-stage palette; keep included entitlements muted. */
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell {
  --egg-edge-color:var(--muted,#8A98C4);
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell[data-dlc-stage="incubating"]{--egg-edge-color:var(--incubating,#FF6B6B)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell[data-dlc-stage="cracking"]{--egg-edge-color:var(--cracking,#7FA8FF)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell[data-dlc-stage="hatched"],
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell[data-dlc-stage="free"]{--egg-edge-color:var(--hatched,#3DDC97)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell[data-dlc-stage="cooked"]{--egg-edge-color:var(--cooked,#FF9A3D)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell[data-dlc-stage="eggcube"]{--egg-edge-color:var(--text,#E6ECFF)}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell:not([data-dlc-included]) > .egg-dlc-item {
  border-color:var(--border,#1E2D5C);
  box-shadow:none;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell:hover > .egg-dlc-item {
  border-color:var(--egg-edge-color);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--egg-edge-color) 32%,transparent),
             0 0 18px color-mix(in srgb,var(--egg-edge-color) 38%,transparent);
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell > .egg-dlc-item:focus-visible {
  outline-color:var(--egg-edge-color);
}
@media (prefers-reduced-motion:reduce) {
  body[data-page] .game-card.game-card,
  body[data-page="game"] .egg-dlc-grid .egg-dlc-item {
    transition:none;
  }
}

/* Suppress sticky browser hover after a touch, but keep an actively
   tracked finger highlight until that finger is released. */
body[data-page] .game-card.game-card:focus-within:not(:hover):not(.egg-touch-edge-glow),
body[data-page="home"] .egg-curated-grid .game-card.game-card:focus-within:not(:hover):not(.egg-touch-edge-glow) {
  border-color:var(--border,#1E2D5C);
  box-shadow:none;
}
body[data-page="game"] .egg-dlc-grid .egg-dlc-shell:focus-within:not(:hover):not(.egg-touch-edge-glow) > .egg-dlc-item {
  border-color:var(--border,#1E2D5C);
  box-shadow:none;
}
@media (hover:none) {
  body[data-page] .game-card.game-card:is(:hover,:focus-within):not(.egg-touch-edge-glow),
  body[data-page="home"] .egg-curated-grid .game-card.game-card:is(:hover,:focus-within):not(.egg-touch-edge-glow) {
    border-color:var(--border,#1E2D5C);
    box-shadow:none;
  }
  body[data-page="game"] .egg-dlc-grid .egg-dlc-shell:is(:hover,:focus-within):not(.egg-touch-edge-glow) > .egg-dlc-item {
    border-color:var(--border,#1E2D5C);
    box-shadow:none;
  }
}

/* Browse desktop: match the approved mobile Browse card composition.
   The price and category always share the second row. Sale details remain
   on that row when the card has space, otherwise wrap below the price. */
@media (min-width:641px) {
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card {
    min-width:0;
    container-type:inline-size;
    height:100%;
    overflow:hidden;
  }
  body[data-page="browse"] .browse-results .compact-game-grid:not(.game-list) > .compact-game-card > a {
    display:block;
    height:auto;
    min-width:0;
    width:100%;
  }
  body[data-page="browse"] .browse-results .compact-game-grid:not(.game-list) > .compact-game-card > a > img,
  body[data-page="browse"] .browse-results .compact-game-grid:not(.game-list) > .compact-game-card > a > .artwork-fallback {
    display:block;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    aspect-ratio:460/215;
    object-fit:contain;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body {
    display:grid;
    grid-template-columns:max-content max-content max-content minmax(0,1fr) max-content;
    grid-template-rows:auto auto;
    align-content:start;
    align-items:center;
    gap:9px 7px;
    min-width:0;
    min-height:0;
    width:100%;
    padding:13px 14px 14px;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body::before {
    content:none;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .compact-game-title {
    display:block;
    grid-column:1/-1;
    grid-row:1;
    align-self:center;
    min-width:0;
    min-height:0;
    max-width:100%;
    margin:0;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    overflow-wrap:normal;
    -webkit-line-clamp:unset;
    font-size:15px;
    line-height:1.4;
    font-weight:700;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card [data-price-app],
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card [data-price-app] .price-row,
  body[data-page="browse"] .browse-results .compact-game-grid > .egg-edition-product-card .egg-edition-card-price,
  body[data-page="browse"] .browse-results .compact-game-grid > .egg-edition-product-card .egg-edition-card-price .price-row {
    display:contents;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .price {
    grid-column:1;
    grid-row:2;
    justify-self:start;
    align-self:center;
    min-width:0;
    padding:0;
    margin:0;
    border:0;
    font-size:clamp(18px,5.2cqw,23px);
    line-height:1.3;
    font-weight:800;
    white-space:nowrap;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .discount {
    grid-column:2;
    grid-row:2;
    justify-self:start;
    align-self:center;
    min-width:0;
    margin:0;
    padding:4px 7px;
    font-size:12px;
    white-space:nowrap;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body del {
    grid-column:3;
    grid-row:2;
    justify-self:start;
    align-self:center;
    min-width:0;
    margin:0;
    font-size:12px;
    white-space:nowrap;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .stage {
    display:inline-flex;
    grid-column:5;
    grid-row:2;
    justify-self:end;
    align-self:center;
    justify-content:center;
    align-items:center;
    gap:5px;
    width:fit-content;
    min-height:28px;
    max-width:100%;
    margin:0;
    padding:3px 8px 3px 5px;
    font-size:12px;
    line-height:1.2;
    white-space:nowrap;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .stage .stage-icon {
    width:22px;
    height:22px;
    min-height:0;
    flex:0 0 22px;
    object-fit:contain;
  }
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .catalog-status,
  body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body [data-price-delayed] {
    grid-column:1/-1;
    grid-row:auto;
    justify-self:start;
    align-self:center;
    margin:0;
  }
  /* These rules apply to the narrower desktop cards even when the viewport
     itself is wide (the sidebar and column count determine card width). */
  @container (max-width:425px) {
    body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body {
      grid-template-columns:max-content minmax(0,1fr) max-content;
      grid-template-rows:auto auto auto;
    }
    body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .stage {
      grid-column:3;
      grid-row:2;
      justify-self:end;
    }
    body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body .discount {
      grid-column:1;
      grid-row:3;
      justify-self:start;
    }
    body[data-page="browse"] .browse-results .compact-game-grid > .compact-game-card .card-body del {
      grid-column:2;
      grid-row:3;
      justify-self:start;
    }
  }
}

/* Keep every price component on ONE row, across Browse desktop/mobile,
   home cards, edition cards, dynamic recommendations and saved-game cards.
   Width is handled with responsive sizing, never moving prices onto row 3. */
body[data-page] .game-card.compact-game-card .card-body,
body[data-page] .game-card.egg-wishlist-card .card-body {
  display:grid;
  grid-template-columns:max-content max-content max-content minmax(0,1fr) max-content !important;
  /* The row height follows its content, independent of the discount badge. */
  grid-template-rows:auto auto !important;
  column-gap:clamp(3px,1.15cqw,7px);
  align-items:center;
}
body[data-page] .game-card.compact-game-card .card-body .price,
body[data-page] .game-card.egg-wishlist-card .card-body .price {
  grid-column:1 !important;
  grid-row:2 !important;
  justify-self:start;
  font-size:clamp(15px,5cqw,23px);
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .card-body .discount,
body[data-page] .game-card.egg-wishlist-card .card-body .discount {
  grid-column:2 !important;
  grid-row:2 !important;
  justify-self:start;
  font-size:clamp(10px,2.8cqw,12px);
  padding:3px 5px;
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .card-body del,
body[data-page] .game-card.egg-wishlist-card .card-body del {
  grid-column:3 !important;
  grid-row:2 !important;
  justify-self:start;
  font-size:clamp(10px,2.75cqw,12px);
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .card-body .stage,
body[data-page] .game-card.egg-wishlist-card .card-body .stage {
  grid-column:5 !important;
  grid-row:2 !important;
  justify-self:end !important;
  align-self:center;
  font-size:clamp(10px,2.7cqw,12px);
  min-height:24px;
  margin:0 !important;
  padding:3px 6px 3px 3px;
  gap:3px;
  white-space:nowrap;
}
body[data-page] .game-card.compact-game-card .card-body .stage .stage-icon,
body[data-page] .game-card.egg-wishlist-card .card-body .stage .stage-icon {
  width:clamp(16px,4.2cqw,22px);
  height:clamp(16px,4.2cqw,22px);
  flex:0 0 clamp(16px,4.2cqw,22px);
}
body[data-page] .game-card.compact-game-card .card-body .compact-game-title,
body[data-page] .game-card.egg-wishlist-card .card-body > h2 {
  grid-column:1/-1 !important;
  grid-row:1 !important;
  margin:0 !important;
}
/* The prior mobile Browse rules have higher selector specificity; override
   just their grid placements, not the approved artwork and action controls. */
body[data-page="browse"] .browse-results .compact-game-grid:not(.game-list) .compact-game-card .card-body,
body[data-page="browse"] .browse-results .compact-game-grid.game-list .compact-game-card .card-body {
  grid-template-columns:max-content max-content max-content minmax(0,1fr) max-content !important;
  /* The row height follows its content, independent of the discount badge. */
  grid-template-rows:auto auto !important;
}
body[data-page="browse"] .browse-results .compact-game-grid .compact-game-card .card-body .price {grid-column:1 !important;grid-row:2 !important}
body[data-page="browse"] .browse-results .compact-game-grid .compact-game-card .card-body .discount {grid-column:2 !important;grid-row:2 !important}
body[data-page="browse"] .browse-results .compact-game-grid .compact-game-card .card-body del {grid-column:3 !important;grid-row:2 !important}
body[data-page="browse"] .browse-results .compact-game-grid .compact-game-card .card-body .stage {grid-column:5 !important;grid-row:2 !important}
/* Desktop Browse needs cards wide enough for all four items without clipping.
   Grid/List view switching remains as before. */
@media (min-width:981px) {
  body[data-page="browse"] .browse-results .compact-game-grid:not(.game-list) {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,385px),1fr));
  }
}
@media (min-width:641px) and (max-width:980px) {
  body[data-page="browse"] .browse-results .compact-game-grid:not(.game-list) {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));
  }
}
@container (max-width:345px) {
  body[data-page] .game-card.compact-game-card .card-body,
  body[data-page] .game-card.egg-wishlist-card .card-body {
    padding-inline:9px;
    column-gap:3px;
  }
  body[data-page] .game-card.compact-game-card .card-body .price,
  body[data-page] .game-card.egg-wishlist-card .card-body .price {font-size:clamp(13px,5cqw,17px)}
  body[data-page] .game-card.compact-game-card .card-body .discount,
  body[data-page] .game-card.egg-wishlist-card .card-body .discount {
    font-size:10px;
    padding:2px 4px;
  }
  body[data-page] .game-card.compact-game-card .card-body del,
  body[data-page] .game-card.egg-wishlist-card .card-body del {font-size:10px}
  body[data-page] .game-card.compact-game-card .card-body .stage,
  body[data-page] .game-card.egg-wishlist-card .card-body .stage {
    font-size:10px;
    gap:2px;
    min-height:22px;
    padding:2px 4px 2px 2px;
  }
  body[data-page] .game-card.compact-game-card .card-body .stage .stage-icon,
  body[data-page] .game-card.egg-wishlist-card .card-body .stage .stage-icon {
    width:16px;
    height:16px;
    flex-basis:16px;
  }
}

/* Preserve full edition artwork inside the existing, uniformly sized card frame.
   Only mismatched source ratios receive a blurred extension, never a crop. */
body[data-page] .game-card > a.egg-artwork-extended {
  position:relative;
  isolation:isolate;
}
body[data-page] .game-card > a.egg-artwork-extended::before {
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  aspect-ratio:460/215;
  background-image:var(--egg-card-artwork);
  background-position:center;
  background-size:cover;
  filter:blur(16px) brightness(.72);
  transform:scale(1.05);
  pointer-events:none;
  z-index:0;
}
body[data-page] .game-card > a.egg-artwork-extended > img {
  position:relative;
  z-index:1;
  object-fit:contain;
}
body[data-page] .game-card > a.egg-artwork-extended > .card-body {
  position:relative;
  z-index:2;
  background:var(--surface,#0F1A3A);
}
/* Browse list mode has a variable-height side thumbnail, not the standard frame. */
body[data-page="browse"] .compact-game-grid.game-list .compact-game-card > a > img {
  object-fit:cover;
}

/* The scroll track clips outer shadows. Reproduce the category glow
   inside the card only on devices with real pointer hover; mobile keeps the
   original card border and the sitewide touch behavior. */
@media (hover:hover) and (pointer:fine) {
  body[data-page="game"] .egg-similar-track > .game-card.game-card::after {
    content:"";
    position:absolute;
    inset:0;
    z-index:2;
    border:1px solid transparent;
    border-radius:inherit;
    box-shadow:none;
    pointer-events:none;
    transition:border-color .15s ease,box-shadow .15s ease;
  }
  body[data-page="game"] .egg-similar-track > .game-card.game-card:hover::after {
    border-color:var(--egg-edge-color);
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--egg-edge-color) 32%,transparent),
               inset 0 0 16px color-mix(in srgb,var(--egg-edge-color) 38%,transparent);
  }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:reduce) {
  body[data-page="game"] .egg-similar-track > .game-card.game-card::after {
    transition:none;
  }
}


/* Desktop parity: the Home card's category-colored outer edge is canonical.
   Override older Browse/DLC rules with the same stroke and two-layer glow. */
@media (min-width:641px) and (hover:hover) and (pointer:fine) {
  body[data-page="browse"] .browse-results .game-card.game-card:hover,
  body[data-page="game"] .egg-similar-track > .game-card.game-card:hover,
  body[data-page="game"] .egg-dlc-grid .egg-dlc-shell:hover > .egg-dlc-item {
    border-color:var(--egg-edge-color);
    box-shadow:0 0 0 1px color-mix(in srgb,var(--egg-edge-color) 32%,transparent),
               0 0 18px color-mix(in srgb,var(--egg-edge-color) 38%,transparent);
  }
  /* Make physical room for the outer glow in the scrolling Similar Games
     track, while keeping the cards' original width and screen position. */
  body[data-page="game"] .egg-similar-track {
    padding:19px 18px 19px;
    margin:-18px -18px -12px;
    scroll-padding-inline:18px;
  }
  /* The previous inset workaround looked unlike the Home outer glow. */
  body[data-page="game"] .egg-similar-track > .game-card.game-card::after {
    content:none;
  }
}



/* Mobile contact uses precisely the desktop border and outer shadow. */
@media (hover:none), (pointer:coarse) {
  body[data-page] .game-card.game-card.egg-touch-edge-glow,
  body[data-page="home"] .egg-curated-grid .game-card.game-card.egg-touch-edge-glow,
  body[data-page="game"] .egg-dlc-grid .egg-dlc-shell.egg-touch-edge-glow > .egg-dlc-item {
    border-color:var(--egg-edge-color);
    box-shadow:0 0 0 1px color-mix(in srgb,var(--egg-edge-color) 32%,transparent),
               0 0 18px color-mix(in srgb,var(--egg-edge-color) 38%,transparent);
    transition:none;
  }
  body[data-page="game"] .egg-similar-track {
    padding:19px 18px 19px;
    margin:-18px -18px -12px;
    scroll-padding-inline:18px;
  }
}
