/* jdtheme26 - FILM PLAYER (2026-09-29). Brief: wiki sources/2026-09-29-about-page/film-player-operator-brief.md
   A self-hosted film shown like a large photograph: poster + one round start button; after the start its own thin controls
   (play / pause, timeline, time, sound, full screen) on a soft gradient, which fade away while the film runs; a quiet end screen.
   Behaviour: assets/js/jd-film-player.js. Reusable:
     <div class="jd-film" data-jd-film data-jd-film-cta="/shop/"> <video playsinline preload="metadata">…</video> … </div>
   (markup of all parts: wiki build/scripts/header-and-colors/about-film-player.php)
   Without the script the poster stays with a plain link to the film file. */
.jd-film {
  --jd-film-ivory: #fbf6ea;
  --jd-film-ink: #4a4038;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #f4f1eb;
  box-shadow: 0 10px 40px rgba(40, 30, 20, .06);
  isolation: isolate;
  color: var(--jd-film-ivory);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.jd-film video,
.jd-film__poster,
.jd-film__poster img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.jd-film video { object-fit: contain; background: #1b1815; }
.jd-film__poster img { object-fit: cover; }
.jd-film__poster { z-index: 1; transition: opacity .3s ease; }
.jd-film.is-started .jd-film__poster { opacity: 0; pointer-events: none; }
.jd-film__file { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; color: #fff; font-size: 14px; }
.jd-film.is-ready .jd-film__file { display: none; }

/* every button of the player: no theme button look */
body .jd-film button {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  cursor: pointer;
}
body .jd-film button:hover { background: none; box-shadow: none; color: inherit; }
body .jd-film button:focus-visible { outline: 1.5px solid var(--jd-film-ivory); outline-offset: 3px; border-radius: 6px; }

/* start */
body .jd-film .jd-film__start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  font-family: var(--jd-font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .26em;
  text-indent: .26em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(30, 22, 16, .35);
  transition: opacity .3s ease;
}
.jd-film.is-ready .jd-film__start { display: flex; }
.jd-film.is-started .jd-film__start { opacity: 0; pointer-events: none; }
body .jd-film .jd-film__start:focus-visible { outline-offset: -8px; border-radius: 18px; }
.jd-film__disc {
  display: grid;
  place-items: center;
  width: clamp(60px, 6vw, 80px);
  height: clamp(60px, 6vw, 80px);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(40, 30, 20, .1);
  color: var(--jd-film-ink);
  transition: transform .25s ease, background-color .25s ease;
}
.jd-film__disc svg { width: 30%; height: 30%; margin-left: 7%; fill: currentColor; }
@media (hover: hover) {
  .jd-film__start:hover .jd-film__disc { transform: scale(1.04); background-color: rgba(255, 255, 255, .92); }
}

/* the faint icon shown for a moment when the film is paused by a click on it */
.jd-film__flash {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.jd-film__flash svg { width: 32%; height: 32%; margin-left: 6%; fill: currentColor; }
.jd-film.is-flash .jd-film__flash { opacity: 1; }

/* controls */
.jd-film__bar {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 12px);
  padding: 46px clamp(10px, 2vw, 26px) clamp(6px, 1.2vw, 14px);
  background: linear-gradient(rgba(20, 18, 15, 0), rgba(20, 18, 15, .42));
  color: var(--jd-film-ivory);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility 0s linear .22s;
}
.jd-film.is-started.is-controls:not(.is-ended) .jd-film__bar { opacity: .92; visibility: visible; transition: opacity .22s ease; }
body .jd-film .jd-film__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.jd-film__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.jd-film__btn [data-on] { display: none; }
.jd-film.is-playing .jd-film__btn--play [data-off],
.jd-film.is-muted .jd-film__btn--sound [data-off] { display: none; }
.jd-film.is-playing .jd-film__btn--play [data-on],
.jd-film.is-muted .jd-film__btn--sound [data-on] { display: block; }
.jd-film__time {
  flex: none;
  min-width: 6.6em;
  font-family: "Baloo 2", var(--jd-font-body);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  white-space: nowrap;
}
/* timeline: a range input, 3px track */
body .jd-film .jd-film__seek {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-appearance: none;
          appearance: none;
  cursor: pointer;
}
.jd-film__seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--jd-film-ivory) var(--jd-film-at, 0%), rgba(255, 255, 255, .35) var(--jd-film-at, 0%));
}
.jd-film__seek::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.jd-film__seek::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--jd-film-ivory); }
.jd-film__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--jd-film-ivory);
}
.jd-film__seek::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--jd-film-ivory); }
body .jd-film .jd-film__seek:focus-visible { outline: 1.5px solid var(--jd-film-ivory); outline-offset: -12px; border-radius: 10px; }
.jd-film.is-started.is-playing:not(.is-controls) { cursor: none; }

/* end screen - NOT USED since 2026-09-29: the player returns to the cover when the film is over and never sets .is-ended */
.jd-film__end {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(30, 25, 20, .46);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
.jd-film.is-ended .jd-film__end { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.jd-film__end-name { margin: 0; font-family: "Baloo 2", var(--jd-font-body); font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: .2em; text-indent: .2em; line-height: 1.2; }
.jd-film__end-line { margin: 0 0 clamp(14px, 2vw, 26px); font-family: "Baloo 2", var(--jd-font-body); font-size: clamp(11px, 1.1vw, 14px); letter-spacing: .22em; text-indent: .22em; opacity: .9; }
.jd-film__end-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
body .jd-film .jd-film__end-acts :is(button, a) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: #fff;
  font-family: var(--jd-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .14em;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .5);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
body .jd-film .jd-film__end-acts :is(button, a):hover { color: #fff; text-decoration-color: #fff; }
body .jd-film .jd-film__end-acts a:focus-visible { outline: 1.5px solid var(--jd-film-ivory); outline-offset: 3px; border-radius: 6px; }

/* full screen: no rounded frame */
.jd-film:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }
.jd-film:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; background: #000; }

@media (max-width: 767px) {
  .jd-film { border-radius: 14px; }
  .jd-film__bar { gap: 0; padding: 30px 4px 2px; }
  .jd-film__time { min-width: 0; padding-inline: 4px; font-size: 11px; }
  body .jd-film .jd-film__start { font-size: 11px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .jd-film__disc { transition: none; }
  .jd-film__start:hover .jd-film__disc { transform: none; }
  .jd-film__poster, body .jd-film .jd-film__start, .jd-film__bar, .jd-film__flash, .jd-film__end { transition-duration: .01s; }
}
