.videosPage {
  width: min(72rem, calc(100% - 32px));
  margin: clamp(22px, 4vw, 52px) auto 48px;
  overflow-wrap: anywhere;
}
.videosHeading, .videoCard, .myVideos, #listMessage:not(:empty), .videoDialog {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper, #fff);
  color: var(--ink);
}
.videosHeading, .videoDialog > header, .ownerRow, .deleteActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.videosHeading {
  padding: clamp(18px, 3vw, 32px);
  border-top: 4px solid var(--berry);
  box-shadow: 0 5px 22px #4a24390b;
}
.videosPage h1, .videosPage h2, .videoCard h3, .videoDialog h2 { margin: 0; line-height: 1.3; }
.videosHeading h1 { font-size: clamp(1.75rem, 3vw, 2.35rem); }
.videosHeading p { margin: 6px 0 0; color: var(--muted); }
.videoFeed { margin-top: 24px; }
.videoFeed h2, .videoDialog h2 { font-size: 1.25rem; }
.videoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 16px;
  margin-top: 12px;
}
.videoCard { min-width: 0; overflow: hidden; }
.videoCard video, #localPreview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #211e24;
}
.videoCardBody { padding: 13px 16px 16px; }
.videoCard h3 { font-size: 1.06rem; }
.videoByline, .ownerState, .videoHint { color: var(--muted); font-size: .88rem; }
.videoByline { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; }
.mediaRetry { margin-top: 8px; }
.clipBuild { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.clipBuild p { margin: 0 0 6px; line-height: 1.6; font-size: .9rem; }
.clipBuild a { color: var(--berry); font-weight: 650; text-underline-offset: .2em; }
.clipSetup { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--rule); border-radius: 10px; }
.clipSetup legend { padding: 0 5px; font-size: .94rem; font-weight: 650; }
.clipSetup select { display: block; width: 100%; min-width: 0; min-height: 42px; font: inherit; margin-top: 4px;
  padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); background: var(--field, #fff); }
.clipSetup [hidden] { display: none !important; }
.setupOptions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 10px; margin-top: 10px; }
#setupLinkLabel { margin-top: 10px; }
#setupSummary:empty { display: none; }
#listMessage { margin: 0; }
#listMessage:not(:empty) { padding: 18px; color: var(--muted); }
#moreVideos, #retryList { margin-top: 12px; }
.myVideos { margin-top: 14px; padding: 0 16px; }
.myVideos summary { padding: 12px 0; color: var(--berry); font-weight: 650; }
.myVideos ul { list-style: none; margin: 0; padding: 0; }
.ownerRow { border-top: 1px solid var(--rule); padding: 10px 0; }
.ownerRow > div:first-child { min-width: 0; flex: 1 1 12rem; }
.ownerState { display: block; }
.ownerActions { display: flex; flex-wrap: wrap; gap: 8px; }
.videoDialog {
  width: min(34rem, calc(100% - 24px));
  max-height: 90dvh;
  padding: clamp(16px, 3vw, 26px);
  overflow: auto;
  overflow-wrap: anywhere;
}
.videoDialog::backdrop { background: #31253385; }
.videoDialog form { margin-top: 14px; }
#videoFields { display: grid; gap: 14px; min-width: 0; padding: 0; margin: 0; border: 0; }
#videoFields label, #progressPanel label { display: block; font-weight: 600; font-size: .94rem; }
#videoFields input:not([type=checkbox]) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--field, #fff);
  color: var(--ink);
}
#videoFields input[readonly] { background: var(--surface, #f5eff3); }
#videoFile::file-selector-button { margin-right: 8px; font: inherit; }
.videoTextFields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.videoHint { margin: 6px 0 0; }
#localPreview { max-height: 30dvh; border-radius: 8px; }
#videoFields .videoConsent { display: flex; align-items: baseline; gap: 6px; font-weight: 500; }
.videoConsent input, #uploadProgress { accent-color: var(--berry); }
.videoMessage { margin: 0; color: var(--ink); }
.videoMessage:not(:empty), #sendVideo, #progressPanel { margin-top: 14px; }
#progressPanel { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 8px; }
#progressText { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
#uploadProgress { grid-column: 1 / -1; width: 100%; }
.deleteDialog { max-width: 26rem; }
.deleteActions { justify-content: flex-end; margin-top: 16px; }
.videoMast a:focus-visible, .videosPage a:focus-visible { outline: 3px solid #9051bd; outline-offset: 3px; }
@media (max-width: 36rem) {
  .videosPage { width: calc(100% - 24px); }
  .videoMast { min-height: 55px; height: auto; flex-wrap: wrap; padding-block: 6px; }
  .videoMast .shopNav { flex-wrap: wrap; margin-inline-start: auto; }
  .videoTextFields { grid-template-columns: minmax(0, 1fr); }
}
