html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  container-type: size;
}

.embed-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  padding: 24px;
  background: var(--ground);
  isolation: isolate;
}

.embed-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--cue);
  pointer-events: none;
}

.embed-card header {
  grid-area: 1 / 1;
  align-self: start;
  z-index: 1;
}

.embed-card h1 {
  max-width: none;
  font-size: clamp(1.625rem, min(6.7vw, 10vh), 2rem);
}

.embed-art {
  grid-area: 1 / 1;
  display: grid;
  place-items: center end;
  min-height: 0;
  container-type: size;
  mix-blend-mode: var(--art-blend);
}

.embed-art .player-media {
  width: min(100cqw, calc(100cqh * 4 / 3));
}

.embed-card footer {
  grid-area: 2 / 1;
}

.embed-card footer a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.3;
  text-decoration-color: var(--cue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.embed-card footer a:hover {
  text-decoration-thickness: 2px;
}

@container (max-width: 23.6875rem) or (max-aspect-ratio: 11 / 8) {
  .embed-card {
    grid-template-rows: auto minmax(0, 1fr) auto;
    row-gap: 8px;
  }

  .embed-art {
    grid-area: 2 / 1;
  }

  .embed-card footer {
    grid-area: 3 / 1;
  }
}
