/* 巨量影视 · 视觉提纯（最后一层）
   本轮无 .codegraph/ 索引。牵动：index.html masthead / #home / #library / #studio / #me / #login / #player；
   app.js posterCard；GET /api/catalog。不改 IA，不改 VISUAL_GUARD。
   精髓来自活体 Ligthelm Flood：画面即页面，字在边角。不抄 Archive 英文栏、不抄黑底邮票。
   可灵借少 UI；小云雀借真作品墙；Vista 借选中一条奶油药丸。禁止 lime / 浅色侧栏 / 紫调。 */

:root {
  --page: #0c0a09;
  --surface: #161210;
  --raised: #1b1613;
  --inset: #211a16;
  --hair: rgba(239, 230, 214, 0.08);
  --cream: #efe6d6;
  --mute: #8f8576;
  --faint: #6a6258;
  --gold: #c4a46a;
  --gold-light: #dcc48a;
  --gold-dim: #7d6640;
  --crimson: #7f1d22;
}

#dust,
.halo,
.letterbox,
.curtain,
.spotlight,
.footlight,
.stage__scroll,
.lineage {
  display: none !important;
}

body { background: var(--page); }
body::before { background: var(--page); }
body::after { opacity: 0.07; }

/* Ligthelm：顶栏透明、店名居中衬线、四链极小字。Vista：选中一条奶油药丸。 */
.masthead {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px 28px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.masthead__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.masthead__nav--l { justify-self: start; }
.masthead__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
}
.masthead__nav a {
  font-size: 11px !important;
  letter-spacing: 0 !important;
  color: var(--mute);
  text-decoration: none;
}
.masthead__nav a::after { display: none !important; }
.masthead__nav a:hover { color: var(--cream); }
.masthead__nav a.nav--active {
  color: #0c0a09 !important;
  background: var(--cream);
  padding: 3px 9px;
  border-radius: 999px;
}
.masthead__nav a.nav--kitchen { display: none; }
body[data-view="batch"] .masthead__nav a.nav--kitchen,
body[data-view="schedule"] .masthead__nav a.nav--kitchen,
body[data-view="ops"] .masthead__nav a.nav--kitchen { display: inline; }

.brand {
  justify-self: center;
  gap: 0;
}
.brand.nav--active { background: transparent; color: var(--cream); padding: 0; }
.brand__seal { display: none !important; }
.brand__name {
  font-family: var(--font-display);
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  color: var(--cream);
}

.masthead__actions { gap: 14px; }
.masthead__actions .btn--gold { display: none !important; }
.masthead__login {
  background: none;
  border: 0;
  color: var(--mute);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0;
  cursor: pointer;
  padding: 0;
}
.masthead__login:hover,
.masthead__login.nav--active { color: var(--cream); background: transparent; }
.theme-toggle {
  width: 22px;
  height: 12px;
  border-radius: 8px;
  background: transparent;
  border-color: rgba(239, 230, 214, 0.22);
  opacity: 0.45;
}
.theme-toggle:hover { opacity: 1; }

.btn { border-radius: 8px; letter-spacing: 0 !important; }
.btn--gold { color: #1a140c; font-weight: 600; background: var(--gold); box-shadow: none; }
.btn--gold:hover { background: var(--gold-light); transform: none; }
.btn--ghost { border: 1px solid var(--hair); background: transparent; }
.btn--ghost:hover { background: rgba(239, 230, 214, 0.04); }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 12px 28px; font-size: 15px; }

/* 殿堂：图铺满 16:9。屏上不再写牌匾。一个小金底 CTA 居底，仿 MORE INFO 位置。 */
.stage { padding: 0; min-height: 100svh; justify-content: flex-end; align-items: stretch; }
.home-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--page);
}
.home-canvas__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.06) contrast(1.08);
}
.home-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 9, 0.22) 0%, transparent 26%);
  pointer-events: none;
}
.stage__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  z-index: 2;
  max-width: none;
  padding: 0;
  text-align: center;
  align-self: auto;
}
.stage__cta { justify-content: center; }
.title--sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
body[data-view="home"] #homeWatch {
  padding: 8px 16px;
  font-size: 12px;
}
.stage__footer { display: none !important; }
.hint { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; color: var(--faint); }

.page { padding: 72px 24px 80px; animation: none; max-width: none; }
.page__header { margin-bottom: 20px; }
.page__title {
  font-weight: 600;
  letter-spacing: 0 !important;
  font-size: 22px !important;
}
.page__title::after { display: none !important; }
.page__desc, .page__sub { margin-top: 8px; letter-spacing: 0; font-size: 14px; color: var(--mute); }

.tabbar__ico { display: none !important; }
.tabbar__item--center::before { display: none !important; }

