* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --page-bg: #0c0c0e;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page-bg: #eef1f5;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page-bg, #0c0c0e);
  color: #f0f0f4;
  font-family: "Microsoft YaHei UI", "Segoe UI", -apple-system, system-ui, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  --page-bg: #0c0c0e;
  --fg: #f0f0f4;
  --fg-muted: #b3b3bd;
  --fg-dim: #8a8a92;
  --card-bg: #121214;
  --card-border: #2a2a30;
  --embed-bg: #1a1a1e;
  --embed-border: #2e2e34;
  --bar-bg: #0a0a0c;
  --bar-border: #1f1f24;
  --link: #8fb8ff;
  --mention: #9fd2ff;
  --soft-shadow: none;
  --accent: #daa528;
  display: flex;
  flex-direction: column;
}
body.theme-light {
  --page-bg: #eef1f5;
  --fg: #182033;
  --fg-muted: #475467;
  --fg-dim: #667085;
  --card-bg: #f8fafc;
  --card-border: #d5dde8;
  --embed-bg: #eef3f8;
  --embed-border: #d4deea;
  --bar-bg: rgba(246, 248, 251, 0.96);
  --bar-border: #d8e1ec;
  --link: #2563eb;
  --mention: #0f63c7;
  --soft-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  --accent: #b7791f;
  color: var(--fg);
}
#version-update-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 14px;
  background: linear-gradient(90deg, #7c2d12, #9a3412);
  color: #fff7ed;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  font-size: 14px;
  font-weight: 800;
  -webkit-app-region: no-drag;
  app-region: no-drag;
  z-index: 20000;
}
#version-update-banner.show { display: flex; }
#version-update-banner button {
  border: 1px solid rgba(255,255,255,0.35);
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-weight: 900;
}
#version-update-banner button:hover { filter: brightness(0.95); }
main#feed { flex: 1; min-height: 0; }

#top-actions-bar,
#health-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: var(--bar-bg);
  font-size: 13px;
  -webkit-app-region: drag;
  app-region: drag;
  z-index: 100;
}
#top-actions-bar {
  border-bottom: 1px solid var(--bar-border);
  min-height: 64px;
  justify-content: flex-end;
  padding-top: 5px;
  padding-bottom: 5px;
}
#top-actions-bar .site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  order: 0;
  height: 56px;
  width: 334px;
  margin-right: 14px;
  border-radius: 10px;
  text-decoration: none;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
#top-actions-bar .site-logo {
  display: block;
  width: 326px;
  height: auto;
  max-height: 55px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(184, 255, 0, 0.32));
}
#top-actions-bar .site-logo-link:hover .site-logo {
  filter: drop-shadow(0 0 10px rgba(184, 255, 0, 0.5));
}
#health-bar {
  border-top: 1px solid var(--bar-border);
  padding: 6px 18px;
  min-height: 32px;
  z-index: 90;
}
#top-actions-bar .item,
#health-bar .item { display: flex; align-items: center; gap: 6px; }
#top-actions-bar .spacer,
#health-bar .spacer { flex: 1; }
#top-actions-bar .spacer { order: 10; min-width: 16px; }
#top-actions-bar .push-channels { order: 20; }
#top-actions-bar .user-actions { order: 30; }
#top-actions-bar .admin-actions { order: 40; }
#top-actions-bar .theme-actions { order: 90; margin-left: 4px; }
#top-actions-bar .wallet-actions { order: 100; }
#health-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #484850;
}
#health-bar .dot.green { background: #3ca073; }
#health-bar .dot.yellow { background: #daa528; }
#health-bar .dot.red { background: #c44040; }
#health-bar .label {
  color: #e8e8ee; font-weight: 700;
  -webkit-app-region: no-drag; app-region: no-drag;
  user-select: text;
}
#health-bar .time {
  color: #8a8a92;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
#health-bar .item[data-key="sse"] .time {
  color: #a8b3c7;
  font-weight: 650;
}

main#feed {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 40px;
  -webkit-app-region: drag;
  app-region: drag;
}

main#feed .card,
main#feed .card * {
  -webkit-app-region: no-drag;
  app-region: no-drag;
  cursor: auto;
}
main#feed .card a,
main#feed .card button,
main#feed .card .footer a {
  cursor: pointer;
}
main#feed .card .body,
main#feed .card .translation,
main#feed .card .em-body,
main#feed .card .em-header,
main#feed .card .em-handle,
main#feed .card .handle,
main#feed .card .header .name,
main#feed .card .header .time,
main#feed .card .target-name,
main#feed .card .target-handle,
main#feed .card .verb {
  cursor: text;
}
main#feed .card a.profile-link,
main#feed .card a.text-link,
main#feed .card a.mention-link,
main#feed .card .body a,
main#feed .card .translation a,
main#feed .card .em-body a,
main#feed .card .target-name.profile-link,
main#feed .card .target-handle.profile-link {
  cursor: pointer;
}

.card a.text-link,
.card a.mention-link {
  color: #8fb8ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 184, 255, 0.42);
  overflow-wrap: anywhere;
}
.card a.mention-link {
  color: #9fd2ff;
  font-weight: 750;
}
.card a.text-link:hover,
.card a.mention-link:hover {
  color: #cfe2ff;
  border-bottom-color: #cfe2ff;
}
.card a.profile-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.card a.profile-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.45);
}
.card .handle a.profile-link,
.card .embed .em-handle a.profile-link,
.follow-row a.target-handle.profile-link {
  color: #9a9aa3;
}
.follow-row a.target-name.profile-link:hover,
.follow-row a.target-handle.profile-link:hover {
  color: #cfe2ff;
}

main#feed::-webkit-scrollbar {
  width: 10px;
}
main#feed::-webkit-scrollbar-thumb {
  background: #3a3a42;
  border-radius: 10px;
}
main#feed::-webkit-scrollbar-thumb:hover {
  background: #50505a;
}
main#feed::-webkit-scrollbar-track {
  background: transparent;
}

.empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 16px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 20px 18px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar header chip"
    "avatar handle chip"
    "body   body   body"
    "narrative narrative narrative"
    "media  media  media"
    "embed  embed  embed"
    "imagectx imagectx imagectx"
    "footer footer footer";
  gap: 6px 14px;
  align-items: start;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(218, 165, 40, 0.25);
}

