.zh-video-platforms{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;min-width:0}
.zh-video-platforms[hidden],.zh-platform-hint[hidden]{display:none!important}
.zh-platform-hint{flex-basis:100%;font:12px/1.3 Arial,sans-serif;color:#52634e;text-align:center}
.zh-platform-warning{flex-basis:100%;font:12px/1.3 Arial,sans-serif;color:#a63127;text-align:center}.zh-platform-warning[hidden]{display:none!important}
.zh-platform-hint-dismiss{border:0;background:transparent;color:#00698e;text-decoration:underline;font:inherit;cursor:pointer}
.zh-platform-button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:86px;min-height:44px;padding:6px 10px;border:0;border-radius:6px;color:#fff!important;font:600 13px/1.1 Arial,sans-serif;white-space:nowrap;cursor:pointer;box-shadow:0 2px 4px #0003}
.zh-platform-button::before{content:'';display:block;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:9px solid #fff}
.zh-platform-rutube{background:#007fa8}.zh-platform-youtube{background:#e50023}.zh-platform-vk{background:linear-gradient(90deg,#0878ff 0 18%,#ed174c 18% 100%)}
.zh-platform-button:disabled{opacity:.42;cursor:not-allowed}
.zh-platform-button:focus-visible{outline:3px solid #ff8a00;outline-offset:3px}


.zh-inline-video-wrap>.zh-video-platforms{margin:8px 0}
.zh-video-actions>.zh-video-platforms,.zh-image-actions>.zh-video-platforms{align-self:center;flex:0 1 auto}
/* Keep the platform selector at the left edge of each dialog footer. */
.zh-video-shared-panel[open] .zh-image-actions > .zh-video-platforms {
  margin-right: auto;
}
@media(max-width:600px) and (orientation:portrait){
 .zh-video-shared-panel[open] .zh-image-actions{flex-wrap:wrap;justify-content:flex-end;margin:6px}
 .zh-video-shared-panel[open] .zh-image-actions>.zh-video-platforms{flex:1 1 100%;width:100%}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:1366px){
 .zh-video-shared-panel[open] .zh-image-actions{overflow:auto;overscroll-behavior:contain;justify-content:flex-start}
 .zh-video-shared-panel[open] .zh-image-actions>.zh-video-platforms{flex:0 0 auto;display:flex;flex-direction:column;align-self:stretch;align-items:stretch;gap:5px}
 .zh-video-shared-panel[open] .zh-image-actions>.zh-video-platforms[hidden]{display:none!important}
 .zh-video-shared-panel[open] .zh-platform-button{width:100%;min-height:40px}
}
[data-zh-video][data-zh-video-effective='youtube'] .zh-compact-control:not(.zh-compact-zoom)::before{background:#e50023}
[data-zh-video][data-zh-video-effective='vk'] .zh-compact-control:not(.zh-compact-zoom)::before{background:linear-gradient(90deg,#0878ff 0 25%,#ed174c 25% 100%)}
html:root body [data-zh-video][data-zh-video-effective='youtube'] [data-zh-video-start].zh-compact-control:not(.zh-compact-zoom)::before,html:root body [data-zh-video][data-zh-video-effective='youtube'] [data-zh-video-start] .zh-compact-control:not(.zh-compact-zoom)::before{background:var(--zh-video-face)!important}
html:root body [data-zh-video][data-zh-video-effective='vk'] [data-zh-video-start].zh-compact-control:not(.zh-compact-zoom)::before,html:root body [data-zh-video][data-zh-video-effective='vk'] [data-zh-video-start] .zh-compact-control:not(.zh-compact-zoom)::before{background:var(--zh-video-face)!important}
html:root body .zh-main-video-copy[data-platform-label]{width:auto;min-width:44px;padding:0 11px;gap:6px;font-size:18px}
html:root body .zh-main-video-copy[data-platform-label]::after{content:attr(data-platform-label);font:600 13px/1 Arial,sans-serif}
html:root body .zh-main-video-copy[data-platform='youtube']{background:#e50023;color:#fff}
html:root body .zh-main-video-copy[data-platform='vk']{background:linear-gradient(90deg,#0878ff 0 18%,#ed174c 18% 100%);color:#fff}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]{width:auto;padding:0 12px;gap:7px}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]::before{content:attr(data-platform-label);font:600 13px/1 Arial,sans-serif}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]::after{order:-1}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform='youtube']{background:var(--zh-video-face)!important}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform='vk']{background:var(--zh-video-face)!important}
[data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start] .zh-compact-control,[data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start].zh-compact-control{box-sizing:border-box;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:auto!important;min-width:0!important;height:38px!important;min-height:38px!important;padding:0 11px!important;border:0!important;border-radius:6px!important;background:var(--zh-video-face)!important;box-shadow:0 2px 5px #0004!important;line-height:1!important}
[data-zh-video][data-zh-video-labeled='1'][data-zh-video-effective='youtube'] [data-zh-video-start] .zh-compact-control,[data-zh-video][data-zh-video-labeled='1'][data-zh-video-effective='youtube'] [data-zh-video-start].zh-compact-control{background:var(--zh-video-face)!important}
[data-zh-video][data-zh-video-labeled='1'][data-zh-video-effective='vk'] [data-zh-video-start] .zh-compact-control,[data-zh-video][data-zh-video-labeled='1'][data-zh-video-effective='vk'] [data-zh-video-start].zh-compact-control{background:var(--zh-video-face)!important}
[data-zh-video][data-zh-video-labeled='1'] .zh-compact-control::before{display:none!important}
[data-zh-video][data-zh-video-labeled='1'] .zh-compact-control::after{position:static!important;display:block!important;order:-1;flex:none;width:0!important;height:0!important;border-top:6px solid transparent!important;border-bottom:6px solid transparent!important;border-left:9px solid #fff!important;background:none!important}
[data-zh-video][data-zh-video-labeled='1'] .zh-video-platform-label{display:inline!important;color:white!important;font:600 13px/1 Arial,sans-serif!important;white-space:nowrap}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:max-content!important;min-width:max-content!important;max-width:none!important;height:38px!important;padding:0 11px!important;background:var(--zh-video-face)!important;border:0!important;border-radius:6px!important}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'][data-zh-video-effective='youtube'] [data-zh-video-start]>.zh-compact-control{background:var(--zh-video-face)!important}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'][data-zh-video-effective='vk'] [data-zh-video-start]>.zh-compact-control{background:var(--zh-video-face)!important}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control::before{display:none!important}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control::after{position:static!important;display:block!important;order:-1!important;flex:none!important;width:0!important;height:0!important;border-top:6px solid transparent!important;border-bottom:6px solid transparent!important;border-left:9px solid #fff!important;transform:none!important;background:none!important}

/* Keep the visible badge level with the 24px magnifier while retaining its touch area. */
.zh-video-platforms{gap:3px}
.zh-platform-button,.zh-video-shared-panel[open] .zh-platform-button{position:relative;isolation:isolate;box-sizing:border-box;min-width:0;min-height:44px;height:44px;padding:0 8px;gap:4px;border:0;background:transparent!important;box-shadow:none!important;font:600 11px/1 Arial,sans-serif}
.zh-platform-button::before{border-top-width:4px;border-bottom-width:4px;border-left-width:6px}
.zh-platform-button::after{content:'';position:absolute;z-index:-1;inset:10px 0;border-radius:4px;box-shadow:0 1px 3px #0003;background:#007fa8}
.zh-platform-youtube::after{background:#e50023}
.zh-platform-vk::after{background:linear-gradient(90deg,#0878ff 0 18%,#ed174c 18% 100%)}
@media(orientation:landscape) and (max-height:600px) and (max-width:1366px){.zh-video-shared-panel[open] .zh-image-actions>.zh-video-platforms{gap:0;align-items:center}.zh-video-shared-panel[open] .zh-platform-button{width:auto;min-width:72px}}

/* Keep the poster and the text of option links visible while identifying the video. */
.zh-video-initializing :is([data-zh-video-provider='rutube'],[data-zh-video-provider='youtube'],[data-zh-video-provider='vk']):not([data-zh-video-effective]) [data-zh-video-start].zh-compact-control,
.zh-video-initializing :is([data-zh-video-provider='rutube'],[data-zh-video-provider='youtube'],[data-zh-video-provider='vk']):not([data-zh-video-effective]) [data-zh-video-start] .zh-compact-control,
.zh-video-initializing body:has([data-zh-gallery-video] :is([data-zh-video-provider='rutube'],[data-zh-video-provider='youtube'],[data-zh-video-provider='vk'])):not(:has([data-zh-gallery-video] [data-zh-video-provider='local'])) :is(.zh-main-video-copy,.zh-gallery-video-play):not([data-platform-label]) {
  visibility: hidden !important;
}

/* The label draws the rounded 24px badge inside the thumbnail's 44px link. */
html:root body [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start].zh-compact-control {
  height:44px!important; min-height:44px!important; padding:0!important;
  background:transparent!important; box-shadow:none!important;
}
[data-zh-video-effective='youtube'], .zh-main-video-copy[data-platform='youtube'] {
  --zh-video-badge-fill:#e50023;
}
[data-zh-video-effective='vk'], .zh-main-video-copy[data-platform='vk'] {
  --zh-video-badge-fill:linear-gradient(90deg,#0878ff 0 18%,#ed174c 18% 100%);
}
html:root body [data-zh-video-labeled='1'] [data-zh-video-start].zh-compact-control > .zh-video-platform-label {
  display:inline-flex!important; align-items:center; height:24px; padding:0 8px;
  box-sizing:border-box; border-radius:4px; background:var(--zh-video-face);
}
[data-zh-video][data-zh-video-labeled='1'] .zh-video-platform-label{font:600 11px/1 Arial,sans-serif!important}
[data-zh-video][data-zh-video-labeled='1'] .zh-compact-control::after{border-top-width:4px!important;border-bottom-width:4px!important;border-left-width:6px!important}

/* On large covers the entire image is clickable; only the badge needs 24px. */
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control{height:24px!important;min-height:24px!important;padding:0 8px!important;gap:4px!important;border-radius:4px!important}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control::after{border-top-width:4px!important;border-bottom-width:4px!important;border-left-width:6px!important}
html:root body .zh-main-video-copy[data-platform-label]{height:44px;padding:0 8px;gap:4px;font-size:14px;box-shadow:none;background:transparent;isolation:isolate}
html:root body .zh-main-video-copy[data-platform-label]::before {
  content:''; position:absolute; inset:10px 0; z-index:-1;
  border-radius:4px; background:var(--zh-video-face);
}
html:root body .zh-main-video-copy[data-platform-label]::after{font:600 11px/1 Arial,sans-serif}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]{height:24px;padding:0 8px;gap:4px;border-radius:4px}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]::before{font:600 11px/1 Arial,sans-serif}
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]::after{border-top-width:4px;border-bottom-width:4px;border-left-width:6px}
html:root body #product-category [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start].zh-compact-control::after{border-left-color:#fff!important}
/* Keep the play mark visible even when the browser applies visited-link colours. */
html:root body [data-zh-video][data-zh-video-labeled='1'] .zh-video-platform-label::before{content:'▶';display:inline-block;margin-right:4px;color:#fff!important;font:8px/1 Arial,sans-serif}
html:root body [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start].zh-compact-control::after,html:root body [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control::after{display:none!important}
html:root body :is(#content,#product-category) [data-zh-video][data-zh-video-labeled='1'] [data-zh-video-start]>.zh-compact-control::after{display:none!important}

/* Use the same bevel, fine edge and shadow as the catalogue magnifier. */
:root {
  --zh-video-wash: transparent;
  --zh-video-ink: white;
  --zh-video-edge: rgba(28, 36, 41, .46);
}
.zh-platform-youtube, [data-zh-video-effective="youtube"], [data-platform="youtube"] {
  --zh-video-brand: linear-gradient(#d90025, #d90025);
}
.zh-platform-vk, [data-zh-video-effective="vk"], [data-platform="vk"] {
  --zh-video-brand: linear-gradient(90deg, #0878ff 0 18%, #d71345 18% 100%);
}
.zh-platform-button, [data-zh-video] .zh-compact-control, .zh-video-platform-label,
.zh-main-video-copy, .zh-gallery-video-play {
  --zh-video-face: linear-gradient(to bottom, #ffffff1c, #ffffff05 48%, #00000012),
                   linear-gradient(var(--zh-video-wash), var(--zh-video-wash)),
                   var(--zh-video-brand, linear-gradient(#00799d, #00799d));
  --zh-video-relief: inset 0 0 0 1px var(--zh-video-edge), inset 0 2px 0 #ffffff24, 0 1px 3px #0004;
}

/* Most links have a 44px touch target; decorate only the visible 24px face. */
.zh-platform-button::after,
html:root body .zh-main-video-copy[data-platform-label]::before,
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label],
html:root body [data-zh-video-labeled] [data-zh-video-start].zh-compact-control > .zh-video-platform-label,
html:root body [data-zh-video-labeled] [data-zh-video-start] > .zh-compact-control {
  background: var(--zh-video-face) !important;
  border-radius: 4px !important;
  box-shadow: var(--zh-video-relief) !important;
}
html:root body :is(.zh-platform-button, .zh-main-video-copy[data-platform-label], .zh-gallery-video-play[data-platform-label]),
html:root body [data-zh-video][data-zh-video-labeled] .zh-video-platform-label,
html:root body [data-zh-video][data-zh-video-labeled] .zh-video-platform-label::before {
  color: var(--zh-video-ink) !important;
}
.zh-platform-button::before,
html:root body .zh-image-shared-panel .zh-gallery-video-play[data-platform-label]::after {
  border-left-color: var(--zh-video-ink) !important;
}
/* Option links and gallery thumbnails use the compact play mark without a wordmark. */
html:root body :is(#content, #product-product, #product-category) [data-zh-video]:not([data-zh-video-labeled]) [data-zh-video-start].zh-compact-control::before,
html:root body :is(#content, #product-product, #product-category) [data-zh-video]:not([data-zh-video-labeled]) [data-zh-video-start] .zh-compact-control::before {
  background: var(--zh-video-face) !important;
  box-shadow: var(--zh-video-relief) !important;
  border: 0 !important;
  border-radius: 4px !important;
}
html:root body :is(#content, #product-product, #product-category) [data-zh-video]:not([data-zh-video-labeled]) [data-zh-video-start].zh-compact-control::after,
html:root body :is(#content, #product-product, #product-category) [data-zh-video]:not([data-zh-video-labeled]) [data-zh-video-start] .zh-compact-control::after {
  border-left-color: var(--zh-video-ink) !important;
}

/* The whole poster starts playback. Give only its centre badge a larger face. */
html:root body :is(#content, #product-category) [data-zh-video][data-zh-video-labeled='1'] > .zh-home-video-start[data-zh-video-start] > .zh-compact-control {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
}
html:root body :is(#content, #product-category) [data-zh-video][data-zh-video-labeled='1'] > .zh-home-video-start .zh-video-platform-label {
  font-size: 13px !important;
}

@media (hover: hover) and (pointer: fine) {
  /* Give each switch its own idle colour even inside a hovered gallery or card. */
  :root, .zh-video-platforms > .zh-platform-button {
    --zh-video-wash: rgba(247, 246, 241, .81);
    --zh-video-ink: #273039;
    --zh-video-edge: rgba(52, 61, 66, .49);
  }
  :is(.product-thumb, .zh-home-subcategory, .zh-subcategory-card, .zh-native-main-image,
      .zh-blog-card, .zh-native-review-card, .zh-published-review, .zh-review-video-tile, .zh-native-option-heading,
      .zh-native-value-media, .zh-option-choice, [data-zh-gallery-video],
      [data-zh-video], .zh-gallery-video-poster
  ):is(:hover, :has(:focus-visible)),
  .zh-main-video-copy:is(:hover, :focus-visible),
  .zh-home-video-start > .zh-compact-control,
  .zh-video-platforms > .zh-platform-button:enabled:is([aria-pressed="true"], :hover, :focus-visible) {
    --zh-video-wash: transparent;
    --zh-video-ink: white;
    --zh-video-edge: rgba(28, 36, 41, .46);
  }

  /* Match the product photo feedback without dimming the play badge. */
  .zh-home-video-start:is(:hover, :focus-visible) > :is(picture, img) {
    opacity: .8;
  }
  .zh-home-video-start:hover > .zh-compact-control {
    filter: brightness(1.05);
  }

  /* Override the theme's important hover filters only on video and zoom controls. */
  @layer zh-video-pointer {
    :is([data-zh-video-start], .zh-compact-zoom):is(:hover, :focus-visible) {
      opacity: 1 !important;
    }
    :is(.zh-platform-button:enabled, .zh-main-video-copy, .zh-gallery-video-play,
        [data-zh-video-start].zh-compact-control, .zh-compact-zoom):is(:hover, :focus-visible),
    [data-zh-video-start] > .zh-compact-control:hover,
    [data-zh-video-start]:focus-visible > .zh-compact-control,
    .zh-option-video-link:hover > .zh-compact-control {
      filter: brightness(1.12) !important;
    }
    :is(.zh-compact-zoom, [data-zh-video-start].zh-compact-control):is(:hover, :focus-visible)::before,
    [data-zh-video-start]:is(:hover, :focus-visible) .zh-compact-control::before {
      filter: none !important;
    }
  }
}

/* Some touch browsers keep :hover on the tapped link after opening the player. */
@media (hover: none), (pointer: coarse) {
  .zh-video-platforms > .zh-platform-button {
    --zh-video-wash: rgba(247, 246, 241, .81);
    --zh-video-ink: #273039;
    --zh-video-edge: rgba(52, 61, 66, .49);
  }
  .zh-video-platforms > .zh-platform-button:enabled[aria-pressed="true"] {
    --zh-video-wash: transparent;
    --zh-video-ink: white;
    --zh-video-edge: rgba(28, 36, 41, .46);
  }
  @layer zh-video-pointer {
    .zh-home-category-photo:hover,
    .product-thumb .image > a:hover,
    :is([data-zh-video-start], .zh-compact-zoom, .zh-main-video-copy, .zh-platform-button:enabled):hover {
      opacity: 1 !important;
      filter: none !important;
    }
    :is(.zh-compact-zoom, [data-zh-video-start].zh-compact-control):hover::before,
    [data-zh-video-start]:hover .zh-compact-control::before {
      filter: none !important;
    }
  }
}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 767px) {
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-video-platforms {
    justify-content: flex-start !important;
  }
}

/* Align the coloured badge 6px below the image, with the whole link inside the card. */
article.zh-home-subcategory .zh-home-subcategory-video { top: 0; }
.zh-home-subcategory-video .zh-video-platform-label { transform: translateY(-4px); }

/* The image gallery opts in only for the slide that contains a movie. */
@media (pointer: coarse) and (orientation: portrait) and (max-width: 767px),
       (pointer: coarse) and (orientation: landscape) and (max-height: 600px) and (max-width: 1366px) {
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    display: grid;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    top: var(--zh-view-top, 0px);
    left: var(--zh-view-left, 0px);
    right: auto;
    bottom: auto;
    width: var(--zh-view-width, 100%);
    height: var(--zh-view-height, 100dvh);
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
             env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: #fff;
    overflow: hidden;
    grid-template: "title" auto "external" auto "stage" minmax(0, 1fr) "actions" auto / minmax(0, 1fr);
    gap: 0;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > .zh-video-shared-title {
    grid-area: title;
    min-width: 0;
    min-height: 0;
    max-height: 3em;
    margin: 0;
    padding: 4px 8px 0;
    font-size: 14px;
    line-height: 1.3;
    overflow: auto;
    overflow-wrap: anywhere;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > [data-zh-video-external] {
    grid-area: external;
    display: flex;
    align-items: center;
    height: auto;
    min-height: 32px;
    max-height: none;
    margin: 0;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > .zh-video-shared-stage {
    grid-area: stage;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0;
    margin: 0;
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
  }

  /* Rutube fills its iframe with the loading poster. Fit the iframe to the
     video so loading and playback show the same part of the picture. */
  @supports (width: 1cqw) {
    dialog.zh-video-shared-panel[open] > .zh-video-shared-stage:has(iframe[src^="https://rutube.ru/play/embed/"]) {
      container-type: size;
    }
    dialog.zh-video-shared-panel[open] > .zh-video-shared-stage iframe[src^="https://rutube.ru/play/embed/"]:not(:fullscreen) {
      position: absolute;
      inset: 0;
      margin: auto;
      width: min(100cqw, calc(100cqh * var(--zh-rutube-ratio, 1.77777778)));
      height: min(100cqh, calc(100cqw / var(--zh-rutube-ratio, 1.77777778)));
    }
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > .zh-image-actions {
    grid-area: actions;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    align-content: start;
    align-self: stretch;
    justify-content: center;
    gap: 0 6px;
    min-height: 0;
    max-height: min(40vh, 14rem);
    margin: 0;
    padding: 2px 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-video-platforms {
    flex: 1 0 100%;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    align-self: auto;
    width: 100%;
    gap: 0 3px;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > :is(.zh-image-calculate, .zh-video-close) {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    min-height: 44px;
    height: auto;
    padding: 4px 8px;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-media-status {
    flex: 0 0 100% !important;
    order: 1;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0;
    text-align: center;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-media-status:empty {
    display: none;
  }
}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 767px) {
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions:not(:has(> .zh-video-context-link)) > .zh-video-platforms:has(.zh-platform-hint[hidden]):has(.zh-platform-warning[hidden]) {
    flex: 0 1 auto;
    width: max-content;
    max-width: 100%;
  }

  /* Keep the platform selector centered and place the actions in a right-hand column. */
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > .zh-image-actions {
    display: grid;
    grid-template: "platforms action" auto "platforms close" auto "status status" auto / minmax(0, 1fr) min(160px, 40%);
    align-items: center;
    justify-content: stretch;
    gap: 2px;
    max-height: min(50vh, 18rem);
  }
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-video-platforms {
    flex: 0 0 auto !important;
    grid-area: platforms;
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    justify-content: flex-start !important;
    align-self: center;
  }
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > :is(.zh-image-calculate, .zh-review-product-picker-action, .zh-video-close) {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
  }
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > :is(.zh-image-calculate, .zh-review-product-picker-action) {
    grid-area: action;
  }
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-video-close {
    grid-area: close;
  }
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-media-status {
    flex: 0 0 auto !important;
    grid-area: status;
    width: 100%;
  }
}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 400px) {
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-video-platforms > .zh-platform-button {
    padding: 0 4px;
    font-size: 10px;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) and (max-width: 1366px) {
  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) {
    grid-template: "stage title" auto "stage external" auto "stage actions" minmax(0, 1fr)
                   / minmax(0, 1fr) clamp(112px, 18vw, 148px);
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > .zh-video-shared-title {
    padding: 2px 5px 0;
    font-size: 12px;
    max-height: 32px;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > [data-zh-video-external] {
    padding: 2px 5px;
    min-height: 28px;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) > .zh-image-actions {
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1px;
    max-height: none;
    padding: 0 3px 2px;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-video-platforms {
    flex: 0 0 auto;
    flex-flow: column nowrap;
    gap: 0;
  }

  html body dialog.zh-video-shared-panel[open]:is(:not(.zh-image-shared-panel), .zh-gallery-showing-video) .zh-image-actions > .zh-media-status {
    flex: 0 0 auto !important;
  }

  /* Keep navigation at the foot of the side panel, including when help text is open. */
  html body dialog.zh-video-shared-panel[open] > .zh-video-actions.zh-image-actions {
    display: grid;
    grid-template: "platforms" minmax(0, 1fr) "status" auto "action" auto "close" auto / minmax(0, 1fr);
    align-content: stretch;
    justify-content: stretch;
    padding-bottom: 3px;
  }
  html body dialog.zh-video-shared-panel[open] > .zh-video-actions.zh-image-actions > .zh-video-platforms {
    grid-area: platforms;
    min-height: 0;
    max-height: 100%;
    align-self: start;
    justify-content: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  html body dialog.zh-video-shared-panel[open] > .zh-video-actions.zh-image-actions > .zh-media-status {
    grid-area: status;
    max-height: min(4.5em, 17vh) !important;
  }
  .zh-video-actions > :is(.zh-video-context-link, [data-zh-review-picker-action]) {
    grid-area: action;
  }
  .zh-video-actions > .zh-video-close {
    grid-area: close;
  }
}
