.magda-preview-trigger {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #211714;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.magda-preview-trigger:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.magda-preview-play {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(42px, 5vw, 60px);
  aspect-ratio: 1;
  border: 1px solid #fff9;
  border-radius: 50%;
  background: #160e0cbf;
}
.magda-preview-play svg { margin-left: 2px; }
.magda-preview-trigger:hover .magda-preview-play { background: #160e0c; }
.magda-preview-caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
  padding: 24px 12px 11px;
  background: linear-gradient(transparent, #140e0ce8 70%);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}
.magda-preview-caption small { font-size: 11px; white-space: nowrap; }
.magda-preview-dialog {
  box-sizing: border-box;
  width: min(390px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 14px;
  border: 1px solid #ded6cf;
  border-radius: 12px;
  background: var(--paper, #f5f3f0);
  color: var(--ink, #111);
}
.magda-preview-dialog::backdrop { background: #15110dd4; }
.magda-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 10px 4px;
}
.magda-preview-header h2 {
  margin: 0;
  font-size: clamp(23px, 5vw, 31px);
  line-height: 1.1;
}
.magda-preview-header button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c7bcb3;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: 26px/1 system-ui, sans-serif;
  cursor: pointer;
}
.magda-preview-dialog video {
  display: block;
  width: min(100%, 330px, calc((100dvh - 135px) * 0.5625));
  height: auto;
  aspect-ratio: 9 / 16;
  margin: auto;
  border-radius: 5px;
  background: #15110e;
}
@media(max-width: 480px) {
  .magda-preview-caption { padding-inline: 8px; font-size: 11px; }
}
