/* NOSTALGEEK Retroverse — site-wide media integrity V1.
   Staging only. Preserve original files, intrinsic ratios and captions.
   Avoid fixed-ratio letterboxing: the image itself defines the visual height. */
:root { --rv-media-surface:#f1eae3; --rv-media-radius:12px; }
:is(.editorial-story,.hp-story,.seo-related-grid>a,.ng-year-game,.ng-console-card,.ng-retro-test-frame,.ng-retro-test-cover,.hp-platform,.product-card,.catalog-card) { min-width:0; max-width:100%; }
:is(.editorial-story,.hp-story) :is(h2,h3,p,a) { overflow-wrap:break-word; }
:is(.editorial-story,.hp-story) h3,
:is(.editorial-story,.hp-story) h3 a {
 position:static!important; inset:auto!important; display:block!important;
 width:auto!important; height:auto!important; min-height:0!important; max-height:none!important;
 overflow:visible!important; white-space:normal!important; text-overflow:clip!important;
 -webkit-line-clamp:unset!important; line-clamp:unset!important;
 -webkit-box-orient:initial!important; overflow-wrap:anywhere!important;
}
/* Legacy photographic blur duplicates are never needed to reveal a full image. */
.news-image-backdrop,.ng-editorial-visual-backdrop,
.editorial-cover-link .news-visual::before,
.editorial-cover-link .news-visual::after {display:none!important;content:none!important}
/* Single real photograph, no zoom, no blurred edge-fill. */
:is(.editorial-story,.hp-story,.news-archive-card) .news-visual,
:is(.editorial-story,.hp-story,.news-archive-card) .news-visual.has-image {
 position:relative!important; inset:auto!important; display:flex!important;
 align-items:center!important; justify-content:center!important;
 width:100%!important; height:auto!important; min-height:0!important; max-height:none!important;
 aspect-ratio:auto!important; overflow:visible!important; background:transparent!important;
 padding:0!important; margin:0!important; border:0!important; box-shadow:none!important;
}
:is(.editorial-story,.hp-story,.news-archive-card) .news-visual img.news-image-main,
:is(.editorial-story,.hp-story,.news-archive-card) .editorial-cover-link > img:not(.news-image-backdrop) {
 display:block!important; position:static!important; inset:auto!important;
 flex:0 1 auto!important; min-width:0!important; min-height:0!important;
 width:auto!important; height:auto!important; max-width:100%!important; max-height:280px!important;
 aspect-ratio:auto!important; object-fit:contain!important; object-position:center!important;
 transform:none!important; clip-path:none!important; filter:none!important; opacity:1!important;
 padding:0!important; margin:auto!important; border-radius:0!important;
}
:is(.editorial-story,.news-archive-card) > .editorial-cover-link,
:is(.editorial-story,.news-archive-card) > .editorial-cover-link:link {
 position:relative!important; inset:auto!important; display:flex!important;
 align-items:center!important; justify-content:center!important; box-sizing:border-box!important;
 width:100%!important; height:auto!important; min-height:0!important; max-height:none!important;
 aspect-ratio:auto!important; overflow:hidden!important; isolation:auto!important;
 padding:12px!important; margin:0!important; background:var(--rv-media-surface)!important;
}
:is(.editorial-story,.news-archive-card) .editorial-story-copy {
 position:static!important; inset:auto!important; width:auto!important; height:auto!important;
 min-width:0!important; min-height:0!important; max-height:none!important;
 overflow:visible!important; display:flex!important; flex-direction:column!important;
 justify-content:center!important; padding:clamp(15px,1.7vw,23px)!important;
}
:is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid,
:is(body.magazine-page,#news.retro-magazine) .editorial-latest-grid {
 display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important;
 grid-template-rows:auto!important; gap:16px!important; align-items:stretch!important;
}
:is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid > .editorial-story--lead {
 grid-column:1/-1!important; grid-row:auto!important; display:grid!important;
 grid-template-columns:minmax(0,40%) minmax(0,1fr)!important; min-width:0!important;
}
:is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid > .editorial-story--secondary,
:is(body.magazine-page,#news.retro-magazine) .editorial-latest-grid > .editorial-story {
 display:grid!important; grid-template-columns:minmax(0,35%) minmax(0,1fr)!important;
 grid-column:auto!important; grid-row:auto!important; min-width:0!important;
}
:is(body.magazine-page,#news.retro-magazine) .editorial-story--lead .editorial-cover-link img:not(.news-image-backdrop) {
 max-height:360px!important;
}
:is(body.magazine-page,#news.retro-magazine) .editorial-story--without-media {
 display:block!important; grid-column:auto!important; grid-row:auto!important;
}
:is(body.magazine-page,#news.retro-magazine) .editorial-story--without-media .editorial-story-copy {width:100%!important}
/* Homepage: keep the compact cards already validated; remove absolute image tricks. */
#home.homepage-v2 .hp-magazine-grid .hp-story-image {
 position:relative!important; inset:auto!important; display:flex!important;
 justify-content:center!important; align-items:center!important;
 width:100%!important; min-width:0!important; max-width:100%!important;
 height:auto!important; min-height:0!important; max-height:none!important;
 aspect-ratio:auto!important; overflow:hidden!important;
 padding:12px!important; margin:0!important; background:var(--rv-media-surface)!important;
}
#home.homepage-v2 .hp-magazine-grid .hp-story .news-visual img.news-image-main {
 max-height:260px!important;
}
#home.homepage-v2 .hp-magazine-grid .hp-story .hp-story-copy {min-width:0!important;height:auto!important;max-height:none!important;overflow:visible!important}
#home.homepage-v2 .hp-magazine-grid .hp-story .news-image-credit {position:static!important}

