/* LOCAL R2: full-bleed public game tiles and native-resolution hero artwork.
   Source bitmaps remain intact. Logo layers keep their intrinsic proportions.
   Existing text plates, themes, card geometry, links and business logic stay. */
body.ig-premium #public-game-grid .game-card .game-art:not(.custom) {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
/* Reuse the crisp Scania scene; the lower source crop excludes its baked top band. */
body.ig-premium #public-game-grid .game-card .game-art.ets2 {
  background-image: url("game-card-ets2-r3.webp");
  background-size: auto 124%;
  background-position: center bottom;
}
body.ig-premium #public-game-grid .game-card .game-art.fs25 { background-position: 86% center; }
body.ig-premium #public-game-grid .game-card .game-art.valheim { background-position: 62% center; }
body.ig-premium #public-game-grid .game-card .game-art.project-zomboid {
  background-image: url("game-card-project-zomboid-r3.webp");
  background-position: center 28%;
}
body.ig-premium #public-game-grid .game-card .game-art.palworld {
  background-image: url("game-card-palworld-r3.webp");
  background-position: center;
}

/* Transparent logo margins reveal a real edge-to-edge game scene. */
body.ig-premium #public-game-grid .game-card .game-art.rust {
  background-image: url("game-hero-rust.png"), linear-gradient(#07101638, #07101638), url("game-card-rust-scene-r3.webp");
  background-size: 108% auto, 100% 100%, cover;
  background-position: center, center, 57% center;
}
body.ig-premium #public-game-grid .game-card .game-art.ark {
  background-image: url("game-card-ark-logo-r3.webp"), linear-gradient(#07101630, #07101630), url("game-card-ark-scene-r3.webp");
  background-size: auto 132%, 100% 100%, cover;
  background-position: center, center, 52% center;
}

body.configurator-page #config-game-art.palworld { background-image: url("game-hero-palworld-r3.webp"); }
body.configurator-page #config-game-art.fs25 { background-image: url("game-hero-fs25.jpg"); }
body.configurator-page #config-game-art.ets2 { background-image: url("game-hero-ets2.jpg"); }
body.configurator-page #config-game-art.valheim { background-image: url("game-hero-valheim-r3.webp"); background-position: center bottom; }
body.configurator-page #config-game-art.terraria { background-image: url("game-hero-terraria-r3.webp"); background-position: center 60%; }
body.configurator-page #config-game-art.project-zomboid { background-image: url("game-hero-project-zomboid-r2.jpg"); background-position: center 28%; }
body.configurator-page #config-game-art.rust { background-image: url("game-scene-rust-r2.jpg"); background-position: center 55%; }
body.configurator-page #config-game-art.ark { background-image: url("game-scene-ark-r2.jpg"); background-position: center 58%; }

/* Logos are decorative; accessible HTML titles remain unchanged. */
body.configurator-page #config-game-art:is(.rust, .ark)::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 0;
  pointer-events: none;
  background-repeat: no-repeat;
}
body.configurator-page #config-game-art.rust::before {
  background-image: url("game-hero-rust.png");
  background-size: min(78%, 1150px) auto;
  background-position: 95% 40%;
}
body.configurator-page #config-game-art.ark::before {
  background-image: url("game-hero-ark-r2.png");
  background-size: auto 132%;
  background-position: 88% 50%;
}

@supports (container-type: size) and (width: 1cqw) {
  body.configurator-page #config-game-art:is(.fivem, .ets2) { container-type: size; }
  body.configurator-page #config-game-art:is(.fivem, .ets2)::before {
    content: "";
    position: absolute;
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
    background-repeat: no-repeat;
  }
  /* Virtual window x=0..1599,y=160..999 excludes baked black top rows.
     Cover the 1600:840 window, not the padded 1600:1000 source canvas. */
  body.configurator-page #config-game-art.ets2::before {
    width: max(100cqw, 190.476190cqh);
    height: max(100cqh, 52.5cqw);
    background-image: url("game-hero-ets2.jpg");
    background-size: 100% auto;
    background-position: center bottom;
  }
  body.configurator-page #config-game-art.fivem::before {
    width: max(100cqw, 171.428571cqh);
    height: max(100cqh, 58.333333cqw);
    background-image: linear-gradient(180deg, transparent, rgba(0,0,0,.529412)), url("game-hero-fivem.png"), linear-gradient(115deg, #0c0d10, #050506);
    background-size: 100% 100%, 58.333333% auto, 100% 100%;
    background-position: center;
  }
}

@media (max-width: 700px) {
  body.configurator-page #config-game-art.rust::before {
    background-size: 104% auto;
    background-position: center -35px;
  }
  body.configurator-page #config-game-art.ark::before {
    height: 230px;
    background-size: auto 132%;
    background-position: center center;
  }
  body.configurator-page #config-game-art.terraria { background-position: 40% center; }
  body.configurator-page #config-game-art.project-zomboid { background-position: center 37%; }
}
