/* ==========================================================================
   《互动大师 · JOYPLUS Interactive Studio》— 6 Production Suite Modules (v7)
   File: hudong/static/studio-modules.css
   Logo-Native Warm Paper (#f6f4f0) × Warm Cinema Charcoal (#111113) × #e8492f
   Strict 9:16 sacred ratio on all clip contact sheets & skin preview stage.
   ========================================================================== */

.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.mod-empty-cell {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
}
.mod-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.mod-pill-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.mod-pill-group button {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-card);
  color: var(--fg-secondary);
  font: 600 12px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, color 130ms ease;
}
.mod-pill-group button:hover {
  border-color: var(--jp-flame-border);
  color: var(--fg-primary);
}
.mod-pill-group button.is-active {
  background: var(--jp-flame);
  border-color: var(--jp-flame);
  color: #ffffff;
  font-weight: 700;
}

/* Module 1: Localization & Copy QA Matrix */
.loc-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-card);
}
.loc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.loc-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-hairline);
  color: var(--fg-muted);
  font-weight: 700;
  white-space: nowrap;
}
.loc-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: middle;
}
.loc-table tr:last-child td {
  border-bottom: 0;
}
.loc-table tr.is-qa-warn td {
  background: color-mix(in srgb, var(--jp-flame) 4%, transparent);
}
.loc-node-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}
.loc-code {
  display: inline-block;
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--jp-flame-tint);
  color: var(--jp-flame);
  font-weight: 700;
  font-size: 12px;
}
.loc-field-tag {
  font-size: 12px;
  color: var(--fg-muted);
}
.loc-zh-cell {
  max-width: 240px;
  color: var(--fg-primary);
  line-height: 1.4;
}
.loc-en-input {
  min-width: 240px;
  height: 32px !important;
  min-height: 32px !important;
  font-size: 12.5px !important;
}
.loc-len-cell {
  font-weight: 700;
  color: var(--fg-muted);
  white-space: nowrap;
}
.loc-len-cell.is-over {
  color: var(--status-danger);
}
.loc-badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.loc-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}
.loc-footer-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-secondary);
}
.loc-footer-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Shared Module Project Selectors (wider + ellipsis protection against inline width clipping) */
#locProjectSelect,
#bibleProjectSelect,
#assetsProjectSelect,
#skinsProjectSelect,
#releaseProjectSelect {
  width: clamp(248px, 24vw, 320px) !important;
  min-width: 228px;
  max-width: 100%;
  padding-right: 28px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
@media (max-width: 720px) {
  #locProjectSelect,
  #bibleProjectSelect,
  #assetsProjectSelect,
  #skinsProjectSelect,
  #releaseProjectSelect {
    width: 100% !important;
    min-width: 0;
  }
}

/* Module 2: Cast, Variables & Props Bible */
.bible-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.bible-cast-card,
.bible-var-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.bible-cast-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bible-cast-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--jp-flame-tint);
  border: 1px solid var(--jp-flame-border);
  color: var(--jp-flame);
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  flex-shrink: 0;
}
.bible-cast-ident {
  min-width: 0;
  flex: 1;
}
.bible-cast-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bible-cast-name-row strong {
  font-size: 15px;
  color: var(--fg-primary);
}
.bible-cast-en {
  font-size: 12px;
  color: var(--fg-muted);
}
.bible-cast-quote {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--fg-secondary);
  flex: 1;
}
.bible-heat-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bible-heat-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.bible-heat-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.bible-heat-track > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--jp-grad-primary);
}
.bible-cast-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bible-vars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.bible-var-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bible-var-top strong {
  font-size: 15px;
  color: var(--fg-primary);
}
.bible-var-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}
.bible-var-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bible-var-metrics span {
  font-size: 12px;
  color: var(--fg-muted);
}
.bible-var-metrics b {
  font-size: 14px;
  color: var(--fg-primary);
}
.bible-var-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bible-jump-pill {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--fg-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 130ms ease, color 130ms ease;
}
.bible-jump-pill:hover {
  border-color: var(--jp-flame);
  color: var(--jp-flame);
}
.bible-jump-pill.is-payoff {
  background: var(--jp-flame-tint);
  border-color: var(--jp-flame-border);
  color: var(--jp-flame);
}
.bible-clues-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bible-clue-row {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
}
@media (max-width: 960px) {
  .bible-clue-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bible-clue-ident {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bible-clue-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-primary);
  font-size: 13.5px;
  line-height: 1.35;
}
.bible-clue-meta {
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bible-clue-desc {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--fg-secondary);
}
.bible-clue-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.bible-chain-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
}

