body.desktop-app {
  --bg: #101916;
  --surface: #17211c;
  --chrome: #1c2822;
  --text: #edf4ef;
  --muted: #b2c3b8;
  --dim: #91a699;
  --line: #2b3c32;
  --accent: #b6f5ce;
  --soft: #193c2a;
  --fresh: #28553b;
  --gold: #ffe09a;
  --gold-bg: #3b311c;
  --error: #ffb4a5;
  --sell: #ffb3ad;
  --sell-fresh: #482825;
  --font: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
  margin: 0;
  min-width: 380px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
.desktop-app *, .desktop-app *::before, .desktop-app *::after { box-sizing: border-box; }
.desktop-app [hidden] { display: none !important; }
.desktop-app h1, .desktop-app h2, .desktop-app h3, .desktop-app p, .desktop-app dl, .desktop-app dd { margin: 0; }
.desktop-app button, .desktop-app input, .desktop-app select { font: inherit; color: inherit; }
.desktop-app button { border: 0; background: none; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .16s ease, color .16s ease; }
.desktop-app button:disabled { cursor: not-allowed; color: var(--dim); opacity: .5; }
.desktop-app a { color: var(--accent); text-decoration: none; }
.desktop-app a:hover { text-decoration: underline; text-underline-offset: 3px; }
.desktop-app button:focus-visible, .desktop-app a:focus-visible, .desktop-app input:focus-visible, .desktop-app select:focus-visible, .desktop-app summary:focus-visible, .desktop-app [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.desktop-app input, .desktop-app select { min-width: 0; }
.desktop-app .icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.desktop-app .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.desktop-app .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* The host adds desktop-native after a trusted desktop bridge is available. */
.desktop-app .titlebar { display: flex; align-items: center; flex-shrink: 0; gap: 9px; height: 54px; min-width: 0; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); background: var(--chrome); user-select: none; }
.desktop-app .app-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; background: var(--accent); color: #173324; border-radius: 5px; font: italic 800 18px Arial, sans-serif; }
.desktop-app .titlebar-heading { flex: 1; min-width: 0; }
.desktop-app .app-title { font-size: 16px; font-weight: 650; line-height: 20px; letter-spacing: .01em; white-space: nowrap; }
.desktop-app .app-subtitle { color:var(--muted);font-size:10px;line-height:12px;white-space:nowrap; }
.desktop-app .titlebar-actions { display: flex; align-items: center; flex-shrink: 0; gap: 2px; }
.desktop-app .window-controls { display: none; align-items: center; height: 34px; margin-left: 3px; }
.desktop-native .titlebar { -webkit-app-region: drag; app-region: drag; }
.desktop-native .window-controls { display: flex; }
.desktop-native button, .desktop-native input, .desktop-native select, .desktop-native a, .desktop-native dialog { -webkit-app-region: no-drag; app-region: no-drag; }
.desktop-app .window-button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; color: var(--muted); }
.desktop-app .window-button:hover { background: #35453b; color: var(--text); }
.desktop-app #window-close:hover { background: #9e4039; color: #fff; }
.desktop-app .window-button .icon { width: 15px; height: 15px; }

.desktop-app .desktop-main { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.desktop-app #connection-status { margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 13px; text-overflow: ellipsis; white-space: nowrap; }
.desktop-app #connection-status.error, .desktop-app #connection-status[data-state="error"] { color: var(--error); }
.desktop-app #connection-status.warning, .desktop-app #connection-status[data-state="degraded"] { color: var(--gold); }
.desktop-app #connection-status.live, .desktop-app #connection-status[data-state="live"] { color: var(--accent); }
.desktop-app .icon-button, .desktop-app .pin-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; min-width: 40px; padding: 6px; border-radius: 6px; color: var(--muted); }
.desktop-app .pin-button { padding: 6px 8px; font-size: 14px; white-space: nowrap; }
.desktop-app .pin-button[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.desktop-app .icon-button:hover:not(:disabled), .desktop-app .pin-button:hover:not(:disabled) { background: var(--chrome); color: var(--text); }
.desktop-app .titlebar .icon-button, .desktop-app .titlebar .pin-button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 7px; }
.desktop-app .titlebar .icon-button:hover:not(:disabled), .desktop-app .titlebar .pin-button:hover:not(:disabled) { background: #35453b; }

.desktop-app .view-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; padding: 0 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.desktop-app .view-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 49px; padding: 9px 0 12px; color: var(--muted); font-size: 15px; font-weight: 650; white-space: nowrap; }
.desktop-app .view-tabs button > span { color: var(--dim); font: 13px var(--mono); font-variant-numeric: tabular-nums; }
.desktop-app .view-tabs button[aria-pressed="true"], .desktop-app .view-tabs button.active { color: var(--text); }
.desktop-app .view-tabs button[aria-pressed="true"] > span, .desktop-app .view-tabs button.active > span { color: var(--accent); }
.desktop-app .view-tabs button[aria-pressed="true"]::after, .desktop-app .view-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.desktop-app .feed-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; padding: 10px 18px; background: var(--surface); font-size: 13px; line-height: 1.6; color: var(--muted); flex-shrink: 0; }
.desktop-app #filter-note { display: inline-flex; align-items: center; gap: 5px; }
.desktop-app #filter-note .icon { width: 15px; height: 15px; }
.desktop-app #sort-note { color: var(--dim); }
.desktop-app .discovery-status { flex-shrink: 0; padding: 9px 18px 11px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.7; }
.desktop-app #discovery-summary { color: var(--text); }
.desktop-app #discovery-detail { color: var(--muted); margin-top: 2px; }
.desktop-app .discovery-status[data-state="stale"] #discovery-summary { color: var(--gold); }
.desktop-app .connection-error { margin: 0; padding: 10px 18px; background: #38251f; border-bottom: 1px solid #694439; color: var(--error); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; flex-shrink: 0; }
.desktop-app .new-events { display: block; width: 100%; flex-shrink: 0; padding: 10px 16px; border-bottom: 1px solid #457255; background: #214b31; color: var(--accent); font-size: 14px; font-weight: 650; }
.desktop-app .new-events:hover { background: #2c5c3d; }

.desktop-app .feed { flex: 1; min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #435b4c transparent; overscroll-behavior: contain; scroll-padding: 6px; }
.desktop-app .feed:focus-visible { outline-offset: -3px; }
.desktop-app .feed-empty, .desktop-app .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 230px; height: 100%; padding: 34px 24px; text-align: center; color: var(--muted); }
.desktop-app .feed-empty > .icon, .desktop-app .empty-state > .icon { width: 29px; height: 29px; color: var(--accent); margin-bottom: 18px; }
.desktop-app .feed-empty h2, .desktop-app .empty-state h2, .desktop-app .feed-empty strong, .desktop-app .empty-state strong { color: var(--text); font-size: 18px; font-weight: 600; line-height: 1.5; }
.desktop-app .feed-empty p, .desktop-app .empty-state p { margin-top: 8px; max-width: 310px; font-size: 14px; line-height: 1.8; }
.desktop-app .empty-orbit { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 17px; border: 1px solid #4e6c58; border-radius: 50%; background: #193323; color: var(--accent); font: 38px/1 var(--font); }
.desktop-app .empty-action { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin-top: 20px; padding: 8px 14px; border: 1px solid #4c6d57; border-radius: 5px; color: var(--accent); font-size: 14px; font-weight: 600; }
.desktop-app .empty-action:hover { background: var(--soft); border-color: #85af93; }
.desktop-app .signal-row { position: relative; display: block; width: 100%; padding: 14px 18px 14px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: background .2s ease; }
.desktop-app .signal-row::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: transparent; }
.desktop-app .signal-row:hover { background: #1e2d24; }
.desktop-app .signal-row:focus-visible { outline-offset: -3px; }
.desktop-app .signal-row.hot, .desktop-app .signal-row.signal, .desktop-app .signal-row.qualified { background: #173323; }
.desktop-app .signal-row.qualified:hover { background: #1c402b; }
.desktop-app .signal-row.hot::before, .desktop-app .signal-row.signal::before, .desktop-app .signal-row.qualified::before, .desktop-app .signal-row.unread::before { background: var(--accent); }
.desktop-app .signal-row.fresh { background: var(--fresh); }
.desktop-app .signal-row.fresh::before { width: 4px; background: var(--accent); }
.desktop-app .signal-row.fresh:hover { background: #2d5b40; }
.desktop-app .signal-row.selected { box-shadow: inset 0 0 0 1px #70a384; }
.desktop-app .row-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 9px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.desktop-app .stage-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-weight: 650; }
.desktop-app .stage-badge.watching, .desktop-app .stage-badge.quiet, .desktop-app .stage-badge.history { color: var(--muted); }
.desktop-app .stage-badge.error, .desktop-app .stage-badge.incomplete { color: var(--gold); }
.desktop-app .unread-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 3px; background: var(--accent); color: #153422; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.desktop-app .event-time { margin-left: auto; color: var(--muted); font: 12px/1.6 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.desktop-app .row-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.desktop-app .avatar { display: grid; place-items: center; width: 37px; height: 37px; flex-shrink: 0; border: 1px solid #42594a; border-radius: 9px; background: var(--chrome); color: #d2e5d7; font: 650 16px var(--font); overflow: hidden; }
.desktop-app .avatar img { width: 100%; height: 100%; object-fit: cover; }
.desktop-app .identity { flex: 1; min-width: 0; }
.desktop-app .token-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -.4px; }
.desktop-app .token-symbol { display: block; margin-top: 3px; color: var(--muted); font: 13px/1.6 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-app .valuation { flex-shrink: 0; max-width: 106px; color: var(--text); text-align: right; font: 650 18px/1.35 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.25px; overflow-wrap: anywhere; }
.desktop-app .valuation > strong { display: block; font-weight: 650; }
.desktop-app .valuation small, .desktop-app .valuation .label, .desktop-app .valuation > span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.55; letter-spacing: 0; white-space: nowrap; }
.desktop-app .row-metrics { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr) minmax(0,1fr); align-items: start; gap: 10px; margin: 13px 0 11px; color: var(--muted); font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.desktop-app .metric { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.desktop-app .metric > strong { display: block; min-height: 24px; max-width: 100%; color: var(--text); font-size: 17px; font-weight: 650; line-height: 24px; overflow-wrap: anywhere; }
.desktop-app .metric > span { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.desktop-app .rhythm { display: inline-flex; align-items: flex-end; gap: 2px; width: 100%; height: 24px; max-width: 104px; flex-shrink: 0; }
.desktop-app .bar { display: inline-block; width: 5px; min-width: 1px; max-width: 7px; height: 4px; flex: 1 1 5px; border-radius: 1px; background: #46594c; }
.desktop-app .bar.active { height: 14px; background: #8ccd9f; }
.desktop-app .bar.active:last-child { background: var(--accent); }
.desktop-app .observation .bar.active { background: #718d7a; }
.desktop-app .observation .valuation { color: #d3ded6; }
.desktop-app .rhythm.incomplete .bar, .desktop-app .rhythm.missing .bar, .desktop-app .rhythm .bar.missing { min-height: 12px; background: transparent; border: 1px dashed #8fa798; }
.desktop-app .row-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.desktop-app .platform-badge { margin-left:auto;color:var(--dim);font-size:10px;line-height:1.4;white-space:nowrap; }
.desktop-app .wallet-age { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.desktop-app .wallet-age.established { padding: 2px 6px; border: 1px solid #8e7140; border-radius: 4px; background: var(--gold-bg); color: var(--gold); font-weight: 600; }
.desktop-app .token-link { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.desktop-app .token-link:hover { color: var(--accent); }
.desktop-app .token-link .icon { width: 13px; height: 13px; }

.desktop-app .pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 51px; flex-shrink: 0; border-top: 1px solid var(--line); padding: 7px 14px 7px 18px; background: var(--bg); }
.desktop-app .page-label { color: var(--muted); font: 13px/1.6 var(--mono); font-variant-numeric: tabular-nums; }
.desktop-app .page-actions { display: flex; gap: 6px; flex-shrink: 0; }
.desktop-app .page-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #35493c; border-radius: 5px; background: var(--surface); color: var(--text); }
.desktop-app .page-button:hover:not(:disabled) { background: var(--soft); color: var(--accent); }
.desktop-app .previous { transform: rotate(180deg); }
.desktop-app .soundbar { min-width: 0; margin-bottom: 12px; }
.desktop-app .sound-controls { display: flex; align-items: center; gap: 10px; }
.desktop-app .sound-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 8px 12px; flex-shrink: 0; border: 1px solid #49634f; border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.desktop-app .sound-toggle[aria-pressed="true"] { color: var(--accent); }
.desktop-app .volume-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; color: var(--muted); font-size: 15px; }
.desktop-app #sound-volume { display: block; width: 100%; min-width: 0; height: 40px; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.desktop-app #volume-value { min-width: 41px; flex-shrink: 0; color: var(--text); text-align: right; font: 16px var(--mono); font-variant-numeric: tabular-nums; }
.desktop-app .preview-button { min-height: 44px; min-width: 60px; margin-left: auto; flex-shrink: 0; padding: 8px 12px; border: 1px solid #49634f; border-radius: 5px; color: var(--accent); font-size: 15px; font-weight: 600; }
.desktop-app .sound-toggle:hover:not(:disabled), .desktop-app .preview-button:hover:not(:disabled) { background: var(--soft); }
.desktop-app .footer-meta { display: flex; align-items: flex-start; gap: 6px 12px; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.desktop-app #sound-status { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }
.desktop-app #sound-status[data-state="live"] { color: var(--accent); }
.desktop-app #full-dashboard { display: inline-flex; align-items: center; gap: 3px; min-height: 34px; flex-shrink: 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
.desktop-app #full-dashboard .icon { width: 13px; height: 13px; }
.desktop-app .monitor-details { margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.desktop-app .monitor-details summary { min-height: 40px; padding: 8px 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.desktop-app .monitor-details summary:hover { color: var(--text); }
.desktop-app .monitor-details .feed-context { align-items: flex-start; flex-direction: column; gap: 6px; padding: 10px 0; background: transparent; font-size: 14px; }
.desktop-app .monitor-details .discovery-status { padding: 0 0 3px; border-bottom: 0; }

.desktop-app .desktop-dialog { width: min(560px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 1px solid #526b5a; border-radius: 10px; background: var(--bg); color: var(--text); box-shadow: 0 22px 70px #0008; overflow: hidden; }
.desktop-app .desktop-dialog::backdrop { background: #030b07b8; backdrop-filter: blur(3px); }
.desktop-app .desktop-dialog[open] { animation: sheet-in .18s ease; }
.desktop-app .desktop-dialog form, .desktop-app .detail-sheet { display: flex; flex-direction: column; max-height: calc(100vh - 26px); max-height: calc(100dvh - 26px); min-height: 0; }
.desktop-app .dialog-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.desktop-app .eyebrow { margin-bottom: 4px; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.desktop-app .dialog-heading h2 { font-size: 23px; font-weight: 650; line-height: 1.4; letter-spacing: -.4px; }
.desktop-app .dialog-body { min-height: 0; padding: 20px 18px 22px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #486350 transparent; }
.desktop-app .setting-section { padding-bottom: 21px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.desktop-app .setting-section h3 { margin-bottom: 12px; font-size: 17px; font-weight: 650; }
.desktop-app .profile-actions { display:flex; gap:8px; margin-top:10px; }
.desktop-app .form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.desktop-app #sound-choice { display: block; width: 100%; height: 46px; margin-top: 7px; padding: 8px 10px; border: 1px solid #49634f; border-radius: 5px; background: var(--surface); color: var(--text); font-size: 16px; }
.desktop-app .field-note { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.desktop-app .settings-intro { margin-bottom: 21px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.desktop-app fieldset { min-width: 0; margin: 0 0 23px; padding: 0; border: 0; }
.desktop-app legend { margin: 0 0 12px; padding: 0; color: var(--text); font-size: 16px; font-weight: 650; }
.desktop-app .field-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.desktop-app .input-unit { display: flex; align-items: center; height: 44px; border: 1px solid #425a49; border-radius: 5px; background: var(--surface); }
.desktop-app .input-unit:focus-within { border-color: var(--accent); }
.desktop-app .input-unit input { width: 100%; min-width: 0; height: 42px; padding: 7px 9px; border: 0; background: transparent; color: var(--text); font: 16px var(--mono); }
.desktop-app .input-unit input:focus-visible { outline-offset: -3px; }
.desktop-app .input-unit > span { margin-right: 9px; flex-shrink: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.desktop-app .full-field + .field-note { margin-bottom: 14px; }
.desktop-app .checkbox-field { display: flex; align-items: flex-start; gap: 9px; margin-top: 17px; color: var(--text); font-size: 15px; line-height: 1.6; cursor: pointer; }
.desktop-app .checkbox-field input { width: 18px; height: 18px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.desktop-app .filter-setting-note { padding: 12px; border-left: 2px solid #739a80; background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1.8; }
.desktop-app .form-error { margin-top: 14px; padding: 10px 12px; background: #38251f; border-left: 2px solid var(--error); color: var(--error); font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.desktop-app .dialog-footer { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.desktop-app .primary-button, .desktop-app .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 18px; border: 1px solid #49634f; border-radius: 5px; font-size: 15px; font-weight: 650; }
.desktop-app .primary-button { background: var(--accent); border-color: var(--accent); color: #123322; }
.desktop-app .primary-button:hover:not(:disabled) { background: #d0f9df; }
.desktop-app .secondary-button { color: var(--muted); }
.desktop-app .secondary-button:hover:not(:disabled) { background: #253a2c; color: var(--text); }

.desktop-app #detail-content { line-height: 1.75; }
.desktop-app #detail-content h2, .desktop-app #detail-content h3 { overflow-wrap: anywhere; color: var(--text); font-size: 20px; line-height: 1.4; }
.desktop-app #detail-content .token-name { font-size: 23px; white-space: normal; overflow-wrap: anywhere; }
.desktop-app #detail-content .avatar { width: 46px; height: 46px; font-size: 20px; }
.desktop-app #detail-content p { margin: 12px 0; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.desktop-app #detail-content code, .desktop-app #detail-content .detail-address { display: block; padding: 11px 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font: 14px/1.8 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.desktop-app #detail-content dl, .desktop-app .detail-metrics { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px 16px; margin: 18px 0; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.desktop-app #detail-content dl > div { min-width: 0; }
.desktop-app #detail-content dt, .desktop-app .detail-metrics small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 13px; }
.desktop-app #detail-content dd, .desktop-app .detail-metrics strong { color: var(--text); font: 600 19px/1.55 var(--mono); overflow-wrap: anywhere; }
.desktop-app #detail-content .detail-note, .desktop-app #detail-content .detail-subtitle { color: var(--muted); font-size: 13px; }
.desktop-app #detail-content .detail-section { margin: 21px 0; }
.desktop-app #detail-content a { overflow-wrap: anywhere; }
.desktop-app #detail-content .detail-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; padding: 10px 14px; min-height: 44px; border: 1px solid #56765f; border-radius: 5px; background: var(--soft); color: var(--accent); font-size: 15px; }
.desktop-app .toast { position: fixed; z-index: 20; left: 50%; bottom: 67px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 36px); padding: 10px 14px; border: 1px solid #6c9378; border-radius: 6px; background: #264933; color: var(--accent); box-shadow: 0 8px 28px #0005; font-size: 14px; line-height: 1.7; text-align: center; overflow-wrap: anywhere; pointer-events: none; }

/* Watched large buys and sells share one feed with direction-specific colors. */
.desktop-app .view-tabs [data-view="sells"][aria-pressed="true"] > span { color: var(--gold); }
.desktop-app .view-tabs [data-view="sells"][aria-pressed="true"]::after { background: var(--gold); }
.desktop-app .view-tabs [data-view="sells"].has-unread::before { content: ""; position: absolute; top: 7px; right: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--sell); box-shadow: 0 0 0 3px var(--bg); }
.desktop-app .sell-row:hover { background: #29251f; }
.desktop-app .sell-row.fresh { background: var(--sell-fresh); }
.desktop-app .sell-row.fresh:hover { background: #52302b; }
.desktop-app .sell-row.unread::before, .desktop-app .sell-row.fresh::before { background: var(--sell); }
.desktop-app .sell-row .stage-badge, .desktop-app .sell-row .token-link { color: var(--sell); }
.desktop-app .sell-row .unread-badge { color: #431b16; background: var(--sell); }
.desktop-app .sell-row .avatar { color: #ffd5ce; background: #3c2925; border-color: #664038; }
.desktop-app .sell-row .valuation { max-width: 160px; color: var(--sell); font-size: 21px; }
.desktop-app .sell-row .valuation strong { overflow-wrap: anywhere; }
.desktop-app .sell-row .valuation > span { font: 12px/1.6 var(--font); }
.desktop-app .sell-addresses { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; font-size: 13px; line-height: 1.6; }
.desktop-app .sell-addresses > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; gap: 8px; }
.desktop-app .sell-addresses .address-label, .desktop-app .sell-note { color: var(--muted); }
.desktop-app .sell-addresses a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6c5bf; font: 13px/1.7 var(--mono); }
.desktop-app .sell-addresses a:not([href]) { cursor: default; text-decoration: none; }
.desktop-app .sell-row .row-bottom { margin-top: 10px; }
.desktop-app #detail-content .detail-sell-amount { color: var(--sell); font: 650 29px/1.5 var(--mono); }
.desktop-app .sell-row[data-side="buy"]:hover { background: #1e3026; }
.desktop-app .sell-row[data-side="buy"].fresh { background: var(--fresh); }
.desktop-app .sell-row[data-side="buy"].fresh:hover { background: #2d5b40; }
.desktop-app .sell-row[data-side="buy"].unread::before, .desktop-app .sell-row[data-side="buy"].fresh::before { background: var(--accent); }
.desktop-app .sell-row[data-side="buy"] .stage-badge, .desktop-app .sell-row[data-side="buy"] .valuation { color: var(--accent); }
.desktop-app .sell-row[data-side="buy"] .unread-badge { color: #153422; background: var(--accent); }
.desktop-app .sell-row[data-side="buy"] .avatar { color: var(--accent); background: var(--soft); border-color: #486650; }
.desktop-app #detail-content .detail-sell-amount.buy-amount { color: var(--accent); }
.desktop-app .sell-settings { padding-bottom: 20px; border-bottom: 1px solid var(--line); }

@keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 409px) {
  .desktop-app .signal-row { padding-left: 15px; padding-right: 15px; }
  .desktop-app .view-tabs { padding-left: 14px; padding-right: 14px; gap: 10px; }
  .desktop-app .view-tabs button { gap: 5px; }
  .desktop-app .view-tabs [data-view="sells"] { font-size: 13px; }
  .desktop-app .feed-context { padding-left: 14px; padding-right: 14px; gap: 4px 8px; font-size: 12px; }
  .desktop-app .token-name { font-size: 19px; }
  .desktop-app .row-metrics { gap: 5px 8px; }
  .desktop-app .valuation { max-width: 92px; font-size: 17px; }
  .desktop-app .sound-controls { gap: 8px; }
  .desktop-app .dialog-heading, .desktop-app .dialog-body, .desktop-app .dialog-footer { padding-left: 15px; padding-right: 15px; }
  .desktop-app .field-grid { gap: 10px; }
}
@media (min-width: 600px) {
  .desktop-app .signal-row { padding-left: 24px; padding-right: 24px; }
  .desktop-app .view-tabs { padding-left: 24px; padding-right: 24px; gap: 24px; }
  .desktop-app .view-tabs button { justify-content: flex-start; }
  .desktop-app .row-metrics { gap: 8px 16px; }
}
@media (max-height: 650px) {
  .desktop-app .feed-empty, .desktop-app .empty-state { min-height: 180px; padding-top: 24px; padding-bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-app *, .desktop-app *::before, .desktop-app *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Reserve the scrollbar lane so prices and actions keep their right margin. */
.desktop-app .feed { scrollbar-gutter: stable; }
.desktop-app .token-link { min-height: 34px; padding: 5px 10px; border: 1px solid #729b80; border-radius: 5px; background: #1c3928; color: var(--accent); font-size: 14px; font-weight: 650; text-decoration: none; }
.desktop-app .token-link:hover { background: #2c5039; border-color: var(--accent); }
.desktop-app .sell-row .token-link { color: var(--accent); }
.desktop-app .dev-sell-badge { display: inline-flex; padding: 2px 7px; border: 1px solid #bf6862; border-radius: 4px; color: #ffaba5; background: #43241f; font-size: 14px; font-weight: 700; white-space: nowrap; }
.desktop-app .filter-event { flex: none; margin: 0; padding: 8px 15px; color: var(--gold); border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.desktop-app .filter-event.dev-sell { color: #ffaba5; background: #34231f; }
.desktop-app [hidden] { display: none !important; }

/* Persistent independent contract watch and cross-view attention. */
.desktop-app .view-tabs { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
.desktop-app .watch-toolbar { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 14px;border-bottom:1px solid var(--line); }
.desktop-app .watch-toolbar button { min-height:30px;padding:4px 9px;font-size:13px;white-space:nowrap; }
.desktop-app .watch-toolbar #watch-config { min-width:0;border-color:transparent;background:transparent;color:var(--muted);gap:8px; }
.desktop-app .watch-toolbar #watch-config:hover { color:var(--text);background:var(--surface); }
.desktop-app .watch-toolbar #watch-config .icon { width:15px;height:15px;flex-shrink:0; }
.desktop-app .attention-banner { margin:8px 18px 0;padding:9px 10px;text-align:left;border:1px solid #70562d;border-radius:7px;background:#30291d;color:#ffd38d;font-size:13px; }
.desktop-app .watch-facts { color:var(--muted);font-size:13px;line-height:1.6;overflow-wrap:anywhere; }
.desktop-app .signal-row.watch-row { cursor:default;padding:8px 14px; }
.desktop-app .watch-row .row-bottom { margin-top:6px;gap:6px;flex-wrap:nowrap;min-height:28px; }
.desktop-app .watch-row .secondary-button,.desktop-app .watch-row .token-link { min-height:28px;padding:3px 7px;font-size:12px;line-height:1.5; }
.desktop-app .watch-row .project-link { min-height:28px;padding:3px 7px; }
.desktop-app .watch-row .watch-actions { display:flex;align-items:center;gap:5px;margin-left:auto;flex-shrink:0; }
.desktop-app .watch-state { color:var(--accent);font-size:12px; }
.desktop-app .watch-state.stale { color:#ffd38d; }
.desktop-app .view-tabs [data-view="watch"].has-unread::before { content:"";position:absolute;top:7px;right:1px;width:6px;height:6px;border-radius:50%;background:#ff8189; }
.desktop-app .view-tabs [data-view="sells"].pulse::before { animation:sell-attention .6s ease-in-out 3; }
@keyframes sell-attention { 50% { box-shadow:0 0 0 5px #ffd38d33;transform:scale(1.35); } }
@media(prefers-reduced-motion:reduce){.desktop-app .view-tabs [data-view="sells"].pulse::before{animation:none}}

.desktop-app .view-tabs [data-view="sells"].has-unread::before { background:#ffd38d; }

/* Compact operational rows keep more tokens visible in the radar. */
.desktop-app .sell-row {padding:10px 14px;}
.desktop-app .sell-row .row-top {margin-bottom:6px;}
.desktop-app .sell-row .row-identity {margin-bottom:5px;}
.desktop-app .sell-row .avatar {width:30px;height:30px;font-size:15px;}
.desktop-app .sell-row .token-name {font-size:16px;line-height:1.2;}
.desktop-app .sell-row .sell-addresses {font-size:11px;line-height:1.45;gap:3px;}
.desktop-app .sell-row .valuation strong {font-size:18px;}
.desktop-app .sell-row .row-bottom {margin-top:5px;}
.desktop-app .sell-row .token-link {padding:3px 8px;min-height:28px;font-size:11px;}
.desktop-app .sell-row .sell-note {font-size:10px;}
.desktop-app .quick-buy-actions {display:flex;align-items:center;gap:6px;max-width:100%;}
.desktop-app .quick-buy-actions[hidden] {display:none;}
.desktop-app .quick-buy {border:1px solid #7bd4a1;background:#214b34;color:var(--accent);border-radius:5px;font:600 11px var(--font);padding:5px 9px;white-space:nowrap;min-height:32px;}
.desktop-app .quick-buy:hover {background:#2e6244;}
.desktop-app .quick-buy:disabled {opacity:.6;}
.desktop-app .smart-token {color:#c3ffd8;font-weight:750;}
.desktop-app .smart-near {color:var(--text);font-weight:750;}
.desktop-app .trading-panel {min-height:0;flex:1;overflow:auto;padding:12px 14px;}
.desktop-app .trade-toolbar {display:flex;align-items:center;gap:8px;margin-bottom:8px;}
.desktop-app .trade-account {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:11px var(--mono);}
.desktop-app .trade-toolbar button {padding:3px 7px;min-height:28px;font-size:11px;}
.desktop-app .trade-order-form {padding:12px 0;border-block:1px solid var(--line);margin-top:10px;}
.desktop-app .trade-form-grid {display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end;margin-top:8px;}
.desktop-app .trade-form-grid .primary-button {font-size:13px;min-height:36px;}
.desktop-app .trade-order-form input,.desktop-app .trade-order-form select,.desktop-app .trade-settings-form input,.desktop-app .trade-wallet-dialog input,.desktop-app .trade-wallet-dialog select {width:100%;min-width:0;background:#101a14;color:var(--text);border:1px solid #38543f;border-radius:4px;padding:7px 9px;font-size:12px;}
.desktop-app .trade-order-form .form-field,.desktop-app .trade-settings-form .form-field {font-size:11px;gap:4px;}
.desktop-app .trade-list-title {font-size:12px;font-weight:700;color:var(--muted);padding:12px 0 5px;}
.desktop-app .trade-holding {display:grid;grid-template-columns:1fr auto;gap:1px 10px;padding:7px 0;border-bottom:1px solid var(--line);}
.desktop-app .trade-holding strong {font-size:13px;}
.desktop-app .trade-holding .field-note {grid-column:1;line-height:1.45;}
.desktop-app .trade-holding button {grid-column:2;grid-row:1/3;align-self:center;padding:3px 8px;font-size:11px;min-height:26px;}
.desktop-app .trade-order {padding:8px 0;border-bottom:1px solid var(--line);font-size:11px;}
.desktop-app .trade-order-top {display:flex;justify-content:space-between;gap:8px;}
.desktop-app .trade-order-top strong {font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.desktop-app .trade-buy {color:var(--accent);}.desktop-app .trade-sell {color:var(--sell);}
.desktop-app .trade-order-error {color:#ffc37f;line-height:1.45;}
.desktop-app .trade-order .secondary-button {padding:1px 6px;font-size:10px;min-height:22px;margin-left:8px;}
.desktop-app .trade-web-link {display:inline-block;font-size:12px;margin:14px 0 3px;}
.desktop-app .trading-panel .field-note {font-size:10px;line-height:1.5;}
.desktop-app .trade-wallet-dialog .form-field {margin-bottom:12px;}
.desktop-app .trade-wallet-dialog details {margin:14px 0;}
.desktop-app .trade-wallet-dialog summary {cursor:pointer;color:var(--muted);font-size:13px;line-height:1.5;padding:4px 0;}
.desktop-app .trade-wallet-dialog details[open] summary {margin-bottom:10px;}
.desktop-app .trade-wallet-dialog input:focus-visible,.desktop-app .trade-wallet-dialog select:focus-visible {outline:2px solid var(--accent);outline-offset:2px;}
.desktop-app .trade-position-rule{margin:12px 0;padding:10px 12px;background:#15261d;border-left:2px solid var(--accent);font-size:12px;line-height:1.65;color:#a6c4b2}
.desktop-app .trade-holding{padding:14px 0;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
.desktop-app .trade-holding strong{font-size:15px;overflow-wrap:anywhere}
.desktop-app .trade-position-link{grid-column:2;grid-row:1/3;align-self:center;color:var(--accent);font-size:12px}
.desktop-app .trade-holding:has(.trade-position-sell) .trade-position-link{grid-row:2}
.desktop-app .trade-holding .trade-position-sell{grid-row:1;justify-self:end}
.desktop-app .trade-sell-dialog [data-sell-account],.desktop-app .trade-sell-dialog [data-sell-token]{overflow-wrap:anywhere;font:12px/1.6 var(--mono)}
.desktop-app .trade-position-metrics{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:8px 0 0}
.desktop-app .trade-position-metrics dt{font-size:11px;color:var(--muted);margin-bottom:5px}
.desktop-app .trade-position-metrics dd{font:600 14px/1.4 var(--mono);margin:0;overflow-wrap:anywhere}
.desktop-app .trade-position-basis{grid-column:1/-1;font-size:11px;color:var(--muted);line-height:1.6;margin:5px 0 0}
.desktop-app .trade-position-alert{grid-column:1/-1;font-size:12px;color:#c0e98c;margin:5px 0 0}
.desktop-app .trade-position-empty{padding:32px 12px;text-align:center;color:var(--muted);font-size:13px;line-height:1.7;border-block:1px solid var(--line)}
.desktop-app .trade-history{margin-top:16px;border-top:1px solid var(--line);font-size:12px}
.desktop-app .trade-history summary{cursor:pointer;color:var(--muted);padding:12px 0}
.desktop-app .trading-panel .field-note{font-size:12px;line-height:1.6}
.desktop-app .trade-pending{color:#f0c884}
.desktop-app .smart-history-scope{font-size:11px;color:var(--muted);padding:4px 14px 8px}
.desktop-app .smart-history-scope[hidden]{display:none}.desktop-app .smart-history-scope summary{cursor:pointer}.desktop-app .smart-history-scope p{line-height:1.6;margin:6px 0}
.desktop-app .sound-resume { padding:8px 18px;color:#ffd38d;text-align:left;font-size:12px;border-top:1px solid var(--line); }

.desktop-app .watch-identity { display:flex;align-items:center;gap:9px;min-width:0; }
.desktop-app .watch-identity .avatar { width:32px;height:32px;border-radius:7px;font-size:14px; }
.desktop-app .watch-names { min-width:0;flex:1; }
.desktop-app .watch-names .token-name { font-size:17px;line-height:1.35;letter-spacing:0; }
.desktop-app .watch-contract { font:11px/1.5 var(--mono);color:var(--muted);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.desktop-app .watch-facts { display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0;margin:0;line-height:1.4;font-size:11px;color:var(--muted); }
.desktop-app .watch-value { font:650 17px/1.4 var(--mono);color:var(--text); }
.desktop-app .watch-drawdowns { display:flex;align-items:center;gap:14px;margin-top:7px;min-height:23px; }
.desktop-app .watch-drawdowns > div { display:flex;align-items:baseline;gap:5px;color:var(--muted);font-size:12px;white-space:nowrap; }
.desktop-app .watch-drawdowns strong { color:var(--text);font:600 15px var(--mono); }
.desktop-app .watch-drawdowns .watch-state { margin-left:auto;white-space:nowrap; }
.desktop-app .watch-row > p { margin:4px 0;line-height:1.5;overflow-wrap:anywhere; }
.desktop-app #watch-dialog { width:min(360px,calc(100vw - 24px)); }
.desktop-app #watch-dialog .dialog-heading { padding:10px 13px;gap:8px; }
.desktop-app #watch-dialog .dialog-heading h2 { font-size:18px; }
.desktop-app #watch-dialog .dialog-body { padding:12px 13px; }
.desktop-app #watch-dialog .dialog-footer { padding:9px 13px; }
.desktop-app #watch-dialog .primary-button,.desktop-app #watch-dialog .secondary-button { min-height:32px;padding:5px 10px;font-size:13px; }
.desktop-app #watch-config-fields { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px; }
.desktop-app #watch-dialog .form-field { font-size:13px;gap:5px; }
.desktop-app #watch-dialog input { width:100%;min-width:0;height:36px;padding:6px 8px;border:1px solid #425a49;border-radius:5px;background:var(--surface);color:var(--text);font:15px var(--mono); }
.desktop-app #watch-dialog .field-note { margin-top:9px;font-size:12px;line-height:1.5; }

/* Timed contract alerts float above every tab and dialog without taking focus. */
.desktop-app .crash-popup { position:fixed;inset:64px 10px auto;z-index:50;width:calc(100% - 20px);max-height:calc(100dvh - 84px);margin:0;padding:0;border:0;background:transparent;color:var(--text);overflow:auto;overscroll-behavior:contain;display:grid;gap:8px;pointer-events:none; }
.desktop-app .crash-popup::backdrop { background:transparent;pointer-events:none; }
.desktop-app .crash-popup-card { padding:10px 12px;border:1px solid #cc6570;border-radius:8px;background:linear-gradient(135deg,#512a33,#342127);box-shadow:0 8px 28px #0008;pointer-events:auto;animation:sheet-in .16s ease-out; }
.desktop-app .crash-popup-heading { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.desktop-app .crash-popup-name { min-width:0;font-size:15px;line-height:1.4;overflow-wrap:anywhere; }
.desktop-app .crash-popup-drop { color:#ffb0b9;font:700 24px/1.35 var(--mono);white-space:nowrap;flex-shrink:0; }
.desktop-app .crash-popup-facts { margin-top:3px;color:#eac6cb;font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
.desktop-app .crash-popup-bottom { display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:7px;flex-wrap:wrap; }
.desktop-app .crash-popup-countdown { color:#ffced3;font-size:11px;line-height:1.5; }
.desktop-app .crash-popup .token-link { min-height:28px;padding:3px 8px;border-color:#a9656e;background:#542e36;color:#ffe4e7;font-size:12px; }
.desktop-app .crash-popup .token-link:hover { background:#683a45;border-color:#ffd0d6; }

/* Transaction progress stays available until explicitly dismissed. */
.desktop-app .desktop-trade-notice{position:fixed;inset:auto 10px 10px;z-index:65;padding:11px 13px;border:1px solid #42604e;border-left:3px solid #68d6a1;border-radius:7px;background:#18251e;box-shadow:0 10px 34px #0007;color:var(--text);max-height:45dvh;overflow:auto}
.desktop-app .desktop-trade-notice[hidden]{display:none}.desktop-app .desktop-trade-notice-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.desktop-app .desktop-trade-notice-heading strong{font-size:13px}.desktop-app .desktop-trade-notice-heading button{min-height:22px;padding:1px 6px;font-size:16px}.desktop-app .desktop-trade-notice p{font-size:11px;line-height:1.55;margin:7px 0;overflow-wrap:anywhere}.desktop-app .desktop-trade-notice a{font:11px/1.4 var(--mono);color:#9ae5bd;overflow-wrap:anywhere}.desktop-app .desktop-trade-notice[data-status=error]{border-left-color:#ec8991}.desktop-app .desktop-trade-notice[data-status=review]{border-left-color:#e4ba74}.desktop-app .desktop-trade-notice[data-status=success] strong{color:#8ce4b3}
.desktop-app .desktop-trade-success-line{display:flex;align-items:center;gap:8px;min-width:0;flex:1;font-size:12px;white-space:nowrap}.desktop-app .desktop-trade-success-line[hidden]{display:none}.desktop-app .desktop-trade-success-name{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:700}.desktop-app .desktop-trade-success-duration,.desktop-app .desktop-trade-success-line strong,.desktop-app .desktop-trade-notice-heading button{flex-shrink:0}.desktop-app .desktop-trade-notice[data-status=success] a{display:block;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .desktop-app .trade-stage-timings summary{cursor:pointer;color:var(--muted);font-size:11px}.desktop-app .trade-stage-timings p{margin:6px 0}
