/* Game grid A: Gift Road stays wide; every other existing preview is a
   two-column card. This file is loaded after the large legacy sheets, so all
   sizing lives here and does not alter the artwork or handlers of a game. */
.pu-root #content.games-layout-a{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
  padding:6px 14px calc(28px + env(safe-area-inset-bottom));
}
.pu-root #content.games-layout-a>.pulse-game{
  position:relative;width:auto;min-width:0;height:174px;min-height:0;
  margin:0;padding:0;overflow:hidden;border-radius:22px;
  contain:layout paint style;content-visibility:auto;
  contain-intrinsic-size:auto 174px;
}
.pu-root #content.games-layout-a>.pulse-game[data-go="giftroad"]{
  grid-column:1/-1;height:194px;contain-intrinsic-size:auto 194px;
}
.pu-root #content.games-layout-a .gxl{
  position:absolute;z-index:6;inset:0;width:auto;pointer-events:none;
}
.pu-root #content.games-layout-a .gxt{
  position:absolute;left:12px;right:10px;bottom:12px;display:flex;
  align-items:flex-end;margin:0;
}
.pu-root #content.games-layout-a .gxt b{
  color:#fff;font:800 18px/1.05 Golos,Arial,sans-serif;letter-spacing:-.5px;
  white-space:normal;text-shadow:0 2px 12px #000;
}
.pu-root #content.games-layout-a>.pulse-game[data-go="giftroad"] .gxt b{font-size:23px}
.pu-root #content.games-layout-a :is(.gxsub,.gxtag,.gxst){display:none}
.pu-root #content.games-layout-a .g-live{
  position:absolute;z-index:7;right:8px;top:8px;margin:0;
  max-width:calc(100% - 16px);padding:5px 8px;border:1px solid #ffffff20;
  border-radius:999px;background:#101a2be8;font-size:10px;line-height:1.2;
  color:#b9f6d7;-webkit-backdrop-filter:none;backdrop-filter:none;
}
.pu-root #content.games-layout-a .g-live i{width:6px;height:6px}
.pu-root #content.games-layout-a .gxv{
  z-index:2;right:-5%;top:43%;width:110%;overflow:visible;opacity:.98;
}
/* Individual scale corrections only compensate for the new half-width crop.
   The SVG scenes themselves are unchanged. */
.pu-root #content.games-layout-a>.pulse-game[data-go="rocket"] .gxv,
.pu-root #content.games-layout-a>.pulse-game[data-go="arena"] .gxv{width:108%;right:-4%}
.pu-root #content.games-layout-a>.pulse-game[data-go="upgrade"] .gxv{width:104%;right:-2%}
.pu-root #content.games-layout-a>.pulse-game[data-go="mines"] .gxv{width:106%;right:-3%}
.pu-root #content.games-layout-a>.pulse-game[data-go="jump"] .gxv,
.pu-root #content.games-layout-a>.pulse-game[data-go="scratch"] .gxv,
.pu-root #content.games-layout-a>.pulse-game[data-go="wheel"] .gxv{width:108%;right:-4%}
.pu-root #content.games-layout-a>.pulse-game[data-go="upgrade"] .gxv svg{transform:scale(1.02)}
.pu-root #content.games-layout-a>.pulse-game[data-go="mines"] .gxv svg{transform:scale(.98)}
.pu-root #content.games-layout-a>.pulse-game[data-go="giftroad"] .gxv{
  inset:0;width:100%;height:100%;aspect-ratio:auto;transform:none;
  overflow:hidden;border-radius:0;
}
.pu-root #content.games-layout-a .gr-preview,
.pu-root #content.games-layout-a .gr-preview img{
  display:block;width:100%;height:100%;object-fit:cover;object-position:center;
}
/* The shell already toggles these classes on idle/background. Extend that
   lifecycle to preview scenes so an off-screen games page cannot keep SVG
   timelines hot behind a modal or while Telegram is backgrounded. */
body:is(.idle-still,.app-away,.game-open) #content.games-layout-a>.pulse-game *,
#content.games-layout-a>.pulse-game.preview-paused *{
  animation-play-state:paused!important;
}
@media(max-width:350px){
  .pu-root #content.games-layout-a{gap:8px;padding-left:10px;padding-right:10px}
  .pu-root #content.games-layout-a>.pulse-game{
    height:158px;border-radius:19px;contain-intrinsic-size:auto 158px;
  }
  .pu-root #content.games-layout-a>.pulse-game[data-go="giftroad"]{
    height:178px;contain-intrinsic-size:auto 178px;
  }
  .pu-root #content.games-layout-a .gxt{left:10px;right:8px;bottom:10px}
  .pu-root #content.games-layout-a .gxt b{font-size:16px}
  .pu-root #content.games-layout-a>.pulse-game[data-go="giftroad"] .gxt b{font-size:21px}
}
@media(min-width:700px){
  .pu-root #content.games-layout-a{max-width:720px;margin-inline:auto}
}
@media(prefers-reduced-motion:reduce){
  .pu-root #content.games-layout-a>.pulse-game *{animation:none!important}
}