/* Module 3: 9:16 Video Contact Sheet & 18-SFX Live Deck */
.assets-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.assets-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 13px;
}
.asset-clip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, transform 140ms ease;
}
.asset-clip-card:hover {
  border-color: var(--jp-flame-border);
  transform: translateY(-2px);
}
.asset-clip-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #141416;
  overflow: hidden;
  cursor: pointer;
}
.asset-clip-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.asset-ratio-tag,
.asset-dur-tag {
  position: absolute;
  top: 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(17, 17, 19, 0.78);
  backdrop-filter: blur(6px);
  color: #f7f5f2;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}
.asset-ratio-tag { left: 7px; }
.asset-dur-tag { right: 7px; }
.asset-play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(232, 73, 47, 0.9);
  color: #ffffff;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}
.asset-clip-poster:hover .asset-play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.asset-clip-info {
  padding: 9px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asset-clip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.asset-clip-info strong {
  font-size: 12.5px;
  color: var(--fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sfx-cat-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.sfx-cat-pills button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-card);
  color: var(--fg-secondary);
  font: 600 12px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 130ms ease, background 130ms ease, color 130ms ease;
}
.sfx-cat-pills button:hover {
  border-color: var(--jp-flame-border);
  color: var(--fg-primary);
}
.sfx-cat-pills button.is-active,
.sfx-cat-pills button.active {
  background: var(--jp-flame);
  border-color: var(--jp-flame);
  color: #ffffff;
  font-weight: 700;
}
.sfx-cat-pills button .sfx-cat-count,
.sfx-cat-pills button small {
  font: 700 12px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.sfx-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sfx-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 13px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.sfx-card.is-playing {
  border-color: var(--jp-flame);
  box-shadow: 0 0 0 1px var(--jp-flame-border);
}
.sfx-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sfx-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--jp-flame-border);
  background: var(--jp-flame-tint);
  color: var(--jp-flame);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 130ms ease, color 130ms ease;
}
.sfx-play-btn:hover,
.sfx-card.is-playing .sfx-play-btn {
  background: var(--jp-flame);
  color: #ffffff;
}
.sfx-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sfx-title-wrap strong {
  font-size: 13.5px;
  color: var(--fg-primary);
}
.sfx-title-wrap span {
  font-size: 12px;
  color: var(--fg-muted);
}
.sfx-card p {
  margin: 0;
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.42;
}
.sfx-wave-bars {
  height: 22px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-top: 2px;
}
.sfx-wave-bars i {
  flex: 1;
  border-radius: 2px;
  background: var(--border-strong);
  transition: background 140ms ease;
}
.sfx-card.is-playing .sfx-wave-bars i {
  background: var(--jp-flame);
  animation: jp-sfx-pulse 0.45s ease-in-out infinite alternate;
}
.sfx-card.is-playing .sfx-wave-bars i:nth-child(2n) { animation-delay: 0.14s; }
.sfx-card.is-playing .sfx-wave-bars i:nth-child(3n) { animation-delay: 0.28s; }
@keyframes jp-sfx-pulse {
  from { transform: scaleY(0.45); }
  to   { transform: scaleY(1); }
}

.asset-lightbox-card {
  width: min(360px, 92vw);
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.asset-lightbox-head,
.asset-lightbox-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.asset-lightbox-stage {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 62vh;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #0e0e10;
}
.asset-lightbox-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Module 4: Visual Skin Studio & 9:16 Live Preview Sandbox */
.skins-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1040px) {
  .skins-workbench {
    grid-template-columns: minmax(0, 1fr);
  }
}
.skins-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 13px;
}
.skin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.skin-card:hover {
  transform: translateY(-2px);
  border-color: var(--jp-flame-border);
}
.skin-card.is-selected {
  border-color: var(--jp-flame);
  box-shadow: 0 0 0 1px var(--jp-flame);
}
.skin-swatch-banner {
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.skin-seal-preview {
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid;
  font: 800 12px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
}
.skin-dots {
  display: inline-flex;
  gap: 5px;
}
.skin-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.skin-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.skin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.skin-card-head strong {
  font-size: 14.5px;
  color: var(--fg-primary);
}
.skin-en {
  font-size: 12px;
  color: var(--fg-muted);
}
.skin-tag {
  font-size: 12px;
  color: var(--fg-secondary);
}
.skin-preview-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 18px;
}
.skin-phone-frame {
  width: 248px;
  padding: 7px;
  border-radius: 28px;
  background: linear-gradient(155deg, #2d2c31 0%, #141316 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}
.skin-phone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
}
.skin-phone-bg,
.skin-phone-tint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.skin-demo-scrim {
  position: relative;
  z-index: 2;
  padding: 14px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skin-demo-kicker {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  background: rgba(14, 13, 16, 0.68);
  font: 800 12px/1.2 var(--font-mono);
}
.skin-demo-prompt {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
}
.skin-demo-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 19, 23, 0.78);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.skin-demo-btn em {
  font-style: normal;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.skin-demo-qte-top {
  position: absolute;
  top: 14px;
  left: 10px;
  right: 10px;
  z-index: 2;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(17, 16, 19, 0.82);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.skin-demo-qte-top span { font: 800 12px/1.2 var(--font-mono); }
.skin-demo-qte-ring {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2.5px solid;
  background: rgba(17, 16, 19, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}
.skin-demo-qte-ring b { font-size: 20px; }
.skin-demo-verdict {
  position: relative;
  z-index: 2;
  margin: 0 10px 18px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1.5px solid;
  background: rgba(17, 16, 19, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.skin-demo-verdict strong { font-size: 15px; letter-spacing: 0.06em; }
.skin-demo-verdict p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.78); line-height: 1.38; }
.skin-demo-stamp {
  align-self: center;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 2px solid;
  font: 900 12px/1.2 var(--font-mono);
  transform: rotate(-4deg);
}

/* Module 5: Release Gates & Frame.io Review Notes */
.release-gates-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1140px) {
  .release-gates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .release-gates-grid { grid-template-columns: minmax(0, 1fr); }
}
.release-gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 13px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.release-gate-top {
  display: flex;
  align-items: center;
  gap: 7px;
}
.release-gate-top strong {
  flex: 1;
  font-size: 13px;
  color: var(--fg-primary);
}
.release-gate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--status-ok);
}
.release-gate-card.is-warn .release-gate-dot { background: var(--status-warn); }
.release-gate-card.is-danger .release-gate-dot { background: var(--status-danger); }
.release-gate-card p {
  margin: 0;
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.42;
  flex: 1;
}
.review-compose-row {
  display: grid;
  grid-template-columns: 210px 120px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
@media (max-width: 920px) {
  .review-compose-row { grid-template-columns: minmax(0, 1fr); }
}
.review-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.review-note-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
}
.review-note-item.is-resolved {
  opacity: 0.62;
}
.review-note-item.is-resolved p {
  text-decoration: line-through;
}
.review-note-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.review-check-btn {
  border: 0;
  background: transparent;
  color: var(--jp-flame);
  padding: 2px;
  cursor: pointer;
}
.review-note-copy {
  min-width: 0;
  flex: 1;
}
.review-note-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.review-note-copy p {
  margin: 0;
  font-size: 13px;
  color: var(--fg-primary);
  line-height: 1.45;
}

/* Module 6: Live A/B Pilot Hub */
.pilot-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
}
@media (max-width: 560px) {
  .pilot-hub-grid { grid-template-columns: minmax(0, 1fr); }
}
.pilot-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.pilot-hub-cover {
  position: relative;
  width: 96px;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: #141416;
}
.pilot-hub-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pilot-hub-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pilot-hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pilot-hub-body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pilot-arms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pilot-arm-box {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pilot-arm-box.is-treatment {
  background: var(--jp-flame-tint);
  border-color: var(--jp-flame-border);
}
.pilot-arm-box span {
  font-size: 12px;
  color: var(--fg-muted);
}
.pilot-arm-box b {
  font-size: 12.5px;
  color: var(--fg-primary);
}
.pilot-arm-sub {
  font-size: 12px;
  color: var(--fg-muted);
}
.pilot-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* PilotHub Ineligible Single-Spine Muted Cards */
.pilot-hub-card.is-ineligible,
.pilot-hub-card.is-muted,
.pilot-hub-card.is-single-spine,
.pilot-hub-card[data-eligible="false"] {
  background: var(--bg-subtle);
  border-style: dashed;
  border-color: var(--border-strong);
  box-shadow: none;
  opacity: 0.84;
}
.pilot-hub-card.is-ineligible .pilot-hub-cover img,
.pilot-hub-card.is-muted .pilot-hub-cover img,
.pilot-hub-card.is-single-spine .pilot-hub-cover img,
.pilot-hub-card[data-eligible="false"] .pilot-hub-cover img {
  filter: saturate(0.42) brightness(0.9);
}
.pilot-hub-card.is-ineligible .pilot-arm-box.is-treatment,
.pilot-hub-card.is-muted .pilot-arm-box.is-treatment,
.pilot-hub-card.is-single-spine .pilot-arm-box.is-treatment,
.pilot-hub-card[data-eligible="false"] .pilot-arm-box.is-treatment {
  background: var(--bg-card);
  border-color: var(--border-hairline);
}
.pilot-hub-ineligible-note,
.pilot-ineligible-note,
.pilot-hub-reason {
  margin: 0;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.45;
}
.pilot-hub-card.is-ineligible .pilot-hub-actions .st-btn.primary,
.pilot-hub-card.is-muted .pilot-hub-actions .st-btn.primary,
.pilot-hub-card.is-single-spine .pilot-hub-actions .st-btn.primary,
.pilot-hub-card[data-eligible="false"] .pilot-hub-actions .st-btn.primary {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--fg-muted);
  box-shadow: none;
}