/* ===== 置顶 3 分钟（特别关注/Alpha 消息）===== */
.card.pinned {
  border-color: #e58036;
  box-shadow: 0 0 0 1px rgba(229, 128, 54, 0.4), 0 0 18px rgba(229, 128, 54, 0.25);
  position: relative;
}
.card .pin-badge {
  position: absolute;
  top: 8px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e58036;
  color: #1e1d20;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .pin-badge .pin-text {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.card .pin-badge .pin-unpin {
  background: rgba(0,0,0,0.28);
  color: #1e1d20;
  border: 0;
  padding: 1px 7px;
  margin-left: 2px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .pin-badge .pin-unpin:hover { background: rgba(0,0,0,0.5); }

/* ===== Alpha 首发卡片 ===== */
.card.alpha-signal {
  display: block;
  padding: 14px 18px 16px;
  background: #0d1412;
  border: 1px solid #2a4038;
}
.card.alpha-signal.tier-s {
  background: linear-gradient(180deg, #0e2418 0%, #0d1412 50%);
  border: 2px solid #3ca073;
  box-shadow: 0 0 0 1px rgba(60, 160, 115, 0.3), 0 0 20px rgba(60, 160, 115, 0.3);
}
.card.alpha-signal.tier-a {
  border-color: #daa528;
  box-shadow: 0 0 0 1px rgba(218, 165, 40, 0.3);
}
.card.alpha-signal.tier-b { border-color: #e58036; }
.card.alpha-signal.tier-c { border-color: #5a6a80; }
.card.alpha-signal.highlight {
  box-shadow: 0 0 0 2px #3ca073, 0 0 28px rgba(60, 160, 115, 0.55);
}
.card.alpha-signal .alpha-header {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.card.alpha-signal .alpha-title {
  font-size: 15px; font-weight: 800; color: #a0f0c0;
  letter-spacing: 0.3px;
}
.card.alpha-signal.tier-a .alpha-title { color: #f0d080; }
.card.alpha-signal.tier-b .alpha-title { color: #ffb088; }
.card.alpha-signal.tier-c .alpha-title { color: #c0c8d0; }
.card.alpha-signal .alpha-symbol {
  font-size: 22px; font-weight: 900; color: var(--fg);
  letter-spacing: 0.5px;
}
.card.alpha-signal .alpha-kind {
  font-size: 11px; color: var(--fg-dim);
  padding: 1px 8px; background: #1a2028; border-radius: 999px;
  font-weight: 700;
}
.card.alpha-signal .alpha-time {
  font-size: 12px; color: var(--fg-dim); margin-left: auto;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.card.alpha-signal .alpha-body {
  font-family: "Microsoft YaHei UI", "Segoe UI", -apple-system, system-ui, sans-serif;
  font-size: 14px; color: var(--fg); line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  margin: 0;
  user-select: text;
}

/* 特别关注 —— 永久金色边框 + 内发光 */
.card.favorite {
  border: 2px solid #daa528;
  box-shadow: 0 0 0 1px rgba(218, 165, 40, 0.22), 0 0 16px rgba(218, 165, 40, 0.32);
  background:
    linear-gradient(180deg, #241a0c 0%, var(--card-bg) 35%);
}
.card.favorite.highlight {
  box-shadow: 0 0 0 2px #daa528, 0 0 28px rgba(218, 165, 40, 0.55);
}
.card.favorite .header .name {
  color: #f0d080;
}
.card.favorite::before {
  content: "★";
  position: absolute;
  top: 10px;
  right: -4px;
  background: #daa528;
  color: #1e1d20;
  font-size: 14px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  z-index: 2;
}
.card.favorite { position: relative; }

.card.historical-ref {
  position: relative;
  border: 2px solid #f59e0b;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.20), transparent 38%),
    linear-gradient(180deg, rgba(69, 45, 8, 0.36) 0%, var(--card-bg) 48%);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.24), 0 0 22px rgba(245, 158, 11, 0.22);
}
.card.historical-ref::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 34px rgba(245, 158, 11, 0.08);
}

.card.historical-ref .historical-ref-emoji {
  position: absolute;
  top: 8px;
  right: 34px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(245, 158, 11, 0.82);
  border-radius: 999px;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #271900;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.38), 0 0 18px rgba(245,158,11,.46);
}
.card.historical-ref.favorite .historical-ref-emoji {
  right: 48px;
}
.card .historical-ref-banner {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(245, 158, 11, 0.46);
  border-radius: 999px;
  background: rgba(69, 45, 8, 0.78);
  color: #fde68a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.card.historical-ref .embed {
  border-color: rgba(245, 158, 11, 0.46);
  background: rgba(35, 27, 14, 0.78);
}

.card .avatar {
  grid-area: avatar;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1e;
  border: 1px solid #3a3a42;
}

.card .header {
  grid-area: header;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}
.card .header .name {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.card .header .time {
  font-size: 14px;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card .handle {
  grid-area: handle;
  font-size: 15px;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}
.card .account-remark {
  display: inline-flex;
  align-items: center;
  max-width: min(520px, 100%);
  padding: 2px 8px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .profile-summary {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(620px, 100%);
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .profile-summary::before {
  content: "·";
  margin-right: 6px;
  color: #4b5563;
  font-weight: 900;
}
.card .embed .embed-profile-summary {
  max-width: min(520px, 100%);
  font-size: 11px;
}
.follow-row .target-profile-summary {
  max-width: min(520px, 100%);
  font-size: 12px;
}

.card .chip {
  grid-area: chip;
  align-self: start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.chip.reply   { background: #e58036; }
.chip.retweet { background: #daa528; }
.chip.quote   { background: #9370db; }
.chip.tweet   { background: #3ca073; }
.chip.pin     { background: #62a37a; }
.chip.unpin   { background: #6f7382; }
.chip.delete  { background: #9b3d3d; }
.chip.follow  { background: #4f95d8; }
.chip.unfollow{ background: #787880; }
.chip.square  { background: #f0b90b; color: #1e1d20; }
.chip.truth   { background: #c4302b; }
.chip.news    { background: #ff6c4a; }
.chip.okx-boost { background: #111827; color: #f0b90b; border: 1px solid #f0b90b; }
.chip.profile-bio    { background: #4a82d4; }
.chip.profile-avatar { background: #9c5ec8; }
.chip.profile-banner { background: #7060d8; }
.chip.profile-name   { background: #d87a4a; }
.chip.profile-meta   { background: #5a6a80; }
.chip.ca             { background: #2f8f83; }
.chip.news.signal-bullish { background: #3ca073; }
.chip.news.signal-bearish { background: #c4302b; }
.chip.news.signal-neutral { background: #ff6c4a; }

.card .body {
  grid-area: body;
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}

.card .body .translation {
  margin-top: 6px;
  font-size: 15px;
  color: var(--fg-muted);
}

.card .media {
  grid-area: media;
  margin-top: 10px;
  position: relative;
}
.card .media img, .card .media video {
  max-width: 100%;
  max-height: 420px;
  border-radius: 12px;
  border: 1px solid var(--embed-border);
  display: block;
}
.card .media.has-video-badge::before,
.card .em-media.has-video-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(0,0,0,0.10);
  pointer-events: none;
}
.video-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  pointer-events: none;
  -webkit-app-region: no-drag;
  app-region: no-drag;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}

.card .embed {
  grid-area: embed;
  margin-top: 12px;
  background: var(--embed-bg);
  border: 1px solid var(--embed-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 6px 10px;
  grid-template-areas:
    "em-avatar em-header"
    "em-avatar em-handle"
    "em-body   em-body"
    "em-media  em-media";
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.card .embed .em-avatar { grid-area: em-avatar; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #1a1a1e; border: 1px solid #3a3a42; }
.card .embed .em-header { grid-area: em-header; font-size: 15px; font-weight: 700; color: var(--fg); min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.card .embed .em-handle { grid-area: em-handle; font-size: 13px; color: var(--fg-dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; overflow: hidden; }
.card .embed .em-handle .account-remark { font-size: 11px; padding: 1px 7px; max-width: min(420px, 100%); }
.card .embed .em-handle .embed-profile-summary { flex: 1 1 160px; max-width: 100%; }
.card .embed .em-time {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .embed .em-header a,
.card .embed .em-handle a { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .embed .em-body   { grid-area: em-body; font-size: 15px; color: var(--fg); white-space: pre-wrap; word-break: normal; overflow-wrap: break-word; min-width: 0; max-width: 100%; }
.card .embed .em-body .translation { margin-top: 4px; font-size: 14px; color: var(--fg-muted); overflow-wrap: break-word; word-break: normal; }
.card .embed .em-media  { grid-area: em-media; min-width: 0; max-width: 100%; overflow: hidden; }
.card .embed .em-media img { max-width: 100%; height: auto; max-height: 280px; border-radius: 8px; border: 1px solid var(--embed-border); display: block; }
.card.retweet-only {
  grid-template-areas:
    "avatar header chip"
    "avatar handle chip"
    "embed embed embed"
    "narrative narrative narrative"
    "imagectx imagectx imagectx"
    "footer footer footer";
}
.card.retweet-only .embed { margin-top: 10px; }

/* ===== DEX Signals 专用紧凑卡片 ===== */
.card.dex-signal {
  display: flex;
  gap: 12px;
  padding: 12px 16px 14px;
  background: #101418;
  border-color: #1e3240;
  align-items: flex-start;
}
.card.dex-signal.highlight {
  border-color: #4ecdc4;
  box-shadow: 0 0 0 1px rgba(78, 205, 196, 0.3);
}
.card.dex-signal .dex-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3240, #2a4a5a);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 48px;
  overflow: hidden;
  border: 1px solid #2a4048;
  position: relative;
}
.card.dex-signal .dex-icon img { width: 100%; height: 100%; object-fit: cover; }
.card.dex-signal .dex-icon-letter {
  font-size: 20px; font-weight: 800; color: #4ecdc4;
  font-family: system-ui, sans-serif;
}
.card.dex-signal .dex-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.card.dex-signal .dex-header {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.card.dex-signal .dex-title {
  font-size: 14px; font-weight: 700; color: #4ecdc4;
  letter-spacing: 0.3px;
}
.card.dex-signal .dex-meta {
  font-size: 12px; color: #8a9aa8; font-weight: 600;
  padding: 1px 8px; background: #1a2830; border-radius: 999px;
}
.card.dex-signal .dex-time {
  font-size: 12px; color: #5a6a78; margin-left: auto;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.card.dex-signal .dex-main {
  display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px;
  flex-wrap: wrap;
}
.card.dex-signal .dex-symbol {
  font-size: 22px; font-weight: 800; color: #f0d080;
  letter-spacing: 0.5px;
}
.card.dex-signal .dex-name {
  font-size: 14px; color: #a0b0bc;
  font-weight: 500;
}
.card.dex-signal .dex-name:empty { display: none; }
.card.dex-signal .dex-mc {
  font-size: 18px; font-weight: 700; color: #a0f0c0;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.card.dex-signal .dex-mc:empty { display: none; }
.card.dex-signal .dex-raw {
  font-size: 14px; color: #ff9a9a;
}
.card.dex-signal .dex-stats {
  display: flex; gap: 6px; margin-bottom: 8px;
  flex-wrap: wrap;
}
.card.dex-signal .dex-stat {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 3px 10px;
  background: #0a1418;
  border: 1px solid #1a2830;
  border-radius: 6px;
  font-size: 12px;
}
.card.dex-signal .dex-stat-label {
  color: #6a7a88; font-weight: 600;
}
.card.dex-signal .dex-stat-val {
  color: #d0e0ec; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card.dex-signal .dex-ca-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #0a0d10; padding: 8px 10px; border-radius: 8px;
  border: 1px solid #1a2028;
}
.card.dex-signal .dex-ca {
  flex: 1; min-width: 200px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px; color: #b0c0d0;
  word-break: break-all;
  user-select: text; cursor: text;
}
.card.dex-signal .dex-copy {
  padding: 4px 10px; background: #1a2830; color: #c0d8e0;
  border: 1px solid #2a4048; border-radius: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.card.dex-signal .dex-copy:hover { background: #234050; }
.card.dex-signal .dex-link {
  padding: 4px 10px; background: #1a2830; color: #a0e8d0;
  border: 1px solid #2a4048; border-radius: 6px;
  font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.card.dex-signal .dex-link:hover { background: #234050; }
.card.dex-signal .footer {
  margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap;
}

/* 链接 pills */
.card.dex-signal .dex-links {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
}
.card.dex-signal .dex-link-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: #0e1820; color: #a0c8e0;
  border: 1px solid #1e3240;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.card.dex-signal .dex-link-pill:hover { background: #1a2a36; border-color: #2a4a60; }
.card.dex-signal .dex-link-pill .pill-icon {
  font-weight: 800; font-size: 13px;
}
.card.dex-signal .dex-link-pill.website { color: #9adcff; }
.card.dex-signal .dex-link-pill.social-twitter,
.card.dex-signal .dex-link-pill.social-x { color: #e8e8ee; border-color: #3a3a42; }
.card.dex-signal .dex-link-pill.social-telegram,
.card.dex-signal .dex-link-pill.social-tg { color: #88c8f0; }
.card.dex-signal .dex-link-pill.social-discord { color: #c0a8ff; }
.card.dex-signal .dex-link-pill.social-github { color: #c8c8d0; }

.card.dex-signal .dex-tweets-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: #1a2830; color: #a0e8d0;
  border: 1px solid #2a4a4a;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.card.dex-signal .dex-tweets-btn:hover:not(:disabled) { background: #234040; }
.card.dex-signal .dex-tweets-btn:disabled { opacity: 0.5; cursor: default; }

.card.dex-signal .dex-tweets {
  margin-top: 8px;
}
.card.dex-signal .dex-tweets:empty { display: none; }
.card.dex-signal .dex-tweets iframe,
.card.dex-signal .dex-tweets .twitter-tweet,
.card.dex-signal .dex-tweets .twitter-timeline {
  max-width: 100% !important;
}

/* 自抓推文（用引用推文风格）*/
.card.dex-signal .dex-tweets-loading {
  color: var(--fg-dim); font-size: 12px;
  padding: 8px 12px; margin-top: 8px;
  background: var(--embed-bg);
  border: 1px dashed var(--embed-border);
  border-radius: 10px;
}
.card.dex-signal .dex-tweets-err {
  color: #ff9a9a; font-size: 12px;
  padding: 6px 10px;
}

/* Twitter Profile 卡 */
.card.dex-signal .tw-profile-card {
  display: flex; gap: 12px;
  margin-top: 10px;
  background: var(--embed-bg);
  border: 1px solid var(--embed-border);
  border-radius: 12px;
  padding: 12px 14px;
  align-items: flex-start;
}
.card.dex-signal .tw-profile-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex: 0 0 44px;
  border: 1px solid #3a3a42;
  background: #0c0c0e;
}
.card.dex-signal .tw-profile-right { flex: 1; min-width: 0; }
.card.dex-signal .tw-profile-name-row {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.card.dex-signal .tw-profile-name {
  font-size: 15px; font-weight: 700; color: var(--fg);
  line-height: 1.2;
}
.card.dex-signal .tw-verified {
  color: #1da1f2; font-weight: 900; font-size: 12px;
}
.card.dex-signal .tw-profile-handle {
  font-size: 13px; color: var(--fg-dim);
  text-decoration: none;
}
.card.dex-signal .tw-profile-handle:hover { color: var(--fg-muted); }
.card.dex-signal .tw-profile-stats {
  display: flex; gap: 14px; margin-bottom: 6px;
  font-size: 12px;
}
.card.dex-signal .tw-profile-stat { color: var(--fg-dim); display: inline-flex; gap: 3px; align-items: baseline; }
.card.dex-signal .tw-profile-stat .v {
  color: var(--fg); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card.dex-signal .tw-profile-stat .l { color: var(--fg-dim); }
.card.dex-signal .tw-profile-desc {
  font-size: 13px; color: var(--fg); line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
  user-select: text;
}
.card.dex-signal .tw-profile-desc-zh {
  margin-top: 4px;
  font-size: 12px; color: var(--fg-muted); line-height: 1.5;
  padding-top: 4px;
  border-top: 1px dashed #2a2a30;
  white-space: pre-wrap; word-break: break-word;
  user-select: text;
}

/* 推文 —— 引用推文嵌套风格 */
.card.dex-signal .dex-tweets-head {
  font-size: 11px; color: var(--fg-dim); font-weight: 600;
  margin: 10px 0 4px 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.card.dex-signal .dex-tweet-item {
  background: var(--embed-bg);
  border: 1px solid var(--embed-border);
  border-radius: 12px;
  padding: 10px 14px 12px;
  margin-bottom: 8px;
}
.card.dex-signal .dex-tweet-item:last-child { margin-bottom: 0; }
.card.dex-signal .dex-tweet-meta {
  display: flex; justify-content: flex-end; margin-bottom: 4px;
}
.card.dex-signal .dex-tweet-link {
  font-size: 11px; color: var(--fg-dim); text-decoration: none;
}
.card.dex-signal .dex-tweet-link:hover { color: var(--fg-muted); }
.card.dex-signal .dex-tweet-text {
  font-size: 14px; color: var(--fg); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  user-select: text;
}
.card.dex-signal .dex-tweet-zh {
  margin-top: 5px;
  font-size: 13px; color: var(--fg-muted); line-height: 1.5;
  padding-top: 5px;
  border-top: 1px dashed #2a2a30;
  white-space: pre-wrap; word-break: break-word;
  user-select: text;
}
.card.dex-signal .dex-tweet-media {
  margin-top: 8px;
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.card.dex-signal .dex-tweet-media.has-video::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
.card.dex-signal .dex-tweet-img {
  max-width: 100%; max-height: 260px;
  border-radius: 8px;
  border: 1px solid var(--embed-border);
  display: block;
}

/* Follow event row */
.follow-row {
  grid-area: body;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.follow-row .verb {
  font-size: 19px;
  font-weight: 700;
  color: #d8d8e0;
}
.follow-row .target-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #3a3a42;
  background: #1a1a1e;
}
.follow-row .target-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--fg);
}
.follow-row .target-handle {
  font-size: 16px;
  color: var(--fg-dim);
}
.follow-row .target-remark {
  font-size: 12px;
  max-width: min(480px, 100%);
}
.card.follow .body {
  grid-area: media;
  margin-top: 10px;
}

.card .footer {
  grid-area: footer;
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.card .footer a {
  display: inline-block;
  padding: 6px 14px;
  background: #26262c;
  color: #d8d8e0;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #3a3a42;
}
.card .footer a:hover {
  background: #32323a;
}
.card .footer .unfollow-btn {
  padding: 6px 14px;
  background: #3a1e20;
  color: #ff9a9a;
  border: 1px solid #6a3030;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .footer .unfollow-btn:hover:not(:disabled) { background: #5a2828; }
.card .footer .unfollow-btn:disabled { opacity: 0.6; cursor: default; }

.card .footer .admin-remove-default-btn {
  padding: 6px 14px;
  background: #3a2615;
  color: #ffc182;
  border: 1px solid #7a4a1f;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .footer .admin-remove-default-btn:hover:not(:disabled) {
  background: #53341b;
  border-color: #9a6028;
}
.card .footer .admin-remove-default-btn:disabled { opacity: 0.66; cursor: default; }
.card.admin-removed-default { opacity: 0.42; }

.card .footer .fav-btn {
  padding: 6px 14px;
  background: #26262c;
  color: #c8c8d0;
  border: 1px solid #3a3a42;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .footer .fav-btn:hover:not(:disabled) { background: #32323a; border-color: #4a4a52; }
.card .footer .fav-btn.is-fav {
  background: #3a2d10;
  color: #f0c050;
  border-color: #6a4e20;
}
.card .footer .fav-btn.is-fav:hover:not(:disabled) { background: #4e3c18; border-color: #806020; }
.card .footer .fav-btn:disabled { opacity: 0.6; cursor: default; }

/* 分析叙事按钮 */
.card .footer .narrative-btn {
  padding: 6px 14px;
  background: #2a1e3a;
  color: #d0b0f0;
  border: 1px solid #4a3060;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .footer .narrative-btn:hover:not(:disabled) { background: #3a2850; }
.card .footer .narrative-btn:disabled { opacity: 0.7; cursor: default; }

/* meme 词高亮（原文 + 翻译里都会出现）*/
.card mark.meme-highlight {
  background: linear-gradient(180deg, transparent 48%, rgba(218, 165, 40, 0.55) 48%);
  color: #f0d080;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
  cursor: help;
}
.card mark.smart-highlight {
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 800;
  color: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.card mark.token-ca-highlight {
  background: rgba(45, 212, 191, 0.18);
  color: #99f6e4;
  border: 1px solid rgba(45, 212, 191, 0.32);
}
.card mark.token-symbol-highlight {
  background: rgba(96, 165, 250, 0.18);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.30);
}
.card mark.quote-content-highlight {
  background: linear-gradient(180deg, transparent 45%, rgba(168, 85, 247, 0.40) 45%);
  color: #e9d5ff;
}

/* 典故/出处框 */
.card .narrative-allusions {
  grid-area: narrative;
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #1e1810 0%, #14100a 100%);
  border: 1px solid #3a3020;
  border-radius: 10px;
}

.card .narrative-allusions {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
}
.card .embed > .narrative-allusions {
  grid-area: auto;
  grid-column: 1 / -1;
  width: 100%;
}
.card .narrative-line,
.card .narrative-exp {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.card .narrative-title {
  font-size: 12px; color: #daa528; font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.card .narrative-item {
  font-size: 13px; line-height: 1.55;
  padding: 3px 0;
  color: var(--fg-muted);
}
.card .narrative-phrase {
  color: #f0d080; font-weight: 700;
}
.card .narrative-exp {
  color: var(--fg);
}

.card .narrative-brief {
  background: linear-gradient(180deg, rgba(30, 40, 70, 0.92) 0%, rgba(18, 24, 42, 0.96) 100%);
  border-color: rgba(105, 155, 255, 0.28);
}
.card .narrative-brief .narrative-title { color: #9fc0ff; }
.card .narrative-line { padding: 2px 0; }
.card .narrative-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 4px;
}
.card .narrative-tag {
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 7px;
  border-radius: 999px;
  color: #cfe0ff;
  background: rgba(80, 130, 230, 0.16);
  border: 1px solid rgba(120, 170, 255, 0.28);
}

/* 图片出处标注 */
.card .narrative-image-context {
  grid-area: imagectx;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(218, 165, 40, 0.08);
  border-left: 3px solid #daa528;
  border-radius: 6px;
  font-size: 13px; color: var(--fg);
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
  user-select: text;
}

/* ===== User config modal ===== */
#top-actions-bar .user-actions { gap: 8px; -webkit-app-region: no-drag; app-region: no-drag; }
#top-actions-bar .wallet-actions { gap: 8px; -webkit-app-region: no-drag; app-region: no-drag; }
#top-actions-bar .theme-actions { gap: 8px; -webkit-app-region: no-drag; app-region: no-drag; }
.wallet-login-btn.wallet-connected { border-color: #2f7b5a; background: #10251d; color: #bbf7d0; }
.wallet-login-btn.wallet-connected:hover { background: #143326; }

.top-config-btn { font-size: 12px; border: 1px solid #334155; background: #111827; color: #e5e7eb; border-radius: 8px; padding: 3px 8px; cursor: pointer; -webkit-app-region: no-drag; app-region: no-drag; }
.top-config-btn:hover { background: #1f2937; border-color: #4b5563; }
.top-config-btn:disabled { opacity: .55; cursor: wait; }
.theme-toggle-btn {
  min-width: 34px;
  width: 34px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  border-color: rgba(218,165,40,.45);
  background: linear-gradient(180deg, rgba(33, 38, 52, .96), rgba(17, 24, 39, .96));
  color: #fde68a;
}
.theme-toggle-btn:hover { border-color: rgba(250,204,21,.65); }
.keyword-monitor-btn {
  min-width: 34px;
  padding-left: 10px;
  padding-right: 10px;
  border-color: rgba(96, 165, 250, .44);
  background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .96));
  color: #bfdbfe;
  font-weight: 900;
}
.keyword-monitor-btn:hover { border-color: rgba(147, 197, 253, .68); background: #1e293b; }
.user-config-modal.hidden { display: none; }
.user-config-modal { position: fixed; inset: 0; z-index: 10000; -webkit-app-region: no-drag; app-region: no-drag; }
.uc-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); backdrop-filter: blur(4px); }
.uc-panel { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 76px); overflow: hidden; display: flex; flex-direction: column; background: #111216; border: 1px solid #2d2f38; border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.55); color: var(--fg); }
.uc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid #252731; background: linear-gradient(180deg, #171922, #111216); }
.uc-head h2 { margin: 0; font-size: 18px; }
.uc-muted, .uc-sub { color: var(--fg-dim); font-size: 12px; }
.uc-icon-btn { border: 0; background: #23252d; color: #e8e8ee; border-radius: 10px; width: 34px; height: 34px; font-size: 24px; line-height: 1; cursor: pointer; }
.uc-tabs, .uc-add, .uc-search, .uc-highlight { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid #252731; }
.uc-highlight { background: #10131b; }
.uc-highlight-title { color: #bfc2ce; font-size: 13px; font-weight: 900; margin-right: 4px; }
.uc-highlight label { display: inline-flex; align-items: center; gap: 5px; color: #d8d8e0; font-size: 13px; background: #171b25; border: 1px solid #2d3442; border-radius: 999px; padding: 5px 9px; cursor: pointer; }
.uc-highlight label:hover { border-color: #4b5563; background: #1d2330; }
.uc-tab, .uc-add button, .uc-small { border: 1px solid #334155; background: #1a1d27; color: #e8e8ee; border-radius: 10px; padding: 7px 10px; cursor: pointer; font-weight: 700; }
.uc-tab.active { background: #263655; border-color: #4b6aa6; color: #dbeafe; }
.uc-add input, .uc-add select, .uc-search input, .uc-table select { background: #0d0f14; color: #e8e8ee; border: 1px solid #343743; border-radius: 10px; padding: 7px 9px; outline: none; }
.uc-add input { min-width: 150px; }
.uc-search input { width: 100%; }
.uc-add label { color: #c7c7d0; font-size: 13px; }
.uc-add button { background: #1f513c; border-color: #2f7b5a; color: #dcfce7; }
.uc-content { padding: 14px 18px 18px; overflow: auto; }
.uc-summary { margin-bottom: 10px; color: #b3b3bd; font-size: 13px; }
.uc-table-wrap { border: 1px solid #2a2d37; border-radius: 14px; overflow: auto; }
.uc-table { width: 100%; border-collapse: collapse; min-width: 940px; }
.uc-table th, .uc-table td { border-bottom: 1px solid #242731; padding: 9px 10px; text-align: left; vertical-align: middle; }
.uc-table th { position: sticky; top: 0; background: #171922; color: #bfc2ce; font-size: 12px; z-index: 1; }
.uc-main { font-weight: 800; color: #f0f0f4; }
.uc-remark { max-width: 360px; color: #bfdbfe; font-size: 12px; line-height: 1.4; }
.uc-badge { display: inline-flex; align-items: center; border: 1px solid #334155; border-radius: 999px; padding: 2px 8px; font-size: 12px; color: #cbd5e1; background: #111827; white-space: nowrap; }
.uc-badge.extra { border-color: #2f7b5a; color: #bbf7d0; background: #10251d; }
.uc-small { padding: 5px 8px; font-size: 12px; }
.uc-small.ghost { background: #111827; }
.uc-small.ok { background: #1f513c; border-color: #2f7b5a; color: #dcfce7; }
.uc-list { display: grid; gap: 8px; }
.uc-list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #151821; border: 1px solid #292c36; border-radius: 12px; }
.uc-empty { padding: 18px; color: var(--fg-dim); text-align: center; }
@media (max-width: 720px) {
  .uc-panel { top: 20px; width: calc(100vw - 18px); max-height: calc(100vh - 40px); }
  .uc-add input, .uc-add select, .uc-add button { width: 100%; }
  .uc-list-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 14px 16px 16px;
  }
  .card .avatar {
    width: 48px;
    height: 48px;
  }
  .card .header .name {
    font-size: 20px;
  }
  .card .body {
    font-size: 16px;
  }
  .card .embed {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 10px 12px;
    gap: 5px 8px;
  }
  .card .embed .em-avatar {
    width: 32px;
    height: 32px;
  }
  .card .embed .em-body {
    font-size: 14px;
  }
  .card .embed .em-body .translation {
    font-size: 13px;
  }
  .card .historical-ref-banner {
    width: 100%;
    font-size: 11px;
    border-radius: 12px;
  }
  .card .embed .em-time {
    flex-basis: 100%;
    white-space: normal;
  }
}

/* test append marker */


/* ===== Top push channel switches ===== */
#top-actions-bar .push-channels {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
#top-actions-bar .push-title {
  color: #8a8a92;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
#top-actions-bar .push-chip {
  border: 1px solid rgba(143,184,255,.30);
  background: rgba(20,31,48,.92);
  color: #d7e7ff;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
#top-actions-bar .push-chip:hover { filter: brightness(1.12); }
#top-actions-bar .push-chip.off {
  opacity: .46;
  color: #8a8a92;
  background: #17171b;
  border-color: #34343b;
  text-decoration: line-through;
}


/* Keep top actions and bottom status usable on narrow widget widths. */
#top-actions-bar,
#health-bar {
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
}
#top-actions-bar .item,
#health-bar .item {
  flex: 0 0 auto;
  white-space: nowrap;
}
#top-actions-bar .spacer,
#health-bar .spacer {
  flex: 1 0 10px;
  min-width: 10px;
}
#top-actions-bar .push-channels,
#top-actions-bar .user-actions,
#top-actions-bar .theme-actions,
#top-actions-bar .wallet-actions {
  flex: 0 0 auto;
}

/* Push menu variant: compact top button + dropdown switches. */
#top-actions-bar { overflow: visible; }
#top-actions-bar .push-channels {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 20000;
}

@media (max-width: 640px) {
  #top-actions-bar {
    min-height: 48px;
    padding-left: 10px;
    padding-right: 10px;
    gap: 8px;
  }
  #top-actions-bar .site-logo-link {
    width: 222px;
    height: 38px;
    margin-right: 4px;
  }
  #top-actions-bar .site-logo {
    width: 216px;
    height: auto;
    max-height: 37px;
  }
}
#push-menu-toggle {
  border: 1px solid rgba(143,184,255,.36);
  background: rgba(20,31,48,.95);
  color: #d7e7ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
#push-menu-toggle.off {
  border-color: rgba(245,158,11,.55);
  color: #fde68a;
  background: rgba(69,45,8,.88);
}
#push-channel-controls .push-panel.hidden { display: none; }
#push-channel-controls .push-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 7px;
  width: 220px;
  padding: 10px;
  border: 1px solid #303544;
  border-radius: 14px;
  background: rgba(17,18,24,.98);
  box-shadow: 0 18px 46px rgba(0,0,0,.52);
  z-index: 30000;
}
#push-channel-controls .push-panel .push-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 6px 8px;
}
#push-channel-controls .auto-image-analysis-chip {
  grid-column: 1 / -1;
  border-color: rgba(168,85,247,.45);
  background: rgba(42,30,58,.94);
}
#push-channel-controls .auto-image-analysis-chip.off {
  border-color: #34343b;
  background: #17171b;
}

/* ===== Inline playable videos ===== */
.card .media.has-inline-video,
.card .embed .em-media.has-inline-video,
.card.dex-signal .dex-tweet-media.has-video {
  position: relative;
  width: fit-content;
  max-width: 100%;
}
.card .media video.inline-video,
.card .embed .em-media video.inline-video,
.card.dex-signal .dex-tweet-video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  border-radius: 12px;
  border: 1px solid var(--embed-border);
  background: #000;
  -webkit-app-region: no-drag;
  app-region: no-drag;
}
.card .embed .em-media video.inline-video {
  max-height: 360px;
  border-radius: 10px;
}
.card.dex-signal .dex-tweet-video {
  max-height: 280px;
  border-radius: 8px;
}
.card .media.has-inline-video::before,
.card .embed .em-media.has-inline-video::before,
.card.dex-signal .dex-tweet-media:has(video)::before {
  display: none;
}


#push-channel-controls .push-chip.has-side-filter {
  position: relative;
}
#push-channel-controls .push-chip.has-side-filter::after {
  content: "细分";
  position: absolute;
  right: 6px;
  top: -7px;
  padding: 1px 5px;
  border: 1px solid rgba(96,165,250,.42);
  border-radius: 999px;
  background: rgba(15,23,42,.96);
  color: #93c5fd;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 900;
}
#push-channel-controls .push-news-filters {
  position: absolute;
  left: calc(100% + 8px);
  top: 8px;
  width: 338px;
  max-width: min(338px, calc(100vw - 260px));
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  align-items: stretch;
  z-index: 30001;
}
#push-channel-controls .push-news-filters.disabled {
  opacity: .58;
}
#push-channel-controls .news-filter-side-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .08em;
  min-width: 28px;
  padding: 10px 5px;
  border: 1px solid rgba(96,165,250,.42);
  border-right: 0;
  border-radius: 13px 0 0 13px;
  background: linear-gradient(180deg, rgba(37,99,235,.30), rgba(15,23,42,.98));
  color: #dbeafe;
  font-size: 11px;
  font-weight: 900;
  box-shadow: -6px 14px 34px rgba(0,0,0,.32);
}
#push-channel-controls .news-filter-card {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(96,165,250,.30);
  border-radius: 0 14px 14px 14px;
  background: rgba(12,18,29,.985);
  box-shadow: 0 18px 46px rgba(0,0,0,.52);
}
#push-channel-controls .news-filter-title {
  font-size: 12px;
  font-weight: 900;
  color: #dbeafe;
  margin-bottom: 7px;
}
#push-channel-controls .news-filter-subtitle {
  font-size: 11px;
  color: #93a8c8;
  margin: 8px 0 5px;
}
#push-channel-controls .news-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#push-channel-controls .news-filter-grid.types {
  max-height: min(260px, calc(100vh - 260px));
  overflow: auto;
  padding-right: 3px;
}
#push-channel-controls .news-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(143,184,255,.22);
  border-radius: 999px;
  background: rgba(10,16,28,.92);
  color: #d7e3f8;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
#push-channel-controls .news-filter-chip input {
  margin: 0;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  accent-color: #60a5fa;
}
#push-channel-controls .news-filter-chip span {
  color: #8ea3c2;
  font-variant-numeric: tabular-nums;
}
#push-channel-controls .news-filter-empty {
  color: #8ea3c2;
  font-size: 11px;
}

/* ===== Soft light theme ===== */
body.theme-light,
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(219, 234, 254, .85) 0, transparent 32%),
    linear-gradient(180deg, #f4f6fa 0%, #eef1f5 100%);
  color: var(--fg);
}
body.theme-light #top-actions-bar,
body.theme-light #health-bar {
  color: var(--fg-muted);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}
body.theme-light #health-bar .label { color: #253041; }
body.theme-light #health-bar .time { color: #697586; }
body.theme-light #health-bar .item[data-key="sse"] .time { color: #2563eb; }
body.theme-light main#feed::-webkit-scrollbar-thumb { background: #c8d2df; }
body.theme-light main#feed::-webkit-scrollbar-thumb:hover { background: #aebbc9; }

body.theme-light .card {
  box-shadow: var(--soft-shadow);
}
body.theme-light .card.highlight {
  box-shadow: 0 0 0 1px rgba(183, 121, 31, .18), 0 10px 26px rgba(183, 121, 31, .10);
}
body.theme-light .card a.text-link {
  color: var(--link);
  border-bottom-color: rgba(37, 99, 235, .30);
}
body.theme-light .card a.mention-link {
  color: var(--mention);
}
body.theme-light .card a.text-link:hover,
body.theme-light .card a.mention-link:hover,
body.theme-light .follow-row a.target-name.profile-link:hover,
body.theme-light .follow-row a.target-handle.profile-link:hover {
  color: #1d4ed8;
  border-bottom-color: rgba(29, 78, 216, .45);
}
body.theme-light .card a.profile-link:hover {
  color: #111827;
  border-bottom-color: rgba(17, 24, 39, .26);
}
body.theme-light .card .handle a.profile-link,
body.theme-light .card .embed .em-handle a.profile-link,
body.theme-light .follow-row a.target-handle.profile-link {
  color: #667085;
}
body.theme-light .card .avatar,
body.theme-light .card .embed .em-avatar,
body.theme-light .follow-row .target-avatar {
  background: #e5ebf3;
  border-color: #cad5e2;
}
body.theme-light .card .media img,
body.theme-light .card .media video,
body.theme-light .card .embed .em-media img,
body.theme-light .card .embed .em-media video.inline-video,
body.theme-light .card.dex-signal .dex-tweet-video,
body.theme-light .card.dex-signal .dex-tweet-media img {
  border-color: #ccd7e4;
  background: #eef3f8;
}
body.theme-light .card .body .translation,
body.theme-light .card .embed .em-body .translation {
  color: #46566b;
}
body.theme-light .card.alpha-signal {
  background: linear-gradient(180deg, #eefaf3 0%, var(--card-bg) 52%);
  border-color: #badfca;
}
body.theme-light .card.alpha-signal.highlight {
  background: linear-gradient(180deg, #fff7df 0%, var(--card-bg) 46%);
}
body.theme-light .card.favorite {
  background: linear-gradient(180deg, rgba(255, 248, 220, .82) 0%, var(--card-bg) 42%);
}
body.theme-light .card.historical-ref .embed {
  background: #fff7e6;
  border-color: rgba(217, 119, 6, .30);
}
body.theme-light .card .pin-badge {
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

body.theme-light .card .footer a,
body.theme-light .card .footer .fav-btn {
  background: #eef2f7;
  color: #344054;
  border-color: #cfd8e5;
}
body.theme-light .card .footer a:hover,
body.theme-light .card .footer .fav-btn:hover:not(:disabled) {
  background: #e3eaf3;
  border-color: #bdc9d8;
}
body.theme-light .card .footer .fav-btn.is-fav {
  background: #fff4d6;
  color: #9a5a00;
  border-color: #f4c56a;
}
body.theme-light .card .footer .unfollow-btn {
  background: #fff1f2;
  color: #b42318;
  border-color: #f4b4b4;
}
body.theme-light .card .footer .unfollow-btn:hover:not(:disabled) { background: #ffe4e6; }
body.theme-light .card .footer .admin-remove-default-btn {
  background: #fff7ed;
  color: #9a4b0b;
  border-color: #f2bd87;
}
body.theme-light .card .footer .admin-remove-default-btn:hover:not(:disabled) {
  background: #ffedd5;
  border-color: #e59a53;
}
body.theme-light .card .footer .narrative-btn {
  background: #f1e8ff;
  color: #6d28d9;
  border-color: #ccb3f3;
}
body.theme-light .card .footer .narrative-btn:hover:not(:disabled) { background: #e9d8ff; }

body.theme-light .card mark.meme-highlight {
  color: #8a4b00;
  background: linear-gradient(180deg, transparent 48%, rgba(245, 158, 11, .32) 48%);
}
body.theme-light .card mark.token-ca-highlight {
  color: #0f766e;
  background: rgba(20, 184, 166, .14);
  border-color: rgba(15, 118, 110, .22);
}
body.theme-light .card mark.token-symbol-highlight {
  color: #1d4ed8;
  background: rgba(59, 130, 246, .13);
  border-color: rgba(37, 99, 235, .20);
}
body.theme-light .card mark.quote-content-highlight {
  color: #7e22ce;
  background: linear-gradient(180deg, transparent 45%, rgba(168, 85, 247, .22) 45%);
}
body.theme-light .card .narrative-allusions {
  background: linear-gradient(180deg, #fff8ea 0%, #fffdf7 100%);
  border-color: #ead8aa;
}
body.theme-light .card .narrative-brief {
  background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
  border-color: #bdd1f2;
}
body.theme-light .card .narrative-title { color: #b7791f; }
body.theme-light .card .narrative-brief .narrative-title { color: #2563eb; }
body.theme-light .card .narrative-phrase { color: #9a5a00; }
body.theme-light .card .narrative-tag {
  background: #e7effc;
  color: #244d86;
  border-color: #bfd2ee;
}

body.theme-light .card.dex-signal .dex-meta,
body.theme-light .card.dex-signal .dex-copy,
body.theme-light .card.dex-signal .dex-link {
  background: #eef5f8;
  border-color: #c7d7df;
}
body.theme-light .card.dex-signal .dex-title { color: #0f766e; }
body.theme-light .card.dex-signal .dex-symbol { color: #9a5a00; }
body.theme-light .card.dex-signal .dex-name { color: #526273; }
body.theme-light .card.dex-signal .dex-stat {
  background: #f2f6fa;
  border-color: #d3dde8;
}
body.theme-light .card.dex-signal .dex-stat-val { color: #344054; }
body.theme-light .card.dex-signal {
  background: linear-gradient(180deg, #f7fbfd 0%, #edf4f8 100%);
  border-color: #bfd3df;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  color: #182033;
}
body.theme-light .card.dex-signal.highlight {
  border-color: #80c7c1;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, .16), 0 12px 28px rgba(15, 118, 110, .10);
}
body.theme-light .card.dex-signal .dex-icon {
  background: linear-gradient(135deg, #e7f1f6, #dceaf1);
  border-color: #b9ccd8;
}
body.theme-light .card.dex-signal .dex-icon-letter { color: #0f766e; }
body.theme-light .card.dex-signal .dex-meta {
  color: #5c6f80;
  border: 1px solid #c7d7df;
}
body.theme-light .card.dex-signal .dex-time { color: #667085; }
body.theme-light .card.dex-signal .dex-mc { color: #15803d; }
body.theme-light .card.dex-signal .dex-stat-label { color: #6b7c8f; }
body.theme-light .card.dex-signal .dex-ca-row {
  background: #edf4f8;
  border-color: #cbd9e4;
}
body.theme-light .card.dex-signal .dex-ca { color: #334155; }
body.theme-light .card.dex-signal .dex-copy {
  background: #e7eef4;
  color: #526172;
  border-color: #c2d1dc;
}
body.theme-light .card.dex-signal .dex-copy:hover { background: #dce7ef; }
body.theme-light .card.dex-signal .dex-link {
  background: #e6f6ef;
  color: #16845b;
  border-color: #b8dbc9;
}
body.theme-light .card.dex-signal .dex-link:hover { background: #d9f0e6; }
body.theme-light .card.dex-signal .dex-link-pill,
body.theme-light .card.dex-signal .dex-tweets-btn {
  background: #edf4f8;
  color: #35627c;
  border-color: #c6d6e0;
}
body.theme-light .card.dex-signal .dex-link-pill:hover,
body.theme-light .card.dex-signal .dex-tweets-btn:hover:not(:disabled) {
  background: #e2edf4;
  border-color: #aec7d6;
}
body.theme-light .card.dex-signal .dex-link-pill.website { color: #1d5f8f; }
body.theme-light .card.dex-signal .dex-link-pill.social-twitter,
body.theme-light .card.dex-signal .dex-link-pill.social-x { color: #334155; border-color: #c6d6e0; }
body.theme-light .card.dex-signal .dex-link-pill.social-telegram,
body.theme-light .card.dex-signal .dex-link-pill.social-tg { color: #1473a6; }
body.theme-light .card.dex-signal .dex-link-pill.social-discord { color: #5b4bb2; }
body.theme-light .card.dex-signal .dex-link-pill.social-github { color: #475467; }
body.theme-light .card.dex-signal .tw-profile-card,
body.theme-light .card.dex-signal .dex-tweet-item,
body.theme-light .card.dex-signal .dex-tweets-loading {
  background: #f7fbfe;
  border-color: #c9d8e4;
}
body.theme-light .card.dex-signal .tw-profile-avatar { border-color: #b8c7d6; background: #e7eef4; }
body.theme-light .card.dex-signal .tw-profile-desc-zh,
body.theme-light .card.dex-signal .dex-tweet-zh { border-top-color: #c9d8e4; }

body.theme-light .top-config-btn,
body.theme-light #push-menu-toggle {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}
body.theme-light .top-config-btn:hover,
body.theme-light #push-menu-toggle:hover {
  background: #eef2f7;
  border-color: #b6c2d1;
}
body.theme-light .theme-toggle-btn {
  background: linear-gradient(180deg, #fff7da, #f7e9b7);
  color: #7c4a00;
  border-color: #e6bf55;
}
body.theme-light .wallet-login-btn.wallet-connected {
  background: #e7f8ee;
  color: #166534;
  border-color: #93d6aa;
}
body.theme-light #push-menu-toggle.off {
  background: #fff7e6;
  color: #9a5a00;
  border-color: #e8c275;
}
body.theme-light #push-channel-controls .push-panel {
  background: rgba(248, 250, 252, .98);
  border-color: #c9d5e3;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .15);
}
body.theme-light #top-actions-bar .push-chip,
body.theme-light #push-channel-controls .push-panel .push-chip {
  background: #eef4ff;
  color: #24508c;
  border-color: #c4d7f3;
}
body.theme-light #top-actions-bar .push-chip.off,
body.theme-light #push-channel-controls .push-panel .push-chip.off,
body.theme-light #push-channel-controls .auto-image-analysis-chip.off {
  background: #f1f3f6;
  color: #7a8695;
  border-color: #d6dde6;
}
body.theme-light #push-channel-controls .auto-image-analysis-chip {
  background: #f4edff;
  border-color: #d8c4f2;
  color: #6d28d9;
}
body.theme-light #push-channel-controls .news-filter-side-tab {
  background: linear-gradient(180deg, #dbeafe, #eff6ff);
  color: #1d4ed8;
  border-color: #b8cdf0;
  box-shadow: -4px 12px 24px rgba(15, 23, 42, .10);
}
body.theme-light #push-channel-controls .news-filter-card {
  background: rgba(248, 250, 252, .99);
  border-color: #c9d5e3;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
}
body.theme-light #push-channel-controls .news-filter-title { color: #1e3a8a; }
body.theme-light #push-channel-controls .news-filter-subtitle,
body.theme-light #push-channel-controls .news-filter-chip span,
body.theme-light #push-channel-controls .news-filter-empty { color: #667085; }
body.theme-light #push-channel-controls .news-filter-chip {
  background: #f2f6fb;
  color: #334155;
  border-color: #d1dbe8;
}


body.theme-light .keyword-monitor-btn,
html[data-theme="light"] .keyword-monitor-btn {
  background: #eaf2ff;
  color: #1d4ed8;
  border-color: #bdd3f4;
}
body.theme-light .keyword-monitor-btn:hover,
html[data-theme="light"] .keyword-monitor-btn:hover { background: #dfeaff; }
body.theme-light .theme-toggle-btn,
html[data-theme="light"] .theme-toggle-btn {
  background: #fff7ed;
  color: #a16207;
  border-color: #f3d09a;
}
body.theme-light .user-config-modal .uc-panel {
  background: #f8fafc;
  color: #182033;
  border-color: #d5dde8;
}
body.theme-light .uc-backdrop { background: rgba(15, 23, 42, .38); }
body.theme-light .uc-icon-btn,
body.theme-light .uc-tab,
body.theme-light .uc-add button,
body.theme-light .uc-small {
  background: #eef2f7;
  color: #344054;
  border-color: #ccd6e3;
}
body.theme-light .uc-tab.active {
  background: #e8f0ff;
  color: #1d4ed8;
  border-color: #b8cdf0;
}
body.theme-light .uc-add input,
body.theme-light .uc-add select,
body.theme-light .uc-search input,
body.theme-light .uc-table select {
  background: #ffffff;
  color: #182033;
  border-color: #cfd8e5;
}
body.theme-light .uc-tabs,
body.theme-light .uc-add,
body.theme-light .uc-search,
body.theme-light .uc-highlight {
  border-bottom-color: #d5dde8;
}
body.theme-light .uc-highlight { background: #f1f5fa; }
body.theme-light .uc-highlight label {
  background: #ffffff;
  color: #344054;
  border-color: #d5dde8;
}

@media (max-width: 640px) {
  #push-channel-controls .push-news-filters {
    left: auto;
    right: 0;
    top: calc(100% + 8px);
    width: min(340px, calc(100vw - 24px));
    max-width: min(340px, calc(100vw - 24px));
  }
}

/* ===== Soft light narrative allusions v7 ===== */
html[data-theme="light"] .card .narrative-allusions,
body.theme-light .card .narrative-allusions {
  background: linear-gradient(180deg, #f5f7fa 0%, #eef3f8 100%) !important;
  border: 1px solid #bfccdc !important;
  border-left: 3px solid #86a9c9 !important;
  color: #203047 !important;
  box-shadow: 0 6px 16px rgba(41, 58, 78, .10) !important;
}
html[data-theme="light"] .card .narrative-brief,
body.theme-light .card .narrative-brief {
  background: linear-gradient(180deg, #f6f8fb 0%, #edf3f8 100%) !important;
  border-color: #b9c8da !important;
  border-left-color: #7fa4c8 !important;
}
html[data-theme="light"] .card .narrative-allusions .narrative-title,
html[data-theme="light"] .card .narrative-brief .narrative-title,
body.theme-light .card .narrative-allusions .narrative-title,
body.theme-light .card .narrative-brief .narrative-title {
  color: #3a658d !important;
  text-shadow: none !important;
}
html[data-theme="light"] .card .narrative-allusions .narrative-item,
html[data-theme="light"] .card .narrative-allusions .narrative-line,
html[data-theme="light"] .card .narrative-allusions .narrative-exp,
body.theme-light .card .narrative-allusions .narrative-item,
body.theme-light .card .narrative-allusions .narrative-line,
body.theme-light .card .narrative-allusions .narrative-exp {
  color: #24344a !important;
}
html[data-theme="light"] .card .narrative-allusions .narrative-phrase,
html[data-theme="light"] .card .narrative-allusions b,
html[data-theme="light"] .card .narrative-allusions strong,
body.theme-light .card .narrative-allusions .narrative-phrase,
body.theme-light .card .narrative-allusions b,
body.theme-light .card .narrative-allusions strong {
  color: #8a5f14 !important;
}
html[data-theme="light"] .card .narrative-allusions .narrative-tag,
body.theme-light .card .narrative-allusions .narrative-tag {
  background: #e3edf6 !important;
  border: 1px solid #b3c5d8 !important;
  color: #31557d !important;
  box-shadow: none !important;
}
html[data-theme="light"] .card .narrative-image-context,
body.theme-light .card .narrative-image-context {
  background: linear-gradient(180deg, #f8f6ee 0%, #f0eadf 100%) !important;
  border-left-color: #c89534 !important;
  color: #253246 !important;
  box-shadow: 0 4px 12px rgba(86, 65, 35, .08) !important;
}
/* ===== End soft light narrative allusions v7 ===== */

/* ===== Soft light translation inline v8 ===== */
html[data-theme="light"] .card .translation,
html[data-theme="light"] .card .body .translation,
html[data-theme="light"] .card .embed .em-body .translation,
body.theme-light .card .translation,
body.theme-light .card .body .translation,
body.theme-light .card .embed .em-body .translation {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #627086 !important;
  padding: 0 !important;
}
html[data-theme="light"] .card .body .translation,
body.theme-light .card .body .translation {
  margin-top: 6px !important;
}
html[data-theme="light"] .card .embed .em-body .translation,
body.theme-light .card .embed .em-body .translation {
  margin-top: 4px !important;
}
/* ===== End soft light translation inline v8 ===== */

/* ===== Admin wallet panel button ===== */
.admin-actions.hidden { display: none !important; }
.admin-panel-btn {
  background: linear-gradient(180deg, #2e3f66, #26324f) !important;
  border-color: rgba(133, 174, 255, .42) !important;
  color: #eaf2ff !important;
  font-weight: 800;
}
.admin-panel-btn::before { content: "⚙ "; }
html[data-theme="light"] .admin-panel-btn,
body.theme-light .admin-panel-btn {
  background: linear-gradient(180deg, #e4edf8, #cfdeef) !important;
  border-color: #9fb6d3 !important;
  color: #294a72 !important;
  box-shadow: 0 4px 10px rgba(45, 71, 101, .12) !important;
}
.admin-actions { gap: 6px; -webkit-app-region: no-drag; app-region: no-drag; }
.admin-quick-add-btn {
  background: linear-gradient(180deg, #5a3b18, #3f2a12) !important;
  border-color: rgba(245, 158, 11, .55) !important;
  color: #ffdf9a !important;
  font-weight: 850;
}
.admin-quick-add-btn::before { content: "+ "; }
.admin-quick-add-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #6b451b, #513316) !important;
  border-color: rgba(251, 191, 36, .75) !important;
}
html[data-theme="light"] .admin-quick-add-btn,
body.theme-light .admin-quick-add-btn {
  background: linear-gradient(180deg, #fff3d3, #f4d79a) !important;
  border-color: #daa64d !important;
  color: #7a4a05 !important;
  box-shadow: 0 4px 10px rgba(122, 74, 5, .12) !important;
}

/* ===== End admin wallet panel button ===== */

/* ===== Deleted tweet warning card ===== */
.card.tweet-delete-event {
  position: relative;
  border-color: rgba(255, 92, 92, .88) !important;
  box-shadow:
    0 0 0 1px rgba(255, 92, 92, .72),
    0 0 28px rgba(204, 42, 42, .26),
    var(--card-shadow, 0 12px 28px rgba(0,0,0,.18));
}
.card.tweet-delete-event::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
  color: rgba(255, 55, 55, .20);
  font-size: clamp(150px, 34vw, 360px);
  line-height: .8;
  font-weight: 950;
  font-family: Arial Black, Impact, system-ui, sans-serif;
  transform: rotate(-10deg);
  text-shadow: 0 0 18px rgba(255, 0, 0, .12);
}
.card.tweet-delete-event > * {
  position: relative;
  z-index: 2;
}
.card.tweet-delete-event .chip.delete {
  background: linear-gradient(180deg, #ef4444, #991b1b) !important;
  color: #fff7f7;
  box-shadow: 0 0 0 1px rgba(255,255,255,.20), 0 8px 18px rgba(185,28,28,.28);
}
html[data-theme="light"] .card.tweet-delete-event,
body.theme-light .card.tweet-delete-event {
  border-color: rgba(220, 38, 38, .82) !important;
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, .50),
    0 0 26px rgba(220, 38, 38, .18),
    0 9px 22px rgba(33, 48, 66, .12) !important;
}
html[data-theme="light"] .card.tweet-delete-event::after,
body.theme-light .card.tweet-delete-event::after {
  color: rgba(220, 38, 38, .16);
}
/* ===== End deleted tweet warning card ===== */


/* ===== Narrative depth badge ===== */
.card .narrative-depth-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px 2px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(168, 85, 247, 0.20));
  color: #c7ddff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.card .narrative-brief.narrative-deep {
  border-color: rgba(96, 165, 250, 0.56);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.14) inset, 0 12px 26px rgba(15, 23, 42, 0.18);
}
html[data-theme="light"] .card .narrative-depth-badge,
body.theme-light .card .narrative-depth-badge {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(237, 233, 254, 0.92));
  color: #1d4ed8;
}
html[data-theme="light"] .card .narrative-brief.narrative-deep,
body.theme-light .card .narrative-brief.narrative-deep {
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.06) inset, 0 10px 22px rgba(100, 116, 139, 0.12);
}
/* ===== End narrative depth badge ===== */



/* ===== Profile banner/avatar change compare ===== */
.card .profile-image-change {
  grid-area: body;
  margin-top: 6px;
  min-width: 0;
}
.profile-image-change-title {
  color: #d8d8e0;
  font-size: 13px;
  font-weight: 900;
  margin: 0 0 8px;
}
.profile-image-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-image-change-item,
.profile-image-change-missing {
  display: block;
  min-width: 0;
  border: 1px solid #2f3340;
  border-radius: 14px;
  background: #151821;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.profile-image-change-item.is-new { border-color: rgba(74, 222, 128, .40); }
.profile-image-change-item.is-old { border-color: rgba(148, 163, 184, .34); }
.profile-image-change-label {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  color: #e8e8ee;
  background: rgba(255,255,255,.03);
}
.profile-image-change-item.is-new .profile-image-change-label { color: #bbf7d0; }
.profile-image-change-item.is-old .profile-image-change-label { color: #cbd5e1; }
.profile-image-change-item img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #090a0d;
}
.profile-image-change-url {
  padding: 7px 10px 9px;
  color: #8fb8ff;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  border-top: 1px solid rgba(255,255,255,.06);
}
.profile-image-change-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 214px;
  color: #8a8a92;
  font-size: 13px;
}
.profile-image-change-item.image-load-failed img { display: none; }
.profile-image-change-item.image-load-failed::after {
  content: "图片加载失败，点击打开原图";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  color: #fca5a5;
  background: #1b1010;
  font-size: 13px;
}
body.theme-light .profile-image-change-title,
html[data-theme="light"] .profile-image-change-title { color: #344054; }
body.theme-light .profile-image-change-item,
body.theme-light .profile-image-change-missing,
html[data-theme="light"] .profile-image-change-item,
html[data-theme="light"] .profile-image-change-missing {
  background: #f6f8fb;
  border-color: #ccd6e3;
}
body.theme-light .profile-image-change-label,
html[data-theme="light"] .profile-image-change-label {
  color: #263243;
  background: rgba(15, 23, 42, .035);
}
body.theme-light .profile-image-change-item.is-new,
html[data-theme="light"] .profile-image-change-item.is-new { border-color: rgba(22, 163, 74, .30); }
body.theme-light .profile-image-change-item.is-old,
html[data-theme="light"] .profile-image-change-item.is-old { border-color: rgba(100, 116, 139, .26); }
body.theme-light .profile-image-change-item.is-new .profile-image-change-label,
html[data-theme="light"] .profile-image-change-item.is-new .profile-image-change-label { color: #15803d; }
body.theme-light .profile-image-change-item.is-old .profile-image-change-label,
html[data-theme="light"] .profile-image-change-item.is-old .profile-image-change-label { color: #475467; }
body.theme-light .profile-image-change-url,
html[data-theme="light"] .profile-image-change-url {
  color: #2563eb;
  border-top-color: #dce4ee;
}
body.theme-light .profile-image-change-missing,
html[data-theme="light"] .profile-image-change-missing { color: #667085; }
body.theme-light .profile-image-change-item.image-load-failed::after,
html[data-theme="light"] .profile-image-change-item.image-load-failed::after {
  color: #b42318;
  background: #fff1f2;
}
@media (max-width: 720px) {
  .profile-image-change-grid { grid-template-columns: 1fr; }
  .profile-image-change-item img { height: 145px; }
}
/* ===== End profile banner/avatar change compare ===== */

/* ===== Keyword alert monitor ===== */
@keyframes keyword-alert-flash {
  0%, 100% {
    box-shadow: 0 0 0 rgba(251, 191, 36, 0);
    filter: brightness(1);
  }
  45% {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, .24), 0 0 18px rgba(251, 191, 36, .42);
    filter: brightness(1.16);
  }
}
mark.keyword-alert-highlight {
  display: inline;
  padding: 0 4px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(251, 191, 36, .18), rgba(251, 191, 36, .42));
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, .42);
  font-weight: 900;
  animation: keyword-alert-flash 1.05s ease-in-out infinite;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
mark.keyword-alert-highlight.static { animation: none; }
a.keyword-alert-link {
  display: inline;
  padding: 0 4px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(251, 191, 36, .18), rgba(251, 191, 36, .42));
  color: #fde68a !important;
  border: 1px solid rgba(251, 191, 36, .42);
  font-weight: 900;
  animation: keyword-alert-flash 1.05s ease-in-out infinite;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.card.keyword-alert-card {
  border-color: rgba(251, 191, 36, .70);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .16), 0 14px 36px rgba(251, 191, 36, .07);
}
.uc-keyword-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.uc-keyword-add input,
.uc-keyword-add select,
.uc-keyword-row select {
  background: #0d0f14;
  color: #e8e8ee;
  border: 1px solid #343743;
  border-radius: 10px;
  padding: 7px 9px;
  outline: none;
}
.uc-keyword-add input { min-width: 190px; }
.uc-keyword-list { display: grid; gap: 8px; }
.uc-keyword-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 130px auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #151821;
  border: 1px solid #292c36;
  border-radius: 12px;
}
.uc-keyword-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.uc-keyword-enabled { color: #d8d8e0; font-size: 13px; }
.uc-small.danger { background: #451a1a; border-color: #7f1d1d; color: #fecaca; }
.uc-small.danger:hover { background: #5f1f1f; }
body.theme-light mark.keyword-alert-highlight,
html[data-theme="light"] mark.keyword-alert-highlight,
body.theme-light a.keyword-alert-link,
html[data-theme="light"] a.keyword-alert-link {
  color: #8a4b00;
  background: linear-gradient(180deg, rgba(250, 204, 21, .18), rgba(245, 158, 11, .34));
  border-color: rgba(180, 83, 9, .28);
}
body.theme-light .card.keyword-alert-card,
html[data-theme="light"] .card.keyword-alert-card {
  border-color: rgba(217, 119, 6, .38);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, .12), 0 12px 28px rgba(120, 72, 12, .06);
}
body.theme-light .uc-keyword-add input,
body.theme-light .uc-keyword-add select,
body.theme-light .uc-keyword-row select,
html[data-theme="light"] .uc-keyword-add input,
html[data-theme="light"] .uc-keyword-add select,
html[data-theme="light"] .uc-keyword-row select {
  background: #ffffff;
  color: #182033;
  border-color: #cfd8e5;
}
body.theme-light .uc-keyword-row,
html[data-theme="light"] .uc-keyword-row {
  background: #ffffff;
  border-color: #d5dde8;
}
body.theme-light .uc-keyword-enabled,
html[data-theme="light"] .uc-keyword-enabled { color: #344054; }
body.theme-light .uc-small.danger,
html[data-theme="light"] .uc-small.danger {
  background: #fff1f2;
  border-color: #f4b4b4;
  color: #b42318;
}
@media (max-width: 720px) {
  .uc-keyword-row { grid-template-columns: 1fr; align-items: stretch; }
  .uc-keyword-add input,
  .uc-keyword-add select,
  .uc-keyword-add button { width: 100%; }
}
/* ===== End keyword alert monitor ===== */
