/*
 * FIU TestKit production bundle.
 * Source files remain in web/src/ and are concatenated in deployment order by scripts/build-web-assets.mjs.
 */
/* styles.css */
/* 通用基础样式：业务逻辑共用，端侧布局规则放在 styles.desktop.css / styles.mobile.css。 */


      html              { background: #0a0a0f; }
      html.light-theme  { background: #f0f4f8; }

      :root {
        --bg: #0a0a0f;
        --panel: rgba(15, 23, 42, 0.72);
        --panel-strong: rgba(15, 23, 42, 0.92);
        --field: #0f172a;
        --field-soft: rgba(15, 23, 42, 0.52);
        --line: rgba(148, 163, 184, 0.15);
        --line-strong: #334155;
        --text: #e2e8f0;
        --muted: #94a3b8;
        --soft: #64748b;
        --primary: #3b82f6;
        --primary-hover: #2563eb;
        --primary-surface: rgba(59, 130, 246, 0.18);
        --syntax-view: #cbd5e1;
        --syntax-key: #93c5fd;
        --syntax-string: #86efac;
        --syntax-number: #fca5a5;
        --syntax-boolean: #f0abfc;
        --syntax-null: #c4b5fd;
        --success: #22c55e;
        --success-strong: #22c55e;
        --success-surface: rgba(34, 197, 94, 0.22);
        --success-action: #22c55e;
        --danger: #ef4444;
        --danger-strong: #ef4444;
        --danger-soft: #fca5a5;          /* Z30：柔和淡红，对深底友好（Z4 #fca5a5） */
        --danger-soft-strong: #fecaca;   /* Z30：柔和淡红 hover 更亮 */
        --danger-surface: rgba(239, 68, 68, 0.22);
        --warning: #f59e0b;
        --warning-strong: #f59e0b;
        --warning-soft: #fcd34d;         /* Z30：柔和琥珀（Z4 #fcd34d） */
        --warning-surface: rgba(245, 158, 11, 0.18);
        --cyan: #06b6d4;
        --cyan-strong: #06b6d4;
        --cyan-surface: rgba(6, 182, 212, 0.18);
        --purple: #a855f7;
        --purple-surface: rgba(168, 85, 247, 0.18);
        --on-primary: #ffffff;
        --btn-secondary-bg: #475569;
        --btn-secondary-hover: #64748b;
        --btn-secondary-text: #ffffff;
        --tab-bg: rgba(30, 41, 59, 0.8);
        --tab-active-bg: rgba(59, 130, 246, 0.18);
        --tab-active-text: #dbeafe;
        /* tab/标题栏头部底色：工作台 .viewer-head/.tabs 与 WSS .inspector-header 共用 */
        --tab-bar-bg: rgba(2, 6, 23, 0.45);
        --shadow: 0 18px 48px rgba(2, 6, 23, 0.45);
        /* 中性叠加色：slate 半透明，深色底变亮、浅色底变灰，两种主题同值即可
           （hover 态、徽标灰底等通用） */
        --hover-soft: rgba(148, 163, 184, 0.10);
        /* 任务图标（移动端任务网格）：容器底色 / 主色 / 角标底 */
        --task-api-bg: rgba(37, 99, 235, 0.16);
        --task-api-fg: #60a5fa;
        --task-wss-bg: rgba(20, 184, 166, 0.14);
        --task-wss-fg: #2dd4bf;
        --task-group-bg: rgba(124, 58, 237, 0.18);
        --task-group-fg: #a78bfa;
        --task-badge-bg: #132033;
      }

      /* ── 日间（亮色）主题 ── 由主题切换(auto/light/dark)激活，全平台通用 ── */
      html.light-theme {
        --bg: #f0f4f8;
        --mobile-page-bg: #fcfdfe;
        --panel: rgba(255, 255, 255, 0.82);
        --panel-strong: rgba(255, 255, 255, 0.97);
        --field: #f8fafc;
        --field-soft: rgba(248, 250, 252, 0.92);
        --line: rgba(100, 116, 139, 0.15);
        --line-strong: #cbd5e1;
        --text: #1e293b;
        --muted: #475569;
        --soft: #94a3b8;
        --primary: #2563eb;
        --primary-hover: #1d4ed8;
        --primary-surface: rgba(219, 234, 254, 0.72);
        --syntax-view: #334155;
        --syntax-key: #1d4ed8;
        --syntax-string: #15803d;
        --syntax-number: #b91c1c;
        --syntax-boolean: #7c3aed;
        --syntax-null: #6d28d9;
        --success: #16a34a;
        --success-strong: #15803d;
        --success-surface: rgba(22, 163, 74, 0.13);
        --success-action: #22c55e;
        --danger: #dc2626;
        --danger-strong: #b91c1c;
        --danger-soft: #b91c1c;          /* Z30 light：浅底改深红，对比度足 */
        --danger-soft-strong: #991b1b;   /* Z30 light：深红 hover 更暗 */
        --danger-surface: rgba(239, 68, 68, 0.11);
        --warning: #d97706;
        --warning-strong: #d97706;
        --warning-soft: #b45309;         /* Z30 light：浅底改深棕，对比度足 */
        --warning-surface: rgba(217, 119, 6, 0.12);
        --cyan: #0284c7;
        --cyan-strong: #0284c7;
        --cyan-surface: rgba(2, 132, 199, 0.12);
        --purple: #7c3aed;
        --purple-surface: rgba(124, 58, 237, 0.12);
        --on-primary: #ffffff;
        --btn-secondary-bg: #e2e8f0;
        --btn-secondary-hover: #cbd5e1;
        --btn-secondary-text: #334155;
        --tab-bg: rgba(203, 213, 225, 0.5);
        --tab-active-bg: rgba(37, 99, 235, 0.14);
        --tab-active-text: #1d4ed8;
        --tab-bar-bg: rgba(241, 245, 249, 0.85);
        --shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
        /* 任务图标（移动端任务网格）：容器底色 / 主色 / 角标底 */
        --task-api-bg: #eff6ff;
        --task-api-fg: #2563eb;
        --task-wss-bg: #ecfdf5;
        --task-wss-fg: #0d9488;
        --task-group-bg: #f5f3ff;
        --task-group-fg: #7c3aed;
        --task-badge-bg: #ffffff;
      }

      html.light-theme body {
        background:
          radial-gradient(circle at top left, rgba(59, 130, 246, 0.07), transparent 24%),
          radial-gradient(circle at top right, rgba(6, 182, 212, 0.05), transparent 22%),
          linear-gradient(180deg, #e8edf2, var(--bg));
      }

      html.theme-transitioning::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 179;
        pointer-events: none;
        background:
          radial-gradient(circle at calc(100% - 44px) calc(100% - 44px), rgba(147, 197, 253, 0.22), transparent 34%),
          rgba(15, 23, 42, 0.08);
        opacity: 0;
        animation: themeSoftSwitch 260ms cubic-bezier(0.22, 1, 0.36, 1);
      }

      html.light-theme.theme-transitioning::before {
        background:
          radial-gradient(circle at calc(100% - 44px) calc(100% - 44px), rgba(245, 158, 11, 0.22), transparent 34%),
          rgba(255, 255, 255, 0.16);
      }

      @keyframes themeSoftSwitch {
        0% {
          opacity: 0;
        }
        35% {
          opacity: 1;
        }
        100% {
          opacity: 0;
        }
      }

      html.light-theme input,
      html.light-theme select,
      html.light-theme textarea {
        background: #f8fafc;
        color: var(--text);
      }

      html.light-theme select {
        color: #1e293b;
        background-color: #f8fafc;
        color-scheme: light;
        -webkit-text-fill-color: #1e293b;
      }

      html.light-theme option,
      html.light-theme optgroup {
        color: #1e293b;
        background-color: #f8fafc;
      }

      html.light-theme .login-card {
        background: rgba(255, 255, 255, 0.95);
      }

      html.light-theme .login-title {
        color: #0f172a;
      }

      html.light-theme .login-env-btn {
        background: rgba(241, 245, 249, 0.9);
        border-color: rgba(100, 116, 139, 0.25);
      }

      html.light-theme .login-env-btn.active {
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.65);
        background: rgba(37, 99, 235, 0.12);
      }

      html.light-theme .login-send-code-btn {
        color: #1d4ed8;
        background: rgba(37, 99, 235, 0.08);
        border-color: rgba(37, 99, 235, 0.24);
      }

      html.light-theme .login-send-code-btn:hover {
        background: rgba(37, 99, 235, 0.14);
        border-color: rgba(37, 99, 235, 0.38);
      }

      html.light-theme .password-visibility-btn:hover,
      html.light-theme .password-visibility-btn.is-visible {
        color: #1d4ed8;
        background: rgba(37, 99, 235, 0.08);
      }

      html.light-theme .login-link-btn {
        color: #2563eb;
      }

      html.light-theme .login-link-btn:hover {
        color: #1d4ed8;
      }

      html.light-theme .profile-card {
        background: rgba(248, 250, 252, 0.9);
      }

      html.light-theme .profile-head {
        background: rgba(241, 245, 249, 0.8);
        border-bottom-color: rgba(100, 116, 139, 0.15);
      }

      html.light-theme .profile-title {
        color: #0f172a;
      }

      html.light-theme .profile-value {
        color: #1e293b;
      }

      html.light-theme .profile-row {
        border-bottom-color: rgba(100, 116, 139, 0.1);
      }

      html.light-theme .profile-section {
        border-top-color: rgba(100, 116, 139, 0.1);
      }

      html.light-theme .profile-section-title,
      html.light-theme .assertion-package-stat strong {
        color: #0f172a;
      }

      html.light-theme .profile-actions {
        background: rgba(241, 245, 249, 0.7);
        border-color: rgba(100, 116, 139, 0.12);
      }

      html.light-theme .test-config-tile {
        background: rgba(241, 245, 249, 0.82);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-config-tile strong {
        color: #0f172a;
      }

      html.light-theme .test-task-section {
        background: rgba(241, 245, 249, 0.82);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-task-assertion-pane {
        background: rgba(241, 245, 249, 0.82);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-level-assertion-entry.active {
        color: #1d4ed8;
        background: rgba(37, 99, 235, 0.12);
        border-color: rgba(37, 99, 235, 0.24);
      }

      html.light-theme .test-task-option,
      html.light-theme .test-task-item,
      html.light-theme .test-task-saved-item,
      html.light-theme .test-task-group-task-option,
      html.light-theme .test-task-group-selected-item,
      html.light-theme .test-task-group-summary-item,
      html.light-theme .test-task-case-config,
      html.light-theme .test-task-assertion-pane-head {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-saved-item:hover,
      html.light-theme .test-task-group-section .test-task-saved-item:hover {
        background: rgba(219, 234, 254, 0.72);
        border-color: rgba(37, 99, 235, 0.28);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
      }

      html.light-theme .test-task-saved-item.selected {
        background: rgba(219, 234, 254, 0.56);
        border-color: rgba(37, 99, 235, 0.24);
        box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
      }

      html.light-theme .test-task-saved-section .test-task-list:has(.test-task-saved-item:hover) .test-task-saved-item.selected:not(:hover) {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
        box-shadow: none;
      }

      html.light-theme .test-task-group-section .test-task-group-list:has(.test-task-saved-item:hover) .test-task-saved-item.selected:not(:hover) {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
        box-shadow: none;
      }

      html.light-theme .test-task-saved-item.dragging {
        background: rgba(191, 219, 254, 0.88);
        border-color: rgba(37, 99, 235, 0.42);
      }

      html.light-theme .test-task-saved-item.pending-shift {
        background: rgba(236, 253, 245, 0.72);
        border-color: rgba(22, 163, 74, 0.28);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
      }

      html.light-theme .test-task-result-case {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78));
        border-color: rgba(100, 116, 139, 0.14);
        box-shadow: 0 5px 12px rgba(15, 23, 42, 0.04);
      }

      html.light-theme .test-task-result-case.is-clickable:hover,
      html.light-theme .test-task-result-case.active {
        background: linear-gradient(90deg, rgba(219, 234, 254, 0.74), rgba(239, 246, 255, 0.88));
        border-color: rgba(37, 99, 235, 0.28);
        border-left-color: rgba(37, 99, 235, 0.86);
        box-shadow: 0 12px 24px rgba(37, 99, 235, 0.10);
      }

      html.light-theme .test-task-result-filter-btn {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-result-filter-btn:hover,
      html.light-theme .test-task-result-filter-btn.active {
        color: #1d4ed8;
        background: rgba(219, 234, 254, 0.68);
        border-color: rgba(37, 99, 235, 0.24);
      }

      html.light-theme .test-task-result-filter-empty {
        border-color: rgba(100, 116, 139, 0.18);
      }

      html.light-theme .test-task-result-overview {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-result-ring {
        background: transparent;
      }

      html.light-theme .test-task-result-case.success .test-task-result-case-badge {
        background: rgba(22, 163, 74, 0.1);
        color: #15803d;
      }

      html.light-theme .test-task-result-case.success {
        border-left-color: rgba(148, 163, 184, 0.22);
      }

      html.light-theme .test-task-result-case.fail .test-task-result-case-badge {
        background: rgba(220, 38, 38, 0.09);
        color: #dc2626;
      }

      html.light-theme .test-task-result-case.fail {
        border-left-color: rgba(148, 163, 184, 0.22);
      }

      html.light-theme .test-task-result-case-tail {
        background: transparent;
      }

      html.light-theme .test-task-result-case-code {
        color: #475569;
      }

      html.light-theme .test-task-result-case-code.status-2xx {
        color: #16a34a;
      }

      html.light-theme .test-task-result-case-code.status-3xx {
        color: #2563eb;
      }

      html.light-theme .test-task-result-case-code.status-4xx {
        color: #d97706;
      }

      html.light-theme .test-task-result-case-code.status-5xx {
        color: #dc2626;
      }

      html.light-theme .test-task-result-case-code.status-empty {
        color: #64748b;
      }

      html.light-theme .test-task-result-case-duration {
        color: #64748b;
      }

      html.light-theme .test-task-result-panel {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-summary-card,
      html.light-theme .test-task-summary-stat {
        background: transparent;
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-summary-fail-item {
        background: rgba(254, 226, 226, 0.72);
        border-color: rgba(220, 38, 38, 0.2);
      }

      html.light-theme .test-task-parameter-pane .test-task-case-config {
        background: transparent;
        border-color: transparent;
      }

      html.light-theme .test-task-result-section {
        background: rgba(241, 245, 249, 0.82);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-summary-hero {
        background: transparent;
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-summary-stat {
        background: transparent;
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-summary-recent {
        background: transparent;
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-summary-result-card {
        background: rgba(255, 255, 255, 0.92);
        border-color: rgba(100, 116, 139, 0.1);
      }

      html.light-theme .test-task-summary-result-overview {
        background: transparent;
        border-color: transparent;
      }

      html.light-theme .test-task-run-inline-control {
        background: transparent;
        border-color: transparent;
      }

      html.light-theme .test-task-run-inline-status {
        color: #1e293b;
      }

      html.light-theme .test-task-run-inline-action {
        background: transparent;
        border-color: rgba(100, 116, 139, 0.18);
      }

      html.light-theme .test-task-run-inline-action.pause {
        color: #334155;
      }

      html.light-theme .test-task-summary-result-card .test-task-result-ring {
        background: transparent;
      }

      html.light-theme .test-task-result-ring::before {
        background: rgba(248, 250, 252, 0.98);
      }

      html.light-theme .test-task-result-ring-tip {
        background: rgba(255, 255, 255, 0.96);
        border-color: rgba(100, 116, 139, 0.2);
        color: #1e293b;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
      }

      html.light-theme .test-task-result-drawer-backdrop {
        background: rgba(15, 23, 42, 0.35);
      }

      html.light-theme .test-task-result-drawer-panel {
        background: rgba(248, 250, 252, 0.98);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-result-drawer-close {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-editor-close {
        background: rgba(255, 255, 255, 0.82);
        border-color: rgba(100, 116, 139, 0.16);
        color: #475569;
      }

      html.light-theme .test-task-editor-close:hover {
        background: rgba(239, 246, 255, 0.9);
        border-color: rgba(37, 99, 235, 0.24);
        color: #1d4ed8;
      }

      html.light-theme .test-task-response-block,
      html.light-theme .test-task-result-request-panel {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-response-block-title,
      html.light-theme .test-task-result-request-tabs {
        border-bottom-color: rgba(100, 116, 139, 0.12);
      }

      html.light-theme .test-task-response-block .header-table {
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-response-block .header-row {
        border-bottom-color: rgba(100, 116, 139, 0.12);
      }

      html.light-theme .test-task-response-block .header-key {
        background: rgba(241, 245, 249, 0.82);
        border-right-color: rgba(100, 116, 139, 0.12);
      }

      html.light-theme .test-task-result-detail-head {
        background: rgba(255, 255, 255, 0.72);
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-result-panel-head {
        border-color: rgba(100, 116, 139, 0.12);
      }

      html.light-theme .test-task-result-tab:hover,
      html.light-theme .test-task-result-tab.active {
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.24);
        background: rgba(219, 234, 254, 0.68);
      }

      html.light-theme .test-task-api-options {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(100, 116, 139, 0.2);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
      }

      html.light-theme .test-task-card-menu-btn {
        color: #475569;
        background: rgba(241, 245, 249, 0.86);
        border-color: rgba(100, 116, 139, 0.18);
      }

      html.light-theme .test-task-card-menu-btn:hover,
      html.light-theme .test-task-card-menu.open .test-task-card-menu-btn {
        color: #1d4ed8;
        background: rgba(219, 234, 254, 0.92);
        border-color: rgba(37, 99, 235, 0.26);
      }

      html.light-theme .test-task-card-menu-options {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(100, 116, 139, 0.18);
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
      }

      html.light-theme .test-task-card-menu-option {
        color: #334155;
      }

      html.light-theme .test-task-card-menu-option:hover {
        color: #1d4ed8;
        background: rgba(219, 234, 254, 0.74);
      }

      html.light-theme .test-task-card-menu-option.danger {
        color: #dc2626;
      }

      html.light-theme .test-task-card-menu-option.danger:hover {
        color: #b91c1c;
        background: rgba(254, 226, 226, 0.78);
      }

      html.light-theme .test-task-card-progress-track {
        background: rgba(226, 232, 240, 0.9);
        border-color: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .test-task-item.active {
        background: rgba(219, 234, 254, 0.74);
        border-color: rgba(59, 130, 246, 0.32);
      }

      html.light-theme .test-task-item.env-disabled,
      html.light-theme .test-task-item.env-disabled.active {
        background: rgba(241, 245, 249, 0.72);
        border-color: rgba(100, 116, 139, 0.12);
      }

      html.light-theme .test-task-assertion-row {
        background: rgba(241, 245, 249, 0.9);
        color: #475569;
      }

      html.light-theme .test-task-section-title,
      html.light-theme .test-task-option-title,
      html.light-theme .test-task-item-title,
      html.light-theme .test-task-saved-title,
      html.light-theme .test-task-assertion-pane-title,
      html.light-theme .test-task-case-title-text {
        color: #0f172a;
      }

      html.light-theme .profile-nickname-input,
      html.light-theme .test-task-case-title-input {
        background: rgba(241, 245, 249, 0.9);
        border-color: rgba(100, 116, 139, 0.25);
        color: #1e293b;
      }

      html.light-theme .profile-nickname-text {
        color: #1e293b;
      }

      html.light-theme .profile-edit-btn {
        background: transparent;
        border-color: transparent;
        color: #475569;
      }

      html.light-theme .combo-trigger {
        color: #475569;
      }

      html.light-theme .combo-trigger:hover {
        color: #1d4ed8;
        background: rgba(219, 234, 254, 0.65);
      }

      html.light-theme .combo-menu {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(100, 116, 139, 0.22);
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
      }

      html.light-theme .combo-item {
        color: #1e293b;
      }

      html.light-theme .combo-item:hover,
      html.light-theme .combo-item.active {
        background: rgba(219, 234, 254, 0.72);
        color: #1d4ed8;
      }

      html.light-theme .combo-empty {
        color: #64748b;
      }

      html.light-theme .assertion-package-stat {
        background: rgba(241, 245, 249, 0.85);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .assertion-package-list {
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .assertion-package-row {
        border-bottom-color: rgba(100, 116, 139, 0.1);
      }

      /* Story#18：浅色态同样只保留红边框，不加红色背景。 */
      html.light-theme .scheduled-task-item.status-streak,
      html.light-theme .scheduled-task-item.status-failed {
        border-color: rgba(220, 38, 38, 0.45);
      }

      html.light-theme .wss-task-status {
        color: #475569;
      }

      html.light-theme .assertion-package-warning {
        color: #9a3412;
      }

      .theme-toggle-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 12px;
        border-radius: 20px;
        border: 1px solid var(--line-strong);
        background: var(--panel);
        color: var(--text);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        min-height: unset;
        transition: background 0.2s ease, border-color 0.2s ease;
      }

      html.light-theme .theme-toggle-btn {
        border-color: #cbd5e1;
      }

      .theme-floating-toggle {
        position: fixed;
        right: max(18px, env(safe-area-inset-right, 0px) + 18px);
        bottom: max(18px, env(safe-area-inset-bottom, 0px) + 18px);
        z-index: 180;
        width: 52px;
        height: 52px;
        display: inline-grid;
        place-items: center;
        padding: 0;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 999px;
        color: #bfdbfe;
        background: rgba(15, 23, 42, 0.32);
        box-shadow: 0 14px 36px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        cursor: pointer;
        overflow: hidden;
        isolation: isolate;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        will-change: transform, left, top;
        transition: transform 0.18s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
      }

      .theme-floating-toggle:hover {
        transform: translateY(-2px);
        border-color: rgba(147, 197, 253, 0.42);
        background: rgba(15, 23, 42, 0.44);
        box-shadow: 0 18px 42px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      }

      .theme-floating-toggle:active {
        transform: translateY(0) scale(0.96);
      }

      .theme-floating-toggle.is-dragging {
        transition: none;
        cursor: grabbing;
      }

      .theme-floating-toggle.is-dragging:hover,
      .theme-floating-toggle.is-dragging:active {
        transform: none;
        box-shadow: 0 14px 36px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
      }

      .theme-floating-toggle.is-snapping {
        transition: left 0.22s cubic-bezier(0.22, 1, 0.36, 1), top 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
      }

      .theme-floating-toggle:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
      }

      .theme-floating-halo {
        position: absolute;
        inset: 8px;
        border-radius: inherit;
        background: radial-gradient(circle, rgba(147, 197, 253, 0.2), transparent 68%);
        opacity: 0.72;
        transform: scale(0.92);
        transition: opacity 0.24s ease, transform 0.24s ease, background 0.24s ease;
        z-index: -1;
      }

      .theme-floating-icon {
        position: absolute;
        width: 24px;
        height: 24px;
        stroke: currentColor;
        fill: none;
        transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
      }

      .theme-floating-icon-sun {
        opacity: 0;
        transform: translateY(12px) rotate(-32deg) scale(0.72);
      }

      .theme-floating-icon-moon {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
      }

      html.light-theme .theme-floating-toggle {
        color: #d97706;
        border-color: rgba(217, 119, 6, 0.2);
        background: rgba(255, 255, 255, 0.42);
        box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
      }

      html.light-theme .theme-floating-toggle:hover {
        border-color: rgba(217, 119, 6, 0.32);
        background: rgba(255, 255, 255, 0.62);
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
      }

      html.light-theme .theme-floating-halo {
        background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 68%);
        transform: scale(1.04);
      }

      html.light-theme .theme-floating-icon-sun {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
      }

      html.light-theme .theme-floating-icon-moon {
        opacity: 0;
        transform: translateY(-12px) rotate(32deg) scale(0.72);
      }

      @media (prefers-reduced-motion: reduce) {
        html.theme-transitioning::before {
          animation: none !important;
          opacity: 0 !important;
        }

        .theme-floating-toggle,
        .theme-floating-halo,
        .theme-floating-icon {
          transition: none !important;
        }
      }

      /* 多语言 / 幽灵按钮 */
      html.light-theme .lang-btn {
        color: #475569;
        background: rgba(226, 232, 240, 0.85);
        border-color: #94a3b8;
      }

      html.light-theme .lang-btn.active {
        color: #f8fafc;
        background: var(--success-action);
        border-color: var(--success-action);
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
      }

      html.light-theme .btn-ghost {
        background: #e2e8f0;
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.3);
      }

      /* viewer-head / tabs 标题栏底色由 --tab-bar-bg 变量按主题提供，无需日间单独覆盖 */

      /* tab 切换按钮 */
      html.light-theme .tab-btn {
        background: rgba(203, 213, 225, 0.5);
        color: #475569;
      }

      html.light-theme .tab-btn.active {
        background: rgba(37, 99, 235, 0.14);
        color: #1d4ed8;
      }

      /* 卡片 / 行容器通用深色背景 */
      html.light-theme .assertion-item,
      html.light-theme .assertion-detail-card,
      html.light-theme .tool-result,
      html.light-theme .header-row,
      html.light-theme .log-item,
      html.light-theme .api-doc-meta,
      html.light-theme .api-doc-field,
      html.light-theme .empty-state {
        background: rgba(248, 250, 252, 0.9);
        border-color: rgba(100, 116, 139, 0.18);
      }

      /* 断言成功/失败详情卡片：日间模式同样显示彩色底，与夜间保持视觉一致 */
      html.light-theme .assertion-detail-card.success,
      html.light-theme .tool-result.success {
        background: rgba(22, 163, 74, 0.1);
        border-color: rgba(22, 163, 74, 0.3);
      }

      html.light-theme .assertion-detail-card.fail,
      html.light-theme .tool-result.fail {
        background: rgba(220, 38, 38, 0.09);
        border-color: rgba(220, 38, 38, 0.28);
      }

      html.light-theme .assertion-detail-toggle {
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.22);
        background: rgba(219, 234, 254, 0.62);
      }

      html.light-theme .assertion-detail-toggle:hover {
        border-color: rgba(37, 99, 235, 0.34);
        background: rgba(191, 219, 254, 0.82);
      }

      html.light-theme .assertion-item.disabled {
        background: rgba(241, 245, 249, 0.6);
      }

      html.light-theme .test-task-level-assertion-pinned {
        border-color: rgba(37, 99, 235, 0.28);
        background: rgba(219, 234, 254, 0.62);
      }

      html.light-theme .log-item:hover {
        background: rgba(226, 232, 240, 0.85);
      }

      html.light-theme .log-item.active {
        border-color: rgba(37, 99, 235, 0.45);
        background: rgba(219, 234, 254, 0.5);
      }

      /* 代码块 */
      html.light-theme .api-doc-code {
        background: rgba(241, 245, 249, 0.95);
        color: #1e293b;
      }

      /* 文字：原来是浅色（用于暗底），亮色主题改为深色 */
      html.light-theme .api-doc-content,
      html.light-theme .api-doc-field-desc,
      html.light-theme .api-doc-title,
      html.light-theme .assertion-type,
      html.light-theme .assertion-message,
      html.light-theme .assertion-detail-body,
      html.light-theme .assertion-detail-grid,
      html.light-theme .header-value,
      html.light-theme .tool-result-body {
        color: #334155;
      }

      html.light-theme .api-doc-field-path,
      html.light-theme .header-key {
        color: #1d4ed8;
      }

      /* 断言名称输入框 */
      html.light-theme .assertion-name-input {
        color: #1e293b;
        background: rgba(241, 245, 249, 0.9);
        border-color: rgba(100, 116, 139, 0.25);
      }

      html.light-theme .assertion-rename-btn.is-confirm {
        color: #15803d;
        border-color: rgba(22, 163, 74, 0.28);
        background: rgba(22, 163, 74, 0.1);
      }

      html.light-theme .assertion-rename-btn.is-confirm:hover,
      html.light-theme .assertion-rename-btn.is-confirm:focus,
      html.light-theme .assertion-rename-btn.is-confirm:active {
        color: #166534;
        border-color: rgba(22, 163, 74, 0.42);
        background: rgba(22, 163, 74, 0.16);
      }

      /* 操作按钮（断言/复制等圆形小按钮） */
      html.light-theme .assertion-action-btn,
      html.light-theme .header-copy-btn {
        background: rgba(241, 245, 249, 0.95);
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.25);
      }

      html.light-theme .assertion-action-btn:hover,
      html.light-theme .header-copy-btn:hover {
        background: rgba(219, 234, 254, 0.7);
        border-color: rgba(37, 99, 235, 0.45);
      }

      /* chip 标签 */
      html.light-theme .chip {
        background: rgba(100, 116, 139, 0.14);
        color: #475569;
      }

      html.light-theme .chip.success {
        color: #15803d;
        background: rgba(22, 163, 74, 0.13);
      }

      html.light-theme .chip.fail {
        color: #b91c1c;
        background: rgba(239, 68, 68, 0.11);
      }

      html.light-theme .log-count-pill {
        color: #475569;
      }

      html.light-theme .tab-btn.log-filter-pill {
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.25);
        background: rgba(219, 234, 254, 0.72);
      }

      html.light-theme .tab-btn.log-filter-pill.success {
        color: #15803d;
        border-color: rgba(22, 163, 74, 0.24);
        background: rgba(22, 163, 74, 0.13);
      }

      html.light-theme .tab-btn.log-filter-pill.fail {
        color: #b91c1c;
        border-color: rgba(239, 68, 68, 0.24);
        background: rgba(239, 68, 68, 0.11);
      }

      /* 日志列表里的断言结果徽标 */
      html.light-theme .log-assertion-status.success {
        color: #15803d;
        background: rgba(22, 163, 74, 0.13);
      }

      html.light-theme .log-assertion-status.fail {
        color: #b91c1c;
        background: rgba(239, 68, 68, 0.11);
      }

      /* 测试页断言条目的状态徽标 */
      html.light-theme .assertion-status.success {
        color: #15803d;
        background: rgba(22, 163, 74, 0.13);
      }

      html.light-theme .assertion-status.fail {
        color: #b91c1c;
        background: rgba(239, 68, 68, 0.11);
      }

      html.light-theme .assertion-status.idle,
      html.light-theme .assertion-status.disabled {
        color: #475569;
        background: rgba(100, 116, 139, 0.14);
      }

      /* 数据页 JSON 响应内容语法高亮 */
      html.light-theme .json-view  { color: var(--syntax-view); }
      html.light-theme .json-key   { color: var(--syntax-key); }
      html.light-theme .json-string  { color: var(--syntax-string); }
      html.light-theme .json-number  { color: var(--syntax-number); }
      html.light-theme .json-boolean { color: var(--syntax-boolean); }
      html.light-theme .json-null    { color: var(--syntax-null); }

      html.light-theme .response-alert {
        background: rgba(254, 242, 242, 0.95);
        border-color: rgba(220, 38, 38, 0.28);
      }

      html.light-theme .response-alert-title {
        color: #991b1b;
      }

      html.light-theme .response-alert-list {
        color: #b91c1c;
      }

      /* 响应状态胶囊（复制按钮旁） */
      html.light-theme .status-pill {
        background: rgba(100, 116, 139, 0.14);
        color: #475569;
      }

      html.light-theme .status-pill.success {
        background: rgba(22, 163, 74, 0.12);
        color: #15803d;
      }

      html.light-theme .status-pill.fail {
        background: rgba(239, 68, 68, 0.11);
        color: #b91c1c;
      }

      html.light-theme .status-pill.pending {
        background: rgba(37, 99, 235, 0.1);
        color: #1d4ed8;
      }

      html.light-theme .duration-text,
      html.light-theme .size-text {
        color: #64748b;
      }

      /* 参数化面板 */
      html.light-theme .parameter-panel {
        background: rgba(248, 250, 252, 0.9);
        border-color: rgba(100, 116, 139, 0.18);
      }

      html.light-theme .parameter-empty {
        background: rgba(241, 245, 249, 0.8);
      }

      html.light-theme .parameter-remove-btn {
        color: #b91c1c;
        background: rgba(241, 245, 249, 0.9);
        border-color: rgba(148, 163, 184, 0.25);
      }

      html.light-theme .parameter-remove-btn:hover {
        border-color: rgba(239, 68, 68, 0.4);
        background: rgba(254, 226, 226, 0.7);
      }

      html.light-theme .parameter-add-btn {
        color: #1d4ed8;
        background: rgba(37, 99, 235, 0.06);
        border-color: rgba(37, 99, 235, 0.35);
      }

      html.light-theme .parameter-add-btn:hover {
        background: rgba(37, 99, 235, 0.12);
        border-color: rgba(37, 99, 235, 0.55);
      }

      html.light-theme .assertion-modal {
        background: rgba(15, 23, 42, 0.35);
      }

      html.light-theme .assertion-dialog {
        background: rgba(255, 255, 255, 0.98);
        border-color: #cbd5e1;
      }

      html.light-theme .assertion-dialog-head {
        background: rgba(241, 245, 249, 0.9);
        border-bottom-color: rgba(100, 116, 139, 0.15);
      }

      html.light-theme .tool-placeholder-icon {
        color: #1d4ed8;
        background: rgba(37, 99, 235, 0.08);
        border-color: rgba(37, 99, 235, 0.2);
      }

      /* 测试工具标题栏 / 区块标题 */
      html.light-theme .mini-head {
        background: rgba(241, 245, 249, 0.85);
      }

      /* 次要操作按钮（添加断言/保存） */
      html.light-theme .btn-secondary {
        background: #e2e8f0;
        color: #334155;
      }

      html.light-theme .btn-secondary:hover {
        background: #cbd5e1;
      }

      /* 断言状态徽标（默认"已启用"态） */
      html.light-theme .assertion-status {
        color: #475569;
        background: rgba(100, 116, 139, 0.14);
      }

      html.light-theme .toast-item {
        color: #1e293b;
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(100, 116, 139, 0.2);
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
      }

      html.light-theme .toast-item.success {
        color: #166534;
        background: rgba(240, 253, 244, 0.98);
        border-color: rgba(22, 163, 74, 0.32);
      }

      html.light-theme .toast-item.fail {
        color: #991b1b;
        background: rgba(254, 242, 242, 0.98);
        border-color: rgba(220, 38, 38, 0.3);
      }

      html.light-theme .toast-item.field-doc-toast {
        color: #166534;
        background: rgba(240, 253, 244, 0.98);
        border-color: rgba(22, 163, 74, 0.32);
      }

      /* 状态文字（成功/失败）在亮色背景上要用更深的颜色 */
      html.light-theme .status-text.success {
        color: #16a34a;
      }

      html.light-theme .status-text.fail {
        color: #dc2626;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        min-height: 100vh;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        background:
          radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 24%),
          radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 22%),
          linear-gradient(180deg, #05070d, var(--bg));
        color: var(--text);
      }

      .login-screen {
        display: none;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        padding: 24px;
      }

      .login-layout {
        display: flex;
        flex-direction: column;
        width: min(420px, 100%);
        min-height: 100%;
      }

      .login-intro {
        display: none;
      }

      .login-card {
        width: min(420px, 100%);
        padding: 28px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.92);
        box-shadow: var(--shadow);
        backdrop-filter: blur(16px);
      }

      .login-title {
        margin: 0;
        font-size: 22px;
        font-weight: 800;
        color: #f8fafc;
      }

      .login-subtitle {
        margin: 8px 0 22px;
        font-size: 13px;
        line-height: 1.6;
        color: var(--muted);
      }

      .login-env-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 14px;
      }

      .login-env-btn {
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 10px;
        padding: 10px 12px;
        color: var(--muted);
        background: rgba(15, 23, 42, 0.72);
        cursor: pointer;
      }

      .login-env-btn.active {
        color: #eff6ff;
        border-color: rgba(59, 130, 246, 0.72);
        background: rgba(37, 99, 235, 0.26);
      }

      .login-code-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: stretch;
      }

      .login-code-row input {
        min-width: 0;
      }

      .password-input-wrap {
        position: relative;
      }

      /* Story#12：登录页「记住密码」勾选框 */
      .login-remember {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 8px;
        font-size: 13px;
        color: var(--soft);
        cursor: pointer;
        user-select: none;
      }

      /* Z59：作者级 display:inline-flex 会盖过 UA [hidden]{display:none}，
         必须显式给作者级 [hidden] 兜底，否则 syncLoginModePanels 的
         loginRememberField.hidden=true 无效，sms/reset 模式下仍可见。 */
      .login-remember[hidden] {
        display: none;
      }

      .login-remember input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin: 0;
        accent-color: #3b82f6;
        cursor: pointer;
      }

      .login-remember:hover {
        color: #dbeafe;
      }

      html.light-theme .login-remember {
        color: #475569;
      }

      html.light-theme .login-remember:hover {
        color: #1d4ed8;
      }

      /* Z59：原 body.login-mode-sms .login-remember 死规则已删（仓内 0 处设置该 body class），
         sms/reset 模式下 syncLoginModePanels 走 loginRememberField.hidden = !passwordMode +
         上面的 .login-remember[hidden]{display:none} 兜底即可。 */

      .password-input-wrap input {
        padding-right: 44px;
      }

      .password-visibility-btn {
        position: absolute;
        top: 50%;
        right: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        color: var(--soft);
        background: transparent;
        cursor: pointer;
        transition: color 0.15s ease, background 0.15s ease;
        transform: translateY(-50%);
      }

      .password-visibility-btn:hover,
      .password-visibility-btn.is-visible {
        color: #dbeafe;
        background: rgba(96, 165, 250, 0.12);
      }

      .password-visibility-btn svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
      }

      .password-visibility-btn .eye-off-icon {
        display: none;
      }

      .password-visibility-btn.is-visible .eye-icon {
        display: none;
      }

      .password-visibility-btn.is-visible .eye-off-icon {
        display: block;
      }

      .login-mode-panel {
        display: none;
      }

      .login-mode-panel.active {
        display: block;
      }

      .login-send-code-btn {
        min-width: 104px;
        min-height: 40px;
        padding: 0 12px;
        border: 1px solid rgba(96, 165, 250, 0.34);
        border-radius: 10px;
        color: #dbeafe;
        background: rgba(37, 99, 235, 0.16);
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
        transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
      }

      .login-send-code-btn:hover {
        border-color: rgba(96, 165, 250, 0.64);
        background: rgba(37, 99, 235, 0.28);
      }

      .login-send-code-btn:disabled {
        opacity: 0.54;
        cursor: not-allowed;
      }

      .login-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin-top: 18px;
      }

      .login-switch-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px 12px;
        margin: 12px 0 10px;
      }

      #loginRegisterSwitchBtn {
        justify-self: end;
      }

      #loginForgotSwitchBtn {
        justify-self: start;
      }

      #loginPasswordSwitchBtn.active {
        grid-column: 1 / -1;
        justify-self: center;
      }

      .login-link-btn {
        border: 0;
        padding: 4px 6px;
        color: #93c5fd;
        background: transparent;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }

      .login-link-btn:hover {
        color: #bfdbfe;
      }

      .login-guest-row {
        display: flex;
        justify-content: center;
        margin: -2px 0 12px;
      }

      .login-guest-btn {
        min-height: 28px;
        border: 0;
        padding: 2px 8px;
        color: rgba(147, 197, 253, 0.82);
        background: transparent;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.4;
        cursor: pointer;
        transition: color 0.15s ease, background 0.15s ease;
      }

      .login-guest-btn:hover {
        color: #bfdbfe;
        background: rgba(59, 130, 246, 0.08);
      }

      .account-strip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
        padding: 10px 12px;
        border: 1px solid rgba(59, 130, 246, 0.18);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.56);
      }

      .account-strip strong {
        display: block;
        margin-bottom: 2px;
        font-size: 12px;
        color: #dbeafe;
      }

      .account-strip span {
        display: block;
        font-size: 11px;
        color: var(--muted);
      }

      .account-strip .btn {
        flex: 0 0 auto;
      }

      .profile-page {
        display: none;
      }

      .cloud-drive-body {
        gap: 12px;
      }

      /* 拖拽上传蒙层：只圈在文件显示区域（cloud-grid），不覆盖标题/配额/toolbar */
      body.cloud-dragover .cloud-grid {
        position: relative;
      }

      body.cloud-dragover .cloud-grid::before {
        content: "";
        position: absolute;
        inset: 0;
        border: 2px dashed var(--primary);
        border-radius: 12px;
        background: rgba(59, 130, 246, 0.08);
        pointer-events: none;
        z-index: 4;
      }

      body.cloud-dragover .cloud-grid::after {
        content: "放下文件即可上传至个人云盘";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 12px 22px;
        border-radius: 999px;
        background: var(--primary);
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
        pointer-events: none;
        z-index: 5;
        white-space: nowrap;
      }

      /* 返回按钮 PC 端不显示，仅移动端 m-appbar 使用 */
      .cloud-mobile-back {
        display: none;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        margin-left: -4px;
        border: 0;
        background: transparent;
        color: var(--text);
        cursor: pointer;
      }
      .cloud-mobile-back svg {
        width: 20px;
        height: 20px;
      }

      /* §13 传输管理器入口按钮（新原型：配额条右侧方形 34×34，按 .quota-transfer 样式） */
      .cloud-transfer-btn {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        flex: none;
        padding: 0;
        border: 1px solid var(--line-strong);
        border-radius: 9px;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        transition: color 0.15s ease, border-color 0.15s ease;
      }
      .cloud-transfer-btn:hover {
        color: var(--text);
        border-color: var(--soft);
      }
      .cloud-transfer-btn .cloud-icon {
        width: 18px;
        height: 18px;
      }

      /* 新原型 §11：CTA 块（配额条下，工具条上）"上传文件 + meta + [新建文件夹][上传文件]" */
      .cloud-start {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
        padding: 13px 16px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--field-soft, rgba(15, 23, 42, 0.52));
      }
      .cloud-start-info { min-width: 0; }
      .cloud-start-title {
        color: var(--text);
        font-size: 14px;
        font-weight: 600;
      }
      .cloud-start-meta {
        margin-top: 3px;
        color: var(--soft);
        font-size: 12px;
      }
      .cloud-start-actions {
        display: flex;
        flex: none;
        gap: 8px;
      }
      .cloud-start-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        line-height: 1;
      }
      .cloud-transfer-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: var(--primary);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1.5px solid var(--bg);
      }
      .cloud-transfer-badge[hidden] { display: none; }

      .cloud-start-actions .btn .cloud-icon svg {
        display: block;
      }

      .cloud-btn-label {
        display: inline-block;
        line-height: 1;
      }

      .cloud-icon {
        display: inline-flex;
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        align-items: center;
        justify-content: center;
      }

      .cloud-icon svg,
      .cloud-tile-icon svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .cloud-quota-panel {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.48);
      }

      html.light-theme .cloud-quota-panel {
        background: rgba(248, 250, 252, 0.88);
      }

      .cloud-quota-text {
        display: flex;
        align-items: baseline;
        gap: 6px;
        white-space: nowrap;
        color: var(--muted);
        font-size: 12px;
      }

      .cloud-quota-text strong {
        color: var(--text);
        font-size: 13px;
      }

      .cloud-quota-track {
        flex: 1 1 auto;
        height: 8px;
        min-width: 90px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.18);
        overflow: hidden;
      }

      .cloud-quota-fill {
        width: 0;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--primary), var(--cyan));
        transition: width 0.18s ease;
      }

      .cloud-quota-percent {
        width: 42px;
        color: var(--muted);
        font-size: 12px;
        text-align: right;
      }

      .cloud-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }

      .cloud-search {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1 1 220px;
        min-width: 180px;
        height: 38px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--field);
        color: var(--soft);
      }

      .cloud-search input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text);
        font-size: 13px;
      }

      .cloud-filter-group,
      .cloud-view-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .cloud-chip {
        min-height: 32px;
        padding: 0 12px;
        border: 1px solid var(--line-strong);
        border-radius: 999px;
        background: transparent;
        color: var(--muted);
        font-size: 12px;
        cursor: pointer;
      }

      .cloud-chip.active {
        color: var(--tab-active-text);
        border-color: rgba(59, 130, 246, 0.45);
        background: var(--primary-surface);
      }

      .cloud-sort {
        width: 110px;
        height: 32px;
        padding: 0 10px;
        flex: 0 0 auto;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        background: var(--field);
        color: var(--muted);
        font-size: 12px;
      }

      .cloud-view-toggle {
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
      }

      .cloud-view-toggle button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 32px;
        border: 0;
        border-right: 1px solid var(--line);
        background: transparent;
        color: var(--soft);
        cursor: pointer;
      }

      .cloud-view-toggle button:last-child {
        border-right: 0;
      }

      .cloud-view-toggle button.active {
        color: var(--tab-active-text);
        background: var(--primary-surface);
      }

      /* 面包屑 + 刷新按钮 同一行（§12.2 PC 刷新设计） */
      .cloud-crumb-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .cloud-refresh-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
      }

      .cloud-updated-at {
        font-size: 12px;
        color: var(--soft);
        white-space: nowrap;
      }

      .cloud-refresh-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 11px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        background: transparent;
        color: var(--muted);
        font-size: 12.5px;
        line-height: 1;
        cursor: pointer;
        transition: color 0.15s ease, border-color 0.15s ease;
      }

      .cloud-refresh-btn:hover {
        color: var(--text);
        border-color: var(--soft);
      }

      .cloud-refresh-btn:disabled {
        opacity: 0.6;
        cursor: wait;
      }

      .cloud-refresh-icon {
        width: 14px;
        height: 14px;
        flex: 0 0 14px;
      }

      .cloud-refresh-btn.is-refreshing .cloud-refresh-icon {
        animation: cloud-spin 0.9s linear infinite;
      }

      /* 顶部细加载条（有缓存刷新中显示，2px 滑动） */
      .cloud-loadbar {
        position: relative;
        display: none;
        height: 2px;
        margin: 8px 0 0;
        overflow: hidden;
        border-radius: 2px;
        background: rgba(148, 163, 184, 0.12);
      }

      .cloud-loadbar.active {
        display: block;
      }

      .cloud-loadbar::before {
        content: "";
        position: absolute;
        top: 0;
        left: -40%;
        width: 40%;
        height: 100%;
        background: linear-gradient(90deg, transparent, var(--primary), transparent);
        animation: cloud-loadbar-slide 1.1s ease-in-out infinite;
      }

      @keyframes cloud-loadbar-slide {
        to { left: 100%; }
      }

      /* 骨架屏（冷启动 / 无缓存时显示） */
      .cloud-skeleton-tile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 11px;
        padding: 18px 8px 13px;
      }

      .cloud-skeleton-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        background: rgba(148, 163, 184, 0.13);
        animation: cloud-skeleton-pulse 1.3s ease-in-out infinite;
      }

      .cloud-skeleton-line {
        width: 72%;
        height: 10px;
        border-radius: 5px;
        background: rgba(148, 163, 184, 0.13);
        animation: cloud-skeleton-pulse 1.3s ease-in-out infinite;
      }

      .cloud-skeleton-line.short {
        width: 46%;
        height: 8px;
      }

      @keyframes cloud-skeleton-pulse {
        0%, 100% { opacity: 0.45; }
        50% { opacity: 1; }
      }

      .cloud-breadcrumb {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 28px;
        color: var(--muted);
        font-size: 13px;
        overflow-x: auto;
      }

      .cloud-breadcrumb button {
        border: 0;
        background: transparent;
        color: inherit;
        font: inherit;
        cursor: pointer;
        white-space: nowrap;
      }

      .cloud-breadcrumb button.active {
        color: var(--text);
        font-weight: 600;
        cursor: default;
      }

      .cloud-crumb-sep {
        color: var(--soft);
      }

      .cloud-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
        gap: 8px;
        align-content: start;
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        padding: 2px 2px 16px;
      }

      .cloud-grid.list-view {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .cloud-tile {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 9px;
        min-height: 126px;
        padding: 16px 8px 12px;
        border: 1px solid transparent;
        border-radius: 8px;
        color: var(--text);
        cursor: pointer;
        transition: background 0.15s ease, border-color 0.15s ease;
        /* 浏览器自动跳过视口外 tile 的渲染，文件 >200 项也无卡顿（替代虚拟滚动） */
        content-visibility: auto;
        contain-intrinsic-size: 126px;
      }

      .cloud-grid.list-view .cloud-tile {
        min-height: 54px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 8px 10px;
      }

      .cloud-tile:hover,
      .cloud-tile:focus-visible {
        outline: none;
        border-color: var(--line);
        background: rgba(148, 163, 184, 0.08);
      }

      .cloud-tile-icon {
        display: inline-flex;
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
      }

      .cloud-grid.list-view .cloud-tile-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
      }

      .cloud-tile[data-cloud-kind="folder"] .cloud-tile-icon { color: #fbbf24; }
      .cloud-tile[data-cloud-kind="image"] .cloud-tile-icon { color: #86efac; }
      .cloud-tile[data-cloud-kind="video"] .cloud-tile-icon { color: #c4b5fd; }
      .cloud-tile[data-cloud-kind="doc"] .cloud-tile-icon { color: #93c5fd; }
      .cloud-tile[data-cloud-kind="other"] .cloud-tile-icon { color: var(--muted); }

      .cloud-tile-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        min-width: 0;
        width: 100%;
      }

      .cloud-grid.list-view .cloud-tile-main {
        align-items: flex-start;
      }

      .cloud-tile-name {
        width: 100%;
        color: var(--text);
        font-size: 12.5px;
        line-height: 1.35;
        text-align: center;
        word-break: break-all;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }

      .cloud-grid.list-view .cloud-tile-name {
        display: block;
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .cloud-tile-sub {
        color: var(--soft);
        font-size: 11px;
      }

      .cloud-tile-more {
        position: absolute;
        top: 6px;
        right: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.76);
        color: var(--muted);
        opacity: 0;
        cursor: pointer;
      }

      html.light-theme .cloud-tile-more {
        background: rgba(248, 250, 252, 0.92);
        border-color: var(--line-strong);
        color: var(--soft);
      }

      html.light-theme .cloud-tile-menu {
        border-color: var(--line-strong);
        background: #ffffff;
      }

      .cloud-tile-more svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
      }

      .cloud-tile:hover .cloud-tile-more,
      .cloud-tile-more[aria-expanded="true"] {
        opacity: 1;
      }

      .cloud-tile-menu {
        position: absolute;
        top: 38px;
        right: 6px;
        z-index: 8;
        display: none;
        min-width: 108px;
        padding: 5px;
        border: 1px solid var(--line-strong);
        border-radius: 8px;
        background: var(--panel-strong);
        box-shadow: var(--shadow);
      }

      .cloud-tile-menu.open {
        display: block;
      }

      .cloud-tile-menu button {
        display: block;
        width: 100%;
        padding: 7px 9px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--text);
        text-align: left;
        font-size: 12px;
        cursor: pointer;
      }

      .cloud-tile-menu button:hover {
        background: rgba(148, 163, 184, 0.12);
      }

      .cloud-tile-menu button.danger:hover {
        color: #fecaca;
        background: var(--danger-surface);
      }

      /* 加载动画：SVG 圆环旋转，spinner 进入视图时持续转，loading 文案在下方 */
      .cloud-loading-state {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 54px 20px;
        gap: 12px;
        color: var(--muted);
        font-size: 13px;
      }

      .cloud-loading-spinner {
        width: 32px;
        height: 32px;
        border: 3px solid rgba(148, 163, 184, 0.25);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: cloud-spin 0.9s linear infinite;
      }

      @keyframes cloud-spin {
        to { transform: rotate(360deg); }
      }

      /* 云盘层 z-index 段位（收紧到 75-79，传输浮层独占 78 略高于普通 action sheet）：
         - 75 = action sheet mask（蒙层）
         - 76 = action sheet（底部弹层）
         - 78 = upload tray（传输浮层，需在普通 modal 80 之上保证可见）
         - 项目其他模块：assertion modal 80 / scheduled task modal 200/300 不影响 */
      /* §12.1 移动端长按底部 action sheet（蒙层 + 文件名/大小 + 下载/删除 + 取消） */
      .cloud-action-sheet-mask {
        position: fixed;
        inset: 0;
        z-index: 75;
        background: rgba(2, 6, 23, 0.5);
      }

      /* action-sheet 弹起时互斥隐藏传输浮层（两者都在屏幕底部物理重叠） */
      body.cloud-action-open .cloud-upload-tray {
        display: none;
      }

      .cloud-action-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 76;
        padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        border: 1px solid var(--line-strong);
        border-bottom: none;
        border-radius: 18px 18px 0 0;
        background: var(--panel-strong);
        box-shadow: 0 -10px 30px rgba(2, 6, 23, 0.5);
        animation: cloud-action-sheet-rise 0.18s ease-out;
      }

      @keyframes cloud-action-sheet-rise {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
      }

      .cloud-action-sheet-title {
        padding-bottom: 4px;
        color: var(--text);
        font-size: 13px;
        font-weight: 600;
        word-break: break-all;
      }

      .cloud-action-sheet-title .size {
        margin-left: 6px;
        color: var(--soft);
        font-size: 12px;
        font-weight: 400;
      }

      .cloud-action-sheet-acts {
        display: flex;
        flex-direction: column;
      }

      .cloud-action-sheet-act {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 11px;
        padding: 13px 4px;
        border: 0;
        border-top: 1px solid var(--line);
        background: transparent;
        color: var(--text);
        font-size: 14px;
        text-align: center;
        cursor: pointer;
      }

      .cloud-action-sheet-act svg {
        width: 18px;
        height: 18px;
        color: var(--muted);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .cloud-action-sheet-act.danger,
      .cloud-action-sheet-act.danger svg {
        color: #fca5a5;
      }

      .cloud-action-sheet-cancel {
        display: block;
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        border: 1px solid var(--line-strong);
        border-radius: 10px;
        background: var(--field);
        color: var(--muted);
        font-size: 14px;
        text-align: center;
        cursor: pointer;
      }

      html.light-theme .cloud-action-sheet {
        background: #ffffff;
        border-color: var(--line-strong);
      }
      html.light-theme .cloud-action-sheet-act.danger,
      html.light-theme .cloud-action-sheet-act.danger svg {
        color: var(--danger);
      }

      /* 下拉刷新提示条：移动端 touchmove 时显示在 grid 上方 */
      .cloud-pull-refresh {
        grid-column: 1 / -1;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 0;
        overflow: hidden;
        color: var(--muted);
        font-size: 12px;
        transition: height 0.18s ease;
      }
      .cloud-pull-refresh.active {
        display: flex;
      }
      .cloud-pull-refresh .cloud-loading-spinner {
        width: 18px;
        height: 18px;
        border-width: 2px;
      }

      .cloud-empty-state {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 54px 20px;
        color: var(--soft);
        text-align: center;
        font-size: 13px;
      }

      /* 分页 sentinel：横跨整行，IntersectionObserver 监听其进入视口触发加载下一批 */
      .cloud-grid-sentinel {
        grid-column: 1 / -1;
        padding: 16px;
        color: var(--soft);
        text-align: center;
        font-size: 12px;
      }

      .cloud-empty-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
        color: var(--line-strong);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .cloud-empty-text {
        max-width: 360px;
        line-height: 1.55;
      }

      .cloud-upload-tray {
        position: fixed;
        right: 18px;
        bottom: 18px;
        z-index: 78;
        display: none;
        width: min(340px, calc(100vw - 24px));
        overflow: hidden;
        border: 1px solid var(--line-strong);
        border-radius: 10px;
        background: var(--panel-strong);
        box-shadow: var(--shadow);
      }

      .cloud-upload-tray.open {
        display: block;
      }

      .cloud-upload-tray-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
        color: var(--text);
        font-size: 13px;
        font-weight: 800;
      }

      .cloud-upload-tray-head button {
        border: 0;
        background: transparent;
        color: var(--muted);
        font-size: 18px;
        cursor: pointer;
      }

      .cloud-upload-item {
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
      }

      .cloud-upload-item:last-child {
        border-bottom: 0;
      }

      .cloud-upload-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 6px;
        font-size: 12px;
      }

      .cloud-upload-name {
        min-width: 0;
        overflow: hidden;
        color: var(--text);
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .cloud-upload-size,
      .cloud-upload-status {
        color: var(--muted);
        font-size: 11px;
      }

      .cloud-upload-track {
        height: 5px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.18);
        overflow: hidden;
      }

      .cloud-upload-track > div {
        height: 100%;
        border-radius: inherit;
        background: var(--primary);
      }

      .cloud-upload-item.fail .cloud-upload-track > div {
        background: var(--danger);
      }

      .cloud-upload-instant {
        color: var(--cyan);
        font-size: 12px;
        font-weight: 800;
      }

      /* §13 完成态进度条 + 已完成/失败文案 */
      .cloud-upload-track > div.done {
        background: var(--success, #22c55e);
      }
      .cloud-upload-status.st-done {
        color: var(--success, #22c55e);
        font-weight: 600;
      }
      .cloud-upload-status.st-fail {
        color: var(--danger, #ef4444);
      }

      /* 传输项右侧操作按钮（重试/停止） */
      .cloud-tr-actions {
        display: flex;
        gap: 5px;
        margin-left: auto;
      }
      .cloud-tr-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
      }
      .cloud-tr-btn:hover {
        color: var(--text);
        border-color: var(--soft);
      }
      .cloud-tr-btn svg {
        width: 12px;
        height: 12px;
      }
      .cloud-tr-btn.danger:hover {
        color: #fca5a5;
        border-color: rgba(239, 68, 68, 0.4);
      }

      .cloud-folder-status {
        min-height: 18px;
        margin: 8px 0 0;
        color: var(--danger);
        font-size: 12px;
      }

      .profile-card {
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.72);
        overflow: hidden;
      }

      .profile-card.account-security-open .profile-main-content {
        display: none;
      }

      .profile-card:not(.account-security-open) .profile-subpage {
        display: none;
      }

      .profile-subpage {
        min-height: 100%;
      }

      .profile-main-content {
        min-height: 0;
      }

      .profile-head {
        padding: 18px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        background: rgba(15, 23, 42, 0.58);
      }

      .profile-head-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
      }

      .profile-head-text {
        min-width: 0;
      }

      .profile-avatar {
        width: 58px;
        height: 58px;
        min-height: 58px;
        flex: 0 0 auto;
        position: relative;
        padding: 0;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 50%;
        background:
          radial-gradient(circle at 34% 33%, #f8fafc 0 6px, transparent 7px),
          radial-gradient(circle at 66% 33%, #f8fafc 0 6px, transparent 7px),
          linear-gradient(135deg, #475569, #0f766e);
        display: grid;
        place-items: center;
        overflow: hidden;
        color: #f8fafc;
        font-size: 22px;
        font-weight: 900;
        line-height: 1;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
        cursor: pointer;
        transition: transform 0.15s ease, border-color 0.15s ease;
      }

      .profile-avatar:hover {
        transform: translateY(-1px);
        border-color: rgba(96, 165, 250, 0.6);
      }

      .profile-avatar img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: inherit;
        display: block;
      }

      .profile-avatar-default {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        background: #fff;
        color: #111827;
      }

      .profile-avatar-default svg {
        width: 100%;
        height: 100%;
        display: block;
      }

      .profile-inline-control {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 3px;
        min-width: 0;
        flex: 1;
      }

      .profile-row-action {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1px;
        min-width: 0;
      }

      .profile-row-action .profile-enter-btn {
        width: 14px;
        min-width: 14px;
        text-align: center;
      }

      .profile-nickname-input {
        display: none;
        width: min(150px, 100%);
        min-height: 32px;
        padding: 6px 9px;
        border-radius: 8px;
        border: 1px solid var(--line-strong);
        background: rgba(15, 23, 42, 0.42);
        color: var(--text);
        font-size: 13px;
        font-weight: 700;
        text-align: right;
      }

      .profile-inline-control.editing .profile-nickname-input {
        display: block;
      }

      .profile-inline-control.editing .profile-nickname-text,
      .profile-inline-control.editing .profile-edit-btn {
        display: none;
      }

      .profile-nickname-text {
        min-width: 0;
        max-width: 170px;
        color: #e2e8f0;
        font-size: 13px;
        font-weight: 700;
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .profile-email-bind-btn {
        border: 0;
        background: transparent;
        color: var(--accent-2);
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
        padding: 4px 0;
      }

      .profile-email-bind-btn:hover {
        color: var(--accent);
        text-decoration: underline;
        text-decoration-style: dotted;
        text-underline-offset: 4px;
      }

      .profile-row-link-btn {
        border: 0;
        background: transparent;
        color: var(--accent-2);
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
        padding: 4px 0;
      }

      .profile-row-link-btn:hover {
        color: var(--accent);
        text-decoration: underline;
        text-decoration-style: dotted;
        text-underline-offset: 4px;
      }

      .profile-enter-btn {
        width: 28px;
        height: 32px;
        min-height: 32px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--muted);
        font-size: 18px;
        font-weight: 800;
        line-height: 1;
        text-align: right;
      }

      .profile-enter-btn:hover {
        color: var(--accent);
        background: transparent;
        text-decoration: none;
      }

      .profile-edit-btn {
        flex: 0 0 auto;
        width: auto;
        height: auto;
        min-height: 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        font-size: 14px;
        line-height: 1;
      }

      .profile-edit-btn:hover {
        color: var(--accent);
        background: transparent;
      }

      .profile-edit-icon {
        display: inline-block;
        transform: scaleX(-1);
      }

      .profile-head-nav {
        margin-bottom: 12px;
      }

      .profile-back-btn {
        padding: 5px 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--muted);
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        min-height: unset;
        transition: color 0.15s ease;
      }

      .profile-back-btn:hover {
        background: transparent;
        color: var(--text);
      }

      .profile-title {
        margin: 0 0 6px;
        font-size: 18px;
        font-weight: 800;
        color: #f8fafc;
      }

      .profile-subtitle {
        margin: 0;
        font-size: 12px;
        color: var(--muted);
      }

      .profile-rows {
        padding: 6px 0;
      }

      .profile-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 18px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.08);
      }

      .profile-row:last-child {
        border-bottom: none;
      }

      .profile-label {
        font-size: 12px;
        color: var(--muted);
      }

      .profile-value {
        min-width: 0;
        color: #e2e8f0;
        font-size: 13px;
        font-weight: 700;
        text-align: right;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .profile-actions {
        display: grid;
        gap: 10px;
        margin: 10px 18px 18px;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.1);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.36);
      }

      .profile-section {
        padding: 16px 18px;
        border-top: 1px solid rgba(148, 163, 184, 0.08);
      }

      .profile-section-title {
        margin-bottom: 4px;
        font-size: 13px;
        font-weight: 800;
        color: #e2e8f0;
      }

      .profile-section-hint {
        margin: 0 0 12px;
        font-size: 11px;
        line-height: 1.6;
        color: var(--muted);
      }

      .assertion-package-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .assertion-package-btn {
        width: 100%;
        min-height: 38px;
        padding: 8px 10px;
        font-size: 12px;
      }

      .assertion-package-import-btn {
        grid-column: auto;
      }

      .assertion-package-preview {
        display: grid;
        gap: 10px;
      }

      .assertion-package-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .assertion-package-stat {
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.5);
      }

      .assertion-package-stat strong {
        display: block;
        margin-bottom: 2px;
        color: #e2e8f0;
        font-size: 14px;
      }

      .assertion-package-stat span {
        color: var(--muted);
        font-size: 11px;
      }

      .assertion-package-list {
        max-height: 220px;
        overflow: auto;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 10px;
      }

      .assertion-package-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.08);
        font-size: 12px;
      }

      .assertion-package-row:last-child {
        border-bottom: none;
      }

      .assertion-package-row-main {
        min-width: 0;
        color: var(--text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .assertion-package-row-meta {
        color: var(--muted);
        white-space: nowrap;
      }

      .assertion-package-warning {
        margin: 0;
        color: #fed7aa;
        font-size: 12px;
        line-height: 1.6;
      }

      .scheduled-task-list {
        display: grid;
        gap: 8px;
      }

      .scheduled-task-dialog {
        max-height: min(80vh, 640px);
        display: flex;
        flex-direction: column;
      }

      .scheduled-task-dialog .assertion-dialog-body {
        overflow: auto;
      }

      /* 定时巡检卡片 M2 改版：head + sub + trend + result + history(展开) */
      .scheduled-task-item {
        position: relative; /* 让 .scheduled-task-menu-wrap absolute 锚定 */
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--field-soft, rgba(15, 23, 42, 0.36));
        cursor: pointer;
        transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
      }

      .scheduled-task-item:hover {
        border-color: var(--soft);
        background: var(--hover-soft);
      }

      /* Story#18：原型只有红边框，不加红色背景填充。PC + mobile 均统一去背景。 */
      .scheduled-task-item.status-streak,
      .scheduled-task-item.status-failed {
        border-color: rgba(239, 68, 68, 0.45);
      }

      .scheduled-task-item.status-off {
        opacity: 0.7;
      }

      .scheduled-task-item.target-missing {
        border-color: rgba(245, 158, 11, 0.45);
      }
      /* M2：目标缺失警告文字色 — Z30 用 token 翻转（dark #fcd34d / light #b45309） */
      .scheduled-task-item.target-missing .scheduled-task-sub {
        color: var(--warning-soft);
      }

      .scheduled-task-head {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }

      .scheduled-task-title-wrap {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }

      .scheduled-task-title {
        min-width: 0;
        color: var(--text);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .scheduled-task-sub {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
      }


      /* Story#18：副信息行末尾「编辑配置 →」链接，跳到配置任务页定位目标任务
         续 26 #84：用原生 button 让 Enter/Space 自带可访问性，需 reset button 默认样式 */
      .schedule-edit-config-link {
        background: transparent;
        border: 0;
        padding: 0;
        margin: 0;
        font: inherit;
        color: var(--primary, #3b82f6);
        text-decoration: none;
        font-size: 12px;
        cursor: pointer;
      }
      .schedule-edit-config-link:hover {
        text-decoration: underline;
      }
      .schedule-edit-config-link:focus-visible {
        outline: 2px solid var(--primary, #3b82f6);
        outline-offset: 2px;
      }
      /* Story#19 续：目标缺失时置灰不可点 */
      .schedule-edit-config-link.disabled {
        color: var(--soft);
        cursor: not-allowed;
        text-decoration: none;
      }
      .schedule-edit-config-link.disabled:hover {
        text-decoration: none;
      }

      /* Story#18：mobile-only 两行短副信息，PC 默认隐藏；mobile.css 切换 */
      .scheduled-task-sub-mobile {
        display: none;
      }

      /* Story#19：mobile-only 收起态「编辑」按钮 + 展开态 4 按钮 ops 行
         PC 默认隐藏；mobile.css 显示，且 ops 只在卡片 .open 时显示 */
      .schedule-task-m-edit-btn {
        display: none;
      }
      .schedule-task-m-ops {
        display: none;
      }
      /* Story#19：移动端 chip 行右侧「+ 新建」按钮，PC 默认隐藏 */
      .schedule-m-new-btn {
        display: none;
      }
      /* Story#19：概览空态 */
      .m-empty {
        text-align: center;
        padding: 14px 12px;
        color: var(--soft);
        font-size: 12px;
      }

      /* Story#18：history row 双版本 meta，PC 用长版，mobile 用短版 */
      .schedule-history-row .hmeta-short {
        display: none;
      }

      /* Story#18 续 6：原型 PC/mobile 均无 "→" 箭头，删除原 PC ::after 还原规则。
         PM 实测 8080 PC viewport 仍看到箭头——即此规则不应存在。 */

      .scheduled-task-result {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
      }

      .scheduled-task-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
      }

      .scheduled-task-actions .btn-sm {
        min-height: 28px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 8px;
      }

      /* Z10 bug#10：⋯ 与 ▾ 竖向同列（在 head 右侧固定一列） */
      .scheduled-task-rightcol {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-left: auto;
        flex: 0 0 auto;
      }

      /* ⋯ 菜单（PRD §5.1.2 / 新版 L79：删除收纳到菜单防误删）
         Story#18：⋯ inline 跟 actions 同行右侧，不再 absolute 浮层（防被 actions 遮挡）。 */
      .scheduled-task-menu-wrap {
        position: relative;
        display: inline-flex;
        margin-left: 4px;
      }
      /* Z30 bug#30：⋯ 与 ▾ 像素级对齐 — 显式同宽 28px，padding 收成 0，
         配合 rightcol 的 align-items:center 让两者 center x 精确对齐。 */
      .scheduled-task-more {
        width: 28px !important;
        padding: 0 !important;
        line-height: 1;
        font-weight: 700;
        letter-spacing: 0;   /* 收紧避免内容撑出 28px */
        text-align: center;
      }
      .scheduled-task-menu {
        position: absolute;
        top: calc(100% + 4px);
        right: 0;
        z-index: 6;
        min-width: 148px;
        padding: 5px;
        border: 1px solid var(--line-strong);
        border-radius: 9px;
        background: var(--panel-strong);
        box-shadow: var(--shadow);
        display: none;
      }
      .scheduled-task-menu.open {
        display: block;
      }
      .scheduled-task-menu-item {
        display: block;
        width: 100%;
        padding: 8px 10px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--text);
        font-size: 12.5px;
        text-align: left;
        cursor: pointer;
      }
      .scheduled-task-menu-item:hover {
        background: var(--hover-soft);
      }
      /* Z4 回退 + Z30 token 翻转：dark 柔和淡红 / light 深红，主题自适应 */
      .scheduled-task-menu-item.danger {
        color: var(--danger-soft);
      }
      .scheduled-task-menu-item.danger:hover {
        background: rgba(239, 68, 68, 0.16);
        color: var(--danger-soft-strong);
      }

      /* ▾ chevron：点卡片整体展开/收起历史（新版 L78）
         Story#18 续 12：PC 默认隐藏（原型 PC 无 chevron），mobile.css 启用 */
      .scheduled-task-chev {
        display: none;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 18px;
        color: var(--muted);
        transition: transform 0.18s ease, color 0.18s ease;
        flex: 0 0 18px;
      }
      .scheduled-task-chev svg {
        width: 100%;
        height: 100%;
      }
      .scheduled-task-item.open .scheduled-task-chev {
        transform: rotate(180deg);
        color: var(--primary);
      }

      .scheduled-task-empty {
        padding: 16px;
        border: 1px dashed var(--line);
        border-radius: 12px;
        color: var(--soft);
        font-size: 13px;
        line-height: 1.6;
        text-align: center;
      }

      /* 状态点 */
      .schedule-status-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
        background: var(--muted);
      }
      /* L*：sub / result / trend 与 status-dot 后方文字对齐（原型 margin-left:20px） */
      .scheduled-task-sub,
      .scheduled-task-result,
      .scheduled-task-history,
      .schedule-trend { margin-left: 20px; }

      /* H5 + Z4 回退：状态点 glow 与原型一致；--*-surface 实色 0.22 太暗（亮度 -56%），
         恢复原型 0.5 alpha；dot-off/dot-missing 保持无 glow（停用/缺失态不强调） */
      .schedule-status-dot.dot-normal {
        background: var(--success, #22c55e);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
      }
      .schedule-status-dot.dot-streak,
      .schedule-status-dot.dot-failed {
        background: var(--danger, #ef4444);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
      }
      .schedule-status-dot.dot-off { background: var(--soft, #64748b); }
      .schedule-status-dot.dot-missing { background: var(--warning, #f59e0b); }

      /* 类型徽标 */
      .schedule-type-badge {
        display: inline-flex;
        align-items: center;
        height: 20px;
        padding: 0 8px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 500;
        background: var(--task-api-bg);
        color: var(--task-api-fg);
        border: 1px solid var(--line);
      }
      .schedule-type-badge.badge-wss {
        background: var(--task-wss-bg);
        color: var(--task-wss-fg);
      }
      .schedule-type-badge.badge-group {
        background: var(--task-group-bg);
        color: var(--task-group-fg);
      }

      /* 状态徽标（连败/停用/缺失） */
      .schedule-status-badge {
        display: inline-flex;
        align-items: center;
        height: 20px;
        padding: 0 8px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 500;
        border: 1px solid var(--line);
        background: var(--field-soft);
        color: var(--muted);
      }
      /* Z4 回退：徽标边色由实色 var(--danger/--warning) 回到半透明 0.4/0.3，底也降回 0.10-0.12 */
      .schedule-status-badge.badge-streak {
        background: rgba(239, 68, 68, 0.12);
        color: var(--danger, #ef4444);
        border-color: rgba(239, 68, 68, 0.4);
      }
      .schedule-status-badge.badge-missing {
        background: rgba(245, 158, 11, 0.12);
        color: var(--warning, #f59e0b);
        border-color: rgba(245, 158, 11, 0.4);
      }
      .schedule-status-badge.badge-off {
        background: var(--field-soft);
        color: var(--soft);
      }
      /* L*：今日失败徽标（PRD §5.1.2 4 种状态徽标完整性） */
      .schedule-status-badge.badge-failed {
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger, #ef4444);
        border-color: rgba(239, 68, 68, 0.3);
      }

      /* 迷你趋势条 */
      .schedule-trend {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        color: var(--muted);
        flex-wrap: wrap;
      }
      .schedule-trend-label {
        color: var(--soft);
      }
      .schedule-trend-bar {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        line-height: 1;
      }
      .schedule-trend-dot {
        width: 6px;
        height: 12px;
        border-radius: 2px;
        background: var(--line-strong);
      }
      .schedule-trend-dot.pass { background: var(--success, #22c55e); }
      .schedule-trend-dot.fail { background: var(--danger, #ef4444); }
      .schedule-trend-dot.none { background: var(--line-strong); }
      .schedule-trend-empty {
        color: var(--soft);
        font-size: 11px;
        font-style: italic;
      }
      .schedule-trend-caption {
        color: var(--muted);
      }

      /* 历史展开区（M3：圆角整段卡 + 深色头条 + 行间分隔线，对齐原型） */
      .scheduled-task-history {
        display: none;
        margin-top: 6px;
        padding: 0;
        background: var(--field-soft);
        border: 1px solid var(--line);
        border-radius: 12px;
        overflow: hidden;
      }
      .scheduled-task-item.open .scheduled-task-history {
        display: block;
      }
      .schedule-history-loading {
        color: var(--muted);
        font-size: 12px;
        text-align: center;
        padding: 12px 14px;
      }
      .schedule-history-empty {
        color: var(--soft);
        font-size: 12px;
        text-align: center;
        padding: 16px 14px;
        font-style: italic;
      }
      .schedule-history-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
        margin-bottom: 0;
        background: var(--tab-bar-bg);
        border-bottom: 1px solid var(--line);
        color: var(--muted);
        font-size: 12px;
      }
      .schedule-history-title {
        color: var(--text);
        font-weight: 600;
      }
      .schedule-history-hint {
        color: var(--soft);
        font-size: 11px;
      }
      .schedule-history-rows {
        display: flex;
        flex-direction: column;
        gap: 0;
      }
      .schedule-history-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 14px;
        font-size: 13px;
        border-top: 1px solid var(--line);
        transition: background 0.15s ease;
      }
      .schedule-history-row:first-child { border-top: 0; }
      .schedule-history-row > .htime { width: 96px; flex-shrink: 0; }
      .schedule-history-row > .hmeta { flex: 1; }
      .schedule-history-row > .hstat,
      .schedule-history-row > .htag,
      .schedule-history-row > .btn-sm { flex-shrink: 0; }
      .schedule-history-row:hover {
        background: var(--hover-soft);
      }
      .schedule-history-row.row-evicted {
        opacity: 0.45;
      }
      .schedule-history-row .htime {
        color: var(--text);
        font-weight: 500;
      }
      .schedule-history-row .hmeta {
        color: var(--muted);
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      /* L*：去胶囊，纯文字色（emoji + 文字），与原型一致 */
      .schedule-history-row .hstat {
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
      }
      .schedule-history-row .hstat.pass { color: var(--success, #22c55e); }
      .schedule-history-row .hstat.fail { color: var(--danger, #ef4444); }
      .schedule-history-row .hstat.stopped { color: var(--soft); }
      .schedule-history-row .htag {
        display: inline-flex;
        align-items: center;
        height: 18px;
        padding: 0 6px;
        border-radius: 4px;
        font-size: 10px;
        background: var(--hover-soft);
        color: var(--soft);
        border: 1px solid var(--line);
      }
      .schedule-history-row .htag.tag-manual {
        color: var(--primary);
        border-color: var(--primary);
        background: var(--primary-surface);
      }
      .schedule-history-row .htag.tag-evict {
        color: var(--warning, #f59e0b);
        border-color: var(--warning);
        background: var(--warning-surface);
      }
      .schedule-history-row .btn-sm {
        min-height: 26px;
        padding: 0 10px;
        font-size: 11px;
      }
      .schedule-history-foot {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px dashed var(--line);
        text-align: center;
      }

      /* 概览条 PC：4 列 */
      .schedule-overview {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-bottom: 12px;
      }
      .schedule-overview:empty {
        display: none;
      }
      .ov-card {
        position: relative;
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--field-soft, rgba(15, 23, 42, 0.36));
        transition: border-color 0.2s ease, transform 0.2s ease;
      }
      .ov-card[data-schedule-overview-filter] {
        cursor: pointer;
      }
      .ov-card[data-schedule-overview-filter]:hover {
        border-color: var(--soft);
        transform: translateY(-1px);
      }
      /* Z9 bug#9：active 强化为全色蓝面板（蓝底 + 蓝边），与 next-exec 信息卡视觉差异显著 */
      .ov-card.active {
        background: var(--primary-surface, rgba(59, 130, 246, 0.12));
        border-color: var(--primary, #3b82f6);
      }
      .ov-card.active .ov-num {
        color: var(--primary, #3b82f6);
      }
      /* Z8 bug#8：next-exec 弱化为"信息卡"风格 — 沿用默认 ov-card 底色，
         仅靠左侧 3px 蓝色 accent 条 + 蓝色数字突出"下一个执行"信息属性，
         不再呈现全色蓝面板的"看似选中态"视觉。 */
      .ov-card.next-exec {
        border-left: 3px solid var(--primary, #3b82f6);
        padding-left: 13px;
        cursor: pointer;
      }
      .ov-card.next-exec .ov-num {
        color: var(--primary, #3b82f6);
        font-size: 17px;
      }
      .ov-card.next-exec:hover {
        border-color: var(--soft);
        border-left-color: var(--primary, #3b82f6);
        transform: translateY(-1px);
      }
      .ov-num {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.1;
        color: var(--text);
      }
      .ov-num.ov-num-text {
        font-size: 16px;
        padding-top: 4px;
      }
      .ov-num.alert {
        color: var(--danger, #ef4444);
      }
      .ov-label {
        margin-top: 6px;
        color: var(--muted);
        font-size: 12px;
      }
      .ov-hint {
        position: absolute;
        top: 10px;
        right: 12px;
        font-size: 10px;
        color: var(--soft);
      }

      /* 移动端单行概览 */
      .schedule-overview-mobile {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
        padding: 8px 10px;
        background: var(--field-soft, rgba(15, 23, 42, 0.36));
        border: 1px solid var(--line);
        border-radius: 10px;
        font-size: 12px;
        color: var(--muted);
        grid-template-columns: none;
      }
      .schedule-overview-mobile:empty {
        display: none;
      }
      .schedule-overview-mobile .ov-m-cell {
        display: inline-flex;
        align-items: baseline;
        gap: 4px;
      }
      .schedule-overview-mobile .ov-m-cell.alert {
        color: var(--danger, #ef4444);
      }
      .schedule-overview-mobile .ov-m-cell[data-schedule-overview-filter] {
        cursor: pointer;
      }
      .schedule-overview-mobile .ov-m-label {
        color: var(--soft);
      }
      .schedule-overview-mobile .ov-m-cell b {
        color: var(--text);
        font-weight: 700;
      }
      .schedule-overview-mobile .ov-m-cell.alert b {
        color: var(--danger, #ef4444);
      }
      .schedule-overview-mobile .ov-m-sep {
        color: var(--soft);
      }

      /* 工具条 */
      .schedule-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 10px;
      }
      .schedule-toolbar:empty {
        display: none;
      }
      .schedule-search {
        flex: 1;
        min-width: 200px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--field, rgba(15, 23, 42, 0.5));
      }
      .schedule-search-icon {
        color: var(--soft);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .schedule-search-input {
        flex: 1;
        min-width: 0;
        background: transparent;
        border: none;
        outline: none;
        color: var(--text);
        font-size: 13px;
      }
      .schedule-chips {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
      }
      /* H6：PC「列表/日程」视图切换 */
      .schedule-viewtoggle {
        display: inline-flex;
        align-items: center;
        gap: 0;
        border: 1px solid var(--line-strong, var(--line));
        border-radius: 999px;
        overflow: hidden;
        margin-left: auto;
      }
      .schedule-view-btn {
        border: 0;
        background: transparent;
        color: var(--muted);
        padding: 4px 14px;
        font-size: 12px;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
      }
      .schedule-view-btn:hover { color: var(--text); }
      .schedule-view-btn.active {
        background: var(--primary, #3b82f6);
        color: var(--on-primary);
      }
      .agenda-row.off { opacity: 0.6; }
      .agenda-row.off .agenda-time { color: var(--soft); }
      .schedule-chip {
        border: 1px solid var(--line-strong, var(--line));
        background: transparent;
        color: var(--muted);
        border-radius: 999px;
        padding: 4px 12px;
        font-size: 12px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
      }
      .schedule-chip:hover {
        color: var(--text);
        border-color: var(--soft);
      }
      .schedule-chip.active {
        background: var(--primary-surface, rgba(59, 130, 246, 0.18));
        color: var(--text);
        border-color: var(--primary, #3b82f6);
      }
      .schedule-sort-hint {
        width: 100%;
        color: var(--soft);
        font-size: 11px;
        margin-top: -4px;
        margin-bottom: 6px;
      }

      /* 星期多选按钮组（weekly mode） */
      .schedule-weekdays-field {
        grid-column: 1 / -1; /* 跨满 .schedule-inline 的 3 列 grid */
      }
      .schedule-weekdays-picker {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
      }
      /* L*：原型 .wd 36×36 圆角方块 */
      .schedule-weekday-btn {
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid var(--line-strong, var(--line));
        background: transparent;
        color: var(--muted);
        border-radius: 9px;
        font-size: 12px;
        cursor: pointer;
        transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
      }
      .schedule-weekday-btn:hover {
        border-color: var(--soft);
        color: var(--text);
      }
      .schedule-weekday-btn.active {
        background: var(--primary-surface, rgba(59, 130, 246, 0.18));
        color: var(--text);
        border-color: var(--primary, #3b82f6);
      }

      /* 目标选择器（M4：模块内新建） */
      #scheduleTargetPickerModal {
        z-index: 300;  /* 高于 scheduledTaskViewModal (200)，允许从查看 modal 内打开 */
      }
      .schedule-target-dialog {
        max-width: 560px;
        width: 90vw;
      }
      .schedule-target-search {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--field, rgba(15, 23, 42, 0.5));
      }
      .schedule-target-groups {
        display: flex;
        flex-direction: column;
        gap: 14px;
        max-height: 60vh;
        overflow-y: auto;
      }
      .schedule-target-group-title {
        color: var(--muted);
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 6px;
      }
      .schedule-target-count {
        color: var(--soft);
        font-weight: 400;
        margin-left: 4px;
      }
      .schedule-target-list {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }
      /* M4：目标项 = 左 radio 圆点 + 文字；.sel 持久蓝边蓝底 */
      .schedule-target-item {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--field-soft, rgba(15, 23, 42, 0.36));
        color: var(--text);
        cursor: pointer;
        font-size: 13px;
        transition: border-color 0.15s ease, background 0.15s ease;
      }
      .schedule-target-radio {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid var(--soft);
        flex: 0 0 14px;
        box-sizing: border-box;
      }
      .schedule-target-item:hover {
        border-color: var(--primary, #3b82f6);
        background: var(--primary-surface);
      }
      .schedule-target-item.sel {
        border-color: var(--primary, #3b82f6);
        background: var(--primary-surface, rgba(59, 130, 246, 0.12));
      }
      .schedule-target-item.sel .schedule-target-radio {
        border-color: var(--primary, #3b82f6);
        background: var(--primary, #3b82f6);
      }
      .schedule-target-item-name { flex: 1 1 auto; min-width: 0; }
      .schedule-target-empty {
        color: var(--soft);
        text-align: center;
        padding: 24px 12px;
        font-size: 12px;
      }

      /* head 区右侧按钮 */
      .schedule-page-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
      }

      /* 移动端 m-appbar / m-tabbar / overview / agenda 容器（PC 默认全隐，mobile.css 在 schedule view 时显示） */
      .schedule-m-appbar,
      .schedule-m-tabbar,
      .schedule-mobile-overview,
      .schedule-agenda {
        display: none;
      }

      /* L*：让出 iOS 全面屏顶部 safe-area；移动端 m-tabbar 已让 bottom，对齐处理 */
      .schedule-m-appbar {
        align-items: center;
        gap: 10px;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
        border-bottom: 1px solid var(--line);
      }
      .schedule-m-back,
      .schedule-m-new {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--text);
        cursor: pointer;
      }
      .schedule-m-back svg { width: 20px; height: 20px; }
      .schedule-m-new {
        background: var(--primary);
        color: var(--on-primary);
        border-radius: 50%;
        font-size: 20px;
        line-height: 1;
        font-weight: 600;
      }
      .schedule-m-title {
        flex: 1 1 auto;
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: var(--text);
        min-width: 0;
      }

      /* Story#18 续 18：schedule-m-tabbar / schedule-m-tab 已加入 mobile.css 共享样式组
         （.mobile-tabbar / .mobile-tab）跟工作台/WSS/任务模块同款；这里 PC 默认不渲染。 */

      /* 移动端 overview 2x2 网格（B#2） */
      .schedule-mobile-overview {
        flex-direction: column;
        gap: 12px;
        padding: 12px 14px;
      }
      .m-ov-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
      }
      .m-ov-card {
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--field-soft);
        cursor: pointer;
        transition: border-color 0.15s, transform 0.15s;
      }
      .m-ov-card:hover {
        border-color: var(--soft);
        transform: translateY(-1px);
      }
      .m-ov-card.alert {
        border-color: var(--danger);
      }
      .m-ov-card.alert .m-ov-num {
        color: var(--danger, #f87171);
      }
      /* L*：移动概览 active 高亮 + 触控热区 */
      /* Story#18 续 14：选中态视觉对齐
         用户反馈"明早 07:53"卡常驻蓝色填充+蓝边看起来像选中态，但不该常驻。
         改：.active（chip filter 命中时）用蓝色填充+蓝边，跟"明早"现在样式
         统一；.next 卡保留蓝色数字突出但不再背景填充蓝色，常规灰边。 */
      .m-ov-card.active {
        background: var(--primary-surface, rgba(59, 130, 246, 0.16));
        border-color: var(--primary, #3b82f6);
      }
      .m-ov-card { min-height: 72px; touch-action: manipulation; }
      .m-task { min-height: 64px; touch-action: manipulation; }
      .agenda-row { min-height: 52px; touch-action: manipulation; }
      .m-ov-card.next .m-ov-num {
        color: var(--primary);
        font-size: 14px;
        line-height: 1.3;
      }
      .m-ov-num {
        font-size: 22px;
        font-weight: 700;
        color: var(--text);
        line-height: 1.1;
      }
      .m-ov-label {
        margin-top: 4px;
        font-size: 12px;
        color: var(--muted);
      }
      .m-ov-hint {
        margin-top: 6px;
        font-size: 11px;
        color: var(--soft);
      }

      /* B#3 故障 Top 卡 */
      .m-ov-section-title {
        font-size: 12px;
        font-weight: 600;
        color: var(--muted);
        margin: 6px 2px 0;
      }
      .m-task {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--field-soft);
        cursor: pointer;
        transition: border-color 0.15s, transform 0.15s;
      }
      /* L*：克制感 — 仅换边色，不换背景，避免多张失败卡叠加整页发红 */
      .m-task.fail {
        border-color: var(--danger);
      }
      .m-task-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex: 0 0 10px;
      }
      /* Z4 回退：移动端 glow 与 PC 同口径，恢复原型 0.5 alpha */
      .m-task-dot.dot-fail {
        background: var(--danger, #ef4444);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
      }
      .m-task-dot.dot-pass {
        background: var(--success, #22c55e);
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
      }
      .m-task-main {
        flex: 1 1 auto;
        min-width: 0;
      }
      /* M9：m-task 字号对齐原型（14/11.5），badge 顶右 */
      .m-task-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
      }
      /* Z4 回退 + Z30：底 0.18 半透明红 + token 翻转字色（dark #fca5a5 / light #b91c1c） */
      .m-task-title .badge.streak {
        margin-left: auto;
        padding: 1px 6px;
        background: rgba(239, 68, 68, 0.18);
        color: var(--danger-soft);
        border-radius: 999px;
        font-size: 10px;
        font-weight: 600;
        flex: 0 0 auto;
      }
      .m-task-sub {
        margin-top: 4px;
        font-size: 11.5px;
        color: var(--soft);
      }

      /* B#4 日程 tab（agenda） */
      .schedule-agenda {
        flex-direction: column;
        gap: 14px;
        padding: 12px 14px;
      }
      .agenda-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      /* M7：标题加横线 + ·N 个；H3：.next 蓝边蓝底 + .agenda-cd 蓝字 */
      .agenda-group-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 600;
        color: var(--muted);
      }
      .agenda-group-title::after {
        content: "";
        flex: 1 1 auto;
        height: 1px;
        background: var(--line);
      }
      .agenda-group-title .cnt {
        color: var(--muted);
        font-weight: 400;
        font-size: 11px;
      }
      .agenda-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--field-soft);
        cursor: pointer;
        transition: border-color 0.15s;
      }
      .agenda-row:hover { border-color: var(--soft); }
      .agenda-row.next {
        border-color: var(--primary);
        background: var(--primary-surface, rgba(59, 130, 246, 0.1));
      }
      .agenda-cd {
        color: var(--primary);
        font-size: 12px;
        font-weight: 600;
        flex: 0 0 auto;
        white-space: nowrap;
      }
      /* M8：时间列改 .text 主色 + 700 粗 + 88 宽，蓝色让给 .agenda-cd */
      .agenda-time {
        font-size: 12px;
        font-weight: 700;
        color: var(--text);
        flex: 0 0 88px;
        white-space: nowrap;
      }
      .agenda-name {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 13px;
        color: var(--text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .agenda-meta {
        flex: 0 0 auto;
        font-size: 11px;
        color: var(--soft);
      }
      .schedule-agenda-empty {
        padding: 40px 16px;
        text-align: center;
        color: var(--soft);
        font-size: 12px;
      }
      /* L*：单桶为空时的弱灰提示（如「今天没有待执行的任务了」） */
      .agenda-empty {
        color: var(--soft);
        font-size: 12.5px;
        padding: 2px 2px 4px;
      }
      .schedule-new-btn {
        min-height: 32px;
        padding: 0 14px;
        font-size: 13px;
      }

      .wss-page {
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
      }

      .wss-mobile-tabbar {
        display: none;
      }

      .wss-page > .panel,
      .wss-page .panel-body {
        width: 100%;
        min-height: 0;
      }

      .wss-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(180px, 18%, 320px);
        gap: 8px;
        width: 100%;
        height: 100%;
        min-height: 0;
      }

      .wss-debugger-native {
        min-height: 0;
        height: 100%;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        background: transparent;
        display: block;
      }

      .wss-task-panel {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--panel);
        overflow: visible;
      }

      .wss-panel-rail {
        position: absolute;
        left: -13px;
        top: 50%;
        transform: translateY(-50%);
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        background: var(--panel);
        color: var(--muted);
        cursor: pointer;
        padding: 0;
        z-index: 20;
        box-shadow: 0 1px 4px rgba(2, 6, 23, 0.14);
        transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
      }

      .wss-panel-rail:hover {
        transform: translateY(-50%);
        border-color: var(--primary);
        color: var(--primary);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
      }

      .wss-rail-arrow {
        width: 8px;
        height: 13px;
        transition: transform 0.25s ease;
      }

      .panel-collapsed .wss-rail-arrow {
        transform: rotate(180deg);
      }

      .wss-task-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-shrink: 0;
      }

      .wss-task-list {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: 2px;
        scrollbar-color: var(--line-strong) transparent;
      }

      .wss-task-list .test-task-saved-item {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        overflow: visible;
      }

      .wss-task-list .test-task-saved-main,
      .wss-task-list .test-task-saved-actions {
        min-width: 0;
      }

      .wss-task-list .test-task-card-menu {
        z-index: 12;
      }

      .wss-task-list .test-task-card-menu-options {
        right: 0;
        max-width: calc(100vw - 32px);
      }

      .wss-task-empty,
      .wss-task-status {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
      }

      .wss-task-status {
        flex-shrink: 0;
        min-height: 18px;
      }

      /* ── WSS 面板收起态：panel 缩到 85px ── */
      .wss-layout {
        transition: grid-template-columns 0.25s ease;
      }

      .wss-layout.panel-collapsed {
        grid-template-columns: minmax(0, 1fr) clamp(96px, 9%, 150px);
      }

      /* 收起态：隐藏标题/状态文字，面板内容改为铺满高度的迷你任务行 */
      .panel-collapsed .wss-task-status,
      .panel-collapsed #wssSaveTaskBtn {
        display: none;
      }

      .panel-collapsed .wss-task-panel-head {
        display: flex;
        justify-content: center;
        text-align: center;
      }

      .panel-collapsed .wss-task-panel-btns {
        display: none;
      }

      .panel-collapsed .wss-task-panel {
        padding: 10px 8px;
      }

      .panel-collapsed .wss-task-list {
        display: flex;
        flex-direction: column;
      }

      /* ── WSS 面板头部按钮行 ── */
      .wss-task-panel-btns {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
      }

      /* ── WSS 面板内按钮样式（wss.css 的全局 reset 已通过 :not(.wss-task-panel *) 排除，无需 #wssPage 前缀） ── */
      .wss-panel-rail {
        position: absolute;
        left: -13px;
        top: 50%;
        transform: translateY(-50%);
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        background: var(--panel);
        color: var(--muted);
        cursor: pointer;
        padding: 0;
        z-index: 20;
        box-shadow: 0 1px 4px rgba(2, 6, 23, 0.14);
        transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
      }

      .wss-panel-rail:hover {
        transform: translateY(-50%);
        border-color: var(--primary);
        color: var(--primary);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
      }

      html.light-theme .wss-panel-rail {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
      }

      html.light-theme .wss-panel-rail:hover {
        transform: translateY(-50%);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
      }

      .wss-mini-run-btn.test-task-stop-action {
        background: #dc2626;
        color: #fff;
      }

      .wss-mini-run-btn.test-task-stop-action:hover {
        background: #b91c1c;
      }

      .wss-task-list .test-task-card-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        min-height: unset;
        padding: 0;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 7px;
        background: rgba(15, 23, 42, 0.52);
        color: var(--soft);
        font-size: 14px;
        font-weight: normal;
        gap: 0;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
        transform: none;
      }

      .wss-task-list .test-task-card-menu-btn:hover,
      .wss-task-list .test-task-card-menu.open .test-task-card-menu-btn {
        background: rgba(37, 99, 235, 0.22);
        border-color: rgba(96, 165, 250, 0.32);
        color: #bfdbfe;
        transform: none;
      }

      .wss-task-list .test-task-card-menu-option {
        display: block;
        width: 100%;
        min-height: unset;
        padding: 7px 10px;
        border: none;
        border-radius: 6px;
        background: transparent;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
        gap: 0;
        transform: none;
        transition: background 0.15s, color 0.15s;
      }

      .wss-task-list .test-task-card-menu-option:hover {
        background: rgba(59, 130, 246, 0.16);
        color: #dbeafe;
        transform: none;
      }

      .wss-task-list .test-task-card-menu-option.danger {
        color: #fca5a5;
      }

      .wss-task-list .test-task-card-menu-option.danger:hover {
        background: rgba(239, 68, 68, 0.16);
        color: #fecaca;
      }

      html.light-theme .wss-task-list .test-task-card-menu-btn {
        background: rgba(248, 250, 252, 0.9);
        border-color: rgba(100, 116, 139, 0.2);
        color: #64748b;
      }

      html.light-theme .wss-task-list .test-task-card-menu-option {
        color: #334155;
      }

      html.light-theme .wss-task-list .test-task-card-menu-option:hover {
        background: rgba(219, 234, 254, 0.74);
        color: #1d4ed8;
      }

      html.light-theme .wss-task-list .test-task-card-menu-option.danger {
        color: #dc2626;
      }

      /* ── WSS 展开态卡片布局修复 ── */
      .wss-task-list .wss-task-card-header {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        margin-bottom: 5px;
      }

      .wss-task-list .wss-task-card-header .test-task-saved-title {
        flex: 1 1 auto;
        min-width: 0;
      }

      .wss-task-list .wss-task-run-btn {
        flex: 0 0 auto;
        padding: 4px 10px;
        font-size: 11px;
        border-radius: 8px;
        line-height: 1.4;
        min-height: unset;
      }

      /* ⋯ 菜单改为 flex 行内元素，不再绝对定位 */
      .wss-task-list .test-task-card-menu {
        position: static;
        top: auto;
        right: auto;
        z-index: auto;
        flex: 0 0 auto;
      }

      .wss-task-list .test-task-card-menu-options {
        position: absolute;
        top: auto;
        bottom: 0;
        right: 0;
        transform: translateY(100%);
        margin-top: 4px;
      }

      .wss-task-list .test-task-saved-meta {
        margin-top: 2px;
      }

      .wss-task-list .test-task-card-progress {
        margin-top: 7px;
      }

      /* ── WSS 收起态：统计 + 环形图 + 任务行 ── */
      .wss-panel-summary {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .wss-panel-stats {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .wss-stat-chip {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        flex: 1 1 auto;
        padding: 8px 6px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.3);
      }

      .wss-stat-num {
        font-size: 20px;
        font-weight: 800;
        color: var(--text);
        line-height: 1;
        font-variant-numeric: tabular-nums;
      }

      .wss-stat-label {
        font-size: 10px;
        color: var(--muted);
        white-space: nowrap;
      }

      .wss-stat-chip.fail .wss-stat-num {
        color: #f87171;
      }

      html.light-theme .wss-stat-chip {
        background: rgba(248, 250, 252, 0.8);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .wss-stat-chip.fail .wss-stat-num {
        color: #dc2626;
      }

      .wss-ring-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: center;
      }

      .wss-ring-chart {
        width: 72px;
        height: 72px;
        display: block;
      }

      .wss-ring-track {
        stroke: rgba(148, 163, 184, 0.18);
      }

      html.light-theme .wss-ring-track {
        stroke: rgba(100, 116, 139, 0.18);
      }

      .wss-ring-progress {
        stroke: #22c55e;
        stroke-linecap: round;
        transition: stroke-dasharray 0.3s ease;
      }

      .wss-ring-progress.warn {
        stroke: #ef4444;
      }

      .wss-ring-center {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        pointer-events: none;
      }

      .wss-ring-pct {
        font-size: 14px;
        font-weight: 800;
        color: var(--text);
        line-height: 1;
        font-variant-numeric: tabular-nums;
      }

      .wss-ring-sub {
        font-size: 9px;
        color: var(--muted);
        line-height: 1;
        font-variant-numeric: tabular-nums;
      }

      /* 收起态任务行：任务名 + 环境 + 状态灯 + 圆形运行按钮 */
      .wss-mini-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .wss-mini-row {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
      }

      .wss-mini-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(148, 163, 184, 0.4);
        flex: 0 0 auto;
      }

      .wss-mini-info {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
      }

      .wss-mini-name {
        font-size: 11px;
        font-weight: 700;
        color: var(--text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .wss-mini-env {
        font-size: 10px;
        color: var(--muted);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .wss-mini-dot.dot-success {
        background: #22c55e;
      }

      .wss-mini-dot.dot-fail {
        background: #ef4444;
      }

      .wss-mini-dot.dot-running {
        background: #3b82f6;
        animation: wssMiniDotPulse 1.2s ease-in-out infinite;
      }

      @keyframes wssMiniDotPulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.4; }
      }

      .wss-mini-run-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 999px;
        border: 1px solid rgba(59, 130, 246, 0.24);
        background: rgba(15, 23, 42, 0.88);
        color: #bfdbfe;
        cursor: pointer;
        font-size: 12px;
        line-height: 1;
        flex: 0 0 auto;
        transition: background 0.15s, border-color 0.15s;
      }

      .wss-mini-run-btn:hover {
        background: rgba(30, 41, 59, 0.92);
        border-color: rgba(96, 165, 250, 0.44);
      }

      html.light-theme .wss-mini-run-btn {
        background: rgba(241, 245, 249, 0.95);
        color: #1d4ed8;
        border-color: rgba(37, 99, 235, 0.25);
      }

      html.light-theme .wss-mini-run-btn:hover {
        background: rgba(219, 234, 254, 0.7);
      }

      .profile-setting-select {
        width: auto;
        min-width: 80px;
        padding: 5px 8px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 8px;
        border: 1px solid var(--line-strong);
        background: var(--panel);
        color: var(--text);
        cursor: pointer;
        min-height: unset;
      }

      .danger-btn {
        color: #fecaca;
        border: 1px solid rgba(239, 68, 68, 0.34);
        background: rgba(127, 29, 29, 0.52);
      }

      .danger-btn:hover {
        background: rgba(153, 27, 27, 0.72);
      }

      html.light-theme .danger-btn {
        color: #b91c1c;
        border-color: rgba(220, 38, 38, 0.34);
        background: rgba(254, 226, 226, 0.9);
      }

      html.light-theme .danger-btn:hover {
        background: rgba(254, 202, 202, 0.95);
        border-color: rgba(220, 38, 38, 0.5);
      }

      .clear-debug-data-btn {
        color: #fed7aa;
        border: 1px solid rgba(249, 115, 22, 0.34);
        background: rgba(124, 45, 18, 0.42);
      }

      .clear-debug-data-btn:hover {
        background: rgba(154, 52, 18, 0.62);
      }

      html.light-theme .clear-debug-data-btn {
        color: #9a3412;
        border-color: rgba(234, 88, 12, 0.35);
        background: rgba(255, 237, 213, 0.85);
      }

      .shell {
        max-width: 1600px;
        margin: 0 auto;
        padding: 16px;
        min-height: 100vh;
      }

      .test-config-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
      }

      .test-config-tile {
        display: flex;
        flex-direction: column;
        gap: 12px;
        min-height: 96px;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.36);
      }

      .test-config-tile strong {
        display: block;
        color: var(--text);
        font-size: 13px;
        font-weight: 900;
      }

      .test-config-tile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }

      .test-config-badge {
        flex: 0 0 auto;
        padding: 3px 8px;
        border-radius: 999px;
        background: rgba(59, 130, 246, 0.14);
        border: 1px solid rgba(59, 130, 246, 0.22);
        color: #93c5fd;
        font-size: 10px;
        font-weight: 800;
      }

      .test-config-list {
        display: grid;
        gap: 8px;
        min-width: 0;
      }

      .test-config-row {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 8px;
        align-items: baseline;
        min-width: 0;
      }

      .test-config-label {
        color: var(--soft);
        font-size: 11px;
        white-space: nowrap;
      }

      .test-config-value {
        min-width: 0;
        color: var(--text);
        font-size: 12px;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-config-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: auto;
      }

      .test-config-action {
        min-height: 28px;
        padding: 0 10px;
        border-radius: 8px;
        font-size: 11px;
      }

      .test-task-head-actions,
      .test-task-section-head,
      .test-task-item-head,
      .test-task-assertion-row {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .test-task-head-actions,
      .test-task-section-head,
      .test-task-item-head {
        justify-content: space-between;
      }

      .test-task-section-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
      }

      .test-task-level-assertion-entry.active {
        color: #bfdbfe;
        background: rgba(59, 130, 246, 0.16);
        border-color: rgba(96, 165, 250, 0.3);
      }

      .test-task-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
        gap: 12px;
        min-height: 0;
        height: calc(100vh - 96px);
      }

      .test-task-editor,
      .test-task-side {
        display: grid;
        gap: 12px;
        min-width: 0;
        min-height: 0;
      }

      .test-task-editor {
        grid-template-rows: minmax(0, 1fr) minmax(180px, 0.46fr);
      }

      .test-task-side {
        grid-template-rows: minmax(0, 1fr);
      }

      .test-task-section {
        min-width: 0;
        min-height: 0;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.36);
      }

      .test-task-builder-section {
        --test-task-config-columns: minmax(260px, 0.85fr) minmax(320px, 1fr) minmax(360px, 1.05fr);
        --test-task-config-gap: 12px;
        position: relative;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr) auto;
        gap: 12px;
        border-color: var(--line);
        background: #0f172a;
        box-shadow: var(--shadow);
        overflow: hidden;
      }

      .test-task-editor-close {
        position: absolute;
        z-index: 5;
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.48);
        color: var(--soft);
        font-size: 18px;
        line-height: 1;
        cursor: pointer;
      }

      .test-task-editor-close:hover {
        border-color: rgba(96, 165, 250, 0.34);
        background: rgba(30, 41, 59, 0.82);
        color: var(--text);
      }

      html.light-theme .test-task-builder-section {
        background: #ffffff;
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .wss-task-builder-section {
        background: #ffffff;
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-group-builder-section {
        background: #ffffff;
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .test-task-group-toggle,
      html.light-theme .test-task-group-icon-btn {
        background: rgba(248, 250, 252, 0.82);
        border-color: rgba(100, 116, 139, 0.14);
      }

      .test-task-editor-content {
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        min-width: 0;
        min-height: 0;
        height: calc(100vh - 88px);
        width: min(1180px, calc(100vw - 64px));
        position: fixed;
        z-index: 80;
        top: 44px;
        left: 50%;
        transform: translateX(-50%);
      }

      .test-task-editor:not(.open) .test-task-editor-content,
      .test-task-start-panel {
        display: none;
      }

      .test-task-editor.open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(2, 6, 23, 0.62);
        backdrop-filter: blur(10px);
      }

      html.light-theme .test-task-editor.open::before {
        background: rgba(15, 23, 42, 0.35);
      }

      .test-task-start-panel {
        place-items: center;
        align-content: center;
        gap: 12px;
        min-height: 100%;
        text-align: center;
      }

      .test-task-saved-section,
      .test-task-group-section,
      .test-task-result-section {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        overflow: hidden;
      }

      .test-task-start-title {
        color: var(--text);
        font-size: 15px;
        font-weight: 900;
      }

      .test-task-start-meta {
        margin-top: 6px;
        color: var(--soft);
        font-size: 12px;
      }

      .test-task-editor-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-builder-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        min-width: 0;
      }

      .test-task-builder-head > div {
        min-width: 0;
      }

      .test-task-section-title {
        color: var(--text);
        font-size: 13px;
        font-weight: 900;
      }

      .test-task-section-meta {
        margin-top: 4px;
        color: var(--soft);
        font-size: 11px;
      }

      .test-task-fields {
        display: grid;
        grid-template-columns: var(--test-task-config-columns);
        gap: var(--test-task-config-gap);
        margin-top: 12px;
      }

      .test-task-builder-section .test-task-fields {
        margin-top: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-fields .field {
        margin: 0;
      }

      .test-task-name-field {
        grid-column: 1 / span 2;
      }

      .test-task-env-field {
        grid-column: 3;
      }

      .test-task-variables-field {
        grid-column: 1 / -1;
        display: grid;
        gap: 8px;
        margin-top: 0;
        padding-top: 2px;
      }

      .test-task-variable-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 12px;
      }

      .test-task-variable-row {
        display: grid;
        gap: 8px;
        align-items: center;
      }

      .test-task-variable-head-copy {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px 10px;
        min-width: 0;
      }

      .test-task-variable-head-copy .config-sub-label {
        margin-bottom: 0;
      }

      .test-task-variable-note,
      .test-task-variable-empty {
        color: var(--soft);
        font-size: 11px;
      }

      .test-task-variable-row {
        grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr) 32px;
      }

      .test-task-variable-list {
        display: grid;
        gap: 8px;
      }

      .test-task-variable-remove {
        height: 32px;
        border: 1px solid rgba(239, 68, 68, 0.34);
        border-radius: 6px;
        background: rgba(127, 29, 29, 0.52);
        color: #fecaca;
        cursor: pointer;
      }

      .test-task-variable-remove:hover {
        background: rgba(153, 27, 27, 0.72);
        border-color: rgba(248, 113, 113, 0.44);
      }

      html.light-theme .test-task-variable-remove {
        color: #b91c1c;
        border-color: rgba(220, 38, 38, 0.34);
        background: rgba(254, 226, 226, 0.9);
      }

      html.light-theme .test-task-variable-remove:hover {
        background: rgba(254, 202, 202, 0.95);
        border-color: rgba(220, 38, 38, 0.5);
      }

      .test-task-variable-remove:disabled {
        cursor: not-allowed;
        opacity: 0.45;
      }

      .test-task-api-picker {
        position: relative;
        min-width: 0;
      }

      .test-task-api-picker-controls {
        display: grid;
        grid-template-columns: minmax(116px, 0.48fr) minmax(0, 1fr);
        gap: 8px;
        min-width: 0;
      }

      .test-task-config-grid {
        display: grid;
        grid-template-columns: var(--test-task-config-columns);
        gap: var(--test-task-config-gap);
        align-items: stretch;
        margin-top: 12px;
        min-width: 0;
        min-height: 0;
        height: 100%;
      }

      .test-task-builder-section .test-task-config-grid {
        margin-top: 0;
      }

      .test-task-api-column {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
        min-width: 0;
        min-height: 0;
      }

      .test-task-api-options,
      .test-task-selected-list,
      .test-task-parameter-pane,
      .test-task-assertion-pane,
      .test-task-list,
      .test-task-group-list,
      .test-task-result {
        display: grid;
        gap: 8px;
        align-content: start;
        grid-auto-rows: max-content;
        min-width: 0;
      }

      .test-task-api-options {
        position: absolute;
        z-index: 30;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        display: none;
        max-height: 280px;
        overflow: auto;
        padding: 6px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 18px 36px rgba(2, 6, 23, 0.35);
      }

      .test-task-api-picker.open .test-task-api-options {
        display: grid;
      }

      .test-task-selected-list {
        max-height: none;
        overflow: auto;
        padding-right: 2px;
      }

      .test-task-assertion-pane {
        align-content: start;
        max-height: none;
        overflow: auto;
        padding-right: 2px;
      }

      .test-task-task-assertion-pane {
        display: grid;
        gap: 10px;
        min-width: 0;
        margin-top: 0;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.18);
      }

      .test-task-task-assertion-pane[hidden] {
        display: none;
      }

      .test-task-level-assertion-head {
        padding: 0;
        border: 0;
        background: transparent;
      }

      .test-task-level-assertion-list {
        display: grid;
        gap: 8px;
        min-width: 0;
      }

      .test-task-level-assertion-card {
        grid-template-columns: minmax(0, 1fr) auto;
      }

      .test-task-level-assertion-pinned {
        border-color: rgba(96, 165, 250, 0.32);
        background: rgba(30, 64, 175, 0.14);
      }

      .test-task-level-assertion-actions {
        display: inline-flex;
        align-items: center;
        gap: 4px;
      }

      .test-task-level-assertion-actions .assertion-action-btn {
        width: auto;
        min-width: 34px;
        padding: 0 10px;
        border-radius: 8px;
      }

      .test-task-level-assertion-add {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 38px;
        font-size: 13px;
        font-weight: 800;
      }

      .test-task-parameter-pane {
        align-content: start;
        max-height: none;
        overflow: auto;
        padding-right: 2px;
      }

      .test-task-list,
      .test-task-group-list,
      .test-task-result {
        overflow: auto;
        padding-right: 2px;
      }

      .wss-task-editor-content {
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        min-width: 0;
        min-height: 0;
        height: calc(100vh - 88px);
        width: min(1180px, calc(100vw - 64px));
        position: fixed;
        z-index: 82;
        top: 44px;
        left: 50%;
        transform: translateX(-50%);
      }

      .wss-task-editor:not(.open) .wss-task-editor-content {
        display: none;
      }

      .wss-task-editor.open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 72;
        background: rgba(2, 6, 23, 0.62);
        backdrop-filter: blur(10px);
      }

      html.light-theme .wss-task-editor.open::before {
        background: rgba(15, 23, 42, 0.35);
      }

      .wss-task-builder-section {
        --test-task-config-columns: minmax(260px, 0.85fr) minmax(320px, 1fr) minmax(360px, 1.05fr);
        --test-task-config-gap: 12px;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
        gap: 12px;
        min-height: 0;
        border-color: var(--line);
        background: #0f172a;
        box-shadow: var(--shadow);
        overflow: hidden;
      }

      .wss-task-fields {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
      }

      .wss-task-name-field,
      .wss-task-params-field {
        grid-column: 1 / -1;
      }

      .wss-task-params-field {
        display: flex;
        flex-direction: column;
        min-height: 0;
      }

      .wss-task-params-field textarea {
        flex: 1 1 auto;
        min-height: 220px;
        font-family: "Cascadia Code", Consolas, monospace;
        line-height: 1.55;
        resize: vertical;
      }

      .wss-task-fields select,
      .wss-task-run-options input,
      .wss-task-run-options select {
        width: 100%;
      }

      .wss-task-run-options {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
      }

      .wss-task-timeout-control {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 86px;
        gap: 8px;
      }

      .wss-task-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 36px;
        padding: 8px 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.18);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
      }

      html.light-theme .wss-task-toggle {
        border-color: rgba(100, 116, 139, 0.16);
        background: rgba(248, 250, 252, 0.9);
        color: #475569;
      }

      .wss-task-toggle input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--primary);
      }

      .wss-task-fields {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .wss-task-name-field,
      .wss-task-market-field,
      .wss-task-env-field {
        grid-column: auto;
      }

      .wss-task-fields .test-task-variables-field {
        grid-column: 1 / -1;
      }

      .wss-task-case-picker-controls {
        grid-template-columns: minmax(0, 1fr);
      }

      .wss-task-config-grid {
        margin-top: 0;
      }

      .wss-task-parameter-pane .wss-task-case-config {
        display: grid;
        gap: 12px;
      }

      .wss-task-assertion-pane .test-task-assertions {
        display: grid;
        gap: 10px;
      }

      .wss-task-run-options {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-summary-panel {
        display: grid;
        gap: 18px;
        align-content: start;
        min-width: 0;
        overflow: auto;
        padding: 4px 2px 2px 1px;
      }

      .test-task-summary-card {
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.1);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.22);
      }

      .test-task-summary-hero {
        padding: 16px;
        border-color: rgba(96, 165, 250, 0.18);
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.28));
      }

      .test-task-summary-head {
        display: grid;
        gap: 10px;
        padding: 8px 0 18px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-summary-title {
        color: var(--text);
        font-size: 15px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-summary-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
      }

      .test-task-summary-title-row .test-task-summary-title {
        min-width: 0;
      }

      .test-task-summary-title-row .test-config-action {
        min-height: 30px;
        padding: 6px 12px;
      }

      .test-task-summary-meta {
        margin-top: 6px;
        color: var(--soft);
        font-size: 13px;
        line-height: 1.75;
      }

      .test-task-summary-stats {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0;
        min-height: 86px;
        align-items: center;
        padding: 8px 0 12px;
        min-width: 0;
      }

      .test-task-summary-stat {
        padding: 6px 10px;
        border: 0;
        border-right: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 0;
        background: transparent;
        text-align: center;
      }

      .test-task-summary-stat:first-child {
        padding-left: 0;
      }

      .test-task-summary-stat:last-child {
        padding-right: 0;
        border-right: 0;
      }

      .test-task-summary-stat-value {
        color: var(--text);
        font-size: 20px;
        font-weight: 900;
      }

      .test-task-summary-stat-label {
        margin-top: 8px;
        color: var(--soft);
        font-size: 12px;
      }

      .test-task-summary-actions {
        display: grid;
        grid-template-columns: minmax(0, 0.92fr) minmax(240px, 1.08fr);
        gap: 8px;
      }

      .test-task-summary-run-action-slot {
        display: flex;
        align-items: stretch;
        justify-content: stretch;
        min-width: 0;
      }

      .test-task-summary-run-action-slot > .btn,
      .test-task-summary-run-action-slot > .test-task-run-inline-control {
        width: 100%;
      }

      .test-task-summary-run-action-slot .test-task-run-inline-control {
        justify-content: flex-end;
      }

      .test-task-summary-recent {
        display: grid;
        gap: 10px;
        padding-top: 16px;
        padding-bottom: 0;
        overflow: hidden;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        background: transparent;
      }

      .test-task-summary-recent .test-task-summary-result-card {
        margin: 0;
        border-radius: 0;
      }

      .test-task-summary-fail-list {
        display: grid;
        gap: 6px;
      }

      .test-task-summary-fail-item {
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        border: 1px solid rgba(239, 68, 68, 0.18);
        border-radius: 8px;
        background: rgba(127, 29, 29, 0.14);
        color: var(--text);
        font-size: 12px;
        text-align: left;
        cursor: pointer;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-summary-empty {
        display: grid;
        place-items: center;
        min-height: 100%;
        color: var(--soft);
        font-size: 12px;
        text-align: center;
      }

      .test-task-result-drawer {
        position: fixed;
        inset: 0;
        z-index: 95;
        display: none;
      }

      .test-task-result-drawer.open {
        display: block;
      }

      .test-task-result-drawer-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(2, 6, 23, 0.62);
        backdrop-filter: blur(10px);
      }

      .test-task-result-drawer-panel {
        position: absolute;
        top: 50%;
        left: 50%;
        width: min(1360px, calc(100vw - 24px));
        height: min(860px, calc(100vh - 24px));
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 24px 56px rgba(2, 6, 23, 0.5);
        transform: translate(-50%, -50%);
      }

      .test-task-result-drawer-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        min-width: 0;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-result-drawer-head > div {
        flex: 1 1 auto;
        min-width: 0;
      }

      .test-task-result-drawer-title {
        color: var(--text);
        font-size: 16px;
        font-weight: 900;
      }

      .test-task-result-drawer-status-row,
      .test-task-summary-run-row {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        min-width: 0;
        flex-wrap: wrap;
      }

      .test-task-result-drawer-status-row {
        display: grid;
        grid-template-columns: minmax(300px, 1.04fr) minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
        column-gap: 12px;
        row-gap: 8px;
      }

      .test-task-summary-run-row {
        margin-top: 6px;
      }

      .test-task-result-drawer-status-row .test-task-section-meta,
      .test-task-summary-run-row .test-task-summary-meta {
        margin-top: 0;
      }

      .test-task-result-drawer-status-row .test-task-section-meta {
        display: flex;
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        overflow: hidden;
      }

      .test-task-result-status-primary,
      .test-task-result-status-secondary {
        display: flex;
        align-items: center;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
      }

      .test-task-result-status-primary {
        gap: 7px;
      }

      .test-task-result-status-env,
      .test-task-result-status-time,
      .test-task-result-status-separator {
        flex: 0 0 auto;
      }

      .test-task-result-status-name,
      .test-task-result-status-text {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .test-task-result-drawer-controls,
      .test-task-summary-run-controls {
        display: inline-flex;
        align-items: center;
        min-width: 0;
      }

      .test-task-result-drawer-controls {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
      }

      .test-task-result-drawer-close {
        width: 32px;
        height: 32px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.38);
        color: var(--text);
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
      }

      .test-task-result-drawer .test-task-result,
      .test-task-result-drawer .test-task-result-case-list,
      .test-task-result-drawer .test-task-result-request-body,
      .test-task-result-drawer .test-task-response-block-body {
        scrollbar-width: none;
        -ms-overflow-style: none;
      }

      .test-task-result-drawer .test-task-result::-webkit-scrollbar,
      .test-task-result-drawer .test-task-result-case-list::-webkit-scrollbar,
      .test-task-result-drawer .test-task-result-request-body::-webkit-scrollbar,
      .test-task-result-drawer .test-task-response-block-body::-webkit-scrollbar {
        width: 0;
        height: 0;
      }

      .test-task-result.is-empty {
        align-content: stretch;
        grid-auto-rows: minmax(0, 1fr);
        height: 100%;
      }

      .test-task-result.is-empty .response-placeholder {
        height: 100%;
        min-height: 0;
      }

      .test-task-saved-section .test-task-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: max-content;
        align-content: start;
        justify-content: start;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 6px 2px 8px 0;
      }

      .test-task-group-section .test-task-group-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: max-content;
        align-content: start;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 6px 2px 8px 0;
      }

      .test-task-option,
      .test-task-item,
      .test-task-saved-item {
        min-width: 0;
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(2, 6, 23, 0.18);
      }

      .test-task-saved-item {
        position: relative;
        cursor: pointer;
        user-select: none;
        transform-origin: center;
        transition:
          transform 0.18s cubic-bezier(0.2, 1.25, 0.32, 1),
          box-shadow 0.18s ease,
          border-color 0.18s ease,
          background 0.18s ease;
      }

      .test-task-saved-item.menu-open {
        z-index: 20;
      }

      .test-task-saved-item:hover {
        transform: translateY(-2px) scale(1.015);
        border-color: rgba(96, 165, 250, 0.36);
        background: rgba(30, 41, 59, 0.42);
        box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
      }

      .test-task-saved-item.selected {
        border-color: rgba(96, 165, 250, 0.3);
        background: rgba(37, 99, 235, 0.16);
        box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.08);
      }

      .test-task-saved-section .test-task-list:has(.test-task-saved-item:hover) .test-task-saved-item.selected:not(:hover) {
        border-color: rgba(148, 163, 184, 0.12);
        background: rgba(2, 6, 23, 0.18);
        box-shadow: none;
      }

      .test-task-group-section .test-task-list:has(.test-task-saved-item:hover) .test-task-saved-item.selected:not(:hover),
      .test-task-group-section .test-task-group-list:has(.test-task-saved-item:hover) .test-task-saved-item.selected:not(:hover) {
        border-color: rgba(148, 163, 184, 0.12);
        background: rgba(2, 6, 23, 0.18);
        box-shadow: none;
      }

      .test-task-saved-item.dragging {
        z-index: 30;
        transform: translate(var(--test-task-drag-x, 0), var(--test-task-drag-y, 0)) scale(1.035);
        border-color: rgba(96, 165, 250, 0.52);
        background: rgba(37, 99, 235, 0.28);
        box-shadow: 0 22px 42px rgba(2, 6, 23, 0.38);
        transition:
          box-shadow 0.18s ease,
          border-color 0.18s ease,
          background 0.18s ease;
        cursor: grabbing;
        pointer-events: none;
      }

      .test-task-saved-item.drag-over {
        border-color: rgba(34, 197, 94, 0.58);
      }

      @keyframes test-task-pending-shift-bounce {
        0% {
          transform: translateY(0) scale(1);
        }
        55% {
          transform: translateY(-1px) scale(1.012);
        }
        100% {
          transform: translateY(0) scale(1);
        }
      }

      .test-task-group-editor-content {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: none;
        place-items: center;
        padding: 44px 32px;
      }

      .test-task-group-editor-content.open {
        display: grid;
      }

      .test-task-group-editor-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(2, 6, 23, 0.62);
        backdrop-filter: blur(10px);
      }

      .test-task-group-builder-section {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr) auto;
        gap: 12px;
        width: min(920px, calc(100vw - 64px));
        height: min(720px, calc(100vh - 88px));
        border-color: var(--line);
        background: #0f172a;
        box-shadow: var(--shadow);
        overflow: hidden;
      }

      .test-task-group-fields {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(240px, 0.48fr);
        gap: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-group-fields .field {
        margin: 0;
      }

      .test-task-group-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 38px;
        padding: 0 10px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.36);
        color: var(--text);
        font-size: 12px;
        font-weight: 700;
      }

      .test-task-group-toggle input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--primary);
      }

      .test-task-group-config-grid {
        display: grid;
        grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
        gap: 12px;
        min-width: 0;
        min-height: 0;
      }

      .test-task-group-config-grid > div {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
        min-width: 0;
        min-height: 0;
      }

      .test-task-group-column-title {
        color: var(--soft);
        font-size: 11px;
        font-weight: 800;
      }

      .test-task-group-task-options,
      .test-task-group-selected-list {
        display: grid;
        gap: 8px;
        align-content: start;
        grid-auto-rows: max-content;
        min-width: 0;
        overflow: auto;
        padding-right: 2px;
      }

      .test-task-group-task-option,
      .test-task-group-selected-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        min-width: 0;
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(2, 6, 23, 0.18);
      }

      .test-task-group-task-title {
        min-width: 0;
        color: var(--text);
        font-size: 12px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-group-task-meta {
        min-width: 0;
        margin-top: 4px;
        color: var(--muted);
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-group-selected-controls {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .test-task-group-icon-btn {
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.42);
        color: var(--soft);
        font-size: 13px;
        font-weight: 900;
        cursor: pointer;
      }

      .test-task-group-icon-btn:disabled {
        opacity: 0.42;
        cursor: not-allowed;
      }

      .test-task-group-enable {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
      }

      .test-task-group-enable input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--primary);
      }

      .test-task-group-summary-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(2, 6, 23, 0.16);
      }

      .test-task-group-summary-item.fail {
        border-color: rgba(248, 113, 113, 0.28);
        background: rgba(127, 29, 29, 0.16);
      }

      .test-task-group-summary-item.success {
        border-color: rgba(74, 222, 128, 0.22);
        background: rgba(20, 83, 45, 0.14);
      }

      .test-task-saved-item.pending-shift {
        border-color: rgba(34, 197, 94, 0.42);
        background: rgba(20, 83, 45, 0.18);
        box-shadow: 0 14px 28px rgba(2, 6, 23, 0.24);
      }

      .test-task-saved-item.pending-shift .test-task-saved-main,
      .test-task-saved-item.pending-shift .test-task-saved-actions {
        animation: test-task-pending-shift-bounce 0.62s cubic-bezier(0.22, 1, 0.36, 1) infinite;
      }

      .test-task-new-card {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 8px;
        min-width: 0;
        min-height: 108px;
        padding: 10px;
        border: 1px dashed rgba(96, 165, 250, 0.78);
        border-radius: 8px;
        background: rgba(37, 99, 235, 0.2);
        color: #bfdbfe;
        box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.08), 0 10px 24px rgba(37, 99, 235, 0.12);
        cursor: pointer;
      }

      .test-task-new-card:hover {
        border-color: rgba(147, 197, 253, 0.92);
        background: rgba(37, 99, 235, 0.28);
        color: #dbeafe;
        box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.14), 0 14px 30px rgba(37, 99, 235, 0.18);
      }

      html.light-theme .test-task-new-card {
        border-color: rgba(37, 99, 235, 0.48);
        background: rgba(37, 99, 235, 0.09);
        color: #1d4ed8;
        box-shadow: none;
      }

      html.light-theme .test-task-new-card:hover {
        border-color: rgba(37, 99, 235, 0.72);
        background: rgba(37, 99, 235, 0.14);
        color: #1e40af;
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.10);
      }

      .test-task-new-plus {
        font-size: 28px;
        font-weight: 700;
        line-height: 1;
      }

      .test-task-new-text {
        font-size: 12px;
        font-weight: 800;
      }

      .test-task-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 52px;
      }

      .test-task-item {
        cursor: pointer;
      }

      .test-task-item.active {
        border-color: rgba(59, 130, 246, 0.48);
        background: rgba(59, 130, 246, 0.1);
      }

      .test-task-item:focus-visible {
        outline: 2px solid rgba(96, 165, 250, 0.82);
        outline-offset: 2px;
      }

      .test-task-item.env-disabled,
      .test-task-item.env-disabled.active {
        border-color: rgba(148, 163, 184, 0.1);
        background: rgba(15, 23, 42, 0.14);
        opacity: 0.52;
        filter: grayscale(0.25);
      }

      .test-task-item.env-disabled .test-task-item-title,
      .test-task-item.env-disabled .test-task-item-path,
      .test-task-item.env-disabled .test-task-item-meta {
        color: var(--soft);
      }

      .test-task-option-main,
      .test-task-item-main,
      .test-task-saved-main {
        min-width: 0;
      }

      .test-task-saved-main {
        padding-right: 28px;
      }

      .test-task-saved-title-line {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
      }

      .test-task-saved-title-line .test-task-saved-title {
        flex: 1 1 auto;
        min-width: 0;
      }

      .test-task-type-badge {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 30px;
        height: 18px;
        padding: 0 6px;
        border: 1px solid rgba(96, 165, 250, 0.26);
        border-radius: 999px;
        background: rgba(37, 99, 235, 0.14);
        color: #93c5fd;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: 0;
        line-height: 1;
      }

      .test-task-type-badge.wss {
        border-color: rgba(20, 184, 166, 0.26);
        background: rgba(20, 184, 166, 0.13);
        color: #5eead4;
      }

      html.light-theme .test-task-type-badge {
        border-color: rgba(37, 99, 235, 0.22);
        background: rgba(37, 99, 235, 0.08);
        color: #1d4ed8;
      }

      html.light-theme .test-task-type-badge.wss {
        border-color: rgba(13, 148, 136, 0.22);
        background: rgba(13, 148, 136, 0.08);
        color: #0f766e;
      }

      /* Story#22：移动端信息卡新增元素——桌面端默认隐藏，仅在移动 CSS 里覆盖显示 */
      .test-task-status-dot,
      .test-task-last-fail-tag,
      .test-task-group-icon,
      .test-task-group-mobile-edit,
      .test-task-group-mobile-rate,
      .test-task-mobile-hero,
      .test-task-mobile-runrow,
      .test-task-mobile-runrow-empty,
      .test-task-result-case-chev,
      .test-task-result-detail-topbar,
      .result-detail-v8,
      .test-task-inline-cross-assertions,
      .test-task-case-subpage-topbar,
      .test-task-switcher,
      .test-task-result-mobile-summary {
        display: none;
      }

      /* 概览"最近结果"历史列表容器：桌面端隐藏（PC 用 result-card 环形卡），移动端 @media 显示。
         整块（标题+行+footer）一起隐藏，避免 PC 露出裸标题。 */
      .test-task-recent-history {
        display: none;
      }

      /* 任务组合卡进度条：
         - PC 端用 .test-task-group-pc-rate（在 saved-actions 内，与运行按钮同一行，跟 API 卡一致）；
           main 里的 .test-task-group-mobile-rate 在 PC 隐藏（默认全局 display:none，不再补显示）。
         - 移动端反之：显示 mobile-rate、隐藏 pc-rate（见 styles.mobile.css）。 */
      .test-task-group-pc-rate {
        flex: 1 1 auto;
        min-width: 0;
      }
      .test-task-group-pc-rate .test-task-card-progress {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
      }
      /* 组合卡 saved-actions：PC 端与 API 卡一致——运行按钮 + 进度条一行 */
      .test-task-group-section .test-task-saved-actions,
      .test-task-group-item .test-task-saved-actions {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      /* Story#22：编辑器 close 按钮默认展示 ×（桌面），移动端由 mobile CSS 切换为 ‹ 返回 */
      .test-task-editor-close-x {
        display: inline;
      }

      .test-task-editor-close-back {
        display: none;
      }

      /* Story#22：菜单项前置图标——留出与文字的间距，避免视觉粘连 */
      .test-task-menu-icon {
        display: inline-block;
        flex-shrink: 0;
        width: 16px;
        margin-right: 10px;
        text-align: center;
        font-size: 13px;
        line-height: 1;
        color: var(--muted);
      }

      .test-task-card-menu-option.danger .test-task-menu-icon {
        color: var(--danger);
      }

      .test-task-option-title,
      .test-task-item-title,
      .test-task-saved-title {
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-item-title-line {
        display: flex;
        align-items: baseline;
        gap: 6px;
        min-width: 0;
      }

      .test-task-item-title-line .test-task-item-title {
        flex: 0 1 auto;
        min-width: 0;
      }

      .test-task-item-path {
        flex: 1 1 auto;
        min-width: 0;
        color: var(--soft);
        font-size: 11px;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-option-meta,
      .test-task-item-meta,
      .test-task-saved-meta,
      .test-task-result-line {
        margin-top: 4px;
        color: var(--soft);
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-assertions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(148, 163, 184, 0.1);
      }

      .test-task-assertion-row {
        justify-content: flex-start;
        min-height: 28px;
        padding: 4px 6px;
        border-radius: 6px;
        color: var(--muted);
        font-size: 11px;
        background: rgba(15, 23, 42, 0.22);
      }

      .test-task-result.detail-mode {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: 12px;
        height: 100%;
        overflow: hidden;
        padding-right: 0;
      }

      .test-task-result-overview {
        display: grid;
        grid-template-columns: minmax(300px, 1.04fr) minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        gap: 12px;
        min-width: 0;
        min-height: 174px;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.22);
      }

      .test-task-summary-result-card {
        padding: 0;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.1);
        background: rgba(15, 23, 42, 0.18);
      }

      .test-task-summary-result-card > .test-task-summary-meta {
        padding: 18px 26px 10px;
      }

      .test-task-summary-result-card > .test-task-summary-actions {
        padding: 0 26px 18px;
      }

      .test-task-summary-result-card .test-task-summary-title {
        padding: 14px 16px 0;
      }

      .test-task-summary-result-card .test-task-result-overview {
        grid-template-columns: minmax(190px, 1fr) minmax(112px, 0.52fr);
        align-items: center;
        justify-items: stretch;
        gap: 16px;
        padding: 14px 16px 16px;
        border: 0;
        border-radius: 0;
        background: transparent;
      }

      .test-task-summary-result-card .test-task-result-ring {
        width: min(220px, 100%);
      }

      .test-task-summary-result-card .test-task-result-ring-label {
        font-size: 11px;
      }

      .test-task-summary-result-card .test-task-result-ring-value {
        font-size: 26px;
      }

      .test-task-summary-result-card .test-task-result-legend {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
      }

      .test-task-summary-result-card .test-task-result-legend-item {
        grid-template-columns: auto auto minmax(0, 1fr);
        align-items: center;
      }

      .test-task-summary-result-card .test-task-result-legend-value {
        font-size: 13px;
      }

      .test-task-summary-result-card .test-task-result-stat-grid {
        grid-column: 1 / -1;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
      }

      .test-task-summary-result-card .test-task-result-stat-label {
        font-size: 11px;
      }

      .test-task-summary-result-card .test-task-result-stat-value {
        font-size: 13px;
      }

      .test-task-summary-result-overview {
        display: grid;
        grid-template-columns: minmax(190px, 0.92fr) minmax(150px, 0.68fr);
        grid-template-areas:
          "title title"
          "ring legends"
          "stats stats";
        align-items: center;
        gap: 14px 30px;
        min-width: 0;
        padding: 18px 26px 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
      }

      .test-task-result-chart-title {
        grid-column: 1 / -1;
        justify-self: start;
        min-width: 0;
        max-width: 100%;
        color: var(--text);
        font-size: 14px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-result-overview-summary {
        grid-column: 1 / span 2;
        display: grid;
        grid-template-columns: minmax(128px, 0.48fr) minmax(130px, 0.42fr) minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        align-items: center;
        gap: 8px 22px;
        min-width: 0;
        min-height: 0;
      }

      .test-task-result-overview-summary .test-task-result-chart-title {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        justify-self: center;
        text-align: center;
      }

      .test-task-result-overview-summary > .test-task-result-ring {
        grid-column: 1;
        grid-row: 2;
        width: min(110px, 100%);
      }

      .test-task-result-overview-summary .test-task-result-ring-inner {
        gap: 3px;
      }

      .test-task-result-overview-summary .test-task-result-ring-label {
        font-size: 10px;
      }

      .test-task-result-overview-summary .test-task-result-ring-value {
        font-size: 17px;
      }

      .test-task-result-overview-summary > .test-task-result-legend {
        grid-column: 2;
        grid-row: 1 / span 2;
      }

      .test-task-result-overview-summary > .test-task-result-stat-grid {
        grid-column: 3;
        grid-row: 1 / span 2;
      }

      .test-task-result-request-panel {
        grid-column: 3;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        min-width: 0;
        min-height: 0;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(2, 6, 23, 0.12);
      }

      .test-task-result-request-tabs {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        padding: 8px 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
      }

      .test-task-result-request-body {
        min-width: 0;
        min-height: 0;
        overflow: auto;
        padding: 10px;
      }

      .test-task-result-detail-request-slot {
        display: none;
      }

      .test-task-result.detail-mode > .test-task-result-overview {
        height: clamp(184px, 22vh, 216px);
        min-height: 0;
        overflow: hidden;
      }

      .test-task-result.detail-mode .test-task-result-request-panel {
        align-self: stretch;
        height: 100%;
      }

      .test-task-result.detail-mode .test-task-result-request-body {
        height: 100%;
        max-height: 100%;
      }

      .test-task-result-request-body > .empty-state:only-child {
        display: grid;
        place-items: center;
        min-height: 100%;
        margin: 0;
        text-align: center;
      }

      .test-task-summary-result-overview .test-task-result-chart-title {
        grid-area: title;
        width: 100%;
        justify-self: center;
        text-align: center;
      }

      .test-task-summary-result-overview .test-task-result-ring {
        grid-area: ring;
        width: min(220px, 100%);
        justify-self: center;
      }

      .test-task-summary-result-legends {
        grid-area: legends;
        display: grid;
        gap: 22px;
        align-content: center;
        justify-self: start;
        min-width: 0;
      }

      .test-task-summary-result-legend-group {
        display: grid;
        gap: 10px;
        min-width: 0;
      }

      .test-task-summary-result-overview .test-task-result-legend-item {
        grid-template-columns: auto 36px minmax(0, 1fr);
      }

      .test-task-summary-result-overview .test-task-result-legend-value {
        font-size: 14px;
      }

      .test-task-summary-result-stats {
        grid-area: stats;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px 46px;
        min-width: 0;
      }

      .test-task-summary-result-stat {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: baseline;
        gap: 10px;
        min-width: 0;
      }

      .test-task-summary-result-stat-label {
        color: var(--soft);
        font-size: 12px;
        white-space: nowrap;
      }

      .test-task-summary-result-stat-value {
        color: var(--text);
        font-size: 14px;
        font-weight: 900;
        white-space: nowrap;
      }

      .test-task-summary-result-stat-value.good {
        color: #22c55e;
      }

      .test-task-run-inline-control {
        display: inline-grid;
        grid-template-columns: 108px 60px 60px;
        align-items: center;
        gap: 8px;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
      }

      .test-task-result-overview > .test-task-run-inline-control {
        grid-area: auto;
        grid-column: 1 / -1;
        justify-self: start;
        margin-bottom: -4px;
      }

      .test-task-run-inline-status {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
        color: var(--text);
        font-size: 13px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }

      .test-task-run-inline-status [data-test-task-run-control-text] {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .test-task-run-spinner {
        position: relative;
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
        border: 2px solid rgba(59, 130, 246, 0.18);
        border-top-color: #3b82f6;
        border-radius: 50%;
        animation: testTaskRunSpin 0.9s linear infinite;
        animation-delay: var(--test-task-run-spin-delay, 0ms);
      }

      .test-task-run-spinner.idle {
        animation: none;
        border-color: rgba(148, 163, 184, 0.28);
        border-top-color: rgba(148, 163, 184, 0.28);
      }

      .test-task-run-spinner.paused {
        animation: none;
        border-color: currentColor;
        border-top-color: currentColor;
        color: #60a5fa;
      }

      .test-task-run-spinner.paused::before,
      .test-task-run-spinner.paused::after {
        content: "";
        position: absolute;
        top: 3px;
        bottom: 3px;
        width: 2px;
        border-radius: 2px;
        background: currentColor;
      }

      .test-task-run-spinner.paused::before {
        left: 4px;
      }

      .test-task-run-spinner.paused::after {
        right: 4px;
      }

      .test-task-run-inline-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        min-height: 32px;
        padding: 6px 7px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.24);
        color: var(--text);
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
      }

      .test-task-run-inline-action:disabled {
        cursor: not-allowed;
        opacity: 0.55;
      }

      .test-task-run-inline-action.stop {
        grid-column: 3;
        color: #fb7185;
      }

      .test-task-run-inline-action.run {
        grid-column: 2;
        color: #60a5fa;
      }

      .test-task-run-inline-action.pause {
        grid-column: 2;
        color: var(--text);
      }

      .test-task-run-inline-action.stop:disabled {
        color: var(--soft);
        background: rgba(148, 163, 184, 0.08);
        border-color: rgba(148, 163, 184, 0.16);
      }

      .test-task-run-action-icon {
        position: relative;
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
        border: 2px solid currentColor;
        border-radius: 50%;
      }

      .test-task-run-action-icon.stop::after {
        content: "";
        position: absolute;
        inset: 3px;
        border-radius: 50%;
        background: currentColor;
        opacity: 0.18;
      }

      .test-task-run-action-icon.run {
        border: 0;
        border-radius: 0;
      }

      .test-task-run-action-icon.run::after {
        content: "";
        position: absolute;
        left: 3px;
        top: 1px;
        width: 0;
        height: 0;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-left: 9px solid currentColor;
      }

      .test-task-run-action-icon.pause::before,
      .test-task-run-action-icon.pause::after {
        content: "";
        position: absolute;
        top: 3px;
        bottom: 3px;
        width: 2px;
        border-radius: 2px;
        background: currentColor;
      }

      .test-task-run-action-icon.pause::before {
        left: 4px;
      }

      .test-task-run-action-icon.pause::after {
        right: 4px;
      }

      @keyframes testTaskRunSpin {
        to {
          transform: rotate(360deg);
        }
      }

      .test-task-result-ring {
        --result-ring-success: 0%;
        --result-ring-fail: 0%;
        position: relative;
        width: 142px;
        aspect-ratio: 1;
        justify-self: center;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: transparent;
      }

      .test-task-result-ring::before {
        content: "";
        position: absolute;
        inset: 22%;
        z-index: 1;
        border-radius: 50%;
        background: rgba(15, 23, 42, 0.96);
        pointer-events: none;
      }

      .test-task-result-ring-svg {
        position: absolute;
        inset: 0;
        z-index: 0;
        overflow: visible;
      }

      .test-task-result-ring-segment {
        fill: none;
        stroke-width: 12;
        stroke-linecap: butt;
        transform: rotate(-90deg);
        transform-origin: 50px 50px;
        transition: stroke-width 0.18s cubic-bezier(0.2, 1.25, 0.32, 1), transform 0.18s cubic-bezier(0.2, 1.25, 0.32, 1), filter 0.18s ease, opacity 0.18s ease;
      }

      .test-task-result-ring-segment.success {
        stroke: #22c55e;
      }

      .test-task-result-ring-segment.fail {
        stroke: #ef4444;
      }

      .test-task-result-ring-segment.pending {
        stroke: rgba(148, 163, 184, 0.2);
      }

      .test-task-result-ring-segment.empty {
        opacity: 0;
        pointer-events: none;
      }

      .test-task-result-ring:not(.interactive) .test-task-result-ring-segment {
        pointer-events: none;
      }

      .test-task-result-ring.interactive .test-task-result-ring-segment {
        cursor: default;
      }

      .test-task-result-ring.hovering .test-task-result-ring-segment {
        opacity: 0.42;
      }

      .test-task-result-ring.hovering .test-task-result-ring-segment.active {
        opacity: 1;
        stroke-width: 15;
        transform: rotate(-90deg) scale(1.035);
        filter: drop-shadow(0 8px 14px rgba(2, 6, 23, 0.22));
      }

      .test-task-result-ring-inner {
        position: relative;
        z-index: 2;
        display: grid;
        gap: 6px;
        text-align: center;
        pointer-events: none;
      }

      .test-task-result-ring-label {
        color: var(--soft);
        font-size: 12px;
      }

      .test-task-result-ring-value {
        color: var(--text);
        font-size: 22px;
        font-weight: 900;
      }

      .test-task-result-ring-tip {
        position: absolute;
        z-index: 4;
        left: var(--ring-tip-x, 50%);
        top: var(--ring-tip-y, 50%);
        min-width: max-content;
        padding: 5px 8px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 7px;
        background: rgba(15, 23, 42, 0.94);
        color: var(--text);
        font-size: 11px;
        font-weight: 900;
        pointer-events: none;
        opacity: 0;
        transform: translate(-50%, calc(-100% - 10px)) scale(0.96);
        transition: opacity 0.12s ease, transform 0.16s cubic-bezier(0.2, 1.25, 0.32, 1);
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
      }

      .test-task-result-ring.hovering .test-task-result-ring-tip {
        opacity: 1;
        transform: translate(-50%, calc(-100% - 10px)) scale(1);
      }

      .test-task-result-legend,
      .test-task-result-stat-grid {
        display: grid;
        gap: 14px;
        min-width: 0;
      }

      .test-task-result-legend-item {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        color: var(--soft);
        font-size: 12px;
      }

      .test-task-result-legend-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #34d399;
      }

      .test-task-result-legend-dot.fail {
        background: #fb8daf;
      }

      .test-task-result-legend-value {
        color: var(--text);
        font-size: 15px;
        font-weight: 900;
        white-space: nowrap;
      }

      .test-task-result-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 30px;
      }

      .test-task-result-stat-grid > div {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        align-items: baseline;
        justify-items: start;
        gap: 8px;
        min-width: 0;
        text-align: left;
      }

      .test-task-result-stat-label {
        color: var(--soft);
        font-size: 12px;
        white-space: nowrap;
      }

      .test-task-result-stat-value {
        min-width: 0;
        color: var(--text);
        font-size: 14px;
        font-weight: 900;
        white-space: nowrap;
      }

      .test-task-result-stat-value.good {
        color: #22c55e;
      }

      .test-task-result-stat-value.bad {
        color: #ef4444;
      }

      .test-task-result-stat-value .bad {
        color: #ef4444;
      }

      .test-task-result-main {
        display: grid;
        grid-template-columns: minmax(300px, 1.04fr) minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
      }

      .test-task-result-case-list {
        display: grid;
        align-content: start;
        gap: 4px;
        min-width: 0;
        min-height: 0;
        overflow: auto;
        padding: 2px 4px 2px 2px;
      }

      .test-task-result-case-pane {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
      }

      .test-task-result-filter {
        display: flex;
        align-items: center;
        gap: 6px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
      }

      .test-task-result-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 88px;
        width: 88px;
        min-width: 88px;
        min-height: 28px;
        padding: 0 8px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 7px;
        background: rgba(15, 23, 42, 0.3);
        color: var(--soft);
        font-size: 12px;
        font-weight: 900;
        font-variant-numeric: tabular-nums;
        text-align: center;
        cursor: pointer;
      }

      .test-task-result-filter-btn:hover,
      .test-task-result-filter-btn.active {
        color: #dbeafe;
        border-color: rgba(96, 165, 250, 0.3);
        background: rgba(37, 99, 235, 0.2);
      }

      .test-task-result-filter-empty {
        padding: 12px 8px;
        border: 1px dashed rgba(148, 163, 184, 0.16);
        border-radius: 8px;
        color: var(--soft);
        font-size: 12px;
        text-align: center;
      }

      .test-task-result-case {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
        gap: 10px;
        width: 100%;
        min-width: 0;
        min-height: 50px;
        padding: 8px 9px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-left: 3px solid rgba(148, 163, 184, 0.32);
        border-radius: 8px;
        background: linear-gradient(90deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.22));
        color: var(--text);
        text-align: left;
        cursor: default;
        box-shadow: 0 5px 12px rgba(2, 6, 23, 0.06);
      }

      .test-task-result-case.is-clickable {
        cursor: pointer;
      }

      .test-task-result-case.is-clickable:hover,
      .test-task-result-case.active {
        border-color: rgba(96, 165, 250, 0.32);
        border-left-color: rgba(96, 165, 250, 0.9);
        background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), rgba(30, 41, 59, 0.36));
        box-shadow: 0 12px 24px rgba(2, 6, 23, 0.16);
      }

      .test-task-result-case:focus-visible {
        outline: 2px solid rgba(96, 165, 250, 0.82);
        outline-offset: 2px;
      }

      .test-task-result-case-badge {
        align-self: start;
        min-width: 42px;
        padding: 3px 8px;
        border-radius: 7px;
        background: rgba(148, 163, 184, 0.18);
        color: var(--soft);
        font-size: 12px;
        font-weight: 900;
        text-align: center;
      }

      .test-task-result-case.success .test-task-result-case-badge {
        background: rgba(34, 197, 94, 0.14);
        color: #22c55e;
      }

      .test-task-result-case.success {
        border-left-color: rgba(148, 163, 184, 0.32);
      }

      .test-task-result-case.fail .test-task-result-case-badge {
        background: rgba(239, 68, 68, 0.14);
        color: #ef4444;
      }

      .test-task-result-case.fail {
        border-left-color: rgba(148, 163, 184, 0.32);
      }

      .test-task-result-case-body {
        display: grid;
        grid-template-rows: auto auto;
        gap: 5px;
        min-width: 0;
      }

      .test-task-result-case-status {
        width: 8px;
        min-height: 100%;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.55);
      }

      .test-task-result-case.success .test-task-result-case-status {
        background: #22c55e;
      }

      .test-task-result-case.fail .test-task-result-case-status {
        background: #ef4444;
      }

      .test-task-result-case-title {
        min-width: 0;
        color: var(--text);
        font-size: 13px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-result-case-path {
        display: block;
        color: var(--soft);
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-result-case-tail {
        align-self: start;
        display: grid;
        grid-template-columns: 30px 40px;
        align-items: center;
        column-gap: 8px;
        width: 78px;
        padding: 0;
        border-radius: 7px;
        background: transparent;
        color: var(--soft);
        font-size: 12px;
        font-weight: 500;
        text-align: right;
        white-space: nowrap;
      }

      .test-task-result-case-code {
        display: inline-block;
        color: #94a3b8;
        font-weight: 500;
        text-align: right;
      }

      .test-task-result-case-code.status-2xx {
        color: #4ade80;
      }

      .test-task-result-case-code.status-3xx {
        color: #60a5fa;
      }

      .test-task-result-case-code.status-4xx {
        color: #fbbf24;
      }

      .test-task-result-case-code.status-5xx {
        color: #f87171;
      }

      .test-task-result-case-code.status-empty {
        color: #94a3b8;
      }

      .test-task-result-case-duration {
        display: inline-block;
        color: var(--soft);
        font-weight: 500;
        text-align: left;
      }

      .test-task-result-case-meta {
        margin-top: 4px;
        color: var(--soft);
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-result-detail {
        grid-column: 2 / -1;
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
      }

      .test-task-result-detail.empty {
        grid-template-rows: minmax(0, 1fr);
      }

      .test-task-result-detail.empty .empty-state {
        min-height: 100%;
        display: grid;
        place-items: center;
        margin: 0;
      }

      /* PC 端结果详情：detail 是 overflow:hidden 的固定高度 grid，其唯一可见子
         .test-task-result-detail-legacy 需把高度约束传给内部 .test-task-response-detail
         （响应 | 断言 两列），让响应块 / 断言块各自的 body 独立滚动（像左侧用例列表那样，
         响应滚动不带动断言）。故 legacy 自身不滚（overflow:hidden）、min-height:0，用 grid
         把内部 response-detail 撑满并约束高度；PC 端请求槽 display:none，legacy 内实际
         只有 response-detail 一个可见子。 */
      .test-task-result-detail-legacy {
        display: grid;
        grid-template-rows: minmax(0, 1fr);
        min-width: 0;
        min-height: 0;
        overflow: hidden;
      }

      .test-task-result-detail-head {
        min-width: 0;
        padding: 8px 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.28);
      }

      .test-task-result-detail-title {
        color: var(--text);
        font-size: 12px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-result-detail-meta {
        margin-top: 4px;
        color: var(--soft);
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-result-panel {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        min-width: 0;
        min-height: 0;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.28);
      }

      .test-task-result-panel-head {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
        color: var(--text);
        font-size: 12px;
        font-weight: 900;
      }

      .test-task-result-tab {
        min-height: 28px;
        padding: 0 10px;
        border: 1px solid transparent;
        border-radius: 7px;
        background: transparent;
        color: var(--soft);
        font-size: 12px;
        font-weight: 900;
        cursor: pointer;
      }

      .test-task-result-tab:hover,
      .test-task-result-tab.active {
        color: #dbeafe;
        border-color: rgba(96, 165, 250, 0.28);
        background: rgba(37, 99, 235, 0.18);
      }

      .test-task-result-panel-body {
        min-width: 0;
        min-height: 0;
        overflow: auto;
        padding: 10px;
      }

      .test-task-response-detail {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
        min-width: 0;
        min-height: 100%;
      }

      .test-task-response-block {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        min-width: 0;
        min-height: 0;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(2, 6, 23, 0.12);
      }

      .test-task-response-block-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
        color: var(--text);
        font-size: 12px;
        font-weight: 900;
      }

      .test-task-response-block-title-meta {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--soft);
        font-size: 11px;
        font-weight: 800;
      }

      .test-task-response-block-body {
        min-width: 0;
        min-height: 0;
        overflow: auto;
        padding: 10px;
      }

      .wss-result-assertion-placeholder {
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line);
        border-left: 4px solid var(--soft);
        border-radius: 8px;
        background: var(--field-soft);
        color: var(--text);
      }

      .wss-result-assertion-placeholder.success {
        border-left-color: var(--success);
        background: var(--success-surface);
      }

      .wss-result-assertion-placeholder.fail {
        border-left-color: var(--danger);
        background: var(--danger-surface);
      }

      .wss-result-assertion-placeholder.warning {
        border-left-color: var(--warning);
        background: var(--warning-surface);
      }

      .wss-result-assertion-title {
        font-size: 13px;
        line-height: 18px;
        font-weight: 900;
      }

      .wss-result-assertion-message {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.6;
        word-break: break-word;
      }

      .wss-result-assertion-meta {
        color: var(--soft);
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 11px;
        line-height: 16px;
      }

      .test-task-response-block .header-table {
        display: grid;
        gap: 0;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 6px;
        overflow: hidden;
      }

      .test-task-response-block .header-row {
        grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
        min-height: 28px;
        padding: 0;
        border: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
        border-radius: 0;
        background: transparent;
      }

      .test-task-response-block .header-row:last-child {
        border-bottom: 0;
      }

      .test-task-response-block .header-key,
      .test-task-response-block .header-value {
        padding: 7px 8px;
      }

      .test-task-response-block .header-key {
        border-right: 1px solid rgba(148, 163, 184, 0.1);
        background: rgba(15, 23, 42, 0.18);
      }

      .test-task-assertion-pane-head {
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(2, 6, 23, 0.18);
      }

      .test-task-assertion-pane-title {
        color: var(--text);
        font-size: 12px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-assertion-pane-meta {
        margin-top: 4px;
        color: var(--soft);
        font-size: 11px;
      }

      .test-task-case-title-control {
        display: flex;
        align-items: center;
        justify-self: start;
        flex: 0 1 auto;
        gap: 6px;
        min-width: 0;
        max-width: 100%;
      }

      .test-task-case-head-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        min-width: 0;
      }

      .test-task-case-heading {
        display: grid;
        gap: 4px;
        min-width: 0;
      }

      .test-task-case-title-text {
        flex: 0 1 auto;
        min-width: 0;
        color: var(--text);
        font-size: 12px;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-case-title-input {
        display: none;
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        border-radius: 7px;
        font-size: 12px;
        font-weight: 900;
      }

      .test-task-case-title-control.editing .test-task-case-title-text,
      .test-task-case-title-control.editing .test-task-case-title-edit-btn {
        display: none;
      }

      .test-task-case-title-control.editing .test-task-case-title-input {
        display: block;
      }

      .test-task-case-title-control.editing {
        justify-self: stretch;
        flex: 1 1 180px;
        width: auto;
      }

      .test-task-case-config {
        display: grid;
        gap: 8px;
        margin-top: 10px;
        padding: 10px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.18);
      }

      .test-task-parameter-pane .test-task-case-config {
        margin-top: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
      }

      .test-task-case-field {
        display: grid;
        gap: 5px;
      }

      .test-task-case-field span {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
      }

      .test-task-case-field input {
        width: 100%;
        min-width: 0;
        border-radius: 7px;
        font-size: 12px;
      }

      .test-task-parameter-head {
        display: grid;
        grid-template-columns: minmax(86px, 0.72fr) minmax(0, 1fr) auto;
        align-items: baseline;
        gap: 8px;
        margin-top: 2px;
      }

      .test-task-parameter-head > div {
        display: contents;
      }

      .test-task-parameter-head::after {
        content: "";
        width: 28px;
      }

      .test-task-parameter-head .test-task-section-title,
      .test-task-parameter-head .test-task-section-meta {
        min-width: 0;
      }

      .test-task-parameter-head .test-task-section-meta {
        margin-top: 0;
      }

      .test-task-parameter-head .test-task-section-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-parameter-head .test-task-section-meta {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-parameter-list {
        margin-top: 0;
      }

      .test-task-parameter-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 2px;
      }

      .test-task-assertion-row span {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .test-task-assertion-row input {
        flex: 0 0 auto;
        width: 14px;
        height: 14px;
        margin: 0;
      }

      .test-task-assertion-card {
        grid-template-columns: minmax(0, 1fr) 32px;
        align-items: start;
        border-radius: 8px;
      }

      .test-task-assertion-card .assertion-title {
        padding-right: 4px;
      }

      .test-task-assertion-card .assertion-message {
        min-height: 16px;
      }

      .test-task-assertion-check {
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        cursor: pointer;
      }

      .test-task-assertion-check input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--success);
        cursor: pointer;
      }

      .test-task-empty {
        padding: 12px;
        border: 1px dashed rgba(148, 163, 184, 0.18);
        border-radius: 8px;
        color: var(--soft);
        font-size: 12px;
        text-align: center;
      }

      .test-task-saved-actions {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 6px;
        margin-top: 10px;
      }

      .test-task-card-progress {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        min-width: 0;
      }

      .test-task-card-progress-track {
        height: 8px;
        min-width: 0;
        overflow: hidden;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.46);
      }

      .test-task-card-progress-bar {
        width: var(--test-task-progress, 0%);
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #22c55e, #16a34a);
        transition: width 0.22s ease, background 0.18s ease;
      }

      .test-task-card-progress.warning .test-task-card-progress-bar {
        background: linear-gradient(90deg, #ef4444, #dc2626);
      }

      .test-task-card-progress-text {
        color: var(--soft);
        font-size: 10px;
        font-variant-numeric: tabular-nums;
        line-height: 1;
        text-align: right;
        white-space: nowrap;
      }

      .test-task-card-menu {
        position: absolute;
        top: 6px;
        right: 6px;
        z-index: 3;
      }

      .test-task-card-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        padding: 0;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 7px;
        color: var(--soft);
        background: rgba(15, 23, 42, 0.52);
        cursor: pointer;
      }

      .test-task-card-menu-btn:hover,
      .test-task-card-menu.open .test-task-card-menu-btn {
        color: #bfdbfe;
        background: rgba(37, 99, 235, 0.22);
        border-color: rgba(96, 165, 250, 0.32);
      }

      .test-task-card-menu-btn svg {
        width: 15px;
        height: 15px;
        fill: currentColor;
      }

      .test-task-card-menu-options {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        display: none;
        min-width: 88px;
        padding: 5px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 16px 34px rgba(2, 6, 23, 0.36);
      }

      .test-task-card-menu.open .test-task-card-menu-options {
        display: grid;
      }

      /* Z57：卡片靠近 list 底部时菜单向上展开，避免被 list overflow:auto 裁切。
         由 adjustOpenCardMenus() 在 render/toggle 后测量后加上 .flip-up class。 */
      .test-task-card-menu-options.flip-up {
        top: auto;
        bottom: calc(100% + 6px);
      }

      .test-task-card-menu-option {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 7px 10px;
        border: 0;
        border-radius: 6px;
        color: var(--muted);
        background: transparent;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
        white-space: nowrap;
        cursor: pointer;
      }

      .test-task-card-menu-option:hover {
        color: #dbeafe;
        background: rgba(59, 130, 246, 0.16);
      }

      .test-task-card-menu-option.danger {
        color: #fca5a5;
      }

      .test-task-card-menu-option.danger:hover {
        color: #fecaca;
        background: rgba(239, 68, 68, 0.16);
      }

      .layout {
        display: grid;
        grid-template-columns: 360px minmax(0, 1fr);
        gap: 20px;
        align-items: stretch;
        min-height: calc(100vh - 32px);
      }

      .panel {
        display: flex;
        flex-direction: column;
        min-height: 0;
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: var(--shadow);
        backdrop-filter: blur(16px);
      }

      .panel-body {
        padding: 18px;
        min-height: 0;
      }

      .panel-title {
        margin: 0 0 14px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--muted);
      }

      .panel-title-row {
        display: none;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 10px;
      }

      .panel-title-row .panel-title {
        margin: 0;
      }

      .request-panel-title {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0;
        text-transform: none;
        color: var(--text);
      }

      .panel-title-group {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
      }

      .request-time-text {
        font-size: 10px;
        color: var(--soft);
        font-family: "Cascadia Code", Consolas, monospace;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .params-title-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 0;
      }

      .params-title-row .panel-title {
        margin: 0;
      }

      .profile-icon {
        position: relative;
        width: 17px;
        height: 17px;
        display: inline-block;
      }

      .profile-icon::before,
      .profile-icon::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        border: 2px solid currentColor;
      }

      .profile-icon::before {
        top: 0;
        width: 7px;
        height: 7px;
        border-radius: 50%;
      }

      .profile-icon::after {
        bottom: -1px;
        width: 15px;
        height: 6px;
        border-radius: 10px 10px 4px 4px;
        border-bottom-width: 0;
      }

      .network-status {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--soft);
        box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.16);
      }

      .network-status.prod {
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
      }

      .network-status.uat {
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
      }

      .network-status.direct {
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
      }

      .network-status.loading {
        background: var(--cyan);
        box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
      }

      .network-status.proxy {
        background: var(--warning);
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
      }

      .network-status.error {
        background: var(--danger);
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
      }

      .network-status.custom {
        background: #06b6d4;
        box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
      }

      .network-status.empty {
        background: #64748b;
        box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.16);
      }

      .left-stack,
      .right-stack {
        display: flex;
        flex-direction: column;
        gap: 18px;
        min-height: 0;
        height: 100%;
      }

      .left-stack {
        overflow: auto;
      }

      .right-stack {
        gap: 0;
        overflow: hidden;
      }

      .left-stack > .panel:first-child,
      .right-stack > .panel:first-child {
        flex: 0 0 auto;
      }

      .right-stack > .panel:last-child {
        flex: 1 1 0;
        min-height: 0;
      }

      .right-stack > .panel.request-detail-panel:first-child {
        flex: 0 0 clamp(360px, 36vh, 480px);
        min-height: 0;
      }

      .left-stack > .panel:last-child {
        flex: 0 0 auto;
        min-height: 0;
      }

      .left-stack > .panel:last-child .panel-body {
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow: visible;
      }

      .left-stack > .panel:last-child .panel-title {
        margin-bottom: 0;
      }

      .params-editor-field {
        display: block;
        margin-bottom: 0;
      }

      .params-editor-field textarea {
        height: clamp(160px, 28vh, 260px);
      }

      .params-editor-field.is-hidden {
        display: none;
      }

      .right-stack > .panel:last-child .panel-body {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
      }

      .right-resize-handle {
        flex: 0 0 18px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        cursor: row-resize;
        touch-action: none;
        user-select: none;
      }

      .right-resize-handle::before {
        content: "";
        position: absolute;
        left: calc(55.34% - 3px);
        transform: translateX(-50%);
        width: 52px;
        height: 4px;
        border-radius: 999px;
        background: rgba(96, 165, 250, 0.28);
        box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.08);
        transition: background 0.16s ease, width 0.16s ease;
      }

      .right-resize-handle:hover::before,
      .right-resize-handle.active::before {
        width: 72px;
        background: rgba(96, 165, 250, 0.58);
      }

      body.resizing-panels {
        cursor: row-resize;
        user-select: none;
      }

      .field {
        margin-bottom: 12px;
      }

      .field:last-child {
        margin-bottom: 0;
      }

      .field label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        font-size: 11px;
        color: var(--muted);
      }

      .field label .hint {
        color: var(--soft);
        font-size: 10px;
      }

      .config-section-title {
        margin: 0 0 10px;
        font-size: 14px;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 700;
        line-height: 1.4;
      }

      .field .config-section-title {
        display: block;
        margin-bottom: 10px;
        color: #94a3b8;
        justify-content: flex-start;
        align-items: initial;
        gap: 0;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
        letter-spacing: 0.5px;
      }

      .config-sub-label {
        display: block;
        margin-bottom: 4px;
        font-size: 11px;
        color: #64748b;
        line-height: 1.4;
      }

      .field .config-sub-label {
        display: block;
        margin-bottom: 4px;
        color: #64748b;
        justify-content: flex-start;
        align-items: initial;
        gap: 0;
      }

      .config-block {
        margin-top: 12px;
      }

      .toggle-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
      }

      .toggle-label {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
      }

      .toggle-label strong {
        font-size: 12px;
        font-weight: 600;
        color: var(--text);
      }

      .toggle-label span {
        font-size: 10px;
        color: var(--soft);
        line-height: 1.4;
      }

      .switch {
        position: relative;
        width: 42px;
        height: 24px;
        flex: 0 0 auto;
      }

      .switch input {
        position: absolute;
        inset: 0;
        opacity: 0;
        margin: 0;
        cursor: pointer;
      }

      .switch-track {
        position: absolute;
        inset: 0;
        border-radius: 999px;
        background: rgba(51, 65, 85, 0.95);
        border: 1px solid rgba(148, 163, 184, 0.18);
        transition: background 0.2s ease, border-color 0.2s ease;
      }

      .switch-track::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #e2e8f0;
        transition: transform 0.2s ease;
      }

      .switch input:checked + .switch-track {
        background: rgba(59, 130, 246, 0.9);
        border-color: rgba(59, 130, 246, 0.95);
      }

      .switch input:checked + .switch-track::after {
        transform: translateX(18px);
      }

      .inline-actions {
        display: flex;
        gap: 8px;
      }

      .inline-actions .btn {
        flex: 0 0 auto;
      }

      .auth-panel {
        margin-top: 6px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transform: translateY(-6px);
        pointer-events: none;
        transition:
          max-height 0.28s ease,
          opacity 0.22s ease,
          transform 0.28s ease;
      }

      .auth-panel.active {
        max-height: 220px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }

      .status-text {
        margin-top: 8px;
        font-size: 11px;
        line-height: 1.5;
        color: var(--soft);
        min-height: 16px;
      }

      .status-text.success {
        color: #86efac;
      }

      .status-text.fail {
        color: #fca5a5;
      }

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

      input,
      select,
      textarea {
        width: 100%;
        border: 1px solid var(--line-strong);
        border-radius: 10px;
        padding: 8px 10px;
        font-size: 13px;
        color: var(--text);
        background: rgba(15, 23, 42, 0.88);
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
      }

      select {
        color: #e2e8f0;
        background-color: #0f172a;
        color-scheme: dark;
        -webkit-text-fill-color: #e2e8f0;
      }

      option,
      optgroup {
        color: #e2e8f0;
        background-color: #0f172a;
      }

      option:checked,
      option:hover {
        color: #f8fafc;
        background-color: #1d4ed8;
      }

      input:focus,
      select:focus,
      textarea:focus {
        outline: none;
        border-color: rgba(59, 130, 246, 0.9);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
      }

      textarea {
        min-height: 112px;
        resize: vertical;
        font-family: "Cascadia Code", Consolas, monospace;
        font-size: 12px;
        line-height: 1.45;
      }

      #paramsEditor {
        min-height: 120px;
        resize: none;
        scrollbar-width: none;
      }

      #paramsEditor::-webkit-scrollbar {
        width: 0;
        height: 0;
      }

      .parameter-panel {
        display: none;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.42);
        overflow: visible;
      }

      .parameter-panel.is-active {
        display: block;
      }

      .parameter-body {
        display: flex;
        flex-direction: column;
        padding: 12px;
      }

      .parameter-help {
        margin: 0 0 10px;
        color: var(--soft);
        font-size: 11px;
        line-height: 1.6;
      }

      .parameter-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow: visible;
      }

      .parameter-row {
        display: grid;
        grid-template-columns: minmax(86px, 0.68fr) minmax(0, 1fr) minmax(72px, 0.42fr) auto;
        gap: 8px;
        align-items: start;
      }

      .parameter-row input,
      .parameter-row textarea {
        font-size: 12px;
      }

      .parameter-row textarea {
        min-height: 36px;
        height: 36px;
        resize: vertical;
      }

      /* 值输入区域容器（包裹 textarea + 展开按钮） */
      .parameter-values-wrap {
        position: relative;
        min-width: 0;
      }

      .parameter-values-wrap textarea {
        display: block;
        width: 100%;
      }

      /* 展开按钮：PC 默认隐藏，移动端显示 */
      .parameter-expand-btn {
        display: none;
      }

      .params-expand-btn {
        display: none;
      }

      .params-editor-field {
        position: relative;
      }

      /* 参数值展开编辑 modal */
      .param-expand-modal {
        position: fixed;
        inset: 0;
        z-index: 200;
        display: none;
        flex-direction: column;
        background: var(--bg);
      }

      .param-expand-modal.open {
        display: flex;
      }

      .param-expand-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--line);
        background: var(--panel);
        flex-shrink: 0;
      }

      .param-expand-title {
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .param-expand-cancel-btn {
        flex-shrink: 0;
        padding: 5px 12px;
        border-radius: 8px;
        border: 1px solid var(--line-strong);
        background: transparent;
        color: var(--muted);
        font-size: 12px;
        cursor: pointer;
        min-height: unset;
      }

      .param-expand-hint {
        padding: 8px 16px 4px;
        font-size: 11px;
        color: var(--soft);
        flex-shrink: 0;
      }

      .param-expand-textarea {
        flex: 1;
        min-height: 0;
        resize: none;
        border: none;
        border-radius: 0;
        padding: 10px 16px;
        font-size: 13px;
        line-height: 1.65;
        font-family: "Cascadia Code", Consolas, monospace;
        background: var(--bg);
        color: var(--text);
        width: 100%;
        box-sizing: border-box;
      }

      .param-expand-textarea:focus {
        outline: none;
        box-shadow: none;
        border-color: transparent;
      }

      .param-expand-actions {
        padding: 12px 16px;
        display: flex;
        border-top: 1px solid var(--line);
        background: var(--panel);
        flex-shrink: 0;
      }

      .param-expand-confirm-btn {
        flex: 1;
        min-height: 44px;
        border: none;
        border-radius: 10px;
        background: var(--primary);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.15s ease;
      }

      .param-expand-confirm-btn:hover {
        background: var(--primary-hover);
      }

      html.light-theme .param-expand-cancel-btn {
        border-color: #cbd5e1;
      }

      /* 通用确认弹框 */
      .confirm-modal {
        position: fixed;
        inset: 0;
        z-index: 300;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(2, 6, 23, 0.55);
        backdrop-filter: blur(6px);
      }

      .confirm-modal.open {
        display: flex;
      }

      .confirm-dialog {
        width: min(340px, 100%);
        border-radius: 16px;
        border: 1px solid var(--line-strong);
        background: var(--panel-strong);
        box-shadow: var(--shadow);
        overflow: hidden;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 18px;
      }

      .confirm-message {
        margin: 0;
        font-size: 14px;
        line-height: 1.65;
        color: var(--text);
        text-align: center;
      }

      .confirm-actions {
        display: flex;
        gap: 10px;
      }

      .confirm-cancel-btn,
      .confirm-ok-btn {
        flex: 1;
      }

      .guest-login-modal {
        position: fixed;
        inset: 0;
        z-index: 320;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(15, 23, 42, 0.42);
        backdrop-filter: blur(8px);
      }

      .guest-login-modal.open {
        display: flex;
      }

      .guest-login-dialog {
        position: relative;
        width: min(440px, 100%);
        border: 1px solid rgba(148, 163, 184, 0.26);
        border-radius: 10px;
        background:
          linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
        box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
        padding: 24px;
      }

      .guest-login-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        min-height: 32px;
        border: 0;
        border-radius: 8px;
        color: #64748b;
        background: transparent;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
      }

      .guest-login-close:hover {
        color: #0f172a;
        background: rgba(15, 23, 42, 0.06);
      }

      .guest-login-body {
        padding-right: 34px;
      }

      .guest-login-title {
        margin: 0;
        color: #0f172a;
        font-size: 18px;
        line-height: 1.35;
      }

      .guest-login-desc {
        margin: 10px 0 0;
        color: #475569;
        font-size: 13px;
        line-height: 1.7;
      }

      .guest-login-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 24px;
      }

      .guest-login-actions .btn {
        min-height: 42px;
      }

      .email-bind-form {
        display: grid;
        gap: 14px;
      }

      .email-bind-code-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
      }

      .email-bind-status {
        margin: 0;
        min-height: 20px;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
      }

      .email-bind-status.success {
        color: #86efac;
      }

      .email-bind-status.fail {
        color: #fca5a5;
      }

      .account-security-form {
        display: grid;
        gap: 14px;
      }

      .account-security-actions {
        display: block;
        padding: 6px 0;
      }

      .account-security-mode-btn {
        width: 100%;
        min-height: 0;
        padding: 13px 12px;
        border: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.08);
        border-radius: 0;
        background: transparent;
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
      }

      .account-security-mode-btn:last-child {
        border-bottom: 0;
      }

      .account-security-mode-btn:hover {
        background: rgba(148, 163, 184, 0.08);
      }

      .account-security-enter {
        flex: 0 0 auto;
        color: var(--muted);
        font-size: 18px;
        font-weight: 800;
        line-height: 1;
      }

      .account-security-mode-btn:disabled {
        opacity: 0.52;
        cursor: not-allowed;
      }

      .account-security-panel {
        display: none;
        gap: 12px;
      }

      .account-security-panel.active {
        display: grid;
      }

      .account-security-next-step {
        display: none;
        gap: 12px;
      }

      .account-security-next-step.active {
        display: grid;
      }

      .account-security-current-step,
      .delete-account-verify-fields {
        display: grid;
        gap: 12px;
      }

      .account-security-current-step.hidden,
      .delete-account-verify-fields.hidden,
      .tool-field.delete-account-code-field-hidden {
        display: none;
      }

      .btn.btn-secondary.success-state,
      .btn.btn-secondary.success-state:disabled {
        color: #166534;
        border-color: rgba(34, 197, 94, 0.28);
        background: rgba(34, 197, 94, 0.16);
        cursor: default;
        opacity: 1;
      }

      html.light-theme .btn.btn-secondary.success-state,
      html.light-theme .btn.btn-secondary.success-state:disabled {
        color: #166534;
        border-color: rgba(34, 197, 94, 0.42);
        background: #bbf7d0;
        opacity: 1;
      }

      /* 导入断言列表 */
      .import-market-group {
        margin-bottom: 16px;
      }

      .import-market-title {
        position: sticky;
        top: 0;
        z-index: 1;
        padding: 7px 0 8px;
        color: #dbeafe;
        background: rgba(15, 23, 42, 0.96);
        border-bottom: 1px solid var(--line);
        font-size: 12px;
        font-weight: 800;
      }

      .import-group {
        margin: 10px 0 12px;
        padding-left: 8px;
        border-left: 2px solid rgba(59, 130, 246, 0.18);
      }

      .import-group-title {
        font-size: 11px;
        font-weight: 700;
        color: var(--muted);
        padding: 0 0 5px;
        margin-bottom: 4px;
      }

      .import-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 4px;
        border-radius: 8px;
        font-size: 12px;
        color: var(--text);
        cursor: pointer;
        line-height: 1.5;
      }

      .import-item:hover { background: rgba(148, 163, 184, 0.08); }

      .import-item input[type="checkbox"] {
        width: 15px;
        height: 15px;
        min-height: unset;
        flex-shrink: 0;
        accent-color: var(--primary);
      }

      .import-empty {
        color: var(--soft);
        font-size: 12px;
        text-align: center;
        padding: 20px 0;
      }

      html.light-theme .import-market-title {
        color: #1d4ed8;
        background: rgba(248, 250, 252, 0.96);
      }

      html.light-theme .import-group {
        border-left-color: rgba(37, 99, 235, 0.22);
      }

      .parameter-remove-btn {
        width: 32px;
        height: 32px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 9px;
        color: #fecaca;
        background: rgba(15, 23, 42, 0.72);
        cursor: pointer;
      }

      .parameter-remove-btn:hover {
        border-color: rgba(248, 113, 113, 0.42);
        background: rgba(127, 29, 29, 0.28);
      }

      .parameter-empty {
        padding: 10px;
        border-radius: 10px;
        color: var(--soft);
        background: rgba(15, 23, 42, 0.36);
        font-size: 11px;
        line-height: 1.6;
        text-align: center;
      }

      .parameter-actions {
        display: flex;
        justify-content: center;
        margin-top: 10px;
      }

      .parameter-add-btn {
        width: 100%;
        min-height: 36px;
        border: 1px dashed rgba(96, 165, 250, 0.44);
        border-radius: 10px;
        color: #bfdbfe;
        background: rgba(59, 130, 246, 0.08);
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
      }

      .parameter-add-btn:hover {
        border-color: rgba(96, 165, 250, 0.72);
        background: rgba(59, 130, 246, 0.16);
      }

      .parameter-panel-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
      }

      .parameter-panel-actions .parameter-add-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 38px;
        font-size: 13px;
        font-weight: 800;
      }

      .parameter-add-icon {
        font-size: 18px;
        line-height: 1;
      }

      @media (max-width: 1180px) {
        .parameter-row {
          grid-template-columns: minmax(0, 1fr) minmax(72px, 0.45fr) auto;
        }

        .parameter-row textarea,
        .parameter-row .parameter-values-wrap {
          grid-column: 1 / -1;
        }
      }

      .actions {
        display: grid;
        flex: 0 0 auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 0;
      }

      .btn {
        border: none;
        border-radius: 10px;
        padding: 9px 12px;
        font-size: 12px;
        cursor: pointer;
        transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
      }

      .btn:hover {
        transform: translateY(-1px);
      }

      .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
      }

      .btn.is-layout-placeholder {
        visibility: hidden;
        pointer-events: none;
      }

      .btn-primary {
        background: var(--primary);
        color: white;
      }

      .btn-primary:hover {
        background: var(--primary-hover);
      }

      .btn.test-task-stop-action {
        color: #fff;
        background: #dc2626;
      }

      .btn.test-task-stop-action:hover {
        background: #b91c1c;
      }

      .btn-secondary {
        background: #475569;
        color: white;
      }

      .btn-secondary:hover {
        background: #64748b;
      }

      .btn.schedule-list-action {
        color: var(--on-primary);
        background: var(--success-action);
        box-shadow: 0 0 0 1px var(--success-surface);
      }

      .btn.schedule-list-action:hover {
        background: var(--success-strong);
      }

      .lang-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }

      .combo-select {
        position: relative;
      }

      .combo-select input {
        padding-right: 38px;
        min-height: 37px;
      }

      .combo-trigger {
        position: absolute;
        top: 1px;
        right: 1px;
        width: 34px;
        height: calc(100% - 2px);
        border: none;
        border-radius: 0 9px 9px 0;
        background: transparent;
        color: #94a3b8;
        cursor: pointer;
      }

      .combo-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        max-height: 240px;
        overflow: auto;
        display: none;
        padding: 6px;
        border: 1px solid var(--line-strong);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 14px 32px rgba(2, 6, 23, 0.45);
        z-index: 30;
      }

      .combo-menu.open {
        display: block;
      }

      .combo-item,
      .combo-empty {
        padding: 9px 10px;
        border-radius: 8px;
        font-size: 12px;
        line-height: 1.5;
      }

      .combo-item {
        color: var(--text);
        cursor: pointer;
      }

      .combo-item:hover,
      .combo-item.active {
        background: rgba(30, 41, 59, 0.9);
      }

      .combo-empty {
        color: var(--soft);
      }

      .lang-btn {
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 10px;
        padding: 8px 10px;
        font-size: 12px;
        color: #cbd5e1;
        background: rgba(15, 23, 42, 0.82);
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
          transform 0.15s ease;
      }

      .lang-btn:hover {
        transform: translateY(-1px);
        border-color: rgba(96, 165, 250, 0.45);
      }

      .lang-btn.active {
        color: #f8fafc;
        background: var(--success-action);
        border-color: var(--success-action);
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
      }

      .btn-ghost {
        background: #0f172a;
        color: #bfdbfe;
        border: 1px solid rgba(59, 130, 246, 0.28);
      }

      .response-shell {
        display: grid;
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1.17fr);
        gap: 16px;
        flex: 1 1 0;
        min-height: 0;
      }

      .request-detail-panel {
        display: flex;
        flex-direction: column;
        min-height: 0;
      }

      .request-detail-panel .panel-body {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
      }

      .request-detail-shell {
        display: grid;
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1.17fr);
        gap: 16px;
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
        overflow: hidden;
      }

      .request-detail-head {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 12px 16px 10px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        flex: 0 0 auto;
      }

      .request-detail-head .panel-title {
        margin: 0;
      }

      .request-detail-meta {
        font-size: 14px;
        line-height: 1.4;
        color: #94a3b8;
        margin: 0;
        min-height: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        overflow: hidden;
        word-break: break-all;
        font-weight: 700;
      }

      .request-detail-meta:empty {
        display: none;
      }

      .request-detail-viewer,
      .tool-viewer,
      .doc-viewer {
        min-height: 0;
        max-height: 100%;
      }

      .request-detail-viewer {
        display: flex;
        flex-direction: column;
      }

      .tool-viewer {
        display: flex;
        flex-direction: column;
      }

      .doc-viewer {
        display: none;
      }

      .api-doc-content {
        font-family: inherit;
        color: #d8e2f2;
      }

      .api-doc-block {
        margin-bottom: 14px;
      }

      .api-doc-block:last-child {
        margin-bottom: 0;
      }

      .api-doc-title {
        margin-bottom: 8px;
        color: #dbeafe;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.5;
      }

      .api-doc-meta {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 6px 12px;
        padding: 12px;
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.56);
        border: 1px solid rgba(148, 163, 184, 0.12);
        font-size: 12px;
        line-height: 1.6;
      }

      .api-doc-label {
        color: var(--soft);
      }

      .api-doc-value {
        min-width: 0;
        word-break: break-word;
      }

      .api-doc-code {
        margin: 0;
        padding: 12px;
        border-radius: 12px;
        background: rgba(2, 6, 23, 0.5);
        border: 1px solid rgba(148, 163, 184, 0.12);
        color: #d8e2f2;
        font-family: "Cascadia Code", Consolas, monospace;
        font-size: 12px;
        line-height: 1.6;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .api-doc-field-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }

      .api-doc-field {
        display: grid;
        grid-template-columns: minmax(112px, 0.48fr) minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.56);
        border: 1px solid rgba(148, 163, 184, 0.12);
      }

      .api-doc-field-path {
        min-width: 0;
        display: block;
        padding-left: calc(var(--api-doc-level, 0) * 16px);
        color: #93c5fd;
        font-family: "Cascadia Code", Consolas, monospace;
        font-size: 12px;
        line-height: 1.6;
        white-space: normal;
        word-break: break-word;
      }

      .api-doc-field-path-name {
        display: inline-block;
        font-weight: 700;
      }

      .api-doc-field-desc-empty {
        color: var(--soft);
      }

      .api-doc-field-desc {
        min-width: 0;
        color: #d8e2f2;
        font-size: 12px;
        line-height: 1.6;
        word-break: break-word;
      }

      .request-detail-panel .mini-content {
        flex: 1 1 0;
        min-height: 0;
        max-height: none;
      }

      .tool-content {
        flex: 1 1 0;
        min-height: 0;
        max-height: none;
        display: flex;
        align-items: stretch;
        justify-content: flex-start;
        overflow: auto;
      }

      .tool-stack {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        min-height: 0;
      }

      .tool-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }

      .tool-toolbar-actions {
        display: inline-flex;
        gap: 8px;
        flex-shrink: 0;
      }

      .tool-summary {
        min-width: 0;
        color: var(--soft);
        font-size: 12px;
        line-height: 1.5;
      }

      .tool-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .tool-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .tool-field label {
        font-size: 11px;
        line-height: 1.4;
        color: #64748b;
      }

      .tool-field input {
        width: 100%;
      }

      .task-assert-group-field-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 8px;
        min-width: 0;
      }

      .task-assert-group-field-hint {
        color: var(--soft);
        font-size: 11px;
        line-height: 1.5;
      }

      .task-assert-group-field-list {
        display: grid;
        gap: 8px;
        min-width: 0;
      }

      .task-assert-group-field-row {
        display: grid;
        grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr) 32px;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }

      .task-assert-group-field-row select,
      .task-assert-group-field-row input {
        min-width: 0;
      }

      .task-assert-group-field-add {
        width: auto;
        min-width: 96px;
        min-height: 32px;
        padding: 0 10px;
        font-size: 12px;
        font-weight: 800;
        border-style: solid;
      }

      .task-assert-group-field-remove {
        flex: 0 0 32px;
      }

      .task-assert-group-field-remove:disabled {
        cursor: not-allowed;
        color: #94a3b8;
        border-color: rgba(148, 163, 184, 0.16);
        background: rgba(51, 65, 85, 0.28);
        opacity: 0.72;
      }

      html.light-theme .task-assert-group-field-remove:disabled {
        color: #94a3b8;
        border-color: rgba(148, 163, 184, 0.22);
        background: rgba(226, 232, 240, 0.72);
      }

      .dual-field-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
      }

      .time-select {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 6px;
      }

      .time-select select {
        min-width: 0;
        text-align: center;
      }

      .time-select-separator {
        color: var(--muted);
        font-weight: 700;
        line-height: 1;
        user-select: none;
      }

      .time-range-select {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 8px;
      }

      .time-range-separator {
        color: var(--muted);
        font-weight: 700;
        line-height: 1;
        text-align: center;
        user-select: none;
      }

      .tool-action {
        align-self: flex-start;
      }

      .tool-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
      }

      .assertion-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
        min-height: 0;
        overflow: auto;
      }

      .assertion-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: center;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        background: rgba(15, 23, 42, 0.56);
      }

      .assertion-item.disabled {
        border-color: rgba(148, 163, 184, 0.08);
        background: rgba(15, 23, 42, 0.34);
      }

      .assertion-main {
        min-width: 0;
      }

      .assertion-title {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        margin-bottom: 4px;
      }

      .assertion-enabled-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        flex: 0 0 8px;
        background: #facc15;
        box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.14);
      }

      .assertion-enabled-dot.enabled {
        background: #22c55e;
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
      }

      .assertion-type {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #dbeafe;
        font-size: 12px;
        font-weight: 700;
      }

      .assertion-rename-btn {
        flex-shrink: 0;
        width: auto;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 0;
        max-height: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        color: var(--muted);
        background: transparent;
        cursor: pointer;
        font-size: 12px;
        line-height: 1;
        padding: 0;
        box-sizing: border-box;
      }

      .assertion-rename-btn:hover,
      .assertion-rename-btn:focus,
      .assertion-rename-btn:active {
        color: var(--accent);
        background: transparent;
        opacity: 1;
      }

      .assertion-rename-icon {
        display: inline-block;
        transform: scaleX(-1);
      }

      .assertion-rename-btn.is-confirm {
        width: 22px;
        min-width: 22px;
        max-width: 22px;
        height: 22px;
        min-height: 22px;
        max-height: 22px;
        color: #86efac;
        border: 1px solid rgba(34, 197, 94, 0.32);
        border-radius: 7px;
        background: rgba(34, 197, 94, 0.12);
        font-size: 14px;
        font-weight: 800;
      }

      .assertion-rename-btn.is-confirm:hover,
      .assertion-rename-btn.is-confirm:focus,
      .assertion-rename-btn.is-confirm:active {
        color: #bbf7d0;
        border-color: rgba(34, 197, 94, 0.48);
        background: rgba(34, 197, 94, 0.18);
        opacity: 1;
      }

      .assertion-name-input {
        min-width: 0;
        flex: 1;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 8px;
        padding: 5px 8px;
        color: #dbeafe;
        background: rgba(15, 23, 42, 0.46);
        font-size: 12px;
        font-weight: 700;
        outline: none;
      }

      .assertion-name-input:focus {
        border-color: rgba(56, 189, 248, 0.55);
        box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.12);
      }

      .assertion-status {
        flex-shrink: 0;
        padding: 3px 7px;
        border-radius: 999px;
        color: var(--soft);
        background: rgba(51, 65, 85, 0.42);
        font-size: 10px;
        line-height: 1;
      }

      .assertion-status.success {
        color: #bbf7d0;
        background: rgba(34, 197, 94, 0.16);
      }

      .assertion-status.fail {
        color: #fecaca;
        background: rgba(239, 68, 68, 0.16);
      }

      .assertion-status.disabled {
        color: #cbd5e1;
        background: rgba(100, 116, 139, 0.18);
      }

      .assertion-status.idle {
        color: #cbd5e1;
        background: rgba(100, 116, 139, 0.18);
      }

      .log-assertion-status {
        flex-shrink: 0;
        padding: 2px 7px;
        border-radius: 999px;
        font-size: 10px;
        line-height: 1.5;
        white-space: nowrap;
      }

      .log-assertion-status.success {
        color: #bbf7d0;
        background: rgba(34, 197, 94, 0.16);
      }

      .log-assertion-status.fail {
        color: #fecaca;
        background: rgba(239, 68, 68, 0.16);
      }

      .assertion-desc,
      .assertion-message {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--soft);
        font-size: 11px;
        line-height: 1.5;
      }

      .assertion-message {
        color: #d8e2f2;
      }

      .assertion-actions {
        display: inline-flex;
        gap: 6px;
        flex-shrink: 0;
      }

      .assertion-action-btn {
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 999px;
        border: 1px solid rgba(59, 130, 246, 0.24);
        background: rgba(15, 23, 42, 0.88);
        color: #bfdbfe;
        cursor: pointer;
        font-size: 12px;
        line-height: 1;
      }

      .assertion-action-btn:hover {
        background: rgba(30, 41, 59, 0.92);
        border-color: rgba(96, 165, 250, 0.44);
      }

      .assertion-action-btn.disabled {
        color: #cbd5e1;
        border-color: rgba(148, 163, 184, 0.2);
        background: rgba(51, 65, 85, 0.38);
      }

      .tool-result {
        flex: 1;
        min-height: 0;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        background: rgba(15, 23, 42, 0.56);
        overflow: auto;
      }

      .tool-result.empty {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: var(--soft);
      }

      .tool-result.success {
        border-color: rgba(34, 197, 94, 0.28);
        background: rgba(20, 83, 45, 0.18);
      }

      .tool-result.fail {
        border-color: rgba(239, 68, 68, 0.28);
        background: rgba(127, 29, 29, 0.18);
      }

      .tool-result-title {
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 8px;
      }

      .tool-result.success .tool-result-title {
        color: #bbf7d0;
      }

      .tool-result.fail .tool-result-title {
        color: #fecaca;
      }

      .tool-result-body {
        font-size: 12px;
        line-height: 1.7;
        color: #d8e2f2;
        word-break: break-word;
        white-space: pre-wrap;
      }

      .tool-result-list {
        margin: 0;
        padding-left: 18px;
        color: #fca5a5;
        font-size: 12px;
        line-height: 1.7;
      }

      .assertion-modal {
        position: fixed;
        inset: 0;
        z-index: 200; /* 高于 mobile-top-bar / mobile-tabbar 的 z-index:60，覆盖导航栏防止误触 */
        display: none;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: rgba(2, 6, 23, 0.62);
        backdrop-filter: blur(10px);
      }

      .assertion-modal.open {
        display: flex;
      }

      .assertion-dialog {
        width: min(420px, 100%);
        border-radius: 16px;
        border: 1px solid var(--line-strong);
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
        overflow: hidden;
      }

      .task-assertion-dialog {
        width: min(480px, calc(100vw - 28px));
      }

      .task-assertion-list-dialog {
        width: min(680px, calc(100vw - 28px));
      }

      .assertion-dialog-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
        background: rgba(2, 6, 23, 0.45);
      }

      .assertion-dialog-title {
        margin: 0;
        color: var(--text);
        font-size: 14px;
        line-height: 1.4;
      }

      .assertion-dialog-head .icon-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        flex: 0 0 28px;
        padding: 0;
        border-radius: 8px;
      }

      .assertion-dialog-body {
        padding: 16px;
      }

      .task-assertion-list-dialog .assertion-dialog-body {
        max-height: min(70vh, 620px);
        overflow: auto;
      }

      .assertion-dialog-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 0 16px 16px;
      }

      .new-task-dialog {
        width: min(520px, calc(100vw - 28px));
        border-radius: 12px;
      }

      .new-task-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .new-task-option {
        display: grid;
        gap: 8px;
        min-height: 154px;
        padding: 16px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.42);
        color: var(--text);
        text-align: left;
        cursor: pointer;
        transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
      }

      .new-task-option:hover,
      .new-task-option:focus-visible {
        transform: translateY(-1px);
        border-color: rgba(96, 165, 250, 0.44);
        background: rgba(30, 41, 59, 0.78);
        outline: none;
      }

      .new-task-option-kicker {
        color: var(--accent-2);
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
      }

      .new-task-option-title {
        color: var(--text);
        font-size: 16px;
        font-weight: 900;
        line-height: 1.35;
      }

      .new-task-option-desc {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.65;
      }

      html.light-theme .new-task-option {
        border-color: rgba(100, 116, 139, 0.16);
        background: rgba(248, 250, 252, 0.92);
        color: #0f172a;
      }

      html.light-theme .new-task-option:hover,
      html.light-theme .new-task-option:focus-visible {
        border-color: rgba(37, 99, 235, 0.3);
        background: rgba(239, 246, 255, 0.96);
      }

      html.light-theme .new-task-option-title {
        color: #0f172a;
      }

      html.light-theme .new-task-option-desc {
        color: #64748b;
      }

      .schedule-dialog {
        width: min(520px, 100%);
        max-height: min(88vh, 760px);
        display: flex;
        flex-direction: column;
      }

      .schedule-dialog .assertion-dialog-body {
        overflow: auto;
      }

      /* 两步进度条（新版 PRD L112：目标选择 → 频率设置 两步合并到同一 dialog） */
      .schedule-steps {
        display: flex;
        gap: 16px;
        padding: 10px 22px 4px;
        font-size: 12px;
        color: var(--soft);
      }
      .schedule-step {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .schedule-step-num {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border: 1px solid var(--line-strong);
        border-radius: 50%;
        font-size: 11px;
        font-weight: 700;
      }
      .schedule-step.active { color: var(--text); }
      .schedule-step.active .schedule-step-num {
        border-color: var(--primary);
        background: var(--primary);
        color: var(--on-primary);
      }

      /* 两步切换：默认 Step1，data-schedule-step=2 时切到 Step2 */
      .schedule-step-pane { display: none; }
      #scheduleTaskModal[data-schedule-step="1"] [data-schedule-step-pane="1"] { display: block; }
      #scheduleTaskModal[data-schedule-step="2"] [data-schedule-step-pane="2"] { display: block; }
      /* 编辑模式：隐藏 Step1 与 .schedule-steps 进度条（编辑只改频率） */
      #scheduleTaskModal[data-schedule-mode="edit"] .schedule-steps { display: none; }

      /* Footer 按钮按 step / 模式可见性 */
      .schedule-task-actions #prevScheduleStepBtn,
      .schedule-task-actions #nextScheduleStepBtn,
      .schedule-task-actions #confirmScheduleTaskBtn { display: none; }
      /* Step1 新建：显示「下一步 →」 */
      #scheduleTaskModal[data-schedule-step="1"]:not([data-schedule-mode="edit"]) #nextScheduleStepBtn { display: inline-flex; }
      /* Step2 新建：显示「← 上一步」+「保存任务」 */
      #scheduleTaskModal[data-schedule-step="2"]:not([data-schedule-mode="edit"]) #prevScheduleStepBtn,
      #scheduleTaskModal[data-schedule-step="2"]:not([data-schedule-mode="edit"]) #confirmScheduleTaskBtn { display: inline-flex; }
      /* 编辑模式：只显示「保存修改」 */
      #scheduleTaskModal[data-schedule-mode="edit"] #confirmScheduleTaskBtn { display: inline-flex; }

      .schedule-form {
        display: grid;
        gap: 12px;
      }

      .schedule-form label {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .schedule-form > .tool-field > textarea {
        width: 100%;
        min-height: 150px;
        resize: vertical;
        font-family: "Cascadia Code", Consolas, monospace;
      }

      .schedule-inline {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
      }

      /* M1：summary box 改中性灰底，关键字段（目标名 / 下次运行时间）用 <b> 加粗 */
      .schedule-summary {
        padding: 11px 13px;
        border-radius: 10px;
        color: var(--muted);
        background: var(--field-soft, rgba(15, 23, 42, 0.52));
        border: 1px solid var(--line);
        font-size: 12.5px;
        line-height: 1.6;
      }
      .schedule-summary b { color: var(--text); font-weight: 700; }

      .assertion-param-fields {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .assertion-param-fields textarea {
        min-height: 104px;
        resize: vertical;
      }

      .tool-placeholder {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        min-height: 100%;
        text-align: center;
        color: var(--soft);
      }

      .tool-placeholder-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #bfdbfe;
        background: rgba(59, 130, 246, 0.08);
        border: 1px solid rgba(59, 130, 246, 0.18);
        font-size: 18px;
        font-weight: 700;
      }

      .tool-placeholder-text {
        font-size: 12px;
        line-height: 1.7;
        color: var(--soft);
      }

      .viewer {
        background: var(--panel-strong);
        border: 1px solid var(--line-strong);
        border-radius: 14px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
      }

      .viewer-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 16px 12px;
        border-bottom: 1px solid var(--line);
        background: var(--tab-bar-bg);
      }

      .viewer-head-left {
        min-width: 0;
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .viewer-head strong {
        display: block;
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 0;
      }

      .title-path {
        font-size: 14px;
        line-height: 1.4;
        color: var(--soft);
        font-weight: 400;
      }

      .viewer-head-right {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        margin-left: auto;
      }

      .viewer-head-right.hidden {
        display: none;
      }

      .icon-btn {
        width: 30px;
        height: 30px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        line-height: 1;
      }

      .param-reset-btn {
        width: 22px;
        height: 22px;
        min-height: 22px;
        border-radius: 10px;
        flex-shrink: 0;
      }

      .reset-icon {
        width: 14px;
        height: 14px;
        display: block;
      }

      .reset-icon path {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .copy-icon {
        position: relative;
        width: 14px;
        height: 14px;
        display: inline-block;
      }

      .copy-icon::before,
      .copy-icon::after {
        content: "";
        position: absolute;
        width: 9px;
        height: 9px;
        border: 1.5px solid currentColor;
        border-radius: 2px;
        background: transparent;
        box-sizing: border-box;
      }

      .copy-icon::before {
        top: 1px;
        left: 4px;
        opacity: 0.9;
      }

      .copy-icon::after {
        top: 4px;
        left: 1px;
      }

      .status-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(51, 65, 85, 0.5);
        color: var(--muted);
        font-size: 12px;
        white-space: nowrap;
      }

      .duration-text {
        font-size: 12px;
        color: var(--soft);
        white-space: nowrap;
      }

      .size-text {
        font-size: 12px;
        color: var(--soft);
        white-space: nowrap;
      }

      .status-pill.success {
        background: rgba(34, 197, 94, 0.16);
        color: #bbf7d0;
      }

      .status-pill.fail {
        background: rgba(239, 68, 68, 0.16);
        color: #fecaca;
      }

      .status-pill.pending {
        background: rgba(59, 130, 246, 0.16);
        color: #bfdbfe;
      }

      pre {
        margin: 0;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .json-view {
        color: var(--syntax-view);
      }

      .json-key {
        color: var(--syntax-key);
      }

      .json-key.has-doc {
        cursor: help;
        border-bottom: 1px dotted rgba(147, 197, 253, 0.8);
      }

      .json-key.has-doc:hover {
        color: #bfdbfe;
        background: rgba(59, 130, 246, 0.14);
      }

      .json-string {
        color: var(--syntax-string);
      }

      .json-number {
        color: var(--syntax-number);
      }

      .json-boolean {
        color: var(--syntax-boolean);
      }

      .json-null {
        color: var(--syntax-null);
      }

      .response-body {
        flex: 1;
        overflow: auto;
        padding: 16px;
        font-size: 13px;
        line-height: 1.65;
        font-family: "Cascadia Code", Consolas, monospace;
      }

      .viewer-pane {
        display: none;
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
      }

      .viewer-pane.active {
        display: block;
      }

      .request-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 56px 16px;
        color: var(--muted);
        font-size: 12px;
      }

      .request-loading-ring {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 3px solid var(--line-strong);
        border-top-color: var(--primary);
        animation: req-spin 0.75s linear infinite;
      }

      @keyframes req-spin {
        to { transform: rotate(360deg); }
      }

      .viewer-doc-body {
        padding: 16px;
      }

      .response-alert {
        margin-bottom: 14px;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(239, 68, 68, 0.35);
        background: rgba(127, 29, 29, 0.16);
      }

      .response-alert-title {
        font-size: 12px;
        font-weight: 600;
        color: #fecaca;
        margin-bottom: 8px;
      }

      .response-alert-list {
        margin: 0;
        padding-left: 18px;
        color: #fca5a5;
        font-size: 12px;
        line-height: 1.6;
      }

      .response-placeholder {
        height: 100%;
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
      }

      .response-placeholder-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        color: var(--soft);
        text-align: center;
      }

      .response-placeholder-icon {
        width: 64px;
        height: 64px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(148, 163, 184, 0.12);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
      }

      .response-placeholder-icon svg {
        width: 70%;
        height: 70%;
        color: rgba(226, 232, 240, 0.68);
      }

      .response-placeholder-text {
        font-size: 14px;
        line-height: 1.65;
        color: var(--soft);
      }

      .test-task-result .response-placeholder {
        min-height: 100%;
      }

      .mini-viewer {
        flex: 1 1 0;
        background: var(--panel-strong);
        border: 1px solid var(--line-strong);
        border-radius: 14px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
      }

      .request-detail-shell > .doc-viewer {
        display: none;
      }

      .mini-head {
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
        background: rgba(2, 6, 23, 0.45);
        font-size: 13px;
        color: var(--muted);
      }

      .mini-content {
        flex: 1;
        overflow: auto;
        padding: 16px;
        font-size: 12px;
        line-height: 1.6;
        font-family: "Cascadia Code", Consolas, monospace;
      }

      .tab-group {
        display: inline-flex;
        gap: 8px;
        min-width: 0;
      }

      .log-column {
        min-height: 0;
        display: flex;
      }

      .aux-panel {
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
      }

      .aux-panel > .mini-content {
        display: flex;
        flex-direction: column;
        min-height: 0;
      }

      .aux-content {
        display: none;
        flex: 1;
        min-height: 0;
      }

      .aux-content.active {
        display: flex;
        flex-direction: column;
        overflow: auto;
      }

      #logPanel.aux-content.active {
        overflow: hidden;
      }

      .assertion-detail {
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-height: 100%;
      }

      .assertion-detail-card {
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        background: rgba(15, 23, 42, 0.56);
      }

      .assertion-detail-card.success {
        border-color: rgba(34, 197, 94, 0.28);
        background: rgba(20, 83, 45, 0.18);
      }

      .assertion-detail-card.fail {
        border-color: rgba(239, 68, 68, 0.28);
        background: rgba(127, 29, 29, 0.18);
      }

      .assertion-detail-card.collapsible {
        display: grid;
        gap: 10px;
        padding: 10px 12px;
      }

      .assertion-detail-card.collapsible.expanded {
        padding: 12px 14px;
      }

      .assertion-detail-card-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        min-width: 0;
      }

      .assertion-detail-card.collapsible .assertion-detail-title {
        margin-bottom: 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .assertion-detail-title {
        margin-bottom: 8px;
        color: var(--text);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.5;
      }

      .assertion-detail-body {
        color: #d8e2f2;
        font-size: 12px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-break: break-word;
      }

      .assertion-detail-grid {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 6px 12px;
        color: #d8e2f2;
        font-size: 12px;
        line-height: 1.6;
      }

      .assertion-detail-label {
        color: var(--soft);
      }

      .assertion-detail-value {
        min-width: 0;
        word-break: break-word;
      }

      .assertion-detail-toggle {
        min-height: 26px;
        padding: 0 14px;
        border: 1px solid rgba(96, 165, 250, 0.24);
        border-radius: 999px;
        background: rgba(37, 99, 235, 0.14);
        color: #bfdbfe;
        font-size: 12px;
        font-weight: 900;
        cursor: pointer;
      }

      .assertion-detail-toggle:hover {
        border-color: rgba(96, 165, 250, 0.38);
        background: rgba(37, 99, 235, 0.24);
        color: #dbeafe;
      }

      .tabs {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 16px 12px;
        border-bottom: 1px solid var(--line);
        background: var(--tab-bar-bg);
      }

      .tab-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
      }

      .batch-action {
        display: none;
      }

      body.batch-running .batch-action {
        display: inline-flex;
      }

      /* Z63：单 run 时 renderBatchTargetSelect 把 sel.hidden=true，但 batch-action
         规则特异度 (0,2,1) 盖过 [hidden]{display:none}。必须用相同前缀+[hidden]
         特异度 (0,3,1) 兜底。 */
      body.batch-running .batch-action[hidden] {
        display: none;
      }

      body.batch-running #clearLogBtn {
        display: none;
      }

      .log-count-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 42px;
        height: 28px;
        padding: 0 2px;
        color: var(--soft);
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }

      .tab-btn {
        border: none;
        border-radius: 999px;
        padding: 7px 12px;
        cursor: pointer;
        background: rgba(30, 41, 59, 0.8);
        color: var(--muted);
        font-size: 12px;
      }

      .tab-btn.active {
        background: rgba(59, 130, 246, 0.18);
        color: #dbeafe;
      }

      .tab-btn.log-filter-pill {
        min-width: 58px;
        color: #bfdbfe;
        border: 1px solid rgba(59, 130, 246, 0.28);
        background: #0f172a;
      }

      .tab-btn.log-filter-pill.success {
        color: #bbf7d0;
        border-color: rgba(34, 197, 94, 0.28);
        background: rgba(34, 197, 94, 0.14);
      }

      .tab-btn.log-filter-pill.fail {
        color: #fecaca;
        border-color: rgba(239, 68, 68, 0.3);
        background: rgba(239, 68, 68, 0.14);
      }

      .batch-stop-btn {
        color: #fecaca;
        background: rgba(127, 29, 29, 0.52);
      }

      .batch-stop-btn:hover {
        background: rgba(153, 27, 27, 0.68);
      }

      .batch-mobile-bar {
        display: none;
      }

      /* Z60：PC 端日志栏多 run 切换下拉，单 run 时 hidden */
      .batch-target-select {
        max-width: 220px;
        padding: 4px 6px;
        border-radius: 6px;
        font-size: 11px;
        color: #cbd5f5;
        background: rgba(15, 23, 42, 0.62);
        border: 1px solid rgba(148, 163, 184, 0.24);
      }

      html.light-theme .batch-target-select {
        color: #1e293b;
        background: rgba(248, 250, 252, 0.96);
        border-color: rgba(100, 116, 139, 0.32);
      }

      .detail-copy-btn {
        display: none;
        flex-shrink: 0;
      }

      .detail-copy-btn.visible {
        display: inline-flex;
      }

      .header-table {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .header-row {
        display: grid;
        grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        background: rgba(15, 23, 42, 0.56);
      }

      .header-key {
        color: #93c5fd;
        font-size: 12px;
        line-height: 1.6;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .header-value {
        color: #d8e2f2;
        font-size: 12px;
        line-height: 1.6;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .header-copy-btn {
        padding: 6px 10px;
        min-height: 28px;
        border-radius: 999px;
        border: 1px solid rgba(59, 130, 246, 0.24);
        background: rgba(15, 23, 42, 0.88);
        color: #bfdbfe;
        cursor: pointer;
        font-size: 11px;
        line-height: 1;
        white-space: nowrap;
      }

      .header-copy-btn:hover {
        background: rgba(30, 41, 59, 0.92);
        border-color: rgba(96, 165, 250, 0.44);
      }

      .log-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding-right: 8px;
        box-sizing: border-box;
        scrollbar-gutter: stable;
      }

      .log-item {
        flex: 0 0 auto;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.12);
        background: rgba(15, 23, 42, 0.56);
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
        /* 作为 flex 列容器的子项，必须显式截断，否则会按内容撑开宽度 */
        overflow: hidden;
        min-width: 0;
      }

      .log-item:hover {
        background: rgba(30, 41, 59, 0.72);
        transform: translateY(-1px);
      }

      .log-item.active {
        border-color: rgba(59, 130, 246, 0.6);
        background: rgba(30, 41, 59, 0.86);
      }

      .log-item:focus-visible {
        outline: 2px solid rgba(96, 165, 250, 0.82);
        outline-offset: 2px;
      }

      .log-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) max-content;
        align-items: center;
        gap: 12px;
        min-width: 0;
        width: 100%;
      }

      .log-title {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        min-width: 0;
        overflow: hidden;
        gap: 8px;
        font-size: 13px;
        color: var(--text);
        line-height: 1.45;
      }

      .log-summary {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .log-time {
        justify-self: end;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: right;
        font-variant-numeric: tabular-nums;
        font-size: 11px;
        color: var(--soft);
        font-family: "Cascadia Code", Consolas, monospace;
      }

      .chip {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        gap: 6px;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(51, 65, 85, 0.58);
        color: var(--muted);
        font-size: 11px;
        white-space: nowrap;
      }

      .chip.success {
        color: #bbf7d0;
        background: rgba(34, 197, 94, 0.14);
      }

      .chip.fail {
        color: #fecaca;
        background: rgba(239, 68, 68, 0.14);
      }

      .empty-state {
        padding: 18px;
        border-radius: 12px;
        border: 1px dashed rgba(148, 163, 184, 0.16);
        color: var(--soft);
        font-size: 12px;
        line-height: 1.7;
        background: rgba(15, 23, 42, 0.35);
      }

      .mini-content > .empty-state:only-child,
      .viewer-pane > .empty-state:only-child,
      .log-list > .empty-state:only-child,
      .aux-content.active > .empty-state:only-child {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1 1 auto;
        min-height: 100%;
        box-sizing: border-box;
        text-align: center;
      }

      .toast-stack {
        position: fixed;
        top: 18px;
        right: 18px;
        z-index: 420;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: min(360px, calc(100vw - 32px));
        pointer-events: none;
      }

      .toast-item {
        padding: 11px 13px;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        color: #e2e8f0;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: 0 14px 34px rgba(2, 6, 23, 0.45);
        font-size: 12px;
        line-height: 1.55;
        word-break: break-word;
        transform: translateY(-6px);
        opacity: 0;
        transition: opacity 0.18s ease, transform 0.18s ease;
      }

      .toast-item.show {
        transform: translateY(0);
        opacity: 1;
      }

      .toast-item.success {
        border-color: rgba(34, 197, 94, 0.42);
        background: rgba(20, 83, 45, 0.96);
      }

      .toast-item.fail {
        border-color: rgba(239, 68, 68, 0.42);
        background: rgba(127, 29, 29, 0.96);
      }

      .toast-item.field-doc-toast {
        color: #e2e8f0;
        background: rgba(20, 83, 45, 0.96);
        border-color: rgba(34, 197, 94, 0.42);
        white-space: pre-wrap;
      }

/* styles.wss.css */
/*
 * web/styles.wss.css
 * Native inline WSS debugger styles.
 * Every rule is scoped under #wssPage (light theme under html.light-theme #wssPage) so it cannot
 * bleed into the main app.
 */
        /* .tab-btn 一并排除：数据检查器 tab 复用全局 .tab-btn 胶囊样式，
           不能被本页 reset 把 padding/margin 清零（box-sizing 由 styles.css 的 *{} 全局兜底）。 */
        #wssPage *:not(.wss-task-panel,.wss-task-panel *,input,select,textarea,.tab-btn){margin:0;padding:0;box-sizing:border-box}
        #wssPage input,#wssPage select,#wssPage textarea{box-sizing:border-box;margin:0}


        #wssPage{font-family:-apple-system,BlinkMacSystemFont,sans-serif;background:var(--bg);color:var(--text);padding:20px;max-width:1600px;margin:0 auto}

        #wssPage .grid{display:grid;grid-template-columns:350px 1fr;gap:20px;align-items:start}

        #wssPage .grid>div:last-child{display:flex;flex-direction:column;height:100%}

        #wssPage .panel{background:var(--panel);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:8px;padding:16px;margin-bottom:16px}

        #wssPage h2{font-size:14px;color:var(--muted);margin-bottom:12px;text-transform:uppercase;letter-spacing:0.5px}

        #wssPage input,
#wssPage select,
#wssPage textarea{width:100%;background:var(--field);border:1px solid var(--line-strong);color:var(--text);border-radius:10px;font-size:13px;transition:border-color 0.2s ease,box-shadow 0.2s ease}

        /* 夜间用 dark、日间用 light，避免强制 dark 导致日间文字垂直对齐偏移 */
        #wssPage select{color:var(--text);background-color:var(--field);color-scheme:dark;-webkit-text-fill-color:var(--text)}

        #wssPage option,
#wssPage optgroup{color:var(--text);background-color:var(--field)}

        #wssPage input:focus,
#wssPage select:focus,
#wssPage textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-surface)}

        #wssPage textarea{min-height:100px;resize:vertical;font-family:"Cascadia Code",Consolas,monospace}

		#wssPage #wss-params{min-height:150px}

        /* 布局/通用样式：全部按钮（非任务面板）。
           .tab-btn 一律排除——数据检查器 tab 完全复用全局 .tab-btn 胶囊样式，
           不走 WSS 通用按钮的圆角矩形/加粗/高度（详见 .inspector-tab 处说明）。 */
        #wssPage button:not(.wss-task-panel *,.tab-btn){display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:10px;cursor:pointer;font-size:12px;font-weight:700;line-height:1.2;transition:transform 0.15s ease,background 0.2s ease,opacity 0.2s ease,color 0.2s ease}
        /* 非 ghost 按钮去掉边框；ghost 按钮 border 由全局 .btn-ghost 规则提供 */
        #wssPage button:not(.wss-task-panel *,.btn-ghost){border:none}
        /* 图标按钮不应用 padding，由自身尺寸规则管 */
        #wssPage button:not(.wss-task-panel *,.icon-btn,.param-reset-btn,.tab-btn){padding:9px 12px}
        #wssPage button:not(.wss-task-panel *,.tab-btn):not(:disabled):hover{transform:translateY(-1px)}
        #wssPage button:not(.wss-task-panel *):disabled{opacity:0.5;cursor:not-allowed;transform:none}

        /* 主色样式：仅限主要操作按钮（排除次级/ghost/filter 等）——避免覆盖其他变体 */
        #wssPage button:not(.wss-task-panel *,.btn-secondary,.btn-danger,.btn-ghost,.log-filter,.wss-format-action,.btn-manage-subscriptions,.subscription-action-btn,.param-reset-btn,.tab-btn){background:var(--primary);color:var(--on-primary)}
        #wssPage button:not(.wss-task-panel *,.btn-secondary,.btn-danger,.btn-ghost,.log-filter,.wss-format-action,.btn-manage-subscriptions,.subscription-action-btn,.param-reset-btn,.tab-btn):hover{background:var(--primary-hover)}

        #wssPage .btn-secondary,
#wssPage .btn-manage-subscriptions,
#wssPage .subscription-action-btn{background:var(--btn-secondary-bg);color:var(--btn-secondary-text)}

        #wssPage .btn-secondary:hover,
#wssPage .btn-manage-subscriptions:hover,
#wssPage .subscription-action-btn:hover{background:var(--btn-secondary-hover);color:var(--btn-secondary-text)}

        #wssPage .btn-secondary.active{background:var(--success-action);color:var(--on-primary)}

        #wssPage .btn-secondary.active:hover{background:var(--success-action)}

        /* Z34 回归：参数化按钮 active 态 ≠ 连接/订阅按钮（success 绿），改回 btn-secondary 灰底
           与工作台 #parameterToggleBtn.active 同口径（更具体 id 选择器，权重高于上面 .active 通用规则） */
        #wssPage #wss-parameterizeBtn.active,
        #wssPage #wss-parameterizeBtn.active:hover{background:var(--btn-secondary-hover);color:var(--btn-secondary-text)}

        /* Z34 回归：参数化面板的「+ 添加字段」「× 删除」按钮要走通用 .parameter-* 样式
           （styles.css 8700-8746 行已定义浅蓝 dashed / 红字 ghost）；但 #wssPage 通用 button
           规则 line 53 把所有 button 染成 primary 蓝底，44 行加 border-radius:10 ＋ font-size:12
           700，46 行 border:none，48 行 padding:9 12 — 这里全部反覆盖回工作台默认。 */
        /* Z34 回归权重修正：line 53 通用规则用了 button:not(...class) 权重 0,1,1,1。
           这里加 button 元素选择器让权重对齐 0,1,1,1，且 wss.css 后于通用规则定义 → 胜出。 */
        /* Z37 bug#37：参数化面板打开时把 #wss-params 的 .wss-params-field 容器隐藏，
           与工作台 .params-editor-field.is-hidden 同口径，避免参数化面板叠加在 JSON 上。 */
        #wssPage .wss-params-field.is-hidden{display:none}

        /* Z42 bug#42 重做：WSS panel 已是 flex:1:1 撑满父级（line 243），但 wss-parameter
           Panel 内部默认 display:block 不会撑满 panel 剩余空间，导致字段多了整组下移、
           底部留空白。改用 flex column 布局：
             - wss-parameterPanel.is-active flex:1 撑满 panel 剩余空间
             - parameter-body flex column 内含 help / list / add-btn 容器
             - parameter-list flex:1 + overflow:auto 占剩余空间，字段超出内部滚动
             - parameter-panel-actions (含「+ 添加字段」) flex:0 0 auto 固定在 list 下方
           外层 .wss-params-actions 同样 flex:0 0 auto 固定在 panel 底部 */
        #wssPage #wss-parameterPanel.is-active{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
        #wssPage #wss-parameterPanel .parameter-body{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;padding:12px}
        #wssPage #wss-parameterPanel .parameter-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding-right:4px}
        #wssPage #wss-parameterPanel .parameter-panel-actions{flex:0 0 auto}
        #wssPage .wss-params-actions{flex:0 0 auto}

        /* Z38 bug#38：#wssPage textarea {min-height:100/150px; line-height:1.55; flex:1 1 auto}
           把参数化面板 .parameter-row 内 values textarea 也撑到 200+px。
           加 .parameter-row 限定的反覆盖（权重 0,1,1,1 高于 #wssPage textarea 的 0,1,0,1）。 */
        #wssPage .parameter-row input,
        #wssPage .parameter-row textarea{min-height:36px;height:36px;flex:0 0 auto;line-height:normal;font-size:12px;resize:vertical;overflow:auto;padding:6px 8px}
        #wssPage .parameter-row .parameter-values-wrap textarea{display:block;width:100%}
        /* 字号 13px / 字重 800 与工作台 .parameter-panel-actions .parameter-add-btn 一致；
           + 号字号由 .parameter-add-icon 单独控制 18px（icon > 字才正确） */
        #wssPage button.parameter-add-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:38px;border:1px dashed rgba(96,165,250,0.44);border-radius:10px;color:#bfdbfe;background:rgba(59,130,246,0.08);font-size:13px;font-weight:800;line-height:1;padding:0;cursor:pointer}
        #wssPage button.parameter-add-btn:hover{border-color:rgba(96,165,250,0.72);background:rgba(59,130,246,0.16);transform:none}
        #wssPage button.parameter-remove-btn{width:32px;height:32px;border:1px solid rgba(148,163,184,0.18);border-radius:9px;color:#fecaca;background:rgba(15,23,42,0.72);cursor:pointer;font-size:16px;font-weight:400;line-height:1;padding:0;min-height:0}
        #wssPage button.parameter-remove-btn:hover{border-color:rgba(248,113,113,0.42);background:rgba(127,29,29,0.28);transform:none}
        /* light-theme 同步：与 styles.css 1142/1153 行口径一致 */
        html.light-theme #wssPage button.parameter-add-btn{border-color:rgba(37,99,235,0.45);color:#1d4ed8;background:rgba(37,99,235,0.06)}
        html.light-theme #wssPage button.parameter-add-btn:hover{border-color:rgba(37,99,235,0.7);background:rgba(37,99,235,0.12)}
        html.light-theme #wssPage button.parameter-remove-btn{color:#b91c1c;background:#ffffff;border-color:rgba(100,116,139,0.22)}
        html.light-theme #wssPage button.parameter-remove-btn:hover{border-color:rgba(220,38,38,0.5);background:#fee2e2}

        #wssPage .btn-danger{background:var(--danger);color:var(--on-primary)}

        #wssPage .btn-danger:hover{background:var(--danger-strong);color:var(--on-primary)}

        #wssPage .subscription-action-btn.btn-danger{background:var(--danger-surface);border:1px solid var(--danger);color:var(--danger-strong)}

        #wssPage .subscription-action-btn.btn-danger:hover{background:var(--danger-surface);border-color:var(--danger-strong);color:var(--danger-strong)}

        #wssPage .status{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:16px}

        #wssPage .dot{width:8px;height:8px;border-radius:50%;background:var(--soft)}

        #wssPage .dot.offline{background:var(--soft)}

        #wssPage .dot.online{background:var(--success-action);box-shadow:0 0 8px var(--success-surface)}

        #wssPage .dot.connecting{background:var(--warning);animation:wss-pulse 1s infinite}

        @keyframes wss-pulse{0%,100%{opacity:1}50%{opacity:0.3}}
        #wssPage .upload-area{border:2px dashed var(--line-strong);border-radius:6px;padding:20px;text-align:center;color:var(--soft);cursor:pointer;transition:all 0.2s;background:var(--field)}

        #wssPage .upload-area:hover{border-color:var(--primary);color:var(--primary-hover)}

        #wssPage .upload-area.dragover{border-color:var(--primary);background:var(--primary-surface)}

        #wssPage .file-list{max-height:150px;overflow-y:auto;margin-top:8px;font-size:12px}

        #wssPage .file-item{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid var(--line)}

        #wssPage .flex{display:flex;gap:8px}

        #wssPage .flex-col{flex-direction:column}

        #wssPage .hidden{display:none}

        /* 区块大标题（对齐工作台 .config-section-title）*/
        #wssPage .wss-address-title,
#wssPage .wss-section-title-spaced{color:var(--muted);font-size:14px;font-weight:700;line-height:1.4;text-transform:uppercase;letter-spacing:0.5px;margin-bottom:10px}

        #wssPage .wss-params-title-row .panel-title{margin:0;font-size:11px;text-transform:uppercase;letter-spacing:0.12em;color:var(--muted)}

        #wssPage .wss-section-title-spaced{margin-top:12px}

        /* 字段间距对齐工作台 .field（14px）*/
        #wssPage .field{margin-bottom:14px}

        #wssPage .field:last-child{margin-bottom:0}

        #wssPage .field label{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px;font-size:11px;color:var(--muted);line-height:1.4}

        #wssPage .field label .hint{color:var(--soft);font-size:10px}

        /* 字段小标签对齐工作台 .config-sub-label（11px / var(--soft) / margin-bottom:4px）*/
        #wssPage .wss-field-label{font-size:11px;color:var(--soft);display:block;margin-bottom:4px;line-height:1.4}

        #wssPage .wss-field-label.spaced{margin-top:12px}

        /* 扁平结构：label+select 是兄弟节点，用 select 自身 margin-bottom 充当字段间距（对齐工作台 .field mb:12px）*/
        #wssPage .wss-select-spaced{margin-bottom:12px}

        #wssPage .wss-connect-actions{margin-top:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}

        /* 对齐工作台多语言按钮尺寸：padding/font-weight/line-height 均与 lang-btn 一致 */
        #wssPage .wss-connect-actions button{padding:8px 10px;font-weight:400;line-height:normal;min-height:0}

        #wssPage .wss-connect-primary{flex:unset}

        #wssPage .wss-heartbeat-action{flex:unset;margin:0}

        #wssPage .wss-send-action{width:100%;margin-top:8px}

        #wssPage .wss-params-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}

        #wssPage .wss-params-title-row h2{margin:0}

        #wssPage .icon-btn{width:30px;height:30px;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1}


        #wssPage .param-reset-btn{width:22px;height:22px;min-height:22px;padding:0;border-radius:8px;flex-shrink:0}


        #wssPage .wss-params-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:0}

        #wssPage .wss-params-actions button{min-width:0;margin:0;justify-self:stretch;font-size:12px;font-weight:400;line-height:normal}

        #wssPage .wss-format-action{background:var(--btn-secondary-bg);color:var(--btn-secondary-text)}
        #wssPage .wss-format-action:hover{background:var(--btn-secondary-hover);color:var(--btn-secondary-text)}
        /* Z34：WSS 参数化复用工作台 .parameter-panel 全部样式，无需此处自定义 */

        #wssPage .wss-sequence-card{margin-top:12px;padding:12px;background:var(--field);border:1px solid var(--line-strong);border-radius:6px}

        #wssPage .wss-sequence-label{font-size:11px;color:var(--muted);display:block;margin-bottom:8px}

        #wssPage .wss-sequence-content{font-size:11px;color:var(--muted);font-family:monospace;word-break:break-all;margin-bottom:8px}

        #wssPage .wss-sequence-line{margin-bottom:4px}

        #wssPage .wss-sequence-key{color:var(--muted)}

        #wssPage .wss-subscription-list-action{width:100%;margin-top:12px}

        #wssPage .wss-log-title-inline{margin:0;flex:1}

        #wssPage .wss-toggle-label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:4px}

        #wssPage input[type="checkbox"]{accent-color:var(--primary);width:14px;height:14px;cursor:pointer}
        #wssPage input[type="checkbox"]:focus:not(:focus-visible){outline:none;box-shadow:none}
        #wssPage input[type="checkbox"]:focus-visible{outline:2px solid var(--primary-surface);outline-offset:1px}

        #wssPage .wss-checkbox-inline{width:auto;margin:0}

        #wssPage .wss-log-action-btn{background:var(--btn-secondary-bg);color:var(--btn-secondary-text)}
        #wssPage .wss-log-action-btn:hover{background:var(--btn-secondary-hover)}

        #wssPage{width:100%;height:100%;min-height:0;overflow:hidden}

        #wssPage{max-width:none;margin:0;padding:0}

        #wssPage *:not(.wss-task-panel,.wss-task-panel *){letter-spacing:0;scrollbar-color:var(--line-strong) transparent}
        /* letter-spacing 被全局重置为 0，section 标题补回 0.5px */
        #wssPage .wss-address-title,
#wssPage .wss-section-title-spaced{letter-spacing:0.5px}

        #wssPage .grid{grid-template-columns:380px minmax(0,1fr);gap:8px;width:100%;height:100%;min-height:0;align-items:stretch}

        #wssPage .grid>div{min-width:0;min-height:0}

        #wssPage .grid>div:first-child{display:flex;flex-direction:column;gap:0;overflow:auto}

        #wssPage .grid>div:last-child{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}

        #wssPage .panel{margin:0 0 8px;padding:14px}

        #wssPage .grid>div:first-child .panel:first-child{flex:0 0 auto}

        #wssPage .grid>div:first-child .panel:first-child .status{display:none}

        #wssPage .grid>div:first-child .panel:last-child{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;margin-bottom:0}

        /* 订阅参数字段容器：flex 列，让内部 textarea 可以占满剩余高度 */
        #wssPage .wss-params-field{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}

        #wssPage textarea,
#wssPage #wss-params{display:block;flex:1 1 auto;min-height:150px;line-height:1.55;overflow:hidden;resize:none}

        #wssPage h2{margin:0 0 10px;font-size:11px;font-weight:800}

        #wssPage button:not(.wss-task-panel *,.icon-btn,.param-reset-btn,.tab-btn){min-height:34px}


        #wssPage .log-inspector-wrapper{flex:1 1 auto;min-height:0}

        #wssPage .log-panel-wrapper{flex:0 0 46%;margin:0 0 8px;padding:12px;min-height:230px}

        #wssPage .log-resize-handle{flex:0 0 18px;display:flex;align-items:center;justify-content:flex-start;position:relative;cursor:row-resize;touch-action:none;user-select:none;margin:0}

        #wssPage .log-resize-handle::before{content:"";position:absolute;left:calc(60% - 5px);transform:translateX(-50%);width:52px;height:4px;border-radius:999px;background:rgba(96,165,250,0.28);box-shadow:0 0 0 1px rgba(96,165,250,0.08);transition:background 0.16s ease,width 0.16s ease}

        #wssPage .log-resize-handle:hover::before,#wssPage .log-resize-handle.active::before{width:72px;background:rgba(96,165,250,0.58)}

        #wssPage .inspector-panel-wrapper{padding:12px}

        #wssPage .inspector-grid{gap:8px}

        #wssPage .log-item{padding:10px;margin-bottom:8px}

        @media (max-width:1100px){

            #wssPage .grid{grid-template-columns:minmax(300px,340px) minmax(0,1fr)}

            #wssPage .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

            #wssPage .network-card{grid-column:span 2}


}
        @media (max-width:768px){

            #wssPage{padding:0}

            #wssPage .grid{display:block;grid-template-columns:minmax(0,1fr);width:100%;height:100%;min-height:0;overflow:hidden}

            #wssPage .grid>div:first-child,
#wssPage .grid>div:last-child{display:none;height:100%;min-height:0;overflow:hidden}

            #wssPage.mobile-tab-connect .grid>div:first-child{display:block;overflow-y:auto;-webkit-overflow-scrolling:touch}

            #wssPage.mobile-tab-log .grid>div:last-child,
#wssPage.mobile-tab-visual .grid>div:last-child,
#wssPage.mobile-tab-inspector .grid>div:last-child,
#wssPage.mobile-tab-subscriptions .grid>div:last-child{display:block}

            #wssPage .stats-grid{display:none}

            #wssPage .log-inspector-wrapper{display:block;height:100%;min-height:0;overflow:hidden}

            #wssPage .log-panel-wrapper,
#wssPage .inspector-panel-wrapper{display:none;height:100%;margin:0;padding:10px;overflow:hidden}

            #wssPage.mobile-tab-log .log-panel-wrapper,
#wssPage.mobile-tab-visual .log-panel-wrapper,
#wssPage.mobile-tab-inspector .inspector-panel-wrapper{display:flex}

            #wssPage .log-panel-content{display:block;height:calc(100% - 48px);min-height:0;overflow:hidden}

            #wssPage .log-stream-panel,
#wssPage .visual-panel{display:none;height:100%;padding:10px;overflow:hidden}

            #wssPage.mobile-tab-log .log-stream-panel,
#wssPage.mobile-tab-visual .visual-panel{display:flex}

            #wssPage.mobile-tab-visual .log-filters{display:none}

            #wssPage.mobile-tab-visual .log-panel-content{height:100%}

            #wssPage.mobile-tab-inspector .inspector-grid{display:block;height:calc(100% - 28px);overflow:hidden}

            #wssPage.mobile-tab-inspector .inspector-grid>div:first-child{display:flex;flex-direction:column;height:100%}

            #wssPage.mobile-tab-inspector .inspector-grid>div:nth-child(2){display:none}

            #wssPage.mobile-tab-subscriptions .mobile-subscription-page{display:flex}

            #wssPage .mobile-subscription-page{height:100%;min-height:0;flex-direction:column;padding:12px;overflow:hidden}

            #wssPage .panel{padding:14px 12px;margin:0 0 12px}

            #wssPage h2{font-size:13px;line-height:1.4;margin:0 0 10px}

            #wssPage .wss-field-label{font-size:11px;line-height:1.4;margin-bottom:4px}

            #wssPage input,
#wssPage select,
#wssPage textarea,
#wssPage button,
#wssPage .log-filter,
#wssPage .subscription-action-btn{min-height:44px;font-size:14px}

            #wssPage input,
#wssPage select{border-radius:10px;padding:8px 10px}

            #wssPage textarea{border-radius:10px;padding:12px 10px}

            #wssPage .wss-address-title,
#wssPage .wss-section-title-spaced{margin-bottom:10px;color:var(--muted);font-size:13px;font-weight:700;line-height:1.4;text-transform:uppercase;letter-spacing:0.5px}

            #wssPage .wss-section-title-spaced{margin-top:12px}

            #wssPage .field{margin-bottom:12px}

            #wssPage .field label{margin-bottom:6px;font-size:11px;line-height:1.4;color:var(--muted)}

            #wssPage .field label .hint{font-size:10px}

            #wssPage .wss-field-label{color:var(--soft)}

            #wssPage .wss-params-title-row{margin-bottom:10px}

            #wssPage .wss-params-title-row .panel-title{margin:0;font-size:11px;font-weight:800;line-height:1.4;color:var(--muted);text-transform:uppercase;letter-spacing:0.12em}

            #wssPage .param-reset-btn{width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;max-height:44px;border-radius:12px}

            #wssPage .wss-params-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}

            #wssPage .wss-params-actions button{min-height:40px;font-size:12px;font-weight:400;border-radius:10px}

            #wssPage .wss-select-spaced{margin-bottom:12px}

            #wssPage .wss-connect-actions{gap:12px;margin-bottom:18px}

            #wssPage .wss-connect-actions button{border-radius:12px;font-size:14px;font-weight:700}

            #wssPage textarea,
#wssPage #wss-params{min-height:220px;overflow:auto}



}
        #wssPage ::-webkit-scrollbar{width:6px;height:6px}

        #wssPage ::-webkit-scrollbar-track{background:transparent}

        #wssPage ::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:3px}


        /* 统计面板样式 */
        #wssPage .stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(240px,1.4fr);gap:12px;margin-bottom:16px;flex-shrink:0}

        #wssPage .stat-card{background:var(--panel);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:8px;padding:12px}

        #wssPage .stat-label{font-size:11px;color:var(--muted);margin-bottom:4px}

        #wssPage .stat-value{font-size:24px;font-weight:bold;font-family:monospace}

        #wssPage .stat-value.cyan{color:var(--syntax-key)}

        #wssPage .stat-value.emerald{color:var(--success-action)}

        #wssPage .stat-value.amber{color:var(--warning-strong)}

        #wssPage .stat-value.danger{color:var(--danger-strong)}

        #wssPage .stat-value.purple{color:var(--purple)}

        #wssPage .stat-value .slash{color:var(--soft);font-size:18px}

        #wssPage .network-card{display:flex;flex-direction:column;justify-content:center;gap:6px;cursor:pointer;min-width:0}

        #wssPage .network-card:hover{background:var(--field)}

        #wssPage .network-main{display:flex;align-items:center;gap:8px;min-width:0}

        #wssPage .network-primary{font-size:18px;font-weight:bold;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

        #wssPage .network-secondary,
#wssPage .network-tertiary{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

        #wssPage .network-tertiary{color:var(--soft)}

        #wssPage .network-status{width:9px;height:9px;border-radius:50%;background:var(--soft);flex-shrink:0}

        #wssPage .network-status.direct{background:var(--success-action);box-shadow:0 0 8px var(--success-surface)}

        #wssPage .network-status.proxy{background:var(--warning);box-shadow:0 0 8px var(--warning-surface)}

        #wssPage .network-status.loading{background:var(--cyan);animation:wss-pulse 1s infinite}

        #wssPage .network-status.error{background:var(--danger);box-shadow:0 0 8px var(--danger-surface)}

        @media (max-width: 1280px){

            #wssPage .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

            #wssPage .network-card{grid-column:span 2}


}
        @media (max-width: 768px){

            #wssPage .grid{grid-template-columns:1fr}

            #wssPage .stats-grid{grid-template-columns:1fr}

            #wssPage .network-card{grid-column:auto}

            #wssPage{padding:12px}


}

        /* 日志过滤器 */
        #wssPage .log-filter-group{display:flex;align-items:center;gap:8px;min-width:0}

        #wssPage .log-filter{padding:7px 12px;font-size:12px;border-radius:999px;background:var(--tab-bg);color:var(--muted);border:none;cursor:pointer;transition:background 0.2s ease,color 0.2s ease,opacity 0.2s ease}

        #wssPage .log-filter:hover,
#wssPage .log-filter.active{background:var(--tab-active-bg);color:var(--tab-active-text);transform:none}


        /* 日志和检查器容器 */
        #wssPage .log-inspector-wrapper{display:flex;flex-direction:column;flex:1;gap:0;min-height:0}

        #wssPage .log-panel-wrapper{flex:0 0 400px;display:flex;flex-direction:column;background:var(--panel);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:16px;padding:14px;overflow:hidden;margin-bottom:0}

        #wssPage .log-filters{display:flex;gap:8px;margin-bottom:12px;align-items:center;flex-shrink:0;flex-wrap:wrap}

        /* 右列「可视化面板」宽度按视口算 clamp(160px, 38vw-285px, 480px)，左列「通信日志」用 minmax(0,1fr) 吸收差值：
           ① 视口基准 → 右侧任务栏展开/收起(.wss-layout.panel-collapsed)时该列不变，只收窄通信日志；
           ② 随屏幕宽度线性缩放（≈原 0.9fr 的宽度，1920 约 445px），宽屏够宽、窄桌面自动让位给日志、不横向溢出，超宽封顶 480px。 */
        #wssPage .log-panel-content{flex:1;display:grid;grid-template-columns:minmax(0,1fr) clamp(160px, calc(38vw - 285px), 480px);gap:16px;min-height:0}

        #wssPage .log-stream-panel,
#wssPage .visual-panel{display:flex;flex-direction:column;min-height:0;background:var(--panel-strong);border:1px solid var(--line-strong);border-radius:6px;padding:10px}

        #wssPage #wss-logContainer{flex:1;overflow-y:auto}

        #wssPage .visual-panel-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;flex-shrink:0}

        #wssPage .visual-panel-title{display:flex;align-items:baseline;gap:8px;min-width:0}

        #wssPage .visual-function-name{font-size:13px;font-weight:bold;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

        #wssPage .visual-protocol-text{font-size:10px;color:var(--muted);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

        #wssPage .visual-panel-time{font-size:10px;color:var(--muted);font-family:monospace}

        #wssPage .visual-content{flex:1;overflow:hidden}

        #wssPage .visual-empty{height:100%;display:flex;align-items:center;justify-content:center;padding:16px;border:1px dashed var(--line-strong);border-radius:6px;color:var(--soft);font-size:13px;text-align:center}

        #wssPage .visual-fields{height:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;align-content:start}

        #wssPage .extend-fields{grid-template-columns:repeat(3,minmax(0,1fr))}

        #wssPage .extend-row{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--field);border:1px solid var(--line);border-radius:6px;padding:6px 8px;min-width:0;min-height:36px}

        #wssPage .extend-row.empty-slot{background:var(--field-soft);border:1px dashed var(--line)}

        #wssPage .extend-key{font-size:11px;color:var(--syntax-key);font-family:monospace;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

        #wssPage .extend-value{font-size:12px;color:var(--text);font-family:monospace;line-height:1.2;white-space:nowrap;text-align:right;flex-shrink:0}

        #wssPage .warrant-sections{display:flex;flex-direction:column;gap:8px;min-height:0}

        #wssPage .warrant-section{display:flex;flex-direction:column;gap:6px}

        #wssPage .warrant-section-title{font-size:10px;color:var(--muted);font-family:monospace;letter-spacing:0.3px}

        #wssPage .visual-row{display:flex;flex-direction:column;gap:7px;background:var(--field);border:1px solid var(--line);border-radius:6px;padding:10px;min-width:0;min-height:0}

        #wssPage .visual-row.wide{grid-column:1 / -1}

        #wssPage .visual-key{font-size:11px;color:var(--syntax-key);font-family:monospace;word-break:break-all;line-height:1.35}

        #wssPage .visual-value{font-size:12px;color:var(--text);font-family:monospace;white-space:pre-wrap;word-break:break-all;line-height:1.45;min-width:0}

        #wssPage .visual-json{margin:0;font-size:11px;color:var(--syntax-view);font-family:monospace;white-space:pre-wrap;word-break:break-all;line-height:1.45}

        #wssPage .visual-table{width:100%;border-collapse:collapse;font-size:10px}

        #wssPage .visual-table th,
#wssPage .visual-table td{border:1px solid var(--line-strong);padding:6px 8px;text-align:left;vertical-align:top}

        #wssPage .visual-table th{color:var(--syntax-key);font-weight:600;background:var(--field)}

        #wssPage .visual-table td{color:var(--text)}

        #wssPage .trade-stats-table-wrap{flex:0 0 auto;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:var(--field)}

        #wssPage .trade-stats-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:11px}

        #wssPage .trade-stats-table th,
#wssPage .trade-stats-table td{height:32px;padding:6px;border-bottom:1px solid var(--line-strong);text-align:right;vertical-align:middle;font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

        #wssPage .trade-stats-table th{color:var(--syntax-key);background:var(--field);font-weight:600}

        #wssPage .trade-stats-table td{color:var(--text)}

        #wssPage .trade-stats-table th:first-child,
#wssPage .trade-stats-table td:first-child{text-align:left;padding-left:10px}

        #wssPage .trade-stats-table tbody tr:last-child td{border-bottom:none}

        #wssPage .trade-stats-table tbody tr:nth-child(odd) td{background:var(--field-soft)}

        #wssPage .trade-stats-table tbody tr:hover td{background:var(--primary-surface)}

        #wssPage .capital-flow-table-wrap{flex:1 1 auto;min-height:0;overflow-y:auto}

        #wssPage .capital-flow-table-wrap thead th{position:sticky;top:0;z-index:1;background:var(--field);box-shadow:inset 0 -1px 0 var(--line-strong)}

        #wssPage .order-book-panel{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}

        #wssPage .order-book-side{display:flex;flex-direction:column;gap:6px;background:var(--field);border:1px solid var(--line);border-radius:6px;padding:8px;min-width:0}

        #wssPage .order-book-side.ask{border-color:var(--danger)}

        #wssPage .order-book-side.bid{border-color:var(--success)}

        #wssPage .order-book-title{font-size:12px;font-weight:600;font-family:monospace;letter-spacing:0.4px}

        #wssPage .order-book-side.ask .order-book-title{color:var(--danger-strong)}

        #wssPage .order-book-side.bid .order-book-title{color:var(--success-strong)}

        #wssPage .order-book-side .visual-table{font-size:12px}

        #wssPage .order-book-side .visual-table th,
#wssPage .order-book-side .visual-table td{padding:8px}

        #wssPage .order-book-empty{padding:12px 8px;border:1px dashed var(--line-strong);border-radius:6px;color:var(--soft);font-size:11px;text-align:center}

        #wssPage .broker-seat-panel{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow-y:auto;padding-right:2px}

        #wssPage .broker-seat-side{display:flex;flex-direction:column;gap:8px;background:var(--field);border:1px solid var(--line);border-radius:6px;padding:10px;min-width:0;min-height:0}

        #wssPage .broker-seat-side.buy{border-color:var(--success)}

        #wssPage .broker-seat-side.sell{border-color:var(--danger)}

        #wssPage .broker-seat-title{font-size:12px;font-weight:600;font-family:monospace;letter-spacing:0.4px}

        #wssPage .broker-seat-side.buy .broker-seat-title{color:var(--success-strong)}

        #wssPage .broker-seat-side.sell .broker-seat-title{color:var(--danger-strong)}

        #wssPage .broker-seat-list{display:flex;flex-direction:column;gap:6px;min-width:0;min-height:0}

        #wssPage .broker-seat-item{display:flex;align-items:baseline;gap:6px;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--field-soft);min-width:0}

        #wssPage .broker-seat-symbol{font-size:12px;font-family:monospace;color:var(--text);line-height:1.2;white-space:nowrap;flex-shrink:0}

        #wssPage .broker-seat-name{font-size:11px;color:var(--muted);line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

        #wssPage .snap-board{height:100%;display:flex;flex-direction:column;gap:8px}

        #wssPage .snap-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;min-width:0}

        #wssPage .snap-symbol-wrap{min-width:0}

        #wssPage .snap-symbol-line{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}

        #wssPage .snap-symbol{font-size:16px;font-weight:700;color:var(--text);line-height:1}

        #wssPage .snap-name{font-size:11px;color:var(--muted);line-height:1.2}

        #wssPage .snap-market-time{font-size:10px;color:var(--muted);font-family:monospace;text-align:right;white-space:nowrap}

        #wssPage .snap-ring{display:grid;grid-template-columns:minmax(136px,1.15fr) repeat(2,minmax(0,1fr));grid-auto-flow:row dense;gap:8px;align-items:stretch}

        #wssPage .snap-core{grid-column:1;grid-row:1 / span 2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--field);border:1px solid var(--line);border-radius:8px;padding:10px 12px;text-align:center;min-width:0}

        #wssPage .snap-price{font-size:22px;font-weight:700;line-height:1;color:var(--text);font-family:monospace;letter-spacing:-0.02em}

        #wssPage .snap-change-line{display:flex;flex-direction:column;align-items:center;gap:3px;font-family:monospace}

        #wssPage .snap-change{font-size:13px;font-weight:700}

        #wssPage .snap-change-rate{font-size:12px;font-weight:600}

        #wssPage .snap-up{color:var(--danger-strong)}

        #wssPage .snap-down{color:var(--success-strong)}

        #wssPage .snap-flat{color:var(--text)}

        #wssPage .snap-metric{background:var(--field);border:1px solid var(--line);border-radius:6px;padding:8px;min-width:0}

        #wssPage .snap-metric.empty-slot{background:var(--field-soft);border:1px dashed var(--line)}

        #wssPage .snap-metric.empty-slot .snap-metric-label,
#wssPage .snap-metric.empty-slot .snap-metric-value{visibility:hidden}

        #wssPage .snap-metric-label{font-size:10px;color:var(--muted);margin-bottom:4px}

        #wssPage .snap-metric-value{display:block;font-size:12px;color:var(--text);font-family:monospace;line-height:1.25;min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;word-break:normal}

        #wssPage .snap-price.snap-up,
#wssPage .snap-change.snap-up,
#wssPage .snap-change-rate.snap-up,
#wssPage .snap-metric-value.snap-up{color:var(--danger-strong)}

        #wssPage .snap-price.snap-down,
#wssPage .snap-change.snap-down,
#wssPage .snap-change-rate.snap-down,
#wssPage .snap-metric-value.snap-down{color:var(--success-strong)}

        #wssPage .snap-price.snap-flat,
#wssPage .snap-change.snap-flat,
#wssPage .snap-change-rate.snap-flat,
#wssPage .snap-metric-value.snap-flat{color:var(--text)}

        #wssPage .snap-extra-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}

        #wssPage .snap-ring.index-quote-ring{grid-template-columns:repeat(4,minmax(0,1fr))}

        #wssPage .snap-ring.index-quote-ring .snap-core{grid-column:1;grid-row:1 / span 2;min-width:0}

        #wssPage .kline-board{height:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:start}

        #wssPage .kline-tooltip{width:100%;max-width:100%;background:var(--field);border:1px solid var(--line);border-radius:8px;padding:10px 12px;box-sizing:border-box;align-self:flex-start;min-width:0}

        #wssPage .kline-tooltip-body{display:flex;flex-direction:column;gap:4px;width:fit-content;max-width:100%}

        #wssPage .kline-tooltip-meta{display:flex;align-items:center;gap:14px;font-family:monospace;font-size:12px;line-height:1.25;color:var(--muted);padding-bottom:2px;word-break:break-all;flex-wrap:wrap}

        #wssPage .kline-tooltip-meta.tight{gap:6px;flex-wrap:nowrap;justify-content:flex-start;font-size:10px}

        #wssPage .kline-tooltip-meta.tight.stacked{flex-wrap:wrap;justify-content:flex-start;gap:2px}

        #wssPage .kline-tooltip-symbol{font-family:monospace;font-size:15px;font-weight:700;line-height:1.2;color:var(--text);padding-bottom:2px;word-break:break-all}

        #wssPage .kline-tooltip-meta-part{white-space:nowrap;word-break:normal;overflow:hidden;text-overflow:clip}

        #wssPage .kline-tooltip-meta-date{max-width:100%}

        #wssPage .kline-tooltip-meta.tight.stacked .kline-tooltip-meta-type{flex:0 0 100%}

        #wssPage .kline-tooltip-meta.tight.stacked .kline-tooltip-meta-date{flex:0 0 100%}

        #wssPage .kline-tooltip-row{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px;align-items:center;font-family:monospace;font-size:12px;line-height:1.2}

        #wssPage .kline-tooltip-row.empty-slot{background:var(--field-soft);border:1px dashed var(--line);border-radius:8px;padding:2px 6px;min-height:18px}

        #wssPage .kline-tooltip-row.empty-slot .kline-tooltip-label,
#wssPage .kline-tooltip-row.empty-slot .kline-tooltip-value{visibility:hidden}

        #wssPage .kline-tooltip-label{color:var(--muted)}

        #wssPage .kline-tooltip-value{color:var(--text);text-align:left;min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;word-break:normal}

        #wssPage .kline-tooltip-value.snap-up{color:var(--danger-strong)}

        #wssPage .kline-tooltip-value.snap-down{color:var(--success-strong)}

        #wssPage .kline-tooltip-value.snap-flat{color:var(--text)}

        #wssPage .trend-tooltip .kline-tooltip-body{gap:6px}

        #wssPage .trend-tooltip .kline-tooltip-row{grid-template-columns:48px minmax(0,1fr);line-height:1.35}

        #wssPage .trade-tape{flex:1;min-height:0;column-count:3;column-gap:8px;column-fill:auto;overflow:hidden}

        #wssPage .trade-tape-item{display:grid;grid-template-columns:8ch 8ch 4ch 1ch;align-items:center;gap:4px;margin:0 0 6px;break-inside:avoid;white-space:nowrap;font-family:monospace;font-size:10px;line-height:1.15}

        #wssPage .trade-tape-time{color:var(--muted);display:block;width:8ch;min-width:8ch;text-align:left}

        #wssPage .trade-tape-price{font-weight:600;width:8ch;min-width:8ch;text-align:left;overflow:hidden}

        #wssPage .trade-tape-volume{justify-self:end;width:4ch;min-width:4ch;overflow:hidden;text-overflow:clip;text-align:right}

        #wssPage .trade-tape-direction{justify-self:end;width:1ch;min-width:1ch;font-size:10px;font-weight:700;text-align:right}

        #wssPage .trade-tape-up{color:var(--danger-strong)}

        #wssPage .trade-tape-down{color:var(--success-strong)}

        #wssPage .trade-tape-flat{color:var(--text)}

        #wssPage .status-feed{display:flex;flex-direction:column;gap:8px;min-height:0;overflow-y:auto;padding-right:2px}

        #wssPage .status-feed-item{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr) 12ch;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:6px;background:var(--field);font-family:monospace;font-size:11px;line-height:1.3;min-width:0}

        #wssPage .status-feed-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}

        #wssPage .status-feed-time{color:var(--muted);text-align:right;white-space:nowrap}

        /* 桌面端同基础规则，无需覆盖 */

        html.light-theme #wssPage{background:var(--bg);color:var(--text)}

        html.light-theme #wssPage select{color-scheme:light}

        html.light-theme #wssPage .panel,
html.light-theme #wssPage .stat-card,
html.light-theme #wssPage .log-panel-wrapper,
html.light-theme #wssPage .inspector-panel-wrapper,
html.light-theme #wssPage .mobile-subscription-page{background:var(--panel-strong);border-color:var(--line);box-shadow:none;backdrop-filter:none}

        /* section 标题在日间用 --soft(=#94a3b8)，特异性高于 h2 通用规则，与工作台一致 */
        html.light-theme #wssPage .wss-address-title,
html.light-theme #wssPage .wss-section-title-spaced{color:var(--soft)}

        html.light-theme #wssPage h2,
html.light-theme #wssPage label,
html.light-theme #wssPage .stat-label,
html.light-theme #wssPage .network-secondary,
html.light-theme #wssPage .network-tertiary,
html.light-theme #wssPage .visual-empty,
html.light-theme #wssPage .warrant-section-title,
html.light-theme #wssPage .subscription-empty,
html.light-theme #wssPage .subscription-summary span{color:var(--muted)}

        html.light-theme #wssPage .network-primary,
html.light-theme #wssPage .stat-value,
html.light-theme #wssPage .visual-function-name,
html.light-theme #wssPage .visual-protocol-text,
html.light-theme #wssPage .visual-panel-time,
html.light-theme #wssPage .visual-value,
html.light-theme #wssPage .extend-value,
html.light-theme #wssPage .visual-table td,
html.light-theme #wssPage .trade-stats-table td,
html.light-theme #wssPage .broker-seat-symbol,
html.light-theme #wssPage .snap-symbol,
html.light-theme #wssPage .snap-name,
html.light-theme #wssPage .snap-market-time,
html.light-theme #wssPage .snap-price,
html.light-theme #wssPage .snap-metric-label,
html.light-theme #wssPage .snap-metric-value,
html.light-theme #wssPage .kline-tooltip-symbol,
html.light-theme #wssPage .kline-tooltip-meta,
html.light-theme #wssPage .kline-tooltip-meta-part,
html.light-theme #wssPage .kline-tooltip-row,
html.light-theme #wssPage .kline-tooltip-label,
html.light-theme #wssPage .kline-tooltip-value,
html.light-theme #wssPage .broker-seat-name,
html.light-theme #wssPage .trade-tape-time,
html.light-theme #wssPage .status-feed-time,
html.light-theme #wssPage .status-feed-value,
html.light-theme #wssPage .log-time,
html.light-theme #wssPage .log-size,
html.light-theme #wssPage .log-preview,
html.light-theme #wssPage .inspector-header,
html.light-theme #wssPage .subscription-summary,
html.light-theme #wssPage .subscription-summary strong{color:var(--text)}

        html.light-theme #wssPage input,
html.light-theme #wssPage select,
html.light-theme #wssPage textarea{background:var(--field);border-color:var(--line-strong);color:var(--text)}

        html.light-theme #wssPage select{color-scheme:light;-webkit-text-fill-color:var(--text)}

        html.light-theme #wssPage option,
html.light-theme #wssPage optgroup{background:var(--field);color:var(--text)}

        html.light-theme #wssPage input:focus,
html.light-theme #wssPage select:focus,
html.light-theme #wssPage textarea:focus{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-surface)}

        html.light-theme #wssPage button:disabled{opacity:0.5}

        html.light-theme #wssPage .btn-secondary,
html.light-theme #wssPage .btn-manage-subscriptions,
html.light-theme #wssPage .subscription-action-btn{background:var(--btn-secondary-bg);color:var(--btn-secondary-text)}



        html.light-theme #wssPage .btn-secondary:hover,
html.light-theme #wssPage .btn-manage-subscriptions:hover,
html.light-theme #wssPage .subscription-action-btn:hover{background:var(--btn-secondary-hover);color:var(--btn-secondary-text)}

        html.light-theme #wssPage .btn-secondary.active{background:var(--success-action);color:var(--on-primary)}

        html.light-theme #wssPage .btn-secondary.active:hover{background:var(--success-action);color:var(--on-primary)}

        html.light-theme #wssPage .btn-danger{background:var(--danger);color:var(--on-primary)}

        html.light-theme #wssPage .btn-danger:hover{background:var(--danger-strong);color:var(--on-primary)}

        html.light-theme #wssPage .subscription-action-btn.btn-danger{background:var(--danger-surface);border:1px solid var(--danger);color:var(--danger-strong)}

        html.light-theme #wssPage .subscription-action-btn.btn-danger:hover{background:var(--danger-surface);border-color:var(--danger-strong);color:var(--danger-strong)}

        html.light-theme #wssPage ::-webkit-scrollbar-track{background:transparent}

        html.light-theme #wssPage ::-webkit-scrollbar-thumb{background:var(--line-strong)}

        html.light-theme #wssPage .upload-area{border-color:var(--line-strong);color:var(--soft);background:var(--field)}

        html.light-theme #wssPage .upload-area:hover,
html.light-theme #wssPage .upload-area.dragover{border-color:var(--primary);background:var(--primary-surface);color:var(--primary-hover)}

        html.light-theme #wssPage .file-item{border-bottom-color:var(--line)}

        html.light-theme #wssPage .network-card:hover{background:var(--field)}

        html.light-theme #wssPage .dot.online,
html.light-theme #wssPage .network-status.direct{background:var(--success-action);box-shadow:none}

        html.light-theme #wssPage .dot.connecting,
html.light-theme #wssPage .network-status.loading{background:var(--cyan);box-shadow:none}

        html.light-theme #wssPage .network-status.proxy{background:var(--warning);box-shadow:none}

        html.light-theme #wssPage .network-status.error{background:var(--danger);box-shadow:none}

        html.light-theme #wssPage .stat-value.cyan{color:var(--syntax-key)}
        /* 下行日志：日间用 cyan-600 #0891b2，对应夜间 --cyan(#06b6d4) 的更深版（同色系、深底配浅/浅底配深）。色条同色见 .log-item.down */
        html.light-theme #wssPage .log-title.down{color:#0891b2}

        html.light-theme #wssPage .stat-value.emerald,
html.light-theme #wssPage .stat-value .emerald{color:var(--success-action)}
        /* 上行日志：日间用 emerald-600 #059669，对应夜间翠绿 #10b981 的更深版（同色系）。色条同色见 .log-item.up */
        html.light-theme #wssPage .log-title.up{color:#059669}

        html.light-theme #wssPage .stat-value.amber{color:var(--warning-strong)}

        html.light-theme #wssPage .stat-value.purple{color:var(--purple)}

        html.light-theme #wssPage .stat-value .slash{color:var(--soft)}

        html.light-theme #wssPage .log-stream-panel,
html.light-theme #wssPage .visual-panel,
html.light-theme #wssPage .inspector-panel{background:var(--panel-strong);border-color:var(--line-strong)}

        html.light-theme #wssPage .log-resize-handle::before{background:rgba(37,99,235,0.22);box-shadow:0 0 0 1px rgba(37,99,235,0.1)}

        html.light-theme #wssPage .log-resize-handle:hover::before,html.light-theme #wssPage .log-resize-handle.active::before{background:rgba(37,99,235,0.45)}

        html.light-theme #wssPage .log-item,
html.light-theme #wssPage .extend-row,
html.light-theme #wssPage .visual-row,
html.light-theme #wssPage .order-book-side,
html.light-theme #wssPage .broker-seat-side,
html.light-theme #wssPage .broker-seat-item,
html.light-theme #wssPage .kline-tooltip,
html.light-theme #wssPage .trade-stats-table-wrap,
html.light-theme #wssPage .status-feed-item,
html.light-theme #wssPage .snap-core,
html.light-theme #wssPage .snap-metric{background:var(--field);border-color:var(--line);box-shadow:none}

        html.light-theme #wssPage .extend-row.empty-slot,
html.light-theme #wssPage .snap-metric.empty-slot,
html.light-theme #wssPage .kline-tooltip-row.empty-slot{background:var(--field-soft);border-color:var(--line)}

        html.light-theme #wssPage .log-item:hover,
html.light-theme #wssPage .log-item.selected{background:var(--primary-surface);border-color:var(--primary)}

        html.light-theme #wssPage .log-item.up{border-left-color:#059669}

        html.light-theme #wssPage .log-item.down{border-left-color:#0891b2}

        html.light-theme #wssPage .log-item.system{border-left-color:var(--soft)}

        html.light-theme #wssPage .log-item.error{border-left-color:var(--danger)}

        /* 系统日志标题：日间用 --muted（与左侧「市场配置」标签同色），比 --text 轻、可读，
           对应夜间 .log-title.system 的 --soft（见基规则），避免日间过黑刺眼 */
        html.light-theme #wssPage .log-title.system{color:var(--muted)}

        html.light-theme #wssPage .log-title.error{color:var(--danger-strong)}

        html.light-theme #wssPage .visual-key,
html.light-theme #wssPage .extend-key,
html.light-theme #wssPage .visual-table th,
html.light-theme #wssPage .trade-stats-table th,
html.light-theme #wssPage .json-key{color:var(--syntax-key)}

        html.light-theme #wssPage .visual-json{color:var(--syntax-view)}

        html.light-theme #wssPage .visual-empty,
html.light-theme #wssPage .order-book-empty{border-color:var(--line-strong);color:var(--soft)}

        html.light-theme #wssPage .visual-table th,
html.light-theme #wssPage .trade-stats-table th,
html.light-theme #wssPage .capital-flow-table-wrap thead th{background:var(--field);border-color:var(--line-strong);box-shadow:inset 0 -1px 0 var(--line-strong)}

        html.light-theme #wssPage .visual-table td,
html.light-theme #wssPage .visual-table th,
html.light-theme #wssPage .trade-stats-table td,
html.light-theme #wssPage .trade-stats-table th{border-color:var(--line-strong)}

        html.light-theme #wssPage .trade-stats-table tbody tr:nth-child(odd) td{background:var(--field)}

        html.light-theme #wssPage .trade-stats-table tbody tr:hover td{background:var(--primary-surface)}

        html.light-theme #wssPage .order-book-side.ask,
html.light-theme #wssPage .broker-seat-side.sell{border-color:var(--danger)}

        html.light-theme #wssPage .order-book-side.bid,
html.light-theme #wssPage .broker-seat-side.buy{border-color:var(--success)}

        html.light-theme #wssPage .order-book-side.ask .order-book-title,
html.light-theme #wssPage .broker-seat-side.sell .broker-seat-title,
html.light-theme #wssPage .snap-up,
html.light-theme #wssPage .trade-tape-up,
html.light-theme #wssPage .trade-tape-price.trade-tape-up,
html.light-theme #wssPage .trade-tape-volume.trade-tape-up,
html.light-theme #wssPage .trade-tape-direction.trade-tape-up,
html.light-theme #wssPage .kline-tooltip-value.snap-up{color:var(--danger-strong)}

        html.light-theme #wssPage .order-book-side.bid .order-book-title,
html.light-theme #wssPage .broker-seat-side.buy .broker-seat-title,
html.light-theme #wssPage .snap-down,
html.light-theme #wssPage .trade-tape-down,
html.light-theme #wssPage .trade-tape-price.trade-tape-down,
html.light-theme #wssPage .trade-tape-volume.trade-tape-down,
html.light-theme #wssPage .trade-tape-direction.trade-tape-down,
html.light-theme #wssPage .kline-tooltip-value.snap-down{color:var(--success-strong)}

        html.light-theme #wssPage .snap-flat,
html.light-theme #wssPage .trade-tape-flat,
html.light-theme #wssPage .kline-tooltip-value.snap-flat{color:var(--text)}

        html.light-theme #wssPage .json-string{color:var(--syntax-string)}

        html.light-theme #wssPage .json-number{color:var(--syntax-number)}

        html.light-theme #wssPage .json-boolean{color:var(--syntax-boolean)}

        html.light-theme #wssPage .json-null{color:var(--syntax-null)}

        html.light-theme #wssPage .subscription-summary{border-bottom-color:var(--line)}

        html.light-theme #wssPage .subscription-table th{background:var(--field);color:var(--muted);border-color:var(--line-strong)}

        html.light-theme #wssPage .subscription-table td,
html.light-theme #wssPage .mobile-subscription-content .subscription-table tr{background:var(--panel-strong);color:var(--text);border-color:var(--line-strong)}

        html.light-theme #wssPage .mobile-subscription-content .subscription-table td{border-bottom-color:var(--line)}

        html.light-theme #wssPage .subscription-params{background:var(--field);color:var(--text)}

        html.light-theme #wssPage .subscription-status{border-color:var(--success);background:var(--success-surface);color:var(--success-strong)}

        html.light-theme #wssPage .subscription-status.raw{border-color:var(--warning);background:var(--warning-surface);color:var(--warning-strong)}

        #wssPage .inspector-panel-wrapper{flex:1;display:flex;flex-direction:column;background:var(--panel);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:16px;padding:14px;overflow:hidden}

        #wssPage .inspector-panel-wrapper h2{margin-top:0;margin-bottom:12px;flex-shrink:0}

        /* 与 .log-panel-content 同列定义一致（左 minmax(0,1fr) / 右 clamp(160px,38vw-285px,480px)），保证检查器左右两列与上面通信日志的左右两块视觉对齐；
           右列视口基准 → 任务栏收起时检查器也只收窄左列「结构化数据」，「当前订阅」宽度不动 */
        #wssPage .inspector-grid{flex:1;display:grid;grid-template-columns:minmax(0,1fr) clamp(160px, calc(38vw - 285px), 480px);gap:16px;overflow:hidden}

        /* 窄宽视口下允许 tabs 横向滚动而不是竖向压缩（overflow-x + 隐藏滚动条）。 */
        #wssPage .inspector-tabs{display:flex;gap:8px;align-items:center;flex:1;overflow-x:auto;scrollbar-width:none}
        #wssPage .inspector-tabs::-webkit-scrollbar{display:none}

        /* 数据检查器 tab 完全复用工作台全局 .tab-btn（styles.css）的胶囊样式——
           圆角 999px / padding 7px 12px / 字重 / 高度全部以全局 .tab-btn 为单一来源。
           生效前提：上面 #wssPage button:not(...) 通用按钮规则已把 .tab-btn 排除，
           否则其 (1,1,1) 特异度会盖过全局 .tab-btn (0,1,0)，tab 就会退回圆角矩形+加粗。
           此处只补 inspector 横向滚动场景需要的"单行 + 不被压缩"。 */
        #wssPage .inspector-tab.tab-btn{white-space:nowrap;flex-shrink:0}

        #wssPage .inspector-size{font-size:11px;color:var(--muted);margin-left:8px;flex-shrink:0}

        #wssPage .inspector-extra-title{font-size:11px;color:var(--muted);margin-left:8px;flex-shrink:0}

        #wssPage .inspector-panel{position:relative}

        #wssPage .inspector-subscription-content{padding:0}

        /* 统一空态：通信日志列表 / 数据检查器（结构化数据 / Hex / 当前订阅）
           都复用 .visual-empty 虚线占位，与右上「未选功能」一致 */
        #wssPage #wss-logContainer > .visual-empty{height:100%;min-height:120px}
        #wssPage .inspector-content > .visual-empty{height:100%;min-height:100px;font-size:12px}

        /* 桌面检查器订阅列不再渲染表格上方的「共 N 条」摘要（头部栏 #subscriptionSummary 已显示），
           原 .inspector-subscription-content .subscription-summary 规则已随之移除。移动端订阅页仍用通用 .subscription-summary 规则。 */

        #wssPage .inspector-subscription-content .subscription-empty{padding:16px 8px;text-align:center;font-size:12px;color:var(--soft);font-style:italic}

        #wssPage .inspector-subscription-content .subscription-table{font-size:10px}

        #wssPage .inspector-subscription-content .subscription-action-btn{min-height:24px;padding:2px 8px;font-size:10px}

        /* M6：查看/退订按钮点击时高亮右列订阅区，提示用户位置 */
        #wssPage .inspector-subscription-col .inspector-panel{transition:box-shadow .25s,border-color .25s}
        #wssPage .inspector-subscription-content.inspector-subscription-flash + *,
        #wssPage .inspector-subscription-content.inspector-subscription-flash{animation:wss-flash 1.2s ease-out}
        @keyframes wss-flash{
          0%{box-shadow:0 0 0 0 var(--primary)}
          30%{box-shadow:0 0 0 4px var(--primary-surface)}
          100%{box-shadow:0 0 0 0 transparent}
        }

        /* light-theme 的 tab-btn 样式由 styles.css 全局规则提供，inspector 无需额外覆盖 */

        /* 检查器每列 = 一个面板：边框 + 圆角在此，头部栏与内容卡片连成一体
           （复用工作台 .viewer-head「头部栏 + 正文」同面板结构）。overflow:hidden 让头部/内容跟随圆角裁切。 */
        #wssPage .inspector-grid>div{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line-strong);border-radius:6px}

        /* 内容卡片：边框/圆角已上移到列容器（.inspector-grid>div），此处只留底色/内边距 */
        #wssPage .inspector-panel{flex:1;display:flex;flex-direction:column;background:var(--panel-strong);padding:12px;overflow:auto}

        #wssPage .inspector-content{flex:1;min-height:0}

        #wssPage .log-item{background:var(--field);backdrop-filter:blur(12px);border:1px solid var(--line);border-left:4px solid;border-radius:6px;padding:12px;margin-bottom:8px;cursor:pointer;transition:all 0.2s}

        #wssPage .log-item:hover,
#wssPage .log-item.selected{background:var(--primary-surface);border-color:var(--primary)}

        #wssPage .log-item.up{border-left-color:#10b981}

        #wssPage .log-item.down{border-left-color:var(--cyan)}

        #wssPage .log-item.system{border-left-color:var(--soft)}

        #wssPage .log-item.error{border-left-color:var(--danger)}

        #wssPage .log-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}

        #wssPage .log-heading-main{display:flex;align-items:center;gap:8px}

        #wssPage .log-time{font-size:11px;color:var(--muted);font-family:monospace}

        #wssPage .log-title{font-size:12px;font-weight:bold;font-family:monospace}

        /* 夜间日志上/下行配色基准来自旧工具 socket_client.html：上行翠绿 #10b981、下行青色 --cyan(#06b6d4)。
           （日间由上方 html.light-theme 覆盖；系统 #64748b、错误两端已与旧工具一致） */
        #wssPage .log-title.up{color:#10b981}

        #wssPage .log-title.down{color:var(--cyan)}

        #wssPage .log-title.system{color:var(--soft)}

        #wssPage .log-title.error{color:var(--danger-strong)}

        #wssPage .log-size{font-size:11px;color:var(--muted)}

        #wssPage .log-preview{font-size:11px;color:var(--muted);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


        /* 检查器 */
        /* tab 头部栏：灰底 + 底部分隔线，底色复用全局 --tab-bar-bg（与工作台 .viewer-head/.tabs 同源）；
           margin-bottom:0 让头部紧贴下方内容卡片，连成一个面板（与列容器的边框/圆角共同构成工作台同款结构）。 */
        #wssPage .inspector-header{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin-bottom:0;flex-shrink:0;padding:8px 12px;background:var(--tab-bar-bg);border-bottom:1px solid var(--line-strong)}

        #wssPage .inspector-content{font-family:monospace;font-size:11px;color:var(--syntax-view);white-space:pre-wrap;word-break:break-all}

        #wssPage .subscription-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--line);color:var(--text)}

        #wssPage .subscription-summary strong{color:var(--text);font-size:12px}

        #wssPage .subscription-summary span{color:var(--muted);font-size:11px}

        #wssPage .subscription-table{width:100%;border-collapse:collapse;table-layout:fixed}

        #wssPage .subscription-table th,
#wssPage .subscription-table td{border:1px solid var(--line-strong);padding:8px;vertical-align:top;text-align:left}

        #wssPage .subscription-table th{background:var(--field);color:var(--muted);font-size:11px;font-weight:700}

        #wssPage .subscription-table td{background:var(--panel-strong);color:var(--text);font-size:11px}

        #wssPage .subscription-table .subscription-col-function{width:92px}

        #wssPage .subscription-table .subscription-col-action{width:84px}

        #wssPage .subscription-params{white-space:normal;word-break:break-all;color:var(--text);line-height:1.4}

        #wssPage .subscription-empty{display:flex;align-items:center;justify-content:center;min-height:120px;color:var(--soft)}

        #wssPage .subscription-status{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:10px;font-weight:700;border:1px solid var(--success);background:var(--success-surface);color:var(--success-strong)}

        #wssPage .subscription-status.raw{border-color:var(--warning);background:var(--warning-surface);color:var(--warning-strong)}

        #wssPage .subscription-action-btn{padding:7px 10px;font-size:11px;line-height:1.2;white-space:nowrap}

        #wssPage .subscription-action-btn[disabled]{opacity:0.5;cursor:not-allowed}

        #wssPage .json-key{color:var(--syntax-key)}

        #wssPage .json-string{color:var(--syntax-string)}

        #wssPage .json-number{color:var(--syntax-number)}

        #wssPage .json-boolean{color:var(--syntax-boolean)}

        #wssPage .json-null{color:var(--syntax-null)}

        #wssPage .mobile-top-bar,
#wssPage .mobile-tabbar,
#wssPage .mobile-subscription-page{display:none}

        #wssPage .mobile-subscription-content{flex:1;min-height:0;overflow-y:auto}

        @media (max-width: 1100px){

            #wssPage .log-panel-content{grid-template-columns:1fr}

            #wssPage .visual-fields{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}

            #wssPage .extend-fields{grid-template-columns:repeat(3,minmax(0,1fr))}

            #wssPage .extend-row{padding:7px 8px;gap:6px}

            #wssPage .extend-key{font-size:10px}

            #wssPage .extend-value{font-size:11px}

            #wssPage .order-book-panel{grid-template-columns:1fr}

            #wssPage .snap-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

            #wssPage .snap-ring{grid-template-columns:minmax(118px,1fr) repeat(2,minmax(0,1fr))}

            #wssPage .snap-ring.index-quote-ring{grid-template-columns:repeat(4,minmax(0,1fr))}

            #wssPage .snap-price{font-size:20px}

            #wssPage .kline-board{grid-template-columns:1fr}

            #wssPage .kline-tooltip{max-width:100%}

            #wssPage .kline-tooltip-meta{font-size:11px;gap:10px}

            #wssPage .kline-tooltip-meta.tight{font-size:10px;gap:6px}

            #wssPage .kline-tooltip-meta.tight.stacked{gap:2px}

            #wssPage .kline-tooltip-symbol{font-size:14px}

            #wssPage .kline-tooltip-row{grid-template-columns:36px minmax(0,1fr);gap:6px;font-size:11px}

            #wssPage .trade-tape{column-gap:6px}

            #wssPage .trade-tape-item{grid-template-columns:8ch 8ch 4ch 1ch;gap:3px;font-size:9px}

            #wssPage .status-feed-item{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) 12ch;gap:6px;font-size:10px}


}
        @media (max-width: 768px){

            #wssPage{height:100%;overflow:hidden}

            #wssPage{max-width:none;padding:50px 0 62px;background:var(--bg)}

            #wssPage{padding-bottom:0}

            #wssPage button:not(.wss-task-panel *,.icon-btn,.param-reset-btn){min-height:44px}

            #wssPage input,
#wssPage select,
#wssPage textarea{min-height:44px;font-size:14px}

            #wssPage #wss-params{min-height:220px}

            #wssPage .desktop-only{display:none!important}

            #wssPage .mobile-top-bar{position:fixed;top:0;left:0;right:0;z-index:60;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;height:50px;padding:8px 12px;background:var(--bg);border-bottom:1px solid var(--line);backdrop-filter:none}

            #wssPage .mobile-top-status{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text);white-space:nowrap;min-width:0;cursor:pointer}

            #wssPage .mobile-top-status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

            #wssPage .mobile-top-meta{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;color:var(--text);font-size:13px;font-weight:700}

            #wssPage .mobile-top-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

            #wssPage .mobile-top-separator{color:var(--muted);font-weight:400}

            #wssPage .mobile-top-clock{font-family:monospace;font-size:12px;color:var(--muted);white-space:nowrap}

            #wssPage .grid{display:block;height:100%;overflow:hidden}

            #wssPage .grid>div:first-child,
#wssPage .grid>div:last-child{height:100%;min-height:0}

            #wssPage .panel{padding:12px;margin:0 0 10px;border-radius:8px;border-left:0;border-right:0}

            #wssPage .grid>div:first-child>.panel:first-child{border-top:0;border-top-left-radius:0;border-top-right-radius:0}

            #wssPage .grid>div:first-child{display:none;overflow-y:auto;padding-bottom:0}

            #wssPage .grid>div:last-child{display:none}

            #wssPage .stats-grid{display:none}

            #wssPage .log-inspector-wrapper{height:100%;display:block;overflow:hidden}

            #wssPage .log-panel-wrapper,
#wssPage .inspector-panel-wrapper{display:none;height:100%;margin:0;padding:10px 0;border-radius:0;border-left:0;border-right:0;overflow:hidden}

            #wssPage .log-panel-wrapper{flex:none;background:var(--panel)}

            #wssPage .log-panel-content{height:calc(100% - 48px);display:block;overflow:hidden}

            #wssPage .log-stream-panel,
#wssPage .visual-panel{display:none;height:100%;padding:10px 12px}

            #wssPage .visual-content{overflow-y:auto}

            #wssPage .log-resize-handle{display:none}

            #wssPage.mobile-tab-connect .grid>div:first-child{display:block}

            #wssPage.mobile-tab-log .grid>div:last-child,
#wssPage.mobile-tab-visual .grid>div:last-child,
#wssPage.mobile-tab-inspector .grid>div:last-child,
#wssPage.mobile-tab-subscriptions .grid>div:last-child{display:block}

            #wssPage.mobile-tab-log .log-panel-wrapper,
#wssPage.mobile-tab-visual .log-panel-wrapper,
#wssPage.mobile-tab-inspector .inspector-panel-wrapper{display:flex}

            #wssPage.mobile-tab-log .log-stream-panel{display:flex}

            #wssPage.mobile-tab-visual .visual-panel{display:flex}

            #wssPage.mobile-tab-log .visual-panel,
#wssPage.mobile-tab-visual .log-stream-panel{display:none}

            #wssPage.mobile-tab-visual .log-filters{display:none}

            #wssPage.mobile-tab-visual .log-panel-content{height:100%}

            #wssPage.mobile-tab-inspector .inspector-grid{display:block;height:calc(100% - 28px);overflow:hidden}

            #wssPage.mobile-tab-inspector .inspector-grid>div:first-child{height:100%;display:flex;flex-direction:column}

            #wssPage.mobile-tab-inspector .inspector-grid>div:nth-child(2){display:none}

            #wssPage.mobile-tab-inspector .inspector-panel{min-height:0}

            #wssPage.mobile-tab-subscriptions .mobile-subscription-page{display:flex}

            #wssPage .mobile-connect-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}

            #wssPage .log-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:8px;padding-bottom:2px}

            #wssPage .log-filters h2{display:none}

            #wssPage .log-filter-group{min-width:0}

            #wssPage .log-filter-group-primary{overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}

            #wssPage .log-filter-group-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}

            #wssPage .log-filter{flex:0 0 auto;min-height:34px;padding:6px 12px}

            #wssPage .log-filters label{flex:0 0 auto;min-height:34px;padding:0 6px}

            #wssPage .log-filter-group-primary button{flex:0 0 auto}

            #wssPage .log-filter-group-actions button{width:100%;min-height:34px}

            #wssPage #wss-logContainer{height:100%;overflow-y:auto}

            #wssPage .log-item{padding:10px;margin-bottom:8px}

            #wssPage .log-header{gap:8px}

            #wssPage .log-preview{white-space:nowrap}

            #wssPage .inspector-panel-wrapper h2{margin-bottom:8px}

            #wssPage .inspector-content{font-size:12px;line-height:1.5}

            #wssPage .mobile-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:repeat(5,1fr);gap:0;background:var(--bg);border-top:1px solid var(--line);backdrop-filter:none;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px))}

            #wssPage .mobile-top-bar,
#wssPage .mobile-tabbar{display:none!important}

            html.light-theme #wssPage button.mobile-tab,
#wssPage button.mobile-tab,
#wssPage button.mobile-tab,
#wssPage button.mobile-tab{min-height:44px;background:transparent;color:var(--muted);border-color:transparent;border-radius:8px;padding:6px 4px;font-size:12px}

            html.light-theme #wssPage button.mobile-tab.active,
#wssPage button.mobile-tab.active,
#wssPage button.mobile-tab.active,
#wssPage button.mobile-tab.active{background:var(--primary);color:var(--on-primary)}

            #wssPage .mobile-subscription-page{height:100%;min-height:0;flex-direction:column;background:var(--panel);border:0;border-radius:0;padding:12px;overflow:hidden}

            #wssPage .mobile-subscription-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-shrink:0}

            #wssPage .mobile-subscription-header h2{margin:0}

            #wssPage .mobile-subscription-content .subscription-table,
#wssPage .mobile-subscription-content .subscription-table tbody,
#wssPage .mobile-subscription-content .subscription-table tr,
#wssPage .mobile-subscription-content .subscription-table td{display:block;width:100%}

            #wssPage .mobile-subscription-content .subscription-table thead{display:none}

            #wssPage .mobile-subscription-content .subscription-table tr{margin-bottom:10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--panel-strong);overflow:hidden}

            #wssPage .mobile-subscription-content .subscription-table td{border:none;border-bottom:1px solid var(--line);padding:8px 10px}

            #wssPage .mobile-subscription-content .subscription-table td:last-child{border-bottom:none;text-align:right}

            #wssPage .mobile-subscription-content .subscription-action-btn{min-height:32px}

            #wssPage .snap-board,
#wssPage .status-feed,
#wssPage .broker-seat-panel{height:auto;min-height:100%}

            #wssPage .snap-ring,
#wssPage .snap-ring.index-quote-ring{grid-template-columns:repeat(2,minmax(0,1fr))}

            #wssPage .snap-ring .snap-core,
#wssPage .snap-ring.index-quote-ring .snap-core{grid-column:1 / -1;grid-row:auto;min-height:96px}

            #wssPage .snap-extra-grid,
#wssPage .extend-fields{grid-template-columns:repeat(2,minmax(0,1fr))}

            #wssPage .order-book-panel,
#wssPage .broker-seat-panel{grid-template-columns:1fr}

            #wssPage .trade-tape{column-count:1;overflow-y:auto}

            #wssPage .trade-tape-item{grid-template-columns:8ch 8ch minmax(4ch,1fr) 1ch;font-size:11px}

            #wssPage .kline-board{grid-template-columns:1fr}

            #wssPage .subscription-table .subscription-col-function,
#wssPage .subscription-table .subscription-col-action{width:auto}


}

/* --- guard against host .log-* rule bleed (request-log shares class names) --- */
#wssPage .log-item{display:block;min-height:0;align-items:stretch;flex:0 0 auto}
#wssPage .log-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px}
#wssPage .log-heading-main{display:flex;flex-direction:row;align-items:center;gap:8px;min-width:0;flex:1 1 auto}
#wssPage .log-time{display:inline-block;font-size:11px;white-space:nowrap;flex:0 0 auto}
#wssPage .log-title{display:inline-block;flex:1 1 auto;min-width:0;font-size:12px;font-weight:bold;font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#wssPage .log-size{display:inline-block;font-size:11px;white-space:nowrap;flex:0 0 auto}
#wssPage .log-preview{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* --- log filter bar: pills left, 心跳/滚动/清空/导出 cluster fixed right --- */
#wssPage .log-filter-group-toggles{margin-left:auto;display:flex;align-items:center;gap:8px;flex:0 0 auto}

/* styles.desktop.css */
/* PC 端布局样式：仅维护桌面工作台、桌面导航和桌面页面布局。 */


      html.light-theme .desktop-sidebar {
        background: rgba(248, 250, 252, 0.92);
        border-color: rgba(100, 116, 139, 0.16);
      }

      html.light-theme .desktop-nav-btn {
        color: #475569;
      }

      html.light-theme .desktop-nav-btn:hover,
      html.light-theme .desktop-nav-btn.active {
        color: #1d4ed8;
        background: rgba(219, 234, 254, 0.74);
        border-color: rgba(59, 130, 246, 0.22);
      }

      html.light-theme .desktop-nav-icon {
        color: #2563eb;
        background: rgba(219, 234, 254, 0.82);
      }

      html.light-theme .desktop-page-title {
        color: #0f172a;
      }

      .desktop-sidebar,
      .desktop-page {
        display: none;
      }

      .desktop-sidebar {
        min-height: 0;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.68);
      }

      .desktop-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
        height: 100%;
      }

      .desktop-nav-btn {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
        min-height: 32px;
        padding: 0 9px;
        border: 1px solid transparent;
        border-radius: 8px;
        background: transparent;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        text-align: left;
        cursor: pointer;
        transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
      }

      .desktop-nav-btn:hover,
      .desktop-nav-btn.active {
        color: #dbeafe;
        background: rgba(59, 130, 246, 0.16);
        border-color: rgba(96, 165, 250, 0.2);
      }

      .desktop-nav-btn[data-desktop-view="profile"] {
        margin-top: auto;
      }

      /* 模块导航图标：line-style SVG（按原型 .nav-item .icn 18×18，stroke=2 currentColor）
         之前是 emoji + 蓝色背景框，跟原型不符 */
      .desktop-nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        color: currentColor;
      }

      .desktop-nav-icon svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .desktop-nav-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .desktop-page {
        min-height: 0;
        overflow: hidden;
      }

      .desktop-page > .panel {
        width: 100%;
        min-height: 0;
      }

      .desktop-page-body {
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-height: 0;
        height: 100%;
        overflow: auto;
      }

      .desktop-page-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex: 0 0 auto;
      }

      .desktop-page-title {
        margin: 0;
        color: var(--text);
        font-size: 16px;
        font-weight: 900;
      }

      @media (min-width: 769px) {
        html {
          height: 100%;
        }

        body:not(.mobile-app).is-logged-out {
          height: 100%;
          min-height: 100%;
          padding: 0;
          overflow: hidden;
        }

        body:not(.mobile-app).is-logged-out .login-screen {
          display: flex;
        }

        body:not(.mobile-app).is-logged-out .shell,
        body:not(.mobile-app).is-logged-out .mobile-top-bar,
        body:not(.mobile-app).is-logged-out .mobile-tabbar {
          display: none !important;
        }

        body:not(.mobile-app).is-booting .login-screen,
        body:not(.mobile-app).is-booting .shell,
        body:not(.mobile-app).is-booting .mobile-top-bar,
        body:not(.mobile-app).is-booting .mobile-tabbar {
          display: none !important;
        }

        body:not(.mobile-app) .login-screen {
          position: fixed;
          inset: 0;
          width: 100vw;
          min-height: 100vh;
          align-items: stretch;
          justify-content: center;
          padding: 0;
          color: #0f172a;
          background:
            linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
          overflow: auto;
        }

        body:not(.mobile-app) .login-screen::before,
        body:not(.mobile-app) .login-screen::after {
          content: "";
          position: absolute;
          inset: 0;
          pointer-events: none;
        }

        body:not(.mobile-app) .login-screen::before {
          background:
            linear-gradient(rgba(100, 116, 139, 0.055) 1px, transparent 1px),
            linear-gradient(90deg, rgba(100, 116, 139, 0.045) 1px, transparent 1px);
          background-size: 44px 44px, 44px 44px;
          mask-image: linear-gradient(90deg, #000 0%, #000 48%, transparent 82%);
        }

        body:not(.mobile-app) .login-screen::after {
          display: none;
        }

        body:not(.mobile-app) .login-layout {
          position: relative;
          z-index: 1;
          display: grid;
          grid-template-columns: minmax(620px, 1fr) minmax(430px, 560px);
          gap: 24px;
          width: 100%;
          min-height: 100%;
          padding: 24px;
          margin: 0;
        }

        body:not(.mobile-app) .login-intro {
          position: relative;
          display: flex;
          flex-direction: column;
          justify-content: flex-start;
          gap: clamp(16px, 2.5vh, 28px);
          min-width: 0;
          min-height: calc(100vh - 48px);
          padding: clamp(34px, 5vh, 58px) clamp(42px, 5vw, 72px);
          border: 0;
          border-radius: 0;
          color: #0f172a;
          background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(239, 246, 255, 0.46));
          box-shadow: none;
          overflow: hidden;
        }

        body:not(.mobile-app) .login-intro::before,
        body:not(.mobile-app) .login-intro::after {
          content: "";
          position: absolute;
          inset: 0;
          pointer-events: none;
        }

        body:not(.mobile-app) .login-intro::before {
          background:
            linear-gradient(rgba(100, 116, 139, 0.08) 1px, transparent 1px),
            linear-gradient(90deg, rgba(100, 116, 139, 0.06) 1px, transparent 1px),
            linear-gradient(115deg, transparent 0 38%, rgba(37, 99, 235, 0.08) 45%, rgba(14, 165, 233, 0.06) 51%, transparent 60%);
          background-size: 44px 44px, 44px 44px, 100% 100%;
        }

        body:not(.mobile-app) .login-intro::after {
          width: 52%;
          background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.10), transparent);
          animation: loginScan 8s ease-in-out infinite;
        }

        body:not(.mobile-app) .login-intro-main,
        body:not(.mobile-app) .login-data-plane,
        body:not(.mobile-app) .login-signal-list {
          position: relative;
          z-index: 1;
        }

        body:not(.mobile-app) .login-brand-line {
          display: inline-flex;
          align-items: center;
          gap: 10px;
          color: #0f172a;
          font-size: 13px;
          font-weight: 900;
        }

        body:not(.mobile-app) .login-brand-dot {
          width: 9px;
          height: 9px;
          border-radius: 50%;
          background: #2563eb;
          box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
          animation: loginNodePulse 2.8s ease-in-out infinite;
        }

        body:not(.mobile-app) .login-brand-badge {
          padding: 3px 7px;
          border: 1px solid rgba(37, 99, 235, 0.18);
          border-radius: 999px;
          color: #1d4ed8;
          background: rgba(219, 234, 254, 0.74);
          font-size: 10px;
          font-weight: 900;
        }

        body:not(.mobile-app) .login-intro-kicker {
          margin: clamp(34px, 5.4vh, 64px) 0 12px;
          color: #2563eb;
          font-size: 12px;
          font-weight: 900;
          text-transform: uppercase;
        }

        body:not(.mobile-app) .login-intro-title {
          margin: 0;
          max-width: 680px;
          color: #0f172a;
          font-size: clamp(42px, 4.4vw, 64px);
          font-weight: 900;
          line-height: 1.08;
        }

        body:not(.mobile-app) .login-intro-text {
          max-width: 520px;
          margin: 20px 0 0;
          color: #475569;
          font-size: 15px;
          line-height: 1.75;
        }

        body:not(.mobile-app) .login-data-plane {
          flex: 0 0 auto;
          min-height: clamp(260px, 31vh, 340px);
          margin: clamp(12px, 2vh, 22px) 0 0;
          border: 1px solid rgba(100, 116, 139, 0.16);
          border-radius: 8px;
          background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(239, 246, 255, 0.54)),
            repeating-linear-gradient(0deg, rgba(100, 116, 139, 0.07) 0 1px, transparent 1px 28px),
            repeating-linear-gradient(90deg, rgba(100, 116, 139, 0.055) 0 1px, transparent 1px 28px);
          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
          overflow: hidden;
        }

        body:not(.mobile-app) .login-data-plane::before {
          content: "";
          position: absolute;
          inset: 0;
          background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.11), transparent);
          transform: translateY(-70%);
          animation: loginTraceSweep 6s ease-in-out infinite;
        }

        body:not(.mobile-app) .login-flow-line {
          position: absolute;
          height: 2px;
          border-radius: 999px;
          background: linear-gradient(90deg, transparent, #2563eb, #06b6d4, transparent);
          background-size: 240px 100%;
          opacity: 0.72;
          animation: loginFlowDrift 3.8s linear infinite;
        }

        body:not(.mobile-app) .login-flow-line-a {
          top: 35%;
          left: 6%;
          width: 74%;
        }

        body:not(.mobile-app) .login-flow-line-b {
          right: 9%;
          bottom: 31%;
          width: 60%;
          transform: rotate(-11deg);
          animation-delay: -1.4s;
        }

        body:not(.mobile-app) .login-flow-node {
          position: absolute;
          width: 12px;
          height: 12px;
          border: 2px solid rgba(37, 99, 235, 0.78);
          border-radius: 50%;
          background: #ffffff;
          box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.08);
          animation: loginNodePulse 2.4s ease-in-out infinite;
        }

        body:not(.mobile-app) .login-flow-node-a {
          top: 32%;
          left: 18%;
        }

        body:not(.mobile-app) .login-flow-node-b {
          top: 48%;
          right: 24%;
          animation-delay: -0.8s;
        }

        body:not(.mobile-app) .login-flow-node-c {
          right: 11%;
          bottom: 28%;
          animation-delay: -1.6s;
        }

        body:not(.mobile-app) .login-trace-panel,
        body:not(.mobile-app) .login-code-panel {
          position: absolute;
          border: 1px solid rgba(100, 116, 139, 0.16);
          border-radius: 8px;
          background: rgba(255, 255, 255, 0.86);
          box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
          backdrop-filter: blur(10px);
          animation: loginPanelFloat 5.2s ease-in-out infinite;
        }

        body:not(.mobile-app) .login-trace-panel {
          top: 24px;
          left: 24px;
          width: min(360px, 48%);
          padding: 12px;
        }

        body:not(.mobile-app) .login-trace-head,
        body:not(.mobile-app) .login-trace-row {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 16px;
        }

        body:not(.mobile-app) .login-trace-head {
          margin-bottom: 8px;
          color: #0f172a;
          font-size: 12px;
          font-weight: 900;
        }

        body:not(.mobile-app) .login-trace-head strong {
          color: #16a34a;
          font-size: 10px;
        }

        body:not(.mobile-app) .login-trace-row {
          padding: 7px 0;
          border-top: 1px solid rgba(100, 116, 139, 0.12);
          color: #64748b;
          font-family: "Cascadia Code", Consolas, monospace;
          font-size: 12px;
        }

        body:not(.mobile-app) .login-trace-row strong {
          color: #2563eb;
          font-size: 11px;
        }

        body:not(.mobile-app) .login-code-panel {
          right: 28px;
          bottom: 24px;
          display: grid;
          gap: 6px;
          width: min(290px, 42%);
          padding: 14px;
          color: #0f766e;
          font-family: "Cascadia Code", Consolas, monospace;
          font-size: 12px;
          line-height: 1.35;
          animation-delay: -2.2s;
        }

        body:not(.mobile-app) .login-pulse-meter {
          position: absolute;
          left: 30px;
          bottom: 30px;
          display: flex;
          align-items: flex-end;
          gap: 7px;
          height: 58px;
        }

        body:not(.mobile-app) .login-pulse-meter span {
          width: 8px;
          height: 18px;
          border-radius: 999px;
          background: linear-gradient(180deg, #2563eb, #06b6d4);
          animation: loginMeter 1.8s ease-in-out infinite;
        }

        body:not(.mobile-app) .login-pulse-meter span:nth-child(2) {
          animation-delay: -0.25s;
        }

        body:not(.mobile-app) .login-pulse-meter span:nth-child(3) {
          animation-delay: -0.55s;
        }

        body:not(.mobile-app) .login-pulse-meter span:nth-child(4) {
          animation-delay: -0.85s;
        }

        body:not(.mobile-app) .login-pulse-meter span:nth-child(5) {
          animation-delay: -1.1s;
        }

        body:not(.mobile-app) .login-pulse-meter span:nth-child(6) {
          animation-delay: -1.35s;
        }

        body:not(.mobile-app) .login-signal-list {
          display: grid;
          grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: 1px;
          margin-top: clamp(16px, 2.4vh, 26px);
          border: 1px solid rgba(100, 116, 139, 0.16);
          border-radius: 8px;
          background: rgba(100, 116, 139, 0.12);
          overflow: hidden;
        }

        body:not(.mobile-app) .login-signal-item {
          min-width: 0;
          padding: 14px 16px;
          background: rgba(255, 255, 255, 0.74);
        }

        body:not(.mobile-app) .login-signal-item span {
          display: block;
          margin-bottom: 6px;
          color: #64748b;
          font-size: 10px;
          font-weight: 900;
          text-transform: uppercase;
        }

        body:not(.mobile-app) .login-signal-item strong {
          display: block;
          color: #0f172a;
          font-size: 12px;
          font-weight: 900;
        }

        body:not(.mobile-app) .login-card {
          position: relative;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: stretch;
          width: 100%;
          max-width: none;
          min-height: 100%;
          padding: clamp(58px, 9vh, 96px) clamp(46px, 5vw, 72px);
          border: 0;
          border-left: 1px solid rgba(100, 116, 139, 0.14);
          border-radius: 0;
          background:
            linear-gradient(155deg, rgba(248, 252, 255, 0.88), rgba(235, 247, 250, 0.78) 46%, rgba(241, 245, 249, 0.86)),
            linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(20, 184, 166, 0.07) 42%, rgba(255, 255, 255, 0.18) 76%);
          box-shadow:
            inset 1px 0 0 rgba(255, 255, 255, 0.86),
            inset 0 1px 0 rgba(255, 255, 255, 0.72);
          backdrop-filter: blur(14px);
          overflow: hidden auto;
        }

        body:not(.mobile-app) .login-card::before,
        body:not(.mobile-app) .login-card::after {
          content: "";
          position: absolute;
          inset: 0;
          pointer-events: none;
        }

        body:not(.mobile-app) .login-card::before {
          background:
            linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(20, 184, 166, 0.04) 1px, transparent 1px),
            linear-gradient(135deg, transparent 0 50%, rgba(14, 165, 233, 0.08) 50% 51%, transparent 51%);
          background-size: 32px 32px, 32px 32px, 100% 100%;
          opacity: 0.9;
        }

        body:not(.mobile-app) .login-card::after {
          background:
            linear-gradient(90deg, rgba(37, 99, 235, 0.42), transparent 1px),
            linear-gradient(155deg, transparent 0 58%, rgba(20, 184, 166, 0.12) 58% 59%, transparent 59%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 30%, rgba(37, 99, 235, 0.08) 100%);
          opacity: 0.76;
        }

        body:not(.mobile-app) .login-card > * {
          position: relative;
          z-index: 1;
          width: min(420px, 100%);
        }

        body:not(.mobile-app) .login-title {
          color: #0f172a;
          font-size: 28px;
          line-height: 1.2;
        }

        body:not(.mobile-app) .login-subtitle {
          margin: 8px 0 26px;
          color: #64748b;
          line-height: 1.7;
        }

        body:not(.mobile-app) .login-card .field {
          margin-bottom: 14px;
        }

        body:not(.mobile-app) .login-card .field label {
          color: #334155;
          font-weight: 800;
          letter-spacing: 0;
        }

        body:not(.mobile-app) .login-card input {
          min-height: 46px;
          border-color: rgba(37, 99, 235, 0.20);
          border-radius: 8px;
          color: #0f172a;
          background: rgba(248, 252, 255, 0.82);
          box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.9),
            inset 0 1px 2px rgba(15, 23, 42, 0.04);
        }

        body:not(.mobile-app) .login-card input::placeholder {
          color: #94a3b8;
        }

        body:not(.mobile-app) .login-card input:focus {
          border-color: rgba(37, 99, 235, 0.82);
          background: rgba(255, 255, 255, 0.96);
          box-shadow:
            0 0 0 3px rgba(37, 99, 235, 0.13),
            inset 0 1px 2px rgba(15, 23, 42, 0.03);
        }

        body:not(.mobile-app) .login-actions .btn {
          min-height: 46px;
          border-radius: 8px;
          font-weight: 900;
        }

        body:not(.mobile-app) .login-actions .btn-primary {
          color: #fff;
          background: linear-gradient(135deg, #2563eb, #0ea5e9 62%, #14b8a6);
          box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
        }

        body:not(.mobile-app) .login-actions .btn-primary:hover {
          background: linear-gradient(135deg, #1d4ed8, #0284c7 62%, #0f766e);
        }

        body:not(.mobile-app) .login-link-btn {
          color: #2563eb;
        }

        body:not(.mobile-app) .login-link-btn:hover {
          color: #1d4ed8;
        }

        body:not(.mobile-app) .login-card .status-text {
          color: #64748b;
        }

        body:not(.mobile-app) .login-card .status-text.success {
          color: #16a34a;
        }

        body:not(.mobile-app) .login-card .status-text.fail {
          color: #dc2626;
        }

        body:not(.mobile-app) .login-send-code-btn {
          min-height: 46px;
          border-color: rgba(37, 99, 235, 0.22);
          border-radius: 8px;
          color: #2563eb;
          background: rgba(219, 234, 254, 0.7);
        }

        body:not(.mobile-app) .login-send-code-btn:hover {
          border-color: rgba(37, 99, 235, 0.38);
          background: rgba(219, 234, 254, 0.82);
        }

        body:not(.mobile-app) .password-visibility-btn {
          color: #64748b;
        }

        body:not(.mobile-app) .password-visibility-btn:hover,
        body:not(.mobile-app) .password-visibility-btn.is-visible {
          color: #2563eb;
          background: rgba(37, 99, 235, 0.08);
        }

        body:not(.mobile-app) .login-guest-row {
          margin: -2px 0 15px;
        }

        body:not(.mobile-app) .login-guest-btn {
          min-height: 28px;
          padding: 2px 6px;
          border: 0;
          border-radius: 6px;
          color: #64748b;
          background: transparent;
          font-size: 12px;
          font-weight: 600;
          line-height: 1.4;
          letter-spacing: 0;
          cursor: pointer;
          transition: color 0.15s ease, background 0.15s ease;
        }

        body:not(.mobile-app) .login-guest-btn:hover {
          color: #2563eb;
          background: rgba(37, 99, 235, 0.06);
        }

        html.light-theme body:not(.mobile-app) .login-guest-btn {
          color: #64748b;
          background: transparent;
        }

        html.light-theme body:not(.mobile-app) .login-guest-btn:hover {
          color: #2563eb;
          background: rgba(37, 99, 235, 0.06);
        }

        @keyframes loginScan {
          0% {
            transform: translateX(-52%);
            opacity: 0;
          }
          22%,
          62% {
            opacity: 1;
          }
          100% {
            transform: translateX(232%);
            opacity: 0;
          }
        }

        @keyframes loginTraceSweep {
          0%,
          18% {
            transform: translateY(-72%);
            opacity: 0;
          }
          34%,
          70% {
            opacity: 1;
          }
          100% {
            transform: translateY(72%);
            opacity: 0;
          }
        }

        @keyframes loginFlowDrift {
          0% {
            background-position: -240px 0;
          }
          100% {
            background-position: 240px 0;
          }
        }

        @keyframes loginNodePulse {
          0%,
          100% {
            transform: scale(1);
            box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.08);
          }
          50% {
            transform: scale(1.12);
            box-shadow: 0 0 0 14px rgba(45, 212, 191, 0.02);
          }
        }

        @keyframes loginPanelFloat {
          0%,
          100% {
            transform: translate3d(0, 0, 0);
          }
          50% {
            transform: translate3d(0, -8px, 0);
          }
        }

        @keyframes loginMeter {
          0%,
          100% {
            height: 18px;
            opacity: 0.52;
          }
          50% {
            height: 54px;
            opacity: 1;
          }
        }

        @media (prefers-reduced-motion: reduce) {
          body:not(.mobile-app) .login-screen::after,
          body:not(.mobile-app) .login-intro::after,
          body:not(.mobile-app) .login-brand-dot,
          body:not(.mobile-app) .login-data-plane::before,
          body:not(.mobile-app) .login-flow-line,
          body:not(.mobile-app) .login-flow-node,
          body:not(.mobile-app) .login-trace-panel,
          body:not(.mobile-app) .login-code-panel,
          body:not(.mobile-app) .login-pulse-meter span {
            animation: none;
          }
        }

        body:not(.mobile-app) {
          height: 100%;
          overflow: hidden;
        }

        body:not(.mobile-app) .shell {
          max-width: none;
          width: 100%;
          height: 100vh;
          min-height: 100vh;
          padding: 8px;
          overflow: hidden;
        }

        body:not(.mobile-app) .layout {
          grid-template-columns: 130px 380px minmax(0, 1fr);
          gap: 8px;
          height: 100%;
          min-height: 0;
        }

        body:not(.mobile-app) .desktop-sidebar {
          display: flex;
          grid-column: 1;
          grid-row: 1;
          height: 100%;
          overflow: auto;
        }

        body:not(.mobile-app) .left-stack {
          grid-column: 2;
          grid-row: 1;
        }

        body:not(.mobile-app) .right-stack {
          grid-column: 3;
          grid-row: 1;
        }

        body:not(.mobile-app).desktop-view-config .test-config-page,
        body:not(.mobile-app).desktop-view-wss .wss-page,
        body:not(.mobile-app).desktop-view-schedule .desktop-schedule-page,
        body:not(.mobile-app).desktop-view-cloud .cloud-drive-page,
        body:not(.mobile-app).desktop-view-profile .profile-page {
          display: flex;
          grid-column: 2 / 4;
          grid-row: 1;
          height: 100%;
        }

        body:not(.mobile-app).desktop-view-profile .profile-page > .panel {
          width: 100%;
        }

        body:not(.mobile-app).desktop-view-profile .profile-page > .panel > .panel-body {
          height: 100%;
          overflow: auto;
        }

        body:not(.mobile-app).desktop-view-profile .profile-card {
          min-height: 100%;
          border: 1px solid var(--line);
          border-radius: 8px;
          background: rgba(15, 23, 42, 0.42);
          box-shadow: none;
        }

        html.light-theme body:not(.mobile-app).desktop-view-profile .profile-card {
          border-color: rgba(100, 116, 139, 0.16);
          background: rgba(255, 255, 255, 0.92);
        }

        /* ===== PC 端个人中心：左上双栏布局 ===== */
        body:not(.mobile-app).desktop-view-profile .profile-main-content {
          display: grid;
          grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
          align-content: start;
          gap: 16px 24px;
          width: 100%;
          max-width: 1080px;
          margin: 0;
          padding: 32px;
        }
        /* PC 顶部标题 + 说明，跨两列 */
        body:not(.mobile-app).desktop-view-profile .profile-pc-header {
          grid-column: 1 / -1;
          margin-bottom: 4px;
        }
        body:not(.mobile-app).desktop-view-profile .profile-pc-title {
          margin: 0 0 6px;
          font-size: 22px;
          font-weight: 700;
          color: var(--text);
        }
        body:not(.mobile-app).desktop-view-profile .profile-pc-subtitle {
          margin: 0;
          font-size: 13px;
          color: var(--muted);
        }
        /* 左右两列：各自独立竖向堆叠，互不耦合行高 */
        body:not(.mobile-app).desktop-view-profile .profile-pc-col {
          display: flex;
          flex-direction: column;
          gap: 16px;
          min-width: 0;
        }
        body:not(.mobile-app).desktop-view-profile .profile-pc-col--left { grid-column: 1; }
        body:not(.mobile-app).desktop-view-profile .profile-pc-col--right { grid-column: 2; }
        /* 旧大卡头部已从 HTML 移除，保险隐藏 */
        body:not(.mobile-app).desktop-view-profile .profile-main-content > .profile-head {
          display: none;
        }
        /* 主内容 / 账号安全子页切换（覆盖上面 display:flex，尊重 open 状态）*/
        body:not(.mobile-app).desktop-view-profile .profile-card.account-security-open .profile-main-content {
          display: none;
        }
        body:not(.mobile-app).desktop-view-profile .profile-card:not(.account-security-open) .profile-subpage {
          display: none;
        }

        /* 分组卡片 */
        body:not(.mobile-app).desktop-view-profile .profile-rows {
          display: flex;
          flex-direction: column;
          gap: 0;
          margin: 0;
          padding: 0;
          border: 1px solid var(--line);
          border-radius: 14px;
          background: var(--panel);
          overflow: hidden;
        }

        /* 行 */
        body:not(.mobile-app).desktop-view-profile .profile-row,
        body:not(.mobile-app).desktop-view-profile .profile-row-btn {
          width: 100%;
          min-height: 54px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 12px;
          padding: 12px 16px;
          border: 0;
          border-bottom: 1px solid var(--line);
          border-radius: 0;
          background: transparent;
        }
        body:not(.mobile-app).desktop-view-profile .profile-row-btn {
          cursor: pointer;
          text-align: left;
        }
        body:not(.mobile-app).desktop-view-profile .profile-rows > .profile-row:last-child,
        body:not(.mobile-app).desktop-view-profile .profile-rows > .profile-row-btn:last-child {
          border-bottom: 0;
        }

        /* label 主角 / value 配角 */
        body:not(.mobile-app).desktop-view-profile .profile-label {
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
        }
        body:not(.mobile-app).desktop-view-profile .profile-value,
        body:not(.mobile-app).desktop-view-profile .profile-nickname-text {
          max-width: 360px;
          font-size: 14px;
          font-weight: 400;
          color: var(--muted);
        }

        /* 头像行 */
        body:not(.mobile-app).desktop-view-profile .profile-avatar-row .profile-avatar {
          width: 40px;
          min-width: 40px;
          height: 40px;
          min-height: 40px;
          border-radius: 50%;
        }
        body:not(.mobile-app).desktop-view-profile .profile-avatar-chevron {
          display: none;
        }

        /* 统一 chevron */
        body:not(.mobile-app).desktop-view-profile .profile-chevron {
          flex: 0 0 auto;
          display: inline-flex;
          align-items: center;
          color: var(--muted);
          opacity: 0.5;
        }
        body:not(.mobile-app).desktop-view-profile .profile-chevron svg {
          width: 18px;
          height: 18px;
        }
        body:not(.mobile-app).desktop-view-profile .profile-enter-btn {
          width: auto;
          min-width: 0;
          height: auto;
          min-height: 0;
          padding: 0;
          border: 0;
          border-radius: 0;
          background: transparent;
          display: inline-flex;
          align-items: center;
        }

        /* 下拉框统一 */
        body:not(.mobile-app).desktop-view-profile .profile-setting-select {
          width: 120px;
          min-width: 120px;
          max-width: 120px;
          height: 34px;
          min-height: 34px;
          border: 1px solid var(--line-strong);
          border-radius: 8px;
          background: var(--field);
          color: var(--muted);
          font-size: 13px;
          font-weight: 400;
          padding: 0 8px;
        }

        /* 断言配置卡片 */
        body:not(.mobile-app).desktop-view-profile .profile-section {
          margin: 0;
          padding: 0;
          border: 1px solid var(--line);
          border-radius: 14px;
          background: var(--panel);
          overflow: hidden;
        }
        body:not(.mobile-app).desktop-view-profile .profile-section-title {
          font-size: 13px;
          font-weight: 600;
          color: var(--text);
          padding: 12px 16px 0;
          margin: 0;
          opacity: 0.75;
        }
        body:not(.mobile-app).desktop-view-profile .profile-section-hint {
          font-size: 12px;
          color: var(--muted);
          line-height: 1.5;
          padding: 4px 16px 10px;
          margin: 0;
          opacity: 0.75;
        }
        body:not(.mobile-app).desktop-view-profile .assertion-package-actions {
          display: flex;
          flex-direction: column;
          gap: 0;
        }
        body:not(.mobile-app).desktop-view-profile .assertion-package-btn {
          width: 100%;
          min-height: 52px;
          border: 0;
          border-top: 1px solid var(--line);
          border-radius: 0;
          background: transparent;
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
          display: flex;
          align-items: center;
          justify-content: flex-start;
          gap: 12px;
          padding: 12px 16px;
        }

        /* 语义图标 */
        body:not(.mobile-app).desktop-view-profile .profile-action-icon {
          flex: 0 0 32px;
          width: 32px;
          height: 32px;
          border-radius: 8px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
        body:not(.mobile-app).desktop-view-profile .profile-action-icon svg {
          width: 18px;
          height: 18px;
        }
        body:not(.mobile-app).desktop-view-profile .profile-action-icon--blue { background: var(--task-api-bg); color: var(--task-api-fg); }
        body:not(.mobile-app).desktop-view-profile .profile-action-icon--teal { background: var(--task-wss-bg); color: var(--task-wss-fg); }
        body:not(.mobile-app).desktop-view-profile .profile-action-icon--orange { background: rgba(234,88,12,0.10); color: #ea580c; }
        body:not(.mobile-app).desktop-view-profile .profile-action-icon--red { background: rgba(239,68,68,0.10); color: var(--danger); }
        body:not(.mobile-app).desktop-view-profile .profile-action-label {
          flex: 1;
          text-align: left;
        }

        /* 底部操作：竖向独立卡片 */
        body:not(.mobile-app).desktop-view-profile .profile-bottom-actions {
          display: flex;
          flex-direction: column;
          gap: 10px;
          margin: 0;
          padding: 0;
          border: 0;
          background: transparent;
        }
        body:not(.mobile-app).desktop-view-profile .profile-bottom-btn {
          width: 100%;
          height: 52px;
          border-radius: 14px;
          border: 1px solid var(--line);
          background: var(--panel);
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
          display: flex;
          align-items: center;
          justify-content: flex-start;
          gap: 12px;
          padding: 0 16px;
        }
        body:not(.mobile-app).desktop-view-profile .danger-btn.profile-bottom-btn {
          justify-content: center;
          padding: 0;
          color: var(--danger);
        }

        /* 账号安全行：主标题 + 副标题竖排，chevron 居右 */
        body:not(.mobile-app).desktop-view-profile .profile-row-btn .profile-row-main {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          min-width: 0;
        }
        body:not(.mobile-app).desktop-view-profile .profile-row-subtitle {
          font-size: 12px;
          font-weight: 400;
          color: var(--muted);
          line-height: 1.4;
        }

        /* 清除调试数据：图标 + 主标题 + 浅灰说明（仿注销账号） */
        body:not(.mobile-app).desktop-view-profile .profile-bottom-btn--warn {
          height: auto;
          min-height: 56px;
          align-items: center;
          padding: 10px 16px;
        }
        body:not(.mobile-app).desktop-view-profile .profile-bottom-btn--warn .profile-action-text {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          min-width: 0;
        }
        body:not(.mobile-app).desktop-view-profile .profile-bottom-btn--warn .profile-action-label {
          flex: none;
          font-size: 15px;
        }
        body:not(.mobile-app).desktop-view-profile .profile-bottom-btn--warn .profile-action-hint {
          font-size: 12px;
          font-weight: 400;
          color: var(--muted);
          text-align: left;
          line-height: 1.4;
        }

        /* ===== 账号安全二级页（PC 左上单列）===== */
        body:not(.mobile-app).desktop-view-profile .profile-subpage {
          width: 100%;
          max-width: 640px;
          margin: 0;
          padding: 24px 32px 40px;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-topbar {
          display: flex;
          align-items: center;
          gap: 2px;
          height: 52px;
          margin-bottom: 8px;
          padding: 0;
          background: transparent;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-back-btn {
          width: 40px;
          height: 40px;
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          border: 0;
          background: transparent;
          color: var(--text);
          cursor: pointer;
          padding: 0;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-back-btn svg { width: 22px; height: 22px; }
        body:not(.mobile-app).desktop-view-profile .account-security-title {
          font-size: 18px;
          font-weight: 600;
          color: var(--text);
        }
        body:not(.mobile-app).desktop-view-profile .account-security-actions {
          display: flex;
          flex-direction: column;
          gap: 0;
          padding: 0;
          border: 1px solid var(--line);
          border-radius: 14px;
          background: var(--panel);
          overflow: hidden;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-mode-btn {
          width: 100%;
          min-height: 58px;
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 12px 16px;
          border: 0;
          border-bottom: 1px solid var(--line);
          background: transparent;
          cursor: pointer;
          text-align: left;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-actions .account-security-mode-btn:last-child { border-bottom: 0; }
        body:not(.mobile-app).desktop-view-profile .account-security-mode-btn:disabled { opacity: 0.5; cursor: default; }
        body:not(.mobile-app).desktop-view-profile .account-security-actions .account-security-row-main {
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 8px;
          min-width: 0;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-row-label { font-size: 15px; font-weight: 400; color: var(--text); }
        body:not(.mobile-app).desktop-view-profile .account-security-row-hint {
          font-size: 14px;
          font-weight: 400;
          color: var(--muted);
          text-align: right;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-mode-btn .profile-chevron { opacity: 0.5; }

        /* 危险组：注销账号单独卡 */
        body:not(.mobile-app).desktop-view-profile .account-security-danger-group { margin-top: 12px; }
        body:not(.mobile-app).desktop-view-profile .account-security-delete-btn { align-items: center; border-bottom: 0; }
        body:not(.mobile-app).desktop-view-profile .account-security-delete-btn .account-security-row-main {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          min-width: 0;
        }
        body:not(.mobile-app).desktop-view-profile .account-security-row-label--danger { font-size: 15px; font-weight: 500; color: var(--danger); }
        body:not(.mobile-app).desktop-view-profile .account-security-delete-btn .account-security-row-hint {
          font-size: 12px;
          font-weight: 400;
          color: var(--muted);
          text-align: left;
          white-space: normal;
          line-height: 1.4;
        }

        body:not(.mobile-app):not(.desktop-view-workbench) .left-stack,
        body:not(.mobile-app):not(.desktop-view-workbench) .right-stack {
          display: none;
        }

        body:not(.mobile-app) .panel {
          border-radius: 8px;
          box-shadow: none;
        }

        body:not(.mobile-app) .panel-body {
          padding: 14px;
        }

        body:not(.mobile-app) .left-stack,
        body:not(.mobile-app) .right-stack {
          gap: 8px;
          height: 100%;
        }

        body:not(.mobile-app) .right-stack {
          gap: 0;
        }

        body:not(.mobile-app) .right-stack > .panel.request-detail-panel:first-child {
          flex-basis: clamp(340px, 38vh, 500px);
        }

        body:not(.mobile-app) .right-resize-handle {
          flex-basis: 14px;
        }
      }

      @media (min-width: 1261px) {
        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child {
          flex: 1 1 0;
          min-height: 0;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .panel-body {
          flex: 1 1 0;
          min-height: 0;
          overflow: hidden;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .params-editor-field,
        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .parameter-panel {
          flex: 1 1 0;
          min-height: 0;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .params-editor-field {
          display: flex;
          flex-direction: column;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .params-editor-field.is-hidden {
          display: none;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child #paramsEditor {
          flex: 1 1 0;
          width: 100%;
          height: auto;
          min-height: 0;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .parameter-panel.is-active {
          display: flex;
          flex-direction: column;
          overflow: hidden;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .parameter-body {
          flex: 1 1 0;
          min-height: 0;
          overflow: hidden;
        }

        body:not(.mobile-app).desktop-view-workbench .left-stack > .panel:last-child .parameter-list {
          flex: 1 1 0;
          min-height: 0;
          overflow: auto;
        }
      }

      .desktop-viewer-tabs {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        flex-wrap: wrap;
      }

      @media (min-width: 769px) and (max-width: 1180px) {
        body:not(.mobile-app) .login-layout {
          display: flex;
          justify-content: center;
          max-width: none;
          border: 0;
        }

        body:not(.mobile-app) .login-intro {
          display: none;
        }

        body:not(.mobile-app) .login-card {
          width: min(460px, 100%);
          min-height: 100%;
          padding: 72px 34px 44px;
          border-left: 0;
          background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 255, 0.74)),
            linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.04) 44%, transparent 78%);
        }
      }

      @media (min-width: 769px) and (max-width: 1260px) {
        body:not(.mobile-app) {
          height: auto;
          min-height: 100%;
          overflow: auto;
        }

        body:not(.mobile-app) .shell {
          height: auto;
          min-height: 100vh;
          overflow: visible;
          padding: 10px;
        }

        .layout {
          grid-template-columns: 1fr;
          min-height: auto;
        }

        body:not(.mobile-app) .layout {
          grid-template-columns: 148px minmax(0, 1fr);
          height: auto;
        }

        body:not(.mobile-app) .desktop-sidebar {
          grid-column: 1;
          grid-row: 1 / span 2;
          height: auto;
          align-self: start;
          position: sticky;
          top: 10px;
        }

        body:not(.mobile-app) .left-stack,
        body:not(.mobile-app) .right-stack,
        body:not(.mobile-app).desktop-view-config .test-config-page,
        body:not(.mobile-app).desktop-view-wss .wss-page,
        body:not(.mobile-app).desktop-view-schedule .desktop-schedule-page,
        body:not(.mobile-app).desktop-view-cloud .cloud-drive-page,
        body:not(.mobile-app).desktop-view-profile .profile-page {
          grid-column: 2;
        }

        body:not(.mobile-app) .left-stack {
          grid-row: 1;
        }

        body:not(.mobile-app) .right-stack {
          grid-row: 2;
        }

        body:not(.mobile-app).desktop-view-config .test-config-page,
        body:not(.mobile-app).desktop-view-wss .wss-page,
        body:not(.mobile-app).desktop-view-schedule .desktop-schedule-page,
        body:not(.mobile-app).desktop-view-cloud .cloud-drive-page,
        body:not(.mobile-app).desktop-view-profile .profile-page {
          grid-row: 1;
          min-height: calc(100vh - 20px);
        }

        .test-config-grid {
          grid-template-columns: 1fr;
        }

        .test-task-layout,
        .test-task-config-grid,
        .test-task-fields {
          grid-template-columns: 1fr;
        }

        .test-task-name-field,
        .test-task-env-field {
          grid-column: 1 / -1;
        }

        .test-task-layout {
          height: calc(100vh - 84px);
        }

        .test-task-editor {
          grid-template-rows: minmax(0, 1fr);
        }

        .test-task-editor-content {
          top: 24px;
          width: calc(100vw - 24px);
          height: calc(100vh - 48px);
        }

        .test-task-saved-section .test-task-list {
          grid-template-columns: repeat(5, minmax(0, 1fr));
        }

        .test-task-config-grid {
          grid-template-rows: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr);
        }

        .test-task-api-options,
        .test-task-selected-list,
        .test-task-parameter-pane,
        .test-task-assertion-pane {
          max-height: none;
        }

        .request-detail-shell,
        .response-shell {
          grid-template-columns: 1fr;
        }

        .left-stack,
        .right-stack {
          height: auto;
        }

        .right-resize-handle {
          justify-content: center;
        }

        .right-resize-handle::before {
          position: static;
          left: auto;
          transform: none;
        }
      }

/* styles.mobile.css */
/* 移动端布局样式：仅维护移动 App / 小屏 Tab 布局。 */
/* 移动端禁用非输入框的文字选择，消除选择手柄白色方块 */
      .mobile-app * {
        user-select: none;
        -webkit-user-select: none;
      }

      .mobile-app input,
      .mobile-app textarea {
        user-select: text;
        -webkit-user-select: text;
      }

      /* 移动端底部 tab（非激活态文字） */
      html.light-theme .mobile-tab,
      html.light-theme .test-task-mobile-tab,
      html.light-theme .wss-mobile-tab {
        color: #64748b;
      }

      html.light-theme .mobile-tab.active,
      html.light-theme .test-task-mobile-tab.active,
      html.light-theme .wss-mobile-tab.active {
        color: #f0fdf4;
        background: #0f766e;
      }

      /* 右上角个人中心按钮 */
      html.light-theme .mobile-profile-btn {
        color: #1d4ed8;
        background: rgba(37, 99, 235, 0.1);
        border-color: rgba(37, 99, 235, 0.22);
      }

      html.light-theme .mobile-profile-btn.active {
        color: #f0fdf4;
        background: #0f766e;
        border-color: rgba(20, 184, 166, 0.5);
      }

      html.light-theme .mobile-app .params-expand-btn {
        color: #475569;
        background: rgba(241, 245, 249, 0.92);
        border-color: rgba(100, 116, 139, 0.22);
      }

      .profile-back-symbol,
      .mobile-back-symbol {
        font-size: 18px;
        font-weight: 800;
        line-height: 1;
      }

      .mobile-panel-copy-btn {
        display: none;
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        min-height: 26px;
        border-radius: 8px;
      }

      .mobile-top-bar,
      .mobile-tabbar,
      .test-task-mobile-tabbar,
      .wss-mobile-tabbar,
      .schedule-m-tabbar {
        display: none;
      }

      @media (max-width: 768px) {
        select,
        select option,
        select optgroup {
          color: #ffffff !important;
          background-color: #0f172a !important;
          -webkit-text-fill-color: #ffffff !important;
        }

        html.light-theme select,
        html.light-theme select option,
        html.light-theme select optgroup {
          color: #1e293b !important;
          background-color: #f8fafc !important;
          -webkit-text-fill-color: #1e293b !important;
          color-scheme: light !important;
        }
      }

      .mobile-app .parameter-expand-btn {
        display: inline-flex;
        position: absolute;
        bottom: 4px;
        right: 4px;
        width: 22px;
        height: 22px;
        min-height: unset;
        border-radius: 5px;
        border: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(15, 23, 42, 0.55);
        color: var(--muted);
        align-items: center;
        justify-content: center;
        font-size: 11px;
        cursor: pointer;
        padding: 0;
        line-height: 1;
      }

      .mobile-app .params-expand-btn {
        display: inline-flex;
        position: absolute;
        right: 8px;
        bottom: 8px;
        z-index: 2;
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
        padding: 0;
        margin: 0;
        border-radius: 5px;
        border: 1px solid rgba(148, 163, 184, 0.28);
        background: rgba(15, 23, 42, 0.55);
        color: var(--muted);
        font-size: 13px;
        line-height: 1;
        align-items: center;
        justify-content: center;
        cursor: pointer;
      }

      .mobile-app .params-editor-field textarea {
        padding-bottom: 34px;
      }

      .mobile-app .parameter-row textarea {
        resize: none;
      }

      html.light-theme .mobile-app .parameter-expand-btn {
        background: rgba(241, 245, 249, 0.92);
        border-color: rgba(100, 116, 139, 0.35);
        color: #475569;
      }

      .mobile-function-select {
        display: none;
      }

      .mobile-response-tabs,
      .mobile-response-detail {
        display: none;
      }

      .viewer-head .mobile-viewer-title {
        display: none !important;
      }

      .mobile-app .json-key.has-doc {
        cursor: pointer;
        touch-action: manipulation;
      }

      .mobile-app .json-key.has-doc.field-doc-pressed {
        color: #bfdbfe;
        background: rgba(59, 130, 246, 0.18);
      }

      .response-shell > .mobile-response-detail {
        display: none;
      }

      .mobile-response-detail {
        position: relative;
      }

      .mobile-app .header-row[data-copy-header-value] {
        cursor: pointer;
        touch-action: manipulation;
      }

      .mobile-app .header-row[data-copy-header-value] .header-value {
        cursor: pointer;
        text-decoration-line: underline;
        text-decoration-style: dotted;
        text-decoration-color: rgba(147, 197, 253, 0.8);
        text-underline-offset: 3px;
        text-decoration-thickness: 1px;
      }

      html.light-theme .mobile-app .header-row[data-copy-header-value] .header-value {
        text-decoration-color: rgba(37, 99, 235, 0.65);
      }

      .mobile-app .header-row.header-row-pressed {
        border-color: rgba(96, 165, 250, 0.36);
        background: rgba(59, 130, 246, 0.16);
      }

      @media (max-width: 768px) {
        html,
        body {
          height: 100%;
          overflow: hidden;
        }

        body {
          --mobile-tabbar-height: 64px;
          --mobile-business-chrome-height: 50px;
          --mobile-primary-nav-height: 52px;
          --mobile-top-total-height: calc(var(--mobile-business-chrome-height) + var(--mobile-primary-nav-height));
          --mobile-chrome-bg: rgba(8, 17, 31, 0.94);
          --mobile-chrome-border: rgba(148, 163, 184, 0.12);
          --mobile-chrome-blur: blur(16px);
          --mobile-chrome-shadow-down: 0 10px 28px rgba(2, 6, 23, 0.2);
          --mobile-chrome-shadow-up: 0 -10px 28px rgba(2, 6, 23, 0.28);
          max-width: none;
          box-sizing: border-box;
          padding: 50px 0 0;
          background: #08111f;
        }

        html:not(.light-theme),
        html:not(.light-theme) body {
          --bg: #0e1422;
          --mobile-page-bg: #0e1422;
          --mobile-chrome-bg: #08111f;
          background: #0e1422;
        }

        html.light-theme body {
          --mobile-chrome-bg: rgba(248, 250, 252, 0.92);
          --mobile-chrome-border: rgba(100, 116, 139, 0.16);
          --mobile-chrome-shadow-down: 0 10px 26px rgba(15, 23, 42, 0.08);
          --mobile-chrome-shadow-up: 0 -10px 26px rgba(15, 23, 42, 0.12);
          background: var(--mobile-page-bg);
        }

        body.is-logged-out {
          height: 100%;
          min-height: 100%;
          padding: 0;
          overflow: hidden;
          background: var(--bg);
        }

        html.light-theme body.is-logged-out {
          background: #fff;
        }

        body.is-logged-out .login-screen {
          display: flex;
        }

        body.is-logged-out .mobile-top-bar,
        body.is-logged-out .shell,
        body.is-logged-out .mobile-tabbar {
          display: none !important;
        }

        body.is-booting {
          height: 100%;
          min-height: 100%;
          padding: 0;
          overflow: hidden;
        }

        body.is-booting .login-screen,
        body.is-booting .mobile-top-bar,
        body.is-booting .shell,
        body.is-booting .mobile-tabbar {
          display: none !important;
        }

        .app-auth-config {
          display: none !important;
        }

        .login-screen {
          position: fixed;
          inset: 0;
          min-height: 100svh;
          width: 100vw;
          align-items: center;
          justify-content: center;
          padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
          color: #0f172a;
          background:
            linear-gradient(rgba(100, 116, 139, 0.045) 1px, transparent 1px),
            linear-gradient(90deg, rgba(100, 116, 139, 0.035) 1px, transparent 1px),
            linear-gradient(145deg, rgba(14, 165, 233, 0.12) 0%, transparent 32%),
            linear-gradient(215deg, rgba(16, 185, 129, 0.08) 0%, transparent 28%),
            linear-gradient(180deg, #f9fbff 0%, #eef6ff 48%, #f8fafc 100%);
          background-size: 34px 34px, 34px 34px, 100% 100%, 100% 100%, 100% 100%;
          overflow-x: hidden;
          overflow-y: auto;
        }

        html.light-theme .login-screen {
          background:
            linear-gradient(rgba(100, 116, 139, 0.045) 1px, transparent 1px),
            linear-gradient(90deg, rgba(100, 116, 139, 0.035) 1px, transparent 1px),
            linear-gradient(145deg, rgba(14, 165, 233, 0.12) 0%, transparent 32%),
            linear-gradient(215deg, rgba(16, 185, 129, 0.08) 0%, transparent 28%),
            linear-gradient(180deg, #f9fbff 0%, #eef6ff 48%, #f8fafc 100%);
          background-size: 34px 34px, 34px 34px, 100% 100%, 100% 100%, 100% 100%;
        }

        .login-layout {
          position: relative;
          z-index: 0;
          display: flex;
          align-items: center;
          justify-content: center;
          width: min(430px, 100%);
          min-height: calc(100svh - max(44px, env(safe-area-inset-top)) - max(44px, env(safe-area-inset-bottom)));
          margin: 0 auto;
          isolation: isolate;
        }

        .login-intro {
          position: absolute;
          inset: -18px -18px;
          z-index: 0;
          display: block;
          color: #0f172a;
          pointer-events: none;
          overflow: hidden;
        }

        .login-brand-line {
          position: absolute;
          top: max(6px, env(safe-area-inset-top));
          left: 18px;
          z-index: 1;
          display: inline-flex;
          align-items: center;
          gap: 8px;
          color: rgba(15, 23, 42, 0.58);
          font-size: 11px;
          font-weight: 900;
        }

        .login-brand-dot {
          width: 7px;
          height: 7px;
          border-radius: 50%;
          background: #10b981;
          box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.1);
        }

        .login-brand-badge {
          padding: 2px 6px;
          border: 1px solid rgba(37, 99, 235, 0.16);
          border-radius: 999px;
          color: rgba(37, 99, 235, 0.66);
          background: rgba(255, 255, 255, 0.48);
          font-size: 9px;
        }

        .login-intro-kicker {
          position: absolute;
          top: 54px;
          left: 18px;
          margin: 0;
          color: rgba(37, 99, 235, 0.42);
          font-size: 10px;
          font-weight: 900;
          text-transform: uppercase;
        }

        .login-intro-title {
          display: none;
        }

        .login-intro-text {
          display: none;
        }

        .login-data-plane {
          position: absolute;
          top: 76px;
          left: 0;
          right: 0;
          height: min(42svh, 310px);
          min-height: 220px;
          border: 0;
          border-radius: 14px;
          background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(239, 246, 255, 0.06)),
            repeating-linear-gradient(0deg, rgba(37, 99, 235, 0.05) 0 1px, transparent 1px 24px),
            repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.04) 0 1px, transparent 1px 24px);
          opacity: 0.46;
          filter: saturate(0.92);
          box-shadow: none;
          overflow: hidden;
        }

        .login-data-plane::before {
          content: "";
          position: absolute;
          inset: 0;
          background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.1), transparent);
          transform: translateY(-70%);
          animation: loginTraceSweep 6s ease-in-out infinite;
        }

        .login-flow-line {
          position: absolute;
          height: 2px;
          border-radius: 999px;
          background: linear-gradient(90deg, transparent, #2563eb, #06b6d4, transparent);
          background-size: 180px 100%;
          opacity: 0.34;
          animation: loginFlowDrift 3.8s linear infinite;
        }

        .login-flow-line-a {
          top: 38%;
          left: 7%;
          width: 76%;
        }

        .login-flow-line-b {
          right: 8%;
          bottom: 27%;
          width: 54%;
          transform: rotate(-10deg);
          animation-delay: -1.4s;
        }

        .login-flow-node {
          position: absolute;
          width: 10px;
          height: 10px;
          border: 2px solid rgba(37, 99, 235, 0.38);
          border-radius: 50%;
          background: #fff;
          box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.05);
          animation: loginNodePulse 2.4s ease-in-out infinite;
        }

        .login-flow-node-a {
          top: 34%;
          left: 16%;
        }

        .login-flow-node-b {
          top: 51%;
          right: 22%;
          animation-delay: -0.8s;
        }

        .login-flow-node-c {
          right: 10%;
          bottom: 24%;
          animation-delay: -1.6s;
        }

        .login-trace-panel,
        .login-code-panel {
          position: absolute;
          border: 1px solid rgba(100, 116, 139, 0.16);
          border-radius: 8px;
          background: rgba(255, 255, 255, 0.58);
          box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
          backdrop-filter: blur(8px);
          opacity: 0.34;
        }

        .login-trace-panel {
          top: 13px;
          left: 13px;
          width: 57%;
          padding: 10px;
        }

        .login-trace-head,
        .login-trace-row {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
        }

        .login-trace-head {
          margin-bottom: 6px;
          color: #0f172a;
          font-size: 10px;
          font-weight: 900;
        }

        .login-trace-head strong {
          color: #16a34a;
          font-size: 9px;
        }

        .login-trace-row {
          padding: 5px 0;
          border-top: 1px solid rgba(100, 116, 139, 0.12);
          color: #64748b;
          font-family: "Cascadia Code", Consolas, monospace;
          font-size: 9px;
        }

        .login-trace-row strong {
          color: #2563eb;
          font-size: 9px;
        }

        .login-code-panel {
          right: 12px;
          bottom: 12px;
          display: grid;
          gap: 4px;
          width: 41%;
          padding: 10px;
          color: #0f766e;
          font-family: "Cascadia Code", Consolas, monospace;
          font-size: 9px;
          line-height: 1.35;
        }

        .login-pulse-meter {
          position: absolute;
          left: 18px;
          bottom: 16px;
          display: flex;
          align-items: flex-end;
          gap: 5px;
          height: 40px;
        }

        .login-pulse-meter span {
          width: 6px;
          height: 13px;
          border-radius: 999px;
          background: linear-gradient(180deg, rgba(37, 99, 235, 0.62), rgba(6, 182, 212, 0.42));
          animation: loginMeter 1.8s ease-in-out infinite;
        }

        .login-pulse-meter span:nth-child(2) {
          animation-delay: -0.25s;
        }

        .login-pulse-meter span:nth-child(3) {
          animation-delay: -0.55s;
        }

        .login-pulse-meter span:nth-child(4) {
          animation-delay: -0.85s;
        }

        .login-pulse-meter span:nth-child(5) {
          animation-delay: -1.1s;
        }

        .login-pulse-meter span:nth-child(6) {
          animation-delay: -1.35s;
        }

        .login-signal-list {
          position: absolute;
          left: 8px;
          right: 8px;
          bottom: max(8px, env(safe-area-inset-bottom));
          display: grid;
          grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: 1px;
          border: 1px solid rgba(100, 116, 139, 0.1);
          border-radius: 8px;
          background: rgba(100, 116, 139, 0.08);
          opacity: 0.4;
          overflow: hidden;
        }

        .login-signal-item {
          min-width: 0;
          padding: 10px 8px;
          background: rgba(255, 255, 255, 0.48);
        }

        .login-signal-item span {
          display: block;
          margin-bottom: 5px;
          color: #64748b;
          font-size: 9px;
          font-weight: 900;
          text-transform: uppercase;
        }

        .login-signal-item strong {
          display: block;
          color: #0f172a;
          font-size: 10px;
          font-weight: 900;
        }

        .login-card {
          position: relative;
          z-index: 2;
          width: min(360px, 100%);
          min-height: auto;
          display: flex;
          flex-direction: column;
          justify-content: flex-start;
          margin: auto 0;
          padding: 0 2px;
          border: 0;
          border-radius: 0;
          background: transparent;
          box-shadow: none;
          backdrop-filter: none;
          overflow: visible;
        }

        html.light-theme .login-card {
          background: transparent;
        }

        .login-card::before {
          content: none;
        }

        .login-card > * {
          position: relative;
          z-index: 1;
        }

        .login-title {
          color: #0f172a;
          font-size: 26px;
          line-height: 1.2;
          text-align: left;
          text-shadow: 0 1px 0 rgba(255, 255, 255, 0.86);
        }

        .login-subtitle {
          margin: 8px 0 26px;
          color: #475569;
          font-size: 13px;
          line-height: 1.55;
          text-align: left;
          text-shadow: 0 1px 0 rgba(255, 255, 255, 0.76);
        }

        .login-card .field {
          margin-bottom: 13px;
        }

        .login-card .field label {
          color: #1e293b;
          font-weight: 800;
          letter-spacing: 0;
          text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
        }

        .login-card input {
          min-height: 46px;
          border-color: rgba(37, 99, 235, 0.24);
          border-radius: 8px;
          color: #0f172a;
          background: rgba(255, 255, 255, 0.7);
          box-shadow:
            0 12px 30px rgba(15, 23, 42, 0.06),
            0 1px 0 rgba(255, 255, 255, 0.86),
            inset 0 1px 2px rgba(15, 23, 42, 0.04);
          backdrop-filter: blur(8px);
        }

        .login-card input::placeholder {
          color: #94a3b8;
        }

        .login-card input:focus {
          border-color: rgba(37, 99, 235, 0.82);
          background: rgba(255, 255, 255, 0.92);
          box-shadow:
            0 0 0 3px rgba(37, 99, 235, 0.13),
            0 14px 34px rgba(15, 23, 42, 0.08),
            inset 0 1px 2px rgba(15, 23, 42, 0.03);
        }

        .login-actions .btn {
          min-height: 46px;
          border-radius: 8px;
          font-weight: 900;
        }

        .login-actions .btn-primary {
          color: #fff;
          background: linear-gradient(135deg, #2563eb, #0ea5e9);
          box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
        }

        .login-actions .btn-primary:hover {
          background: linear-gradient(135deg, #1d4ed8, #0284c7);
        }

        .login-switch-row {
          margin: 12px 0 8px;
        }

        .login-link-btn {
          color: #2563eb;
          font-size: 12px;
        }

        .login-link-btn:hover {
          color: #1d4ed8;
        }

        .login-guest-row {
          display: none;
        }

        .login-guest-btn {
          min-height: 30px;
          padding: 2px 8px;
          border: 0;
          border-radius: 6px;
          color: #64748b;
          background: transparent;
          font-size: 12px;
          font-weight: 600;
          line-height: 1.4;
          letter-spacing: 0;
          cursor: pointer;
        }

        .login-guest-btn:hover {
          color: #2563eb;
          background: rgba(37, 99, 235, 0.06);
        }

        .login-card .status-text {
          color: #64748b;
        }

        .login-card .status-text.success {
          color: #16a34a;
        }

        .login-card .status-text.fail {
          color: #dc2626;
        }

        .login-send-code-btn {
          min-height: 46px;
          border-color: rgba(37, 99, 235, 0.22);
          border-radius: 8px;
          color: #2563eb;
          background: rgba(219, 234, 254, 0.7);
        }

        .login-send-code-btn:hover {
          border-color: rgba(37, 99, 235, 0.38);
          background: rgba(219, 234, 254, 0.82);
        }

        .password-visibility-btn {
          color: #64748b;
        }

        .password-visibility-btn:hover,
        .password-visibility-btn.is-visible {
          color: #2563eb;
          background: rgba(37, 99, 235, 0.08);
        }

        @keyframes loginTraceSweep {
          0%,
          18% {
            transform: translateY(-72%);
            opacity: 0;
          }
          34%,
          70% {
            opacity: 1;
          }
          100% {
            transform: translateY(72%);
            opacity: 0;
          }
        }

        @keyframes loginFlowDrift {
          0% {
            background-position: -180px 0;
          }
          100% {
            background-position: 180px 0;
          }
        }

        @keyframes loginNodePulse {
          0%,
          100% {
            transform: scale(1);
            box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08);
          }
          50% {
            transform: scale(1.12);
            box-shadow: 0 0 0 12px rgba(37, 99, 235, 0.02);
          }
        }

        @keyframes loginMeter {
          0%,
          100% {
            height: 13px;
            opacity: 0.52;
          }
          50% {
            height: 38px;
            opacity: 1;
          }
        }

        @media (prefers-reduced-motion: reduce) {
          .login-data-plane::before,
          .login-flow-line,
          .login-flow-node,
          .login-pulse-meter span {
            animation: none;
          }
        }

        @media (max-height: 700px) {
          .login-screen {
            align-items: flex-start;
          }

          .login-layout {
            min-height: calc(100svh - max(32px, env(safe-area-inset-top)) - max(32px, env(safe-area-inset-bottom)));
          }

          .login-intro-title {
            top: 54px;
            font-size: clamp(34px, 11vw, 46px);
          }

          .login-data-plane {
            top: 46px;
            height: 230px;
            opacity: 0.28;
          }

          .login-signal-list {
            display: none;
          }

          .login-card {
            margin-top: 34px;
            margin-bottom: 18px;
          }
        }

        button {
          min-height: 40px;
        }

        input,
        select,
        textarea {
          min-height: 40px;
          font-size: 14px;
        }

        .mobile-top-bar {
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          z-index: 60;
          display: flex;
          align-items: center;
          justify-content: space-between;
          height: 50px;
          padding: 8px 12px;
          background: var(--mobile-chrome-bg);
          border-bottom: 0;
          box-shadow: none;
          -webkit-backdrop-filter: var(--mobile-chrome-blur);
          backdrop-filter: var(--mobile-chrome-blur);
        }

        html.light-theme .mobile-top-bar {
          background: var(--mobile-chrome-bg);
          border-bottom-color: transparent;
        }

        html.light-theme .mobile-top-status {
          color: #475569;
        }

        html.light-theme .mobile-top-meta {
          color: #1e293b;
        }

        html.light-theme .mobile-top-separator {
          color: #94a3b8;
        }

        body.mobile-tab-profile .mobile-top-separator,
        body.mobile-tab-profile #mobileTopFunction {
          display: none;
        }

        body.mobile-tab-profile .mobile-tabbar {
          display: none !important;
        }

        body.mobile-tab-profile.account-security-page-open .mobile-profile-btn {
          display: none;
        }

        .toast-stack {
          top: 58px;
          left: 10px;
          right: 10px;
          width: auto;
        }

        .mobile-top-status {
          display: flex;
          align-items: center;
          gap: 6px;
          min-width: 0;
          color: #cbd5e1;
          font-size: 12px;
          white-space: nowrap;
          cursor: default;
          pointer-events: none;
          flex: 0 0 auto;
          max-width: calc(50% - 34px);
        }

        body.desktop-view-wss .mobile-top-status {
          cursor: pointer;
          pointer-events: auto;
        }

        body.desktop-view-config .mobile-top-status,
        body.desktop-view-schedule .mobile-top-status,
        body.desktop-view-cloud .mobile-top-status,
        body.desktop-view-profile .mobile-top-status,
        body.mobile-tab-profile .mobile-top-status {
          display: none;
        }

        /* 云盘是个人中心的二级页面：m-head 内置返回按钮，直接隐藏整个 mobile-top-bar
           注意同步去掉 body padding-top（默认给 fixed 顶部条带留的 56px），避免幽灵空白 */
        body.desktop-view-cloud .mobile-top-bar { display: none; }
        body.desktop-view-cloud { padding-top: 0; }

        /* 云盘 m-head 化为 m-appbar：[← 返回] [标题] [⇅ + 上传] */
        body.desktop-view-cloud .cloud-mobile-back {
          display: inline-flex;
        }

        /* 移动端传输按钮：按原型 .m-icon-btn 尺寸（32×32 + 17px svg），跟上传按钮齐平 */
        /* 移动端 transfer btn 跟 PC 一致 34×34（新原型 m-quota-row 内的 .quota-transfer）
           注意覆盖全局 button{min-height:40px}，否则会撑成长方形 */
        body.desktop-view-cloud #cloudTransferBtn {
          min-height: 34px;
        }

        /* 传输项操作按钮（重试/停止）：同款 min-height 覆盖，避免 22px 被撑到 40px */
        body.desktop-view-cloud .cloud-tr-btn {
          min-height: 22px;
        }
        .mobile-top-status-text {
          max-width: 104px;
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .mobile-top-meta {
          position: absolute;
          left: 50%;
          transform: translateX(-50%);
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 5px;
          min-width: 0;
          max-width: min(46vw, calc(100vw - 190px));
          color: #e2e8f0;
          font-size: 13px;
          font-weight: 700;
        }

        .mobile-top-meta span {
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .mobile-top-separator {
          flex: 0 0 auto;
          color: #475569;
          font-weight: 400;
        }

        .mobile-profile-btn {
          width: 36px;
          height: 36px;
          min-height: 36px;
          padding: 0;
          border-radius: 50%;
          color: #dbeafe;
          background: rgba(59, 130, 246, 0.14);
          border: 1px solid rgba(59, 130, 246, 0.2);
          display: inline-flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          margin-left: auto;
          flex: 0 0 36px;
        }

        .mobile-profile-btn.active {
          color: #f8fafc;
          background: #0f766e;
          border-color: rgba(20, 184, 166, 0.5);
        }

        .mobile-tabbar,
        .wss-mobile-tabbar,
        .schedule-m-tabbar {
          position: fixed;
          left: 0;
          right: 0;
          bottom: 0;
          z-index: 60;
          display: grid;
          grid-template-columns: repeat(5, 1fr);
          gap: 0;
          height: var(--mobile-tabbar-height);
          padding: 6px 8px;
          box-sizing: border-box;
          background: var(--mobile-chrome-bg);
          border-top: 1px solid var(--mobile-chrome-border);
          box-shadow: var(--mobile-chrome-shadow-up);
          -webkit-backdrop-filter: var(--mobile-chrome-blur);
          backdrop-filter: var(--mobile-chrome-blur);
        }
        /* 续 18：schedule tabbar 复用其他模块同款样式（5 列容器 + 玻璃背景），
           内 3 个 tab 用 grid-column 跨度居中（3 列内容 5 列容器） */
        .schedule-m-tabbar {
          grid-template-columns: repeat(3, 1fr);
        }

        .wss-mobile-tabbar,
        .test-task-mobile-tabbar {
          display: none;
        }

        .theme-floating-toggle {
          right: max(14px, env(safe-area-inset-right, 0px) + 14px);
          bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 14px);
          width: 48px;
          height: 48px;
          z-index: 75;
        }

        html.light-theme .mobile-tabbar,
        html.light-theme .wss-mobile-tabbar {
          background: var(--mobile-chrome-bg);
          border-top-color: var(--mobile-chrome-border);
        }

        body.desktop-view-workbench:not(.task-editor-open) .mobile-tabbar {
          display: grid;
        }

        body:not(.desktop-view-workbench) .mobile-tabbar,
        body.task-editor-open .mobile-tabbar {
          display: none !important;
        }

        body:not(.desktop-view-workbench) .theme-floating-toggle,
        body.task-editor-open .theme-floating-toggle {
          bottom: max(14px, env(safe-area-inset-bottom, 0px) + 14px);
        }

        body.task-editor-open {
          padding-top: 0;
          overflow: hidden;
        }

        body.task-editor-open .mobile-top-bar,
        body.task-editor-open .desktop-sidebar {
          display: none !important;
        }

        .batch-mobile-bar {
          position: fixed;
          left: 12px;
          right: 12px;
          bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 10px);
          z-index: 70;
          display: none;
          grid-template-columns: minmax(0, 1fr) auto;
          align-items: center;
          gap: 10px;
          padding: 10px 12px;
          border: 1px solid rgba(59, 130, 246, 0.32);
          border-radius: 12px;
          color: #e2e8f0;
          background: rgba(8, 17, 31, 0.96);
          box-shadow: 0 16px 36px rgba(2, 6, 23, 0.44);
          backdrop-filter: blur(14px);
        }

        body.batch-running .batch-mobile-bar {
          display: grid;
        }

        body.desktop-view-config.batch-running .batch-mobile-bar {
          display: none;
        }

        body.batch-running .aux-panel .batch-action {
          display: none;
        }

        .batch-mobile-info {
          min-width: 0;
          display: flex;
          flex-direction: column;
          gap: 2px;
        }

        .batch-mobile-status {
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          font-size: 12px;
          font-weight: 700;
        }

        .batch-mobile-progress {
          color: var(--muted);
          font-size: 11px;
          font-family: "Cascadia Code", Consolas, monospace;
        }

        .batch-mobile-actions {
          display: inline-flex;
          gap: 8px;
          flex-shrink: 0;
        }

        .batch-control-btn {
          min-height: 34px;
          padding: 0 12px;
          border: none;
          border-radius: 9px;
          color: #dbeafe;
          background: rgba(59, 130, 246, 0.22);
          font-size: 12px;
          font-weight: 700;
        }

        .batch-control-btn.stop {
          color: #fecaca;
          background: rgba(127, 29, 29, 0.72);
        }

        html.light-theme .batch-mobile-bar {
          color: #1e293b;
          background: rgba(248, 250, 252, 0.96);
          border-color: rgba(37, 99, 235, 0.28);
          box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
        }

        html.light-theme .batch-control-btn {
          color: #1d4ed8;
          background: rgba(37, 99, 235, 0.12);
        }

        html.light-theme .batch-control-btn.stop {
          color: #b91c1c;
          background: rgba(254, 226, 226, 0.92);
        }

        /* Z52 Phase 2：多 run 时启用 tray 列表，每条独立 progress + stop */
        .batch-mobile-bar.multi-run {
          grid-template-columns: minmax(0, 1fr);
        }

        .batch-mobile-bar.multi-run .batch-mobile-info,
        .batch-mobile-bar.multi-run .batch-mobile-actions {
          display: none;
        }

        .batch-mobile-tray {
          display: flex;
          flex-direction: column;
          gap: 8px;
          min-width: 0;
        }

        .batch-mobile-tray-head {
          font-size: 12px;
          font-weight: 700;
          color: #cbd5f5;
        }

        html.light-theme .batch-mobile-tray-head {
          color: #1e293b;
        }

        .batch-mobile-tray-list {
          display: flex;
          flex-direction: column;
          gap: 8px;
          max-height: 220px;
          overflow-y: auto;
        }

        .batch-tray-item {
          display: flex;
          flex-direction: column;
          gap: 4px;
          padding: 8px 10px;
          border-radius: 9px;
          background: rgba(15, 23, 42, 0.46);
        }

        html.light-theme .batch-tray-item {
          background: rgba(226, 232, 240, 0.7);
        }

        .batch-tray-item-row {
          display: grid;
          grid-template-columns: minmax(0, 1fr) auto auto;
          align-items: center;
          gap: 8px;
        }

        .batch-tray-item-name {
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          font-size: 12px;
          font-weight: 700;
        }

        .batch-tray-item-progress-text {
          font-size: 11px;
          color: var(--muted);
          font-family: "Cascadia Code", Consolas, monospace;
        }

        .batch-tray-item-stop {
          width: 26px;
          height: 26px;
          padding: 0;
          border: none;
          border-radius: 7px;
          color: #fecaca;
          background: rgba(127, 29, 29, 0.62);
          font-size: 13px;
          font-weight: 800;
          line-height: 1;
          cursor: pointer;
        }

        .batch-tray-item-stop[disabled] {
          opacity: 0.5;
          cursor: default;
        }

        html.light-theme .batch-tray-item-stop {
          color: #b91c1c;
          background: rgba(254, 226, 226, 0.92);
        }

        .batch-tray-item-track {
          width: 100%;
          height: 4px;
          border-radius: 2px;
          background: rgba(148, 163, 184, 0.2);
          overflow: hidden;
        }

        .batch-tray-item-track > div {
          height: 100%;
          background: linear-gradient(90deg, #60a5fa, #38bdf8);
          transition: width 0.18s ease-out;
        }

        .batch-tray-item.stopping .batch-tray-item-track > div {
          background: linear-gradient(90deg, #f97316, #ef4444);
        }

        .batch-tray-item-tag {
          font-size: 10px;
          padding: 1px 6px;
          border-radius: 4px;
          background: rgba(59, 130, 246, 0.22);
          color: #93c5fd;
          font-weight: 700;
          text-transform: uppercase;
        }

        .batch-tray-item-tag.wss {
          background: rgba(168, 85, 247, 0.24);
          color: #d8b4fe;
        }

        .batch-tray-item-tag.group {
          background: rgba(34, 197, 94, 0.22);
          color: #86efac;
        }

        html.light-theme .batch-tray-item-tag {
          background: rgba(37, 99, 235, 0.14);
          color: #1d4ed8;
        }

        html.light-theme .batch-tray-item-tag.wss {
          background: rgba(168, 85, 247, 0.16);
          color: #7e22ce;
        }

        html.light-theme .batch-tray-item-tag.group {
          background: rgba(34, 197, 94, 0.18);
          color: #15803d;
        }

        .mobile-tab,
        .test-task-mobile-tab,
        .wss-mobile-tab,
        .schedule-m-tab {
          height: 100%;
          min-height: 48px;
          padding: 5px 4px;
          border: none;
          border-radius: 8px;
          color: #64748b;
          background: transparent;
          display: inline-flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          gap: 3px;
          font-size: 11px;
          line-height: 1;
          cursor: pointer;
        }

        .mobile-tab::before,
        .test-task-mobile-tab::before,
        .wss-mobile-tab::before,
        .schedule-m-tab::before {
          display: block;
          min-height: 16px;
          font-size: 16px;
          line-height: 1;
          font-weight: 700;
        }

        .mobile-tab[data-mobile-tab="config"]::before {
          content: "⚙";
        }

        .mobile-tab[data-mobile-tab="docs"]::before {
          content: "▤";
        }

        .mobile-tab[data-mobile-tab="response"]::before {
          content: "{}";
          font-family: "Cascadia Code", Consolas, monospace;
          font-size: 13px;
        }

        .mobile-tab[data-mobile-tab="test"]::before {
          content: "✓";
        }

        .mobile-tab[data-mobile-tab="log"]::before {
          content: "≡";
        }

        .wss-mobile-tab[data-wss-mobile-tab="connect"]::before {
          content: "↯";
        }

        .wss-mobile-tab[data-wss-mobile-tab="visual"]::before {
          content: "▥";
        }

        .wss-mobile-tab[data-wss-mobile-tab="log"]::before {
          content: "≡";
        }

        .wss-mobile-tab[data-wss-mobile-tab="inspector"]::before {
          content: "{}";
          font-family: "Cascadia Code", Consolas, monospace;
          font-size: 13px;
        }

        .wss-mobile-tab[data-wss-mobile-tab="subscriptions"]::before {
          content: "✓";
        }

        .test-task-mobile-tab[data-test-task-mobile-tab="tasks"]::before {
          content: "▦";
        }

        .test-task-mobile-tab[data-test-task-mobile-tab="groups"]::before {
          content: "▥";
        }

        .test-task-mobile-tab[data-test-task-mobile-tab="overview"]::before {
          content: "◎";
        }

        .test-task-mobile-tab[data-test-task-mobile-tab="results"]::before {
          content: "✓";
        }

        /* 续 18：schedule 三个 tab 图标 */
        .schedule-m-tab[data-schedule-mobile-tab="overview"]::before {
          content: "◎";
        }
        .schedule-m-tab[data-schedule-mobile-tab="list"]::before {
          content: "≡";
        }
        .schedule-m-tab[data-schedule-mobile-tab="agenda"]::before {
          content: "▦";
        }

        .mobile-tab.active,
        .wss-mobile-tab.active,
        .test-task-mobile-tab.active,
        .schedule-m-tab.active {
          color: #f8fafc;
          background: #0f766e;
        }

        .shell {
          max-width: none;
          height: calc(100% - var(--mobile-tabbar-height));
          min-height: 0;
          padding: 0;
          box-sizing: border-box;
          overflow: hidden;
        }

        body.mobile-tab-profile .shell,
        body.desktop-view-profile .shell {
          height: 100%;
        }

        body:not(.desktop-view-workbench) .shell,
        body.task-editor-open .shell {
          height: 100%;
        }

        .layout {
          display: flex;
          flex-direction: column;
          gap: 0;
          height: 100%;
          min-height: 0;
          overflow: hidden;
        }

        .desktop-page {
          display: none;
        }

        .desktop-sidebar {
          display: flex;
          flex: 0 0 var(--mobile-primary-nav-height);
          height: var(--mobile-primary-nav-height);
          min-height: 0;
          padding: 8px 12px;
          border: 0;
          border-bottom: 1px solid var(--mobile-chrome-border);
          border-radius: 0;
          background: var(--mobile-chrome-bg);
          overflow-x: auto;
          overflow-y: hidden;
          -webkit-overflow-scrolling: touch;
        }

        .desktop-sidebar::-webkit-scrollbar {
          display: none;
        }

        .desktop-nav {
          flex-direction: row;
          gap: 8px;
          min-width: 0;
          height: 100%;
        }

        .desktop-nav-btn {
          justify-content: center;
          min-width: 0;
          flex: 1 1 0;
          min-height: 36px;
          gap: 5px;
          padding: 0 6px;
          font-size: 12px;
          white-space: nowrap;
          border-radius: 12px;
          touch-action: manipulation;
        }

        .desktop-nav-btn[data-desktop-view="profile"],
        .desktop-nav-btn[data-desktop-view="cloud"] {
          display: none;
        }

        .desktop-nav-btn[data-desktop-view="wss"] .desktop-nav-label,
        .desktop-nav-btn[data-desktop-view="config"] .desktop-nav-label,
        .desktop-nav-btn[data-desktop-view="schedule"] .desktop-nav-label {
          font-size: 0;
        }

        .desktop-nav-btn[data-desktop-view="wss"] .desktop-nav-label::after {
          content: "WSS";
          font-size: 12px;
        }

        .desktop-nav-btn[data-desktop-view="config"] .desktop-nav-label::after {
          content: "任务";
          font-size: 12px;
        }

        .desktop-nav-btn[data-desktop-view="schedule"] .desktop-nav-label::after {
          content: "定时";
          font-size: 12px;
        }

        .left-stack,
        .right-stack {
          display: none;
          height: 100%;
          min-height: 0;
          gap: 0;
          overflow: hidden;
        }

        .layout > .left-stack,
        .layout > .right-stack,
        .layout > .desktop-page,
        .layout > .profile-page {
          flex: 1 1 0;
          min-height: 0;
        }

        body.desktop-view-workbench.mobile-tab-config .left-stack,
        body.desktop-view-workbench.mobile-tab-docs .right-stack,
        body.desktop-view-workbench.mobile-tab-test .right-stack,
        body.desktop-view-workbench.mobile-tab-response .right-stack,
        body.desktop-view-workbench.mobile-tab-log .right-stack,
        body.desktop-view-workbench.mobile-tab-profile .profile-page {
          display: block;
        }

        body.desktop-view-config .test-config-page,
        body.desktop-view-wss .wss-page,
        body.desktop-view-schedule .desktop-schedule-page,
        body.desktop-view-cloud .cloud-drive-page,
        body.desktop-view-profile .profile-page {
          display: flex;
          height: 100%;
          min-height: 0;
          overflow: hidden;
        }

        body:not(.desktop-view-workbench) .layout {
          height: 100%;
        }

        body.desktop-view-config .test-config-page > .panel,
        body.desktop-view-schedule .desktop-schedule-page > .panel,
        body.desktop-view-cloud .cloud-drive-page > .panel,
        body.desktop-view-profile .profile-page > .panel {
          width: 100%;
          min-height: 0;
          margin: 0;
          border: 0;
          border-radius: 0;
          box-shadow: none;
        }

        body.desktop-view-config .desktop-page-body,
        body.desktop-view-schedule .desktop-page-body,
        body.desktop-view-cloud .desktop-page-body {
          height: 100%;
          padding: 12px;
          overflow: auto;
          -webkit-overflow-scrolling: touch;
        }

        body.desktop-view-config .desktop-page-head,
        body.desktop-view-schedule .desktop-page-head {
          display: none;
        }

        body.desktop-view-schedule .desktop-page-body,
        body.desktop-view-cloud .desktop-page-body,
        body.desktop-view-profile .profile-page > .panel > .panel-body {
          padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
        }

        /* ===== 移动端云盘：对齐原型 §11 移动端简化形态 =====
           隐藏 PC 端的副标题 / 新建文件夹按钮 / 搜索 / 筛选 chips / 排序 / 视图切换 / 面包屑
           / tile 上的 ⋯ 菜单 / tile 大小副文本，只保留 m-head + m-quota + 3 列 grid */

        /* m-head: [← 返回] [标题居中] — 选择器之前用 :first-child 会选到 button，改成
           > div 选标题容器；加 text-align center 让"个人云盘"居中；justify-content 改 flex-start
           避免 space-between 把标题推到右侧 */
        body.desktop-view-cloud .cloud-drive-head {
          flex-direction: row;
          align-items: center;
          justify-content: flex-start;
          gap: 10px;
          margin-bottom: 10px;
        }

        body.desktop-view-cloud .cloud-drive-head > div {
          flex: 1 1 auto;
          min-width: 0;
          text-align: center;
        }

        body.desktop-view-cloud .desktop-page-title {
          font-size: 16px;
          font-weight: 700;
        }

        /* 新建文件夹按钮：移动端原型没有，cloud-start 内仅显示"上传" */
        body.desktop-view-cloud #cloudNewFolderBtn {
          display: none;
        }

        /* 移动端按钮文字精简：上传文件 → 上传，且去掉左侧 svg（对齐原型 cloud-start 移动端） */
        body.desktop-view-cloud #cloudUploadBtn .cloud-icon {
          display: none;
        }

        body.desktop-view-cloud #cloudUploadBtn .cloud-btn-label {
          font-size: 0;
        }

        body.desktop-view-cloud #cloudUploadBtn .cloud-btn-label::before {
          content: "上传";
          font-size: 12px;
        }

        /* m-quota-row：[已用 X/Y] [X%] [⇅ 传输]：单行无容器框；track 独立第二行 */
        body.desktop-view-cloud .cloud-quota-panel {
          align-items: center;
          flex-wrap: wrap;
          gap: 4px 6px;
          padding: 0;
          margin-bottom: 12px;
          background: transparent;
          border: 0;
          border-radius: 0;
        }

        body.desktop-view-cloud .cloud-quota-text {
          font-size: 12px;
          color: var(--muted);
        }

        body.desktop-view-cloud .cloud-quota-text strong {
          font-weight: 700;
        }

        /* 移动端原型 m-quota 把百分比合并到 quota 文本内："已用 320 MB / 1 GB · 32%"
           percent 紧贴 quota-text 右侧（不再 margin-left:auto），用 ::before 加 "· " 分隔；
           ⇅ 传输按钮独占行尾用 margin-left:auto 推到最右 */
        body.desktop-view-cloud .cloud-quota-percent {
          font-size: 12px;
          color: var(--muted);
          margin-left: 0;
        }
        body.desktop-view-cloud .cloud-quota-percent::before {
          content: "· ";
        }
        body.desktop-view-cloud #cloudTransferBtn {
          margin-left: auto;
        }

        body.desktop-view-cloud .cloud-quota-track {
          flex-basis: 100%;
          order: 3;
          height: 6px;
          margin-top: 4px;
        }

        /* cloud-start 移动端紧凑：标题 + meta 左，[上传] 单按钮右 */
        body.desktop-view-cloud .cloud-start {
          padding: 11px 13px;
          margin-bottom: 12px;
        }
        body.desktop-view-cloud .cloud-start-title {
          font-size: 13px;
        }
        body.desktop-view-cloud .cloud-start-meta {
          font-size: 11px;
        }
        body.desktop-view-cloud .cloud-start-actions .btn {
          min-height: 32px;
          padding: 5px 12px;
          font-size: 12px;
        }

        /* 移动端原型完全无 toolbar / breadcrumb / 刷新按钮（用下拉手势替代） */
        body.desktop-view-cloud .cloud-toolbar,
        body.desktop-view-cloud .cloud-breadcrumb,
        body.desktop-view-cloud .cloud-crumb-row,
        body.desktop-view-cloud .cloud-loadbar {
          display: none;
        }

        /* grid: 3 列 + 6px gap，按原型 .phone .grid */
        body.desktop-view-cloud .cloud-grid {
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 6px;
          overflow: visible;
          padding: 0 0 calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 18px);
        }

        /* tile: 紧凑 padding + 38px 图标 + 11px 名称，无 ⋯ 按钮、无 sub */
        body.desktop-view-cloud .cloud-tile {
          min-height: 86px;
          padding: 13px 4px 9px;
          gap: 8px;
        }

        body.desktop-view-cloud .cloud-tile-icon {
          width: 38px;
          height: 38px;
          flex-basis: 38px;
        }

        body.desktop-view-cloud .cloud-tile-name {
          font-size: 11px;
          line-height: 1.3;
        }

        body.desktop-view-cloud .cloud-tile-more,
        body.desktop-view-cloud .cloud-tile-sub {
          display: none;
        }

        /* §13.4 移动端传输浮层：从底部弹出、左右铺满（不缩在右下角） */
        body.desktop-view-cloud .cloud-upload-tray {
          left: 10px;
          right: 10px;
          bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
          width: auto;
          max-width: none;
        }

        body.desktop-view-config .test-task-layout {
          display: flex;
          flex-direction: column;
          gap: 12px;
          height: auto;
          min-height: 100%;
        }

        body.desktop-view-config .test-task-editor,
        body.desktop-view-config .test-task-side {
          display: flex;
          flex-direction: column;
          gap: 12px;
          width: 100%;
          min-width: 0;
          min-height: 0;
        }

        body.desktop-view-config .test-task-start-panel {
          order: 0;
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          padding: 14px;
          border-radius: 12px;
        }

        body.desktop-view-config .test-task-start-actions,
        body.desktop-view-config .test-task-start-actions .test-config-action {
          width: 100%;
        }

        body.desktop-view-config .test-task-start-title {
          font-size: 16px;
          line-height: 1.35;
        }

        body.desktop-view-config .test-task-start-meta {
          margin-top: 4px;
          font-size: 12px;
          line-height: 1.5;
        }

        body.desktop-view-config .test-task-saved-section {
          order: 1;
        }

        body.desktop-view-config .test-task-group-section {
          order: 2;
        }

        body.desktop-view-wss .wss-layout {
          grid-template-columns: minmax(0, 1fr);
          grid-template-rows: minmax(0, 1fr) minmax(210px, 36%);
          gap: 8px;
          padding: 8px;
          box-sizing: border-box;
        }

        body.desktop-view-wss .wss-task-panel {
          min-height: 0;
          overflow: auto;
          -webkit-overflow-scrolling: touch;
          border-radius: 12px;
        }

        body.desktop-view-wss .wss-layout {
          height: 100%;
          min-height: 0;
        }

        body.desktop-view-wss .wss-debugger-native {
          min-height: 0;
          border-radius: 12px;
        }

        body.desktop-view-wss .wss-task-list {
          max-height: none;
        }

        body.task-editor-open .test-config-page,
        body.task-editor-open .test-config-page > .panel,
        body.task-editor-open .test-config-page .desktop-page-body,
        body.task-editor-open .test-task-layout,
        body.task-editor-open .test-task-editor {
          height: 100%;
          min-height: 0;
          overflow: hidden;
        }

        body:not(.desktop-view-workbench) .left-stack,
        body:not(.desktop-view-workbench) .right-stack,
        body:not(.desktop-view-workbench) .left-stack > .panel,
        body:not(.desktop-view-workbench) .right-stack > .panel {
          display: none !important;
        }

        .right-resize-handle {
          display: none;
        }

        .right-stack > .panel.request-detail-panel:first-child {
          flex-basis: auto;
        }

        .left-stack > .panel,
        .right-stack > .panel {
          display: none;
          height: 100%;
          margin: 0;
          border-radius: 8px;
        }

        body.mobile-tab-docs .right-stack > .panel,
        body.mobile-tab-test .right-stack > .panel,
        body.mobile-tab-response .right-stack > .panel,
        body.mobile-tab-log .right-stack > .panel {
          border-radius: 0;
        }

        body.mobile-tab-config .left-stack > .panel:first-child,
        body.mobile-tab-docs .right-stack > .panel:first-child,
        body.mobile-tab-test .right-stack > .panel:first-child,
        body.mobile-tab-response .right-stack > .panel:last-child,
        body.mobile-tab-log .right-stack > .panel:last-child {
          border-top: 0;
          border-top-right-radius: 0;
          border-top-left-radius: 0;
        }

        body.mobile-tab-log .right-stack > .panel:last-child {
          border-right: 0;
          border-left: 0;
        }

        body.mobile-tab-config .left-stack > .panel,
        body.mobile-tab-docs .right-stack > .panel:first-child,
        body.mobile-tab-test .right-stack > .panel:first-child,
        body.mobile-tab-response .right-stack > .panel:last-child,
        body.mobile-tab-log .right-stack > .panel:last-child {
          display: flex;
        }

        body.mobile-tab-profile .profile-page {
          height: 100%;
          overflow: auto;
          padding: 0;
          background: transparent;
        }

        body.mobile-tab-profile .profile-page > .panel {
          min-height: 100%;
          margin: 0;
          border: 0;
          border-radius: 0;
          background: var(--panel);
          box-shadow: none;
        }

        body.mobile-tab-profile .profile-page > .panel > .panel-body {
          height: auto;
          padding: 0;
          overflow: visible;
        }

        body.mobile-tab-profile .profile-card {
          border: 0;
          border-radius: 0;
          background: transparent;
          min-height: 100%;
          box-shadow: none;
        }

        body.mobile-tab-profile .profile-head {
          padding: 16px 12px 12px;
          border-bottom: 0;
          background: transparent;
        }

        body.mobile-tab-profile .profile-main-content,
        body.mobile-tab-profile .profile-subpage {
          min-height: 100%;
          background: transparent;
        }

        body.mobile-tab-profile .profile-card.account-security-open .profile-main-content {
          display: none;
        }

        body.mobile-tab-profile .profile-card:not(.account-security-open) .profile-subpage {
          display: none;
        }

        body.mobile-tab-profile.account-security-page-open .profile-subpage > .profile-head {
          display: none;
        }

        body.mobile-tab-profile .profile-row {
          padding: 13px 12px;
        }

        body.mobile-tab-profile .profile-section {
          padding: 14px 12px;
        }

        body.mobile-tab-profile .profile-actions {
          margin: 8px 12px 12px;
          padding: 0;
          border: 0;
          border-radius: 0;
          background: transparent;
        }

        body.desktop-view-profile .profile-page {
          height: 100%;
          overflow: auto;
          padding: 12px;
          background:
            radial-gradient(circle at 16% 8%, rgba(37, 99, 235, 0.14), transparent 28%),
            linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0));
          box-sizing: border-box;
          -webkit-overflow-scrolling: touch;
        }

        body.desktop-view-profile .profile-page > .panel {
          min-height: auto;
          margin: 0;
          border: 0;
          border-radius: 16px;
          background: rgba(15, 23, 42, 0.86);
          box-shadow: none;
          overflow: hidden;
        }

        body.desktop-view-profile .profile-page > .panel > .panel-body {
          height: auto;
          padding: 0;
          overflow: visible;
        }

        body.desktop-view-profile .profile-card {
          min-height: auto;
          border: 0;
          border-radius: 16px;
          background: transparent;
          box-shadow: none;
        }

        body.desktop-view-profile .profile-head {
          padding: 18px 16px 14px;
          border-bottom: 0;
          background:
            linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(37, 99, 235, 0.12)),
            rgba(15, 23, 42, 0.48);
        }

        body.desktop-view-profile .profile-head-content {
          align-items: center;
          gap: 14px;
        }

        body.desktop-view-profile .profile-main-content,
        body.desktop-view-profile .profile-subpage {
          min-height: auto;
          background: transparent;
        }

        body.desktop-view-profile .profile-card.account-security-open .profile-main-content {
          display: none;
        }

        body.desktop-view-profile .profile-card:not(.account-security-open) .profile-subpage {
          display: none;
        }

        body.desktop-view-profile.account-security-page-open .profile-subpage > .profile-head {
          display: none;
        }

        body.desktop-view-profile .profile-row {
          display: grid;
          grid-template-columns: minmax(82px, 0.36fr) minmax(0, 1fr);
          gap: 12px;
          align-items: center;
          min-height: 50px;
          padding: 14px 16px;
        }

        body.desktop-view-profile .profile-section {
          margin: 12px;
          padding: 14px;
          border-radius: 14px;
          background: rgba(15, 23, 42, 0.28);
        }

        body.desktop-view-profile .profile-actions {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 10px;
          margin: 12px;
          padding: 0 0 max(4px, env(safe-area-inset-bottom, 0px));
          border: 0;
          border-radius: 0;
          background: transparent;
        }

        body.desktop-view-profile .profile-actions .btn,
        body.desktop-view-profile .assertion-package-actions .btn,
        body.desktop-view-profile .account-security-mode-btn {
          min-height: 46px;
          width: 100%;
        }

        body.desktop-view-profile .assertion-package-actions {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 10px;
        }

        body.desktop-view-profile .profile-row-action,
        body.desktop-view-profile .profile-inline-control {
          min-width: 0;
          justify-content: flex-end;
        }

        body.desktop-view-profile .profile-value,
        body.desktop-view-profile .profile-nickname-text {
          min-width: 0;
          overflow-wrap: anywhere;
          text-align: right;
        }

        html.light-theme body.desktop-view-profile .profile-page {
          background:
            radial-gradient(circle at 16% 8%, rgba(37, 99, 235, 0.1), transparent 28%),
            linear-gradient(180deg, #eef4f8, #f8fafc);
        }

        html.light-theme body.desktop-view-profile .profile-page > .panel {
          background: transparent;
        }

        html.light-theme body.desktop-view-profile .profile-head {
          background:
            linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(37, 99, 235, 0.09)),
            #f8fafc;
        }

        html.light-theme body.desktop-view-profile .profile-section {
          background: #f8fafc;
          border: 1px solid rgba(148, 163, 184, 0.22);
        }

        body.mobile-tab-config .left-stack {
          display: flex;
          flex-direction: column;
          gap: 2px;
          overflow: auto;
          padding-bottom: 0;
        }

        body.mobile-tab-config .left-stack > .panel {
          height: auto;
          flex: 0 0 auto;
        }

        body.mobile-tab-config .left-stack > .panel:last-child {
          flex: 1 0 auto;
        }

        .panel-body {
          height: 100%;
          min-height: 0;
          padding: 12px;
          overflow: auto;
        }

        .panel-title {
          margin-bottom: 10px;
        }

        .config-section-title,
        .field .config-section-title {
          font-size: 13px;
        }

        .combo-menu {
          max-height: min(48vh, 320px);
        }

        .field .combo-select {
          display: none;
        }

        .field .mobile-function-select {
          display: block;
        }

        body.mobile-tab-test .request-detail-panel .panel-body,
        body.mobile-tab-response .right-stack > .panel:last-child .panel-body,
        body.mobile-tab-log .right-stack > .panel:last-child .panel-body {
          display: flex;
          flex-direction: column;
          overflow: hidden;
          padding-bottom: 0;
        }

        body.mobile-tab-test .request-detail-panel .panel-body,
        body.mobile-tab-log .right-stack > .panel:last-child .panel-body {
          padding: 0;
        }

        body.mobile-tab-config .left-stack > .panel:first-child .panel-body {
          height: auto;
          overflow: visible;
        }

        body.mobile-tab-config .left-stack > .panel:last-child .panel-body {
          display: flex;
          flex-direction: column;
          gap: 10px;
          height: auto;
          overflow: visible;
          padding-top: 6px;
        }

        body.mobile-tab-config .left-stack > .panel:last-child .params-title-row {
          margin-bottom: 6px;
        }

        body.mobile-tab-config .left-stack > .panel:last-child .field {
          display: block;
          margin-bottom: 12px;
        }

        body.mobile-tab-config .left-stack > .panel:last-child .params-editor-field {
          display: block;
        }

        body.mobile-tab-config .left-stack > .panel:last-child .params-editor-field.is-hidden {
          display: none;
        }

        body.mobile-tab-config .parameter-panel {
          overflow: visible;
        }

        body.mobile-tab-config .parameter-panel-actions {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        body.mobile-tab-config .parameter-panel-actions .parameter-add-btn {
          grid-column: 1 / -1;
        }

        body.desktop-view-workbench.mobile-tab-config .lang-actions {
          gap: 6px;
        }

        body.desktop-view-workbench.mobile-tab-config .lang-btn {
          min-width: 0;
          padding: 8px 4px;
        }

        body.mobile-tab-config .parameter-row {
          grid-template-columns: minmax(76px, 0.78fr) minmax(0, 1fr) 36px;
          gap: 6px;
          align-items: start;
        }

        body.mobile-tab-config .parameter-row textarea,
        body.mobile-tab-config .parameter-row .parameter-values-wrap {
          grid-column: auto;
          min-height: 40px;
          height: 40px;
        }

        body.mobile-tab-config #paramsEditor {
          width: 100%;
          height: 220px;
          min-height: 180px;
          resize: none;
        }

        .actions {
          display: grid;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 8px;
          width: 100%;
          margin-top: 12px;
          position: static;
        }

        .actions .btn {
          min-width: 0;
          min-height: 40px;
          padding-inline: 6px;
          white-space: nowrap;
        }

        .request-detail-meta {
          flex: 0 0 auto;
          margin-bottom: 10px;
        }

        .request-detail-shell {
          display: flex;
          flex: 1 1 0;
          flex-direction: column;
          gap: 10px;
          min-height: 0;
          overflow: hidden;
        }

        .request-detail-viewer,
        .tool-viewer,
        .doc-viewer {
          flex: 1 1 0;
          min-height: 0;
        }

        .request-detail-panel .mini-content,
        .tool-content {
          min-height: 0;
          max-height: none;
        }

        body.mobile-tab-docs .right-stack {
          display: flex;
          flex-direction: column;
          gap: 10px;
          height: 100%;
          min-height: 0;
          overflow: hidden;
          padding-bottom: 0;
        }

        body.mobile-tab-test .right-stack,
        body.mobile-tab-response .right-stack,
        body.mobile-tab-log .right-stack {
          display: flex;
          flex-direction: column;
          height: 100%;
          min-height: 0;
          overflow: hidden;
          padding-bottom: 0;
        }

        body.mobile-tab-docs .right-stack > .panel:first-child {
          height: 100%;
          flex: 1 0 auto;
        }

        body.mobile-tab-test .right-stack > .panel:first-child,
        body.mobile-tab-response .right-stack > .panel:last-child,
        body.mobile-tab-log .right-stack > .panel:last-child {
          flex: 1 0 auto;
          min-height: 0;
        }

        body.mobile-tab-test .right-stack > .panel:first-child {
          flex: 1 1 0;
          height: auto;
        }

        body.mobile-tab-docs .request-detail-panel .panel-body {
          display: flex;
          flex-direction: column;
          height: 100%;
          min-height: 0;
          overflow: hidden;
          padding-bottom: 0;
        }

        body.mobile-tab-docs .request-detail-shell {
          display: flex;
          flex: 1 1 0;
          flex-direction: column;
          min-height: 0;
          overflow: hidden;
        }

        body.mobile-tab-docs .request-detail-viewer {
          margin-bottom: 10px;
        }

        body.mobile-tab-docs .request-detail-viewer,
        body.mobile-tab-docs .doc-viewer {
          flex: none;
        }

        body.mobile-tab-docs .doc-viewer {
          display: flex;
          flex: 1 1 0;
          min-height: 0;
          background: transparent;
          border: none;
          border-radius: 0;
          box-shadow: none;
          overflow: hidden;
        }

        body.mobile-tab-docs .request-detail-panel .mini-content,
        body.mobile-tab-docs .api-doc-content {
          min-height: 0;
          max-height: none;
        }

        body.mobile-tab-docs .api-doc-content {
          padding: 0;
          overflow: auto;
        }

        body.mobile-tab-docs .tool-viewer,
        body.mobile-tab-docs .request-detail-viewer,
        body.mobile-tab-test .request-detail-viewer,
        body.mobile-tab-test .doc-viewer,
        body.mobile-tab-test .request-detail-meta {
          display: none;
        }

        body.mobile-tab-docs .doc-viewer,
        body.mobile-tab-test .tool-viewer {
          display: flex;
        }

        body.mobile-tab-test .tool-viewer,
        body.mobile-tab-log .aux-panel {
          background: transparent;
          border: none;
          border-radius: 0;
          box-shadow: none;
        }

        body.mobile-tab-test .tool-viewer .mini-head {
          padding: 16px 12px 8px;
          border-bottom: 0;
          background: transparent;
          color: var(--text);
          font-size: 14px;
          font-weight: 700;
        }

        body.mobile-tab-test .tool-content {
          display: flex;
          flex-direction: column;
          padding: 8px 12px 0;
          overflow: hidden;
        }

        body.mobile-tab-test .request-detail-shell {
          gap: 0;
        }

        body.mobile-tab-test .tool-viewer {
          flex: 1 1 0;
          min-height: 0;
        }

        body.mobile-tab-test .tool-stack,
        body.mobile-tab-test .assertion-list {
          flex: 1 1 0;
          min-height: 0;
        }

        body.mobile-tab-test .tool-stack {
          overflow: hidden;
        }

        body.mobile-tab-test .assertion-list {
          padding-bottom: 0;
          scrollbar-gutter: auto;
        }

        .tool-toolbar {
          align-items: stretch;
        }

        .tool-toolbar-actions {
          width: 100%;
          gap: 6px;
        }

        .tool-toolbar-actions .btn {
          flex: 1;
          min-height: 36px;
        }

        .assertion-item {
          grid-template-columns: minmax(0, 1fr) 62px;
          gap: 8px;
        }

        .assertion-actions {
          display: grid;
          grid-template-columns: repeat(2, 28px);
          grid-auto-flow: column;
          grid-template-rows: repeat(2, 28px);
          gap: 6px;
          justify-content: end;
        }

        .assertion-rename-btn {
          width: 28px;
          min-width: 28px;
          max-width: 28px;
          height: 28px;
          min-height: 28px;
          max-height: 28px;
          aspect-ratio: 1 / 1;
        }

        .assertion-action-btn {
          width: 28px;
          min-width: 28px;
          max-width: 28px;
          height: 28px;
          min-height: 28px;
          max-height: 28px;
          aspect-ratio: 1 / 1;
        }

        .response-shell {
          display: block;
          flex: 1 1 0;
          min-height: 0;
          overflow: hidden;
        }

        body.mobile-tab-response .mobile-response-tabs {
          display: flex;
          gap: 8px;
          flex-shrink: 0;
          margin-bottom: 10px;
        }

        body.mobile-tab-response .panel-title-row {
          display: flex;
        }

        body.mobile-tab-response .mobile-panel-copy-btn {
          display: inline-flex;
        }

        body.mobile-tab-response #copyResponseBtn {
          width: 26px;
          height: 26px;
          min-height: 26px;
          border-radius: 8px;
        }

        .mobile-response-tabs .tab-btn {
          flex: 1;
          min-height: 36px;
        }

        .response-shell .viewer,
        .response-shell .log-column,
        .response-shell .mobile-response-detail {
          display: none;
          min-height: 0;
        }

        body.mobile-tab-response .response-shell {
          display: flex;
          flex-direction: column;
          flex: 1 1 0;
          gap: 10px;
          min-height: 0;
        }

        body.mobile-tab-response .response-shell .mobile-response-detail {
          flex: 0 0 clamp(118px, 20vh, 152px);
        }

        body.mobile-tab-response .response-shell .viewer {
          display: flex;
          flex: 1 1 auto;
          min-height: 280px;
          height: auto;
          border-bottom: 0;
          border-bottom-right-radius: 0;
          border-bottom-left-radius: 0;
        }

        body.mobile-tab-response .response-shell .response-body {
          display: block;
          flex: 1 1 auto;
          padding-bottom: 18px;
        }

        body.mobile-tab-response.mobile-response-tab-headers .response-shell .mobile-response-headers,
        body.mobile-tab-response.mobile-response-tab-request .response-shell .mobile-response-request,
        body.mobile-tab-log .response-shell .log-column {
          display: flex;
        }

        .mobile-response-detail .mini-content {
          min-height: 0;
          overflow: auto;
          padding-bottom: 16px;
        }

        body.mobile-tab-response .response-body {
          overflow: auto;
        }

        .viewer-head {
          align-items: center;
          padding: 12px;
        }

        .desktop-viewer-tabs,
        .viewer-doc-body {
          display: none !important;
        }

        .viewer-head .mobile-viewer-title {
          display: block !important;
        }

        .viewer-head-right {
          gap: 6px;
        }

        .response-body {
          padding: 12px;
          font-size: 12px;
        }

        .aux-panel {
          height: 100%;
        }

        body.mobile-tab-log .aux-panel .tabs {
          display: flex;
          flex-shrink: 0;
          padding: 12px 12px 8px;
          border-bottom: 0;
          background: transparent;
        }

        body.mobile-tab-log .aux-panel .tab-actions {
          display: inline-flex;
          gap: 6px;
        }

        body.mobile-tab-log #clearLogBtn {
          display: none;
        }

        body.mobile-tab-log #logFilterBtn {
          order: 2;
        }

        body.mobile-tab-log #logCountText {
          order: 1;
        }

        .aux-panel > .mini-content {
          min-height: 0;
          overflow: hidden;
        }

        body.mobile-tab-log .aux-panel > .mini-content {
          padding: 0 12px;
        }

        .aux-content.active {
          height: 100%;
          overflow: auto;
          padding-bottom: 16px;
          box-sizing: border-box;
        }

        body.mobile-tab-log .right-stack {
          padding-bottom: 0;
        }

        body.mobile-tab-log .response-shell {
          display: flex;
          flex: 1 1 0;
          min-height: 0;
        }

        body.mobile-tab-log .response-shell .log-column,
        body.mobile-tab-log .aux-panel {
          flex: 1 1 0;
          min-height: 0;
        }

        body.mobile-tab-log .aux-panel > .mini-content,
        body.mobile-tab-log .aux-content.active,
        body.mobile-tab-log .log-list {
          display: flex;
          flex-direction: column;
          min-height: 0;
        }

        body.mobile-tab-docs .doc-viewer .mini-content,
        body.mobile-tab-log .log-list,
        body.mobile-tab-log .aux-content.active {
          flex: 1 1 auto;
        }

        body.mobile-tab-docs .doc-viewer .mini-content > .empty-state:only-child,
        body.mobile-tab-log .log-list > .empty-state:only-child,
        body.mobile-tab-log .aux-content.active > .empty-state:only-child {
          display: flex;
          align-items: center;
          justify-content: center;
          flex: 1 1 auto;
          min-height: 100%;
          text-align: center;
        }

        .log-list {
          gap: 8px;
        }

        body.mobile-tab-log .log-list {
          padding-right: 0;
          padding-bottom: 0;
          scrollbar-gutter: auto;
        }

        body.mobile-tab-log .aux-content.active {
          padding-bottom: 0;
        }

        body.batch-running .log-list {
          padding-bottom: 70px;
        }

        .log-top {
          display: grid;
          grid-template-columns: minmax(0, 1fr) clamp(76px, 22vw, 92px);
          gap: 8px;
          align-items: center;
          width: 100%;
        }

        .log-item {
          min-height: 48px;
          padding: 12px 10px;
          display: flex;
          align-items: center;
        }

        .log-title {
          align-items: center;
          line-height: 1.5;
        }

        .log-time {
          font-size: 11px;
        }

        .header-row {
          grid-template-columns: minmax(74px, 104px) minmax(0, 1fr);
          gap: 8px;
          padding: 10px;
        }

        body.desktop-view-config .test-task-layout {
          display: flex;
          flex-direction: column;
          gap: 12px;
          height: auto;
          min-height: 100%;
        }

        body.desktop-view-config .test-task-editor,
        body.desktop-view-config .test-task-side {
          display: flex;
          flex-direction: column;
          gap: 12px;
          width: 100%;
          min-width: 0;
          min-height: 0;
        }

        body.desktop-view-config .test-task-saved-section,
        body.desktop-view-config .test-task-group-section,
        body.desktop-view-config .test-task-result-section {
          display: flex;
          flex-direction: column;
          gap: 10px;
          min-height: 0;
          padding: 14px;
          border-radius: 10px;
        }

        body.desktop-view-config .test-task-saved-section .test-task-list {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          grid-auto-rows: auto;
          gap: 11px;
          max-height: none;
          overflow: visible;
          padding: 2px 0 0;
        }

        body.desktop-view-config .test-task-group-section .test-task-group-list {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          grid-auto-rows: auto;
          gap: 10px;
          max-height: none;
          overflow: visible;
          padding: 2px 0 0;
        }

        body.desktop-view-config .test-task-new-card {
          display: grid;
          grid-template-columns: 48px minmax(0, 1fr);
          place-items: center start;
          align-content: center;
          min-height: 78px;
          padding: 14px;
          text-align: left;
        }

        body.desktop-view-config .test-task-new-plus {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          width: 42px;
          height: 42px;
          border-radius: 12px;
          background: rgba(37, 99, 235, 0.12);
          font-size: 28px;
        }

        body.desktop-view-config .test-task-new-text {
          min-width: 0;
          font-size: 15px;
          line-height: 1.35;
          white-space: normal;
        }

        /* Story#22：移动端信息卡布局。2 列 grid，卡片纵向 flex 排列
           状态点 + 类型徽标 + [上次失败] + 任务名 + meta + 通过率条。 */
        body.desktop-view-config .test-task-saved-item {
          display: flex;
          flex-direction: column;
          gap: 8px;
          min-height: 0;
          padding: 12px;
          border-radius: 15px;
          box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
          position: relative;
        }

        body.desktop-view-config .test-task-saved-section .test-task-saved-item[data-test-task-status="fail"] {
          border-color: rgba(225, 29, 72, 0.4) !important;
          background: #fff7f8 !important;
        }

        html:not(.light-theme) body.desktop-view-config .test-task-saved-section .test-task-saved-item[data-test-task-status="fail"] {
          border-color: rgba(225, 29, 72, 0.55) !important;
          background: rgba(225, 29, 72, 0.12) !important;
        }

        /* 组合卡 fail 不加红底（v2 只靠通过率条颜色区分）*/
        body.desktop-view-config .test-task-group-section .test-task-saved-item[data-test-task-status="fail"] {
          background: var(--panel, #ffffff) !important;
          border-color: var(--line, #e7edf3) !important;
        }

        body.desktop-view-config .test-task-saved-item[data-test-task-status="disabled"] {
          opacity: 0.72;
        }

        body.desktop-view-config .test-task-saved-main {
          min-width: 0;
          padding-right: 30px;
          display: flex;
          flex-direction: column;
          gap: 6px;
        }

        body.desktop-view-config .test-task-saved-title-line {
          align-items: center;
          gap: 6px;
          flex-wrap: wrap;
        }

        body.desktop-view-config .test-task-status-dot {
          display: inline-block;
          width: 8px;
          height: 8px;
          border-radius: 50%;
          flex: 0 0 auto;
          background: var(--soft, #94a3b8);
        }

        body.desktop-view-config .test-task-status-dot[data-status="pass"] {
          background: var(--success, #16a34a);
        }

        body.desktop-view-config .test-task-status-dot[data-status="fail"] {
          background: var(--danger, #e11d48);
        }

        body.desktop-view-config .test-task-status-dot[data-status="running"] {
          background: var(--primary, #2563eb);
        }

        body.desktop-view-config .test-task-last-fail-tag {
          font-size: 10.5px;
          font-weight: 700;
          padding: 2px 7px;
          border-radius: 6px;
          margin-left: auto;
          background: var(--danger-surface, rgba(225, 29, 72, 0.12));
          color: var(--danger, #e11d48);
          white-space: nowrap;
        }

        body.desktop-view-config .test-task-saved-title {
          font-size: 13.5px;
          font-weight: 650;
          line-height: 1.32;
          min-height: 36px;
          flex: 1 1 100%;
          order: 10;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          white-space: normal;
          overflow: hidden;
        }

        body.desktop-view-config .test-task-saved-meta {
          margin-top: 0;
          font-size: 11px;
          line-height: 1.45;
          color: var(--muted);
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          white-space: normal;
          overflow: hidden;
        }

        body.desktop-view-config .test-task-saved-meta-lastrun {
          display: none;
        }

        body.desktop-view-config .test-task-type-badge {
          min-width: 32px;
          height: 20px;
          font-size: 10.5px;
          padding: 2px 7px;
          border-radius: 6px;
        }

        body.desktop-view-config .test-task-card-menu {
          top: 8px;
          right: 8px;
        }

        body.desktop-view-config .test-task-card-menu-btn {
          width: 28px;
          height: 28px;
          border-radius: 8px;
        }

        body.desktop-view-config .test-task-card-menu-options {
          min-width: 130px;
        }

        body.desktop-view-config .test-task-card-menu-option {
          min-height: 36px;
          padding: 8px 10px;
          font-size: 12.5px;
        }

        body.desktop-view-config .test-task-saved-actions {
          display: flex;
          gap: 6px;
          align-items: center;
          margin-top: 0;
        }

        body.desktop-view-config .test-task-saved-actions .test-config-action {
          display: none;
        }

        body.desktop-view-config .test-task-card-progress {
          display: flex;
          align-items: center;
          gap: 6px;
          flex: 1;
          min-width: 0;
        }

        body.desktop-view-config .test-task-card-progress-track {
          flex: 1;
          height: 5px;
          border-radius: 3px;
          background: var(--line);
          overflow: hidden;
        }

        body.desktop-view-config .test-task-card-progress-bar {
          height: 100%;
          border-radius: 3px;
        }

        body.desktop-view-config .test-task-card-progress-text {
          min-width: 0;
          font-size: 11px;
          font-weight: 700;
          text-align: right;
        }

        body.desktop-view-config .test-task-saved-item[data-test-task-status="fail"] .test-task-card-progress-bar {
          background: var(--danger, #e11d48);
        }

        body.desktop-view-config .test-task-saved-item[data-test-task-status="pass"] .test-task-card-progress-bar {
          background: var(--success, #16a34a);
        }

        body.desktop-view-config .test-task-saved-item[data-test-task-status="fail"] .test-task-card-progress-text {
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config .test-task-saved-item[data-test-task-status="pass"] .test-task-card-progress-text {
          color: var(--success, #16a34a);
        }

        body.desktop-view-config .test-task-saved-item[data-test-task-status="unrun"] .test-task-card-progress-text,
        body.desktop-view-config .test-task-saved-item[data-test-task-status="disabled"] .test-task-card-progress-text {
          color: var(--soft, #94a3b8);
        }

        /* Story#22：组合卡横向布局覆盖（icon + main + actions）*/
        body.desktop-view-config .test-task-group-section .test-task-saved-item {
          display: flex !important;
          flex-direction: row !important;
          align-items: center !important;
          gap: 12px !important;
          padding: 14px !important;
        }

        body.desktop-view-config .test-task-group-icon {
          display: inline-flex;
          width: 44px;
          height: 44px;
          border-radius: 12px;
          background: var(--group-surface, rgba(124, 58, 237, 0.14));
          color: var(--group, #7c3aed);
          align-items: center;
          justify-content: center;
          font-size: 22px;
          flex: 0 0 auto;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-main {
          flex: 1 1 auto !important;
          min-width: 0 !important;
          padding-right: 0 !important;
          gap: 4px;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-title-line {
          min-width: 0;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-title {
          font-size: 14px;
          font-weight: 700;
          min-height: 0;
          line-height: 1.35;
          -webkit-line-clamp: 1;
          order: 0;
          flex-basis: auto;
          flex: 1 1 auto;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-meta {
          font-size: 11.5px;
          -webkit-line-clamp: 1;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-actions {
          display: flex !important;
          flex-direction: column !important;
          gap: 6px !important;
          align-items: stretch !important;
          justify-content: center !important;
          min-width: 68px !important;
          width: 68px !important;
          flex: 0 0 68px !important;
          grid-template-columns: none !important;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-actions .test-config-action {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          min-height: 30px;
          padding: 4px 10px;
          font-size: 11.5px;
          border-radius: 8px;
        }

        body.desktop-view-config .test-task-group-section .test-task-card-progress {
          font-size: 11px;
        }

        /* 类型徽标（组合专色紫）*/
        body.desktop-view-config .test-task-type-badge.grp {
          background: var(--group-surface, rgba(124, 58, 237, 0.14));
          color: var(--group, #7c3aed);
        }

        /* 组合卡：v2 简洁样式——隐藏状态点/徽标/失败标签，名称直接大字 */
        body.desktop-view-config .test-task-group-section .test-task-status-dot,
        body.desktop-view-config .test-task-group-section .test-task-type-badge,
        body.desktop-view-config .test-task-group-section .test-task-last-fail-tag {
          display: none;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-title {
          font-size: 15px;
          font-weight: 700;
          line-height: 1.35;
          min-height: 0;
          -webkit-line-clamp: 1;
          order: 0;
          flex-basis: auto;
          flex: 1 1 auto;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        /* 组合卡：隐藏 ⋯ 菜单按钮（v2 无三点，操作走右侧按钮）*/
        body.desktop-view-config .test-task-group-section .test-task-card-menu-btn {
          display: none;
        }

        /* 组合卡：右侧竖排"运行/编辑"按钮 */
        body.desktop-view-config .test-task-group-mobile-edit {
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }

        body.desktop-view-config .test-task-group-section .test-task-saved-actions .test-config-action {
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }

        /* 组合卡：通过率条挪到主体（rate 块）*/
        body.desktop-view-config .test-task-group-mobile-rate {
          display: block;
          margin-top: 4px;
        }

        body.desktop-view-config .test-task-group-mobile-rate .test-task-card-progress {
          display: flex;
          align-items: center;
          gap: 6px;
        }

        /* 隐藏原 actions 里的 progress（组合卡挪到 main 内了）*/
        body.desktop-view-config .test-task-group-section .test-task-saved-actions > .test-task-card-progress {
          display: none;
        }

        /* 移动端隐藏 PC 版进度条（PC 用 saved-actions 里的 pc-rate，移动端用 main 里的 mobile-rate）*/
        body.desktop-view-config .test-task-group-pc-rate {
          display: none;
        }

        /* Story#22 §⑤：移动端全屏编辑页——顶部返回栏 + 底部固定保存栏 */
        body.task-editor-open .test-task-editor-close-x {
          display: none;
        }

        body.task-editor-open .test-task-editor-close-back {
          display: inline;
          font-size: 26px;
          line-height: 1;
          font-weight: 400;
          color: var(--primary);
        }

        body.task-editor-open .test-task-editor-close {
          top: 14px !important;
          left: 12px !important;
          right: auto !important;
          background: transparent !important;
          border: 0 !important;
          box-shadow: none !important;
          width: 36px !important;
          height: 36px !important;
          padding: 0 !important;
        }

        body.task-editor-open .test-task-builder-head {
          padding-left: 44px !important;
          padding-right: 16px !important;
          padding-top: 12px !important;
          min-height: 40px;
        }

        body.task-editor-open .test-task-builder-head .test-task-section-title {
          font-size: 16px;
          font-weight: 800;
        }

        /* 保存栏 fixed 贴视口底——sticky 会被限制在内容不足一屏的 builder-section 内，
           导致栏下方露背景空白；fixed 后直接贴屏底，内容区加 padding-bottom 让最后一项不被遮。 */
        body.task-editor-open .test-task-editor.open .test-task-builder-section .test-task-editor-actions,
        body.task-editor-open .test-task-editor-actions {
          position: fixed !important;
          bottom: 0 !important;
          left: 0 !important;
          right: 0 !important;
          margin: 0 !important;
          padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
          background: #ffffff !important;
          border-top: 1px solid var(--line) !important;
          display: flex !important;
          gap: 10px !important;
          z-index: 60 !important;
          grid-template-columns: none !important;
        }

        html:not(.light-theme) body.task-editor-open .test-task-editor.open .test-task-builder-section .test-task-editor-actions,
        html:not(.light-theme) body.task-editor-open .test-task-editor-actions {
          background: #0e1422 !important;
        }

        /* 返回/取消按钮：明确底色 + 边框（对齐设计稿"取消"边框按钮），两主题都可见、不透明 */
        body.task-editor-open #testTaskBackBtn,
        body.task-editor-open #wssTaskBackBtn,
        body.task-editor-open #testTaskGroupCancelBtn {
          flex: 0 0 auto;
          min-width: 90px;
          border-radius: 11px;
          background: var(--field, #f1f5f9) !important;
          border: 1px solid var(--line-strong, #d7dfe8) !important;
          color: var(--muted) !important;
        }

        /* fixed 保存栏占位——各 editor 内容区底部留白，避免最后一项被遮；
           背景透明露出滚动容器统一底色（设计稿"灰底+白卡"层次），消除内容不满屏时白底 section 下方露灰的分界块 */
        body.task-editor-open .test-task-builder-section,
        body.task-editor-open .wss-task-builder-section,
        body.task-editor-open .test-task-group-builder-section {
          padding-bottom: 88px !important;
          background: transparent !important;
          border: 0 !important;
          box-shadow: none !important;
        }

        body.task-editor-open .test-task-editor-actions #testTaskBackBtn {
          flex: 0 0 auto;
          min-width: 90px;
          border-radius: 11px;
        }

        body.task-editor-open .test-task-editor-actions #testTaskSaveBtn {
          flex: 1;
          border-radius: 11px;
          font-weight: 700;
        }

        /* Story#22 v8：编辑页分区卡片样式（⑤⑨⑩共用）——把顶部 fields、变量、用例、断言各自包成 v8 fsec 卡片视觉 */
        body.task-editor-open .test-task-fields,
        body.task-editor-open .wss-task-run-options,
        body.task-editor-open .test-task-group-fields {
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 14px;
          padding: 14px;
          margin: 0 0 12px;
          display: flex;
          flex-direction: column;
          gap: 10px;
        }

        body.task-editor-open .test-task-fields > .field .config-sub-label,
        body.task-editor-open .wss-task-run-options > .field .config-sub-label,
        body.task-editor-open .test-task-group-fields > .field .config-sub-label {
          font-size: 11px;
          color: var(--muted);
          margin-bottom: 5px;
          display: block;
        }

        body.task-editor-open .test-task-fields > .field > input,
        body.task-editor-open .test-task-fields > .field > select,
        body.task-editor-open .wss-task-run-options > .field > input,
        body.task-editor-open .wss-task-run-options > .field > select,
        body.task-editor-open .test-task-group-fields > .field > input,
        body.task-editor-open .test-task-group-fields > .field > select {
          height: 38px;
          border: 1px solid var(--line);
          border-radius: 9px;
          background: var(--field);
          padding: 0 12px;
          font-size: 13px;
        }

        /* ⑨ WSS "断言暂未支持"提示（复用 test-task-editor 内部；WSS editor 无独立断言块，纯提示） */
        body.task-editor-open .wss-task-run-options::after {
          content: "⚠ WSS 断言暂未支持，本版本不执行断言。";
          display: block;
          font-size: 11px;
          color: var(--warning, #d97706);
          background: var(--warning-surface, rgba(217, 119, 6, 0.14));
          border: 1px solid rgba(217, 119, 6, 0.2);
          border-radius: 9px;
          padding: 9px 12px;
          margin-top: 6px;
        }

        /* ⑩ 组合编辑：运行策略 chk + toggle 样式 */
        body.task-editor-open .test-task-group-toggle,
        /* 设计稿 .chk：纯文字 + box，无背景框/边框 */
        body.task-editor-open .wss-task-toggle,
        body.task-editor-open .test-task-group-toggle {
          display: inline-flex;
          align-items: center;
          gap: 8px;
          font-size: 12.5px;
          color: var(--text);
          font-weight: 500;
          padding: 8px 0 !important;
          min-height: 0 !important;
          background: transparent !important;
          border: 0 !important;
          border-radius: 0 !important;
          box-shadow: none !important;
          cursor: pointer;
        }

        /* 勾选框对齐设计稿 .box：18×18 圆角方块，选中蓝底白 ✓ */
        body.task-editor-open .test-task-group-toggle input[type="checkbox"],
        body.task-editor-open .wss-task-toggle input[type="checkbox"] {
          -webkit-appearance: none;
          appearance: none;
          width: 18px !important;
          height: 18px !important;
          min-height: 0 !important;
          margin: 0;
          flex: 0 0 auto;
          border-radius: 5px;
          border: 1px solid var(--line-strong, #d7dfe8);
          background: var(--field, #f1f5f9);
          position: relative;
          cursor: pointer;
        }

        body.task-editor-open .test-task-group-toggle input[type="checkbox"]:checked,
        body.task-editor-open .wss-task-toggle input[type="checkbox"]:checked {
          background: var(--primary, #2563eb);
          border-color: var(--primary, #2563eb);
        }

        body.task-editor-open .test-task-group-toggle input[type="checkbox"]:checked::after,
        body.task-editor-open .wss-task-toggle input[type="checkbox"]:checked::after {
          content: "✓";
          position: absolute;
          inset: 0;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #fff;
          font-size: 12px;
          line-height: 1;
        }

        /* ⑤ API 编辑主页：v8 里没有参数/断言填写，走 ⑧ 子页——隐藏 API editor 的 parameter/assertion pane */
        body.task-editor-open #testTaskParameterPane,
        body.task-editor-open #testTaskAssertionPane {
          display: none !important;
        }

        /* 用例行 v8 caserow 样式 */
        body.task-editor-open .test-task-selected-list > .test-task-item {
          display: flex;
          align-items: center;
          gap: 9px;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 11px;
          padding: 11px 12px;
          cursor: pointer;
          position: relative;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item.active {
          border-color: rgba(37, 99, 235, 0.36);
          background: rgba(37, 99, 235, 0.06);
        }

        body.task-editor-open .test-task-selected-list > .test-task-item .test-task-item-head {
          display: flex;
          flex: 1;
          align-items: center;
          gap: 9px;
          min-width: 0;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item .test-task-item-main {
          flex: 1;
          min-width: 0;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item .test-task-item-title-line {
          display: block;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item .test-task-item-title {
          font-size: 13px;
          font-weight: 600;
          color: var(--text);
          display: block;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item .test-task-item-path {
          display: none;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item .test-task-item-meta {
          font-size: 10.5px;
          color: var(--soft);
          margin-top: 2px;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item [data-test-task-remove-api] {
          font-size: 11.5px;
          color: var(--danger);
          background: transparent;
          border: 0;
          padding: 4px 8px;
          min-height: 0;
          font-weight: 500;
        }

        body.task-editor-open .test-task-selected-list > .test-task-item::after {
          content: "›";
          color: var(--soft);
          font-size: 18px;
          line-height: 1;
          flex: 0 0 auto;
        }

        /* ⑤ 设计稿：移动端用例区无"返回工作台调整接口"，跨请求断言入口不在标题行（走内联分区）*/
        body.task-editor-open #testTaskOpenWorkbenchBtn,
        body.task-editor-open #testTaskTaskAssertionEntryBtn {
          display: none !important;
        }

        /* ⑨ WSS 编辑页：移动端隐藏副标题 + 载入调试（设计稿只保留返回/保存）*/
        body.task-editor-open .wss-editor-subtitle,
        body.task-editor-open .wss-load-debugger-btn {
          display: none !important;
        }

        /* WSS 不支持断言——隐藏用例断言 pane，只保留连接选项下方的"暂未支持"提示（run-options::after）*/
        body.task-editor-open .wss-task-assertion-pane {
          display: none !important;
        }

        /* ⑨ WSS 编辑主页态：隐藏订阅参数/连接选项（点用例下钻才显示）*/
        body.task-editor-open:not(.wss-case-subpage-open) .wss-task-parameter-pane,
        body.task-editor-open:not(.wss-case-subpage-open) .wss-task-run-options {
          display: none !important;
        }

        /* ⑨ WSS 用例下钻子页：隐藏主页元素，显示订阅参数 + 连接选项 */
        body.wss-case-subpage-open .wss-task-fields,
        body.wss-case-subpage-open .wss-task-builder-section > .test-task-builder-head,
        body.wss-case-subpage-open .wss-task-builder-section > .test-task-editor-close,
        body.wss-case-subpage-open .wss-task-builder-section > .test-task-section-head,
        body.wss-case-subpage-open .wss-task-builder-section .test-task-api-column {
          display: none !important;
        }

        body.wss-case-subpage-open .wss-task-parameter-pane {
          display: block !important;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 14px;
          padding: 14px;
          margin-bottom: 12px;
          overflow: visible !important;
          height: auto !important;
          max-height: none !important;
        }

        body.wss-case-subpage-open .wss-task-parameter-pane .test-task-case-config,
        body.wss-case-subpage-open .wss-task-parameter-pane .parameter-list {
          overflow: visible !important;
          height: auto !important;
          max-height: none !important;
        }

        body.wss-case-subpage-open .wss-task-config-grid {
          padding-top: 60px !important;
        }

        /* WSS 子页返回栏 fixed top（同 API ⑧）*/
        body.wss-case-subpage-open .test-task-case-subpage-topbar {
          display: flex !important;
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          height: 56px;
          align-items: center;
          gap: 2px;
          padding: 0 10px;
          background: #ffffff;
          border-bottom: 1px solid var(--line);
          z-index: 55;
        }

        html:not(.light-theme) body.wss-case-subpage-open .test-task-case-subpage-topbar {
          background: #0e1422;
        }

        body.wss-case-subpage-open .test-task-case-subpage-back {
          width: 40px;
          height: 40px;
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          border: 0;
          background: transparent;
          color: var(--text);
          cursor: pointer;
          padding: 0;
        }

        body.wss-case-subpage-open .test-task-case-subpage-back svg {
          width: 22px;
          height: 22px;
        }

        body.wss-case-subpage-open .test-task-case-subpage-title {
          font-size: 17px;
          font-weight: 800;
          color: var(--text);
          flex: 1;
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        /* WSS/组合 保存栏 2 按钮：返回固定 + 保存撑满（与 API 一致，三个编辑页尺寸统一）*/
        body.task-editor-open #wssTaskBackBtn,
        body.task-editor-open #testTaskGroupCancelBtn {
          flex: 0 0 auto;
          min-width: 90px;
          border-radius: 11px;
        }

        body.task-editor-open #wssTaskSaveBtn,
        body.task-editor-open #testTaskGroupSaveBtn {
          flex: 1;
          border-radius: 11px;
          font-weight: 700;
        }

        /* ⑤ 搜索接口下拉：浮层化——只在 picker.open 时显示（点外部/失焦收回 open class 即隐藏），
           absolute 浮层不占文档流、不挤压用例 */
        body.task-editor-open .test-task-api-picker {
          position: relative;
          z-index: 1;
        }

        body.task-editor-open .test-task-api-options {
          display: none;
        }

        body.task-editor-open .test-task-api-picker.open {
          z-index: 30;
        }

        body.task-editor-open .test-task-api-picker.open .test-task-api-options {
          display: block !important;
          position: absolute !important;
          top: 100%;
          left: 0;
          right: 0;
          z-index: 30;
          margin-top: 4px;
          max-height: 260px;
          overflow: auto !important;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 12px;
          box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
        }

        /* ⑧ 用例·参数配置子页——点用例后全屏覆盖，参数/断言 pane 堆叠展示 */
        body.task-editor-open.test-task-case-subpage-open .test-task-config-grid {
          position: fixed !important;
          inset: 0;
          z-index: 50;
          background: var(--mobile-page-bg, var(--bg));
          overflow: auto !important;
          display: block !important;
          padding: 68px 14px calc(100px + env(safe-area-inset-bottom, 0px)) !important;
          -webkit-overflow-scrolling: touch;
        }

        /* 断言 pane 是子页最后一块——额外底部留白，确保最后一条断言不被 fixed 保存栏遮住 */
        body.task-editor-open.test-task-case-subpage-open #testTaskAssertionPane {
          margin-bottom: 24px !important;
        }

        body.task-editor-open.test-task-case-subpage-open .test-task-api-column {
          display: none !important;
        }

        body.task-editor-open.test-task-case-subpage-open #testTaskParameterPane,
        body.task-editor-open.test-task-case-subpage-open #testTaskAssertionPane {
          display: block !important;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 14px;
          padding: 14px;
          margin-bottom: 12px;
          overflow: visible !important;
          height: auto !important;
          max-height: none !important;
          flex: 0 0 auto !important;
        }

        /* 子页内部滚动容器一律撑开，整页由 config-grid 滚动（textarea 保留自身滚动）*/
        body.task-editor-open.test-task-case-subpage-open #testTaskParameterPane .test-task-case-config,
        body.task-editor-open.test-task-case-subpage-open #testTaskParameterPane .parameter-list,
        body.task-editor-open.test-task-case-subpage-open #testTaskAssertionPane .assertion-detail,
        body.task-editor-open.test-task-case-subpage-open #testTaskAssertionPane .test-task-assertion-list {
          overflow: visible !important;
          height: auto !important;
          max-height: none !important;
        }

        /* 子页里的任务变量分区：单独卡片（去掉在基本信息卡内当分隔线的 border-top）*/
        body.task-editor-open.test-task-case-subpage-open .test-task-variables-field {
          background: var(--panel) !important;
          border: 1px solid var(--line) !important;
          border-top: 1px solid var(--line) !important;
          border-radius: 14px !important;
          padding: 14px !important;
          margin: 0 0 12px !important;
        }

        /* 参数行：4 列单行（字段名 | 值 | 组标识 | ×），× 不换行——API 参数子页 + WSS 订阅参数通用 */
        body.task-editor-open .parameter-row {
          grid-template-columns: minmax(66px, 0.62fr) minmax(0, 1fr) minmax(48px, 0.4fr) 30px !important;
          gap: 6px !important;
          align-items: start !important;
        }

        body.task-editor-open .parameter-row .parameter-remove-btn {
          width: 30px;
          min-width: 30px;
          height: 40px;
          padding: 0;
        }

        /* WSS 单页展示（不下钻），用例 caserow 去掉 › 箭头 */
        body.task-editor-open .wss-task-builder-section .test-task-selected-list > .test-task-item::after {
          display: none !important;
        }

        /* 子页返回栏 fixed top */
        body.task-editor-open.test-task-case-subpage-open .test-task-case-subpage-topbar {
          display: flex !important;
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          height: 56px;
          align-items: center;
          gap: 2px;
          padding: 0 10px;
          background: #ffffff;
          border-bottom: 1px solid var(--line);
          z-index: 55;
        }

        html:not(.light-theme) body.task-editor-open.test-task-case-subpage-open .test-task-case-subpage-topbar {
          background: #0e1422;
        }

        body.task-editor-open.test-task-case-subpage-open .test-task-case-subpage-back {
          width: 40px;
          height: 40px;
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          border: 0;
          background: transparent;
          color: var(--text);
          cursor: pointer;
          padding: 0;
        }

        body.task-editor-open.test-task-case-subpage-open .test-task-case-subpage-back svg {
          width: 22px;
          height: 22px;
        }

        body.task-editor-open.test-task-case-subpage-open .test-task-case-subpage-title {
          font-size: 17px;
          font-weight: 800;
          color: var(--text);
          flex: 1;
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        /* ⑤ 内联跨请求断言分区（用例列表下方常驻）*/
        body.task-editor-open .test-task-inline-cross-assertions {
          display: block !important;
          margin: 4px 0 12px;
        }

        body.task-editor-open .test-task-cross-assertion-head {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin: 2px 2px 10px;
        }

        body.task-editor-open .test-task-cross-assertion-head b {
          font-size: 14px;
          font-weight: 800;
        }

        body.task-editor-open .test-task-cross-assertion-head .cnt {
          color: var(--soft);
          font-weight: 400;
          margin-left: 4px;
        }

        body.task-editor-open .test-task-cross-assertion-add {
          font-size: 11.5px;
          font-weight: 700;
          color: var(--primary);
          background: var(--primary-surface);
          border: 1px solid rgba(37, 99, 235, 0.24);
          border-radius: 9px;
          padding: 5px 11px;
          cursor: pointer;
        }

        body.task-editor-open .test-task-cross-assertion-list {
          display: flex;
          flex-direction: column;
          gap: 8px;
        }

        body.task-editor-open .test-task-cross-assertion-card {
          display: flex;
          align-items: center;
          gap: 9px;
          background: var(--panel);
          border: 1px solid var(--line);
          border-left: 3px solid var(--success, #16a34a);
          border-radius: 11px;
          padding: 11px 12px;
          cursor: pointer;
        }

        body.task-editor-open .test-task-cross-assertion-card.disabled {
          border-left-color: var(--soft, #94a3b8);
          opacity: 0.72;
        }

        body.task-editor-open .test-task-cross-assertion-card .cn {
          flex: 1;
          min-width: 0;
        }

        body.task-editor-open .test-task-cross-assertion-card .cn .n {
          font-size: 13px;
          font-weight: 600;
          color: var(--text);
        }

        body.task-editor-open .test-task-cross-assertion-card .cn .m {
          font-size: 10.5px;
          color: var(--soft);
          margin-top: 2px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        body.task-editor-open .test-task-cross-assertion-card .st {
          font-size: 11px;
          flex: 0 0 auto;
        }

        body.task-editor-open .test-task-cross-assertion-card .st.on {
          color: var(--success, #16a34a);
        }

        body.task-editor-open .test-task-cross-assertion-card .st.off {
          color: var(--soft);
        }

        body.task-editor-open .test-task-cross-assertion-card .rmx {
          width: 22px;
          height: 22px;
          border-radius: 6px;
          background: var(--danger-surface, rgba(225, 29, 72, 0.12));
          color: var(--danger, #e11d48);
          border: 0;
          font-size: 13px;
          flex: 0 0 auto;
          cursor: pointer;
        }

        body.task-editor-open .test-task-cross-assertion-empty {
          font-size: 11.5px;
          color: var(--soft);
          padding: 10px 2px;
        }

        /* ⑧ 用例·参数配置子页样式（WSS editor 的 parameter/assertion pane 保留）*/
        body.task-editor-open .wss-task-parameter-pane,
        body.task-editor-open .wss-task-assertion-pane {
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 14px;
          padding: 14px;
          margin: 0 0 12px;
        }

        body.task-editor-open .test-task-parameter-pane .test-task-parameter-head,
        body.task-editor-open .test-task-assertion-pane .test-task-parameter-head {
          display: flex;
          justify-content: space-between;
          align-items: baseline;
          margin-bottom: 10px;
        }

        body.task-editor-open .test-task-parameter-pane .test-task-section-title,
        body.task-editor-open .test-task-assertion-pane .test-task-section-title {
          font-size: 14px;
          font-weight: 800;
        }

        body.task-editor-open .test-task-parameter-actions {
          display: flex;
          justify-content: flex-end;
          margin-top: 8px;
        }

        body.task-editor-open .test-task-parameter-actions .btn {
          font-size: 11.5px;
          font-weight: 700;
          padding: 5px 11px;
          border-radius: 9px;
          background: var(--primary-surface);
          color: var(--primary);
          border: 1px solid rgba(37, 99, 235, 0.24);
          min-height: 0;
        }

        body.task-editor-open .test-task-variables-field {
          border-top: 1px solid var(--line);
          padding-top: 12px;
          margin-top: 2px;
        }

        body.task-editor-open .test-task-variable-head {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 8px;
        }

        body.task-editor-open .test-task-variable-note {
          display: block;
          font-size: 10.5px;
          color: var(--soft);
          margin-top: 2px;
        }

        body.task-editor-open #testTaskAddVariableBtn {
          font-size: 11.5px;
          font-weight: 700;
          padding: 5px 11px;
          border-radius: 9px;
          background: var(--primary-surface);
          color: var(--primary);
          border: 1px solid rgba(37, 99, 235, 0.24);
          min-height: 0;
        }

        /* 用例 section-head 卡片外分区标签 */
        body.task-editor-open > * .test-task-section-head {
          margin: 4px 2px 10px;
        }

        body.task-editor-open .test-task-selected-list {
          display: flex;
          flex-direction: column;
          gap: 8px;
        }

        /* 用例行样式（v8 caserow） */
        body.task-editor-open .test-task-selected-list > * {
          display: flex;
          align-items: center;
          gap: 9px;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 11px;
          padding: 11px 12px;
        }

        /* Story#22 §③：移动端概览 Hero 汇总卡 */
        body.desktop-view-config .test-task-mobile-hero {
          display: block;
          margin: 0 0 14px;
        }

        body.desktop-view-config .mhero-ctx {
          display: flex;
          align-items: center;
          gap: 8px;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 12px;
          padding: 10px 12px;
          margin-bottom: 12px;
        }

        body.desktop-view-config .mhero-ctx-lbl {
          font-size: 11px;
          color: var(--soft, #94a3b8);
        }

        body.desktop-view-config .mhero-ctx-val {
          font-size: 14px;
          font-weight: 800;
          flex: 1;
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        body.desktop-view-config .mhero-ctx-sw {
          font-size: 12px;
          color: var(--primary, #2563eb);
          font-weight: 700;
          background: transparent;
          border: 0;
          padding: 4px 6px;
        }

        body.desktop-view-config .mhero-card {
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 18px;
          padding: 16px;
          box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
        }

        body.desktop-view-config .mhero-top {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 8px;
          margin-bottom: 12px;
        }

        body.desktop-view-config .mhero-name {
          font-size: 15px;
          font-weight: 800;
        }

        body.desktop-view-config .mhero-env {
          font-size: 11px;
          color: var(--muted);
          margin-top: 2px;
        }

        body.desktop-view-config .mhero-pill {
          font-size: 11px;
          font-weight: 700;
          padding: 3px 9px;
          border-radius: 20px;
          background: var(--field, #f1f5f9);
          color: var(--muted);
          white-space: nowrap;
          flex: 0 0 auto;
        }

        body.desktop-view-config .mhero-pill.bad {
          background: var(--danger-surface, rgba(225, 29, 72, 0.14));
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config .mhero-pill.ok {
          background: var(--success-surface, rgba(22, 163, 74, 0.14));
          color: var(--success, #16a34a);
        }

        body.desktop-view-config .mhero-pill.running {
          background: var(--primary-surface, rgba(37, 99, 235, 0.14));
          color: var(--primary, #2563eb);
        }

        body.desktop-view-config .mhero-mid {
          display: flex;
          align-items: center;
          gap: 16px;
        }

        body.desktop-view-config .mhero-donut {
          width: 104px;
          height: 104px;
          border-radius: 50%;
          flex: 0 0 auto;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        body.desktop-view-config .mhero-donut-hole {
          width: 74px;
          height: 74px;
          border-radius: 50%;
          background: var(--panel);
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          box-shadow: inset 0 0 0 1px var(--line);
        }

        body.desktop-view-config .mhero-donut-hole b {
          font-size: 20px;
          font-weight: 800;
          color: var(--success, #16a34a);
        }

        body.desktop-view-config .mhero-donut-hole b.bad {
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config .mhero-donut-hole span {
          font-size: 10px;
          color: var(--muted);
        }

        body.desktop-view-config .mhero-mini {
          flex: 1;
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 8px;
        }

        body.desktop-view-config .mhero-mbox {
          background: var(--field-soft);
          border: 1px solid var(--line);
          border-radius: 11px;
          padding: 8px 10px;
        }

        body.desktop-view-config .mhero-mbox .v {
          font-size: 17px;
          font-weight: 800;
        }

        body.desktop-view-config .mhero-mbox .l {
          font-size: 10.5px;
          color: var(--muted);
        }

        body.desktop-view-config .mhero-mbox.ok .v {
          color: var(--success, #16a34a);
        }

        body.desktop-view-config .mhero-mbox.bad .v {
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config .mhero-strip {
          display: flex;
          gap: 8px;
          margin-top: 12px;
        }

        body.desktop-view-config .mhero-strip .s {
          flex: 1;
          text-align: center;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 11px;
          padding: 9px 4px;
        }

        body.desktop-view-config .mhero-strip .s .v {
          font-size: 15px;
          font-weight: 800;
        }

        body.desktop-view-config .mhero-strip .s .l {
          font-size: 10px;
          color: var(--muted);
          margin-top: 2px;
        }

        /* 移动端"最近结果"历史列表容器：桌面隐藏，移动端恢复显示（PC 用 result-card 环形卡）*/
        body.desktop-view-config .test-task-recent-history {
          display: block;
        }

        /* Story#22 §③：移动端"最近结果"时间线行 */
        body.desktop-view-config .test-task-mobile-runrow {
          display: flex !important;
          width: 100%;
          align-items: center;
          gap: 10px;
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 13px;
          padding: 11px 13px;
          margin: 6px 0 9px;
          text-align: left;
          cursor: pointer;
        }

        body.desktop-view-config .test-task-mobile-runrow-empty {
          display: block !important;
        }

        body.desktop-view-config .test-task-mobile-runrow-when {
          flex: 1;
          min-width: 0;
        }

        body.desktop-view-config .test-task-mobile-runrow-when .d {
          font-size: 12.5px;
          font-weight: 600;
          color: var(--text);
        }

        body.desktop-view-config .test-task-mobile-runrow-when .s {
          font-size: 11px;
          color: var(--soft);
          margin-top: 2px;
        }

        body.desktop-view-config .test-task-mobile-runrow-pill {
          font-size: 11px;
          font-weight: 700;
          padding: 3px 9px;
          border-radius: 20px;
          flex: 0 0 auto;
        }

        body.desktop-view-config .test-task-mobile-runrow-pill.bad {
          background: var(--danger-surface, rgba(225, 29, 72, 0.14));
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config .test-task-mobile-runrow-pill.ok {
          background: var(--success-surface, rgba(22, 163, 74, 0.14));
          color: var(--success, #16a34a);
        }

        body.desktop-view-config .test-task-mobile-runrow-empty {
          display: block;
          padding: 12px;
          color: var(--soft);
          font-size: 12px;
        }

        /* 概览页移动端隐藏原环形卡+两行冗余 meta+直接子"最近结果"标题（用历史列表代替，
           标题由 .test-task-recent-history 内的「最近结果 近N次」承担，避免重复）*/
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-result-card,
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > .test-task-summary-title,
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > [data-test-task-recent-time],
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > [data-test-task-recent-meta],
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > [data-test-task-group-recent-time],
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > [data-test-task-group-recent-meta],
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > [data-wss-task-recent-time],
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent > [data-wss-task-recent-meta] {
          display: none !important;
        }


        body.desktop-view-config .test-task-summary-panel {
          display: flex;
          flex-direction: column;
          gap: 12px;
          overflow: visible;
          padding: 0;
        }

        body.desktop-view-config .test-task-summary-card,
        body.desktop-view-config .test-task-summary-result-card {
          border-radius: 10px;
        }

        body.desktop-view-config .test-task-summary-title,
        body.desktop-view-config .test-task-result-chart-title {
          white-space: normal;
          overflow-wrap: anywhere;
        }

        body.desktop-view-config .test-task-summary-stats {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
        }

        body.desktop-view-config .test-task-summary-stat {
          min-width: 0;
        }

        body.desktop-view-config .test-task-summary-result-overview,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-overview {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          grid-template-areas:
            "title"
            "ring"
            "legends"
            "stats";
          justify-items: stretch;
          gap: 12px;
          min-width: 0;
          padding: 14px;
        }

        body.desktop-view-config .test-task-summary-result-overview .test-task-result-chart-title,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-chart-title {
          grid-area: title;
          width: 100%;
          text-align: left;
        }

        body.desktop-view-config .test-task-summary-result-overview .test-task-result-ring,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-ring {
          grid-area: ring;
          width: min(168px, 58vw);
          justify-self: center;
        }

        body.desktop-view-config .test-task-summary-result-legends,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-legend {
          grid-area: legends;
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
          width: 100%;
          justify-self: stretch;
        }

        body.desktop-view-config .test-task-summary-result-legend-group {
          gap: 8px;
        }

        body.desktop-view-config .test-task-summary-result-overview .test-task-result-legend-item,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-legend-item {
          grid-template-columns: auto minmax(0, 1fr) auto;
          gap: 6px;
          min-width: 0;
        }

        body.desktop-view-config .test-task-summary-result-stats,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-stat-grid {
          grid-area: stats;
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
          width: 100%;
        }

        body.desktop-view-config .test-task-summary-result-stat {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 4px;
          min-width: 0;
          padding: 10px;
          border-radius: 8px;
          background: rgba(148, 163, 184, 0.08);
        }

        body.desktop-view-config .test-task-summary-result-stat-label,
        body.desktop-view-config .test-task-result-stat-label {
          font-size: 11px;
          white-space: normal;
        }

        body.desktop-view-config .test-task-summary-result-stat-value,
        body.desktop-view-config .test-task-result-stat-value {
          min-width: 0;
          font-size: 13px;
          white-space: normal;
          overflow-wrap: anywhere;
        }

        body.desktop-view-config .test-task-summary-actions {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 8px;
        }

        body.desktop-view-config .test-task-summary-run-action-slot,
        body.desktop-view-config .test-task-summary-run-action-slot > .btn,
        body.desktop-view-config .test-task-summary-run-action-slot > .test-task-run-inline-control {
          width: 100%;
        }

        body.desktop-view-config .test-task-run-inline-control {
          grid-template-columns: minmax(0, 1fr) 54px 54px;
          width: 100%;
        }

        body.desktop-view-schedule .scheduled-task-list {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          padding-bottom: 10px;
        }

        body.desktop-view-schedule .scheduled-task-item,
        .scheduled-task-dialog .scheduled-task-item {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          align-items: stretch;
          /* Story#19 续 20：原型卡片高度 ~92px，原 gap:12 padding:14 让现状到 138px。
             压紧 gap/padding 让 1 屏能放 5.5 条对齐原型。 */
          gap: 4px;
          padding: 10px 12px;
          border-radius: 12px;
        }

        body.desktop-view-schedule .scheduled-task-main,
        .scheduled-task-dialog .scheduled-task-main {
          min-width: 0;
        }

        body.desktop-view-schedule .scheduled-task-title,
        .scheduled-task-dialog .scheduled-task-title {
          /* 续 20：14px / 行高 1.3 压紧标题行 */
          font-size: 14px;
          line-height: 1.3;
          white-space: normal;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
        }

        body.desktop-view-schedule .scheduled-task-meta,
        .scheduled-task-dialog .scheduled-task-meta {
          font-size: 13px;
          line-height: 1.55;
          white-space: normal;
          overflow-wrap: anywhere;
        }

        body.desktop-view-schedule .scheduled-task-actions,
        .scheduled-task-dialog .scheduled-task-actions {
          display: grid;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 10px;
          width: 100%;
        }

        body.desktop-view-schedule .scheduled-task-actions .btn,
        .scheduled-task-dialog .scheduled-task-actions .btn {
          width: 100%;
          min-width: 0;
          min-height: 44px;
          padding: 0 8px;
          border-radius: 12px;
          font-size: 13px;
          white-space: nowrap;
        }

        body.desktop-view-schedule .scheduled-task-empty,
        .scheduled-task-dialog .scheduled-task-empty {
          padding: 18px 14px;
          font-size: 13px;
        }

        /* M5 移动端定时巡检：复用桌面 schedule UI，调整间距与触控热区 */
        /* 移动端 3-tab 架构：PC head + PC overview + PC toolbar 默认隐藏；
           m-appbar / m-tabbar 显示；tab 切换由 desktopSchedulePage[data-schedule-mobile-tab] 控制 */
        body.desktop-view-schedule .schedule-page-head,
        body.desktop-view-schedule .schedule-overview {
          display: none !important;
        }
        body.desktop-view-schedule .schedule-m-appbar {
          display: flex;
        }
        body.desktop-view-schedule .schedule-m-tabbar {
          /* 续 18：复用共享 .mobile-tabbar 的 grid 布局，不再强制 flex */
          display: grid;
        }
        /* Story#18：移动端列表 tab 按原型严格简化（PM 反馈进一步对齐） ——
           1) m-appbar（◀ 定时任务 +）整条隐藏——原型只有顶部「定时」title bar
           2) PC「列表/日程」视图切换按钮——移动端用底部 tab 切换
           3)「排序：失败优先…」提示文本——原型未画
           4) chips 隐藏「连续失败 / 正常」两个，只留全部/失败/已停用 3 个
           5) 搜索框——原型未画
           6) 任务卡内：标题前缀「定时运行 ·」、类型 badge、连败/失败/缺失/停用
              status badge、趋势条、3 主按钮、⋯ 菜单——原型 PRD §8 移动端列表 tab
              "点卡片展开历史"，操作走 PC。 */
        body.desktop-view-schedule .schedule-m-appbar {
          display: none !important;
        }
        body.desktop-view-schedule .schedule-viewtoggle,
        body.desktop-view-schedule .schedule-sort-hint {
          display: none !important;
        }
        body.desktop-view-schedule .schedule-chip[data-schedule-filter="streak"],
        body.desktop-view-schedule .schedule-chip[data-schedule-filter="normal"] {
          display: none !important;
        }
        /* 续 12：移动端「已停用」chip 显示为「停用」（同原型） */
        body.desktop-view-schedule .schedule-chip[data-schedule-filter="off"] {
          font-size: 0;
        }
        body.desktop-view-schedule .schedule-chip[data-schedule-filter="off"]::before {
          content: "停用";
          font-size: 12px;
        }
        body.desktop-view-schedule .schedule-search {
          display: none !important;
        }
        body.desktop-view-schedule .schedule-title-prefix,
        body.desktop-view-schedule .schedule-trend {
          display: none !important;
        }
        /* Story#19 续 25：移动端列表卡任务名后补回类型 badge（原型 138 line 547-）
           原 mobile 隐藏 .schedule-type-badge，本次撤销。badge 复用 PC 同款
           .badge-api/.badge-wss/.badge-group 配色。 */
        /* 续 12：移动端显示展开 ▾ chevron（PC 隐藏） */
        body.desktop-view-schedule .scheduled-task-chev {
          display: inline-flex;
          align-items: center;
          margin-left: 6px;
          color: var(--muted);
        }
        body.desktop-view-schedule .scheduled-task-chev svg {
          width: 16px;
          height: 16px;
        }
        body.desktop-view-schedule .scheduled-task-item.open .scheduled-task-chev {
          transform: rotate(180deg);
          color: var(--primary, #3b82f6);
        }
        /* 续 14：撤销续 13 的 .next 蓝边——用户反馈蓝色填充+蓝边是"选中态"
           不该常驻。.next 卡跟其他 3 张一样默认灰边；蓝色填充蓝边只在
           .active（chip filter 命中）时出现，由 styles.css 控制。 */
        /* 续 9：原型 .m-task.fail 只改 border-color 不加背景填充，
           现状给失败卡加了浅红底太重，移动端去掉背景填充只保留红边框。 */
        body.desktop-view-schedule .scheduled-task-item.status-streak,
        body.desktop-view-schedule .scheduled-task-item.status-failed {
          background: transparent !important;
        }
        html.light-theme body.desktop-view-schedule .scheduled-task-item.status-streak,
        html.light-theme body.desktop-view-schedule .scheduled-task-item.status-failed {
          background: transparent !important;
        }
        /* 续 4：status badge 只隐藏 streak/failed/missing（红色边框已表达失败状态），
           保留 .badge-off「已停用」灰色 chip——原型停用卡保留此标记。 */
        body.desktop-view-schedule .schedule-status-badge:not(.badge-off) {
          display: none !important;
        }
        body.desktop-view-schedule .scheduled-task-actions,
        body.desktop-view-schedule .scheduled-task-menu-wrap {
          display: none !important;
        }
        /* Story#19：移动端收起态「编辑」按钮（标题行右侧）+ 展开态 4 按钮 ops */
        body.desktop-view-schedule .schedule-task-m-edit-btn {
          /* 续 21：恢复合理按钮 padding/font 让形状不变形；
             min-height 显式 auto 抵消全局 button { min-height: 40px }
             撑高造成"形状不对"。按钮高度自然由 padding+font 决定 (~28px)。 */
          display: inline-flex;
          align-items: center;
          flex: 0 0 auto;
          margin-left: 6px;
          padding: 4px 10px;
          border: 1px solid var(--line-strong);
          border-radius: 7px;
          background: transparent;
          color: var(--text);
          font-size: 12px;
          line-height: 1.4;
          min-height: 0;
          cursor: pointer;
        }
        /* 续 20：title 单行不 wrap，避免 head 撑到 40px 让卡片偏高 */
        body.desktop-view-schedule .scheduled-task-title {
          -webkit-line-clamp: 1 !important;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap !important;
        }
        body.desktop-view-schedule .scheduled-task-item.open .schedule-task-m-ops {
          display: grid;
          grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: 6px;
          margin-top: 8px;
        }
        body.desktop-view-schedule .scheduled-task-item .schedule-task-m-ops {
          display: none;
        }
        body.desktop-view-schedule .schedule-task-m-op {
          padding: 7px 4px;
          font-size: 12px;
          border: 1px solid var(--line-strong);
          border-radius: 8px;
          background: transparent;
          color: var(--text);
          cursor: pointer;
        }
        body.desktop-view-schedule .schedule-task-m-op.primary {
          background: var(--primary, #3b82f6);
          border-color: var(--primary, #3b82f6);
          color: #fff;
        }
        body.desktop-view-schedule .schedule-task-m-op.danger {
          color: #fca5a5;
          border-color: rgba(239, 68, 68, 0.4);
        }
        html.light-theme body.desktop-view-schedule .schedule-task-m-op.danger {
          color: #b91c1c;
          border-color: rgba(239, 68, 68, 0.5);
        }
        /* Story#19 续：disabled 置灰不可点 */
        body.desktop-view-schedule .schedule-task-m-op[disabled] {
          opacity: 0.45;
          cursor: not-allowed;
        }
        /* Story#19：移动端 chip 行右侧「+ 新建」按钮（原型 .m-new-btn） */
        body.desktop-view-schedule .schedule-m-new-btn {
          display: inline-flex;
          align-items: center;
          flex: 0 0 auto;
          margin-left: auto;
          padding: 6px 12px;
          border: 0;
          border-radius: 8px;
          background: var(--primary, #3b82f6);
          color: #fff;
          font-size: 12px;
          font-weight: 600;
          white-space: nowrap;
          cursor: pointer;
        }
        /* 移动端用 mobile-only 两行短副信息替代 PC 单长行 */
        body.desktop-view-schedule .scheduled-task-sub {
          display: none !important;
        }
        body.desktop-view-schedule .scheduled-task-sub-mobile {
          /* 续 20：压紧 sub 行间距，对齐原型 .m-sub 紧凑布局 */
          display: block;
          color: var(--muted);
          font-size: 12px;
          margin: 0 0 0 20px;
          line-height: 1.4;
        }
        /* 列表 tab 时：显示 toolbar + list，藏 overview/agenda */
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="list"] .schedule-toolbar { display: flex; }
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="list"] .scheduled-task-list { display: flex; flex-direction: column; gap: 8px; }
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="list"] .schedule-mobile-overview,
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="list"] .schedule-agenda { display: none !important; }
        /* 概览 tab 时：显示 mobile-overview，藏 toolbar + list + agenda */
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="overview"] .schedule-mobile-overview { display: flex; }
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="overview"] .schedule-toolbar,
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="overview"] .scheduled-task-list,
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="overview"] .schedule-agenda { display: none !important; }
        /* 日程 tab 时：显示 agenda，藏其他 */
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="agenda"] .schedule-agenda { display: flex; }
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="agenda"] .schedule-toolbar,
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="agenda"] .scheduled-task-list,
        body.desktop-view-schedule .desktop-schedule-page[data-schedule-mobile-tab="agenda"] .schedule-mobile-overview { display: none !important; }
        /* 列表容器底部留 m-tabbar 高度 + safe area，防止 tab 栏遮挡最后一条 */
        body.desktop-view-schedule .desktop-page-body {
          padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 16px);
        }
        /* Story#18：移动端历史行按原型紧凑单行 ——
           时间 · 元信息(失败N条·耗时) · 状态(🔴/🟢) · "查看详情"链接，全部 inline 一行。
           原 .scheduled-task-dialog 路径保留旧 wrap 行为不动。 */
        body.desktop-view-schedule .schedule-history-row {
          flex-wrap: nowrap;
          gap: 8px;
          padding: 8px 10px;
          font-size: 12.5px;
          align-items: center;
        }
        body.desktop-view-schedule .schedule-history-row > .htime {
          width: auto;
          min-width: 64px;
          flex: 0 0 auto;
          font-size: 12.5px;
          color: var(--muted);
        }
        body.desktop-view-schedule .schedule-history-row > .hmeta-full {
          display: none;
        }
        body.desktop-view-schedule .schedule-history-row > .hmeta-short {
          /* 元信息在中间，让 hstat+btn 整体右对齐（margin-left:auto 在 btn 上） */
          display: inline;
          order: 0;
          margin-top: 0;
          flex: 0 0 auto;
          color: var(--muted);
        }
        /* 移动端隐藏「明细已清理」黄色 badge——原型未画，节省宽度让 meta 完整显示 */
        body.desktop-view-schedule .schedule-history-row > .htag.tag-evict {
          display: none;
        }
        /* 续 8：状态灯改成工作台断言列表 .assertion-enabled-dot 同款小圆灯
           （8x8 圆点 + 同色光晕 box-shadow），不要 chip 不要 emoji 不要文字。 */
        body.desktop-view-schedule .schedule-history-row > .hstat {
          order: 0;
          flex: 0 0 8px;
          margin-left: auto;
          margin-right: 8px;
          width: 8px;
          height: 8px;
          border-radius: 999px;
          font-size: 0;
          line-height: 0;
          padding: 0;
        }
        body.desktop-view-schedule .schedule-history-row > .hstat.fail {
          background: #ef4444;
          box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
        }
        body.desktop-view-schedule .schedule-history-row > .hstat.pass {
          background: #22c55e;
          box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
        }
        body.desktop-view-schedule .schedule-history-row > .hstat.stopped {
          background: #94a3b8;
          box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
        }
        body.desktop-view-schedule .schedule-history-row .hstat-emoji,
        body.desktop-view-schedule .schedule-history-row .hstat-text {
          display: none;
        }
        /* 续 5：取消 row-evicted 的 opacity 暗化——原型蓝色一致，且实际生产
           hasDetail 几乎为 true（明细未淘汰），此 dim 只影响"明细已清理"罕见场景 */
        body.desktop-view-schedule .schedule-history-row.row-evicted {
          opacity: 1;
        }
        /* 查看详情按钮 → 文字链接风格，紧贴在 hstat 后（无 margin-left:auto，
           让 hstat 已经 margin-left:auto 把整组推右）。disabled 仍蓝色保持视觉一致。 */
        body.desktop-view-schedule .schedule-history-row > .btn,
        body.desktop-view-schedule .schedule-history-row > .btn-sm {
          background: transparent !important;
          border: 0 !important;
          padding: 0 !important;
          min-height: 0 !important;
          margin-left: 4px !important;
          font-size: 13px;
          color: var(--primary) !important;
          font-weight: 500;
          order: 0;
          flex: 0 0 auto;
        }
        /* Story#18 续 3：原型移动端展开后直接是 3 行历史，无"运行历史"标题、
           无嵌套圆角容器。隐藏 head + 去掉外层容器装饰让 row 紧贴卡片底部。 */
        body.desktop-view-schedule .schedule-history-head {
          display: none !important;
        }
        body.desktop-view-schedule .scheduled-task-history {
          background: transparent !important;
          border: 0 !important;
          border-radius: 0 !important;
          /* 原型 .m-history 顶部有一条横分隔线 + padding-top 留白 */
          border-top: 1px solid var(--line) !important;
          margin: 9px 0 0 0;
          padding-top: 6px;
          overflow: visible;
        }
        body.desktop-view-schedule .schedule-history-row:first-child {
          border-top: 0;
        }
        /* 兼容旧 modal 路径（弹窗使用），保持现有 wrap 行为 */
        .scheduled-task-dialog .schedule-history-row {
          flex-wrap: wrap;
          row-gap: 4px;
        }
        .scheduled-task-dialog .schedule-history-row > .htime {
          width: auto;
          min-width: 72px;
        }
        .scheduled-task-dialog .schedule-history-row > .hmeta {
          flex: 1 1 100%;
          order: 2;
          margin-top: 2px;
        }
        .scheduled-task-dialog .schedule-history-row > .hstat {
          order: 1;
        }
        .scheduled-task-dialog .schedule-history-row > .btn-sm {
          order: 3;
          margin-left: auto;
          min-height: 32px;
        }
        /* L*：移动端 weekday 单字 36×36 一行 7 列 */
        .schedule-weekdays-picker {
          display: flex !important;
          flex-wrap: nowrap;
          gap: 6px;
          justify-content: space-between;
        }
        .schedule-weekday-btn {
          width: 40px;
          height: 40px;
          padding: 0;
          font-size: 13px;
        }
        /* 目标选择器：填满视口宽度 */
        .schedule-target-dialog {
          width: 96vw !important;
          max-width: none !important;
        }
        .schedule-target-item {
          min-height: 44px;
          font-size: 14px;
        }

        body.desktop-view-config .test-task-editor.open .test-task-editor-content,
        body.desktop-view-config .wss-task-editor.open .wss-task-editor-content,
        body.desktop-view-config .test-task-group-editor-content.open,
        body.task-editor-open .test-task-editor.open .test-task-editor-content,
        body.task-editor-open .wss-task-editor.open .wss-task-editor-content,
        body.task-editor-open .test-task-group-editor-content.open {
          position: fixed;
          inset: 0;
          z-index: 1200;
          display: grid;
          width: 100vw;
          height: 100dvh;
          padding: 0;
          transform: none;
          overflow: hidden;
          background: rgba(15, 23, 42, 0.36);
        }

        body.desktop-view-config .test-task-editor.open::before,
        body.desktop-view-config .wss-task-editor.open::before,
        body.task-editor-open .test-task-editor.open::before,
        body.task-editor-open .wss-task-editor.open::before {
          z-index: 1190;
        }

        body.desktop-view-config .test-task-builder-section,
        body.desktop-view-config .wss-task-builder-section,
        body.desktop-view-config .test-task-group-builder-section {
          width: 100%;
          height: 100%;
          max-height: none;
          border: 0;
          border-radius: 0;
          display: flex;
          flex-direction: column;
          gap: 0;
          padding: 16px 14px 0;
          overflow: hidden;
        }

        body.desktop-view-config .test-task-editor-close {
          top: 12px;
          right: 12px;
          width: 44px;
          height: 44px;
          border-radius: 14px;
          font-size: 24px;
        }

        body.desktop-view-config .test-task-builder-head {
          flex: 0 0 auto;
          padding: 0 54px 12px 0;
        }

        body.desktop-view-config .test-task-builder-head .test-task-section-title {
          font-size: 18px;
        }

        body.desktop-view-config .test-task-fields,
        body.desktop-view-config .wss-task-fields,
        body.desktop-view-config .test-task-group-fields {
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          flex: 0 0 auto;
          padding-bottom: 12px;
        }

        body.desktop-view-config .test-task-name-field,
        body.desktop-view-config .test-task-env-field,
        body.desktop-view-config .test-task-variables-field,
        body.desktop-view-config .wss-task-name-field,
        body.desktop-view-config .wss-task-params-field {
          grid-column: auto;
        }

        body.desktop-view-config .test-task-variable-head {
          align-items: flex-start;
        }

        body.desktop-view-config .test-task-variable-head-copy {
          display: grid;
          gap: 4px;
        }

        body.desktop-view-config .test-task-variable-head-copy .config-sub-label {
          margin-bottom: 0;
        }

        body.desktop-view-config .test-task-variable-row {
          grid-template-columns: minmax(96px, 0.44fr) minmax(0, 1fr) 32px;
        }

        body.desktop-view-config .test-task-config-grid,
        body.desktop-view-config .test-task-group-config-grid {
          display: flex;
          flex: 1 1 auto;
          flex-direction: column;
          gap: 12px;
          min-height: 0;
          height: 100%;
          margin-top: 12px;
          overflow: auto;
          padding: 0 0 12px;
        }

        body.desktop-view-config .test-task-api-column,
        body.desktop-view-config .test-task-parameter-pane,
        body.desktop-view-config .test-task-assertion-pane,
        body.desktop-view-config .test-task-group-config-grid > div {
          min-height: 0;
        }

        body.desktop-view-config .test-task-api-picker-controls {
          grid-template-columns: minmax(0, 1fr);
        }

        body.desktop-view-config .test-task-selected-list,
        body.desktop-view-config .test-task-parameter-pane,
        body.desktop-view-config .test-task-assertion-pane,
        body.desktop-view-config .test-task-group-task-options,
        body.desktop-view-config .test-task-group-selected-list {
          max-height: none;
          overflow: auto;
          padding-right: 0;
        }

        body.desktop-view-config .wss-task-fields {
          flex: 1 1 auto;
          overflow: auto;
          padding-right: 2px;
        }

        body.desktop-view-config .wss-task-params-field textarea {
          min-height: 260px;
          resize: none;
        }

        body.desktop-view-config .wss-task-run-options {
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          flex: 0 0 auto;
          padding: 12px 0;
        }

        body.desktop-view-config .test-task-editor-actions {
          position: sticky;
          bottom: 0;
          z-index: 4;
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 10px;
          flex: 0 0 auto;
          margin: 0 -14px;
          padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
          border-top: 1px solid rgba(148, 163, 184, 0.14);
          background: var(--panel);
        }

        body.desktop-view-config .wss-task-editor-actions,
        body.desktop-view-config .wss-task-builder-section .test-task-editor-actions {
          grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        body.desktop-view-config .test-task-editor-actions .test-config-action {
          min-width: 0;
          min-height: 44px;
          padding-inline: 8px;
          white-space: normal;
        }

        body.desktop-view-config .test-task-group-editor-backdrop {
          display: none;
        }

        .assertion-dialog {
          width: calc(100vw - 24px);
          max-height: calc(100vh - 72px);
        }

        .task-assert-group-field-head {
          align-items: center;
        }

        .task-assert-group-field-add {
          min-width: 92px;
          min-height: 36px;
          padding: 0 8px;
          white-space: nowrap;
        }

        .task-assert-group-field-row {
          grid-template-columns: minmax(0, 1fr) 44px;
        }

        .task-assert-group-field-row select,
        .task-assert-group-field-row input {
          min-height: 44px;
        }

        .task-assert-group-field-row input {
          grid-column: 1 / -1;
        }

        .task-assert-group-field-remove {
          width: 44px;
          height: 44px;
        }
      }

      /* 移动端最终布局覆盖：放在文件末尾，确保覆盖前面的历史响应式规则。 */
      @media (max-width: 768px) {
        body {
          --mobile-tabbar-height: 68px;
          --mobile-business-chrome-height: 56px;
          --mobile-primary-nav-height: 58px;
          --mobile-top-total-height: calc(var(--mobile-business-chrome-height) + var(--mobile-primary-nav-height));
          padding-top: var(--mobile-business-chrome-height);
        }

        button,
        input,
        select,
        textarea,
        [role="button"] {
          touch-action: manipulation;
        }

        .mobile-top-bar {
          height: var(--mobile-business-chrome-height);
          padding: 6px 12px;
        }

        .mobile-top-status {
          min-height: 44px;
          max-width: calc(50% - 32px);
          padding: 0 4px;
        }

        body.desktop-view-wss .mobile-top-status,
        body.mobile-tab-profile .mobile-top-status {
          min-height: 44px;
        }

        .mobile-profile-btn {
          width: 44px;
          height: 44px;
          min-height: 44px;
          flex: 0 0 44px;
        }

        .desktop-sidebar {
          flex-basis: var(--mobile-primary-nav-height);
          height: var(--mobile-primary-nav-height);
          padding: 7px 12px;
        }

        .desktop-nav {
          width: 100%;
          gap: 8px;
        }

        .desktop-nav-btn {
          flex: 1 1 0;
          min-width: 0;
          min-height: 44px;
          padding: 0 8px;
          border-radius: 14px;
          font-size: 13px;
        }

        .desktop-nav-btn[data-desktop-view="workbench"] {
          flex: 1.08 1 0;
        }

        .mobile-tabbar,
        .test-task-mobile-tabbar,
        .wss-mobile-tabbar {
          height: var(--mobile-tabbar-height);
          padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
        }

        .mobile-tab,
        .test-task-mobile-tab,
        .wss-mobile-tab {
          min-height: 52px;
          border-radius: 14px;
          font-size: 12px;
        }

        .mobile-panel-copy-btn,
        body.mobile-tab-response #copyResponseBtn,
        .param-reset-btn {
          width: 44px;
          min-width: 44px;
          max-width: 44px;
          height: 44px;
          min-height: 44px;
          max-height: 44px;
          border-radius: 12px;
        }

        .actions .btn,
        .tool-toolbar-actions .btn {
          min-height: 44px;
        }

        body.desktop-view-config .desktop-page-body {
          padding: 10px 12px max(14px, env(safe-area-inset-bottom, 0px));
          background: var(--mobile-page-bg, var(--bg));
        }

        html.light-theme body.desktop-view-config .desktop-page-body {
          background: var(--mobile-page-bg);
        }

        body.desktop-view-config .test-task-layout {
          display: flex;
          flex-direction: column;
          gap: 12px;
          min-height: 0;
          height: auto;
          overflow: visible;
        }

        body.desktop-view-config .test-task-editor,
        body.desktop-view-config .test-task-side {
          display: flex;
          flex-direction: column;
          gap: 12px;
          min-height: 0;
          overflow: visible;
        }

        body.desktop-view-config .test-task-start-panel {
          display: none !important;
        }

        body.desktop-view-config .test-task-saved-section,
        body.desktop-view-config .test-task-group-section,
        body.desktop-view-config .test-task-result-section {
          display: flex;
          flex-direction: column;
          gap: 12px;
          min-height: 0;
          padding: 14px;
          border-radius: 16px;
          background: var(--panel);
          overflow: visible;
        }

        html.light-theme body.desktop-view-config .test-task-saved-section,
        html.light-theme body.desktop-view-config .test-task-group-section,
        html.light-theme body.desktop-view-config .test-task-result-section {
          background: #ffffff;
          border-color: rgba(148, 163, 184, 0.22);
        }

        body.desktop-view-config .test-task-list,
        body.desktop-view-config .test-task-group-list,
        body.desktop-view-config .test-task-summary-panel {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 10px;
          max-height: none;
          overflow: visible;
          padding: 0;
        }

        body.desktop-view-config .test-task-new-card {
          grid-template-columns: 44px minmax(0, 1fr);
          min-height: 68px;
          padding: 12px;
          border-radius: 14px;
        }

        body.desktop-view-config .test-task-new-plus {
          width: 40px;
          height: 40px;
          border-radius: 12px;
          font-size: 24px;
        }

        body.desktop-view-config .test-task-saved-item {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          min-height: 0;
          padding: 14px;
          border-radius: 14px;
        }

        body.desktop-view-config .test-task-saved-main {
          min-width: 0;
          padding-right: 50px;
        }

        body.desktop-view-config .test-task-card-menu {
          top: 10px;
          right: 10px;
        }

        body.desktop-view-config .test-task-card-menu-btn,
        body.desktop-view-wss .test-task-card-menu-btn {
          width: 44px;
          height: 44px;
          min-height: 44px;
          border-radius: 12px;
        }

        body.desktop-view-config .test-task-card-menu-options,
        body.desktop-view-wss .test-task-card-menu-options {
          min-width: 128px;
        }

        body.desktop-view-config .test-task-card-menu-option,
        body.desktop-view-wss .test-task-card-menu-option {
          min-height: 44px;
          padding: 10px 12px;
          font-size: 13px;
        }

        body.desktop-view-config .test-task-saved-actions {
          display: grid;
          grid-template-columns: minmax(92px, 0.32fr) minmax(0, 1fr);
          gap: 10px;
          align-items: center;
        }

        body.desktop-view-config .test-task-saved-actions .test-config-action,
        body.desktop-view-wss .test-task-saved-actions .test-config-action,
        body.desktop-view-config .test-task-summary-actions .test-config-action,
        body.desktop-view-config .test-task-section-head .test-config-action {
          min-height: 44px;
          border-radius: 12px;
          font-size: 13px;
        }

        body.desktop-view-config .test-task-result-section {
          margin-bottom: 0;
        }

        body.desktop-view-config .test-task-summary-card,
        body.desktop-view-config .test-task-summary-result-card {
          border-radius: 14px;
        }

        body.desktop-view-wss .wss-page {
          overflow: auto;
          -webkit-overflow-scrolling: touch;
        }

        body.desktop-view-wss .wss-layout {
          display: flex;
          flex-direction: column;
          gap: 12px;
          height: auto;
          min-height: 100%;
          padding: 10px 12px max(14px, env(safe-area-inset-bottom, 0px));
          overflow: visible;
          box-sizing: border-box;
        }

        body.desktop-view-wss .wss-debugger-native {
          flex: 0 0 clamp(500px, calc(100dvh - 190px), 620px);
          min-height: 500px;
          border-radius: 16px;
          background: var(--panel);
        }

        body.desktop-view-wss .wss-task-panel {
          flex: 0 0 auto;
          min-height: 0;
          max-height: none;
          padding: 14px;
          border-radius: 16px;
          overflow: visible;
        }

        body.desktop-view-wss .wss-task-list {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 10px;
          max-height: none;
          overflow: visible;
          padding: 0;
        }

        body.desktop-view-profile .profile-row {
          grid-template-columns: minmax(86px, 0.34fr) minmax(0, 1fr);
          min-height: 58px;
          padding: 10px 16px;
        }

        body.desktop-view-profile .profile-inline-control,
        body.desktop-view-profile .profile-row-action {
          min-height: 44px;
        }

        body.desktop-view-profile .profile-edit-btn,
        body.desktop-view-profile .profile-row-link-btn,
        body.desktop-view-profile .profile-enter-btn {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          width: 44px;
          min-width: 44px;
          height: 44px;
          min-height: 44px;
          padding: 0;
          border-radius: 12px;
        }

        body.desktop-view-profile .profile-edit-btn {
          justify-content: flex-start;
        }

        body.desktop-view-profile .profile-setting-select {
          width: auto;
          justify-self: end;
          min-height: 44px;
          padding: 0 12px;
          border-radius: 12px;
          font-size: 14px;
        }

        body.desktop-view-profile .profile-row > .profile-enter-btn {
          justify-self: end;
        }

        .wss-task-toggle,
        .test-task-group-toggle {
          min-height: 44px;
          padding: 10px 12px;
          border-radius: 12px;
        }

        .wss-task-toggle input,
        .test-task-group-toggle input {
          width: 22px;
          height: 22px;
          min-height: 22px;
        }

        .new-task-dialog {
          width: calc(100vw - 28px);
          border-radius: 18px;
        }

        .assertion-dialog-head .icon-btn,
        #closeNewTaskModalBtn {
          width: 44px;
          min-width: 44px;
          height: 44px;
          min-height: 44px;
          border-radius: 12px;
        }

        .new-task-options {
          grid-template-columns: minmax(0, 1fr);
          gap: 10px;
        }

        .new-task-option {
          min-height: 112px;
          padding: 16px;
          border-radius: 14px;
        }

        body.task-editor-open .test-task-saved-section,
        body.task-editor-open .test-task-group-section,
        body.task-editor-open .test-task-side,
        body.task-editor-open .test-task-start-panel {
          visibility: hidden;
          pointer-events: none;
        }

        body.task-editor-open .test-config-page .desktop-page-body {
          padding: 0;
        }

        body.desktop-view-config .test-task-editor.open .test-task-editor-content,
        body.desktop-view-config .wss-task-editor.open .wss-task-editor-content,
        body.desktop-view-config .test-task-group-editor-content.open,
        body.task-editor-open .test-task-editor.open .test-task-editor-content,
        body.task-editor-open .wss-task-editor.open .wss-task-editor-content,
        body.task-editor-open .test-task-group-editor-content.open {
          background: var(--panel);
        }

        body.desktop-view-config .test-task-builder-section,
        body.desktop-view-config .wss-task-builder-section,
        body.desktop-view-config .test-task-group-builder-section {
          padding: 18px 14px 0;
        }

        body.desktop-view-config .test-task-editor-actions .test-config-action {
          min-height: 48px;
          border-radius: 14px;
        }
      }

      /* 移动端最终布局收口：必须置于文件末尾，覆盖前面的历史响应式规则。 */
      @media (max-width: 768px) {
        .login-card input,
        .password-input-wrap input,
        .login-link-btn,
        .password-visibility-btn,
        body.mobile-tab-config input,
        body.mobile-tab-config select,
        body.mobile-tab-config textarea,
        body.desktop-view-config input,
        body.desktop-view-config select,
        body.desktop-view-config textarea,
        body.desktop-view-wss input,
        body.desktop-view-wss select,
        body.desktop-view-wss textarea {
          min-height: 44px;
          font-size: 14px;
        }

        .password-visibility-btn {
          width: 44px;
          min-width: 44px;
          height: 44px;
          min-height: 44px;
          right: 8px;
        }

        .login-link-btn {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          min-height: 44px;
          padding: 0 6px;
        }

        /* 非当前模式的切换按钮必须隐藏：.login-link-btn 的 display 覆盖了 .login-mode-panel{display:none}，
           这里用更高特异性补回隐藏 */
        .login-link-btn.login-mode-panel:not(.active) {
          display: none;
        }

        body.mobile-tab-config .lang-actions {
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 8px;
        }

        body.mobile-tab-config .lang-btn,
        .mobile-response-tabs .tab-btn,
        body.mobile-tab-log .tab-btn,
        body.mobile-tab-log #logFilterBtn,
        #wssPage .inspector-tab {
          min-height: 44px;
          border-radius: 12px;
        }

        body.mobile-tab-config .parameter-add-btn {
          min-height: 44px;
          border-radius: 12px;
        }

        body.desktop-view-config .desktop-page-body {
          height: 100%;
          overflow-y: auto;
          overflow-x: hidden;
          -webkit-overflow-scrolling: touch;
          padding: 10px 12px calc(18px + env(safe-area-inset-bottom, 0px));
        }

        body.desktop-view-config .test-task-layout,
        body.desktop-view-config .test-task-editor,
        body.desktop-view-config .test-task-side {
          display: flex;
          flex-direction: column;
          width: 100%;
          min-width: 0;
          min-height: 0;
          height: auto;
          overflow: visible;
          gap: 12px;
        }

        body.desktop-view-config .test-task-editor,
        body.desktop-view-config .test-task-side {
          flex: 0 0 auto;
        }

        body.desktop-view-config .test-task-saved-section,
        body.desktop-view-config .test-task-group-section,
        body.desktop-view-config .test-task-result-section {
          position: static;
          display: flex;
          flex: 0 0 auto;
          flex-direction: column;
          gap: 12px;
          width: 100%;
          min-height: 0;
          height: auto;
          max-height: none;
          padding: 14px;
          overflow: visible;
          border-radius: 16px;
          contain: layout paint;
        }

        body.desktop-view-config .test-task-saved-section .test-task-list,
        body.desktop-view-config .test-task-group-section .test-task-group-list,
        body.desktop-view-config .test-task-summary-panel {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          grid-auto-rows: auto;
          align-content: start;
          gap: 10px;
          width: 100%;
          min-height: 0;
          height: auto;
          max-height: none;
          padding: 0;
          overflow: visible;
        }

        body.desktop-view-config .test-task-saved-item,
        body.desktop-view-config .test-task-saved-item:hover {
          transform: none !important;
        }

        body.desktop-view-config .test-task-saved-actions {
          grid-template-columns: minmax(104px, 0.34fr) minmax(0, 1fr);
          gap: 10px;
        }

        body.desktop-view-config .test-task-saved-actions .test-config-action,
        body.desktop-view-config .test-task-summary-actions .test-config-action,
        body.desktop-view-config .test-task-summary-title-row .test-config-action,
        body.desktop-view-config .test-task-run-inline-action,
        body.desktop-view-config .test-task-section-head .test-config-action,
        body.desktop-view-wss #wssSaveTaskBtn {
          min-height: 44px;
          border-radius: 12px;
          font-size: 13px;
        }

        body.desktop-view-config .test-task-run-inline-control {
          grid-template-columns: minmax(0, 1fr) 58px 58px;
          gap: 8px;
        }

        body.desktop-view-config .test-task-run-inline-action {
          padding: 8px;
        }

        body.desktop-view-config .test-task-summary-stats,
        body.desktop-view-config .test-task-summary-result-stats,
        body.desktop-view-config .test-task-summary-result-card .test-task-result-stat-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        body.desktop-view-config .test-task-group-task-options .test-config-action,
        body.desktop-view-config .test-task-group-selected-list .test-config-action,
        body.desktop-view-config .test-task-group-config-grid .test-config-action {
          min-width: 64px;
          min-height: 44px;
          border-radius: 12px;
          font-size: 13px;
        }

        body.desktop-view-config .test-task-group-task-options,
        body.desktop-view-config .test-task-group-selected-list {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 10px;
        }

        body.desktop-view-config .test-task-group-config-grid {
          overflow-y: auto;
          overflow-x: hidden;
          padding-bottom: 12px;
        }

        body.desktop-view-config .test-task-group-builder-section {
          padding-bottom: 0;
        }

        body.desktop-view-config .test-task-editor-actions {
          box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
        }

        body.desktop-view-wss .wss-layout {
          padding: 10px 12px 18px;
        }

        body.desktop-view-wss .wss-debugger-native {
          flex-basis: min(620px, calc(100dvh - 170px));
          min-height: min(620px, calc(100dvh - 170px));
          overflow: hidden;
        }

        body.desktop-view-wss .wss-task-panel-head {
          align-items: center;
        }

        body.desktop-view-wss .wss-task-panel-head .test-config-action {
          min-width: 104px;
          min-height: 44px;
          border-radius: 14px;
        }

        body.desktop-view-profile .profile-row {
          grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr);
          min-height: 64px;
        }

        body.desktop-view-workbench.mobile-tab-docs .right-stack,
        body.desktop-view-workbench.mobile-tab-test .right-stack,
        body.desktop-view-workbench.mobile-tab-response .right-stack,
        body.desktop-view-workbench.mobile-tab-log .right-stack {
          display: flex;
          flex-direction: column;
          height: 100%;
          min-height: 0;
          overflow: hidden;
          padding-bottom: 0;
        }

        body.desktop-view-workbench.mobile-tab-test .right-stack > .panel:first-child {
          display: flex;
          flex: 1 1 0;
          height: auto;
          min-height: 0;
        }

        body.desktop-view-workbench.mobile-tab-test .request-detail-panel .panel-body,
        body.desktop-view-workbench.mobile-tab-test .request-detail-shell,
        body.desktop-view-workbench.mobile-tab-test .tool-viewer {
          flex: 1 1 0;
          height: 100%;
          min-height: 0;
        }

        body.desktop-view-workbench.mobile-tab-test .tool-content {
          flex: 1 1 auto;
          min-height: 0;
          overflow: auto;
          padding: 12px;
        }

        body.desktop-view-workbench.mobile-tab-test .tool-stack {
          min-height: 100%;
          overflow: visible;
        }

        body.desktop-view-workbench.mobile-tab-test .assertion-list {
          flex: 1 1 auto;
          min-height: 180px;
          overflow: auto;
        }
      }

      /* 移动端业务页最终覆盖：手机浏览器和 App WebView 使用同一套沉浸式页面规则。 */
      @media (max-width: 768px) {
        body,
        .shell,
        .layout,
        body:not(.desktop-view-workbench) .shell,
        body:not(.desktop-view-workbench) .layout {
          background: var(--mobile-page-bg, var(--bg));
        }

        .mobile-top-bar,
        .desktop-sidebar {
          background: var(--mobile-page-bg, var(--bg));
          border-color: transparent;
          box-shadow: none;
          -webkit-backdrop-filter: none;
          backdrop-filter: none;
        }

        html:not(.light-theme) .mobile-top-bar,
        html:not(.light-theme) .desktop-sidebar {
          background: var(--mobile-chrome-bg);
        }

        html:not(.light-theme) .desktop-sidebar {
          border-bottom-color: rgba(96, 165, 250, 0.14);
        }

        .desktop-sidebar {
          padding: 6px 12px 8px;
        }

        body:not(.desktop-view-workbench) .shell,
        body:not(.desktop-view-workbench) .layout,
        body.task-editor-open .shell,
        body.task-editor-open .layout {
          height: calc(100dvh - var(--mobile-business-chrome-height));
          min-height: 0;
        }

        /* Story#22 v8：全屏编辑页已覆盖顶部模块导航 chrome，不再减 chrome 高度——撑满视口，
           否则底部保存栏 sticky 停在矮容器末尾、下方露出背景空白。放在上面 not-workbench 规则后覆盖之。 */
        body.task-editor-open .shell,
        body.task-editor-open .layout {
          height: 100dvh;
          min-height: 0;
        }

        body:not(.desktop-view-workbench) .layout {
          display: flex;
          flex-direction: column;
          gap: 0;
        }

        body:not(.desktop-view-workbench) .layout > .desktop-page,
        body:not(.desktop-view-workbench) .layout > .profile-page {
          flex: 1 1 auto;
          min-height: 0;
          height: auto;
        }

        body.desktop-view-config .test-config-page,
        body.desktop-view-schedule .desktop-schedule-page,
        body.desktop-view-profile .profile-page,
        body.desktop-view-wss .wss-page {
          background: var(--mobile-page-bg, var(--bg));
        }

        body.desktop-view-config .test-config-page > .panel,
        body.desktop-view-schedule .desktop-schedule-page > .panel,
        body.desktop-view-profile .profile-page > .panel {
          background: transparent;
        }

        body.desktop-view-config .desktop-page-body,
        html.light-theme body.desktop-view-config .desktop-page-body {
          background: var(--mobile-page-bg, var(--bg));
        }

        body.desktop-view-config .test-task-saved-section,
        body.desktop-view-config .test-task-group-section,
        body.desktop-view-config .test-task-result-section,
        body.desktop-view-config .test-task-summary-card,
        body.desktop-view-config .test-task-summary-result-card {
          background: var(--panel);
          border: 1px solid var(--line);
          box-shadow: none;
        }

        html.light-theme body.desktop-view-config .test-task-saved-section,
        html.light-theme body.desktop-view-config .test-task-group-section,
        html.light-theme body.desktop-view-config .test-task-result-section,
        html.light-theme body.desktop-view-config .test-task-summary-card,
        html.light-theme body.desktop-view-config .test-task-summary-result-card {
          background: var(--panel);
          border-color: var(--line);
        }

        body.desktop-view-config .test-task-saved-item,
        body.desktop-view-config .test-task-new-card,
        body.desktop-view-config .test-task-group-item,
        body.desktop-view-config .test-task-group-summary-item,
        body.desktop-view-config .test-task-summary-stat {
          background: var(--field-soft);
          border-color: var(--line);
        }

        html.light-theme body.desktop-view-config .test-task-saved-item,
        html.light-theme body.desktop-view-config .test-task-new-card,
        html.light-theme body.desktop-view-config .test-task-group-item,
        html.light-theme body.desktop-view-config .test-task-group-summary-item,
        html.light-theme body.desktop-view-config .test-task-summary-stat {
          background: var(--field);
          border-color: var(--line);
        }

        .test-task-result-drawer {
          z-index: 120;
        }

        .test-task-result-drawer-backdrop {
          background: var(--bg);
          -webkit-backdrop-filter: none;
          backdrop-filter: none;
        }

        .test-task-result-drawer-panel {
          position: fixed;
          inset: 0;
          display: grid;
          grid-template-rows: auto minmax(0, 1fr);
          gap: 0;
          width: 100vw;
          height: 100dvh;
          padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px));
          border: 0;
          border-radius: 0;
          background: var(--bg);
          box-shadow: none;
          transform: none;
          overflow: hidden;
          box-sizing: border-box;
        }

        .test-task-result-drawer-head {
          position: sticky;
          top: 0;
          z-index: 2;
          display: grid;
          grid-template-columns: minmax(0, 1fr) 44px;
          align-items: start;
          gap: 10px;
          padding: 0 0 10px;
          border-bottom: 1px solid var(--line);
          background: var(--bg);
        }

        .test-task-result-drawer-title {
          font-size: 16px;
          line-height: 1.35;
        }

        .test-task-result-drawer-status-row {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 8px;
          margin-top: 4px;
        }

        .test-task-result-drawer-status-row .test-task-section-meta,
        .test-task-result-drawer-controls {
          grid-column: auto;
          grid-row: auto;
          justify-self: stretch;
          width: 100%;
        }

        .test-task-result-status-primary,
        .test-task-result-status-secondary {
          flex-wrap: wrap;
          gap: 4px 7px;
          white-space: normal;
        }

        .test-task-result-status-name,
        .test-task-result-status-text {
          overflow: visible;
          text-overflow: clip;
          overflow-wrap: anywhere;
        }

        .test-task-result-drawer-controls .test-task-run-inline-control,
        .test-task-result-drawer-controls .test-task-summary-run-action-slot,
        .test-task-result-drawer-controls .test-config-action,
        .test-task-result-drawer-controls .btn {
          width: 100%;
        }

        .test-task-result-drawer-controls .test-task-run-inline-control {
          grid-template-columns: minmax(0, 1fr) 52px 52px;
        }

        .test-task-result-drawer-close {
          width: 44px;
          height: 44px;
          border-radius: 12px;
          border-color: var(--line);
          background: var(--field);
          font-size: 22px;
          touch-action: manipulation;
        }

        .test-task-result-drawer .test-task-result {
          height: 100%;
          min-height: 0;
          padding: 12px 0 0;
          overflow-x: hidden;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
        }

        .test-task-result-drawer .test-task-result.detail-mode {
          display: flex;
          flex-direction: column;
          gap: 12px;
          height: 100%;
          overflow-x: hidden;
          overflow-y: auto;
          padding-right: 0;
        }

        .test-task-result-drawer .test-task-result.detail-mode > .test-task-result-overview,
        .test-task-result-drawer .test-task-result-overview {
          display: grid;
          flex: 0 0 auto;
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          height: auto;
          min-height: 0;
          padding: 14px;
          overflow: visible;
          border-color: var(--line);
          border-radius: 16px;
          background: var(--panel);
        }

        .test-task-result-drawer .test-task-result-overview-summary {
          grid-column: auto;
          display: grid;
          grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
          grid-template-areas:
            "title title"
            "ring legends"
            "stats stats";
          align-items: center;
          gap: 10px 12px;
          width: 100%;
          min-width: 0;
        }

        .test-task-result-drawer .test-task-result-overview-summary .test-task-result-chart-title {
          grid-area: title;
          width: 100%;
          justify-self: start;
          text-align: left;
          white-space: normal;
          overflow-wrap: anywhere;
        }

        .test-task-result-drawer .test-task-result-overview-summary > .test-task-result-ring {
          grid-area: ring;
          width: min(116px, 100%);
          justify-self: center;
        }

        .test-task-result-drawer .test-task-result-overview-summary > .test-task-result-legend {
          grid-area: legends;
          align-content: center;
          width: 100%;
        }

        .test-task-result-drawer .test-task-result-overview-summary > .test-task-result-stat-grid {
          grid-area: stats;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          width: 100%;
        }

        .test-task-result-drawer .test-task-result-request-panel {
          grid-column: auto;
          height: auto;
          min-height: 0;
          border-color: var(--line);
          border-radius: 14px;
          background: var(--field-soft);
          overflow: hidden;
        }

        .test-task-result-drawer .test-task-result-overview > .test-task-result-request-panel {
          display: none;
        }

        .test-task-result-drawer .test-task-result-detail-request-slot {
          display: block;
          min-width: 0;
        }

        .test-task-result-drawer .test-task-result.detail-mode .test-task-result-request-panel {
          height: auto;
          align-self: stretch;
        }

        .test-task-result-drawer .test-task-result-request-tabs,
        .test-task-result-drawer .test-task-result-panel-head {
          gap: 8px;
          padding: 10px;
          overflow-x: auto;
          -webkit-overflow-scrolling: touch;
        }

        .test-task-result-drawer .test-task-result-tab,
        .test-task-result-drawer .test-task-result-filter-btn {
          min-height: 40px;
          border-radius: 12px;
          font-size: 13px;
          touch-action: manipulation;
        }

        .test-task-result-drawer .test-task-result-request-body,
        .test-task-result-drawer .test-task-result.detail-mode .test-task-result-request-body {
          height: auto;
          max-height: min(30dvh, 240px);
          overflow: auto;
          padding: 12px;
          -webkit-overflow-scrolling: touch;
        }

        .test-task-result-drawer .test-task-result-main {
          display: flex;
          flex: 0 0 auto;
          flex-direction: column;
          gap: 12px;
          min-height: 0;
          overflow: visible;
        }

        .test-task-result-drawer .test-task-result-case-pane {
          display: grid;
          flex: 0 0 auto;
          grid-template-rows: auto minmax(0, 1fr);
          gap: 10px;
          min-height: 0;
          overflow: visible;
          padding: 12px;
          border: 1px solid var(--line);
          border-radius: 16px;
          background: var(--panel);
        }

        .test-task-result-drawer .test-task-result-filter {
          gap: 8px;
          padding: 0 0 10px;
          overflow-x: auto;
          border-bottom-color: var(--line);
          -webkit-overflow-scrolling: touch;
        }

        .test-task-result-drawer .test-task-result-filter-btn {
          flex: 0 0 auto;
          width: auto;
          min-width: 92px;
          padding: 0 12px;
        }

        .test-task-result-drawer .test-task-result-case-list {
          max-height: min(46dvh, 380px);
          padding: 0 2px 0 0;
          overflow-x: hidden;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
        }

        .test-task-result-drawer .test-task-result-case {
          grid-template-columns: auto minmax(0, 1fr);
          grid-template-rows: auto auto;
          align-items: start;
          min-height: 86px;
          padding: 12px 10px;
          border-radius: 12px;
          background: var(--field-soft);
        }

        .test-task-result-drawer .test-task-result-case-tail {
          grid-column: 2;
          grid-row: 2;
          width: auto;
          justify-content: start;
          grid-template-columns: auto auto;
          gap: 10px;
          min-height: 20px;
          margin-top: 2px;
          text-align: left;
        }

        .test-task-result-drawer .test-task-result-case-badge {
          grid-row: 1 / span 2;
          align-self: start;
        }

        .test-task-result-drawer .test-task-result-case-body {
          grid-column: 2;
          grid-row: 1;
          gap: 4px;
        }

        .test-task-result-drawer .test-task-result-case-code,
        .test-task-result-drawer .test-task-result-case-duration {
          display: inline-flex;
          align-items: center;
          min-height: 20px;
          line-height: 20px;
        }

        .test-task-result-drawer .test-task-result-case-title,
        .test-task-result-drawer .test-task-result-case-path,
        .test-task-result-drawer .test-task-result-case-meta,
        .test-task-result-drawer .test-task-result-detail-title,
        .test-task-result-drawer .test-task-result-detail-meta {
          white-space: normal;
          overflow-wrap: anywhere;
        }

        .test-task-result-drawer .test-task-result-detail,
        .test-task-result-drawer .test-task-result-detail.empty {
          grid-column: auto;
          display: grid;
          flex: 0 0 auto;
          grid-template-rows: auto;
          gap: 12px;
          min-height: 0;
          overflow: visible;
        }

        .test-task-result-drawer .test-task-result-detail.empty .empty-state {
          min-height: 160px;
        }

        .test-task-result-drawer .test-task-result-detail-head,
        .test-task-result-drawer .test-task-result-panel,
        .test-task-result-drawer .test-task-response-block {
          border-color: var(--line);
          border-radius: 14px;
          background: var(--panel);
        }

        .test-task-result-drawer .test-task-result-panel {
          display: grid;
          flex: 0 0 auto;
          grid-template-rows: auto auto;
          min-height: 0;
          overflow: visible;
        }

        .test-task-result-drawer .test-task-result-panel-body {
          min-height: 0;
          overflow: visible;
          padding: 12px;
        }

        .test-task-result-drawer .test-task-response-detail {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 12px;
          min-height: 0;
        }

        .test-task-result-drawer .test-task-response-block {
          display: grid;
          flex: 0 0 auto;
          grid-template-rows: auto minmax(120px, auto);
          min-height: 0;
          overflow: hidden;
        }

        .test-task-result-drawer .test-task-response-block-title {
          align-items: flex-start;
          padding: 10px 12px;
        }

        .test-task-result-drawer .test-task-response-block-title-meta {
          white-space: normal;
          overflow-wrap: anywhere;
          text-align: right;
        }

        .test-task-result-drawer .test-task-response-block-body {
          max-height: min(58dvh, 520px);
          min-height: 120px;
          overflow: auto;
          padding: 12px;
          -webkit-overflow-scrolling: touch;
        }

        .test-task-result-drawer .wss-result-log-head {
          grid-template-columns: auto auto minmax(0, 1fr);
        }

        .test-task-result-drawer .wss-result-log-size {
          grid-column: 1 / -1;
          justify-self: end;
        }

        .test-task-result-drawer .wss-result-log-json {
          max-height: min(56dvh, 520px);
        }

        .test-task-result-drawer .test-task-response-block .header-table {
          min-width: 0;
        }

        .test-task-result-drawer .test-task-response-block .header-row {
          grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
        }

        .test-task-result-drawer .test-task-response-block .header-key,
        .test-task-result-drawer .test-task-response-block .header-value {
          min-width: 0;
          overflow-wrap: anywhere;
        }

        body.desktop-view-wss #wssPage.wss-page {
          height: 100%;
          padding: 0;
          overflow: hidden;
        }

        body.desktop-view-wss .wss-layout {
          display: block;
          height: 100%;
          min-height: 0;
          padding: 0;
          overflow: hidden;
          background: var(--bg);
        }

        body.desktop-view-wss .wss-debugger-native {
          width: 100%;
          height: calc(100% - var(--mobile-tabbar-height));
          min-height: 0;
          flex: 1 1 auto;
          border: 0;
          border-radius: 0;
          background: var(--bg);
          overflow: hidden;
        }

        /* 与工作台测试/日志页一致：WSS 非连接页内容不贴边，留 12px 侧边间隙 */
        body.desktop-view-wss #wssPage .grid > div:last-child {
          padding: 0 12px;
          box-sizing: border-box;
        }

        body.desktop-view-wss #wssPage.mobile-tab-subscriptions .mobile-subscription-page {
          padding-left: 0;
          padding-right: 0;
        }

        body.desktop-view-wss .wss-task-panel,
        body.desktop-view-wss #wssSaveTaskBtn {
          display: none !important;
        }

        body.desktop-view-wss:not(.task-editor-open) .wss-mobile-tabbar {
          display: grid;
        }

        body:not(.desktop-view-wss) .wss-mobile-tabbar,
        body.task-editor-open .wss-mobile-tabbar {
          display: none !important;
        }

        body.desktop-view-wss .theme-floating-toggle {
          bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 12px);
        }

        /* WSS 日志筛选栏（移动端）：筛选 pills 左侧，心跳/滚动/清空固定靠右，导出隐藏 */
        #wssPage .log-filters {
          display: flex;
          flex-direction: row;
          flex-wrap: nowrap;
          align-items: center;
          gap: 8px;
        }

        #wssPage .log-filter-group-primary {
          flex: 0 1 auto;
          overflow-x: auto;
          flex-wrap: nowrap;
        }

        #wssPage .log-filter-group-toggles {
          margin-left: auto;
          flex: 0 0 auto;
          display: flex;
          align-items: center;
          gap: 8px;
        }

        #wssPage .log-filter-group-toggles button {
          width: auto;
        }

        #wssPage .wss-log-clear-btn {
          flex: 0 0 auto;
          min-height: 34px;
          padding: 6px 14px;
        }

        #wssPage .wss-log-export-btn {
          display: none;
        }

        /* ① 去掉模块导航：profile / cloud 页隐藏 tab 栏，视觉更聚焦 */
        /* 模块导航隐藏：profile / 个人云盘页聚焦内容 */
        body.desktop-view-profile .desktop-sidebar,
        body.desktop-view-cloud .desktop-sidebar { display: none; }

        /* 悬浮主题按钮：不压在卡片上，调到右下角更低位置 */
        body.desktop-view-profile .theme-floating-toggle {
          bottom: max(24px, env(safe-area-inset-bottom, 0px) + 24px);
          opacity: 0.45;
        }

        body.desktop-view-profile .profile-page {
          display: block;
          height: 100%;
          min-height: 0;
          padding: 16px 16px calc(80px + env(safe-area-inset-bottom, 0px));
          overflow-y: auto;
          overflow-x: hidden;
          -webkit-overflow-scrolling: touch;
          box-sizing: border-box;
          background: var(--bg);
        }

        body.desktop-view-profile .profile-main-content > .profile-head { display: none; }

        /* 移动端：PC 双栏容器透明化（保持单列），隐藏 PC 标题。
           不限定 profile class，确保 desktop-view-profile / mobile-tab-profile 两条路径都生效 */
        .profile-pc-header { display: none; }
        .profile-pc-col { display: contents; }

        body.desktop-view-profile .profile-page > .panel,
        body.desktop-view-profile .profile-page > .panel > .panel-body,
        body.desktop-view-profile .profile-card {
          min-height: auto; height: auto; overflow: visible;
          background: transparent; border: 0; border-radius: 0; box-shadow: none;
        }

        body.desktop-view-profile .profile-head { display: none; }

        /* 每个分组卡片 */
        body.desktop-view-profile .profile-rows {
          overflow: hidden;
          border: 1px solid var(--line);
          border-radius: 14px;
          background: var(--panel);
          margin-bottom: 12px;
        }

        /* 行：统一高度、留白、极淡分割线 */
        body.desktop-view-profile .profile-row {
          min-height: 54px;
          padding: 13px 16px;
          border-bottom: 1px solid var(--line);
        }
        body.desktop-view-profile .profile-row:last-child { border-bottom: 0; }

        /* label 深色主角 */
        body.desktop-view-profile .profile-label {
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
        }

        /* 右侧值降权为配角：灰色细体 */
        body.desktop-view-profile .profile-value,
        body.desktop-view-profile .profile-nickname-text {
          text-align: right;
          font-weight: 400;
          font-size: 14px;
          color: var(--muted);
        }

        /* 昵称行：编辑图标与文字中线对齐 */
        body.desktop-view-profile .profile-inline-control {
          align-items: center;
          gap: 2px;
        }
        body.desktop-view-profile .profile-edit-btn {
          justify-content: flex-end;
          width: auto;
          min-width: unset;
          height: 28px;
          min-height: 28px;
          padding: 0 2px;
          border-radius: 6px;
        }

        /* 统一 chevron 箭头：软、淡、细 */
        /* 统一二级导航箭头：细、淡、一致 */
        body.desktop-view-profile .profile-chevron,
        body.desktop-view-profile .profile-avatar-chevron {
          font-size: 16px;
          font-weight: 300;
          color: var(--muted);
          opacity: 0.45;
          line-height: 1;
          margin-left: 4px;
          letter-spacing: -1px;
        }

        /* profile-enter-btn 在 profile 页只作为 chevron 容器，去掉 44px 盒子 */
        body.desktop-view-profile .profile-enter-btn {
          width: auto;
          min-width: unset;
          height: auto;
          min-height: unset;
          padding: 0;
          border-radius: 0;
          background: transparent;
          border: 0;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }

        /* 整行可点击的导航行（账号安全） */
        body.desktop-view-profile .profile-row-btn {
          width: 100%;
          min-height: 54px;
          padding: 13px 16px;
          border: 0;
          border-bottom: 1px solid var(--line);
          border-radius: 0;
          background: transparent;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 12px;
          cursor: pointer;
          text-align: left;
        }
        body.desktop-view-profile .profile-row-btn:last-child {
          border-bottom: 0;
        }
        body.desktop-view-profile .profile-row-btn .profile-label {
          pointer-events: none;
        }

        /* 下拉框：固定宽度统一、降低视觉重量 */
        body.desktop-view-profile .profile-setting-select {
          width: 104px;
          min-width: 104px;
          max-width: 104px;
          height: 34px;
          min-height: 34px;
          border: 1px solid var(--line-strong);
          border-radius: 8px;
          background: var(--field);
          font-size: 13px;
          font-weight: 400;
          color: var(--muted);
          padding: 0 8px;
          justify-self: end;
        }

        /* 断言配置：轻量设置组风格 */
        body.desktop-view-profile .profile-section {
          margin: 0 0 12px;
          padding: 0;
          border: 1px solid var(--line);
          border-radius: 14px;
          background: var(--panel);
          overflow: hidden;
        }
        /* 断言配置卡片小标题：轻量承接 */
        body.desktop-view-profile .profile-section-title {
          font-size: 13px;
          font-weight: 600;
          color: var(--text);
          padding: 12px 16px 0;
          margin: 0;
          opacity: 0.75;
        }
        body.desktop-view-profile .profile-section-hint {
          font-size: 12px;
          color: var(--muted);
          line-height: 1.5;
          padding: 4px 16px 10px;
          margin: 0;
          opacity: 0.75;
        }
        body.desktop-view-profile .assertion-package-actions {
          display: flex;
          flex-direction: column;
          gap: 0;
        }
        body.desktop-view-profile .assertion-package-btn {
          width: 100%;
          min-height: 52px;
          border-radius: 0;
          border: 0;
          /* 分割线从图标右侧开始，不贯穿全宽 */
          box-shadow: inset 0 1px 0 var(--line);
          background: transparent;
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
          display: flex;
          align-items: center;
          justify-content: flex-start;
          gap: 12px;
          padding: 12px 16px 12px 16px;
        }
        /* 分割线从图标右侧（16px padding + 32px icon + 12px gap = 60px）开始 */
        body.desktop-view-profile .assertion-package-btn + .assertion-package-btn {
          box-shadow: none;
        }
        body.desktop-view-profile .assertion-package-btn + .assertion-package-btn::before {
          content: "";
          position: absolute;
          left: 60px;
          right: 0;
          top: 0;
          height: 1px;
          background: var(--line);
          pointer-events: none;
        }
        body.desktop-view-profile .assertion-package-btn {
          position: relative;
        }
        body.desktop-view-profile .assertion-package-btn:first-child {
          box-shadow: inset 0 1px 0 var(--line);
        }
        body.desktop-view-profile .assertion-package-btn:last-of-type { border-radius: 0; }

        /* 语义图标：圆底色块 + 线性图标 */
        body.desktop-view-profile .profile-action-icon {
          flex: 0 0 32px;
          width: 32px;
          height: 32px;
          border-radius: 8px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
        body.desktop-view-profile .profile-action-icon svg {
          width: 18px;
          height: 18px;
        }
        body.desktop-view-profile .profile-action-icon--blue {
          background: var(--task-api-bg);
          color: var(--task-api-fg);
        }
        body.desktop-view-profile .profile-action-icon--teal {
          background: var(--task-wss-bg);
          color: var(--task-wss-fg);
        }
        body.desktop-view-profile .profile-action-icon--orange {
          background: rgba(234,88,12,0.10);
          color: #ea580c;
        }
        body.desktop-view-profile .profile-action-label {
          flex: 1;
          text-align: left;
        }

        /* 底部操作按钮：独立卡片，纵向堆叠 */
        body.desktop-view-profile .profile-bottom-actions {
          display: flex;
          flex-direction: column;
          gap: 10px;
        }
        body.desktop-view-profile .profile-bottom-btn {
          width: 100%;
          height: 52px;
          border-radius: 14px;
          border: 1px solid var(--line);
          background: var(--panel);
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
          display: flex;
          align-items: center;
          justify-content: flex-start;
          gap: 12px;
          padding: 0 16px;
        }
        body.desktop-view-profile .profile-bottom-btn .profile-chevron {
          margin-left: auto;
        }
        /* 退出登录：居中红字，无图标 */
        body.desktop-view-profile .danger-btn.profile-bottom-btn {
          justify-content: center;
          padding: 0;
          color: var(--danger);
          background: var(--panel);
          border-color: var(--line);
          font-weight: 500;
        }

        /* 账号安全行：主标题 + 副标题竖排，chevron 居右 */
        body.desktop-view-profile .profile-row-btn .profile-row-main {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          min-width: 0;
        }
        body.desktop-view-profile .profile-row-subtitle {
          font-size: 12px;
          font-weight: 400;
          color: var(--muted);
          line-height: 1.4;
        }

        /* 清除调试数据：图标 + 主标题 + 浅灰说明（仿注销账号） */
        body.desktop-view-profile .profile-bottom-btn--warn {
          height: auto;
          min-height: 56px;
          align-items: center;
          padding: 10px 16px;
        }
        body.desktop-view-profile .profile-bottom-btn--warn .profile-action-text {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          min-width: 0;
        }
        body.desktop-view-profile .profile-bottom-btn--warn .profile-action-label {
          flex: none;
          font-size: 15px;
        }
        body.desktop-view-profile .profile-bottom-btn--warn .profile-action-hint {
          font-size: 12px;
          font-weight: 400;
          color: var(--muted);
          text-align: left;
          line-height: 1.4;
        }

        /* ===== 账号安全二级设置页 ===== */
        /* 进入子页：隐藏全局顶栏（面包屑+头像）并移除其占位，由页内顶栏替代 */
        body.account-security-page-open .mobile-top-bar { display: none; }
        body.account-security-page-open { padding-top: 0; }
        body.account-security-page-open .profile-page { padding-top: 0; }

        /* 页内顶栏：返回箭头 + 标题，sticky 吸顶 */
        body.desktop-view-profile .account-security-topbar {
          position: sticky;
          top: 0;
          z-index: 5;
          height: 56px;
          display: flex;
          align-items: center;
          gap: 2px;
          margin: 0 -16px 8px;
          padding: 0 10px;
          background: var(--bg);
        }
        body.desktop-view-profile .account-security-back-btn {
          width: 40px;
          height: 40px;
          min-height: 40px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          border: 0;
          background: transparent;
          color: var(--text);
          cursor: pointer;
          padding: 0;
        }
        body.desktop-view-profile .account-security-back-btn svg {
          width: 22px;
          height: 22px;
        }
        body.desktop-view-profile .account-security-title {
          font-size: 17px;
          font-weight: 600;
          color: var(--text);
        }

        /* 安全设置行：label 左 + 状态值右 + chevron */
        body.desktop-view-profile .account-security-mode-btn {
          width: 100%;
          min-height: 58px;
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 12px 16px;
          border: 0;
          border-bottom: 1px solid var(--line);
          background: transparent;
          cursor: pointer;
          text-align: left;
        }
        body.desktop-view-profile .account-security-actions .account-security-mode-btn:last-child {
          border-bottom: 0;
        }
        body.desktop-view-profile .account-security-mode-btn:disabled {
          opacity: 0.5;
          cursor: default;
        }

        /* 设置组：label 与状态值同行两端对齐 */
        body.desktop-view-profile .account-security-actions .account-security-row-main {
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 8px;
          min-width: 0;
        }
        body.desktop-view-profile .account-security-row-label {
          font-size: 15px;
          font-weight: 400;
          color: var(--text);
        }
        body.desktop-view-profile .account-security-row-hint {
          font-size: 14px;
          font-weight: 400;
          color: var(--muted);
          text-align: right;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        /* chevron 统一浅灰 SVG */
        body.desktop-view-profile .account-security-mode-btn .profile-chevron {
          flex: 0 0 auto;
          display: inline-flex;
          align-items: center;
          color: var(--muted);
          opacity: 0.5;
        }
        body.desktop-view-profile .account-security-mode-btn .profile-chevron svg {
          width: 18px;
          height: 18px;
        }

        /* 危险组：注销账号单独卡，与设置组留 12px 间隙 */
        body.desktop-view-profile .account-security-danger-group {
          margin-bottom: 12px;
        }
        body.desktop-view-profile .account-security-delete-btn {
          align-items: center;
          border-bottom: 0;
        }
        body.desktop-view-profile .account-security-delete-btn .account-security-row-main {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          min-width: 0;
        }
        body.desktop-view-profile .account-security-row-label--danger {
          font-size: 15px;
          font-weight: 500;
          color: var(--danger);
        }
        body.desktop-view-profile .account-security-delete-btn .account-security-row-hint {
          font-size: 12px;
          font-weight: 400;
          color: var(--muted);
          text-align: left;
          white-space: normal;
          line-height: 1.4;
        }
        body.desktop-view-profile .profile-action-icon--red {
          background: rgba(239,68,68,0.10);
          color: var(--danger);
        }
      }

      /* 移动端任务页沉浸式布局：去掉桌面面板壳，避免页面套页面的嵌入感。 */
      @media (max-width: 768px) {
        body.desktop-view-config .test-config-page {
          display: block;
          width: 100%;
          height: 100%;
          min-height: 0;
          overflow: hidden;
          background: var(--bg);
        }

        body.desktop-view-config .test-config-page > .panel,
        body.desktop-view-config .test-config-page > .panel > .panel-body {
          width: 100%;
          height: 100%;
          min-height: 0;
          margin: 0;
          border: 0;
          border-radius: 0;
          background: var(--bg);
          box-shadow: none;
          overflow: hidden;
        }

        body.desktop-view-config .desktop-page-body,
        html.light-theme body.desktop-view-config .desktop-page-body {
          padding: 0;
          background: var(--bg);
        }

        body.desktop-view-config .test-task-layout {
          height: 100%;
          min-height: 0;
          padding: 12px 12px calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 18px);
          overflow-x: hidden;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          box-sizing: border-box;
        }

        body.desktop-view-config .test-task-editor,
        body.desktop-view-config .test-task-side {
          gap: 14px;
        }

        body.desktop-view-config .test-task-saved-section,
        body.desktop-view-config .test-task-group-section,
        body.desktop-view-config .test-task-result-section,
        html.light-theme body.desktop-view-config .test-task-saved-section,
        html.light-theme body.desktop-view-config .test-task-group-section,
        html.light-theme body.desktop-view-config .test-task-result-section {
          padding: 0;
          border: 0;
          border-radius: 0;
          background: transparent;
          box-shadow: none;
        }

        body.desktop-view-config .test-task-section-head {
          padding: 0 2px;
        }

        body.desktop-view-config .test-task-section-title {
          font-size: 15px;
          line-height: 1.35;
        }

        body.desktop-view-config .test-task-section-meta {
          margin-top: 3px;
          font-size: 12px;
        }

        body.desktop-view-config .test-task-list,
        body.desktop-view-config .test-task-group-list,
        body.desktop-view-config .test-task-summary-panel {
          gap: 10px;
          padding: 0;
        }

        body.desktop-view-config .test-task-new-card,
        html.light-theme body.desktop-view-config .test-task-new-card {
          min-height: 68px;
          border-radius: 14px;
          background: var(--panel);
          border-color: var(--line);
          box-shadow: none;
        }

        body.desktop-view-config .test-task-saved-item,
        body.desktop-view-config .test-task-saved-item:hover,
        html.light-theme body.desktop-view-config .test-task-saved-item,
        html.light-theme body.desktop-view-config .test-task-saved-item:hover {
          border-radius: 14px;
          background: var(--panel);
          border-color: var(--line);
          box-shadow: none;
        }

        body.desktop-view-config .test-task-saved-item.selected {
          border-color: rgba(37, 99, 235, 0.32);
          background: rgba(37, 99, 235, 0.14);
        }

        html.light-theme body.desktop-view-config .test-task-saved-item.selected {
          background: rgba(37, 99, 235, 0.08);
        }

        body.desktop-view-config .test-task-saved-title {
          font-size: 15px;
          line-height: 1.42;
        }

        body.desktop-view-config .test-task-saved-actions {
          grid-template-columns: minmax(104px, 0.36fr) minmax(0, 1fr);
        }

        body.desktop-view-config .test-task-saved-actions .test-config-action,
        body.desktop-view-config .test-task-summary-actions .test-config-action,
        body.desktop-view-config .test-task-section-head .test-config-action {
          min-height: 44px;
          border-radius: 12px;
        }

        body.desktop-view-config .test-task-card-menu-btn {
          background: var(--field);
          border-color: var(--line);
        }

        body.desktop-view-config .test-task-variable-head .test-config-action {
          min-width: 96px;
          min-height: 44px;
          border-radius: 12px;
        }

        body.desktop-view-config .test-task-variable-remove {
          width: 44px;
          min-width: 44px;
          height: 44px;
          min-height: 44px;
          border-radius: 12px;
        }

        body.desktop-view-config .test-task-result-section {
          padding-bottom: 0;
        }

        body.desktop-view-config .test-task-summary-card,
        body.desktop-view-config .test-task-summary-result-card,
        html.light-theme body.desktop-view-config .test-task-summary-card,
        html.light-theme body.desktop-view-config .test-task-summary-result-card {
          border-radius: 14px;
          background: var(--panel);
          border-color: var(--line);
          box-shadow: none;
        }

        body.desktop-view-workbench .theme-floating-toggle,
        body.desktop-view-wss .theme-floating-toggle,
        body.desktop-view-schedule .theme-floating-toggle {
          /* 续 24：schedule 跟 workbench/wss 一样让 theme 偏移到 tabbar 之上。
             根因实际在 JS：ui-actions.js clampFloatingThemeTogglePosition 漏了
             .schedule-m-tabbar，导致拖拽 inline style 把 theme 推到屏幕底。
             已修 JS。CSS 这里不再需要 !important。 */
          bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 12px);
        }

        body.desktop-view-profile .theme-floating-toggle {
          bottom: max(14px, env(safe-area-inset-bottom, 0px) + 14px);
        }

        body.desktop-view-config .test-task-mobile-tabbar {
          position: fixed;
          left: 0;
          right: 0;
          bottom: 0;
          z-index: 60;
          display: grid;
          grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: 0;
          height: var(--mobile-tabbar-height);
          padding: 6px 8px;
          box-sizing: border-box;
          background: var(--mobile-chrome-bg);
          border-top: 1px solid var(--mobile-chrome-border);
          box-shadow: var(--mobile-chrome-shadow-up);
          -webkit-backdrop-filter: var(--mobile-chrome-blur);
          backdrop-filter: var(--mobile-chrome-blur);
        }

        html.light-theme body.desktop-view-config .test-task-mobile-tabbar {
          background: var(--mobile-chrome-bg);
          border-top-color: var(--mobile-chrome-border);
        }

        body:not(.desktop-view-config) .test-task-mobile-tabbar,
        body.task-editor-open .test-task-mobile-tabbar {
          display: none !important;
        }

        body.desktop-view-config .theme-floating-toggle {
          bottom: calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 12px);
        }
      }

      /* Story#22：v2 信息卡替代原图标磁贴样式；旧规则由下一个 media block 集中覆盖。 */
      @media (max-width: 768px) {
        /* v8：section-head 里 title/meta 横排（对齐设计稿 sec-h：标题左，小字右）*/
        body.desktop-view-config .test-task-saved-section > .test-task-section-head > div,
        body.desktop-view-config .test-task-group-section > .test-task-section-head > div {
          display: flex;
          align-items: baseline;
          justify-content: space-between;
          gap: 8px;
          width: 100%;
        }

        body.desktop-view-config .test-task-saved-section > .test-task-section-head .test-task-section-title,
        body.desktop-view-config .test-task-group-section > .test-task-section-head .test-task-section-title {
          font-size: 15px;
          font-weight: 800;
        }

        body.desktop-view-config .test-task-saved-section > .test-task-section-head .test-task-section-meta,
        body.desktop-view-config .test-task-group-section > .test-task-section-head .test-task-section-meta {
          font-size: 12px;
          color: var(--soft);
          font-weight: 500;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          margin: 0;
        }

        body.desktop-view-config .test-task-saved-section .test-task-list {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          grid-auto-rows: auto;
          gap: 11px;
          align-items: stretch;
        }
        body.desktop-view-config .test-task-group-section .test-task-group-list {
          grid-template-columns: minmax(0, 1fr);
          grid-auto-rows: auto;
          gap: 11px;
          align-items: stretch;
        }

        body.desktop-view-config .test-task-list,
        body.desktop-view-config .test-task-group-list {
          overflow: visible;
        }

        /* 新建任务卡：跟其他卡片同尺寸，虚线大方块 */
        body.desktop-view-config .test-task-saved-section .test-task-new-card {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          min-height: 118px;
          padding: 12px;
          border: 1.5px dashed var(--line-strong, #d7dfe8);
          border-radius: 15px;
          background: var(--field-soft);
          gap: 6px;
          text-align: center;
          color: var(--primary, #2563eb);
          font-weight: 700;
          font-size: 13px;
        }

        body.desktop-view-config .test-task-saved-section .test-task-new-plus {
          font-size: 24px;
          line-height: 1;
          color: var(--primary, #2563eb);
          background: transparent;
          border: 0;
          box-shadow: none;
          padding: 0;
          margin: 0;
          width: auto;
          height: auto;
          font-weight: 700;
        }

        body.desktop-view-config .test-task-saved-section .test-task-new-text {
          font-size: 13px;
          color: var(--primary, #2563eb);
        }

        /* 组合新建卡：单行紫色虚线卡 */
        body.desktop-view-config .test-task-group-section .test-task-new-card {
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: center;
          gap: 8px;
          min-height: 60px;
          padding: 12px;
          border: 1.5px dashed var(--line-strong, #d7dfe8);
          border-radius: 15px;
          background: var(--field-soft);
          color: var(--primary, #2563eb);
          font-weight: 700;
          font-size: 13px;
        }

        body.desktop-view-config .test-task-group-section .test-task-new-plus {
          font-size: 20px;
          line-height: 1;
          color: var(--primary, #2563eb);
          background: transparent;
          border: 0;
          box-shadow: none;
          padding: 0;
          margin: 0;
          width: auto;
          height: auto;
          font-weight: 700;
        }

        body.desktop-view-config .test-task-group-section .test-task-new-text {
          font-size: 13px;
          color: var(--primary, #2563eb);
        }
      }

      /* Story#22：原"手机桌面图标"块已废弃，改由信息卡样式承担。 */
      @media (max-width: 768px) {
        /* intentionally left blank */
      }

      /* Story#22：v2 卡片布局在文件靠上部分定义；此块仅保留背景/section 显隐控制。 */
      @media (max-width: 768px) {
        body.desktop-view-config {
          background: var(--mobile-page-bg, var(--bg));
        }

        html.light-theme body.desktop-view-config,
        html.light-theme body.desktop-view-config .test-config-page,
        html.light-theme body.desktop-view-config .test-config-page > .panel,
        html.light-theme body.desktop-view-config .desktop-page-body,
        html.light-theme body.desktop-view-config .test-task-layout {
          background: var(--mobile-page-bg);
        }

        html:not(.light-theme) body.desktop-view-config {
          background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.32) 0%, rgba(8, 17, 31, 0) 140px),
            #0e1422;
        }

        html:not(.light-theme) body.desktop-view-config .test-config-page,
        html:not(.light-theme) body.desktop-view-config .test-config-page > .panel,
        html:not(.light-theme) body.desktop-view-config .desktop-page-body,
        html:not(.light-theme) body.desktop-view-config .test-task-layout {
          background: transparent;
        }

        body.desktop-view-config .test-task-saved-section,
        body.desktop-view-config .test-task-group-section,
        body.desktop-view-config .test-task-side,
        body.desktop-view-config .test-task-result-drawer,
        body.desktop-view-config .test-task-summary-head,
        body.desktop-view-config .test-task-summary-stats,
        body.desktop-view-config .test-task-summary-recent {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-tasks .test-task-saved-section,
        body.desktop-view-config.test-task-mobile-tab-groups .test-task-group-section,
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-side,
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-result-section {
          display: flex !important;
        }

        /* Story#22：head/stats 已被 Hero 卡替代——仅当 panel 真的含 Hero 时隐藏；
           组合/WSS 概览没 Hero 卡，恢复显示原生 head/stats/recent（覆盖上面的全局隐藏）*/
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-panel:not(:has(.test-task-mobile-hero)) .test-task-summary-head,
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-panel:not(:has(.test-task-mobile-hero)) .test-task-summary-recent {
          display: grid !important;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-panel:not(:has(.test-task-mobile-hero)) .test-task-summary-stats {
          display: grid !important;
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-result-section > .test-task-section-head {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent {
          display: grid !important;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-result-section,
        html.light-theme body.desktop-view-config.test-task-mobile-tab-overview .test-task-result-section {
          background: transparent;
          border-color: rgba(148, 163, 184, 0.14);
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-panel {
          gap: 16px;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-stats {
          gap: 8px;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-stat,
        html.light-theme body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-stat {
          min-height: 64px;
          border: 1px solid rgba(203, 213, 225, 0.34);
          border-radius: 0;
          background: rgba(255, 255, 255, 0.56);
          box-shadow: none;
        }

        html:not(.light-theme) body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-stat {
          background: rgba(15, 23, 42, 0.28);
          border-color: rgba(148, 163, 184, 0.1);
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-recent {
          gap: 12px;
          padding-top: 18px;
          border-top-color: rgba(148, 163, 184, 0.14);
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-result-card,
        html.light-theme body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-result-card {
          border-color: rgba(203, 213, 225, 0.34);
          background: rgba(255, 255, 255, 0.52);
          box-shadow: none;
        }

        html:not(.light-theme) body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-result-card {
          background: rgba(15, 23, 42, 0.24);
          border-color: rgba(148, 163, 184, 0.1);
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-result-card .test-task-result-overview,
        html.light-theme body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-result-card .test-task-result-overview {
          background: transparent;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-actions {
          display: block;
          width: 100%;
          padding: 0 14px 18px;
          box-sizing: border-box;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-run-action-slot {
          width: 100%;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-run-action-slot > .btn,
        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-run-action-slot > .test-task-run-inline-control {
          width: 100%;
        }

        body.desktop-view-config.test-task-mobile-tab-overview .test-task-summary-run-action-slot > .test-task-run-inline-control {
          justify-content: start;
          grid-template-columns: minmax(0, calc((100% - 8px) / 2)) 58px 58px;
        }

        body.desktop-view-config.test-task-mobile-tab-overview [data-test-task-summary-action="open-result"],
        body.desktop-view-config.test-task-mobile-tab-overview [data-wss-task-summary-action="open-result"],
        body.desktop-view-config.test-task-mobile-tab-overview [data-test-task-group-summary-action="open-result"] {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-config-page {
          overflow: hidden;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-config-page > .panel {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer {
          position: static;
          inset: auto;
          z-index: auto;
          display: block !important;
          width: 100%;
          height: 100%;
          min-height: 0;
          padding: 12px 12px calc(var(--mobile-tabbar-height) + env(safe-area-inset-bottom, 0px) + 18px);
          overflow-x: hidden;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          box-sizing: border-box;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer-backdrop,
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer-close {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer-panel {
          position: static;
          inset: auto;
          width: 100%;
          min-height: 100%;
          height: auto;
          padding: 0;
          border: 0;
          border-radius: 0;
          background: transparent;
          box-shadow: none;
          transform: none;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer-head {
          position: static;
          grid-template-columns: minmax(0, 1fr);
          padding: 0 2px 12px;
          background: transparent;
          border-bottom: 0 !important;
        }

        /* Story#22 §④：结果 tab v2 简化 —— 顶部大按钮、去图例、简洁 filter/结果行 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer-title,
        body.desktop-view-config.test-task-mobile-tab-results #testTaskResultDrawerStatus,
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer-close {
          display: none !important;
        }

        /* 顶部"运行/停止"大按钮行 */
        body.desktop-view-config.test-task-mobile-tab-results #testTaskResultDrawerControls {
          display: flex !important;
          gap: 10px;
          margin: 4px 0 14px;
        }

        body.desktop-view-config.test-task-mobile-tab-results #testTaskResultDrawerControls > * {
          flex: 1;
        }

        body.desktop-view-config.test-task-mobile-tab-results #testTaskResultDrawerControls .test-task-run-inline-control {
          display: flex !important;
          gap: 10px;
          grid-template-columns: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results #testTaskResultDrawerControls .test-task-run-inline-status {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results #testTaskResultDrawerControls .test-task-run-inline-action {
          flex: 1;
          min-height: 46px;
          font-size: 14px;
          font-weight: 700;
          border-radius: 12px;
        }

        /* 去掉图例（失败/通过 %），设计稿只用环形+2×2 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-legend {
          display: none !important;
        }

        /* 结果列表页汇总区里的「请求体/请求头」面板多余——列表态隐藏，点用例下钻页才展示（API/WSS/组合共用）*/
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-overview > .test-task-result-request-panel {
          display: none !important;
        }

        /* 列表态（未选中用例）detail 占位（订阅参数tab + "选中…查看…"空面板）多余——整块隐藏，点行下钻才显示 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail.empty {
          display: none !important;
        }

        /* 结果行列表整页滚动——去掉 case-list 等的内部滚动，由 drawer 统一滚动（结果多时体验更顺）*/
        body.desktop-view-config.test-task-mobile-tab-results #testTaskRunResult,
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-main,
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-pane,
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-list {
          overflow: visible !important;
          max-height: none !important;
          height: auto !important;
        }

        /* 汇总卡精简 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-overview {
          background: linear-gradient(135deg, var(--panel), var(--primary-surface, #eaf1ff));
          border: 1px solid var(--line);
          border-radius: 18px;
          padding: 16px;
          box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
          margin-bottom: 12px;
        }

        /* 结果汇总卡换成概览 Hero 风格：conic 环形 + 2×2 指标卡格。隐藏旧 SVG 环+图例+纯文字指标 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-overview-summary {
          display: none !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-mobile-summary {
          display: flex !important;
          flex-direction: column;
          gap: 12px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-head {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-name {
          font-size: 14px;
          font-weight: 800;
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-time {
          font-size: 11px;
          color: var(--muted);
          flex: 0 0 auto;
          white-space: nowrap;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-mid {
          display: flex;
          align-items: center;
          gap: 16px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-donut {
          width: 104px;
          height: 104px;
          border-radius: 50%;
          flex: 0 0 auto;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #e7edf3;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-hole {
          width: 74px;
          height: 74px;
          border-radius: 50%;
          background: var(--panel);
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          box-shadow: inset 0 0 0 1px var(--line);
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-hole b {
          font-size: 20px;
          font-weight: 800;
          color: var(--success, #16a34a);
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-hole b.bad {
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-hole span {
          font-size: 10px;
          color: var(--muted);
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-grid {
          flex: 1;
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 8px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-box {
          background: var(--field-soft);
          border: 1px solid var(--line);
          border-radius: 11px;
          padding: 8px 10px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-box .v {
          font-size: 15px;
          font-weight: 800;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-box .l {
          font-size: 10.5px;
          color: var(--muted);
          margin-top: 2px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .rms-box.ok .v {
          color: var(--success, #16a34a);
        }

        /* filter 按钮简化：去括号（用 attr 覆盖 label 不便，保留原文；调紧样式）*/
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-filter {
          display: flex;
          gap: 7px;
          margin: 4px 0 12px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-filter-btn {
          flex: 1;
          padding: 9px 0;
          font-size: 12.5px;
          border-radius: 10px;
          background: var(--field);
          border: 1px solid var(--line);
          color: var(--muted);
          font-weight: 600;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-filter-btn.active {
          background: var(--primary);
          color: #fff;
          border-color: var(--primary);
        }

        /* 结果行 v2 触控友好样式 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case {
          display: flex !important;
          align-items: center !important;
          gap: 10px !important;
          background: var(--panel) !important;
          border: 1px solid var(--line) !important;
          border-radius: 12px !important;
          padding: 10px 12px !important;
          margin-bottom: 8px !important;
          min-height: 60px !important;
          grid-template-columns: none !important;
          text-align: left !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-badge {
          font-size: 10.5px !important;
          font-weight: 700 !important;
          padding: 3px 8px !important;
          border-radius: 7px !important;
          flex: 0 0 auto !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case.fail .test-task-result-case-badge {
          background: var(--danger-surface, rgba(225, 29, 72, 0.14));
          color: var(--danger, #e11d48);
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case.success .test-task-result-case-badge {
          background: var(--success-surface, rgba(22, 163, 74, 0.14));
          color: var(--success, #16a34a);
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-body {
          flex: 1;
          min-width: 0;
          display: flex;
          flex-direction: column;
          gap: 2px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-title {
          font-size: 12.5px !important;
          font-weight: 600 !important;
          color: var(--text) !important;
          white-space: nowrap !important;
          overflow: hidden !important;
          text-overflow: ellipsis !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-path {
          font-size: 10.5px !important;
          color: var(--soft) !important;
          white-space: nowrap !important;
          overflow: hidden !important;
          text-overflow: ellipsis !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-tail {
          display: flex !important;
          flex-direction: column !important;
          align-items: flex-end !important;
          gap: 2px !important;
          flex: 0 0 auto !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-code {
          font-size: 11px !important;
          font-weight: 700 !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-duration {
          font-size: 11px !important;
          color: var(--muted) !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-case-chev {
          display: inline-block !important;
          font-size: 18px;
          color: var(--soft);
          flex: 0 0 auto;
          line-height: 1;
          padding-left: 4px;
        }

        /* Story#22 §⑦：结果详情下钻页——有选中 line 时 detail 覆盖整个结果区域 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result:has(.test-task-result-detail:not(.empty)) .test-task-result-overview,
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result:has(.test-task-result-detail:not(.empty)) .test-task-result-case-pane {
          display: none !important;
        }

        /* 有下钻内容时，drawer 顶部运行/终止控件隐藏 */
        body.desktop-view-config.test-task-mobile-tab-results:has(#testTaskRunResult .test-task-result-detail:not(.empty)) #testTaskResultDrawerControls {
          display: none !important;
        }

        /* v8：下钻页全屏覆盖（盖住 appbar+模块导航），仅保留底部 tabbar */
        body.desktop-view-config.test-task-mobile-tab-results:has(#testTaskRunResult .test-task-result-detail:not(.empty)) #testTaskResultDrawer {
          position: fixed !important;
          top: 0 !important;
          left: 0 !important;
          right: 0 !important;
          bottom: calc(var(--mobile-tabbar-height, 64px) + env(safe-area-inset-bottom, 0px)) !important;
          z-index: 100;
          background: var(--bg);
          overflow: auto;
          padding: 0 !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results:has(#testTaskRunResult .test-task-result-detail:not(.empty)) #testTaskResultDrawer .test-task-result-drawer-panel {
          background: transparent;
          padding: 0;
          margin: 0;
        }

        body.desktop-view-config.test-task-mobile-tab-results:has(#testTaskRunResult .test-task-result-detail:not(.empty)) #testTaskResultDrawer .test-task-result-detail {
          padding: 0 14px 24px;
        }

        body.desktop-view-config.test-task-mobile-tab-results:has(#testTaskRunResult .test-task-result-detail:not(.empty)) #testTaskResultDrawer .test-task-result-drawer-head {
          display: none !important;
        }

        /* Story#22 v8：下钻页顶栏（fixed 顶部固定，滑动内容时永远保持在顶）*/
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail-topbar {
          position: fixed;
          top: 0;
          left: 0;
          right: 0;
          height: 56px;
          display: flex;
          align-items: center;
          gap: 2px;
          padding: 0 10px;
          background: #ffffff;
          border-bottom: 1px solid var(--line);
          box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
          z-index: 101;
        }

        html:not(.light-theme) body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail-topbar {
          background: #0e1422;
        }

        /* topbar 是 fixed 独立层——detail 内容顶部留出 topbar 高度 */
        body.desktop-view-config.test-task-mobile-tab-results:has(#testTaskRunResult .test-task-result-detail:not(.empty)) #testTaskResultDrawer .test-task-result-detail {
          padding: 68px 14px 24px !important;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail-back {
          width: 40px;
          height: 40px;
          min-height: 40px;
          display: inline-flex !important;
          align-items: center;
          justify-content: center;
          border: 0;
          background: transparent;
          color: var(--text);
          cursor: pointer;
          padding: 0;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail-back svg {
          width: 22px;
          height: 22px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail-back-title {
          font-size: 17px;
          font-weight: 600;
          color: var(--text);
          flex: 1;
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail:not(.empty) {
          grid-column: 1 / -1;
          display: flex;
          flex-direction: column;
          gap: 12px;
        }

        /* v8：下钻页整页滚动，隐藏 legacy 与旧 controls，显示 v8 markup */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result:has(.test-task-result-detail:not(.empty)) {
          overflow-y: auto;
          overflow-x: hidden;
        }

        /* 仅当详情区确实渲染出 v8 下钻页(.result-detail-v8)时才隐藏 legacy；
           WSS 结果 / 跨请求断言行的 v8 为空(无 .result-detail-v8)，此时保留 legacy 显示，
           否则移动端点这类行详情会整片空白(story#22 回归 A/D)。 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result:has(.test-task-result-detail:not(.empty) .result-detail-v8) .test-task-result-detail-legacy {
          display: none !important;
        }

        /* 移动端保留 legacy 的场景(WSS/跨请求断言，走整页滚动)：撤销 PC 端为「响应/断言各自
           独立滚动」加的 grid+overflow:hidden 全局规则，恢复块级+可见，避免整页滚动下裁掉内容。 */
        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-detail-legacy {
          display: block;
          overflow: visible;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result:has(.test-task-result-detail:not(.empty)) .result-detail-v8 {
          display: flex !important;
          flex-direction: column;
          gap: 4px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-sec {
          background: var(--panel);
          border: 1px solid var(--line);
          border-radius: 14px;
          padding: 12px 14px;
          margin-bottom: 10px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-kv {
          display: flex;
          justify-content: space-between;
          font-size: 12.5px;
          padding: 7px 0;
          border-bottom: 1px solid var(--line);
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-kv:last-child {
          border-bottom: 0;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-kv .k {
          color: var(--muted);
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-kv .v {
          font-weight: 600;
          text-align: right;
          max-width: 65%;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-head {
          display: flex;
          align-items: baseline;
          justify-content: space-between;
          margin: 8px 2px 8px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-head b {
          font-size: 15px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-head span {
          font-size: 12px;
          color: var(--soft);
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-pkv {
          padding: 4px 14px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .pkv {
          display: grid;
          grid-template-columns: 92px 1fr;
          gap: 8px;
          font-size: 11.5px;
          padding: 8px 0;
          border-bottom: 1px dashed var(--line);
          font-family: ui-monospace, Menlo, Consolas, monospace;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .pkv:last-child {
          border-bottom: 0;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .pkv .k {
          color: var(--soft);
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .pkv .v {
          color: var(--text);
          word-break: break-all;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-json {
          font-family: ui-monospace, Menlo, Consolas, monospace;
          font-size: 11px;
          line-height: 1.75;
          color: var(--muted);
          background: var(--field-soft);
          border: 1px solid var(--line);
          border-radius: 10px;
          padding: 12px;
          white-space: pre-wrap;
          word-break: break-all;
          overflow: visible;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-json pre {
          margin: 0;
          background: transparent;
          padding: 0;
          border: 0;
          white-space: pre-wrap;
          word-break: break-all;
          overflow: visible;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-head-meta {
          display: inline-flex;
          align-items: center;
          gap: 8px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-copy-btn {
          width: 22px;
          height: 22px;
          min-width: 22px;
          min-height: 22px;
          padding: 0;
          border-radius: 6px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-copy-btn .copy-icon {
          width: 7px;
          height: 7px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-copy-btn .copy-icon::before,
        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-copy-btn .copy-icon::after {
          width: 5px;
          height: 5px;
          border-width: 1px;
          border-radius: 1.5px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-copy-btn .copy-icon::before {
          top: 0;
          left: 2px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-copy-btn .copy-icon::after {
          top: 2px;
          left: 0;
        }

        body.desktop-view-config.test-task-mobile-tab-results .result-detail-v8 .rd-v8-assertions .assertion-detail {
          overflow: visible !important;
          max-height: none !important;
        }

        /* Story#22 v8 §⑥：任务切换底部弹层 */
        .test-task-switcher {
          position: fixed;
          inset: 0;
          z-index: 130;
          display: none;
        }

        body.test-task-switcher-open .test-task-switcher {
          display: block;
        }

        .test-task-switcher-backdrop {
          position: absolute;
          inset: 0;
          background: rgba(0, 0, 0, 0.55);
        }

        .test-task-switcher-sheet {
          position: absolute;
          left: 0;
          right: 0;
          bottom: 0;
          background: #ffffff;
          border-radius: 20px 20px 0 0;
          padding: 8px 14px calc(18px + env(safe-area-inset-bottom, 0px));
          box-shadow: 0 -10px 30px rgba(11, 18, 32, 0.22);
          height: 50vh;
          min-height: 0;
          max-height: 95vh;
          display: flex;
          flex-direction: column;
          transition: height 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
          touch-action: none;
        }

        .test-task-switcher-sheet.dragging {
          transition: none;
        }

        html:not(.light-theme) .test-task-switcher-sheet {
          background: #0e1422;
        }

        .test-task-switcher-grab {
          width: 44px;
          height: 5px;
          border-radius: 3px;
          background: var(--line-strong);
          margin: 6px auto 12px;
          cursor: grab;
          touch-action: none;
        }

        .test-task-switcher-sheet.dragging .test-task-switcher-grab {
          cursor: grabbing;
        }

        .test-task-switcher-grab {
          width: 40px;
          height: 4px;
          border-radius: 2px;
          background: var(--line-strong);
          margin: 4px auto 12px;
        }

        .test-task-switcher-head {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 10px;
        }

        .test-task-switcher-head b {
          font-size: 15px;
          font-weight: 800;
        }

        .test-task-switcher-close-btn {
          background: transparent;
          border: 0;
          color: var(--soft);
          font-size: 22px;
          line-height: 1;
          padding: 4px 8px;
          cursor: pointer;
        }

        .test-task-switcher-search {
          height: 36px;
          border: 1px solid var(--line);
          border-radius: 10px;
          background: var(--field);
          padding: 0 12px;
          font-size: 12px;
          margin-bottom: 8px;
          color: var(--text);
        }

        .test-task-switcher-list {
          overflow: auto;
          flex: 1;
          min-height: 0;
        }

        .test-task-switcher-row {
          display: flex;
          align-items: center;
          gap: 9px;
          padding: 10px 8px;
          border-radius: 10px;
          width: 100%;
          background: transparent;
          border: 0;
          text-align: left;
          cursor: pointer;
          color: var(--text);
        }

        .test-task-switcher-row.cur {
          background: var(--primary-surface);
        }

        .test-task-switcher-row .test-task-status-dot {
          display: inline-block;
          width: 8px;
          height: 8px;
          border-radius: 50%;
          flex: 0 0 auto;
          background: var(--soft, #94a3b8);
        }

        .test-task-switcher-row .test-task-status-dot[data-status="pass"] {
          background: var(--success, #16a34a);
        }

        .test-task-switcher-row .test-task-status-dot[data-status="fail"] {
          background: var(--danger, #e11d48);
        }

        .test-task-switcher-row .test-task-status-dot[data-status="running"] {
          background: var(--primary, #2563eb);
        }

        .test-task-switcher-row .test-task-type-badge {
          flex: 0 0 auto;
          min-width: 32px;
          height: 20px;
          padding: 2px 7px;
          border-radius: 6px;
          font-size: 10.5px;
          font-weight: 700;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }

        .test-task-switcher-row .test-task-type-badge.grp {
          background: var(--group-surface, rgba(124, 58, 237, 0.14));
          color: var(--group, #7c3aed);
        }

        .test-task-switcher-row .nm {
          flex: 1;
          min-width: 0;
        }

        .test-task-switcher-row .n {
          font-size: 13px;
          font-weight: 600;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .test-task-switcher-row .m {
          font-size: 10.5px;
          color: var(--soft);
          margin-top: 2px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .test-task-switcher-row .ck {
          color: var(--primary);
          font-weight: 800;
          font-size: 16px;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer .test-task-result {
          min-height: calc(100dvh - var(--mobile-top-total-height) - var(--mobile-tabbar-height) - env(safe-area-inset-bottom, 0px) - 96px);
          padding: 0;
        }

        body.desktop-view-config.test-task-mobile-tab-results .test-task-result-drawer .response-placeholder {
          min-height: calc(100dvh - var(--mobile-top-total-height) - var(--mobile-tabbar-height) - env(safe-area-inset-bottom, 0px) - 112px);
        }

        body.task-editor-open .test-task-saved-section,
        body.task-editor-open .test-task-group-section,
        body.task-editor-open .test-task-side,
        body.task-editor-open .test-task-result-drawer,
        body.task-editor-open .test-task-start-panel {
          display: none !important;
        }

        body.task-editor-open.desktop-view-config .test-task-saved-section,
        body.task-editor-open.desktop-view-config .test-task-group-section,
        body.task-editor-open.desktop-view-config .test-task-side,
        body.task-editor-open.desktop-view-config .test-task-result-drawer,
        body.task-editor-open.desktop-view-config .test-task-start-panel {
          display: none !important;
          visibility: hidden;
          pointer-events: none;
        }

        body.desktop-view-config.test-task-mobile-tab-results #testTaskRunDraftBtn {
          display: none !important;
        }

        body.desktop-view-config .test-task-saved-section {
          position: relative;
          contain: none;
          z-index: 3;
        }

        body.desktop-view-config .test-task-group-section {
          position: relative;
          contain: none;
          z-index: 1;
        }

        body.desktop-view-config .test-task-saved-section:has(.test-task-card-menu.open),
        body.desktop-view-config .test-task-group-section:has(.test-task-card-menu.open),
        body.desktop-view-config .test-task-saved-item.menu-open {
          z-index: 300;
        }

        body.desktop-view-config .test-task-list,
        body.desktop-view-config .test-task-group-list,
        body.desktop-view-config .test-task-saved-item.menu-open,
        body.desktop-view-config .test-task-card-menu.open {
          overflow: visible;
        }

        body.desktop-view-config .test-task-card-menu.open .test-task-card-menu-options {
          z-index: 320;
        }

        body.desktop-view-config .test-task-editor.open::before,
        body.desktop-view-config .wss-task-editor.open::before,
        body.task-editor-open .test-task-editor.open::before,
        body.task-editor-open .wss-task-editor.open::before {
          display: none;
          content: none;
        }

        body.desktop-view-config .test-task-editor.open .test-task-editor-content,
        body.desktop-view-config .wss-task-editor.open .wss-task-editor-content,
        body.desktop-view-config .test-task-group-editor-content.open,
        body.task-editor-open .test-task-editor.open .test-task-editor-content,
        body.task-editor-open .wss-task-editor.open .wss-task-editor-content,
        body.task-editor-open .test-task-group-editor-content.open {
          position: static;
          inset: auto;
          z-index: auto;
          display: block;
          width: 100%;
          height: auto;
          min-height: 0;
          padding: 0;
          transform: none;
          overflow: visible;
          background: transparent;
        }

        body.desktop-view-config .test-task-group-editor-backdrop,
        body.task-editor-open .test-task-group-editor-backdrop {
          display: none;
        }

        body.task-editor-open.desktop-view-config .test-config-page,
        body.task-editor-open.desktop-view-config .test-config-page > .panel,
        body.task-editor-open.desktop-view-config .test-config-page .desktop-page-body {
          height: 100%;
          min-height: 0;
          overflow: hidden;
        }

        body.task-editor-open.desktop-view-config .test-task-layout {
          height: 100%;
          min-height: 0;
          padding: 0;
          overflow-x: hidden;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
        }

        body.task-editor-open.desktop-view-config .test-task-editor {
          display: block;
          min-height: 0;
          overflow: visible;
        }

        body.desktop-view-config .test-task-editor.open .test-task-builder-section,
        body.desktop-view-config .wss-task-editor.open .wss-task-builder-section,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-builder-section,
        body.task-editor-open .test-task-editor.open .test-task-builder-section,
        body.task-editor-open .wss-task-editor.open .wss-task-builder-section,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-builder-section {
          display: flex;
          flex-direction: column;
          gap: 0;
          width: 100%;
          min-height: 0;
          height: auto;
          max-height: none;
          border: 0;
          border-radius: 0;
          overflow: visible;
          padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
          box-sizing: border-box;
        }

        body.desktop-view-config .test-task-editor.open .test-task-fields,
        body.desktop-view-config .wss-task-editor.open .wss-task-fields,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-fields,
        body.task-editor-open .test-task-editor.open .test-task-fields,
        body.task-editor-open .wss-task-editor.open .wss-task-fields,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-fields {
          flex: 0 0 auto;
          overflow: visible;
          padding-right: 0;
        }

        body.desktop-view-config .test-task-editor.open .test-task-config-grid,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-config-grid,
        body.task-editor-open .test-task-editor.open .test-task-config-grid,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-config-grid {
          display: flex;
          flex-direction: column;
          gap: 12px;
          flex: 0 0 auto;
          height: 100%;
          min-height: 0;
          overflow: auto;
          padding-bottom: 12px;
        }

        body.desktop-view-config .test-task-editor.open .test-task-api-column,
        body.desktop-view-config .test-task-editor.open .test-task-selected-list,
        body.desktop-view-config .test-task-editor.open .test-task-parameter-pane,
        body.desktop-view-config .test-task-editor.open .test-task-assertion-pane,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-config-grid > div,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-task-options,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-selected-list,
        body.task-editor-open .test-task-editor.open .test-task-api-column,
        body.task-editor-open .test-task-editor.open .test-task-selected-list,
        body.task-editor-open .test-task-editor.open .test-task-parameter-pane,
        body.task-editor-open .test-task-editor.open .test-task-assertion-pane,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-config-grid > div,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-task-options,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-selected-list {
          max-height: none;
          overflow: auto;
          padding-right: 0;
        }

        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-config-grid > div,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-config-grid > div {
          grid-template-rows: auto auto;
        }

        body.desktop-view-config .wss-task-editor.open .wss-task-run-options,
        body.task-editor-open .wss-task-editor.open .wss-task-run-options {
          flex: 0 0 auto;
          padding: 0 0 12px;
        }

        body.desktop-view-config .test-task-editor.open .test-task-builder-section .test-task-editor-actions,
        body.desktop-view-config .wss-task-editor.open .wss-task-builder-section .test-task-editor-actions,
        body.desktop-view-config .test-task-group-editor-content.open .test-task-group-builder-section .test-task-editor-actions,
        body.task-editor-open .test-task-editor.open .test-task-builder-section .test-task-editor-actions,
        body.task-editor-open .wss-task-editor.open .wss-task-builder-section .test-task-editor-actions,
        body.task-editor-open .test-task-group-editor-content.open .test-task-group-builder-section .test-task-editor-actions {
          position: static;
          bottom: auto;
          z-index: auto;
          margin: 0;
          padding: 12px 0 0;
          background: var(--panel);
        }
      }

      /* Story#22：Story#19 的"任务图标重设计"块已废弃，让位于 v2 信息卡样式。 */
      /* ===== 概览"最近结果·近N次"= runrow 历史列表（设计稿③，可下钻）=====
         复用既有 .test-task-mobile-runrow 样式，仅补充：标题 small、stopped pill、
         行内定时标签、footer。bug#105：整段包进 @media(max-width:768px)，仅移动端生效，
         不污染 PC 全局作用域（PC 用环形卡，这些历史列表样式不该存在于桌面）。 */
      @media (max-width: 768px) {
        body.desktop-view-config .test-task-recent-title small {
          font-size: 11px;
          font-weight: 500;
          color: var(--soft);
          margin-left: 6px;
        }
        body.desktop-view-config .test-task-mobile-runrow-pill.warn {
          /* bug#106：改用既有主题 token --warning/--warning-surface（原 --warn/--warn-surface 未定义，
             靠硬编码 fallback 兜底，主题切换时颜色不随主题变化）。 */
          background: var(--warning-surface, rgba(245, 158, 11, 0.18));
          color: var(--warning, #f59e0b);
        }
        body.desktop-view-config .test-task-mobile-runrow-when .d .thist-tag {
          display: inline-block;
          margin-left: 6px;
          font-size: 10px;
          font-weight: 600;
          padding: 0 6px;
          border-radius: 999px;
          line-height: 1.6;
          vertical-align: middle;
        }
        body.desktop-view-config .test-task-mobile-runrow-when .d .thist-tag.tag-sched {
          color: #2563eb;
          background: rgba(37, 99, 235, 0.12);
        }
        body.desktop-view-config .task-run-history-foot {
          margin-top: 4px;
          text-align: center;
        }
      }