/* ==========================================================================
   Home Shelf Filter Capsules & v3.0 Priority Badges (Daylight / Obsidian)
   ========================================================================== */
.home-shelf-filters {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}
.home-shelf-filters button {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-secondary);
  font: 600 12px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.home-shelf-filters button:hover {
  color: var(--fg-primary);
  background: var(--bg-elevated);
}
.home-shelf-filters button.is-active,
.home-shelf-filters button.active {
  background: var(--jp-flame);
  border-color: var(--jp-flame);
  color: #ffffff;
  font-weight: 700;
  box-shadow: var(--jp-shadow-primary);
}

.v3-priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--jp-grad-primary);
  color: #ffffff;
  font: 800 12px/1.35 var(--font-sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--jp-flame) 28%, transparent);
}
.shelf-project.is-v3-priority {
  border-color: color-mix(in srgb, var(--jp-flame) 38%, var(--border-hairline));
  box-shadow: inset 3px 0 0 var(--jp-flame), var(--shadow-sm);
}
.shelf-project.is-v3-priority:hover {
  border-color: var(--jp-flame);
  box-shadow: inset 3px 0 0 var(--jp-flame), var(--shadow-md);
}
.shelf-project-tools .shelf-v3-slices-btn {
  color: var(--jp-flame);
  font-weight: 700;
}
.shelf-project-tools .shelf-v3-slices-btn:hover {
  color: var(--jp-flame-hover);
}

