/* ═══════════════════════════════════════════════════════════════
   WORKS PAGE — Netflix-Style Layout with Cinematic Brand System
   ═══════════════════════════════════════════════════════════════ */

/* ── PAGE HEADER / HERO ── */
.works-header {
  height: 80vh;
  min-height: 600px;
  max-height: 900px;
  padding: calc(var(--nav-h) + 20px) var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.works-header::before,
.works-header::after {
  content: '';
  position: absolute; top: 0; left: -20%; right: -20%; height: 100%;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.8s ease;
}
.works-header::before {
  /* Cool glow (Studios) */
  background:
    radial-gradient(ellipse 50% 70% at 10% 40%, rgba(74,139,164,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 90% 60%, rgba(74,139,164,0.04) 0%, transparent 60%);
  opacity: 1;
}
.works-header::after {
  /* Warm glow (Films) */
  background:
    radial-gradient(ellipse 50% 70% at 10% 40%, rgba(212,136,58,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 90% 60%, rgba(212,136,58,0.04) 0%, transparent 60%);
  opacity: 0;
}
body.theme-films-active .works-header::before { opacity: 0; }
body.theme-films-active .works-header::after  { opacity: 1; }
.yt-bg-iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw; height: 56.25vw; /* 16:9 aspect */
  min-height: 100vh; min-width: 177.77vh; 
  transform: translate(-50%, -50%);
  pointer-events: none;
  object-fit: cover;
}
.works-header-overlay {
  position: absolute; inset: 0;
  /* Deep dark gradient from left + bottom for readability */
  background: linear-gradient(to right, rgba(10,12,16,0.95) 0%, rgba(10,12,16,0.6) 40%, transparent 100%),
              linear-gradient(to top, var(--bg) 0%, transparent 30%);
  z-index: 1;
  pointer-events: none;
}

/* Toggle centered at top of header */
.works-toggle-wrap {
  position: relative; z-index: 10;
  display: flex;
  justify-content: center;
  margin-top: 10px; /* Perfectly sits beneath the new centered logo */
}

/* Hero text — left-middle */
.works-hero-text-container {
  position: relative; z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-top: -20px;
}
.works-hero-text {
  position: absolute;
  top: 50%; left: 0;
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  max-width: 600px;
}

/* Default state: Studios is active. Films is swiped to the Right */
.works-hero-films {
  transform: translateY(-50%) translateX(80px);
  opacity: 0;
  pointer-events: none;
}

/* Theme Films Active: Studios swipes Left, Films slides in from Right to Center */
body.theme-films-active .works-hero-studios {
  transform: translateY(-50%) translateX(-80px);
  opacity: 0;
  pointer-events: none;
}
body.theme-films-active .works-hero-films {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.works-hero-text h1,
.works-hero-text h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
  /* Clamp to 2 lines max — protects layout from long project names */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.works-hero-text p {
  font-size: 1.05rem;
  color: var(--muted-hi);
  margin: 0 0 28px 0;
  line-height: 1.6;
  /* Clamp to 3 lines max — safety net for long descriptions */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Genre chip on its own line below subtext */
.hero-genre-tag {
  display: block;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.6;
}

.works-hero-text .section-label {
  margin-bottom: 20px;
}

/* Play Reel Button */
.btn-play-reel {
  display: inline-flex; align-items: center; gap: 14px;
  background: transparent; border: none;
  color: var(--white); cursor: pointer;
  padding: 0; outline: none;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: all var(--dur-md) ease;
}
.play-reel-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  font-size: 1.2rem;
  transition: all var(--dur-sm) ease;
}
.btn-play-reel:hover .play-reel-icon {
  background: var(--white); color: var(--bg);
  transform: scale(1.05); border-color: transparent;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}
.btn-play-reel:hover span:last-child {
  color: var(--cool);
}
body.theme-films-active .btn-play-reel:hover span:last-child {
  color: var(--warm);
}

/* ── UPCOMING PROJECT CARD (Films Only) ── Legacy floating card removed; now rendered as .n-card inside #upcoming-container ── */

/* ── FILTER PILLS ── */
.filter-pills {
  display: flex; gap: 7px; flex-wrap: wrap;
  justify-content: flex-start;
  padding: 20px var(--gutter) 4px;  /* extra top padding to clear upcoming-container when empty */
  margin-bottom: 4px;
  position: relative; z-index: 15; /* always in front of upstream containers */
}
.filter-pill {
  padding: 6px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-hi);
  font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur-sm) ease;
}
.filter-pill:hover { color: var(--white); border-color: var(--border-hi); }
.filter-pill.active {
  /* Default Cool (Studios) */
  background: linear-gradient(135deg, var(--cool), #275267);
  border-color: transparent;
  color: #fff;
}
body.theme-films-active .filter-pill.active {
  /* Warm (Films) */
  background: var(--grad-cta);
}
.filter-pill.pill-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── FILTER SORT TOGGLE ── */
.filter-sort-group {
  display: flex;
  margin-left: auto;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,0.06);
}
.sort-btn {
  background: transparent;
  border: none;
  color: var(--muted-hi);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sort-btn:hover { color: #fff; }
.sort-btn.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── ROWS CONTAINER ── */
.rows-container {
  position: relative; z-index: 3;
  padding: 3rem 0 5rem; /* added space above row headers */
}
.n-row { margin-bottom: 6px; position: relative; }  /* compact: was 2vw */

/* ── ROW HEADER — frosted pill + separator ── */
.row-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--gutter); margin-bottom: 0;
}
.row-header span {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.85rem;   /* tighter pill */
  border-radius: var(--r-pill);
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.row-header::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0.08) 0%, transparent 100%);
}

