/* Shared native video surface; surrounding existing page/modal styles remain. */
.thm-native-video {
  position: relative;
  width: 100%; height: 100%; overflow: hidden;
  background: #000; color: #fff; direction: ltr;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y; isolation: isolate;
}
.thm-native-video > video {
  position: absolute; left: var(--thm-video-left, 0px); top: var(--thm-video-top, 0px); width: var(--thm-video-width, 100%); height: var(--thm-video-height, 100%);
  border: 0; display: block; object-fit: contain;
}
.thm-native-video > video::-webkit-media-controls { display: none !important; }
.thm-native-video:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.thm-video-spinner {
  position: absolute; left: 50%; top: calc(var(--thm-video-top, 0px) + var(--thm-video-height, 100%) / 2); z-index: 3;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: rgba(255,255,255,.95);
  border-radius: 50%; animation: thm-video-spin .75s linear infinite;
  pointer-events: none;
}
.thm-video-spinner[hidden] { display: none; }
@keyframes thm-video-spin { to { transform: rotate(360deg); } }
.thm-video-seek {
  position: absolute; z-index: 4; left: var(--thm-video-left, 0px); width: var(--thm-video-width, 100%); right: auto; top: var(--thm-seek-top, 0px);
  height: 44px; padding: 0; margin: 0; cursor: pointer;
  touch-action: none; outline: none;
}
.thm-video-seek-track {
  position: absolute; left: 0; right: 0; top: var(--thm-track-top, 22px);
  height: 2px; border-radius: 0; overflow: hidden;
  background: rgba(255,255,255,.23); transition: height .12s ease;
}
.thm-video-seek-fill {
  display: block; height: 100%; width: 100%; background: rgba(255,255,255,.85);
  transform: scaleX(0); transform-origin: left center;
}
.thm-video-seek[data-scrubbing="true"] .thm-video-seek-track,
.thm-video-seek:focus-visible .thm-video-seek-track { height: 6px; }
.thm-video-seek[aria-disabled="true"] { cursor: default; }
.thm-video-seek[aria-disabled="true"] .thm-video-seek-track { opacity: .4; }
.thm-native-frame-mount { position: absolute; inset: 0; }
.thm-video-screenreader {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.thm-video-screenreader.thm-video-error {
  left: 20px; right: 20px; bottom: 46px; width: auto; height: auto;
  margin: 0; padding: 10px 14px; clip: auto; white-space: normal;
  border-radius: 10px; background: rgba(0,0,0,.65); color: #fff;
  font-size: 14px; line-height: 1.45; text-align: center;
  pointer-events: none;
}
.thm-feed-close {
  position: fixed; top: calc(var(--nav-height,76px) + 14px); right: max(16px,env(safe-area-inset-right));
  z-index: 30; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 30px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
[data-thm-provider="bunny"] .videoNumber,
[data-thm-provider="bunny"] .loadingLabel { display: none; }
@media (prefers-reduced-motion: reduce) {
  .thm-video-seek-track { transition: none; }
}

/* A modal's video keeps its existing dimensions. Its seek control is portalled
   outside clipped modal ancestors, but stays aligned with the 9:16 picture edges. */
.thm-video-seek-viewport {
  position: fixed; right: auto; z-index: 2147483000;
  direction: ltr; -webkit-tap-highlight-color: transparent;
}
.thm-video-seek[hidden] { display: none; }
/* Keep the portrait image centered; only Bunny's feed surface/rail spans the viewport. */
[data-thm-provider="bunny"] .feedStage { padding: 0; }
[data-thm-provider="bunny"] .feed { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
[data-thm-provider="bunny"] .videoPage,
[data-thm-provider="bunny"] .playerShell { border-radius: 0; }

/* THM_STANDALONE_VIDEO_V15: matches homepage hero/FAQ fullscreen presentation. */
.thm-single-overlay { position:fixed; inset:0; z-index:20000; display:flex; align-items:center;
 justify-content:center; padding:28px; box-sizing:border-box; background:rgba(5,7,18,.84);
 -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); opacity:0; visibility:hidden;
 pointer-events:none; transition:opacity .28s ease,visibility 0s linear .28s; }
.thm-single-overlay[data-open="true"] { opacity:1; visibility:visible; pointer-events:auto; transition-delay:0s; }
.thm-single-modal { position:relative; width:min(1180px,92vw,155vh); aspect-ratio:16/9; overflow:hidden;
 border-radius:24px; background:#000; border:1px solid rgba(255,255,255,.18);
 box-shadow:0 40px 100px rgba(0,0,0,.58),0 10px 34px rgba(0,0,0,.28); opacity:0;
 transform:translateY(18px) scale(.84); transition:transform .42s cubic-bezier(.16,1,.3,1),opacity .24s ease; }
.thm-single-overlay[data-open="true"] .thm-single-modal { opacity:1; transform:translateY(0) scale(1); }
.thm-single-modal iframe { position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
.thm-single-close { position:fixed; top:20px; right:20px; z-index:20001; width:46px; height:46px;
 display:flex; align-items:center; justify-content:center; padding:0; border:1px solid rgba(255,255,255,.18);
 border-radius:999px; background:rgba(15,15,25,.64); color:#fff; font-family:inherit; font-weight:300; line-height:1; font-size:28px;
 cursor:pointer; -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
.thm-single-close:focus-visible { outline:3px solid rgba(140,132,255,.75); outline-offset:3px; }
@media(max-width:600px) {
 .thm-single-overlay { padding:0; width:100vw; height:100dvh; background:#000; }
 .thm-single-modal { width:100vw; height:100dvh; max-width:none; max-height:none; aspect-ratio:auto;
 border-radius:0; border:0; box-shadow:none; transform:translateY(12px) scale(.94); }
 .thm-single-close { top:max(12px,env(safe-area-inset-top)); right:max(12px,env(safe-area-inset-right));
 width:44px; height:44px; font-size:27px; background:rgba(0,0,0,.62); }
}
@media(prefers-reduced-motion:reduce) {
 .thm-single-overlay,.thm-single-modal { transition:none; }
}

/* THM_HERO_FIRST_FRAME_V23_BEGIN: homepage Bunny poster, no inline HLS download. */
.heroTwinFlameVideo > .thm-home-hero-static-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: contain; pointer-events: none;
  z-index: 3;
}
.thm-native-video > .thm-home-hero-end-poster {
  position: absolute; left: var(--thm-video-left, 0px);
  top: var(--thm-video-top, 0px); width: var(--thm-video-width, 100%);
  height: var(--thm-video-height, 100%); object-fit: contain;
  display: block; z-index: 2; pointer-events: none;
}
.thm-home-hero-end-poster[hidden] { display: none !important; }
/* THM_HERO_FIRST_FRAME_V23_END */

/* THM_WEB_THEATER_V24_CSS_BEGIN */
/* The existing homepage button keeps its localized label and keyboard behavior.
   This affordance is on the PREVIEW only, never over a playing video. */
.heroTwinFlameVideo > .heroVideoClickTarget { cursor: pointer; }
.heroTwinFlameVideo > .heroVideoClickTarget::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: clamp(52px, 6vw, 72px); height: clamp(52px, 6vw, 72px);
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px solid rgba(255,255,255,.70); background: rgba(0,0,0,.50);
  box-shadow: 0 8px 28px rgba(0,0,0,.38); pointer-events: none;
  transition: background .18s ease, box-shadow .18s ease;
}
.heroTwinFlameVideo > .heroVideoClickTarget::after {
  content: ""; position: absolute; left: calc(50% + 2px); top: 50%;
  width: 0; height: 0; transform: translate(-50%, -50%);
  border-top: 12px solid transparent; border-bottom: 12px solid transparent;
  border-left: 19px solid #fff; pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.25));
}
.heroTwinFlameVideo > .heroVideoClickTarget:hover::before,
.heroTwinFlameVideo > .heroVideoClickTarget:focus-visible::before {
  background: rgba(0,0,0,.66); box-shadow: 0 10px 32px rgba(0,0,0,.48);
}
.heroTwinFlameVideo > .heroVideoClickTarget:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
/* A tall 9:16 picture, not a small portrait inside a wide 16:9 box.
   All selectors are opt-in modal classes; the scrolling feed is untouched.
   The existing scale/fade transitions and open/close event handlers are kept. */
html body .thm-cinema-overlay {
  --thm-cinema-vh: 100vh;
  --thm-cinema-top: max(8px, env(safe-area-inset-top, 0px));
  --thm-cinema-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  --thm-cinema-left: max(0px, env(safe-area-inset-left, 0px));
  --thm-cinema-right: max(0px, env(safe-area-inset-right, 0px));
  --thm-cinema-picture-width: min(
    calc(100vw - var(--thm-cinema-left) - var(--thm-cinema-right)),
    calc((var(--thm-cinema-vh) - var(--thm-cinema-top) - var(--thm-cinema-bottom) - 12px) * 9 / 16)
  );
  position: fixed !important; inset: 0 !important;
  width: 100% !important; height: var(--thm-cinema-vh) !important;
  box-sizing: border-box; padding: var(--thm-cinema-top) var(--thm-cinema-right) var(--thm-cinema-bottom) var(--thm-cinema-left) !important;
  align-items: center !important; justify-content: center !important;
  z-index: 20000 !important; background: rgba(5,7,18,.86) !important;
  -webkit-backdrop-filter: blur(12px) !important; backdrop-filter: blur(12px) !important;
}
@supports(height: 100dvh) { .thm-cinema-overlay { --thm-cinema-vh: 100dvh; } }
.thm-cinema-overlay .thm-cinema-panel {
  position: relative; flex: none; box-sizing: border-box;
  width: var(--thm-cinema-picture-width) !important;
  height: calc(var(--thm-cinema-picture-width) * 16 / 9 + 12px) !important;
  min-width: 0; min-height: 0; max-width: none !important; max-height: none !important;
  aspect-ratio: auto !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 12px !important; overflow: hidden !important;
  background: #000 !important;
  box-shadow: 0 36px 110px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.11) !important;
}
.thm-cinema-overlay .thm-cinema-close {
  position: fixed !important; top: max(12px, env(safe-area-inset-top,0px)) !important;
  right: max(12px, env(safe-area-inset-right,0px)) !important; z-index: 20001 !important;
  width: 44px !important; height: 44px !important; padding: 0 !important;
  color: #fff !important; background: rgba(10,10,18,.62) !important;
  border: 1px solid rgba(255,255,255,.24) !important; border-radius: 50% !important;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
@media(max-width:600px) {
  .thm-cinema-overlay .thm-cinema-panel { border-radius: 4px !important; }
}
@media(prefers-reduced-motion:reduce) {
  .heroTwinFlameVideo > .heroVideoClickTarget::before { transition: none; }
}
/* THM_CINEMA_X_CENTER_V25_BEGIN */
/* Center the actual strokes of the close X instead of a font-dependent glyph.
   The 44px button, circle, top/right position, colors and click target remain. */
.thm-cinema-overlay .thm-cinema-close {
  font-size: 0 !important;
  line-height: 0 !important;
}
.thm-cinema-overlay .thm-cinema-close::before,
.thm-cinema-overlay .thm-cinema-close::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 16px !important;
  height: 2px !important;
  background: currentColor !important;
  border: 0 !important;
  border-radius: 2px !important;
  pointer-events: none !important;
}
.thm-cinema-overlay .thm-cinema-close::before {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}
.thm-cinema-overlay .thm-cinema-close::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}
/* THM_CINEMA_X_CENTER_V25_END */
/* THM_WEB_THEATER_V24_CSS_END */
