/* ── Yandex Games side rails (desktop only) ── */
.pulse-rail-ads{
  display:none;
  position:fixed;
  top:calc(var(--pulse-header-h, 64px) + 16px);
  bottom:16px;
  width:200px;
  z-index:3;
  pointer-events:none;
  flex-direction:column;
  justify-content:center;
}
.pulse-rail-ads--left{
  left:max(8px, env(safe-area-inset-left, 0px));
}
.pulse-rail-ads--right{
  right:max(8px, env(safe-area-inset-right, 0px));
}

.pulse-rail-ads-inner{
  display:flex;flex-direction:column;gap:6px;
  width:100%;max-height:100%;
  overflow:auto;padding:8px 4px;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.1) transparent;
  pointer-events:auto;
}
.pulse-rail-ads-inner::-webkit-scrollbar{width:4px}
.pulse-rail-ads-inner::-webkit-scrollbar-thumb{background:rgba(255,255,255,.1);border-radius:4px}

.pulse-yg-rail-head{
  display:flex;align-items:center;justify-content:flex-end;
  padding:0 4px 8px;
}
.pulse-yg-rail-mark{
  font-size:10px;line-height:1.2;font-weight:500;
  color:rgba(255,255,255,.24);letter-spacing:.02em;
}

.pulse-yg-rail-grid{
  display:flex;flex-direction:column;gap:16px;
  padding:0 2px;
}

/* Карточка игры — компактная, с воздухом между блоками */
.pulse-yg-card{
  display:block;text-decoration:none;color:inherit;
  border-radius:10px;overflow:hidden;
  background:#14141c;
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 4px 14px rgba(0,0,0,.22);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.pulse-yg-card:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.12);
  box-shadow:0 6px 18px rgba(0,0,0,.32);
}
.pulse-yg-card:active{transform:translateY(0)}

.pulse-yg-card-media{
  position:relative;display:block;aspect-ratio:5/3;
  background:#101018;overflow:hidden;
  border-radius:9px 9px 0 0;
}
.pulse-yg-card-media img{
  width:100%;height:100%;object-fit:cover;display:block;
}

.pulse-yg-card-title{
  padding:7px 8px 8px;
  font-size:.66rem;font-weight:600;line-height:1.3;
  color:rgba(255,255,255,.78);
  overflow:hidden;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
}
.pulse-yg-card:hover .pulse-yg-card-title{color:rgba(255,255,255,.92)}

.pulse-yg-card-badge{
  position:absolute;z-index:2;display:grid;place-items:center;
}
.pulse-yg-card-badge--bolt{
  top:6px;left:6px;width:20px;height:20px;border-radius:6px;
  background:linear-gradient(135deg,#b06ff5 0%,#8b5cf6 100%);
  box-shadow:0 2px 6px rgba(139,92,246,.35);
}
.pulse-yg-card-badge--bolt svg{width:10px;height:10px}
.pulse-yg-card-badge--age{
  top:6px;right:6px;min-width:24px;height:18px;padding:0 5px;border-radius:5px;
  font-size:9px;font-weight:700;color:rgba(255,255,255,.9);
  background:rgba(0,0,0,.55);backdrop-filter:blur(4px);
}

.pulse-yg-card-rating{
  position:absolute;left:6px;bottom:6px;z-index:2;
  min-width:24px;height:20px;padding:0 6px;border-radius:6px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;
  color:#4ade80;background:rgba(0,0,0,.65);
  backdrop-filter:blur(6px);
}

body.pulse-rails-hidden .pulse-rail-ads{
  opacity:0;visibility:hidden;pointer-events:none;
}

/* Только ПК: широкий экран + мышь/трекпад (iPad и телефоны отсеиваются) */
@media (min-width:1180px) and (hover:hover) and (pointer:fine){
  .pulse-rail-ads{display:flex}
}

@media (min-width:1600px) and (hover:hover) and (pointer:fine){
  .pulse-rail-ads{width:220px}
  .pulse-rail-ads--left{left:max(12px, env(safe-area-inset-left, 0px))}
  .pulse-rail-ads--right{right:max(12px, env(safe-area-inset-right, 0px))}
  .pulse-yg-rail-grid{gap:18px}
}

@media (max-width:1179px),(hover:none),(pointer:coarse){
  .pulse-rail-ads{display:none!important}
}