/* ── SLIDER ── */
.slider-wrapper {
  position: relative; padding: 0 var(--gutter);
  overflow-x: clip; overflow-y: visible;
}
.slider-track {
  display: flex; gap: 10px;
  overflow: visible; padding: 22px 0;  /* compact: was 42px */
  transition: transform 0.52s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}
.slider-btn {
  position: absolute; top: 0; bottom: 0;
  width: 60px; /* Narrow width for the gradient area */
  background: linear-gradient(
    to var(--btn-dir, right),
    var(--bg)            0%,
    rgba(7,8,15,0.4)   60%,
    transparent          100%
  );
  color: rgba(255,255,255,0.5);
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 25;
  opacity: 0; transition: all var(--dur-md) ease;
  border: none;
}
.slider-wrapper:hover .slider-btn { opacity: 0.8; }
.slider-btn:hover { color: var(--warm-hi); opacity: 1 !important; }
.slider-btn.left  { left: 0; --btn-dir: right; }
.slider-btn.right { right: 0; --btn-dir: left; }

/* ── CARDS ── */
.n-card {
  flex: 0 0 calc(100% / 7 - 10px);
  min-width: 170px;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.35s cubic-bezier(0.33,1,0.68,1), box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer; overflow: hidden; z-index: 1; flex-shrink: 0;
}
@media(max-width: 1399px) { .n-card { flex: 0 0 calc(100% / 6 - 10px); } }
@media(max-width: 1199px) { .n-card { flex: 0 0 calc(100% / 5 - 10px); } }
@media(max-width: 899px)  { .n-card { flex: 0 0 calc(100% / 4 - 10px); } }
@media(max-width: 600px)  { .n-card { flex: 0 0 calc(100% / 2 - 10px); } }

/* ── FILMS THEME OVERRIDES (Movie Posters) ── */
body.theme-films-active .n-card {
  aspect-ratio: 2 / 3;
  flex: 0 0 calc(100% / 8 - 10px);
  min-width: 130px;
}
@media(max-width: 1399px) { body.theme-films-active .n-card { flex: 0 0 calc(100% / 7 - 10px); } }
@media(max-width: 1199px) { body.theme-films-active .n-card { flex: 0 0 calc(100% / 6 - 10px); } }
@media(max-width: 899px)  { body.theme-films-active .n-card { flex: 0 0 calc(100% / 5 - 10px); } }
@media(max-width: 600px)  { body.theme-films-active .n-card { flex: 0 0 calc(100% / 3 - 10px); } }

body.theme-films-active .c-overlay {
  background: transparent;
  pointer-events: none;
}
body.theme-films-active .c-year,
body.theme-films-active .c-title,
body.theme-films-active .c-meta {
  display: none !important;
}
body.theme-films-active .c-series-badge {
  top: 10px; left: 10px;
}

.n-card:hover {
  transform: scale(1.11) translateY(-6px);
  border-color: rgba(162,119,255,0.4);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.8),
    0 0 35px rgba(162,119,255,0.2),
    inset 0 1px 0 rgba(255,255,255,0.2);
  z-index: 15;
}

/* Featured Card Gold Glow */
.is-featured-card {
  border-color: rgba(212, 136, 58, 0.4) !important;
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.5),
    0 0 20px rgba(212, 136, 58, 0.15);
}
.is-featured-card:hover {
  border-color: var(--warm-hi) !important;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.8),
    0 0 40px rgba(212, 136, 58, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* Hero hidden mode — smooth collapse */
.works-hero-text-container.hero-text-hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.5s ease;
}

