    :root {
      color-scheme: light;
      --bg: #f4f6f8;
      --side: #f0f0f1;
      --surface: #ffffff;
      --surface-soft: #f8fafc;
      --surface-tint: #eef4fb;
      --ink: #111827;
      --ink-2: #273449;
      --muted: #697586;
      --faint: #98a2b3;
      --line: #dfe6ee;
      --line-soft: #edf1f6;
      --black: #17191f;
      --blue: #2f79ff;
      --blue-2: #eaf2ff;
      --green: #26b57b;
      --green-2: #e9f8f2;
      --orange: #ff8a00;
      --orange-2: #fff3df;
      --red: #fb5d64;
      --red-2: #fff0f1;
      --purple: #6f63ff;
      --purple-2: #f0efff;
      --radius: 12px;
      --radius-sm: 8px;
      --shadow: 0 4px 8px rgba(15, 23, 42, 0.06);
      --sans: "Inter", "Aptos", "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
      --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    }

    * { box-sizing: border-box; }

    html {
      min-width: 320px;
      background: var(--bg);
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      color: var(--ink);
      background: var(--bg);
      font-family: var(--sans);
      font-size: 13px;
      line-height: 1.42;
      letter-spacing: 0;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      text-rendering: geometricPrecision;
    }

    button,
    input,
    select {
      font: inherit;
      letter-spacing: 0;
    }

    button {
      cursor: pointer;
    }

    button:disabled {
      cursor: not-allowed;
      opacity: 0.62;
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible {
      outline: 2px solid rgba(47, 121, 255, 0.35);
      outline-offset: 2px;
    }

    [hidden] {
      display: none !important;
    }

    .auth-screen {
      min-height: 100vh;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      place-items: center;
      padding: 24px;
      background:
        linear-gradient(180deg, rgba(244, 246, 248, 0.96), rgba(238, 244, 251, 0.96)),
        var(--bg);
    }

    .auth-panel {
      width: min(420px, 100%);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 28px;
      background: var(--surface);
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
      display: grid;
      gap: 22px;
    }

    .auth-brand {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .auth-brand img {
      width: 152px;
      height: auto;
      display: block;
    }

    .auth-title {
      display: grid;
      gap: 6px;
    }

    .auth-title h1 {
      margin: 0;
      color: var(--ink);
      font-size: 24px;
      line-height: 1.18;
      letter-spacing: 0;
    }

    .auth-title p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }

    .auth-form {
      display: grid;
      gap: 14px;
    }

    .auth-field {
      display: grid;
      gap: 7px;
      color: var(--ink-2);
      font-weight: 850;
    }

    .auth-field input {
      height: 42px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 12px;
      color: var(--ink);
      background: #f8fafc;
      font-weight: 750;
    }

    .auth-submit {
      height: 42px;
      border: 0;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: #fff;
      background: var(--black);
      font-weight: 900;
    }

    .auth-error {
      min-height: 18px;
      color: var(--red);
      font-weight: 800;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 252px minmax(0, 1fr);
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 22px 18px 16px;
      background: var(--side);
      border-right: 1px solid #e6e8eb;
      display: flex;
      flex-direction: column;
      gap: 24px;
      z-index: 30;
    }

    .logo {
      height: 44px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .logo img {
      width: 132px;
      height: auto;
      display: block;
    }

    .station-badge {
      min-height: 24px;
      padding: 3px 8px;
      border: 1px solid #111827;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      color: #ffffff;
      background: #111827;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .nav-group {
      display: grid;
      gap: 8px;
    }

    .nav-title {
      padding: 0 14px;
      color: #7b8493;
      font-size: 12px;
      font-weight: 700;
    }

    .nav {
      display: grid;
      gap: 4px;
    }

    .nav button {
      width: 100%;
      min-height: 40px;
      border: 0;
      border-radius: var(--radius-sm);
      padding: 0 13px;
      display: flex;
      align-items: center;
      gap: 12px;
      color: #3f4652;
      background: transparent;
      text-align: left;
      font-weight: 700;
    }

    .nav button:hover {
      background: #e9eaec;
    }

    .nav button.active {
      color: var(--black);
      background: #e5e5e7;
    }

    .nav i {
      width: 18px;
      color: #5f6670;
      font-size: 17px;
      text-align: center;
    }

    .sidebar-foot {
      margin-top: auto;
      display: grid;
      gap: 10px;
      padding: 12px;
      border-radius: var(--radius);
      background: rgba(255, 255, 255, 0.52);
      color: #667085;
      font-size: 12px;
    }

    .sidebar-foot strong {
      color: #273449;
    }

    .sidebar-status-link {
      min-height: 38px;
      border: 1px solid rgba(148, 163, 184, 0.30);
      border-radius: var(--radius-sm);
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: #273449;
      background: rgba(255, 255, 255, 0.66);
      font-weight: 850;
      text-align: left;
    }

    .sidebar-status-link:hover {
      background: #fff;
    }

    .sidebar-status-link.active {
      color: #fff;
      border-color: var(--black);
      background: var(--black);
    }

    .sidebar-status-link i {
      width: 18px;
      font-size: 17px;
      text-align: center;
    }

    .main {
      min-width: 0;
      display: flex;
      flex-direction: column;
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 25;
      min-height: 58px;
      padding: 10px 20px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      background: rgba(244, 246, 248, 0.96);
      border-bottom: 1px solid #e6ebf1;
      backdrop-filter: blur(10px);
    }

    .mobile-menu {
      display: none;
      width: 36px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: var(--surface);
      color: var(--ink);
    }

    .home-pill {
      height: 32px;
      padding: 0 13px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #fff;
      background: var(--black);
      font-weight: 800;
      box-shadow: var(--shadow);
    }

    .top-meta {
      min-width: 0;
      color: #7a8699;
      font-size: 12px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .load-progress {
      display: none;
      height: 0;
      padding: 0;
      overflow: hidden;
      background: transparent;
      border-bottom: 0 solid transparent;
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease;
    }

    .load-progress.active {
      opacity: 1;
    }

    .load-progress.done {
      opacity: 0;
    }

    .load-progress-inner {
      max-width: 1680px;
      margin: 0 auto;
      height: 100%;
      display: block;
    }

    .progress-track {
      height: 4px;
      border-radius: 999px;
      background: #e7edf5;
      overflow: hidden;
    }

    .progress-track span {
      position: relative;
      display: block;
      width: var(--progress, 0%);
      min-width: 7%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--blue), var(--green));
      transition: width 220ms ease;
    }

    .load-progress.active .progress-track span::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,.48), transparent);
      animation: progressShine 1.1s linear infinite;
    }

    .progress-text {
      display: none;
      color: #5d6b7c;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    @keyframes progressShine {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .top-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
    }

    .icon-btn,
    .panel-action {
      width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 10px;
      display: inline-grid;
      place-items: center;
      color: #222630;
      background: var(--surface);
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    }

    .panel-action.snapshot-open {
      width: auto;
      min-width: 112px;
      padding: 0 12px;
      display: inline-flex;
      gap: 7px;
      background: #111827;
      border-color: #111827;
      color: #fff;
      font-size: 12px;
      font-weight: 900;
    }

    .panel-action.snapshot-open:hover {
      background: #263142;
      border-color: #263142;
    }

    .user-menu {
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 0 10px 0 7px;
      color: #222630;
      background: var(--surface);
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
      font-weight: 700;
    }

    .avatar {
      width: 24px;
      height: 24px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      color: #fff;
      background: #151820;
      font-size: 12px;
      font-weight: 900;
    }

    .content {
      width: min(1680px, 100%);
      margin: 0 auto;
      padding: 14px 18px 32px;
    }

    .project-bar {
      min-height: 72px;
      padding: 14px 18px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--surface);
      display: grid;
      grid-template-columns: minmax(200px, 0.85fr) auto minmax(320px, 1.35fr) minmax(170px, 0.65fr);
      align-items: center;
      gap: 14px;
      box-shadow: var(--shadow);
    }

    /* 移动端筛选摘要行：桌面端不渲染，≤760px 才显示（display:none 的 grid 子项不占列） */
    .filter-summary {
      display: none;
    }

    .field {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
      color: #718096;
      font-weight: 700;
    }

    .field > span {
      flex: 0 0 auto;
    }

    .select-like {
      min-width: 0;
      height: 40px;
      flex: 1;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #263244;
      background: #f8fafc;
      font-weight: 800;
    }

    .target-filter {
      position: relative;
      min-width: 0;
      flex: 1;
    }

    .target-select-button {
      width: 100%;
      cursor: pointer;
      text-align: left;
      appearance: none;
    }

    .target-select-button[disabled] {
      cursor: not-allowed;
      color: #94a3b8;
      background: #f1f5f9;
    }

    .target-menu {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      z-index: 50;
      width: min(320px, 86vw);
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    }

    .target-menu[hidden] {
      display: none;
    }

    .target-option {
      width: 100%;
      min-height: 36px;
      border: 0;
      border-radius: 8px;
      padding: 8px 9px;
      background: transparent;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #1f2a3d;
      font-weight: 800;
      cursor: pointer;
      text-align: left;
    }

    .target-option:hover {
      background: #f5f7fb;
    }

    .target-option .target-option-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .target-option .target-check {
      color: #4f7cff;
      font-size: 16px;
      opacity: 0;
    }

    .target-option.selected .target-check {
      opacity: 1;
    }

    .target-menu-actions {
      margin-top: 6px;
      padding-top: 8px;
      border-top: 1px solid #edf1f7;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .target-menu-actions button {
      height: 30px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 10px;
      background: #fff;
      color: #253247;
      font-weight: 900;
      cursor: pointer;
    }

    .target-menu-actions button.primary {
      border-color: #111827;
      background: #111827;
      color: #fff;
    }

    .project-select {
      min-width: 0;
      height: 40px;
      flex: 1;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 0 34px 0 12px;
      color: #263244;
      background: #f8fafc;
      font-weight: 800;
    }

    .segments {
      min-width: 0;
      justify-self: center;
      max-width: 100%;
      min-height: 40px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 3px;
      overflow: visible;
    }

    .prompt-type-segments {
      justify-self: start;
      flex-wrap: nowrap;
    }

    #platformSegments {
      justify-self: stretch;
      flex-wrap: nowrap;
      overflow-x: auto;
      overscroll-behavior-inline: contain;
      scrollbar-width: none;
    }

    #platformSegments::-webkit-scrollbar {
      display: none;
    }

    .seg {
      height: 32px;
      border: 0;
      border-radius: 7px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0 11px;
      color: #5c6b80;
      background: transparent;
      white-space: nowrap;
      font-weight: 800;
    }

    .seg img {
      width: 20px;
      height: 20px;
      object-fit: contain;
      flex: 0 0 20px;
      display: block;
    }

    .seg span {
      line-height: 1;
    }

    .seg.active {
      color: #fff;
      background: var(--black);
    }

    .seg:disabled,
    .seg.disabled {
      color: #98a2b3;
      background: transparent;
      opacity: 0.72;
    }

    .quick-row {
      margin-top: 14px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .round-status-notice {
      margin-top: 14px;
      padding: 12px 16px;
      border: 1px solid #fed7aa;
      border-radius: 12px;
      background: #fff7ed;
      color: #7c2d12;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      box-shadow: var(--shadow);
      font-size: 13px;
      font-weight: 750;
    }

    .round-status-notice[hidden] {
      display: none;
    }

    .round-status-notice i {
      margin-top: 1px;
      color: var(--orange);
      font-size: 18px;
      flex: 0 0 auto;
    }

    .round-status-notice strong {
      color: #111827;
      font-weight: 900;
    }

    .quick {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 0 14px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #243246;
      background: var(--surface);
      box-shadow: var(--shadow);
      font-weight: 850;
    }

    .view {
      display: none;
      margin-top: 18px;
    }

    .view.active {
      display: block;
    }

    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 16px;
    }

    .kpi {
      position: relative;
      min-height: 122px;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px 22px;
      overflow: hidden;
      display: grid;
      align-content: space-between;
      box-shadow: var(--shadow);
    }

    .kpi.blue { background: linear-gradient(135deg, #eef2ff 0%, #f9fbff 100%); }
    .kpi.green { background: linear-gradient(135deg, #eaf8f2 0%, #f8fffc 100%); }
    .kpi.orange { background: linear-gradient(135deg, #fff5e6 0%, #fffdf8 100%); }
    .kpi.red { background: linear-gradient(135deg, #fff0f2 0%, #fffafa 100%); }
    .kpi.purple { background: linear-gradient(135deg, #f0efff 0%, #fbfbff 100%); }

    .kpi-label {
      color: #68778d;
      font-weight: 800;
    }

    .kpi-value {
      display: flex;
      align-items: end;
      gap: 8px;
      color: #111827;
      font-size: 42px;
      line-height: 1;
      font-weight: 500;
      letter-spacing: -0.02em;
    }

    .kpi-value span {
      padding-bottom: 5px;
      color: #252f3f;
      font-size: 14px;
      font-weight: 850;
      letter-spacing: 0;
    }

    .kpi-note {
      color: #667085;
      font-size: 12px;
      font-weight: 700;
    }

    .kpi-icon {
      position: absolute;
      right: 20px;
      bottom: 20px;
      width: 48px;
      height: 48px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 24px;
    }

    .blue .kpi-icon { background: var(--blue); }
    .green .kpi-icon { background: var(--green); }
    .orange .kpi-icon { background: var(--orange); }
    .red .kpi-icon { background: var(--red); }
    .purple .kpi-icon { background: var(--purple); }

    .grid-main {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(330px, 0.9fr);
      gap: 14px;
      align-items: start;
    }

    .grid-2 {
      display: grid;
      grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
      gap: 14px;
      align-items: start;
    }

    .panel {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: var(--surface);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel.span-2 {
      grid-column: span 2;
    }

    .panel-head {
      min-height: 58px;
      padding: 14px 18px;
      border-bottom: 1px solid var(--line-soft);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .panel-title {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
      color: #111827;
      font-size: 15px;
      font-weight: 900;
    }

    .panel-title small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .panel-title i,
    .round-icon {
      width: 28px;
      height: 28px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 15px;
      background: var(--black);
      flex: 0 0 auto;
    }

    .panel-title i.ai,
    .round-icon.ai { background: var(--green); }
    .panel-title i.geo,
    .round-icon.geo { background: var(--blue); }
    .panel-title i.orange,
    .round-icon.orange { background: var(--orange); }
    .panel-title i.red,
    .round-icon.red { background: var(--red); }
    .panel-title i.purple,
    .round-icon.purple { background: var(--purple); }

    .panel-body {
      padding: 16px 18px;
    }

    .brand-source-hint {
      margin: 0;
      padding: 8px 18px;
      border-bottom: 1px solid var(--line-soft);
      background: #f5f8fd;
      color: #4a5568;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.5;
      word-break: break-word;
    }

    .brand-source-folded {
      margin: 0;
      padding: 9px 18px;
      border-top: 1px solid var(--line-soft);
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.5;
      word-break: break-word;
    }

    .chart-wrap {
      position: relative;
      min-height: 318px;
      padding: 8px 2px 0;
    }

    .chart-wrap.compact {
      min-height: 258px;
    }

    canvas {
      display: block;
      width: 100%;
      height: 280px;
    }

    .chart-wrap.compact canvas {
      height: 220px;
    }

    .chart-wrap canvas {
      cursor: crosshair;
    }

    .data-table {
      width: 100%;
      border-collapse: collapse;
    }

    .data-table th,
    .data-table td {
      padding: 13px 14px;
      border-bottom: 1px solid var(--line-soft);
      text-align: left;
      vertical-align: middle;
    }

    .data-table th {
      color: #68778d;
      font-size: 12px;
      font-weight: 800;
      background: #fbfcfe;
    }

    .data-table td {
      color: #273449;
      font-weight: 700;
    }

    .data-table tr:last-child td {
      border-bottom: 0;
    }

    .data-table tbody tr {
      transition: background 160ms ease;
    }

    .data-table tbody tr:hover,
    .data-table tbody tr.active {
      background: #f6f9fc;
    }

    .rank {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      display: inline-grid;
      place-items: center;
      color: #fff;
      background: #111827;
      font-size: 12px;
      font-weight: 900;
    }

    .rank.muted {
      color: #7b8797;
      background: #edf1f5;
    }

    .pill {
      min-height: 24px;
      border-radius: 7px;
      padding: 4px 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      font-weight: 900;
      white-space: nowrap;
    }

    .pill.green {
      color: #07835a;
      background: #e9f8f2;
    }

    .pill.red {
      color: #dd3642;
      background: #fff0f1;
    }

    .pill.blue {
      color: #2467df;
      background: #eaf2ff;
    }

    .pill.orange {
      color: #d16f00;
      background: #fff2df;
    }

    .pill.gray {
      color: #5f6c7d;
      background: #eff3f7;
    }

    .mini-list {
      display: grid;
      gap: 10px;
    }

    .mini-item {
      min-height: 72px;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px 14px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      background: #fbfcfe;
    }

    .mini-item strong {
      display: block;
      color: #273449;
      font-size: 13px;
      font-weight: 850;
    }

    .mini-item span {
      display: block;
      margin-top: 6px;
      color: #667085;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mini-link {
      border: 0;
      color: #286fe8;
      background: transparent;
      font-weight: 900;
    }

    .mini-link.danger {
      color: #d92d20;
    }

    .source-bars {
      display: grid;
      grid-template-columns: repeat(10, minmax(42px, 1fr));
      align-items: end;
      gap: 18px;
      min-height: 340px;
      padding: 24px 18px 8px;
      border-top: 1px solid var(--line-soft);
      background-image: linear-gradient(to bottom, transparent 0, transparent 61px, rgba(47, 121, 255, 0.12) 62px);
      background-size: 100% 62px;
    }

    .bar {
      min-width: 0;
      display: grid;
      justify-items: center;
      gap: 8px;
      color: #6b778a;
      font-weight: 800;
      outline: none;
    }

    .bar-col {
      position: relative;
      width: min(44px, 100%);
      height: var(--h);
      min-height: 34px;
      border-radius: 999px 999px 10px 10px;
      background:
        repeating-linear-gradient(-30deg, rgba(47, 121, 255, 0.13) 0 8px, rgba(47, 121, 255, 0.03) 8px 16px),
        #f7fbff;
      border: 1px solid #edf4ff;
    }

    .bar.hot .bar-col {
      background: linear-gradient(180deg, #ff8a00 0%, rgba(255, 138, 0, 0.12) 100%);
      border-color: rgba(255, 138, 0, 0.35);
    }

    .bar-tip {
      position: absolute;
      left: 50%;
      top: -42px;
      transform: translateX(-50%);
      min-width: 58px;
      min-height: 30px;
      border-radius: 9px;
      display: grid;
      place-items: center;
      color: #fff;
      background: var(--orange);
      font-size: 14px;
      font-weight: 900;
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .bar > span {
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: center;
      line-height: 1.25;
    }

    .bar.hot .bar-tip,
    .bar:hover .bar-tip,
    .bar:focus-visible .bar-tip {
      opacity: 1;
      transform: translateX(-50%) translateY(-4px);
    }

    .bar-tip::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -6px;
      width: 10px;
      height: 10px;
      border-radius: 2px;
      background: var(--orange);
      transform: translateX(-50%) rotate(45deg);
    }

    .status-table td {
      height: 58px;
    }

    .system-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 18px;
    }

    #system.view.active,
    #admin-overview.view.active,
    #admin-accounts.view.active,
    #admin-manual.view.active,
    #admin-rounds.view.active,
    #admin-exports.view.active {
      display: grid;
      gap: 24px;
    }

    .system-card {
      min-height: 132px;
      padding: 16px;
      display: grid;
      align-content: space-between;
      gap: 12px;
    }

    .system-card span {
      color: var(--muted);
      font-weight: 800;
    }

    .system-card strong {
      color: var(--ink);
      font-size: 22px;
      line-height: 1.15;
      font-weight: 950;
    }

    .system-card small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .system-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
      gap: 22px;
    }

    .system-stack {
      display: grid;
      gap: 12px;
    }

    .system-list {
      display: grid;
      gap: 10px;
    }

    .system-item {
      min-width: 0;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px;
      background: #fbfcfe;
      display: grid;
      gap: 6px;
    }

    .system-item strong {
      color: var(--ink-2);
      font-size: 13px;
      font-weight: 900;
    }

    .system-item span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .system-status-pill {
      min-height: 26px;
      border-radius: 999px;
      padding: 4px 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #475467;
      background: #f1f5f9;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .system-status-pill.ok {
      color: #087443;
      background: var(--green-2);
    }

    .system-status-pill.busy {
      color: #8a4d00;
      background: var(--orange-2);
    }

    .system-status-pill.error {
      color: #c0353b;
      background: var(--red-2);
    }

    .system-status-pill.warn {
      color: #8a4d00;
      background: var(--orange-2);
    }

    .system-progress {
      display: grid;
      gap: 14px;
    }

    .system-progress-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .system-progress-head strong {
      color: var(--ink);
      font-size: 26px;
      line-height: 1;
      font-weight: 950;
    }

    .system-progress-head span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .system-progress-bar {
      height: 12px;
      border-radius: 999px;
      overflow: hidden;
      background: #eef2f7;
      box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
    }

    .system-progress-bar span {
      display: block;
      width: var(--value, 0%);
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #4f79f6, #63b37d);
      transition: width 240ms ease;
    }

    .system-stat-row {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .system-stat {
      min-width: 0;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid var(--line-soft);
      background: #fbfcfe;
      display: grid;
      gap: 4px;
    }

    .system-stat span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .system-stat strong {
      color: var(--ink);
      font-size: 18px;
      font-weight: 950;
      line-height: 1.15;
    }

    .system-project-table td {
      height: 52px;
      vertical-align: middle;
    }

    .system-project-name {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .system-project-name strong,
    .system-inline {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .system-project-name span,
    .system-inline-sub {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .task-admin-form {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) repeat(2, auto) auto;
      gap: 10px;
      align-items: end;
    }

    .task-admin-form.compact {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-admin-form .span-2 {
      grid-column: span 2;
    }

    .task-field {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .task-field input,
    .task-field select,
    .task-field textarea {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      /* 圆角与规则工作台的输入控件统一（10px），管理台三页看起来是同一套控件 */
      border-radius: 10px;
      padding: 0 10px;
      background: #fff;
      color: var(--ink);
      font-weight: 850;
      outline: none;
    }

    .task-field textarea {
      min-height: 112px;
      padding: 10px;
      resize: vertical;
      line-height: 1.45;
    }

    .task-field.span-2 {
      grid-column: span 2;
    }

    .task-helper {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.6;
    }

    .task-job-form {
      align-items: start;
    }

    .task-job-intro {
      display: grid;
      gap: 6px;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px 14px;
      background: #f8fafc;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.55;
    }

    .task-job-intro strong {
      color: var(--ink);
      font-size: 13px;
      font-weight: 900;
    }

    .task-job-footer {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(180px, .6fr);
      gap: 10px;
      align-items: end;
    }

    .task-check-box {
      min-height: 42px;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 0 12px;
      background: #fff;
    }

    .task-check-box span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }

    .task-advanced {
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      background: #fff;
      overflow: hidden;
    }

    .task-advanced summary {
      min-height: 38px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      cursor: pointer;
      color: var(--ink-2);
      font-size: 12px;
      font-weight: 900;
      list-style: none;
    }

    .task-advanced summary::-webkit-details-marker {
      display: none;
    }

    .task-advanced summary::after {
      content: "展开";
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }

    .task-advanced[open] summary::after {
      content: "收起";
    }

    .task-advanced-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      padding: 0 12px 12px;
    }

    /* ---------------------------------------------------------------
       规则工作台（提示词分类规则 / 竞品名单修正两页共用）
       左栏选对象、右栏编辑，两栏各自内部滚动，页面本身不再有大片空白。
       --------------------------------------------------------------- */

    /* 满高：这两页的 .panel 从 topbar 底缘一直撑到视口底部再留一口气。
       扣减项（都来自本文件的既有规则，改动它们时要同步这里）：
         58px  .topbar min-height（sticky，占住视口顶部）
         14px  .content padding-top
         18px  .view margin-top
         32px  .content padding-bottom
          8px  底部呼吸留白（AB5 从 24px 收窄：合并规则加行号槽后可视行数是刚需，
               DAYU 2026-07-31 点名「页面高度是可以拉高的」）
       合计 130px。panel-head 的高度不进公式——panel 自身是 flex 列容器，
       head 占多少由它自己决定，剩余高度全部交给 .rule-workbench。
       body.admin-view-active 已隐藏 .project-bar / .quick-row，所以 topbar 之下
       直接就是本页 panel，公式里不需要再扣它们。 */
    #admin-prompt-rules .panel,
    #admin-brand-rules .panel {
      height: calc(100vh - 130px);
      min-height: 520px;
      display: flex;
      flex-direction: column;
    }

    .rule-workbench {
      flex: 1;
      /* min-height: 0 —— flex 子项默认 min-height:auto，会被内容撑到自然高度而不肯收缩，
         结果是子层的 overflow:auto 永远滚不起来、整个 panel 被撑破。
         从 panel 到列表/编辑器主体这一整条链路上的每一层都必须显式写 0。 */
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(340px, .85fr) minmax(0, 1.15fr);
      gap: 16px;
    }

    .rule-list,
    .rule-editor {
      min-width: 0;
      min-height: 0;
      border: 1px solid var(--line-soft);
      border-radius: 14px;
      background: var(--surface-soft);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    /* 工具条不滚动：作为 flex 列的固定项常驻在列表顶部（等效 sticky，且不依赖滚动容器） */
    .rule-toolbar {
      flex: 0 0 auto;
      padding: 14px 14px 12px;
      border-bottom: 1px solid var(--line-soft);
      background: var(--surface);
      display: grid;
      gap: 10px;
    }

    .rule-toolbar input {
      width: 100%;
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 0 12px;
      background: #fff;
      color: var(--ink);
      font-weight: 850;
      outline: none;
      transition: border-color 140ms ease, background 140ms ease;
    }

    .rule-toolbar input:hover {
      border-color: #ccd7e6;
    }

    .rule-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .rule-chip {
      min-height: 28px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 0 11px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: var(--muted);
      background: #fff;
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
      cursor: pointer;
      transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
    }

    .rule-chip:hover {
      border-color: #c8d6ea;
      background: var(--surface-soft);
    }

    .rule-chip.active {
      border-color: rgba(47, 121, 255, .45);
      color: #1b4fb5;
      background: var(--blue-2);
    }

    .rule-chip b {
      color: var(--ink);
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }

    .rule-chip.active b {
      color: #1b4fb5;
    }

    .brand-rule-rows {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      display: grid;
      align-content: start;
      gap: 6px;
      /* 底部留安全内边距，最后一行不贴边 */
      padding: 10px 10px 16px;
    }

    .brand-rule-row {
      position: relative;
      width: 100%;
      min-height: 64px;
      border: 1px solid transparent;
      border-radius: 12px;
      padding: 11px 13px 11px 15px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      color: var(--ink);
      background: transparent;
      text-align: left;
      transition: background 140ms ease, border-color 140ms ease;
    }

    .brand-rule-row:hover {
      background: #fff;
      border-color: var(--line-soft);
    }

    .brand-rule-row.active {
      background: var(--blue-2);
      border-color: rgba(47, 121, 255, .28);
    }

    /* 选中态用左侧主色条，不整行重描边 */
    .brand-rule-row.active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 10px;
      bottom: 10px;
      width: 3px;
      border-radius: 0 3px 3px 0;
      background: var(--blue);
    }

    .brand-rule-row strong {
      display: block;
      font-size: 13.5px;
      font-weight: 900;
    }

    .brand-rule-row small {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    /* 轻量状态标记：小圆点 + 文字（颜色之外仍有文字，不只依赖颜色表达状态） */
    .rule-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      white-space: nowrap;
    }

    .rule-status::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: #c3ccd9;
      flex: 0 0 auto;
    }

    .rule-status.ok {
      color: #087443;
    }

    .rule-status.ok::before {
      background: var(--green);
    }

    .rule-status.warn {
      color: #8a4d00;
    }

    .rule-status.warn::before {
      background: var(--orange);
    }

    /* 编辑器头：固定在右栏顶部，标题 + 元信息 + 状态 + 次要操作入口 */
    .rule-editor-head {
      flex: 0 0 auto;
      min-height: 56px;
      padding: 12px 16px;
      border-bottom: 1px solid var(--line-soft);
      background: var(--surface);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .rule-editor-title {
      min-width: 0;
    }

    .rule-editor-head strong {
      display: block;
      color: var(--ink);
      font-size: 15px;
      font-weight: 900;
    }

    .rule-editor-head small {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    /* 合并规则同键冲突提示（U1）：编辑器头里的一行告警橙小字，复用告警色不新造控件形态 */
    .rule-editor-head small.rule-conflict-note {
      color: #b35c00;
    }

    /* 带行号的提示可点击跳转到那一行（AB5），给出可点的视觉暗示 */
    .rule-editor-head small.rule-conflict-note.is-jump {
      cursor: pointer;
      text-decoration: underline dotted;
      text-underline-offset: 3px;
    }

    .rule-editor-head-side {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    /* 引导空态：未选中对象时不呈现空表单 */
    .rule-editor-empty {
      display: none;
      flex: 1;
      min-height: 0;
      padding: 24px;
      align-content: center;
      justify-items: center;
      gap: 8px;
      text-align: center;
    }

    .rule-editor-empty i {
      width: 42px;
      height: 42px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      color: var(--muted);
      background: #eef2f7;
      font-size: 20px;
    }

    .rule-editor-empty strong {
      color: var(--ink-2);
      font-size: 14px;
      font-weight: 900;
    }

    .rule-editor-empty span {
      max-width: 320px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.6;
    }

    /* 空态由 JS 切类：无权限 / 名单为空时右栏只显示引导，不显示空表单 */
    .rule-editor.is-empty .rule-editor-empty {
      display: grid;
    }

    .rule-editor.is-empty .rule-editor-body,
    .rule-editor.is-empty .rule-editor-foot {
      display: none;
    }

    /* 表单主体：**不滚动**（AB5 滚动模型修正，2026-07-31）。
       此前 body overflow-y:auto 与合并规则框的内部滚动嵌套成两层滚动条，且合并规则
       wrap="off" 之后横向滚动条贴在输入框底边——外层一滚它就出可视区，几乎摸不到
       （DAYU 反馈）。满高布局里高度应该被**分配**而不是溢出再滚：主输入拿走全部剩余
       高度并自己滚（纵+横，横向滚动条因此永远贴在可视底边），屏蔽词固定高度自己滚，
       其余元素全是固定项。窄屏断点会把本规则改回 overflow:visible（页面整体滚动）。 */
    .rule-editor-body {
      flex: 1;
      min-height: 0;
      overflow: hidden;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    /* 规则是结构化文本，等宽字体便于按列核对 */
    .rule-field-mono textarea {
      font-family: var(--mono);
      font-size: 12.5px;
      font-weight: 600;
      line-height: 1.7;
    }

    /* 次要输入（屏蔽词等）固定高度、内部滚动。body 不再滚动（见上），手动拉高只会被
       裁掉，所以 resize 一并禁掉；本条同时命中主输入的 textarea，resize:none 正是两者
       都要的，height 则被后面的 .rule-field-grow 规则覆盖回 100%。 */
    .rule-editor-body .task-field textarea {
      height: 104px;
      min-height: 0;
      resize: none;
    }

    /* 底部固定行（AB5）：屏蔽词与说明文字并排，省出的整段垂直高度都归合并规则。
       屏蔽词是一行一个的短词，半宽足够；说明文字本来就只是几行辅助阅读。 */
    .rule-editor-bottom {
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 12px;
      align-items: start;
    }

    /* 主输入弹性撑高：不再用固定 rows，窗口越高可视行数越多。
       .task-field 本身是 grid，所以把剩余高度交给第二行轨道，textarea / .rule-code
       作为该轨道的 grid item 自动 stretch。

       min-height: 0 是必须的（2026-08-04 事故修复）。旧注释这里刻意留空，理由是
       「不让它被压缩到低于内容下限，高度不够时由 .rule-editor-body 的 overflow-y:auto
       接管滚动」——那个前提已经随 AB5 死掉了：上面的 .rule-editor-body 现在是
       overflow:hidden（高度**分配**而非溢出再滚），没有任何祖先还会替它兜底滚动。
       缺了收缩许可，flex 子项的 min-height:auto = 内容高度，而这里的“内容高度”会被
       行号槽的 N 行数字沿「.rule-code → 第二行轨道 → 本标签」整条链顶上来
       （51 行规则 ≈ 1100px），于是整框撑穿 .rule-editor-body：纵向滚不到最后一行，
       贴在 textarea 底边的横向滚动条被直接裁出可视区（DAYU 2026-08-04 线上实测，
       行数少时看不出来）。写 0 才能让它老老实实收缩到“剩余高度”，把滚动交回 textarea 自己。

       轨道下限同样必须是 0：原来写 minmax(200px, 1fr)，那个 200px 是「最小可视高度」，
       同样以「装不下就由 body 滚动」为前提。AB5 之后没人接管溢出，于是可分配高度不足
       200px 时轨道硬撑到 200px、顶穿本标签的盒子，主输入直接压在下面的屏蔽词/说明文字上
       （2026-08-04 复现：可视高 705px 的桌面窗口——1280×800 屏幕开浏览器就是这个数——
       重叠 31px；可视高 555px 时重叠 86px，提示词分类规则页同样被压）。
       分配模型里下限只能是 0；整体最矮由 .panel 的 min-height:520px 兜底，
       再矮就走 ≤1100px 断点的堆叠态固定高度。 */
    .rule-editor-body .rule-field-grow {
      flex: 1 1 auto;
      min-height: 0;
      grid-template-rows: auto minmax(0, 1fr);
    }

    .rule-editor-body .rule-field-grow textarea {
      height: 100%;
      min-height: 0;
    }

    /* 合并规则行号槽（AB5，2026-07-31）：碎片提示会写「第 35 行」，但编辑框没有行号，
       运营只能用手数（DAYU 反馈）。槽与 textarea 共用同一套等宽字体与行高，逐行对齐，
       滚动位置由 JS 同步。
       textarea 用 wrap="off"：软换行会让一条逻辑规则占多个视觉行，行号立刻错位——
       行号要准，就不能让长行折行。代价是超长规则需要横向滚动，换来的是「第 N 行」真的能数到。 */
    .rule-code {
      display: flex;
      align-items: stretch;
      min-height: 0;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      overflow: hidden;
    }

    .rule-code textarea {
      flex: 1 1 auto;
      min-width: 0;
      border: 0;
      border-radius: 0;
      resize: none;
    }

    /* 行号槽绝不能参与尺寸计算：它的内容是 N 行数字（white-space:pre，行数=规则条数），
       一旦所在容器高度不确定，这段内容高度就会沿 flex/grid 链向上传播、把整框撑穿
       （2026-08-04 事故的第二个陷阱）。所以 .rule-code 在**每种模式下都必须有确定高度**
       ——桌面靠下面的 height:100%，窄屏两档靠媒体查询里的固定高度——再由父级的
       align-items:stretch + overflow:hidden 把槽压到容器高度并裁掉多余行。
       槽自身 overflow:hidden 不妨碍 JS 同步：scrollTop 仍可用脚本设置。 */
    .rule-code-gutter {
      flex: 0 0 auto;
      padding: 10px 8px;
      border-right: 1px solid var(--line-soft);
      background: var(--line-soft);
      color: var(--muted);
      font-family: var(--mono);
      font-size: 12.5px;
      font-weight: 600;
      line-height: 1.7;
      text-align: right;
      white-space: pre;
      overflow: hidden;
      user-select: none;
    }

    /* 桌面满高态：轨道高度已确定（见上面的 min-height:0），这里把它落成 .rule-code 的
       确定高度，textarea 与行号槽都只在这个盒子里滚，横向滚动条因此恒贴可视底边。 */
    .rule-editor-body .rule-field-grow .rule-code {
      height: 100%;
    }

    /* 底部操作条：长文本滚动时随时可保存 */
    .rule-editor-foot {
      position: sticky;
      bottom: 0;
      flex: 0 0 auto;
      padding: 12px 16px;
      border-top: 1px solid var(--line-soft);
      background: rgba(255, 255, 255, .92);
      backdrop-filter: blur(6px);
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    /* 统一键盘可达性 */
    .rule-workbench :focus-visible {
      outline: 2px solid rgba(47, 121, 255, .55);
      outline-offset: 2px;
      border-radius: 10px;
    }

    /* 细滚动条：替换掉列表里那根突兀的系统默认粗条 */
    .brand-rule-rows,
    .rule-editor-body,
    #admin-accounts .table-scroll {
      scrollbar-width: thin;
      scrollbar-color: #ccd5e1 transparent;
    }

    .brand-rule-rows::-webkit-scrollbar,
    .rule-editor-body::-webkit-scrollbar,
    #admin-accounts .table-scroll::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    .brand-rule-rows::-webkit-scrollbar-track,
    .rule-editor-body::-webkit-scrollbar-track,
    #admin-accounts .table-scroll::-webkit-scrollbar-track {
      background: transparent;
    }

    .brand-rule-rows::-webkit-scrollbar-thumb,
    .rule-editor-body::-webkit-scrollbar-thumb,
    #admin-accounts .table-scroll::-webkit-scrollbar-thumb {
      border: 2px solid transparent;
      border-radius: 999px;
      background: #ccd5e1;
      background-clip: content-box;
    }

    .brand-rule-rows::-webkit-scrollbar-thumb:hover,
    .rule-editor-body::-webkit-scrollbar-thumb:hover,
    #admin-accounts .table-scroll::-webkit-scrollbar-thumb:hover {
      background: #b3c0d2;
      background-clip: content-box;
    }

    .task-check {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--ink-2);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .task-check input {
      width: 15px;
      height: 15px;
      accent-color: var(--blue);
    }

    .task-control-row {
      padding: 0 16px 16px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .quick.primary {
      color: #fff;
      background: var(--ink);
      border-color: var(--ink);
    }

    .quick.danger {
      color: #c0353b;
      background: #fff7f7;
      border-color: #ffd1d4;
    }

    .task-result {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      max-width: 260px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .platform-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .platform-card {
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      padding: 13px;
      background: #fbfcfe;
      display: grid;
      gap: 12px;
    }

    .platform-card header {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      font-weight: 900;
      color: #273449;
    }

    .meter {
      height: 8px;
      border-radius: 999px;
      background: #edf2f7;
      overflow: hidden;
    }

    .meter span {
      display: block;
      width: var(--v);
      height: 100%;
      border-radius: inherit;
      background: var(--c, var(--blue));
    }

    .metric-stack {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      color: #5e6b7d;
      font-size: 11px;
      font-weight: 750;
    }

    .metric-stack strong {
      display: block;
      margin-top: 4px;
      color: #111827;
      font-size: 15px;
      font-weight: 900;
    }

    .sentiment {
      display: grid;
      gap: 12px;
    }

    .sentiment-row {
      display: grid;
      grid-template-columns: 64px minmax(0, 1fr) 48px;
      align-items: center;
      gap: 10px;
      color: #5f6c7d;
      font-weight: 800;
    }

    .sentiment-kpis {
      margin-bottom: 14px;
    }

    .sentiment-distribution {
      display: grid;
      gap: 14px;
    }

    .sentiment-stack {
      min-height: 42px;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      overflow: hidden;
      background: #f8fafc;
      display: grid;
      grid-template-columns:
        minmax(0, var(--positive, 0fr))
        minmax(0, var(--neutral, 0fr))
        minmax(0, var(--negative, 0fr));
    }

    .sentiment-segment {
      min-width: 4px;
      display: grid;
      place-items: center;
      color: #fff;
      font-size: 12px;
      font-weight: 950;
      white-space: nowrap;
      overflow: hidden;
    }

    .sentiment-segment.positive { background: var(--green); }
    .sentiment-segment.neutral { background: var(--blue); }
    .sentiment-segment.negative { background: var(--red); }

    .sentiment-legend {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .sentiment-legend-item {
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 10px 12px;
      background: #fbfcfe;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    .sentiment-legend-item strong {
      display: block;
      margin-top: 6px;
      color: #111827;
      font-size: 18px;
      font-weight: 950;
    }

    .sentiment-dot {
      width: 9px;
      height: 9px;
      display: inline-block;
      border-radius: 999px;
      margin-right: 6px;
      background: var(--dot, var(--blue));
    }

    .muted-text {
      color: #8a94a6;
      font-size: 12px;
      font-weight: 750;
    }

    .quote {
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      padding: 13px 14px;
      background: #fbfcfe;
      display: grid;
      gap: 9px;
    }

    .quote p {
      margin: 0;
      color: #344054;
      font-size: 13px;
      line-height: 1.7;
    }

    .quote-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #7b8493;
      font-size: 12px;
      font-weight: 800;
    }

    .matrix-layout,
    .evidence-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
      gap: 14px;
      align-items: start;
    }

    .matrix-panel .panel-head {
      padding-bottom: 8px;
      border-bottom: 0;
    }

    .matrix-toolbar {
      padding: 2px 18px 16px;
      border-bottom: 1px solid var(--line-soft);
      background: var(--surface);
      display: grid;
      gap: 10px;
    }

    .matrix-summary-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .matrix-summary {
      min-width: 0;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px 12px;
      color: #68778d;
      font-size: 12px;
      font-weight: 800;
    }

    .matrix-summary strong {
      color: #182235;
      font-weight: 950;
    }

    .matrix-sort-note {
      min-height: 26px;
      border: 1px solid #dbe4ee;
      border-radius: 999px;
      padding: 0 10px;
      display: inline-flex;
      align-items: center;
      color: #4f5f73;
      background: #f7f9fc;
      white-space: nowrap;
      font-size: 12px;
      font-weight: 850;
    }

    .matrix-toolbar .filter-row {
      margin: 0;
      gap: 8px;
    }

    .matrix-toolbar .seg {
      height: 34px;
      padding: 0 14px;
    }

    .report-page {
      display: grid;
      gap: 14px;
    }

    .report-panel-head .panel-title > span {
      white-space: nowrap;
    }

    .side-detail {
      position: sticky;
      top: 78px;
    }

    .detail-block {
      display: grid;
      gap: 12px;
    }

    .detail-title {
      color: #111827;
      font-size: 18px;
      font-weight: 950;
      line-height: 1.35;
    }

    .detail-title-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .detail-title-row .detail-title {
      min-width: 0;
      flex: 1 1 auto;
    }

    .snapshot-shortcut {
      min-width: max-content;
      height: 34px;
      border: 1px solid #dbe4ee;
      border-radius: 9px;
      padding: 0 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      color: #182235;
      background: #fff;
      font-weight: 900;
      box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
    }

    .snapshot-shortcut:hover {
      border-color: #b9c7d9;
      background: #f7f9fc;
    }

    .kv {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .kv div {
      min-height: 66px;
      border: 1px solid var(--line-soft);
      border-radius: 11px;
      padding: 10px 12px;
      background: #fbfcfe;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    .kv strong {
      display: block;
      margin-top: 7px;
      color: #111827;
      font-size: 18px;
      font-weight: 950;
    }

    .copy-block {
      min-width: 0;
      max-width: 100%;
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      padding: 13px 14px;
      background: #fbfcfe;
      color: #344054;
      line-height: 1.72;
      font-weight: 650;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .copy-block.muted {
      color: #667085;
      background: #f7f9fc;
    }

    .evidence-sentiment-card {
      border: 1px solid #dfe6ee;
      border-radius: 12px;
      padding: 14px;
      background: #fbfcfe;
      display: grid;
      gap: 12px;
    }

    .evidence-sentiment-card.positive {
      border-color: #cdebdc;
      background: #f3fbf7;
    }

    .evidence-sentiment-card.neutral {
      border-color: #d7e4ff;
      background: #f5f8ff;
    }

    .evidence-sentiment-card.negative {
      border-color: #ffd1d5;
      background: #fff6f6;
    }

    .sentiment-verdict {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .sentiment-verdict strong {
      color: #111827;
      font-size: 14px;
      font-weight: 950;
    }

    .sentiment-verdict span {
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    .sentiment-reason-grid {
      display: grid;
      gap: 10px;
    }

    .sentiment-reason {
      display: grid;
      gap: 4px;
    }

    .sentiment-reason span {
      color: #667085;
      font-size: 12px;
      font-weight: 900;
    }

    .sentiment-reason p {
      margin: 0;
      color: #273449;
      font-size: 13px;
      line-height: 1.62;
      font-weight: 750;
    }

    .answer-preview-card {
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      padding: 12px 13px;
      background: #fbfcfe;
      display: grid;
      gap: 10px;
    }

    .answer-preview-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: #667085;
      font-size: 12px;
      font-weight: 900;
    }

    .answer-preview-text {
      max-height: 96px;
      overflow: hidden;
      color: #344054;
      line-height: 1.7;
      font-weight: 650;
      white-space: pre-line;
      position: relative;
    }

    .answer-preview-text::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 28px;
      background: linear-gradient(180deg, rgba(251, 252, 254, 0), #fbfcfe);
      pointer-events: none;
    }

    .snapshot-meta-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    .state-box {
      min-height: 92px;
      border: 1px dashed #cfd8e5;
      border-radius: 12px;
      padding: 18px;
      display: grid;
      place-items: center;
      color: #667085;
      background: #fbfcfe;
      text-align: center;
      font-weight: 800;
    }

    .state-box.error {
      color: #b42318;
      background: #fff6f5;
      border-color: #fecaca;
    }

    .state-box .mini-link {
      margin-top: 8px;
    }

    .skeleton {
      min-height: 58px;
      border-radius: 10px;
      background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 37%, #eef2f7 63%);
      background-size: 400% 100%;
      animation: pulse 1.2s ease-in-out infinite;
    }

    @keyframes pulse {
      0% { background-position: 100% 50%; }
      100% { background-position: 0 50%; }
    }

    .answer mark {
      border-radius: 5px;
      padding: 1px 4px;
      color: #0b5f46;
      background: #dcfce7;
    }

    .answer {
      max-height: 56vh;
      overflow: auto;
      overflow-x: hidden;
      font-size: 14px;
      line-height: 1.86;
      font-weight: 620;
    }

    .answer p {
      margin: 0 0 12px;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .answer p:last-child {
      margin-bottom: 0;
    }

    .link-list {
      min-width: 0;
      display: grid;
      gap: 8px;
    }

    .link-list a {
      min-width: 0;
      color: #286fe8;
      overflow-wrap: anywhere;
      text-decoration: none;
      font-weight: 800;
    }

    .link-list span {
      display: block;
      min-width: 0;
      margin-top: 2px;
      color: #667085;
      font-size: 12px;
      font-weight: 700;
      overflow-wrap: anywhere;
    }

    .panel-action:disabled {
      cursor: not-allowed;
      color: #a7b0bf;
      background: #f8fafc;
      opacity: 0.72;
      box-shadow: none;
    }

    .source-link {
      min-width: 0;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 10px 12px;
      background: #fff;
    }

    .source-link summary {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      color: #273449;
      font-weight: 900;
      list-style: none;
    }

    .source-link summary div {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .source-link summary::-webkit-details-marker {
      display: none;
    }

    .source-link summary div span {
      display: block;
      margin-top: 4px;
      color: #667085;
      font-size: 12px;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .source-link p {
      margin: 10px 0 0;
      color: #596579;
      font-size: 12px;
      line-height: 1.65;
      font-weight: 650;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .source-link a {
      display: inline-block;
      margin-top: 8px;
      overflow-wrap: anywhere;
    }

    .snapshot-overlay {
      position: fixed;
      inset: 0;
      z-index: 120;
      display: none;
      background: rgba(15, 23, 42, 0.45);
      backdrop-filter: blur(4px);
    }

    .snapshot-overlay.active {
      display: grid;
      place-items: center;
    }

    .snapshot-modal {
      width: min(1560px, calc(100vw - 32px));
      height: min(900px, calc(100vh - 32px));
      border: 1px solid rgba(226, 232, 240, 0.9);
      border-radius: 12px;
      background: #fff;
      box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
      overflow: hidden;
      display: grid;
      grid-template-rows: 52px minmax(0, 1fr);
    }

    .snapshot-modal-head {
      padding: 0 16px;
      border-bottom: 1px solid #e8edf4;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background: #fff;
    }

    .snapshot-modal-title {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      color: #111827;
      font-size: 15px;
      font-weight: 950;
    }

    .snapshot-modal-title span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .snapshot-modal-meta {
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    /* 弹层头部操作区（Z2）：复制链接 + 关闭并排，两个按钮共用 .snapshot-close 的图标按钮样式。 */
    .snapshot-head-actions {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .snapshot-close {
      width: 34px;
      height: 34px;
      border: 1px solid var(--line-soft);
      border-radius: 9px;
      background: #fff;
      color: #273449;
      display: grid;
      place-items: center;
    }

    .snapshot-replica {
      min-height: 0;
      display: grid;
      grid-template-columns: 248px minmax(520px, 1fr) 372px;
      background: #fff;
      color: #111827;
      font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    }

    .snapshot-ai-sidebar {
      min-height: 0;
      padding: 22px 20px;
      border-right: 1px solid #e5e7f0;
      background: #f4f6fb;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }

    .snapshot-brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .snapshot-brand-icon {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      background: linear-gradient(135deg, #5683ff, #7fa7ff);
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 20px;
      font-weight: 950;
      box-shadow: 0 6px 16px rgba(86, 131, 255, 0.25);
      overflow: hidden;
    }

    .snapshot-brand-icon img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #fff;
    }

    .snapshot-brand-name {
      color: #111827;
      font-size: 18px;
      font-weight: 950;
    }

    .snapshot-brand-sub {
      margin-top: 2px;
      color: #8690a3;
      font-size: 12px;
      font-weight: 800;
    }

    .snapshot-new-chat {
      width: 100%;
      min-height: 52px;
      border: 1px solid rgba(57, 93, 255, 0.45);
      border-radius: 16px;
      background: rgba(82, 110, 255, 0.1);
      color: #395dff;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      font-size: 15px;
      font-weight: 950;
    }

    .snapshot-menu {
      display: grid;
      gap: 8px;
    }

    .snapshot-menu-item {
      min-height: 44px;
      border: 0;
      border-radius: 12px;
      background: transparent;
      color: #2f3a4c;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 12px;
      font-size: 14px;
      font-weight: 850;
      text-align: left;
    }

    .snapshot-menu-item.active,
    .snapshot-menu-item:hover {
      background: #e7ecfb;
    }

    .snapshot-menu-icon {
      width: 24px;
      height: 24px;
      border-radius: 8px;
      background: #edf1ff;
      color: #395dff;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .snapshot-recent {
      margin-top: auto;
      padding-top: 18px;
      border-top: 1px solid rgba(148, 163, 184, 0.25);
    }

    .snapshot-chat {
      min-width: 0;
      min-height: 0;
      position: relative;
      background: #fff;
      display: grid;
      grid-template-rows: 44px minmax(0, 1fr);
    }

    .snapshot-time {
      display: flex;
      align-items: center;
      justify-content: center;
      color: #111827;
      font-size: 13px;
      font-weight: 950;
    }

    .snapshot-chat-scroll {
      min-height: 0;
      overflow: auto;
      padding: 34px 64px 72px;
    }

    .snapshot-prompt {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 20px;
    }

    .snapshot-prompt-bubble {
      max-width: 560px;
      border-radius: 10px;
      padding: 12px 18px;
      background: #f2f3f5;
      color: #111827;
      font-size: 15px;
      font-weight: 850;
      line-height: 1.7;
    }

    .snapshot-thinking {
      margin: 0 0 14px;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      background: #f8f9fa;
      overflow: hidden;
    }

    .snapshot-thinking summary {
      cursor: pointer;
      padding: 12px 16px;
      color: #5f6368;
      font-size: 14px;
      font-weight: 850;
      list-style: none;
    }

    .snapshot-thinking summary::-webkit-details-marker {
      display: none;
    }

    .snapshot-thinking-body {
      border-top: 1px solid #e9ecef;
      padding: 14px 16px;
      background: #fff;
      color: #3c4043;
      font-size: 14px;
      line-height: 1.75;
    }

    .snapshot-search-pill {
      width: fit-content;
      margin: 8px 0 20px;
      border: 0;
      border-radius: 8px;
      padding: 8px 12px;
      background: #f2f3f5;
      color: #5f6368;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 850;
    }

    .snapshot-answer {
      color: #111827;
      font-size: 16px;
      line-height: 1.82;
      font-weight: 650;
    }

    .snapshot-answer h1,
    .snapshot-answer h2,
    .snapshot-answer h3,
    .snapshot-answer h4 {
      margin: 22px 0 12px;
      color: #111827;
      font-weight: 950;
      line-height: 1.35;
    }

    .snapshot-answer h1 { font-size: 28px; }
    .snapshot-answer h2 { font-size: 23px; }
    .snapshot-answer h3 { font-size: 18px; }
    .snapshot-answer h4 { font-size: 16px; }

    .snapshot-answer p {
      margin: 0 0 14px;
    }

    .snapshot-answer ul,
    .snapshot-answer ol {
      margin: 8px 0 16px;
      padding-left: 24px;
    }

    .snapshot-answer li {
      margin: 5px 0;
    }

    .snapshot-answer strong {
      font-weight: 950;
    }

    .snapshot-answer blockquote {
      margin: 14px 0;
      border-left: 3px solid #d5dbe7;
      padding: 8px 12px;
      color: #4b5563;
      background: #f8fafc;
    }

    .snapshot-answer hr {
      border: 0;
      border-top: 1px solid #e5e7eb;
      margin: 20px 0;
    }

    .snapshot-table-wrap {
      max-width: 100%;
      overflow-x: auto;
      margin: 14px 0 20px;
    }

    .snapshot-answer table {
      width: 100%;
      min-width: 640px;
      border-collapse: collapse;
      border: 1px solid #e5e7eb;
      font-size: 13px;
      line-height: 1.55;
    }

    .snapshot-answer th,
    .snapshot-answer td {
      border: 1px solid #e5e7eb;
      padding: 9px 10px;
      text-align: left;
      vertical-align: top;
    }

    .snapshot-answer th {
      color: #111827;
      background: #f8fafc;
      font-weight: 950;
    }

    .snapshot-citation {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 18px;
      min-width: 18px;
      padding: 0 6px;
      border-radius: 999px;
      margin: 0 2px;
      background: #e5e7eb;
      color: #404040;
      font-size: 12px;
      font-weight: 750;
      vertical-align: 2px;
    }

    /* ------------------------------------------------------------------
       结构化正文的媒体块（AA2）：图片墙 / 视频 / 图文笔记
       视觉沿用站内 card + pill 语言（细边框、10px 圆角、克制的灰阶副标题），
       不引入新的色板。横向滚动条自身产生，min-width:0 防 grid 轨道被撑大——
       这是本仓库反复踩过的同一个坑（.export-panel-body / .snapshot-chat）。
       ------------------------------------------------------------------ */
    .snapshot-media-block {
      min-width: 0;
      margin: 6px 0 20px;
    }

    .snapshot-media-label {
      margin-bottom: 8px;
      color: #8a94a6;
      font-size: 12px;
      font-weight: 850;
    }

    .snapshot-media-strip {
      min-width: 0;
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding-bottom: 6px;
      scrollbar-width: thin;
    }

    .snapshot-media-card {
      position: relative;
      flex: 0 0 auto;
      width: 176px;
      border: 1px solid #e8edf4;
      border-radius: 10px;
      background: #fff;
      padding: 0;
      overflow: hidden;
      text-align: left;
      text-decoration: none;
      cursor: pointer;
      display: block;
      transition: border-color 140ms ease, box-shadow 140ms ease;
    }

    .snapshot-media-card:hover {
      border-color: #cdd8ea;
      box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .snapshot-media-img,
    .snapshot-media-placeholder {
      display: block;
      width: 100%;
      height: 118px;
      object-fit: cover;
      background: #f1f5f9;
    }

    .snapshot-media-placeholder {
      display: grid;
      place-items: center;
      padding: 0 10px;
      color: #9aa3af;
      font-size: 11px;
      font-weight: 800;
      text-align: center;
    }

    .snapshot-media-play {
      position: absolute;
      top: 82px;
      left: 10px;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: rgba(15, 23, 42, 0.62);
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 15px;
    }

    .snapshot-media-body {
      display: grid;
      gap: 3px;
      padding: 8px 10px 10px;
    }

    .snapshot-media-title {
      color: #111827;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.45;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .snapshot-media-sub {
      color: #8a94a6;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* 大图查看：复用 .snapshot-overlay 的遮罩与 .active 显隐，只加内容框。 */
    .media-lightbox {
      z-index: 140;
    }

    .media-lightbox-frame {
      position: relative;
      width: min(1080px, calc(100vw - 48px));
      max-height: calc(100vh - 48px);
      display: grid;
      grid-template-rows: minmax(0, 1fr) auto;
      gap: 10px;
      justify-items: center;
    }

    .media-lightbox-frame img {
      max-width: 100%;
      max-height: calc(100vh - 120px);
      border-radius: 10px;
      background: #fff;
      object-fit: contain;
    }

    .media-lightbox-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      max-width: 100%;
      color: #fff;
      font-size: 13px;
      font-weight: 800;
    }

    .media-lightbox-bar span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .media-lightbox-bar a {
      color: #cfe0ff;
      white-space: nowrap;
    }

    .media-lightbox-close {
      position: absolute;
      top: -34px;
      right: 0;
      color: #fff;
    }

    .snapshot-results {
      min-height: 0;
      border-left: 1px solid #e8edf4;
      background: #fff;
      display: grid;
      grid-template-rows: 56px minmax(0, 1fr);
    }

    .snapshot-results-head {
      padding: 0 18px;
      border-bottom: 1px solid #eef2f6;
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #111827;
      font-size: 15px;
      font-weight: 950;
    }

    /* 顶部汇总里的「其中 X 条自有」（2026-08-05）：比标题小一号、绿字，
       跟在「共 N 条」后面做补充说明，不与标题抢层级。 */
    .snapshot-results-own-count {
      margin-left: 8px;
      color: #0f7a4d;
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
    }

    .snapshot-results-list {
      min-height: 0;
      overflow: auto;
      padding: 14px 16px 24px;
      display: grid;
      align-content: start;
      gap: 16px;
    }

    .snapshot-result-item {
      border: 0;
      background: transparent;
      padding: 0;
      text-align: left;
      display: grid;
      gap: 8px;
      cursor: pointer;
    }

    .snapshot-result-meta {
      display: grid;
      grid-template-columns: 22px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      color: #8a94a6;
      font-size: 12px;
      font-weight: 800;
    }

    .snapshot-result-icon {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #eef2ff;
      display: grid;
      place-items: center;
      overflow: hidden;
    }

    .snapshot-result-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .snapshot-result-rank {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #f1f5f9;
      color: #9aa3af;
      display: grid;
      place-items: center;
      font-size: 11px;
      font-weight: 950;
    }

    .snapshot-result-title {
      color: #111827;
      font-size: 15px;
      font-weight: 950;
      line-height: 1.45;
    }

    .snapshot-result-desc {
      color: #667085;
      font-size: 13px;
      line-height: 1.6;
      font-weight: 650;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* 自有引用标记（Z1）：原来整行是一个 button，现在外层改 div、内层 .snapshot-result-open
       承接"整行可点打开来源"的行为，视觉与改动前一致；徽标与操作单独一行，不挤 meta 网格。 */
    .snapshot-result-open {
      width: 100%;
      border: 0;
      background: transparent;
      padding: 0;
      text-align: left;
      display: grid;
      gap: 8px;
      cursor: pointer;
    }

    .snapshot-result-own {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 18px;
    }

    .source-link-tags {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* 整行高亮（2026-08-05）：DAYU 反馈"只有一个小徽标，打开快照根本注意不到自有引用"，
       目标是扫一眼就能看见整行，而不是去找小字。
       用 ::before 画底色和左竖条，而不是给行加 padding/border：
       - 引用行的布局（.snapshot-results-list 的 gap:16px、行内 grid）一个字都不动，
         普通行的位置、宽度、换行完全不受影响，避免"为了标 15% 的行，动了 100% 的行"。
       - 负 inset 让高亮块比内容大一圈；上下只取 -6px，两条相邻自有行之间仍留 4px 缝，
         不会糊成一整片看不出行边界。
       z-index 必须显式给：定位后的 ::before 默认画在非定位子元素**之上**（会盖住标题文字），
       所以 ::before 压到 0、行内直接子元素抬到 1。不用 z-index:-1——那会掉到
       .snapshot-results 的白底后面直接看不见。 */
    .snapshot-result-item {
      position: relative;
    }

    .snapshot-result-item.is-own::before {
      content: "";
      position: absolute;
      inset: -6px -10px -6px -12px;
      border-radius: 10px;
      background: #f0faf4;
      border-left: 3px solid var(--green);
      pointer-events: none;
      z-index: 0;
    }

    .snapshot-result-item.is-own > * {
      position: relative;
      z-index: 1;
    }

    /* 人工标记沿用"虚线 = 人工"的既有语义（.own-link-pill.manual 同款）：
       整行也高亮（客户要的是"看见自有"），但竖条改虚线，保留自动/手动的区分。 */
    .snapshot-result-item.is-own.is-own-manual::before {
      border-left-style: dashed;
    }

    /* 徽标加强（2026-08-05）：11px→12px、加盾形对勾图标、绿色加深一档。
       仍然克制——不加阴影、不放大到正文字号，避免把"标注"做成"主角"。 */
    .own-link-pill {
      border: 1px solid rgba(21, 138, 91, 0.45);
      background: #dcf4e8;
      color: #0f7a4d;
      border-radius: 999px;
      padding: 2px 9px;
      font-size: 12px;
      font-weight: 900;
      line-height: 1.5;
      white-space: nowrap;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .own-link-pill i {
      font-size: 13px;
      line-height: 1;
    }

    .own-link-pill.manual {
      border-style: dashed;
    }

    /* 操作链接常态隐形，hover 该引用行才出现：克制、不与徽标抢戏。 */
    .own-link-action {
      border: 0;
      background: transparent;
      padding: 0;
      color: #9aa3af;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
      opacity: 0;
      transition: opacity 140ms ease, color 140ms ease;
    }

    .snapshot-result-item:hover .own-link-action,
    .own-link-action:focus-visible {
      opacity: 1;
    }

    .own-link-action:hover {
      color: var(--blue);
      text-decoration: underline;
    }

    .own-link-action[disabled] {
      opacity: 1;
      cursor: default;
      text-decoration: none;
      color: #c3cad6;
    }

    /* 触屏没有 hover：操作常显，否则移动端无从下手。 */
    @media (hover: none) {
      .own-link-action {
        opacity: 1;
      }
    }

    .evidence-list {
      display: grid;
      gap: 8px;
    }

    .evidence-item,
    .report-item {
      width: 100%;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px 13px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      background: #fbfcfe;
      text-align: left;
      transition: background 160ms ease, border 160ms ease;
    }

    .evidence-item:hover,
    .evidence-item.active,
    .report-item:hover,
    .report-item.active {
      border-color: #b7cdfb;
      background: #f3f7ff;
    }

    .evidence-item strong,
    .report-item strong {
      display: block;
      color: #273449;
      font-weight: 900;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .evidence-item span,
    .report-item span {
      display: block;
      margin-top: 6px;
      color: #667085;
      font-size: 12px;
      font-weight: 700;
    }

    .filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }

    .filter-row .seg {
      border: 1px solid var(--line);
      background: var(--surface);
    }

    .filter-row .seg.active {
      border-color: var(--black);
      background: var(--black);
    }

    .evidence-filters {
      display: grid;
      grid-template-columns: repeat(4, minmax(128px, 1fr));
      gap: 10px;
      margin-bottom: 12px;
      align-items: end;
    }

    .filter-field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .filter-field label {
      color: #667085;
      font-size: 12px;
      font-weight: 900;
    }

    .filter-field select {
      width: 100%;
      height: 38px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 0 10px;
      color: #273449;
      background: #fff;
      font-weight: 850;
    }

    .filter-field .filter-row {
      margin-bottom: 0;
    }

    .evidence-count {
      margin-bottom: 10px;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    .report-reader {
      display: grid;
      gap: 18px;
    }

    .report-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: start;
    }

    .report-eyebrow {
      margin-bottom: 8px;
      color: #667085;
      font-size: 12px;
      font-weight: 850;
    }

    .report-headline {
      margin: 0;
      color: #111827;
      font-size: 24px;
      line-height: 1.3;
      font-weight: 950;
      letter-spacing: 0;
    }

    .report-summary {
      margin: 10px 0 0;
      max-width: 880px;
      color: #344054;
      font-size: 15px;
      line-height: 1.8;
      font-weight: 700;
    }

    .report-actions {
      min-width: 220px;
      display: grid;
      gap: 8px;
    }

    .report-actions .quick {
      width: 100%;
      justify-content: space-between;
    }

    .report-kpis {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .report-kpi {
      min-height: 104px;
      border: 1px solid var(--line-soft);
      border-radius: 11px;
      padding: 13px 14px;
      background: #fbfcfe;
      display: grid;
      align-content: space-between;
      gap: 8px;
    }

    .report-kpi span {
      color: #667085;
      font-size: 12px;
      font-weight: 850;
    }

    .report-kpi strong {
      color: #111827;
      font-size: 28px;
      line-height: 1.1;
      font-weight: 950;
    }

    .report-kpi small {
      color: #667085;
      font-size: 12px;
      line-height: 1.45;
      font-weight: 750;
    }

    .report-advice {
      border: 1px solid var(--line-soft);
      border-radius: 12px;
      padding: 14px;
      background: #fffaf2;
      display: grid;
      gap: 10px;
    }

    .report-advice-title {
      color: #111827;
      font-size: 14px;
      font-weight: 950;
    }

    .report-advice-list {
      margin: 0;
      padding: 0;
      display: grid;
      gap: 8px;
      list-style: none;
    }

    .report-advice-list li {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      color: #344054;
      font-size: 13px;
      line-height: 1.55;
      font-weight: 750;
    }

    .report-advice-list i {
      margin-top: 2px;
      color: var(--orange);
      font-size: 15px;
      flex: 0 0 auto;
    }

    .report-history-head {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(160px, .55fr) minmax(220px, .85fr) minmax(120px, .4fr);
      gap: 12px;
      padding: 0 14px 10px;
      color: #68778d;
      font-size: 12px;
      font-weight: 850;
    }

    .report-timeline {
      display: grid;
      gap: 8px;
    }

    .report-item {
      grid-template-columns: minmax(0, 1.2fr) minmax(160px, .55fr) minmax(220px, .85fr) minmax(120px, .4fr);
      align-items: center;
      min-height: 78px;
    }

    .report-item strong {
      white-space: normal;
      line-height: 1.4;
    }

    .report-item span {
      margin-top: 4px;
    }

    .report-row-title {
      min-width: 0;
    }

    .report-row-metrics {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }

    .report-row-status {
      justify-self: end;
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 6px;
    }

    .report-row-metrics .pill,
    .report-row-title .pill,
    .report-row-status .pill {
      display: inline-flex;
      margin-top: 0;
    }

    .report-row-title .pill {
      margin-left: 6px;
      vertical-align: middle;
    }

    .compact-kpis .kpi-value.text-fit {
      max-width: calc(100% - 58px);
      font-size: clamp(20px, 2.1vw, 34px);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .semantic-table-wrap {
      max-height: 560px;
      overflow: auto;
      overscroll-behavior: contain;
    }

    .semantic-table {
      min-width: 1040px;
      table-layout: fixed;
    }

    .semantic-table th,
    .semantic-table td {
      text-align: center;
    }

    .semantic-table th:first-child,
    .semantic-table td:first-child {
      width: 72px;
      min-width: 72px;
      max-width: 72px;
      position: sticky;
      left: 0;
      z-index: 3;
      background: #fff;
      text-align: center;
    }

    .semantic-table th:nth-child(2),
    .semantic-table td:nth-child(2) {
      width: 320px;
      min-width: 320px;
      max-width: 320px;
      position: sticky;
      left: 72px;
      z-index: 3;
      background: #fff;
      text-align: left;
    }

    .semantic-table th:first-child,
    .semantic-table th:nth-child(2) {
      z-index: 4;
      background: #fbfcfe;
    }

    .semantic-round-head {
      display: grid;
      gap: 3px;
      justify-items: center;
      white-space: nowrap;
    }

    .semantic-round-head span {
      color: #98a2b3;
      font-size: 11px;
      font-weight: 800;
    }

    .semantic-index {
      color: #667085;
      font-weight: 850;
    }

    .status-chip {
      min-height: 28px;
      border: 0;
      border-radius: 999px;
      padding: 5px 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #475467;
      background: #f1f5f9;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    button.status-chip {
      cursor: pointer;
    }

    .status-chip.green {
      color: #087443;
      background: var(--green-2);
    }

    .status-chip.orange {
      color: #a15c00;
      background: var(--orange-2);
    }

    .status-chip.red {
      color: #c0353b;
      background: var(--red-2);
    }

    .status-chip.gray {
      color: #5f6c7d;
      background: #eff3f7;
    }

    /* 无法核验（LR1）：站点拒绝程序访问时的中性态。刻意不用灰色——灰色在本页
       等于「已失效」，而这类链接绝大多数是好的，只是机器探不出来。 */
    .status-chip.muted {
      color: #4a5b8c;
      background: #eef1fb;
    }

    /* 链接复核失败流水（LR1）：出错时把最近几轮的错误直接摆在运维总览里。 */
    .link-recheck-runs {
      margin: 6px 0 0;
      padding-left: 18px;
      font-size: 12px;
      line-height: 1.7;
      color: #7a4a2e;
      word-break: break-word;
    }

    .link-recheck-runs strong {
      margin-right: 6px;
      font-weight: 600;
    }

    .status-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-content: start;
    }

    .asset-table td:first-child {
      min-width: 300px;
      max-width: 520px;
    }

    .asset-toolbar {
      min-height: 54px;
      padding: 10px 14px;
      border-top: 1px solid var(--line-soft);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
      background: #fbfcfe;
    }

    .asset-pager {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .pager-btn {
      min-width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: #fff;
      color: #273449;
      font-size: 16px;
      font-weight: 900;
      cursor: pointer;
    }

    .pager-btn:disabled {
      opacity: 0.42;
      cursor: not-allowed;
    }

    .asset-domain-button {
      width: 100%;
      box-sizing: border-box;
      min-height: 72px;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px 14px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      background: #fbfcfe;
      text-align: left;
      cursor: pointer;
    }

    .asset-domain-button.active {
      border-color: rgba(81, 122, 255, 0.35);
      background: #f3f7ff;
      box-shadow: 0 0 0 3px rgba(81, 122, 255, 0.08);
    }

    .asset-domain-button strong,
    .domain-detail-item strong,
    .asset-title a,
    .asset-title span {
      display: block;
      color: #273449;
      font-size: 13px;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .asset-domain-button div > span,
    .domain-detail-item span {
      display: block;
      margin-top: 6px;
      color: #667085;
      font-size: 12px;
      font-weight: 750;
    }

    .domain-detail-list {
      display: grid;
      gap: 10px;
    }

    .asset-title {
      display: grid;
      min-width: 0;
    }

    .asset-title a {
      text-decoration: none;
    }

    .asset-title a:hover,
    .domain-detail-title:hover {
      color: #111827;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .asset-site-inline,
    .asset-match-inline,
    .domain-detail-content {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .asset-site-inline strong,
    .asset-match-inline strong {
      color: #273449;
      font-weight: 900;
    }

    .asset-site-inline span,
    .asset-match-inline span {
      color: #667085;
      font-size: 12px;
      font-weight: 800;
    }

    .domain-detail-item {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px 14px;
      background: #fbfcfe;
      min-width: 0;
    }

    .domain-detail-title {
      color: #273449;
      text-decoration: none;
    }

    .toast {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 80;
      max-width: min(360px, calc(100vw - 32px));
      border-radius: 12px;
      padding: 12px 14px;
      color: #fff;
      background: #17191f;
      box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
      opacity: 0;
      transform: translateY(10px);
      pointer-events: none;
      transition: opacity 180ms ease, transform 180ms ease;
      font-weight: 800;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }

    .mobile-tabs {
      display: none;
    }

    @media (max-width: 1420px) {
      .project-bar {
        grid-template-columns: minmax(180px, 0.75fr) auto minmax(300px, 1.4fr) minmax(170px, 0.55fr);
        gap: 12px;
        padding-left: 16px;
        padding-right: 16px;
      }

      .project-bar .field {
        gap: 8px;
      }

      .project-bar .seg {
        padding-left: 10px;
        padding-right: 10px;
      }

      .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .grid-main,
      .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .grid-main > .panel:last-child {
        grid-column: span 2;
      }

      .platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 1280px) and (min-width: 1101px) {
      .project-bar {
        grid-template-columns: auto minmax(0, 1fr) minmax(150px, 220px);
        grid-template-areas:
          "project project target"
          "prompt platform platform";
        row-gap: 12px;
      }

      .project-bar .field:first-child {
        grid-area: project;
      }

      .prompt-type-segments {
        grid-area: prompt;
      }

      #platformSegments {
        grid-area: platform;
      }

      .project-bar .field:last-child {
        grid-area: target;
      }
    }

    @media (max-width: 1100px) {
      .app {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 260px;
        transform: translateX(-105%);
        transition: transform 180ms ease;
      }

      body.nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
      }

      .mobile-menu {
        display: inline-grid;
        place-items: center;
      }

      .content {
        width: 100%;
      }

      .project-bar {
        grid-template-columns: 1fr;
      }

      .segments {
        justify-self: stretch;
      }

      #platformSegments {
        flex-wrap: wrap;
        overflow-x: visible;
      }

      .matrix-layout,
      .evidence-layout,
      .system-layout {
        grid-template-columns: 1fr;
      }

      /* 窄屏：规则工作台改为单列堆叠，放弃满高计算，回到随页面滚动 */
      #admin-prompt-rules .panel,
      #admin-brand-rules .panel {
        height: auto;
        min-height: 0;
        display: block;
      }

      .rule-workbench {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
      }

      .rule-list,
      .rule-editor {
        min-height: 0;
      }

      .rule-editor-body {
        overflow: visible;
      }

      /* 堆叠态下没有“剩余高度”可分配，主输入退回确定的固定高度，避免被内容撑成不可预期的长度 */
      .rule-editor-body .rule-field-grow {
        flex: 0 0 auto;
        grid-template-rows: auto auto;
      }

      /* 固定高度必须写在 .rule-code 上、而不是它里面的 textarea 上（2026-08-04 事故修复）。
         堆叠态没有可分配的剩余高度，桌面那条 .rule-code{height:100%} 的百分比无从解析、
         退化成 auto——容器高度一 auto，行号槽的 N 行数字就成了容器高度，手机上必然撑爆。
         把确定高度落在盒子上，textarea 回到 height:100% 填满它。
         提示词分类规则页（#admin-prompt-rules）的主输入没有 .rule-code 包裹、textarea 直接
         是 grid item，所以另写一条子选择器 `> textarea` 给它保住这一档的固定高度。 */
      .rule-editor-body .rule-field-grow .rule-code {
        height: 320px;
      }

      .rule-editor-body .rule-field-grow .rule-code textarea {
        height: 100%;
        min-height: 0;
      }

      .rule-editor-body .rule-field-grow > textarea {
        height: 320px;
        min-height: 0;
      }

      /* 堆叠态屏蔽词回到全宽：窄屏没有并排的空间 */
      .rule-editor-bottom {
        grid-template-columns: 1fr;
      }

      .side-detail {
        position: static;
      }

      .snapshot-modal {
        width: min(980px, calc(100vw - 20px));
        height: min(900px, calc(100vh - 20px));
      }

      .snapshot-replica {
        grid-template-columns: minmax(0, 1fr);
      }

      .snapshot-ai-sidebar {
        display: none;
      }

      .snapshot-results {
        display: none;
      }

      .snapshot-chat-scroll {
        padding: 28px 34px 56px;
      }

      .sentiment-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .task-admin-form,
      .task-admin-form.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .system-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .brand-rule-rows {
        flex: 0 0 auto;
        max-height: 340px;
      }
    }

    @media (max-width: 760px) {
      body {
        font-size: 12px;
      }

      .topbar {
        grid-template-columns: auto auto minmax(0, 1fr);
        padding: 9px 12px;
      }

      .load-progress {
        top: 48px;
        padding-left: 12px;
        padding-right: 12px;
      }

      .home-pill {
        height: 30px;
        padding: 0 10px;
      }

      .top-meta {
        display: none;
      }

      /* #logoutButton 是移动端唯一登出入口，必须保持可见；安卓壳 shim.js 检测到它可见后会停止注入替代登出项 */
      .top-actions .icon-btn:not(#logoutButton),
      .user-menu span:not(.avatar),
      .user-menu i {
        display: none;
      }

      .user-menu {
        padding: 0;
        gap: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
      }

      .content {
        padding: 12px 10px 24px;
      }

      .project-bar {
        padding: 12px;
        border-radius: 12px;
      }

      /* 筛选区默认折叠成一行摘要，点开才展开完整筛选，把首屏还给数据 */
      .filter-summary {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 36px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #243246;
        font-weight: 800;
        text-align: left;
      }

      .filter-summary .ri-filter-3-line {
        flex: 0 0 auto;
        color: #68778d;
        font-size: 16px;
      }

      .filter-summary-text {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .filter-summary-arrow {
        flex: 0 0 auto;
        color: #68778d;
        font-size: 18px;
        transition: transform 160ms ease;
      }

      .project-bar:not(.filters-collapsed) .filter-summary-arrow {
        transform: rotate(180deg);
      }

      .project-bar.filters-collapsed {
        min-height: 0;
      }

      .project-bar.filters-collapsed .field,
      .project-bar.filters-collapsed .segments {
        display: none;
      }

      /* 五个快捷入口与 .mobile-tabs 完全重复，移动端不再占两行 */
      .quick-row {
        display: none;
      }

      .evidence-filters {
        grid-template-columns: 1fr;
      }

      .field {
        display: grid;
        gap: 8px;
      }

      .segments {
        justify-content: start;
      }

      .grid-main,
      .grid-2,
      .platform-grid,
      .system-grid,
      .system-stat-row,
      .task-admin-form,
      .task-admin-form.compact,
      .report-kpis,
      .kv {
        grid-template-columns: 1fr;
      }

      /* KPI 双列紧凑排布；奇数张卡时首卡跨双列（5 张 = 1 大 + 2×2），不留残行 */
      .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .kpi-grid .kpi:first-child:nth-last-child(odd) {
        grid-column: span 2;
      }

      .brand-rule-row {
        grid-template-columns: 1fr;
      }

      .rule-editor-head {
        flex-direction: column;
        align-items: start;
      }

      .task-field.span-2 {
        grid-column: span 1;
      }

      .task-admin-form .span-2 {
        grid-column: span 1;
      }

      .task-job-footer,
      .task-advanced-grid {
        grid-template-columns: 1fr;
      }

      .report-hero {
        grid-template-columns: 1fr;
      }

      .report-panel-head {
        align-items: flex-start;
      }

      .report-panel-head .panel-title {
        display: grid;
        grid-template-columns: 28px minmax(0, auto);
        row-gap: 4px;
      }

      .report-panel-head .panel-title small {
        grid-column: 2;
      }

      .report-actions {
        min-width: 0;
      }

      .report-history-head {
        display: none;
      }

      .report-item {
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .report-row-status {
        justify-self: start;
        justify-content: flex-start;
      }

      .grid-main > .panel:last-child,
      .panel.span-2 {
        grid-column: auto;
      }

      .kpi {
        min-height: 88px;
        padding: 12px 14px;
        border-radius: 14px;
      }

      .kpi-value {
        font-size: 26px;
      }

      #cockpit .kpi:first-child .kpi-value {
        font-size: 34px;
      }

      .kpi-icon {
        width: 32px;
        height: 32px;
        right: 12px;
        bottom: 12px;
        font-size: 16px;
      }

      .panel-head {
        padding: 12px;
      }

      .matrix-panel .panel-head {
        padding-bottom: 8px;
      }

      .matrix-toolbar {
        padding: 0 12px 12px;
      }

      .matrix-summary-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
      }

      .matrix-summary {
        gap: 5px 10px;
      }

      .matrix-toolbar .filter-row {
        gap: 6px;
      }

      .matrix-toolbar .seg {
        height: 32px;
        padding: 0 11px;
      }

      .panel-body {
        padding: 12px;
      }

      .brand-source-hint,
      .brand-source-folded {
        padding: 8px 12px;
      }

      .detail-title-row {
        align-items: stretch;
        flex-direction: column;
      }

      .snapshot-shortcut {
        width: 100%;
      }

      .chart-wrap {
        min-height: 250px;
      }

      canvas {
        height: 218px;
      }

      .source-bars {
        grid-template-columns: repeat(5, minmax(36px, 1fr));
        min-height: 260px;
        gap: 14px;
      }

      .data-table {
        min-width: 680px;
      }

      .table-scroll {
        overflow-x: auto;
      }

      /* 单行横滑 + 吸在 topbar 下面（top 与 topbar 高度重叠 1px 防露缝），像 App 的页签而不是按钮墙 */
      .mobile-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        position: sticky;
        top: 57px;
        z-index: 20;
        margin: 0 -10px;
        padding: 10px 10px 8px;
        background: var(--bg);
      }

      .mobile-tabs::-webkit-scrollbar {
        display: none;
      }

      .mobile-tabs button {
        flex: 0 0 auto;
        min-height: 36px;
        border: 1px solid var(--line);
        border-radius: 9px;
        padding: 0 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #4b5563;
        background: var(--surface);
        white-space: nowrap;
        font-weight: 850;
      }

      .mobile-tabs button.active {
        color: #fff;
        border-color: var(--black);
        background: var(--black);
      }

      .snapshot-overlay.active {
        place-items: stretch;
      }

      .snapshot-modal {
        width: 100vw;
        height: 100vh;
        border: 0;
        border-radius: 0;
      }

      .snapshot-modal-head {
        min-height: 52px;
      }

      .snapshot-modal-title {
        font-size: 13px;
      }

      .snapshot-modal-meta {
        display: none;
      }

      .snapshot-chat {
        grid-template-rows: 40px minmax(0, 1fr);
      }

      .snapshot-time {
        font-size: 12px;
      }

      .snapshot-chat-scroll {
        padding: 20px 16px 42px;
      }

      .snapshot-prompt-bubble {
        max-width: 92%;
        font-size: 13px;
      }

      .snapshot-answer {
        font-size: 14px;
      }

      .snapshot-answer h1 { font-size: 22px; }
      .snapshot-answer h2 { font-size: 19px; }
      .snapshot-answer h3 { font-size: 16px; }

      /* 媒体卡在窄屏收一档：176px 卡片在 375px 视口里会挤到只剩一张半。 */
      .snapshot-media-card {
        width: 148px;
      }

      .snapshot-media-img,
      .snapshot-media-placeholder {
        height: 100px;
      }

      .snapshot-media-play {
        top: 64px;
      }

      .sentiment-legend {
        grid-template-columns: 1fr;
      }
    }

    /* 规则工作台的最窄档：chips 横向滚动、主输入收紧，底部操作条仍随页面粘住 */
    @media (max-width: 640px) {
      .rule-toolbar {
        padding: 12px 12px 10px;
      }

      .rule-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
      }

      .rule-chips::-webkit-scrollbar {
        display: none;
      }

      .brand-rule-rows {
        max-height: 300px;
        padding: 8px 8px 12px;
      }

      .rule-editor-body {
        padding: 12px;
      }

      /* 次要输入先收紧，主输入的规则必须写在它之后——两条选择器特指度相同，靠顺序决胜 */
      .rule-editor-body .task-field textarea {
        height: 88px;
      }

      /* 同 1100px 档：确定高度落在 .rule-code 上，textarea 填满；提示词页走 `> textarea`。
         这三条都必须排在上面那条 .task-field textarea{88px} 之后——特指度相同，靠顺序决胜，
         否则合并规则框会掉回屏蔽词的 88px。 */
      .rule-editor-body .rule-field-grow .rule-code {
        height: 240px;
      }

      .rule-editor-body .rule-field-grow .rule-code textarea {
        height: 100%;
      }

      .rule-editor-body .rule-field-grow > textarea {
        height: 240px;
      }

      .rule-editor-foot {
        padding: 10px 12px;
      }

      .rule-editor-foot .quick {
        flex: 1 1 auto;
        justify-content: center;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
      }
    }

    /* 快照批量导出面板（见 SNAPSHOT_EXPORT_PLAN.md Step 6） */
    .export-modal {
      width: min(760px, calc(100vw - 32px));
      height: min(720px, calc(100vh - 32px));
      grid-template-rows: 52px minmax(0, 1fr);
    }

    .export-panel-body {
      min-height: 0;
      min-width: 0;
      overflow-y: auto;
      padding: 22px 26px 28px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
    }

    .export-scope,
    .export-jobs {
      min-width: 0;
    }

    .export-scope h4 {
      margin: 0 0 12px;
      color: #111827;
      font-size: 14px;
      font-weight: 950;
    }

    .export-scope-row {
      display: grid;
      grid-template-columns: minmax(160px, 1.4fr) minmax(140px, 1fr) minmax(140px, 1fr);
      gap: 12px;
      margin-bottom: 10px;
    }

    #exportRoundSelect {
      height: auto;
      min-height: 128px;
      padding: 6px;
    }

    .export-scope .task-helper {
      margin: 8px 0 14px;
    }

    .export-jobs {
      border-top: 1px solid #eef2f6;
      padding-top: 18px;
    }

    .export-jobs .panel-head {
      padding: 0 0 12px;
      border-bottom: 0;
    }

    @media (max-width: 900px) {
      .export-modal {
        width: min(94vw, 520px);
      }

      .export-scope-row {
        grid-template-columns: 1fr;
      }
    }

    .round-health-controls {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .round-health-controls select {
      height: 34px;
      max-width: 200px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 0 10px;
      background: var(--surface);
      color: inherit;
      font-size: 13px;
    }

    body.admin-view-active .project-bar,
    body.admin-view-active .quick-row,
    body.admin-view-active .round-status-notice {
      display: none;
    }

    /* 运维总览：需要关注清单的“一切正常”态（见 ADMIN_CONSOLE_PLAN.md Phase S2） */
    .state-box.ok {
      color: #087443;
      background: var(--green-2);
      border-color: #bfe8d3;
      border-style: solid;
    }

    /* 账号与规则页：项目级下钻展开行 */
    .account-projects-row td {
      padding: 0;
      background: var(--surface-tint);
    }

    .account-projects-row .state-box {
      margin: 12px 14px;
      min-height: 48px;
      padding: 12px;
    }

    .account-projects-table {
      width: 100%;
    }

    .account-projects-table th,
    .account-projects-table td {
      padding: 9px 14px;
      font-size: 12px;
    }

    .account-projects-table th {
      background: transparent;
    }

    /* --- 运维手册（admin-guide） --- */
    #admin-guide {
      display: none;
      gap: 14px;
    }

    #admin-guide.active {
      display: grid;
    }

    .guide-intro .panel-body {
      display: grid;
      gap: 6px;
    }

    .guide-intro strong {
      color: var(--ink);
      font-size: 14px;
    }

    .guide-intro span {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }

    .guide-table td {
      vertical-align: top;
      line-height: 1.6;
    }

    .guide-table td b {
      color: var(--ink);
    }

    .guide-table td:nth-child(3) {
      white-space: normal;
      font-weight: 700;
    }

    .guide-ok {
      color: #07835a;
    }

    .guide-warn {
      color: #d16f00;
    }

    .guide-err {
      color: #dd3642;
    }

    .guide-prose {
      display: grid;
      gap: 10px;
      color: var(--ink-2);
      font-size: 13px;
      line-height: 1.7;
    }

    .guide-prose b {
      color: var(--ink);
    }

    .guide-prose ul {
      margin: 0;
      padding-left: 20px;
      display: grid;
      gap: 6px;
    }

    .guide-tip {
      border-left: 3px solid var(--line);
      padding-left: 12px;
      color: var(--muted);
    }

    .guide-decision {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 10px;
      margin-top: 2px;
    }

    .guide-decision-item {
      border: 1px solid var(--line-soft);
      border-radius: 10px;
      padding: 12px 14px;
      display: grid;
      gap: 4px;
    }

    .guide-decision-item b {
      font-size: 13px;
    }

    .guide-decision-item span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.6;
    }

    .guide-decision-item.guide-ok b {
      color: #07835a;
    }

    .guide-decision-item.guide-err b {
      color: #dd3642;
    }

    /* 本品家族自动折叠明细（P1）：入口链接现在挂在 .rule-editor-head 上，这里只留只读弹层，复用 snapshot-modal 骨架 */
    .own-family-modal {
      width: min(560px, calc(100vw - 32px));
      height: min(640px, calc(100vh - 32px));
      grid-template-rows: 52px minmax(0, 1fr);
    }

    .own-family-body {
      min-height: 0;
      min-width: 0;
      overflow-y: auto;
      padding: 18px 22px 24px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-content: start;
      gap: 14px;
    }

    .own-family-targets {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .own-family-targets:empty {
      display: none;
    }

    .own-family-targets-label {
      color: var(--muted);
      font-size: 12px;
    }

    .own-family-chip {
      border: 1px solid var(--line-soft);
      border-radius: 999px;
      background: var(--soft);
      padding: 3px 10px;
      font-size: 12px;
      font-weight: 800;
    }

    .own-family-list {
      min-width: 0;
      overflow-x: auto;
    }

    /* AI 网关健康哨兵（T1）：运维总览顶部横幅。
       只有异常/空闲才着色，healthy 收敛成一行无底色状态——不制造噪音，但保留「立即检测」入口。 */
    .gateway-banner {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      border: 1px solid var(--line-soft);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 14px 16px;
      margin-bottom: 16px;
    }

    .gateway-banner-main {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .gateway-banner-head {
      margin: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 8px;
    }

    .gateway-banner-head strong {
      font-size: 14px;
      font-weight: 900;
      color: var(--ink);
    }

    .gateway-banner-head span {
      color: var(--ink-2);
      font-size: 13px;
      font-weight: 700;
      line-height: 1.6;
    }

    .gateway-banner-evidence,
    .gateway-banner-advice {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.6;
    }

    .gateway-banner-error {
      display: block;
      max-width: 100%;
      overflow-x: auto;
      white-space: pre-wrap;
      word-break: break-all;
      font-family: var(--mono);
      font-size: 11px;
      line-height: 1.5;
      color: var(--ink-2);
      background: var(--surface-soft);
      border: 1px solid var(--line-soft);
      border-radius: var(--radius-sm);
      padding: 6px 8px;
    }

    .gateway-banner.level-down {
      border-color: var(--red);
      background: var(--red-2);
    }

    .gateway-banner.level-down .gateway-banner-head strong {
      color: #c02c39;
    }

    .gateway-banner.level-degraded {
      border-color: var(--orange);
      background: var(--orange-2);
    }

    .gateway-banner.level-degraded .gateway-banner-head strong {
      color: #b35c00;
    }

    .gateway-banner.level-idle {
      border-color: var(--line);
      background: var(--surface-soft);
    }

    /* 说明：曾有 .level-idle.is-stale 的橙色升级态（24 小时无成功即变橙），随 V2「没活干不是
       故障」的判定改造一起删除——空闲现在只有一种中性灰。 */

    .gateway-banner.level-healthy {
      border: 0;
      background: transparent;
      padding: 0 2px;
      margin-bottom: 12px;
    }

    .gateway-banner.level-healthy .gateway-banner-head strong,
    .gateway-banner.level-healthy .gateway-banner-head span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .gateway-banner.level-healthy .gateway-banner-head strong {
      font-weight: 850;
    }

    /* 网关故障进入「需要关注」清单时的强调（复用红色变量，不新造视觉语言）。 */
    .mini-item.attention-critical {
      border-color: var(--red);
      background: var(--red-2);
    }

    @media (max-width: 720px) {
      .gateway-banner {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    /* 快照深链失败提示条（AA1，2026-07-30）：复用 .round-status-notice 的既有视觉，
       只多一个右侧关闭按钮——提示不自动消失，客户点「知道了」才收起。 */
    .deep-link-notice span {
      flex: 1 1 auto;
      min-width: 0;
    }

    .deep-link-notice .mini-link {
      flex: 0 0 auto;
      color: #7c2d12;
    }

    /* 弹层引用列表补拉完整数据时的轻量占位（列表已有的预览条目仍然可见、可点）。 */
    .snapshot-links-loading {
      min-height: 40px;
      padding: 10px;
      font-size: 12px;
    }

    /* 官网链接追踪（SB2）——客户端页面。整页单列堆叠：区块之间是"读完上一块再看下一块"的
       阅读顺序（KPI → 趋势 → 词类对比 → 分平台 → 热门链接），不做左右分栏。 */
    .site-page {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 14px;
    }

    .site-content {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 14px;
    }

    /* 这一页只有 4 张 KPI 卡（全站默认是 5 列） */
    .site-kpis {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin-bottom: 0;
    }

    /* 这一页的 KPI 小字要写清分子分母（877 / 13,219 条引用），比其它页长得多，
       必须给右下角的圆形图标让出位置，否则文字会被图标压住。 */
    .site-kpis .kpi-note {
      padding-right: 54px;
      line-height: 1.5;
    }

    .site-chips {
      display: grid;
      gap: 8px;
    }

    .site-chip-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .site-chip-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .site-chip {
      max-width: 100%;
      border: 1px solid var(--line-soft);
      border-radius: 999px;
      background: var(--surface-soft);
      padding: 3px 10px;
      font-size: 12px;
      font-weight: 800;
      word-break: break-all;
    }

    .site-legend {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 14px;
      padding: 0 2px 6px;
    }

    .site-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--ink-2);
      font-size: 12px;
      font-weight: 800;
    }

    .site-legend-item i {
      width: 10px;
      height: 10px;
      border-radius: 999px;
    }

    /* 品牌词 / 行业词两块：竞品对比表有 7 列，塞不下 560px 就退回单列（1280 宽的笔记本正是这种情况），
       宽屏才并排——列被压到换行的表格比多滚一屏更难读。只有一块时自然占满整行。 */
    .site-class-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
      gap: 14px;
      align-items: start;
    }

    /* 表格列多，任何宽度下都允许区块内横向滚动，绝不让整页横向溢出 */
    #site-tracking .table-scroll {
      overflow-x: auto;
    }

    .site-class-grid.single {
      grid-template-columns: minmax(0, 1fr);
    }

    .site-metric-strip {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
      border: 1px solid var(--line-soft);
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 12px 14px;
    }

    .site-metric-strip > span {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .site-metric-strip small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }

    .site-metric-strip strong {
      color: var(--ink);
      font-size: 20px;
      font-weight: 800;
      line-height: 1.2;
    }

    .site-metric-strip em {
      color: var(--faint);
      font-size: 11px;
      font-style: normal;
      font-weight: 700;
    }

    .site-hot-links {
      display: grid;
      gap: 8px;
    }

    .site-hot-link {
      border: 1px solid var(--line-soft);
      border-radius: var(--radius);
      background: var(--surface-soft);
      overflow: hidden;
    }

    .site-hot-link > summary {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      cursor: pointer;
      list-style: none;
    }

    .site-hot-link > summary::-webkit-details-marker {
      display: none;
    }

    .site-hot-link-url {
      flex: 1 1 260px;
      min-width: 0;
      color: var(--ink);
      font-size: 12px;
      font-weight: 800;
      word-break: break-all;
    }

    .site-hot-link-stat {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .site-hot-link-stat strong {
      color: var(--ink);
      font-weight: 900;
    }

    .site-hot-link > summary > i {
      flex: 0 0 auto;
      color: var(--faint);
      transition: transform 140ms ease;
    }

    .site-hot-link[open] > summary > i {
      transform: rotate(180deg);
    }

    .site-hot-link-body {
      border-top: 1px solid var(--line-soft);
      background: var(--surface);
      padding: 10px 14px 12px;
    }

    .site-prompt-list {
      margin: 8px 0 0;
      padding-left: 18px;
      display: grid;
      gap: 5px;
      color: var(--ink-2);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.6;
    }

    /* 每条提示词 = 问题文本 + 若干平台徽章（SB3）。问题文本可能很长，徽章不能被挤没：
       文本 flex 收缩、徽章整组不收缩并允许换行，窄屏下自然掉到下一行，绝不横向溢出。 */
    .site-prompt-list li {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .site-prompt-text {
      flex: 1 1 200px;
      min-width: 0;
      word-break: break-word;
    }

    .site-snap-badges {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    /* 徽章直接复用 .pill.blue 的配色与形状，这里只补按钮态（去掉浏览器默认边框、给手型光标）。 */
    .site-snap-badge {
      border: 0;
      cursor: pointer;
      font-size: 11px;
      font-family: inherit;
    }

    .site-snap-badge:hover {
      filter: brightness(0.96);
    }

    .site-snap-more {
      color: var(--faint);
      font-size: 11px;
      font-weight: 700;
    }

    .site-empty-note {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    /* 提示词官网矩阵（SB6）：行数是「提示词 × 平台」，生产上 600+ 行（项目 18 是 634），
       整块直排会把页面拉到看不到底——所以给一个固定高度的滚动区 + 吸顶表头，
       让它像一张可翻的表而不是一条无尽的长廊。 */
    .site-matrix-scroll {
      max-height: 520px;
      overflow: auto;
    }

    /* 吸顶表头必须自带不透明底色（这里与 .data-table th 的 #fbfcfe 保持一致），
       否则滚动时下面的行会从字缝里透上来。 */
    .site-matrix-table thead th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #fbfcfe;
    }

    /* 「是」用品牌绿点出来，「否」走 .muted-text 退到背景里：整张表大多数格子是「否」，
       两者同权重会让人一眼找不到有效信息。 */
    .site-matrix-yes {
      color: var(--green);
      font-weight: 800;
    }

    /* 账号任务范围的项目下钻表本次多了「官网链接」一列（SB2），全宽度允许表格自己横向滚动。
       原先只有 ≤760px 才给 .table-scroll 加 overflow-x，中间宽度会把列压到换行。 */
    #admin-accounts .table-scroll {
      overflow-x: auto;
    }

    /* 官网链接追踪配置弹框（管理端）：复用 snapshot-modal 骨架，只补表单区。 */
    .site-rule-modal {
      width: min(680px, calc(100vw - 32px));
      height: min(680px, calc(100vh - 32px));
      grid-template-rows: 52px minmax(0, 1fr) auto;
    }

    .site-rule-body {
      min-height: 0;
      min-width: 0;
      overflow-y: auto;
      padding: 18px 22px 8px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-content: start;
      gap: 16px;
    }

    .site-rule-body[hidden] {
      display: none;
    }

    .site-rule-section h4 {
      margin: 0 0 8px;
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 8px;
      font-size: 13px;
      font-weight: 900;
    }

    .site-rule-section h4 small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .site-rule-rows {
      display: grid;
      gap: 8px;
      margin-bottom: 8px;
    }

    .site-rule-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
    }

    .site-rule-row-pair {
      grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
    }

    .site-rule-row input {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--surface);
      padding: 8px 10px;
      color: var(--ink);
      font-size: 12px;
      font-weight: 700;
    }

    .site-rule-row input:focus {
      outline: none;
      border-color: var(--blue);
    }

    .site-rule-foot {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      border-top: 1px solid var(--line-soft);
      padding: 12px 22px;
    }

    @media (max-width: 1100px) {
      .site-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .site-class-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .site-metric-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      /* 竞品对比表 / 分平台表列多，窄屏一律横向滚动，绝不让整页横向溢出 */
      #site-tracking .table-scroll {
        overflow-x: auto;
      }

      #site-tracking .data-table {
        min-width: 640px;
      }

      .site-rule-modal {
        width: min(680px, calc(100vw - 20px));
        height: min(680px, calc(100vh - 20px));
      }

      .site-rule-row-pair {
        grid-template-columns: minmax(0, 1fr) auto;
      }

      /* 窄屏成对输入拆成两行：品牌名独占一行，域名与删除按钮同一行 */
      .site-rule-row-pair > input:first-child {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 640px) {
      .site-kpis {
        grid-template-columns: minmax(0, 1fr);
      }

      .site-metric-strip {
        grid-template-columns: minmax(0, 1fr);
      }
    }

/* ==== 安卓 App 扫码下载（MB3）：入口刻意低调；≤1100px（手机/小平板）隐藏——用户已在手机上，扫码无意义 ==== */
.auth-app-link {
  margin: 18px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: #8b97a8;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.auth-app-link:hover {
  color: #16233b;
}

.app-download-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 30px 34px 24px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(22, 35, 59, 0.22);
}

.app-download-modal h3 {
  margin: 0 0 16px;
  font-size: 16px;
}

.app-download-qr {
  display: block;
  margin: 0 auto;
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
}

.app-download-hint {
  margin: 14px 0 6px;
  font-size: 13px;
  color: #16233b;
}

.app-download-url {
  margin: 0;
  font-size: 12px;
  color: #8b97a8;
  line-height: 1.6;
}

.app-download-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: none;
  color: #8b97a8;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.app-download-close:hover {
  color: #16233b;
}

@media (max-width: 1100px) {
  .auth-app-link,
  .app-download-entry {
    display: none;
  }
}
