:root {
      color-scheme: dark;
      --bg: #0f1114;
      --surface: #171a1f;
      --surface-2: #20242b;
      --surface-3: #242b33;
      --line: #333842;
      --line-strong: #4a5564;
      --text: #f4f7fb;
      --muted: #a5afbd;
      --soft: #d6dce6;
      --accent: #2fd184;
      --accent-soft: rgba(47, 209, 132, 0.14);
      --accent-2: #f3c45d;
      --info: #6aa7ff;
      --danger: #ff736f;
      --shadow: rgba(0, 0, 0, 0.28);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      overflow: hidden;
      background: var(--bg);
      color: var(--text);
      font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
      letter-spacing: 0;
    }
    button, input { font: inherit; }
    button {
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--surface-2);
      color: var(--text);
      cursor: pointer;
      transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
    }
    button:hover, button[aria-pressed="true"] { border-color: var(--accent); background: var(--surface-3); }
    button:active { transform: translateY(1px); }
    button:disabled { cursor: progress; opacity: 0.62; }
    button:focus-visible, input:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
    .screen {
      display: grid;
      grid-template-rows: auto auto 1fr auto;
      height: 100vh;
      gap: 12px;
      padding: 18px clamp(14px, 2.4vw, 30px);
    }
    .topbar, .toolbar, footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      min-width: 0;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .brand-mark {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border: 1px solid rgba(47, 209, 132, 0.38);
      border-radius: 8px;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 24px;
      font-weight: 900;
      line-height: 1;
    }
    h1 { margin: 0; font-size: 32px; line-height: 1.1; }
    .subtitle { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
    .stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(110px, 1fr));
      gap: 10px;
      min-width: min(680px, 100%);
    }
    .stat {
      min-height: 64px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      box-shadow: 0 8px 24px var(--shadow);
    }
    .stat-label { color: var(--muted); font-size: 12px; }
    .stat-value {
      margin-top: 7px;
      font-size: 20px;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .toolbar {
      align-items: stretch;
      flex-wrap: wrap;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
    }
    .filters, .actions, .category-tabs, .source-tabs {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      min-width: 0;
    }
    .filters { flex: 1 1 620px; }
    .actions { justify-content: flex-end; }
    .source-tabs { width: 100%; padding-bottom: 2px; }
    .filter-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      width: 100%;
    }
    .search {
      width: min(340px, 100%);
      min-height: 36px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #111419;
      color: var(--text);
    }
    .tab {
      min-height: 34px;
      padding: 0 11px;
      white-space: nowrap;
      color: var(--soft);
    }
    .tab[aria-pressed="true"] { color: var(--accent); }
    .tab-count { color: var(--muted); margin-left: 4px; }
    .icon-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 0 11px;
      white-space: nowrap;
    }
    .icon {
      display: inline-grid;
      place-items: center;
      width: 16px;
      color: var(--accent);
      font-size: 15px;
      line-height: 1;
    }
    .speed {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 34px;
      padding: 0 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--surface);
      color: var(--muted);
      white-space: nowrap;
    }
    input[type="range"] { width: 110px; accent-color: var(--accent); }
    .workspace {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
      gap: 16px;
      min-height: 0;
    }
    .ticker {
      position: relative;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      scrollbar-gutter: stable;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
    }
    .ticker::-webkit-scrollbar { width: 10px; }
    .ticker::-webkit-scrollbar-track { background: #111419; }
    .ticker::-webkit-scrollbar-thumb {
      border: 2px solid #111419;
      border-radius: 999px;
      background: var(--line-strong);
    }
    .ticker::-webkit-scrollbar-thumb:hover { background: var(--accent); }
    .track { display: grid; gap: 10px; padding: 16px 0; }
    .item {
      display: grid;
      grid-template-columns: 84px 1fr;
      gap: 14px;
      align-items: start;
      width: 100%;
      min-height: 92px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      text-align: left;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    }
    .item:hover, .item.active { border-color: var(--accent); background: #1c2228; }
    .item.newest { box-shadow: inset 4px 0 0 var(--accent); }
    .item.recent .time::after {
      content: "新";
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      min-height: 18px;
      margin-left: 7px;
      border: 1px solid rgba(47, 209, 132, 0.34);
      border-radius: 5px;
      color: var(--accent);
      font-size: 12px;
      font-weight: 800;
      vertical-align: middle;
    }
    .time { color: var(--accent); font-size: 22px; font-weight: 800; line-height: 1; }
    .date { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
    .content { min-width: 0; }
    .title-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 8px; }
    .category {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 2px 8px;
      border: 1px solid rgba(59, 212, 155, 0.34);
      border-radius: 6px;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 13px;
      font-weight: 800;
      white-space: nowrap;
    }
    .source-badge {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 2px 8px;
      border: 1px solid rgba(231, 183, 95, 0.36);
      border-radius: 6px;
      color: var(--accent-2);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .title { flex: 1 1 260px; margin: 0; font-size: 19px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
    .body {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin: 0;
      color: var(--soft);
      font-size: 15px;
      line-height: 1.58;
      overflow-wrap: anywhere;
    }
    .detail {
      min-height: 0;
      display: grid;
      grid-template-rows: auto 1fr auto;
      border-left: 1px solid var(--line);
      padding-left: 16px;
    }
    .detail-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }
    .detail-title { margin: 0; font-size: 16px; }
    .detail-body { min-height: 0; overflow: auto; padding: 14px 0; }
    .detail-time { color: var(--accent-2); font-size: 13px; }
    .detail-meta {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }
    .detail h2 { margin: 12px 0; font-size: 24px; line-height: 1.32; overflow-wrap: anywhere; }
    .detail p { color: var(--soft); font-size: 15px; line-height: 1.75; margin: 0; overflow-wrap: anywhere; }
    .detail-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
    .detail-actions button, .actions button { padding: 0 12px; }
    .empty { height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; line-height: 1.7; padding: 32px; }
    .skeleton {
      min-height: 92px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background:
        linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent),
        var(--surface);
      background-size: 220px 100%, 100% 100%;
      animation: shimmer 1.3s linear infinite;
    }
    @keyframes shimmer {
      from { background-position: -220px 0, 0 0; }
      to { background-position: calc(100% + 220px) 0, 0 0; }
    }
    .error { color: var(--danger); }
    .ok { color: var(--accent); }
    footer { color: var(--muted); font-size: 13px; min-height: 28px; }
    .source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .toast {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 20;
      max-width: min(440px, calc(100vw - 32px));
      padding: 11px 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #171a1f;
      color: var(--text);
      box-shadow: 0 16px 42px var(--shadow);
      opacity: 0;
      pointer-events: none;
      transform: translateY(12px);
      transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .toast.show { opacity: 1; transform: translateY(0); }
    body.compact .track { gap: 7px; padding: 10px 0; }
    body.compact .item { min-height: 74px; padding: 12px; }
    body.compact .body { -webkit-line-clamp: 1; font-size: 14px; }
    body.compact .title { font-size: 17px; }
    body.compact .time { font-size: 19px; }
    @media (max-width: 1100px) {
      body { overflow: auto; }
      .screen { height: auto; min-height: 100vh; }
      .topbar { align-items: flex-start; flex-direction: column; }
      .stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .workspace { grid-template-columns: 1fr; }
      .ticker { height: 68vh; min-height: 420px; }
      .detail { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 14px; }
      h1 { font-size: 28px; }
    }
    @media (max-width: 680px) {
      .screen { padding: 14px; }
      .topbar, .toolbar, footer { align-items: flex-start; flex-direction: column; }
      .stats { grid-template-columns: 1fr 1fr; }
      .stat-value { font-size: 17px; }
      .brand-mark { width: 36px; height: 36px; font-size: 21px; }
      h1 { font-size: 24px; }
      .search { width: 100%; }
      .actions, .filter-row { width: 100%; }
      .actions button, .speed { flex: 1 1 auto; }
      .item { grid-template-columns: 1fr; min-height: 0; }
      .title { font-size: 17px; }
      .ticker { height: 70vh; min-height: 360px; }
      .source { white-space: normal; }
      .toast { right: 14px; bottom: 14px; }
    }