/* Series badge */
.c-series-badge {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  background: var(--grad-cta);
  color: #fff;
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-pill);
}

/* Awards overlay — top-left, sits below/beside badge if needed */
.awards-overlay {
  position: absolute;
  top: 36px; /* Offset to not overlap badge if it exists */
  left: 8px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.laurel-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.n-card:hover .laurel-img {
  transform: scale(1.15);
}
/* If no series badge, pull awards up */
.n-card:not(:has(.c-series-badge)) .awards-overlay {
  top: 8px;
}

/* Tags wrapper — top-right of card, stacks multiple pills */
.c-cat-tags {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.n-card:hover .c-cat-tags {
  opacity: 1;
  transform: translateY(0);
}
@media (min-width: 900px) {
  body:not(.theme-films-active) .c-cat-tags {
    opacity: 0.75;
    transform: translateY(0);
  }
  body:not(.theme-films-active) .n-card:hover .c-cat-tags {
    opacity: 1;
  }
}

/* Individual tag pill — 50% smaller than before */
.c-cat-tag {
  display: inline-block;
  background: rgba(7, 8, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Featured pill removed - kept class for reference if needed but empty */
.c-cat-tag--featured {
  display: none;
}



.c-thumb {
  width: 100%; height: 100%;
  position: absolute; inset: 0;
  background: var(--bg-3);
  background-size: cover; background-position: center;
}
.c-thumb::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.03) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.02) 0%, transparent 55%);
}

.c-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,8,15,0.97) 0%, rgba(7,8,15,0.3) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px; opacity: 0.85; transition: opacity var(--dur-sm) ease;
}
.n-card:hover .c-overlay { opacity: 1; }

/* Brand logo styling for card bottom-right */
.brand-logo-badge {
  position: absolute;
  bottom: 0; /* Bleed bottom edge */
  right: 12px;
  z-index: 10;
  /* Top of title is ~46px from the bottom edge (12px pad + 13px meta + 3px gap + 18px title) */
  width: 46px; 
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 4px 4px 0 0; /* Flat bottom */
  padding: 8px;
  box-sizing: border-box;
}
/* Logo Box Themes */
.brand-logo-badge.theme-dark-glass, .m-brand-logo-wrap.theme-dark-glass { background: rgba(10, 12, 16, 0.4); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.05); }
.brand-logo-badge.theme-light-glass, .m-brand-logo-wrap.theme-light-glass { background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(8px); }
.brand-logo-badge.theme-solid-black, .m-brand-logo-wrap.theme-solid-black { background: #0a0c10; border: 1px solid rgba(255,255,255,0.1); }
.brand-logo-badge.theme-solid-white, .m-brand-logo-wrap.theme-solid-white { background: #ffffff; }

.m-brand-logo-wrap {
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-logo-badge img {
  height: 100%;
  width: auto;
  object-fit: contain;
}
.n-card:hover .brand-logo-badge {
  transform: scale(1.12);
}
.n-card.has-brand-logo .c-overlay {
  padding-right: 66px; /* Prevents text colliding with the logo */
}

.c-year {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--grad-cta);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 3px;
}
.c-title {
  font-size: 0.84rem; font-weight: 700; letter-spacing: -0.01em;
  color: #fff; line-height: 1.25; margin-bottom: 3px;
}
.c-meta { font-size: 0.68rem; color: rgba(255,255,255,0.42); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── DETAILS MODAL ── */
#details-modal {
  display: flex; position: fixed; inset: 0; z-index: 2000;
  background: rgba(7,8,15,0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-md) ease, visibility var(--dur-md) ease;
}
#details-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }

.works-modal-content {
  background: var(--bg-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  width: 100%; max-width: 1020px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: translateY(32px);
  transition: transform 0.5s var(--ease-out);
  box-shadow:
    0 0 0 1px rgba(162,119,255,0.15),
    0 0 80px rgba(162,119,255,0.12),
    0 40px 100px rgba(0,0,0,0.9);
  scrollbar-width: none;
}
.works-modal-content::-webkit-scrollbar { display: none; }
#details-modal.open .works-modal-content { transform: translateY(0); }

.modal-close {
  position: absolute; top: 14px; left: 14px; z-index: 10;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(7,8,15,0.7); border: 1px solid var(--border-hi);
  color: var(--white); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--dur-sm), transform var(--dur-sm);
}
.modal-close:hover { background: var(--white); color: var(--bg); transform: scale(1.1); }

.modal-video { width: 100%; aspect-ratio: 16/9; background: #000; flex-shrink: 0; border-top-left-radius: var(--r-xl); border-top-right-radius: var(--r-xl); overflow: hidden; }
.modal-video iframe { width: 100%; height: 100%; border: none; display: block; }

.modal-tabs { display: flex; align-items: center; }
.m-tab-btn {
  background: transparent; border: none; font-size: 0.9rem; font-weight: 500;
  color: var(--muted); padding: 1.5rem 0 1rem; cursor: pointer;
  border-bottom: 2px solid transparent; transition: color var(--dur-sm), border-color var(--dur-sm);
}
.m-tab-btn:hover { color: var(--white); }
.m-tab-btn.active { color: var(--white); border-bottom-color: var(--accent); }
/* Make film theme red-orange if film is selected */
.theme-films-active .m-tab-btn.active { border-bottom-color: #FD5A36; }

.modal-body {
  padding: 2.5rem 3rem;
  display: grid; grid-template-columns: 2fr 1fr; gap: 3.5rem;
}
@media(max-width: 768px) { .modal-body { grid-template-columns: 1fr; padding: 1.8rem; gap: 2rem; } }

.m-year-cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--grad-cta);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.m-title { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: var(--white); margin-bottom: 14px; }
.m-desc { font-size: 0.94rem; color: var(--muted-hi); line-height: 1.75; margin-bottom: 1.5rem; }

.m-sidebar {
  display: flex; flex-direction: column; gap: 1rem;
}
.m-info-group { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 0.8rem; }
.m-lbl { font-size: 0.65rem; color: var(--muted-hi); text-transform: uppercase; font-weight: 600; letter-spacing: 0.1em; }
.m-val { font-size: 0.95rem; color: var(--white); font-weight: 500; }

.m-awards-container { margin-top: 2.5rem; margin-bottom: 1.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.06); }
.m-list-header { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; margin-bottom: 1.2rem; }
.m-awards-row { display: flex; flex-wrap: wrap; gap: 2rem; }
.m-laurel-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; max-width: 110px; text-align: center; }
.m-laurel-item img { width: 70px; height: 70px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); transition: transform var(--dur-md); }
.m-laurel-item:hover img { transform: scale(1.08); }
.m-laurel-item span { font-size: 0.7rem; color: var(--muted-hi); font-weight: 600; line-height: 1.3; }

