/* 一镜 — design system (D-33).
   Direction: a creative tool, not a SaaS dashboard (after 即梦 / 剪映): dark cinematic canvas, the creation box is the home page,
   videos are shown by their covers, surfaces are separated by tone rather than boxes, and the brand blue→violet of the
   一镜 logo is used sparingly (send button, selection ring, current step). Every colour is a token; class names are global —
   grep before adding one. */

:root, [data-theme="dark"] {
  --bg: #121212; --sidebar: #171717; --surface: #1a1a1a; --surface-2: #202020; --surface-3: #292929; --overlay: #1e1e1e;
  --line: rgba(255, 255, 255, .06); --qr-paper: #fff; --line-2: rgba(255, 255, 255, .11);
  --text: #ededed; --text-2: #c8c8c8; --muted: #8c8c8c; --faint: #5e5e5e;
  --accent: #5b93ff; --accent-hover: #7aa8ff; --accent-soft: rgba(91, 147, 255, .14); --accent-line: rgba(91, 147, 255, .5);
  --primary: #3d7bff; --primary-hover: #5a8fff; --on-accent: #fff;
  --amber: #f5a524; --amber-soft: rgba(245, 165, 36, .13); --amber-line: rgba(245, 165, 36, .35);
  --blue: #6f9bff; --blue-soft: rgba(111, 155, 255, .13);
  --green: #3ccf7e; --green-soft: rgba(60, 207, 126, .12); --green-line: rgba(60, 207, 126, .35);
  --red: #ff6b6b; --red-soft: rgba(255, 107, 107, .12); --red-line: rgba(255, 107, 107, .38);
  --stage: #000;
  --glow-1: rgba(40, 90, 210, .30); --glow-2: rgba(140, 90, 255, .14);
  --composer: linear-gradient(100deg, rgba(28, 34, 50, .94), rgba(34, 37, 54, .94));
  --switch-on: linear-gradient(90deg, #ffe4d6 0%, #eceeff 48%, #c8dbff 100%);
  --shadow: none;
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  --card-rim: rgba(255, 255, 255, .8); --card-shadow: 0 4px 12px rgba(0, 0, 0, .35);   /* the creation box's material stack */
  --backdrop: rgba(0, 0, 0, .6);
  /* text covers of works without a cover yet (dashboard.js TextCover) */
  --poster-1: linear-gradient(155deg, #1c2a55 0%, #2f2766 100%); --poster-2: linear-gradient(155deg, #123544 0%, #1d4f4a 100%);
  --poster-3: linear-gradient(155deg, #3a1f30 0%, #55283a 100%); --poster-4: linear-gradient(155deg, #3a2a17 0%, #4f3a1f 100%);
  --poster-text: #f4f5fa; --poster-sub: rgba(244, 245, 250, .66); --poster-glow: rgba(255, 255, 255, .10);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f6f8; --sidebar: #eceef1; --surface: #ffffff; --surface-2: #f2f3f6; --surface-3: #e7e9ed; --overlay: #ffffff;
  --line: rgba(15, 20, 30, .08); --qr-paper: #fff; --line-2: rgba(15, 20, 30, .14);
  --text: #15171c; --text-2: #454a55; --muted: #7a7f8a; --faint: #a7abb4;
  --accent: #2f6bff; --accent-hover: #1f58e6; --accent-soft: rgba(47, 107, 255, .1); --accent-line: rgba(47, 107, 255, .45);
  --primary: #2f6bff; --primary-hover: #1f58e6; --on-accent: #fff;
  --amber: #c26a05; --amber-soft: #fdf3e3; --amber-line: #f3d7a8;
  --blue: #2563eb; --blue-soft: #ebf2fe;
  --green: #15803d; --green-soft: #e9f6ee; --green-line: #b9e2c6;
  --red: #d42f2f; --red-soft: #fdeeee; --red-line: #f3c4c4;
  --stage: #0d0e11;
  --glow-1: rgba(47, 107, 255, .12); --glow-2: rgba(150, 100, 255, .08);
  --composer: linear-gradient(100deg, #ffffff, #f7f8ff);
  --switch-on: linear-gradient(90deg, #ffe4d6 0%, #eceeff 48%, #c8dbff 100%);
  --shadow: 0 1px 2px rgba(15, 20, 30, .05);
  --shadow-lg: 0 16px 44px rgba(15, 20, 30, .16), 0 0 0 1px rgba(15, 20, 30, .06);
  --card-rim: #fff; --card-shadow: 0 3px 10px rgba(15, 20, 30, .15);
  --backdrop: rgba(15, 20, 30, .35);
  --poster-1: linear-gradient(155deg, #e6edff 0%, #efe6ff 100%); --poster-2: linear-gradient(155deg, #dff3ef 0%, #e6f0ff 100%);
  --poster-3: linear-gradient(155deg, #ffe8ee 0%, #fff0e2 100%); --poster-4: linear-gradient(155deg, #f1efe6 0%, #e9ecf3 100%);
  --poster-text: #1b1e27; --poster-sub: rgba(27, 30, 39, .6); --poster-glow: rgba(255, 255, 255, .7);
  color-scheme: light;
}

:root {
  --brand: linear-gradient(110deg, #2a6dff 0%, #7a5cff 62%, #c495ff 100%);
  --radius: 10px; --radius-lg: 16px;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1 { font-size: 24px; line-height: 1.3; margin: 0; font-weight: 600; }
h2 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 13px; margin: 18px 0 8px; font-weight: 600; color: var(--text-2); }
p { margin: 6px 0; }
b { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.green-text { color: var(--green); font-weight: 600; }
.warn-text { color: var(--amber); font-weight: 600; }
.boot { padding: 80px; text-align: center; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.icon { flex-shrink: 0; display: inline-block; vertical-align: -3px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
::-webkit-scrollbar-track { background: transparent; }

.kbd { display: inline-flex; align-items: center; font: 500 10.5px/1 "Segoe UI", system-ui, sans-serif; padding: 3px 5px; border-radius: 5px;
  background: var(--surface-3); color: var(--muted); }

/* ------------------------------------------------------------------ shell (sidebar measured from 即梦: 188 px, 13 px items, #292929 active) */
.shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); height: 100vh; }
.sidebar { background: var(--sidebar); display: flex; flex-direction: column; padding: 14px 10px 10px; overflow-y: auto; min-height: 0; }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 18px 6px; }
.brand { display: flex; align-items: center; color: var(--text); }
.brand:hover { color: var(--text); }
.logo { display: inline-flex; align-items: center; gap: 7px; }
.logo-mark { display: block; flex-shrink: 0; width: auto; }
.wordmark { display: block; width: auto; overflow: visible; }
.collapse-btn { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.collapse-btn:hover { background: var(--surface-3); color: var(--text); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; min-width: 0; }
.nav a .icon { color: var(--text-2); }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--surface-3); color: var(--text); font-weight: 500; }
.nav a.on .icon { color: var(--text); }
.nav a > span:not(.nav-count):not(.mini-thumb) { flex: 1; }
.nav-count { margin-left: auto; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 99px; background: var(--amber); color: #1a1205;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.nav-divider { height: 1px; background: var(--line); margin: 10px 10px 4px; }
.nav-section { font-size: 12px; color: var(--muted); padding: 12px 10px 6px; }
.nav.recent a { height: 30px; font-size: 12.5px; gap: 9px; }
.mini-thumb { position: relative; width: 18px; height: 18px; border-radius: 4px; background: var(--surface-3); flex-shrink: 0; display: grid;
  place-items: center; color: var(--muted); }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.mini-thumb .sdot { position: absolute; right: -3px; bottom: -3px; width: 7px; height: 7px; box-shadow: 0 0 0 2px var(--sidebar); }
.nav-more { font-size: 12px; color: var(--faint); padding: 6px 10px; }
/* recent videos: pin mark + 「⋯」 menu (D-62) */
.nav.recent .recent-row { position: relative; }
.nav.recent .recent-row > .ellipsis { flex: 1; }
.nav.recent .recent-row > .recent-pin { flex: 0 0 auto; display: grid; color: var(--faint); }
.recent-more { flex: 0 0 auto; display: none; place-items: center; width: 22px; height: 22px; margin-right: -4px; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer; padding: 0; }
.recent-more:hover { background: var(--surface-3); color: var(--text); }
.recent-row:hover .recent-more, .recent-row.menu-open .recent-more, .recent-more:focus-visible { display: grid; }
.recent-row:hover .recent-pin, .recent-row.menu-open .recent-pin { display: none !important; }
.recent-row.menu-open { background: var(--surface-2); color: var(--text); }
div.recent-row.renaming { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; }
.recent-rename { flex: 1; min-width: 0; height: 24px; padding: 0 6px; font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface);
  border: 1px solid var(--accent); border-radius: 6px; outline: none; }
.recent-menu { position: fixed; z-index: 90; min-width: 168px; background: var(--overlay); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 5px; animation: rise .12s ease; }
.recent-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; }
.recent-menu-item:hover { background: var(--surface-3); color: var(--text); }
.recent-menu-item .icon { color: var(--muted); }
.recent-menu-item.danger, .recent-menu-item.danger .icon { color: var(--red); }
.recent-menu-item.danger:hover { background: var(--red-soft); }
.nav-more:hover { color: var(--text-2); }
.sidebar-foot { margin-top: auto; padding-top: 12px; display: grid; gap: 6px; }
.sys-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 2px 10px; }
.sys-line.red { color: var(--red); }
.foot-row { display: flex; gap: 6px; }
.foot-btn { display: flex; align-items: center; gap: 8px; flex: 1; height: 30px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--surface-2);
  color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.foot-btn span { flex: 1; text-align: left; }
.foot-btn:hover { color: var(--text); background: var(--surface-3); }
.foot-btn.icon-only { flex: none; width: 30px; justify-content: center; padding: 0; }
/* collapsed sidebar (the button next to the logo) */
.shell.collapsed { grid-template-columns: 60px minmax(0, 1fr); }
.shell.collapsed .brand-row { flex-direction: column; gap: 8px; padding: 2px 0 14px; }
.shell.collapsed .brand .wordmark, .shell.collapsed .nav a > span:not(.mini-thumb):not(.nav-count), .shell.collapsed .nav-section,
.shell.collapsed .nav.recent, .shell.collapsed .nav-more, .shell.collapsed .sys-line, .shell.collapsed .foot-btn span, .shell.collapsed .foot-btn .kbd { display: none; }
.shell.collapsed .nav a { justify-content: center; padding: 0; position: relative; }
.shell.collapsed .nav-count { position: absolute; right: 2px; top: 1px; }
.shell.collapsed .foot-row { flex-direction: column; }
.shell.collapsed .foot-btn { justify-content: center; flex: none; padding: 0; }

.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; display: inline-block; }
.sdot.amber { background: var(--amber); }
.sdot.blue { background: var(--blue); }
.sdot.green { background: var(--green); }
.sdot.red { background: var(--red); }
.sdot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.main { overflow-y: auto; height: 100vh; min-width: 0; position: relative; }
.main.page-project { overflow: hidden; }
.page { max-width: 1120px; margin: 0 auto; padding: 36px 44px 96px; }
.page.wide { max-width: 1400px; }
.page.narrow { max-width: 820px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.sub { color: var(--muted); margin: 6px 0 0; }
.lead { font-size: 15px; color: var(--text-2); }

/* ------------------------------------------------------------------ buttons, badges, primitives */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: background .12s, border-color .12s, filter .12s; }
.btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn.danger { background: var(--red); border-color: transparent; color: #fff; font-weight: 600; }
.btn.danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn.lg { height: 42px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 5px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.x { background: none; border: 0; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; }
.x:hover { background: var(--surface-3); color: var(--text); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 18px; padding: 0 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap; font-weight: 600; vertical-align: 1px; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.orange { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.gray { background: var(--surface-3); color: var(--muted); }

.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .75s linear infinite; vertical-align: -2px; opacity: .85; flex-shrink: 0; }
.spin.big { width: 20px; height: 20px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--muted); }

.bar { height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; flex: 1; min-width: 40px; }
.bar > div { height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s ease; }
.bar.green > div { background: var(--green); }
.bar.orange > div { background: var(--amber); }
.indeterminate { height: 3px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.indeterminate span { position: absolute; top: 0; bottom: 0; left: 0; width: 35%; border-radius: 99px; background: var(--brand); animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { from { left: -35%; } to { left: 100%; } }

.status-icon { display: inline-grid; place-items: center; color: var(--faint); }
.status-icon.ok { color: var(--green); }
.status-icon.bad { color: var(--red); }
.status-icon.warn { color: var(--amber); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel.error { border-color: var(--red-line); }
.panel-title { font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.card-head { display: flex; gap: 14px; align-items: flex-start; }
.card-head h2 { margin: 2px 0 2px; }
.card-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.card-icon.amber { background: var(--amber-soft); color: var(--amber); }
.card-icon.red { background: var(--red-soft); color: var(--red); }

.notice { padding: 10px 14px; border-radius: 10px; background: var(--blue-soft); color: var(--text-2); margin: 10px 0; border: 1px solid transparent; font-size: 13.5px; }
.notice.warn { background: var(--amber-soft); border-color: var(--amber-line); color: var(--text); }
.notice.error { background: var(--red-soft); border-color: var(--red-line); color: var(--text); white-space: pre-wrap; }
.notice.ok { background: var(--green-soft); border-color: var(--green-line); color: var(--text); }
.code { font-size: 22px; letter-spacing: 3px; font-family: Consolas, monospace; }

.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
/* the bottom action bar of each review step */
.actions.sticky { position: sticky; bottom: 16px; z-index: 5; justify-content: flex-end; margin: 24px -10px -8px; padding: 10px 12px;
  background: var(--overlay); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); }
.actions.sticky .reject-box { margin-right: auto; }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty-title { font-size: 16px; color: var(--text); font-weight: 600; margin: 12px 0 4px; }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-label { font-weight: 500; font-size: 13px; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), textarea, select {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); width: 100%; color: var(--text);
  transition: border-color .12s, box-shadow .12s, background .12s; }
textarea { resize: vertical; line-height: 1.65; }
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover { border-color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, textarea:disabled { opacity: .6; }
::placeholder { color: var(--faint); }
.small-input { margin-top: 6px; font-size: 12.5px !important; padding: 5px 10px !important; }
.check { display: flex; gap: 9px; align-items: center; cursor: pointer; margin: 12px 0; }
.check input, .opt input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--surface-2); font: inherit; font-size: 13px; color: var(--text-2); }
.chip.toggle { cursor: pointer; }
.chip.toggle:hover:not(:disabled) { background: var(--surface-3); }
.chip.toggle.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.file { height: 26px; font-size: 12px; padding: 0 4px 0 10px; }
.pdot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; width: min(560px, 100%); }
fieldset.group { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 2px; margin: 0 0 16px; }
fieldset.group legend { font-weight: 600; padding: 0 6px; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; transition: .18s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }

.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 20px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; transition: .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop.big { padding: 36px; margin-top: 18px; }
.drop-title { font-size: 15px; color: var(--text); font-weight: 600; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------------ popover menu */
.pop { position: relative; display: inline-flex; }
.pop-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; min-width: 240px; background: var(--overlay); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: rise .12s ease; }
.pop-menu.right { left: auto; right: 0; }
.menu-title { font-size: 12px; color: var(--faint); padding: 6px 10px 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; text-align: left;
  font: inherit; color: var(--text-2); cursor: pointer; }
.menu-item:hover { background: var(--surface-3); color: var(--text); }
.menu-item > span:not(.menu-icon):not(.pdot) { flex: 1; display: grid; }
.menu-item b { font-weight: 500; color: var(--text); }
.menu-item small { font-size: 12px; color: var(--muted); }
.menu-item > .icon:last-child { color: var(--accent); }
.menu-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.menu-item.on .menu-icon { background: var(--accent-soft); color: var(--accent); }

.duration-menu { width: 320px; }
.menu-custom { display: flex; align-items: center; gap: 6px; padding: 8px 10px 6px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.menu-custom span { white-space: nowrap; }
.menu-custom input { width: 84px !important; height: 30px; padding: 4px 8px !important; }
.menu-custom select { width: 74px; height: 30px; padding: 4px 6px; }
.menu-note { font-size: 12px; color: var(--muted); padding: 4px 10px 6px; line-height: 1.5; }
.menu-note.warn { color: var(--amber); }

/* ------------------------------------------------------------------ modal, palette, toasts */
.modal-back { position: fixed; inset: 0; background: var(--backdrop); display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade .12s ease; backdrop-filter: blur(4px); }
.modal { background: var(--overlay); border: 1px solid var(--line-2); border-radius: 18px; width: min(540px, 100%); max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: rise .16s ease; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 4px; }
.modal-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.modal-body { padding: 12px 22px 20px; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 20px; }
.confirm-list { padding-left: 18px; }
.confirm-list li { margin: 6px 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.985); } }

.palette-back { place-items: start center; padding-top: 14vh; }
.palette { width: min(600px, 100%); background: var(--overlay); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .14s ease; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 4px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-input input { border: 0 !important; box-shadow: none !important; padding: 14px 0 !important; font-size: 15px !important; background: transparent !important; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 9px;
  font: inherit; color: var(--text-2); cursor: pointer; text-align: left; }
.palette-item.on { background: var(--surface-3); color: var(--text); }
.palette-item .icon { color: var(--muted); }
.palette-hint { margin-left: auto; font-size: 12px; color: var(--faint); flex-shrink: 0; }
.palette-empty { padding: 24px; text-align: center; color: var(--muted); }

.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--overlay); color: var(--text); border: 1px solid var(--line-2);
  padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 400px; font-size: 13.5px; animation: rise .16s ease; }
.toast .icon { margin-top: 2px; color: var(--accent); }
.toast.ok .icon { color: var(--green); }
.toast.error { border-color: var(--red-line); }
.toast.error .icon { color: var(--red); }

/* ------------------------------------------------------------------ 创作 (home) + 作品 — measured from 即梦's home page */
.jm { position: relative; max-width: 1800px; margin: 0 auto; padding: 0 clamp(24px, 6.2%, 120px) 80px; }
.jm-glow { position: absolute; left: 50%; top: 0; width: min(1400px, 100%); height: 380px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(60% 75% at 50% 0%, var(--glow-1), transparent 70%), radial-gradient(35% 55% at 68% 8%, var(--glow-2), transparent 70%); }
.jm-glow::after { content: ""; position: absolute; inset: 0; opacity: .35;   /* the faint dot grid behind the greeting */
  background-image: radial-gradient(rgba(255, 255, 255, .22) .6px, transparent .8px); background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(45% 70% at 50% 25%, #000 20%, transparent 75%); mask-image: radial-gradient(45% 70% at 50% 25%, #000 20%, transparent 75%); }
.jm-top { position: absolute; top: 16px; right: 22px; z-index: 4; display: flex; align-items: center; gap: 8px; }
.jm-top-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line-2); white-space: nowrap; }
.jm-top-btn:hover { color: var(--text); background: var(--surface-2); }
.jm-top-btn.primary { background: var(--primary); border-color: transparent; color: #fff; }
.jm-top-icon { position: relative; width: 26px; height: 26px; display: grid; place-items: center; color: var(--text-2); border-radius: 6px; }
.jm-top-icon:hover { background: var(--surface-2); color: var(--text); }
.jm-badge { position: absolute; top: -3px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: #ff4d4f; color: #fff;
  font-size: 10px; font-weight: 600; display: grid; place-items: center; }
.jm-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--muted);
  box-shadow: 0 0 0 1px var(--line-2); }
.jm-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }

.jm-hero { position: relative; z-index: 3; display: grid; justify-items: center; padding-top: 52px; }
.jm-hero h1 { font-size: 24px; font-weight: 500; letter-spacing: .02em; line-height: 34px; }
.jm-switch { display: grid; grid-template-columns: 1fr 1fr; width: 248px; height: 30px; margin-top: 20px; border-radius: 15px; background: var(--surface-3); }
.jm-switch button { border: 0; background: none; border-radius: 15px; font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.jm-switch button:hover { color: var(--text); }
.jm-switch button.on { background: var(--switch-on); color: #1d1d1f; font-weight: 500; }

.jm-composer-wrap { width: min(936px, 100%); margin-top: 26px; display: grid; gap: 10px; }
.jm-composer { min-height: 124px; border-radius: 16px; background: var(--composer); border: 1px solid var(--line); padding: 16px 16px 12px;
  backdrop-filter: blur(12px); transition: border-color .15s, box-shadow .15s; }
.jm-composer:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.jm-composer.over { border-color: var(--accent); border-style: dashed; }
.jm-composer-main { display: flex; gap: 14px; align-items: flex-start; }
.jm-attach { width: 40px; height: 52px; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; color: rgba(255, 255, 255, .75);
  cursor: pointer; flex-shrink: 0; transform: rotate(-6deg); transition: transform .15s, background .15s; }
[data-theme="light"] .jm-attach { background: #e4e6ec; color: #6b7280; }
.jm-attach:hover { transform: rotate(0); background: rgba(255, 255, 255, .24); }
.jm-composer-text { flex: 1; min-width: 0; display: grid; gap: 8px; }
.jm-composer textarea { border: 0 !important; box-shadow: none !important; background: transparent !important; resize: none; font-size: 13px;
  line-height: 1.7; padding: 2px 0 !important; min-height: 46px; }
/* materials (mentions.js): the「+」card stack, and「@图片1」references painted by a mirror behind the textarea.
   The mirror and the textarea must lay text out identically: same font, size, line height, padding, wrapping. */
.jm-input { position: relative; }
.jm-input-mirror, .jm-composer .jm-input textarea { font: inherit; font-size: 13px; line-height: 1.7; letter-spacing: normal; word-spacing: normal; }
.jm-input-mirror { position: absolute; inset: 0; padding: 2px 0; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word;
  color: var(--text); pointer-events: none; }
.jm-composer .jm-input textarea { position: relative; display: block; color: transparent; caret-color: var(--text); overflow-y: auto;
  white-space: pre-wrap; overflow-wrap: break-word; }
.jm-composer .jm-input textarea::selection { background: var(--accent-line); color: transparent; }
.jm-ref { background: var(--accent-soft); color: var(--accent); border-radius: 4px; box-shadow: 0 0 0 2px var(--accent-soft); }
.jm-mention { position: absolute; z-index: 60; width: 280px; max-height: 320px; overflow: auto; background: var(--overlay);
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: rise .12s ease; }
.jm-mention .menu-item.on { background: var(--surface-3); color: var(--text); }
.jm-mention .menu-item small, .jm-mat-list .menu-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jm-mat-thumb { width: 34px; height: 34px; border-radius: 7px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; flex-shrink: 0; }
.jm-mat-thumb img, .jm-mat-thumb video, .jm-stack-card img, .jm-stack-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.jm-mat-ico { display: grid; place-items: center; gap: 1px; color: var(--text-2); }
.jm-mat-ico small { font-size: 10px; line-height: 1; color: var(--muted); }
.jm-mat-ico.audio { color: var(--accent); }
.jm-stack-box { position: relative; width: 54px; height: 62px; flex-shrink: 0; }
.jm-stack { position: relative; width: 54px; height: 62px; padding: 0; border: 0; background: none; cursor: pointer; }
.jm-stack-card { position: absolute; left: 3px; top: 2px; width: 44px; height: 56px; border-radius: 7px; overflow: hidden; display: grid; place-items: center;
  background: var(--surface-3); border: 1.5px solid var(--card-rim); box-shadow: var(--card-shadow); transition: transform .15s; }
.jm-stack-card.c0 { transform: rotate(-6deg); z-index: 3; }
.jm-stack-card.c1 { transform: rotate(3deg) translateX(4px); z-index: 2; }
.jm-stack-card.c2 { transform: rotate(10deg) translateX(8px); z-index: 1; }
.jm-stack:hover .jm-stack-card.c0, .jm-stack.on .jm-stack-card.c0 { transform: rotate(-9deg) translateX(-2px); }
.jm-stack:hover .jm-stack-card.c2, .jm-stack.on .jm-stack-card.c2 { transform: rotate(14deg) translateX(11px); }
.jm-stack-n { position: absolute; top: -5px; left: -4px; z-index: 4; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--text); color: var(--bg); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.jm-stack-add { position: absolute; right: -4px; bottom: -6px; z-index: 5; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--overlay); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; box-shadow: var(--card-shadow); }
.jm-stack-add:hover { background: var(--surface-3); }
.jm-stack-pop .pop-menu { min-width: 300px; max-width: 360px; }
.jm-mat-row { cursor: pointer; }
.jm-mat-row > span:not(.jm-mat-thumb) { min-width: 0; }
.jm-tool.jm-mic { width: 28px; padding: 0; justify-content: center; }
.jm-bar { display: flex; align-items: center; gap: 2px; margin-top: 14px; flex-wrap: wrap; }
.jm-tool { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border-radius: 6px; border: 0; background: none;
  color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; max-width: 240px; white-space: nowrap; }
.jm-tool:hover, .jm-tool.on { background: rgba(255, 255, 255, .07); color: var(--text); }
.jm-tool.accent, .jm-tool.accent .icon { color: var(--accent); }
.jm-tool.plain { color: var(--text); }
.jm-tool.rec, .jm-tool.rec .icon { color: var(--red); background: var(--red-soft); }
.jm-tool.jm-oneclick.on, .jm-tool.jm-oneclick.on .icon { color: var(--accent); background: var(--accent-soft); }
.jm-bar-spacer { flex: 1; }
.jm-send { width: 28px; height: 28px; margin-left: 8px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: filter .12s, transform .12s; }
.jm-send:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.jm-send:disabled { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .45); cursor: not-allowed; }
[data-theme="light"] .jm-send:disabled { background: #e4e6ec; color: #9ca3af; }

/* "我来拍摄": where the teleprompter comes in */
.jm-flow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none; margin: 2px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.jm-flow li { display: inline-flex; align-items: center; gap: 6px; }
.jm-flow li + li::before { content: "›"; color: var(--faint); margin-right: 12px; }
.jm-flow i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; font-size: 10.5px; }
.jm-flow li:nth-child(4) { color: var(--text); }
.jm-flow li:nth-child(4) i { background: var(--brand); color: #fff; }
.jm-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; max-width: 980px; }
.jm-skill { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.jm-skill:hover { color: var(--text); background: var(--surface-2); }
.jm-skill.more { gap: 2px; padding-right: 10px; }
.jm-tag { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 10px; line-height: 15px; padding: 0 4px; border-radius: 3px;
  margin-left: 6px; font-weight: 500; white-space: nowrap; }
.jm-tag.new { color: #4f9dff; background: rgba(79, 157, 255, .15); }
.jm-tag.hot { color: #ff8a3d; background: rgba(255, 138, 61, .15); }
.jm-tag.todo { color: var(--amber); background: var(--amber-soft); }
.jm-tag.on-media { position: absolute; left: 8px; top: 8px; margin: 0; padding: 1px 6px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.jm-tag.on-media.todo { color: #ffc35c; }
.jm-tag.on-media.new { color: #9dc2ff; }
.jm-tag .spin { width: 9px; height: 9px; border-width: 1.5px; }

/* banner (306 x 172) + two rows of 82 px tiles */
.jm-features { position: relative; z-index: 1; display: grid; grid-template-columns: 306px minmax(0, 1fr); gap: 18px; margin-top: 36px; }
.jm-banner { position: relative; height: 172px; border-radius: 12px; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: #000; text-align: left; font: inherit; }
.jm-banner-art { position: absolute; inset: 0; background: radial-gradient(80% 90% at 70% 30%, #1c2a5c, #0b0d18); }
.jm-banner-art.a3 { background: radial-gradient(80% 90% at 70% 30%, #3b2468, #0d0b18); }
/* a portrait photo (9:16) on the right: head and shoulders, fading into the background on its left edge */
.jm-banner-person { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; height: 100%; object-fit: cover; object-position: center 22%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%); transition: transform .5s ease; }
.jm-banner:hover .jm-banner-person { transform: scale(1.03); }
/* three finished-video samples, fanned on the right */
.jm-banner-shots { position: absolute; right: 18px; top: 0; bottom: 0; width: 42%; max-width: 210px; display: flex; align-items: center; justify-content: center; }
.jm-banner-shots img { width: 40%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 7px; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); transition: transform .5s ease; }
.jm-banner-shots img:nth-child(1) { transform: rotate(-8deg) translateX(18%); }
.jm-banner-shots img:nth-child(2) { width: 46%; position: relative; z-index: 1; }
.jm-banner-shots img:nth-child(3) { transform: rotate(8deg) translateX(-18%); }
.jm-banner:hover .jm-banner-shots img:nth-child(2) { transform: translateY(-4px); }
.jm-banner-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .78)); }
.jm-banner-text { position: absolute; left: 16px; bottom: 14px; display: grid; color: #fff; }
.jm-banner-text b { font-size: 19px; line-height: 26px; font-weight: 700; letter-spacing: .02em; }
.jm-banner-text span { font-size: 11.5px; color: rgba(255, 255, 255, .75); margin-top: 4px; }
.jm-dots { position: absolute; right: 14px; bottom: 16px; display: flex; gap: 4px; }
.jm-dots i { width: 5px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .45); transition: width .2s; }
.jm-dots i.on { width: 12px; background: #fff; }
/* 已经拍好的视频 (D-50) */
.topic-span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); margin-bottom: 4px; }
/* 今日热点 (D-54) */
.hotp { margin: 18px 0 8px; padding: 14px 16px; border-radius: 12px; background: var(--surface); }
.hotp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hotp-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.hotp-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.hotp-tabs button { border: 0; background: none; color: var(--muted); padding: 4px 10px; border-radius: 999px; font: inherit; font-size: 12.5px; cursor: pointer; }
.hotp-tabs button.on { background: var(--surface-3); color: var(--text); }
.hotp-spacer { flex: 1; }
.hotp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px 18px; }
.hotp-list li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.hotp-list.rich { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
.hotp-cover { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--surface-3); }
.hotp-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
a.hotp-title { color: var(--text); text-decoration: none; }
a.hotp-title:hover { color: var(--accent); }
.hotp-sum { font-size: 12px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hotp-from { margin-right: 4px; padding: 0 4px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 11px; }
.hotp-rank { width: 18px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.hotp-rank.top { color: var(--amber); font-weight: 700; }
.hotp-title { min-width: 0; }
.hotp-heat { flex-shrink: 0; }
.hotp-form { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 12px 0; }
.hotp-form label:not(.check) { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
/* 定时发布 (D-54) */
.when-pick { display: flex; gap: 18px; margin: 12px 0 6px; }
.when-at { display: grid; gap: 8px; margin: 0 0 12px; }
.when-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.when-at input[type="datetime-local"] { width: 220px; }
/* 扫码登录 in the page (D-52) */
.qr-box { display: grid; place-items: center; width: 240px; height: 240px; margin: 4px auto 14px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.qr-box.ready { background: var(--qr-paper); }   /* QR codes scan best dark-on-white, in both themes */
.qr-box img { width: 220px; height: 220px; object-fit: contain; }
.qr-box .muted { text-align: center; padding: 0 12px; }
.qr-ended { display: grid; gap: 12px; justify-items: start; }
.jm-shot { display: grid; gap: 10px; margin: 10px auto 0; max-width: 820px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.jm-shot-empty { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); border-style: dashed; }
.jm-shot-empty:hover { color: var(--text); border-color: var(--accent-line); }
.jm-shot-empty b { color: var(--text); margin-right: 6px; }
.jm-shot-file { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jm-shot-file b { min-width: 0; flex: 0 1 auto; }
.jm-shot-file .x { margin-left: auto; }
.jm-shot-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.jm-shot-kind { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.jm-shot-kind small { color: var(--muted); font-size: 11.5px; }
.jm-shot-kind.on { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-line); }
.jm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 82px; gap: 8px 10px; max-height: 172px; overflow: hidden; }
.jm-tile { display: flex; align-items: stretch; gap: 12px; padding: 4px; border-radius: 10px; background: var(--surface); color: var(--text); min-width: 0;
  transition: background .15s; }
.jm-tile:hover { background: var(--surface-2); color: var(--text); }
.jm-tile.hi { background: linear-gradient(90deg, rgba(45, 95, 210, .32), rgba(45, 95, 210, .08)); box-shadow: inset 0 0 0 1px rgba(91, 147, 255, .32); }
.jm-tile-art { width: 132px; flex-shrink: 0; border-radius: 8px; overflow: hidden; position: relative; background: var(--surface-3); }
.jm-tile-art > img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.jm-tile-art > img.jm-tile-face { object-position: center 30%; }   /* a 9:16 portrait: the face, not the top of the head */
.jm-tile-art .cover-art { position: absolute; inset: 0; }
.jm-tile-icon { position: absolute; inset: 0; display: grid; place-items: center; color: #d7e3ff;
  background: radial-gradient(90% 120% at 30% 20%, #2a4597, #171c34 70%); }
.jm-tile:nth-child(3n+2) .jm-tile-icon { background: radial-gradient(90% 120% at 30% 20%, #5a3a9e, #1d1834 70%); }
.jm-tile:nth-child(3n) .jm-tile-icon { background: radial-gradient(90% 120% at 30% 20%, #1d6b8a, #13232e 70%); }
.jm-tile-text { min-width: 0; flex: 1; display: grid; align-content: center; gap: 4px; padding-right: 8px; }
.jm-tile-text b { display: flex; align-items: center; min-width: 0; font-size: 13px; font-weight: 500; color: var(--text); }
.jm-tile-text small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tabbed feed of 16:9 cards */
.jm-feed { position: relative; z-index: 1; margin-top: 30px; }
.jm-tabs { display: flex; align-items: center; gap: 4px; }
.jm-tab { height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.jm-tab:hover { color: var(--text); }
.jm-tab.on { background: var(--surface-3); color: var(--text); font-weight: 500; }
.jm-search { margin-left: auto; display: flex; align-items: center; gap: 6px; width: 245px; height: 30px; padding: 0 10px; border-radius: 8px;
  background: var(--sidebar); border: 1px solid var(--line-2); color: var(--muted); }
.jm-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; font-size: 12.5px; height: 28px; }
.jm-subhead { margin: 18px 0 12px; font-size: 12.5px; font-weight: 500; color: var(--text); display: flex; gap: 6px; }
.jm-subhead span { color: var(--faint); font-weight: 400; }
/* works feed (即梦-style masonry): the cover in the video's own shape, no box, title + who under it */
.jm-cards { display: flex; gap: 14px; align-items: flex-start; }
.jm-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.jm-card { display: block; color: var(--text); min-width: 0; }
.jm-card:hover { color: var(--text); }
.jm-card-media { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--surface-2);
  aspect-ratio: 3 / 4; box-shadow: 0 1px 0 var(--line); }
.jm-card.wide .jm-card-media { aspect-ratio: 16 / 9; }
.jm-card-media > img, .jm-card-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease; }
.jm-card-media > video { background: #000; }
.jm-card:hover .jm-card-media > img { transform: scale(1.035); }
.jm-card-media .cover-empty { position: absolute; inset: 0; }
.jm-poster { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 18% 9% 9%; overflow: hidden; color: var(--poster-text); background: var(--poster-1); container-type: inline-size;
  transition: transform .35s ease; }
.jm-poster.tone-2 { background: var(--poster-2); } .jm-poster.tone-3 { background: var(--poster-3); } .jm-poster.tone-4 { background: var(--poster-4); }
.jm-poster::before { content: ""; position: absolute; inset: -30% -30% auto auto; width: 90%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--poster-glow), transparent 70%); pointer-events: none; }
.jm-card:hover .jm-poster { transform: scale(1.035); }
.cover-empty.tinted { color: var(--poster-sub); background: var(--poster-1); }
.cover-empty.tinted.tone-2 { background: var(--poster-2); } .cover-empty.tinted.tone-3 { background: var(--poster-3); }
.cover-empty.tinted.tone-4 { background: var(--poster-4); }
.jm-poster-mark { position: absolute; right: -6%; bottom: -6%; opacity: .09; line-height: 0; pointer-events: none; }
.jm-poster-kicker { position: relative; display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: 12px; color: var(--poster-sub); }
.jm-poster-title { position: relative; font-size: clamp(17px, 9.5cqw, 30px); font-weight: 800; line-height: 1.28; letter-spacing: .01em;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.jm-card.wide .jm-poster { padding: 9% 7%; gap: 6px; }
.jm-card.wide .jm-poster-title { font-size: clamp(15px, 6.5cqw, 24px); -webkit-line-clamp: 2; }
.jm-poster-next { position: relative; margin-top: 4px; font-size: 12px; color: var(--poster-sub); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jm-poster-next::before { content: ""; display: block; width: 22px; height: 2px; border-radius: 2px; margin-bottom: 8px;
  background: currentColor; opacity: .7; }
.jm-card-dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px; font-style: normal; font-size: 11.5px;
  color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; }
.jm-card-body { display: grid; gap: 6px; padding: 9px 2px 0; min-width: 0; }
.jm-card-body b { font-size: 13.5px; font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.jm-card-body small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.jm-card-who { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 10.5px;
  font-weight: 600; color: #fff; background: linear-gradient(135deg, #5b93ff, #9b7bff); }
.jm-card-dot { opacity: .5; }
.jm-empty { color: var(--muted); padding: 40px 0; text-align: center; font-size: 13px; }
.jm-works { padding-top: 28px; }
.jm-works-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.jm-works-head h1 { font-size: 20px; font-weight: 500; }
.jm-works .jm-feed { margin-top: 0; }

/* cover art: a frame of another shape floats on a blurred copy of itself */
.cover-art { position: relative; overflow: hidden; background: var(--surface-3); display: block; }
.cover-bg { position: absolute; top: -12%; left: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(16px) brightness(.55); }
.cover-fg { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.cover-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); }

/* ------------------------------------------------------------------ project page */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: 100vh; }
.project-main { overflow-y: auto; min-width: 0; }
.proj-head { padding: 20px 36px 0; max-width: 1160px; margin: 0 auto; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 10px; min-width: 0; }
.crumbs a { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px 3px 4px; border-radius: 7px; margin-left: -4px; }
.back:hover { background: var(--surface-2); color: var(--text) !important; }
.proj-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.proj-title-row h1 { font-size: 22px; }
.proj-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.head-actions { display: flex; gap: 8px; flex-shrink: 0; }
.stage-area { padding: 20px 36px 64px; max-width: 1160px; margin: 0 auto; }

.steps { display: flex; list-style: none; padding: 0 0 16px; margin: 18px 0 0; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 13px; flex: 1 0 auto; }
.step:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--line-2); min-width: 12px; margin-left: 4px; }
.step.done:not(:last-child)::after { background: var(--accent-line); }
.step-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); flex-shrink: 0; }
.step.done { color: var(--text-2); }
.step.done .step-icon { background: var(--accent-soft); color: var(--accent); }
.step.now { color: var(--text); font-weight: 600; }
.step.now .step-icon { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.step.now.mine .step-icon { background: var(--amber); color: #1a1205; box-shadow: 0 0 0 4px var(--amber-soft); }
.step.now.busy .step-icon { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 7px var(--accent-soft); } }
.step-label { white-space: nowrap; }
.step-tag { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 5px; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.step-lock { color: var(--faint); display: inline-grid; }

.working-card { display: grid; gap: 18px; padding: 26px 28px; }
.working-text h2 { margin-bottom: 6px; }
.working-now { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.say-box { background: var(--surface-2); border-radius: 12px; padding: 12px 16px; margin-top: 14px; }

/* assistant panel */
.agent { border-left: 1px solid var(--line); background: var(--sidebar); display: flex; flex-direction: column; height: 100vh; min-height: 0; }
.agent-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.agent-avatar { height: 20px; width: auto; }
.agent-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.agent-state.busy { color: var(--blue); }
.feed { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.feed-empty { color: var(--faint); font-size: 13px; text-align: center; margin: auto; }
.when { font-size: 11px; color: var(--faint); margin-left: 6px; white-space: nowrap; }
.feed-note { font-size: 12px; color: var(--muted); display: flex; align-items: baseline; gap: 4px; }
.steps-block { display: grid; gap: 4px; }
.steps-toggle { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: var(--surface-2); color: var(--text-2);
  font: inherit; font-size: 12.5px; padding: 7px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.steps-toggle .ellipsis { flex: 1; }
.steps-toggle:hover { background: var(--surface-3); }
.steps-block.live .steps-toggle { color: var(--blue); background: var(--blue-soft); }
.steps-list { list-style: none; margin: 2px 0 0 12px; padding: 0 0 0 10px; display: grid; gap: 3px; border-left: 1px solid var(--line-2); }
.steps-list li { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; color: var(--muted); position: relative; }
.tl-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); position: absolute; left: -13px; top: 8px; }
.steps-list li span:nth-child(2) { flex: 1; min-width: 0; }
.msg { font-size: 13.5px; min-width: 0; }
.msg.say { color: var(--text); }
.msg.say .when { margin-left: 0; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.msg.user .bubble { background: var(--surface-3); color: var(--text); padding: 8px 12px; border-radius: 14px 14px 4px 14px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.error { display: flex; gap: 7px; align-items: flex-start; color: var(--red); font-size: 12.5px; background: var(--red-soft); padding: 7px 10px; border-radius: 9px; }
.msg.error .icon { margin-top: 2px; }
.chat { padding: 12px 14px 14px; }
.chat textarea { min-height: 70px; resize: none; background: var(--surface); border-radius: 14px; }
.chat-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chat-foot .muted { flex: 1; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.send:disabled { background: var(--surface-3); color: var(--faint); cursor: not-allowed; }

/* markdown */
.md { overflow-wrap: anywhere; }
.md p { margin: 4px 0; }
.md ul { margin: 4px 0; padding-left: 18px; }
.md li { margin: 2px 0; }
.md .md-h { font-weight: 600; margin-top: 10px; }
.md .md-quote { border-left: 3px solid var(--line-2); padding-left: 10px; color: var(--muted); }
.md code { background: var(--surface-3); padding: 1px 5px; border-radius: 5px; font-size: .9em; font-family: Consolas, "Cascadia Mono", monospace; }
.md hr { border: 0; border-top: 1px solid var(--line); }
.md-table { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.md-table th, .md-table td { padding: 6px 9px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.md-table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.md-table tr:last-child td { border-bottom: 0; }

/* job progress */
.job .job-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.job-title { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.job-title b { color: var(--text); }
.job.failed .job-title, .job.interrupted .job-title { color: var(--red); }
.job.cancelled .job-title { color: var(--muted); }
.job.done .job-title { color: var(--green); }
.job-step { margin-bottom: 10px; color: var(--text-2); font-size: 13.5px; }
.parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.part { font-size: 12px; padding: 1px 9px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-variant-numeric: tabular-nums; }
.part.running, .part.queued, .part.uploading, .part.upscaling { background: var(--blue-soft); color: var(--blue); }
.part.done, .part.cached { background: var(--green-soft); color: var(--green); }
.part.failed, .part.cancelled { background: var(--red-soft); color: var(--red); }

/* ------------------------------------------------------------------ review steps (gates.js) */
/* selected = a thin ring in the brand gradient */
.topic.on, .mode.on, .cover.on, .opt.on {
  border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--brand) border-box; }
.gate-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.gate-head h2 { margin: 0; font-size: 19px; }
.gate-head p { margin: 2px 0 0; font-size: 13px; }
.gate-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text); flex-shrink: 0; }
.gate-icon.green { background: var(--green-soft); color: var(--green); }
.gate-step { font-size: 12px; font-weight: 500; color: var(--accent); }
.done-head .gate-step { color: var(--green); }
.gate-sub { display: flex; align-items: baseline; gap: 12px; margin-top: 26px; }
.gate-sub h3 { margin: 0 0 10px; }
.reject-box { flex: 1; min-width: 280px; }
.reject-box .actions { margin-top: 8px; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding-top: 8px; }
.topic, .mode, .cover, .platform, .para-body, .tile-body { min-width: 0; }
.topic, .mode, .cover { white-space: normal; }
.topic > *, .mode > * { min-width: 0; overflow-wrap: anywhere; }
.topic { position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 16px; cursor: pointer;
  font: inherit; color: inherit; display: grid; gap: 7px; align-content: start; transition: border-color .12s, background .12s; }
.topic:hover { border-color: var(--line-2); }
.ribbon { position: absolute; top: 12px; right: 12px; background: var(--brand); color: #fff; font-size: 11px; padding: 0 8px; border-radius: 6px; font-weight: 600; line-height: 20px; }
.topic-top { display: flex; align-items: center; gap: 10px; }
.score { font-size: 28px; font-weight: 600; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.topic-title { font-weight: 600; font-size: 15px; line-height: 1.45; }
.topic-angle { color: var(--text-2); font-size: 13px; }
.kp { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); }
.scores { display: grid; gap: 4px; margin: 4px 0; padding-top: 8px; border-top: 1px solid var(--line); }
.score-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 18px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.score-row .bar { height: 3px; }
.score-row .n { text-align: right; font-variant-numeric: tabular-nums; }

.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-pick.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mode { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit;
  color: inherit; display: grid; gap: 3px; align-content: start; transition: border-color .12s; }
.mode:hover { border-color: var(--line-2); }
.mode-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); margin-bottom: 4px; }
.mode.on .mode-icon { background: var(--brand); color: #fff; }
.mode b { display: flex; align-items: center; gap: 6px; }

/* style templates (D-43): pick by picture */
.tpl-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 8px 0 4px; }
.tpl-grid.wide { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tpl-grid.compact { grid-template-columns: repeat(5, 118px); }
.tpl-grid.compact.wide { grid-template-columns: repeat(3, 196px); }
.tpl-tag { font-size: 10.5px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 6px;
  padding: 0 4px; margin-left: 2px; vertical-align: 1px; }
.tpl-grid.compact .tpl-card small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-card { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px;
  padding: 6px 6px 8px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s; }
.tpl-card:hover { border-color: var(--line-2); }
.tpl-card.on { border-color: var(--brand); }
.tpl-card b { font-weight: 600; font-size: 13px; padding: 2px 2px 0; }
.tpl-card small { font-size: 11.5px; color: var(--muted); padding: 0 2px; }
.tpl-shot { position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--surface-3); aspect-ratio: 9 / 16; }
.tpl-grid.wide .tpl-shot { aspect-ratio: 16 / 9; }
.tpl-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; }
.tpl-menu { width: auto; max-height: 70vh; overflow: auto; }
/* D-63: styles made from a reference video */
.tpl-add .tpl-shot, .tpl-making .tpl-shot { display: grid; place-items: center; border: 1px dashed var(--line-2); background: var(--surface); }
.tpl-add-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: var(--muted); }
.tpl-add:hover .tpl-add-icon { color: var(--accent); }
.tpl-making { cursor: default; }
.tpl-making small { color: var(--text-2); }
.tpl-info { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--overlay); color: var(--text); opacity: .85; }
.tpl-info:hover { opacity: 1; color: var(--accent); }
.style-drop { display: flex; align-items: center; gap: 10px; padding: 18px; margin: 12px 0; border: 1px dashed var(--line-2);
  border-radius: 12px; background: var(--surface-2); cursor: pointer; color: var(--text-2); }
.style-drop:hover { border-color: var(--accent); }
.style-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.style-refs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.style-refs img { height: 150px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-3); }
.style-edit { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.style-edit summary { cursor: pointer; }
.style-ask { display: flex; gap: 8px; margin-top: 8px; }
.style-ask input { flex: 1; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; margin-top: 10px; }
.style-grid label { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.style-grid label.style-check { display: flex; align-items: center; gap: 8px; }
.style-grid input[type=color] { width: 56px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.style-grid small { color: var(--muted); }

/* frame shape at the topic gate (D-39) */
.aspect-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.aspect-opt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s; }
.aspect-opt:hover { border-color: var(--line-2); }
.aspect-opt.on { border-color: var(--brand); color: var(--text); }
.aspect-opt.on .icon { color: var(--brand); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 11px;
  margin-bottom: 6px; cursor: pointer; transition: border-color .12s; }
.opt:hover { border-color: var(--line-2); }
.opt input { margin-top: 4px; }
.opt-text { font-weight: 500; }
/* the script reads like a document: numbered paragraphs, borderless until hovered */
.sp-brief { margin: 4px 0 22px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); }
.sp-brief h3 { margin: 0 0 8px; }
.sp-brief dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; line-height: 1.6; }
.sp-brief dt { color: var(--muted); }
.sp-brief dd { margin: 0; }
.script { display: grid; gap: 2px; border-radius: 14px; padding: 8px; background: var(--surface-2); }
.para { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start; padding: 4px; border-radius: 10px; }
.para:focus-within { background: var(--surface-3); }
.para textarea { border-color: transparent; background: transparent; font-size: 14.5px; line-height: 1.75; padding: 6px 8px; }
.para textarea:hover { border-color: var(--line-2); }
.para textarea:focus { background: var(--surface); }
.para > .muted { padding-top: 8px; font-variant-numeric: tabular-nums; }
.para-n { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-weight: 600; font-size: 11.5px; margin-top: 8px; }
.para-body { display: grid; }
.para .small-input { border-style: dashed; background: transparent; margin: 2px 0 4px 8px; width: calc(100% - 8px); color: var(--text-2); }
.narration-editor .para { grid-template-columns: 28px 1fr; }

/* cut + covers: the video sits on a black stage */
.cover-layout { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 28px; align-items: start; }
.video-stage { background: var(--stage); border-radius: 16px; padding: 14px; color: #c9c9d2; }
.video-stage .muted { color: #8b8b97; }
.jy-export { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
.video-dl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: 8px; }
/* D-67: numbers after publishing */
.mx-panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface-2); }
.mx-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mx-head h3 { margin: 0; }
.mx-row { padding: 10px 0; border-top: 1px solid var(--line); }
.mx-row:first-of-type { border-top: 0; }
.mx-name { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mx-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.mx-stats span { display: grid; line-height: 1.2; }
.mx-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mx-stats small { color: var(--muted); font-size: 12px; }
.mx-spark { color: var(--accent); margin-left: auto; }
.jy-export .muted { line-height: 1.4; }
.video-box { display: block; width: 100%; }
.video-box video { display: block; width: 100%; border-radius: 10px; background: #000; max-height: 70vh; margin: 0 auto 8px; }
.video-box.portrait { max-width: 360px; margin: 0 auto; }
.video-box.portrait video { aspect-ratio: 9 / 16; object-fit: contain; }
.video-box.landscape video { aspect-ratio: 16 / 9; }
.empty-video { background: #141418; border-radius: 10px; aspect-ratio: 9/16; display: grid; place-items: center; color: #8b8b97; }
.cover-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cover { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 6px; cursor: pointer; display: grid; gap: 6px; font: inherit;
  color: var(--text-2); font-size: 12.5px; transition: border-color .12s; }
.cover:hover { border-color: var(--line-2); }
.cover.on { color: var(--text); font-weight: 600; }
.cover img { width: 100%; border-radius: 9px; display: block; }
.cover .c34 { aspect-ratio: 3 / 4; object-fit: cover; }
.cover .c169 { aspect-ratio: 16 / 9; object-fit: cover; }
details { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface-2); }
details summary { cursor: pointer; font-weight: 500; font-size: 13px; color: var(--text-2); }
details[open] summary { margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; margin-top: 26px; border-bottom: 1px solid var(--line); }
.tabs button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 9px 12px; font: inherit; font-size: 13px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.caption-editor, .narration-editor, .versions, .cut-editor { padding-top: 14px; }
/* transcript editor (D-46) */
.cut-editor .muted.small { margin: 0 0 6px; }
.tc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin: 10px 0 8px; }
.tc-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.tc-swatch.filler { background: var(--amber); } .tc-swatch.repeat { background: var(--blue); } .tc-swatch.retake { background: var(--red); }
.tc-swatch.mine { background: var(--faint); } .tc-swatch.back { background: var(--green); }
.tc-text { font-size: 16px; line-height: 2.1; max-height: 420px; overflow-y: auto; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); user-select: none; word-break: break-all; }
.tc-ch { cursor: pointer; border-radius: 3px; padding: 2px 0; }
.tc-ch:hover { background: var(--surface-3); }
.tc-ch.off { text-decoration: line-through; color: var(--faint); }
.tc-ch.off.filler { background: var(--amber-soft); color: var(--amber); }
.tc-ch.off.repeat { background: var(--blue-soft); color: var(--blue); }
.tc-ch.off.retake { background: var(--red-soft); color: var(--red); }
.tc-ch.mine { box-shadow: inset 0 -2px 0 var(--faint); }
.tc-ch.back { box-shadow: inset 0 -2px 0 var(--green); }
.tc-pause { font-size: 11px; color: var(--faint); margin: 0 5px; font-family: Consolas, monospace; }
.cue-list { display: grid; gap: 4px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.cue { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; }
.cue .t { font-size: 11.5px; color: var(--faint); font-family: Consolas, monospace; }
.estimate { margin-top: 14px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.versions { display: flex; gap: 12px; flex-wrap: wrap; }

/* publish: one card per platform with its colour on top */
.publish-video { margin: 0 0 16px; }
.publish-video summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.publish-video .video-stage { max-width: 300px; }
.publish-video .video-stage:has(.landscape) { max-width: 560px; }
.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.platform { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface-2); position: relative; overflow: hidden; transition: opacity .15s; }
.platform::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--pc); }
.platform:not(.on) { opacity: .5; }
.add-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.platform-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.platform-head .check { margin: 0; }
.login { display: inline-flex; gap: 6px; align-items: center; }
.phone { display: grid; grid-template-columns: 118px 1fr; gap: 16px; margin-top: 12px; }
.phone-cover { border-radius: 10px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; align-self: start; }
.phone-cover.c3x4 { aspect-ratio: 3/4; }
.phone-cover.c16x9 { aspect-ratio: 16/9; }
.phone-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.platform input:not([type=checkbox]), .platform textarea { background: var(--surface); }
.publog { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.publog h3 { margin-top: 10px; }
.pubrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pubname { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pubrow details { flex-basis: 100%; margin-top: 4px; }
.pubrow pre { white-space: pre-wrap; font-size: 12px; max-height: 240px; overflow: auto; background: var(--surface); padding: 8px; border-radius: 8px; }

/* real-person shoot */
.teleprompter-preview { background: #000; color: #f3f4f6; border-radius: 12px; padding: 14px 18px; font-size: 17px; max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.teleprompter-preview p { margin: 6px 0; }
.prompter { position: fixed; inset: 0; background: #000; color: #fff; z-index: 300; display: grid; grid-template-rows: auto 1fr; }
.prompter-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: #111; color: #ddd; }
.prompter-bar .btn { background: #222; color: #eee; border-color: #444; }
.prompter-bar .btn.primary { background: var(--primary); border-color: transparent; }
.prompter-text { overflow-y: auto; padding: 0 12vw; line-height: 1.5; font-weight: 600; }
.prompter-text p { margin: 0 0 .8em; }
.prompter-text .pad { height: 45vh; }
.footage { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.clip { display: grid; gap: 4px; width: 170px; font-size: 12px; color: var(--muted); }
.clip video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 9/16; }

/* ------------------------------------------------------------------ settings + onboarding */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: 0; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; }
.settings-nav a .icon { color: var(--muted); }
.settings-nav a.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.settings-nav a.on .icon { color: var(--accent); }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-body .panel h2 { font-size: 15px; }
.settings-body .panel * + h2 { margin-top: 26px; }
.check-row { display: grid; grid-template-columns: 24px 210px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: start; }
.check-row:last-of-type { border-bottom: 0; }
.check-row.bad b { color: var(--red); }
/* settings → 制片助手: the last 测试连接 / 登录账号 outcome stays visible (D-41) */
.model-result { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; border: 1px solid var(--line); background: var(--surface-2); }
.model-result.ok { border-color: var(--green-line); background: var(--green-soft); }
.model-result.bad { border-color: var(--red-line); background: var(--red-soft); }
.model-result > span:nth-child(2) { flex: 1; }
.model-pick { display: flex; gap: 8px; align-items: center; }
.model-pick input { flex: 1; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 500; }
/* 形象和声音库 (D-35) */
.lk-thumb { position: relative; display: inline-grid; place-items: center; width: 52px; aspect-ratio: 3 / 4; border-radius: 8px;
  overflow: hidden; background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.lk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lk-thumb.xs { width: 16px; border-radius: 4px; }
.lk-thumb.xs .lk-kind { display: none; }
.lk-land { position: absolute; left: 3px; bottom: 3px; padding: 0 3px; border-radius: 4px; font-size: 10px; line-height: 15px;
  background: var(--backdrop); color: var(--on-accent); }
.lk-thumb.xs .lk-land { display: none; }
.lk-thumb.lg .lk-land { left: 8px; bottom: 8px; padding: 1px 6px; font-size: 12px; line-height: 18px; }
.lk-thumb.lg { width: 100%; border-radius: 0; }
.lk-kind { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; }
.lk-menu { width: 300px; }
.pv-menu { width: 340px; }
.pv-box { display: grid; gap: 6px; padding: 2px 4px 4px; }
.panel > .pv-box { max-width: 560px; }
.pv-search { height: 32px; padding: 4px 10px !important; }
.pv-list { max-height: 280px; overflow-y: auto; display: grid; gap: 2px; }
.pv-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 9px; }
.pv-row:hover { background: var(--surface-3); }
.pv-row.on .pv-main b { color: var(--accent); }
.pv-row > .icon { color: var(--accent); flex-shrink: 0; }
.pv-play { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--text-2);
  display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
.pv-play:hover { color: var(--accent); border-color: var(--accent); }
.pv-main { flex: 1; display: grid; text-align: left; border: 0; background: none; padding: 2px 0; cursor: pointer; color: var(--text); min-width: 0; }
.pv-main b { font-weight: 500; }
.pv-main small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-audio { width: 100%; height: 32px; }
.lk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 6px 6px; }
.lk-tile { display: grid; justify-items: center; gap: 4px; padding: 6px 2px; border: 1px solid transparent; border-radius: 10px;
  background: none; color: var(--text-2); cursor: pointer; font: inherit; }
.lk-tile:hover { background: var(--surface-3); }
.lk-tile.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.lk-tile .lk-name { font-size: 12px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-tile small { font-size: 11px; color: var(--muted); margin-top: -4px; }
.lk-project { display: inline-flex; align-items: center; gap: 12px; }
.gate-look { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.meta-item.link { color: var(--text-2); gap: 5px; }
.meta-item.link:hover:not(:disabled) { color: var(--text); }
.meta-item.link:disabled { opacity: .6; cursor: default; }
.lk-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; margin: 14px 0 10px; }
.lk-card { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.lk-card.default { border-color: var(--accent-line); }
.lk-cover { padding: 0; border: 0; background: var(--surface-3); cursor: zoom-in; display: block; }
.lk-card-body { padding: 10px 12px 12px; display: grid; gap: 6px; }
.lk-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.lk-note { font-size: 12px; color: var(--amber); line-height: 1.45; }
.lk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.link.danger { color: var(--red); }
.lk-add { align-items: center; justify-content: center; gap: 6px; min-height: 260px; border-style: dashed; cursor: pointer; color: var(--text-2); }
.lk-add:hover { border-color: var(--accent-line); color: var(--text); }
.lk-add small { color: var(--muted); }
.lk-add.busy { cursor: progress; }
.lk-rename { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text);
  font: inherit; font-weight: 600; cursor: text; text-align: left; }
.lk-rename .icon { color: var(--muted); opacity: 0; }
.lk-rename:hover .icon { opacity: 1; }
.lk-builtin-name { font-weight: 600; color: var(--text); }
.lk-rename-input { font: inherit; font-weight: 600; padding: 2px 6px; width: 100%; }
.lk-voices { display: grid; gap: 10px; margin: 14px 0; }
.lk-voice { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.lk-voice.default { border-color: var(--accent-line); }
.lk-voice.add { border-style: dashed; background: none; flex-wrap: wrap; }
.lk-voice-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.lk-voice-main { flex: 1; display: grid; gap: 4px; min-width: 0; }
.lk-audio { height: 32px; max-width: 260px; }
.lk-tune { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-2); }
.lk-tune label { display: flex; align-items: center; gap: 6px; }
.lk-test { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.lk-test input { flex: 1; min-width: 240px; }
.lk-preview { display: grid; place-items: center; }
.lk-consent { display: grid; gap: 8px; margin: 12px 0; }
.lk-consent-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.lk-consent-opt.on { border-color: var(--accent-line); background: var(--accent-soft); }
.lk-consent-opt span { display: grid; gap: 2px; }
.lk-consent-opt small { color: var(--muted); font-size: 12px; }
.lk-consent-opt input { margin-top: 3px; }
.lk-preview img, .lk-preview video { max-width: 100%; max-height: 70vh; border-radius: 10px; }
.howto { padding-left: 18px; }
.howto li { margin-bottom: 16px; }
.howto audio { display: block; margin-top: 8px; }

.welcome-mark { margin: 0 0 18px; }
.welcome-mark img { height: 84px; width: auto; display: block; }
.welcome-title { display: flex; align-items: center; gap: 12px; }
.wizard { list-style: none; padding: 0; display: grid; gap: 8px; margin: 26px 0; }
.wstep { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wstep-head { display: grid; grid-template-columns: 32px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0;
  padding: 15px 18px; font: inherit; cursor: pointer; color: inherit; }
.wstep-head:hover { background: var(--surface-2); }
.wnum { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.wstep.ok .wnum { background: var(--green); border-color: var(--green); color: #fff; }
.wgo { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.wstep-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.wstep-body .panel { box-shadow: none; border: 0; padding: 16px 0 0; margin: 0; background: transparent; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .project-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .cover-layout { grid-template-columns: minmax(240px, 300px) 1fr; }
}
@media (max-width: 1080px) {
  .jm-features { grid-template-columns: 1fr; }
  .jm-tiles { max-height: none; }
  .shell { grid-template-columns: 60px minmax(0, 1fr); }
  .brand .wordmark, .nav a > span:not(.mini-thumb):not(.nav-count), .nav-section, .nav.recent, .nav-more, .sys-line, .foot-btn span, .foot-btn .kbd, .collapse-btn { display: none; }
  .brand-row { justify-content: center; padding: 2px 0 14px; }
  .nav a { justify-content: center; position: relative; }
  .nav-count { position: absolute; right: 4px; top: 2px; }
  .foot-row { flex-direction: column; }
  .foot-btn { justify-content: center; flex: none; }
  .project-layout { grid-template-columns: 1fr; height: auto; }
  .main.page-project { overflow-y: auto; }
  .project-main { overflow: visible; }
  .agent { height: 560px; border-left: 0; border-top: 1px solid var(--line); }
  .cover-layout, .two { grid-template-columns: 1fr; }
  .mode-pick, .mode-pick.small { grid-template-columns: 1fr 1fr; }
  .platforms { grid-template-columns: 1fr; }
  .home { padding: 0 24px 80px; }
}
@media (max-width: 700px) {
  .page, .proj-head, .stage-area { padding-left: 16px; padding-right: 16px; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav a { flex: none; white-space: nowrap; }
  .proj-title-row { flex-direction: column-reverse; gap: 8px; }
  .row2 { grid-template-columns: 1fr; }
  .phone { grid-template-columns: 1fr; }
  .check-row { grid-template-columns: 24px 1fr; }
  .check-row span:last-child { grid-column: 2; }
  .bar-hint { display: none; }
}

/* topic scores: high = brand blue, middle = grey, low = amber (one calm scale instead of green + gradient) */
.score-row .bar > div { background: var(--faint); }
.score-row .bar.green > div { background: var(--accent); }
.score-row .bar.orange > div { background: var(--amber); }

/* 设置 → 远程访问（D-38） */
@media (min-width: 701px) { .check-row.act { grid-template-columns: 24px 210px 1fr auto; align-items: center; } }
@media (max-width: 700px) { .check-row.act > :nth-child(3), .check-row.act > :nth-child(4) { grid-column: 2; justify-self: start; } .remote-pw { margin-left: 0; } }
.remote-pw { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px 32px; }
.remote-pw input { flex: 1 1 180px; max-width: 240px; }
.remote-url { margin: 4px 0; font-size: 15px; letter-spacing: 0; user-select: all; word-break: break-all; }

/* D-51: the user's accounts */
.acct-head h2 { margin-bottom: 4px; }
.acct-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acct-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; cursor: pointer; }
.acct-chip:hover { border-color: var(--line-2); }
.acct-chip.on { border-color: var(--accent-line); color: var(--text); background: var(--accent-soft); font-weight: 600; }
.acct-chip.add { border-style: dashed; color: var(--muted); }
.acct-title { display: flex; align-items: center; gap: 8px; }
.jm-acct-filter { flex: 0 0 auto; width: auto !important; margin-left: auto; height: 30px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 12.5px; }
.jm-acct-filter + .jm-search { margin-left: 8px; }
.acct-logins td:first-child { width: 140px; }

/* 知识库 (D-72) */
.kb-cat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kb-cat-head h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.kb-cat-actions { display: flex; gap: 8px; flex-shrink: 0; }
.kb-docs { margin-top: 10px; }
.kb-doc { cursor: pointer; }
.kb-doc:hover td { background: var(--overlay); }
.kb-doc-meta { text-align: right; white-space: nowrap; width: 1%; }
.kb-edit-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.kb-text { width: 100%; min-height: 320px; font-family: inherit; line-height: 1.6; resize: vertical; }
.kb-link { display: flex; gap: 8px; }
.kb-link input { flex: 1; }
.kb-grow { flex: 1; }
.kb-feishu { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.kb-feishu .notice { flex-basis: 100%; }
.kb-check { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }

/* ------------------------------------------------------------------ 数据 (D-74, js/data.js) */
.dx .page-head h1 { margin: 0 0 4px; }
.dx-actions { display: flex; align-items: center; gap: 12px; }
.dx-inline { display: inline-flex; align-items: center; gap: 8px; }
.dx .acct-switch { margin-bottom: 18px; }
.dx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.dx-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.dx-kpi.hero { background: linear-gradient(140deg, var(--accent-soft), transparent 70%), var(--surface); border-color: var(--accent-line); }
.dx-kpi-label { font-size: 12.5px; color: var(--muted); }
.dx-kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.dx-kpi-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-plats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dx-plat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.dx-plat.off { opacity: .7; }
.dx-plat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dx-plat-head .muted { margin-left: auto; }
.dx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dx-plat-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dx-plat-nums span { display: grid; min-width: 0; }
.dx-plat-nums b { font-size: 17px; font-variant-numeric: tabular-nums; }
.dx-plat-nums small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-peer { margin-top: 10px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 6px 9px; line-height: 1.7; }
.dx-warn { margin-top: 8px; color: var(--amber); }
.dx-section h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.dx-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dx-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px 28px; }
.dx-group-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.dx-grow { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.dx-glabel { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-gbar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.dx-gbar i { display: block; height: 100%; border-radius: 99px; background: var(--faint); }
.dx-gbar i.up { background: var(--accent); }
.dx-gval { display: inline-flex; align-items: baseline; gap: 6px; min-width: 128px; }
.dx-gval b { font-variant-numeric: tabular-nums; }
.dx-gval small { color: var(--muted); font-size: 11.5px; }
.dx-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.dx-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.dx-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.dx-table tr:last-child td { border-bottom: 0; }
.dx-table .r { text-align: right; }
.dx-table th:first-child, .dx-table td:first-child { padding-left: 0; }
.dx-table th:nth-child(1) { width: 130px; }
.dx-works th:nth-child(1) { width: auto; }
.dx-works th:nth-child(2) { width: 92px; } .dx-works th:nth-child(3) { width: 64px; }
.dx-works th:nth-child(n+4) { width: 70px; }
.dx-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dx-title a:not(.dx-mine) { color: var(--text); }
.dx-title a:not(.dx-mine):hover { color: var(--accent); }
.dx-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
td.dx-ellipsis { max-width: 0; }
.dx-mine { flex: none; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.dx-up { color: var(--green); font-weight: 600; }
.dx-down { color: var(--muted); }
.dx-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dx-select { width: auto; flex: none; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); padding: 0 8px; font: inherit; font-size: 13px; }
.dx-more { text-align: center; margin-top: 12px; }
.dx-review { border-color: var(--accent-line); }
.dx-draft { width: 100%; box-sizing: border-box; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; font: inherit; font-size: 13.5px; line-height: 1.7; resize: vertical; }
.dx-review-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .dx-works th:nth-child(2), .dx-works td:nth-child(2), .dx-works th:nth-child(3), .dx-works td:nth-child(3),
  .dx-works th:nth-child(7), .dx-works td:nth-child(7) { display: none; }
  .dx-grow { grid-template-columns: 90px 1fr auto; }
}
.dx-trend { display: grid; gap: 10px; }
.dx-trow { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: end; }
.dx-tlabel { display: grid; gap: 2px; padding-bottom: 2px; min-width: 0; }
.dx-tlabel span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.dx-tlabel small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 46px; align-items: end;
  border-bottom: 1px solid var(--line-2); }
.dx-bar { height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.dx-bar i { display: block; width: 100%; max-width: 16px; border-radius: 3px 3px 0 0; opacity: .9; }
.dx-bar:hover i { opacity: 1; }
.dx-bar i.none { height: 2px; background: var(--faint); opacity: .5; border-radius: 1px; max-width: 8px; }
.dx-taxis .dx-bars { height: 16px; border: 0; overflow: visible; }
.dx-taxis em { position: absolute; top: 0; font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.dx-plat-nums small { white-space: normal; line-height: 1.3; }
@media (max-width: 760px) {
  .dx-trow { grid-template-columns: 1fr; gap: 6px; }
  .dx-taxis .dx-tlabel { display: none; }
  .dx-gval { min-width: 0; }
  .dx-gval small { display: none; }
  .dx-weeks th:nth-child(3), .dx-weeks td:nth-child(3), .dx-weeks th:nth-child(6), .dx-weeks td:nth-child(6) { display: none; }
  .dx-weeks th:nth-child(1) { width: 110px; }
  .dx-works th:nth-child(6), .dx-works td:nth-child(6) { display: none; }
  .dx-works th:nth-child(n+4) { width: 54px; }
}
@media (max-width: 760px) {
  .dx-grow { grid-template-columns: 84px minmax(0, 1fr) 56px; }
  .dx-gval .badge { display: none; }
}

/* ---- 对标 (D-78, js/bench.js); reuses the 数据 page's dx-* blocks */
.bm-add { display: flex; gap: 10px; align-items: center; padding: 12px; margin-bottom: 14px; }
.bm-add .bm-url { flex: 1; min-width: 0; }
.bm-adding { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.bm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bm-card { display: grid; gap: 12px; padding: 14px; color: var(--text); text-decoration: none; transition: border-color .15s; }
.bm-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.bm-card-head { display: flex; align-items: center; gap: 10px; }
.bm-card-name { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bm-card-name b, .bm-card-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-card-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bm-card-nums span { display: grid; gap: 1px; }
.bm-card-nums b { font-size: 17px; }
.bm-card-nums small { color: var(--muted); font-size: 11.5px; }
.bm-avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-3); }
.bm-avatar.empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.bm-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.bm-head { align-items: flex-start; }
.bm-who { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.bm-who h1 { margin: 0 0 2px; }
.bm-bio { margin-top: 6px; font-size: 13px; color: var(--text-2); white-space: pre-line; max-width: 640px; }
.bm-weeks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; }
.bm-week { display: grid; gap: 3px; justify-items: center; font-size: 11px; }
.bm-week-n { font-size: 11.5px; color: var(--text-2); min-height: 14px; }
.bm-week-bar { height: 70px; width: 100%; max-width: 26px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-2); }
.bm-week-bar i { display: block; width: 100%; background: var(--primary); border-radius: 3px 3px 0 0; opacity: .85; }
.bm-search { width: 160px; height: 30px; font-size: 13px; }
.bm-works td { vertical-align: middle; }
.bm-works { table-layout: fixed; width: 100%; }
.bm-works th:first-child { width: auto; min-width: 220px; }   /* the title takes what the numbers leave */
.bm-works th:nth-child(2) { width: 92px; }
.bm-works th.r { width: 64px; }
.bm-works td.r { white-space: nowrap; }   /* 「393万」 on one line (B 站 shows six counts) */
.bm-works th:last-child { width: 84px; }
.bm-wtitle { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bm-wtitle img, .bm-nocover { width: 36px; height: 48px; object-fit: cover; border-radius: 5px; flex: none; background: var(--surface-3); }
.bm-wtext { display: grid; gap: 3px; min-width: 0; }
.bm-wtext a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; line-height: 1.45; }
.bm-wtext > span { display: flex; gap: 4px; }
.bm-modal { display: grid; gap: 14px; }
.bm-mwork { display: flex; gap: 12px; align-items: flex-start; }
.bm-mwork img { width: 60px; height: 80px; object-fit: cover; border-radius: 6px; flex: none; }
.bm-sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.bm-sheets img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.bm-md { max-height: 50vh; overflow: auto; padding: 4px 2px; }
.bm-saved summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.bm-transcript { white-space: pre-wrap; font: inherit; font-size: 12.5px; line-height: 1.7; color: var(--text-2); max-height: 260px; overflow: auto;
  background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }
.bm-copy { display: grid; gap: 8px; padding: 14px; border-color: var(--accent-line); }
.bm-copy h4 { margin: 0; display: flex; align-items: center; gap: 6px; }
.bm-copy .btn { justify-self: start; }
.beauty-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.bm-copy-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bm-copy-opts .check { margin: 0; }
@media (max-width: 760px) {
  .bm-works th:nth-child(n+6), .bm-works td:nth-child(n+6) { display: none; }
  .bm-works td:last-child, .bm-works th:last-child { display: table-cell; }
  .bm-add { flex-direction: column; align-items: stretch; }
}

/* ---- 搜爆款 (D-79, js/hunt.js); reuses the 对标 page's bm-* / dx-* blocks */
.hn-form { display: grid; gap: 10px; padding: 12px; margin-bottom: 12px; }
.hn-row { display: flex; gap: 10px; align-items: center; }
.hn-kw { flex: 1; min-width: 0; }
.hn-form .chip small { margin-left: 2px; font-weight: 400; }
.hn-history { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hn-past { text-decoration: none; color: var(--text-2); cursor: pointer; padding-right: 6px; }
.hn-past:hover { background: var(--surface-3); }
.hn-past.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.hn-past small { font-size: 11.5px; }
.hn-x { border: 0; background: none; color: var(--muted); padding: 2px; display: inline-flex; cursor: pointer; border-radius: 50%; }
.hn-x:hover { color: var(--text); background: var(--surface-3); }
.hn-hot-n { color: var(--red); font-weight: 600; font-size: 12.5px; margin: 0 6px; }
.hn-status { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.hn-status > span { display: inline-flex; align-items: center; gap: 6px; }
.hn-rule { margin: 0 0 10px; }
.hn-nohit button { margin-left: 8px; vertical-align: middle; }
.hn-only { margin: 0; font-size: 13px; }
.hn-none { padding: 18px 0; text-align: center; }
.hn-table th:first-child { width: auto; }
.hn-table th:nth-child(2) { width: 130px; } .hn-table th:nth-child(3) { width: 92px; }
.hn-table th:nth-child(4) { width: 100px; } .hn-table th:nth-child(5), .hn-table th:nth-child(6) { width: 70px; }
.hn-table th:last-child { width: 84px; }
.hn-author a { color: var(--text); }
.hn-author small { font-size: 11.5px; }
.hn-author > * { display: block; }
.hn-status .dx-warn { margin-top: 0; }
.hn-table .bm-wtext a { color: var(--text); }
.hn-table .bm-wtext a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .hn-row { flex-wrap: wrap; }
  .hn-kw { flex-basis: 100%; }
  .hn-table th:nth-child(-n+3):not(:first-child), .hn-table td:nth-child(-n+3):not(:first-child),
  .hn-table th:nth-child(6), .hn-table td:nth-child(6) { display: none; }
  .hn-table th:nth-child(4) { width: 64px; } .hn-table th:nth-child(5) { width: 50px; } .hn-table th:last-child { width: 66px; }
  .hn-table td:nth-child(4) small { display: none; }
  .hn-table .bm-wtitle img, .hn-table .bm-nocover { display: none; }
}

/* 评论自动回复 (D-80) */
.ar-limits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 420px; }
.ar-tbl td { vertical-align: top; }
.ar-tbl td:first-child { white-space: nowrap; width: 1%; }
.ar-text { max-width: 420px; overflow-wrap: anywhere; }
.eg-plats { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 10px; }
.eg-item { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.eg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.eg-text { margin: 4px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.eg-item textarea { width: 100%; margin-top: 6px; }
.ar-mat { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ar-mat select { max-width: 360px; }
.ar-imgs { display: flex; gap: 10px; overflow-x: auto; margin-top: 10px; padding-bottom: 6px; }
.ar-imgs img { height: 220px; width: auto; border-radius: 8px; border: 1px solid var(--line); display: block; }
.fg-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.fg-imgs img { height: 96px; width: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
.fg-msgs { margin-top: 4px; display: grid; gap: 2px; overflow-wrap: anywhere; }

/* 每天自动出片 + 一键发布 (D-85) */
.dly-banner { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 900px; margin: 18px auto 0;
  padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13.5px; }
.dly-banner.ready { border-color: var(--green-line); background: var(--green-soft); color: var(--text); }
.dly-banner > span { flex: 1; min-width: 200px; }
.dly-banner > svg { color: var(--accent); flex: none; }
.dly-banner.ready > svg { color: var(--green); }
.dly-list { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.dly-items { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.dly-items li { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 6px; }
.dly-times { display: flex; flex-wrap: wrap; gap: 6px; }
.dly-banner.warn { border-color: var(--amber-line); background: var(--amber-soft); color: var(--text); }
.dly-banner.warn > svg { color: var(--amber); }

/* the video's offer at the script gate (D-90) */
.offer-note { margin: 12px 0; display: grid; gap: 6px; }
.offer-note details { margin-top: 4px; }
.ar-offers { display: grid; gap: 8px; margin: 8px 0 14px; }
.ar-offer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line-2);
  border-radius: var(--radius); background: var(--surface-2); }
.ar-offer > span { flex: 1; min-width: 200px; }
.ar-offer.off { opacity: 0.6; }

/* AI-drawn covers (D-87) */
.ai-cover { margin-top: 10px; }

/* ------------------------------------------------------------------ 工作空间 (D-91, js/workspace.js) */
.wsp-tabs { margin-bottom: 14px; }
.wsp-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; margin-left: 2px; }
.wsp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.wsp-where { display: grid; gap: 3px; min-width: 0; }
.wsp-where b { font-size: 16px; }
.wsp-path { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.wsp-on { color: var(--green); }
.wsp-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; font-size: 13px; }
.wsp-dirs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wsp-outdir { border-color: var(--accent-line); color: var(--accent); }
.wsp-none { padding: 18px 0; }
.wsp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--surface);
  padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.wsp-bar .check { margin: 0; }
.wsp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.wsp-file { position: relative; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  background: var(--surface-2); min-width: 0; }
.wsp-file:hover { border-color: var(--line-2); }
.wsp-file.on { border-color: var(--accent); background: var(--accent-soft); }
.wsp-file > input { position: absolute; top: 14px; left: 14px; width: 16px; height: 16px; accent-color: var(--accent); z-index: 1; }
.wsp-thumb { height: 96px; border-radius: 8px; background: var(--surface-3); display: flex; align-items: center; justify-content: center;
  color: var(--muted); overflow: hidden; }
.wsp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wsp-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsp-used { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wsp-used .badge { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.wsp-watch { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; margin: 12px 0; }
.wsp-switch-row { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; }
.wsp-switch-row .switch { flex: none; margin-top: 1px; }
.wsp-pathrow { margin: 12px 0; }
.wsp-fs { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.wsp-fs-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); min-width: 0; }
.wsp-fs-list { max-height: 260px; overflow: auto; padding: 6px; display: grid; gap: 2px; }
.wsp-fs-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: transparent; color: var(--text); text-align: left;
  border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; }
.wsp-fs-item:hover { background: var(--overlay); }
.wsp-addrow { margin-top: 12px; }
.wsp-proj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* the creation box's 「选择工作空间」 and the sidebar's 空间 (D-91) */
.wsp-cbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 0 4px; }
.wsp-cbar .jm-tool.wsp-chosen { color: var(--accent); border-color: var(--accent-line); }
.wsp-cbar-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.wsp-pick { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 9px; border-radius: 99px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--line); max-width: 220px; }
.wsp-pick button { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; padding: 2px; border-radius: 50%; }
.wsp-pick button:hover { background: var(--overlay); color: var(--text); }
.wsp-list { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; margin-top: 8px; }
.wsp-row { display: grid; grid-template-columns: 18px 18px 1fr auto; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.wsp-row:hover { background: var(--overlay); }
.wsp-row.on { background: var(--accent-soft); }
.wsp-row input { width: 15px; height: 15px; accent-color: var(--accent); }
.nav.spaces .space-work { padding-left: 30px; color: var(--muted); }
.nav.spaces .space-work .sdot { position: static; flex: none; }

/* D-93: the hot topics that fit this account */
.hotfit-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; }
.hotfit-angle { font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.hotfit-angle::before { content: "讲法："; color: var(--accent); }
.hotfit-where { font-size: 11.5px; color: var(--muted); }
.hotfit-form { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--surface-2); }
.hotfit-form > label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.hotfit-form .hotp-form { margin: 0; }
