/* In-place media placeholders. Real copy and controls never wait for media. */
[data-media-shell]:not(.ph){position:relative}
[data-media-shell]{isolation:isolate}
[data-media-shell]::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:4;
  border-radius:inherit;
  pointer-events:none;
  background-color:#173953;
  background-image:linear-gradient(105deg,transparent 30%,rgba(37,208,195,.12) 47%,rgba(216,225,234,.14) 50%,transparent 67%);
  background-size:250% 100%;
  animation:media-shimmer 1.8s ease-in-out infinite,media-failsafe 0s 6s forwards;
}
[data-media-shell="logo"]::after,[data-media-shell="portrait"]::after{border-radius:18px}
[data-media-shell="photo"]::after,[data-media-shell="tile"]::after{background-color:#d8ddda}
html[data-loading-enhanced] [data-media-shell][data-media-state="loading"]::after{animation:media-shimmer 1.8s ease-in-out infinite}
[data-media-shell][data-media-state="ready"]::after{display:none;animation:none}
[data-media-shell][data-media-state="error"]::after{
  content:attr(data-media-fallback);
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:12px;
  background-image:none;
  color:#d8e1ea;
  font:700 13px/1.4 Rubik,system-ui,sans-serif;
  text-align:center;
  animation:none;
}
[data-media-shell="photo"][data-media-state="error"]::after,[data-media-shell="tile"][data-media-state="error"]::after{color:#33465b}
[data-media-shell][data-media-state="error"] img{visibility:hidden}
[data-media-shell="logo"][data-media-state="error"]::after{color:#ffd24d;font:400 clamp(28px,4vw,48px)/1 Anton,Impact,sans-serif}
@keyframes media-shimmer{0%{background-position:150% 0}100%{background-position:-150% 0}}
/* If the enhancement script fails, don't cover successfully loaded native media. */
@keyframes media-failsafe{to{visibility:hidden}}
@media(prefers-reduced-motion:reduce){
  [data-media-shell]::after{animation:media-failsafe 0s 6s forwards;background-image:none}
  html[data-loading-enhanced] [data-media-shell][data-media-state="loading"]::after{animation:none}
}