.m-credits-text { font-family: inherit; font-size: 0.9rem; color: var(--muted-hi); line-height: 1.8; white-space: pre-wrap; word-break: break-word; }

/* Credits: role groups (team members link to their About profile) */
.m-credit-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem 2rem; }
.m-credit-groups:empty { display: none; }
.m-credit-groups:not(:empty) + .m-credits-text { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); }
.m-credit-role { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-hi); margin-bottom: 0.6rem; }
.m-credit-names { display: flex; flex-direction: column; gap: 0.35rem; }
.m-credit-person { display: inline-flex; align-items: center; gap: 0.6rem; align-self: flex-start; min-width: 0; font-size: 0.92rem; font-weight: 500; color: var(--white); }
.m-credit-person > span:not(.m-credit-ava) { overflow-wrap: anywhere; }
.m-credit-person i { font-size: 0.75rem; color: var(--muted); opacity: 0; transform: translate(-3px, 3px); transition: opacity var(--dur-sm) ease, transform var(--dur-sm) ease; }
.m-credit-person.is-team:hover i, .m-credit-person.is-team:focus-visible i { opacity: 1; transform: none; }
.m-credit-person.is-team:hover > span:not(.m-credit-ava) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.m-credit-ava { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,0.06); font-size: 0.6rem; font-weight: 700; color: var(--muted-hi); }
.m-credit-ava img { width: 100%; height: 100%; object-fit: cover; }
#m-crew { display: contents; }
#m-crew a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.25); }
#m-crew a:hover { text-decoration-color: currentColor; }