/* 片库：小云雀墙。无页头、无描边陈列柜。图先于字。 */
body[data-view="library"] .view--library.page {
  padding: 56px 0 72px;
  max-width: none;
}
body[data-view="library"] .page__header { display: none; }
body[data-view="library"] .filterbar {
  position: sticky;
  top: 56px;
  z-index: 4;
  padding: 10px 16px;
  margin: 0;
  border: 0;
  background: linear-gradient(to bottom, rgba(12, 10, 9, 0.72), transparent);
}
body[data-view="library"] .chip {
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0;
  border-radius: 999px;
}
body[data-view="library"] .chip--active {
  color: #0c0a09;
  background: var(--cream);
}
body[data-view="library"] .grid {
  gap: 2px;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body[data-view="library"] .poster__gate,
body[data-view="library"] .poster__frame {
  border: 0 !important;
  background: #161210;
  border-radius: 10px;
  box-shadow: none;
}
body[data-view="library"] .grid .poster,
body[data-view="library"] .poster__gate,
body[data-view="library"] .poster__frame {
  width: 100%;
}
body[data-view="library"] .grid .poster__frame {
  aspect-ratio: 9 / 16;
  min-height: calc((100vw - 4px) / 3 * 16 / 9);
}
.poster__glow { display: none !important; }
.poster__logline { display: none; }
.poster__img, .poster__vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster__fallback {
  color: var(--cream) !important;
  background: #161210 !important;
  font-size: clamp(40px, 7vw, 72px) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}
body[data-view="library"] .poster__veil,
body[data-view="library"] .poster__meta {
  opacity: 0;
  transition: opacity 0.2s ease;
}
body[data-view="library"] .poster:hover .poster__veil,
body[data-view="library"] .poster:focus-within .poster__veil,
body[data-view="library"] .poster:hover .poster__meta,
body[data-view="library"] .poster:focus-within .poster__meta {
  opacity: 1;
}
.poster__meta {
  background: linear-gradient(to top, rgba(12, 10, 9, 0.78) 0%, transparent 100%) !important;
  padding: 16px 12px 12px !important;
}
.poster__name { font-size: 14px !important; letter-spacing: 0 !important; font-weight: 600; }
.featured { display: none !important; }

@media (max-width: 820px) {
  .masthead {
    grid-template-columns: 1fr auto;
    padding: 12px 16px !important;
  }
  .masthead__nav--l,
  .masthead__nav--r { display: none !important; }
  .brand { justify-self: start; }
  .masthead__end { justify-self: end; }
  body[data-view="library"] .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view="library"] .grid .poster__frame {
    min-height: calc((100vw - 2px) / 2 * 16 / 9);
  }
  body[data-view="home"] .stage__content { bottom: 88px; }
}

/* 播放：片门，无金框。 */
body[data-view="player"] .view--player.page {
  padding: 64px 0 24px;
  background: var(--page) !important;
}
.player__screen {
  width: min(420px, 92vw) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  aspect-ratio: 9 / 16;
  height: auto;
  max-height: calc(100svh - 96px);
}
.player__panel { border: 0; background: transparent; }
.player__glow { display: none; }

/* 创作台：Vista 字压底，格不是金边风景卡。选中绛红。 */
body[data-view="studio"] .view--studio.page { padding: 80px 28px 48px; }
.intent { max-width: 640px; margin: 0; text-align: left; }
.intent__title {
  letter-spacing: 0 !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  font-family: var(--font-display);
}
.intent__steps { display: none !important; }
.intent__grid { gap: 0; }
.intent__cell {
  border: 0 !important;
  border-bottom: 1px solid rgba(239, 230, 214, 0.1) !important;
  min-height: auto;
  text-align: left;
  padding: 18px 0;
  font-size: 18px;
  font-family: var(--font-display);
  background: transparent !important;
  color: var(--mute) !important;
  border-radius: 10px !important;
}
.intent__cell:hover {
  color: var(--cream) !important;
  border-bottom-color: rgba(239, 230, 214, 0.28) !important;
}
.intent__cell.is-on {
  background: transparent !important;
  color: var(--cream) !important;
  border-bottom: 2px solid var(--crimson) !important;
}
.produce {
  border: 0 !important;
  background: transparent !important;
  padding: 12px 0;
}
.produce__input {
  border: 0 !important;
  background: #161210 !important;
  border-radius: 8px;
}
.produce__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--gold-dim);
}

body[data-view="me"] .view--me.page { padding: 80px 28px 48px; }
.me__list { display: none !important; }
.me__stat {
  border: 0 !important;
  background: transparent !important;
  border-radius: 8px !important;
  text-align: left !important;
  padding: 0 !important;
}
.me__stat-num {
  color: var(--cream) !important;
  font-weight: 600 !important;
  font-family: var(--font-body) !important;
  letter-spacing: 0 !important;
  font-size: 22px !important;
}
.me__subtitle { letter-spacing: 0 !important; }
.me__subtitle::before { display: none !important; }
.me__avatar {
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 10px !important;
}
.me__name { letter-spacing: 0 !important; }