/* ==========================================================================
   v3.0 Tri-Variant GPU Slice Library & 9:16 Comparison Lightbox
   ========================================================================== */
.v3-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.v3-section-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.v3-section-head strong {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--fg-primary);
}
.v3-section-head span {
  font-size: 12px;
  color: var(--fg-muted);
}

.v3-drama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.v3-drama-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.v3-drama-card:hover {
  border-color: var(--jp-flame-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.v3-drama-card.is-selected {
  border-color: var(--jp-flame);
  box-shadow: 0 0 0 1px var(--jp-flame), var(--shadow-md);
  background: color-mix(in srgb, var(--jp-flame) 4%, var(--bg-card));
}
.v3-drama-card:focus-visible {
  outline: 2px solid var(--jp-flame);
  outline-offset: 2px;
}
.v3-drama-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.v3-code-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--jp-flame-tint);
  border: 1px solid var(--jp-flame-border);
  color: var(--jp-flame);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.v3-gib-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  white-space: nowrap;
}
.v3-drama-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.38;
  color: var(--fg-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 37px;
}
.v3-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.v3-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
}
.v3-progress-meta strong {
  color: var(--fg-primary);
  font-weight: 700;
}
.v3-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.v3-progress-track > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--jp-grad-primary);
  transition: width 260ms ease;
}
.v3-variant-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.v3-variant-counts span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 4px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v3-variant-counts b {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--fg-primary);
}
.v3-variant-counts span.is-iaa {
  background: var(--jp-flame-tint);
  border-color: var(--jp-flame-border);
  color: var(--jp-flame);
}
.v3-variant-counts span.is-iaa b {
  color: var(--jp-flame);
}
.v3-drama-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 2px;
}
.v3-drama-actions > :is(a, button) {
  flex: 1 1 auto;
  justify-content: center;
}

