.home-page .workspace-playground {
  min-width: 0;
  container: playground / inline-size;
  scroll-margin-top: var(--workspace-top);
}
.home-page .workspace-playground:focus { outline: none; }
.playground-grid {
  --playground-columns: 2;
  --playground-gap: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  justify-items: stretch;
  gap: var(--playground-gap);
  width: var(--workspace-card-width);
  max-width: 640px;
  margin-inline: auto;
}
.playground-card {
  --glass-radius: 26px;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--frosted-surface-border);
  border-radius: var(--glass-radius);
  background: var(--frosted-surface-background);
  -webkit-backdrop-filter: var(--frosted-surface-filter);
  backdrop-filter: var(--frosted-surface-filter);
  box-shadow: var(--frosted-surface-shadow);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}
.playground-grid.is-masonry {
  display: block;
  position: relative;
}
.playground-grid.is-masonry > .playground-card {
  position: absolute;
}
.playground-card::before { content: none; }
.playground-card-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
}
.playground-card-open:focus-visible { outline-offset: 4px; }
@media (hover: hover) {
  .playground-card:hover {
    border-color: rgb(255 255 255 / 55%);
    box-shadow: var(--frosted-surface-hover-shadow);
  }
}
.playground-card > img,
.playground-card > video,
.playground-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: #f2f5f7;
}
.playground-card > .playground-card-shot {
  aspect-ratio: 1156 / 854;
  object-fit: cover;
}
.playground-card > .playground-card-image--mountain {
  aspect-ratio: 1866 / 843;
  object-fit: contain;
}
.playground-card > .playground-card-video {
  aspect-ratio: 1;
  object-fit: cover;
  background: #c9def0;
}
.playground-card > .playground-card-video--book {
  aspect-ratio: 1390 / 1228;
  object-fit: contain;
  background: #f2f5f7;
}
.playground-card > .playground-card-video--landscape {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
}
.playground-card > .playground-card-video--butterfly { background: #000; }
.playground-media { overflow: hidden; }
.playground-hero-preview {
  background: #bcefff url('/assets/sky/hero-dither-2.png') center / cover;
}
.playground-media iframe { display: block; width: 100%; height: 100%; border: 0; }
.playground-card iframe { pointer-events: none; }
@container playground (max-width: 480px) {
  .playground-grid { --playground-columns: 1; grid-template-columns: minmax(0, 1fr); max-width: 360px; }
}
@media (max-width: 767px) {
  .playground-grid { --playground-columns: 1; grid-template-columns: minmax(0, 1fr); max-width: 360px; }
  .playground-card { --glass-radius: 24px; padding: 12px; }
}

html.playground-preview-open,
body.playground-preview-open { overflow: hidden; }
.playground-lightbox {
  --preview-inset: 18px;
  --preview-muted: #64727c;
  position: fixed;
  /* The fixed custom cursor is moved into the modal's top layer. Center with
     margins so its coordinates stay relative to the viewport. */
  inset: 0;
  transform: none;
  box-sizing: border-box;
  width: min(620px, calc(100vw - 32px), calc(133.333svh - 220px));
  height: fit-content;
  max-width: none;
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: var(--preview-inset);
  color: var(--ink);
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 28px 90px rgb(17 48 66 / 22%);
}
.playground-lightbox:not([open]) {
  display: block;
  position: fixed;
  top: 0;
  left: -10000px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.playground-lightbox::backdrop {
  background: rgb(17 32 43 / 35%);
  backdrop-filter: blur(6px);
}
.playground-lightbox-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 12px;
}
.playground-lightbox-close {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: var(--preview-muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
.playground-lightbox-close::after { content: ""; position: absolute; inset: -12px; }
.playground-lightbox-close:hover { color: var(--ink); }
.playground-lightbox-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.playground-lightbox-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; background: #f2f5f7; }
.playground-lightbox-stage > :is(img, iframe, video) { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.playground-lightbox.has-square-preview { width: min(620px, calc(100vw - 32px), calc(100svh - 220px)); }
.playground-lightbox.has-square-preview .playground-lightbox-stage { aspect-ratio: 1; }
.playground-lightbox.has-book-preview { width: min(620px, calc(100vw - 32px), calc(113svh - 249px)); }
.playground-lightbox.has-book-preview .playground-lightbox-stage { aspect-ratio: 1390 / 1228; background: #f2f5f7; }
.playground-lightbox-video { position: absolute; inset: 0; z-index: 1; background: #c9def0; }
.playground-lightbox.has-book-preview .playground-lightbox-video { background: #f2f5f7; }
.playground-lightbox.has-landscape-preview .playground-lightbox-video { background: #fff; }
.playground-lightbox.has-landscape-preview .playground-lightbox-video[src*="/butterfly-flutter/"] { background: #000; }
/* Keep the native controls; only soften the backdrop behind them. */
.playground-lightbox-video::-webkit-media-controls-enclosure {
  background: transparent;
  box-shadow: none;
}
.playground-lightbox-video::-webkit-media-controls-panel {
  background: linear-gradient(to top, rgb(0 0 0 / 48%), rgb(0 0 0 / 18%) 45%, transparent) bottom / 100% 96px no-repeat;
  box-shadow: none;
}
.playground-lightbox-video::-webkit-media-controls-current-time-display,
.playground-lightbox-video::-webkit-media-controls-time-remaining-display {
  color: #fff;
  text-shadow: 0 1px 3px rgb(0 0 0 / 40%);
}
.playground-lightbox-frame { background: #bcefff; }
.playground-static-image { position: absolute; z-index: 1; inset: 0; background: #f2f5f7; }
.playground-lightbox-stage:has(> .playground-static-image[src*="/snow-mountain/"]) { aspect-ratio: 1866 / 843; }
.playground-lightbox-stage.is-static-preview .playground-lightbox-frame { visibility: hidden; }
.playground-lightbox-details { padding: 24px 14px 22px; }
#playground-lightbox-title { margin: 0; font: 500 20px/1.35 "Geist", Arial, sans-serif; }
.playground-lightbox-description { margin: 8px 0 0; color: var(--preview-muted); font: 400 15px/1.55 "Geist", Arial, sans-serif; }
@media (max-width: 560px) {
  .playground-lightbox { --preview-inset: 12px; border-radius: 24px; }
  .playground-lightbox-stage { border-radius: 15px; }
  .playground-lightbox-actions { padding-bottom: 8px; }
  .playground-lightbox-details { padding: 20px 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .playground-card { transition: none; }
}
