:root {
  color-scheme: dark;
  --bg: #050505;
  --fg: #f6f6f2;
  --muted: #b8c3bd;
  --line: rgba(255,255,255,.18);
  --teal: #19c7a8;
  --red: #ff4d5e;
  --ink: rgba(0,0,0,.72);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { overflow: hidden; }
body:has(.film-page), body:has(.text-page) { overflow: auto; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.reels-shell, .reels-root { width: 100vw; height: 100dvh; overflow: hidden; background: #000; }
.reels-root { overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; }
.reel { position: relative; width: 100vw; height: 100dvh; scroll-snap-align: start; overflow: hidden; background: #000; display: grid; place-items: center; }
.reel-video, .reel-poster, .detail-video, .film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-video { z-index: 2; background: #000; }
.reel-poster { z-index: 1; filter: saturate(1.04); }
.ad-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.topbar { position: fixed; z-index: 20; top: env(safe-area-inset-top, 0); left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.brand { font-weight: 800; letter-spacing: 0; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.legal-link { color: var(--muted); font-size: 14px; }

.reel-copy { position: absolute; z-index: 6; left: 16px; right: 92px; bottom: calc(24px + env(safe-area-inset-bottom, 0)); display: grid; gap: 7px; text-shadow: 0 2px 16px rgba(0,0,0,.75); }
.film-title { font-size: 22px; line-height: 1.15; font-weight: 800; overflow-wrap: anywhere; }
.film-meta { color: var(--muted); font-size: 14px; }
.reel-actions { position: absolute; z-index: 6; right: 14px; bottom: calc(24px + env(safe-area-inset-bottom, 0)); display: grid; gap: 10px; }
.sound-toggle, .open-film, .primary-link, .cookie-actions button { border: 1px solid var(--line); border-radius: 8px; color: var(--fg); background: var(--ink); min-width: 58px; min-height: 42px; display: inline-grid; place-items: center; padding: 10px 12px; }
.open-film, .primary-link { background: var(--teal); color: #001512; border-color: transparent; font-weight: 800; }

.cookie-banner { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0)); background: rgba(12,12,12,.94); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-width: 680px; margin: 0 auto; }
.cookie-banner p { margin: 0 0 10px; color: var(--fg); line-height: 1.35; font-size: 14px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie-actions button:last-child { background: var(--red); border-color: transparent; font-weight: 800; }

.film-page { min-height: 100dvh; overflow-y: auto; background: #070707; }
.film-brand { position: fixed; z-index: 20; top: env(safe-area-inset-top, 0); left: 16px; padding-top: 14px; }
.film-watch { position: relative; width: min(100vw, 520px); height: 100dvh; margin: 0 auto; background: #000; }
.film-poster { z-index: 1; }
.detail-video { z-index: 2; }
.film-detail-copy { max-width: 760px; margin: 0 auto; padding: 24px 16px 56px; }
.film-detail-copy h1, .text-page h1 { margin: 0 0 12px; line-height: 1.1; overflow-wrap: anywhere; }
.film-detail-copy p, .text-page p { color: var(--muted); line-height: 1.6; }

.text-page { min-height: 100dvh; overflow-y: auto; padding: 24px 18px 56px; max-width: 820px; margin: 0 auto; background: #070707; }
.text-page .brand { display: inline-block; margin-bottom: 42px; }

@media (min-width: 760px) {
  .reel-video, .reel-poster { width: min(100vw, 520px); left: 50%; transform: translateX(-50%); }
  .reel-copy { left: calc(50% - 244px); right: calc(50% - 148px); }
  .reel-actions { right: calc(50% - 250px); }
}
