:root { color-scheme: light; font-family: "Segoe UI", system-ui, sans-serif; }
    *, *::before, *::after { box-sizing: border-box; }
    body { margin: 0; background: #f6f7f9; color: #1f2328; }
    main { max-width: 1360px; margin: 0 auto; padding: 28px 20px 56px; }
    header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
    .header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; }
    h1 { font-size: 24px; margin: 0; font-weight: 650; }
    h2 { font-size: 17px; margin: 0 0 12px; }
    section { background: #fff; border: 1px solid #d8dee4; border-radius: 8px; padding: 18px; margin-bottom: 18px; }
    form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
    input[type=file], input[type=text], input[type=password], select { border: 1px solid #d0d7de; border-radius: 6px; padding: 9px; background: #fff; }
    button, .button { max-width: 100%; border: 1px solid #2f6feb; background: #2f6feb; color: white; border-radius: 6px; padding: 9px 13px; font: inherit; text-decoration: none; white-space: nowrap; cursor: pointer; }
    button.secondary, .button.secondary { border-color: #d0d7de; background: #fff; color: #24292f; }
    button.danger, .button.danger { border-color: #cf222e; color: #cf222e; }
    table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.35; }
    th, td { padding: 8px 6px; border-bottom: 1px solid #d8dee4; text-align: center; vertical-align: middle; }
    th { color: #57606a; font-weight: 600; }
    .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
    .table-shell { position: relative; width: 100%; max-width: 100%; min-width: 0; }
    .table-scroll-top { width: 100%; height: 16px; overflow-x: auto; overflow-y: hidden; margin-bottom: 8px; }
    .table-scroll-spacer { height: 1px; }
    .task-table { min-width: 950px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
    .jobs-table { min-width: 760px; }
    .task-table-shell.show-details .jobs-table { min-width: 1080px; }
    .task-table-shell:not(.show-details) .detail-cell { display: none; }
    .worker-table { min-width: 720px; }
    .task-table th, .task-table td { overflow: hidden; white-space: nowrap; }
    .cell-clip { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .select-cell { width: 34px; text-align: center; }
    .select-cell input { width: auto; min-height: auto; margin: 0; }
    .id-cell { width: 66px; }
    .owner-cell { width: 70px; }
    .filename-cell { width: 120px; text-align: left; }
    .jobs-table .filename-cell { width: 45px; }
    .preset-cell { width: 96px; }
    .status-cell { width: 62px; }
    .progress-cell { width: 40px; }
    .duration-cell { width: 66px; }
    .queue-cell { width: 58px; }
    .worker-cell { width: 66px; }
    .created-cell { width: 124px; }
    .completed-time-cell { width: 124px; }
    .actions-cell { width: 168px; min-width: 168px; }
    .task-table th.status-cell, .task-table td.status-cell,
    .task-table th.progress-cell, .task-table td.progress-cell,
    .task-table th.duration-cell, .task-table td.duration-cell {
      padding-left: 3px;
      padding-right: 3px;
    }
    .jobs-table .status { min-width: 52px; padding-left: 6px; padding-right: 6px; }
    .task-table th.actions-head, .task-table td.actions-cell {
      position: sticky;
      right: 0;
      z-index: 8;
      overflow: visible;
      background: #fff !important;
      border-left: 1px solid #d8dee4;
      box-shadow: -12px 0 0 #fff, -13px 0 0 #d8dee4, -18px 0 16px rgba(27, 31, 36, 0.06);
    }
    .task-table th.actions-head { z-index: 9; }
    .section-heading { display: flex; min-width: 0; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
    .section-heading h2 { margin-bottom: 0; }
    .task-heading-actions { display: flex; max-width: 100%; min-width: 0; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
    .detail-toggle { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8dee4; border-radius: 6px; padding: 5px 8px; background: #fff; white-space: nowrap; color: #57606a; font-size: 13px; }
    .detail-toggle input { width: auto; min-height: auto; margin: 0; }
    .task-stats { display: flex; max-width: 100%; min-width: 0; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
    .task-stat { display: inline-flex; min-width: 0; align-items: baseline; gap: 4px; border: 1px solid #d8dee4; border-radius: 6px; padding: 5px 8px; background: #f6f8fa; white-space: nowrap; }
    .task-stat-label { color: #6e7781; }
    .task-stat strong { font-weight: 650; color: #24292f; }
    .module-pagination,
    .task-pagination-controls {
      display: inline-flex;
      max-width: 100%;
      min-width: 0;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      color: #57606a;
      font-size: 13px;
    }
    .module-pagination label,
    .task-pagination-controls label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin: 0;
      white-space: nowrap;
    }
    .module-pagination select,
    .task-pagination-controls select {
      width: auto;
      min-width: 86px;
      min-height: 32px;
      padding: 5px 8px;
      font-size: 13px;
    }
    .module-pagination button,
    .task-pagination-controls button {
      min-height: 32px;
      padding: 5px 10px;
      font-size: 13px;
    }
    .module-pagination button:disabled,
    .task-pagination-controls button:disabled {
      border-color: #d8dee4;
      background: #f6f8fa;
      color: #8c959f;
      cursor: not-allowed;
    }
    .module-pagination span,
    .task-pagination-controls span { white-space: nowrap; }
    .muted { color: #6e7781; }
    .status { display: inline-flex; min-width: 66px; min-height: 22px; align-items: center; justify-content: center; border-radius: 999px; padding: 2px 8px; text-align: center; background: #eaeef2; color: #24292f; }
    .queued { background: #fff8c5; }
    .processing, .downloading, .assigned, .uploading_result { background: #ddf4ff; }
    .completed { background: #dafbe1; }
    .failed { background: #ffebe9; }
    .canceled { background: #eaeef2; color: #57606a; }
    .online { background: #dafbe1; }
    .busy { background: #fff8c5; }
    .congested { background: #ffebe9; }
    .offline { background: #eaeef2; color: #57606a; }
    .error { color: #cf222e; }
    .login-error { margin-bottom: 12px; border: 1px solid #ff8182; border-radius: 6px; padding: 10px 12px; background: #ffebe9; color: #cf222e; font-weight: 650; }
    .login-success { margin-bottom: 12px; border: 1px solid #2da44e; border-radius: 6px; padding: 10px 12px; background: #dafbe1; color: #116329; font-weight: 650; }
    .login-feishu-panel { display: grid; justify-items: center; gap: 10px; margin-top: 18px; border-top: 1px solid #d8dee4; padding-top: 16px; }
    .login-feishu-title { color: #24292f; font-size: 15px; font-weight: 750; }
    .login-feishu-qr { display: grid; width: 260px; min-height: 260px; place-items: center; overflow: hidden; border: 1px solid #d8dee4; border-radius: 8px; background: #fff; color: #6e7781; }
    .login-feishu-qr iframe { display: block; border: 0; }
    .login-feishu-state { min-height: 20px; color: #6e7781; font-size: 13px; line-height: 1.5; text-align: center; }
    .login-feishu-state.is-success { color: #116329; }
    .login-feishu-state.is-error { color: #cf222e; }
    .login-feishu-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin-top: 10px; border: 1px solid #0969da; border-radius: 6px; padding: 0 14px; background: #0969da; color: #fff; font-weight: 650; text-decoration: none; }
    .login-feishu-link:hover { background: #0757b8; color: #fff; text-decoration: none; }
    .message-cell { width: 220px; max-width: 220px; text-align: left; padding-right: 16px; }
    .message-clip { color: inherit; }
    .copy-error-cell { cursor: copy; }
    .copy-error-cell .message-clip, .copy-error-cell summary { cursor: copy; }
    .copy-error-cell:hover .message-clip, .copy-error-cell:hover summary { text-decoration: underline; }
    .message-cell details { max-width: 320px; }
    .message-cell summary { cursor: pointer; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .message-cell pre { max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 6px; background: #f6f8fa; color: #24292f; white-space: pre-wrap; word-break: break-word; }
    .superres-copy-toast {
      position: fixed;
      left: 50%;
      bottom: 18%;
      z-index: 10000;
      transform: translate(-50%, 12px);
      border: 1px solid #1f883d;
      border-radius: 999px;
      background: #dafbe1;
      color: #116329;
      padding: 10px 18px;
      font-size: 14px;
      font-weight: 650;
      box-shadow: 0 12px 28px rgba(27, 31, 36, 0.16);
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease, transform 160ms ease;
    }
    .superres-copy-toast.is-visible {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    .superres-copy-toast.is-error {
      border-color: #ff8182;
      background: #ffebe9;
      color: #cf222e;
    }
    .actions { display: flex; min-width: 160px; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; white-space: nowrap; }
    .actions form { display: inline-flex; flex-wrap: nowrap; gap: 0; }
    .actions button, .actions .button { white-space: nowrap; padding: 6px 8px; font-size: 13px; }
    .upload-worker-section { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
    .upload-task-panel, .online-worker-panel { min-width: 0; }
    .online-worker-panel h2 { margin-bottom: 12px; }
    .online-worker-table-shell { max-width: 100%; min-width: 0; overflow-x: auto; }
    .online-worker-table-shell .table-scroll-top { margin-bottom: 6px; }
    .online-worker-table-shell .worker-table { min-width: 620px; }
    .online-worker-table-shell th, .online-worker-table-shell td { padding-top: 7px; padding-bottom: 7px; }
    .upload-form { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(110px, 0.7fr) auto auto; gap: 10px 12px; align-items: center; }
    .upload-field { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
    .preset-field { min-width: 0; }
    .fps-field { min-width: 0; }
    .upload-form button { align-self: center; justify-self: start; width: auto; min-width: 92px; margin-top: 0; white-space: nowrap; }
    .upload-file-list { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 12px; }
    .upload-file-summary { color: #57606a; font-size: 13px; }
    .upload-file-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
    .upload-file-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; border: 1px solid #d8dee4; border-radius: 6px; padding: 8px 10px; background: #f6f8fa; }
    .upload-file-name { overflow: hidden; color: #24292f; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
    .upload-file-size { color: #6e7781; font-size: 12px; white-space: nowrap; }
    .upload-file-remove { border-color: #d0d7de; background: #fff; color: #cf222e; padding: 5px 8px; font-size: 12px; }
    .upload-progress-wrap { width: 100%; margin-top: 14px; border: 1px solid #d8dee4; border-radius: 8px; padding: 12px; background: #f6f8fa; }
    .upload-progress-bar { height: 12px; overflow: hidden; border-radius: 999px; background: #d8dee4; }
    .upload-progress-fill { width: 0%; height: 100%; background: #2f6feb; transition: width 160ms ease; }
    .upload-progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; }
    .upload-progress-detail { margin-top: 6px; font-size: 13px; color: #57606a; }
    .upload-error { margin-top: 8px; color: #cf222e; white-space: pre-wrap; }
    .permission-modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(31, 35, 40, 0.32); }
    .permission-modal-backdrop[hidden] { display: none; }
    .permission-modal { width: min(720px, calc(100vw - 48px)); max-height: min(760px, calc(100vh - 48px)); overflow: hidden; border: 1px solid #d8dee4; border-radius: 10px; background: #fff; box-shadow: 0 24px 60px rgba(27, 31, 36, 0.22); }
    .permission-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #d8dee4; }
    .permission-modal-head h2 { margin: 0; }
    .permission-modal-body { display: grid; gap: 14px; padding: 16px 18px 18px; }
    .permission-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 10px; align-items: center; }
    .permission-state { min-height: 20px; color: #57606a; font-size: 13px; }
    .permission-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
    .permission-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid #d8dee4; border-radius: 8px; padding: 10px 12px; background: #f6f8fa; color: #24292f; text-align: left; cursor: pointer; }
    .permission-row:hover { border-color: #8c959f; background: #fff; }
    .permission-user { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
    .permission-badge { border-radius: 999px; padding: 3px 8px; background: #ddf4ff; color: #0969da; font-size: 12px; white-space: nowrap; }
    .superres-filter-form { align-items: center; }
    .superres-filter-runtime {
      display: flex;
      flex: 1 1 520px;
      min-width: 0;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      margin-left: auto;
      flex-wrap: nowrap;
    }
    .superres-runtime-meta {
      display: flex;
      min-width: 0;
      max-width: 100%;
      align-items: center;
      justify-content: flex-end;
      flex: 1 1 auto;
      flex-wrap: nowrap;
      gap: 0;
      line-height: 1.5;
      overflow: hidden;
      text-align: right;
    }
    .superres-runtime-meta span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .superres-filter-runtime .button {
      flex: 0 0 auto;
    }
    #pollStatus { margin-left: 10px; }
    @media (max-width: 1180px) {
      .superres-filter-runtime {
        flex-basis: 100%;
        min-width: 0;
        justify-content: flex-start;
        margin-left: 0;
      }
      .superres-runtime-meta {
        justify-content: flex-start;
        text-align: left;
      }
      .upload-form { grid-template-columns: minmax(220px, 1fr) minmax(120px, 160px) minmax(110px, 150px); }
      .upload-form button { justify-self: start; }
    }
    @media (max-width: 960px) {
      .upload-form { grid-template-columns: 1fr 1fr; }
      .upload-form button { grid-column: 1 / -1; justify-self: start; }
      .permission-form-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 720px) {
      .upload-form { grid-template-columns: 1fr; }
      .upload-form button { width: 100%; }
      .upload-file-item { grid-template-columns: minmax(0, 1fr); }
    }

    [hidden] { display: none !important; }
    input[type=url], input[type=number], input[type=date], input[type=search] { border: 1px solid #d0d7de; border-radius: 6px; padding: 9px; background: #fff; }
    .service-shell {
      position: relative;
      width: 100vw;
      margin-left: calc(50% - 50vw);
      box-sizing: border-box;
      padding: 0;
    }
    .service-content {
      width: 100%;
      max-width: none;
      margin: 0;
      box-sizing: border-box;
      padding: 0 18px 0 64px;
    }
    .service-view { display: none; }
    .service-view.is-active { display: block; }
    .service-view[data-service-view="prompt"],
    .service-view[data-service-view="asset"],
    .service-view[data-service-view="video"],
    .service-view[data-service-view="episode_assets"] {
      display: block;
    }
    .service-view[data-service-view="prompt"]:not(.is-active),
    .service-view[data-service-view="asset"]:not(.is-active),
    .service-view[data-service-view="video"]:not(.is-active),
    .service-view[data-service-view="episode_assets"]:not(.is-active) {
      position: fixed;
      top: 0;
      left: -200vw;
      width: calc(100vw - 82px);
      height: calc(100vh - 28px);
      min-height: calc(100vh - 28px);
      overflow: hidden;
      visibility: hidden;
      pointer-events: none;
    }
    .service-view[data-service-view="prompt"].is-active,
    .service-view[data-service-view="asset"].is-active,
    .service-view[data-service-view="video"].is-active,
    .service-view[data-service-view="episode_assets"].is-active {
      position: static;
      visibility: visible;
      pointer-events: auto;
    }
    .module-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin: 0 0 16px;
      min-width: 0;
    }
    .module-title, .module-header h1 {
      margin: 0;
      color: #0f172a;
      font-size: 24px;
      font-weight: 750;
      letter-spacing: 0;
      line-height: 1.25;
      white-space: nowrap;
    }
    .module-header-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      flex-wrap: wrap;
      min-width: 0;
      margin-left: auto;
    }
    .module-header-actions .muted {
      max-width: 100%;
      overflow-wrap: anywhere;
      text-align: right;
    }
    .service-rail {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 50;
      width: 52px;
      height: 100vh;
      max-height: 100vh;
      overflow: hidden;
      border: 1px solid #d8dee4;
      border-left: 0;
      border-radius: 0 16px 16px 0;
      background: #fbfcfe;
      box-shadow: 10px 0 24px rgba(27, 31, 36, 0.08);
      transform: translateX(0);
      transition: width 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    }
    .service-rail:hover, .service-rail:focus-within, .service-rail.is-open { width: 176px; transform: translateX(0); box-shadow: 14px 0 28px rgba(27, 31, 36, 0.10); }
    .service-rail-inner { display: flex; height: 100%; box-sizing: border-box; flex-direction: column; align-items: center; gap: 10px; padding: 14px 6px; }
    .service-rail-head {
      display: flex;
      width: 100%;
      max-height: 0;
      min-height: 0;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      gap: 0;
      margin-bottom: 0;
      overflow: hidden;
      padding: 0;
      border-bottom: 0;
      color: #57606a;
      text-align: center;
      white-space: nowrap;
      pointer-events: auto;
    }
    .service-title { max-width: 0; overflow: hidden; opacity: 0; color: #24292f; font-size: 18px; font-weight: 800; line-height: 1.2; transition: max-width 160ms ease, opacity 160ms ease; }
    .service-account-actions {
      display: flex;
      max-width: 0;
      align-items: center;
      justify-content: center;
      gap: 6px;
      overflow: hidden;
      opacity: 0;
      transition: max-width 160ms ease, opacity 160ms ease;
    }
    .service-switch-link {
      display: inline-flex;
      max-width: 0;
      height: 26px;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      border: 1px solid #d0d7de;
      border-radius: 8px;
      padding: 0;
      background: #fff;
      color: #0969da;
      font-size: 12px;
      font-weight: 650;
      line-height: 1;
      opacity: 0;
      text-decoration: none;
      pointer-events: none;
      transition: max-width 160ms ease, opacity 160ms ease, padding 160ms ease, border-color 160ms ease;
    }
    .service-switch-link:hover { border-color: #0969da; background: #f6f8fa; }
    .service-password-link { font-family: inherit; cursor: pointer; }
    .service-rail:hover .service-rail-head, .service-rail:focus-within .service-rail-head, .service-rail.is-open .service-rail-head { max-height: 88px; min-height: 66px; gap: 7px; margin-bottom: 4px; padding-bottom: 10px; border-bottom: 1px solid #eaeef2; }
    .service-rail:hover .service-title, .service-rail:focus-within .service-title, .service-rail.is-open .service-title { max-width: 112px; opacity: 1; }
    .service-rail:hover .service-account-actions, .service-rail:focus-within .service-account-actions, .service-rail.is-open .service-account-actions { max-width: 154px; opacity: 1; }
    .service-rail:hover .service-switch-link, .service-rail:focus-within .service-switch-link, .service-rail.is-open .service-switch-link { max-width: 96px; padding: 0 10px; opacity: 1; pointer-events: auto; }
    .account-password-modal-backdrop[hidden] { display: none !important; }
    .account-password-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: grid;
      place-items: center;
      background: rgba(31, 35, 40, 0.48);
    }
    .account-password-modal {
      display: grid;
      width: min(360px, calc(100vw - 40px));
      gap: 12px;
      border: 1px solid #d0d7de;
      border-radius: 8px;
      padding: 18px;
      background: #fff;
      color: #24292f;
      box-shadow: 0 24px 70px rgba(31, 35, 40, 0.28);
    }
    .account-password-modal h2 { margin: 0; font-size: 18px; line-height: 1.3; }
    .account-password-modal label { display: grid; gap: 6px; color: #57606a; font-size: 13px; }
    .account-password-modal input {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid #d0d7de;
      border-radius: 6px;
      padding: 9px 10px;
      background: #fff;
      color: #24292f;
    }
    .account-password-state { min-height: 20px; color: #57606a; font-size: 13px; line-height: 1.5; }
    .account-password-state.is-error { color: #cf222e; }
    .account-password-state.is-success { color: #116329; }
    .account-password-actions { display: flex; justify-content: flex-end; gap: 8px; }
    .service-tab {
      position: relative;
      display: grid;
      width: 40px;
      min-height: 50px;
      grid-template-columns: 1fr;
      place-items: center;
      gap: 6px;
      border: 1px solid transparent;
      border-radius: 12px;
      padding: 8px 4px;
      background: transparent;
      color: #24292f;
      text-align: center;
      white-space: nowrap;
      transition: width 180ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
    }
    .service-rail:hover .service-tab, .service-rail:focus-within .service-tab, .service-rail.is-open .service-tab { width: 156px; }
    .service-tab:hover { border-color: #d8dee4; background: #fff; }
    .service-tab.is-active, .service-tab.is-active:hover, .service-tab.is-active:focus-visible {
      border-color: transparent;
      background: transparent;
      color: #0969da;
      outline: 0;
      box-shadow: none;
    }
    .service-tab-project,
    .service-tab-projects,
    .service-tab-credits { margin-top: auto; }
    .service-tab-credits + .service-tab-projects { margin-top: 0; }
    .service-tab-admin { margin-top: 0; }
    .service-tab-icon {
      display: inline-flex;
      width: 30px;
      height: 30px;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      background: #eef2f7;
      font-weight: 700;
      flex: 0 0 auto;
    }
    .service-tab.is-active .service-tab-icon { background: #2f6feb; color: #fff; }
    .service-tab-text {
      max-width: 0;
      overflow: hidden;
      opacity: 0;
      font-weight: 650;
      line-height: 1.2;
      text-align: center;
      transition: max-width 160ms ease, opacity 160ms ease;
    }
    .service-rail:hover .service-tab-text, .service-rail:focus-within .service-tab-text, .service-rail.is-open .service-tab-text { max-width: 120px; opacity: 1; }
    .subtitle-header { align-items: center; margin-bottom: 16px; }
    .subtitle-header h1 { font-size: 24px; line-height: 1.25; }
    .subtitle-header p { display: none; }
    .subtitle-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; }
    .subtitle-grid { display: grid; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 268px); gap: 12px; align-items: start; max-width: 100%; }
    .subtitle-grid > div, .subtitle-grid > aside { min-width: 0; }
    .subtitle-side { display: grid; width: 100%; max-width: 260px; min-width: 0; gap: 10px; }
    .subtitle-panel { display: grid; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; gap: 12px; overflow: hidden; }
    .subtitle-side .subtitle-panel { margin-bottom: 0; padding: 12px; }
    .subtitle-preview-panel, .subtitle-history-panel { min-width: 0; margin-bottom: 0; padding-top: 12px; }
    .subtitle-history-panel { display: flex; flex-direction: column; }
    .subtitle-history-panel input, .subtitle-history-panel select, .subtitle-history-panel button {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }
    .panel-title { display: flex; min-height: 22px; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
    .panel-title > span, .panel-title > h2 { margin: 0; color: #0f172a; font-size: 16px; font-weight: 700; line-height: 22px; }
    .panel-title small { min-width: 0; overflow: hidden; color: #6e7781; font-size: 13px; line-height: 22px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
    .subtitle-side .panel-title > span { flex: 0 0 auto; white-space: nowrap; }
    .subtitle-side .panel-title > small { flex: 1 1 auto; max-width: 150px; }
    .file-drop {
      display: flex;
      min-height: 62px;
      align-items: center;
      justify-content: center;
      border: 1px dashed #8c959f;
      border-radius: 8px;
      background: #f6f8fa;
      cursor: pointer;
      color: #24292f;
      font-weight: 650;
      padding: 10px;
      text-align: center;
    }
    .file-drop input { display: none; }
    .subtitle-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: #6e7781; font-size: 12px; }
    .subtitle-divider::before, .subtitle-divider::after { content: ""; height: 1px; background: #d8dee4; }
    .subtitle-form-grid-3, .subtitle-form-grid-4 { display: grid; gap: 8px; }
    .subtitle-form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
    .subtitle-form-grid-4 { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
    .subtitle-panel label { display: grid; gap: 6px; color: #57606a; font-size: 13px; }
    .subtitle-field-heading { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
    .subtitle-help {
      display: inline-flex;
      width: 18px;
      height: 18px;
      align-items: center;
      justify-content: center;
      border: 1px solid #d8dee4;
      border-radius: 999px;
      background: #f6f8fa;
      color: #57606a;
      font-size: 12px;
      line-height: 1;
      cursor: help;
    }
    .subtitle-help:hover { border-color: #2f6feb; background: #eff6ff; color: #0969da; }
    .subtitle-panel input, .subtitle-panel select, .subtitle-panel button, .subtitle-panel .button {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }
    .subtitle-panel button, .subtitle-panel .button { text-align: center; white-space: nowrap; }
    .subtitle-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
    .subtitle-toolbar button, .subtitle-toolbar .subtitle-switch {
      display: inline-flex !important;
      width: 100% !important;
      min-height: 38px;
      align-items: center;
      justify-content: center;
      border: 1px solid #d0d7de;
      border-radius: 6px;
      padding: 8px 6px;
      background: #fff;
      color: #24292f !important;
      font-size: 13px;
      line-height: 1.2;
      text-align: center;
      white-space: nowrap;
    }
    .subtitle-toolbar button.is-active {
      border-color: #2f6feb;
      background: #2f6feb;
      color: #fff !important;
      box-shadow: 0 0 0 2px rgba(47, 111, 235, 0.12);
    }
    .subtitle-toolbar input { width: auto; }
    .subtitle-switch { display: inline-flex !important; grid-template-columns: none !important; align-items: center; gap: 6px !important; color: #24292f !important; }
    .subtitle-switch input { width: auto; min-height: auto; }
    .subtitle-advanced {
      min-width: 0;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      background: #f6f8fa;
      padding: 0;
    }
    .subtitle-advanced summary {
      cursor: pointer;
      padding: 10px 12px;
      color: #57606a;
      font-size: 13px;
      font-weight: 600;
      list-style-position: inside;
    }
    .subtitle-advanced-body { display: grid; gap: 10px; padding: 0 12px 12px; }
    .subtitle-stage {
      position: relative;
      min-height: 420px;
      aspect-ratio: 16 / 9;
      max-height: min(72vh, 760px);
      overflow: hidden;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      background: #101418;
    }
    .subtitle-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #101418; }
    .subtitle-video-controls {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto auto;
      gap: 8px;
      align-items: center;
      margin-top: 8px;
      padding: 8px 10px;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      background: #f6f8fa;
    }
    .subtitle-video-controls button {
      width: auto !important;
      min-height: 30px;
      padding: 4px 10px;
      font-size: 13px;
      white-space: nowrap;
    }
    .subtitle-video-controls input[type="range"] {
      width: 100%;
      min-height: auto;
      accent-color: #2f6feb;
    }
    .subtitle-video-time {
      min-width: 92px;
      color: #57606a;
      font-size: 12px;
      text-align: center;
      white-space: nowrap;
    }
    .subtitle-selection-layer { position: absolute; inset: 0; cursor: default; }
    .subtitle-selection-layer.selection-active { cursor: crosshair; }
    .subtitle-empty-hint {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: #c9d1d9;
      pointer-events: none;
    }
    .subtitle-selection-box {
      position: absolute;
      border: 2px solid #2f6feb;
      background: rgba(47, 111, 235, 0.18);
      pointer-events: none;
    }
    .subtitle-preview-title { margin-bottom: 12px; }
    .subtitle-preview-title h2 { margin: 0; }
    .subtitle-view-options { display: flex; min-height: 22px; align-items: flex-start; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
    .subtitle-view-options .subtitle-switch { font-size: 13px; line-height: 22px; }
    .subtitle-compare-wrap { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; min-width: 0; }
    .subtitle-compare-wrap.is-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subtitle-compare-wrap.is-compare .subtitle-stage { min-height: 0; max-height: none; aspect-ratio: 16 / 9; }
    .subtitle-view-slot { min-width: 0; }
    .subtitle-view-label { margin-bottom: 6px; color: #57606a; font-size: 13px; font-weight: 650; }
    .subtitle-result-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #101418; }
    .subtitle-log { display: none; }
    .subtitle-history-filters { display: grid; grid-template-columns: 1fr 112px; gap: 8px; margin-bottom: 10px; }
    .subtitle-history-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
    .subtitle-history-pagination { flex: 0 0 auto; margin: 10px 0 0; justify-content: space-between; }
    .subtitle-history-dates input,
    .subtitle-history-dates select { min-width: 0; }
    .subtitle-history-list { display: grid; flex: 1 1 auto; min-height: 0; max-height: calc(100vh - 280px); overflow-y: auto; overflow-x: hidden; gap: 8px; padding-right: 2px; }
    .subtitle-runtime-meta { display: block; margin-top: 8px; font-size: 12px; line-height: 16px; text-align: right; }
    .subtitle-history-empty { padding: 18px 12px; border: 1px dashed #d8dee4; border-radius: 8px; color: #6e7781; text-align: center; }
    .subtitle-history-item { position: relative; display: grid; min-width: 0; gap: 7px; padding: 10px 70px 10px 10px; border: 1px solid #d8dee4; border-radius: 8px; background: #fff; }
    .subtitle-history-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .subtitle-history-name { min-width: 0; overflow: hidden; color: #24292f; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
    .subtitle-history-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: #6e7781; font-size: 12px; line-height: 1.35; }
    .subtitle-history-actions-row { display: flex; min-width: 0; align-items: center; gap: 12px; flex-wrap: nowrap; }
    .subtitle-history-link { width: fit-content; min-height: auto; border: 0; padding: 0; background: transparent; color: #0969da; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
    .subtitle-history-actions-row .subtitle-history-link { width: auto !important; max-width: none; flex: 0 0 auto; white-space: nowrap; }
    .subtitle-history-link:hover { text-decoration: underline; }
    .subtitle-history-link:disabled,
    .subtitle-history-link.is-disabled { color: #8c959f !important; cursor: not-allowed; text-decoration: none; }
    .subtitle-status { display: inline-flex; min-width: 44px; min-height: 22px; align-items: center; justify-content: center; border-radius: 999px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
    .subtitle-history-top .subtitle-status { position: absolute; top: 10px; right: 10px; }
    .subtitle-status.success { background: #dafbe1; color: #116329; }
    .subtitle-status.failed { background: #ffebe9; color: #cf222e; }
    .subtitle-status.processing, .subtitle-status.waiting { background: #ddf4ff; color: #0969da; }
    .subtitle-status.expired { background: #eaeef2; color: #57606a; }
    .subtitle-permission-state { margin-top: -4px; overflow-wrap: anywhere; color: #57606a; font-size: 12px; line-height: 1.35; }
    .ok-text { color: #1a7f37; }
    .warn-text { color: #9a6700; }
    .bad-text { color: #cf222e; }
    .voice-header { align-items: center; margin-bottom: 16px; }
    .voice-header h1 { font-size: 24px; line-height: 1.25; }
    .voice-grid {
      display: grid;
      grid-template-columns: minmax(260px, 320px) minmax(420px, 1fr) minmax(260px, 320px);
      gap: 18px;
      align-items: start;
      max-width: 100%;
    }
    .voice-panel {
      display: grid;
      min-width: 0;
      gap: 12px;
      margin-bottom: 0;
      padding: 16px;
    }
    .voice-result-panel { min-height: 700px; }
    .voice-panel label {
      display: grid;
      gap: 6px;
      min-width: 0;
      color: #57606a;
      font-size: 13px;
    }
    .voice-field-heading { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
    .voice-help {
      display: inline-flex;
      width: 18px;
      height: 18px;
      align-items: center;
      justify-content: center;
      border: 1px solid #d8dee4;
      border-radius: 999px;
      background: #f6f8fa;
      color: #57606a;
      font-size: 12px;
      line-height: 1;
      cursor: help;
    }
    .voice-help:hover { border-color: #2f6feb; background: #eff6ff; color: #0969da; }
    .voice-field-hint { display: block; min-height: 16px; color: #6e7781; font-size: 12px; line-height: 1.35; }
    .voice-field-hint.warn-text { color: #9a6700; }
    .voice-panel select option:disabled { color: #8c959f; background: #f6f8fa; }
    .voice-panel input:disabled { background: #f6f8fa; color: #8c959f; cursor: not-allowed; }
    .voice-panel input, .voice-panel select, .voice-panel textarea, .voice-panel button, .voice-panel .button {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }
    .voice-panel button, .voice-panel .button {
      min-height: 38px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .voice-panel textarea {
      min-height: 118px;
      resize: vertical;
      border: 1px solid #d0d7de;
      border-radius: 6px;
      padding: 10px;
      font: 13px/1.5 "Segoe UI", "Microsoft YaHei UI", sans-serif;
      background: #fff;
    }
    .voice-switch {
      display: inline-flex !important;
      grid-template-columns: none !important;
      align-items: center;
      gap: 7px !important;
      color: #24292f !important;
    }
    .voice-switch input { width: auto; min-height: auto; margin: 0; }
    .voice-advanced {
      min-width: 0;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      background: #f6f8fa;
    }
    .voice-advanced summary {
      cursor: pointer;
      padding: 10px 12px;
      color: #57606a;
      font-size: 13px;
      font-weight: 600;
      list-style-position: inside;
    }
    .voice-advanced > .voice-field-hint { padding: 0 12px 8px; }
    .voice-advanced-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
    .voice-source-group {
      display: grid;
      gap: 10px;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      padding: 10px;
      background: #f6f8fa;
    }
    .voice-source-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .voice-source-head .voice-field-heading { font-weight: 600; color: #24292f; }
    .voice-source-head small { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
    .voice-reference-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }
    .voice-reference-row .voice-clear-reference {
      width: auto;
      min-width: 64px;
      white-space: nowrap;
    }
    .voice-panel button:disabled {
      border-color: #d8dee4;
      background: #f6f8fa;
      color: #8c959f;
      cursor: not-allowed;
    }
    .voice-create-title { margin: 6px 0 0; }
    .voice-create-options { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .voice-status-box {
      min-height: 64px;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      padding: 12px;
      background: #fff;
      color: #24292f;
      white-space: pre-wrap;
    }
    #voiceOutputAudio { width: 100%; min-height: 42px; }
    .voice-table-wrap { position: relative; min-height: 320px; overflow-x: auto; }
    .voice-task-table { min-width: 620px; table-layout: fixed; }
    .voice-task-table th, .voice-task-table td { overflow: hidden; white-space: nowrap; }
    .voice-task-table th:last-child, .voice-task-table td:last-child { text-align: center; }
    .voice-result-cell {
      text-align: center !important;
      vertical-align: middle;
    }
    .voice-result-cell .button {
      display: inline-flex;
      width: auto;
      min-width: 52px;
      align-items: center;
      justify-content: center;
      padding: 7px 12px;
    }
    .voice-result-cell .bad-text, .voice-result-cell .muted {
      display: inline-block;
      max-width: 100%;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .voice-copy-error {
      display: inline-block;
      width: 100%;
      max-width: 100%;
      border: 0;
      background: transparent;
      color: #cf222e;
      font: inherit;
      line-height: 1.3;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: copy;
      padding: 0;
    }
    .voice-copy-error:hover { text-decoration: underline; }
    .voice-toast {
      position: fixed;
      left: 50%;
      bottom: 18%;
      z-index: 10000;
      transform: translate(-50%, 12px);
      border: 1px solid #1f883d;
      border-radius: 999px;
      background: #dafbe1;
      color: #116329;
      padding: 10px 18px;
      font-size: 14px;
      font-weight: 650;
      box-shadow: 0 12px 28px rgba(27, 31, 36, 0.16);
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease, transform 160ms ease;
    }
    .voice-toast.is-visible {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    .voice-empty {
      padding: 24px 12px;
      border: 1px dashed #d8dee4;
      border-radius: 8px;
      color: #6e7781;
      text-align: center;
    }
    .voice-pagination-controls {
      display: flex;
      margin-top: 10px;
      justify-content: flex-end;
    }
    .voice-job-status {
      display: inline-flex;
      min-width: 48px;
      min-height: 22px;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 1px 8px;
      background: #eaeef2;
      font-size: 12px;
    }
    .voice-job-status.running { background: #ddf4ff; color: #0969da; }
    .voice-job-status.completed { background: #dafbe1; color: #116329; }
    .voice-job-status.failed { background: #ffebe9; color: #cf222e; }
    .voice-debug-panel { background: #f6f8fa; }
    .voice-debug-output {
      min-height: 160px;
      max-height: 320px;
      overflow: auto;
      margin: 0;
      border: 1px solid #d8dee4;
      border-radius: 8px;
      padding: 12px;
      background: #fff;
      color: #24292f;
      font: 12px/1.5 Consolas, monospace;
      white-space: pre-wrap;
    }
    .prompt-header { align-items: center; margin-bottom: 16px; }
    .prompt-header h1 { font-size: 24px; line-height: 1.25; }
    .prompt-task-stack { display: grid; gap: 14px; }
    .prompt-panel { display: grid; gap: 12px; margin-bottom: 0; padding: 16px; }
    .prompt-panel label { display: grid; gap: 6px; color: #57606a; font-size: 13px; }
    .prompt-panel input, .prompt-panel select, .prompt-panel textarea, .prompt-panel button, .prompt-panel .button {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }
    .prompt-panel textarea {
      min-height: 140px;
      resize: vertical;
      border: 1px solid #d0d7de;
      border-radius: 6px;
      padding: 10px;
      font: 13px/1.5 "Consolas", "Microsoft YaHei UI", monospace;
      background: #fff;
    }
    .prompt-submit-grid { display: grid; grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) 120px; gap: 10px; align-items: end; }
    .prompt-file-field { display: grid; gap: 6px; min-width: 0; }
    .prompt-submit-state { min-height: 20px; color: #57606a; font-size: 13px; }
    .prompt-advanced { min-width: 0; border: 1px solid #d8dee4; border-radius: 8px; background: #f6f8fa; }
    .prompt-advanced summary { cursor: pointer; padding: 10px 12px; color: #57606a; font-size: 13px; font-weight: 600; list-style-position: inside; }
    .prompt-advanced-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
    .prompt-advanced-body label:first-child { grid-column: 1 / -1; }
    .prompt-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
    .prompt-table-tools input, .prompt-table-tools select, .prompt-table-tools button { width: auto; min-width: 120px; }
    .prompt-table-wrap { width: 100%; overflow-x: auto; }
    .prompt-task-table { min-width: 1080px; table-layout: fixed; }
    .prompt-task-table th, .prompt-task-table td { overflow: hidden; white-space: nowrap; }
    .prompt-name-cell { width: 180px; text-align: left; }
    .prompt-episode-cell { width: 78px; }
    .prompt-owner-cell { width: 84px; }
    .prompt-state-cell { width: 82px; }
    .prompt-progress-cell { width: 58px; }
    .prompt-duration-cell { width: 72px; }
    .prompt-created-cell { width: 132px; }
    .prompt-message-cell { width: 240px; text-align: left; }
    .prompt-actions-cell { width: 160px; }
    .prompt-task-table th.prompt-actions-cell, .prompt-task-table td.prompt-actions-cell { overflow: visible; }
    .prompt-task-message { display: block; overflow: hidden; color: #57606a; text-overflow: ellipsis; }
    .prompt-row-actions { display: inline-flex; width: auto; min-width: 0; align-items: center; justify-content: flex-start; gap: 4px; flex-wrap: nowrap; }
    .prompt-row-actions .prompt-action-btn {
      display: inline-flex !important;
      width: 38px !important;
      min-width: 38px !important;
      max-width: 38px !important;
      min-height: 28px !important;
      height: 28px;
      flex: 0 0 38px;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      border: 1px solid #d0d7de;
      border-radius: 6px;
      padding: 0 !important;
      background: #fff;
      color: #24292f !important;
      font-size: 13px;
      line-height: 1;
      text-align: center;
      text-decoration: none;
      white-space: nowrap;
      cursor: pointer;
    }
    .prompt-row-actions .prompt-action-btn.primary { border-color: #2f6feb; background: #2f6feb; color: #fff !important; }
    .prompt-row-actions .prompt-action-btn.danger { border-color: #cf222e; background: #fff; color: #cf222e !important; }
    .prompt-empty { padding: 24px 12px; border: 1px dashed #d8dee4; border-radius: 8px; color: #6e7781; text-align: center; }
    .prompt-status { display: inline-flex; min-width: 54px; min-height: 22px; align-items: center; justify-content: center; border-radius: 999px; padding: 1px 8px; font-size: 12px; white-space: nowrap; background: #eaeef2; }
    .prompt-status.completed { background: #dafbe1; color: #116329; }
    .prompt-status.failed { background: #ffebe9; color: #cf222e; }
    .prompt-status.running, .prompt-status.queued { background: #ddf4ff; color: #0969da; }
    @media (min-width: 1501px) {
      .subtitle-history-panel { height: calc(100vh - 82px); max-height: calc(100vh - 82px); }
      .subtitle-history-list { max-height: none; }
    }
    @media (max-width: 1500px) {
      .subtitle-grid { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); }
      .voice-grid { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
      .voice-library-panel,
      .subtitle-history-panel { grid-column: 1 / -1; }
      .subtitle-history-list { max-height: 320px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    }
    @media (max-width: 1120px) {
      .subtitle-grid { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); }
      .voice-grid { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr); }
      .voice-library-panel { grid-column: 1 / -1; }
      .subtitle-history-panel { grid-column: 1 / -1; }
      .subtitle-history-list { max-height: 320px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
      .prompt-submit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .prompt-submit-grid button { justify-self: start; width: auto; min-width: 120px; }
    }
    @media (max-width: 980px) {
      .module-header { align-items: flex-start; flex-wrap: wrap; }
      .module-title, .module-header h1 { white-space: normal; }
      .module-header-actions { justify-content: flex-start; margin-left: 0; }
      .subtitle-grid { grid-template-columns: 1fr; }
      .voice-grid { grid-template-columns: 1fr; }
      .subtitle-compare-wrap.is-compare { grid-template-columns: 1fr; }
      .subtitle-side { max-width: none; }
      .subtitle-stage { min-height: 280px; }
      .prompt-submit-grid, .prompt-advanced-body, .voice-advanced-body, .voice-create-options { grid-template-columns: 1fr; }
      .service-content { padding-left: 58px; padding-right: 12px; }
      .service-rail { width: 48px; }
      .service-rail:hover, .service-rail:focus-within, .service-rail.is-open { width: 164px; }
      .service-tab { width: 38px; }
      .service-rail:hover .service-tab, .service-rail:focus-within .service-tab, .service-rail.is-open .service-tab { width: 144px; }
    }

/* superres module inline styles: extracted for cacheable delivery */
#promptServiceView {
        min-height: calc(100vh - 28px);
      }
      .prompt-web-header {
        margin: 0 0 14px;
      }
      .prompt-web-header h1 {
        margin: 0;
        color: #0f172a;
        font-size: 24px;
        line-height: 1.25;
        font-weight: 750;
        letter-spacing: 0;
      }
      .prompt-web-panel {
        height: calc(100vh - 28px);
        min-height: calc(100vh - 28px);
        overflow: hidden;
        border: 1px solid #d9e0e4;
        border-radius: 8px;
        background: #ffffff;
      }
      .prompt-web-frame {
        width: 100%;
        height: 100%;
        border: 0;
        display: block;
        background: #edf1f4;
      }

#assetServiceView,
#assetEpisodeServiceView {
        min-height: calc(100vh - 28px);
      }
      .asset-web-header {
        display: none;
        margin: 0;
      }
      .asset-web-header h1 {
        margin: 0;
        color: #0f172a;
        font-size: 24px;
        line-height: 1.25;
        font-weight: 750;
        letter-spacing: 0;
      }
      .asset-web-panel {
        height: calc(100vh - 28px);
        min-height: calc(100vh - 28px);
        overflow: hidden;
        border: 1px solid #d9e0e4;
        border-radius: 8px;
        background: #ffffff;
      }
      .asset-web-frame {
        width: 100%;
        height: 100%;
        min-height: 100%;
        border: 0;
        display: block;
        background: #edf1f4;
      }

.admin-staff-page { display: grid; gap: 16px; }
      .admin-staff-header { margin-bottom: 0; }
      .admin-staff-panel { display: grid; gap: 14px; margin-bottom: 0; }
      .admin-collapsible-panel { gap: 8px; }
      .admin-collapsible-panel .panel-title { align-items: center; margin-bottom: 0; }
      .admin-panel-title-actions { display: inline-flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 10px; }
      .admin-panel-toggle {
        min-height: 28px;
        border: 1px solid #d0d7de;
        border-radius: 6px;
        padding: 0 10px;
        background: #fff;
        color: #0969da;
        font-size: 13px;
        font-weight: 650;
        cursor: pointer;
      }
      .admin-panel-toggle:hover { background: #f6f8fa; }
      .admin-collapsible-body[hidden] { display: none; }
      .admin-collapsible-body { display: grid; gap: 8px; }
      .admin-credential-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 10px;
      }
      .admin-migration-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
        gap: 10px;
      }
      .admin-credential-item {
        display: grid;
        gap: 6px;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid #d0d7de;
        border-radius: 8px;
        background: #ffffff;
      }
      .admin-credential-item.is-ok { border-color: #aceebb; background: #f6fff8; }
      .admin-credential-item.is-missing { border-color: #ffcecb; background: #fff8f7; }
      .admin-credential-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
      .admin-credential-title-main { display: flex; min-width: 0; align-items: center; gap: 8px; flex-wrap: nowrap; }
      .admin-credential-title span { min-width: 0; overflow: hidden; color: #24292f; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
      .admin-credential-title .admin-credential-label { flex: 0 1 auto; }
      .admin-credential-title strong { flex: 0 0 auto; color: #57606a; font-size: 12px; }
      .admin-credential-item.is-ok .admin-credential-title strong { color: #116329; }
      .admin-credential-item.is-missing .admin-credential-title strong { color: #cf222e; }
      .admin-credential-meta { min-width: 0; overflow: hidden; color: #57606a; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
      .admin-credential-detail,
      .admin-credential-network {
        min-width: 0;
        color: #57606a;
        font-size: 12px;
        line-height: 1.45;
      }
      .admin-credential-detail {
        white-space: normal;
        overflow-wrap: anywhere;
      }
      .admin-credential-network {
        display: grid;
        gap: 4px;
        border-top: 1px solid #d8dee4;
        padding-top: 6px;
      }
      .admin-credential-network-message {
        font-weight: 650;
        color: #24292f;
      }
      .admin-credential-network-node {
        overflow-wrap: anywhere;
      }
      .admin-credential-network-node.is-ok {
        color: #116329;
      }
      .admin-credential-network-node.is-bad {
        color: #cf222e;
      }
      .admin-staff-form {
        display: grid;
        gap: 10px;
      }
      .admin-staff-form-row {
        display: grid;
        gap: 10px;
        align-items: end;
        justify-content: start;
      }
      .admin-staff-account-row { grid-template-columns: 240px 240px 120px; }
      .admin-staff-module-row { grid-template-columns: max-content; }
      .admin-staff-form label { display: grid; gap: 6px; color: #57606a; font-size: 13px; }
      .admin-staff-form input, .admin-staff-form select, .admin-staff-form button {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
      }
      .admin-staff-module-row { align-items: start; }
      .admin-staff-action-block {
        display: grid;
        grid-column: 1 / -1;
        gap: 4px;
        align-self: start;
        justify-self: start;
      }
      .admin-staff-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
      .admin-staff-actions button { min-width: 86px; }
      .admin-staff-form .admin-staff-actions button {
        width: auto;
        flex: 0 0 auto;
      }
      .admin-staff-state { min-height: 20px; color: #57606a; font-size: 13px; }
      .admin-credit-rate-panel { gap: 8px; }
      .admin-credit-rate-form {
        display: flex;
        align-items: center;
        gap: 12px 18px;
        flex-wrap: wrap;
      }
      .admin-credit-rate-form label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #24292f;
        font-size: 15px;
        white-space: nowrap;
      }
      .admin-credit-rate-form input {
        width: 64px;
        height: 30px;
        box-sizing: border-box;
        text-align: center;
      }
      .admin-credit-rate-form strong {
        color: #24292f;
        font-size: 14px;
        font-weight: 500;
      }
      .admin-credit-rate-form button {
        width: auto;
        min-width: 92px;
        height: 34px;
      }
      .admin-credit-rate-example {
        color: #6e7781;
        font-size: 12px;
      }
      .admin-staff-table { min-width: 1080px; table-layout: auto; }
      .admin-staff-table th, .admin-staff-table td { text-align: center; white-space: nowrap; }
      .admin-staff-table .admin-staff-select-cell { width: 44px; }
      .admin-staff-table .admin-staff-select-cell input { margin: 0; }
      .admin-staff-table .admin-staff-module-cell { min-width: 78px; }
      .admin-staff-table .admin-staff-project-create-heading,
      .admin-staff-table .admin-staff-project-create-cell { min-width: 76px; }
      .admin-staff-table .admin-staff-permission-detail-heading { min-width: 92px; }
      .admin-staff-table .admin-staff-permission-detail-cell { min-width: 92px; }
      .admin-staff-permission-detail {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
      }
      .admin-staff-permission-summary {
        display: inline-flex;
        min-width: 38px;
        justify-content: center;
        border-radius: 999px;
        padding: 3px 8px;
        background: #f6f8fa;
        color: #57606a;
        font-size: 12px;
        font-weight: 650;
      }
      .admin-staff-permission-summary.is-fixed {
        background: #eef2ff;
        color: #4f46e5;
      }
      .admin-staff-table tr[data-username] { cursor: pointer; }
      .admin-staff-table tr[data-username]:hover { background: #f6f8fa; }
      .admin-staff-table tr.is-disabled { opacity: 0.58; }
      .admin-staff-user { font-weight: 650; }
      .admin-staff-inline-select {
        width: 96px;
        min-width: 78px;
        height: 28px;
        border: 1px solid #d0d7de;
        border-radius: 6px;
        padding: 0 8px;
        background: #fff;
        color: #24292f;
        font: inherit;
        font-size: 12px;
        font-weight: 650;
      }
      .admin-staff-seedance-select {
        width: 104px;
      }
      .admin-staff-detail-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 58px;
        height: 26px;
        box-sizing: border-box;
        border: 1px solid #d0d7de;
        border-radius: 999px;
        padding: 0 12px;
        background: #f6f8fa;
        color: #0969da;
        font: inherit;
        font-size: 12px;
        font-weight: 650;
        line-height: 1;
        vertical-align: middle;
        cursor: pointer;
      }
      .admin-staff-detail-button:hover { background: #ddf4ff; }
      .admin-staff-badge {
        display: inline-flex;
        min-width: 58px;
        justify-content: center;
        border-radius: 999px;
        padding: 3px 9px;
        background: #ddf4ff;
        color: #0969da;
        font-size: 12px;
        font-weight: 650;
      }
      .admin-staff-badge.status-active { background: #dafbe1; color: #116329; }
      .admin-staff-badge.status-disabled { background: #ffebe9; color: #cf222e; }
      .admin-staff-seedance-button { min-width: 58px; }
      .admin-staff-seedance-button.is-haitaoyun { background: #ccfbf1; color: #0f766e; }
      .admin-staff-check-inline { display: inline-flex !important; grid-auto-flow: column; grid-auto-columns: max-content; align-items: center; gap: 8px !important; color: #24292f !important; }
      .admin-staff-check-inline input { width: auto; }
      .admin-staff-seedance-hint { grid-column: 1 / -1; min-height: 18px; color: #6e7781; font-size: 12px; }
      .admin-staff-empty { padding: 28px 12px; color: #6e7781; text-align: center; }
      .admin-staff-modal-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100;
        display: grid;
        place-items: center;
        padding: 24px;
        background: rgba(31, 35, 40, 0.32);
      }
      .admin-staff-modal-backdrop[hidden] { display: none; }
      .admin-staff-modal {
        display: grid;
        width: min(360px, calc(100vw - 48px));
        gap: 14px;
        border: 1px solid #d8dee4;
        border-radius: 8px;
        padding: 18px;
        background: #fff;
        box-shadow: 0 24px 60px rgba(27, 31, 36, 0.22);
      }
      .admin-staff-seedance-modal { width: min(620px, calc(100vw - 48px)); }
      .admin-staff-balance-modal { width: min(620px, calc(100vw - 48px)); }
      .admin-staff-permission-modal { width: min(520px, calc(100vw - 48px)); }
      .admin-staff-modal h2 { margin: 0; font-size: 17px; }
      .admin-staff-modal label { display: grid; gap: 6px; color: #57606a; font-size: 13px; }
      .admin-staff-modal input,
      .admin-staff-modal select { width: 100%; box-sizing: border-box; }
      .admin-staff-modal .admin-staff-check-inline {
        display: inline-flex !important;
        width: auto;
        justify-self: start;
        align-items: center;
        justify-content: flex-start;
        gap: 8px !important;
      }
      .admin-staff-modal .admin-staff-check-inline input {
        width: auto !important;
        flex: 0 0 auto;
        margin: 0;
      }
      .admin-staff-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
      .admin-staff-permission-subtitle {
        min-height: 18px;
        color: #57606a;
        font-size: 12px;
      }
      .admin-staff-permission-list {
        display: grid;
        max-height: min(58vh, 460px);
        gap: 8px;
        overflow: auto;
      }
      .admin-staff-permission-option {
        display: flex !important;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 12px !important;
        border: 1px solid #d8dee4;
        border-radius: 8px;
        padding: 10px 12px;
        background: #f6f8fa;
        color: #24292f !important;
        cursor: pointer;
      }
      .admin-staff-permission-option input {
        width: auto !important;
        flex: 0 0 auto;
        margin: 3px 0 0;
      }
      .admin-staff-permission-option-text {
        display: grid;
        flex: 1 1 auto;
        min-width: 0;
        gap: 3px;
      }
      .admin-staff-permission-option-text strong {
        min-width: 0;
        overflow: hidden;
        font-weight: 650;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-staff-permission-option-text small {
        color: var(--zc-muted, #57606a);
        font-size: 12px;
        line-height: 1.45;
        white-space: normal;
      }
      .admin-staff-balance-list {
        display: grid;
        max-height: min(60vh, 520px);
        gap: 8px;
        overflow: auto;
      }
      .admin-staff-balance-item {
        display: grid;
        gap: 6px;
        border: 1px solid #d8dee4;
        border-radius: 8px;
        padding: 10px 12px;
        background: #f6f8fa;
      }
      .admin-staff-balance-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .admin-staff-balance-title strong {
        min-width: 0;
        overflow: hidden;
        color: #24292f;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .admin-staff-balance-title span,
      .admin-staff-balance-meta {
        color: #57606a;
        font-size: 12px;
      }
      @media (max-width: 1500px) {
        .admin-staff-account-row,
        .admin-staff-module-row { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
        .admin-staff-action-block { grid-column: 1 / -1; }
      }
      @media (max-width: 1120px) {
        .admin-staff-account-row,
        .admin-staff-module-row { grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 120px; }
        .admin-staff-action-block { grid-column: 1 / -1; }
      }
      @media (max-width: 760px) {
        .admin-staff-account-row,
        .admin-staff-module-row { grid-template-columns: 1fr; }
      }

.video-shell-header { justify-content: flex-end; min-height: 0; margin-bottom: 8px; }
body:has(.service-view.is-active[data-service-view="video"]) {
  background: #fff;
}
main:has(.service-view.is-active[data-service-view="video"]) {
  padding-bottom: 0;
  background: #fff;
}
.service-content:has(.service-view.is-active[data-service-view="video"]),
.service-view.is-active[data-service-view="video"] {
  min-height: calc(100vh - 28px);
  background: #fff;
}
.video-shell-surface {
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 28px);
  background: #fff;
}
.video-shell-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 28px);
  min-height: calc(100vh - 28px);
  border: 0;
  border-radius: 0;
  background: #fff;
}

main:has(.service-view.is-active[data-service-view="prompt"]) {
  padding-bottom: 0;
}

.service-content:has(.service-view.is-active[data-service-view="prompt"]),
.service-view.is-active[data-service-view="prompt"] {
  min-height: calc(100vh - 28px);
}

main:has(.service-view.is-active[data-service-view="asset"]) {
  padding-bottom: 0;
}

.service-content:has(.service-view.is-active[data-service-view="asset"]),
.service-view.is-active[data-service-view="asset"] {
  min-height: calc(100vh - 28px);
}

main:has(.service-view.is-active[data-service-view="episode_assets"]) {
  padding-bottom: 0;
}

.service-content:has(.service-view.is-active[data-service-view="episode_assets"]),
.service-view.is-active[data-service-view="episode_assets"] {
  min-height: calc(100vh - 28px);
}

/* end superres module inline styles */

.credit-management,
.project-management {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.project-header { margin-bottom: 0; }
.project-create-form {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.4fr)
    minmax(112px, 0.9fr)
    minmax(112px, 0.9fr)
    minmax(128px, 1fr)
    minmax(128px, 1fr)
    minmax(102px, 0.8fr)
    minmax(112px, 0.85fr)
    minmax(150px, 1fr)
    minmax(150px, 1fr);
  justify-content: stretch;
  gap: 10px 12px;
  align-items: end;
}
.project-create-form label { display: grid; gap: 6px; min-width: 0; color: #57606a; font-size: 13px; }
.project-create-form > label:not(.project-description-field) > span { text-align: center; }
.project-create-form input,
.project-create-form select,
.project-create-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 9px;
  background: #fff;
  font: inherit;
}
.project-create-form textarea { resize: vertical; }
.project-create-form select {
  text-align: center;
  text-align-last: center;
}
.project-create-form .project-multiselect-button { text-align: center; }
.project-credit-field input { text-align: center; }
.project-participants-field,
.project-release-participants-field { align-self: stretch; }
.project-description-field {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 6px;
}
.project-description-field span { padding-top: 0; }
.project-description-field textarea { min-height: 70px; }
.project-create-form button[type=submit] {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 96px;
}
.project-multiselect {
  position: relative;
  min-width: 0;
}
.project-multiselect-button {
  width: 100%;
  min-height: 38px;
  display: block;
  overflow: hidden;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 8px 28px 8px 10px;
  background: #fff;
  color: #24292f;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-multiselect-button::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 10px;
  border-top: 5px solid #57606a;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  pointer-events: none;
}
.project-multiselect-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(31, 35, 40, 0.16);
}
.project-multiselect.is-open .project-multiselect-menu { display: grid; gap: 2px; }
.project-multiselect-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 30px;
  border-radius: 4px;
  padding: 4px 6px;
  color: #24292f !important;
  font-size: 13px !important;
}
.project-multiselect-option:hover { background: #f6f8fa; }
.project-multiselect-option input {
  width: auto !important;
  min-width: auto !important;
  margin: 0;
}
.project-multiselect-empty { padding: 8px; color: #6e7781; font-size: 13px; }
.project-summary { display: flex; gap: 8px; flex-wrap: wrap; color: #57606a; font-size: 13px; }
.project-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  padding: 5px 8px;
  background: #f6f8fa;
}
.project-admin-credit-panel {
  min-width: 0;
  display: grid;
  gap: 18px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 35, 40, 0.08);
}
.project-admin-credit-panel[hidden] { display: none !important; }
.project-credit-cards {
  display: grid;
  gap: 12px;
}
.project-credit-card-row {
  display: grid;
  gap: 14px;
}
.project-credit-card-row.is-balances {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}
.project-credit-card-row.is-platform-usage {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}
.project-credit-card-pair-row {
  display: grid;
  gap: 14px;
}
.project-credit-card-pair-row.is-platform-pairs {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.project-credit-card-pair {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.project-credit-card-row.is-metrics {
  grid-template-columns: repeat(6, minmax(112px, 1fr));
}
.project-credit-card {
  min-height: 86px;
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}
.project-credit-card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.project-credit-card-link:hover,
.project-credit-card-link:focus-visible {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
  outline: none;
}
.project-credit-card-link:active {
  transform: translateY(1px);
}
.project-credit-card strong {
  max-width: 100%;
  overflow: hidden;
  color: #2563eb;
  font-size: 28px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-credit-card span {
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-credit-card-subtext {
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-credit-card.tone-green {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.project-credit-card.tone-green strong { color: #16a34a; }
.project-credit-card.tone-amber {
  border-color: #fde68a;
  background: #fffbeb;
}
.project-credit-card.tone-amber strong { color: #d97706; }
.project-credit-card.tone-red {
  border-color: #fecaca;
  background: #fef2f2;
}
.project-credit-card.tone-red strong { color: #dc2626; }
.project-credit-trend,
.project-credit-logs {
  min-width: 0;
  display: grid;
  gap: 12px;
}
.project-credit-trend h2,
.project-credit-logs h2 {
  margin: 0;
  font-size: 18px;
}
.project-credit-log-title {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.project-credit-log-title select {
  min-width: 116px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 28px 4px 0;
  background-color: transparent;
  color: inherit;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
        cursor: pointer;
      }
.project-credit-log-title select:focus {
  border-color: #2563eb;
  outline: none;
}
.project-credit-trend-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.project-credit-trend-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: #57606a;
  font-size: 13px;
}
.project-credit-trend-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}
.project-credit-trend-controls input {
  width: auto;
  min-height: auto;
  margin: 0;
  accent-color: #2563eb;
}
.project-credit-log-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) 132px 132px 112px auto auto;
  gap: 10px;
  align-items: end;
}
.project-credit-log-controls label {
  display: block;
  min-width: 0;
  color: #57606a;
  font-size: 13px;
}
.project-credit-log-controls input,
.project-credit-log-controls select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 8px 9px;
  background: #fff;
  color: #24292f;
  font: inherit;
}
.project-credit-log-controls button {
  min-width: 72px;
  height: 36px;
}
.project-credit-log-pager {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-self: stretch;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.project-credit-log-pager button {
  min-width: 74px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 12px;
  line-height: 1;
  text-align: center;
}
.project-credit-log-pager span {
  min-width: 58px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.project-credit-chart {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 280px;
  display: block;
  border-top: 1px solid #eaeef2;
  padding-top: 12px;
  overflow: hidden !important;
  overflow-x: hidden !important;
}
.project-credit-line-chart {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 280px;
  display: block;
  overflow: visible;
}
.project-credit-chart-value,
.project-credit-chart-date {
  fill: #64748b;
  color: #64748b;
  font-size: 12px;
}
.project-credit-chart-value-consumed { fill: #2563eb; }
.project-credit-chart-value-videos { fill: #16a34a; }
.project-credit-chart-grid {
  stroke: #eaeef2;
  stroke-width: 1;
}
.project-credit-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-credit-line-point {
  stroke: #fff;
  stroke-width: 2;
}
.project-credit-log-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}
.project-credit-log-table th,
.project-credit-log-table td {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-credit-log-table th:nth-child(1),
.project-credit-log-table td:nth-child(1) { width: 140px; }
.project-credit-log-table th:nth-child(2),
.project-credit-log-table td:nth-child(2) { width: 180px; }
.project-credit-log-table th:nth-child(3),
.project-credit-log-table td:nth-child(3) { width: 160px; }
.project-credit-log-table th:nth-child(7),
.project-credit-log-table td:nth-child(7) { text-align: left; }
.project-credit-positive { color: #16a34a; font-weight: 700; }
.project-credit-negative { color: #dc2626; font-weight: 700; }
.project-table {
  width: 100%;
  min-width: 1618px;
  table-layout: fixed;
}
.project-table th,
.project-table td {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-table th:nth-child(1),
.project-table td:nth-child(1) { width: 150px; text-align: left; }
.project-table th:nth-child(2),
.project-table td:nth-child(2) { width: 92px; }
.project-table th:nth-child(3),
.project-table td:nth-child(3) { width: 112px; }
.project-table th:nth-child(4),
.project-table td:nth-child(4) { width: 72px; }
.project-table th:nth-child(5),
.project-table td:nth-child(5) { width: 72px; }
.project-table th:nth-child(6),
.project-table td:nth-child(6) { width: 104px; }
.project-table th:nth-child(7),
.project-table td:nth-child(7),
.project-table th:nth-child(8),
.project-table td:nth-child(8) { width: 118px; }
.project-table th:nth-child(9),
.project-table td:nth-child(9) { width: 112px; }
.project-table th:nth-child(10),
.project-table td:nth-child(10) { width: 72px; }
.project-table th:nth-child(11),
.project-table td:nth-child(11) { width: 70px; }
.project-table th:nth-child(12),
.project-table td:nth-child(12) { width: 84px; }
.project-table th:nth-child(13),
.project-table td:nth-child(13) { width: 108px; }
.project-table th:nth-child(14),
.project-table td:nth-child(14),
.project-table th:nth-child(15),
.project-table td:nth-child(15) { width: 96px; }
.project-table th:nth-child(16),
.project-table td:nth-child(16),
.project-table th:nth-child(17),
.project-table td:nth-child(17) { width: 72px; }
.project-table tr[data-project-id] { cursor: pointer; }
.project-table tr[data-project-id]:hover { background: #f6f8fa; }
.project-table tr.is-selected { background: #ddf4ff; }
.project-table td { vertical-align: middle; }
.project-name-cell { text-align: left; font-weight: 650; }
.project-table select,
.project-table option,
.project-table button,
.project-table .project-single-line,
.project-table .project-usage,
.project-table .project-actual-amount {
  text-align: center;
  text-align-last: center;
}
.project-table select,
.project-table button {
  display: block;
  margin: 0 auto;
}
.project-name-text,
.project-single-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-name-text { max-width: 142px; }
.project-lead-cell,
.project-release-lead-cell,
.project-members-cell,
.project-release-members-cell { text-align: center; }
.project-members { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-status-select { min-width: 104px; padding: 6px 8px; }
.project-lead-select { width: 100%; min-width: 112px; padding: 6px 8px; }
.project-release-lead-select {
  width: 104px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  padding: 6px 8px;
  font: inherit;
  text-align: center;
  text-align-last: center;
}
.project-setting-select,
.project-status-select {
  width: 112px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  padding: 6px 8px;
  font: inherit;
}
.project-row-members { min-width: 180px; }
.project-row-members .project-multiselect-button { min-height: 32px; padding-top: 6px; padding-bottom: 6px; }
.project-assignment-cell { text-align: center; }
.project-assignment-button {
  width: 104px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  color: #0969da;
  font: inherit;
  cursor: pointer;
}
.project-assignment-button:hover { background: #f6f8fa; border-color: #0969da; }
.project-assignment-button.is-empty { color: #6e7781; }
.project-note-cell,
.project-asset-cell,
.project-action-cell { text-align: center; }
.project-note-button,
.project-detail-button,
.project-asset-button,
.project-delete-button {
  width: 54px;
  min-width: 54px;
  height: 32px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 5px 10px;
  background: #fff;
  color: #0969da;
  font: inherit;
  cursor: pointer;
}
.project-note-button:hover,
.project-detail-button:hover,
.project-asset-button:hover { background: #f6f8fa; border-color: #0969da; }
.project-delete-button {
  border-color: #cf222e;
  color: #cf222e;
}
.project-delete-button:hover {
  background: #fff1f1;
  border-color: #cf222e;
}
.project-note-empty { color: #8c959f; }
.project-usage,
.project-actual-amount { font-weight: 650; color: #24292f; }
.project-stats-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.project-stats-title-row h2 { white-space: nowrap; }
#projectStatsProjectSelect {
  width: min(280px, 42vw);
  min-width: 180px;
  box-sizing: border-box;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  color: #24292f;
  font: inherit;
}
.project-stats-table { min-width: 860px; table-layout: fixed; }
.project-stats-table th,
.project-stats-table td { text-align: center; }
.project-stats-table th:first-child,
.project-stats-table td:first-child { text-align: left; }
.project-note-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(31, 35, 40, 0.32);
}
.project-note-modal-backdrop[hidden] { display: none; }
.project-note-modal {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 48px));
  max-height: min(680px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(27, 31, 36, 0.22);
}
.project-note-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #d8dee4;
}
.project-note-modal-head h2 {
  margin: 0;
  overflow: hidden;
  color: #24292f;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-note-modal-close {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 5px 10px;
  background: #fff;
  color: #24292f;
  font: inherit;
  cursor: pointer;
}
.project-note-modal-close:hover { background: #f6f8fa; }
.project-note-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 16px;
  color: #24292f;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.project-note-modal-body::-webkit-scrollbar {
  width: 10px;
}
.project-note-modal-body::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.18);
}
.project-note-modal-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #7f93b2;
  background-clip: padding-box;
}
.project-activity-body {
  white-space: normal;
}
.project-activity-list {
  display: grid;
  gap: 10px;
}
.project-activity-entry {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid #d8dee4;
  padding: 0 0 10px;
}
.project-activity-entry:last-child { border-bottom: 0; }
.project-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #57606a;
  font-size: 12px;
}
.project-activity-meta span {
  border: 1px solid #d0d7de;
  border-radius: 999px;
  padding: 1px 7px;
  background: #f6f8fa;
}
.project-activity-entry strong {
  color: #24292f;
  font-size: 14px;
}
.project-activity-entry p,
.project-activity-note p {
  margin: 0;
  color: #57606a;
  white-space: pre-wrap;
}
.project-activity-note {
  margin-top: 14px;
  border-top: 1px solid #d8dee4;
  padding-top: 12px;
}
.project-activity-note h3 {
  margin: 0 0 6px;
  color: #24292f;
  font-size: 14px;
}
.project-detail-modal { width: min(760px, calc(100vw - 48px)); }
.project-detail-modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 16px;
}
.project-detail-modal-body label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #57606a;
  font-size: 13px;
}
.project-detail-wide-field { grid-column: 1 / -1; }
.project-detail-modal-body input,
.project-detail-modal-body select,
.project-detail-modal-body textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: #24292f;
  font: inherit;
}
.project-detail-modal-body textarea {
  resize: vertical;
  line-height: 1.6;
}
.project-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid #d8dee4;
}
.project-detail-actions button {
  border: 1px solid #0969da;
  border-radius: 6px;
  padding: 7px 12px;
  background: #2f6feb;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.project-detail-actions button:disabled {
  border-color: #d0d7de;
  background: #f6f8fa;
  color: #8c959f;
  cursor: not-allowed;
}
.project-members-modal {
  width: min(840px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
}
.project-members-modal-body {
  display: grid;
  gap: 14px;
  flex: 1 1 auto;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: 18px;
}
.project-members-modal-body label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #57606a;
  font-size: 13px;
}
.project-members-modal-body .project-multiselect {
  display: grid;
  gap: 8px;
}
.project-members-modal-body .project-multiselect-button {
  min-height: 38px;
}
.project-members-modal-body .project-multiselect-menu {
  position: static;
  display: grid;
  gap: 4px;
  min-height: 220px;
  max-height: min(420px, calc(100vh - 320px));
  box-shadow: none;
}
.project-members-modal-body .project-multiselect-option {
  min-height: 36px;
  padding: 7px 10px;
}
.project-members-modal .project-detail-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
.project-assignment-modal { width: min(680px, calc(100vw - 48px)); }
.project-assignment-modal-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding: 16px;
}
.project-assignment-hint,
.project-assignment-empty {
  color: #57606a;
  font-size: 13px;
  line-height: 1.6;
}
.project-assignment-list { display: grid; gap: 8px; }
.project-assignment-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.28fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #24292f;
  font-size: 14px;
}
.project-assignment-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-assignment-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  font: inherit;
}
.project-assignment-row input:disabled { background: #f6f8fa; color: #6e7781; }
.project-assignment-actions {
  display: flex;
  justify-content: flex-end;
}
.project-assignment-actions button {
  border: 1px solid #0969da;
  border-radius: 6px;
  padding: 7px 12px;
  background: #2f6feb;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.project-assignment-actions button:disabled {
  border-color: #d0d7de;
  background: #f6f8fa;
  color: #8c959f;
  cursor: not-allowed;
}
.ok-text { color: #116329; }
.warn-text { color: #9a6700; }
@media (max-width: 1420px) {
  .project-create-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .project-credit-card-row.is-metrics { grid-template-columns: repeat(4, minmax(112px, 1fr)); }
  .project-credit-log-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .project-description-field { grid-column: 1 / -1; }
  .project-create-form button[type=submit] { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 1180px) {
  .project-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-credit-card-row.is-metrics { grid-template-columns: repeat(2, minmax(112px, 1fr)); }
  .project-credit-log-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-credit-chart { overflow: hidden; }
  .project-description-field { grid-column: 1 / -1; }
  .project-create-form button[type=submit] { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 760px) {
  .project-create-form { grid-template-columns: 1fr; }
  .project-credit-card-row.is-balances,
  .project-credit-card-row.is-platform-usage,
  .project-credit-card-row.is-metrics { grid-template-columns: 1fr; }
  .project-credit-card-pair-row.is-platform-pairs,
  .project-credit-card-pair { grid-template-columns: 1fr; }
  .project-credit-log-controls { grid-template-columns: 1fr; }
  .project-description-field { grid-template-columns: 1fr; }
  .project-description-field span { padding-top: 0; }
}

/* Zaichen dark UI package application: platform, subtitle, superres, voice, project, employee */
:root {
  color-scheme: dark;
  --zc-bg: #0B1020;
  --zc-bg-deep: #070B13;
  --zc-rail: #080D18;
  --zc-panel: #111827;
  --zc-panel-2: #151F32;
  --zc-elevated: #182337;
  --zc-field: #0D1526;
  --zc-border: #26344D;
  --zc-border-strong: #334763;
  --zc-primary: #3B82F6;
  --zc-primary-2: #2563EB;
  --zc-text: #EAF2FF;
  --zc-muted: #94A3B8;
  --zc-soft: #64748B;
  --zc-success: #22C55E;
  --zc-danger: #EF4444;
  --zc-warning: #F59E0B;
}

html,
body {
  background: var(--zc-bg) !important;
  color: var(--zc-text) !important;
}

main,
.service-shell,
.service-content,
.service-view.is-active,
#promptServiceView,
.credit-management,
.project-management,
.admin-staff-page {
  background: transparent !important;
  color: var(--zc-text);
}

header,
.module-header,
.subtitle-header,
.voice-header,
.credit-management-header,
.project-header,
.admin-staff-header {
  color: var(--zc-text);
}

h1,
h2,
h3,
.module-title,
.module-header h1,
.subtitle-preview-title h2,
.voice-create-title,
.project-stats-title-row h2,
.admin-staff-modal h2,
.service-title {
  color: var(--zc-text) !important;
}

.muted,
th,
.task-stat-label,
.module-header-actions .muted,
.subtitle-meta,
.subtitle-field-heading,
.subtitle-view-label,
.subtitle-history-meta,
.subtitle-permission-state,
.module-pagination,
.task-pagination-controls,
.voice-field-hint,
.voice-source-head small,
.voice-empty,
.admin-staff-state,
.admin-staff-seedance-hint,
.admin-staff-permission-subtitle,
.admin-credential-meta,
.project-summary,
.project-assignment-hint,
.project-assignment-empty,
.project-note-empty,
.project-multiselect-empty,
.upload-file-summary,
.upload-progress-detail,
.project-members-modal-body label,
.project-detail-modal-body label,
.project-assignment-row span,
.admin-staff-balance-title span,
.admin-staff-balance-meta {
  color: var(--zc-muted) !important;
}

section,
.permission-modal,
.subtitle-panel,
.subtitle-preview-panel,
.subtitle-history-panel,
.voice-panel,
.voice-source-group,
.voice-advanced,
.voice-status-box,
.voice-debug-panel,
.admin-staff-panel,
.admin-credential-item,
.admin-staff-modal,
.project-create-form,
.project-summary-item,
.project-multiselect-menu,
.project-note-modal,
.project-detail-modal-body,
.project-members-modal-body,
.project-assignment-modal-body,
.prompt-web-panel,
.asset-web-panel,
.asset-episode-web-panel {
  border-color: var(--zc-border) !important;
  background: var(--zc-panel) !important;
  color: var(--zc-text) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.project-note-modal-body,
.project-activity-body {
  color: #D7E3F4 !important;
}

.project-activity-entry {
  border-bottom-color: rgba(148, 163, 184, 0.55) !important;
}

.project-activity-meta {
  color: #CBD5E1 !important;
}

.project-activity-meta span {
  border-color: rgba(203, 213, 225, 0.64) !important;
  background: #EAF2FF !important;
  color: #233146 !important;
}

.project-activity-entry strong,
.project-activity-note h3 {
  color: #F8FAFC !important;
}

.project-activity-entry p,
.project-activity-note p {
  color: #D7E3F4 !important;
}

.project-activity-note {
  border-top-color: rgba(148, 163, 184, 0.55) !important;
}

.subtitle-stage,
.subtitle-video-controls,
.subtitle-advanced,
.subtitle-history-item,
.voice-status-box,
.voice-debug-output,
.voice-table-wrap,
.upload-progress-wrap,
.upload-file-item,
.permission-row,
.project-multiselect-button,
.project-multiselect-option,
.project-note-modal-head,
.project-detail-modal-body input,
.project-detail-modal-body select,
.project-detail-modal-body textarea,
.project-assignment-row input,
.project-members-modal-body .project-multiselect-menu,
.admin-credit-rate-form input,
.admin-staff-modal input,
.admin-staff-modal select,
.admin-staff-inline-select,
.admin-staff-detail-button,
.admin-staff-balance-item,
.admin-staff-permission-option,
.admin-staff-permission-summary {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

input,
select,
textarea,
input[type=url],
input[type=number],
input[type=date],
input[type=search],
input[type=file],
input[type=text],
input[type=password],
.permission-form-grid input,
.permission-form-grid select,
.project-create-form input,
.project-create-form select,
.project-create-form textarea,
.admin-staff-form input,
.admin-staff-form select,
.voice-panel input,
.voice-panel select,
.voice-panel textarea,
.subtitle-panel input,
.subtitle-panel select {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--zc-soft) !important;
}

select option,
.voice-panel select option:disabled {
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

button,
.button,
.detail-toggle,
.subtitle-panel button,
.subtitle-panel .button,
.voice-panel button,
.voice-panel .button,
.project-assignment-button,
.project-note-button,
.project-detail-button,
.project-asset-button,
.project-delete-button,
.project-note-modal-close,
.service-switch-link {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
  box-shadow: none !important;
}

button:hover,
.button:hover,
.service-switch-link:hover,
.project-assignment-button:hover,
.project-note-button:hover,
.project-detail-button:hover,
.project-asset-button:hover,
.project-delete-button:hover,
.project-note-modal-close:hover {
  border-color: var(--zc-primary) !important;
  background: #10203C !important;
  color: var(--zc-text) !important;
}

button:not(.secondary):not(.danger):not(:disabled),
.button:not(.secondary):not(.danger):not(:disabled),
.prompt-submit-grid button:not(.secondary):not(.danger):not(:disabled),
.project-create-form button[type=submit]:not(:disabled),
.project-detail-actions button:not(:disabled) {
  border-color: var(--zc-primary) !important;
  background: var(--zc-primary) !important;
  color: #fff !important;
}

.project-credit-card {
  border-color: rgba(59, 130, 246, 0.48) !important;
  background: rgba(59, 130, 246, 0.12) !important;
}
.project-credit-card strong { color: #60A5FA !important; }
.project-credit-card span,
.project-credit-card-subtext,
.project-credit-chart-value,
.project-credit-chart-date,
.project-credit-trend-controls {
  color: var(--zc-muted) !important;
  fill: var(--zc-muted) !important;
}
.project-credit-chart-value-consumed { fill: #93C5FD !important; }
.project-credit-chart-value-videos { fill: #86EFAC !important; }
.project-credit-card.tone-green {
  border-color: rgba(34, 197, 94, 0.42) !important;
  background: rgba(34, 197, 94, 0.11) !important;
}
.project-credit-card.tone-green strong { color: #22C55E !important; }
.project-credit-card.tone-amber {
  border-color: rgba(245, 158, 11, 0.44) !important;
  background: rgba(245, 158, 11, 0.12) !important;
}
.project-credit-card.tone-amber strong { color: #F59E0B !important; }
.project-credit-card.tone-red {
  border-color: rgba(239, 68, 68, 0.42) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
.project-credit-card.tone-red strong { color: #F87171 !important; }
.project-credit-chart { border-top-color: var(--zc-border) !important; }
.project-credit-chart-grid { stroke: var(--zc-border) !important; }
.project-credit-line-point { stroke: var(--zc-panel) !important; }
.project-credit-positive { color: var(--zc-success) !important; }
.project-credit-negative { color: var(--zc-danger) !important; }

button.secondary,
.button.secondary,
.subtitle-toolbar button,
.subtitle-video-controls button,
.project-note-button,
.project-detail-button,
.project-asset-button,
.project-delete-button {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

.project-delete-button {
  border-color: var(--zc-danger) !important;
  color: #FCA5A5 !important;
}
.project-delete-button:hover {
  border-color: var(--zc-danger) !important;
  background: rgba(239, 68, 68, 0.14) !important;
  color: #FCA5A5 !important;
}

button.danger,
.button.danger,
.admin-staff-actions button.danger {
  border-color: var(--zc-danger) !important;
  background: rgba(239, 68, 68, 0.14) !important;
  color: #FCA5A5 !important;
}

button:disabled,
.button:disabled,
.project-detail-actions button:disabled,
.voice-panel button:disabled,
.subtitle-panel button:disabled {
  border-color: var(--zc-border) !important;
  background: rgba(13, 21, 38, 0.72) !important;
  color: var(--zc-soft) !important;
  opacity: 1 !important;
}

table,
.task-table,
.jobs-table,
.worker-table,
.voice-task-table,
.admin-staff-table,
.project-table,
.project-stats-table,
.project-credit-log-table {
  color: var(--zc-text);
}

th,
td {
  border-bottom-color: var(--zc-border) !important;
}

th,
.task-table th,
.jobs-table th,
.worker-table th,
.voice-task-table th,
.admin-staff-table th,
.project-table th,
.project-stats-table th,
.project-credit-log-table th {
  background: var(--zc-field) !important;
  color: var(--zc-muted) !important;
}

td,
.task-table td,
.jobs-table td,
.worker-table td,
.voice-task-table td,
.admin-staff-table td,
.project-table td,
.project-stats-table td,
.project-credit-log-table td {
  background: transparent !important;
  color: var(--zc-text) !important;
}
td.project-credit-positive { color: var(--zc-success) !important; }
td.project-credit-negative { color: var(--zc-danger) !important; }

.task-table th.actions-head,
.task-table td.actions-cell {
  background: var(--zc-panel) !important;
  border-left-color: var(--zc-border) !important;
  box-shadow: -12px 0 0 var(--zc-panel), -13px 0 0 var(--zc-border), -18px 0 16px rgba(0, 0, 0, 0.28) !important;
}

.table-wrap,
.table-shell,
.table-scroll-top,
.online-worker-table-shell,
.voice-table-wrap {
  scrollbar-color: var(--zc-border-strong) var(--zc-field);
}

.service-rail {
  border-color: var(--zc-border) !important;
  background: var(--zc-rail) !important;
  box-shadow: 12px 0 28px rgba(0, 0, 0, 0.28) !important;
}

.service-rail:hover,
.service-rail:focus-within,
.service-rail.is-open {
  box-shadow: 16px 0 36px rgba(0, 0, 0, 0.34) !important;
}

.service-rail-head {
  border-bottom-color: var(--zc-border) !important;
  color: var(--zc-muted) !important;
}

.account-password-modal-backdrop {
  background: rgba(2, 6, 23, 0.62) !important;
}

.account-password-modal {
  border-color: var(--zc-border) !important;
  background: var(--zc-panel) !important;
  color: var(--zc-text) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36) !important;
}

.account-password-modal label,
.account-password-state {
  color: var(--zc-muted) !important;
}

.account-password-modal input {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

.account-password-state.is-error {
  color: #FCA5A5 !important;
}

.account-password-state.is-success {
  color: var(--zc-success) !important;
}

.service-tab {
  color: var(--zc-muted) !important;
}

.service-tab:hover {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-panel) !important;
}

.service-tab-icon {
  background: var(--zc-panel-2) !important;
  color: var(--zc-text) !important;
}

.service-tab.is-active,
.service-tab.is-active:hover,
.service-tab.is-active:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--zc-primary) !important;
  box-shadow: none !important;
}

.service-tab.is-active .service-tab-icon {
  background: var(--zc-primary) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.task-stat,
.detail-toggle,
.status,
.permission-badge,
.admin-staff-badge,
.project-summary-item,
.voice-job-status,
.subtitle-status,
.prompt-status {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

.completed,
.online,
.admin-staff-badge.status-active,
.subtitle-status.success,
.voice-job-status.completed,
.prompt-status.completed {
  background: rgba(34, 197, 94, 0.16) !important;
  color: var(--zc-success) !important;
}

.admin-staff-seedance-button.is-haitaoyun {
  background: rgba(20, 184, 166, 0.22) !important;
  color: #5eead4 !important;
}

.queued,
.busy,
.voice-job-status.running,
.subtitle-status.processing,
.subtitle-status.waiting,
.prompt-status.running,
.prompt-status.queued,
.processing,
.downloading,
.assigned,
.uploading_result {
  background: rgba(59, 130, 246, 0.16) !important;
  color: #93C5FD !important;
}

.failed,
.congested,
.admin-staff-badge.status-disabled,
.subtitle-status.failed,
.voice-job-status.failed,
.prompt-status.failed {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #FCA5A5 !important;
}

.offline,
.canceled,
.subtitle-status.expired {
  background: rgba(100, 116, 139, 0.18) !important;
  color: var(--zc-muted) !important;
}

.error,
.bad-text,
.login-error,
.upload-error {
  color: #FCA5A5 !important;
}

.login-success {
  color: var(--zc-success) !important;
}

.ok-text {
  color: var(--zc-success) !important;
}

.warn-text,
.voice-field-hint.warn-text {
  color: var(--zc-warning) !important;
}

.login-error,
.superres-copy-toast.is-error {
  border-color: var(--zc-danger) !important;
  background: rgba(239, 68, 68, 0.16) !important;
}

.login-success {
  border-color: rgba(34, 197, 94, 0.42) !important;
  background: rgba(34, 197, 94, 0.14) !important;
}

.login-feishu-panel {
  border-top-color: var(--zc-border) !important;
}

.login-feishu-title {
  color: var(--zc-text) !important;
}

.login-feishu-qr {
  border-color: var(--zc-border) !important;
  background: #fff !important;
  color: var(--zc-muted) !important;
}

.login-feishu-state {
  color: var(--zc-muted) !important;
}

.login-feishu-state.is-success {
  color: var(--zc-success) !important;
}

.login-feishu-state.is-error {
  color: #FCA5A5 !important;
}

.superres-copy-toast,
.voice-toast {
  border-color: var(--zc-success) !important;
  background: var(--zc-panel) !important;
  color: var(--zc-text) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36) !important;
}

.subtitle-divider {
  color: var(--zc-muted) !important;
}

.subtitle-divider::before,
.subtitle-divider::after,
.permission-modal-head,
.project-note-modal-head {
  background: var(--zc-border) !important;
  border-color: var(--zc-border) !important;
}

.subtitle-help,
.voice-help {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-muted) !important;
}

.subtitle-help:hover,
.voice-help:hover {
  border-color: var(--zc-primary) !important;
  background: #10203C !important;
  color: var(--zc-text) !important;
}

.subtitle-stage,
.subtitle-stage video,
.subtitle-result-video {
  background: var(--zc-bg-deep) !important;
}

.subtitle-video-controls input[type="range"] {
  accent-color: var(--zc-primary);
}

.subtitle-empty-hint {
  color: var(--zc-text) !important;
}

.subtitle-selection-box {
  border-color: var(--zc-primary) !important;
  background: rgba(59, 130, 246, 0.18) !important;
}

.voice-debug-output,
.message-cell pre {
  background: var(--zc-bg-deep) !important;
  color: var(--zc-text) !important;
}

.voice-copy-error,
.subtitle-history-link,
a {
  color: #60A5FA !important;
}

.login-feishu-link,
.login-feishu-link:hover {
  color: #fff !important;
}

.admin-staff-table tr[data-username]:hover,
.project-table tr[data-project-id]:hover,
.project-multiselect-option:hover {
  background: rgba(59, 130, 246, 0.10) !important;
}

.admin-staff-table tr.is-disabled {
  opacity: 0.64;
}

.project-table tr.is-selected {
  background: rgba(59, 130, 246, 0.18) !important;
}

.project-usage,
.project-name-cell,
.admin-staff-user,
.admin-credential-title span,
.subtitle-history-name,
.upload-file-name,
.permission-user,
.message-clip,
.task-stat strong,
.admin-staff-balance-title strong {
  color: var(--zc-text) !important;
}

.project-multiselect-button::after {
  border-color: var(--zc-muted) !important;
}

.permission-modal-backdrop,
.admin-staff-modal-backdrop,
.project-note-modal-backdrop {
  background: rgba(2, 6, 23, 0.70) !important;
}

.prompt-web-frame,
.asset-web-frame {
  background: var(--zc-bg) !important;
}

.file-drop,
.subtitle-panel .file-drop {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-muted) !important;
}

.file-drop:hover,
.subtitle-panel .file-drop:hover {
  border-color: var(--zc-primary) !important;
  color: var(--zc-text) !important;
}

.video-shell-header,
body:has(.service-view.is-active[data-service-view="video"]),
main:has(.service-view.is-active[data-service-view="video"]),
.service-content:has(.service-view.is-active[data-service-view="video"]),
.service-view.is-active[data-service-view="video"],
body:has(.service-view.is-active[data-service-view="episode_assets"]),
main:has(.service-view.is-active[data-service-view="episode_assets"]),
.service-content:has(.service-view.is-active[data-service-view="episode_assets"]),
.service-view.is-active[data-service-view="episode_assets"],
.video-shell-surface,
.video-shell-frame {
  background: var(--zc-bg) !important;
}

button.service-tab,
button.service-tab:hover,
button.service-tab:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--zc-muted) !important;
  box-shadow: none !important;
}

button.service-tab .service-tab-icon {
  border: 1px solid var(--zc-border) !important;
  background: var(--zc-panel-2) !important;
  color: var(--zc-text) !important;
}

button.service-tab.is-active,
button.service-tab.is-active:hover,
button.service-tab.is-active:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--zc-primary) !important;
}

button.service-tab.is-active .service-tab-icon {
  border-color: var(--zc-primary) !important;
  background: var(--zc-primary) !important;
  color: #fff !important;
}

.service-rail button.service-tab.service-tab,
.service-rail button.service-tab.service-tab:not(.secondary):not(.danger):not(:disabled),
.service-rail button.service-tab.service-tab:hover,
.service-rail button.service-tab.service-tab:focus-visible,
.service-rail button.service-tab.service-tab.is-active,
.service-rail button.service-tab.service-tab.is-active:hover,
.service-rail button.service-tab.service-tab.is-active:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--zc-muted) !important;
  box-shadow: none !important;
}

.service-rail button.service-tab.service-tab.is-active {
  color: var(--zc-primary) !important;
}

/* Dark UI legibility fixes */
.subtitle-view-options,
.subtitle-switch,
.subtitle-switch input {
  color: #CBD5E1 !important;
}

.subtitle-switch input {
  accent-color: var(--zc-primary);
}

.subtitle-switch:has(input:checked) {
  color: var(--zc-text) !important;
}

.admin-staff-form label,
.admin-staff-form label > span,
.project-credit-log-controls label,
.project-credit-log-controls label > span,
.admin-credit-rate-form label,
.admin-credit-rate-form label > span,
.admin-credit-rate-form strong,
.admin-credit-rate-example,
.admin-staff-check-inline,
.admin-staff-check-inline span,
.admin-staff-panel .panel-title small {
  color: #CBD5E1 !important;
}

.admin-staff-state,
.admin-staff-seedance-hint,
#adminCreditRateState,
#adminCreditRateExample,
#adminMigrationState {
  color: var(--zc-muted) !important;
}

.admin-staff-check-inline input {
  accent-color: var(--zc-primary);
}

.admin-staff-actions button,
.admin-staff-actions button.secondary,
.admin-staff-actions button.danger {
  min-width: 86px;
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

.admin-staff-actions button:not(.secondary):not(.danger):not(:disabled) {
  border-color: var(--zc-primary) !important;
  background: var(--zc-primary) !important;
  color: #fff !important;
}

.admin-staff-actions button.danger:hover:not(:disabled) {
  border-color: var(--zc-danger) !important;
  background: rgba(239, 68, 68, 0.14) !important;
  color: #FCA5A5 !important;
}

.admin-panel-toggle,
.admin-panel-toggle:hover {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

/* Full dark-theme contrast pass */
:root {
  --zc-primary: #2563EB;
  --zc-primary-2: #1D4ED8;
  --zc-soft: #94A3B8;
  --zc-readable-muted: #CBD5E1;
}

.panel-title > span,
.subtitle-panel .panel-title > span,
.subtitle-preview-panel .panel-title > span,
.subtitle-history-panel .panel-title > span,
.voice-panel .panel-title > span,
.voice-source-head > span,
.project-create-form .panel-title > span,
.admin-staff-panel .panel-title > span {
  color: var(--zc-text) !important;
}

.subtitle-upload-state,
#subtitleUploadState,
#subtitleBoxState,
#subtitleHistoryCount,
.subtitle-video-time,
#subtitlePreviewTime,
#subtitleResultTime,
#voiceSubmitState,
#voiceJobCount,
.voice-panel .panel-title small,
.voice-debug-panel .panel-title small,
.voice-panel label,
.voice-panel label > span,
.voice-advanced summary,
.voice-source-group label,
.voice-source-group label > span,
.voice-source-head small,
.project-create-form label,
.project-create-form label > span,
.project-create-form small,
.admin-staff-empty,
.admin-credential-meta,
.admin-credential-detail,
.admin-credential-network {
  color: var(--zc-readable-muted) !important;
}

.project-multiselect-button,
.project-multiselect-button:not(.secondary):not(.danger):not(:disabled),
.project-multiselect-button:hover {
  border-color: var(--zc-border-strong) !important;
  background: var(--zc-field) !important;
  color: var(--zc-text) !important;
}

.admin-credential-item.is-ok .admin-credential-title strong {
  color: #4ADE80 !important;
}

.admin-credential-item.is-missing .admin-credential-title strong {
  color: #FCA5A5 !important;
}

.admin-credential-network {
  border-top-color: var(--zc-border-strong) !important;
}

.admin-credential-network-message {
  color: var(--zc-text) !important;
}

.admin-credential-network-node.is-ok {
  color: #4ADE80 !important;
}

.admin-credential-network-node.is-bad {
  color: #FCA5A5 !important;
}

button:disabled,
.button:disabled,
.project-detail-actions button:disabled,
.voice-panel button:disabled,
.subtitle-panel button:disabled {
  color: var(--zc-muted) !important;
}

/* Remove module hero titles to keep operational screens compact. */
.module-header {
  justify-content: flex-end !important;
  min-height: 0 !important;
  margin: 0 0 8px !important;
}

.module-header > .module-title,
.module-header > h1 {
  display: none !important;
}

.module-header:has(> .module-title:only-child),
.module-header:has(> h1:only-child),
.prompt-web-header,
.admin-staff-header:has(> .module-title:only-child) {
  display: none !important;
  margin: 0 !important;
}

.module-header-actions {
  margin-left: 0 !important;
}

/* Compact collapsible panels for operational controls. */
.superres-collapsible-heading {
  align-items: center !important;
  margin-bottom: 0 !important;
}

.superres-collapsible-heading h2 {
  margin: 0 !important;
}

.superres-collapsible-panel:not(.is-collapsed) > .superres-collapsible-heading {
  margin-bottom: 12px !important;
}

.superres-collapsible-body[hidden] {
  display: none !important;
}

.superres-collapse-toggle {
  min-width: 64px !important;
  padding: 7px 12px !important;
  font-size: 13px !important;
}

.superres-filter-section.is-collapsed {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  margin-bottom: 12px !important;
}

.online-worker-panel {
  margin-top: 16px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--zc-border, #d8dee4) !important;
}

.online-worker-panel.is-collapsed {
  margin-top: 10px !important;
  padding-top: 10px !important;
}

.online-worker-heading h2 {
  font-size: 16px !important;
}
