.hero-actions a.primary {
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
}
.cover-button {
  display: block;
}

.catalog-page {
  max-width: 1500px;
  margin: 0 auto;
}
.catalog-loading,
.empty {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.catalog-loading {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #15161a;
  color: var(--muted);
}
.saved-heading,
.directory-heading {
  min-height: 56px;
  align-items: center;
}
.saved-heading h2,
.directory-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.saved-heading span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #202126;
  color: var(--muted);
}
.directory-filters {
  margin: 6px 0 16px;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}
.directory-card,
.profile-panel {
  min-width: 0;
  padding: 15px;
  border: 1px solid #ffffff1a;
  border-radius: 18px;
  background:
    radial-gradient(120% 100% at 10% 0, #ffffff0a, transparent 72%), #121317;
  box-shadow:
    0 1px #ffffff0a inset,
    0 16px 36px -26px #000e;
}
.directory-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    border-color var(--enter),
    box-shadow var(--enter),
    transform var(--enter) var(--ease-out);
}
.directory-card:hover,
.directory-card:focus-within {
  border-color: #ffffff33;
  box-shadow:
    0 1px #ffffff12 inset,
    0 24px 60px -32px #000f;
  transform: translateY(-2px);
}
.directory-card-head,
.profile-name {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.directory-card-head div,
.name-copy {
  min-width: 0;
}
.directory-title {
  display: block;
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 710;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.directory-title:hover,
.directory-open:hover,
.bread a:hover {
  color: var(--focus);
}
.directory-card-head div span {
  color: var(--subtle);
  font-size: 12px;
}
.profile-mark {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ffffff35;
  border-radius: 12px;
  color: #e7efff;
  background: linear-gradient(160deg, #516bcb, #1d2c69);
  box-shadow:
    0 1px #ffffff20 inset,
    0 10px 22px -12px #267efb9c;
}
.profile-mark[data-vertical="commerce"] {
  background: linear-gradient(150deg, #53736a, #1f372d);
}
.profile-mark[data-vertical="creators"] {
  background: linear-gradient(150deg, #80578e, #372043);
}
.profile-mark svg {
  width: 22px;
  height: 22px;
}
.directory-stats,
.profile-stats,
.video-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.catalog-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.catalog-metric strong {
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.catalog-metric span {
  color: var(--subtle);
  font-size: 12px;
}
.directory-previews,
.profile-featured {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.directory-thumb {
  aspect-ratio: 3 / 4;
  min-width: 0;
  border: 1px solid #ffffff20;
  border-radius: 10px;
}

.directory-thumb .cover-button img {
  transition: transform var(--enter) var(--ease-out);
}
.directory-thumb:hover .cover-button img {
  transform: scale(1.04);
}
.directory-thumb .views {
  inset: 7px auto auto 6px;
  font-size: 10.5px;
}
.directory-thumb .hover-caption {
  padding: 38px 8px 11px;
}
.directory-thumb .hover-caption strong {
  font-size: 13px;
}
.directory-thumb .hover-author {
  font-size: 10.5px;
}
.directory-open {
  display: inline-flex;
  min-height: 38px;
  justify-content: center;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #ffffff17;
  border-radius: 999px;
  background: #1d1e23;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition:
    box-shadow var(--enter),
    color var(--enter),
    background var(--enter);
}
.directory-open:hover {
  box-shadow: 0 0 0 1px #267efb55;
  background: #222734;
}

.bread {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 5px 0 12px;
  color: var(--subtle);
  font-size: 13px;
}
.bread a {
  color: var(--muted);
}
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 20px;
  min-height: 252px;
  padding: clamp(15px, 3vw, 32px);
  overflow: hidden;
  border: 1px solid #ffffff22;
  border-radius: 26px;
  background:
    radial-gradient(80% 140% at 85% 60%, #20375b 0, #151b27 33%, #14151b 68%),
    #14151b;
  box-shadow:
    0 1px #ffffff10 inset,
    0 24px 60px -38px #000e;
}
.creator-profile {
  background:
    radial-gradient(80% 140% at 86% 48%, #392848 0, #1d1929 36%, #14151b 68%),
    #14151b;
}
.profile-name {
  gap: 15px;
}
.profile-mark-large {
  width: 62px;
  height: 62px;
  border-radius: 17px;
}
.profile-mark-large svg {
  width: 30px;
  height: 30px;
}
.profile-name p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}
.profile-name h1 {
  margin: 0;
  font-size: clamp(1.78rem, 4.1vw, 3.45rem);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1.03;
  overflow-wrap: anywhere;
}
.profile-stats {
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  column-gap: clamp(10px, 1.7vw, 24px);
  max-width: 460px;
  margin: 22px 0 18px;
}
.profile-stats .catalog-metric strong {
  font-size: clamp(1.15rem, 2.35vw, 2rem);
  overflow-wrap: anywhere;
}
.profile-buttons,
.video-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.profile-buttons a,
.profile-buttons button,
.video-actions a,
.video-actions button {
  min-height: 42px;
}
.profile-featured {
  max-width: 480px;
  justify-self: end;
  width: 100%;
}

.profile-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 14px 0 18px;
}
.profile-moment {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 112px;
}
.profile-panel h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.profile-moment h2 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.profile-moment a,
.profile-moment > strong {
  font-size: clamp(0.95rem, 2vw, 1.24rem);
  font-weight: 690;
  letter-spacing: -0.028em;
  overflow-wrap: anywhere;
}
.profile-moment a:hover {
  color: var(--focus);
}
.profile-moment span {
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.35;
}
.profile-switch {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid #ffffff17;
  border-radius: 999px;
  background: #17181d;
}
.profile-switch button {
  min-height: 36px;
  border-radius: 999px;
  background: none;
}
.profile-switch button[aria-pressed="true"] {
  background: radial-gradient(110% 100% at 50% 0, #41434c, #232632 70%);
  box-shadow: 0 1px #ffffff22 inset;
}
.profile-tabs {
  margin: 0 0 13px;
}
.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 12px;
}
.profile-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-block: 12px;
  color: var(--muted);
}

.profile-section-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}
.profile-section-head h2,
.related-videos > h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.profile-section-head span {
  color: var(--subtle);
  font-size: 12px;
}
.profile-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.profile-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  gap: 9px;
  padding: 9px 0 2px;
}
.chart-column {
  display: grid;
  gap: 5px;
  text-align: center;
}
.chart-column span {
  color: var(--muted);
  font-size: 11.5px;
}
.chart-column strong {
  font-size: 12px;
}
.chart-track {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 130px;
  border-bottom: 1px solid #ffffff22;
  background: repeating-linear-gradient(
    transparent 0,
    transparent 31px,
    #ffffff0a 32px,
    transparent 33px
  );
}
.chart-bar {
  width: min(38px, 75%);
  height: calc(var(--level, 1) * 10%);
  transform-origin: bottom;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(#2d86ff, #2461c0);
  box-shadow: 0 0 8px #267efb3d;
  transition: filter var(--fast);
}
.chart-bar:hover {
  filter: brightness(1.24);
}
.level-1 {
  --level: 1;
}
.level-2 {
  --level: 2;
}
.level-3 {
  --level: 3;
}
.level-4 {
  --level: 4;
}
.level-5 {
  --level: 5;
}
.level-6 {
  --level: 6;
}
.level-7 {
  --level: 7;
}
.level-8 {
  --level: 8;
}
.level-9 {
  --level: 9;
}
.level-10 {
  --level: 10;
}
.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 11px;
}
.platform-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #242730;
  color: var(--muted);
  font-size: 12px;
}
.profile-connection-list {
  display: grid;
  gap: 7px;
}
.profile-connection {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid #ffffff15;
  border-radius: 12px;
  background: #1b1c22;
  transition:
    background var(--fast),
    border-color var(--enter);
}
.profile-connection:hover {
  background: #232a38;
  border-color: #81aafc55;
}
.profile-connection strong,
.profile-connection span small {
  display: block;
  overflow-wrap: anywhere;
}
.profile-connection small {
  color: var(--muted);
}
.profile-connection .profile-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.profile-connection .profile-mark svg {
  width: 17px;
  height: 17px;
}

.video-metrics {
  margin: 12px 0;
}
.video-metrics .catalog-metric {
  padding: 9px;
  border: 1px solid #ffffff17;
  border-radius: 10px;
  background: #1c1e25;
}

.analysis-content {
  margin-top: 16px;
}
.analysis-content h2 {
  margin: 15px 0 7px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.018em;
}
.analysis-content p {
  margin: 0 0 11px;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.timeline button[aria-pressed="true"] {
  background: #203757;
  box-shadow: 0 0 0 1px #6ba2fe79 inset;
}

@media (prefers-reduced-motion: no-preference) {
  .catalog-page,
  .directory-card {
    animation: directory-enter var(--enter) var(--ease-out) backwards;
  }
  .directory-card:nth-child(3n + 2) {
    animation-delay: 35ms;
  }
  .directory-card:nth-child(3n + 3) {
    animation-delay: 65ms;
  }
  .profile-panel-enter,
  .analysis-content {
    animation: directory-enter var(--enter) var(--ease-out);
  }
  .chart-bar {
    animation: chart-enter var(--slow) var(--ease-out) backwards;
  }
  .catalog-loading {
    background: linear-gradient(110deg, #15161a 15%, #1d212c 50%, #15161a 85%);
    background-size: 200% 100%;
    animation: load-sheen 1.2s linear infinite;
  }
  @keyframes directory-enter {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
  }
  @keyframes chart-enter {
    from {
      transform: scaleY(0);
      opacity: 0.45;
    }
  }
  @keyframes load-sheen {
    from {
      background-position: 100% 0;
    }
    to {
      background-position: -100% 0;
    }
  }
}
@media (max-width: 690px) {
  .profile-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-hero {
    gap: 13px;
    border-radius: 18px;
  }
  .profile-featured {
    justify-self: start;
    width: min(100%, 380px);
  }
  .profile-stats {
    margin: 13px 0;
  }
  .profile-highlights {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-moment {
    min-height: 0;
  }
}

.share-control {
  position: relative;
}
.share-control > summary.secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  color: var(--muted);
  font:
    500 13px Inter,
    sans-serif;
  cursor: pointer;
  list-style: none;
}
.share-control summary::-webkit-details-marker {
  display: none;
}
.share-control summary:hover {
  color: var(--text);
}
.share-control summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.share-control summary svg {
  width: 16px;
  height: 16px;
}
.share-popup {
  position: absolute;
  z-index: 7;
  top: calc(100% + 7px);
  left: 0;
  padding: 5px;
  border: 1px solid #ffffff24;
  border-radius: 11px;
  background: #1c1e25;
  box-shadow: 0 14px 32px #0008;
  transform-origin: top left;
}
.share-popup button {
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .share-control[open] .share-popup {
    animation: share-enter 180ms var(--ease-out) backwards;
  }
  @keyframes share-enter {
    from {
      opacity: 0;
      transform: scale(0.96) translateY(-4px);
    }
  }
  @keyframes player-enter {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.97);
    }
  }
}

/* Video tiles and the cinema overlay share the original portrait frame. */
.media-counters {
  position: absolute;
  inset: 11px auto auto 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}
.media-counters .views,
.media-counters .anomaly {
  position: static;
}
.media-counters .anomaly {
  font-size: 11px;
}
.thumb .cover-meta {
  right: 14px;
}
.thumb .hover-caption {
  padding-bottom: 17px;
}
.directory-thumb .cover-button img,
.directory-thumb .cover-preview {
  object-position: center 30%;
}
.directory-thumb .hover-caption {
  padding: 28px 6px 8px;
}
.directory-thumb .hover-caption strong {
  -webkit-line-clamp: 2;
  font-size: 11.5px;
}
.creator-clips .thumb {
  aspect-ratio: 9 / 15;
}

body:has(#video-dialog[open]) {
  overflow: hidden;
}
#video-dialog {
  width: min(1600px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
  max-width: none;
  max-height: none;
  overflow: hidden;
  scrollbar-width: thin;
  border: 1px solid #ffffff1a;
  border-radius: 28px;
  background: #0d0e10;
  box-shadow: 0 30px 90px #000a;
}
#video-dialog::backdrop {
  background: #020305c9;
  backdrop-filter: blur(9px);
}
.cinema-layout {
  --cinema-accent: #7ba1fc;
  display: grid;
  grid-template-columns: minmax(0, 31.7%) minmax(0, 1fr);
  height: 100%;
}
.cinema-layout[data-accent="lovable"] { --cinema-accent: #ff4821; }
.cinema-brand-logo { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; }
.brand-artwork, .cinema-brand-logo { object-fit: cover; }
.cinema-player {
  container-type: size;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  padding: 18px 0 18px 18px;
  place-items: start end;
}
.cinema-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #08090b;
}
.cinema-frame video,
.cinema-frame img,
.cinema-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cinema-original {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #ffffff2a;
  border-radius: 12px;
  background: #101216e8;
  color: #fff;
  font-weight: 600;
}
.cinema-inspector {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 18px 20px 14px;
  overflow: hidden;
}
.cinema-top {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  margin: 0 0 16px;
}
.cinema-title {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  gap: 12px;
}
.cinema-title > div {
  min-width: 0;
}
.cinema-title h1 {
  margin: 0 0 5px;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cinema-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--subtle);
  font-size: 13px;
}
.cinema-byline :is(.cinema-brand-link, .cinema-author-link) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 600;
}
.cinema-brand-link svg { width: 13px; height: 13px; color: var(--subtle); }
.cinema-avatar {
  display: inline-grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #25272d;
  color: var(--muted);
  font-size: 10px;
  object-fit: cover;
}
.cinema-byline a:hover {
  color: var(--text);
}
.cinema-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 7px;
}
.cinema-share > summary { cursor: pointer; list-style: none; }
.cinema-share > summary::-webkit-details-marker { display: none; }
.cinema-share { flex: none; }
.cinema-share .share-popup {
  display: grid;
  z-index: 8;
  min-width: 207px;
  left: auto;
  right: 0;
  transform-origin: top right;
}
.cinema-share .share-popup button { justify-content: flex-start; background: transparent; }
.cinema-share .share-popup button:hover { background: #ffffff12; }
.cinema-icon {
  display: grid;
  width: 40px;
  min-height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #ffffff1a;
  border-radius: 50%;
  background: radial-gradient(100% 100% at top, #26272c, #17181b 75%);
  color: var(--muted);
}
.cinema-icon[aria-pressed="true"] {
  background: var(--metal);
  color: #101116;
}
.cinema-icon[aria-pressed="true"] svg {
  fill: currentColor;
}
.cinema-icon svg {
  width: 16px;
  height: 16px;
}
.cinema-analysis {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.cinema-analysis:has(.insight-expanded) { overflow: hidden; }
.cinema-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "why why hook hook"
    "why why scenes words"
    "related related script script";
  grid-template-rows: minmax(112px, 1fr) minmax(112px, 1fr) minmax(235px, 2fr);
  min-height: min(520px, calc(100dvh - 145px));
  height: 100%;
  gap: 10px;
}
.cinema-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  min-width: 0;
  min-height: 0;
  gap: 9px;
  padding: 14px;
  color: var(--text);
  border: 1px solid #ffffff21;
  border-radius: 19px;
  background: linear-gradient(#16171a, #101113);
  font-size: 14px;
  text-align: left;
}
button.cinema-tile:hover,
button.cinema-tile:focus-visible {
  border-color: #ffffff4a;
  box-shadow: 0 14px 28px -20px #000c;
}
.cinema-why {
  grid-area: why;
  border-color: color-mix(in srgb, var(--cinema-accent) 28%, #ffffff23);
  background:
    radial-gradient(ellipse at 28% 120%, color-mix(in srgb, var(--cinema-accent) 22%, transparent), transparent 56%),
    linear-gradient(#16171a, #101113);
}
.cinema-hook {
  grid-area: hook;
  flex-direction: row;
  align-items: center;
  gap: 13px;
}
.cinema-scenes {
  grid-area: scenes;
}
.cinema-words {
  grid-area: words;
}
.cinema-related {
  grid-area: related;
}
.cinema-cta {
  grid-area: script;
  background:
    radial-gradient(ellipse at 85% 115%, #3a406b79, transparent 53%),
    linear-gradient(#16171a, #101113);
}
.tile-label {
  display: block;
  margin: 0;
  padding-right: 21px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  overflow-wrap: normal;
}
.tile-open {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff0a;
  color: #a8aeba;
  transition:
    background var(--fast),
    color var(--fast);
}
:is(.cinema-tile, .script-open):is(:hover, :focus-visible) .tile-open {
  background: #f5f6f8;
  color: #111316;
}
.tile-open svg {
  width: 14px;
  height: 14px;
}
.tile-number {
  margin-top: clamp(8px, 1.2vw, 16px);
  background: linear-gradient(#fafbfe 15%, #aab0bb);
  background-clip: text;
  color: transparent;
  font-size: clamp(2.2rem, 4.2vw, 3.7rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.045em;
}
.why-baseline {
  color: var(--muted);
  font-size: clamp(12px, 1.1vw, 16px);
}
.tile-copy {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}
.cinema-words .tile-copy {
  font-style: italic;
}
.tile-hook-image {
  display: block;
  flex: none;
  width: clamp(47px, 6vw, 84px);
  max-height: 100%;
  aspect-ratio: 9 / 10;
  object-fit: cover;
  border-radius: 13px;
}
.tile-hook-content {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 6px;
  align-content: start;
  overflow-wrap: anywhere;
}
.tile-hook-channels { display: grid; gap: 4px; min-width: 0; }
.tile-hook-channel {
  display: grid;
  grid-template-columns: minmax(68px, auto) minmax(0,1fr);
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}
.tile-hook-channel strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  font-size: 13px;
  font-weight: 600;
}
.tile-tag {
  padding: 3px 8px;
  border: 1px solid #ffffff22;
  border-radius: 999px;
  background: #ffffff08;
  color: var(--muted);
  font-size: 11px;
}
.scene-preview {
  display: grid;
  width: 100%;
  gap: 5px;
}
.scene-segments {
  display: flex;
  gap: 3px;
  width: 100%;
}
.scene-segment {
  display: block;
  flex: var(--units, 1) 1 0;
  min-width: 3px;
  height: 18px;
  border: 1px solid #ffffff18;
  border-radius: 6px;
  background: #ffffff0c;
  transition:
    background var(--fast),
    border-color var(--fast);
}
.scene-segment.is-active {
  border-color: var(--cinema-accent);
  background: color-mix(in srgb, var(--cinema-accent) 16%, transparent);
}
.scene-range {
  display: flex;
  justify-content: space-between;
  color: var(--subtle);
  font-size: 11px;
}
.scene-product {
  color: var(--cinema-accent);
  font-weight: 650;
}
.why-ranks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
}
.why-ranks b {
  color: var(--text);
}
.related-summary {
  font-weight: 600;
}
.related-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 78px));
  width: 100%;
  gap: 7px;
  margin-top: 2px;
}
.related-strip .directory-thumb {
  aspect-ratio: 9 / 16;
  border-radius: 11px;
}
.related-strip .views {
  inset: auto auto 6px 5px;
  font-size: 10px;
}
.related-strip .views svg,
.related-strip .hover-caption {
  display: none;
}
.repeat-groups section + section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.repeat-strip {
  padding: 5px 3px 7px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.repeat-card {
  flex: 0 0 clamp(94px, 10vw, 136px);
  min-width: 0;
  scroll-snap-align: start;
}
.repeat-card > span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storyboard {
  margin-block: 21px;
  --story-indent: 72px;
}
.story-marks {
  position: relative;
  height: 29px;
  margin-left: var(--story-indent);
  z-index: 1;
}
.story-mark {
  position: absolute;
  top: 0;
  display: block;
  width: 1px;
  min-height: 24px;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--story-color);
}
.story-mark::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--story-color), transparent);
  content: "";
}
.story-mark-label {
  display: block;
  width: max-content;
  margin-left: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--story-color);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--story-color), transparent 80%);
  color: #101114;
  font-size: 11px;
  font-weight: 700;
}
.story-mark.is-near-end .story-mark-label { transform: translateX(calc(-100% - 10px)); }
.story-mark.is-pin { width: 12px; transform: translateX(-6px); }
.story-mark.is-pin::before { inset: 8px 0 auto; width: 7px; height: 7px; margin: auto; border-radius: 50%; background: var(--story-color); }
.story-mark.is-pin .story-mark-label { position: absolute; bottom: 100%; visibility: hidden; }
.story-mark.is-pin:is(:hover, :focus-visible) .story-mark-label { visibility: visible; }
.story-mark:focus-visible .story-mark-label { outline: 2px solid #fff; outline-offset: 2px; }
.story-mention { --story-color: #baa9fc; }
.story-show { --story-color: var(--cinema-accent); }
.story-cta { --story-color: #c5d5ff; }
.story-scroll { overflow-x: auto; padding: 19px 0 4px; scrollbar-width: thin; }
.story-canvas { min-width: 430px; }
.story-ruler {
  position: relative;
  height: 20px;
  margin-left: var(--story-indent);
  color: var(--subtle);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.story-ticks { position: relative; height: 100%; pointer-events: none; }
.story-ticks span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.story-ticks span::after {
  display: block;
  width: 1px;
  height: 4px;
  margin: 0 auto;
  background: currentColor;
  opacity: .4;
  content: "";
}
.story-ticks span:first-child { transform: none; }
.story-ticks span:last-child { transform: translateX(-100%); }
.story-scrub {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.story-ruler:has(.story-scrub:focus-visible) { outline: 1px solid var(--cinema-accent); outline-offset: 2px; }
.story-lanes { position: relative; display: grid; gap: 5px; }
.story-lane {
  display: grid;
  grid-template-columns: var(--story-indent) minmax(0, 1fr);
  align-items: center;
  color: var(--subtle);
  font-size: 12px;
}
.story-lane > span {
  padding-right: 10px;
  text-align: right;
}
.story-track {
  position: relative;
  height: 29px;
  background: #ffffff06;
  border-radius: 7px;
}
.story-frames { height: 96px; overflow: hidden; border-radius: 10px; }
.story-scenes { height: 35px; }
.story-cell {
  position: absolute;
  inset-block: 0;
  min-width: 2px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #ffffff12;
  border-radius: 6px;
  background: #ffffff0a;
  color: var(--muted);
  font: inherit;
  font-weight: 400;
  text-align: left;
}
.story-cell > span {
  display: block;
  overflow: hidden;
  padding: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-cell img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-frames .story-cell { border-radius: 2px; }
.story-scenes .story-cell {
  background: color-mix(in srgb, var(--cinema-accent) 16%, #111215);
  border-color: color-mix(in srgb, var(--cinema-accent), transparent 65%);
}
.story-scenes .story-cell.is-active {
  background: color-mix(in srgb, var(--cinema-accent) 22%, #17181b);
  border-color: color-mix(in srgb, var(--cinema-accent) 65%, transparent);
}
:is(.story-words, .story-screen) .story-cell.is-active {
  background: #ffffff20;
  border-color: #ffffff28;
  color: var(--text);
}
.story-frames .story-cell.is-active { box-shadow: inset 0 0 0 2px var(--cinema-accent); z-index: 1; }
.story-cell:focus-visible,
.story-cell:hover {
  z-index: 2;
  outline: 1px solid var(--cinema-accent);
  outline-offset: -1px;
}
.story-overlay {
  position: absolute;
  inset: 0 0 0 var(--story-indent);
  z-index: 3;
  pointer-events: none;
}
.story-marker-line,
.story-playhead { position: absolute; inset-block: 0; width: 1px; }
.story-marker-line { background: var(--story-color); opacity: .5; }
.story-playhead { top: -20px; width: 2px; background: #fff; box-shadow: 0 0 3px #000; }
.story-lanes { margin-bottom: 28px; }
.story-position {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #121316;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  white-space: nowrap;
}
.story-playhead.at-start .story-position { transform: none; }
.story-playhead.at-end { margin-left: -2px; }
.story-playhead.at-end .story-position { transform: translateX(-100%); }

.structure-stack { display: grid; gap: 12px; }
.structure-panel {
  padding: clamp(12px, 2vw, 23px);
  border: 1px solid #ffffff23;
  border-radius: 23px;
  background: #191a1c;
  min-width: 0;
}
.structure-panel > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
}
.structure-panel h2 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  overflow-wrap: anywhere;
}
.detail-section p, .detail-section dl, .detail-section h3 { margin: 0; }
.detail-section h3 { font-size: 14px; }
.detail-section .video-metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(115px, 100%), 1fr));
  margin: 0;
}
.detail-virality { margin: 0; }
.hero-brand-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}
.hero-brand-nav[hidden] { display: none; }
#hero-brands {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  padding: 3px 2px;
  scrollbar-width: thin;
}
.hero-brand-choice {
  min-width: 128px;
  max-width: 218px;
  flex-shrink: 0;
  justify-content: flex-start;
  min-height: 46px;
  padding-inline: 12px 14px;
  border: 1px solid #ffffff18;
  border-radius: 14px;
  background: #ffffff08;
  text-align: left;
}
.hero-brand-choice span:last-child { display: grid; min-width: 0; }
.hero-brand-choice strong { overflow-wrap: anywhere; line-height: 1.2; }
.hero-brand-choice small { white-space: nowrap; }
.hero-brand-chip-logo { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; }
.hero-brand-choice small, .hero-brand-index { color: var(--muted); }
.hero-brand-choice[aria-pressed="true"] {
  border-color: #5d88e8;
  background: #4574d332;
}
.profile-research {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.profile-research > .profile-panel:only-child { grid-column: 1 / -1; }
.profile-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 15px;
  color: var(--muted);
  font-size: 13px;
}
.profile-milestones b { color: var(--text); }
.saved-empty { min-height: 240px; justify-items: center; align-content: center; }
.saved-empty h3 { margin: 0 0 7px; color: var(--text); }
.saved-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; }
.saved-empty-icon svg { width: 20px; height: 20px; }
@media (max-width: 780px) {
  .profile-research { grid-template-columns: minmax(0, 1fr); }
}
.detail-section .video-metrics .catalog-metric { padding: 11px; }
.detail-jumps, .hook-tags, .repeat-author {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.detail-jumps:empty, .hook-tags:empty { display: none; }
.detail-jumps { gap: 8px 16px; color: var(--muted); }
.detail-jumps > span { display: flex; align-items: center; gap: 6px; }
.hook-detail {
  display: grid;
  grid-template-columns: minmax(70px, 115px) minmax(0, 1fr);
  gap: clamp(10px, 2vw, 22px);
  align-items: center;
}
.hook-detail > div { display: grid; gap: 9px; }
.hook-detail-frame {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 12;
  border-radius: 13px;
  object-fit: cover;
}
.hook-channel-list { display: grid; gap: 6px; }
.hook-channel-list > div {
  padding: 8px 10px;
  border: 1px solid #ffffff1a;
  border-radius: 10px;
  background: #ffffff07;
}
.hook-channel-list dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.hook-channel-list dd { margin: 3px 0 0; color: var(--text); line-height: 1.45; }
.detail-facts { display: grid; gap: 12px; }
.detail-facts > div {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 3fr);
  gap: 10px;
}
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; }
.transcript-more > summary { cursor: pointer; color: var(--text); }
.repeat-author .secondary { display: inline-flex; align-items: center; padding: 5px 10px; }
#script-print { display: none; }
@media print {
  body:has(#script-print) > :not(#script-print) { display: none !important; }
  body:has(#script-print) { background: white; color: black; }
  #script-print { display: block; max-width: 38rem; margin: auto; color: black; }
  #script-print .printed-script { white-space: pre-wrap; }
}
@media (max-width: 420px) {
  .hook-detail { grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
  .detail-facts > div { grid-template-columns: 1fr; gap: 2px; }
}
.structure-panel > header > span { color: var(--subtle); font-size: 13px; }
.structure-production, .benchmark-brand { color: var(--muted); font-size: 12px; }
.scene-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(132px, 12vw, 152px);
  gap: 16px;
  padding: 4px 3px 6px;
  margin-inline: -3px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.scene-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 9px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--text);
  padding: 7px;
  text-align: left;
  scroll-snap-align: start;
}
.scene-card:is(:hover, .is-active) { background: #ffffff0d; }
.scene-card.is-active .scene-card-image { outline: 2px solid var(--cinema-accent); outline-offset: -2px; }
.scene-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 13px;
  background: #23252b;
}
.scene-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-index {
  display: inline-grid;
  place-items: center;
  margin-right: 5px;
  min-width: 1.55em;
  height: 1.55em;
  border-radius: 999px;
  background: #ecedf0;
  color: #17181b;
  font-size: 11px;
}
.scene-card .scene-index { position: absolute; top: 7px; left: 7px; }
.scene-card-play {
  position: absolute;
  bottom: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #121316d9;
  color: #fff;
  opacity: 0;
}
.scene-card:is(:hover, :focus-visible) .scene-card-play { opacity: 1; }
.scene-card-play svg { width: 13px; fill: currentColor; }
.scene-card-time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.scene-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}
.benchmark-brand { margin: 5px 0 15px; }
.benchmark-bars { display: grid; gap: 11px; }
.benchmark-row {
  display: grid;
  grid-template-columns: minmax(115px, 1.3fr) minmax(64px, 3fr) 44px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.detail-section .benchmark-row { grid-template-columns: minmax(100px, 1.3fr) minmax(30px, 3fr) max-content; }
.detail-section .benchmark-row strong { white-space: nowrap; }
.benchmark-row meter { width: 100%; height: 8px; appearance: none; }
.benchmark-row meter::-webkit-meter-bar { border: 0; border-radius: 20px; background: #27282d; }
.benchmark-row meter::-webkit-meter-optimum-value {
  border-radius: 20px;
  background: linear-gradient(90deg, var(--cinema-accent), color-mix(in srgb, var(--cinema-accent) 54%, #27282d));
}
.benchmark-row meter::-moz-meter-bar { border-radius: 20px; background: var(--cinema-accent); }
.benchmark-row strong { justify-self: end; color: var(--text); font-variant-numeric: tabular-nums; }
.benchmark-timing { margin: 16px 0 8px; font-size: 12px; }
.benchmark-timing span { display: block; color: var(--muted); margin-top: 3px; }
.benchmark-source { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.benchmark-source svg { width: 12px; }

.transcript {
  display: grid;
  gap: 2px;
}
.transcript-line {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.transcript-text {
  grid-column: 2;
  display: grid;
  gap: 3px;
}
.transcript-switch { justify-self: start; }
[data-transcript-mode="translation"] [data-has-translation] .transcript-spoken-original,
[data-transcript-mode="original"] .transcript-translation { display: none; }
.timeline .scene-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, max-content) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 8px;
  text-align: left;
  white-space: normal;
}
.scene-time {
  color: var(--cinema-accent);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .timeline .scene-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
.analysis-time {
  padding: 3px 5px;
  min-height: 26px;
  border: 1px solid #ffffff22;
  border-radius: 6px;
  background: #ffffff09;
  color: var(--cinema-accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.analysis-time[aria-pressed="true"] {
  border-color: var(--cinema-accent);
}
.script-shots {
  margin: 0;
  padding-inline-start: 1.6em;
}
.script-shots li + li {
  margin-top: 8px;
}
.script-open {
  display: block;
  min-height: 20px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.script-teaser {
  margin: 0;
  color: var(--text);
  font-size: clamp(13px, 1.28vw, 19px);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.script-teaser mark {
  padding: 0 4px 1px;
  color: #dce0ff;
  background: #676a9b3d;
  border: 1px solid #a0a5ff59;
  border-radius: 7px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.script-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.script-actions button {
  min-height: 38px;
  white-space: nowrap;
}
.scene-segment.u-2 {
  --units: 2;
}
.scene-segment.u-3 {
  --units: 3;
}
.scene-segment.u-4 {
  --units: 4;
}
.scene-segment.u-5 {
  --units: 5;
}
.scene-segment.u-6 {
  --units: 6;
}
.scene-segment.u-7 {
  --units: 7;
}
.scene-segment.u-8 {
  --units: 8;
}
.scene-segment.u-9 {
  --units: 9;
}
.scene-segment.u-10 {
  --units: 10;
}
.scene-segment.u-11 {
  --units: 11;
}
.scene-segment.u-12 {
  --units: 12;
}
.scene-segment.u-13 {
  --units: 13;
}
.scene-segment.u-14 {
  --units: 14;
}
.scene-segment.u-15 {
  --units: 15;
}
.scene-segment.u-16 {
  --units: 16;
}
.scene-segment.u-17 {
  --units: 17;
}
.scene-segment.u-18 {
  --units: 18;
}
.scene-segment.u-19 {
  --units: 19;
}
.scene-segment.u-20 {
  --units: 20;
}
.scene-segment.u-21 {
  --units: 21;
}
.scene-segment.u-22 {
  --units: 22;
}
.scene-segment.u-23 {
  --units: 23;
}
.scene-segment.u-24 {
  --units: 24;
}
.scene-segment.u-25 {
  --units: 25;
}
.cinema-demo {
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 11.5px;
}
.insight-expanded {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #ffffff23;
  border-radius: 25px;
  background: #15161a;
}
.insight-nav {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px clamp(14px, 2vw, 27px) 9px;
}
.insight-heading {
  margin: 0;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .085em;
  text-transform: uppercase;
}
.insight-heading:focus { outline: none; }
.insight-actions { display: flex; gap: 8px; }
.insight-actions .cinema-icon {
  width: 38px;
  min-height: 38px;
  border-color: #ffffff21;
  background: #ffffff0e;
  color: var(--text);
}
.insight-actions .cinema-icon:hover { background: #ffffff1e; }
.insight-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 clamp(14px, 2vw, 27px) 16px;
  scrollbar-width: thin;
}
@media (max-width: 535px) {
  .benchmark-row { grid-template-columns: minmax(104px, 1fr) minmax(42px, 1fr) 38px; }
}
.cinema-loading {
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 25px;
}
.cinema-loading h1,
.cinema-loading p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  #video-dialog[open] {
    animation: player-enter var(--enter) var(--ease-out) backwards;
  }
  .cinema-tile,
  .insight-expanded {
    animation: player-enter var(--enter) var(--ease-out) backwards;
  }
  .cinema-tile:nth-child(2n) {
    animation-delay: 25ms;
  }
  .cinema-tile:nth-child(3n) {
    animation-delay: 45ms;
  }
}
@media (max-width: 880px) {
  #video-dialog {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    border-radius: 20px;
  }
  .cinema-layout {
    grid-template-columns: minmax(212px, 32%) minmax(0, 1fr);
  }
  .cinema-inspector {
    padding: 12px;
  }
  .cinema-tile {
    padding: 10px;
    gap: 7px;
    border-radius: 14px;
    font-size: 12px;
  }
  .cinema-hook {
    gap: 7px;
  }
  .tile-label {
    font-size: 10px;
    padding-right: 17px;
  }
  .tile-open {
    width: 21px;
    height: 21px;
    top: 7px;
    right: 7px;
  }
  .tile-hook-content strong {
    font-size: 12px;
  }
  .tile-hook-image {
    border-radius: 8px;
  }
  .script-actions button {
    min-height: 32px;
    padding-inline: 8px;
    font-size: 11px;
  }
  .cinema-title h1 {
    font-size: 17px;
  }
  .cinema-top {
    align-items: flex-start;
  }
}
@media (max-width: 650px) {
  #video-dialog {
    inset: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    overflow: auto;
    border: 0;
    border-radius: 0;
  }
  .cinema-layout {
    display: block;
    height: auto;
  }
  .cinema-player {
    container-type: normal;
    padding: 10px;
    place-items: center;
  }
  .cinema-frame {
    width: min(100%, calc(min(62dvh, 560px) * 9 / 16));
    height: auto;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
  }
  .cinema-inspector {
    overflow: visible;
    padding: 10px;
  }
  .cinema-analysis,
  .cinema-analysis:has(.insight-expanded),
  .insight-expanded,
  .insight-body {
    overflow: visible;
  }
  .insight-nav {
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 9px 10px;
    border-radius: 24px 24px 0 0;
    background: #15161a;
  }
  .insight-body { padding: 0 8px 10px; }
  .cinema-actions {
    position: absolute;
    top: 10px;
    right: 10px;
  }
  .cinema-icon {
    width: 34px;
    min-height: 34px;
  }
  .cinema-board {
    gap: 7px;
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "why why"
      "hook hook"
      "scenes words"
      "related related"
      "script script";
    grid-template-rows: auto;
  }
  .cinema-tile {
    padding: 11px;
    border-radius: 13px;
  }
}

.featured-shot > video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--enter) var(--ease-out);
}
.featured-shot.is-hero-playing > video {
  opacity: 1;
}

#library:has(.directory-heading) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
}
#library:has(.directory-heading) #filters {
  position: static;
  z-index: auto;
  min-width: 0;
  align-self: end;
  margin-bottom: 17px;
  padding: 0;
}
#library:has(.directory-heading) #nav-outside,
#library:has(.directory-heading) #results {
  grid-column: 1 / -1;
}
.directory-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 24px 0 17px;
}
.directory-heading h2 {
  background: linear-gradient(#f8f9fc 20%, #b3b7c0);
  background-clip: text;
  color: transparent;
  font-size: clamp(28px, 4.7vw, 42px);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.02;
}
.directory-heading #results-count {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}
.directory-heading #results-count:not(:empty)::before,
.directory-week i {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #39d889;
  box-shadow:
    0 0 0 4px #39d88925,
    0 0 0 7px #39d8890c;
}
.directory-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.directory-sorts {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 2px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 1px solid #ffffff15;
  border-radius: 999px;
  background: #0b0c0e;
}
.directory-sorts button {
  min-height: 36px;
  flex: none;
  padding: 0 12px;
  border-radius: 999px;
  background: none;
  color: var(--subtle);
  white-space: nowrap;
}
.directory-sorts button[aria-pressed="true"] {
  background: radial-gradient(110% 130% at 50% 0, #35373e, #1d1e22 75%);
  box-shadow: 0 1px 0 #ffffff18 inset;
  color: var(--text);
}
.directory-search-toggle {
  display: grid;
  width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  flex: none;
  border: 1px solid #ffffff1a;
  border-radius: 50%;
  background: #0b0c0e;
}
.directory-search {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.directory-search .search {
  min-width: 150px;
  flex: 1 1 150px;
}
.directory-search select {
  min-height: 44px;
  max-width: 160px;
  border: 1px solid #ffffff19;
  border-radius: 999px;
  padding: 0 8px;
  background: #16171b;
}
#library:has(.directory-heading) #nav-outside {
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 0 0 6px;
  margin: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.directory-chip {
  display: inline-flex;
  flex: none;
  gap: 6px;
  min-height: 39px;
  padding-inline: 13px;
  border: 1px solid #ffffff19;
  border-radius: 999px;
  background: #18191c;
  color: var(--muted);
}
.directory-chip small {
  color: #9297a0;
}
.directory-chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--metal);
  color: #0c0d0f;
}
.directory-chip[aria-pressed="true"] small {
  color: #41434b;
}

.directory-card {
  --brand-accent: #7bb3d3;
  position: relative;
  gap: 10px;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 22px;
  background:
    radial-gradient(
        120% 100% at 0 0,
        color-mix(in srgb, var(--brand-accent) 12%, #16171a),
        #121316 65%
      )
      padding-box,
    linear-gradient(140deg, var(--brand-accent), #ffffff25 22%, #ffffff15)
      border-box;
}
.directory-card[data-hue="1"] {
  --brand-accent: #b18c39;
}
.directory-card[data-hue="2"] {
  --brand-accent: #24ab9c;
}
.directory-card[data-hue="3"] {
  --brand-accent: #396ecc;
}
.directory-card:hover,
.directory-card:focus-within {
  border-color: transparent;
}
.directory-card .directory-previews {
  position: relative;
  min-height: 0;
  margin-bottom: 2px;
}
.directory-card .directory-thumb {
  border: 0;
  border-radius: 12px;
}
.directory-card .directory-thumb .views {
  display: none;
}
.directory-card .directory-thumb:not(.is-previewing) .play-dot {
  top: auto;
  right: 6px;
  bottom: 7px;
  left: auto;
  width: 20px;
  height: 20px;
  transform: none;
  opacity: 1;
}
.directory-card .play-dot svg {
  width: 12px;
  height: 12px;
}
.directory-rank,
.directory-week {
  position: absolute;
  z-index: 2;
  top: 7px;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid #ffffff37;
  border-radius: 999px;
  background: #191a1be8;
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  pointer-events: none;
}
.directory-rank {
  left: 7px;
}
.directory-rank.top-rank {
  background: var(--metal);
  border-color: transparent;
  color: #0b0c0e;
}
.directory-week {
  right: 6px;
  gap: 7px;
  background: #071c15dc;
  border-color: #2793599f;
  color: #d1f5e1;
  white-space: nowrap;
}
.directory-week i {
  width: 6px;
  height: 6px;
}

.directory-body {
  display: block;
  min-width: 0;
  border-radius: 9px;
}
.directory-body:hover .directory-title {
  color: var(--focus);
}
.directory-card-head {
  gap: 9px;
}
.directory-heading-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.directory-heading-copy .directory-title {
  margin-bottom: 4px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.directory-card-head .profile-mark {
  width: 39px;
  height: 39px;
  border-radius: 10px;
}
.directory-people {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.directory-people strong {
  font-size: 22px;
  font-weight: 740;
}
.directory-people span {
  font-size: 11px;
}
.directory-card-foot {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ffffff16;
  color: var(--subtle);
  font-size: 12px;
}
.directory-card-foot > span {
  white-space: nowrap;
}
.directory-names {
  display: flex;
  flex: none;
  padding-left: 2px;
}
.directory-names span {
  display: grid;
  width: 21px;
  height: 21px;
  margin-left: -2px;
  place-items: center;
  border: 1px solid #252830;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-accent) 35%, #202328);
  color: #e6ebf5;
  font-size: 10px;
  font-weight: 700;
}
.directory-names span[data-person="1"] {
  background: #613b61;
}
.directory-names span[data-person="2"] {
  background: #38675f;
}
.directory-spark {
  display: grid;
  grid-template-columns: repeat(12, minmax(1px, 1fr));
  align-items: end;
  gap: 2px;
  width: min(28%, 85px);
  height: 25px;
  margin-left: auto;
  padding-bottom: 1px;
}
.directory-spark i {
  height: max(2px, calc(var(--level, 0) * 10%));
  border-radius: 2px;
  background: var(--brand-accent);
  opacity: 0.8;
  transform-origin: bottom;
}
.directory-spark .spark-zero {
  background: #ffffff29;
}
@media (prefers-reduced-motion: no-preference) {
  .directory-spark i {
    animation: chart-enter var(--slow) var(--ease-out) backwards;
  }
}
@media (max-width: 880px) {
  #library:has(.directory-heading) {
    grid-template-columns: minmax(0, 1fr);
  }
  #library:has(.directory-heading) #filters {
    margin-bottom: 12px;
  }
  .directory-controls {
    justify-content: flex-start;
  }
  .directory-heading {
    margin: 14px 0 12px;
  }
}
@media (max-width: 535px) {
  .directory-sorts button {
    padding-inline: 8px;
    font-size: 11px;
  }
  .directory-sorts {
    order: 2;
  }
  .directory-controls {
    gap: 5px;
  }
}
.related-strip {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}
.related-strip .directory-thumb {
  flex: 0 0 72px;
}
.reference-section + .reference-section { margin-top: 2.5rem; }
.reference-section { scroll-margin-top: 104px; }
.reference-section h3 { font-size: 1.2rem; margin: 1.5rem 0 1rem; }
.reference-controls, .reference-controls nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.reference-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .55rem .9rem;
}
.reference-back span { color: var(--muted); font-size: 11px; }
.thumb-unavailable {
  position: absolute;
  inset: auto 6px 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.reference-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .55rem 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #17181d;
}
.reference-note > div { flex: 1 1 18rem; }
.reference-note p { margin: .25rem 0 0; }
.reference-note a { white-space: nowrap; }
.reference-note a:hover { text-decoration: underline; }
.reference-note a svg, .rows .row > span:last-child svg {
  vertical-align: middle;
  width: .9em;
  height: .9em;
}
.reference-title { display: block; margin: .65rem .25rem 0; font-size: .9rem; line-height: 1.35; }