/* ── EPISODES ── */
.m-episodes { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 4px; }
.m-ep-header { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 8px; letter-spacing: -0.01em; }
.m-ep-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 0.75rem; border-radius: var(--r-md);
  background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: background var(--dur-sm), border-color var(--dur-sm);
}
.m-ep-row:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.m-ep-row.playing { background: rgba(255,255,255,0.06); border-color: var(--cool); pointer-events: none; }
.theme-warm .m-ep-row.playing { border-color: var(--warm); }
.m-ep-playing-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--cool); color: var(--bg);
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; z-index: 2; line-height: 1; letter-spacing: 1px;
}
.theme-warm .m-ep-playing-badge { background: var(--warm); color: var(--white); }
.m-ep-num { font-size: 1.2rem; font-weight: 400; color: var(--muted); width: 30px; text-align: center; flex-shrink: 0; }
.m-ep-thumb {
  width: 120px; aspect-ratio: 16/9; background: var(--bg-3);
  border-radius: var(--r-sm); position: relative; overflow: hidden; flex-shrink: 0;
  background-size: cover; background-position: center;
}
.m-ep-thumb::after {
  content: '▶'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; background: rgba(7,8,15,0.5);
  opacity: 0; transition: opacity var(--dur-sm) ease;
}
.m-ep-row:hover .m-ep-thumb::after { opacity: 1; }
.m-ep-info { flex: 1; min-width: 0; }
.m-ep-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.m-ep-title { font-size: 0.94rem; font-weight: 700; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 0.8rem; }
.m-ep-dur { font-size: 0.75rem; color: var(--muted-hi); flex-shrink: 0; }
.m-ep-desc { font-size: 0.82rem; color: var(--muted-hi); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media(max-width: 600px) {
  .m-ep-row { flex-direction: column; align-items: flex-start; }
  .m-ep-num { display: none; }
  .m-ep-thumb { width: 100%; }
}

/* ── EMPTY / LOADER ── */
.works-loader {
  text-align: center; color: var(--muted);
  padding: 5rem 2rem;
  font-size: 0.76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  animation: pulse 1.6s ease-in-out infinite alternate;
}
.works-empty { text-align: center; padding: 4rem 2rem; color: var(--muted-hi); font-size: 0.9rem; }

/* ── SKELETON SHIMMER ── */
.skeleton-row {
  padding: 0 var(--gutter);
  margin-bottom: 2vw;
}
.skeleton-label {
  width: 80px; height: 22px;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}
.skeleton-track {
  display: flex;
  gap: 12px;
  padding: 8px 0 24px;
}
.n-card.skeleton {
  pointer-events: none;
  background: var(--bg-3);
  border-color: transparent;
  overflow: hidden;
  position: relative;
}
.n-card.skeleton::before,
.skeleton-label::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent              0%,
    rgba(255,255,255,0.06)  40%,
    rgba(255,255,255,0.12)  50%,
    rgba(255,255,255,0.06)  60%,
    transparent             100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── REEL MODAL ── */
.reel-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4,6,8,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.reel-modal.open { opacity: 1; pointer-events: auto; }

.reel-modal-inner {
  width: 90%; max-width: 1200px;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reel-modal.open .reel-modal-inner { transform: translateY(0) scale(1); }

.reel-modal-close {
  position: absolute; top: -50px; right: 0;
  background: rgba(255,255,255,0.1); border: none;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--white); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s ease;
}
.reel-modal-close:hover { background: rgba(255,255,255,0.2); }

.reel-video-wrap {
  position: relative; width: 100%; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #000; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); border-bottom: none;
}
.reel-video-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}

.reel-desc-bar {
  background: var(--bg-2);
  padding: 32px 40px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  border: 1px solid rgba(255,255,255,0.1); border-top: none;
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
}
.reel-desc-text h3 {
  font-size: 1.5rem; margin-bottom: 8px; font-weight: 500;
}
.reel-desc-text p {
  font-size: 0.95rem; color: var(--muted-hi); line-height: 1.5; margin: 0; max-width: 600px;
}
@media (max-width: 768px) {
  .reel-desc-bar { flex-direction: column; align-items: flex-start; padding: 24px; text-align: left; }
  .works-header { min-height: 500px; }
  .works-hero-text h1, .works-hero-text h2 { font-size: 3.5rem; }
  .reel-modal-close { top: -44px; right: -5%; }
}

/* ── FILMS DUAL-COLUMN LAYOUT STRUCTURE ── */
.works-content-wrapper { 
  display: flex; flex-direction: column; 
}
body.theme-films-active .works-content-wrapper {
  margin-top: -20px;
}

/* Removed padding resets to inherit default side padding (--gutter) */
body.theme-films-active .upcoming-card-wrap {
  margin-top: 0;
}

/* Reverted side-by-side wrappers to standard stack - match Studios mode */
body.theme-films-active .upcoming-card-wrap,
body.theme-films-active .works-main-right {
  width: 100%;
}

