.tm-film-thumb {
  position: relative; flex: none; align-self: center; display: block; overflow: hidden;
  border-radius: 6px; scroll-snap-align: start;
}
.tm-film-thumb img { display: block; width: 100px; height: auto; }
.tm-film-play {
  display: grid; place-items: center; width: 58px; height: 58px;
  background: rgba(26, 32, 39, .66); border: 1px solid rgba(255,255,255,.84);
  border-radius: 50%; color: #fff; backdrop-filter: blur(4px);
}
.tm-film-play::after {
  content: ""; border-left: .32em solid currentColor; border-block: .2em solid transparent;
  font-size: 58px; transform: translateX(.035em);
}
.tm-film-thumb .tm-film-play { position: absolute; right: 3px; bottom: 3px; width: 24px; height: 24px; }
.tm-film-thumb .tm-film-play::after { font-size: 25px; }
.tm-film-thumb:focus-visible, .tm-film-poster:focus-visible, .tm-film-frame video:focus-visible {
  outline: 3px solid #19477b; outline-offset: -3px;
}
.tm-setup-film { max-width: 800px; margin: 1rem 0; }
.tm-film-frame { position: relative; width: 100%; margin-inline: auto; }
.tm-film-frame video, .tm-film-poster img {
  display: block; width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 8px;
}
.tm-film-frame video { background: #101318; }
/* Let the native caption renderer paint its own backdrop and honor viewer settings. */
/* Suppress only the source player's caption layer under its native PiP placeholder. */
.tm-film-frame video:picture-in-picture::-webkit-media-text-track-container { opacity: 0; }
.tm-film-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0;
  border-radius: 8px; background: #101318; cursor: pointer;
}
.tm-film-poster .tm-film-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.tm-film-error {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: .55em; border-radius: 8px; background: #17202a; color: white;
}
.tm-film-error a, .tm-film-error button { color: white; text-decoration: underline; }
.tm-film-error button { background: transparent; border: 0; padding: 8px; }
.tm-film-poster[hidden], .tm-film-error[hidden], .tm-setup-film[hidden] { display: none; }
.tm-film-picture { position: relative; }
.tm-film-picture media-controller { display: block; width: 100%; border-radius: 8px 8px 0 0; }
.tm-film-frame { container-type: inline-size; }
.tm-film-bar {
  position: relative; display: flex; align-items: center; height: 40px; padding: 0 4px;
  border-radius: 0 0 8px 8px; background: #17191c; color: white; -webkit-user-select: none; user-select: none;
  --media-control-background: transparent; --media-control-hover-background: transparent;
  --media-icon-color: white; --media-icon-size: 20px; --media-control-padding: 9px;
  --media-range-track-background: #7c8790; --media-text-content: white;
}
.tm-film-bar[hidden], .tm-film-options-list [hidden] { display: none; }
.tm-film-frame:has(.tm-film-bar:not([hidden])) :is(video,.tm-film-poster,.tm-film-poster img) { border-radius: 8px 8px 0 0; }
.tm-film-bar media-time-range { flex: 1; min-width: 27px; touch-action: none; }
.tm-film-bar media-volume-range { width: 60px; }
.tm-film-bar > * { transition: none; }
.tm-film-bar ::part(tooltip) { transition: none; }
.tm-film-bar media-time-range::part(preview-box) { display: none; }
.tm-film-bar :is(media-time-range, media-volume-range) {
  --media-range-segment-transition: none;
  --media-range-thumb-transition: none;
  --media-range-track-transition: none;
}
.tm-film-bar :is(media-time-range, media-volume-range):hover { --media-range-track-background: #9aa3ab; }
.tm-film-bar .tm-pointer-range { --media-focus-box-shadow: none; }
.tm-film-bar > :is(media-play-button, media-mute-button, media-captions-button, media-fullscreen-button):hover {
  --media-icon-color: #c4d6e5;
}
.tm-film-bar :is(media-time-range, media-volume-range):focus-within:not(.tm-pointer-range) {
  --media-range-track-outline: 2px solid #a4d4ff; --media-range-track-outline-offset: 2px;
}
.tm-film-bar :is(media-time-range, media-volume-range):focus-visible:not(.tm-pointer-range),
.tm-film-bar :is(summary, a, button, select):focus-visible { outline: 2px solid #a4d4ff; outline-offset: -2px; }
.tm-film-options { position: relative; flex: none; font-size: 14px; line-height: 1.25; }
.tm-film-options summary {
  display: grid; place-items: center; width: 36px; height: 38px; border-radius: 4px;
  color: white; cursor: pointer; list-style: none;
}
.tm-film-options summary::-webkit-details-marker { display: none; }
.tm-film-options summary:hover, .tm-film-options[open] summary { background: #36424e; }
.tm-film-options-list {
  position: absolute; z-index: 4; bottom: 100%; max-height: var(--film-menu-space, 85vh); overflow-y: auto; overscroll-behavior: contain; right: 0; width: max-content; min-width: 174px;
  display: grid; gap: 1px; padding: 5px; border: 1px solid #45515c; border-radius: 9px;
  box-shadow: 0 3px 12px #0004; background: #202225; color: #fff;
}
.tm-film-options-list :is(a,button,label) {
  display: flex; align-items: center; gap: 9px; min-height: 32px;
  margin: 0; padding: 4px 9px; border: 0; border-radius: 4px; color: inherit; background: transparent;
  font: inherit; font-size: 14px; line-height: 1.2; text-decoration: none; text-align: left;
}
.tm-film-options.opens-below .tm-film-options-list { top: 100%; bottom: auto; }
.tm-film-options-list .tm-film-copy-fallback { display: grid; gap: 4px; font-size: 12px; }
.tm-film-options-list .tm-film-copy-fallback[hidden] { display: none; }
.tm-film-copy-fallback input {
  width: 100%; min-width: 0; padding: 5px; background: #fff; color: #17191c; font-size: 16px;
  -webkit-user-select: text; user-select: text;
}
.tm-film-options-list .fa { width: 16px; flex: none; color: #ced2d6; text-align: center; }
#product-product .tm-film-frame .tm-film-options-list a,
#product-product .tm-film-frame .tm-film-options-list a:is(:hover,:focus-visible) {
  color: white; text-decoration: none; font-weight: normal;
}
.tm-film-options-list :is(a,button):hover { background: #35383c; }
@media (hover: none) {
  .tm-film-bar { --media-tooltip-display: none; }
}
@media (pointer: coarse) {
  @container (max-width: 510px) {
    .tm-film-bar media-time-range { --media-range-segment-hover-height: 4px; }
    .tm-film-bar media-time-range::part(track) { clip-path: none; }
  }
  .tm-film-options-list :is(a,button,label) { min-height: 44px; }
  .tm-film-options summary { width: 44px; }
}
.tm-film-options-list select { width: auto; margin-left: auto; color: white; background: #34414e; border: 0; border-radius: 4px; }
.tm-film-options-list button:disabled { opacity: .55; }
.tm-share-status:not(:empty) { position: absolute; right: 8px; bottom: 44px; padding: 4px 8px; border-radius: 4px; background: #19222c; color: white; font-size: 14px; }
@container (max-width: 510px) { .tm-film-bar media-volume-range { display: none; } }
@container (max-width: 340px) { .tm-film-bar { --media-control-padding: 6px; } }
.tm-film-frame:fullscreen { display: flex; flex-direction: column; justify-content: center; background: #000; }
.tm-film-frame:fullscreen .tm-film-picture { min-height: 0; }
.tm-film-frame:fullscreen video { object-fit: contain; max-height: calc(100dvh - 40px); }
.tm-film-frame:fullscreen .tm-film-bar { flex-shrink: 0; }
.tm-gallery-main:has(.tm-film-slide.is-active) { border-color: transparent; }
.tm-film-slide .tm-gallery-open { position: relative; padding: 0; cursor: pointer; }
.tm-film-slide img { width: 100%; height: 100%; object-fit: contain; }
.tm-film-slide .tm-film-play { position: absolute; }
dialog.tm-media-viewer {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  box-sizing: border-box; border: 0; overscroll-behavior: contain; background: transparent;
}
dialog.tm-media-viewer::backdrop { background: rgba(18,20,23,.84); }
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  dialog.tm-media-viewer::backdrop { background: rgba(18,20,23,.68); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
}
dialog.tm-media-viewer .tm-media-viewer-close {
  position: absolute; top: max(8px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  z-index: 3; width: 44px; height: 44px; margin: 0;
  grid-area: auto; background: #17191c; color: white; border: 1px solid #ffffff40;
}
dialog.tm-media-viewer .tm-media-viewer-nav { background: #17191c; color: white; border-color: #ffffff40; }
dialog.tm-media-viewer :is(.tm-media-viewer-close, .tm-media-viewer-nav):hover { background: #303337; }
/* An opaque film surface avoids compositing the storefront through a live blur on every frame. */
dialog.tm-media-viewer.tm-viewing-film::backdrop {
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
}
dialog.tm-media-viewer.tm-viewing-film { background: #191b1e; }
/* Keep the gallery's original side columns and button styles on every slide.
   Equal space above and below the picture puts its center on the arrow axis. */
dialog.tm-media-viewer[open] {
  --viewer-height: 100vh; height: var(--viewer-height);
  grid-template-rows: minmax(0,1fr) auto minmax(0,1fr);
  padding-block: 0;
}
dialog.tm-media-viewer[open] .tm-media-viewer-nav {
  position: absolute; grid-row: auto; inset-block: 0; margin-block: auto; z-index: 2;
}
dialog.tm-media-viewer[open] .tm-media-viewer-prev { grid-column: 1 / 2; }
dialog.tm-media-viewer[open] .tm-media-viewer-next { grid-column: 3 / 4; }
dialog.tm-media-viewer[open] .tm-media-viewer-caption { align-self: start; }
@supports (height: 100dvh) {
  dialog.tm-media-viewer[open] { --viewer-height: 100dvh; }
}
dialog.tm-media-viewer.tm-viewing-film {
  --film-width: min(980px, calc(100% - 84px), calc((var(--viewer-height) - 98px) * 16 / 9));
}
dialog.tm-media-viewer.tm-viewing-film .tm-media-viewer-stage {
  grid-column: 1 / -1; justify-self: center; width: var(--film-width);
  aspect-ratio: auto; height: auto; padding: 0; overflow: visible; background: transparent; box-shadow: none;
}
.tm-viewing-film .tm-media-viewer-image { display: none; }
.tm-viewing-film .tm-setup-film { width: 100%; max-width: none; margin: 0; }
.tm-viewing-film .tm-film-frame:not(:fullscreen) > .tm-film-bar { position: absolute; top: 100%; width: 100%; }
/* The lower grid row measures the room below the centered picture. */
dialog.tm-media-viewer.tm-viewing-film .tm-media-viewer-caption {
  grid-column: 1 / -1; align-self: stretch; container: film-caption / size;
  align-items: flex-start; padding: 0; pointer-events: none;
}
.tm-viewing-film .tm-media-viewer-count {
  margin-right: calc((100% - var(--film-width)) / 2 + 2px); padding-top: 10px;
}
.tm-viewing-film:has(.tm-film-bar:not([hidden])) .tm-media-viewer-count { margin-top: 40px; }
/* Use the side gutter when the transport and count cannot both fit underneath. */
@container film-caption (height < 68px) {
  .tm-viewing-film .tm-media-viewer-count {
    align-self: flex-end; margin-right: 2px; padding: 0 0 8px;
  }
}
@media (max-width: 767px) {
  dialog.tm-media-viewer.tm-viewing-film { --film-width: 100%; }
}
@media (orientation: landscape) and (max-height: 500px) {
  dialog.tm-media-viewer.tm-media-viewer-fill-frame:not(.tm-viewing-film) .tm-media-viewer-stage {
    max-width: min(100%, calc((100dvh - 88px) * 4 / 3));
  }
  dialog.tm-media-viewer.tm-viewing-film .tm-media-viewer-stage {
    /* Keep the old landscape size when the count fits below or beside the bar. */
    max-width: min(calc((var(--viewer-height) - 84px) * 16 / 9),
      max(calc(100% - 84px), calc((var(--viewer-height) - 136px) * 16 / 9)));
  }
}
/* Let the open manual menu extend past the description's scroll and section boxes. */
:is(.tm-product-section, .tm-product-section-body, .tm-description-content):has(#film-manual details[open]) { overflow: visible; }
.tm-product-section:has(#film-manual details[open]) { position: relative; z-index: 1; }
dialog.tm-media-viewer { touch-action: pan-y pinch-zoom; }
dialog.tm-media-viewer :is(.tm-media-viewer-image, .tm-film-picture) { touch-action: pinch-zoom; }
.tm-watch-film { max-width: 920px; margin: 24px auto 44px; }
.tm-watch-film .tm-setup-film { max-width: none; }
.tm-watch-film h1 { font-size: clamp(24px, 3vw, 33px); line-height: 1.15; }
.tm-watch-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tm-watch-links a { color: #19477b; text-decoration: underline; }
@media (max-width: 767px) { .tm-film-thumb img { width: 84px; } }
@media (orientation: landscape) and (max-height: 500px) {
  #product-product .tm-setup-film { --film-top: 54px; }
  #product-product.tm-mobile-buy-active .tm-setup-film { --film-bottom: var(--tm-mobile-buy-height, 63px); }
  .tm-setup-film .tm-film-frame {
    --film-reserved: calc(var(--film-top, 0px) + var(--film-bottom, 0px) + 8px);
    max-width: calc((100vh - var(--film-reserved)) * 16 / 9);
    max-width: calc((100dvh - var(--film-reserved)) * 16 / 9);
  }
  .tm-setup-film video { scroll-margin-block: var(--film-top, 0px) var(--film-bottom, 0px); }
}

.tm-viewing-film .tm-setup-film .tm-film-frame { max-width: none; }

@media (orientation: landscape) and (max-height: 500px) {
  .tm-setup-film .tm-film-frame { --film-reserved: calc(var(--film-top, 0px) + var(--film-bottom, 0px) + 48px); }
  /* Expanded phone browser chrome can leave a picture narrower than its transport. */
  :is(#film-manual, #film-watch_page):not(:fullscreen) {
    min-width: min(100%, 320px);
  }
  :is(#film-manual, #film-watch_page):not(:fullscreen) .tm-film-picture {
    max-width: calc((100dvh - var(--film-reserved)) * 16 / 9); margin-inline: auto;
  }
}
