.video-cases {
  padding-block: clamp(30px, 5vw, 65px);
  border-top: 1px solid #d5d6cd;
  color: #202020;
}

.video-cases [hidden] { display: none; }

.video-cases-header,
.video-group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.video-cases-header h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -.035em;
  line-height: 1.2;
}

.video-manage-link {
  color: #514b43;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: .9rem;
  white-space: nowrap;
}

.video-status, .video-editor-message { color: #5e5650; }
.video-status:empty, .video-editor-message:empty, #video-access-hint:empty { display: none; }
.video-status { margin: 12px 0 0; }

.video-group { margin-top: 22px; }
.video-group-header { margin-bottom: 10px; }
.video-group h3 { margin: 0; font-size: 1.1rem; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

#video-portrait .video-grid { max-width: 42rem; }

.video-card {
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4dfd6;
}

.video-group .video-card { border-bottom: 0; }

.video-reel-embed {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 19;
  border: 0;
  border-radius: 9px;
  background: #f6f4f0;
}

.video-card-play {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.video-card-play {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
}

.video-card-play:hover .video-card-title { text-decoration: underline; }

.video-thumbnail {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  background: linear-gradient(145deg, #593c24, #241e19);
  color: #fff;
}

.video-thumbnail:not([data-kind="youtube"]) { aspect-ratio: 9 / 16; }
.video-thumbnail[data-kind="reel"] { background: linear-gradient(150deg, #342145, #833854 60%, #a65330); }

.video-thumbnail img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail-mark {
  max-width: 90%;
  font-size: clamp(.8rem, 2vw, 1rem);
  text-align: center;
  font-weight: 700;
}

.video-play-icon {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #181410bd;
}

.video-play-icon::after {
  content: '';
  margin-left: 3px;
  border: 7px solid transparent;
  border-left: 11px solid #fff;
  border-right: 0;
}

.video-card-title, .video-platform { display: block; overflow-wrap: anywhere; }
.video-card-title { margin-top: 8px; font-size: 1rem; line-height: 1.45; }
.video-platform { margin-top: 3px; color: #514b43; font-size: .82rem; }

.video-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-editor {
  margin-top: 20px;
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid #e1d9cd;
  border-radius: 12px;
  background: #f9f7f1;
}

.video-editor fieldset {
  padding: 0;
  margin: 0;
  min-width: 0;
  border: 0;
}

.video-editor label { display: block; font-weight: 650; }
.video-editor input:not([type="checkbox"]) {
  display: block;
  width: min(100%, 640px);
  margin-top: 6px;
  padding: 9px 11px;
  color: #202020;
  border: 1px solid #b9b1a5;
  border-radius: 6px;
  background: #fff;
}

.video-editor details { margin-top: 12px; }
.video-editor details label { margin-top: 10px; }
.video-editor summary { width: fit-content; cursor: pointer; }

.video-editor-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.video-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 7px 14px;
  background: white;
  color: #202020;
  border: 1px solid #c8bfb2;
  border-radius: 8px;
  cursor: pointer;
}

.video-action:hover { border-color: #524537; }
.video-action-primary { border-color: #ffce38; background: #ffda52; font-weight: 750; }
.video-action:disabled { opacity: .65; cursor: wait; }
.video-action-danger { color: #9a251c; border-color: #dcaea8; }
.video-action-danger:hover { background: #fff2ef; border-color: #9a251c; }
#video-more { margin-top: 18px; }
.video-preview-wide { max-width: 360px; }
.video-preview-short { max-width: 158px; }

.video-admin-page { width: min(860px, 90%); }
.video-admin-page .video-admin-title { padding-top: clamp(32px, 7vw, 74px); }
.video-admin-title h1 {
  margin: 10px 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  letter-spacing: -.045em;
}
.video-admin-title a { text-decoration: underline; text-underline-offset: 4px; }
.video-admin-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.video-admin-nav a {
  padding: 6px 14px;
  border: 1px solid #d7cfc2;
  border-radius: 99px;
  text-decoration: none;
}
.video-admin-nav a[aria-current] { background: #ffda52; border-color: #ffda52; font-weight: 700; }
.video-admin { border: 0; padding-block: 18px 30px; }
.video-access-copy { margin: 0 0 10px; }
.video-access-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.video-access-note { color: #5e5650; font-size: .9rem; }
.video-access-actions + .video-access-note { margin: 9px 0 0; }
.video-editor-message .video-action { margin: 8px 0 0; }
.video-admin h2 { margin: 0 0 12px; font-size: clamp(21px, 3vw, 27px); line-height: 1.25; }
[data-video-editor-title] { scroll-margin-top: 16px; }
[data-video-current-poster]:not([hidden]) { display: block; width: 76px; margin-top: 10px; border-radius: 5px; }
.video-upload-slots { display: grid; gap: 20px; }
.video-short-slot { min-width: 0; margin-top: 0; }
.video-completion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e4dfd6;
}
.video-completion .video-editor-message { flex-basis: 100%; margin: 0; }
.video-short-slot .video-admin-card {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 14px;
  background: #fff;
}
.video-extra-editor > h2 { margin-top: 16px; }
#video-admin-list { margin-top: 28px; }
#video-operation-status:empty { display: none; }
#video-admin-grid { display: grid; gap: 12px; }
.video-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e4dfd6;
  border-radius: 10px;
}
.video-admin-card .video-card-play {
  display: grid;
  grid-template-columns: clamp(62px, 15vw, 104px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.video-admin-card .video-thumbnail { aspect-ratio: 1; }
.video-admin-card .video-thumbnail-mark { font-size: .75rem; }
.video-admin-card .video-play-icon { width: 28px; height: 28px; left: 5px; bottom: 5px; }
.video-admin-card .video-play-icon::after { border-width: 5px 0 5px 8px; }
.video-admin-card .video-card-title { margin: 0; }
.video-admin-card .video-action { min-height: 44px; }
.video-delete-check {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #e5c3bd;
  border-radius: 8px;
  background: #fff8f6;
}
.video-delete-check p { margin: 0 0 8px; }
.video-delete-check button + button { margin-left: 8px; }
.video-delete-check p:last-child { margin: 6px 0 0; }

.video-inline-player {
  width: 100%;
  max-width: 680px;
}

.video-inline-player iframe {
  display: block;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 9px;
  background: #171717;
}

.video-inline-player[data-kind="shorts"] { max-width: 350px; }
.video-inline-player[data-kind="shorts"] iframe { aspect-ratio: 9 / 16; }
.video-inline-player[data-kind="reel"] { max-width: 380px; }

.video-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.video-preview-short.is-playing { max-width: none; }
.video-admin-card.is-playing { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 800px) {
  #video-portrait .is-playing { grid-column: 1 / -1; }
}

@media (max-width: 690px) {
  .video-admin-card { grid-template-columns: minmax(0, 1fr); }
  .video-completion .video-action-primary { width: 100%; }
}

@media (min-width: 760px) {
  .video-upload-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

#video-landscape .video-grid {
  display: flex;
  --video-gap: clamp(12px, 2vw, 20px);
  gap: var(--video-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding: 3px 2px 10px;
}
#video-landscape .video-grid.dragging { scroll-snap-type: none; }
#video-landscape .video-card {
  flex: 0 0 calc((100% - var(--video-gap)) / 2);
  scroll-snap-align: start;
}
@media (max-width: 690px) {
  #video-landscape .video-card { flex-basis: min(89%, 460px); }
}
.video-inline-player[data-kind="reel"] video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 9px;
  background: #171717;
}
.video-playback-status {
  margin: 10px 0 0;
  color: #534c43;
  font-size: .9rem;
}