/* Maintain Permanent Category Tags on Films */
body.theme-films-active .c-cat-tag {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Hide rows-container top-padding since wrapper pulls up */
body.theme-films-active .rows-container { padding-top: 2rem; }

/* ── SEARCH BAR STYLES (planned feature — CSS reserved) ── */

/* ══════════════════════════════════════════════════════════
   BENTO GRID — STELLAR STUDIOS
══════════════════════════════════════════════════════════ */

/* ── Bento 4-col grid (year sections + featured row) ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* columns: keep bentoCols() in works.js in step */
  gap: 10px;
  padding: 0 var(--gutter);
}
.bento-featured-grid { margin-top: 12px; }

/* ── Cards inside bento always 16:9 ── */
.bento-grid .n-card {
  aspect-ratio: 16 / 9;
  width: 100%;
  min-width: unset;  /* override slider-track sizing */
  flex: unset;
  scroll-snap-align: unset;
}

/* ── Hidden cards (Show More) ── */
.bento-hidden { display: none !important; }

/* ── Stagger fade-up animation ── */
@keyframes bentoFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bento-anim {
  animation: bentoFadeUp 0.45s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 0.05s);
}

/* ── Year section wrapper ── */
.bento-year-section {
  margin-bottom: 3rem;
}

.bento-year-section .row-header {
  padding: 0 var(--gutter);
  margin-bottom: 1rem;
}

/* ── Featured section wrapper ── */
.bento-featured-section {
  margin-bottom: 3rem;
}

/* ── Featured section header (label + rule) ── */
.bento-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter);
  margin-bottom: 1rem;
}
.bento-featured-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  white-space: nowrap;
}
.bento-section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

/* ── Show More button ── */

/* ── Show More button ── */
.bento-show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 1rem auto 0;
  padding: 9px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-family: var(--font);
}
.bento-show-more:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
  transform: translateY(-1px);
}
.bento-show-more i { font-size: 0.85rem; }

