/* Scoped to video blocks and the insertion helper; existing typography is untouched. */
.youtube-embed {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 1.7rem 0;
  break-inside: avoid;
  white-space: normal;
}
.youtube-embed__frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 202px; /* 200px player viewport plus the border. */
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line, currentColor);
  border-radius: var(--radius-sm, 0.6rem);
  background: var(--surface-tint, transparent);
}
.youtube-embed__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.55rem;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.youtube-editor {
  margin: 0.5rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line, currentColor);
  border-radius: var(--radius-sm, 0.6rem);
  font-family: var(--font-sans, sans-serif);
  line-height: 1.6;
}
.youtube-editor summary { cursor: pointer; font-weight: 600; }
.youtube-editor p { margin: 0.6rem 0; }
.youtube-editor [data-youtube-controls][hidden] { display: none; }
.youtube-editor input { display: block; width: 100%; min-width: 0; margin: 0.4rem 0 0.7rem; }
.youtube-editor button { max-width: 100%; white-space: normal; }
.youtube-editor__status:empty { display: none; }
@media print {
  .youtube-embed__frame, .youtube-editor { display: none !important; }
  .youtube-embed__caption a::after { content: ' (' attr(href) ')'; overflow-wrap: anywhere; }
}