/* Correct archived cards whose markup advertises dimensions different from the real media.
   The legacy ratio frame may be nested below the card, not directly attached to it. */
:is(#news.retro-magazine,body.magazine-page) .editorial-story .seo-section-media.editorial-cover-link,
:is(#news.retro-magazine,body.magazine-page) .editorial-story .editorial-cover-link,
html body #home .hp-story .hp-story-image {
 display:flex!important; position:relative!important; inset:auto!important;
 align-items:center!important; justify-content:center!important;
 width:100%!important; height:auto!important; min-height:0!important; max-height:none!important;
 aspect-ratio:auto!important; overflow:hidden!important;
 padding:10px!important; margin:0!important;
}
:is(#news.retro-magazine,body.magazine-page) .editorial-story .editorial-cover-link img:not(.news-image-backdrop),
html body #home .hp-story .hp-story-image img:not(.news-image-backdrop) {
 display:block!important; position:static!important; inset:auto!important;
 width:auto!important; height:auto!important; min-width:0!important; min-height:0!important;
 max-width:100%!important; max-height:280px!important; aspect-ratio:auto!important;
 object-fit:contain!important; object-position:center!important; flex:none!important;
 transform:none!important; filter:none!important; clip-path:none!important;
}


/* The nested live Magazine frame must size itself from the actual <img>.
   Legacy 100%-of-auto height otherwise collapses to zero on wide layouts. */
:is(#news.retro-magazine,body.magazine-page) .editorial-story .editorial-cover-link .news-visual,
:is(#news.retro-magazine,body.magazine-page) .editorial-story .editorial-cover-link .news-visual.has-image {
 display:block!important; position:relative!important; inset:auto!important;
 height:auto!important; min-height:0!important; max-height:none!important;
 aspect-ratio:auto!important; width:100%!important;
 overflow:visible!important; background:transparent!important;
}

/* Reading pages: original ratio is authoritative, not a forced 16:9 or 4:3 mask. */
.seo-article-page .ng-editorial-visual-frame {
 display:block!important; position:relative!important; inset:auto!important;
 width:100%!important; height:auto!important; min-height:0!important; max-height:none!important;
 aspect-ratio:auto!important; overflow:visible!important; background:transparent!important;
}
.seo-article-page .ng-editorial-visual-frame > img.ng-editorial-visual-foreground,
.seo-article-page :is(.seo-article-hero,.seo-article-body figure) > img,
.seo-article-page .seo-related-grid img {
 display:block!important; position:static!important; inset:auto!important;
 width:auto!important; height:auto!important; min-width:0!important; max-width:100%!important;
 max-height:min(68vh,720px)!important; aspect-ratio:auto!important;
 object-fit:contain!important; object-position:center!important; margin-inline:auto!important;
 filter:none!important; clip-path:none!important; transform:none!important;
}
/* All other functional sections: normalize media without altering logos or avatars. */
:is(.ng-voyage,.ng-retro-test) :is(.ng-year-game-img,.ng-console-card,.ng-story,.ng-retro-test-frame,.ng-retro-test-cover) img,
:is(.hp-platform-visual,.product-gallery,.product-visual,.catalog-card-image,.game-cover,.vault-cover) img {
 display:block!important; width:auto!important; height:auto!important;
 max-width:100%!important; max-height:100%!important;
 aspect-ratio:auto!important; object-fit:contain!important;
 object-position:center!important; filter:none!important;
}
img[hidden] {display:none!important}
@media(max-width:900px) {
 :is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid,
 :is(body.magazine-page,#news.retro-magazine) .editorial-latest-grid {
  grid-template-columns:minmax(0,1fr)!important;
 }
 :is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid > .editorial-story--lead {
  grid-column:1!important; grid-template-columns:minmax(0,37%) minmax(0,1fr)!important;
 }
}
@media(max-width:600px) {
 :is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid > .editorial-story--lead {
  display:flex!important; flex-direction:column!important; grid-column:1!important;
 }
 :is(body.magazine-page,#news.retro-magazine) .editorial-feature-grid > .editorial-story--secondary,
 :is(body.magazine-page,#news.retro-magazine) .editorial-latest-grid > .editorial-story {
  grid-template-columns:minmax(105px,31%) minmax(0,1fr)!important;
 }
 :is(body.magazine-page,#news.retro-magazine) .editorial-story .editorial-cover-link {padding:8px!important}
 :is(body.magazine-page,#news.retro-magazine) .editorial-story .editorial-story-copy {padding:13px!important}
 :is(body.magazine-page,#news.retro-magazine) .editorial-story img:not(.news-image-backdrop) {max-height:200px!important}
 #home.homepage-v2 .hp-magazine-grid .hp-story .news-visual img.news-image-main {max-height:205px!important}
 .seo-article-page :is(.seo-article-body figure,.seo-article-hero) img {max-height:min(62vh,520px)!important}
}
@media(prefers-reduced-motion:reduce) {
 :is(.editorial-story,.hp-story) {animation:none!important;transition:none!important;transform:none!important}
}


/* NOSTALGEEK native-media framing V2 — all editorial routes, never the transparent console packshots.
   Full source frame => width follows its column, height follows intrinsic ratio.
   No forced letterbox canvas, no blurred duplicate, no crops or deforming stretch.
   Product/console hardware art remains in its existing dedicated scene. */
:is(#news.retro-magazine,body.magazine-page) .editorial-story .editorial-cover-link,
:is(#news.retro-magazine,body.magazine-page) .editorial-story .seo-section-media.editorial-cover-link,
html body #home .hp-story .hp-story-image {
  align-items:start!important;
  justify-content:start!important;
  box-sizing:border-box!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  margin:0!important;
  aspect-ratio:auto!important;
  background:transparent!important;
  border:0!important;
}
:is(#news.retro-magazine,body.magazine-page) .editorial-story .news-visual,
:is(#news.retro-magazine,body.magazine-page) .editorial-story .news-visual.has-image,
html body #home .hp-story .news-visual,
html body #home .hp-story .news-visual.has-image {
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  padding:0!important;
  background:transparent!important;
  overflow:visible!important;
}
:is(#news.retro-magazine,body.magazine-page) .editorial-story img.news-image-main,
:is(#news.retro-magazine,body.magazine-page) .editorial-story .editorial-cover-link>img:not(.news-image-backdrop),
html body #home .hp-story .news-visual img.news-image-main {
  display:block!important;
  position:static!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:initial!important;
  object-position:center!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  filter:none!important;
  transform:none!important;
}
/* Historic Magazine reader: no boxed 16:9 masks. The actual image owns its
   height, including portrait and square photographs. */
.seo-article-page .ng-editorial-visual-frame,
.seo-article-page .seo-article-hero:has(>img),
.seo-article-page .seo-article-body figure:has(>img) {
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
  padding:0!important;
  background:transparent!important;
}
.seo-article-page .ng-editorial-visual-frame > img.ng-editorial-visual-foreground,
.seo-article-page :is(.seo-article-hero,.seo-article-body figure)>img,
.seo-article-page .seo-related-grid img {
  display:block!important;
  position:static!important;
  width:100%!important;
  height:auto!important;
  max-width:100%!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:initial!important;
  margin-inline:auto!important;
  padding:0!important;
  filter:none!important;
  transform:none!important;
}