/* ── Filter pill count badge ── */
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 5px;
  color: rgba(255,255,255,0.7);
  transition: background 0.2s ease, color 0.2s ease;
}
.filter-pill.active .pill-count {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1399px) { .bento-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1099px) { .bento-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 749px) { .bento-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (max-width: 599px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 750px) {
  .bento-hero-title { font-size: 1.2rem; }
  .bento-hero-desc  { display: none; }
  .bento-hero-overlay { padding: 1rem; }
}
@media (max-width: 480px) {
  .bento-grid { gap: 6px; }
}


/* ── Campaigns: one card per campaign, and a strip of its ads in the details ── */
.c-campaign-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(7, 8, 15, 0.78); border: 1px solid rgba(255,255,255,0.18); backdrop-filter: blur(6px); }
.c-campaign-badge i { font-size: 0.7rem; }
.m-journal { padding: 1rem 3rem; border-bottom: 1px solid rgba(255,255,255,0.08); display: grid; gap: 8px; }
.m-journal[hidden] { display: none; }
.m-journal-item { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.03); color: inherit; }
.m-journal-item:hover { background: rgba(255,255,255,0.07); }
.m-journal-item img { flex: 0 0 88px; width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.m-journal-item b { display: block; font-size: 0.9rem; font-weight: 600; line-height: 1.35; color: #fff; }
.m-journal-item small { display: block; font-size: 0.75rem; opacity: 0.65; }
.m-journal-item > i { margin-left: auto; opacity: 0.6; }
.m-campaign { padding: 1.1rem 3rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
.m-campaign[hidden] { display: none; }
.m-campaign-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-campaign-label { display: inline-flex; align-items: center; gap: 5px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--warm-hi); }
.m-campaign-name { font-size: 0.95rem; font-weight: 700; color: var(--white); }
.m-campaign-count { margin-left: auto; font-size: 0.72rem; color: var(--muted-hi); font-variant-numeric: tabular-nums; }
.m-campaign-desc { margin-top: 6px; font-size: 0.82rem; line-height: 1.6; color: var(--muted-hi); }
.m-campaign-row { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 6px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.m-campaign-item { flex: 0 0 148px; display: flex; flex-direction: column; gap: 6px; padding: 0; border: none; background: none; text-align: left; color: inherit; cursor: pointer; }
.m-campaign-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: var(--bg-3) center / cover no-repeat; border: 2px solid transparent; transition: border-color var(--dur-sm) ease, opacity var(--dur-sm) ease; opacity: 0.75; }
.m-campaign-item:hover .m-campaign-thumb { opacity: 1; border-color: rgba(255,255,255,0.3); }
.m-campaign-item.is-active .m-campaign-thumb { opacity: 1; border-color: var(--warm); }
.m-campaign-num, .m-campaign-now { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(7,8,15,0.8); font-size: 0.62rem; font-weight: 800; color: var(--white); }
.m-campaign-now { background: var(--warm); color: #111; letter-spacing: 0.06em; text-transform: uppercase; }
.m-campaign-title { font-size: 0.74rem; font-weight: 600; line-height: 1.35; color: var(--muted-hi); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-campaign-item.is-active .m-campaign-title { color: var(--white); }

/* Overview without sidebar content uses the full width */
.modal-body.no-sidebar { grid-template-columns: 1fr; }
.modal-body.no-sidebar .m-sidebar { display: none; }

@media (max-width: 768px) {
  .m-campaign { padding: 1rem 1.8rem; }
  .m-journal { padding: 1rem 1.8rem; }
  .m-campaign-item { flex-basis: 124px; }
}

/* Description of the selected filter (Settings → Categories & Genres) */
.filter-pills { scroll-margin-top: calc(var(--nav-h, 72px) + 12px); }
.filter-partner { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-size: 1.05rem; color: var(--muted-hi); }
.filter-partner b { color: var(--white); font-weight: 600; }
.filter-partner-clear { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border-hi); border-radius: 999px; background: none; color: var(--muted-hi); font: inherit; font-size: .8rem; cursor: pointer; }
.filter-partner-clear:hover { color: var(--white); border-color: var(--white); }
.filter-desc { flex-basis: 100%; margin: 6px 0 0; font-size: .86rem; line-height: 1.55; color: var(--text-2, rgba(255,255,255,.7)); max-width: 640px; }

/* ── HERO SLIDESHOW (works.js heroShow) ── */
.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 15%;
  filter: brightness(0.45);
  opacity: 0; transition: opacity 0.9s ease;
}
.hero-slide.is-portrait { background-position: center 20%; }
.hero-slide.is-active { opacity: 1; animation: heroDrift 14s ease-out forwards; }
.hero-slide .yt-bg-iframe { filter: none; }
@keyframes heroDrift { from { transform: scale(1.06); } to { transform: scale(1); } }

.hero-slide-text { transition: opacity 0.3s ease, transform 0.3s ease; }
.hero-slide-text.is-leaving { opacity: 0; transform: translateY(8px); }

.hero-progress { display: flex; gap: 8px; margin-top: 30px; max-width: 260px; }
.hero-progress-bar {
  flex: 1; height: 16px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center;
}
.hero-progress-bar::before, .hero-progress-bar span { content: ''; display: block; height: 3px; border-radius: 2px; }
.hero-progress-bar { position: relative; }
.hero-progress-bar::before { width: 100%; background: rgba(255,255,255,0.22); transition: background 0.2s; }
.hero-progress-bar:hover::before { background: rgba(255,255,255,0.4); }
.hero-progress-bar span {
  position: absolute; left: 0; right: 0; top: 50%; margin-top: -1.5px;
  background: var(--white, #fff); transform: scaleX(0); transform-origin: left;
}
.hero-progress-bar.is-done span { transform: scaleX(1); opacity: 0.6; }
.hero-progress-bar.is-active span { animation: heroFill linear forwards; }
.hero-progress-bar:focus-visible { outline: 2px solid var(--cool); outline-offset: 2px; border-radius: 3px; }
body.theme-films-active .hero-progress-bar:focus-visible { outline-color: var(--warm); }
@keyframes heroFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide-text { transition: none; }
  .hero-slide.is-active { animation: none; }
  .hero-progress-bar.is-active span { animation: none; transform: scaleX(1); }
}
@media (max-width: 768px) {
  .hero-progress { margin-top: 22px; max-width: 200px; }
}

/* ════════════════════════════════════════════════════════════════
   RELEASE 4B — tap targets, readable small text, card titles
   ════════════════════════════════════════════════════════════════ */

/* Tap targets (44 px): pills, sort buttons and the hero's slide bars keep their look; an invisible
   ::after makes the touch area 44 px tall */
.filter-pill, .sort-btn { position: relative; }
.filter-pill::after, .sort-btn::after, .hero-progress-bar::after {
  content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 44px; transform: translateY(-50%);
}
.bento-show-more { min-height: 44px; }
.reel-modal-close { min-width: 44px; min-height: 44px; }

/* No text under 11 px */
.c-meta, .row-header span { font-size: 0.72rem; }
.pill-count, .c-series-badge { font-size: 0.7rem; }

/* Card titles over thumbnails that carry their own text: a deeper shade from the bottom, and on
   phones a smaller title kept to three lines (the brand logo narrows the title column) */
.c-overlay {
  background: linear-gradient(to top, rgba(7,8,15,0.97) 0%, rgba(7,8,15,0.82) 30%, rgba(7,8,15,0.25) 62%, transparent 100%);
}
@media (max-width: 768px) {
  .c-overlay { opacity: 1; }
  .c-title {
    font-size: 0.8rem; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
}

/* Works pop-up: the work's own page (work.php) — copy its link or open it */
.m-pagelink { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.m-pagelink[hidden] { display: none; }
.m-pagelink button, .m-pagelink a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04); color: var(--white); font: 600 0.85rem var(--font); cursor: pointer; text-decoration: none; }
.m-pagelink button:hover, .m-pagelink a:hover { border-color: var(--warm); color: var(--warm-hi); }

/* ════════════════════════════════════════════════════════════════
   PHONE APP LAYOUT (Stage 1.2 part 2, 2026-11-26) — html.m-app on ≤ 768 px only.
   Works becomes a 3-across grid of square thumbnails (tap for details, as before) with a floating
   “Reels” button; Reels shows one work per screen (mReelsOpen in works.js). Desktop never changes.
   ════════════════════════════════════════════════════════════════ */
.m-reels-btn, .m-reels { display: none; }
@media (max-width: 768px) {
  html.m-app .bento-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 0 max(3px, env(safe-area-inset-left, 0px)); }
  html.m-app .bento-grid .n-card { aspect-ratio: 1 / 1; border-radius: 4px; }
  html.m-app .bento-grid .n-card .c-overlay,
  html.m-app .bento-grid .n-card .brand-logo-badge,
  html.m-app .bento-grid .n-card .c-cat-tags,
  html.m-app .bento-grid .n-card .awards-overlay { display: none; }
  html.m-app .bento-grid .c-series-badge { top: 5px; right: 5px; left: auto; padding: 2px 6px; font-size: 0.7rem; }

  html.m-app .m-reels-btn {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 1890;
    right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--m-bar, 62px) + 16px + env(safe-area-inset-bottom, 0px));
    height: 46px; padding: 0 18px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
    background: rgba(12,13,22,.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    color: #fff; font: 600 0.9rem var(--font); box-shadow: 0 10px 28px rgba(0,0,0,.45);
    transition: bottom .28s cubic-bezier(.2,.8,.2,1);
  }
  html.m-app .m-reels-btn i { color: var(--warm-hi); font-size: 1.05rem; }
  html.m-app.m-bar-hidden .m-reels-btn { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  html.m-app.m-reels-open .m-reels-btn, html.m-app.m-reels-open .m-tabbar { display: none; }

  html.m-app .m-reels { display: block; position: fixed; inset: 0; z-index: 2600; background: #000; }
  html.m-app.m-reels-open { overflow: hidden; }
  .m-reels-top {
    position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(8px, env(safe-area-inset-left, 0px));
    background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); pointer-events: none;
  }
  .m-reels-top > * { pointer-events: auto; }
  .m-reels-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 1.3rem; }
  .m-reels-title { flex: 1; min-width: 0; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-reels-count { font-size: 0.8rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
  .m-reels-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
  .m-reels-feed::-webkit-scrollbar { display: none; }
  .m-reel { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
  .m-reel-media { position: absolute; inset: 0; background: #0b0c14 center / cover no-repeat; }
  .m-reel-video { position: absolute; left: 0; right: 0; top: 50%; width: 100%; aspect-ratio: 16 / 9; height: auto; transform: translateY(-50%); border: 0; background: #000; }
  .m-reel.is-playing .m-reel-media { background-image: none !important; background-color: #000; }
  .m-reel-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.25) 45%, transparent 70%); pointer-events: none; }
  .m-reel.is-playing .m-reel-shade { background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 30%); }
  .m-reel-info {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 6px;
    padding: 0 max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  }
  .m-reel-info h2 { margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; font-size: 2.2rem; line-height: 1.05; color: #fff; text-wrap: balance; }
  .m-reel-info p { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,.78); }
  .m-reel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .m-reel-play, .m-reel-btn {
    display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 999px;
    font: 600 0.88rem var(--font); text-decoration: none; cursor: pointer;
  }
  .m-reel-play { border: 0; background: var(--grad-cta); color: #fff; }
  .m-reel-btn { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; }
  .m-reel.is-playing .m-reel-play { display: none; }
}