.v3-slice-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-sm);
}
.v3-slice-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 240px;
}
.v3-active-drama-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--fg-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-slice-toolbar-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-variant-switcher button.is-active {
  background: var(--fg-primary);
  border-color: var(--fg-primary);
  color: var(--bg-card);
}
.v3-search-input {
  width: 220px;
  max-width: 100%;
  height: 30px !important;
  min-height: 30px !important;
  font-size: 12px !important;
}

.v3-slice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.v3-slice-card {
  min-width: 0;
}
.v3-slice-card .asset-clip-poster {
  aspect-ratio: 9 / 16;
}
.v3-poster-variants {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  pointer-events: none;
}
.v3-poster-variants span {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(17, 17, 19, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f7f5f2;
  font: 700 12px/1.2 var(--font-mono);
}
.v3-poster-variants span.is-pref {
  background: rgba(232, 73, 47, 0.92);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}
.v3-slice-info {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.v3-slice-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.v3-slice-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--jp-flame);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v3-angle-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--fg-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56%;
}
.v3-hook-en {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.32;
  color: var(--fg-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.v3-question-zh {
  margin: 0;
  font-size: 12px;
  line-height: 1.42;
  color: var(--fg-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.v3-audio-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.v3-audio-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.v3-audio-tag.is-sting {
  background: var(--jp-flame-tint);
  border-color: var(--jp-flame-border);
  color: var(--jp-flame);
  font-weight: 700;
}
.v3-audio-tag.is-angle {
  background: var(--status-ok-bg);
  border-color: color-mix(in srgb, var(--status-ok) 36%, var(--border-hairline));
  color: var(--status-ok);
}

/* v3.0 Tri-Variant Comparison Lightbox */
.v3-lightbox-card {
  width: min(840px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px 18px;
  gap: 12px;
}
.v3-lb-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 3px;
}
.v3-lb-drama-name {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--fg-primary);
  line-height: 1.35;
}
.v3-lightbox-top-variants {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}
.v3-lb-var-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-secondary);
  white-space: nowrap;
}
.v3-lightbox-top-variants .st-chip {
  margin-left: auto;
}
.v3-lightbox-top-variants button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.v3-lightbox-body {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.v3-lightbox-stage {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: 62vh;
  background: #0b0b0d;
  border: 1px solid var(--border-strong);
}
.v3-lightbox-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0b0d;
}
.v3-lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}
.v3-lb-block {
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.v3-lb-block-label {
  font: 800 12px/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}
.v3-lb-hook {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--fg-primary);
  word-break: break-word;
}
.v3-lb-question {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.48;
  color: var(--jp-flame);
}
.v3-lb-summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg-secondary);
}
.v3-lb-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.v3-kw-chip {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--fg-primary);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .v3-lightbox-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .v3-lightbox-stage {
    max-width: 290px;
    margin: 0 auto;
  }
  .v3-search-input {
    width: 100%;
  }
}

/* Accessibility: Focus-Visible & Reduced Motion for Studio Production Modules */
:is(
  .mod-pill-group button,
  .sfx-cat-pills button,
  .bible-jump-pill,
  .sfx-play-btn,
  .skin-card,
  .review-check-btn,
  .home-shelf-filters button,
  .asset-clip-poster,
  .v3-drama-card
):focus-visible {
  outline: 2px solid var(--jp-flame, var(--ui-accent));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .mod-pill-group button,
  .sfx-cat-pills button,
  .bible-jump-pill,
  .asset-clip-card,
  .asset-play-overlay,
  .sfx-card,
  .sfx-play-btn,
  .sfx-wave-bars i,
  .sfx-card.is-playing .sfx-wave-bars i,
  .skin-card,
  .home-shelf-filters button,
  .v3-drama-card,
  .v3-progress-track > i {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
