/* CHIRATTER EDITORIAL v1.2.9 — stable single-video viewport + fullscreen */
/* Only single video pages receive chtr-detail-fixed. Keep WATCH scroll-snap intact. */
html:has(body.chtr-detail-fixed){height:100%;overflow:hidden;overscroll-behavior:none;scroll-behavior:auto}
body.chtr-detail-fixed{height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
body.chtr-detail-fixed{--chtr-admin-offset:0px}
body.admin-bar.chtr-detail-fixed{--chtr-admin-offset:32px}
/* Keep the site frame fixed. Only the text panel is independently scrollable. */
body.chtr-detail-fixed .chtr-story-detail{
  position:fixed!important;
  top:calc(var(--header-height) + var(--chtr-admin-offset));
  right:0;bottom:0;left:var(--side-width);
  height:auto;min-height:0;width:auto;max-width:none;
  margin:0!important;padding:clamp(12px,1.5vw,22px)!important;
  display:flex;flex-direction:column;gap:10px;
  overflow:hidden!important;overscroll-behavior:none;
}
body.chtr-detail-fixed .chtr-story-detail .detail-breadcrumb{flex:0 0 auto;margin:0 0 2px;font-size:10px;line-height:17px}
body.chtr-detail-fixed .chtr-story-detail .story-detail-grid{
  flex:1 1 auto;min-height:0;height:100%;
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
  gap:clamp(12px,2.5vw,36px);align-items:stretch;
  overflow:hidden;
}
body.chtr-detail-fixed .chtr-story-detail .story-player{
  min-height:0!important;height:100%;width:100%;min-width:0;
  position:relative!important;top:auto!important;
  aspect-ratio:auto!important;display:flex;align-items:center;justify-content:center;
  border-radius:8px;background:#090a09;overflow:hidden;
}
body.chtr-detail-fixed .chtr-story-detail .story-player video{
  display:block;width:100%!important;height:100%!important;max-height:none!important;
  object-fit:contain!important;object-position:center;background:#090a09;
}
body.chtr-detail-fixed .chtr-story-detail .story-copy{
  min-width:0;min-height:0;height:100%;max-height:none;
  overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;scrollbar-gutter:stable;
  padding:clamp(16px,2vw,26px)!important;border-radius:8px;
}
/* Full-screen control: separate from native video controls, always actionable. */
.chtr-fullscreen-toggle{
  position:absolute;z-index:12;top:12px;right:12px;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:42px;min-width:42px;padding:8px 11px;
  border:1px solid rgba(255,255,255,.45);border-radius:8px;
  background:rgba(12,12,14,.86);color:#fff;line-height:1;
  font-size:12px;font-weight:800;cursor:pointer;
  touch-action:manipulation;transition:background .15s ease;
}
.chtr-fullscreen-toggle:hover,.chtr-fullscreen-toggle:focus-visible{background:#b92871;color:#fff}
.chtr-fullscreen-toggle svg{width:19px;height:19px;flex-shrink:0}
.chtr-fullscreen-toggle .chtr-contract-icon{display:none}
.chtr-fullscreen-toggle[aria-pressed="true"] .chtr-expand-icon{display:none}
.chtr-fullscreen-toggle[aria-pressed="true"] .chtr-contract-icon{display:block}
.chtr-fullscreen-toggle[hidden]{display:none!important}
body.chtr-detail-fixed .story-player:fullscreen,
body.chtr-detail-fixed .story-player:-webkit-full-screen{
  width:100vw!important;height:100vh!important;min-height:0!important;
  max-width:none!important;max-height:none!important;border-radius:0;
  background:#000;
}
body.chtr-detail-fixed .story-player:fullscreen video,
body.chtr-detail-fixed .story-player:-webkit-full-screen video{
  width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;
}
/* Tablet/phone: keep page fixed, stack movie and a separately scrollable text pane. */
@media(max-width:1050px){
  body.chtr-detail-fixed .chtr-story-detail .story-detail-grid{
    grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,56fr) minmax(0,44fr);
    gap:10px;
  }
  body.chtr-detail-fixed .chtr-story-detail .story-player{max-width:none;margin:0;width:100%}
}
@media(max-width:760px){
  body.chtr-detail-fixed .chtr-story-detail{
    left:0;right:0;
    bottom:calc(var(--nav-height) + env(safe-area-inset-bottom));
    padding:8px 10px!important;gap:6px;
  }
  body.chtr-detail-fixed .chtr-story-detail .detail-breadcrumb{font-size:9px;line-height:14px}
  body.chtr-detail-fixed .chtr-story-detail .story-detail-grid{
    grid-template-rows:minmax(0,56fr) minmax(0,44fr);
    gap:8px;
  }
  body.chtr-detail-fixed .chtr-story-detail .story-copy{padding:12px 14px!important;scrollbar-gutter:auto}
  body.chtr-detail-fixed .chtr-story-detail .story-copy h1{font-size:17px!important;margin:5px 0 9px}
  body.chtr-detail-fixed .chtr-story-detail .story-byline{margin-bottom:10px}
  body.chtr-detail-fixed .chtr-story-detail .chtr-creator-panel{padding:10px 0;margin:10px 0}
  .chtr-fullscreen-toggle{top:8px;right:8px;padding:8px;min-width:44px;min-height:44px}
  .chtr-fullscreen-label{display:none}
}
@media(max-width:760px) and (max-height:550px){
  body.chtr-detail-fixed .chtr-story-detail .detail-breadcrumb{display:none}
  body.chtr-detail-fixed .chtr-story-detail .story-detail-grid{grid-template-rows:minmax(0,50fr) minmax(0,50fr)}
}
@media(max-width:760px) and (min-width:0px){
  body.admin-bar.chtr-detail-fixed{--chtr-admin-offset:46px}
}
@media(prefers-reduced-motion:reduce){.chtr-fullscreen-toggle{transition:none}}