/* 登录：整幅静帧叠表，不抄可灵左右分栏。 */
body[data-view="login"] .view--login.page {
  padding: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: url("./assets/hall-still.png") center 42% / cover no-repeat;
}
body[data-view="login"] .page__header {
  display: none;
}
body[data-view="login"] .authbox {
  border: 0 !important;
  background: linear-gradient(to top, rgba(12, 10, 9, 0.88), rgba(12, 10, 9, 0.55), transparent) !important;
  box-shadow: none !important;
  max-width: none;
  width: 100%;
  padding: 48px 28px 40px !important;
}
.authbox::before { display: none !important; }
.authbox__form { max-width: 360px; }
.authbox__input {
  border: 0 !important;
  background: rgba(22, 18, 16, 0.86) !important;
}

body[data-view="detail"] .view--detail.page { padding: 64px 0 48px; }
.detail__hero {
  border: 0 !important;
  border-radius: 12px !important;
  margin: 0 0 24px !important;
}
.detail__cta .btn--ghost { display: none; }
.detail__title, .detail__subtitle, .stat__label { letter-spacing: 0; }

.ops__card, .ops__panel, .ops__lat-cell {
  border-radius: 10px;
  background: var(--raised);
  border: 1px solid var(--hair);
}
.ops__card-k { letter-spacing: 0; text-transform: none; color: var(--mute); }
.ops__card-v { font-size: 22px; color: var(--cream); }
.ops__st-bar, .ops__st-fill { border-radius: 10px; }
.ops__st-fill { background: var(--gold); }
.me__pref-stats span, .me__toggle, .empty { border-radius: 999px; }

body[data-view="ops"] .vignette,
body[data-view="batch"] .vignette,
body[data-view="schedule"] .vignette { display: none; }
body[data-view="ops"]::after,
body[data-view="batch"]::after,
body[data-view="schedule"]::after { opacity: 0.02; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body[data-theme="light"] {
  --page: #f4eee4;
  --surface: #faf6ee;
  --raised: #fffaf2;
  --inset: #efe8dc;
  --hair: rgba(127, 29, 34, 0.12);
  --cream: #2f2420;
  --mute: #6d6258;
  --faint: #8a7f74;
}
body[data-theme="light"] .masthead__nav a.nav--active {
  color: #f4eee4 !important;
  background: #2f2420;
}
body[data-theme="light"][data-view="home"] .home-canvas::after {
  background: linear-gradient(to top, rgba(244, 238, 228, 0.35) 0%, transparent 28%);
}
body[data-theme="light"][data-view="login"] .view--login.page {
  background-color: var(--page);
}
body[data-theme="light"] .ops__card,
body[data-theme="light"] .ops__panel,
body[data-theme="light"] .ops__lat-cell { background: var(--raised); }

/* P0-2 分镜卡：字阶+底部分隔，不套第二层卡片。 */
.shot-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 720px;
}
.shot-card {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line, var(--hair));
  background: transparent;
}
.shot-card__index {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 600;
  font-size: 16px;
  color: inherit;
}
.shot-card__play {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-weight: 400;
  font-size: 12px;
  color: var(--mute);
}
.shot-card__meta,
.shot-card__dialogue,
.shot-card__prompt {
  margin: 8px 0 0;
  line-height: 1.65;
}
.shot-card__meta {
  font-size: 13px;
  color: var(--mute);
}
.shot-card__dialogue { font-size: 14px; }
.shot-card__prompt {
  font-size: 14px;
  color: var(--mute);
}
.shot-card__frame {
  display: block;
  width: 72px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 12px;
}
.shot-card .ep__draw { margin-top: 12px; }
.shot-card .ep__draw:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.shot-card--playable { cursor: pointer; }

.studio-flow__toggle {
  display: block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.studio-flow__drawer {
  margin-top: 12px;
  padding-top: 4px;
}
.studio-flow__scene {
  margin: 16px 0 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 600;
  font-size: 15px;
}
.studio-flow__hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--mute);
}

.studio-switcher {
  max-width: 720px;
  margin: 0 auto 16px;
}
.studio-switcher__lab {
  display: block;
  font-size: 13px;
  color: var(--mute);
}
.studio-switcher__sel {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line, var(--hair));
  border-radius: 12px;
  background: var(--surface, #fffcf8);
  color: inherit;
  font: inherit;
}
.studio-flow__act {
  display: block;
  margin-top: 10px;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: #141210;
  color: #fffcf8;
  font: inherit;
  cursor: pointer;
}
.studio-flow__act:disabled { opacity: 0.45; cursor: not-allowed; }

.ops__model-toggles {
  max-width: 1040px;
  margin: 16px auto 0;
}
.ops__prov-toggle {
  display: block;
  margin: 8px 0 0;
  font-size: 13px;
  color: inherit;
}
