body[data-page="home"] #main{padding-top:24px}
.home-shelf{margin:0 0 32px}
.home-shelf-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.home-shelf-heading h2{font-size:24px;line-height:1.25;margin:0}
.home-shelf-heading>a{font-size:14px;white-space:nowrap}
.home-source{margin:-8px 0 16px}
.home-game-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
a.home-game-card{display:block;text-decoration:none;color:var(--ink,#E6ECFF);border:1px solid var(--border,#1E2D5C);border-radius:10px;overflow:hidden;background:var(--surface,#0F1A3A)}
a.home-game-card:hover{border-color:var(--accent,#5B8CFF)}
a.home-game-card:focus-visible{outline:3px solid var(--accent,#5B8CFF);outline-offset:3px}
.home-game-card>img{width:100%;height:auto;aspect-ratio:460/215;object-fit:cover;display:block}
.home-game-card .card-body{padding:16px;display:flex;flex-direction:column;gap:8px}
.home-game-card .price-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.home-game-card .price{font-size:20px}
.home-game-card del{font-size:13px;color:var(--muted,#8A98C4)}
.home-game-card .stage{align-self:flex-start;font-size:13px}
.home-empty{padding:16px;border:1px solid var(--border,#1E2D5C);border-radius:10px}
@media(max-width:1050px){.home-game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.home-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-shelf-heading h2{font-size:20px}}
@media(max-width:420px){.home-game-grid{grid-template-columns:minmax(0,1fr)}}


/* Shared compact cards: stable artwork, price and stage rows. */
.compact-game-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
a.compact-game-card{display:flex;flex-direction:column;height:100%}
.compact-game-card>img,.compact-game-card>.artwork-fallback{flex:none;width:100%;aspect-ratio:460/215}
.compact-game-card .card-body{padding:16px;min-height:104px;justify-content:center;flex:1}
.compact-game-card [data-compact-price]{display:flex;flex-direction:column;gap:8px;width:100%;min-width:0}
.compact-game-card .price-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;min-height:28px;margin:0;width:100%}
.compact-game-card .price{font-size:20px;line-height:1.4;white-space:nowrap;font-variant-numeric:tabular-nums}
.compact-game-card .discount,.compact-game-card del{white-space:nowrap}
.compact-game-card .stage{display:inline-flex;align-items:center;align-self:flex-start;min-height:32px;margin:0;line-height:1.25;font-size:13px}
.compact-game-card .stage-icon{width:32px;height:32px;min-height:0;aspect-ratio:1;object-fit:contain;background:none}
.compact-game-grid.game-list{grid-template-columns:1fr}
.game-list a.compact-game-card{display:grid;grid-template-columns:240px minmax(0,1fr)}
.game-list .compact-game-card .card-body{display:flex;flex-direction:column;justify-content:center;padding:16px}
.game-list .compact-game-card [data-compact-price]{max-width:360px;grid-column:auto;grid-row:auto}
@media(max-width:1050px){.compact-game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.compact-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-list a.compact-game-card{grid-template-columns:160px minmax(0,1fr)}}
@media(max-width:540px){.game-list a.compact-game-card{grid-template-columns:1fr}.game-list .compact-game-card [data-compact-price]{max-width:none}}
@media(max-width:420px){.compact-game-grid{grid-template-columns:minmax(0,1fr)}}

.game-list .compact-game-card .stage-icon{min-height:0;width:32px;height:32px}

/* Stage colors follow the rendered badge, including live price refreshes. */
[data-price-app]:has(.stage.incubating) .price,.game-card:has(.stage.incubating) .price{color:var(--incubating)}
[data-price-app]:has(.stage.cracking) .price,.game-card:has(.stage.cracking) .price{color:var(--cracking)}
[data-price-app]:has(.stage.hatched) .price,.game-card:has(.stage.hatched) .price{color:var(--hatched)}
[data-price-app]:has(.stage.cooked) .price,.game-card:has(.stage.cooked) .price{color:var(--cooked)}
.game-card .badge-row{justify-content:flex-end}
.compact-game-card .stage{align-self:flex-end;justify-content:flex-end}
.game-list .compact-game-card [data-compact-price]{max-width:none}
.game-list .compact-game-card .price-row{max-width:360px}

/* Reference card: title and stage above a separated price row. */
.compact-game-card .card-body{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(48px,1fr) auto;gap:12px 8px;min-height:144px;padding:16px}
.compact-game-card .compact-game-title{grid-column:1;grid-row:1;align-self:center;margin:0;min-width:0;font-size:16px;line-height:1.35;font-weight:700;color:var(--ink,#E6ECFF);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.compact-game-card [data-compact-price]{display:contents}
.compact-game-card .stage{grid-column:2;grid-row:1;align-self:center;justify-self:end;display:inline-flex;gap:4px;padding:5px 7px;border:1px solid currentColor;border-radius:10px;background:color-mix(in srgb,currentColor 6%,transparent);font-size:11px;font-weight:700;white-space:nowrap}
.compact-game-card .stage-icon{width:26px;height:26px;min-height:0}
.compact-game-card .price-row{grid-column:1 / -1;grid-row:2;max-width:none;border-top:1px solid var(--border,#1E2D5C);padding-top:12px;min-height:46px;gap:8px}
.compact-game-card .price{font-size:24px;font-weight:800;line-height:1.3}
.compact-game-card .price-row:has(.discount) .price{padding-right:8px;border-right:1px solid var(--border,#1E2D5C)}
.compact-game-card .discount{font-size:12px;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:999px;padding:4px 7px;background:color-mix(in srgb,currentColor 8%,transparent)}
.compact-game-card del{font-size:12px;color:var(--muted,#8A98C4)}
.compact-game-card:has(.stage.incubating) .discount{color:var(--incubating)}
.compact-game-card:has(.stage.cracking) .discount{color:var(--cracking)}
.compact-game-card:has(.stage.hatched) .discount{color:var(--hatched)}
.compact-game-card:has(.stage.cooked) .discount{color:var(--cooked)}
.compact-game-card .catalog-status,.compact-game-card [data-price-delayed]{grid-column:1 / -1;grid-row:2}
.game-list .compact-game-card .card-body{display:grid}
.game-list .compact-game-card .price-row{max-width:none}
.game-list .compact-game-card .stage-icon{width:26px;height:26px;min-height:0}
@media(min-width:1060px){.home-game-grid,.compact-game-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.compact-game-grid.game-list{grid-template-columns:1fr}.compact-game-card .compact-game-title{font-size:18px}.compact-game-card .stage{font-size:12px}.compact-game-card .stage-icon{width:30px;height:30px}}

@media(max-width:1059px){.home-game-grid,.compact-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.home-game-grid,.compact-game-grid{grid-template-columns:minmax(0,1fr)}}

/* Shared outlined stage badges on product and methodology pages. */
body[data-page="game"] .stage,body[data-page="methodology"] .stage{padding:5px 7px;border:1px solid currentColor;border-radius:10px;background:color-mix(in srgb,currentColor 6%,transparent);box-shadow:0 0 12px color-mix(in srgb,currentColor 12%,transparent);width:fit-content;max-width:100%;white-space:nowrap}
.compact-game-card .stage{box-shadow:0 0 12px color-mix(in srgb,currentColor 12%,transparent)}

/* Category below the title; current price at the upper right on every card. */
.game-card .card-body{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:minmax(48px,auto) 1px auto;gap:12px 8px}
.game-card .card-body::before{content:"";grid-column:1 / -1;grid-row:2;height:1px;background:var(--border,#1E2D5C)}
.game-card .card-body>h2{grid-column:1 / 3;grid-row:1;align-self:center;margin:0}
.game-card [data-price-app],.game-card [data-price-app] .badge-row,.game-card .price-row{display:contents}
.game-card [data-price-app] .price{grid-column:3;grid-row:1;align-self:center;justify-self:end;padding:0;border:0;font-size:24px;white-space:nowrap}
.game-card [data-price-app] .stage{grid-column:1;grid-row:3;align-self:center;justify-self:start;justify-content:flex-start;margin:0;width:fit-content}
.game-card [data-price-app] .discount{grid-column:2;grid-row:3;align-self:center;white-space:nowrap}
.game-card [data-price-app] del{grid-column:3;grid-row:3;align-self:center;justify-self:end;white-space:nowrap}
.game-card [data-price-app]>p,.game-card [data-price-app] .learning,.game-card .actions{grid-column:1 / -1;grid-row:auto}
.game-card [data-price-app] .catalog-status,.game-card [data-price-delayed]{grid-column:1 / -1;grid-row:auto}
.game-list .game-card .card-body{display:grid;grid-template-columns:minmax(0,1fr) auto auto}
.game-list .game-card [data-price-app]{display:contents}
.game-card .price-row:has(.discount) .price{padding-right:0;border-right:0}

/* Keep the sale percentage and original price together at the right edge. */
.game-card .card-body>h2{grid-column:1}
.game-card [data-price-app] .price{grid-column:2 / -1}
.game-card [data-price-app] .discount{justify-self:end}

/* Shared card interaction colors follow the live category badge. */
.game-card{--card-stage-color:var(--muted)}
.game-card:has(.stage.incubating){--card-stage-color:var(--incubating)}
.game-card:has(.stage.cracking){--card-stage-color:var(--cracking)}
.game-card:has(.stage.hatched){--card-stage-color:var(--hatched)}
.game-card:has(.stage.cooked){--card-stage-color:var(--cooked)}
.game-card:has(.stage.eggcube){--card-stage-color:var(--text)}
.game-card.game-card:is(:hover,:focus-within){border-color:var(--card-stage-color);box-shadow:0 0 16px color-mix(in srgb,var(--card-stage-color) 24%,transparent)}
.game-card.game-card:focus-visible,.game-card.game-card :focus-visible{outline-color:var(--card-stage-color)}
