/* Local snapshot: show artwork/backgrounds without Apple SPA JS */

:root {
  --defaultBackground: #ffffff;
  --today-card-text-color: #ffffff;
  --today-card-text-accent-color: #ffffff;
  --today-card-text-accent-blend-mode: plus-lighter;
}

@media (prefers-color-scheme: dark) {
  :root {
    --defaultBackground: #000000;
  }
}

html,
body,
.body-container,
.app-container,
.page-container,
.default-page-container {
  background-color: var(--defaultBackground, #fff);
  font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

img,
picture img,
.artwork-component__image,
.artwork-component img,
.artwork-component__contents {
  opacity: 1 !important;
  visibility: visible !important;
}

.artwork-component picture,
.artwork-component img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Phone screenshots: Apple only sets aspect-ratio on rotated frames.
   Adding --downloaded also drops the padding-bottom spacer, so restore height. */
.shelf-grid__list--grid-type-ScreenshotPhone .shelf-grid__list-item,
.shelf-grid__list--grid-type-ScreenshotPhone .artwork-component {
  contain: none;
}

div.svelte-1o528zw {
  aspect-ratio: var(--aspect-ratio, 0.462);
  width: 100%;
}

.artwork-container.svelte-1o528zw {
  width: 100%;
  height: auto;
  overflow: hidden;
  /* Cross-origin mask SVGs fail on localhost and paint the frame fully transparent. */
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.container.svelte-kps97o {
  background-size: cover !important;
  background-position: center !important;
}

.rotate.svelte-kps97o {
  opacity: 0.35 !important;
}

video {
  object-fit: cover;
  background: #111;
}

#local-snapshot-bar {
  position: sticky;
  top: 0;
  z-index: 99999;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(22, 22, 23, 0.92);
  color: #fff;
  font: 13px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  backdrop-filter: blur(12px);
}

#local-snapshot-bar a {
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

#local-snapshot-bar a.is-active {
  background: #0071e3;
}

#local-snapshot-bar .hint {
  margin-left: auto;
  opacity: 0.7;
  font-size: 12px;
}

@media (max-width: 640px) {
  #local-snapshot-bar .hint {
    display: none;
  }
}
