
    :root {
      --brand: #5b5ce2;
      --brand-strong: #4647c8;
      --brand-soft: #eeefff;
      --cyan: #20b8cd;
      --orange: #ff8a3d;
      --green: #16a778;
      --red: #e55353;
      --ink: #202231;
      --muted: #74798c;
      --line: #e7e9f0;
      --surface: #ffffff;
      --canvas: #f5f6fa;
      --shadow: 0 10px 30px rgba(34, 38, 67, .08);
      --radius: 16px;
      --sidebar: 232px;
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      color: var(--ink);
      background: var(--canvas);
      font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
      font-size: 14px;
      line-height: 1.55;
    }

    button, input, textarea, select { font: inherit; }
    button { cursor: pointer; }

    .app {
      display: grid;
      grid-template-columns: var(--sidebar) minmax(0, 1fr);
      min-height: 100vh;
    }

    .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      z-index: 30;
      width: var(--sidebar);
      display: flex;
      flex-direction: column;
      padding: 22px 14px 16px;
      overflow: hidden;
      scrollbar-width: thin;
      scrollbar-color: transparent transparent;
      color: #dfe2ff;
      background:
        radial-gradient(circle at 20% 8%, rgba(112, 115, 255, .34), transparent 30%),
        linear-gradient(180deg, #17192d 0%, #111322 100%);
    }

    .sidebar-menu-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
    }

    .sidebar:hover { scrollbar-color: rgba(151, 158, 207, .5) transparent; }
    .sidebar::-webkit-scrollbar { width: 7px; }
    .sidebar::-webkit-scrollbar-track { background: transparent; }
    .sidebar::-webkit-scrollbar-thumb {
      border: 2px solid transparent;
      border-radius: 999px;
      background: transparent;
      background-clip: padding-box;
    }
    .sidebar:hover::-webkit-scrollbar-thumb { background-color: rgba(151, 158, 207, .48); }
    .sidebar:hover::-webkit-scrollbar-thumb:hover { background-color: rgba(184, 190, 238, .74); }

    .brand {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 0 10px 22px;
    }

    .brand-mark {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      color: white;
      font-size: 19px;
      font-weight: 800;
      background: linear-gradient(135deg, #8386ff, #5758df 60%, #31c5d8);
      box-shadow: 0 8px 22px rgba(91, 92, 226, .35);
    }

    .brand strong { display: block; color: #fff; font-size: 17px; letter-spacing: .4px; }
    .brand small { color: #8e93b5; font-size: 11px; }

    .sidebar-collapse {
      width: 24px;
      height: 24px;
      display: inline-grid;
      place-items: center;
      margin-left: auto;
      padding: 0;
      border: 1px solid #e2e2e6;
      border-radius: 7px;
      color: #74747c;
      background: #fff;
      font-size: 15px;
      line-height: 1;
      cursor: pointer;
      transition: .18s ease;
    }
    .sidebar-collapse:hover { color: #202126; border-color: #cbcbcf; background: #f2f2f4; }

    .nav-label {
      padding: 13px 12px 7px;
      color: #6e7497;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1.2px;
    }

    .nav {
      display: grid;
      gap: 5px;
    }

    .nav-group { margin: 0 0 6px; }
    .nav-group summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 10px;
      color: #d8dcf1;
      cursor: pointer;
      list-style: none;
      user-select: none;
      transition: .2s ease;
    }
    .nav-group summary::-webkit-details-marker { display: none; }
    .nav-group summary:hover { background: rgba(255,255,255,.05); }
    .nav-group-title { display: flex; align-items: center; gap: 10px; font-weight: 720; }
    .nav-group-caret { color: #777da4; font-size: 13px; transition: transform .2s ease; }
    .nav-group[open] .nav-group-caret { transform: rotate(180deg); }
    .nav-sublist { display: grid; gap: 3px; padding: 3px 0 4px 37px; }
    .nav-item.nav-sub {
      min-height: 34px;
      padding: 8px 11px;
      border-radius: 8px;
      color: #9ea4c2;
      font-size: 13px;
    }
    .nav-item.nav-sub.active { box-shadow: inset 2px 0 0 #8487ff; }
    .nav-item.nav-sub.nested { margin-left: 10px; font-size: 12px; }
    .nav-item.nav-sub.planned { color: #707692; }
    .nav-item.nav-sub.planned::after { content: "规划中"; margin-left: auto; color: #666c87; font-size: 10px; }
    .nav-config { margin: 2px 0 0 10px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.08); }
    .nav-child-group { margin: 0; }
    .nav-child-group summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 34px;
      padding: 8px 11px;
      border-radius: 8px;
      color: #9ea4c2;
      cursor: pointer;
      list-style: none;
      font-size: 13px;
    }
    .nav-child-group summary::-webkit-details-marker { display: none; }
    .nav-child-group summary:hover { background: rgba(255,255,255,.05); color: #fff; }
    .nav-child-group > summary span:last-child { color: #777da4; transition: transform .2s ease; }
    .nav-child-group[open] > summary span:last-child { transform: rotate(180deg); }
    .nav-child-list { display: grid; gap: 3px; margin: 2px 0 3px 12px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.07); }

    .nav-item {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 11px 12px;
      border: 0;
      border-radius: 10px;
      color: #aeb3cf;
      background: transparent;
      text-align: left;
      transition: .2s ease;
    }

    .nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
    .nav-item.active {
      color: #fff;
      background: linear-gradient(90deg, rgba(103, 106, 244, .34), rgba(103, 106, 244, .13));
      box-shadow: inset 3px 0 0 #8487ff;
    }

    .nav-icon {
      width: 26px;
      height: 26px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: currentColor;
      background: rgba(255,255,255,.06);
      font-size: 13px;
      font-weight: 800;
    }

    .sidebar-spacer { flex: 1; }

    .account {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 14px;
      padding: 13px 10px 3px;
      border-top: 1px solid rgba(255,255,255,.08);
    }

    .avatar {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #fff;
      font-weight: 700;
      background: linear-gradient(135deg, #ff9d64, #ee6c8f);
    }

    .account strong { display: block; color: #fff; font-size: 13px; }
    .account small { color: #777d9e; font-size: 11px; }

    .main {
      grid-column: 2;
      min-width: 0;
      min-height: 100vh;
    }

    .topbar {
      display: none;
      position: sticky;
      top: 0;
      z-index: 20;
      height: 68px;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      border-bottom: 1px solid var(--line);
      background: rgba(255,255,255,.92);
      backdrop-filter: blur(14px);
      transition: color .22s ease, background .22s ease, border-color .22s ease;
    }

    .crumb { display: flex; align-items: center; gap: 9px; color: var(--muted); }
    .crumb strong { color: var(--ink); font-size: 16px; }

    .top-actions { display: flex; align-items: center; gap: 10px; }

    .main.pull-mode .topbar {
      color: #eef0f8;
      border-bottom-color: #2c303c;
      background: rgba(22, 24, 32, .94);
    }

    .main.pull-mode .crumb,
    .main.pull-mode .crumb strong {
      color: #eef0f8;
    }

    .main.pull-mode .crumb > span:first-of-type {
      color: #8f95a8;
    }

    .main.pull-mode .team-select,
    .main.pull-mode .topbar .ghost-btn,
    .main.pull-mode .topbar .icon-btn {
      color: #cbd0de;
      border-color: #383b49;
      background: #22252f;
    }

    .team-select, .icon-btn, .ghost-btn, .primary-btn, .soft-btn {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
    }

    .team-select {
      padding: 8px 12px;
      color: #4e5263;
      font-weight: 600;
    }

    .icon-btn {
      width: 36px;
      height: 36px;
      color: #64697c;
      font-size: 16px;
    }

    .page {
      display: none;
      min-height: 100vh;
      animation: fadeIn .24s ease;
    }

    .page.active { display: block; }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .page-pad { padding: 26px 28px 44px; }

    .page-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 20px;
      margin-bottom: 22px;
    }

    .page-head h1 { margin: 0 0 5px; font-size: 24px; line-height: 1.2; }
    .page-head p { margin: 0; color: var(--muted); }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 8px;
      border-radius: 999px;
      color: var(--brand-strong);
      background: var(--brand-soft);
      font-size: 11px;
      font-weight: 700;
    }

    .badge.green { color: #087d59; background: #e6f8f1; }
    .badge.orange { color: #b45d20; background: #fff1e6; }
    .badge.red { color: #b53e3e; background: #ffeded; }
    .badge.gray { color: #656b7e; background: #f0f1f5; }

    .primary-btn, .ghost-btn, .soft-btn {
      padding: 9px 14px;
      font-weight: 650;
      transition: .2s ease;
    }

    .primary-btn {
      color: #fff;
      border-color: var(--brand);
      background: linear-gradient(135deg, #6b6dea, #5556d7);
      box-shadow: 0 8px 18px rgba(91, 92, 226, .2);
    }

    .primary-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(91, 92, 226, .28); }
    .ghost-btn { color: #555a6d; background: #fff; }
    .ghost-btn:hover { border-color: #cdd0db; background: #f9f9fc; }
    .soft-btn { color: var(--brand-strong); border-color: transparent; background: var(--brand-soft); }

    .card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: 0 4px 18px rgba(28, 32, 59, .035);
    }

    .card-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 18px 12px;
    }

    .card-title h3 { margin: 0; font-size: 15px; }
    .card-title small { color: var(--muted); }

    /* AI 创建 */
    .ai-shell {
      height: 100vh;
      display: grid;
      grid-template-columns: 220px minmax(480px, 1fr);
      overflow: hidden;
      background: #f7f8fb;
    }

    .conversation-panel, .asset-panel { height: 100vh; background: #fff; }

    .conversation-panel { overflow-y: auto; border-right: 1px solid var(--line); padding: 18px 13px; }
    .asset-panel {
      position: fixed;
      z-index: 52;
      top: 0;
      right: 0;
      width: min(480px, 42vw);
      padding: 18px 15px;
      overflow-y: auto;
      border-left: 1px solid var(--line);
      box-shadow: -16px 0 40px rgba(25, 29, 50, .13);
      transform: translateX(105%);
      transition: transform .24s ease;
    }
    .asset-panel.open { transform: translateX(0); }
    .asset-backdrop {
      position: fixed;
      z-index: 51;
      inset: 0 0 0 var(--sidebar);
      display: none;
      background: rgba(27, 30, 45, .2);
      backdrop-filter: blur(1px);
    }
    .asset-backdrop.show { display: block; }
    .asset-toggle {
      position: absolute;
      z-index: 4;
      top: 14px;
      right: 18px;
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 8px 11px;
      border: 1px solid #d9dbe7;
      border-radius: 9px;
      color: #555a6d;
      background: rgba(255,255,255,.94);
      box-shadow: 0 5px 16px rgba(40, 43, 69, .08);
      font-size: 12px;
      font-weight: 700;
    }
    .asset-toggle:hover { border-color: #bfc2ee; color: var(--brand-strong); }
    .asset-close { width: 28px; height: 28px; border: 0; border-radius: 7px; color: #74798b; background: #f1f2f6; }

    .panel-label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 13px;
      font-weight: 700;
    }

    .new-chat {
      width: 100%;
      padding: 10px;
      margin-bottom: 15px;
      border: 1px dashed #b8bbd5;
      border-radius: 10px;
      color: var(--brand-strong);
      background: #f7f7ff;
      font-weight: 700;
    }

    .chat-list { display: grid; gap: 6px; }

    .chat-row {
      padding: 10px;
      border-radius: 9px;
      color: #666b7d;
      cursor: pointer;
      transition: .2s ease;
    }

    .chat-row:hover, .chat-row.active { color: var(--ink); background: #f1f2f8; }
    .chat-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .chat-row small { color: #9a9ead; }

    .creation-stage {
      min-width: 0;
      min-height: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      position: relative;
      overflow: hidden;
      padding: 22px 24px 18px;
    }

    .ai-hero {
      padding: 7px 0 18px;
      text-align: center;
    }

    .ai-hero .spark {
      width: 50px;
      height: 50px;
      margin: 0 auto 11px;
      display: grid;
      place-items: center;
      border-radius: 17px;
      color: #fff;
      font-size: 22px;
      background: linear-gradient(135deg, #6567e8, #8d69de 56%, #23bfd0);
      box-shadow: 0 12px 28px rgba(91,92,226,.24);
    }

    .ai-hero h1 { margin: 0; font-size: 25px; }
    .ai-hero p { max-width: 620px; margin: 7px auto 0; color: var(--muted); }

    .agent-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      max-width: 860px;
      width: 100%;
      margin: 0 auto;
    }

    .agent-card {
      min-height: 126px;
      padding: 15px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      text-align: left;
      transition: .2s ease;
    }

    .agent-card:hover, .agent-card.selected {
      border-color: #aeb1f5;
      transform: translateY(-2px);
      box-shadow: 0 10px 24px rgba(70, 71, 200, .11);
    }

    .agent-card.selected { background: linear-gradient(145deg, #fff, #f5f5ff); }
    .agent-card.tool-card { border-style: dashed; background: #fbfbff; }
    .agent-card.tool-card .agent-icon { background: #f0efff; color: var(--brand); }

    .agent-grid.attention .agent-card {
      animation: agentAttention .7s ease;
    }

    @keyframes agentAttention {
      0%, 100% { border-color: var(--line); }
      45% { border-color: #8588f3; box-shadow: 0 0 0 4px rgba(91, 92, 226, .1); }
    }

    .agent-card .agent-icon {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      margin-bottom: 10px;
      border-radius: 10px;
      color: var(--brand-strong);
      background: var(--brand-soft);
      font-weight: 800;
    }

    .agent-card strong { display: block; margin-bottom: 3px; }
    .agent-card small { color: var(--muted); line-height: 1.45; }
    .agent-foot { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
    .agent-chip {
      padding: 3px 7px;
      border-radius: 999px;
      color: #6e7183;
      background: #f2f3f7;
      font-size: 10px;
      font-weight: 650;
    }

    /* AI 创作首页：轻量创作台 */
    #page-creation .ai-shell { background: #fff; }
    #page-creation .conversation-panel { padding: 20px 14px; color: #30313a; background: #fbfbfc; border-right-color: #ececef; }
    #page-creation .conversation-panel .panel-label { margin: 2px 2px 14px; color: #24252c; font-size: 14px; }
    #page-creation .new-chat { padding: 12px; margin-bottom: 0; border: 0; color: #fff; background: #181818; border-radius: 13px; box-shadow: 0 5px 13px rgba(25,25,25,.12); }
    .session-history-head { margin-top:18px; padding:16px 4px 9px; border-top:1px solid #e8e8ec; color:#777982; font-size:12px; font-weight:700; }
    #page-creation .chat-list { gap: 4px; }
    #page-creation .chat-row { position:relative; padding:11px 36px 11px 10px; border-radius:10px; cursor:pointer; }
    #page-creation .chat-row strong { color: #42434a; font-size: 12px; }
    #page-creation .chat-row small { display:none; }
    #page-creation .chat-row:hover, #page-creation .chat-row.active { background: #eeeeF0; }
    #page-creation .chat-row.active strong { color: #26272d; }
    #page-creation .conversation-panel .panel-label { justify-content:flex-start; }
    .session-more { display:none; position:absolute; top:50%; right:8px; width:24px; height:24px; padding:0; border:0; border-radius:6px; color:#6e6d75; background:transparent; cursor:pointer; transform:translateY(-50%); font-size:16px; line-height:20px; }
    .chat-row:hover .session-more, .chat-row.menu-open .session-more { display:block; }
    .session-more:hover { background:#dedee2; }
    .session-menu { display:none; position:absolute; z-index:30; top:36px; right:6px; width:120px; padding:5px; border:1px solid #e3e2e7; border-radius:9px; background:#fff; box-shadow:0 12px 26px rgba(27,25,34,.16); }
    .chat-row.menu-open .session-menu { display:grid; gap:2px; }
    .session-menu button { padding:8px 10px; border:0; border-radius:6px; color:#55535d; background:transparent; text-align:left; cursor:pointer; }
    .session-menu button:hover { background:#f3f2f5; }
    .session-menu button.danger { color:#e44f55; }
    .session-menu button.danger:hover { background:#fff0f1; }
    #page-creation .chat-row strong.session-title-editing { display:block; padding:3px 6px; margin:-4px -7px; overflow:visible; border:1px solid #8b70e6; border-radius:6px; outline:0; background:#fff; white-space:nowrap; cursor:text; box-shadow:0 0 0 3px rgba(139,112,230,.1); }
    #page-creation .creation-stage { background: #fff; }
    #page-creation .ai-hero {
      order: 1;
      margin-top: auto;
      padding: 0 0 28px;
    }
    #page-creation .ai-hero .spark {
      width: auto;
      height: auto;
      margin-bottom: 14px;
      color: #8f3dff;
      background: transparent;
      box-shadow: none;
      font-size: 18px;
    }
    #page-creation .ai-hero h1 { color: #252936; font-size: clamp(28px, 2.2vw, 38px); letter-spacing: -.8px; }
    #page-creation .ai-hero p { color: #858897; font-size: 15px; }
    #page-creation .chat-output {
      order: 1;
      max-width: 1240px;
      width: min(1240px, calc(100% - 48px));
      padding: 28px 70px 16px;
      -ms-overflow-style: none;
      scrollbar-width: none;
    }
    #page-creation .chat-output::-webkit-scrollbar { width: 0; height: 0; }
    #page-creation .chat-output.show { flex: 1 1 auto; width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
    #page-creation .composer-wrap { order: 2; width: min(780px, 94%); margin: 0 auto 14px; }
    #page-creation .creation-stage:has(.chat-output.show) .composer-wrap { width: min(1040px, calc(100% - 48px)); margin-bottom: 24px; }
    #page-creation .creation-stage:has(.chat-output.show) .composer { border-radius: 20px; }
    #page-creation .chat-output .message { margin-bottom: 18px; }
    #page-creation .chat-output .message.assistant {
      width: calc(100% - 46px);
      margin-left: 46px;
      padding: 15px 18px;
      box-sizing: border-box;
      background: #fafafa;
    }
    #page-creation .chat-output .message.user { margin-right: 46px; margin-bottom: 22px; padding: 14px 16px; }
    #page-creation .chat-output .message.assistant::before { left: -40px; top: 14px; }
    #page-creation .chat-output .message.user::after { right: -40px; top: 14px; }
    #page-creation .conversation-locator {
      display: none;
      position: absolute;
      z-index: 3;
      top: 32px;
      bottom: 146px;
      left: 18px;
      width: 12px;
      pointer-events: none;
    }
    #page-creation .creation-stage:has(.chat-output.show) .conversation-locator { display: block; }
    #page-creation .locator-dot {
      position: absolute;
      left: 0;
      width: 8px;
      height: 3px;
      padding: 0;
      border: 0;
      border-radius: 1px;
      cursor: pointer;
      pointer-events: auto;
      background: #d2d5dd;
      transition: width .16s ease, background .16s ease;
    }
    #page-creation .locator-dot:hover,
    #page-creation .locator-dot.is-active { width: 16px; background: #757b8c; }
    #page-creation .locator-preview {
      position: absolute;
      left: 24px;
      top: 50%;
      width: 270px;
      padding: 10px 12px;
      border: 1px solid #e3e5eb;
      border-radius: 10px;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-50%) translateX(-4px);
      pointer-events: none;
      color: #555a68;
      background: rgba(255,255,255,.98);
      box-shadow: 0 10px 28px rgba(31, 36, 51, .12);
      transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    }
    #page-creation .locator-dot:hover .locator-preview,
    #page-creation .locator-dot:focus-visible .locator-preview { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
    #page-creation .locator-preview strong,
    #page-creation .locator-preview span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    #page-creation .locator-preview strong { margin-bottom: 5px; color: #343845; font-size: 12px; }
    #page-creation .locator-preview span { font-size: 11px; line-height: 1.6; }
    #page-creation .locator-preview span:last-child { color: #9297a4; }
    #page-creation .chat-output .generated-assets { gap: 10px; }
    #page-creation .chat-output .generated-asset { padding: 13px; border-radius: 12px; }
    #page-creation .chat-output .guided-prompts { margin-top: 12px; padding-top: 10px; border-top: 1px solid #ececf0; }
    #page-creation .composer {
      padding: 11px;
      border: 1px solid rgba(220, 220, 225, .9);
      border-radius: 26px;
      background: rgba(255,255,255,.94);
      box-shadow: 0 16px 46px rgba(32, 33, 45, .1), inset 0 1px 0 rgba(255,255,255,.94);
    }
    #page-creation .composer:focus-within { border-color: rgba(136, 89, 255, .45); box-shadow: 0 0 0 4px rgba(136, 89, 255, .08), 0 18px 48px rgba(32, 33, 45, .11); }
    #page-creation .composer textarea { min-height: 84px; padding: 15px 17px 7px; color: #34353d; font-size: 14px; line-height: 1.65; }
    #page-creation .composer textarea::placeholder { color: #aaaeb8; }
    #page-creation .composer-foot { padding: 0 4px 3px; }
    #page-creation .composer-selectors { gap: 7px; }
    #page-creation .agent-pill {
      min-height: 36px;
      padding: 6px 12px 6px 7px;
      border-color: #e2e2e7;
      border-radius: 999px;
      color: #30313a;
      background: linear-gradient(180deg, #fff, #f7f7f9);
      box-shadow: 0 2px 7px rgba(32, 32, 40, .05);
      font-size: 12px;
      font-weight: 720;
    }
    #page-creation .agent-pill.required { color: #363740; border-style: solid; }
    #page-creation .agent-pill:hover { border-color: #c9bded; background: #fff; }
    #page-creation .agent-pill-icon {
      width: 24px;
      height: 24px;
      border-radius: 9px;
      color: #fff;
      background: linear-gradient(135deg, #4e57db, #a45ae9);
      box-shadow: 0 3px 8px rgba(110, 80, 210, .28);
    }
    #page-creation .model-trigger {
      height: 36px;
      padding: 5px 12px 5px 7px;
      border-color: #e2e2e7;
      border-radius: 999px;
      color: #30313a;
      background: linear-gradient(180deg, #fff, #f7f7f9);
      box-shadow: 0 2px 7px rgba(32, 32, 40, .05);
    }
    #page-creation .model-trigger:hover { border-color: #c9bded; background: #fff; }
    #page-creation .model-trigger-icon {
      width: 24px;
      height: 24px;
      border-radius: 9px;
      background: linear-gradient(135deg, #342e4b, #6d5d91);
      box-shadow: 0 3px 8px rgba(67, 57, 94, .2);
    }
    #page-creation .model-trigger-copy { gap: 6px; }
    #page-creation .model-trigger-copy small { color: #9697a1; font-size: 10px; }
    #page-creation .model-trigger-copy strong { color: #454650; font-size: 12px; }
    #page-creation .send-btn {
      width: 42px;
      height: 42px;
      border-radius: 15px;
      color: #fff;
      background: linear-gradient(150deg, #242424, #0d0d0e);
      box-shadow: 0 5px 13px rgba(16, 16, 18, .22);
    }
    #page-creation .send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 17px rgba(16, 16, 18, .27); }
    #page-creation .send-btn:disabled { color: #fff; background: #c5c5c8; }
    #page-creation .agent-grid {
      order: 3;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 9px;
      max-width: 900px;
      margin: 0 auto clamp(32px, 5.5vh, 74px);
    }
    #page-creation .agent-card {
      min-height: 0;
      width: auto;
      padding: 8px 13px 8px 8px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border-color: rgba(228, 228, 234, .96);
      border-radius: 999px;
      color: #535561;
      background: rgba(255,255,255,.72);
      box-shadow: 0 3px 12px rgba(42, 43, 55, .035);
    }
    #page-creation .agent-card .agent-icon { display: none; }
    #page-creation .agent-card strong { margin: 0; font-size: 12px; }
    #page-creation .agent-card small, #page-creation .agent-card .agent-foot { display: none; }
    #page-creation .agent-card:hover {
      transform: translateY(-1px);
      border-color: #bea1ff;
      color: #6e37cd;
      box-shadow: 0 8px 18px rgba(102, 61, 192, .13);
    }
    #page-creation .agent-card.selected { transform: translateY(-1px); border-color: #9f7dff; color: #332d4b; background: linear-gradient(135deg, #fcfaff, #f3eeff); box-shadow: 0 8px 18px rgba(114, 84, 210, .12); }
    #page-creation .agent-card.tool-card { border-style: solid; background: rgba(255,255,255,.82); }
    #page-creation .agent-popover, #page-creation .model-popover {
      border: 1px solid rgba(225, 225, 230, .95);
      border-radius: 18px;
      background: rgba(255,255,255,.98);
      box-shadow: 0 18px 48px rgba(37, 38, 50, .16);
    }
    #page-creation .agent-option, #page-creation .model-option { border-radius: 12px; }
    #page-creation .agent-option:hover, #page-creation .model-option:hover { background: #f6f3ff; }
    #page-creation .agent-option.selected, #page-creation .model-option.selected { background: #f1ecff; }

    /* 输入框下方的专业 Agent：信息型小卡片，而非标签 */
    #page-creation .agent-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      max-width: 780px;
      width: min(780px, 94%);
      margin-bottom: clamp(28px, 4.5vh, 58px);
    }
    #page-creation .agent-card {
      min-height: 108px;
      width: 100%;
      position: relative;
      padding: 14px 14px 13px;
      display: block;
      border-radius: 16px;
      background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(249,249,252,.82));
      box-shadow: 0 6px 18px rgba(42, 43, 55, .045);
    }
    #page-creation .agent-card .agent-icon {
      display: none;
    }
    #page-creation .agent-card::before {
      content: "";
      position: absolute;
      top: 14px;
      left: 14px;
      width: 22px;
      height: 3px;
      border-radius: 99px;
      background: linear-gradient(90deg, #8469ed, #d197ff);
    }
    #page-creation .agent-card strong { margin: 13px 0 4px; color: #343540; font-size: 13px; }
    #page-creation .agent-card small {
      display: -webkit-box;
      overflow: hidden;
      color: #92949f;
      font-size: 10px;
      line-height: 1.45;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    #page-creation .agent-card .agent-foot { display: flex; margin-top: 7px; }
    #page-creation .agent-card .agent-chip { padding: 2px 6px; color: #85838f; background: #f1f1f4; font-size: 9px; }
    #page-creation .agent-card .agent-chip:not(:first-child) { display: none; }
    #page-creation .agent-card:hover { transform: translateY(-3px); }
    #page-creation .agent-card.selected {
      border-color: #bba5ff;
      color: #5137a6;
      background: linear-gradient(145deg, #fbfaff, #efeaff);
      box-shadow: 0 10px 22px rgba(115, 78, 213, .14);
    }
    #page-creation .agent-card.selected strong { color: #5137a6; }
    #page-creation .agent-card.selected small { color: #8370b8; }
    #page-creation .agent-card.selected::before { background: linear-gradient(90deg, #5b41c8, #9863e9); }
    #page-creation .agent-card.selected .agent-chip { color: #7157af; background: #e6ddff; }
    #page-creation .agent-card.tool-card { border-style: solid; background: linear-gradient(145deg, #fbfaff, #f6f4ff); }
    #page-creation .agent-card.tool-card.selected { background: linear-gradient(145deg, #fbfaff, #efeaff); }
    @media (max-width: 1040px) { #page-creation .agent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
    @media (max-width: 640px) { #page-creation .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

    /* 轻量化侧栏：与 AI 创作首页保持一致的白底体系 */
    .sidebar {
      color: #5f6069;
      background: #fafafa;
      box-shadow: 1px 0 0 #ececef;
    }
    .sidebar-menu-scroll { scrollbar-color: transparent transparent; }
    .sidebar-menu-scroll:hover { scrollbar-color: transparent transparent; }
    .sidebar-menu-scroll::-webkit-scrollbar { width: 4px; }
    .sidebar-menu-scroll::-webkit-scrollbar-track { margin: 12px 0; }
    .sidebar-menu-scroll::-webkit-scrollbar-thumb {
      min-height: 40px;
      border: 0;
      border-radius: 99px;
      background: transparent;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
    }
    .sidebar-menu-scroll:hover::-webkit-scrollbar-thumb { background: transparent; }
    .sidebar-menu-scroll.is-scrolling { scrollbar-color: rgba(147, 148, 156, .2) transparent; }
    .sidebar-menu-scroll.is-scrolling::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(174, 174, 181, .2), rgba(120, 120, 129, .28)); }
    .sidebar-menu-scroll.is-scrolling::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(145, 145, 153, .32), rgba(94, 94, 104, .4)); }
    .brand-mark { background: linear-gradient(145deg, #262627, #09090a); box-shadow: 0 8px 18px rgba(24,24,24,.17); }
    .brand strong { color: #252529; }
    .brand small { color: #9a9aa2; }
    .nav-label { color: #a0a0a8; }
    .nav-group summary { color: #55565e; }
    .nav-group summary:hover { color: #24252b; background: #f0f0f2; }
    .nav-group-caret, .nav-child-group > summary span:last-child { color: #9b9ba3; }
    .nav-sublist { padding-left: 34px; }
    .nav-item.nav-sub, .nav-child-group summary { color: #777880; }
    .nav-item.nav-sub:hover, .nav-child-group summary:hover { color: #222329; background: #efeff1; }
    .nav-item.nav-sub.active { color: #171719; background: #e9e9eb; box-shadow: inset 2px 0 0 #222; }
    .nav-item.nav-sub.planned { color: #aaaab1; }
    .nav-item.nav-sub.planned::after { color: #b4b4ba; }
    .nav-config, .nav-child-list { border-left-color: #e3e3e6; }
    .nav-item { color: #666770; }
    .nav-item:hover { color: #222329; background: #efeff1; }
    .nav-item.active { color: #171719; background: #e9e9eb; box-shadow: inset 3px 0 0 #222; }
    .nav-icon { color: #666770; background: #eeeeef; }
    .nav-item.active .nav-icon { color: #fff; background: #242425; }
    .sidebar-spacer { flex: 1 0 24px; }
    .account {
      position: relative;
      z-index: 2;
      flex: 0 0 auto;
      bottom: auto;
      margin-top: auto;
      padding: 13px 10px 16px;
      border-top-color: #e8e8ea;
      background: linear-gradient(180deg, rgba(250,250,250,0), #fafafa 16px, #fafafa);
    }
    .account strong { color: #393a40; }
    .account small { color: #96969e; }

    @media (min-width: 861px) {
      .app.sidebar-collapsed { --sidebar: 72px; }
      .sidebar.is-collapsed { padding-left: 10px; padding-right: 10px; }
      .sidebar.is-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
      .sidebar.is-collapsed .brand-copy,
      .sidebar.is-collapsed .nav-group-caret,
      .sidebar.is-collapsed .nav-sublist { display: none; }
      .sidebar.is-collapsed .brand { gap: 4px; }
      .sidebar.is-collapsed .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 15px; }
      .sidebar.is-collapsed .sidebar-collapse { width: 20px; height: 20px; margin-left: 0; border-radius: 6px; font-size: 14px; }
      .sidebar.is-collapsed .nav-group { margin-bottom: 7px; }
      .sidebar.is-collapsed .nav-group summary { justify-content: center; padding: 9px 0; }
      .sidebar.is-collapsed .nav-group-title { gap: 0; font-size: 0; }
      .sidebar.is-collapsed .nav-group-title .nav-icon { font-size: 13px; }
      .sidebar.is-collapsed .nav-group:has(.nav-item.active) summary { background: #e9e9eb; }
      .sidebar.is-collapsed .nav-group:has(.nav-item.active) .nav-icon { color: #fff; background: #242425; }
      .sidebar.is-collapsed .account { justify-content: center; padding-left: 0; padding-right: 0; }
      .sidebar.is-collapsed .account > div:last-child { display: none; }
      .sidebar.is-collapsed .nav > .nav-item { justify-content: center; padding-left: 0; padding-right: 0; font-size: 0; }
      .sidebar.is-collapsed .nav > .nav-item .nav-icon { font-size: 13px; }
    }
    #page-creation .asset-toggle { border-radius: 999px; }
    #page-creation .creation-stage:has(.chat-output.show) .asset-toggle { top: 17px; right: 22px; }

    .chat-output {
      display: none;
      flex: 1;
      min-height: 0;
      max-width: 1200px;
      width: 100%;
      margin: 12px auto 0;
      padding: 2px 42px 14px;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
    }

    .chat-output.show { display: block; }

    .message {
      position: relative;
      margin-bottom: 12px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
    }

    .message.user {
      width: fit-content;
      max-width: 72%;
      margin-left: auto;
      margin-right: 0;
      border-color: #d8d9ff;
      border-top-right-radius: 4px;
      background: #f1f1ff;
    }

    .message.assistant {
      width: 100%;
      margin-left: 0;
      margin-right: auto;
      border-top-left-radius: 4px;
      box-shadow: 0 4px 14px rgba(37, 41, 67, .035);
    }

    .message.user::after,
    .message.assistant::before {
      position: absolute;
      top: 2px;
      width: 29px;
      height: 29px;
      display: grid;
      place-items: center;
      border-radius: 9px;
      font-size: 10px;
      font-weight: 800;
    }

    .message.user::after {
      content: "我";
      right: -37px;
      color: #fff;
      background: #696be3;
    }

    .message.assistant::before {
      content: "AI";
      left: -37px;
      color: #5b5ee2;
      background: #e9eaff;
    }

    .message-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
    .message-head strong { font-size: 13px; }

    .message.assistant {
      padding: 11px 13px;
      border: 0;
      border-radius: 13px;
      background: #f7f7f8;
      box-shadow: none;
    }

    .message.assistant.located {
      animation: locatedMessage 1.5s ease;
    }

    @keyframes locatedMessage {
      0%, 100% { box-shadow: none; }
      35% { box-shadow: 0 0 0 4px rgba(91, 92, 226, .2); }
    }

    .assistant-summary {
      margin: 0 0 9px;
      color: #454958;
      font-size: 12px;
      line-height: 1.65;
    }

    .generated-assets { display: grid; gap: 8px; }
    .generated-asset {
      padding: 10px 11px;
      border: 1px solid #e4e5ea;
      border-radius: 11px;
      background: #fff;
    }

    .generated-asset-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 6px;
    }

    .generated-asset-head strong { color: #303442; font-size: 12px; }
    .generated-asset-head small { color: #9a9eab; font-size: 9px; }
    .generated-asset-body { color: #454957; font-size: 12px; line-height: 1.7; white-space: pre-line; }

    .generated-video {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr);
      gap: 11px;
      align-items: center;
    }

    .generated-video-cover {
      width: 72px;
      aspect-ratio: 9 / 16;
      display: grid;
      place-items: center;
      border-radius: 9px;
      color: #fff;
      background: linear-gradient(145deg, #292c42, #7072df);
      font-size: 22px;
    }

    .asset-inline-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 8px;
    }

    .asset-action {
      padding: 5px 8px;
      border: 1px solid #dedfe7;
      border-radius: 7px;
      color: #5e6373;
      background: #fff;
      font-size: 10px;
    }

    .asset-action:hover { color: var(--brand-strong); border-color: #c6c8ef; background: #f8f8ff; }
    .asset-action.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
    .asset-action.saved { color: #278568; border-color: #bfe1d5; background: #eef9f5; }

    .guided-prompts {
      display: grid;
      grid-template-columns: 1fr;
      justify-items: start;
      gap: 6px;
      padding-top: 9px;
      margin-top: 9px;
      border-top: 1px solid #e4e5e9;
    }

    .guided-prompts span { color: #9a9eaa; font-size: 9px; }
    .guided-prompt {
      width: fit-content;
      padding: 6px 9px;
      border: 1px solid #dfe0e7;
      border-radius: 16px;
      color: #636879;
      background: #fff;
      font-size: 10px;
      text-align: left;
    }

    .guided-prompt:hover { color: var(--brand-strong); border-color: #c3c5ef; }

    .copy-result {
      margin-top: 10px;
      padding: 13px;
      border: 1px solid #ececf5;
      border-radius: 11px;
      background: #fafaff;
    }

    .result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
    .copy-result p { margin: 0; color: #383b4c; }
    .result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
    .result-card {
      padding: 13px;
      border: 1px solid #e7e8f1;
      border-radius: 12px;
      background: #fbfbfe;
    }
    .result-card p { margin: 7px 0 0; color: #3d4050; line-height: 1.65; font-size: 12px; }
    .result-section-title { margin: 15px 0 8px; font-size: 13px; font-weight: 760; color: #303344; }
    .result-note {
      margin-top: 10px;
      padding: 10px 12px;
      border-left: 3px solid #7375e8;
      border-radius: 7px;
      color: #555a6c;
      background: #f5f5ff;
      font-size: 12px;
      line-height: 1.6;
    }
    .structure-line, .compare-row {
      display: grid;
      grid-template-columns: 112px 1fr;
      gap: 10px;
      padding: 8px 0;
      border-bottom: 1px dashed #e6e7ee;
      font-size: 12px;
    }
    .structure-line:last-child, .compare-row:last-child { border-bottom: 0; }
    .structure-line strong, .compare-row strong { color: #5b5ee2; }
    .diff-old { color: #8b5160; text-decoration: line-through; }
    .diff-new { color: #27785b; font-weight: 650; }
    .story-table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 11px;
    }
    .story-table th, .story-table td {
      padding: 8px 7px;
      border: 1px solid #e4e6ee;
      text-align: left;
      vertical-align: top;
      line-height: 1.45;
      word-break: break-word;
    }
    .story-table th { color: #666b7b; background: #f5f6f9; }
    .story-table th:nth-child(1), .story-table td:nth-child(1) { width: 64px; }
    .story-table th:nth-child(2), .story-table td:nth-child(2) { width: 74px; }
    .mix-preview {
      display: grid;
      grid-template-columns: 155px 1fr;
      gap: 14px;
      margin-top: 12px;
      padding: 13px;
      border: 1px solid #e4e5f0;
      border-radius: 13px;
      background: #f9f9fd;
    }
    .mix-cover {
      min-height: 205px;
      display: grid;
      place-items: center;
      border-radius: 11px;
      color: #fff;
      background: linear-gradient(155deg, #272a48, #5b5ee2 60%, #24b8c4);
      font-weight: 750;
    }
    .mix-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .mix-stat { padding: 10px; border-radius: 9px; background: #fff; border: 1px solid #e8e9f0; }
    .mix-stat strong { display: block; margin-bottom: 3px; color: #343746; font-size: 15px; }
    .mix-stat small { color: #808596; }
    .timeline-mini { display: flex; gap: 3px; height: 32px; margin-top: 11px; }
    .timeline-segment { display: grid; place-items: center; border-radius: 5px; color: #fff; font-size: 9px; background: #686be5; }
    .timeline-segment.alt { background: #26aeb8; }

    .composer-wrap {
      flex: 0 0 auto;
      width: min(1200px, 100%);
      margin: auto auto 0;
      padding-top: 18px;
    }

    .composer {
      padding: 10px;
      border: 1px solid #d9dce7;
      border-radius: 16px;
      background: #fff;
      box-shadow: 0 12px 32px rgba(35, 38, 63, .09);
    }
    .followup-hint {
      display: none;
      align-items: center;
      gap: 7px;
      padding: 2px 6px 9px;
      color: #85899a;
      font-size: 10px;
      line-height: 1.4;
    }
    .followup-hint.show { display: flex; }
    .followup-hint strong { flex: 0 0 auto; color: #5b5ee2; }

    .composer textarea {
      width: 100%;
      min-height: 58px;
      max-height: 150px;
      padding: 4px 7px;
      resize: vertical;
      border: 0;
      outline: 0;
      color: var(--ink);
    }

    .composer textarea:disabled {
      color: #999eae;
      background: #f3f4f7;
      cursor: not-allowed;
      resize: none;
    }

    .composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .composer-selectors { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
    .agent-picker { position: relative; }

    .agent-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 9px;
      color: var(--brand-strong);
      background: #f8f8ff;
      font-weight: 700;
    }

    .agent-pill-icon {
      width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      border-radius: 7px;
      color: #fff;
      background: linear-gradient(135deg, #5f62dd, #37b6c8);
      font-size: 10px;
    }

    .agent-chevron { margin-left: 2px; transition: transform .18s ease; }
    .agent-picker.open .agent-chevron { transform: rotate(180deg); }

    .agent-pill.required {
      color: #fff;
      border-color: var(--brand);
      background: linear-gradient(135deg, #6b6dea, #5556d7);
      box-shadow: 0 0 0 4px rgba(91, 92, 226, .11), 0 7px 16px rgba(91, 92, 226, .18);
      animation: requiredPulse 1.8s ease-in-out infinite;
    }

    .agent-popover {
      position: absolute;
      z-index: 82;
      left: 0;
      bottom: calc(100% + 10px);
      width: 360px;
      max-height: 470px;
      display: none;
      padding: 8px;
      overflow-y: auto;
      border: 1px solid #e4e5eb;
      border-radius: 16px;
      background: #fff;
      box-shadow: 0 18px 52px rgba(31, 34, 54, .18);
    }

    .agent-picker.open .agent-popover { display: block; animation: modelPopoverIn .16s ease-out; }
    .agent-popover-title { padding: 6px 8px 8px; color: #9a9eab; font-size: 10px; }
    .agent-group-title { padding: 8px 9px 4px; color: #a1a5b1; font-size: 9px; font-weight: 700; }

    .agent-option {
      width: 100%;
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr) 22px;
      align-items: center;
      gap: 9px;
      padding: 8px;
      border: 0;
      border-radius: 10px;
      color: #3b3f4f;
      background: transparent;
      text-align: left;
    }

    .agent-option:hover { background: #f6f7fa; }
    .agent-option.selected { background: #f0f1f5; }
    .agent-option-icon {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border: 1px solid #e5e6ec;
      border-radius: 9px;
      color: #565b72;
      background: #fff;
      font-size: 12px;
      font-weight: 750;
    }

    .agent-option-copy { min-width: 0; }
    .agent-option-copy strong { display: block; color: #363a49; font-size: 12px; }
    .agent-option-copy small {
      display: block;
      overflow: hidden;
      margin-top: 2px;
      color: #999daa;
      font-size: 9px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .agent-option-check { color: var(--brand); font-size: 15px; font-weight: 800; text-align: center; }

    .model-picker { position: relative; min-width: 0; }
    .model-native { display: none; }

    .model-trigger {
      height: 34px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      max-width: 250px;
      padding: 4px 9px 4px 6px;
      border: 1px solid var(--line);
      border-radius: 9px;
      color: #3e4354;
      background: #fff;
      font-size: 12px;
      text-align: left;
    }

    .model-trigger:hover:not(:disabled) { border-color: #bfc2ee; background: #fafaff; }
    .model-trigger:disabled { color: #a2a6b3; background: #f6f7f9; cursor: not-allowed; }

    .model-trigger-icon {
      width: 24px;
      height: 24px;
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      border-radius: 7px;
      color: #fff;
      background: linear-gradient(135deg, #373a55, #6b6dea);
      font-size: 11px;
    }

    .model-trigger-copy {
      min-width: 0;
      display: flex;
      align-items: baseline;
      gap: 5px;
    }

    .model-trigger-copy small { color: #9296a6; font-size: 10px; font-weight: 500; }
    .model-trigger-copy strong {
      overflow: hidden;
      color: inherit;
      font-size: 12px;
      font-weight: 650;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .model-chevron { margin-left: auto; color: #858a9b; transition: transform .18s ease; }
    .model-picker.open .model-chevron { transform: rotate(180deg); }

    .model-popover {
      position: absolute;
      z-index: 80;
      left: 0;
      bottom: calc(100% + 10px);
      width: min(430px, calc(100vw - 320px));
      max-height: 440px;
      display: none;
      padding: 8px;
      overflow-y: auto;
      border: 1px solid #e5e6ec;
      border-radius: 16px;
      background: #fff;
      box-shadow: 0 18px 52px rgba(31, 34, 54, .18);
    }

    .model-picker.open .model-popover { display: block; animation: modelPopoverIn .16s ease-out; }

    @keyframes modelPopoverIn {
      from { opacity: 0; transform: translateY(7px) scale(.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .model-popover-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 8px 9px;
      color: #33384a;
      font-size: 13px;
      font-weight: 750;
    }

    .model-popover-head small { color: #969baa; font-size: 10px; font-weight: 500; }
    .model-group-title {
      padding: 9px 9px 4px;
      color: #a0a4b1;
      font-size: 10px;
      font-weight: 700;
    }

    .model-option {
      width: 100%;
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) 22px;
      align-items: center;
      gap: 9px;
      padding: 8px;
      border: 0;
      border-radius: 11px;
      color: #353a4c;
      background: transparent;
      text-align: left;
    }

    .model-option:hover { background: #f6f7fa; }
    .model-option.selected { background: #f1f2f6; }

    .model-option-icon {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      border: 1px solid #e5e6ed;
      border-radius: 10px;
      color: #545a72;
      background: #fff;
      font-size: 15px;
    }

    .model-option-copy { min-width: 0; }
    .model-option-name {
      display: flex;
      align-items: center;
      gap: 6px;
      overflow: hidden;
      font-size: 13px;
      font-weight: 680;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .model-option-name em {
      padding: 1px 5px;
      border-radius: 7px;
      color: #538796;
      background: #e9f6f8;
      font-size: 8px;
      font-style: normal;
      font-weight: 700;
    }

    .model-option-desc {
      display: block;
      overflow: hidden;
      margin-top: 2px;
      color: #9b9fad;
      font-size: 10px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .model-option-check { color: var(--brand); font-size: 16px; font-weight: 800; text-align: center; }

    @keyframes requiredPulse {
      0%, 100% { box-shadow: 0 0 0 3px rgba(91, 92, 226, .09), 0 7px 16px rgba(91, 92, 226, .16); }
      50% { box-shadow: 0 0 0 6px rgba(91, 92, 226, .13), 0 9px 22px rgba(91, 92, 226, .23); }
    }

    .send-btn {
      width: 38px;
      height: 38px;
      border: 0;
      border-radius: 11px;
      color: #fff;
      background: var(--brand);
      font-size: 18px;
    }

    .send-btn:disabled {
      color: #a8acb9;
      background: #e1e3e9;
      cursor: not-allowed;
    }

    .asset-empty {
      padding: 30px 12px;
      color: #9a9ead;
      text-align: center;
      border: 1px dashed #d7d9e5;
      border-radius: 12px;
    }

    .asset-type-tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 5px;
      padding: 4px;
      margin-bottom: 13px;
      border-radius: 10px;
      background: #f2f3f7;
    }

    .asset-type-tab {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      padding: 8px 6px;
      border: 0;
      border-radius: 8px;
      color: #767b8d;
      background: transparent;
      font-size: 12px;
      font-weight: 700;
    }

    .asset-type-tab.active {
      color: var(--brand-strong);
      background: #fff;
      box-shadow: 0 2px 8px rgba(39, 42, 70, .08);
    }

    .asset-type-tab b {
      min-width: 18px;
      padding: 1px 5px;
      border-radius: 9px;
      color: #858a9b;
      background: #e8e9ef;
      font-size: 10px;
    }

    .asset-type-tab.active b { color: #fff; background: var(--brand); }
    .asset-type-panel { display: none; }
    .asset-type-panel.active { display: block; }
    .asset-drawer-list { display: grid; gap: 9px; }
    .asset-drawer-card {
      padding: 10px;
      border: 1px solid #e3e4eb;
      border-radius: 11px;
      background: #fff;
    }

    .asset-drawer-main {
      width: 100%;
      display: grid;
      grid-template-columns: 35px minmax(0, 1fr);
      gap: 9px;
      padding: 0;
      border: 0;
      background: transparent;
      text-align: left;
    }

    .asset-drawer-icon {
      width: 35px;
      height: 35px;
      display: grid;
      place-items: center;
      border-radius: 9px;
      color: var(--brand-strong);
      background: #eeeeff;
      font-size: 12px;
      font-weight: 800;
    }

    .asset-drawer-copy { min-width: 0; }
    .asset-drawer-copy strong {
      display: block;
      overflow: hidden;
      color: #363a49;
      font-size: 11px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .asset-drawer-copy small { display: block; margin-top: 2px; color: #a0a4b0; font-size: 9px; }
    .asset-drawer-copy p {
      display: -webkit-box;
      overflow: hidden;
      margin: 5px 0 0;
      color: #787d8d;
      font-size: 10px;
      line-height: 1.45;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .asset-drawer-card .asset-inline-actions { margin-top: 9px; }
    .video-source-detail {
      display: none;
      padding: 8px;
      margin-top: 8px;
      border-radius: 8px;
      color: #6e7382;
      background: #f6f7f9;
      font-size: 10px;
      line-height: 1.55;
    }
    .asset-drawer-card.show-detail .video-source-detail,
    .generated-asset.show-detail .video-source-detail { display: block; }

    .script-table-wrap {
      width: 100%;
      overflow-x: auto;
      border: 1px solid #e3e4e9;
      border-radius: 9px;
    }

    .compact-script-table {
      width: 100%;
      min-width: 880px;
      border-collapse: collapse;
      table-layout: fixed;
      font-size: 10px;
    }

    .compact-script-table th,
    .compact-script-table td {
      padding: 9px 8px;
      border-right: 1px solid #e7e8ed;
      border-bottom: 1px solid #e7e8ed;
      color: #555968;
      line-height: 1.6;
      text-align: left;
      vertical-align: top;
      overflow-wrap: anywhere;
      white-space: normal;
      word-break: break-word;
    }

    .compact-script-table th { color: #6d7282; background: #f5f6f8; font-weight: 700; }
    .compact-script-table tr:last-child td { border-bottom: 0; }
    .compact-script-table th:last-child,
    .compact-script-table td:last-child { border-right: 0; }
    .compact-script-table th:nth-child(1) { width: 62px; }
    .compact-script-table th:nth-child(2) { width: 210px; }
    .compact-script-table th:nth-child(3) { width: 235px; }
    .compact-script-table th:nth-child(4) { width: 170px; }
    .compact-script-table th:nth-child(5) { width: 205px; }

    .video-source-detail .compact-script-table { min-width: 820px; background: #fff; }

    .asset-item {
      display: none;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #fff;
    }

    .asset-item.show { display: block; }
    .asset-thumb {
      height: 76px;
      display: grid;
      place-items: center;
      margin-bottom: 10px;
      border-radius: 9px;
      color: #6d6fd7;
      background: linear-gradient(135deg, #f2f2ff, #e8f8fa);
      font-size: 24px;
      font-weight: 800;
    }

    /* 拉片深色模式 */
    .dark-editor {
      min-height: 100vh;
      padding: 22px 24px 38px;
      color: #eef0f8;
      background:
        radial-gradient(circle at 90% 0%, rgba(87, 91, 221, .17), transparent 28%),
        #161820;
    }

    .dark-editor .page-head p { color: #8f95a8; }
    .editor-toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .dark-button {
      padding: 8px 12px;
      border: 1px solid #383b49;
      border-radius: 9px;
      color: #dfe2ed;
      background: #22252f;
    }

    .pull-grid {
      display: grid;
      grid-template-columns: 320px minmax(320px, .9fr) minmax(390px, 1.15fr);
      gap: 14px;
    }

    .dark-card {
      border: 1px solid #2c303c;
      border-radius: 14px;
      background: #20232c;
      overflow: hidden;
    }

    .dark-card-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 13px 15px;
      border-bottom: 1px solid #2d303b;
    }

    .dark-card-head strong { font-size: 14px; }
    .dark-card-head span { color: #858b9d; font-size: 12px; }

    .video-box {
      position: relative;
      width: 210px;
      aspect-ratio: 9 / 16;
      display: grid;
      place-items: center;
      margin: 17px auto;
      border-radius: 13px;
      overflow: hidden;
      background:
        linear-gradient(180deg, transparent 60%, rgba(0,0,0,.72)),
        radial-gradient(circle at 58% 38%, #c8a88b 0 11%, transparent 12%),
        linear-gradient(150deg, #e9d9c7 0 36%, #8b6d55 37% 54%, #d9c3aa 55%);
      box-shadow: 0 12px 30px rgba(0,0,0,.25);
    }

    .video-box::after {
      content: "轻净 Pro 除螨仪";
      position: absolute;
      left: 12px;
      right: 12px;
      bottom: 15px;
      color: #fff;
      font-weight: 700;
      text-align: center;
    }

    .play {
      width: 52px;
      height: 52px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255,255,255,.42);
      border-radius: 50%;
      color: #fff;
      background: rgba(15,17,25,.45);
      font-size: 20px;
      backdrop-filter: blur(8px);
    }

    .video-controls { padding: 0 16px 16px; }
    .progress { height: 5px; border-radius: 99px; background: #373a46; overflow: hidden; }
    .progress span { display: block; width: 38%; height: 100%; background: #797cf4; }
    .time-row { display: flex; justify-content: space-between; margin-top: 7px; color: #858b9d; font-size: 11px; }

    .transcript {
      max-height: 490px;
      padding: 9px 15px 16px;
      overflow: auto;
    }

    .transcript-row {
      display: grid;
      grid-template-columns: 42px 1fr;
      gap: 9px;
      padding: 8px 0;
      color: #cbd0de;
      border-bottom: 1px solid #2b2e38;
    }

    .transcript-row span { color: #777e93; font-size: 11px; }
    .transcript-row.active { color: #fff; }
    .transcript-row.active span { color: #8c8fff; }

    .analysis-stack { display: grid; gap: 12px; }
    .analysis-body { padding: 14px 15px; color: #c8cdd9; }
    .analysis-body p { margin: 0 0 10px; }
    .tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
    .dark-tag { padding: 5px 8px; border-radius: 7px; color: #bbbff9; background: #2a2d43; font-size: 11px; }

    .storyboard {
      grid-column: 1 / -1;
      padding-bottom: 15px;
    }

    .shot-strip {
      display: grid;
      grid-template-columns: repeat(6, minmax(150px, 1fr));
      gap: 10px;
      padding: 14px;
      overflow: auto;
    }

    .shot {
      min-width: 150px;
      border: 1px solid #303440;
      border-radius: 10px;
      overflow: hidden;
      background: #1b1e26;
    }

    .shot-img {
      height: 96px;
      display: flex;
      align-items: flex-end;
      padding: 8px;
      background: linear-gradient(145deg, #7f6754, #d6c1aa 48%, #6f7d89);
    }

    .shot:nth-child(2) .shot-img { background: linear-gradient(145deg, #675163, #c9a5b4 50%, #a98d77); }
    .shot:nth-child(3) .shot-img { background: linear-gradient(145deg, #426165, #91b7b2 50%, #d2cbbd); }
    .shot:nth-child(4) .shot-img { background: linear-gradient(145deg, #867452, #e0cd96 50%, #6e6254); }
    .shot:nth-child(5) .shot-img { background: linear-gradient(145deg, #635b7b, #aaa0cf 50%, #e0d9cd); }
    .shot:nth-child(6) .shot-img { background: linear-gradient(145deg, #715759, #c99b91 50%, #eee1cc); }
    .shot-img span { padding: 3px 6px; border-radius: 5px; color: white; background: rgba(0,0,0,.45); font-size: 10px; }
    .shot-body { padding: 9px; color: #b9bfce; font-size: 11px; }
    .shot-body strong { display: block; margin-bottom: 4px; color: #f0f1f5; font-size: 12px; }

    /* 通用业务页 */
    .metric-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 13px;
      margin-bottom: 18px;
    }

    .metric-card {
      padding: 17px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
    }

    .metric-card span { color: var(--muted); font-size: 12px; }
    .metric-card strong { display: block; margin: 7px 0 2px; font-size: 24px; }
    .metric-card small { color: var(--green); }

    .tabs {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 5px;
      border-radius: 11px;
      background: #edeef4;
    }

    .tab {
      padding: 7px 12px;
      border: 0;
      border-radius: 8px;
      color: #6c7182;
      background: transparent;
      font-weight: 650;
    }

    .tab.active { color: var(--brand-strong); background: #fff; box-shadow: 0 3px 10px rgba(39,43,70,.08); }

    .filter-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 13px 15px;
      border-bottom: 1px solid var(--line);
    }

    .search {
      flex: 1;
      min-width: 180px;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 9px;
      outline: none;
    }

    .filter-select {
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 9px;
      color: #555a6b;
      background: #fff;
    }

    .asset-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      padding: 16px;
    }

    .library-card {
      border: 1px solid var(--line);
      border-radius: 13px;
      overflow: hidden;
      background: #fff;
      transition: .2s ease;
    }

    .library-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

    .library-cover {
      height: 120px;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      padding: 12px;
      background:
        radial-gradient(circle at 72% 28%, rgba(255,255,255,.85), transparent 12%),
        linear-gradient(135deg, #e5e6ff, #ccebf0);
    }

    .library-card:nth-child(2) .library-cover { background: linear-gradient(135deg, #fde7d8, #f3c5c5); }
    .library-card:nth-child(3) .library-cover { background: linear-gradient(135deg, #d8f1df, #c6dfe8); }
    .library-card:nth-child(4) .library-cover { background: linear-gradient(135deg, #efe3ff, #d5d6f5); }
    .library-card:nth-child(5) .library-cover { background: linear-gradient(135deg, #dce9ff, #f4e4bc); }
    .library-card:nth-child(6) .library-cover { background: linear-gradient(135deg, #d5efe6, #f1ded4); }
    .library-card:nth-child(7) .library-cover { background: linear-gradient(135deg, #eadbff, #c9e7f0); }
    .library-card:nth-child(8) .library-cover { background: linear-gradient(135deg, #ffe1d6, #e9debd); }

    .cover-type {
      padding: 4px 7px;
      border-radius: 7px;
      color: #fff;
      background: rgba(43, 46, 70, .55);
      font-size: 10px;
    }

    .library-info { padding: 12px; }
    .library-info strong { display: block; margin-bottom: 5px; }
    .library-info p { min-height: 38px; margin: 0 0 9px; color: var(--muted); font-size: 12px; }

    .table-wrap { overflow: auto; }
    table { width: 100%; border-collapse: collapse; }
    th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
    th { color: #777c8e; background: #fafafe; font-size: 11px; letter-spacing: .2px; }
    td { color: #444858; font-size: 13px; }
    tr:hover td { background: #fcfcff; }

    .product-cell { display: flex; align-items: center; gap: 9px; }
    .mini-thumb {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border-radius: 9px;
      color: var(--brand-strong);
      background: var(--brand-soft);
      font-size: 12px;
      font-weight: 800;
    }

    .two-col {
      display: grid;
      grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
      gap: 16px;
    }

    .todo-list { padding: 2px 15px 15px; }

    .todo {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 0;
      border-bottom: 1px solid var(--line);
    }

    .todo-dot {
      width: 9px;
      height: 9px;
      flex: 0 0 auto;
      margin-top: 6px;
      border-radius: 50%;
      background: var(--orange);
    }

    .todo strong { display: block; font-size: 13px; }
    .todo small { color: var(--muted); }

    .flow-card {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 8px;
      padding: 16px;
    }

    .flow-step {
      position: relative;
      padding: 14px 10px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #fbfbfe;
      text-align: center;
    }

    .flow-step:not(:last-child)::after {
      content: "→";
      position: absolute;
      right: -9px;
      top: 50%;
      z-index: 2;
      color: #a7aabd;
      transform: translateY(-50%);
    }

    .flow-step b {
      width: 29px;
      height: 29px;
      display: grid;
      place-items: center;
      margin: 0 auto 7px;
      border-radius: 9px;
      color: var(--brand-strong);
      background: var(--brand-soft);
    }

    .flow-step strong { display: block; font-size: 12px; }
    .flow-step small { color: var(--muted); font-size: 10px; }

    .lead-score {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #fff;
      background: var(--green);
      font-weight: 800;
    }

    /* 模态框和 Toast */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(20, 22, 35, .45);
      backdrop-filter: blur(4px);
    }

    .modal-backdrop.show { display: flex; }

    .modal {
      width: min(920px, 100%);
      height: min(820px, calc(100vh - 40px));
      max-height: calc(100vh - 40px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 24px 70px rgba(16, 18, 32, .24);
      animation: modalUp .22s ease;
    }

    @keyframes modalUp {
      from { opacity: 0; transform: translateY(10px) scale(.985); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .modal-head, .modal-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 17px 20px;
    }

    .modal-head { flex: 0 0 auto; border-bottom: 1px solid var(--line); }
    .modal-foot { flex: 0 0 auto; border-top: 1px solid var(--line); background: #fff; }
    .modal-foot-actions { display: flex; align-items: center; gap: 10px; }
    .modal-head h3 { margin: 0; font-size: 17px; }

    .close-btn {
      width: 32px;
      height: 32px;
      border: 0;
      border-radius: 8px;
      color: #74798b;
      background: #f2f3f7;
    }

    .modal-body { min-height: 0; padding: 18px 22px 24px; overflow-y: auto; }
    .modal-intro { margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
    .process-note {
      display: grid;
      grid-template-columns: 88px 1fr;
      gap: 10px;
      margin-bottom: 14px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #f5f5ff;
      color: #555a6c;
      font-size: 12px;
      line-height: 1.5;
    }
    .process-note strong { color: #5b5ee2; }
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .field.full { grid-column: 1 / -1; }
    .field label { display: block; margin-bottom: 6px; color: #555a6c; font-weight: 650; font-size: 12px; }
    .field input, .field select, .field textarea {
      width: 100%;
      padding: 10px 11px;
      border: 1px solid #dfe1e9;
      border-radius: 9px;
      outline: none;
      background: #fff;
    }
    .field input:focus, .field select:focus, .field textarea:focus { border-color: #9c9fef; box-shadow: 0 0 0 3px #eeeeff; }
    .field-hint { display: block; margin-top: 5px; color: #9195a3; font-size: 10px; line-height: 1.4; }
    .choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
    .choice-chip { padding: 7px 9px; border: 1px solid #dfe1e9; border-radius: 8px; color: #5e6272; background: #fff; font-size: 11px; }
    .choice-chip.active { border-color: #a8abef; color: #5759d5; background: #f3f3ff; }
    .field textarea { min-height: 78px; resize: vertical; }
    .form-section {
      grid-column: 1 / -1;
      padding: 16px;
      border: 1px solid #ececf3;
      border-radius: 14px;
      background: #fcfcfe;
    }
    .form-section + .form-section { margin-top: 2px; }
    .form-section-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 13px;
    }
    .form-section-head strong { display: block; color: #343746; font-size: 13px; }
    .form-section-head small { display: block; margin-top: 3px; color: #969aa9; font-size: 10px; }
    .section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .section-grid .full { grid-column: 1 / -1; }
    .field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
    .field-label-row label { margin: 0; }
    .text-action { border: 0; color: #6265df; background: transparent; font-size: 11px; }
    .smart-tip {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      padding: 10px 12px;
      border-radius: 10px;
      color: #686c7c;
      background: #f3f3ff;
      font-size: 11px;
      line-height: 1.5;
    }
    .smart-tip strong { color: #5659d6; white-space: nowrap; }
    .upload-box {
      min-height: 92px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 5px;
      padding: 16px;
      border: 1px dashed #cfd2e1;
      border-radius: 11px;
      color: #686c7d;
      background: #fff;
      text-align: center;
    }
    .upload-box strong { color: #4f5363; font-size: 12px; }
    .upload-box span { color: #999dab; font-size: 10px; }
    .input-with-unit { position: relative; }
    .input-with-unit input { padding-right: 46px; }
    .input-with-unit span {
      position: absolute;
      right: 12px;
      top: 50%;
      color: #8d91a0;
      font-size: 11px;
      transform: translateY(-50%);
    }
    .estimate-line { margin-top: 6px; color: #777c8c; font-size: 11px; }
    .material-summary {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: center;
      padding: 12px 14px;
      border: 1px solid #dcdef3;
      border-radius: 11px;
      background: #f7f7ff;
    }
    .material-summary strong { display: block; color: #414558; font-size: 12px; }
    .material-summary small { display: block; margin-top: 4px; color: #7f8394; font-size: 10px; }
    .material-summary b { color: #5b5ee2; font-size: 18px; }
    .material-scope-detail { grid-column: 1 / -1; }
    .conditional-slot { display: none; }
    .conditional-slot.show { display: block; }
    .advanced-block {
      grid-column: 1 / -1;
      border-top: 1px solid #e8e9f0;
      padding-top: 12px;
    }
    .advanced-block summary { color: #6265db; cursor: pointer; font-size: 12px; font-weight: 650; }
    .advanced-content { margin-top: 13px; }
    .source-tabs {
      display: inline-flex;
      gap: 3px;
      padding: 3px;
      border-radius: 10px;
      background: #f0f1f5;
    }
    .source-tab {
      padding: 7px 12px;
      border: 0;
      border-radius: 8px;
      color: #747888;
      background: transparent;
      font-size: 11px;
    }
    .source-tab.active {
      color: #5457d7;
      background: #fff;
      box-shadow: 0 2px 8px rgba(34, 37, 54, .08);
    }
    .product-source-panel { grid-column: 1 / -1; }
    .inline-control {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
    }
    .inline-control .soft-btn { height: 40px; white-space: nowrap; }
    .inline-feedback {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      margin-top: 9px;
      padding: 10px 12px;
      border: 1px solid #dfe1f4;
      border-radius: 10px;
      color: #666b7c;
      background: #f7f7ff;
      font-size: 11px;
      line-height: 1.5;
    }
    .inline-feedback.success { border-color: #ccebdc; color: #31765b; background: #f3fbf7; }
    .inline-feedback.error { border-color: #f4d0d0; color: #a64b4b; background: #fff6f6; }
    .quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
    .quick-tag {
      padding: 5px 8px;
      border: 1px solid #e0e2ea;
      border-radius: 7px;
      color: #6f7382;
      background: #fff;
      font-size: 10px;
    }
    .quick-tag.active { border-color: #aeb1ef; color: #575ad7; background: #f3f3ff; }
    .audience-box { display: flex; flex-wrap: wrap; gap: 7px; }
    .audience-chip {
      padding: 6px 9px;
      border: 1px solid #dfe1e9;
      border-radius: 8px;
      color: #626676;
      background: #fff;
      font-size: 10px;
    }
    .audience-chip.active { border-color: #a8abef; color: #5759d5; background: #f3f3ff; }
    .rewrite-audience-chip {
      padding: 7px 11px;
      border: 1px solid #dfe1e9;
      border-radius: 8px;
      color: #626676;
      background: #fff;
      font-size: 11px;
      cursor: pointer;
    }
    .rewrite-audience-chip:hover { border-color: #b9bbec; color: #5759d5; }
    .rewrite-audience-chip.active { border-color: #8e8fea; color: #5759d5; background: #f3f3ff; }
    .rewrite-audience-details { display: grid; gap: 9px; margin-top: 16px; }
    .rewrite-audience-details textarea { min-height: 74px; }
    .rewrite-strategy-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
    .rewrite-strategy-title strong { font-size: 13px; color: #242735; }
    .rewrite-strategy-title span { font-size: 10px; color: #9a9dac; }
    .preset-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
    .context-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #31765b;
      font-size: 11px;
    }
    .context-badge::before {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #3cb981;
      content: "";
    }
    .field-validation {
      margin-top: 5px;
      color: #c44f4f;
      font-size: 10px;
    }
    .field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #db7777; box-shadow: 0 0 0 3px #fff0f0; }
    .upload-box { cursor: pointer; transition: .18s ease; }
    .upload-box:hover { border-color: #aeb1ef; background: #f8f8ff; }
    .upload-box.selected { border-style: solid; border-color: #9ed7bb; color: #31765b; background: #f4fbf7; }
    button:disabled { cursor: not-allowed; opacity: .55; }

    @media (max-width: 720px) {
      .modal-backdrop { padding: 0; align-items: flex-end; }
      .modal { width: 100%; height: 94vh; max-height: 94vh; border-radius: 18px 18px 0 0; }
      .form-grid, .section-grid { grid-template-columns: 1fr; }
      .field.full, .section-grid .full { grid-column: 1; }
      .modal-foot { align-items: stretch; }
      .modal-foot-actions { margin-left: auto; }
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: 28px;
      z-index: 100;
      padding: 11px 16px;
      border-radius: 10px;
      color: #fff;
      background: #242735;
      box-shadow: 0 12px 30px rgba(0,0,0,.2);
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, 12px);
      transition: .25s ease;
    }

    .toast.show { opacity: 1; transform: translate(-50%, 0); }

    .mobile-toggle { display: none; }

    /* ========== 千川智能投放 ========== */

    /* 全局账户选择器 */
    .account-switcher { position: relative; }
    .account-trigger {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
      color: #4e5263;
      background: #fff;
      font-weight: 600;
      font-size: 13px;
    }
    .account-trigger:hover { border-color: #c8cbd8; }
    .account-trigger .account-label { color: #8a8fa1; font-size: 11px; font-weight: 500; }
    .account-trigger .account-name { color: #202231; font-size: 13px; }
    .account-trigger .account-star { color: #f5b73a; font-size: 12px; }
    .account-trigger .account-star.off { color: #d6d9e3; }
    .account-trigger .account-arrow { color: #8a8fa1; font-size: 11px; }
    .main.pull-mode .account-trigger { color: #cbd0de; border-color: #383b49; background: #22252f; }
    .main.pull-mode .account-trigger .account-name { color: #eef0f8; }

    .account-dropdown {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      z-index: 70;
      display: none;
      width: 360px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 12px 36px rgba(34, 38, 67, .15);
    }
    .account-switcher.open .account-dropdown { display: block; }
    .account-search {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
    }
    .account-search input[type="text"] {
      flex: 1;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      outline: none;
      font-size: 12px;
    }
    .account-search input[type="text"]:focus { border-color: #9c9fef; }
    .star-filter {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 6px 9px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: #6b7088;
      font-size: 11px;
      cursor: pointer;
      white-space: nowrap;
    }
    .account-list {
      max-height: 360px;
      overflow-y: auto;
      padding: 2px 0;
    }
    .account-row {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 8px 8px;
      border-radius: 8px;
      cursor: pointer;
      transition: .15s ease;
    }
    .account-row:hover { background: #f5f6fa; }
    .account-row.active { background: #f0f1ff; }
    .account-row .star-toggle {
      width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      border: 0;
      background: transparent;
      color: #d6d9e3;
      font-size: 14px;
      cursor: pointer;
    }
    .account-row .star-toggle.on { color: #f5b73a; }
    .account-row .info strong { display: block; font-size: 13px; color: #202231; }
    .account-row .info small { color: #8a8fa1; font-size: 11px; }
    .account-row .status {
      display: inline-block;
      padding: 2px 6px;
      border-radius: 4px;
      color: #19855d;
      background: #e7f6ef;
      font-size: 10px;
    }
    .account-row .status.expire-soon { color: #b56b1a; background: #fff3df; }
    .account-row .status.expired { color: #c14545; background: #fde7e7; }
    .account-foot {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid var(--line);
      text-align: right;
    }

    /* 计划总览 */
    .promo-page { padding: 26px 28px 44px; }
    .promo-tabs {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-bottom: 16px;
    }
    .promo-tab {
      padding: 8px 16px;
      border: 0;
      border-radius: 9px;
      color: #6b7088;
      background: #f0f1f5;
      font-weight: 600;
      font-size: 13px;
    }
    .promo-tab.active { color: #fff; background: #5b5ce2; }
    .promo-tab .count {
      display: inline-block;
      margin-left: 4px;
      padding: 0 6px;
      border-radius: 8px;
      color: #fff;
      background: rgba(255,255,255,.25);
      font-size: 10px;
    }
    .promo-tab:not(.active) .count { color: #6b7088; background: #e0e2ec; }

    .promo-toolbar {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 14px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
    }
    .promo-toolbar .seg {
      display: inline-flex;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f5f6fa;
    }
    .promo-toolbar .seg button {
      padding: 6px 12px;
      border: 0;
      border-radius: 6px;
      color: #6b7088;
      background: transparent;
      font-size: 12px;
    }
    .promo-toolbar .seg button.active { color: #fff; background: #5b5ce2; }
    .promo-toolbar select, .promo-toolbar input[type="text"] {
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font-size: 12px;
    }
    .promo-toolbar input[type="text"] { flex: 1; min-width: 200px; }
    .promo-toolbar .right { margin-left: auto; display: flex; gap: 8px; }

    .promo-table {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      overflow: auto;
    }
    .promo-table table { width: 100%; min-width: 1500px; border-collapse: collapse; font-size: 12px; }
    .promo-table thead th {
      position: sticky;
      top: 0;
      z-index: 5;
      padding: 11px 10px;
      color: #555a6d;
      background: #fafbff;
      border-bottom: 1px solid var(--line);
      text-align: left;
      font-weight: 600;
      font-size: 12px;
      white-space: nowrap;
    }
    .promo-table thead th .info-icon {
      display: inline-grid;
      place-items: center;
      width: 14px;
      height: 14px;
      margin-left: 4px;
      border-radius: 50%;
      color: #8a8fa1;
      background: #e7e9f0;
      font-size: 9px;
      font-weight: 700;
      cursor: help;
      vertical-align: middle;
    }
    .promo-table tbody td {
      padding: 10px;
      color: #4a4f63;
      border-bottom: 1px solid #f0f1f7;
      white-space: nowrap;
    }
    .promo-table tbody tr:hover { background: #fafbff; }
    .promo-table tfoot td {
      padding: 12px 10px;
      color: #202231;
      background: #f5f6ff;
      font-weight: 700;
      border-top: 1px solid #c8cbe0;
    }
    .promo-table .num-strong { color: #202231; font-weight: 700; }
    .promo-table .name-link { color: #5b5ce2; font-weight: 600; cursor: pointer; }
    .promo-table .name-link:hover { text-decoration: underline; }
    .promo-table .acc-link { color: #5b5ce2; cursor: pointer; }
    .promo-table .acc-link:hover { text-decoration: underline; }
    .promo-table .plan-status {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 4px;
      color: #19855d;
      background: #e7f6ef;
      font-size: 11px;
    }
    .promo-table .plan-status.paused { color: #b56b1a; background: #fff3df; }
    .promo-table .plan-status.ended { color: #6b7088; background: #eef0f7; }
    .promo-table .rule-tag {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 7px;
      border-radius: 4px;
      color: #4647c8;
      background: #eeefff;
      font-size: 11px;
    }
    .promo-table .rule-tag.custom { color: #7a3eaf; background: #f4eafa; }
    .promo-table .rule-tag.whitelist { color: #19855d; background: #e7f6ef; }
    .promo-table .status-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #16a778;
    }
    .promo-table .status-dot.off { background: #cbd0de; }
    .promo-table .status-dot.pause { background: #f5b73a; }
    .promo-table .warn-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #e55353;
      margin-right: 4px;
    }
    .promo-table .row-act { display: inline-flex; gap: 4px; }
    .promo-table .row-act button {
      width: 26px;
      height: 26px;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 6px;
      color: #6b7088;
      background: #fff;
      font-size: 12px;
    }
    .promo-table .row-act button:hover { color: #5b5ce2; border-color: #b8baf2; }
    .promo-table .row-act .pause:hover { color: #b56b1a; border-color: #f0c98a; }
    .promo-table .row-act .resume:hover { color: #19855d; border-color: #98dfc4; }
    .promo-table .row-act .copy:hover { color: #20b8cd; border-color: #98d5dc; }
    .promo-table .row-act .del:hover { color: #c14545; border-color: #f0b6b6; }
    .promo-table .star-mini {
      cursor: pointer;
      color: #d6d9e3;
      font-size: 14px;
    }
    .promo-table .star-mini.on { color: #f5b73a; }

    /* 申诉中心 */
    .quota-card-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }
    .quota-card {
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
    }
    .quota-card .label { color: #8a8fa1; font-size: 12px; }
    .quota-card .value { display: block; margin-top: 6px; color: #202231; font-size: 22px; font-weight: 700; }
    .quota-card .sub { display: block; margin-top: 4px; color: #6b7088; font-size: 11px; }
    .quota-card.warn { border-color: #f0c98a; background: #fff8ed; }
    .quota-card.warn .value { color: #b56b1a; }
    .quota-card.danger { border-color: #f0b6b6; background: #fdecec; }
    .quota-card.danger .value { color: #c14545; }

    .quota-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .quota-table th, .quota-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
    .quota-table th { color: #555a6d; background: #fafbff; font-weight: 600; font-size: 12px; }
    .quota-bar {
      width: 140px;
      height: 6px;
      border-radius: 99px;
      background: #eef0f7;
      overflow: hidden;
    }
    .quota-bar span {
      display: block;
      height: 100%;
      background: linear-gradient(90deg, #797cf4, #4cb6e4);
    }
    .quota-bar.warn span { background: linear-gradient(90deg, #f5b73a, #ff8a3d); }
    .quota-bar.danger span { background: linear-gradient(90deg, #c14545, #e55353); }
    .quota-tiny-stats { color: #6b7088; font-size: 11px; }

    .appeal-table { width: 100%; border-collapse: collapse; font-size: 12px; }
    .appeal-table th, .appeal-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #f0f1f7; }
    .appeal-table th { color: #555a6d; background: #fafbff; font-weight: 600; font-size: 12px; }
    .appeal-table .res-ok { color: #19855d; font-weight: 600; }
    .appeal-table .res-fail { color: #c14545; font-weight: 600; }
    .appeal-table .res-err { color: #b56b1a; font-weight: 600; }

    /* 视频信息复合单元 */
    .video-cell { display: flex; align-items: center; gap: 8px; }
    .video-cell .thumb {
      width: 34px;
      aspect-ratio: 9 / 16;
      flex: 0 0 auto;
      box-sizing: border-box;
      display: grid;
      place-items: end;
      padding: 3px 5px;
      border-radius: 5px;
      color: #fff;
      font-size: 9px;
      background: linear-gradient(145deg, #b89a82, #e2c9b1 50%, #8a7666);
    }
    .video-cell .vinfo strong { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #202231; }
    .video-cell .vinfo small { color: #8a8fa1; font-size: 10px; }

    .status-chip {
      display: inline-block;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
    }
    .status-chip.auditing { color: #4d6bd6; background: #eaf0ff; }
    .status-chip.approved { color: #19855d; background: #e7f6ef; }
    .status-chip.rejected { color: #c14545; background: #fde7e7; }
    .status-chip.appealing { color: #b56b1a; background: #fff3df; }
    .status-chip.restored { color: #19855d; background: #e7f6ef; }
    .status-chip.appealfail { color: #c14545; background: #fde7e7; }
    .status-chip.manual { color: #b56b1a; background: #fff3df; }
    .status-chip.unappeal { color: #6b7088; background: #eef0f7; }

    /* 批量建计划 步骤条 */
    .batch-shell {
      max-width: 1100px;
      margin: 0 auto;
      padding: 26px 28px 44px;
    }
    .batch-steps {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 22px;
    }
    .batch-step {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      border: 1px solid var(--line);
      border-radius: 999px;
      color: #6b7088;
      background: #fff;
      font-size: 12px;
    }
    .batch-step .num {
      width: 18px;
      height: 18px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #6b7088;
      background: #eef0f7;
      font-size: 11px;
      font-weight: 700;
    }
    .batch-step.active { color: #5b5ce2; border-color: #5b5ce2; background: #f3f3ff; }
    .batch-step.active .num { color: #fff; background: #5b5ce2; }
    .batch-step.done { color: #19855d; border-color: #b8e6d2; background: #f0faf5; }
    .batch-step.done .num { color: #fff; background: #16a778; }
    .batch-step-line { width: 22px; height: 1px; background: #d6d9e3; }
    .batch-step-line.done { background: #16a778; }
    .batch-card {
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      padding: 22px 24px;
    }
    .batch-card h3 { margin: 0 0 6px; font-size: 16px; }
    .batch-card .step-hint { color: #6b7088; font-size: 12px; margin-bottom: 16px; }
    .mode-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }
    .mode-card {
      padding: 18px;
      border: 2px solid var(--line);
      border-radius: 12px;
      cursor: pointer;
      transition: .18s ease;
    }
    .mode-card:hover { border-color: #b8baf2; }
    .mode-card.selected { border-color: #5b5ce2; background: #f7f7ff; }
    .mode-card .ic {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      border-radius: 9px;
      color: #fff;
      background: linear-gradient(135deg, #5b5ce2, #7a78e0);
      font-size: 18px;
      margin-bottom: 10px;
    }
    .mode-card .ic.b { background: linear-gradient(135deg, #ff8a3d, #ff7a59); }
    .mode-card .ic.c { background: linear-gradient(135deg, #20b8cd, #4cb6e4); }
    .mode-card strong { display: block; font-size: 14px; }
    .mode-card small { color: #8a8fa1; font-size: 11px; }

    .batch-fields {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .batch-fields .full { grid-column: 1 / -1; }
    .batch-fields label { display: block; margin-bottom: 6px; color: #555a6d; font-weight: 600; font-size: 12px; }
    .batch-fields input, .batch-fields select, .batch-fields textarea {
      width: 100%;
      padding: 9px 11px;
      border: 1px solid #dfe1e9;
      border-radius: 9px;
      outline: none;
      font: inherit;
    }
    .batch-fields input:focus { border-color: #9c9fef; box-shadow: 0 0 0 3px #eeeeff; }
    .batch-fields .hint { display: block; margin-top: 4px; color: #9195a3; font-size: 10px; }
    .batch-fields .toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 9px;
    }
    .toggle-switch {
      position: relative;
      width: 36px;
      height: 20px;
      border-radius: 99px;
      background: #d6d9e3;
      cursor: pointer;
      transition: .2s;
    }
    .toggle-switch::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #fff;
      transition: .2s;
    }
    .toggle-switch.on { background: #5b5ce2; }
    .toggle-switch.on::after { left: 18px; }

    .mode-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f5f6fa; }
    .mode-toggle button { padding: 7px 12px; border: 0; border-radius: 7px; color: #6b7088; background: transparent; font-size: 12px; }
    .mode-toggle button.active { color: #5b5ce2; background: #fff; box-shadow: 0 2px 6px rgba(91,92,226,.12); }

    .preview-list { display: grid; gap: 8px; }
    .preview-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: #fafbff;
    }
    .preview-item .ic-sm {
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      border-radius: 6px;
      color: #fff;
      background: #5b5ce2;
      font-size: 12px;
    }

    .batch-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 18px;
      padding-top: 18px;
      border-top: 1px solid var(--line);
    }

    .batch-mode3 {
      display: grid;
      grid-template-columns: 200px 1fr;
      gap: 14px;
      align-items: start;
    }
    .product-pick-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fafbff;
    }
    .product-pick-card .cover {
      width: 50px;
      height: 50px;
      display: grid;
      place-items: center;
      border-radius: 6px;
      color: #fff;
      font-size: 11px;
      background: linear-gradient(135deg, #5b5ce2, #7a78e0);
    }

    .material-pick {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }
    .material-pick .mp-card {
      padding: 14px;
      border: 2px solid var(--line);
      border-radius: 11px;
      cursor: pointer;
      transition: .15s ease;
    }
    .material-pick .mp-card.selected { border-color: #5b5ce2; background: #f3f3ff; }
    .material-pick .mp-card .ic2 {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border-radius: 7px;
      color: #fff;
      background: linear-gradient(135deg, #20b8cd, #4cb6e4);
      font-size: 14px;
      margin-bottom: 8px;
    }
    .material-pick .mp-card.required { border-color: #b8baf2; background: #f7f7ff; }
    .material-pick .mp-card .tag-required { color: #5b5ce2; font-size: 10px; font-weight: 700; }

    /* 关停规则库 */
    .rules-page { padding: 26px 28px 44px; }
    .promotion-config-tabs {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 4px;
      margin: 0 0 20px;
      background: #f2f2f4;
      border: 1px solid #e7e7ea;
      border-radius: 10px;
    }
    .promotion-config-tab {
      border: 0;
      background: transparent;
      color: #74747c;
      padding: 7px 12px;
      border-radius: 7px;
      font: inherit;
      font-size: 13px;
      cursor: pointer;
      transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    }
    .promotion-config-tab:hover { color: #24252b; }
    .promotion-config-tab.active {
      color: #202126;
      background: #fff;
      box-shadow: 0 1px 3px rgba(20,20,27,.1);
      font-weight: 600;
    }
    .rules-tabs { display: flex; gap: 4px; margin-bottom: 18px; }
    .rules-tab {
      padding: 7px 14px;
      border: 0;
      border-radius: 8px;
      color: #6b7088;
      background: #f0f1f5;
      font-weight: 600;
      font-size: 12px;
    }
    .rules-tab.active { color: #fff; background: #5b5ce2; }
    .rule-template-list { display: grid; gap: 10px; }
    .rule-template {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 14px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 11px;
      background: #fff;
      align-items: center;
    }
    .rule-template .meta strong { display: block; color: #202231; font-size: 14px; }
    .rule-template .meta small { color: #8a8fa1; font-size: 11px; }
    .rule-template .meta .pill {
      display: inline-block;
      padding: 2px 7px;
      border-radius: 4px;
      color: #5b5ce2;
      background: #eeefff;
      font-size: 10px;
      margin-right: 6px;
    }
    .rule-template .actions { display: flex; gap: 6px; }
    .rule-template .actions button {
      padding: 6px 10px;
      border: 1px solid var(--line);
      border-radius: 7px;
      color: #6b7088;
      background: #fff;
      font-size: 11px;
    }

    /* 广告主管理 */
    .accounts-page { padding: 26px 28px 44px; }
    .accounts-stats {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 18px;
    }
    .accounts-stats .stat {
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
    }
    .accounts-stats .stat .v { display: block; margin-top: 4px; color: #202231; font-size: 22px; font-weight: 700; }
    .accounts-stats .stat .l { color: #8a8fa1; font-size: 12px; }

    .acc-list-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      overflow: hidden;
      margin-bottom: 18px;
    }
    .acc-list-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
    }
    .acc-row {
      display: grid;
      grid-template-columns: 28px minmax(0, 1.4fr) 100px 90px 80px 80px 90px auto;
      gap: 12px;
      align-items: center;
      padding: 12px 14px;
      border-bottom: 1px solid #f0f1f7;
      font-size: 13px;
    }
    .acc-row:last-child { border-bottom: 0; }
    .acc-row .star-mini { font-size: 16px; }
    .acc-row strong { color: #202231; font-size: 13px; }
    .acc-row small { color: #8a8fa1; font-size: 11px; }
    .acc-row .pill {
      display: inline-block;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 10px;
    }
    .acc-row .pill.green { color: #19855d; background: #e7f6ef; }
    .acc-row .pill.orange { color: #b56b1a; background: #fff3df; }
    .acc-row .pill.red { color: #c14545; background: #fde7e7; }
    .acc-row .pill.blue { color: #4647c8; background: #eeefff; }
    .acc-row .row-act { display: flex; gap: 4px; }
    .acc-row .row-act button {
      padding: 5px 9px;
      border: 1px solid var(--line);
      border-radius: 6px;
      color: #6b7088;
      background: #fff;
      font-size: 11px;
    }
    .acc-row .row-act button.primary-act { color: #5b5ce2; border-color: #b8baf2; }

    .wl-block {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      overflow: hidden;
    }
    .wl-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      cursor: pointer;
    }
    .wl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
    .wl-table th, .wl-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f0f1f7; }
    .wl-table th { color: #555a6d; background: #fafbff; font-size: 11px; }
    .wl-table .expired { color: #c14545; font-weight: 600; }
    .wl-table .soon { color: #b56b1a; font-weight: 600; }

    /* 同步配置 */
    .sync-page { padding: 26px 28px 44px; max-width: 920px; }
    .sync-section {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      padding: 20px 22px;
      margin-bottom: 16px;
    }
    .sync-section h3 { margin: 0 0 4px; font-size: 15px; }
    .sync-section .sh { color: #6b7088; font-size: 12px; margin-bottom: 16px; }
    .sync-form .row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; padding: 8px 0; }
    .sync-form .row label { color: #555a6d; font-size: 13px; font-weight: 600; }
    .sync-form .row .ctrl input, .sync-form .row .ctrl select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
    .sync-form .row .ctrl .hint { color: #8a8fa1; font-size: 11px; margin-top: 4px; }

    /* 弹层共用：白名单/规则配置 */
    .cfg-modal { width: min(540px, 100%); }
    .cfg-modal .modal-body { padding: 18px 22px; }
    .cfg-form .row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; padding: 9px 0; }
    .cfg-form .row.t { align-items: start; }
    .cfg-form .row label { color: #555a6d; font-size: 13px; font-weight: 600; }
    .cfg-form .row input, .cfg-form .row select, .cfg-form .row textarea {
      width: 100%;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      font: inherit;
    }
    .cfg-form .row .hint { color: #8a8fa1; font-size: 11px; margin-top: 4px; }
    .cfg-form .row .seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f5f6fa; }
    .cfg-form .row .seg button { padding: 6px 12px; border: 0; border-radius: 6px; color: #6b7088; background: transparent; font-size: 12px; }
    .cfg-form .row .seg button.active { color: #5b5ce2; background: #fff; }

    /* RPA 弹窗 */
    .rpa-modal { width: min(520px, 100%); }
    .rpa-progress {
      position: relative;
      height: 8px;
      border-radius: 99px;
      background: #eef0f7;
      overflow: hidden;
      margin: 6px 0 8px;
    }
    .rpa-progress span {
      display: block;
      height: 100%;
      background: linear-gradient(90deg, #797cf4, #4cb6e4);
      transition: width .25s ease;
    }
    .rpa-log {
      max-height: 200px;
      overflow-y: auto;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fafbff;
      font-size: 12px;
      font-family: ui-monospace, "SF Mono", monospace;
    }
    .rpa-log .ln { display: flex; gap: 8px; padding: 2px 0; }
    .rpa-log .ln .t { color: #8a8fa1; }
    .rpa-log .ln .ok { color: #19855d; }
    .rpa-log .ln .fail { color: #c14545; }
    .rpa-log .ln .err { color: #b56b1a; }

    /* 响应式 */
    /* 智能拉片结果页：与内容罗盘统一的轻量分析界面 */
    #page-pull .dark-editor {
      min-height: 100vh;
      padding: 28px clamp(20px, 2.8vw, 46px) 56px;
      color: #353946;
      background:
        radial-gradient(circle at 88% 0%, rgba(139, 102, 255, .09), transparent 26%),
        radial-gradient(circle at 28% 3%, rgba(255, 207, 184, .12), transparent 24%),
        #f8f8fa;
    }
    #page-pull .pull-result-head { max-width: 1440px; margin: 0 auto 18px; padding: 0 2px; }
    #page-pull .pull-result-head .title-block { gap: 11px; }
    #page-pull .pull-result-head h1 { color: #262a36; font-size: 22px; letter-spacing: -.35px; }
    #page-pull .pull-result-head h1 small { color: #9b9fad; }
    #page-pull .pull-result-head .download-link { color: #7656e9; }
    #page-pull .pull-result-head .meta-line { padding: 7px 10px; border: 1px solid #e5e6ec; border-radius: 999px; color: #989daa; background: rgba(255,255,255,.74); }
    #page-pull .pull-result-head .meta-line b { color: #606676; }
    #page-pull .dark-button {
      border-color: #e1e3e9;
      border-radius: 9px;
      color: #5c6170;
      background: #fff;
      box-shadow: 0 2px 7px rgba(30, 32, 42, .035);
      transition: border-color .16s ease, color .16s ease, transform .16s ease;
    }
    #page-pull .dark-button:hover { border-color: #c9bbff; color: #6f52dc; transform: translateY(-1px); }
    #page-pull .pull-grid { max-width: 1440px; margin: 0 auto; gap: 16px; }
    #page-pull .dark-card {
      border-color: #e4e6eb;
      border-radius: 16px;
      background: rgba(255,255,255,.94);
      box-shadow: 0 8px 26px rgba(31, 35, 49, .045);
    }
    #page-pull .dark-card-head { min-height: 51px; padding: 0 16px; border-bottom-color: #eef0f3; }
    #page-pull .dark-card-head strong { color: #373b47; font-size: 14px; }
    #page-pull .dark-card-head span { color: #9297a5; }
    #page-pull .video-box { box-shadow: 0 12px 28px rgba(55, 42, 35, .2); }
    #page-pull .video-controls { padding-bottom: 17px; }
    #page-pull .progress { background: #eceef3; }
    #page-pull .progress span { background: linear-gradient(90deg, #9c7cff, #755ce5); }
    #page-pull .time-row { color: #969ba8; }
    #page-pull .transcript { padding: 8px 16px 16px; scrollbar-width: thin; scrollbar-color: #d9dbe3 transparent; }
    #page-pull .transcript-row { color: #606674; border-bottom-color: #f0f1f4; cursor: pointer; transition: background .14s ease, color .14s ease; }
    #page-pull .transcript-row:hover { margin: 0 -6px; padding-left: 6px; padding-right: 6px; border-radius: 7px; background: #f7f5ff; }
    #page-pull .transcript-row span { color: #a5a9b4; }
    #page-pull .transcript-row.active { color: #443587; font-weight: 650; }
    #page-pull .transcript-row.active span { color: #795fea; }
    #page-pull .analysis-body { color: #606674; }
    #page-pull .script-field { border-bottom-color: #eef0f3; }
    #page-pull .script-field .label { color: #979ca9; }
    #page-pull .script-field .label .count { color: #6d51dc; background: #eeeaff; }
    #page-pull .script-field .value { color: #565c6a; }
    #page-pull .script-field .value .plain { color: #555b69; }
    #page-pull .script-field .value .chip { color: #5d5a75; background: #f2f1f7; }
    #page-pull .script-field .value .chip:hover { color: #6043cf; background: #ece7ff; }
    #page-pull .script-field .value .chip.hot { color: #b45f3d; background: #fff0e8; }
    #page-pull .scene-group { border-bottom-color: #eef0f3; }
    #page-pull .scene-group .scene-label { color: #606674; }
    #page-pull .scene-group .scene-label::after { color: #775ae4; }
    #page-pull .scene-group .scene-strip { scrollbar-width: none; }
    #page-pull .scene-group .scene-strip::-webkit-scrollbar { width: 0; height: 0; }
    #page-pull .storyboard-tabs { gap: 6px; }
    #page-pull .storyboard-tabs .tab-mini { border-radius: 8px; color: #9297a5; }
    #page-pull .storyboard-tabs .tab-mini.active { color: #694bd8; background: #eeeaff; }
    #page-pull .shot-grid { gap: 14px; padding: 16px; }
    #page-pull .shot-card { border-color: #e5e7ec; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(31, 35, 49, .035); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
    #page-pull .shot-card:hover { border-color: #cbbfff; box-shadow: 0 10px 22px rgba(82, 62, 170, .1); transform: translateY(-2px); }
    #page-pull .shot-card .shot-body { color: #707684; }
    #page-pull .shot-card .shot-body .tags .tag { color: #ad6245; background: #fff0ea; }
    #page-pull .shot-card .shot-body .tags .tag.green { color: #34825d; background: #e8f7ef; }
    #page-pull .shot-card .shot-body .tags .tag.purple { color: #7055d7; background: #efebff; }
    #page-pull .shot-card .shot-body .divider { background: #eef0f3; }
    #page-pull .shot-card .shot-body .script-text { color: #515866; }
    #page-pull .shot-card .shot-body .meta-row,
    #page-pull .shot-card .shot-body .camera-line { color: #9aa0ad; }
    #page-pull .shot-card .shot-body .meta-row b { color: #6d7280; }
    #page-pull .frame-strip { color: #69707d; }
    #page-pull .frame-strip .frame-summary { color: #626876; }
    #page-pull .frame-strip .frame-summary b { color: #7357e0; }
    #page-pull .frame-strip .frame-bar { background: #f0f1f5; }
    #page-pull .frame-strip .frame-axis { color: #9ca1ad; }

    @media (max-width: 1180px) {
      .quota-card-grid { grid-template-columns: repeat(2, 1fr); }
      .accounts-stats { grid-template-columns: repeat(2, 1fr); }
      .batch-fields { grid-template-columns: 1fr; }
      .batch-mode3 { grid-template-columns: 1fr; }
      .mode-cards { grid-template-columns: 1fr; }
      .material-pick { grid-template-columns: 1fr; }
    }
    @media (max-width: 860px) {
      .promo-tabs { flex-wrap: wrap; }
      .promo-toolbar { flex-direction: column; align-items: stretch; }
      .promo-toolbar .right { margin-left: 0; }
      .quota-card-grid { grid-template-columns: 1fr; }
      .accounts-stats { grid-template-columns: 1fr; }
    }

    /* 智能拉片·入口页 */
    .pull-entry {
      padding: 32px clamp(24px, 3vw, 48px) 60px;
      min-height: 100vh;
      background: var(--canvas);
    }

    .pull-entry-shell {
      width: 100%;
      max-width: none;
      margin: 0;
      padding: clamp(28px, 3vw, 44px) clamp(24px, 4vw, 64px) 32px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: #fff;
      box-shadow: var(--shadow);
    }

    .pull-entry-head {
      position: relative;
      text-align: center;
      margin-bottom: 28px;
    }

    .pull-entry-head h1 {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 0;
      font-size: 28px;
      font-weight: 800;
    }

    .pull-entry-head h1::after {
      content: "✦";
      color: #ffb84a;
      font-size: 18px;
    }

    .pull-entry-head p {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .pull-entry-top-actions {
      position: absolute;
      right: 0;
      top: 6px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .text-btn {
      padding: 7px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: #5a5f72;
      background: #fff;
      font-size: 12px;
    }

    .text-btn:hover { border-color: #c8cbd8; color: var(--brand); }

    .source-tabs {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #f5f6fa;
      margin-bottom: 14px;
    }

    .source-tab {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border: 0;
      border-radius: 9px;
      color: #6b7088;
      background: transparent;
      font-weight: 600;
      font-size: 12px;
    }

    .source-tab.active {
      color: #5b5ce2;
      background: #fff;
      box-shadow: 0 3px 8px rgba(91, 92, 226, .12);
    }

    .pull-input-area {
      position: relative;
      min-height: 130px;
      padding: 14px 16px 50px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fafbff;
    }

    .pull-input-area:focus-within {
      border-color: #9c9fef;
      box-shadow: 0 0 0 3px #eeeeff;
    }

    .pull-input-area textarea {
      width: 100%;
      min-height: 80px;
      padding: 0;
      border: 0;
      outline: 0;
      color: var(--ink);
      background: transparent;
      font: inherit;
      resize: vertical;
    }

    .pull-input-area textarea::placeholder { color: #a0a4b6; }

    .pull-input-area .link-error {
      display: none;
      margin-top: 6px;
      color: #c14545;
      font-size: 11px;
    }

    .pull-input-area.has-error { border-color: #f0b6b6; background: #fff7f7; }
    .pull-input-area.has-error .link-error { display: block; }

    .pull-input-foot {
      position: absolute;
      right: 12px;
      bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ghost-mini {
      padding: 6px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: #6b7088;
      background: #fff;
      font-size: 12px;
    }

    .primary-mini {
      padding: 6px 14px;
      border: 0;
      border-radius: 8px;
      color: #fff;
      background: linear-gradient(135deg, #ff9d6c, #ff7a59);
      font-weight: 600;
      font-size: 12px;
      box-shadow: 0 6px 14px rgba(255, 122, 89, .28);
    }

    .primary-mini:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

    .video-list-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 22px 0 12px;
      color: #4a4f63;
      font-size: 13px;
    }

    .video-list-head .counter { color: #8a8fa1; }
    .video-list-head .counter b { color: #5b5ce2; font-weight: 700; }

    .video-list {
      display: grid;
      gap: 10px;
    }

    .video-list.empty .empty-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px 0;
      color: #9da2b6;
      font-size: 12px;
    }

    .empty-state { display: none; }
    .empty-state svg { margin-bottom: 10px; opacity: .6; }

    .video-row {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fbfbfe;
      transition: .18s ease;
    }

    .video-row:hover { border-color: #c8cbe0; background: #fff; }

    .video-row .thumb {
      width: 48px;
      aspect-ratio: 9 / 16;
      box-sizing: border-box;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: #fff;
      font-size: 10px;
      background: linear-gradient(145deg, #b89a82, #e2c9b1 50%, #8a7666);
    }

    .video-row .meta { min-width: 0; }
    .video-row .meta strong {
      display: block;
      color: var(--ink);
      font-size: 13px;
      font-weight: 650;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .video-row .meta small {
      display: block;
      margin-top: 3px;
      color: #8a8fa1;
      font-size: 11px;
    }
    .video-row .status {
      display: inline-block;
      margin-top: 4px;
      padding: 2px 7px;
      border-radius: 999px;
      color: #6b7088;
      background: #eef0f7;
      font-size: 10px;
    }
    .video-row .status.parsing { color: #4d6bd6; background: #eaf0ff; }
    .video-row .status.done { color: #19855d; background: #e7f6ef; }
    .video-row .status.fail { color: #c14545; background: #fde7e7; }
    .video-row .row-actions { display: flex; align-items: center; gap: 6px; }
    .video-row .row-actions button {
      padding: 5px 9px;
      border: 1px solid var(--line);
      border-radius: 7px;
      color: #6b7088;
      background: #fff;
      font-size: 11px;
    }
    .video-row .row-actions button.icon-only {
      width: 26px;
      height: 26px;
      padding: 0;
      display: grid;
      place-items: center;
    }
    .video-row .row-actions .retry:hover { color: #5b5ce2; border-color: #b8baf2; }
    .video-row .row-actions .delete:hover { color: #c14545; border-color: #f0b6b6; }

    .pull-entry-foot {
      margin-top: 28px;
      text-align: center;
    }

    .start-parse-btn {
      display: inline-flex;
      align-items: center;
      gap: 14px;
      padding: 14px 36px;
      border: 0;
      border-radius: 14px;
      color: #fff;
      background: linear-gradient(135deg, #ffb186, #ff7a59);
      font-weight: 700;
      font-size: 15px;
      box-shadow: 0 12px 28px rgba(255, 122, 89, .35);
      transition: .2s ease;
    }

    .start-parse-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(255, 122, 89, .42); }
    .start-parse-btn:disabled { background: #e0e2ec; color: #a0a4b6; box-shadow: none; cursor: not-allowed; transform: none; }

    .start-parse-btn .estimate { font-weight: 500; font-size: 12px; opacity: .85; }
    .start-parse-btn .estimate b { color: #fff; font-weight: 700; }

    .copyright-note {
      margin-top: 22px;
      padding: 10px 16px;
      border: 1px solid var(--line);
      border-radius: 10px;
      color: #6b7088;
      background: #fafbff;
      font-size: 11px;
      line-height: 1.6;
      text-align: left;
    }

    .copyright-note summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
    .copyright-note summary::-webkit-details-marker { display: none; }
    .copyright-note summary::after { content: "▾"; color: #a0a4b6; }
    .copyright-note[open] summary::after { content: "▴"; }
    .copyright-note p { margin: 8px 0 0; color: #8a8fa1; }

    /* 上传拖拽区 */
    .upload-drop {
      min-height: 130px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 1px dashed #c8cbe0;
      border-radius: 14px;
      color: #6b7088;
      background: #fafbff;
      text-align: center;
      transition: .18s ease;
      cursor: pointer;
    }
    .upload-drop:hover, .upload-drop.dragover {
      border-color: #9c9fef;
      background: #f5f6ff;
      color: #5b5ce2;
    }
    .upload-drop strong { color: #4a4f63; font-size: 13px; }
    .upload-drop small { font-size: 11px; }
    .upload-drop .file-input { display: none; }

    /* 素材库选择网格 */
    .library-pick {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 12px;
    }
    .library-pick-card {
      position: relative;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      cursor: pointer;
      transition: .18s ease;
    }
    .library-pick-card:hover { border-color: #b8baf2; box-shadow: 0 6px 14px rgba(91, 92, 226, .08); }
    .library-pick-card.selected { border-color: #5b5ce2; background: #f7f7ff; }
    .library-pick-card .pick-cover {
      width: 72px;
      aspect-ratio: 9 / 16;
      border-radius: 8px;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 12px;
      background: linear-gradient(135deg, #7e86e8, #57c4d2);
      margin: 0 auto 8px;
    }
    .library-pick-card .pick-cover.alt-1 { background: linear-gradient(135deg, #e88770, #d56393); }
    .library-pick-card .pick-cover.alt-2 { background: linear-gradient(135deg, #e5a047, #79b375); }
    .library-pick-card .pick-cover.alt-3 { background: linear-gradient(135deg, #5a8fd8, #7a78e0); }
    .library-pick-card .pick-cover.alt-4 { background: linear-gradient(135deg, #46b8a8, #4f8de0); }
    .library-pick-card strong { display: block; font-size: 12px; }
    .library-pick-card small { color: #8a8fa1; font-size: 10px; }
    .library-pick-card .check {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 18px;
      height: 18px;
      display: none;
      place-items: center;
      border-radius: 50%;
      color: #fff;
      background: #5b5ce2;
      font-size: 11px;
    }
    .library-pick-card.selected .check { display: grid; }

    /* 解析进度弹层 */
    .progress-modal {
      width: min(540px, 100%);
    }
    .progress-list { display: grid; gap: 12px; }
    .progress-row {
      display: grid;
      grid-template-columns: 40px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
    }
    .progress-row .progress-thumb {
      width: 40px;
      height: 50px;
      display: grid;
      place-items: center;
      border-radius: 7px;
      color: #fff;
      font-size: 10px;
      background: linear-gradient(145deg, #b89a82, #e2c9b1 50%, #8a7666);
    }
    .progress-row .progress-body strong { display: block; font-size: 13px; }
    .progress-row .progress-body .bar {
      height: 6px;
      border-radius: 99px;
      margin-top: 6px;
      background: #eef0f7;
      overflow: hidden;
    }
    .progress-row .progress-body .bar span {
      display: block;
      height: 100%;
      background: linear-gradient(90deg, #7a7df4, #4cb6e4);
      transition: width .25s ease;
    }
    .progress-row .progress-body small { display: block; margin-top: 4px; color: #8a8fa1; font-size: 11px; }
    .progress-row .progress-percent { color: #5b5ce2; font-size: 12px; font-weight: 700; min-width: 38px; text-align: right; }
    .progress-row .progress-percent.done { color: #16a778; }
    .progress-row .progress-percent.fail { color: #c14545; }

    .progress-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 14px;
      border-radius: 10px;
      background: #f7f7ff;
      color: #4a4f63;
      font-size: 12px;
      margin-bottom: 14px;
    }
    .progress-summary b { color: #5b5ce2; font-size: 15px; }

    /* 历史记录抽屉 */
    .history-drawer {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      z-index: 90;
      display: none;
      width: min(480px, 100%);
      flex-direction: column;
      background: #fff;
      box-shadow: -10px 0 40px rgba(20, 22, 35, .15);
      animation: drawerIn .25s ease;
    }
    .history-drawer.show { display: flex; }
    @keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

    .history-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 22px;
      border-bottom: 1px solid var(--line);
    }
    .history-head h3 { margin: 0; font-size: 16px; }
    .history-body { flex: 1; overflow-y: auto; padding: 12px 22px 24px; }
    .history-item {
      display: grid;
      grid-template-columns: 56px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid var(--line);
    }
    .history-item:last-child { border-bottom: 0; }
    .history-item .thumb {
      width: 56px;
      height: 64px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: #fff;
      font-size: 10px;
      background: linear-gradient(145deg, #b89a82, #e2c9b1 50%, #8a7666);
    }
    .history-item .meta strong { display: block; font-size: 13px; }
    .history-item .meta small { display: block; margin-top: 3px; color: #8a8fa1; font-size: 11px; }
    .history-item .meta .badge { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 999px; background: #e7f6ef; color: #19855d; font-size: 10px; }

    /* 拉片结果详情页 - 顶部视频信息行 */
    .pull-result-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      padding: 0 4px;
    }
    .pull-result-head .title-block { display: flex; align-items: center; gap: 12px; }
    .pull-result-head h1 { margin: 0; font-size: 20px; color: #eef0f8; }
    .pull-result-head h1 small { color: #8f95a8; font-weight: 500; font-size: 13px; margin-left: 8px; }
    .pull-result-head .download-link {
      color: #a3a8f0;
      font-size: 13px;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .pull-result-head .download-link:hover { text-decoration: underline; }
    .pull-result-head .meta-line { color: #8f95a8; font-size: 12px; }
    .pull-result-head .meta-line b { color: #cbd0de; font-weight: 600; }
    .pull-result-head .meta-line .dot { margin: 0 8px; opacity: .5; }

    /* 脚本总结·结构化字段 */
    .script-field {
      display: grid;
      grid-template-columns: 76px minmax(0, 1fr);
      gap: 12px;
      padding: 11px 0;
      border-bottom: 1px dashed #2d303b;
      align-items: start;
    }
    .script-field:last-child { border-bottom: 0; }
    .script-field .label {
      position: relative;
      padding-top: 2px;
      color: #8f95a8;
      font-size: 12px;
    }
    .script-field .label .count {
      display: inline-grid;
      place-items: center;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      margin-left: 4px;
      border-radius: 999px;
      color: #fff;
      background: #797cf4;
      font-size: 10px;
      font-weight: 700;
      vertical-align: middle;
      cursor: help;
    }
    .script-field .value { color: #e0e3f0; font-size: 12px; line-height: 1.7; }
    .script-field .value .chip {
      display: inline-block;
      margin: 0 4px 4px 0;
      padding: 3px 8px;
      border-radius: 6px;
      color: #cfd3f0;
      background: #2a2d43;
      font-size: 11px;
      cursor: pointer;
      transition: .15s ease;
    }
    .script-field .value .chip:hover { background: #3a3d5b; color: #fff; }
    .script-field .value .chip.hot { color: #ffd6b8; background: #3a2a25; }
    .script-field .value .plain { color: #cbd0de; }

    /* 画面总结·三组 */
    .scene-group {
      padding: 12px 15px 14px;
      border-bottom: 1px solid #2d303b;
    }
    .scene-group:last-child { border-bottom: 0; }
    .scene-group .scene-label {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 10px;
      color: #cbd0de;
      font-size: 12px;
      font-weight: 600;
    }
    .scene-group .scene-label::after {
      content: attr(data-count);
      margin-left: auto;
      color: #797cf4;
      font-weight: 700;
    }
    .scene-group .scene-strip {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 4px;
    }
    .scene-group .scene-strip .scene-img {
      flex: 0 0 auto;
      width: 64px;
      height: 64px;
      border-radius: 8px;
      display: grid;
      place-items: end;
      padding: 4px 6px;
      color: #fff;
      font-size: 9px;
      cursor: pointer;
      background: linear-gradient(145deg, #b89a82, #e2c9b1 50%, #8a7666);
    }
    .scene-group .scene-strip .scene-img span {
      background: rgba(0,0,0,.45);
      padding: 1px 4px;
      border-radius: 3px;
    }
    .scene-group .scene-strip .scene-img.alt-1 { background: linear-gradient(145deg, #e88770, #d56393); }
    .scene-group .scene-strip .scene-img.alt-2 { background: linear-gradient(145deg, #5a8fd8, #7a78e0); }
    .scene-group .scene-strip .scene-img.alt-3 { background: linear-gradient(145deg, #46b8a8, #4f8de0); }
    .scene-group .scene-strip .scene-img.alt-4 { background: linear-gradient(145deg, #e5a047, #c46b54); }
    .scene-group .scene-strip .scene-img.alt-5 { background: linear-gradient(145deg, #7e86e8, #57c4d2); }
    .scene-group .scene-strip .scene-img.alt-6 { background: linear-gradient(145deg, #715759, #c99b91 50%, #eee1cc); }

    /* 分镜 Tab 区域 */
    .storyboard-tabs {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .storyboard-tabs .tab-mini {
      padding: 6px 12px;
      border: 0;
      border-radius: 7px;
      color: #8f95a8;
      background: transparent;
      font-size: 12px;
    }
    .storyboard-tabs .tab-mini.active { color: #fff; background: #2a2d43; }

    .shot-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      padding: 14px;
    }

    .shot-card {
      position: relative;
      border: 1px solid #303440;
      border-radius: 12px;
      overflow: hidden;
      background: #1b1e26;
      display: flex;
      flex-direction: column;
    }
    .shot-card .shot-cover {
      position: relative;
      height: 130px;
      display: flex;
      align-items: flex-end;
      padding: 8px 10px;
      background: linear-gradient(145deg, #7f6754, #d6c1aa 48%, #6f7d89);
    }
    .shot-card .shot-cover .duration {
      position: absolute;
      right: 8px;
      top: 8px;
      padding: 2px 6px;
      border-radius: 4px;
      color: #fff;
      background: rgba(0,0,0,.55);
      font-size: 10px;
    }
    .shot-card .shot-cover .time-range {
      padding: 3px 6px;
      border-radius: 4px;
      color: #fff;
      background: rgba(0,0,0,.5);
      font-size: 10px;
    }
    .shot-card .shot-body { padding: 10px 12px 12px; color: #b9bfce; font-size: 11px; }
    .shot-card .shot-body .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
    .shot-card .shot-body .tags .tag {
      padding: 2px 6px;
      border-radius: 4px;
      color: #ffd6b8;
      background: #3a2a25;
      font-size: 9px;
    }
    .shot-card .shot-body .tags .tag.green { color: #b6e8c8; background: #1f3a2a; }
    .shot-card .shot-body .tags .tag.purple { color: #d4d0ff; background: #2a2a4a; }
    .shot-card .shot-body .desc { line-height: 1.55; min-height: 30px; }
    .shot-card .shot-body .divider {
      height: 1px;
      background: #2d303b;
      margin: 8px 0;
    }
    .shot-card .shot-body .script-text { color: #cbd0de; }
    .shot-card .shot-body .meta-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 6px;
      color: #8f95a8;
      font-size: 10px;
    }
    .shot-card .shot-body .meta-row b { color: #cbd0de; font-weight: 600; }
    .shot-card .shot-body .camera-line { color: #8f95a8; font-size: 10px; margin-top: 4px; }

    /* 画面逐帧 */
    .frame-strip {
      padding: 24px 20px;
      color: #b9bfce;
    }
    .frame-strip .frame-summary {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 18px;
      color: #cbd0de;
      font-size: 12px;
    }
    .frame-strip .frame-summary b { color: #797cf4; }
    .frame-strip .frame-bar {
      position: relative;
      height: 56px;
      border-radius: 10px;
      background: #1b1e26;
      overflow: hidden;
    }
    .frame-strip .frame-bar .frame-cell {
      position: absolute;
      top: 0;
      bottom: 0;
      cursor: pointer;
    }
    .frame-strip .frame-bar .frame-cell:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      left: 50%;
      top: -28px;
      transform: translateX(-50%);
      padding: 4px 8px;
      border-radius: 6px;
      color: #fff;
      background: #2a2d43;
      font-size: 11px;
      white-space: nowrap;
    }
    .frame-strip .frame-axis {
      display: flex;
      justify-content: space-between;
      margin-top: 8px;
      color: #777e93;
      font-size: 10px;
    }

    @media (max-width: 1180px) {
      .ai-shell { grid-template-columns: 190px minmax(430px, 1fr); }
      .pull-grid { grid-template-columns: 280px 1fr; }
      .analysis-stack { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
      .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .metric-grid { grid-template-columns: repeat(2, 1fr); }
      .shot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .library-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

    @media (max-width: 860px) {
      :root { --sidebar: 0px; }
      .app { display: block; }
      .sidebar {
        width: 244px;
        transform: translateX(-100%);
        transition: .25s ease;
      }
      .sidebar.open { transform: translateX(0); }
      .main { grid-column: 1; }
      .mobile-toggle { display: inline-grid; place-items: center; }
      .page-pad { padding: 20px 16px 34px; }
      .ai-shell { display: block; }
      .conversation-panel { display: none; }
      .creation-stage { height: 100vh; min-height: 0; padding: 20px 16px; }
      .asset-panel { width: min(440px, 94vw); }
      .asset-backdrop { left: 0; }
      .agent-grid { grid-template-columns: repeat(2, 1fr); }
      .pull-grid { grid-template-columns: 1fr; }
      .analysis-stack { grid-column: auto; grid-template-columns: 1fr; }
      .storyboard { grid-column: auto; }
      .asset-grid { grid-template-columns: repeat(2, 1fr); }
      .two-col { grid-template-columns: 1fr; }
      .flow-card { grid-template-columns: 1fr; }
      .flow-step:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -15px; transform: translateX(50%); }
      .pull-entry-shell { padding: 22px 18px 24px; }
      .pull-entry-top-actions { position: static; justify-content: center; margin-bottom: 14px; }
      .shot-grid { grid-template-columns: 1fr; }
      .library-pick { grid-template-columns: 1fr; }
    }

    @media (max-width: 560px) {
      .agent-grid, .asset-grid, .metric-grid, .form-grid, .result-grid { grid-template-columns: 1fr; }
      .field.full { grid-column: auto; }
      .team-select { display: none; }
      .page-head { flex-direction: column; }
      .top-actions .ghost-btn { display: none; }
      .pull-grid { display: block; }
      .dark-card { margin-bottom: 12px; }
      .mix-preview { grid-template-columns: 1fr; }
      .chat-output { padding-left: 36px; padding-right: 36px; }
      .message.user { max-width: 86%; }
      .message.assistant { width: 100%; }
      .generated-video { grid-template-columns: 64px minmax(0, 1fr); }
      .generated-video-cover { width:64px; }
      .composer-foot { align-items: flex-end; }
      .composer-selectors { flex: 1; }
      .agent-picker { width: 100%; }
      .agent-pill { width: 100%; }
      .agent-popover { width: calc(100vw - 52px); max-height: 420px; }
      .model-picker { width: 100%; }
      .model-trigger { width: 100%; max-width: none; }
      .model-popover { width: calc(100vw - 52px); max-height: 360px; }
    }
    /* AI 创作首页：Agent 分类筛选与单行横向浏览 */
    #page-creation .agent-browser {
      order: 3;
      width: min(1120px, 94%);
      margin: 0 auto clamp(28px, 4.5vh, 58px);
    }
    #page-creation .agent-filter-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 12px;
    }
    #page-creation .agent-filter {
      min-height: 30px;
      padding: 5px 12px;
      border: 1px solid #e6e6eb;
      border-radius: 999px;
      color: #8c909d;
      background: rgba(255,255,255,.72);
      box-shadow: 0 2px 8px rgba(39, 40, 52, .025);
      font-size: 12px;
      transition: color .16s ease, border-color .16s ease, background .16s ease;
    }
    #page-creation .agent-filter:hover { border-color: #cdbfff; color: #704fdb; }
    #page-creation .agent-filter.active { border-color: #d8ceff; color: #694bd5; background: #f2efff; font-weight: 700; }
    #page-creation .agent-grid {
      display: flex;
      grid-template-columns: none;
      flex-wrap: nowrap;
      justify-content: flex-start;
      gap: 12px;
      width: 100%;
      max-width: none;
      margin: 0;
      padding: 4px 2px 14px;
      overflow-x: auto;
      overflow-y: hidden;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
      scroll-snap-type: x proximity;
    }
    #page-creation .agent-grid::-webkit-scrollbar { width: 0; height: 0; }
    #page-creation .agent-grid.is-filtered { justify-content: center; }
    #page-creation .agent-card {
      flex: 0 0 210px;
      width: 210px;
      min-height: 118px;
      scroll-snap-align: start;
    }
    #page-creation .agent-card[hidden] { display: none !important; }
    @media (max-width: 720px) {
      #page-creation .agent-browser { width: min(94%, 560px); }
      #page-creation .agent-filter-row { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
      #page-creation .agent-filter-row::-webkit-scrollbar { width: 0; height: 0; }
      #page-creation .agent-filter { flex: 0 0 auto; }
      #page-creation .agent-card { flex-basis: 188px; width: 188px; }
    }

    /* AI 创作首页：专业 Agent 广场 */
    #page-creation .creation-stage.home-mode {
      padding: clamp(34px, 5vh, 64px) clamp(24px, 4vw, 58px) 44px;
      overflow-y: auto;
      background: linear-gradient(180deg, #fff 0%, #fff 58%, #fbfaff 100%);
    }
    #page-creation .creation-stage.home-mode > .asset-toggle,
    #page-creation .creation-stage.home-mode > .composer-wrap { display: none; }
    #page-creation .creation-stage.home-mode .ai-hero {
      order: 1;
      width: min(1060px, 100%);
      margin: 0 auto;
      padding: 0 0 26px;
      text-align: left;
    }
    #page-creation .creation-stage.home-mode .ai-hero .spark { display: none; }
    #page-creation .creation-stage.home-mode .ai-hero h1 { font-size: clamp(27px, 2vw, 34px); letter-spacing: -.5px; }
    #page-creation .creation-stage.home-mode .ai-hero p { margin: 8px 0 0; font-size: 14px; }
    #page-creation .creation-stage.home-mode .agent-browser {
      order: 2;
      width: min(1060px, 100%);
      margin: 0 auto;
    }
    #page-creation .creation-stage.home-mode .agent-filter-row { justify-content: flex-start; margin-bottom: 18px; }
    #page-creation .creation-stage.home-mode .agent-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 15px;
      width: 100%;
      overflow: visible;
      scroll-snap-type: none;
    }
    #page-creation .creation-stage.home-mode .agent-grid.is-filtered {
      grid-template-columns: repeat(var(--filtered-count, 3), minmax(230px, 310px));
      justify-content: center;
    }
    #page-creation .creation-stage.home-mode .agent-card {
      width: 100%;
      min-height: 148px;
      padding: 18px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      border-radius: 16px;
      background: rgba(255,255,255,.96);
      box-shadow: 0 7px 22px rgba(51,42,81,.055);
    }
    #page-creation .creation-stage.home-mode .agent-card::before { top: 18px; left: 18px; width: 26px; }
    #page-creation .creation-stage.home-mode .agent-card strong { margin: 18px 0 7px; font-size: 15px; }
    #page-creation .creation-stage.home-mode .agent-card small {
      display: block;
      min-height: 38px;
      color: #777481;
      font-size: 12px;
      line-height: 1.6;
    }
    #page-creation .creation-stage.home-mode .agent-card .agent-foot { margin-top: auto; padding-top: 12px; }
    #page-creation .creation-stage.home-mode .agent-card .agent-chip { display: inline-flex; padding: 3px 8px; font-size: 10px; }
    #page-creation .creation-stage.home-mode .agent-card .agent-chip:not(:first-child) { display: none; }
    .new-create-wrap { position: relative; }
    .new-create-popover {
      position: fixed;
      z-index: 120;
      width: 368px;
      max-height: min(640px, calc(100vh - 48px));
      padding: 10px;
      overflow-y: auto;
      border: 1px solid #e5e1ec;
      border-radius: 18px;
      background: rgba(255,255,255,.98);
      box-shadow: 0 22px 58px rgba(42,34,65,.2);
      scrollbar-width: thin;
      scrollbar-color: #d9d2e7 transparent;
    }
    .new-create-popover[hidden] { display: none; }
    .new-create-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:10px 11px 12px; border-bottom:1px solid #eeeaf3; }
    .new-create-head strong { display:block; color:#29262f; font-size:15px; }
    .new-create-head small { display:block; margin-top:4px; color:#96909e; font-size:11px; }
    .new-create-close { width:28px; height:28px; border:0; border-radius:8px; color:#8a8491; background:#f6f4f8; cursor:pointer; }
    .new-create-close:hover { color:#4f435e; background:#eeeaf3; }
    .create-agent-group { padding:11px 5px 3px; color:#9a94a2; font-size:10px; font-weight:700; letter-spacing:.4px; }
    .create-agent-option {
      width:100%;
      display:grid;
      grid-template-columns:12px minmax(0,1fr) 18px;
      align-items:center;
      gap:10px;
      padding:10px 11px;
      border:0;
      border-radius:11px;
      color:#3e3945;
      background:transparent;
      text-align:left;
      cursor:pointer;
    }
    .create-agent-option:hover { color:#5d43bd; background:#f4f0ff; }
    .create-agent-dot { width:8px; height:8px; border-radius:50%; background:#9a7cf0; box-shadow:0 0 0 4px #f0ebff; }
    .create-agent-option[data-category="image"] .create-agent-dot { background:#e19454; box-shadow:0 0 0 4px #fff0e4; }
    .create-agent-option[data-category="video"] .create-agent-dot { background:#438aca; box-shadow:0 0 0 4px #e6f2fd; }
    .create-agent-option[data-category="analysis"] .create-agent-dot { background:#4d9b78; box-shadow:0 0 0 4px #e7f5ee; }
    .create-agent-option strong { display:block; font-size:12px; }
    .create-agent-option small { display:block; margin-top:3px; overflow:hidden; color:#96909e; font-size:10px; white-space:nowrap; text-overflow:ellipsis; }
    .create-agent-arrow { color:#bbb5c3; font-size:16px; text-align:right; }
    @media (max-width: 920px) {
      #page-creation .creation-stage.home-mode .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      #page-creation .creation-stage.home-mode .agent-grid.is-filtered { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
    }
    @media (max-width: 620px) {
      #page-creation .creation-stage.home-mode { padding: 28px 16px 36px; }
      #page-creation .creation-stage.home-mode .agent-grid,
      #page-creation .creation-stage.home-mode .agent-grid.is-filtered { grid-template-columns: 1fr; }
      .new-create-popover { width:min(360px, calc(100vw - 24px)); }
    }

    /* Agent 任务工作台：左侧分步信息与结果，右侧保留会话上下文 */
    #page-creation .agent-task-shell {
      display: none;
      flex: 1 1 auto;
      min-height: 0;
      width: 100%;
      max-width: none;
      margin: 0 auto;
      grid-template-columns: minmax(0, 1.42fr) minmax(360px, .78fr);
      gap: 14px;
    }
    #page-creation .agent-task-shell.show { display: grid; }
    .task-work-pane, .task-chat-pane {
      min-width: 0;
      min-height: 0;
      border: 1px solid #e8e8ed;
      border-radius: 18px;
      background: #fff;
      box-shadow: 0 10px 30px rgba(35, 36, 47, .045);
    }
    .task-work-pane { display: flex; flex-direction: column; overflow: hidden; }
    .task-taskbar {
      display: flex;
      align-items: center;
      min-height: 56px;
      padding: 10px 16px;
      border-bottom: 1px solid #eeeeF2;
    }
    .task-taskbar strong { color: #282933; font-size: 14px; }
    .task-taskbar small { display: block; margin-top: 2px; color: #9697a0; font-size: 11px; }
    .task-stepper { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #f0f0f3; }
    .task-step {
      min-width: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 8px;
      border: 0;
      border-radius: 8px;
      color: #9a9ba4;
      background: transparent;
      font: inherit;
      font-size: 12px;
      cursor: pointer;
    }
    .task-step b { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #d9d9df; border-radius: 50%; color: #858690; font-size: 10px; }
    .task-step.active { color: #5f40c7; background: #f3efff; font-weight: 700; }
    .task-step.active b { border-color: #845fe0; color: #fff; background: #7653d7; }
    .task-step.done { color: #5e826f; }
    .task-step.done b { border-color: #b9e3cb; color: #2b9661; background: #e8faef; }
    .task-form-scroll { flex: 1 1 auto; min-height: 0; padding: 18px 20px; overflow-y: auto; }
    .task-form-scroll .form-grid { display: grid; gap: 14px; }
    .task-form-scroll .form-section { margin: 0; }
    .task-confirm-card { padding: 18px; border: 1px dashed #d6c9ff; border-radius: 13px; color: #6b607e; background: linear-gradient(135deg, #fcfaff, #f6f1ff); }
    .task-confirm-card strong { display: block; margin-bottom: 6px; color: #493783; }
    .task-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid #ededf1; background: #fff; }
    .task-form-actions .task-action-note { color: #9697a0; font-size: 11px; }
    .task-form-actions .task-action-buttons { display: flex; gap: 8px; }
    .task-result-host { flex: 1 1 auto; min-height: 0; padding: 18px 20px; overflow-y: auto; }
    .task-result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .task-result-top strong { color: #2b2c34; }
    .task-result-top small { display: block; margin-top: 4px; color: #8b8c96; }
    .task-result-host .generated-assets { display: grid; gap: 10px; }
    .task-result-host .generated-asset { padding: 14px; border-radius: 12px; }
    .task-result-host.editing { display: none; }
    .original-result-list { display:grid; gap:18px; }
    .original-copy-card {
      position:relative;
      padding:18px;
      border:1px solid #e5e5ec;
      border-radius:14px;
      background:#fff;
      transition:border-color .18s ease, box-shadow .18s ease;
    }
    .original-copy-card:hover { border-color:#d8d1f6; box-shadow:0 8px 24px rgba(72,55,130,.07); }
    .original-copy-card.is-chat-target { border-color:#866cf0; box-shadow:0 0 0 3px rgba(118,91,234,.1); }
    .original-copy-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
    .original-copy-heading { display:flex; align-items:center; min-width:0; gap:8px; }
    .original-copy-index { flex:0 0 auto; color:#765bea; font-size:12px; font-weight:750; }
    .original-copy-title { overflow:hidden; color:#26272f; font-size:14px; white-space:nowrap; text-overflow:ellipsis; }
    .original-copy-title.is-editing { min-width:180px; padding:4px 7px; border:1px solid #8167ed; border-radius:7px; outline:0; background:#fff; }
    .original-title-edit { flex:0 0 auto; padding:3px; border:0; color:#999aa3; background:transparent; cursor:pointer; }
    .original-title-edit:hover { color:#6f53e2; }
    .original-copy-structure { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-bottom:12px; }
    .copy-structure-tag { padding:4px 7px; border-radius:6px; color:#665e79; background:#f3f1f7; font-size:11px; }
    .copy-structure-arrow { color:#c1bec9; font-size:10px; }
    .original-copy-content { color:#41424b; font-size:13px; line-height:1.85; white-space:pre-wrap; }
    .original-copy-editor { display:none; }
    .original-copy-card.is-editing .original-copy-content { display:none; }
    .original-copy-card.is-editing .original-copy-editor { display:block; }
    .original-copy-card.is-editing .original-copy-actions { display:none; }
    .original-copy-editor textarea { width:100%; min-height:150px; padding:12px; border:1px solid #8b73ef; border-radius:10px; outline:0; color:#3c3d46; background:#fff; font:inherit; font-size:13px; line-height:1.75; resize:vertical; box-shadow:0 0 0 3px rgba(118,91,234,.08); }
    .original-edit-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:8px; }
    .original-copy-meta { display:flex; justify-content:flex-end; margin-top:10px; color:#999aa4; font-size:11px; }
    .original-copy-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:12px; margin-top:12px; border-top:1px solid #eeeeF2; }
    .original-copy-actions-left { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
    .copy-result-action { padding:6px 8px; border:0; border-radius:7px; color:#5e5f69; background:transparent; font-size:12px; cursor:pointer; }
    .copy-result-action:hover { color:#6549d6; background:#f5f2ff; }
    .copy-result-action.saved { color:#2f9666; }
    .original-create-menu { position:relative; flex:0 0 auto; }
    .original-create-trigger { padding:7px 11px; border:1px solid #7c62e8; border-radius:8px; color:#fff; background:#765bea; font-size:12px; cursor:pointer; }
    .original-create-popover { display:none; position:absolute; z-index:15; right:0; bottom:calc(100% + 7px); width:150px; padding:5px; border:1px solid #e0deea; border-radius:10px; background:#fff; box-shadow:0 12px 28px rgba(36,29,58,.16); }
    .original-create-menu.open .original-create-popover { display:grid; gap:2px; }
    .original-create-popover button { padding:9px 10px; border:0; border-radius:7px; color:#4e4e58; background:transparent; text-align:left; cursor:pointer; }
    .original-create-popover button:hover { color:#6549d6; background:#f5f2ff; }
    .original-continue-box { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 18px; margin-top:18px; border:1px dashed #d9d5e8; border-radius:12px; color:#777985; background:#faf9fc; font-size:12px; }
    .original-continue-box button { padding:8px 14px; border:1px solid #d9d2f8; border-radius:8px; color:#6549d6; background:#fff; font-weight:650; cursor:pointer; }
    .original-continue-box button:hover { border-color:#9c87ef; background:#f7f4ff; }
    .original-continue-box button:disabled { opacity:.55; cursor:wait; }

    .task-model-card { padding: 16px; border: 1px solid #e8e3f7; border-radius: 13px; background: linear-gradient(135deg, #fdfcff, #f8f6ff); }
    .task-model-card strong { display: block; color: #312b42; font-size: 14px; }
    .task-model-card > span { display: block; margin-top: 4px; color: #94909e; font-size: 12px; }
    .task-model-list { display: grid; gap: 8px; margin-top: 14px; }
    .task-model-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid #e6e3ed; border-radius: 10px; color: #4d4859; background: #fff; text-align: left; cursor: pointer; }
    .task-model-option:hover { border-color: #bfaeff; background: #fbf9ff; }
    .task-model-option.selected { border-color: #906cf0; background: #f4efff; box-shadow: inset 0 0 0 1px rgba(144,108,240,.08); }
    .task-model-option b { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: #6b4ed1; background: #eee9ff; font-size: 12px; }
    .task-model-option span { min-width: 0; }
    .task-model-option strong { font-size: 12px; }
    .task-model-option small { display: block; overflow: hidden; margin-top: 2px; color: #9994a2; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
    .task-model-option em { margin-left: auto; color: #6c4bd2; font-size: 11px; font-style: normal; }
    .fixed-model-display { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:58px; padding:12px 14px; border:1px solid #e5e0f3; border-radius:11px; background:linear-gradient(135deg,#fbfaff,#f6f3ff); }
    .fixed-model-display div { display:grid; gap:3px; }
    .fixed-model-display small { color:#9895a2; font-size:10px; }
    .fixed-model-display strong { color:#342d48; font-size:13px; }
    .fixed-model-display span { color:#756b91; font-size:11px; }
    .single-model-picker { position:relative; }
    .single-model-trigger { width:100%; min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 12px; border:1px solid #dedee7; border-radius:10px; color:#292a33; background:#fff; cursor:pointer; }
    .single-model-trigger span { display:grid; gap:2px; text-align:left; }
    .single-model-trigger small { color:#9697a1; font-size:10px; }
    .single-model-trigger b { font-size:12px; }
    .single-model-picker.open .single-model-menu { display:block; }
    .single-model-menu { display:none; position:absolute; z-index:35; left:0; right:0; bottom:calc(100% + 7px); padding:7px; border:1px solid #e2e0e8; border-radius:12px; background:#fff; box-shadow:0 16px 40px rgba(38,31,58,.16); }
    .single-model-option { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:0; border-radius:9px; color:#5f43d8; background:#f4f1ff; text-align:left; cursor:pointer; }
    .single-model-option span { display:grid; gap:2px; }
    .single-model-option small { color:#8c859c; font-size:10px; }
    .copy-structure-combobox { position:relative; }
    .copy-structure-combobox-trigger { width:100%; min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; border:1px solid #dedee7; border-radius:10px; color:#2f3038; background:#fff; text-align:left; cursor:pointer; }
    .copy-structure-combobox-trigger > span { min-width:0; display:grid; gap:3px; }
    .copy-structure-combobox-trigger small { overflow:hidden; color:#878895; font-size:10px; white-space:nowrap; text-overflow:ellipsis; }
    .copy-structure-combobox-trigger em { flex:0 0 auto; padding:3px 7px; border-radius:99px; color:#65566d; background:#f1eff4; font-size:10px; font-style:normal; }
    .copy-structure-combobox.open .copy-structure-combobox-menu { display:block; }
    .copy-structure-combobox-menu { display:none; position:absolute; z-index:34; top:calc(100% + 7px); right:0; left:0; bottom:auto; padding:8px; border:1px solid #e2e0e8; border-radius:12px; background:#fff; box-shadow:0 18px 46px rgba(38,31,58,.17); }
    .copy-structure-combobox-menu input { width:100%; height:36px; margin-bottom:6px; }
    .copy-structure-option-list { max-height:224px; overflow:auto; }
    .copy-structure-option { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:9px 10px; border:0; border-radius:8px; color:#383943; background:#fff; text-align:left; cursor:pointer; }
    .copy-structure-option:hover, .copy-structure-option.selected { background:#f5f2ff; }
    .copy-structure-option span { display:grid; gap:3px; }
    .copy-structure-option small { overflow:hidden; color:#8d8e98; white-space:nowrap; text-overflow:ellipsis; }
    .copy-structure-option em, .copy-source-tag { align-self:center; padding:3px 7px; border-radius:99px; color:#665a70; background:#f0eef3; font-size:10px; font-style:normal; white-space:nowrap; }
    .copy-structure-option-list .copy-structure-empty { padding:14px 10px; color:#92939d; font-size:12px; text-align:center; }
    .copy-source-tag.qianchuan { color:#6847c8; background:#f0ebff; }
    .copy-source-tag.custom { color:#62636c; background:#f0f1f3; }
    .copy-structure-tag-pill { display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border:1px solid #e1dcf5; border-radius:999px; color:#5d4a9e; background:#f7f4ff; font-size:11px; font-weight:650; white-space:nowrap; }
    .copy-structure-formula { color:#565762; line-height:1.55; }
    .copy-structure-row-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:center; gap:6px; }
    .copy-row-action { min-height:30px; padding:5px 7px; border:1px solid #e1e1e8; border-radius:8px; color:#666873; background:#fff; font-size:11px; line-height:1.2; white-space:nowrap; cursor:pointer; transition:.16s ease; }
    .copy-row-action:hover { border-color:#a997ef; color:#6046cc; background:#f8f6ff; }
    .copy-row-action.primary { border-color:#dcd3ff; color:#6046cc; background:#f5f1ff; }
    .copy-row-action.danger { color:#d45b63; }
    .copy-structure-empty { padding:38px; color:#9899a2; text-align:center; }
    .copy-structure-detail { width:min(1080px,calc(100vw - 48px)); max-width:none; border-radius:20px; box-shadow:0 32px 90px rgba(31,25,48,.24); }
    .copy-structure-detail .modal-head { padding:17px 20px; background:linear-gradient(135deg,#fcfbff,#f7f4ff); }
    .copy-structure-detail-summary { display:grid; grid-template-columns:1.1fr 2fr 110px 140px; gap:12px; padding:13px 14px; border:1px solid #ecebf1; border-radius:12px; background:#fafafd; }
    .copy-structure-detail-summary div { min-width:0; display:grid; gap:4px; }
    .copy-structure-detail-summary small { color:#999aa4; }
    .copy-structure-detail-summary strong { overflow:hidden; color:#383942; white-space:nowrap; text-overflow:ellipsis; }
    .copy-related-rank-note { display:flex; align-items:flex-start; gap:11px; padding:12px 14px; margin-top:14px; border:1px solid #e3ddfb; border-radius:11px; color:#5e536f; background:linear-gradient(135deg,#faf8ff,#f6f2ff); }
    .copy-related-rank-note i { display:grid; place-items:center; flex:0 0 auto; width:28px; height:28px; border-radius:9px; color:#fff; background:linear-gradient(135deg,#8268ed,#6049d1); font-size:11px; font-style:normal; font-weight:750; }
    .copy-related-rank-note div { display:grid; gap:3px; }
    .copy-related-rank-note strong { color:#3d374a; font-size:12px; }
    .copy-related-rank-note span { color:#847f8e; font-size:11px; line-height:1.55; }
    .copy-related-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:18px 0 10px; }
    .copy-related-toolbar input { width:310px; }
    .copy-related-list { display:grid; gap:12px; }
    .copy-related-item { display:grid; grid-template-columns:112px minmax(0,1fr); gap:14px; padding:12px; border:1px solid #e8e7ed; border-radius:12px; background:#fff; }
    .copy-related-video { position:relative; width:112px; overflow:hidden; aspect-ratio:9/16; border:0; border-radius:9px; color:#fff; background:linear-gradient(145deg,#514766,#171520); cursor:pointer; }
    .copy-related-video::after { content:"▶"; position:absolute; inset:0; display:grid; place-items:center; font-size:24px; text-shadow:0 2px 10px rgba(0,0,0,.5); }
    .copy-related-video span { position:absolute; z-index:1; left:8px; bottom:7px; font-size:10px; }
    .copy-related-copy { min-width:0; display:flex; flex-direction:column; }
    .copy-related-copy-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .copy-related-copy-head small { color:#999aa4; }
    .copy-related-spend { flex:0 0 auto; padding:5px 8px; border-radius:8px; color:#b55d28; background:#fff4e9; font-size:11px; font-weight:700; white-space:nowrap; }
    .copy-related-copy p { display:-webkit-box; overflow:hidden; margin:8px 0; color:#555661; line-height:1.7; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
    .copy-related-item.expanded .copy-related-copy p { display:block; }
    .copy-related-actions { display:flex; gap:7px; margin-top:auto; }
    .copy-structure-editor-modal { width:min(620px,100%); height:auto; max-height:calc(100vh - 40px); border-radius:20px; box-shadow:0 28px 80px rgba(35,28,57,.22); }
    .copy-structure-editor-modal .modal-head { padding:18px 22px; background:linear-gradient(135deg,#fbfaff 0%,#f6f3ff 100%); }
    .copy-structure-editor-modal .modal-head-title { display:flex; align-items:center; gap:12px; }
    .copy-structure-editor-modal .modal-head-title i, .cl-create-modal .modal-head-title i { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; color:#6549d6; background:#eee9ff; font-style:normal; font-weight:750; }
    .copy-structure-editor-modal .modal-head-title small, .cl-create-modal .modal-head-title small { display:block; margin-top:3px; color:#92939d; font-size:11px; }
    .copy-structure-editor-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
    .copy-structure-editor-grid label, .copy-structure-editor-field { display:grid; gap:7px; color:#4a4b55; font-size:12px; font-weight:650; }
    .copy-structure-editor-grid .full { grid-column:1/-1; }
    .copy-structure-editor-grid input, .copy-structure-editor-grid select { width:100%; }
    .copy-level-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
    .copy-level-options > button { display:grid; grid-template-columns:34px minmax(0,1fr) 20px; align-items:center; gap:10px; min-height:64px; padding:10px 12px; border:1px solid #e3e1e9; border-radius:12px; color:#565762; background:#fff; text-align:left; cursor:pointer; }
    .copy-level-options > button i { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; color:#6c5d87; background:#f0eef4; font-size:12px; font-style:normal; font-weight:750; }
    .copy-level-options > button span { display:grid; gap:3px; }
    .copy-level-options > button small { color:#999aa3; font-size:10px; font-weight:400; }
    .copy-level-options > button em { visibility:hidden; display:grid; place-items:center; width:18px; height:18px; border-radius:50%; color:#fff; background:#7055dd; font-size:10px; font-style:normal; }
    .copy-level-options > button:hover { border-color:#b7a9ed; }
    .copy-level-options > button.active { border-color:#8269eb; color:#533bbb; background:#f8f5ff; box-shadow:0 0 0 2px rgba(112,84,221,.06); }
    .copy-level-options > button.active i { color:#fff; background:linear-gradient(135deg,#8065eb,#5c48cc); }
    .copy-level-options > button.active em { visibility:visible; }
    .copy-structure-head-actions { display:flex; align-items:center; gap:8px; }
    .copy-structure-head-actions .primary-btn { min-height:36px; padding:8px 14px; border-radius:10px; }
    .cl-create-modal { width:min(880px,100%); height:auto; max-height:calc(100vh - 40px); border-radius:20px; box-shadow:0 30px 88px rgba(34,28,52,.22); }
    .cl-create-modal .modal-head { padding:18px 22px; background:linear-gradient(135deg,#fcfbff 0%,#f6f3ff 100%); }
    .cl-create-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:5px; margin-bottom:18px; border:1px solid #e8e6ed; border-radius:14px; background:#f7f7fa; }
    .cl-create-tabs button { min-height:56px; display:flex; align-items:center; gap:10px; padding:9px 12px; border:1px solid transparent; border-radius:10px; color:#777985; background:transparent; text-align:left; cursor:pointer; }
    .cl-create-tabs button i { display:grid; place-items:center; flex:0 0 auto; width:30px; height:30px; border-radius:9px; color:#7b6d92; background:#ecebf0; font-style:normal; }
    .cl-create-tabs button span { display:grid; gap:2px; }
    .cl-create-tabs button small { color:#9a9ba5; font-size:10px; }
    .cl-create-tabs button.active { border-color:#ded5ff; color:#563bc4; background:#fff; box-shadow:0 5px 16px rgba(58,48,91,.09); font-weight:650; }
    .cl-create-tabs button.active i { color:#fff; background:linear-gradient(135deg,#7b5ff0,#5a47cd); }
    .cl-create-panel[hidden] { display:none; }
    .cl-create-section { padding-top:17px; margin-top:17px; border-top:1px solid #eeeeF2; }
    .cl-create-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:13px; }
    .cl-create-section-head h4 { margin:0; color:#30313a; font-size:14px; }
    .cl-create-section-head p { margin:4px 0 0; color:#999aa4; font-size:11px; }
    .cl-create-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
    .cl-create-field { display:grid; gap:7px; color:#555762; font-size:12px; }
    .cl-create-field.full { grid-column:1/-1; }
    .cl-create-field input, .cl-create-field select, .cl-create-field textarea { width:100%; }
    .cl-create-field textarea { min-height:96px; resize:vertical; }
    .cl-audience-block { grid-column:1/-1; display:grid; gap:13px; padding:15px; border:1px solid #e5e1f1; border-radius:14px; background:linear-gradient(145deg,#fcfbff,#faf9fd); }
    .cl-audience-text-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
    .cl-audience-text-grid .cl-create-field textarea { min-height:82px; }
    .cl-audience-line { display:grid; gap:7px; }
    .cl-audience-line > span { color:#51525d; font-size:12px; font-weight:650; }
    .cl-audience-chips { display:flex; flex-wrap:wrap; gap:7px; }
    .cl-audience-chip { min-height:32px; padding:6px 12px; border:1px solid #dfdfe7; border-radius:9px; color:#73747f; background:#fff; font-size:12px; cursor:pointer; }
    .cl-audience-chip:hover { border-color:#b9a9f4; color:#6549d6; }
    .cl-audience-chip.active { border-color:#8065ef; color:#6549d6; background:#f5f1ff; box-shadow:0 0 0 2px rgba(116,87,232,.06); }
    .cl-custom-age { display:none; align-items:center; gap:7px; }
    .cl-custom-age.show { display:flex; }
    .cl-custom-age input { width:82px; height:34px; }
    .cl-create-modal .modal-foot { padding:14px 22px; background:#fbfbfd; }
    .cl-create-modal .modal-foot .primary-btn, .copy-structure-editor-modal .modal-foot .primary-btn { min-width:108px; }
    /* ===== 文案编辑弹窗 ===== */
    .cl-edit-modal .modal-head { padding:18px 22px; background:linear-gradient(135deg,#fcfbff 0%,#f6f3ff 100%); }
    .cl-edit-modal .modal-head-title i { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; color:#6549d6; background:#eee9ff; font-style:normal; font-weight:750; }
    .cl-edit-modal .modal-head-title small { display:block; margin-top:3px; color:#92939d; font-size:11px; }
    .cl-edit-modal .modal-foot { padding:14px 22px; background:#fbfbfd; }
    .cl-edit-modal .modal-foot .primary-btn { min-width:108px; }
    .cl-edit-foot-info { font-size:12px; color:#92939d; }
    .cl-edit-meta { display:flex; flex-wrap:wrap; gap:8px 18px; padding:12px 14px; margin-bottom:14px; background:#f7f7fb; border-radius:8px; border:1px dashed #e0deec; }
    .cl-edit-meta-item { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#5a5a64; }
    .cl-edit-meta-item label { color:#92939d; }
    .cl-edit-meta-item b { font-weight:500; color:#1f2329; }
    .cl-edit-section { margin-bottom:14px; }
    .cl-edit-section-head { margin-bottom:8px; }
    .cl-edit-section-head h4 { margin:0; font-size:13px; color:#1f2329; }
    .cl-edit-section-head p { margin:2px 0 0; font-size:11px; color:#92939d; }
    .cl-edit-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
    .cl-edit-field { display:flex; flex-direction:column; gap:6px; position:relative; }
    .cl-edit-field span { font-size:12px; color:#454650; }
    .cl-edit-field input, .cl-edit-field textarea { width:100%; padding:8px 10px; border:1px solid #d9d9e0; border-radius:6px; background:#fff; font-size:13px; color:#1f2329; font-family:inherit; outline:none; box-sizing:border-box; transition:border-color .12s, box-shadow .12s; }
    .cl-edit-field input:focus, .cl-edit-field textarea:focus { border-color:#8065ef; box-shadow:0 0 0 3px rgba(128,101,239,.15); }
    .cl-edit-field.invalid input, .cl-edit-field.invalid textarea { border-color:#e14b53; box-shadow:0 0 0 3px rgba(225,75,83,.12); }
    .cl-edit-field textarea { resize:vertical; min-height:120px; line-height:1.55; }
    .cl-edit-field.full { grid-column:1 / -1; }
    .cl-edit-counter { position:absolute; right:10px; bottom:8px; font-size:11px; color:#92939d; pointer-events:none; background:rgba(255,255,255,.85); padding:1px 4px; border-radius:3px; }
    .cl-edit-counter.over { color:#e14b53; }
    .cl-edit-error { margin-top:8px; padding:8px 12px; background:#fef2f2; border:1px solid #f5c6c6; border-radius:6px; color:#d14545; font-size:12px; }
    .cl-video-source-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .cl-video-source-option { display:grid; grid-template-columns:56px minmax(0,1fr); gap:10px; align-items:center; padding:9px; border:1px solid #e3e3e9; border-radius:11px; color:#454650; background:#fff; text-align:left; cursor:pointer; }
    .cl-video-source-option:hover, .cl-video-source-option.active { border-color:#8b74ec; background:#faf8ff; box-shadow:0 0 0 2px rgba(118,91,234,.07); }
    .cl-video-source-cover { display:grid; width:56px; place-items:center; aspect-ratio:9/16; border-radius:7px; color:#fff; background:linear-gradient(145deg,#4b435b,#1f1d25); }
    .cl-video-source-option span { min-width:0; display:grid; gap:4px; }
    .cl-video-source-option strong, .cl-video-source-option small { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
    .cl-video-source-option small { color:#9697a2; }
    .cl-upload-video { display:grid; place-items:center; min-height:126px; padding:18px; border:1px dashed #cfcbdc; border-radius:12px; color:#777985; background:#fafafd; text-align:center; cursor:pointer; }
    .cl-upload-video:hover { border-color:#8c76eb; color:#6148ce; background:#faf8ff; }
    .cl-upload-video strong, .cl-upload-video span { display:block; }
    .cl-upload-video span { margin-top:5px; color:#9b9ca6; font-size:11px; }
    .cl-parse-status { display:flex; align-items:center; gap:8px; padding:9px 11px; border-radius:9px; color:#4f846a; background:#f1faf5; font-size:11px; }
    .cl-parse-status[hidden] { display:none; }
    @media (max-width:820px) {
      .copy-structure-detail-summary { grid-template-columns:1fr 1fr; }
      .copy-related-item { grid-template-columns:1fr; }
      .copy-related-video { width:112px; }
      .cl-create-form, .cl-video-source-list, .cl-audience-text-grid, .copy-level-options, .copy-structure-editor-grid { grid-template-columns:1fr; }
    }
    .rewrite-style-control { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
    .rewrite-style-editor { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; margin-top:9px; }
    .rewrite-style-editor[hidden] { display:none; }
    .rewrite-style-editor input { min-width:0; }

    .task-chat-pane { display: flex; flex-direction: column; position: relative; overflow: hidden; }
    .task-chat-head { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:56px; padding:10px 16px; border-bottom:1px solid #eeeeF2; }
    .task-chat-head > div { min-width:0; }
    .task-chat-head strong { display:block; overflow:hidden; color:#353640; font-size:13px; white-space:nowrap; text-overflow:ellipsis; }
    .task-chat-head small { display: block; margin-top: 2px; color: #9899a3; font-size: 11px; }
    .task-chat-head .asset-toggle {
      position:static !important;
      flex:0 0 auto;
      height:34px;
      box-shadow:none;
      background:#fff;
    }
    .task-chat-log { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
    #page-creation .agent-task-shell .chat-output,
    #page-creation .agent-task-shell .chat-output.show {
      display: block;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 18px 22px 18px 38px;
      overflow-y: auto;
    }
    #page-creation .agent-task-shell .chat-output .message { max-width: 84%; margin-bottom: 14px; }
    #page-creation .agent-task-shell .chat-output .message.assistant { width: auto; margin-left: 0; padding: 12px 13px; border-radius: 6px 14px 14px 14px; background: #f7f7f9; }
    #page-creation .agent-task-shell .chat-output .message.user { width: fit-content; margin-left: auto; margin-right: 0; padding: 11px 12px; border-radius: 14px 6px 14px 14px; background: #f1eeff; }
    #page-creation .agent-task-shell .chat-output .message.assistant::before,
    #page-creation .agent-task-shell .chat-output .message.user::after { content: none; display: none; }
    #page-creation .agent-task-shell .conversation-locator { display: block; position: absolute; z-index: 5; top: 18px; bottom: 16px; left: 13px; }
    #page-creation .agent-task-shell .locator-preview { left: 18px; width: 220px; }
    .task-chat-lock { display: none; }
    #page-creation .agent-task-shell .composer-wrap { width: 100%; margin: 0; padding: 10px; border-top: 1px solid #ededf1; }
    #page-creation .agent-task-shell .composer { border-radius: 13px; }
    #page-creation .agent-task-shell .composer-selectors { display: none; }
    #page-creation .agent-task-shell .composer textarea { min-height: 74px; }
    #page-creation .agent-task-shell .composer textarea:disabled { cursor: not-allowed; color: #a39dab; background: #fbfaff; }
    #page-creation .agent-task-shell .composer textarea:disabled::placeholder { color: #9b91aa; opacity: 1; }
    .agent-task-shell:not(.is-complete) .composer { opacity: .55; pointer-events: none; }
    .agent-task-shell.is-complete .task-chat-lock { display: none; }
    .agent-task-shell.is-complete .task-work-pane { border-color: #ded4ff; }
    @media (max-width: 980px) {
      #page-creation .agent-task-shell { grid-template-columns: 1fr; overflow-y: auto; }
      .task-work-pane { min-height: 520px; }
      .task-chat-pane { min-height: 440px; }
    }
    /* 产品库：商品浏览与资产关系 */
    .product-market-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(238px,1fr)); gap:16px; }
    #page-products .product-list-card { padding:0; border:0; background:transparent; box-shadow:none; }
    .product-market-card { overflow:hidden; border:1px solid #ececf2; border-radius:14px; background:#fff; text-align:left; cursor:pointer; transition:.18s ease; box-shadow:0 3px 14px rgba(44,42,57,.04); }
    .product-market-card:hover { transform:translateY(-3px); border-color:#d8cbff; box-shadow:0 14px 28px rgba(79,55,155,.12); }
    .product-market-image { height:184px; padding:12px; display:flex; align-items:flex-end; justify-content:space-between; background:linear-gradient(145deg,#f3f0eb,#e4e8f4); color:#34313d; }
    .product-market-image.air { background:linear-gradient(145deg,#fff1dc,#f5d6a5); }
    .product-market-image.wash { background:linear-gradient(145deg,#e7f5f2,#cbe5df); }
    .product-market-image.blend { background:linear-gradient(145deg,#f7e4e7,#e6d3df); }
    .product-market-image .product-visual { width:106px; height:130px; margin:auto; border-radius:24px 24px 18px 18px; background:linear-gradient(145deg,#fff,#d9d9e3); box-shadow:12px 13px 22px rgba(59,48,75,.17); position:relative; }
    .product-market-image .product-visual::after { content:""; position:absolute; inset:15px 25px auto; height:42px; border:3px solid #6f687f; border-radius:50%; opacity:.45; }
    .product-market-image .image-label { align-self:flex-start; border-radius:99px; padding:4px 8px; color:#fff; background:rgba(27,24,34,.56); font-size:11px; }
    .product-market-body { padding:13px 14px 14px; }
    .product-market-title { display:flex; gap:8px; justify-content:space-between; align-items:flex-start; }
    .product-market-title strong { overflow:hidden; color:#252431; font-size:15px; white-space:nowrap; text-overflow:ellipsis; }
    .product-market-brand { margin-top:4px; color:#9795a1; font-size:12px; }
    .product-market-price { margin:10px 0 8px; color:#f04438; font-size:20px; font-weight:800; letter-spacing:-.5px; }
    .product-market-price small { margin-right:2px; font-size:12px; }
    .product-market-tags { display:flex; gap:5px; min-height:23px; overflow:hidden; white-space:nowrap; }
    .product-market-tags span { max-width:100%; overflow:hidden; border-radius:4px; padding:3px 6px; color:#9a4c24; background:#fff1e8; font-size:11px; text-overflow:ellipsis; }
    .product-market-assets { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin-top:12px; padding-top:10px; border-top:1px solid #f0eff3; color:#9895a2; font-size:10px; }
    .product-market-assets span { overflow:hidden; text-align:center; white-space:nowrap; }
    .product-card-delete { position:absolute; z-index:3; top:10px; right:10px; width:28px; height:28px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.76); border-radius:8px; color:#716c79; background:rgba(255,255,255,.88); box-shadow:0 4px 12px rgba(47,40,62,.08); opacity:0; transition:.16s ease; }
    .product-market-card { position:relative; }
    .product-market-card:hover .product-card-delete, .product-card-delete:focus { opacity:1; }
    .product-card-delete:hover { color:#cf3f4c; border-color:#f3c5ca; background:#fff5f6; }
    .product-page-actions { display:flex; align-items:center; gap:9px; }
    .product-page-actions .search { width:270px; }
    .product-market-card.is-parsing { cursor:wait; border-color:#d7cafe; box-shadow:0 0 0 3px rgba(131,100,232,.07); }
    .product-market-card.is-parsing .product-market-image { animation: parsingPulse 1.25s ease-in-out infinite; }
    .product-parsing { display:flex; align-items:center; gap:6px; margin-top:10px; color:#7152cb; font-size:12px; }
    .product-parsing::before { content:""; width:7px; height:7px; border-radius:50%; background:#8464e8; box-shadow:0 0 0 5px rgba(132,100,232,.12); animation: parsingDot 1.1s ease-in-out infinite; }
    @keyframes parsingPulse { 50% { filter:brightness(1.06); opacity:.72; } }
    @keyframes parsingDot { 50% { transform:scale(.6); opacity:.4; } }
    .product-modal { width:min(980px,calc(100vw - 40px)); max-height:min(820px,calc(100vh - 44px)); }
    .product-create-tabs { display:flex; gap:6px; margin-bottom:18px; padding:5px; border-radius:12px; background:#f5f4f7; }
    .product-create-tabs button { flex:1; border:0; border-radius:8px; padding:9px; color:#787581; background:transparent; cursor:pointer; }
    .product-create-tabs button.active { color:#5239c9; background:#fff; box-shadow:0 2px 7px rgba(65,56,90,.1); font-weight:700; }
    .product-form-panel { display:none; }
    .product-form-panel.active { display:block; }
    .product-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
    .product-form-grid .full { grid-column:1/-1; }
    .product-image-upload { min-height:124px; display:flex; align-items:center; justify-content:center; border:1px dashed #bcb5cf; border-radius:10px; color:#746d83; background:#fbfaff; cursor:pointer; }
    .product-image-upload:hover { background:#f5f2ff; border-color:#8469dd; }
    .input-with-select { display:flex; gap:8px; }
    .input-with-select input { min-width:0; flex:1; }
    .price-field input { flex:7; }
    .price-field select { flex:3; }
    .product-modal .modal-foot { justify-content:flex-end; }
    .required-mark { margin-left:2px; color:#f04438; font-style:normal; }
    .category-field { display:flex; align-items:center; gap:8px; }
    .category-field select { min-width:0; flex:1; }
    .category-field button { flex:0 0 auto; padding:7px 10px; border:1px dashed #b7a9df; border-radius:8px; color:#684bc8; background:#faf8ff; cursor:pointer; }
    .add-category-input { display:none; align-items:center; gap:7px; margin-top:8px; padding:8px; border:1px solid #e8e3f4; border-radius:9px; background:#faf9fd; }
    .add-category-input.show { display:flex; }
    .add-category-input input { min-width:0; flex:1; }
    .add-category-input button { flex:0 0 auto; }
    .product-link-field { padding:14px; border:1px solid #ebe8f2; border-radius:12px; background:#fbfaff; }
    .product-link-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
    .product-link-head label { margin:0; }
    .product-link-head-actions { display:flex; gap:8px; }
    .product-link-rows { display:grid; gap:9px; }
    .product-link-row { display:grid; grid-template-columns:150px minmax(0,1fr) 36px; gap:8px; align-items:center; }
    .product-link-row select,.product-link-row input { width:100%; }
    .product-link-remove { width:36px; height:36px; border:1px solid #e6e1eb; border-radius:9px; color:#aaa3b1; background:#fff; cursor:pointer; }
    .product-link-remove:hover { color:#d54c58; border-color:#f0c3c8; background:#fff5f6; }
    .platform-create-line { display:none; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; margin-top:10px; padding-top:10px; border-top:1px dashed #ddd6e8; }
    .platform-create-line.show { display:grid; }
    .product-description-create { min-height:112px; }
    .product-link-surface { grid-column:1/-1; position:relative; padding:11px 0 4px; border-top:1px solid #f0edf3; }
    .product-link-surface > label { display:block; margin-bottom:9px; color:#918b99; font-size:12px; }
    .product-detail-link-list { display:flex; flex-wrap:wrap; gap:8px; padding-right:54px; }
    .product-detail-link-item { display:inline-flex; min-width:0; max-width:100%; align-items:center; gap:8px; padding:7px 10px; border:1px solid #e8e3f0; border-radius:9px; background:#faf9fd; }
    .product-detail-link-item b { flex:0 0 auto; padding:2px 6px; border-radius:5px; color:#6749c8; background:#eee9ff; font-size:11px; }
    .product-detail-link-item a { overflow:hidden; color:#5f5868; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
    .product-detail-link-editor { display:none; }
    .product-link-surface.is-editing .product-detail-link-list { display:none; }
    .product-link-surface.is-editing .product-detail-link-editor { display:block; }
    .product-link-surface .surface-actions { position:absolute; top:8px; right:0; }
    .product-link-empty { color:#aaa4af; font-size:12px; }
    .batch-link-area { min-height:320px; }
    .parsed-products { display:none; margin-top:14px; }
    .parsed-products.show { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .parsed-product { display:flex; gap:10px; align-items:center; padding:10px; border:1px solid #ebe8f2; border-radius:10px; background:#fff; }
    .parsed-product i { width:38px; height:38px; flex:0 0 auto; border-radius:9px; background:#ece5f9; }
    .product-detail-hero { display:grid; grid-template-columns:160px minmax(0,1fr); gap:22px; padding:18px; border-radius:14px; background:linear-gradient(135deg,#faf8ff,#f5f7fb); }
    .detail-product-image { display:flex; min-height:158px; align-items:center; justify-content:center; border-radius:12px; background:linear-gradient(145deg,#ede9e6,#d7dbe6); }
    .detail-product-image .product-visual { width:80px; height:108px; border-radius:20px; background:linear-gradient(145deg,#fff,#d7d5dd); box-shadow:10px 10px 17px rgba(57,46,75,.14); }
    .detail-product-image .product-visual::after { content:""; display:block; width:32px; height:32px; margin:16px auto; border:3px solid #716b80; border-radius:50%; opacity:.45; }
    .detail-hero-main h2 { margin:0; color:#292635; }
    .detail-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:9px; color:#85818e; font-size:12px; }
    .detail-price { margin-top:14px; color:#f04438; font-size:23px; font-weight:800; }
    .detail-link { margin-top:6px; overflow:hidden; color:#7d63cf; font-size:12px; white-space:nowrap; text-overflow:ellipsis; }
    .detail-section { margin-top:20px; }
    .detail-section h3 { margin:0 0 10px; font-size:15px; color:#36333f; }
    .detail-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .detail-box { padding:13px; border:1px solid #ebeaf0; border-radius:11px; background:#fff; }
    .detail-box label { display:block; margin-bottom:7px; color:#9a97a3; font-size:12px; }
    .detail-box p { margin:0; color:#45414d; line-height:1.7; font-size:13px; white-space:pre-line; }
    .group-tags { display:flex; flex-wrap:wrap; gap:7px; }
    .group-tags span { border-radius:6px; padding:5px 8px; color:#5d4c94; background:#f1edff; font-size:12px; }
    .relation-tabs { display:flex; gap:7px; overflow:auto; padding-bottom:3px; }
    .relation-tabs button { flex:0 0 auto; padding:7px 11px; border:1px solid #e5e1ee; border-radius:7px; color:#777282; background:#fff; cursor:pointer; }
    .relation-tabs button.active { border-color:#b9a7ff; color:#6244cf; background:#f5f1ff; }
    .relation-panel { display:none; margin-top:12px; }
    .relation-panel.active { display:grid; gap:8px; }
    .relation-row { display:flex; gap:12px; align-items:center; padding:11px 12px; border:1px solid #efedf3; border-radius:9px; }
    .relation-row i { width:34px; height:34px; flex:0 0 auto; border-radius:8px; background:#f1eff7; }
    .relation-row div { min-width:0; flex:1; }
    .relation-row strong { display:block; overflow:hidden; color:#403b49; font-size:13px; white-space:nowrap; text-overflow:ellipsis; }
    .relation-row small { color:#94909d; }
    .relation-row button { border:0; border-radius:6px; padding:6px 9px; color:#6244cf; background:#f1edff; cursor:pointer; }
    .product-detail-page { width:100%; max-width:none; margin:0; padding:24px 28px 44px; }
    .product-detail-back { margin-bottom:16px; }
    .product-detail-banner { display:grid; grid-template-columns:148px minmax(0,1fr) auto; align-items:center; gap:22px; padding:22px; border:1px solid #ebe8f2; border-radius:18px; background:linear-gradient(115deg,#fff,#f6f3ff 62%,#f4f8ff); box-shadow:0 10px 28px rgba(49,37,86,.05); }
    .product-detail-banner .detail-product-image { min-height:132px; }
    .product-detail-summary h1 { margin:0; color:#292535; font-size:24px; }
    .product-detail-summary .product-summary-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:10px; color:#908c99; font-size:13px; }
    .product-detail-summary .product-summary-line .summary-price { color:#f04438; font-size:17px; font-weight:800; }
    .product-detail-summary .product-summary-line .summary-link { overflow:hidden; max-width:360px; color:#7359c8; text-overflow:ellipsis; white-space:nowrap; }
    .product-detail-summary .detail-price { margin-top:9px; }
    .product-detail-actions { display:flex; flex-direction:column; gap:8px; }
    .product-detail-actions .danger-btn { border-color:#f0c8cc; color:#c8424e; background:#fff; }
    .product-detail-actions .danger-btn:hover { background:#fff3f4; }
    .product-detail-layout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(340px,.8fr); gap:18px; margin-top:18px; }
    .product-detail-card { padding:18px; border:1px solid #eceaf2; border-radius:15px; background:#fff; }
    .product-detail-card + .product-detail-card { margin-top:18px; }
    .product-detail-card-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }
    .product-detail-card-head h3 { margin:0; color:#36313f; font-size:15px; }
    .product-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .product-edit-grid .full { grid-column:1/-1; }
    .product-edit-grid .field textarea { min-height:86px; }
    #page-product-detail [data-save-product-detail] { display:none; }
    #page-product-detail .field, #page-product-detail .scenario-row { position:relative; }
    #page-product-detail .field > input, #page-product-detail .field > textarea, #page-product-detail .field > .input-with-select, #page-product-detail .scenario-row > input, #page-product-detail .scenario-row > textarea { transition:.16s ease; }
    #page-product-detail .detail-editable input, #page-product-detail .detail-editable textarea, #page-product-detail .detail-editable select { border-color:transparent; background:transparent; pointer-events:none; resize:none; }
    #page-product-detail .detail-editable:hover input, #page-product-detail .detail-editable:hover textarea, #page-product-detail .detail-editable:hover select { background:#fbfaff; }
    .detail-edit-action { position:absolute; top:7px; right:7px; z-index:2; padding:3px 6px; border:0; border-radius:5px; color:#96929e; background:transparent; font-size:11px; cursor:pointer; opacity:0; transition:.15s ease; }
    .detail-editable:hover .detail-edit-action, .detail-editable.is-editing .detail-edit-action { opacity:1; }
    #page-product-detail .detail-editable.is-editing input, #page-product-detail .detail-editable.is-editing textarea, #page-product-detail .detail-editable.is-editing select { border-color:#bba9fa; background:#fff; box-shadow:0 0 0 3px rgba(121,92,224,.08); pointer-events:auto; }
    .detail-editable.is-editing .detail-edit-action { color:#6548cd; background:#f1edff; }
    .scenario-editor { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .scenario-group { position:relative; min-height:104px; padding:16px; border:1px solid #e9e5f0; border-radius:13px; background:linear-gradient(145deg,#fff 0%,#faf9ff 100%); transition:.18s ease; }
    .scenario-group:hover { border-color:#cfc2f9; box-shadow:0 8px 22px rgba(72,48,138,.07); }
    .scenario-audience { display:flex; align-items:center; gap:8px; min-height:28px; font-size:15px; font-weight:700; color:#28233a; }
    .scenario-audience::before { content:""; width:7px; height:7px; border-radius:50%; background:#8464ed; box-shadow:0 0 0 4px #f0edff; }
    .scenario-tag-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:13px; padding-right:36px; }
    .scenario-tag { display:inline-flex; align-items:center; height:26px; padding:0 9px; border-radius:7px; color:#665880; background:#f1eef8; font-size:12px; }
    .scenario-edit-action { position:absolute; top:12px; right:12px; padding:4px 7px; border:0; border-radius:6px; color:#8a819d; background:transparent; font-size:12px; cursor:pointer; opacity:0; transition:.16s ease; }
    .scenario-group:hover .scenario-edit-action, .scenario-group.is-editing .scenario-edit-action { opacity:1; }
    .scenario-edit-action:hover { color:#684ad2; background:#f0ecff; }
    .scenario-edit-form { display:none; }
    .scenario-group.is-editing { min-height:168px; border-color:#bba9fa; background:#fff; box-shadow:0 0 0 3px rgba(121,92,224,.08); }
    .scenario-group.is-editing .scenario-display { display:none; }
    .scenario-group.is-editing .scenario-edit-form { display:grid; gap:8px; padding-top:1px; }
    .scenario-edit-form label { color:#5b536b; font-size:12px; font-weight:600; }
    .scenario-edit-form input, .scenario-edit-form textarea { width:100%; border:1px solid #ded8ee; border-radius:7px; outline:0; color:#312a41; background:#fff; }
    .scenario-edit-form input { height:32px; padding:0 9px; }
    .scenario-edit-form textarea { min-height:76px; padding:8px 9px; line-height:1.65; resize:vertical; }
    .scenario-edit-form input:focus, .scenario-edit-form textarea:focus { border-color:#967cf0; box-shadow:0 0 0 3px rgba(121,92,224,.10); }
    .asset-relation-grid { display:grid; gap:9px; }
    .asset-relation-item { display:flex; align-items:center; gap:10px; padding:11px; border:1px solid #eeeaf4; border-radius:10px; background:#fff; }
    .asset-relation-item i { width:32px; height:32px; flex:0 0 auto; border-radius:9px; background:#efecf9; }
    .asset-relation-item div { min-width:0; flex:1; }
    .asset-relation-item strong,.asset-relation-item small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
    .asset-relation-item strong { color:#403b49; font-size:13px; }.asset-relation-item small { margin-top:3px; color:#9893a0; font-size:11px; }
    .asset-relation-item button { border:0; border-radius:6px; padding:6px 8px; color:#6849cd; background:#f0ebff; cursor:pointer; }
    .product-asset-tabs { display:flex; gap:7px; overflow:auto; padding-bottom:4px; }
    .product-asset-tabs button { flex:0 0 auto; padding:6px 9px; border:1px solid #e6e1ef; border-radius:7px; color:#746f7d; background:#fff; font-size:12px; cursor:pointer; }
    .product-asset-tabs button.active { border-color:#b9a7ff; color:#6446cd; background:#f4f0ff; font-weight:700; }
    .product-asset-panel { display:none; margin-top:12px; }
    .product-asset-panel.active { display:block; }
    .product-creation-picker { position:relative; }
    .product-creation-picker > button { white-space:nowrap; }
    .product-creation-options { display:none; position:absolute; z-index:15; top:calc(100% + 7px); right:0; width:190px; padding:6px; border:1px solid #e7e2f0; border-radius:10px; background:#fff; box-shadow:0 16px 30px rgba(37,29,58,.16); }
    .product-creation-picker.open .product-creation-options { display:grid; gap:3px; }
    .product-creation-options button { padding:8px 9px; border:0; border-radius:7px; color:#4a4455; background:transparent; text-align:left; cursor:pointer; }
    .product-creation-options button:hover { color:#6245cb; background:#f4f1ff; }
    /* 产品详情：紧凑信息与原地资产管理 */
    .product-detail-page { padding:18px 22px 38px; }
    .product-detail-back { margin-bottom:10px; }
    .product-detail-banner { grid-template-columns:96px minmax(0,1fr) auto; gap:16px; padding:14px 16px; border-radius:14px; }
    .product-detail-banner .detail-product-image { min-height:86px; border-radius:10px; }
    .product-detail-banner .detail-product-image .product-visual { width:52px; height:68px; border-radius:13px; }
    .product-detail-banner .detail-product-image .product-visual::after { width:20px; height:20px; margin:10px auto; border-width:2px; }
    .product-detail-summary h1 { font-size:20px; }
    .product-detail-summary .product-summary-line { margin-top:7px; }
    .product-detail-summary .summary-chip { padding:3px 8px; border-radius:5px; color:#6e667d; background:#f1eef7; font-size:11px; }
    .product-detail-layout { display:block; margin-top:12px; }
    .product-profile-grid { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:12px; }
    .product-profile-grid .product-detail-card { margin:0; padding:15px 16px; border-radius:12px; }
    .product-profile-grid .span-all { grid-column:1/-1; }
    .compact-kv-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
    .compact-kv { position:relative; display:grid; grid-template-columns:88px minmax(0,1fr) auto; align-items:center; min-height:39px; border-bottom:1px solid #f0eef3; }
    .compact-kv:nth-last-child(-n+2) { border-bottom:0; }
    .compact-kv.full-line { grid-column:1/-1; border-bottom:0; }
    .compact-kv > label { color:#8e8997; font-size:12px; }
    .compact-kv .compact-value { overflow:hidden; color:#37323f; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
    .compact-kv .surface-actions { opacity:0; }
    .compact-kv:hover .surface-actions, .compact-kv.is-editing .surface-actions { opacity:1; }
    .surface-actions { display:flex; align-items:center; gap:7px; transition:.15s ease; }
    .surface-actions button { padding:3px 5px; border:0; color:#96919f; background:transparent; font-size:11px; cursor:pointer; }
    .surface-actions button:hover { color:#6547ce; }
    .surface-actions .surface-cancel { display:none; }
    .editable-surface.is-editing .surface-cancel { display:inline-block; }
    .editable-editor { display:none; }
    .editable-surface.is-editing .editable-view { display:none; }
    .editable-surface.is-editing .editable-editor { display:block; }
    .compact-kv .editable-editor input { width:100%; height:30px; padding:0 8px; border:1px solid #bba9fa; border-radius:6px; outline:0; box-shadow:0 0 0 3px rgba(121,92,224,.08); }
    .compact-kv .editable-editor .price-field { gap:6px; }
    .compact-kv .editable-editor .price-field input { flex:7; min-width:0; }
    .compact-kv .editable-editor .price-field select { flex:3; min-width:118px; height:30px; padding:0 7px; border:1px solid #bba9fa; border-radius:6px; outline:0; background:#fff; box-shadow:0 0 0 3px rgba(121,92,224,.08); }
    .multi-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid #eeebf2; border-radius:10px; overflow:hidden; }
    .multi-info-block { position:relative; min-height:150px; padding:14px 16px; border-right:1px solid #f0edf3; border-bottom:1px solid #f0edf3; }
    .multi-info-block:nth-child(2n) { border-right:0; }
    .multi-info-block:nth-last-child(-n+2) { border-bottom:0; }
    .multi-info-block.span-two { grid-column:1/-1; min-height:118px; border-right:0; border-bottom:0; }
    .multi-info-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
    .multi-info-head strong { color:#302b37; font-size:13px; }
    .multi-info-head small { margin-left:5px; color:#aaa5b1; font-weight:400; }
    .bullet-list { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
    .bullet-list li { position:relative; padding-left:15px; color:#504a58; font-size:12px; line-height:1.55; }
    .bullet-list li::before { content:""; position:absolute; top:7px; left:0; width:5px; height:5px; border-radius:50%; background:#ff5a52; }
    .multi-info-block .editable-editor textarea, .product-description .editable-editor textarea, .asset-inline-editor textarea { width:100%; min-height:112px; padding:10px; border:1px solid #bba9fa; border-radius:8px; outline:0; line-height:1.65; resize:vertical; box-shadow:0 0 0 3px rgba(121,92,224,.08); }
    .product-description { position:relative; }
    .product-description .product-detail-card-head { align-items:flex-start; }
    .product-description-title small { display:block; margin-top:4px; color:#96919d; font-size:11px; font-weight:400; }
    .product-description .surface-actions { flex:0 0 auto; opacity:1; }
    .product-description-source { width:100%; height:152px; padding:12px 13px; overflow-y:auto; border:1px solid #ece9f0; border-radius:9px; outline:0; color:#4e4857; background:#faf9fc; font-size:12px; line-height:1.72; resize:vertical; scrollbar-width:thin; scrollbar-color:#d8d3e1 transparent; }
    .product-description-source::-webkit-scrollbar { width:6px; }
    .product-description-source::-webkit-scrollbar-thumb { border-radius:99px; background:#d8d3e1; }
    .product-description:not(.is-editing) .product-description-source { resize:none; cursor:default; }
    .product-description.is-editing .product-description-source { min-height:180px; border-color:#bba9fa; background:#fff; box-shadow:0 0 0 3px rgba(121,92,224,.08); }
    .description-edit-tools { display:none; margin-top:10px; padding-top:10px; border-top:1px solid #efecf3; }
    .product-description.is-editing .description-edit-tools { display:block; }
    .product-description.is-editing .surface-cancel { display:inline-block; }
    .description-tool-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
    .description-tool-head span { color:#7e7886; font-size:12px; }
    .description-param-list { display:grid; gap:7px; }
    .description-param-row { display:grid; grid-template-columns:minmax(120px,.35fr) minmax(0,.65fr) 28px; gap:7px; }
    .description-param-row input { min-width:0; height:32px; padding:0 8px; border:1px solid #ddd8e8; border-radius:7px; outline:0; }
    .description-param-row input:focus { border-color:#9b82ee; box-shadow:0 0 0 3px rgba(121,92,224,.08); }
    .description-param-row button { border:0; border-radius:6px; color:#aaa4b0; background:#f4f2f6; cursor:pointer; }
    .description-param-row button:hover { color:#e4545a; background:#fff0f1; }
    .description-add-row { margin-top:8px; border:0; color:#6549c7; background:transparent; font-size:12px; cursor:pointer; }
    .asset-hub { margin-top:12px; padding:16px; border-radius:12px; }
    .asset-hub-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
    .asset-hub-head h3 { margin:0; font-size:15px; }
    .product-asset-tabs { gap:4px; padding:4px; border-radius:10px; background:#f5f3f8; }
    .product-asset-tabs button { padding:7px 13px; border:0; border-radius:7px; background:transparent; }
    .product-asset-tabs button.active { color:#4f37bd; background:#fff; box-shadow:0 2px 8px rgba(57,43,96,.10); }
    .product-asset-panel { display:none; margin-top:14px; }
    .product-asset-panel.active { display:block; }
    .asset-empty { display:flex; min-height:230px; flex-direction:column; align-items:center; justify-content:center; border:1px dashed #dedbe5; border-radius:12px; color:#9a96a0; background:#fdfdfd; }
    .asset-empty i { display:grid; width:48px; height:48px; place-items:center; border-radius:50%; color:#817c88; background:#f5f4f6; font-style:normal; font-size:21px; }
    .asset-empty strong { margin-top:13px; color:#403b46; font-size:14px; }
    .asset-empty p { margin:6px 0 0; font-size:12px; }
    .asset-preview-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,280px)); gap:12px; justify-content:start; }
    .asset-preview-grid .asset-content-card { width:100%; max-width:280px; }
    .asset-content-card { overflow:hidden; border:1px solid #e9e6ee; border-radius:11px; background:#fff; }
    .asset-content-head { display:flex; align-items:center; justify-content:space-between; padding:11px 13px; border-bottom:1px solid #f0edf3; }
    .asset-content-head strong { font-size:13px; }
    .asset-content-head small { color:#99939f; }
    .asset-content-head button { border:0; color:#6c51cb; background:transparent; font-size:12px; cursor:pointer; }
    .asset-image-preview { position:relative; width:100%; min-height:0; aspect-ratio:1/1; overflow:hidden; background:linear-gradient(145deg,#e9edf3,#dcd5eb); cursor:zoom-in; }
    .asset-image-preview.detail { background:linear-gradient(145deg,#f8eadc,#ead3bd); }
    .asset-image-preview .preview-product { position:absolute; right:14%; bottom:12%; width:96px; height:130px; border-radius:26px 26px 18px 18px; background:linear-gradient(145deg,#fff,#d5d4dd); box-shadow:15px 17px 28px rgba(55,45,70,.20); }
    .asset-image-preview .preview-copy { position:absolute; top:20px; left:20px; max-width:52%; color:#262230; font-size:18px; font-weight:850; line-height:1.25; }
    .asset-image-preview .preview-copy small { display:block; margin-top:9px; color:#7e7487; font-size:12px; font-weight:500; }
    .asset-image-preview.detail .preview-copy { max-width:62%; color:#593f32; font-size:17px; }
    .asset-card-meta { display:flex; justify-content:space-between; padding:10px 13px; color:#8d8794; font-size:11px; }
    .video-stage { position:relative; width:100%; min-height:0; aspect-ratio:9/16; overflow:hidden; background:linear-gradient(150deg,#342f3d,#17151d); }
    .video-stage::before { content:""; position:absolute; left:13%; bottom:0; width:44%; height:80%; border-radius:50% 50% 0 0; background:linear-gradient(145deg,#ddd6ca,#9b8d86); opacity:.55; }
    .video-stage::after { content:"▶"; position:absolute; top:50%; left:50%; display:grid; width:54px; height:54px; place-items:center; border-radius:50%; color:#fff; background:rgba(255,255,255,.18); backdrop-filter:blur(8px); transform:translate(-50%,-50%); font-size:18px; }
    .video-stage .video-caption { position:absolute; z-index:2; right:18px; bottom:18px; left:18px; color:#fff; text-align:center; font-size:14px; text-shadow:0 2px 8px #000; }
    .video-more-wrap { position:absolute; z-index:5; top:10px; right:10px; }
    .video-more-button { width:30px; height:30px; border:0; border-radius:8px; color:#fff; background:rgba(18,17,22,.45); backdrop-filter:blur(7px); cursor:pointer; font-size:17px; }
    .video-more-menu { display:none; position:absolute; top:36px; right:0; width:116px; padding:5px; border:1px solid rgba(255,255,255,.16); border-radius:8px; background:#fff; box-shadow:0 12px 26px rgba(0,0,0,.20); }
    .video-more-wrap.open .video-more-menu { display:block; }
    .video-more-menu button { width:100%; padding:8px 9px; border:0; border-radius:6px; color:#4e4955; background:transparent; text-align:left; cursor:pointer; }
    .video-more-menu button:hover { color:#6244cf; background:#f3efff; }
    .material-strip { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,184px)); gap:12px; justify-content:start; }
    .material-strip .material-card { width:100%; max-width:184px; }
    .material-card .video-stage { min-height:0; }
    .material-card .video-stage::after { width:38px; height:38px; font-size:13px; }
    .script-sheet { overflow:hidden; border:1px solid #e8e5ed; border-radius:10px; }
    .script-row { display:grid; grid-template-columns:70px 1.1fr 1fr 90px; border-bottom:1px solid #eeeaf1; }
    .script-row:last-child { border-bottom:0; }
    .script-row > div { padding:10px 12px; border-right:1px solid #f0edf3; color:#534d59; font-size:12px; line-height:1.55; }
    .script-row > div:last-child { border-right:0; }
    .script-row.header { background:#f8f7fa; font-weight:700; }
    .script-row.header > div { color:#77717e; }
    .generated-video-link { display:flex; align-items:center; gap:12px; margin-top:12px; padding:11px; border:1px solid #e9e5f0; border-radius:9px; background:#faf9fc; }
    .generated-video-thumb { flex:0 0 auto; width:40px; aspect-ratio:9/16; border-radius:7px; background:linear-gradient(145deg,#433d4d,#17151c); }
    .generated-video-link div { flex:1; }
    .generated-video-link strong,.generated-video-link small { display:block; }
    .generated-video-link small { margin-top:4px; color:#918b98; }
    .script-side-panel { display:grid; grid-template-columns:1.2fr .8fr; gap:12px; }
    .video-script-copy { padding:14px; border:1px solid #e9e6ee; border-radius:10px; background:#faf9fc; }
    .video-script-copy h4 { margin:0 0 9px; font-size:13px; }
    .video-script-copy p { margin:0; color:#554e5d; font-size:12px; line-height:1.75; }
    .template-tabs { display:flex; gap:6px; overflow:auto; margin-bottom:12px; border-bottom:1px solid #ebe7ef; }
    .template-tabs button { flex:0 0 auto; padding:8px 10px; border:0; border-bottom:2px solid transparent; color:#827c89; background:transparent; cursor:pointer; }
    .template-tabs button.active { border-bottom-color:#7455dd; color:#5c40c2; font-weight:700; }
    .template-panel { display:none; }
    .template-panel.active { display:block; }
    .template-card { position:relative; padding:15px; border:1px solid #e9e5ef; border-radius:10px; background:#fbfafe; }
    .template-card h4 { margin:0 0 6px; font-size:13px; }
    .template-card p { margin:0; color:#625b69; font-size:12px; line-height:1.75; white-space:pre-line; }
    .template-card + .template-card { margin-top:9px; }
    .template-card .surface-actions { position:absolute; top:10px; right:10px; opacity:0; }
    .template-card:hover .surface-actions, .template-card.is-editing .surface-actions { opacity:1; }
    .asset-inline-editor { display:none; padding:12px 13px; border-top:1px solid #eeeaf2; background:#fbfafe; }
    .asset-content-card.is-editing .asset-inline-editor { display:block; }
    .sync-hint { color:#8e8797; font-size:11px; }
    .prompt-agent-list { display:flex; gap:7px; overflow:auto; margin-bottom:12px; }
    .prompt-agent-list button { flex:0 0 auto; padding:7px 10px; border:1px solid #e5e1ec; border-radius:7px; color:#77717e; background:#fff; cursor:pointer; }
    .prompt-agent-list button.active { border-color:#b7a4fc; color:#6041c9; background:#f4f0ff; }
    .prompt-agent-panel { display:none; }
    .prompt-agent-panel.active { display:block; }
    .product-asset-panel[data-product-asset-panel="video"] > .asset-content-card { width:min(100%,184px); }
    .image-zoom-modal .modal { width:min(760px,calc(100vw - 42px)); }
    .image-zoom-modal .modal-body { padding:16px; }
    .image-zoom-host { overflow:hidden; width:min(620px,100%); margin:auto; border-radius:12px; }
    .image-zoom-host .asset-image-preview { cursor:default; }
    .session-delete-modal .modal { width:min(400px,calc(100vw - 40px)); height:auto; max-height:min(320px,calc(100vh - 40px)); border-radius:16px; }
    .session-delete-modal .modal-head { align-items:flex-start; padding:20px 20px 8px; border-bottom:0; }
    .session-delete-modal .modal-head > div { position:relative; padding-left:42px; }
    .session-delete-modal .modal-head > div::before { content:"!"; position:absolute; top:0; left:0; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#d94b51; background:#fff0f1; font-weight:800; }
    .session-delete-modal .modal-head h3 { font-size:16px; }
    .session-delete-modal .modal-head p { margin:5px 0 0; color:#92909a; font-size:12px; }
    .session-delete-modal .modal-x { flex:0 0 auto; margin-top:-4px; }
    .session-delete-modal .modal-body { flex:0 0 auto; padding:8px 20px 18px; overflow:visible; }
    .session-delete-modal .modal-foot { justify-content:flex-end; padding:0 20px 20px; border-top:0; }
    .session-delete-copy { padding:12px 14px; border-radius:10px; color:#625f69; background:#f7f7f9; font-size:12px; line-height:1.65; }
    /* 品牌库：与产品库同级的品牌事实与策略管理 */
    .brand-market-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
    .brand-market-card { position:relative; min-height:214px; padding:18px; border:1px solid #eceaf2; border-radius:15px; color:#312d39; background:#fff; cursor:pointer; transition:.18s ease; box-shadow:0 3px 14px rgba(44,42,57,.04); }
    .brand-market-card:hover { transform:translateY(-3px); border-color:#d8cbff; box-shadow:0 14px 28px rgba(79,55,155,.12); }
    .brand-card-top { display:flex; align-items:center; gap:12px; }
    .brand-card-logo { width:54px; height:54px; flex:0 0 auto; display:grid; place-items:center; overflow:hidden; border-radius:15px; color:#fff; background:linear-gradient(145deg,#7161e8,#4a38b9); font-size:21px; font-weight:800; box-shadow:0 9px 20px rgba(84,65,183,.20); }
    .brand-card-logo.green { background:linear-gradient(145deg,#5ba792,#287561); }
    .brand-card-logo.orange { background:linear-gradient(145deg,#efa15f,#c86a2c); }
    .brand-card-logo img { width:100%; height:100%; object-fit:cover; }
    .brand-card-top h3 { margin:0; font-size:17px; }
    .brand-card-top small { display:block; margin-top:3px; color:#96929d; }
    .brand-card-desc { min-height:42px; margin:15px 0 12px; color:#68636f; font-size:13px; line-height:1.7; }
    .brand-card-foot { display:flex; justify-content:space-between; margin-top:15px; padding-top:11px; border-top:1px solid #f0eff3; color:#97939e; font-size:11px; }
    .brand-card-delete { position:absolute; top:12px; right:12px; width:28px; height:28px; display:grid; place-items:center; border:1px solid #ebe7ef; border-radius:8px; color:#8a858f; background:#fff; opacity:0; cursor:pointer; }
    .brand-market-card:hover .brand-card-delete, .brand-card-delete:focus { opacity:1; }
    .brand-card-delete:hover { color:#cf3f4c; border-color:#f1c5ca; background:#fff4f5; }
    .card-menu-wrap { position:absolute; z-index:5; top:10px; right:10px; }
    .card-menu-trigger { width:30px; height:28px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.8); border-radius:8px; color:#68636f; background:rgba(255,255,255,.94); box-shadow:0 4px 12px rgba(47,40,62,.08); opacity:0; cursor:pointer; font-size:15px; line-height:1; transition:.16s ease; }
    .product-market-card:hover .card-menu-trigger, .brand-market-card:hover .card-menu-trigger, .card-menu-wrap.open .card-menu-trigger, .card-menu-trigger:focus { opacity:1; }
    .card-action-menu { display:none; position:absolute; z-index:8; top:34px; right:0; width:112px; padding:6px; border:1px solid #e8e4ed; border-radius:10px; background:#fff; box-shadow:0 14px 28px rgba(42,34,58,.16); }
    .card-menu-wrap.open .card-action-menu { display:block; }
    .card-action-menu button, .card-action-menu [role="menuitem"] { width:100%; display:block; padding:8px 10px; border:0; border-radius:7px; color:#c8424e; background:transparent; text-align:left; cursor:pointer; }
    .card-action-menu button:hover, .card-action-menu [role="menuitem"]:hover { background:#fff1f2; }
    .brand-detail-page { width:100%; max-width:none; margin:0; padding:18px 22px 40px; }
    .brand-detail-banner { display:grid; grid-template-columns:90px minmax(0,1fr) auto; align-items:center; gap:16px; padding:15px 17px; border:1px solid #ebe8f2; border-radius:14px; background:linear-gradient(115deg,#fff,#f6f3ff 62%,#f4f8ff); box-shadow:0 10px 28px rgba(49,37,86,.05); }
    .brand-detail-logo { width:76px; height:76px; display:grid; place-items:center; overflow:hidden; border-radius:20px; color:#fff; background:linear-gradient(145deg,#7161e8,#4a38b9); font-size:28px; font-weight:800; }
    .brand-detail-logo img { width:100%; height:100%; object-fit:cover; }
    .brand-detail-summary h1 { margin:0 0 5px; font-size:22px; }
    .brand-detail-summary p { margin:0; color:#77727e; }
    .brand-detail-actions { display:flex; gap:8px; }
    .brand-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; margin-top:14px; }
    .brand-info-card { padding:17px 18px; border:1px solid #eceaf2; border-radius:13px; background:#fff; }
    .brand-info-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; }
    .brand-info-card-head h3 { margin:0; font-size:15px; }
    .brand-field { position:relative; display:grid; grid-template-columns:92px minmax(0,1fr); gap:12px; padding:11px 0; border-bottom:1px solid #f0eff3; }
    .brand-field:last-child { border-bottom:0; }
    .brand-field label { color:#8c8792; font-size:12px; }
    .brand-field .brand-value { white-space:pre-line; color:#49444f; line-height:1.7; }
    .brand-field input, .brand-field textarea { display:none; width:100%; padding:9px 10px; border:1px solid #bba9fa; border-radius:8px; outline:0; resize:vertical; }
    .brand-field textarea { min-height:82px; }
    .brand-field.is-editing .brand-value { display:none; }
    .brand-field.is-editing input, .brand-field.is-editing textarea { display:block; }
    .brand-field-edit { position:absolute; top:9px; right:0; border:0; color:#9b96a1; background:transparent; font-size:11px; opacity:0; cursor:pointer; }
    .brand-field:hover .brand-field-edit, .brand-field.is-editing .brand-field-edit { opacity:1; }
    .brand-field.is-editing .brand-field-edit { color:#5f44c8; font-weight:700; }
    .brand-logo-upload { min-height:116px; display:flex; align-items:center; justify-content:center; border:1px dashed #bcb5cf; border-radius:11px; color:#746d83; background:#fbfaff; cursor:pointer; }
    .brand-logo-upload.has-image { color:#3f785e; border-color:#a8d5bf; background:#f0fbf5; }
    .brand-field .brand-logo-upload { display:none; min-height:76px; }
    .brand-field.is-editing .brand-logo-upload { display:flex; }
    .brand-logo-current { display:flex; align-items:center; gap:10px; color:#5f5967; }
    .brand-logo-thumb { width:46px; height:46px; flex:0 0 auto; display:grid; place-items:center; overflow:hidden; border-radius:13px; color:#fff; background:linear-gradient(145deg,#7161e8,#4a38b9); font-size:18px; font-weight:800; }
    .brand-logo-thumb img { width:100%; height:100%; object-fit:cover; }
    .brand-delete-modal .modal { width:min(410px,calc(100vw - 40px)); height:auto; }
    .brand-delete-modal .modal-body { padding:8px 20px 18px; }
    .brand-delete-modal .modal-foot { justify-content:flex-end; }
    @media (max-width:980px) { .product-detail-layout { grid-template-columns:1fr; }.product-detail-banner { grid-template-columns:120px 1fr; }.product-detail-actions { grid-column:1/-1; flex-direction:row; }.product-page-actions .search { width:180px; } }
    @media (max-width:980px) { .product-profile-grid,.script-side-panel { grid-template-columns:1fr; }.product-detail-banner { grid-template-columns:88px 1fr; }.product-detail-actions { grid-column:1/-1; }.material-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } }
    @media (max-width:720px) { .product-form-grid,.detail-info-grid,.product-edit-grid,.scenario-editor,.compact-kv-grid,.multi-info-grid,.asset-preview-grid,.material-strip,.brand-detail-grid { grid-template-columns:1fr; } .product-detail-hero { grid-template-columns:1fr; } .detail-product-image { min-height:110px; } .product-page-actions { flex-wrap:wrap; }.product-page-actions .search { width:100%; }.product-detail-banner,.brand-detail-banner { grid-template-columns:72px 1fr; }.product-detail-page,.brand-detail-page { padding:14px; }.product-detail-actions,.brand-detail-actions { grid-column:1/-1; }.multi-info-block { border-right:0; }.product-description .description-lines { grid-template-columns:1fr; }.script-row { grid-template-columns:54px 1fr; }.script-row > div:nth-child(3),.script-row > div:nth-child(4) { display:none; }.product-link-row { grid-template-columns:110px minmax(0,1fr) 36px; }.platform-create-line { grid-template-columns:1fr; } }
    /* 智能文案 Agent：最终三步工作流 */
    #agentTaskShell[data-agent-type="original"] .task-form-scroll {
      background:#fbfbfd;
      padding:0;
      overflow-x:hidden;
    }
    #agentTaskShell[data-agent-type="original"] .dynamic-form {
      display:block !important;
      grid-template-columns:none !important;
      width:100%;
      min-width:0;
      padding:0;
    }
    #agentTaskShell[data-agent-type="original"] .task-form-host,
    #agentTaskShell[data-agent-type="original"] .original-step-panel {
      display:block;
      width:100%;
      min-width:0;
      box-sizing:border-box;
    }
    #agentTaskShell[data-agent-type="original"] .original-flow-form {
      display:block;
      grid-column:1/-1;
      width:100%;
      max-width:none;
      min-width:0;
      margin:0;
      padding:24px 30px 32px;
      box-sizing:border-box;
    }
    #agentTaskShell[data-agent-type="original"] .original-step-panel[hidden] { display:none !important; }
    #agentTaskShell[data-agent-type="original"] .original-step-title {
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:20px;
      padding-bottom:18px;
      border-bottom:1px solid #ececf2;
      margin-bottom:4px;
    }
    #agentTaskShell[data-agent-type="original"] .original-header-controls {
      display:flex;
      align-items:center;
      justify-content:flex-end;
      flex-wrap:wrap;
      gap:9px;
      min-width:0;
    }
    #agentTaskShell[data-agent-type="original"] .header-product-picker select {
      width:190px;
      height:34px;
      padding:0 30px 0 10px;
      border:1px solid #dddde7;
      border-radius:9px;
      background:#fff;
      color:#34353d;
      outline:none;
    }
    #agentTaskShell[data-agent-type="original"] .original-step-title h2 {
      margin:0 0 5px;
      font-size:20px;
      color:#18181b;
    }
    #agentTaskShell[data-agent-type="original"] .original-step-title p {
      margin:0;
      color:#8a8b96;
      font-size:13px;
    }
    #agentTaskShell[data-agent-type="original"] .advanced-toggle {
      border:1px solid #dddde7;
      background:#fff;
      color:#565865;
      height:34px;
      padding:0 13px;
      border-radius:9px;
      cursor:pointer;
      white-space:nowrap;
    }
    #agentTaskShell[data-agent-type="original"] .advanced-toggle.active {
      border-color:#8b73f6;
      color:#684ee8;
      background:#f7f4ff;
    }
    #agentTaskShell[data-agent-type="original"] .original-group {
      display:block;
      padding:22px 0;
      border-bottom:1px solid #ececf2;
    }
    #agentTaskShell[data-agent-type="original"] .original-group:last-child { border-bottom:0; }
    #agentTaskShell[data-agent-type="original"] .original-group-title strong {
      display:inline-block;
      font-size:15px;
      color:#24242b;
      margin:0 9px 16px 0;
    }
    #agentTaskShell[data-agent-type="original"] .original-group-title span {
      display:inline-block;
      color:#a0a1aa;
      font-size:12px;
      line-height:1.55;
    }
    #agentTaskShell[data-agent-type="original"] .copy-basic-title {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      margin-bottom:16px;
    }
    #agentTaskShell[data-agent-type="original"] .copy-basic-title strong { margin-bottom:0; }
    #agentTaskShell[data-agent-type="original"] .copy-basic-controls {
      display:flex;
      align-items:center;
      justify-content:flex-end;
      gap:9px;
      min-width:0;
    }
    #agentTaskShell[data-agent-type="original"] .copy-basic-controls .header-product-picker select { width:190px; }
    #agentTaskShell[data-agent-type="original"] .product-source-inline.full { grid-column:1/-1; }
    #agentTaskShell[data-agent-type="original"] .product-source-inline.full:empty,
    #agentTaskShell[data-agent-type="original"] .product-source-inline.full[hidden] { display:none; }
    #agentTaskShell[data-agent-type="original"] .reference-library-trigger {
      width:100%; height:40px; padding:0 12px; border:1px solid #dddde7; border-radius:9px;
      background:#fff; color:#4a4b55; display:flex; align-items:center; justify-content:space-between; cursor:pointer;
    }
    #agentTaskShell[data-agent-type="original"] .reference-library-trigger:hover { border-color:#9a82f4; color:#654ae5; }
    #agentTaskShell[data-agent-type="original"] .selected-reference-video {
      margin-top:8px; padding:9px 11px; border-radius:9px; background:#f7f5ff; color:#5d46c8; font-size:12px; line-height:1.5;
    }
    #agentTaskShell[data-agent-type="original"] .selected-reference-video strong,
    #agentTaskShell[data-agent-type="original"] .selected-reference-video span { display:block; }
    #agentTaskShell[data-agent-type="original"] .selected-reference-video span { margin-top:2px; color:#85838f; }
    #agentTaskShell[data-agent-type="original"] .reference-video-picker {
      grid-column:1/-1; border:1px solid #e2e2e9; border-radius:12px; background:#fff; padding:14px;
      box-shadow:0 12px 30px rgba(30,27,55,.08);
    }
    #agentTaskShell[data-agent-type="original"] .reference-picker-head,
    #agentTaskShell[data-agent-type="original"] .reference-picker-tools { display:flex; align-items:center; justify-content:space-between; gap:14px; }
    #agentTaskShell[data-agent-type="original"] .reference-picker-head span { display:block; margin-top:3px; color:#999aa5; font-size:11px; }
    #agentTaskShell[data-agent-type="original"] .reference-picker-head button { border:0; background:transparent; color:#8c8d98; font-size:20px; cursor:pointer; }
    #agentTaskShell[data-agent-type="original"] .reference-picker-tools { margin:12px 0 10px; }
    #agentTaskShell[data-agent-type="original"] .reference-picker-tools > input { flex:1; min-width:180px; height:36px; padding:0 11px; border:1px solid #dddde7; border-radius:9px; outline:none; }
    #agentTaskShell[data-agent-type="original"] .reference-video-list { display:grid; gap:8px; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option {
      width:100%; border:1px solid #ececf1; border-radius:10px; background:#fff; padding:10px;
      display:grid; grid-template-columns:64px minmax(0,1fr) auto; align-items:center; gap:11px; text-align:left; cursor:pointer;
    }
    #agentTaskShell[data-agent-type="original"] .reference-video-option:hover { border-color:#a994f5; background:#fbfaff; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option.selected { border-color:#7658e8; background:#f7f4ff; box-shadow:0 0 0 2px rgba(118,88,232,.08); }
    #agentTaskShell[data-agent-type="original"] .reference-video-option.selected em::before { content:"✓ "; }
    #agentTaskShell[data-agent-type="original"] .reference-transcript-editor { grid-column:1/-1; }
    #agentTaskShell[data-agent-type="original"] .reference-transcript-head {
      display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px;
    }
    #agentTaskShell[data-agent-type="original"] .reference-transcript-head label { margin:0; }
    #agentTaskShell[data-agent-type="original"] .reference-transcript-head button {
      border:0; background:transparent; color:#6d55d9; font-size:12px; cursor:pointer; padding:3px 0;
    }
    #agentTaskShell[data-agent-type="original"] .reference-transcript-editor textarea { min-height:132px; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option[hidden] { display:none; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option i { width:42px; height:28px; display:grid; place-items:center; border-radius:7px; background:#eeeafc; color:#654ae5; font-style:normal; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option strong,
    #agentTaskShell[data-agent-type="original"] .reference-video-option small { display:block; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option small { margin-top:3px; color:#9899a3; font-size:11px; }
    #agentTaskShell[data-agent-type="original"] .reference-video-option em { color:#654ae5; font-size:12px; font-style:normal; }
    #agentTaskShell[data-agent-type="original"] [data-original-step="2"] .original-group-title { display:none; }
    #agentTaskShell[data-agent-type="original"] [data-original-step="2"] .original-group { padding-top:22px; }
    #agentTaskShell[data-agent-type="original"] .original-group-fields {
      display:grid;
      grid-template-columns:repeat(2,minmax(0,1fr));
      gap:18px 16px;
      min-width:0;
    }
    #agentTaskShell[data-agent-type="original"] .original-field {
      min-width:0;
    }
    #agentTaskShell[data-agent-type="original"] .original-field.full { grid-column:1/-1; }
    #agentTaskShell[data-agent-type="original"] .original-field > label,
    #agentTaskShell[data-agent-type="original"] .original-field-head label {
      display:block;
      margin:0 0 8px;
      color:#30313a;
      font-size:13px;
      font-weight:650;
    }
    #agentTaskShell[data-agent-type="original"] .required-star { color:#f24b61; margin-left:3px; }
    #agentTaskShell[data-agent-type="original"] .original-field-head {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:8px;
    }
    #agentTaskShell[data-agent-type="original"] .original-field-head label { margin:0; }
    #agentTaskShell[data-agent-type="original"] .ai-refresh {
      border:0;
      background:transparent;
      color:#765bea;
      font-size:12px;
      cursor:pointer;
      padding:3px 0;
    }
    #agentTaskShell[data-agent-type="original"] .original-field input,
    #agentTaskShell[data-agent-type="original"] .original-field select,
    #agentTaskShell[data-agent-type="original"] .original-field textarea {
      width:100%;
      border:1px solid #dedee7;
      border-radius:10px;
      background:#fff;
      color:#292a33;
      font:inherit;
      outline:none;
      transition:.18s ease;
    }
    #agentTaskShell[data-agent-type="original"] .original-field input,
    #agentTaskShell[data-agent-type="original"] .original-field select { height:42px; padding:0 12px; }
    #agentTaskShell[data-agent-type="original"] .original-field textarea { min-height:80px; padding:10px 12px; resize:vertical; line-height:1.6; }
    #agentTaskShell[data-agent-type="original"] .original-field input:focus,
    #agentTaskShell[data-agent-type="original"] .original-field select:focus,
    #agentTaskShell[data-agent-type="original"] .original-field textarea:focus {
      border-color:#8067ef;
      box-shadow:0 0 0 3px rgba(120,91,235,.09);
    }
    #agentTaskShell[data-agent-type="original"] .original-field.invalid input,
    #agentTaskShell[data-agent-type="original"] .original-field.invalid textarea,
    #agentTaskShell[data-agent-type="original"] .original-field.invalid select { border-color:#ee6474; }
    #agentTaskShell[data-agent-type="original"] .source-switch {
      display:inline-flex;
      width:auto;
      max-width:100%;
      flex-wrap:nowrap;
      gap:4px;
      padding:4px;
      border:1px solid #e5e5ec;
      border-radius:10px;
      background:#f5f5f8;
      margin-bottom:0;
    }
    #agentTaskShell[data-agent-type="original"] .source-switch button {
      flex:0 0 auto;
      height:30px;
      padding:0 13px;
      border:0;
      border-radius:7px;
      background:transparent;
      color:#777985;
      cursor:pointer;
      white-space:nowrap;
    }
    #agentTaskShell[data-agent-type="original"] .source-switch button.active {
      background:#fff;
      color:#292a32;
      box-shadow:0 1px 5px rgba(25,25,34,.08);
    }
    #agentTaskShell[data-agent-type="original"] .product-source-inline {
      grid-column:1/-1;
      margin:0 0 18px;
      padding-bottom:18px;
      border-bottom:1px solid #ececf2;
    }
    #agentTaskShell[data-agent-type="original"] .link-recognizer {
      display:grid;
      grid-template-columns:minmax(0,1fr) auto;
      gap:10px;
    }
    #agentTaskShell[data-agent-type="original"] .link-recognizer button {
      border:0;
      border-radius:10px;
      padding:0 17px;
      background:#202025;
      color:#fff;
      cursor:pointer;
    }
    #agentTaskShell[data-agent-type="original"] .point-editor {
      border:1px solid #dedee7;
      border-radius:11px;
      padding:7px;
      background:#fff;
    }
    #agentTaskShell[data-agent-type="original"] .point-row {
      display:grid;
      grid-template-columns:20px minmax(0,1fr) auto;
      align-items:center;
      gap:7px;
      min-height:40px;
      padding:2px 4px;
    }
    #agentTaskShell[data-agent-type="original"] .point-row + .point-row { border-top:1px solid #f0f0f4; }
    #agentTaskShell[data-agent-type="original"] .point-index { color:#fb625c; font-size:12px; text-align:center; }
    #agentTaskShell[data-agent-type="original"] .point-row input { border:0; box-shadow:none; height:36px; padding:0 4px; }
    #agentTaskShell[data-agent-type="original"] .point-row input:focus { border:0; box-shadow:none; }
    #agentTaskShell[data-agent-type="original"] .point-actions { display:flex; gap:2px; }
    #agentTaskShell[data-agent-type="original"] .point-actions button,
    #agentTaskShell[data-agent-type="original"] .point-add {
      border:0;
      background:transparent;
      color:#999aa4;
      cursor:pointer;
      border-radius:6px;
    }
    #agentTaskShell[data-agent-type="original"] .point-actions button { width:27px; height:27px; }
    #agentTaskShell[data-agent-type="original"] .point-actions button:hover { background:#f2f0fc; color:#6d52e7; }
    #agentTaskShell[data-agent-type="original"] .point-add { padding:7px 8px; color:#6d52e7; }
    #agentTaskShell[data-agent-type="original"] .choice-row.original-choices {
      display:flex;
      flex-wrap:wrap;
      gap:8px;
    }
    #agentTaskShell[data-agent-type="original"] .original-choices .choice-chip,
    #agentTaskShell[data-agent-type="original"] .original-audience-chip {
      display:inline-flex;
      align-items:center;
      min-height:34px;
      padding:6px 12px;
      border:1px solid #dedee7;
      border-radius:9px;
      background:#fff;
      color:#5f606b;
      cursor:pointer;
      font-size:12px;
    }
    #agentTaskShell[data-agent-type="original"] .original-choices .choice-chip.active,
    #agentTaskShell[data-agent-type="original"] .original-audience-chip.active {
      border-color:#8067ef;
      background:#f5f2ff;
      color:#6245df;
    }
    #agentTaskShell[data-agent-type="original"] .audience-selector {
      display:grid;
      gap:14px;
      padding:14px;
      border:1px solid #e7e7ed;
      border-radius:11px;
      background:#fff;
    }
    #agentTaskShell[data-agent-type="original"] .audience-selector-row {
      display:grid;
      grid-template-columns:82px minmax(0,1fr);
      gap:12px;
      align-items:start;
    }
    #agentTaskShell[data-agent-type="original"] .audience-selector-row > span { color:#777984; font-size:12px; padding-top:8px; }
    #agentTaskShell[data-agent-type="original"] .age-custom {
      display:inline-flex;
      align-items:center;
      gap:6px;
    }
    #agentTaskShell[data-agent-type="original"] .age-custom input { width:70px; height:34px; }
    #agentTaskShell[data-agent-type="original"] .number-control {
      display:grid;
      grid-template-columns:minmax(0,1fr) 42px;
      gap:8px;
    }
    #agentTaskShell[data-agent-type="original"] .number-control span {
      height:42px;
      display:grid;
      place-items:center;
      border:1px solid #dedee7;
      border-radius:10px;
      background:#f7f7f9;
      color:#777985;
    }
    #agentTaskShell[data-agent-type="original"] .duration-estimate { color:#888995; font-size:12px; margin-top:7px; }
    #agentTaskShell[data-agent-type="original"] .original-model-picker { position:relative; }
    #agentTaskShell[data-agent-type="original"] .original-model-card { padding:0; border:0; border-radius:0; background:transparent; }
    #agentTaskShell[data-agent-type="original"] .original-model-trigger {
      width:100%;
      height:44px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:0 13px;
      border:1px solid #dedee7;
      border-radius:10px;
      background:#fff;
      color:#292a33;
      cursor:pointer;
    }
    #agentTaskShell[data-agent-type="original"] .original-model-popover {
      position:absolute;
      z-index:30;
      left:0;
      right:0;
      bottom:50px;
      max-height:330px;
      overflow:auto;
      padding:8px;
      border:1px solid #e1e1e8;
      border-radius:13px;
      background:#fff;
      box-shadow:0 18px 48px rgba(28,25,46,.16);
      display:none;
    }
    #agentTaskShell[data-agent-type="original"] .original-model-picker.open .original-model-popover { display:block; }
    #agentTaskShell[data-agent-type="original"] .original-model-option {
      width:100%;
      display:grid;
      grid-template-columns:minmax(0,1fr) auto;
      gap:12px;
      text-align:left;
      padding:10px 11px;
      border:0;
      border-radius:9px;
      background:#fff;
      cursor:pointer;
    }
    #agentTaskShell[data-agent-type="original"] .original-model-option:hover { background:#f6f5fa; }
    #agentTaskShell[data-agent-type="original"] .original-model-option.selected { background:#f2efff; color:#5f43df; }
    #agentTaskShell[data-agent-type="original"] .original-model-option span { display:grid; gap:3px; }
    #agentTaskShell[data-agent-type="original"] .original-model-option small { color:#9697a1; }
    #agentTaskShell[data-agent-type="original"] .task-confirm-card {
      width:min(100%, 860px);
      margin:34px auto;
      padding:26px;
      border:1px solid #e3e1ee;
      border-radius:16px;
      background:#fff;
      box-shadow:0 10px 34px rgba(32,25,60,.06);
    }
    #agentTaskShell[data-agent-type="original"] .task-confirm-card strong { font-size:18px; }
    #agentTaskShell[data-agent-type="original"] .generation-summary {
      display:grid;
      grid-template-columns:repeat(3,minmax(0,1fr));
      gap:10px;
      margin-top:18px;
    }
    #agentTaskShell[data-agent-type="original"] .generation-summary div {
      padding:12px;
      border-radius:10px;
      background:#f7f7fa;
    }
    #agentTaskShell[data-agent-type="original"] .generation-summary small { display:block; color:#92939d; margin-bottom:5px; }
    #agentTaskShell[data-agent-type="original"] .generation-summary b { font-size:13px; color:#33343d; }
    #agentTaskShell[data-agent-type="original"] .task-stepper {
      gap:0;
      padding:12px 28px 10px;
      border-bottom:1px solid #ececf2;
      background:#fff;
    }
    #agentTaskShell[data-agent-type="original"] .task-step {
      position:relative;
      flex:1;
      min-height:44px;
      flex-direction:column;
      justify-content:flex-start;
      gap:5px;
      border:0;
      background:transparent;
      padding:0;
      color:#9b9ca5;
      text-align:center;
    }
    #agentTaskShell[data-agent-type="original"] .task-step:not(:last-child)::after {
      content:"";
      position:absolute;
      z-index:0;
      left:calc(50% + 18px);
      right:calc(-50% + 18px);
      top:13px;
      height:1px;
      background:#e4e4ea;
    }
    #agentTaskShell[data-agent-type="original"] .task-step b {
      position:relative;
      z-index:1;
      width:26px;
      height:26px;
      display:grid;
      place-items:center;
      border:1px solid #dedee7;
      border-radius:50%;
      background:#fff;
      color:#8d8e97;
      font-size:11px;
      box-shadow:0 0 0 4px #fff;
    }
    #agentTaskShell[data-agent-type="original"] .task-step span {
      position:relative;
      z-index:1;
      max-width:100%;
      overflow:hidden;
      color:inherit;
      font-size:12px;
      white-space:nowrap;
      text-overflow:ellipsis;
    }
    #agentTaskShell[data-agent-type="original"] .task-step.active { color:#292a33; font-weight:650; }
    #agentTaskShell[data-agent-type="original"] .task-step.active b,
    #agentTaskShell[data-agent-type="original"] .task-step.done b { border-color:#765bea; background:#765bea; color:#fff; }
    #agentTaskShell[data-agent-type="original"] .task-step.done:not(:last-child)::after { background:#b8acf5; }
    #agentTaskShell[data-agent-type="original"] .task-action-buttons { width:100%; }
    #agentTaskShell[data-agent-type="original"] .task-back-button { margin-right:auto; }
    #agentTaskShell[data-agent-type="original"] .task-action-note:empty { display:none; }
    #agentTaskShell[data-agent-type="original"] #formFeedback { display:none !important; }
    #agentTaskShell[data-agent-type="original"] .advanced-field[hidden] { display:none !important; }
    #page-creation .conversation-panel { overflow-x:hidden; }
    #page-creation .chat-list,
    #page-creation .chat-row { width:100%; max-width:100%; min-width:0; box-sizing:border-box; }
    @media (max-width:980px) {
      #agentTaskShell[data-agent-type="original"] .original-group { grid-template-columns:1fr; gap:13px; }
      #agentTaskShell[data-agent-type="original"] .original-group-fields { grid-template-columns:1fr; }
      #agentTaskShell[data-agent-type="original"] .generation-summary { grid-template-columns:1fr; }
    }
    /* merged: 文案库与模板库专属样式 */
    /* 模板库 - 筛选行 */
    .lib-filter-row { display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
    .lib-search { flex:1; min-width:220px; padding:8px 12px; border:1px solid #d9dbe3; border-radius:8px; font-size:13px; background:#fff; }
    .lib-search:focus { outline:none; border-color:#534AB7; box-shadow:0 0 0 3px rgba(83,74,183,.08); }
    .lib-filter-select { padding:8px 28px 8px 12px; border:1px solid #d9dbe3; border-radius:8px; font-size:13px; background:#fff; cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; }

    /* 模板库 - 表格 */
    .lib-table-wrap { overflow-x:auto; border:1px solid #e9eaf0; border-radius:10px; background:#fff; }
    .lib-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:13px; min-width:860px; }
    .lib-table th { background:#f8f9fb; padding:11px 14px; font-weight:600; font-size:11px; text-align:left; color:#8b8fa3; border-bottom:1px solid #e9eaf0; letter-spacing:0.3px; }
    .lib-table td { padding:12px 14px; vertical-align:middle; border-top:1px solid #e9eaf0; color:#5f5e5a; font-size:13px; }
    .lib-table tbody tr { transition:background .12s; }
    .lib-table tbody tr:hover { background:rgba(83,74,183,.025); }
    .lib-table tbody tr:first-child td { border-top:none; }
    .lib-table .lib-cell-text { color:#444441; line-height:1.55; }

    /* 模板库 - Agent tag */
    .lib-tag { display:inline-block; padding:3px 10px; border-radius:6px; font-size:11px; font-weight:500; line-height:1.4; }
    .lib-tag-image { background:#EEEDFE; color:#534AB7; }
    .lib-tag-detail { background:#EAF3DE; color:#3B6D11; }

    /* 模板库 - 链接式操作 */
    .lib-link { color:#534AB7; text-decoration:none; font-size:12px; cursor:pointer; font-weight:500; }
    .lib-link:hover { text-decoration:underline; }
    .lib-link.danger { color:#A32D2D; }

    /* 人群画像模板 */
    .persona-library-table td { line-height:1.5; }
    .persona-library-table .persona-name-cell strong,
    .persona-library-table .persona-name-cell small { display:block; }
    .persona-library-table .persona-name-cell small { margin-top:3px; color:#9799a5; font-size:10px; }
    .persona-attribute-summary { color:#4f5260; }
    .persona-scope-tag { display:inline-flex; padding:3px 8px; border-radius:7px; color:#5d4bc2; background:#f2efff; font-size:10px; }
    .persona-row-actions { display:flex; flex-wrap:wrap; gap:6px 9px; }
    .persona-row-actions button { padding:0; border:0; background:transparent; font:inherit; }
    .persona-library-empty { padding:42px 20px; color:#9698a4; text-align:center; }
    .persona-template-modal { width:min(760px,100%); height:auto; max-height:calc(100vh - 40px); }
    .persona-history-modal { width:min(780px,100%); height:auto; max-height:min(620px,calc(100vh - 40px)); }
    .persona-delete-modal { width:min(460px,100%); height:auto; }
    .persona-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
    .persona-form-grid .full { grid-column:1/-1; }
    .persona-choice-row { display:flex; flex-wrap:wrap; gap:8px; }
    .persona-choice-row > button { min-height:34px; padding:6px 12px; border:1px solid #dedee7; border-radius:9px; color:#626472; background:#fff; cursor:pointer; font-size:12px; }
    .persona-choice-row > button:hover { border-color:#aaa2df; }
    .persona-choice-row > button.active { border-color:#8067ef; color:#6245df; background:#f5f2ff; }
    .persona-custom-age { display:inline-flex; align-items:center; gap:7px; }
    .persona-custom-age[hidden] { display:none; }
    .persona-custom-age input { width:76px !important; height:34px; }
    .persona-custom-age i { color:#81838f; font-style:normal; }
    .persona-form-note { color:#8c8f9d; font-size:11px; }
    .persona-history-list { display:grid; gap:10px; }
    .persona-history-item { padding:12px 14px; border:1px solid #e9e9f0; border-radius:10px; background:#fff; }
    .persona-history-meta { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; color:#90929e; font-size:11px; }
    .persona-history-change { display:grid; grid-template-columns:100px 1fr 20px 1fr; gap:9px; align-items:start; font-size:12px; }
    .persona-history-change strong { color:#4b4d59; }
    .persona-history-change span { min-width:0; color:#777984; overflow-wrap:anywhere; }
    .persona-delete-copy { margin:0; color:#666976; line-height:1.7; }
    .danger-confirm { background:#d94b51 !important; border-color:#d94b51 !important; }

    /* 三个文案 Agent 共用的人群画像搜索下拉 */
    #agentTaskShell .persona-picker { position:relative; }
    #agentTaskShell .persona-source-switch { width:max-content; display:inline-grid; grid-template-columns:repeat(2,auto); gap:3px; padding:3px; border:1px solid #e2e2e9; border-radius:10px; background:#f6f6f9; }
    #agentTaskShell .persona-source-switch button { min-width:108px; height:34px; padding:0 14px; border:0; border-radius:7px; color:#747682; background:transparent; cursor:pointer; font-size:12px; }
    #agentTaskShell .persona-source-switch button:hover { color:#555862; }
    #agentTaskShell .persona-source-switch button.active { color:#5d46ce; background:#fff; box-shadow:0 1px 4px rgba(35,31,55,.1); font-weight:600; }
    #agentTaskShell .persona-template-select { position:relative; margin-top:10px; }
    #agentTaskShell .persona-template-select[hidden] { display:none; }
    #agentTaskShell .persona-picker-trigger { width:100%; min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 11px; border:1px solid #dedee7; border-radius:10px; color:#565863; background:#fff; cursor:pointer; }
    #agentTaskShell .persona-picker-trigger:hover,
    #agentTaskShell .persona-picker.open .persona-picker-trigger { border-color:#9380ec; box-shadow:0 0 0 3px rgba(128,103,239,.08); }
    #agentTaskShell .persona-picker-trigger small { color:#999ba6; }
    #agentTaskShell .persona-picker-dropdown { position:absolute; z-index:35; top:calc(100% + 7px); left:0; right:0; padding:9px; border:1px solid #e1e1e9; border-radius:12px; background:#fff; box-shadow:0 14px 34px rgba(36,30,62,.16); }
    #agentTaskShell .persona-picker-dropdown[hidden] { display:none; }
    #agentTaskShell .persona-picker-search { width:100%; height:36px; margin-bottom:7px; padding:0 10px; border:1px solid #e1e1e8; border-radius:8px; outline:none; }
    #agentTaskShell .persona-picker-search:focus { border-color:#8c77eb; }
    #agentTaskShell .persona-picker-options { max-height:238px; overflow:auto; }
    #agentTaskShell .persona-picker-option { width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:9px 10px; border:0; border-radius:9px; text-align:left; color:#343640; background:transparent; cursor:pointer; }
    #agentTaskShell .persona-picker-option:hover { background:#f7f5ff; }
    #agentTaskShell .persona-picker-option strong,
    #agentTaskShell .persona-picker-option small { display:block; }
    #agentTaskShell .persona-picker-option small { margin-top:3px; color:#8c8e9b; }
    #agentTaskShell .persona-recommended { align-self:center; padding:3px 7px; border-radius:7px; color:#5e46cf; background:#eeeaff; font-size:10px; }
    #agentTaskShell .persona-picker-empty { padding:20px 8px; color:#999ba6; text-align:center; font-size:11px; }
    #agentTaskShell .persona-applied { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; padding:8px 10px; border-radius:9px; color:#5a4ac0; background:#f5f2ff; font-size:11px; }
    #agentTaskShell .persona-applied[hidden] { display:none; }
    #agentTaskShell .persona-applied button { border:0; color:#777988; background:transparent; cursor:pointer; }
    @media (max-width:720px) {
      .persona-form-grid { grid-template-columns:1fr; }
      .persona-history-change { grid-template-columns:82px 1fr; }
      .persona-history-change i { display:none; }
      #agentTaskShell .persona-source-switch { width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); }
      #agentTaskShell .persona-source-switch button { min-width:0; }
    }

    /* 模板库 - 无限画板卡片 */
    .canvas-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(248px, 1fr)); gap:18px; }
    .canvas-card { background:#fff; border:1px solid #e9e5ef; border-radius:12px; overflow:hidden; cursor:pointer; transition:all .15s; }
    .canvas-card:hover { border-color:#534AB7; box-shadow:0 6px 18px rgba(83,74,183,.1); transform:translateY(-2px); }
    .canvas-cover { aspect-ratio:16/9; position:relative; }
    .canvas-cover-inner { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:32px; font-weight:500; letter-spacing:2px; opacity:0.92; }
    .canvas-meta { padding:14px 16px 16px; }
    .canvas-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
    .canvas-header strong { font-size:14px; color:#26215C; font-weight:500; }
    .canvas-badge { font-size:10px; padding:2px 8px; border-radius:10px; background:linear-gradient(135deg,#534AB7,#6C5CE7); color:#fff; font-weight:500; }
    .canvas-desc { margin:0 0 10px; font-size:12px; color:#625b69; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
    .canvas-footer { display:flex; gap:14px; font-size:11px; color:#888780; }
    .canvas-stat::before { content:''; display:inline-block; width:5px; height:5px; border-radius:50%; background:#AFA9EC; margin-right:5px; vertical-align:middle; }
    .canvas-stat:first-child::before { background:#534AB7; }

    /* ── 文案库 ── */
    .cl-wrapper { font-size: 13px; color: var(--ink); }
    .cl-head-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
    .cl-head-title { font-size: 18px; font-weight: 600; margin: 0; color: var(--ink); letter-spacing: -0.2px; }
    .cl-head-sub { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
    .cl-head-btns { display: flex; gap: 10px; }
    .cl-btn-import { padding: 7px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; transition: all .15s; font-weight: 500; }
    .cl-btn-import:hover { background: #f8f9fb; border-color: #c4c7d0; }
    .cl-btn-ai { padding: 7px 16px; border: none; border-radius: 8px; background: linear-gradient(135deg, #534AB7 0%, #6C5CE7 100%); color: #fff; font-size: 13px; cursor: pointer; font-weight: 500; transition: all .15s; box-shadow: 0 1px 3px rgba(83,74,183,.25); }
    .cl-btn-ai:hover { background: linear-gradient(135deg, #4339A7 0%, #5A4BD1 100%); box-shadow: 0 2px 8px rgba(83,74,183,.35); transform: translateY(-0.5px); }
    .cl-filter-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
    .cl-filter-row input { flex: 1; min-width: 180px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--surface); color: var(--ink); transition: border-color .15s; }
    .cl-filter-row input:focus { outline: none; border-color: #534AB7; box-shadow: 0 0 0 3px rgba(83,74,183,.08); }
    .cl-filter-row input::placeholder { color: var(--muted); }
    .cl-filter-row select { padding: 7px 28px 7px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: var(--surface); color: var(--ink); cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; transition: border-color .15s; }
    .cl-filter-row select:focus { outline: none; border-color: #534AB7; box-shadow: 0 0 0 3px rgba(83,74,183,.08); }
    .cl-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
    .cl-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; min-width: 960px; }
    .cl-table th { background: #f8f9fb; padding: 10px 14px; font-weight: 600; font-size: 11px; text-align: left; color: var(--color-text-secondary, #8b8fa3); text-transform: none; letter-spacing: 0.3px; border-bottom: 1px solid var(--line); }
    .cl-table td { padding: 14px 14px; vertical-align: middle; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
    .cl-table tbody tr { transition: background .12s; }
    .cl-table tbody tr:hover { background: rgba(83,74,183,.025); }
    .cl-table tbody tr:last-child td { border-bottom: none; }
    .cl-table td.cl-col-text { color: var(--ink); vertical-align: top; }
    .cl-table .cl-copy-text { margin:0; line-height:1.55; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; font-size:13px; cursor:text; word-break:break-all; max-height:60px; border-bottom:1px dashed transparent; transition:background .12s, border-color .12s; padding:1px 0; }
    .cl-table .cl-copy-text:hover { background: #f0f4ff; border-bottom-color: #6ea8ff; }
    .cl-table td.cl-col-struct { overflow: hidden; white-space: nowrap; }
    .cl-table td.cl-col-chars { white-space: nowrap; overflow: hidden; }
    .cl-col-act { position: sticky; right: 0; background: var(--surface); z-index: 1; white-space: nowrap; box-shadow: -4px 0 8px -4px rgba(0,0,0,.04); }
    .cl-table thead .cl-col-act { background: #f8f9fb; z-index: 2; box-shadow: -4px 0 8px -4px rgba(0,0,0,.04); }
    .cl-table tbody tr:hover .cl-col-act { background: rgba(83,74,183,.025); }
    .cl-chip { display: inline-block; padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; margin: 0 2px; line-height: 1; }
    .cl-chip-hook { background: #EEEDFE; color: #534AB7; }
    .cl-chip-pain { background: #FCEBEB; color: #A32D2D; }
    .cl-chip-sell { background: #EAF3DE; color: #3B6D11; }
    .cl-chip-cta { background: #FAEEDA; color: #854F0B; }
    .cl-chip-proof { background: #E6F1FB; color: #185FA5; }
    .cl-chip-scene { background: #FBEAF0; color: #993556; }
    .cl-chip-compare { background: #FBEAF0; color: #993556; }
    .cl-chip-other { background: #f5f5f5; color: #616161; }
    .cl-act-btn { padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; cursor: pointer; white-space: nowrap; font-weight: 500; transition: all .12s; }
    .cl-act-btn:hover { background: #f8f9fb; border-color: #c4c7d0; }
    .cl-act-btn.danger { color: #d14545; border-color: #fde8e8; }
    .cl-act-btn.danger:hover { background: #fef2f2; border-color: #f5c6c6; }
    .cl-ai-btn { padding: 5px 12px; border: none; border-radius: 6px; background: linear-gradient(135deg, #534AB7 0%, #6C5CE7 100%); color: #fff; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 500; transition: all .12s; box-shadow: 0 1px 2px rgba(83,74,183,.2); }
    .cl-ai-btn:hover { background: linear-gradient(135deg, #4339A7 0%, #5A4BD1 100%); box-shadow: 0 2px 6px rgba(83,74,183,.3); transform: translateY(-0.5px); }
    .cl-ai-drop { position: relative; display: inline-block; }
    .cl-ai-menu { display: none; position: absolute; top: calc(100% + 4px); right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; z-index: 20; min-width: 130px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.1); }
    .cl-ai-menu.show { display: block; }
    .cl-ai-menu button { display: block; width: 100%; padding: 9px 14px; font-size: 12px; border: none; background: none; cursor: pointer; text-align: left; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .1s; }
    .cl-ai-menu button:last-child { border-bottom: none; }
    .cl-ai-menu button:hover { background: rgba(83,74,183,.06); color: #534AB7; }
    .cl-empty { text-align: center; padding: 48px; color: var(--muted); font-size: 13px; }
    .cl-table-wrap::-webkit-scrollbar { height: 7px; }
    .cl-table-wrap::-webkit-scrollbar-track { background: transparent; margin: 0 10px; }
    .cl-table-wrap::-webkit-scrollbar-thumb { background: #d4d6e0; border-radius: 10px; }
    .cl-table-wrap::-webkit-scrollbar-thumb:hover { background: #b0b3c5; }
    .cl-table-wrap { scrollbar-width: thin; scrollbar-color: #d4d6e0 transparent; }
    .cl-chips-text { font-size: 12px; color: var(--ink); }
    .cl-source-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 3px; margin-right: 6px; font-weight: 500; }
    .cl-source-tag.ai { background: #EEEDFE; color: #534AB7; }
    .cl-source-tag.import { background: #EAF3DE; color: #3B6D11; }
    /* ========== 经营自动化·新模块 ========== */
    .ai-suggestion { display:flex; align-items:center; gap:10px; margin-top:14px; padding:12px 16px; border:1px solid #d4d7f7; border-radius:12px; background:#f5f6ff; }
    .info-banner { display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; font-size:13px; }
    .info-banner.warn { border:1px solid #f0c98a; background:#fff8ed; color:#b56b1a; }
    .info-banner.info { border:1px solid #d4d7f7; background:#f5f6ff; color:#4647c8; }
    .info-banner.danger { border:1px solid #f0b6b6; background:#fdecec; color:#c14545; }
    .comment-tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:600; }
    .comment-tag.good { color:#087d59; background:#e6f8f1; }
    .comment-tag.ask { color:#4647c8; background:#eeefff; }
    .comment-tag.bad { color:#c14545; background:#ffeded; }
    .comment-tag.neutral { color:#656b7e; background:#f0f1f5; }
    .comment-tag.fanche { color:#7a3eaf; background:#f4eafa; }
    .comment-tag.manual { color:#b56b1a; background:#fff3df; }
    .reply-detail-box { padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:#fafbff; margin-bottom:12px; }
    .reply-detail-box .label { color:var(--muted); font-size:11px; font-weight:600; margin-bottom:4px; }
    .reply-detail-box .content { color:var(--ink); font-size:13px; line-height:1.6; }
    .reply-suggestion-box { padding:14px 16px; border:1px solid #d4d7f7; border-radius:10px; background:#f5f6ff; margin-bottom:12px; }
    .reply-suggestion-box .label { color:#4647c8; font-size:11px; font-weight:700; margin-bottom:6px; }
    .reply-suggestion-box .content { color:var(--ink); font-size:13px; line-height:1.6; }
    .reply-suggestion-box .meta { margin-top:8px; display:flex; gap:16px; color:var(--muted); font-size:11px; }
    .reply-textarea { width:100%; min-height:80px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:13px; resize:vertical; outline:none; }
    .reply-textarea:focus { border-color:#9c9fef; }
    .clean-overlay { position:fixed; inset:0; z-index:90; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.4); }
    .clean-overlay.show { display:flex; }
    .clean-box { width:420px; padding:28px 32px; border-radius:16px; background:#fff; text-align:center; }
    .clean-box h3 { margin:0 0 16px; font-size:18px; }
    .clean-bar { height:8px; border-radius:99px; background:#eef0f7; overflow:hidden; margin:16px 0 8px; }
    .clean-bar span { display:block; height:100%; width:0; background:linear-gradient(90deg,#797cf4,#4cb6e4); transition:width .3s; }
    .clean-box .pt { color:var(--muted); font-size:12px; }
    .cap-item { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #f0f1f7; }
    .cap-item:last-child { border:0; }
    .cap-item .name { flex:1; font-size:12px; }
    .cap-item .bar { width:100px; height:6px; border-radius:99px; background:#eef0f7; overflow:hidden; }
    .cap-item .bar span { display:block; height:100%; background:linear-gradient(90deg,#797cf4,#4cb6e4); }
    .cap-item .num { font-size:11px; color:var(--muted); }
    .quota-person { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #f0f1f7; }
    .quota-person:last-child { border:0; }
    .quota-person .pname { flex:1; font-size:12px; }
    .quota-person .pbar { width:100px; height:6px; border-radius:99px; background:#eef0f7; overflow:hidden; }
    .quota-person .pbar span { display:block; height:100%; }
    .quota-person .pnum { font-size:11px; color:var(--muted); }
    .log-entry { display:flex; gap:10px; padding:8px 0; border-bottom:1px solid #f0f1f7; font-size:12px; }
    .log-entry:last-child { border:0; }
    .log-entry .ltime { color:var(--muted); flex:0 0 50px; }
    .log-entry .ltext { flex:1; color:var(--ink); }
    .log-entry .ltext strong { color:#4647c8; }

    /* === 二级侧边栏·广告账户 === */
    .sub-sidebar {
      position: fixed; top: 0; bottom: 0; left: var(--sidebar); z-index: 25;
      width: 200px; background: #fafafe; border-right: 1px solid var(--line);
      overflow-y: auto; padding: 0 0 20px;
      transform: translateX(-100%); transition: transform .25s ease;
    }
    .sub-sidebar.show { transform: translateX(0); }
    .app.has-subsidebar .main { padding-left: 200px; transition: padding .25s ease; }
    .sub-sidebar-head {
      padding: 14px 14px 10px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
      color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--line); margin-bottom: 0;
    }
    .sub-sidebar-search {
      padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 8px;
      border-bottom: 1px solid var(--line); margin-bottom: 4px;
    }
    .sub-sidebar-search input {
      width: 100%; box-sizing: border-box; padding: 7px 10px; font-size: 12px;
      border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
      outline: none; transition: border .15s;
    }
    .sub-sidebar-search input:focus { border-color: #797cf4; }
    .sub-sidebar-search input::placeholder { color: #c0c2d2; }
    .sub-sidebar-search select {
      width: 100%; box-sizing: border-box; padding: 6px 8px; font-size: 12px;
      border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
      outline: none; cursor: pointer;
    }
    .sub-acc-list { padding: 2px 0; }
    .sub-acc-item {
      display: block; width: 100%; padding: 8px 14px;
      border: 0; background: transparent; text-align: left; font-size: 13px; color: var(--ink);
      transition: .15s ease; cursor: pointer;
    }
    .sub-acc-item:hover { background: #f0f1f7; }
    .sub-acc-item.active {
      background: #eeefff; box-shadow: inset 3px 0 0 #797cf4;
    }
    .sub-acc-item .acc-name { font-weight: 600; font-size: 12px; line-height: 1.3; }
    .sub-acc-item.active .acc-name { color: #4647c8; }
    .sub-acc-item .acc-id { font-size: 11px; color: var(--muted); margin-top: 1px; font-family: 'SF Mono','Consolas',monospace; }
    .sub-acc-item .acc-tag {
      display: inline-block; font-size: 9px; padding: 1px 6px; border-radius: 3px; margin-top: 3px;
      background: #e8e9f5; color: #6b6cd6; font-weight: 600;
    }
    .sub-acc-item .acc-tag.t-live { background: #fce8e6; color: #c14545; }
    .sub-acc-item .acc-tag.t-image { background: #e6f4ea; color: #16a778; }
    .sub-acc-item .acc-tag.t-review { background: #fff4e0; color: #e8943a; }
    .sub-acc-item .acc-tag.t-all { background: #e8e9f5; color: #6b6cd6; }
    .sub-acc-empty { padding: 20px 14px; text-align: center; font-size: 11px; color: #c0c2d2; }


    @media (max-width: 860px) { .sub-sidebar { display:none !important; } .app.has-subsidebar .main { padding-left:0; } }
    /* 2026-08-05：Agent、资产关系与权限管理增强 */
    [hidden] { display:none !important; }
    .parse-state { margin-top:10px; padding:11px 13px; border:1px solid #e6e1f5; border-radius:10px; background:#faf9ff; display:flex; align-items:flex-start; gap:10px; color:#69627c; font-size:12px; }
    .parse-state::before { content:""; flex:0 0 8px; width:8px; height:8px; margin-top:4px; border-radius:50%; background:#9b87eb; box-shadow:0 0 0 4px rgba(124,96,224,.10); }
    .parse-state.parsing::before,.parse-state[data-state="parsing"]::before { animation:parsePulse 1s ease-in-out infinite; }
    .parse-state.success,.parse-state[data-state="success"] { border-color:#cdebdc; background:#f3fbf7; color:#347459; }
    .parse-state.success::before,.parse-state[data-state="success"]::before { background:#35a86b; }
    .parse-state.partial,.parse-state[data-state="partial"] { border-color:#f1dfb4; background:#fffaf0; color:#8b6424; }
    .parse-state.partial::before,.parse-state[data-state="partial"]::before { background:#d79a31; }
    .parse-state.failed,.parse-state[data-state="error"] { border-color:#f0c9cd; background:#fff6f7; color:#b14d57; }
    .parse-state.failed::before,.parse-state[data-state="error"]::before { background:#d95762; }
    .parse-state strong { display:block; color:inherit; margin-bottom:2px; }
    .parse-state-actions { margin-left:auto; display:flex; gap:6px; }
    .parse-state-actions button { border:1px solid currentColor; background:transparent; color:inherit; border-radius:7px; padding:5px 9px; cursor:pointer; }
    @keyframes parsePulse { 50% { opacity:.35; transform:scale(.75); } }
    .field-conflict { margin-top:8px; padding:10px 12px; border:1px solid #f0c5ca; border-radius:9px; background:#fff5f6; color:#9d404a; font-size:12px; }
    .field-conflict strong { display:block; margin-bottom:4px; }
    .field-conflict-actions { display:flex; gap:7px; margin-top:8px; }
    .field-conflict-actions button { border:1px solid #e0aab0; background:#fff; color:#9d404a; border-radius:7px; padding:6px 9px; cursor:pointer; }
    .reference-video-option { align-items:stretch; }
    .reference-video-cover { width:64px; min-height:0; aspect-ratio:9/16; border-radius:10px; background:linear-gradient(135deg,#2d2940,#584c70); display:grid; place-items:center; color:#fff; font-size:21px; position:relative; overflow:hidden; }
    .reference-video-cover::after { content:"点击预览"; position:absolute; left:8px; bottom:6px; font-size:10px; opacity:.78; }
    .reference-video-info { flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center; gap:5px; }
    .reference-video-info small { display:block; line-height:1.55; color:#7b758b; }
    .reference-metrics { display:flex; flex-wrap:wrap; gap:6px; }
    .reference-metrics b { padding:4px 7px; border-radius:6px; background:#f4f1fc; color:#665895; font-size:10px; font-weight:600; }
    .selected-reference-video { padding:10px 12px; border:1px solid #ddd7ee; border-radius:9px; background:#faf9ff; }
    .brand-related-products { margin-top:16px; }
    .brand-product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:12px; }
    .brand-product-link { display:flex; align-items:center; gap:12px; padding:13px; border:1px solid #e7e3ef; border-radius:12px; background:#fff; text-align:left; cursor:pointer; transition:.18s ease; }
    .brand-product-link:hover { border-color:#b9a9eb; box-shadow:0 8px 22px rgba(75,57,125,.08); transform:translateY(-1px); }
    .brand-product-thumb { flex:0 0 46px; width:46px; height:46px; border-radius:10px; background:linear-gradient(145deg,#f0ecfa,#ded7f1); }
    .brand-product-link strong,.brand-product-link small { display:block; }
    .brand-product-link small { margin-top:4px; color:#8b8597; }
    .brand-related-product { display:flex; align-items:center; gap:12px; width:100%; padding:13px; border:1px solid #e7e3ef; border-radius:12px; background:#fff; text-align:left; cursor:pointer; transition:.18s ease; }
    .brand-related-product:hover { border-color:#b9a9eb; box-shadow:0 8px 22px rgba(75,57,125,.08); transform:translateY(-1px); }
    .brand-related-product > span:nth-child(2) { min-width:0; flex:1; }
    .brand-related-product strong,.brand-related-product small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .brand-related-product small { margin-top:4px; color:#8b8597; }
    .brand-related-product b { color:#7462c8; font-size:11px; white-space:nowrap; }
    .brand-related-thumb { flex:0 0 46px; width:46px; height:46px; border-radius:10px; background:linear-gradient(145deg,#f0ecfa,#ded7f1); }
    .original-header-controls > .advanced-toggle { display:none !important; }
    .footer-advanced-toggle { margin-right:auto; display:inline-flex; align-items:center; gap:7px; border-color:#d9d2eb; color:#615878; background:#fff; }
    .footer-advanced-toggle:hover { border-color:#a897df; color:#5f47bf; background:#faf8ff; }
    .footer-advanced-toggle.active { border-color:#b6a5ed; color:#5d45bd; background:#f4f0ff; }
    .footer-advanced-toggle small { padding:2px 6px; border-radius:999px; background:#eee9fb; color:#725dbe; font-size:10px; }
    .permission-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:16px; }
    .permission-side,.permission-main { border:1px solid #e7e3ef; border-radius:15px; background:#fff; box-shadow:0 8px 28px rgba(48,38,78,.04); }
    .permission-side { padding:14px; }
    .permission-side h3,.permission-main h3 { margin:0; font-size:15px; }
    .permission-role-list { display:grid; gap:8px; margin-top:14px; }
    .permission-role { width:100%; padding:11px 12px; border:1px solid transparent; border-radius:10px; background:#f7f6fa; color:#504a5d; text-align:left; cursor:pointer; }
    .permission-role.active { border-color:#bcaaf2; background:#f3efff; color:#5e45c0; font-weight:700; }
    .permission-main { padding:18px; }
    .permission-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px solid #eeeaf3; }
    .permission-tabs { display:flex; gap:5px; padding:4px; border-radius:10px; background:#f4f2f8; }
    .permission-tab { border:0; border-radius:8px; background:transparent; padding:8px 13px; cursor:pointer; color:#777083; }
    .permission-tab.active { background:#fff; color:#4e3da4; box-shadow:0 3px 10px rgba(61,44,117,.08); }
    .permission-panel { display:none; padding-top:16px; }
    .permission-panel.active { display:block; }
    .permission-tree { display:grid; gap:10px; }
    .permission-tree-group { border:1px solid #ece8f2; border-radius:12px; overflow:hidden; }
    .permission-tree-head { display:flex; align-items:center; justify-content:space-between; padding:11px 13px; background:#faf9fc; font-weight:700; }
    .permission-actions { display:flex; flex-wrap:wrap; gap:14px; padding:12px 13px; }
    .permission-actions label,.member-row label { display:flex; align-items:center; gap:7px; color:#5f596a; font-size:12px; }
    .permission-actions input,.member-row input { accent-color:#765ce0; }
    .member-table { width:100%; border-collapse:collapse; }
    .member-table th,.member-table td { padding:12px 10px; border-bottom:1px solid #eeeaf3; text-align:left; font-size:12px; }
    .member-table th { color:#817b8b; font-weight:600; background:#faf9fc; }
    .member-name { display:flex; align-items:center; gap:9px; }
    .member-avatar { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,#795ce0,#9e87ef); font-weight:700; }
    .scope-select,.role-select { min-width:142px; height:34px; border:1px solid #dfd9eb; border-radius:8px; background:#fff; padding:0 9px; color:#504a5d; }
    .permission-note { margin-top:14px; padding:11px 13px; border-radius:10px; background:#f7f5fc; color:#756e82; font-size:12px; line-height:1.6; }
    @media (max-width:1200px) { .permission-layout{grid-template-columns:1fr}.brand-product-grid{grid-template-columns:1fr 1fr}.reference-video-cover{width:64px} }

    /* ========== 智能拉片·入口页（单视频+素材库两栏+on-page 进度） ========== */
    .lib-picker {
      display: grid;
      grid-template-columns: 200px minmax(0, 1fr);
      gap: 14px;
      min-height: 380px;
    }

    .lib-folder-tree {
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      align-self: start;
    }
    .lib-folder-item {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px 9px;
      border-radius: 7px;
      cursor: pointer;
      color: #4a4f63;
      font-size: 12px;
      user-select: none;
    }
    .lib-folder-item:hover { background: #f5f6ff; color: #5b5ce2; }
    .lib-folder-item.active { background: #f0f1ff; color: #5b5ce2; font-weight: 600; }
    .lib-folder-item .icon { width: 16px; text-align: center; flex-shrink: 0; }
    .lib-folder-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lib-folder-item .count {
      color: #a0a4b6;
      font-size: 10px;
      padding: 1px 6px;
      background: #f0f1f5;
      border-radius: 999px;
    }
    .lib-folder-item.active .count { color: #5b5ce2; background: #e0e2ff; }
    .lib-folder-item .caret { color: #a0a4b6; font-size: 10px; }
    .lib-folder-children { padding-left: 16px; }
    .lib-folder-item.sub { padding: 6px 8px; font-size: 11px; color: #6b7088; }
    .lib-folder-item.sub .icon { color: #c8cbe0; }

    .lib-content { display: flex; flex-direction: column; min-width: 0; }
    .lib-toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 0 0 12px;
    }
    .lib-toolbar .search { flex: 1 1 180px; min-width: 160px; }
    .lib-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
      gap: 11px;
      max-height: 380px;
      overflow-y: auto;
      padding: 2px;
    }
    .lib-card {
      position: relative;
      border: 1px solid var(--line);
      border-radius: 11px;
      overflow: hidden;
      background: #fff;
      cursor: pointer;
      transition: .2s ease;
    }
    .lib-card:hover {
      border-color: #b8baf2;
      box-shadow: 0 6px 14px rgba(91, 92, 226, .08);
      transform: translateY(-1px);
    }
    .lib-card.selected {
      border-color: #5b5ce2;
      box-shadow: 0 0 0 2px #c8caf2;
    }
    .lib-card-cover {
      height: 96px;
      display: grid;
      place-items: center;
      color: #fff;
      background: linear-gradient(135deg, #e88770, #d56393);
      font-weight: 700;
      font-size: 13px;
    }
    .lib-card-cover.alt-1 { background: linear-gradient(135deg, #e5a047, #79b375); }
    .lib-card-cover.alt-2 { background: linear-gradient(135deg, #5a8fd8, #7a78e0); }
    .lib-card-cover.alt-3 { background: linear-gradient(135deg, #46b8a8, #4f8de0); }
    .lib-card-cover.alt-4 { background: linear-gradient(135deg, #a96ce0, #5b5ce2); }
    .lib-card-cover.alt-5 { background: linear-gradient(135deg, #6ec5d8, #4f8de0); }
    .lib-card-info { padding: 9px 11px; }
    .lib-card-info strong {
      display: block;
      font-size: 12px;
      color: #202231;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .lib-card-info small {
      display: block;
      margin-top: 3px;
      color: #8a8fa1;
      font-size: 10px;
    }
    .lib-card .check {
      position: absolute;
      top: 7px;
      right: 7px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #5b5ce2;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      display: none;
      place-items: center;
      box-shadow: 0 2px 6px rgba(91, 92, 226, .35);
    }
    .lib-card.selected .check { display: grid; }
    .lib-card[hidden] { display: none; }

    .lib-empty {
      padding: 32px 0;
      text-align: center;
      color: #9aa0ad;
      font-size: 12px;
    }
    .lib-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 12px;
      padding: 10px 14px;
      background: #f7f7ff;
      border: 1px dashed #c8caf2;
      border-radius: 10px;
    }
    .lib-foot .count { color: #5b5ce2; font-weight: 700; margin: 0 3px; }
    .lib-foot > span { font-size: 12px; color: #4a4f63; }

    /* 解析进度（on-page 卡片，替代旧弹层） */
    .parse-progress-card {
      margin: 18px 0 0;
      padding: 18px 22px;
      border: 1px solid #d4d6f5;
      border-radius: 14px;
      background: linear-gradient(180deg, #fbfbff, #fff);
      box-shadow: 0 6px 18px rgba(91, 92, 226, .08);
    }
    .pp-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .pp-stage { font-size: 13px; font-weight: 600; color: #202231; }
    .pp-percent {
      font-size: 14px;
      color: #5b5ce2;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
    }
    .pp-bar {
      height: 6px;
      background: #f0f1f5;
      border-radius: 3px;
      overflow: hidden;
    }
    .pp-bar span {
      display: block;
      height: 100%;
      background: linear-gradient(90deg, #6b6dea, #5556d7);
      border-radius: 3px;
      transition: width .25s ease;
    }
    .pp-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 12px;
    }
    .pp-foot small {
      color: #8a8fa1;
      font-size: 11px;
      max-width: 70%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .pp-cancel {
      padding: 5px 12px;
      border: 1px solid var(--line);
      border-radius: 7px;
      color: #6b7088;
      background: #fff;
      font-size: 12px;
      cursor: pointer;
    }
    .pp-cancel:hover { border-color: #f0b6b6; color: #c14545; }

    /* 历史抽屉增强（动态记录 + 迷你进度 + 操作） */
    .history-empty {
      padding: 60px 20px;
      text-align: center;
      color: #9aa0ad;
      font-size: 12px;
    }
    .history-item .progress-bar {
      height: 4px;
      background: #f0f1f5;
      border-radius: 2px;
      overflow: hidden;
      margin-top: 5px;
    }
    .history-item .progress-bar span {
      display: block;
      height: 100%;
      background: linear-gradient(90deg, #6b6dea, #5556d7);
      border-radius: 2px;
      transition: width .2s ease;
    }
    .history-item .progress-text {
      display: inline-block;
      margin-top: 4px;
      color: #5b5ce2;
      font-size: 10px;
      font-weight: 600;
    }
    .history-item .status-line {
      margin-top: 5px;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .history-item .meta-pill {
      display: inline-flex;
      align-items: center;
      padding: 1px 7px;
      border-radius: 999px;
      background: #eef0f7;
      color: #6b7088;
      font-size: 10px;
    }
    .history-item .actions { display: flex; align-items: center; gap: 5px; }
    .history-item .actions .ghost-mini { padding: 4px 9px; font-size: 11px; }

    /* 素材库面板小屏适配 */
    @media (max-width: 860px) {
      .lib-picker { grid-template-columns: 1fr; }
      .lib-folder-tree { max-height: 140px; overflow-y: auto; }
      .lib-grid { max-height: 320px; }
    }

    /* ========================================
       智能脚本 Agent 专用样式
       ======================================== */

    /* 表单提示 */
    .form-hint { font-size: 11px; color: #6b7088; margin-top: 6px; line-height: 1.5; }
    .field.invalid label { color: #e0394b; }
    .field.invalid select,
    .field.invalid input,
    .field.invalid textarea { border-color: #e0394b; box-shadow: 0 0 0 2px rgba(224,57,75,0.08); }

    /* 小号按钮(用于分镜行操作) */
    .ghost-btn-sm { padding: 4px 10px !important; font-size: 11px !important; border-radius: 6px !important; }

    /* 来源文案模式切换 */
    .source-mode-switch { display: inline-flex; gap: 4px; padding: 3px; background: #f0f1f5; border-radius: 8px; margin-bottom: 12px; }
    .source-mode-switch button { padding: 7px 16px; border: 0; background: transparent; border-radius: 6px; font-size: 13px; color: #6b7088; cursor: pointer; transition: all .15s; font-weight: 500; }
    .source-mode-switch button:hover { color: #2a2c3f; }
    .source-mode-switch button.active { background: #fff; color: #5b3df5; box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-weight: 600; }

    .script-source-panel { margin-top: 8px; }
    .script-source-preview { margin-top: 12px; padding: 14px 16px; background: #f7f8fc; border-radius: 10px; border: 1px solid #ebecf3; }
    .script-source-preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    .script-source-preview-head strong { font-size: 12px; color: #2a2c3f; font-weight: 600; }
    .script-source-preview-head span { font-size: 11px; color: #8a8fa3; }
    .script-source-preview p { font-size: 13px; color: #4a4d63; line-height: 1.7; margin: 0; }

    .script-source-tip { padding: 8px 12px; background: #eef4ff; border-left: 3px solid #5b8cff; border-radius: 6px; font-size: 11px; color: #2c4a8c; margin-top: 10px; }
    .script-source-tip b { color: #1d3a78; font-weight: 600; margin: 0 4px; }

    /* 产品行 */
    .script-product-row { display: flex; gap: 10px; align-items: center; }
    .script-product-row select,
    .script-product-row input { flex: 1; }
    .script-product-row input[readonly] { background: #fafbff; cursor: pointer; }
    .script-product-pick { white-space: nowrap; padding: 8px 14px; font-size: 12px; }

    /* 目标时长自定义 */
    .duration-picker { display: flex; gap: 8px; align-items: center; }
    .duration-picker select { flex: 1; }
    .script-duration-custom { flex: 0 0 110px; }

    /* 素材分组多选 */
    .material-group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
    .material-group-head label { display: block; font-weight: 600; color: #2a2c3f; }
    .material-group-head small { display: block; font-weight: 400; color: #8a8fa3; font-size: 11px; margin-top: 2px; }
    .material-group-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .material-group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
    .material-group-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #f7f8fc; border: 1px solid #ebecf3; border-radius: 8px; cursor: pointer; transition: all .15s; text-align: left; }
    .material-group-item:hover { border-color: #c7c9d8; background: #f0f1f5; }
    .material-group-item.active { background: #f0ebff; border-color: #5b3df5; box-shadow: 0 0 0 2px rgba(91,61,245,0.12); }
    .material-group-check { width: 18px; height: 18px; border-radius: 4px; background: #fff; border: 1.5px solid #c7c9d8; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; flex-shrink: 0; transition: all .15s; }
    .material-group-item.active .material-group-check { background: #5b3df5; border-color: #5b3df5; color: #fff; }
    .material-group-name { font-size: 13px; font-weight: 500; color: #2a2c3f; flex: 1; }
    .material-group-count { font-size: 11px; color: #8a8fa3; flex-shrink: 0; }
    .material-group-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: #8a8fa3; font-size: 12px; background: #f7f8fc; border-radius: 8px; border: 1px dashed #d0d3e0; }
    .material-group-error { margin-top: 8px; padding: 8px 12px; background: #fff0f1; border-left: 3px solid #e0394b; border-radius: 6px; font-size: 12px; color: #b92636; }

    /* 确认生成汇总面板 */
    .script-summary-card { padding: 0; background: #fff; }
    .script-summary-loading { padding: 20px; text-align: center; color: #8a8fa3; font-size: 13px; }
    .script-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 20px; background: #f7f8fc; border-radius: 12px; border: 1px solid #ebecf3; }
    .script-summary-item { display: flex; flex-direction: column; gap: 6px; }
    .script-summary-item.full { grid-column: 1 / -1; }
    .script-summary-item.is-muted { opacity: .45; }
    .script-summary-label { font-size: 11px; color: #8a8fa3; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
    .script-summary-value { font-size: 13px; color: #2a2c3f; line-height: 1.6; }
    .script-summary-value b { font-weight: 600; color: #1a1c2e; }
    .script-summary-value i { font-style: normal; color: #6b7088; }
    .script-summary-value small { display: block; font-size: 11px; color: #8a8fa3; margin-top: 2px; font-weight: 400; }
    .script-summary-groups { display: flex; flex-wrap: wrap; gap: 6px; }
    .script-summary-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: #f0ebff; color: #4a2fc9; border-radius: 6px; font-size: 12px; font-weight: 500; }
    .script-summary-chip small { font-size: 10px; color: #7a5fde; font-weight: 400; }
    .script-summary-empty { color: #b8b9c5; font-style: italic; font-size: 12px; }
    .script-summary-tip { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px; margin-top: 14px; background: #eef4ff; border-left: 3px solid #5b8cff; border-radius: 8px; }
    .script-summary-tip i { color: #5b8cff; font-style: normal; font-weight: 700; flex-shrink: 0; }
    .script-summary-tip span { font-size: 12px; color: #2c4a8c; line-height: 1.6; }

    /* 多版本 Tab */
    .script-version-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 4px; }
    .script-version-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
    .script-version-tab { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; background: #f7f8fc; border: 1px solid #ebecf3; border-radius: 10px; cursor: pointer; transition: all .15s; text-align: left; min-width: 140px; }
    .script-version-tab:hover { background: #f0f1f5; border-color: #c7c9d8; }
    .script-version-tab.active { background: #fff; border-color: #5b3df5; box-shadow: 0 0 0 2px rgba(91,61,245,0.12); }
    .script-version-tab b { font-size: 14px; color: #2a2c3f; font-weight: 600; }
    .script-version-tab.active b { color: #5b3df5; }
    .script-version-tab small { font-size: 11px; color: #6b7088; }
    .script-version-tab i { font-size: 10px; color: #8a8fa3; font-style: normal; }

    .script-version-panels { margin-top: 12px; }
    .script-version-panel { display: none; }
    .script-version-panel.active { display: block; }
    .script-version-meta { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f7f8fc; border-radius: 8px; margin-bottom: 10px; }
    .script-version-meta span { font-size: 12px; color: #4a4d63; }
    .script-version-actions { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

    /* 扩展分镜表格 */
    .extended-script-table { font-size: 12px; }
    .extended-script-table th { background: #f7f8fc; font-weight: 600; color: #4a4d63; padding: 10px 12px; }
    .extended-script-table td { padding: 12px; vertical-align: top; border-color: #ebecf3; }
    .extended-script-table tbody tr:hover { background: #fafbff; }
    .shot-index { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 8px; background: #5b3df5; color: #fff; border-radius: 6px; font-size: 11px; font-weight: 600; }
    .shot-voice { color: #2a2c3f; line-height: 1.6; }
    .shot-tag { display: inline-block; padding: 3px 8px; background: #f0ebff; color: #4a2fc9; border-radius: 4px; font-size: 11px; font-weight: 500; }

    /* 智能脚本 Agent 结果页 — 8 列分镜表格 */
    .script-result-table-grid {
      width: 100%;
      min-width: 1080px;
      border-collapse: separate;
      border-spacing: 0;
      table-layout: fixed;
      font-size: 12px;
      background: #fff;
    }
    .script-result-table-grid thead th {
      position: sticky;
      top: 0;
      background: #f7f8fc;
      font-weight: 600;
      color: #4a4d63;
      padding: 10px 12px;
      text-align: left;
      border-bottom: 1px solid #ebecf3;
      z-index: 1;
    }
    .script-result-table-grid tbody td {
      padding: 12px;
      vertical-align: top;
      border-bottom: 1px solid #ebecf3;
      color: #4a4d63;
      line-height: 1.6;
      word-break: break-word;
    }
    .script-result-table-grid tbody tr:hover { background: #fafbff; }
    .script-result-table-grid tbody tr:last-child td { border-bottom: 0; }
    .script-result-table-grid .col-shot { width: 64px; text-align: center; }
    .script-result-table-grid .col-time { width: 84px; }
    .script-result-table-grid .col-voice { width: 22%; min-width: 180px; }
    .script-result-table-grid .col-tag { width: 78px; }
    .script-result-table-grid .col-visual { width: 24%; min-width: 200px; }
    .script-result-table-grid .col-dynamic { width: 28%; min-width: 240px; }

    /* 推荐素材方案 */
    .material-plan-list { display: flex; flex-direction: column; gap: 8px; }
    .material-plan { padding: 10px 12px; background: #fafbff; border: 1px solid #ebecf3; border-radius: 8px; }
    .material-plan-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
    .material-plan-head b { font-size: 12px; color: #2a2c3f; font-family: 'SF Mono','Consolas',monospace; }
    .material-plan-head span { font-size: 11px; color: #5b3df5; font-weight: 600; background: #f0ebff; padding: 2px 8px; border-radius: 4px; }
    .material-plan-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
    .material-plan-items li { display: grid; grid-template-columns: 60px 1fr 40px; gap: 8px; align-items: center; font-size: 11px; padding: 4px 0; }
    .material-plan-items li i { color: #5b3df5; font-style: normal; font-weight: 500; }
    .material-plan-items li span { color: #2a2c3f; font-family: 'SF Mono','Consolas',monospace; }
    .material-plan-items li b { color: #5b3df5; font-weight: 600; text-align: right; }
    .material-plan-items li small { grid-column: 1 / -1; color: #8a8fa3; font-size: 10px; margin-left: 68px; }
    .material-plan-empty { padding: 12px; background: #fff8e6; border: 1px solid #f0d97a; border-radius: 8px; color: #8a6700; font-size: 12px; text-align: center; }

    /* 生视频提示词单元格 */
    .video-prompt-cell { display: flex; flex-direction: column; gap: 6px; }
    .video-prompt-cell textarea { width: 100%; padding: 8px 10px; border: 1px solid #ebecf3; border-radius: 6px; font-size: 11px; line-height: 1.5; color: #2a2c3f; resize: vertical; min-height: 60px; background: #fafbff; }
    .video-prompt-cell .ghost-btn-sm { align-self: flex-start; }

    /* 分镜行编辑 */
    .script-row-edit-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #ebecf3; }
    .script-row-edit { align-self: flex-start; }

    /* 分镜行编辑弹窗 */
    .script-row-edit-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9500; align-items: center; justify-content: center; }
    .script-row-edit-modal.show { display: flex; }
    .script-row-edit-modal .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
    .script-row-edit-modal .modal { position: relative; width: 520px; max-width: 92vw; background: #fff; border-radius: 14px; box-shadow: 0 12px 48px rgba(0,0,0,0.18); overflow: hidden; }
    .script-row-edit-modal .modal-head { padding: 18px 20px; border-bottom: 1px solid #ebecf3; display: flex; justify-content: space-between; align-items: center; }
    .script-row-edit-modal .modal-head h3 { font-size: 15px; font-weight: 600; color: #2a2c3f; margin: 0; }
    .script-row-edit-modal .modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
    .script-row-edit-modal .modal-foot { padding: 14px 20px; border-top: 1px solid #ebecf3; display: flex; gap: 10px; justify-content: flex-end; }

    /* 智能脚本 Agent 步骤 3(确认生成)专用 — 与原 .task-confirm-card 区分 */
    .form-section[data-task-step="3"] { background: linear-gradient(180deg, #fff 0%, #fafbff 100%); border: 1px solid #e5e7f0; }
    .form-section[data-task-step="3"] .form-section-head { padding-bottom: 14px; border-bottom: 1px dashed #ebecf3; margin-bottom: 18px; }

    /* 小屏适配 */
    @media (max-width: 720px) {
      .script-summary-grid { grid-template-columns: 1fr; }
      .material-group-list { grid-template-columns: 1fr; }
      .script-version-tab { min-width: 0; flex: 1; }
    }

    /* === 智能脚本 Agent 增强样式(必填红色 / 弹窗 / 模型卡片 / 状态徽章) === */
    .required-star { color: #e0394b; margin-left: 2px; font-weight: 700; }

    /* 弹窗遮罩(动态创建的弹窗) */
    .modal-overlay { position: fixed; inset: 0; background: rgba(20, 22, 36, 0.5); backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px; animation: modalFadeIn 0.18s ease-out; }
    .modal-overlay.show { display: flex; }
    .modal-overlay .modal-card { position: relative; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(20, 22, 36, 0.28); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; animation: modalSlideIn 0.22s ease-out; }
    .modal-overlay .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #ebecf3; gap: 16px; }
    .modal-overlay .modal-head strong { font-size: 15px; color: #2a2c3f; display: block; }
    .modal-overlay .modal-head small { font-size: 12px; color: #8a8fa3; display: block; margin-top: 2px; }
    .modal-overlay .modal-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid #ebecf3; background: #fafbfc; gap: 12px; }
    .modal-overlay .modal-foot-actions { display: flex; gap: 8px; }
    .modal-overlay .modal-close { width: 28px; height: 28px; border: 0; background: #f0f1f5; border-radius: 6px; cursor: pointer; font-size: 16px; color: #555a6c; }
    .modal-overlay .modal-close:hover { background: #e3e6f0; color: #2a2c3f; }
    @keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes modalSlideIn { from { transform: translateY(12px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

    /* 自定义时长 — "秒" 不换行 */
    .script-duration-custom { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 130px; padding: 6px 10px; background: #fff; border: 1px solid #d8dae5; border-radius: 8px; }
    .script-duration-custom input { width: 100%; min-width: 0; border: 0; padding: 0; font-size: 13px; color: #2a2c3f; }
    .script-duration-custom input:focus { outline: 0; }
    .script-duration-unit { color: #8a8fa3; font-size: 12px; white-space: nowrap; flex-shrink: 0; }

    /* 文案库触发按钮 */
    .script-library-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; background: #fff; border: 1px solid #d8dae5; border-radius: 8px; font-size: 13px; color: #8a8fa3; cursor: pointer; transition: all .15s; text-align: left; }
    .script-library-trigger:hover { border-color: #c7c9d8; }
    .script-library-trigger.is-filled { color: #2a2c3f; font-weight: 600; }
    .script-library-trigger i { color: #8a8fa3; font-style: normal; }

    /* 素材库摘要 */
    .script-material-pick { flex: 1; min-height: 38px; padding: 8px 12px; background: #f7f8fc; border: 1px solid #ebecf3; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
    .script-material-summary-empty { color: #8a8fa3; font-size: 12px; }
    .script-material-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: #f0ebff; color: #5b3df5; border-radius: 14px; font-size: 12px; font-weight: 600; }
    .script-material-chip small { color: #8a7fe8; font-size: 11px; font-weight: 500; }
    .script-material-chip i { font-style: normal; cursor: pointer; color: #5b3df5; opacity: .6; margin-left: 2px; }
    .script-material-chip i:hover { opacity: 1; }

    /* 模型卡片 */
    .script-model-cards { display: flex; flex-direction: column; gap: 6px; }
    .script-model-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid #ebecf3; border-radius: 8px; cursor: pointer; transition: all .15s; text-align: left; font-family: inherit; }
    .script-model-card:hover { border-color: #c7c9d8; }
    .script-model-card.selected { background: #f0ebff; border-color: #5b3df5; box-shadow: 0 0 0 2px rgba(91,61,245,0.12); }
    .script-model-icon { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f0f1f5; color: #8a8fa3; font-size: 11px; flex-shrink: 0; }
    .script-model-card.selected .script-model-icon { background: #5b3df5; color: #fff; }
    .script-model-name { font-size: 13px; color: #2a2c3f; font-weight: 600; flex: 1; }
    .script-model-card.selected .script-model-name { color: #5b3df5; }
    .script-model-badge { font-size: 11px; color: #ff8800; background: #fff5e6; padding: 2px 8px; border-radius: 4px; font-style: normal; font-weight: 600; }

    /* 结果页 — 纵向卡片栈 */
    .script-result-stack { display: flex; flex-direction: column; gap: 16px; }
    .script-result-card { background: #fff; border: 1px solid #ebecf3; border-radius: 12px; padding: 18px 20px; transition: all .15s; }
    .script-result-card.is-chat-target { border-color: #5b3df5; box-shadow: 0 0 0 2px rgba(91,61,245,0.12); }
    .script-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
    .script-result-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .script-result-version { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 8px; background: #2a2c3f; color: #fff; border-radius: 6px; font-size: 12px; font-weight: 700; }
    .script-result-title strong { font-size: 14px; color: #2a2c3f; }
    .script-result-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .script-result-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #8a8fa3; margin-bottom: 12px; flex-wrap: wrap; }
    .script-result-table { overflow-x: auto; }
    .script-target-badge { display: inline-flex; align-items: center; padding: 2px 8px; background: #5b3df5; color: #fff; border-radius: 4px; font-size: 11px; font-weight: 600; }

    /* 状态徽章 */
    .script-status-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
    .script-status-badge::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; }
    .script-status-badge.is-ok { background: #e6f7ed; color: #0d8a4d; }
    .script-status-badge.is-ok::before { background: #0d8a4d; }
    .script-status-badge.is-warn { background: #fff5e6; color: #d97a00; }
    .script-status-badge.is-warn::before { background: #d97a00; }
    .script-status-badge.is-error { background: #fde6e6; color: #c83232; }
    .script-status-badge.is-error::before { background: #c83232; }
    .script-status-badge.is-info { background: #e6efff; color: #2a6bd9; }
    .script-status-badge.is-info::before { background: #2a6bd9; }

    /* 生成中状态 */
    .script-result-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; color: #4a4d63; }
    .script-result-loading .spinner { width: 32px; height: 32px; border: 3px solid #ebecf3; border-top-color: #5b3df5; border-radius: 50%; animation: spin 0.8s linear infinite; }
    .script-result-loading strong { font-size: 14px; font-weight: 600; }
    .script-result-loading small { font-size: 12px; color: #8a8fa3; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* 弹窗共用 — 复用 .modal-overlay .modal-card .modal-head .modal-foot(已有) */

    /* 文案库弹窗 */
    .script-picker-modal { width: 720px; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; }
    .lib-picker-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #ebecf3; }
    .lib-pick-tabs { display: inline-flex; background: #f0f1f5; padding: 3px; border-radius: 8px; gap: 2px; }
    .lib-pick-tabs button { padding: 6px 14px; border: 0; background: transparent; color: #555a6c; font-size: 12px; font-weight: 600; border-radius: 6px; cursor: pointer; }
    .lib-pick-tabs button.active { background: #fff; color: #2a2c3f; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
    .lib-pick-search { flex: 1; padding: 8px 12px; border: 1px solid #d8dae5; border-radius: 8px; font-size: 13px; }
    .lib-pick-list { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
    .lib-pick-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 14px 44px; background: #fff; border: 1px solid #ebecf3; border-radius: 10px; cursor: pointer; transition: all .15s; }
    .lib-pick-card:hover { border-color: #c7c9d8; }
    .lib-pick-card.selected { background: #f0ebff; border-color: #5b3df5; }
    .lib-pick-check { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d8dae5; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-style: normal; background: #fff; }
    .lib-pick-card.selected .lib-pick-check { background: #5b3df5; border-color: #5b3df5; }
    .lib-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .lib-pick-head strong { font-size: 13px; color: #2a2c3f; font-weight: 700; }
    .lib-pick-head small { font-size: 11px; color: #8a8fa3; }
    .lib-pick-content { font-size: 13px; color: #4a4d63; line-height: 1.6; margin: 0; }
    .lib-pick-tags { display: flex; flex-wrap: wrap; gap: 4px; }
    .lib-pick-tag { font-size: 11px; padding: 2px 8px; background: #f0f1f5; color: #555a6c; border-radius: 4px; }
    .lib-pick-empty { padding: 40px 0; text-align: center; color: #8a8fa3; font-size: 13px; }
    .lib-pick-tip { font-size: 12px; color: #8a8fa3; }

    /* 产品库弹窗 */
    .product-picker-modal { width: 520px; max-width: 90vw; }
    .product-pick-list { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
    .product-pick-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff; border: 1px solid #ebecf3; border-radius: 10px; cursor: pointer; text-align: left; transition: all .15s; font-family: inherit; position: relative; }
    .product-pick-card:hover { border-color: #5b3df5; background: #faf8ff; }
    .product-pick-card.selected { border-color: #5b3df5; background: #f5f0ff; box-shadow: 0 0 0 1px #5b3df5; }
    .product-pick-card strong { font-size: 14px; color: #2a2c3f; }
    .product-pick-card small { font-size: 12px; color: #8a8fa3; }
    .product-pick-check { position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; background: #5b3df5; color: #fff; border-radius: 50%; font-size: 12px; font-style: normal; font-weight: 700; opacity: 0; }
    .product-pick-card.selected .product-pick-check { opacity: 1; }

    /* 素材库弹窗 */
    .material-picker-modal { width: 880px; max-width: 95vw; height: 70vh; max-height: 720px; display: flex; flex-direction: column; }
    .material-picker-modal .lib-picker { display: flex; flex: 1; min-height: 0; }
    .material-picker-modal .lib-folder-tree { width: 180px; flex-shrink: 0; border-right: 1px solid #ebecf3; padding: 12px 0; overflow-y: auto; }
    .material-picker-modal .lib-folder-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; cursor: pointer; font-size: 13px; color: #4a4d63; transition: background .15s; }
    .material-picker-modal .lib-folder-item:hover { background: #f7f8fc; }
    .material-picker-modal .lib-folder-item.active { background: #f0ebff; color: #5b3df5; font-weight: 600; }
    .material-picker-modal .lib-folder-item .count { font-size: 11px; color: #8a8fa3; background: #f0f1f5; padding: 1px 8px; border-radius: 10px; }
    .material-picker-modal .lib-folder-item.active .count { background: #e3dafe; color: #5b3df5; }
    .material-picker-modal .lib-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
    .material-picker-modal .lib-toolbar { padding: 12px 16px; border-bottom: 1px solid #ebecf3; display: flex; flex-direction: column; gap: 8px; }
    .material-picker-modal .lib-pick-search { width: 100%; padding: 8px 12px; border: 1px solid #d8dae5; border-radius: 8px; font-size: 13px; }
    .material-picker-modal .lib-tag-filter { display: flex; flex-wrap: wrap; gap: 6px; }
    .lib-tag-chip { padding: 4px 10px; background: #f0f1f5; color: #555a6c; border: 0; border-radius: 12px; font-size: 12px; cursor: pointer; transition: all .15s; }
    .lib-tag-chip:hover { background: #e3e6f0; }
    .lib-tag-chip.active { background: #5b3df5; color: #fff; }
    .material-picker-modal .lib-grid { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; align-content: flex-start; }
    .material-picker-modal .lib-card { position: relative; padding: 10px; background: #fff; border: 1.5px solid #ebecf3; border-radius: 10px; cursor: pointer; transition: all .15s; }
    .material-picker-modal .lib-card:hover { border-color: #c7c9d8; }
    .material-picker-modal .lib-card.selected { border-color: #5b3df5; background: #faf8ff; }
    .material-picker-modal .lib-card-cover { aspect-ratio: 16/9; background: linear-gradient(135deg, #f0f1f5 0%, #e3e6f0 100%); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #555a6c; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
    .material-picker-modal .lib-card-info { display: flex; flex-direction: column; gap: 2px; }
    .material-picker-modal .lib-card-info strong { font-size: 12px; color: #2a2c3f; }
    .material-picker-modal .lib-card-info small { font-size: 11px; color: #8a8fa3; }
    .material-picker-modal .lib-card-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
    .material-picker-modal .lib-card-tags span { font-size: 10px; padding: 1px 6px; background: #f0f1f5; color: #555a6c; border-radius: 3px; }
    .material-picker-modal .lib-card-check { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: #5b3df5; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
    .material-picker-modal .lib-card:not(.selected) .lib-card-check { display: none; }
    .material-picker-modal .lib-empty { padding: 40px 0; text-align: center; color: #8a8fa3; font-size: 13px; grid-column: 1 / -1; }
    .material-picker-modal .lib-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid #ebecf3; }

    @media (max-width: 960px) {
      .script-result-head { flex-direction: column; align-items: flex-start; }
      .script-result-actions { width: 100%; flex-wrap: wrap; }
      .material-picker-modal { width: 96vw; height: 80vh; }
      .material-picker-modal .lib-folder-tree { width: 140px; }
    }

    /* 智能脚本：来源、素材与结果体验优化 */
    #agentTaskShell .task-stepper { gap:0; padding:12px 28px 10px; border-bottom:1px solid #ececf2; background:#fff; }
    #agentTaskShell .task-step { position:relative; flex:1; min-height:44px; flex-direction:column; justify-content:flex-start; gap:5px; padding:0; color:#9b9ca5; text-align:center; }
    #agentTaskShell .task-step:not(:last-child)::after { content:""; position:absolute; z-index:0; left:calc(50% + 18px); right:calc(-50% + 18px); top:13px; height:1px; background:#e4e4ea; }
    #agentTaskShell .task-step b { position:relative; z-index:1; width:26px; height:26px; border-color:#dedee7; background:#fff; color:#8d8e97; font-size:11px; box-shadow:0 0 0 4px #fff; }
    #agentTaskShell .task-step span { position:relative; z-index:1; max-width:100%; overflow:hidden; color:inherit; font-size:12px; white-space:nowrap; text-overflow:ellipsis; }
    #agentTaskShell .task-step.active { color:#292a33; font-weight:650; background:transparent; }
    #agentTaskShell .task-step.active b, #agentTaskShell .task-step.done b { border-color:#765bea; background:#765bea; color:#fff; }
    #agentTaskShell .task-step.done:not(:last-child)::after { background:#b8acf5; }

    .script-product-display { display:flex; align-items:center; gap:10px; min-height:48px; padding:10px 12px; border:1px solid #e7e4f0; border-radius:10px; background:linear-gradient(135deg,#fbfaff,#f6f4ff); }
    .script-product-display-icon { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border-radius:9px; color:#6850c9; background:#e9e2ff; font-size:14px; }
    .script-product-display div { min-width:0; }
    .script-product-display strong, .script-product-display small { display:block; }
    .script-product-display strong { color:#3d3650; font-size:13px; }
    .script-product-display small { margin-top:3px; color:#898393; font-size:11px; line-height:1.45; }
    .script-picker-modal .lib-pick-card { gap:10px; padding-top:16px; padding-bottom:16px; }
    .script-picker-modal .lib-pick-content { color:#5d5867; }
    .script-picker-modal .lib-pick-tags { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 12px; padding-top:9px; border-top:1px solid #f0eef4; }
    .script-picker-modal .lib-pick-tag-group { display:flex; align-items:flex-start; gap:7px; min-width:0; }
    .script-picker-modal .lib-pick-tag-group > b { flex:0 0 auto; padding-top:3px; color:#9993a2; font-size:10px; font-weight:650; }
    .script-picker-modal .lib-pick-tag-group > div { display:flex; flex-wrap:wrap; gap:4px; min-width:0; }
    .script-picker-modal .lib-pick-tag { padding:3px 7px; color:#60576d; background:#f5f2f7; border-radius:5px; font-size:10px; }
    .script-picker-modal .lib-pick-tag.is-source { color:#5c40c2; background:#eee9ff; }
    #agentTaskShell[data-agent-type="script"] .number-control { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
    .script-duration-input { width:126px; }
    .script-duration-input input { min-width:0; text-align:center; }
    .script-duration-input span, .number-control span { white-space:nowrap; flex-shrink:0; }
    .script-material-library-button { min-height:40px; padding:0 14px; border:1px solid #cabdf2; border-radius:10px; color:#5940c3; background:#f8f6ff; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
    .script-material-library-button:hover { border-color:#8b70e5; background:#f0ecff; }
    .script-material-selection-strip { display:flex; gap:10px; min-height:0; margin-top:10px; padding-bottom:4px; overflow-x:auto; }
    .script-material-selection-strip::-webkit-scrollbar { height:5px; }
    .script-material-selection-strip::-webkit-scrollbar-thumb { border-radius:4px; background:#d8d3e5; }
    .script-selected-material { position:relative; display:grid; grid-template-columns:40px minmax(120px,1fr) 18px; align-items:center; flex:0 0 226px; gap:8px; min-width:0; padding:8px; border:1px solid #e7e3ef; border-radius:10px; background:#fff; }
    .script-selected-material-cover { display:grid; place-items:center; width:40px; aspect-ratio:9/16; border-radius:5px; color:#fff; background:linear-gradient(155deg,#6750bd,#b693e8); font-size:8px; font-weight:700; text-align:center; }
    .script-selected-material strong, .script-selected-material small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
    .script-selected-material strong { color:#44404c; font-size:11px; }
    .script-selected-material small { margin-top:3px; color:#95909e; font-size:10px; }
    .script-selected-material button { width:18px; height:18px; padding:0; border:0; border-radius:50%; color:#8c8498; background:#f2f0f5; cursor:pointer; line-height:16px; }
    .script-selected-material button:hover { color:#b64654; background:#fff0f1; }

    .single-model-trigger { min-height:48px; border-color:#d9d3e7; border-radius:12px; background:linear-gradient(135deg,#fff,#fbfaff); box-shadow:0 3px 10px rgba(73,52,128,.04); }
    .single-model-trigger::before { content:"✦"; display:grid; place-items:center; width:27px; height:27px; border-radius:8px; color:#fff; background:linear-gradient(135deg,#8066ed,#5940c3); font-size:13px; }
    .single-model-trigger > span { flex:1; }
    .single-model-trigger i { color:#7560d3; font-style:normal; transform:rotate(180deg); }
    .single-model-picker.open .single-model-trigger { border-color:#9279e8; box-shadow:0 0 0 3px rgba(120,91,220,.11); }
    .single-model-menu { bottom:auto; top:calc(100% + 7px); }
    .single-model-option { color:#454052; background:#fff; }
    .single-model-option:hover { background:#f6f3ff; }

    .material-picker-modal { width:min(1120px,96vw); height:min(78vh,820px); max-height:calc(100vh - 48px); }
    .material-picker-modal .lib-folder-tree { width:220px; padding:14px 10px; background:#fafaff; }
    .material-folder-root + .material-folder-root { margin-top:8px; }
    .material-picker-modal .lib-folder-item { width:100%; border:0; border-radius:8px; background:transparent; text-align:left; }
    .material-picker-modal .lib-folder-item .folder-icon { width:16px; color:#d19b35; font-size:13px; }
    .material-picker-modal .material-folder-all { margin-bottom:10px; color:#5b4ac5; background:#f0eeff; }
    .material-picker-modal .material-folder-all .folder-icon { color:#8170df; }
    .material-picker-modal .material-folder-parent { color:#4a4854; font-weight:650; }
    .material-picker-modal .material-folder-children { padding-left:20px; }
    .material-picker-modal .lib-folder-item.sub { padding:7px 8px; color:#747080; font-size:12px; }
    .material-picker-modal .lib-folder-item.sub .folder-icon { color:#b8b2c4; font-size:11px; }
    .material-picker-modal .lib-grid { grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); gap:14px; }
    .material-picker-modal .lib-card-cover { aspect-ratio:9/16; max-height:214px; background:linear-gradient(155deg,#493d67,#9c7bc9); color:rgba(255,255,255,.92); }
    .material-picker-modal .lib-card-tags { display:block; overflow-x:auto; margin-top:7px; }
    .material-picker-modal .lib-card-tags > div { display:flex; width:max-content; gap:4px; }
    .material-picker-modal .lib-card-tags::-webkit-scrollbar { height:4px; }
    .material-picker-modal .lib-card-tags::-webkit-scrollbar-thumb { background:#d7d3df; border-radius:3px; }

    .script-version-tabs { display:flex; gap:6px; margin:0 0 12px; padding:4px; border:1px solid #ece9f3; border-radius:11px; background:#f7f6fa; }
    .script-version-tabs button { min-width:84px; padding:8px 13px; border:0; border-radius:8px; color:#7f788b; background:transparent; font:inherit; font-size:12px; font-weight:650; cursor:pointer; }
    .script-version-tabs button.active { color:#553bc3; background:#fff; box-shadow:0 2px 7px rgba(62,47,112,.12); }
    .script-result-card { padding:16px; border-radius:14px; }
    .script-result-head { margin-bottom:12px; }
    .script-result-title strong { font-size:14px; }
    .script-result-table { max-height:520px; overflow:auto; border:1px solid #ecebf1; border-radius:10px; }
    .script-result-table-grid { border-collapse:separate; border-spacing:0; }
    .script-result-table-grid thead th { background:#f8f7fb; }
    .script-result-table-grid tbody td[data-edit-script-row] { cursor:text; }
    .script-result-table-grid tbody td[data-edit-script-row]:hover { background:#f5f2ff; box-shadow:inset 0 0 0 1px rgba(113,85,215,.12); }
    .script-result-table-grid .col-shot { width:54px; }
    .script-result-table-grid .col-time { width:78px; white-space:nowrap; }
    .script-result-table-grid .col-dynamic { width:236px; min-width:236px; }
    .material-plan { padding:8px; }
    .material-plan-items li { display:grid; grid-template-columns:52px minmax(0,1fr); gap:8px; align-items:start; }
    .material-plan-items li > div { display:grid; grid-template-columns:1fr auto; gap:2px 7px; min-width:0; }
    .material-plan-items li > div i { overflow:hidden; color:#6654b9; white-space:nowrap; text-overflow:ellipsis; }
    .material-plan-items li > div small { grid-column:1/-1; margin:0; overflow:hidden; color:#9892a1; white-space:nowrap; text-overflow:ellipsis; }
    .material-video-preview { position:relative; width:52px; aspect-ratio:9/16; padding:0; overflow:hidden; border:0; border-radius:5px; color:#fff; background:linear-gradient(155deg,#493b69,#9878be); cursor:pointer; }
    .material-video-preview > span { display:grid; place-items:center; height:100%; padding:3px; color:rgba(255,255,255,.82); font-size:8px; font-weight:700; text-align:center; }
    .material-video-preview em { position:absolute; inset:0; display:grid; place-items:center; color:#fff; background:rgba(39,27,67,.72); font-size:10px; font-style:normal; font-weight:700; opacity:0; transition:opacity .15s; }
    .material-video-preview:hover em { opacity:1; }
    .script-material-replace-modal { width:min(760px,94vw); max-height:82vh; }
    .script-replace-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(126px,1fr)); gap:12px; overflow:auto; padding:18px 20px; }
    .script-replace-card { display:grid; gap:5px; padding:8px; border:1px solid #e8e5ee; border-radius:10px; color:#494552; background:#fff; text-align:left; cursor:pointer; }
    .script-replace-card > span { display:grid; place-items:center; aspect-ratio:9/16; border-radius:6px; color:#fff; background:linear-gradient(155deg,#55456f,#9c7bc5); font-size:10px; font-weight:700; }
    .script-replace-card strong { overflow:hidden; font-size:11px; white-space:nowrap; text-overflow:ellipsis; }
    .script-replace-card small { color:#96909e; font-size:10px; }
    .script-replace-card:hover, .script-replace-card.selected { border-color:#765bea; background:#f8f5ff; }
    .script-result-actions { display:flex; justify-content:flex-end; gap:7px; margin-top:12px; }
    .script-result-actions .asset-action { min-height:32px; padding:6px 10px; border-radius:8px; font-size:11px; }

    .task-chat-toggle { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; padding:0; border:1px solid #e5e2eb; border-radius:8px; color:#6c6478; background:#fff; cursor:pointer; font-size:18px; line-height:1; }
    .task-chat-toggle:hover { color:#5b42c0; border-color:#bcaeeb; background:#f7f4ff; }
    #page-creation .agent-task-shell.chat-collapsed { grid-template-columns:minmax(0,1fr) 52px; }
    #page-creation .agent-task-shell.chat-collapsed .task-chat-head { height:100%; padding:10px; justify-content:center; }
    #page-creation .agent-task-shell.chat-collapsed .task-chat-head > div,
    #page-creation .agent-task-shell.chat-collapsed .task-chat-head .asset-toggle,
    #page-creation .agent-task-shell.chat-collapsed .task-chat-log,
    #page-creation .agent-task-shell.chat-collapsed #taskComposerHost { display:none; }
    #page-creation .agent-task-shell.chat-collapsed .task-chat-toggle { transform:rotate(180deg); }

    @media (max-width:980px) {
      #page-creation .agent-task-shell.chat-collapsed { grid-template-columns:1fr; }
      #page-creation .agent-task-shell.chat-collapsed .task-chat-pane { min-height:52px; }
      #page-creation .agent-task-shell.chat-collapsed .task-chat-head { min-height:50px; }
    }

