/* 镜纪统一设计系统 · 2026-10. Loaded after module styles by shell.js.
   Module adapters deliberately preserve existing semantic classes and workflows. */
:root {
  color-scheme: light;
  --jj-canvas: #f5f6f3;
  --jj-paper: #fff;
  --jj-ink: #22342c;
  --jj-muted: #627068;
  --jj-line: #e0e6df;
  --jj-green: #183d32;
  --jj-green-hover: #285543;
  --jj-lime: #e6f1cf;
  --jj-soft: #f0f4ee;
  --jj-success: #286c49;
  --jj-warning: #925d13;
  --jj-danger: #ae3939;
  --jj-radius: 12px;
  --jj-shadow: 0 4px 20px #183d3205;
  --jj-bar-height: 64px;
}
html { scroll-padding-top: 88px; }
body[data-platform-ui] {
  background: var(--jj-canvas);
  color: var(--jj-ink);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  --muted: var(--jj-muted);
  --line: var(--jj-line);
}
body[data-platform-ui] *, body[data-platform-ui] *::before, body[data-platform-ui] *::after { box-sizing: border-box; }
body[data-platform-ui] :is(button, input, select, textarea) { font-family: inherit; }
body[data-platform-ui] :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid #4d7a5c;
  outline-offset: 3px;
}
body[data-platform-ui] :is(input, textarea, select):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]) {
  background: #fff;
  color: var(--jj-ink);
  border-color: #d5ded4;
  border-radius: 8px;
}
body[data-platform-ui] textarea { line-height: 1.9; }
body[data-platform-ui] :is(button, .btn) { transition: background .15s, border-color .15s, box-shadow .15s; }
body[data-platform-ui] :is(button, .btn):disabled { cursor: not-allowed; }
body[data-platform-ui] :is(.panel, .card, .project-card, .fm-panel, .fm-project-card) { box-shadow: var(--jj-shadow); }
body[data-platform-ui] :is(.primary, button.dark, .fm-primary, .cr-primary, .jh-primary) {
  background: var(--jj-green);
  border-color: var(--jj-green);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
body[data-platform-ui] :is(.primary, button.dark, .fm-primary, .cr-primary, .jh-primary):hover:not(:disabled) {
  background: var(--jj-green-hover);
  border-color: var(--jj-green-hover);
  color: #fff;
  transform: none;
}
body[data-platform-ui] dialog { border-color: var(--jj-line); border-radius: 16px; box-shadow: 0 24px 80px #183d3226; }
body[data-platform-ui] dialog::backdrop { background: #13291f70; }
body[data-platform-ui] :is(.muted, .meta.muted, .subtitle) { color: var(--jj-muted); }
body[data-platform-ui] ::selection { background: #dcebc6; color: #183d32; }
/* Shared global navigation. Only the module links scroll on small screens. */
body[data-platform-ui] .pbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--jj-bar-height);
  min-height: var(--jj-bar-height);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 26px;
  gap: 24px;
  background: #fff;
  color: var(--jj-ink);
  border-bottom: 1px solid var(--jj-line);
  box-shadow: 0 2px 10px #183d3204;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  flex-wrap: nowrap;
}
body[data-platform-ui] .pbar-brand { display: flex; gap: 12px; align-items: center; font-size: 25px; letter-spacing: 2px; color: var(--jj-green); font-weight: 750; }
.pbar-brand > span { padding-left: 12px; border-left: 1px solid var(--jj-line); color: var(--jj-muted); font-size: 11px; letter-spacing: 0; font-weight: 400; }
body[data-platform-ui] .pbar-nav { gap: 5px; align-items: center; }
body[data-platform-ui] .pbar-nav a { padding: 10px 13px; border-radius: 8px; opacity: 1; color: #526057; font-weight: 500; }
body[data-platform-ui] .pbar-nav a:hover { color: var(--jj-green); background: var(--jj-soft); }
body[data-platform-ui] .pbar-nav a[aria-current=page] { background: var(--jj-lime); color: var(--jj-green); font-weight: 650; }
body[data-platform-ui] .pbar-right { gap: 10px; opacity: 1; }
body[data-platform-ui] .pbar-right > a { border-color: var(--jj-line); border-radius: 8px; padding: 8px 11px; font-size: 12px; }
body[data-platform-ui] .pbar-right > a:hover { background: var(--jj-soft); }
body[data-platform-ui] .pbar-right a.pbar-subscription { background: var(--jj-soft); color: var(--jj-green); border-color: var(--jj-line); }
body[data-platform-ui] .pbar-userbtn { padding: 9px 11px; gap: 10px; border: 1px solid var(--jj-line); border-radius: 8px; background: #fff; font-size: 12px; }
body[data-platform-ui] .pbar-card { top: calc(100% + 2px); padding: 18px; color: var(--jj-ink); border: 1px solid var(--jj-line); box-shadow: 0 12px 35px #183d3220; font-size: 13px; }
body[data-platform-ui] .pbar-card nav { margin: 0; display: grid; gap: 2px; }
body[data-platform-ui] .pbar-card dd { color: var(--jj-green); }
body[data-platform-ui] .platform-public-footer { background: var(--jj-canvas); border-color: var(--jj-line); padding: 24px 18px; color: var(--jj-muted); font-size: 12px; }
body[data-platform-ui] .platform-public-footer a { color: #53685a; text-decoration: none; }
body[data-platform-ui] .platform-public-footer a:hover { text-decoration: underline; }
/* Studio + account screens. Keep one local navigation on desktop. */
body[data-platform-ui=studio] { --canvas: var(--jj-canvas); --ink: var(--jj-ink); --green: var(--jj-green); --lime: var(--jj-lime); }
body[data-platform-ui=studio] :is(h1,h2,h3) { font-family: inherit; color: var(--jj-ink); }
body[data-platform-ui=studio] h1 { font-weight: 680; letter-spacing: -.6px; }
body[data-platform-ui=studio] .shell { grid-template-columns: 224px minmax(0,1fr); min-height: calc(100vh - var(--jj-bar-height)); }
body[data-platform-ui=studio] .sidebar {
  inset: var(--jj-bar-height) auto 0 0;
  width: 224px;
  padding: 22px 14px;
  background: #fff;
  color: var(--jj-muted);
  border-right: 1px solid var(--jj-line);
  overflow-y: auto;
}
body[data-platform-ui=studio] .sidebar .brand { color: var(--jj-green); padding: 4px 10px 18px; min-height: auto; }
body[data-platform-ui=studio] .sidebar .brand-name { color: var(--jj-green); font-size: 19px; letter-spacing: .5px; }
body[data-platform-ui=studio] .sidebar .brand .meta { color: var(--jj-muted); letter-spacing: 1px; }
body[data-platform-ui=studio] .sidebar .brand:hover { background: var(--jj-soft); }
body[data-platform-ui=studio] .sidebar .project-switch { color: var(--jj-ink); background: var(--jj-soft); border: 1px solid var(--jj-line); border-radius: 9px; padding: 12px; margin: 0 0 24px; overflow-wrap: anywhere; }
body[data-platform-ui=studio] .sidebar .side-label { color: var(--jj-muted); font-size: 11px; letter-spacing: .5px; margin: 0 0 10px; }
body[data-platform-ui=studio] .sidebar .side-item { color: #59685e; min-height: 46px; margin: 4px 0; padding: 12px; border-radius: 8px; background: transparent; box-shadow: none; font-size: 13px; }
body[data-platform-ui=studio] .sidebar .side-item:hover { color: var(--jj-green); background: var(--jj-soft); }
body[data-platform-ui=studio] .sidebar .side-item.active { color: var(--jj-green); background: var(--jj-lime); box-shadow: none; font-weight: 650; }
body[data-platform-ui=studio] .sidebar .side-num { color: #687769; font-family: inherit; font-size: 11px; }
body[data-platform-ui=studio] .sidebar .stage-dot { font-size: 12px; }
body[data-platform-ui=studio] .sidebar .status-ready .stage-dot { color: var(--jj-success); }
body[data-platform-ui=studio] .sidebar .status-stale .stage-dot { color: var(--jj-warning); }
body[data-platform-ui=studio] .side-bottom { border-color: var(--jj-line); padding: 20px 10px 0; margin-top: 28px; }
body[data-platform-ui=studio] .side-bottom p { color: var(--jj-muted); }
body[data-platform-ui=studio] .main { background: var(--jj-canvas); }
body[data-platform-ui=studio] .topbar { top: var(--jj-bar-height); min-height: 62px; height: auto; padding: 12px 28px; background: #fff; border-color: var(--jj-line); backdrop-filter: none; }
body[data-platform-ui=studio] .breadcrumb { gap: 10px; font-size: 12px; flex-wrap: wrap; }
body[data-platform-ui=studio] .content { max-width: 1560px; padding: 28px 30px 56px; }
body[data-platform-ui=studio] .stage-header { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0 0 24px; }
body[data-platform-ui=studio] .stage-header::after { display: none; }
body[data-platform-ui=studio] .stage-header h1 { font-size: 30px; }
body[data-platform-ui=studio] .eyebrow { color: #65785e; font-family: inherit; font-size: 11px; letter-spacing: 1px; }
body[data-platform-ui=studio] :is(.panel,.metric,.workflow-toolbar) { background: #fff; border: 1px solid var(--jj-line); border-radius: var(--jj-radius); box-shadow: var(--jj-shadow); }
body[data-platform-ui=studio] .panel-head { background: #fff; padding: 18px 22px; border-color: var(--jj-line); }
body[data-platform-ui=studio] .panel-body { padding: 22px; }
body[data-platform-ui=studio] button { border-radius: 8px; border-color: #d7e0d5; color: var(--jj-ink); background: #fff; }
body[data-platform-ui=studio] button:hover:not(:disabled) { background: var(--jj-soft); transform: none; }
body[data-platform-ui=studio] button:is(.primary,.dark) { background: var(--jj-green); border-color: var(--jj-green); color: #fff; }
body[data-platform-ui=studio] button:is(.primary,.dark):hover:not(:disabled) { background: var(--jj-green-hover); }
body[data-platform-ui=studio] button.ghost { background: transparent; }
body[data-platform-ui=studio] .danger { color: var(--jj-danger); }
body[data-platform-ui=studio] .notice { background: #f3f6ed; border-color: #dce7ce; color: #41573c; border-radius: 10px; }
body[data-platform-ui=studio] .notice.error { background: #fdf1ef; border-color: #efcfca; color: var(--jj-danger); }
body[data-platform-ui=studio] .badge { background: var(--jj-soft); color: #52694f; border-radius: 6px; font-size: 11px; padding: 4px 9px; }
body[data-platform-ui=studio] .badge:is(.ready,.published,.confirmed,.succeeded) { background: #eaf5ed; color: var(--jj-success); }
body[data-platform-ui=studio] .badge:is(.stale,.awaiting_confirmation,.candidate) { background: #fff3df; color: var(--jj-warning); }
body[data-platform-ui=studio] .badge.failed { background: #fdeeee; color: var(--jj-danger); }
body[data-platform-ui=studio] .badge:is(.running,.submitted,.queued) { background: #edf3fb; color: #3b6491; }
body[data-platform-ui=studio] .tabs { border-color: var(--jj-line); }
body[data-platform-ui=studio] .tabs button.active { color: var(--jj-green); border-color: var(--jj-green); background: var(--jj-soft); }
body[data-platform-ui=studio] .style-tabs [role="tab"][aria-selected="true"], body[data-platform-ui=studio] .style-tabs [role="tab"][aria-selected="true"]:hover:not(:disabled) { background: var(--jj-green); border-color: var(--jj-green); color: #fff; }
body[data-platform-ui=studio] .project-list { max-width: 1360px; padding: 32px; margin: auto; }
body[data-platform-ui=studio] .project-hero { padding: 0 0 24px; border-color: var(--jj-line); gap: 20px; }
body[data-platform-ui=studio] .project-hero h1 { margin: 6px 0; font-size: 32px; }
body[data-platform-ui=studio] .project-card { padding: 24px; min-height: 235px; border: 1px solid var(--jj-line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
body[data-platform-ui=studio] .project-card:hover { border-color: #a7bea0; transform: none; box-shadow: 0 6px 24px #183d320a; }
body[data-platform-ui=studio] .project-card h2 { margin: 22px 0 10px; font-size: 21px; }
body[data-platform-ui=studio] .project-icon { width: 44px; height: 44px; color: var(--jj-green); background: var(--jj-lime); font-size: 18px; font-weight: 600; border-radius: 10px; }
body[data-platform-ui=studio] .project-progress { gap: 5px; }
body[data-platform-ui=studio] .project-progress i { height: 5px; background: #eaf0e6; border-radius: 4px; }
body[data-platform-ui=studio] .project-progress i.done { background: #79a27a; }
/* Production summary and existing group editing controls. */
.jj-production-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; background: #fff; border: 1px solid var(--jj-line); border-radius: 12px; padding: 18px 22px; margin-bottom: 18px; }
.jj-production-summary h2 { font-size: 16px; margin: 0 0 7px; }
.jj-production-summary p { margin: 0; color: var(--jj-muted); font-size: 12px; line-height: 1.8; }
.jj-production-counts { display: flex; gap: 26px; }
.jj-production-counts div { display: grid; gap: 5px; min-width: 48px; }
.jj-production-counts b { font-size: 23px; color: var(--jj-green); font-variant-numeric: tabular-nums; }
.jj-production-counts span { color: var(--jj-muted); font-size: 11px; }
body[data-platform-ui=studio] .gcard { padding: 0; overflow: hidden; margin-bottom: 24px; }
body[data-platform-ui=studio] .gcard-head { background: #fff; border-color: var(--jj-line); padding: 20px 22px; }
body[data-platform-ui=studio] .gcard-body { padding: 0 22px 20px; gap: 22px; }
body[data-platform-ui=studio] .gcard-label { color: var(--jj-muted); font-size: 12px; }
body[data-platform-ui=studio] .gcard video { border-radius: 9px; background: #14251d; }
body[data-platform-ui=studio] .gsec { border-color: var(--jj-line); margin: 0; }
body[data-platform-ui=studio] .gsec-body { padding: 18px 22px; }
body[data-platform-ui=studio] .gsec summary { padding: 14px 22px; background: #fafbf8; color: var(--jj-ink); }
body[data-platform-ui=studio] .gthumb { border-color: var(--jj-line); border-radius: 8px; background: #f5f7f2; }
body[data-platform-ui=studio] .package { border-left: 1px solid var(--jj-line); grid-template-columns: 42px minmax(0,1fr); padding: 24px; }
body[data-platform-ui=studio] .package-num { color: #6b8567; font-size: 22px; font-weight: 500; line-height: 1.5; }
body[data-platform-ui=studio] .gindex-item { border-radius: 7px; }
body[data-platform-ui=studio] .footnote { color: var(--jj-muted); border-color: var(--jj-line); }
/* Signed-in home uses real project data. Decorative example projects are never inserted. */
.jj-dashboard { display: grid; grid-template-columns: 210px minmax(0,1fr); min-height: calc(100vh - var(--jj-bar-height)); }
.jj-dash-side { background: #fff; border-right: 1px solid var(--jj-line); padding: 28px 16px; display: flex; flex-direction: column; gap: 6px; }
.jj-dash-side h2 { color: var(--jj-muted); font-size: 11px; letter-spacing: 1px; padding: 0 12px; margin: 0 0 12px; }
.jj-dash-side a { display: block; padding: 13px 14px; border-radius: 8px; color: #58685d; font-size: 13px; text-decoration: none; }
.jj-dash-side a:hover { background: var(--jj-soft); }
.jj-dash-side a[aria-current=page] { background: var(--jj-lime); color: var(--jj-green); font-weight: 650; }
.jj-dash-side .jj-side-help { margin-top: auto; border-top: 1px solid var(--jj-line); border-radius: 0; padding-top: 20px; }
.jj-dash-main { min-width: 0; width: 100%; max-width: 1500px; margin: 0 auto; padding: 32px; }
.jj-dash-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.jj-dash-header h1 { font-size: 30px; margin: 0 0 8px; }
.jj-dash-header p { color: var(--jj-muted); margin: 0; line-height: 1.8; }
.jj-dash-primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; background: var(--jj-green); color: #fff; border: 1px solid var(--jj-green); border-radius: 8px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.jj-dash-primary:hover { background: var(--jj-green-hover); color: #fff; }
.jj-dash-top { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(240px,1fr); gap: 20px; margin-bottom: 26px; }
.jj-dash-panel { background: #fff; border: 1px solid var(--jj-line); border-radius: 12px; padding: 24px; box-shadow: var(--jj-shadow); min-width: 0; }
.jj-dash-panel h2 { margin: 0 0 18px; font-size: 17px; }
.jj-continue-body { display: flex; align-items: center; gap: 22px; }
.jj-project-mark { width: 96px; height: 112px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--jj-soft); color: #8da583; border: 1px solid #dfe7d8; font-size: 35px; font-weight: 500; }
.jj-continue-copy { flex: 1; min-width: 0; }
.jj-continue-copy h3 { font-size: 23px; margin: 6px 0 10px; overflow-wrap: anywhere; }
.jj-continue-copy p { color: var(--jj-muted); font-size: 12px; line-height: 1.9; margin: 8px 0; }
.jj-continue-copy .jj-dash-primary { margin-top: 8px; padding: 9px 16px; }
.jj-dash-status { display: inline-flex; align-self: flex-start; padding: 4px 8px; border-radius: 6px; background: var(--jj-soft); color: #436b49; font-size: 11px; }
.jj-dash-list { display: grid; gap: 4px; }
.jj-dash-list a { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #edf0e9; text-decoration: none; color: var(--jj-ink); }
.jj-dash-list a:first-child { border-top: 0; }
.jj-dash-list a > span { flex: 1; min-width: 0; }
.jj-dash-list strong { display: block; font-size: 13px; font-weight: 550; }
.jj-dash-list small { display: block; color: var(--jj-muted); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.jj-dash-list i { width: 32px; height: 32px; background: var(--jj-soft); color: var(--jj-green); border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.jj-dash-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.jj-dash-section-head h2 { margin: 0; font-size: 21px; }
.jj-dash-section-head a { color: var(--jj-green); font-size: 12px; }
.jj-dash-projects { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.jj-dash-project { display: flex; flex-direction: column; min-width: 0; min-height: 190px; background: #fff; border: 1px solid var(--jj-line); border-radius: 12px; padding: 22px; color: var(--jj-ink); text-decoration: none; }
.jj-dash-project:hover { border-color: #a7bea0; box-shadow: 0 6px 24px #183d320a; }
.jj-dash-project h3 { font-size: 18px; margin: 18px 0 10px; overflow-wrap: anywhere; }
.jj-dash-project p { color: var(--jj-muted); font-size: 12px; margin: 0 0 20px; line-height: 1.8; }
.jj-dash-project footer { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--jj-muted); margin-top: auto; }
.jj-dash-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 26px; }
.jj-dash-links a { background: #fff; padding: 20px; border: 1px solid var(--jj-line); border-radius: 10px; text-decoration: none; color: var(--jj-green); font-size: 14px; }
.jj-dash-links small { display: block; color: var(--jj-muted); font-size: 11px; line-height: 1.8; margin-top: 8px; }
.jj-dash-empty { padding: 26px; border: 1px dashed #cddbc5; border-radius: 10px; color: var(--jj-muted); background: #fbfcf9; line-height: 1.9; }
.jj-dash-empty a { color: var(--jj-green); }
.jj-dash-error { color: var(--jj-warning); background: #fff7e9; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; }
/* Narrative room: paper-centered editing with consistent side panels. */
body[data-platform-ui=story] { --green: var(--jj-green); --gold: #71835d; }
body[data-platform-ui=story] .topbar { min-height: 64px; height: auto; padding: 16px 28px; background: #fff; }
body[data-platform-ui=story] .home { max-width: 1320px; margin: 32px auto; padding: 0 32px 40px; }
body[data-platform-ui=story] .section-head h1 { font-size: 30px; }
body[data-platform-ui=story] .hero-note { font-size: 14px; }
body[data-platform-ui=story] .workspace { grid-template-columns: 224px minmax(0,1fr); }
body[data-platform-ui=story] .sidebar { background: #fff; border-color: var(--jj-line); padding: 24px 14px; }
body[data-platform-ui=story] .stage.active { background: var(--jj-lime); color: var(--jj-green); }
body[data-platform-ui=story] .stage.active .stage-num { background: var(--jj-green); }
body[data-platform-ui=story] .main { padding: 28px 30px; }
body[data-platform-ui=story] .heading h1 { font-size: 29px; }
body[data-platform-ui=story] .work-grid { grid-template-columns: minmax(0,1fr) 270px; gap: 20px; }
body[data-platform-ui=story] .panel { border-radius: 12px; padding: 24px; border-color: var(--jj-line); }
body[data-platform-ui=story] .panel .editor { padding: 20px; line-height: 2; font-size: 15px; min-height: 360px; }
body[data-platform-ui=story] .task { padding: 13px 10px; border-radius: 7px; margin-bottom: 3px; }
body[data-platform-ui=story] .task.active { background: var(--jj-lime); }
body[data-platform-ui=story] .article { line-height: 2; font-size: 15px; }
body[data-platform-ui=story] .project-card { border-radius: 12px; padding: 26px; min-height: 200px; }
body[data-platform-ui=story] .project-card:hover { background: #fff; border-color: #a7bea0; }
body[data-platform-ui=story] :is(.story-sections a[aria-current],.tab.active) { color: var(--jj-green); background: var(--jj-lime); border-color: var(--jj-green); }
body[data-platform-ui=story] .right .eyebrow { color: #708069; letter-spacing: .8px; }
body[data-platform-ui=story] .right h3 { font-size: 15px; }
body[data-platform-ui=film] { --fm-bg: var(--jj-canvas); --fm-paper: #fff; --fm-ink: var(--jj-ink); --fm-muted: var(--jj-muted); --fm-line: var(--jj-line); --fm-soft: var(--jj-soft); --fm-accent: var(--jj-lime); }
body[data-platform-ui=film] .fm-header { max-width: none; background: #fff; padding: 18px 30px; }
body[data-platform-ui=film] .fm-workspace { gap: 24px; padding: 28px 30px 60px; grid-template-columns: 250px minmax(0,1fr); }
body[data-platform-ui=film] .fm-sidebar { background: #fff; padding: 22px 18px; border: 1px solid var(--jj-line); border-radius: 12px; top: 84px; max-height: calc(100vh - 104px); }
body[data-platform-ui=film] .fm-task-list button { font-size: 12px; padding: 10px 8px; border-radius: 7px; }
body[data-platform-ui=film] .fm-task-list button[aria-current=step] { background: var(--jj-lime); }
body[data-platform-ui=film] .fm-work-title h1 { font-size: 30px; font-weight: 650; }
body[data-platform-ui=film] :is(.fm-panel,.fm-project-card,.fm-metrics) { background: #fff; border-color: var(--jj-line); border-radius: 12px; }
body[data-platform-ui=film] .fm-primary { background: var(--jj-green); border-color: var(--jj-green); color: #fff; }
body[data-platform-ui=film] .fm-tabs [aria-pressed=true] { background: var(--jj-lime); color: var(--jj-green); }
body[data-platform-ui=film] .fm-screenplay { padding: 20px; font-size: 15px; line-height: 2; }
/* Library, topics (潮汐) and public content. Preserve media-led browsing. */
body[data-platform-ui=library] { --bg: var(--jj-canvas); --surface: #fff; --raised: var(--jj-soft); --text: var(--jj-ink); --accent: var(--jj-green); --radius: 12px; }
body[data-platform-ui=library] .nav { position: sticky; top: var(--jj-bar-height); z-index: 40; background: #fff; border-color: var(--jj-line); box-shadow: none; }
body[data-platform-ui=library] .brand { color: var(--jj-green); }
body[data-platform-ui=library] .nav .brand { font-size: 19px; }
body[data-platform-ui=library] .nav .brand small { display: none; }
body[data-platform-ui=library] .btn:not(.secondary):not(.ghost) { background: var(--jj-green); border-color: var(--jj-green); color: #fff; border-radius: 8px; }
body[data-platform-ui=library] .btn:not(.secondary):not(.ghost):hover { background: var(--jj-green-hover); }
body[data-platform-ui=library] .btn:is(.secondary,.ghost) { color: var(--jj-ink); border-radius: 8px; }
body[data-platform-ui=library] :is(.card,.reading-card,.workspace-card,.pricing-card,.prompt-card,.skill-card) { background: #fff; border-color: var(--jj-line); border-radius: 12px; }
body[data-platform-ui=library] .filter-chip.active { background: var(--jj-lime); color: var(--jj-green); }
body[data-platform-ui=library] :is(h1,h2,h3) { color: var(--jj-ink); }
/* Creative tools, image/video generation, guides and account administration. */
body[data-platform-ui=creative] { --cr-bg: var(--jj-canvas); --cr-ink: var(--jj-ink); --cr-muted: var(--jj-muted); --cr-line: var(--jj-line); --cr-white: #fff; --cr-soft: var(--jj-soft); --cr-accent: var(--jj-lime); }
body[data-platform-ui=creative] :is(.cr-panel,.cr-card,.cr-tool-card) { background: #fff; border-color: var(--jj-line); border-radius: 12px; }
body[data-platform-ui=creative] .cr-primary { background: var(--jj-green); color: #fff; border-color: var(--jj-green); }
body[data-platform-ui=generate] :is(.panel,.history) { border-color: var(--jj-line); border-radius: 12px; box-shadow: var(--jj-shadow); }
body[data-platform-ui=generate] #submit { background: var(--jj-green); color: #fff; border-color: var(--jj-green); border-radius: 8px; }
body[data-platform-ui=admin] { --paper: #fff; --soft: var(--jj-soft); --ink: var(--jj-ink); --side: #fff; --side-ink: #52665a; --accent: var(--jj-green); }
body[data-platform-ui=admin] .console { min-height: calc(100vh - var(--jj-bar-height)); grid-template-columns: 224px minmax(0,1fr); }
body[data-platform-ui=admin] .side { top: var(--jj-bar-height); height: calc(100vh - var(--jj-bar-height)); background: #fff; color: var(--jj-ink); border-right: 1px solid var(--jj-line); padding: 24px 14px; }
body[data-platform-ui=admin] .side button { color: #52665a; border-radius: 8px; padding: 12px; }
body[data-platform-ui=admin] .side button:hover { background: var(--jj-soft); }
body[data-platform-ui=admin] .side button.active { color: var(--jj-green); background: var(--jj-lime); }
body[data-platform-ui=admin] .side-foot { border-color: var(--jj-line); }
body[data-platform-ui=admin] :is(.card,.tbl) { border-color: var(--jj-line); border-radius: 12px; }
body[data-platform-ui=admin] .main { padding: 30px; }
body[data-platform-ui=admin] h1 { font-size: 28px; }
body[data-platform-ui=admin] th { background: #f6f8f3; }
body[data-platform-ui=admin] button.primary { background: var(--jj-green); border-color: var(--jj-green); color: #fff; }
body[data-platform-ui=guide], body[data-platform-ui=legal] { --paper: var(--jj-canvas); --ink: var(--jj-ink); --accent: var(--jj-green); }
/* Independent post-production service, reached through /edit/. */
body[data-platform-ui=edit] { --brand: var(--jj-green); --brand2: #285543; --bg: var(--jj-canvas); --card: #fff; --ink: var(--jj-ink); --accent: var(--jj-green); --ok: var(--jj-success); --warn: var(--jj-warning); --bad: var(--jj-danger); --chip: var(--jj-soft); }
body[data-platform-ui=edit] header.top { top: var(--jj-bar-height); min-height: 62px; background: #fff; padding: 12px 28px; }
body[data-platform-ui=edit] .stepper { top: calc(var(--jj-bar-height) + 62px); }
body[data-platform-ui=edit] .jobbar { top: calc(var(--jj-bar-height) + 124px); }
body[data-platform-ui=edit] .rv-player { top: calc(var(--jj-bar-height) + 80px); }
body[data-platform-ui=edit] main { max-width: 1380px; padding: 30px 32px 70px; }
body[data-platform-ui=edit] :is(button,.btn) { border-radius: 8px; background: var(--jj-green); color: #fff; border-color: var(--jj-green); padding: 9px 15px; }
body[data-platform-ui=edit] :is(button,.btn):hover:not(:disabled) { background: var(--jj-green-hover); color: #fff; }
body[data-platform-ui=edit] :is(button.ghost,button.link) { background: transparent; color: var(--jj-green); }
body[data-platform-ui=edit] button.thumb { background: none; padding: 0; border: 0; }
body[data-platform-ui=edit] :is(.card,.pc) { padding: 24px; border-color: var(--jj-line); border-radius: 12px; }
body[data-platform-ui=edit] .hero { background: #fff; color: var(--jj-ink); border: 1px solid var(--jj-line); border-radius: 12px; padding: 28px; }
body[data-platform-ui=edit] .hero h1 { font-size: 28px; }
body[data-platform-ui=edit] .hero p { font-size: 13px; line-height: 1.9; color: var(--jj-muted); }
body[data-platform-ui=edit] .flow li { background: var(--jj-soft); font-size: 13px; color: var(--jj-ink); }
body[data-platform-ui=edit] .flow b { background: var(--jj-lime); color: var(--jj-green); }
body[data-platform-ui=edit] .pc:hover { transform: none; border-color: #a7bea0; box-shadow: 0 6px 24px #183d320a; }
body[data-platform-ui=edit] .cut { padding: 12px; border-radius: 10px; }
/* Responsive rules are last so adapters never hide narrow-screen navigation. */
@media (max-width: 1200px) {
  body[data-platform-ui] .pbar { padding: 0 18px; gap: 16px; }
  .pbar-brand > span { display: none; }
  body[data-platform-ui] .pbar-nav a { padding-inline: 10px; }
  body[data-platform-ui] .pbar-name { display: none; }
  .jj-dashboard { grid-template-columns: 180px minmax(0,1fr); }
  .jj-dash-main { padding: 26px; }
  .jj-dash-projects { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .jj-dash-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-platform-ui=story] .work-grid { grid-template-columns: minmax(0,1fr); }
  body[data-platform-ui=story] .right { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
}
@media (max-width: 900px) {
  .jj-dash-top { grid-template-columns: minmax(0,1fr); }
  .jj-dash-header h1 { font-size: 27px; }
  body[data-platform-ui] .pbar-guide { display: none; }
  body[data-platform-ui=studio] .content { padding: 24px; }
  body[data-platform-ui=film] .fm-workspace { grid-template-columns: 210px minmax(0,1fr); padding: 24px; gap: 18px; }
  body[data-platform-ui=edit] .rv-player { position: static; }
}
@media (max-width: 760px) {
  :root { --jj-bar-height: 104px; }
  html { scroll-padding-top: 124px; }
  body[data-platform-ui] .pbar { display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: 52px 52px; height: 104px; padding: 0 16px; gap: 0 12px; align-items: center; }
  body[data-platform-ui] .pbar-brand { display: flex; font-size: 23px; grid-column: 1; grid-row: 1; }
  body[data-platform-ui] .pbar-right { grid-column: 2; grid-row: 1; justify-self: end; min-width: 0; gap: 8px; }
  body[data-platform-ui] .pbar-right > a { padding: 7px 9px; font-size: 11px; }
  body[data-platform-ui] .pbar-nav { grid-column: 1 / -1; grid-row: 2; display: flex; width: 100%; height: 52px; gap: 5px; border-top: 1px solid #f0f3ec; }
  body[data-platform-ui] .pbar-nav a { padding: 8px 12px; font-size: 12px; flex-shrink: 0; }
  body[data-platform-ui] .pbar-userbtn { padding: 6px 8px; font-size: 11px; }
  body[data-platform-ui] .pbar-card { max-width: calc(100vw - 32px); min-width: 220px; }
  body[data-platform-ui] :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=range]) { font-size: 16px; }
  body[data-platform-ui=studio] .shell { display: block; }
  body[data-platform-ui=studio] .sidebar { display: none; }
  body[data-platform-ui=studio] .topbar { position: static; min-height: 62px; padding: 14px 16px; flex-wrap: wrap; }
  body[data-platform-ui=studio] .topnav { display: flex; position: sticky; top: var(--jj-bar-height); z-index: 35; padding: 0 16px; gap: 8px; background: #fff; border-color: var(--jj-line); }
  body[data-platform-ui=studio] .topnav a { padding: 13px 10px; font-size: 12px; border-bottom: 2px solid transparent; }
  body[data-platform-ui=studio] .topnav a.active { color: var(--jj-green); border-color: var(--jj-green); background: var(--jj-soft); }
  body[data-platform-ui=studio] .content { padding: 22px 16px 40px; }
  body[data-platform-ui=studio] .stage-header h1 { font-size: 26px; }
  body[data-platform-ui=studio] .project-list { padding: 26px 16px; }
  body[data-platform-ui=studio] .project-hero h1 { font-size: 28px; }
  body[data-platform-ui=studio] .project-card { padding: 20px; min-height: 210px; }
  body[data-platform-ui=studio] .gcard-head { padding: 16px; }
  body[data-platform-ui=studio] .gcard-body { padding: 0 16px 16px; }
  body[data-platform-ui=studio] .gsec summary { padding: 14px 16px; }
  .jj-production-summary { grid-template-columns: minmax(0,1fr); padding: 18px; gap: 14px; }
  .jj-production-counts { gap: 30px; }
  .jj-dashboard { display: block; }
  .jj-dash-side { display: none; }
  .jj-dash-main { padding: 24px 16px 40px; }
  .jj-dash-header { align-items: flex-start; gap: 12px; }
  .jj-dash-header h1 { font-size: 26px; }
  .jj-dash-header p { font-size: 12px; }
  .jj-dash-primary { padding: 10px 14px; font-size: 12px; }
  .jj-dash-panel { padding: 20px; }
  .jj-project-mark { width: 66px; height: 90px; font-size: 28px; }
  .jj-continue-body { gap: 16px; }
  .jj-continue-copy h3 { font-size: 21px; }
  .jj-dash-projects { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .jj-dash-project { min-height: 170px; }
  .jj-dash-links { gap: 12px; }
  .jj-dash-links a { padding: 16px; }
  body[data-platform-ui=story] .topbar { padding: 14px 16px; }
  body[data-platform-ui=story] .home { margin-top: 24px; padding: 0 16px; }
  body[data-platform-ui=story] .workspace { display: block; }
  body[data-platform-ui=story] .sidebar { padding: 10px; }
  body[data-platform-ui=story] .main { padding: 22px 16px; }
  body[data-platform-ui=story] .right { display: block; }
  body[data-platform-ui=story] .panel { padding: 18px; }
  body[data-platform-ui=story] .heading h1 { font-size: 25px; }
  body[data-platform-ui=film] .fm-workspace { display: block; padding: 22px 16px; }
  body[data-platform-ui=film] .fm-sidebar { position: static; max-height: none; padding: 14px; margin-bottom: 22px; }
  body[data-platform-ui=film] .fm-task-list { margin-bottom: 0; }
  body[data-platform-ui=film] .fm-header { padding: 16px; }
  body[data-platform-ui=film] .fm-screenplay { padding: 14px; }
  body[data-platform-ui=library] .nav .brand { display: none; }
  body[data-platform-ui=admin] .console { grid-template-columns: minmax(0,1fr); }
  body[data-platform-ui=admin] .side { position: static; width: 100%; height: auto; padding: 12px; border-bottom: 1px solid var(--jj-line); }
  body[data-platform-ui=admin] .main { padding: 22px 16px; }
  body[data-platform-ui=edit] header.top { position: static; padding: 12px 16px; flex-wrap: wrap; }
  body[data-platform-ui=edit] main { padding: 22px 16px 50px; }
  body[data-platform-ui=edit] :is(.card,.pc) { padding: 18px; }
  body[data-platform-ui=edit] .hero { padding: 22px; }
  body[data-platform-ui=edit] .hero h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-platform-ui] *, body[data-platform-ui] *::before, body[data-platform-ui] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
/* Semantic navigation styles for the server-rendered console and public documents. */
body[data-platform-ui=admin] .side a { color: #52665a; border-radius: 8px; padding: 12px; }
body[data-platform-ui=admin] .side a:hover { background: var(--jj-soft); color: var(--jj-green); }
body[data-platform-ui=admin] .side a.on { background: var(--jj-lime); color: var(--jj-green); font-weight: 650; }
body[data-platform-ui=admin] .side .brand { color: var(--jj-green); border-color: var(--jj-line); }
body[data-platform-ui=admin] .side .brand small { color: var(--jj-muted); }
body[data-platform-ui=admin] #toast { background: var(--jj-green); }
body[data-platform-ui=admin] #toast.err { background: var(--jj-danger); }
body[data-platform-ui=studio] .gcard-head .package-num { color: #6b8567; font-family: inherit; font-size: 22px; }
body[data-platform-ui=studio] .sidebar .side-item.active .side-num { color: var(--jj-green); }
body[data-platform-ui=studio] .gswitch button.active { color: #fff; background: var(--jj-green); }
body[data-platform-ui=studio] .gcard { scroll-margin-top: calc(var(--jj-bar-height) + var(--jj-topbar-height, 62px) + 58px); }
body[data-platform-ui=studio] .gindex { top: calc(var(--jj-bar-height) + var(--jj-topbar-height, 62px)); z-index: 25; background: var(--jj-canvas); }
body[data-platform-ui=studio] .jingji-home { --jh-bg: var(--jj-canvas); --jh-paper: var(--jj-canvas); --jh-ink: var(--jj-ink); --jh-accent: var(--jj-green); --jh-muted: var(--jj-muted); --jh-line: var(--jj-line); }
body[data-platform-ui=studio] .jingji-home .jh-primary { background: var(--jj-green); color: #fff; }
body[data-platform-ui=studio] .jingji-home :is(.jh-filters button[aria-pressed=true],.jh-creative-entry nav a:hover) { background: var(--jj-lime); color: var(--jj-green); }
body[data-platform-ui=studio] .jingji-home :is(.jh-tool,.jh-creative-entry,.jh-membership) { border-radius: 12px; }
@media (max-width:760px) {
  body[data-platform-ui=studio] .gsec-body { padding: 16px; }
  body[data-platform-ui=studio] .gindex { top: calc(var(--jj-bar-height) + 48px); }
  .jj-dash-header { flex-wrap: wrap; }
  body[data-platform-ui=admin] .side a { padding: 9px 11px; }
}
body[data-platform-ui=studio] details.jj-advanced { margin: 0 0 18px; padding: 0; }
body[data-platform-ui=studio] details.jj-advanced > summary { padding: 15px 22px; color: var(--jj-ink); font-size: 13px; cursor: pointer; }
body[data-platform-ui=studio] details.jj-advanced > summary span { margin-left: 10px; font-size: 11px; font-weight: 400; }
body[data-platform-ui=studio] details.jj-advanced > .panel-body { border-top: 1px solid var(--jj-line); }
body[data-platform-ui=studio] .jj-model-settings { margin: 0; border: 0; border-top: 1px solid var(--jj-line); border-radius: 0; box-shadow: none; }
body[data-platform-ui=studio] :is(.gswitch,.gindex-item) { border-color: var(--jj-line); }
body[data-platform-ui] input[type=file] { max-width: 100%; min-width: 0; }
body[data-platform-ui=edit] :is(.two,.rv) > * { min-width: 0; }
body[data-platform-ui=edit] .two { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media(max-width:900px) {
  body[data-platform-ui=edit] .two { grid-template-columns: minmax(0,1fr); }
}
/* Forms keep the same light surfaces even when their original module used dark UI. */
body[data-platform-ui=generate] :is(.panel,.history) { background: #fff; color: var(--jj-ink); }
body[data-platform-ui=generate] :is(.hint,.eyebrow) { color: var(--jj-muted); }
body[data-platform-ui=generate] :is(a,#notice) { color: var(--jj-green); }
body[data-platform-ui=generate] button { background: #fff; color: var(--jj-green); border-color: #d5ded4; }
body[data-platform-ui=generate] button:hover:not(:disabled) { background: var(--jj-soft); }
body[data-platform-ui=generate] #submit:hover:not(:disabled) { background: var(--jj-green-hover); }
body[data-platform-ui=generate] .result { border-color: var(--jj-line); }
body[data-platform-ui=generate] input[type=file] { background: var(--jj-soft); color: var(--jj-ink); border-color: var(--jj-line); }
body[data-platform-ui=admin] button.pri { background: var(--jj-green); border-color: var(--jj-green); color: #fff; }
body[data-platform-ui=admin] button.pri:hover:not(:disabled) { background: var(--jj-green-hover); }
body[data-platform-ui=studio] .login-art { background: var(--jj-green); color: #eef4e8; }
body[data-platform-ui=studio] .login-art :is(h1,.brand-name) { color: #fff; }
body[data-platform-ui=studio] .login-art p { color: #d4e1d0; }
body[data-platform-ui=studio] .login-art .accent { color: #d5ecab; }
body[data-platform-ui=studio] .login-form { background: #fff; }
body[data-platform-ui=studio] .handoff .btn { background: var(--jj-green); color: #fff; border-color: var(--jj-green); }
body[data-platform-ui=studio] .handoff .btn.ghost { background: transparent; color: var(--jj-green); border: 1px solid var(--jj-line); }
body[data-platform-ui=studio] .handoff .card { background: #fff; border-color: var(--jj-line); border-radius: 12px; padding: 22px; }
body[data-platform-ui=studio] .handoff .muted { color: var(--jj-muted); }
/* Homepage creation composer: direct image/video generation and conversation. */
.hc { padding: 30px 0 34px; border-bottom: 1px solid var(--jj-line); color: var(--jj-ink); }
.hc-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.hc-heading h2 { font-size: 23px; line-height: 1.5; font-weight: 650; margin: 7px 0 0; letter-spacing: -.5px; }
.hc-heading > a { font-size: 12px; color: var(--jj-green); }
.hc-tabs { display: flex; align-items: center; width: fit-content; margin: 0 auto 18px; background: #ecf0e9; padding: 5px; border-radius: 13px; gap: 4px; }
body[data-platform-ui=studio] .hc-tabs button { display: flex; gap: 8px; align-items: center; justify-content: center; min-width: 108px; min-height: 40px; padding: 9px 20px; border: 0; border-radius: 9px; background: transparent; color: #606a63; font-size: 13px; }
body[data-platform-ui=studio] .hc-tabs button[aria-selected=true] { background: #fff; color: var(--jj-green); box-shadow: 0 2px 8px #183d3209; font-weight: 650; }
.hc-composer { background: #fff; border: 1px solid #e2e8df; border-radius: 22px; box-shadow: 0 7px 24px #183d3207; padding: 22px; }
body[data-platform-ui=studio] .hc #hc-text { display: block; width: 100%; height: 104px; min-height: 104px; max-height: 300px; margin: 0; padding: 0 4px; border: 0; border-radius: 6px; outline-offset: 5px; resize: vertical; box-shadow: none; font-size: 15px; line-height: 1.9; color: var(--jj-ink); background: #fff; }
.hc #hc-text::placeholder { color: #939c93; }
.hc-reference-row { display: flex; align-items: center; gap: 12px; min-height: 46px; flex-wrap: wrap; margin: 14px 0 22px; }
.hc-upload { display: inline-flex; align-items: center; border: 1px dashed #d4decf; border-radius: 24px; background: #f6f8f3; padding: 8px 14px; color: #667360; cursor: pointer; font-size: 12px; margin: 0; }
.hc-upload:hover { background: var(--jj-lime); }
.hc-references { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hc-reference { position: relative; width: 48px; height: 42px; }
.hc-reference img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
body[data-platform-ui=studio] .hc-reference button { position: absolute; right: -5px; top: -6px; min-height: 18px; width: 18px; height: 18px; padding: 0; border: 1px solid var(--jj-line); border-radius: 50%; font-size: 12px; background: #fff; }
.hc-hint { color: var(--jj-muted); font-size: 11px; line-height: 1.8; }
.hc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.hc-options { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
body[data-platform-ui=studio] .hc-options select { width: auto; max-width: 100%; min-width: 0; min-height: 36px; padding: 7px 29px 7px 12px; border: 1px solid #edf0e9; border-radius: 24px; background-color: #f3f5f0; font-size: 12px; }
body[data-platform-ui=studio] .hc-options #hc-model { max-width: 340px; }
body[data-platform-ui=studio] button.hc-submit { flex-shrink: 0; min-height: 40px; padding: 10px 22px; display: flex; align-items: center; gap: 10px; border-radius: 24px; background: var(--jj-green); color: #fff; border-color: var(--jj-green); font-size: 13px; }
body[data-platform-ui=studio] button.hc-submit:hover:not(:disabled) { background: var(--jj-green-hover); }
body[data-platform-ui=studio] button.hc-submit:disabled { background: #edf0e9; border-color: #edf0e9; color: #899184; opacity: 1; }
.hc-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 4px 0; color: var(--jj-muted); font-size: 12px; line-height: 1.8; }
.hc-note > a { flex-shrink: 0; color: var(--jj-green); }
.hc-results, .hc-conversation { margin-top: 24px; background: #fff; border: 1px solid var(--jj-line); border-radius: 14px; padding: 22px; }
.hc-results > header, .hc-conversation > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hc-results h3, .hc-conversation h3 { font-size: 16px; margin: 0; }
.hc-results header button, .hc-conversation header button { padding: 6px 12px; min-height: 32px; font-size: 12px; }
.hc-result-grid { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); grid-template-rows: auto; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 10px; }
.hc-result-grid > .hc-result { scroll-snap-align: start; }
.hc-result { min-width: 0; border: 1px solid var(--jj-line); border-radius: 10px; overflow: hidden; }
.hc-result-media { aspect-ratio: 16/10; background: #eef2e9; display: grid; place-items: center; color: var(--jj-muted); font-size: 13px; overflow: hidden; }
.hc-result-media :is(img,video) { width: 100%; height: 100%; object-fit: contain; display: block; }
.hc-result-media > a { display: block; width: 100%; height: 100%; }
.hc-result > div:last-child { padding: 14px; font-size: 13px; }
.hc-result strong { display: block; overflow-wrap: anywhere; font-weight: 550; }
.hc-result small { display: block; font-size: 11px; color: var(--jj-muted); margin: 8px 0; }
.hc-result p { color: var(--jj-danger); font-size: 12px; overflow-wrap: anywhere; }
.hc-message { padding: 16px 18px; margin: 12px 0; border-radius: 10px; background: #f4f7ef; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.hc-message.is-user { background: #fff; border: 1px solid var(--jj-line); }
.hc-message strong { display: block; margin-bottom: 7px; color: var(--jj-green); font-size: 12px; }
.hc-message > div { white-space: pre-wrap; }
.hc-quote-text { max-height: 140px; overflow: auto; padding: 14px; background: var(--jj-soft); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; }
@media(max-width:760px) {
 .hc { padding: 22px 0 28px; }
 .hc-heading { margin-bottom: 18px; }
 .hc-heading h2 { font-size: 20px; }
 .hc-heading > a { font-size: 11px; }
 .hc-composer { border-radius: 16px; padding: 18px; }
 body[data-platform-ui=studio] .hc-tabs button { min-width: 88px; padding: 8px 14px; }
 .hc-tabs { margin-bottom: 16px; }
 .hc-bottom { align-items: stretch; flex-direction: column; gap: 16px; }
 body[data-platform-ui=studio] .hc-options select { font-size: 13px; max-width: 100%; }
 body[data-platform-ui=studio] .hc-options #hc-model { max-width: 100%; width: 100%; }
 body[data-platform-ui=studio] button.hc-submit { align-self: flex-end; min-height: 42px; }
 .hc-note { font-size: 11px; gap: 14px; }
 .hc-result-grid { grid-auto-columns: min(82vw, 300px); }
 .hc-results,.hc-conversation { padding: 16px; }
}
.hc [hidden] { display: none !important; }
body[data-platform-ui=studio] .hc .hc-upload { border: 1px dashed #d4decf; border-radius: 24px; background: #f6f8f3; color: #667360; font-size: 12px; padding: 8px 14px; }
body[data-platform-ui=studio] .jingji-home .jh-tool-studio h3 { color: #fff; }

.hc-result strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-result p { max-height: 4.5em; overflow-y: auto; line-height: 1.5; }
.hc-av-reference { width: 74px; background: var(--jj-soft); border-radius: 7px; }
.hc-av-reference > a { display: grid; place-items: center; height: 100%; text-decoration: none; font-size: 11px; color: var(--jj-green); }
.hc-av-reference small { display: block; font-size: 9px; color: var(--jj-muted); }
.hc-reference-label { position: absolute; bottom: 1px; left: 2px; background: #fff; color: var(--jj-green); border-radius: 2px; font-size: 9px; padding: 0 3px; }
.hc-av-reference .hc-reference-label { display: none; }
.hc-mj{margin:18px 0 22px;padding:22px;border:1px solid #dce5da;border-radius:16px;background:#f7f9f5;color:#233e34}.hc-mj[hidden]{display:none}.hc-mj header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.hc-mj header p{margin:6px 0;color:#748277;font-size:13px}.hc-mj button{padding:7px 12px;border:1px solid #d7e0d2;border-radius:8px;background:white;font-size:12px;color:#365342;cursor:pointer}.hc-mj-presets{display:flex;gap:8px;margin:14px 0}.hc-mj-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px 30px}.hc-mj-field{display:grid;gap:10px;font-size:13px;font-weight:600}.hc-mj-field small{display:block;margin-top:5px;color:#788579;font-size:12px;font-weight:400}.hc-mj-field>div{display:flex;gap:14px;align-items:center}.hc-mj input[type=range]{flex:1;min-width:0;accent-color:#315940}.hc-mj input[type=number]{width:86px}.hc-mj-field>input,.hc-mj input[type=number]{padding:8px;border:1px solid #d6e0d2;border-radius:8px;background:white;color:#263f32;min-width:0;box-sizing:border-box}.hc-mj-field>input{width:100%}.hc-mj input:disabled{opacity:.4}.hc-mj details{border-top:1px solid #e0e7dc;margin-top:20px;padding-top:16px}.hc-mj summary{cursor:pointer;font-size:13px;font-weight:600}.hc-mj summary span{margin-left:10px;color:#859080;font-size:12px;font-weight:400}.hc-mj details .hc-mj-grid{margin-top:20px}.hc-mj-raw{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:20px 0;font-size:13px}.hc-mj-raw span{color:#788579;font-size:12px}.hc-mj-preview code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;margin-top:14px;color:#46643c}@media(max-width:650px){.hc-mj{padding:16px}.hc-mj-grid{grid-template-columns:1fr}.hc-mj summary span{display:block;margin:6px 0 0 16px}}
.hc-mj-style-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:18px}.hc-mj-style-row button{border-style:dashed;background:#edf3e6}
.hc-mj-result-action{display:block;margin-top:10px;border:1px solid #cbdac2;border-radius:8px;background:#f0f5e9;color:#315238;padding:8px 10px;cursor:pointer;font-size:12px}.hc-mj-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hc-mj-choices button{padding:0;border:1px solid #d8e1d2;border-radius:10px;overflow:hidden;background:#f5f8f0;color:#315238;cursor:pointer}.hc-mj-choices button:hover{border-color:#3b633e}.hc-mj-quadrant{display:flex;align-items:center;justify-content:center;overflow:hidden;background:#edf1e8;min-height:60px}.hc-mj-quadrant canvas{display:block;width:auto;height:auto;max-width:100%;max-height:30vh;object-fit:contain}.hc-mj-quadrant canvas[hidden]{display:none}.hc-mj-picker-modal{width:min(1100px,94vw);max-width:calc(100vw - 24px)}.hc-mj-picker-modal[open]{display:flex;flex-direction:column}.hc-mj-picker-modal .modal-body{min-height:0;overflow:auto}.hc-mj-picker-modal .modal-head,.hc-mj-picker-modal .modal-actions{flex-shrink:0}.hc-mj-choices strong{display:block;padding:9px;font-size:12px}.hc-mj-selected{display:block;width:100%;max-height:55vh;object-fit:contain;border-radius:10px}
.hc-image-options{padding:18px 20px;margin:18px 0;border:1px solid #dce5d8;border-radius:14px;background:#f7f9f4}.hc-image-options[hidden]{display:none}.hc-image-options header{display:flex;justify-content:space-between;gap:12px;font-size:13px;align-items:center;margin-bottom:16px}.hc-image-options header span{color:#547337;white-space:nowrap}.hc-image-options-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.hc-image-options label{font-size:12px;display:grid;gap:7px;color:#58705a}.hc-image-options select{width:100%;min-width:0;padding:9px;border:1px solid #d2decc;border-radius:8px;background:white;color:#28492f}.hc-image-options .hc-hint{margin:13px 0 0;line-height:1.6}@media(max-width:650px){.hc-image-options-grid{grid-template-columns:1fr 1fr}.hc-image-options{padding:15px}.hc-image-options header{align-items:flex-start;flex-wrap:wrap}}

/* Keep anchor targets below both navigation bars in the inspiration library. */
html:has(body[data-platform-ui=library]) { scroll-padding-top: calc(var(--jj-bar-height) + 96px); }
body[data-platform-ui=library] #main :is(.guide-chapter,#research-topics,#single-guides,#series-curriculum,#series-feature-title) { scroll-margin-top: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body[data-platform-ui] :is(a,button,.btn) { transition: none; }
}

/* Dashboard cards must also fit compact phones. */
body[data-platform-ui=admin] .g2 { grid-template-columns: repeat(auto-fit,minmax(min(320px,100%),1fr)); }

/* Contain tables and long payment URLs within the admin layout. */
body[data-platform-ui=admin] .split > * { min-width: 0; }
body[data-platform-ui=admin] .tbl { max-width: 100%; }
body[data-platform-ui=admin] .form { width: 100%; min-width: 0; grid-template-columns: minmax(0,1fr); overflow-wrap: anywhere; }
body[data-platform-ui=admin] .form > * { min-width: 0; }
body[data-platform-ui=admin] .form input:not([type=checkbox]):not([type=radio]) { width: 100%; max-width: 100%; }
@media (max-width:860px) { body[data-platform-ui=admin] .split { grid-template-columns: minmax(0,1fr); } }

/* Outcome-led creation routes and the Halloween film-night campaign. */
.jj-season{display:grid;grid-template-columns:1.35fr 1fr;min-height:490px;background:#171b1b;color:#ece9dc;border-radius:20px;overflow:hidden;margin:22px 0 30px;position:relative}.jj-season-copy{padding:55px 44px;z-index:1}.jj-season .jh-eyebrow{color:#e9a66c}.jj-season-kicker{font-size:13px;letter-spacing:2px;color:#c8b69a}.jj-season h1{font-size:clamp(30px,3.5vw,53px);line-height:1.3;letter-spacing:-1.5px;margin:22px 0}.jj-season h1 em{color:#efa66e;font-style:normal}.jj-season-copy>p{color:#c9c8bd;line-height:1.9}.jj-season-actions{display:flex;flex-wrap:wrap;gap:18px;align-items:center;margin:30px 0 20px}.jj-season .jh-primary{background:#efa66e;color:#211c16}.jj-season-secondary{color:#f4eee2;text-decoration:underline;text-underline-offset:6px}.jj-season small{color:#bab7a9;font-size:12px}.jj-season-art{position:relative;min-height:390px;overflow:hidden;background:radial-gradient(ellipse at 70% 75%,#6b3b23 0,transparent 62%),linear-gradient(130deg,#1b2220,#171817)}.jj-moon{position:absolute;width:132px;height:132px;border-radius:50%;background:#e6d9ae;right:55px;top:65px;box-shadow:0 0 80px #c7a36b25}.jj-moon:after{content:'';position:absolute;inset:-8px 26px 23px -12px;background:#1a201e;border-radius:50%}.jj-pumpkin{position:absolute;bottom:80px;left:26px;width:175px;height:145px;border-radius:48%;border:2px solid #d58a4d;background:repeating-linear-gradient(90deg,#9a4e28 0,#d0833e 29px,#9a4e28 58px);transform:rotate(-8deg);color:#ffe3a0;font-size:98px;text-align:center;box-shadow:0 25px 60px #0006}.jj-pumpkin:before{content:'';position:absolute;width:18px;height:35px;background:#69735b;top:-30px;left:80px;transform:rotate(20deg)}.jj-film-label{position:absolute;top:25px;left:25px;color:#c8b99e;font-size:11px;letter-spacing:3px}.jj-film-caption{position:absolute;right:25px;bottom:75px;font-size:25px;line-height:1.25;letter-spacing:2px;color:#e8cba6}.jj-film-perf{position:absolute;bottom:12px;left:15px;right:15px;font-size:28px;letter-spacing:15px;color:#c39b6555;white-space:nowrap}.jj-paths{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:30px 0}.jj-paths>article{background:#fffdf8;border:1px solid #dddcd2;padding:30px;border-radius:16px;min-width:0}.jj-paths>article:nth-child(2){background:#f0f4ef}.jj-paths h2{font-size:29px;margin:14px 0}.jj-paths p,.jj-value p,.jj-journey p{line-height:1.8;color:#65716a}.jj-paths ol{padding:0;list-style:none;counter-reset:route;display:flex;gap:10px;margin:26px 0}.jj-paths li{flex:1;font-size:13px;line-height:1.7;counter-increment:route}.jj-paths li:before{content:'0' counter(route);display:block;color:#9b764b;margin-bottom:7px;font-size:12px}.jj-paths footer{border-top:1px solid #dddcd2;padding-top:20px;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}.jj-paths footer>a{font-weight:700;color:#184c3a}.jj-paths small{color:#637067}.jj-holiday-brief{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:20px;padding:28px 0 45px}.jj-holiday-brief h2{font-size:23px;margin-top:14px}.jj-holiday-brief>a{border-left:2px solid #c9915b;padding:5px 0 5px 20px;line-height:1.7;font-weight:600}.jj-holiday-brief small{display:block;color:#738074;font-weight:400;margin:8px 0}.jj-holiday-brief b{font-size:13px;color:#89613b}.jj-value{padding:45px 0}.jj-value h2{font-size:28px;line-height:1.5}.jj-value>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px;margin-top:26px}.jj-value article{border-top:1px solid #cbd2c8;padding-top:22px}.jj-value b{font-size:12px;color:#8a734e}.jj-value h3{font-size:19px;margin:15px 0}.jj-value a,.jj-journey a{color:#245741}.jj-journey{max-width:1180px;margin:auto;padding:38px 28px 70px}.jj-journey>header{padding:35px 0}.jj-journey h1{font-size:clamp(29px,4vw,44px);line-height:1.4;margin:18px 0}.jj-journey-switch{display:flex;gap:12px;margin-top:23px}.jj-journey-switch a{padding:10px 18px;border:1px solid #cbd5cb;border-radius:30px}.jj-journey-switch [aria-current]{background:#193e30;color:white}.jj-journey-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:28px}.jj-brief,.jj-journey-aside>section{border:1px solid #d6dcd2;padding:24px;border-radius:14px;background:#fffdf8}.jj-brief label{display:block;color:#667166;margin:14px 0;font-size:13px}.jj-brief textarea{width:100%;box-sizing:border-box;resize:vertical;line-height:1.8;padding:15px;background:#f6f7f1;border:1px solid #ccd3c6;border-radius:9px;color:#253a30;font:inherit}.jj-brief>div{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px}.jj-brief button{padding:10px 15px;border:1px solid #bac8b8;border-radius:8px;background:#f0f4e9;cursor:pointer;color:#244b38}.jj-brief p{font-size:12px}.jj-journey-aside>section{margin-bottom:18px}.jj-journey-aside h2{font-size:18px}.jj-journey-aside p,.jj-journey-aside li{font-size:13px;line-height:1.9}.jj-journey-aside ul{padding-left:20px}.jj-journey-aside a{display:block;font-size:13px;line-height:1.8;margin-top:12px}.jj-journey-steps>article{display:flex;gap:20px;padding:30px 4px;border-bottom:1px solid #d5dcd2}.jj-step-number{font-size:17px;color:#a18758;padding-top:5px}.jj-journey-steps h2{font-size:22px;margin:0}.jj-journey-steps p{margin:12px 0}.jj-journey-steps a{font-weight:600}.jj-purchase-guide{padding:22px;background:#f0f4e9;border-radius:14px;margin:25px 0;line-height:1.9}.jj-purchase-guide h2{font-size:21px}.jj-paths-compact h2{font-size:23px}
@media(max-width:900px){.jj-season{grid-template-columns:1.3fr 1fr}.jj-season-copy{padding:35px 25px}.jj-pumpkin{left:10px;width:135px;height:120px;font-size:80px}.jj-film-caption{font-size:17px;bottom:35px}.jj-journey-layout{grid-template-columns:minmax(0,1fr) 260px}.jj-holiday-brief{grid-template-columns:1fr 1fr}.jj-holiday-brief>div{grid-column:1/-1}}
@media(max-width:600px){.jj-season{grid-template-columns:1fr}.jj-season-art{min-height:190px;grid-row:1}.jj-season-copy{padding:28px 22px}.jj-season h1{font-size:31px}.jj-moon{width:90px;height:90px;top:38px;right:32px}.jj-pumpkin{width:95px;height:77px;font-size:52px;bottom:23px;left:48px}.jj-pumpkin:before{left:40px;height:23px;top:-20px;width:12px}.jj-film-caption{bottom:28px;font-size:17px;right:25px}.jj-film-perf{font-size:16px;bottom:0}.jj-season-actions{gap:20px}.jj-paths,.jj-value>div,.jj-journey-layout,.jj-holiday-brief{grid-template-columns:1fr}.jj-paths>article{padding:23px}.jj-holiday-brief>div{grid-column:auto}.jj-paths li{font-size:12px}.jj-journey{padding:25px 18px 45px}.jj-journey>header{padding:25px 0}.jj-journey-aside{margin-top:5px}.jj-value h2{font-size:24px}.jj-brief{padding:19px}.jj-journey-steps>article{gap:14px}.jj-value{padding:25px 0}}
/* Keep campaign contrast above shared heading/button theme rules. */
body[data-platform-ui] .jj-season h1{color:#f3eddf!important}body[data-platform-ui] .jj-season .jh-primary{background:#efa66e!important;color:#251c14!important}.jj-quick-tools{border-top:1px solid #d2d9cd;padding:22px 0}.jj-quick-tools>summary{cursor:pointer;font-weight:600;color:#345641}
@media(max-width:600px){.jj-season h1{font-size:29px;letter-spacing:-1px}.jj-season-art .jj-pumpkin{left:25px;width:80px;height:70px;font-size:46px}.jj-season-art .jj-film-caption{font-size:14px;right:15px;bottom:30px}.jj-season-art .jj-pumpkin:before{left:35px}}
.jj-production-chain{margin:38px 0}.jj-production-chain>header{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:23px}.jj-production-chain h2{font-size:28px;line-height:1.5;margin:13px 0}.jj-production-chain header p,.jj-chain-note{color:#6b776d;line-height:1.8}.jj-production-chain header>a{white-space:nowrap;color:#315b43}.jj-module-chain{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.jj-module-chain article{position:relative;background:#fffdf8;border:1px solid #d5dcd0;border-radius:14px;padding:26px;min-width:0;display:flex;flex-direction:column}.jj-module-chain article:nth-child(2){background:#214338;color:#f3f3e6;border-color:#214338}.jj-module-chain article:nth-child(2) p,.jj-module-chain article:nth-child(2) small,.jj-module-chain article:nth-child(2) a{color:#e6ecda}.jj-module-chain article>span{color:#9b8657;font-size:12px;letter-spacing:2px}.jj-module-chain h3{font-size:27px;margin:24px 0 12px}.jj-module-chain p{font-size:15px;line-height:1.7}.jj-module-chain small{font-size:13px;color:#737d70;line-height:1.8;display:block;margin-bottom:24px;flex:1}.jj-module-chain article>a{font-weight:600;color:#28533d}.jj-module-chain footer{font-size:11px;border-top:1px solid #9aa78a55;padding-top:16px;margin-top:22px;line-height:1.8;color:#899279}.jj-chain-note{font-size:12px;margin-top:16px}.jj-remix-handoff{padding:24px;border:1px solid #d5dcd0;border-radius:14px;margin-bottom:28px;background:#f0f4e9}.jj-remix-handoff h2{font-size:21px;line-height:1.5}.jj-remix-handoff nav{display:flex;flex-wrap:wrap;gap:24px;margin-top:18px}
@media(max-width:750px){.jj-module-chain{grid-template-columns:1fr}.jj-production-chain>header{display:block}.jj-production-chain header>a{display:inline-block;margin-top:10px}.jj-production-chain h2{font-size:24px}.jj-module-chain article{padding:23px}.jj-module-chain h3{margin-top:17px}.jj-module-chain small{margin-bottom:18px}}
body[data-platform-ui] .jj-module-chain article:nth-child(2) h3{color:#f3f3e6!important}

/* Audio: the style prompt sits above a second box (lyrics), so it gets a visible title and frame. */
.hc .hc-text-label { display: block; margin: 0 0 8px; font-size: 13px; color: #52645b; }
.hc .hc-text-label[hidden] { display: none; }
.hc .hc-text-label small { margin-left: 4px; font-size: 12px; color: #8a938b; }
body[data-platform-ui=studio] .hc .hc-audio-mode #hc-text,
.jh-redesign .hc .hc-audio-mode #hc-text { padding: 12px 14px; border: 1px solid #dfe5df; border-radius: 12px; background: #fbfcfb; }
body[data-platform-ui=studio] .hc .hc-audio-mode #hc-text:focus,
.jh-redesign .hc .hc-audio-mode #hc-text:focus { border-color: #9fb3a6; }

/* Phones: English labels are longer; keep the account side of the bar inside the screen. */
@media (max-width: 480px) {
  body[data-platform-ui] .pbar-right { gap: 4px; }
  body[data-platform-ui] .pbar-right > a { padding: 6px 6px; }
  .pbar-lang { flex-shrink: 0; min-width: 52px; max-width: 58px; }
  /* Signed in, plans are also in the account menu ("订阅与充值"). */
  .pbar-right:has(.pbar-user) > a.pbar-subscription { display: none; }
}

/* the studio bar repeats the site bar's credits, name and 退出登录: show them once */
body[data-platform-ui] .topbar .dup-account { display: none !important; }

/* Top bar: buttons and the 团队制作 / 系统管理 links share one height, border and type size. */
body[data-platform-ui=studio] .topbar :is(.row, .row.wrap) { align-items: center; gap: 8px; flex-wrap: wrap; }
body[data-platform-ui=studio] .topbar :is(button, a.badge) { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 34px; min-height: 34px; padding: 0 12px; margin: 0; border: 1px solid var(--jj-line); border-radius: 8px; background: #fff; color: var(--jj-ink); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; box-sizing: border-box; }
body[data-platform-ui=studio] .topbar :is(button, a.badge):hover:not(:disabled) { background: var(--jj-soft); border-color: #c9d6c6; }
@media (max-width: 640px) { body[data-platform-ui=studio] .topbar :is(button, a.badge) { height: 32px; min-height: 32px; padding: 0 10px; } }

/* 剧本加工: pace switch + 动作细化 / 精简提速, with progress and before/after numbers */
.script-tools { border: 1px solid var(--jj-line, #dfe5e1); border-radius: 10px; background: #fafbf8; }
.script-tools .tool-row { padding: 12px 14px; }
.script-tools .tool-row + .tool-row { border-top: 1px solid var(--jj-line, #dfe5e1); }
.script-tools .tool-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.script-tools .tool-head p { margin: 4px 0 0; }
.script-tools .tool-head .badge { margin-left: 6px; vertical-align: 1px; }
.script-tools .tool-head > .row { gap: 8px; flex-wrap: wrap; }
.tool-progress { margin-top: 10px; }
.tool-progress p { margin: 6px 0 0; }
.tool-bar { height: 4px; border-radius: 4px; background: #e6ebe3; overflow: hidden; position: relative; }
.tool-bar i { position: absolute; inset: 0 auto 0 0; width: 35%; border-radius: 4px; background: var(--jj-green, #214f43); animation: tool-slide 1.6s ease-in-out infinite; }
@keyframes tool-slide { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .tool-bar i { animation: none; width: 100%; opacity: .45; } }
.tool-compare { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tool-stat { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--jj-line, #dfe5e1); font-size: 12px; }
.tool-stat small { color: var(--jj-muted, #74807d); }
.tool-stat b { font-weight: 650; }
.tool-stat em { font-style: normal; font-weight: 650; }
.tool-stat.down em { color: #2f7a4f; }
.tool-stat.up em { color: #a1661b; }
.script-diff { border: 1px solid var(--jj-line, #dfe5e1); border-radius: 8px; padding: 10px 12px; max-height: 60vh; overflow: auto; font-size: 13px; line-height: 1.8; background: #fff; }
.script-diff > p:first-child { margin: 0 0 6px; }
.script-diff .diff-line { margin: 0; padding: 2px 6px; border-radius: 4px; white-space: pre-wrap; word-break: break-all; }
.script-diff .diff-line.edit { background: #fbf8ec; }
.script-diff .diff-line.del { background: #fdf0ee; }
.script-diff .diff-line.add { background: #eef6ea; }
.script-diff del { color: #b4473f; text-decoration: line-through; background: #f9dcd8; }
.script-diff ins { color: #2f6a32; text-decoration: none; background: #d9efcf; }
.script-diff .diff-same { border: 0; padding: 2px 6px; margin: 2px 0; color: #8a948f; }
.script-diff .diff-same summary { font-size: 12px; font-weight: 400; color: #8a948f; }
.script-diff .diff-same p { margin: 0; white-space: pre-wrap; }
.notice.heavy-cuts { display: block; }
.notice.heavy-cuts > p { margin: 0 0 6px; }
.step-paces summary { font-weight: 500; }
.step-paces .step-pace-label { min-width: 4em; }

/* 案例项目（只读）：frontend/core/case_view.js、story/static、剪辑服务共用同一套样子 */
body.case-view, body.case-view * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.case-view select { -webkit-user-select: auto; user-select: auto; }
body.case-view img, body.case-view video { -webkit-user-drag: none; }
#case-watermark { position: fixed; inset: 0; z-index: 9999; pointer-events: none; background-repeat: repeat; }
.case-banner .case-steps { gap: 16px; margin-top: 6px; }
.case-banner p { margin: 4px 0 0; }
@media print { body.case-view * { visibility: hidden !important; } }
body.case-view .editorial-nav, body.case-view a[href*="/settings"], body.case-view .task-panel-actions { display: none !important; }
body.case-view [hidden] { display: none !important; }
body.case-view a[href="/studio/teams"], body.case-view #agent-dock, body.case-view a[href^="/static/edit-handoff.html"] { display: none !important; }
/* 案例统一配色（一键成片 / 一键剧本 / 剪辑三处同色）：琥珀橙 */
.project-card.case-card { border: 2px solid #f08c00 !important; background: linear-gradient(180deg, #fff4e0 0%, #fffaf2 100%) !important; box-shadow: 0 0 0 4px rgba(240, 140, 0, .12); }
.project-card.case-card .badge { background: #a85600 !important; color: #fff !important; border-color: #a85600 !important; font-weight: 700; }
.project-card.case-card .project-icon { background: #f08c00 !important; color: #fff !important; }
.notice.case-banner { background: #fff4e0 !important; border: 2px solid #f08c00 !important; color: #5c3600 !important; }
.notice.case-banner strong:first-child { background: #a85600; color: #fff; padding: 1px 8px; border-radius: 6px; }
.notice.case-banner .symbol { color: #f08c00; }

/* 分组导航按阶段区分颜色：未就绪 灰 · 等待上一组 紫 · 可以生成 蓝 · 生成中 琥珀 · 已生成 绿 · 失败 红 */
body[data-platform-ui=studio] .gindex-item { --gp: #b9b4a8; --gp-bg: #fffcf7; --gp-line: var(--jj-line); background: var(--gp-bg); border-color: var(--gp-line); }
body[data-platform-ui=studio] .gindex :is(.gindex-item,.gindex-legend span) i { background: var(--gp); }
body[data-platform-ui=studio] .gindex .p-idle { --gp: #b9b4a8; color: #8a877e; }
body[data-platform-ui=studio] .gindex .p-waiting { --gp: #8b6fc0; --gp-bg: #f4f0fb; --gp-line: #d6c9ee; color: #5e4a87; }
body[data-platform-ui=studio] .gindex .p-ready { --gp: #3f73a8; --gp-bg: #eef4fb; --gp-line: #bcd2ea; color: #2f5a86; }
body[data-platform-ui=studio] .gindex .p-running { --gp: #d39b2a; --gp-bg: #fdf5e4; --gp-line: #efd29a; color: #8a6014; }
body[data-platform-ui=studio] .gindex .p-done { --gp: #5f8a3a; --gp-bg: #eef5e6; --gp-line: #c5dbb0; color: #46682a; }
body[data-platform-ui=studio] .gindex .p-failed { --gp: #b42318; --gp-bg: #fdeeec; --gp-line: #f1c0ba; color: #9a1f15; }
body[data-platform-ui=studio] .gindex-item.p-running i { animation: gindex-pulse 1.2s ease-in-out infinite; }
@keyframes gindex-pulse { 50% { opacity: .3; } }
body[data-platform-ui=studio] .gindex-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-left: auto; font-size: 11px; }
body[data-platform-ui=studio] .gindex-legend span { display: inline-flex; align-items: center; gap: 5px; background: none; }
body[data-platform-ui=studio] .gindex-legend i { width: 7px; height: 7px; border-radius: 50%; }
@media (max-width:760px) { body[data-platform-ui=studio] .gindex-legend { margin-left: 0; width: 100%; } }
@media (prefers-reduced-motion: reduce) { body[data-platform-ui=studio] .gindex-item.p-running i { animation: none; } }
.hc-music-writer { border-style: solid; font-weight: 600; }
.hc-mw-schemes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; }
.hc-mw-schemes label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.hc-mw-field { display: block; margin: 10px 0 0; font-size: 13px; }
.hc-mw-field textarea { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
.hc-mw-list { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.hc-text-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
body[data-platform-ui=studio] .hc-text-tools button { min-height: 32px; padding: 6px 14px; border: 1px solid #e3e8df; border-radius: 18px; background: #f6f8f3; color: #5d6a60; font-size: 12px; cursor: pointer; }
body[data-platform-ui=studio] .hc-text-tools button[aria-pressed=true] { background: var(--jj-green); border-color: var(--jj-green); color: #fff; font-weight: 600; }
.hc-text-tools-more { margin-left: auto; font-size: 12px; color: #606a63; }
a.hc-music-writer { text-decoration: none; }

/* English labels are longer: the account page's own header (brand + plan badge + credits) wraps instead of pushing the page sideways. */
@media (max-width: 680px) {
  .portal-header { grid-template-columns: minmax(0, 1fr); }
  .portal-header .row { flex-wrap: wrap; min-width: 0; }
}
@media (max-width: 680px) {
  .row.wrap > button, .row.wrap > .btn, .row.wrap > a.btn { max-width: 100%; white-space: normal; }
}

/* Sign in with Google (login and register pages). */
.google-box { margin-top: 18px; }
.login-or { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: #7b857d; font-size: 13px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid #d9ddd4; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 12px 16px; border: 1px solid #cfd5c9; border-radius: 8px; background: #fff; color: #1f2a24; font-weight: 600; text-decoration: none; }
.google-btn:hover, .google-btn:focus-visible { border-color: #8da392; background: #f7f9f4; outline: none; }

/* ── Design pass (launch): first impression, sign-in, layout stability ───────────────────────── */
body[data-platform-ui] :is(h1, h2, h3) { text-wrap: balance; }

/* Home hero for visitors who are not signed in */
.jh-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: center; margin: 4px 0 30px; padding: 40px 44px; border-radius: 20px; background: #183b32; color: #eef3e7; }
.jh-hero .jh-eyebrow { color: #c8ea69; }
body[data-platform-ui] .jingji-home .jh-hero h1 { margin: 10px 0 14px; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.14; letter-spacing: -.01em; color: #fff; }
.jh-hero p { margin: 0 0 22px; max-width: 34em; font-size: 17px; line-height: 1.7; color: #d6e2d3; }
.jh-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.jh-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 10px; font-size: 16px; font-weight: 700; text-decoration: none; }
.jingji-home .jh-hero a.jh-cta.main { background: #c8ea69; color: #16302a; }
.jingji-home .jh-hero a.jh-cta.main:hover { background: #d8f28a; }
.jingji-home .jh-hero a.jh-cta.alt { border: 1px solid rgba(255, 255, 255, .4); color: #fff; background: transparent; }
.jingji-home .jh-hero a.jh-cta.alt:hover { background: rgba(255, 255, 255, .1); }
.jh-hero small { display: block; margin-top: 14px; font-size: 13px; line-height: 1.6; color: #b9c9b6; }
.jh-hero-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.jh-hero-steps li { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.jh-hero-steps b { font: 600 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #c8ea69; }
.jh-hero-steps strong { display: block; font-size: 17px; color: #fff; }
.jh-hero-steps span { display: block; margin-top: 3px; font-size: 14px; color: #c4d3c1; }
@media (max-width: 900px) { .jh-hero { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; gap: 22px; } }
@media (max-width: 720px) { .jh-cta { flex: 1 1 100%; } .jh-hero p { font-size: 16px; } }

/* Sign-in: registering is the clear second step; the administrator entry is a quiet link */
.login .login-switch p { margin: 18px 0 0; font-size: 15px; color: #3f4b45; }
.login .link-button { display: inline; width: auto; min-height: 0; padding: 0; border: 0; background: none; color: #1d6b4a; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none; }
.login .login-quiet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 22px 0 0; font-size: 13px; }
.login .login-quiet a, .login .login-quiet .link-button { display: inline; width: auto; padding: 0; color: #627068; font-weight: 500; font-size: 13px; text-align: left; }
.login-draft-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: #eef5e2; color: #2c4a1e; font-size: 14px; }

/* Readable small print: card meta was 9px; WCAG asks 4.5:1 and text people can actually read. */
.jh-redesign .jh-card-meta, .jh-redesign .jh-card-meta small { font-size: 11px; }
/* Carousel dots stay small to the eye but get a 24px target (WCAG 2.2 target size). */
.jh-redesign .jh-poster-dots { gap: 0; }
.jh-redesign .jh-poster-dots button { box-sizing: content-box; padding: 9px !important; background-clip: content-box !important; }

/* Project pages: the header is one compact row (title + state, then next step and episode on the right),
   so the work itself starts near the top instead of below a stack of banners. */
.stage-header { margin-bottom: 14px; align-items: center; }
.stage-header .subtitle { margin: 4px 0 0; }
.stage-header-actions { gap: 10px; align-items: center; }
body[data-platform-ui] a.btn.next-step-link { background: var(--jj-lime, #c8ea69); border-color: transparent; color: #16302a; font-weight: 700; }
body[data-platform-ui] a.btn.next-step-link:hover { filter: brightness(1.04); }
.metric.metric-failed { border-color: #e7b7ab; background: #fff6f3; }
.metric.metric-failed strong, .metric.metric-failed p { color: #a23a22; }
.metric strong.metric-text { font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
/* WCAG 2.2 target size: expanders and step links get at least 24px of height to hit */
body[data-platform-ui] summary { min-height: 24px; padding-block: 2px; box-sizing: border-box; }
body[data-platform-ui] :is(.breadcrumb, .case-steps) a { display: inline-block; padding-block: 3px; }

/* Project pages: counters are a compact row of chips ("04 生成包"), not a row of tall cards: the work stays near the top */
body[data-platform-ui] .main .content .metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
body[data-platform-ui] .main .content .metric { flex: 0 1 auto; padding: 7px 14px; min-height: 0; border-radius: 999px; box-shadow: none; }
body[data-platform-ui] .main .content .metric > div { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 8px; }
body[data-platform-ui] .main .content .metric strong { margin: 0; font-size: 18px; line-height: 1.2; }
body[data-platform-ui] .main .content .metric strong.metric-text { font-size: 15px; }
body[data-platform-ui] .main .content .metric p { margin: 0; font-size: 13px; color: var(--jj-muted); }
body[data-platform-ui] .main .content .metric > span { display: none; }  /* decorative glyphs */

/* Batch production: model and resolution share one line with their note */
body[data-platform-ui] .workflow-toolbar .model-choice-group { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: end; }
body[data-platform-ui] .workflow-toolbar .model-choice-group label { display: grid; gap: 4px; margin: 0; }
body[data-platform-ui] .workflow-toolbar .model-choice-group select { min-width: 0; max-width: 340px; }
body[data-platform-ui] .workflow-toolbar > div:has(.model-choice-group) { flex: 1 1 auto; min-width: 0; }
body[data-platform-ui] .workflow-toolbar:has(.model-choice-group) { align-items: end; padding-block: 14px; }
/* Subscription heading: room for the line instead of breaking a word in two */
body[data-platform-ui] .subscription-heading { max-width: 900px; }

/* Episode list (script page): a long episode title stays inside its button — one line, ellipsis, full title on hover */
.episode-result-list { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.episode-result-item { min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; white-space: normal; }
.episode-result-item strong { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.episode-confirmation .panel-body > .row.between > div:first-child { min-width: 0; flex: 1 1 280px; }
/* The sidebar brand: let its small English line give way instead of spilling 6px */
.brand.brand-link { min-width: 0; }
.brand.brand-link .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Asset card actions: one grid, three tiers — use it (details, voice), its image (regenerate / upload / library),
   and the rare destructive one set apart as a quiet text link. Equal widths so every card lines up the same. */
.asset-actions { display: grid; gap: 10px; margin-top: 4px; }
.asset-actions-main, .asset-actions-candidate { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.asset-actions-image { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--jj-line, #e3e8e2); }
.asset-actions-image > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.asset-actions-label { font-size: 12px; color: var(--jj-muted, #65736b); }
.asset-actions :is(button, .btn) { width: 100%; min-width: 0; justify-content: center; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-actions-foot { display: flex; justify-content: flex-end; }
body[data-platform-ui] .asset-actions-foot button.link-danger { width: auto; padding: 2px 0; border: 0; background: none; box-shadow: none; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Asset cards: the same shape whatever the text — description clamped to four lines (the full text is in 查看详情
   and on hover), long names on one line, and the actions pinned to the bottom so every card in a row lines up. */
.asset-card { display: flex; flex-direction: column; }
.asset-card .asset-actions { margin-top: auto; padding-top: 4px; }
.asset-card .asset-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; min-height: calc(4 * 1.7em); line-height: 1.7; }
.asset-card .row.between { min-width: 0; flex-wrap: nowrap; gap: 8px; }
.asset-card .asset-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card > p.meta { margin-block: 4px; font-size: 13px; }
.asset-card > p.asset-desc { margin-block: 8px 10px; }

/* Step 07 · 后期剪辑 (frontend/views/editing.js) */
.film-bar { height: 6px; border-radius: 3px; background: var(--jj-line, #e3e8e2); overflow: hidden; margin: 4px 0 8px; }
.film-bar i { display: block; height: 100%; background: var(--jj-green, #1d4a3c); }
video.editing-film { display: block; width: 100%; max-height: 62vh; border-radius: 10px; background: #111; }
body[data-platform-ui] .editing-help summary { padding: 14px 20px; font-weight: 650; cursor: pointer; }
.editing-help ol { margin: 0 0 8px; padding-left: 20px; line-height: 1.9; }
body[data-platform-ui] .notice.warning { border-color: #ecd3a8; background: #fff8ec; color: #6b4a12; }
