/* Orlet — clear control groups and distinct reading surfaces. */
:root {
  --sidebar-width: 228px;
  --topbar-height: 68px;
  --canvas: #f4f6f8;
  --surface: #fff;
  --paper: #fdfdfb;
  --sidebar: #eef2f5;
  --ink: #24323d;
  --ink-strong: #1f2e39;
  --ink-body: #3c4852;
  --muted: #65717c;
  --subtle: #737e87;
  --line: #d7e0e8;
  --accent: #315d80;
  --accent-soft: #e5eef6;
  --radius: 6px;
}
html { background: var(--canvas); color: var(--ink); scroll-padding-top: calc(var(--topbar-height) + 120px) }
body { background: var(--canvas); color: var(--ink-body) }
body [hidden] { display: none !important }
body :is(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px }

/* Navigation stays familiar; its contrast recedes behind the articles. */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; isolation: isolate; height: 68px; min-height: 68px; padding: 0 24px; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: none }
.topbar::before { content: ""; position: absolute; inset: 0 auto -1px 0; z-index: -1; width: var(--sidebar-width); background: var(--sidebar); border-right: 1px solid var(--line) }
.brand { display: flex; flex: 0 0 180px; width: auto; padding: 0; gap: 10px; font-size: 26px; font-weight: 600; letter-spacing: -.055em; color: var(--ink) }
.brand img { width: 28px; height: 28px; border-radius: 0 }
.breadcrumbs { display: none }
.top-actions { display: flex; align-items: center; flex: 1; min-width: 0; gap: 24px; margin: 0; padding-left: 24px }
.workspace-search { display: flex; align-items: center; width: min(420px, 44vw); min-width: 180px; max-width: 420px; height: 44px; padding: 0 16px; gap: 10px; background: #f5f7f9; border: 1px solid #e2e8ee; border-radius: 14px }
.workspace-search:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px #315d8014 }
.workspace-search input { font-size: 14px; color: var(--ink) }
.workspace-search .button-icon { color: var(--muted) }
.workspace-search-field { display: flex; flex: 1; align-items: center; min-width: 0; height: 100%; gap: inherit; }
.workspace-search-field > .button-icon { flex: none; }
#search-clear { display: none; }
.search-shortcut { border-color: var(--line); border-radius: 3px; color: var(--subtle); background: transparent }
.connection-control { position: relative; margin-left: auto; min-height: 44px; padding: 8px 12px; gap: 8px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-size: 12px }
.connection-control .button-icon { display: block; width: 18px; height: 18px; color: var(--muted) }
.connection-control:hover, .mobile-nav-toggle:hover { background: #eef3f7 }
.mobile-nav-toggle { display: none }
.sidebar, .monitor-mode .sidebar { display: flex; position: fixed; inset: var(--topbar-height) auto 0 0; width: var(--sidebar-width); padding: 24px 14px 16px; background: var(--sidebar); border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; color: var(--ink) }
.sidebar-heading { display: none }
.sidebar-scroll { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; padding: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c5cdd3 transparent }
.reading-nav { flex-shrink: 0; padding: 0; border: 0 }
.nav-item { min-height: 46px; height: auto; margin: 4px 0; padding: 11px 14px; gap: 12px; border: 0; border-radius: 999px; color: #526474; font-size: 14px; font-weight: 500; background: transparent }
.nav-item:hover { color: var(--ink); background: #e7ecef }
.nav-item.active { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: none; font-weight: 600 }
.nav-item.active .nav-icon { color: inherit }
.nav-count, .nav-item .nav-count { color: var(--muted); font-size: 11px; background: transparent }
.nav-item.active .nav-count { color: #e1ebf3 }
.manage-nav { flex-shrink: 0; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); background: var(--sidebar) }
.manage-nav .nav-item { min-height: 44px; font-size: 13px; text-decoration: none }
.reading-nav .sidebar-model-link { text-decoration: none }
.shell, .reading-mode .shell { margin-left: var(--sidebar-width); padding-top: var(--topbar-height); min-width: 0 }
main, .monitor-mode main { width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px 40px 64px }

/* An index rail leads; platform and date remain supporting controls. */
.workspace-heading { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px }
.content-controls { position: static; display: flex; padding: 0; margin: 0; background: transparent }
.content-tabs { display: flex; align-items: stretch; flex-wrap: nowrap; width: 100%; max-width: 400px; padding: 0; gap: 4px; border: 0; border-bottom: 1px solid #cbd6df; border-radius: 0; background: transparent }
.content-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; gap: 8px; min-width: 0; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 9px 9px 0 0; color: #75818c; font-size: 22px; font-weight: 500; background: transparent; line-height: 1.5; white-space: nowrap }
.content-tab.active, .content-tab[aria-pressed="true"] { color: #fff; background: #263b4b; box-shadow: none; font-weight: 650 }
.content-tab:hover:not(.active) { color: var(--ink); background: #e8eef3 }
.content-tab.active::after { content: none }
.content-tab .button-icon { width: 19px; height: 19px; stroke-width: 1.5 }
.content-tab .period-count { font-size: 12px; padding: 0; margin: 0; color: inherit; background: transparent }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 }
.page-title h1, #page-heading { font-size: 28px; font-weight: 500; line-height: 1.45; color: var(--ink-strong); letter-spacing: -.025em }
.page-subtitle { display: none }
.filter-toolbar { position: relative; z-index: 30; display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 24px; margin: 0 0 4px; padding: 0; border: 0; background: transparent }
.filter-toolbar:not(:has(> :not([hidden]))) { display: none }
.filter-toolbar:has(#date-menu:not([hidden])) { z-index: 60 }
.workspace-platforms, .monitor-mode .workspace-platforms { display: flex; align-items: center; flex: 0 1 auto; width: auto; min-width: 0; flex-wrap: nowrap; margin: 0; padding: 0; gap: 0; border: 0; background: transparent }
.workspace-platforms .platform-nav { position: relative; min-height: 44px; height: auto; min-width: 0; flex: 0 1 auto; padding: 8px 12px; border: 0; border-radius: 0; background: transparent; font-size: 14px; font-weight: 500; color: #76828d; white-space: nowrap }
.workspace-platforms .platform-nav:first-child { padding-left: 2px; margin: 0 4px 0 0 }
.workspace-platforms .platform-nav.active { background: transparent; border: 0; color: #263b4b; box-shadow: none; font-weight: 650 }
.workspace-platforms .platform-nav.active::after { content: ""; position: absolute; inset: auto 12px 4px; height: 2px; background: #315d80 }
.workspace-platforms .platform-nav:first-child.active::after { left: 2px }
.workspace-platforms .platform-nav:hover:not(.active) { background: transparent; color: var(--accent); border-color: transparent }
.workspace-platforms .nav-count { color: inherit }
#feed-filters { display: block; position: relative; flex: 0 0 auto; min-width: 0; width: auto; align-self: auto; padding: 0; margin: 0; border: 0 }
#date-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 110px; padding: 8px 12px; border: 1px solid #d4dfe7; border-radius: 10px; background: #fff; color: #315d80; font-size: 13px; font-weight: 500; white-space: nowrap }
#date-toggle .button-icon { width: 17px; height: 17px }
#date-toggle .date-chevron { width: 11px; height: 11px; transform: rotate(90deg); color: #8195a3 }
#date-toggle[aria-expanded="true"] { border-color: #8daabe; box-shadow: 0 0 0 3px #315d800d }
#date-toggle[aria-expanded="true"] .date-chevron { transform: rotate(-90deg) }
#date-menu { position: absolute; inset: calc(100% + 8px) 0 auto auto; z-index: 40; width: 360px; max-width: calc(100vw - 24px); padding: 16px; border: 1px solid #d5dee4; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px #24323d24; overflow-y: auto; overscroll-behavior: contain }
.date-menu-caption { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.6 }
.period-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; min-width: 0; gap: 6px; padding: 0; border: 0; border-radius: 0; background: transparent }
.period-tab { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 44px; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; background: #f2f5f8; color: #536779; font-size: 13px; font-weight: 500; line-height: 1.5; white-space: normal }
.period-tab.active { color: #274e6e; background: #e5eef6; border-color: #b5cadb; box-shadow: none; font-weight: 600 }
.period-tab:hover { color: var(--accent); background: #eaf0f5 }
.period-tab .button-icon { width: 14px; height: 14px }
.period-count { margin: 0; padding: 0 2px; color: inherit; font-size: 11px; background: transparent; border-radius: 0 }
#range-tab { flex-wrap: wrap; align-content: center }
#range-label { padding: 0; margin: 0; flex-basis: 100%; color: inherit; background: transparent; font-size: 11px }
#range-label:empty { display: none }
#range-tab[aria-expanded="true"] { color: var(--accent); border-color: #b5cadb; background: #e5eef6; box-shadow: none }


/* A real floating surface is reserved for a temporary task. */
#range-panel { position: static; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; max-width: none; padding: 14px 0 0; margin: 14px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; overflow: visible }
.range-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.range-panel-heading strong { font-size: 16px; font-weight: 500; color: var(--ink) }
#range-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 23px; line-height: 1 }
.range-presets { display: flex; gap: 8px; flex-wrap: wrap }
.range-preset { min-height: 36px; padding: 6px 12px; border: 1px solid #dce3e8; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 400 }
.range-preset:hover { color: var(--accent); background: var(--accent-soft); border-color: #b6c8d5 }
.range-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end }
.range-field { display: flex; flex-direction: column; gap: 7px; min-width: 0 }
.range-field span { font-size: 13px; color: var(--muted) }
.range-field input[type="date"] { display: block; width: 100%; min-width: 0; max-width: 100%; height: 44px; padding: 0 8px; border: 1px solid #ccd6de; border-radius: 5px; color: var(--ink); background: #fff; font-size: 14px; font-family: var(--type-ui); font-variant-numeric: tabular-nums }
.range-dash { padding-bottom: 10px; color: var(--muted) }
.range-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px }
.range-actions .primary, .range-actions .secondary { min-height: 38px; padding: 7px 18px; font-size: 13px }

/* Articles are a reading sequence. Each item's information stays together. */
.feed-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 0 0 10px; padding: 0; border: 0; color: var(--muted); font-size: 13px }
#feed-count { font-size: 12px; color: var(--muted); letter-spacing: .02em }
.feed-meta #read-all { display: inline-flex; align-items: center; min-height: 36px; height: auto; padding: 6px 12px; margin-left: auto; width: auto; max-width: 100%; border: 0; border-radius: 999px; color: #506a7e; background: transparent; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: normal }
.feed-meta #read-all::before { content: "✓"; margin-right: 6px; color: var(--muted) }
.feed-meta #read-all:hover:not(:disabled) { color: var(--accent) }
.feed-meta .timezone-label, .group-heading { display: none }
.articles:not(:empty) { display: block; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none }
.feed-group, .feed-group+.feed-group { margin: 0; padding: 0 }
.group-articles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0 }
.article, .article.wechat-card, .article.xhs-card { margin: 0; padding: 20px 24px 18px; min-width: 0; border: 1px solid #e0e6ec; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px #243b5005; overflow: visible; transition: border-color .15s ease, box-shadow .15s ease }
.article.is-read, .article.wechat-card.is-read { opacity: 1; background: #fff }
.article:hover, .article.wechat-card:hover { transform: none; border-color: #bdcbd7; background: #fff; box-shadow: 0 4px 12px #29445c09 }
.wx-head { position: relative; display: flex; align-items: center; gap: 9px; margin: 0; min-height: 28px; padding-right: 14px }
.wx-avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 50%; background-color: #e9eef1 }
.wx-avatar .avatar-letter { font-size: 12px; font-weight: 400; color: #617b8d }
.wx-byline { align-items: center; gap: 10px; min-width: 0; flex-wrap: nowrap }
.wx-name, .article-author { color: #586a77; font-size: 13px; font-weight: 400; line-height: 1.5 }
.wx-tag { font-size: 11px; color: var(--subtle); background: transparent; border: 0; padding: 0; border-radius: 0; line-height: 1.4 }
.wx-time, .article-time { font-family: var(--type-ui); font-size: 12px; color: var(--muted); line-height: 1.5; white-space: nowrap }
.unread-dot { width: 5px; height: 5px; min-width: 5px; background: var(--accent); box-shadow: none }
.wx-head .unread-dot { position: absolute; right: 0; margin-left: 0 }
.article h2, .article .article-title, .article .wx-title { font-size: 22px; font-weight: 600; color: var(--ink-strong); line-height: 1.5; letter-spacing: -.02em; text-wrap: pretty }
.article .wx-title { margin: 10px 0 6px; -webkit-line-clamp: 3 }
.wx-title .article-title { display: block; width: 100%; text-align: left; padding: 0; font: inherit; color: inherit; cursor: pointer }
.wx-title .article-title:hover, .wx-title a:hover { color: var(--accent) }
.wx-foot, .article-links, .wx-actions { display: flex; align-items: center; flex-wrap: wrap }
.wx-foot { justify-content: flex-start; gap: 8px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid #e6ecf1 }
.article-links { gap: 16px }
.wx-actions { gap: 8px; margin-left: 0; opacity: 1; transform: none }
.article-links button, .article-links a, .wx-actions button, .xhs-actions button, .article-actions button, .article-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 13px; border: 0; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.5; color: #526a7c; background: #f0f3f6 }
.article-links .analysis-open { padding: 6px 13px; background: #f0f3f6; color: #526a7c }
.article-links .analysis-open::before, .document-open::after { content: none }
.article-links .document-open, .wx-actions button.is-starred, .xhs-actions .is-starred, .article-actions .is-starred { color: var(--accent); background: transparent }
.wx-actions button:hover, .xhs-actions button:hover, .article-links :is(a,button):hover { color: #244e70; background: #dce8f1; text-decoration: none }
.article-actions { gap: 20px; border-color: var(--line) }
.article.xhs-card .xhs-title { font-size: 20px; font-weight: 500; line-height: 1.6 }
.xhs-cover { border-radius: 6px }
.content-state { color: var(--muted); font-size: 12px; line-height: 1.7 }
.updates-notice { margin: 12px 0 0; color: var(--accent); background: var(--accent-soft); border-color: #d2e0e9; border-radius: 5px; box-shadow: none }
.updates-notice button { color: var(--accent) }

/* Source identity sits beside the headline; actions keep their own touch row. */
.article.wechat-card { display: grid; grid-template-columns: minmax(0, 1fr) 148px; align-items: start; gap: 10px 24px; padding-block: 16px 14px }
.wechat-card .wx-title { grid-column: 1; grid-row: 1; align-self: center; margin: 0 }
.wechat-card .wx-head { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 4px 8px; min-width: 0; min-height: 0; padding: 0; margin: 0 }
.wechat-card .wx-avatar { grid-column: 1; grid-row: 1; width: 26px; height: 26px; min-width: 26px }
.wechat-card .wx-byline { grid-column: 2; grid-row: 1; display: block; min-width: 0 }
.wechat-card .wx-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; white-space: normal; max-width: none; font-size: 12px; line-height: 1.5 }
.wechat-card .wx-tag { display: none }
.wechat-card .wx-time { grid-column: 1 / -1; grid-row: 2; margin: 0; padding-right: 11px; font-size: 12px; line-height: 1.5; text-align: right; white-space: normal; overflow-wrap: anywhere }
.wechat-card .wx-head .unread-dot { top: auto; bottom: 6px; right: 0 }
.wechat-card .wx-foot { grid-column: 1 / -1; grid-row: 2; margin: 0; padding-top: 10px }

.article-action-icon { display: none }
.reader-label-mobile { display: none }
.article-read-check { fill: none; stroke: var(--read-check-ink, currentColor) }

/* Shared control language: stable shapes and explicit semantic states. */
.primary { color: #fff; background: var(--accent); border-color: var(--accent); border-radius: 999px; font-size: 13px; font-weight: 500; box-shadow: none }
.primary:hover, .page-title #add-open:hover { background: #2d506c; border-color: #2d506c }
.secondary { background: #fff; color: #526776; border-color: #cbd6de; border-radius: 999px; font-size: 13px }
.text-button { color: var(--muted); font-size: 13px }
.page-title #add-open { min-height: 42px; height: auto; padding: 9px 15px; border-radius: 5px; background: var(--accent); border-color: var(--accent); font-size: 13px; color: #fff; white-space: nowrap }
dialog { border: 1px solid #d6dfe5; border-radius: 10px; padding: 28px; color: var(--ink-body); background: #fff; box-shadow: 0 24px 70px #24323d29 }
dialog::backdrop { background: #2635414d; backdrop-filter: none }
dialog .dialog-title h2 { font-size: 23px; font-weight: 500; letter-spacing: -.02em; color: var(--ink-strong) }
dialog label, dialog p { line-height: 1.75 }
dialog input, dialog select, dialog textarea { border-color: #ccd7df; background: #fff; border-radius: 5px; color: var(--ink) }
dialog .dialog-actions { gap: 10px }
.icon-button { color: var(--muted) }
#setup-dialog, #add-dialog { border-radius: 18px; padding: 26px; width: min(460px, calc(100vw - 32px)) }
#setup-dialog .setup-title { gap: 12px; align-items: center; margin-bottom: 24px }
.setup-symbol { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; color: var(--accent); background: var(--accent-soft) }
.setup-symbol .button-icon { width: 23px; height: 23px }
#setup-dialog .dialog-title h2, #add-dialog .dialog-title h2 { font-size: 23px; font-weight: 600 }
#setup-dialog .setup-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px }
#setup-dialog .setup-title .icon-button { margin-left: auto; align-self: flex-start }
#setup-dialog .icon-button, #add-dialog .icon-button { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0 }
#setup-dialog .settings-group { margin: 0 0 22px }
#setup-dialog .settings-group h3 { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em }
#setup-dialog .platform-runtime { margin: 0; padding: 0 14px; border: 1px solid #e0e7ec; border-radius: 14px; background: #f8fafb }
#setup-dialog .platform-runtime-row { min-height: 52px; padding: 10px 0; border-color: #e3e9ee; font-size: 14px; font-weight: 500 }
#setup-dialog .runtime-state { flex-shrink: 0; color: #43634f; background: #e9f1eb; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 500 }
#setup-dialog .runtime-state.warn { color: #866027; background: #f8efdf }
#setup-dialog .runtime-row { font-size: 14px; font-weight: 600; color: var(--ink) }
#setup-dialog .runtime-row button { min-height: 44px; padding: 8px 14px; font-size: 13px; background: var(--accent-soft); border-color: transparent; color: var(--accent); white-space: nowrap }
#setup-dialog #notification-status, #setup-dialog #extension-reload { margin: 8px 0 0; font-size: 12px; line-height: 1.75; color: var(--muted); text-wrap: wrap }
#setup-dialog .setup-export { display: block; margin: 0 0 18px }
#setup-dialog .setup-export a { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px 14px; border-radius: 14px; background: #f1f5f8; color: var(--accent); text-decoration: none }
#setup-dialog .setup-export a:hover { background: var(--accent-soft) }
#setup-dialog .setup-export a > .button-icon { width: 22px; height: 22px; flex-shrink: 0 }
#setup-dialog .setup-export a > .button-icon:last-child { width: 16px; margin-left: auto; color: #80919e }
#setup-dialog .setup-export strong { display: block; font-size: 14px; font-weight: 600 }
#setup-dialog .setup-export small { display: block; font-size: 12px; margin-top: 4px; color: var(--muted) }
#setup-dialog .setup-advanced { margin: 0 0 10px; border-top: 1px solid var(--line) }
#setup-dialog .setup-advanced > summary { color: var(--muted); font-size: 13px; min-height: 44px; padding-block: 12px; cursor: pointer }
#setup-dialog .setup-section :is(label,p) { color: var(--muted); font-size: 13px }
#setup-dialog .setup-section code { color: var(--muted); background: #f0f3f5; font-size: 12px }
#setup-dialog .dialog-actions { margin: 0; padding: 4px 0 0 }
#setup-dialog .dialog-actions button { min-height: 44px; padding: 8px 24px; border: 0; background: #eef2f5; font-size: 14px }
#add-dialog .segmented { padding: 4px; gap: 4px; border: 0; border-radius: 999px; background: #eaf0f5 }
#add-dialog .segmented-item { min-height: 44px; border-radius: 999px; font-size: 14px; font-weight: 500 }
#add-dialog .segmented-item.active { color: var(--accent); font-weight: 600; box-shadow: 0 1px 4px #29445b12 }
#add-dialog :is(input,select) { min-height: 44px; border-radius: 10px }
#add-dialog :is(.dialog-actions button,.wx-search-form button,.wx-result button) { min-height: 44px; border-radius: 999px; padding-inline: 16px; font-size: 14px }
#add-dialog .wx-search-form { align-items: center; gap: 8px }
#add-dialog .wx-search-form input { min-width: 0 }

.analysis-title, .analysis-coverage, .form-note { color: var(--muted); line-height: 1.75 }
.analysis-dialog .dialog-title { background: #fff }
.segmented { background: #f1f4f6; border-color: #dfe6eb; border-radius: 6px }
.segmented-item.active { background: #fff; color: var(--accent); box-shadow: none }
.empty-state { padding: 64px 24px; border: 0; border-radius: 0; background: transparent; color: var(--muted); text-align: center }
.empty-symbol { background: transparent; color: #8b9da9; border-radius: 0 }
#empty-title { font-size: 17px; color: #526776 }
#empty-description { font-size: 14px; color: var(--muted); line-height: 1.8 }
.load-more { background: transparent; color: var(--accent); border-color: #ccd8e1; border-radius: 5px; font-size: 13px }
#activity-view { border: 0; border-radius: 0; background: transparent }
.event-row { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: 20px 0; color: var(--ink-body); font-size: 14px; line-height: 1.75 }
.event-time { color: var(--muted); font-size: 12px }
.event-row.warn { color: #866027 }
.list-empty { color: var(--muted); font-size: 14px }

/* A saved article is still an article, with the same spacing and title hierarchy. */
.library-toolbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 0; margin: 0; border: 0; background: transparent }
.library-kinds { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 3px; padding: 3px; border: 0; border-radius: 26px; background: #e8edf2 }
.library-kinds button { min-height: 40px; padding: 7px 18px; border: 0; border-radius: 999px; color: #536779; font-size: 14px; font-weight: 500; background: transparent }
.library-kinds button[aria-pressed="true"] { color: #274e6e; background: #fff; box-shadow: 0 1px 4px #29445b1c; font-weight: 600 }
.library-filter-tools { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto }
.library-toolbar select { min-width: 0; max-width: 220px; min-height: 44px; margin: 0; padding-inline: 14px; background: #fff; color: var(--ink); border-color: #d2dde5; border-radius: 999px }
.library-status { color: var(--muted); font-size: 13px; margin: 12px 0 10px }
.library-list { display: grid; gap: 12px }
.library-card { padding: 18px 22px 12px; border: 1px solid #e0e6ec; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px #243b5005 }
.library-entry h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; color: var(--ink-strong); text-wrap: pretty }
.library-entry blockquote { margin: 0 0 12px; padding: 0 0 0 16px; border-left: 2px solid #9ab6ca; border-radius: 0; background: transparent; color: #344c5e; font-size: 20px; font-weight: 400; line-height: 1.75; text-wrap: wrap }
.library-entry:has(blockquote) h2 { font-size: 15px; font-weight: 500; line-height: 1.6; letter-spacing: 0; color: #647787 }
.library-card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 8px 16px; margin-top: 8px; padding: 0; border: 0 }
.library-entry-meta { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0 }
.library-author { max-width: 100%; font-size: 12px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere }
.library-card-foot .library-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; margin-left: auto }
.library-card-foot button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 999px; font-size: 13px; color: #526a7c; background: transparent }
.library-icon { display: block; flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none }
.library-card [data-library-remove][aria-pressed="true"] .library-icon { fill: currentColor }
.library-card [data-library-remove][aria-pressed="true"] { color: var(--accent) }
.library-entry-tags { min-width: 0; max-width: 100%; gap: 6px }
.library-entry-tags span { max-width: 100%; padding: 2px 8px; border-radius: 999px; font-size: 11px; line-height: 1.6; background: #edf2f6; color: #526d80; overflow-wrap: anywhere }
#library-empty { margin-top: 12px; padding: 44px 20px; border: 1px dashed #d3dfe8; border-radius: 14px; background: #fafcfd }
.library-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; color: #6e899d; background: #edf2f6; border-radius: 50% }
.library-empty-icon .library-icon { width: 23px; height: 23px }
#library-empty strong { display: block; color: #41576a; font-size: 17px; font-weight: 600 }
#library-empty p { margin: 8px auto 0; max-width: 28em; font-size: 14px; line-height: 1.8; text-wrap: wrap }
#library-more { display: block; margin: 20px auto 0; min-height: 44px; padding: 8px 24px; border-radius: 999px; font-size: 14px }
#library-tag-dialog, #library-tag-manager { width: min(460px, calc(100vw - 32px)); padding: 24px; border-radius: 16px }
#library-tag-dialog .dialog-title, #library-tag-manager .dialog-title { margin-bottom: 16px; gap: 12px }
#library-tag-dialog .dialog-title h2, #library-tag-manager .dialog-title h2 { font-size: 21px; font-weight: 600 }
.library-dialog-context { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: -4px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; text-wrap: wrap }
.tag-options { gap: 8px; padding: 2px }
.tag-option { max-width: 100%; min-height: 44px; gap: 8px; padding: 8px 12px; margin: 0; color: #536b7c; background: #f3f6f8; border: 1px solid transparent; border-radius: 999px; font-size: 14px; line-height: 1.5 }
.tag-option span { min-width: 0; overflow-wrap: anywhere }
.tag-option input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; flex: 0 0 16px; accent-color: var(--accent) }
.tag-option:has(input:checked) { border-color: #abc5d8; background: var(--accent-soft); color: #284f6d; font-weight: 600 }
.tag-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.library-tag-empty { margin: 4px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.8 }
#library-tag-editor > label, .library-tag-merge label { color: #506778; font-size: 13px; font-weight: 500 }
#library-tag-editor > select { width: 100%; margin: 6px 0 18px }
#library-tag-dialog :is(input:not([type="checkbox"]),select), #library-tag-manager :is(input,select) { min-height: 44px; border-color: #cddae4; border-radius: 9px }
#library-tag-dialog .tag-create, #library-tag-manager .tag-create { margin: 8px 0 0 }
#library-tag-dialog .tag-create { margin-top: 18px }
#library-tag-dialog .tag-create button, #library-tag-manager .tag-create button { min-height: 44px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500 }
#library-tag-rename-save { color: #fff; background: var(--accent); border-color: transparent }
.library-tag-merge { margin-top: 20px; padding-top: 6px; border-top: 1px solid var(--line) }
.library-tag-merge summary { min-height: 44px; padding: 10px 0; color: #536c7e; font-size: 14px; cursor: pointer; }
.library-tag-merge .form-note { margin: 0 0 14px; font-size: 13px; text-wrap: wrap }
#library-tag-dialog .dialog-actions, #library-tag-manager .dialog-actions { gap: 8px; margin-top: 22px; padding-top: 4px }
#library-tag-dialog .dialog-actions button, #library-tag-manager .dialog-actions button { min-height: 44px; padding: 8px 18px; border-radius: 999px; font-size: 14px }
#library-tag-dialog .dialog-actions .secondary, #library-tag-manager .dialog-actions .secondary { border-color: transparent; background: #eef2f5; color: #536778 }
.quote-save { background: var(--accent); color: #fff; box-shadow: 0 6px 20px #2638482b }

.article :is(.wx-actions,.xhs-actions,.article-actions) button[data-star] { padding-inline: 13px; border: 0; border-radius: 999px; color: #2f5b7c; font-weight: 600; background: #e5eef6 }
.article :is(.wx-actions,.xhs-actions,.article-actions) button[data-star].is-starred { color: #fff; background: var(--accent) }
.library-card-foot button[data-library-tags] { color: #526a7c; background: transparent }
.reader-actions #reader-star { padding-inline: 16px; border: 0; border-radius: 999px; color: #fff; background: var(--accent); font-weight: 600 }
.reader-actions #reader-star:hover { color: #fff; background: #2d506c }
.reader-actions #reader-star[aria-pressed="true"] { color: var(--accent); border-color: #b7ccda; background: var(--accent-soft) }

.library-toolbar #library-tags-manage { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; min-height: 44px; padding: 7px 14px; border: 0; border-radius: 999px; color: #496276; background: #e8edf2; white-space: nowrap }
.library-card-foot button:hover, .library-toolbar #library-tags-manage:hover { color: var(--accent); background: var(--accent-soft); border-color: #9db7cc }
.article :is(button,a):active, .reader-toolbar :is(button,a):active { background-color: #dce8f1 }
.library-card:focus-within { border-color: #9db7cc }
.library-entry:hover h2 { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em }
.group-articles + .group-articles, .feed-group + .feed-group { margin-top: 12px }
#activity-view { padding: 0 20px; border: 1px solid #d4dfe8; border-radius: 9px; background: #fff }
.article button[data-read], .reader-actions #reader-read { border: 0; background: transparent; color: #607585; text-decoration: underline; text-decoration-color: #b0c0cc; text-underline-offset: 4px }
.article button[data-read]:hover, .reader-actions #reader-read:hover { background: #edf2f6; color: #315d80; text-decoration-color: currentColor }
.library-card[data-kind="quotes"] [data-library-remove]:hover { color: #9a4e49; background: #f9eeec }
/* Monitoring: scan the directory, then act on one subscription. */
.monitor-browser { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.7fr); align-items: start; gap: 24px }
.monitor-list, .monitor-detail { min-width: 0; background: #fff; border: 1px solid #e0e6ec; border-radius: 16px; box-shadow: 0 2px 8px #243b5005 }
.monitor-list { padding: 12px }
.monitor-list-heading { min-height: 56px; padding: 0 6px 12px; color: var(--muted); font-size: 13px }
.monitor-list-heading strong { font-weight: 600; color: var(--ink) }
.monitor-list-heading select { max-width: 132px; min-height: 44px; padding: 7px 12px; color: #506777; border-color: #dae3ea; background: #f6f8fa; border-radius: 999px; font-size: 13px }
.monitor-items { display: block; max-height: calc(100dvh - 300px); overflow: auto; overscroll-behavior: contain; scrollbar-color: #ccd6dd transparent }
.monitor-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; width: 100%; min-width: 0; min-height: 72px; margin: 0; padding: 12px 10px; gap: 10px; border: 0; border-radius: 10px; color: #42596a; text-align: left }
.monitor-item-copy { min-width: 0 }
.monitor-item strong { display: block; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; font-size: 14px; line-height: 1.5; font-weight: 600; text-wrap: wrap }
.monitor-item-meta { margin-top: 3px; font-size: 11px; line-height: 1.6; color: var(--muted) }
.monitor-item-tail { display: flex; align-items: center; gap: 4px }
.monitor-item-tail .button-icon { display: none; width: 14px; height: 14px; color: #96a5b0 }
.monitor-avatar { width: 36px; height: 36px; min-width: 36px; background: #eef2f5; color: #667f90 }
.monitor-item.active { background: var(--accent-soft); color: #294f6e; box-shadow: inset 2px 0 var(--accent) }
.monitor-item.active .monitor-item-meta { color: #5d7689 }
.monitor-detail { padding: 24px; min-height: 0 }
.monitor-detail .source-row { display: flex; align-items: center; gap: 14px }
.monitor-detail .source-main { flex: 1; min-width: 0 }
.monitor-detail .source-face { width: 52px; height: 52px; min-width: 52px }
.monitor-detail .source-name { font-size: 24px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; color: var(--ink-strong); text-wrap: wrap }
.monitor-detail .source-main p { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.6 }
.monitor-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0 0; padding: 16px 0; border-block: 1px solid #e5ebf0; color: var(--ink); font-size: 14px; line-height: 1.6 }
.monitor-dates dt { color: var(--muted); font-size: 12px; margin-bottom: 4px }
.monitor-dates dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums }
.monitor-detail .source-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px }
.monitor-detail .source-actions button, .source-recovery button, .source-manage-actions button { min-height: 44px; padding: 9px 18px; font-size: 14px; border-radius: 999px }
.monitor-detail .source-actions .primary { display: flex; align-items: center; justify-content: center; gap: 20px; min-width: 140px }
.monitor-detail .source-actions .secondary { border-color: transparent; background: #edf2f6; color: #506b7e }
.monitor-management { margin-top: 18px; border-top: 1px solid #e5ebf0 }
.monitor-management summary { padding: 12px 0; min-height: 44px; cursor: pointer; color: var(--muted); font-size: 13px }
.monitor-management p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; text-wrap: wrap }
.source-manage-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px }
.source-recovery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px }
.monitor-detail .source-error { padding: 12px 14px; margin-top: 16px; border-left: 2px solid #c5a16c; border-radius: 0 8px 8px 0; background: #faf5ea; color: #806241; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere }
.status-badge { flex-shrink: 0; font-size: 11px; font-weight: 500; line-height: 1.5; padding: 3px 8px; border-radius: 999px; color: #426447; background: #eaf2e9 }
.status-badge.warn { color: #866027; background: #fbf0dc }
.status-badge.paused { color: #65717c; background: #edf0f2 }
.monitor-list-empty, .monitor-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 16px; gap: 10px; color: var(--muted); text-align: center }
.monitor-list-empty .button-icon, .monitor-empty .button-icon { width: 26px; height: 26px; margin-bottom: 6px; color: #7791a5 }
.monitor-list-empty strong, .monitor-empty strong { font-size: 15px; color: #4b6375; font-weight: 500; text-wrap: wrap }
.monitor-list-empty p, .monitor-empty p { margin: 0; font-size: 13px; line-height: 1.7; text-wrap: wrap }
.monitor-mode .page-title h1 { font-size: 28px; font-weight: 600; letter-spacing: -.03em }
.monitor-mode .page-title #add-open { border-radius: 999px; min-height: 44px; padding: 9px 16px; font-size: 14px }

/* The reading column has its own measure; toolbar order follows the HTML. */
.reader-view { max-width: 960px; margin: 0 auto; border: 1px solid #e0e6ec; border-radius: 14px; background: #fff; box-shadow: 0 2px 8px #243b5005; overflow: visible }
.reader-toolbar { position: sticky; top: var(--topbar-height); z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; border-bottom: 1px solid #d8e2ea; border-radius: 13px 13px 0 0; background: #f7f9fb; box-shadow: 0 4px 8px -8px #24323d66; backdrop-filter: none }
.reader-navigation { display: flex; align-items: center; flex: 1 1 290px; min-width: 0; gap: 12px }
.reader-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; min-width: 0; gap: 8px; border-left: 1px solid var(--line); padding-left: 16px }
.reader-toolbar .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 999px; background: #eaf0f5; font-size: 13px; font-weight: 500; line-height: 1.5; color: #456177; white-space: nowrap }
.reader-toolbar #reader-back { flex-shrink: 0; color: #315d80; font-weight: 600; padding: 6px 4px; background: transparent }
.reader-toolbar #reader-source { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; height: auto; margin: 0 0 0 auto; padding: 6px 4px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #9bb2c4; color: #456177; white-space: nowrap }
.reader-toolbar #reader-source:hover { color: var(--accent); background: #e5eef6 }
.reader-pagination { display: flex; flex-shrink: 0; gap: 6px; padding: 0; margin: 0; border: 0 }
.reader-pagination:not(:has(button:not([hidden]))) { display: none }
.reader-pagination button { width: 44px; min-width: 44px; min-height: 44px; height: auto; padding: 0; color: var(--ink); background: #e8eef3; border: 0; border-radius: 50%; font-size: 23px; font-weight: 600; line-height: 1 }
.reader-pagination button:disabled { opacity: .35; background: transparent }
.reader-actions #reader-star[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft) }
.reader-toolbar .text-button:hover, .reader-pagination button:hover:not(:disabled) { color: var(--accent); background: #edf2f5 }
.reader-article { width: calc(100% - 64px); max-width: 38em; padding: 32px 0 56px; margin: auto; font-size: 18px }
.reader-article #reader-title { margin: 0 0 24px; color: var(--ink-strong); font-size: 34px; font-weight: 600; line-height: 1.45; letter-spacing: -.025em; text-wrap: pretty }
#reader-content { max-width: none; margin-inline: 0 }
.reader-status { color: var(--muted); font-size: 14px; line-height: 1.75 }

@media (max-width: 1200px) and (min-width: 701px) {
  :root { --sidebar-width: 210px }
  .brand { flex-basis: 162px }
  main, .monitor-mode main { padding: 28px 32px 64px }
  .monitor-browser { grid-template-columns: minmax(220px, .9fr) minmax(0, 1.4fr); gap: 18px }
  .monitor-detail { padding: 20px }
}
@media (max-width: 980px) and (min-width: 701px) {
  .monitor-browser { grid-template-columns: minmax(0, 1fr); gap: 18px }
  .monitor-items { max-height: 260px }
  main, .monitor-mode main { padding-inline: 24px }
  .filter-toolbar { align-items: center; flex-direction: row; gap: 16px }
  #date-menu { max-width: min(360px, calc(100vw - var(--sidebar-width) - 48px)) }
  .reader-navigation { flex-basis: 100% }
  .reader-actions { flex-basis: 100%; border-left: 0; border-top: 1px solid var(--line); padding: 4px 0 0 }
}
@media (max-width: 700px) {
  :root { --sidebar-width: 280px }
  html, body { width: 100%; max-width: 100% }
  html:has(body.nav-open) { overflow: hidden }
  body.nav-open { overflow: hidden }
  .topbar { height: auto; min-height: 60px; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); gap: 6px; flex-wrap: nowrap }
  .topbar::before { display: none }
  .mobile-nav-toggle, .monitor-mode .mobile-nav-toggle { display: grid; place-items: center; order: 0; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #506270 }
  .brand { display: flex; align-items: center; justify-content: center; order: 1; flex: 0 0 44px; width: 44px; min-height: 44px; font-size: 24px; gap: 8px }
  .brand img { width: 27px; height: 27px }
  .topbar:has(#workspace-search:not([hidden])) .brand span { display: none }
  .topbar:has(#workspace-search[hidden]) .brand { flex: 1; width: auto; justify-content: flex-start }
  .top-actions { display: contents }
  .connection-control, .reading-mode .connection-control { display: flex; order: 3; flex: 0 0 44px; width: 44px; height: 44px; margin: 0; padding: 0; justify-content: center; border: 0; background: transparent }
  .connection-control #connection-title { display: none }
  .connection-control .connection-dot { display: block; position: absolute; right: 9px; top: 7px; width: 6px; height: 6px; outline: 2px solid #fff }
  .connection-control .button-icon { display: block; width: 20px; height: 20px; margin: 0 }
  .workspace-search { display: flex; order: 2; flex: 1 1 0; width: auto; min-width: 0; max-width: none; height: 44px; min-height: 44px; padding: 0 12px; gap: 6px }
  .workspace-search input { font-size: 16px }
  .workspace-search input::placeholder { font-size: 13px }
  .search-shortcut { display: none }
  .shell, .reading-mode .shell { margin-left: 0; padding-top: var(--topbar-height, 60px) }
  .sidebar, .monitor-mode .sidebar { top: 0; bottom: 0; left: 0; width: min(310px, calc(100vw - 48px)); z-index: 70; padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); transform: translateX(-100%); border-radius: 0; transition: transform .18s ease; box-shadow: none }
  .sidebar.is-open { transform: translateX(0); box-shadow: 12px 0 45px #2635412b }
  .sidebar-heading { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-left: 12px; margin-bottom: 22px; font-size: 24px; font-weight: 600; letter-spacing: -.045em; color: var(--ink) }
  #nav-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); font-size: 24px }
  .nav-backdrop { position: fixed; inset: 0; width: 100%; height: 100dvh; z-index: 69; background: #2635414d; backdrop-filter: none }
  .sidebar .nav-item { min-height: 48px; font-size: 15px }
  main, .monitor-mode main { max-width: 100%; padding: 12px max(12px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) }
  .workspace-heading { gap: 12px; margin-bottom: 8px }
  .content-tabs { width: 100%; max-width: none; gap: 4px }
  .content-tab { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 8px 10px; font-size: 21px; line-height: 1.5; gap: 7px }
  .content-tab .button-icon { width: 18px; height: 18px }
  .filter-toolbar { align-items: center; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; gap: 8px; padding: 0; margin: 0 }
  .workspace-platforms, .monitor-mode .workspace-platforms { flex: 1; flex-wrap: nowrap; gap: 0; width: auto }
  .workspace-platforms .platform-nav { flex: 0 1 auto; min-height: 44px; min-width: 0; padding: 8px 10px; font-size: 13px; line-height: 1.5 }
  .workspace-platforms .platform-nav.active::after { right: 10px; left: 10px }
  .workspace-platforms .platform-nav:first-child.active::after { left: 2px }
  #feed-filters { align-self: auto; width: auto; flex: 0 0 auto }
  #date-toggle { min-width: 104px; padding-inline: 10px }
  .period-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 3px; border: 0 }
  .period-tab { min-width: 0; min-height: 44px; padding: 7px 3px; font-size: 13px; line-height: 1.5; white-space: normal; margin: 0 }
  .period-count { font-size: 12px; line-height: 1.4 }
  #range-tab { flex-wrap: wrap; align-content: center; gap: 2px 5px }
  #range-label { flex-basis: 100%; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere }
  #range-label:empty { display: none }
  #range-panel { width: 100%; max-width: none; padding: 12px 0 0; gap: 12px }
  #range-close { width: 44px; height: 44px }
  .range-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
  .range-preset { min-height: 44px; padding: 9px 4px; font-size: 13px; line-height: 1.5 }
  .range-fields { grid-template-columns: minmax(0, 1fr); gap: 12px }
  .range-field { gap: 6px }
  .range-field input[type="date"] { font-size: 16px; line-height: 1.5; height: 46px; padding: 0 12px }
  .range-dash { display: none }
  .range-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 2px }
  .range-actions .primary, .range-actions .secondary { min-height: 44px; font-size: 13px; line-height: 1.5 }
  .page-title h1, #page-heading { font-size: 24px; overflow-wrap: anywhere }
  .page-title #add-open { min-height: 44px; font-size: 13px; padding-inline: 12px }
  .feed-meta { min-height: 44px; margin: 0 0 8px; padding: 0; border: 0; gap: 8px }
  .feed-meta #read-all { min-height: 44px; font-size: 12px }
  .group-articles { gap: 10px }
  .group-articles + .group-articles, .feed-group + .feed-group { margin-top: 10px }
  .article, .article.wechat-card, .article.xhs-card { padding: 14px 14px 12px }
  .wx-head { gap: 8px; min-height: 27px }
  .wx-avatar { width: 28px; height: 28px; flex-basis: 28px }
  .wx-name { font-size: 13px; max-width: 12em }
  .wx-tag { display: none }
  .wx-time, .article-time { font-size: 12px }
  .article h2, .article .article-title, .article .wx-title { font-size: 18px; font-weight: 600; line-height: 1.5; letter-spacing: 0 }
  .article .wx-title { margin: 8px 0 6px }
  .wx-foot { gap: 8px; margin-top: 8px; padding-top: 8px }
  .wx-foot .article-links, .wx-foot .wx-actions { gap: 8px }
  .article-links button, .article-links a, .wx-actions button, .xhs-actions button, .article-actions button, .article-actions a { min-height: 44px; min-width: 44px; font-size: 14px }
  .wx-foot button, .wx-foot a { width: auto; padding: 6px 9px; white-space: nowrap }
  .article-links .analysis-open { min-height: 44px }
  .article.wechat-card { grid-template-columns: minmax(0, 1fr) 110px; gap: 8px 10px; padding-block: 12px 10px }
  .wechat-card .wx-title { grid-column: 1 / -1; grid-row: 1 }
  .wechat-card .wx-head { grid-column: 2; grid-row: 2; align-self: center }
  .wechat-card .wx-head { grid-template-columns: 20px minmax(0, 1fr); gap: 4px 6px }
  .wechat-card .wx-avatar { width: 20px; height: 20px; min-width: 20px }
  .wechat-card .wx-name { font-size: 11.5px; line-height: 1.5 }
  .wechat-card .wx-time { font-size: 11px; padding-right: 9px }
  .wechat-card .wx-head .unread-dot { width: 4px; height: 4px; min-width: 4px; bottom: 6px }
  .wechat-card .wx-foot { grid-column: 1; grid-row: 2; align-self: center; gap: 6px; padding: 0; border: 0 }
  .wechat-card .wx-foot .wx-actions { gap: 6px }
  .wechat-card .wx-foot button { font-size: 13px; padding-inline: 6px }
  .wechat-card .wx-foot .analysis-open, .wechat-card .wx-foot button[data-star] { padding-inline: 10px }
  /* Small glyphs, generous invisible touch targets; desktop keeps its text controls. */
  .article :is(.wx-foot,.xhs-foot,.article-actions) button:is([data-analysis],[data-star],[data-read]) { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #647787; text-decoration: none; box-shadow: none }
  .article .article-action-label { display: none }
  .article .article-action-icon { display: block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none }
  .article :is(.wx-foot,.xhs-foot,.article-actions) button:is([data-star],[data-read])[aria-pressed="true"] { color: var(--accent); background: transparent }
  .article :is(.wx-foot,.xhs-foot,.article-actions) button[aria-pressed="true"] .article-action-icon { fill: currentColor }
  .article :is(.wx-foot,.xhs-foot,.article-actions) button[data-read][aria-pressed="true"] { --read-check-ink: #fff }
  .article :is(.wx-foot,.xhs-foot,.article-actions) button:is([data-analysis],[data-star],[data-read]):active { background: var(--accent-soft) }
  .article :is(.wx-foot,.xhs-foot,.article-actions) button:is([data-analysis],[data-star],[data-read]):disabled { opacity: .45 }
  .article.xhs-card .xhs-title { font-size: 18px }
  .library-toolbar { gap: 8px; padding: 0 }
  .library-kinds { flex: 1 1 100%; gap: 3px }
  .library-kinds button { flex: 1 1 auto; min-height: 44px; font-size: 14px; padding: 7px 10px }
  .library-toolbar select { flex: 1; min-width: 0; max-width: none; min-height: 44px; margin-left: 0; font-size: 16px }
  .library-toolbar button, .library-card-foot button { min-height: 44px; font-size: 13px }
  #library-tags-manage { padding: 8px 12px; color: #496276; background: #e8edf2 }
  .library-status { font-size: 12px; line-height: 1.5; margin: 12px 0 8px }
  .library-toolbar { gap: 8px }
  .library-kinds { flex: 0 0 auto; gap: 2px }
  .library-kinds button { min-height: 44px; padding: 7px 12px; font-size: 13px }
  .library-kind-context { display: none }
  .library-filter-tools { flex: 1; margin-left: 0; gap: 6px }
  .library-toolbar select { flex: 1; width: 100%; max-width: none; padding-inline: 10px; font-size: 16px }
  .library-toolbar #library-tags-manage { width: 44px; height: 44px; min-width: 44px; padding: 0 }
  #library-tags-manage .library-action-label, .library-card .library-action-label { display: none }
  .library-status { margin-top: 10px; font-size: 12px }
  .library-list { gap: 10px }
  .library-card { padding: 14px 14px 8px }
  .library-entry h2 { font-size: 18px; line-height: 1.5; letter-spacing: 0; text-wrap: wrap }
  .library-entry blockquote { padding-left: 12px; margin-bottom: 10px; font-size: 18px; line-height: 1.75 }
  .library-entry:has(blockquote) h2 { font-size: 14px; line-height: 1.6 }
  .library-card-foot { gap: 8px; margin-top: 6px; padding: 0 }
  .library-entry-meta { gap: 4px 8px }
  .library-card-foot .library-card-actions { gap: 2px }
  .library-card-foot :is(button[data-library-tags],button[data-library-remove]) { flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; padding: 0; background: transparent; text-decoration: none }
  .library-card-foot .library-icon { width: 20px; height: 20px }
  .library-card-foot button:active { background: var(--accent-soft) }
  #library-tag-dialog, #library-tag-manager { padding: 22px 20px; border-radius: 16px }
  #library-tag-dialog .dialog-actions, #library-tag-manager .dialog-actions { bottom: -22px; margin-top: 16px; padding: 12px 0 max(12px,env(safe-area-inset-bottom)); background: #fff }
  .monitor-browser { display: block }
  .monitor-browser[data-detail-open="false"] .monitor-detail, .monitor-browser[data-detail-open="true"] .monitor-list { display: none }
  .monitor-list { padding: 10px }
  .monitor-list-heading { padding: 0 4px 10px; font-size: 13px }
  .monitor-list-heading select { font-size: 16px; min-height: 44px }
  .monitor-items { display: block; max-height: none; overflow: visible }
  .monitor-item { width: 100%; min-width: 0; min-height: 72px; padding: 12px 6px; gap: 10px; border-radius: 0; border-bottom: 1px solid #edf1f4 }
  .monitor-item:last-child { border-bottom: 0 }
  .monitor-item.active { background: transparent; box-shadow: none; color: #42596a }
  .monitor-item strong { font-size: 15px }
  .monitor-item-meta { font-size: 12px }
  .monitor-item-tail .button-icon { display: block }
  .monitor-detail { padding: 16px; min-height: 0 }
  .monitor-detail .source-row { gap: 10px; flex-wrap: wrap }
  .monitor-detail .source-main { min-width: 120px }
  .monitor-detail .source-face { width: 44px; height: 44px; min-width: 44px }
  .monitor-detail .source-name { font-size: 22px }
  .monitor-detail .source-main p { font-size: 12px }
  .monitor-dates { margin-top: 20px; gap: 12px; font-size: 13px }
  .monitor-detail .source-actions .primary { flex: 1; min-width: 0; gap: 12px }
  .monitor-detail .source-actions button { padding: 9px 16px; font-size: 14px }
  .monitor-mode .page-title h1 { font-size: 25px }
  .monitor-mode .page-title #add-open { font-size: 13px; padding-inline: 14px }
  #setup-dialog, #add-dialog { position: fixed; inset: auto 0; top: calc(var(--visual-top, 0px) + var(--visual-height, 100dvh) / 2); transform: translateY(-50%); margin: 0 auto; padding: 22px 20px; max-height: calc(var(--visual-height, 100dvh) - 24px); overscroll-behavior: contain; scroll-padding-bottom: 72px }
  #setup-dialog .dialog-title h2, #add-dialog .dialog-title h2 { font-size: 22px }
  #setup-dialog .dialog-actions, #add-dialog .dialog-actions { position: sticky; bottom: -22px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); margin-top: 8px; background: #fff }

  .reader-toolbar { flex-wrap: nowrap; gap: 6px; padding: 6px 10px; border-radius: 13px 13px 0 0 }
  .reader-navigation { display: flex; flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-start; gap: 4px; min-width: 0 }
  .reader-toolbar #reader-source { min-width: 44px; padding: 6px 2px; margin: 0 0 0 auto }
  .reader-toolbar #reader-back { padding: 6px 2px; min-width: 44px }
  .reader-label-desktop { display: none }
  .reader-label-mobile { display: inline }
  .reader-actions { flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 2px; padding: 0; border: 0 }
  .reader-toolbar .reader-actions :is(#reader-star,#reader-analysis,#reader-read) { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #647787; text-decoration: none; box-shadow: none }
  .reader-actions .article-action-label { display: none }
  .reader-actions .article-action-icon { display: block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none }
  .reader-toolbar .reader-actions :is(#reader-star,#reader-read)[aria-pressed="true"] { color: var(--accent); background: transparent }
  .reader-actions [aria-pressed="true"] .article-action-icon { fill: currentColor }
  .reader-actions #reader-read[aria-pressed="true"] { --read-check-ink: #fff }
  .reader-toolbar .reader-actions :is(#reader-star,#reader-analysis,#reader-read):active { background: var(--accent-soft) }
  .reader-toolbar .reader-actions :is(#reader-star,#reader-analysis,#reader-read):disabled { opacity: .45 }
  .reader-navigation .reader-pagination { display: none }
  .reader-article { width: calc(100% - 32px); padding: 24px 0 36px }
  .reader-article #reader-title { font-size: 28px; line-height: 1.45; letter-spacing: -.015em; margin-bottom: 22px }
  /* WebKit's pretty wrapping shortens each line; fill the mobile reading column. */
  .reader-article #reader-title, #reader-content p { text-wrap: wrap }
  dialog { padding: 24px 20px; border-radius: 10px }
  dialog .dialog-title h2 { font-size: 21px }
  dialog input, dialog select, dialog textarea { font-size: 16px }
  .analysis-dialog { border-radius: 12px 12px 0 0 }
}
@media (max-width: 360px) {
  .article.wechat-card { grid-template-columns: minmax(0, 1fr); gap: 6px }
  .wechat-card .wx-head { grid-column: 1; grid-row: 2; display: flex; gap: 6px }
  .wechat-card .wx-byline { flex: 1; min-width: 0 }
  .wechat-card .wx-name { -webkit-line-clamp: 1; font-size: 12px }
  .wechat-card .wx-time { margin-left: auto; padding-right: 9px }
  .wechat-card .wx-foot { grid-column: 1; grid-row: 3 }

  main, .monitor-mode main { padding-inline: 10px }
  .content-tabs { gap: 3px }
  .content-tab { font-size: 20px }
  .workspace-platforms .platform-nav { padding-inline: 7px; font-size: 12px }
  .workspace-platforms .platform-nav.active::after { left: 7px; right: 7px }
  #date-toggle { min-width: 92px; padding-inline: 8px; gap: 5px }
  .reader-article #reader-title { font-size: 26px }
}
@media (max-height: 600px) {
  #date-menu, .filter-toolbar:has(> #workspace-platforms[hidden]) #date-menu { position: fixed; inset: 12px auto auto 50%; width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); transform: translateX(-50%); max-height: calc(100dvh - 24px) }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .article, .nav-item { transition: none; animation: none }
}

.xhs-card { cursor: pointer }
#reader-view[data-platform="xiaohongshu"] .xhs-reader-byline { margin-bottom: 16px }
#reader-view[data-platform="xiaohongshu"] #reader-title { font-size: clamp(21px, 3vw, 27px); margin-bottom: 14px }
#reader-xhs-gallery { margin: 0 0 18px }
#xhs-gallery-track {
  display: flex;
  height: clamp(240px, 55svh, 530px);
  overflow: auto hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  background: #f3f5f7;
  border: 1px solid #e0e6ec;
  border-radius: 10px;
}
#xhs-gallery-track::-webkit-scrollbar { display: none }
.xhs-gallery-slide { flex: 0 0 100%; min-width: 0; height: 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: center }
.xhs-gallery-photo { width: 100%; height: 100%; display: block; position: relative; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: zoom-in }
.xhs-gallery-photo img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0 }
.xhs-gallery-photo:focus-visible { outline-offset: -3px }
.xhs-gallery-photo .button-icon { position: absolute; inset: auto 10px 10px auto; width: 32px; height: 32px; padding: 7px; border-radius: 50%; color: #fff; background: #1c293acc; pointer-events: none }
.xhs-gallery-controls { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums }
.xhs-gallery-controls button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--accent); font-size: 24px; padding: 0 }
.xhs-gallery-controls button:disabled { opacity: .35 }
.xhs-gallery-controls span { min-width: 42px; text-align: center }

#xhs-photo-viewer {
  width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #111921; color: #eef3f7; border: 0; border-radius: 0; overflow: hidden;
}
#xhs-photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto }
.xhs-photo-tools { display: flex; gap: 8px; align-items: center; padding: 8px 12px }
.xhs-photo-close { margin-inline-start: auto }
.xhs-photo-nav { justify-content: center; gap: 12px }
.xhs-photo-nav span { min-width: 52px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums }
.xhs-photo-tools button { width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff24; border-radius: 8px; background: #ffffff12; color: inherit; font-size: 23px; line-height: 1 }
.xhs-photo-tools button:disabled { opacity: .4 }
.xhs-photo-tools button:focus-visible, #xhs-photo-stage:focus-visible { outline-color: #b7dbfa }
#xhs-photo-stage { display: flex; overflow: hidden; overscroll-behavior: contain; touch-action: none }
#xhs-photo-stage[data-zoomed] { overflow: auto; touch-action: pan-x pan-y }
#xhs-photo-large { display: block; flex: none; margin: auto; max-width: none; max-height: none; object-fit: contain; user-select: none }
#xhs-photo-stage:not([data-zoomed]) #xhs-photo-large { max-width: 100%; max-height: 100% }
@media (max-width: 700px) {
  #xhs-gallery-track { height: min(125vw, 60svh) }
  #reader-view[data-platform="xiaohongshu"] #reader-title { font-size: 21px }
}

.x-feed-context { color: var(--muted); font-size: 11px; line-height: 1.3 }
.reader-content .x-embedded-post { margin: 16px 0; padding: 14px; border: 1px solid #dce5ed; border-radius: 10px; background: #f9fbfc; overflow-wrap: anywhere }
.x-embedded-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; line-height: 1.35 }
.x-embedded-head:last-child { margin-bottom: 0 }
.reader-content .x-embedded-head a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-strong); text-decoration: none }
.reader-content .x-embedded-head a:hover { text-decoration: underline }
.x-embedded-head .author-avatar { width: 32px; height: 32px; min-width: 32px; margin: 0 }
.x-embedded-author { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 5px; font-size: 14px; min-width: 0 }
.x-embedded-author span, .x-embedded-link, .x-embedded-kind { color: var(--muted); font-size: 12px }
.x-embedded-kind { flex: none }
.reader-content .x-embedded-post p { margin: 0 0 10px; white-space: pre-wrap }
.reader-content .x-embedded-post p:last-child { margin-bottom: 0 }
.reader-content .x-embedded-post :is(.content-image,.content-video) { margin: 12px 0 0 }
@media (max-width: 700px) {
  .reader-content .x-embedded-post { padding: 12px }
}


/* Shared reading surfaces. Media viewers, player positions and embedded boards
   keep their own layout and behavior. */
:root {
  --canvas: #f3f4f0;
  --surface: #fff;
  --paper: #fffefa;
  --sidebar: #eef1ed;
  --ink: #26393b;
  --ink-strong: #1e3033;
  --ink-body: #37484b;
  --muted: #52666a;
  --subtle: #596c6f;
  --line: #d9e0db;
  --accent: #255664;
  --accent-soft: #e7efee;
  --orlet-well: #f2f5f2;
  --orlet-index: #213b43;
  --orlet-panel-radius: 14px;
  --orlet-control-radius: 9px;
  --orlet-gutter: clamp(24px, 3vw, 44px);
}

/* The rail marks the active area; the index marks the active reading view. */
.topbar { background: var(--paper); }
.topbar .brand { color: var(--ink-strong); font-weight: 650; }
.topbar .workspace-search {
  border-color: var(--line);
  border-radius: var(--orlet-control-radius);
  background: var(--orlet-well);
}
.topbar .workspace-search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: none; }
#team-account-open {
  min-width: 44px;
  min-height: 44px;
  max-width: min(16vw, 190px);
  padding-inline: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--orlet-control-radius);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar:has(#setup-open[hidden]) #team-account-open { margin-inline-start: auto; }
.sidebar .nav-item { border-radius: 8px; color: var(--muted); }
.sidebar .nav-item.active {
  background: #dfe9e4;
  box-shadow: inset 3px 0 var(--accent);
  color: var(--ink-strong);
}
.sidebar .nav-item.active .nav-count { color: var(--ink-strong); }

.shell > main {
  --workspace-measure: 1056px;
  max-width: calc(var(--workspace-measure) + 2 * var(--orlet-gutter));
  padding-inline: var(--orlet-gutter);
}
.monitor-mode .shell > main { --workspace-measure: 1160px; }
.shell > main:has(#notes-view:not([hidden])) { --workspace-measure: 780px; }
.shell > main:has(#activity-view:not([hidden])) { --workspace-measure: 900px; }
.workspace-heading .page-title h1 { font-weight: 650; line-height: 1.26; color: var(--ink-strong); }
.filter-toolbar { justify-content: flex-start; }
.filter-toolbar .workspace-platforms .platform-nav { color: var(--muted); }
.filter-toolbar .workspace-platforms .platform-nav.active { color: var(--ink-strong); }
.workspace-platforms .platform-nav.active::after { background: var(--accent); }
.content-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-width: 460px; border-color: var(--line); }
.content-tabs:has(#content-saved:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1.3fr); }
.content-tab { min-height: 51px; border-radius: 8px 8px 0 0; color: var(--muted); font-size: 19px; font-weight: 600; }
.content-tab.active, .content-tab[aria-pressed="true"] { background: var(--orlet-index); color: #fff; }
.content-tab .period-count { font-variant-numeric: tabular-nums; }
#date-toggle { border-color: var(--line); border-radius: var(--orlet-control-radius); color: var(--accent); }
#date-toggle[aria-expanded="true"] { border-color: var(--accent); box-shadow: none; }
#date-menu { border-color: var(--line); border-radius: var(--orlet-panel-radius); }
.feed-meta { margin-bottom: 6px; }
.feed-meta #read-all { color: var(--accent); }

/* The mixed feed uses the same title and action rhythm, with room for a real cover. */
.article, .article.wechat-card, .article.xhs-card, .library-card, .note-card {
  border-color: var(--line);
  border-radius: var(--orlet-panel-radius);
  box-shadow: none;
}
.article:hover, .article.wechat-card:hover { border-color: #b0bfba; box-shadow: none; }
.article .wx-title, .article .article-title, .article.xhs-card .xhs-title, .library-entry h2 {
  color: var(--ink-strong);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 650;
  letter-spacing: -.01em;
}
.article.x-compact-card .wx-title .article-title { font-size: 17px; font-weight: 500; line-height: 1.62; }
.wechat-card .wx-head { align-self: center; grid-template-columns: 25px minmax(0, 1fr) auto; gap: 2px 6px; }
.wechat-card .wx-name, .xhs-card .article-author { color: var(--ink); font-weight: 600; }
.wechat-card .wx-time, .xhs-card .article-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.wechat-card .wx-byline { display: contents; }
.wechat-card .wx-name {
  display: block;
  grid-area: 1 / 2 / 2 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-card .wx-tag {
  display: block;
  grid-area: 2 / 1 / 3 / 3;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--subtle);
  background: none;
  font-size: 11px;
  text-align: end;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-card .wx-time { grid-area: 2 / 3 / 3 / -1; white-space: nowrap; }
.wechat-card .x-feed-context { grid-area: 3 / 1 / 4 / -1; color: var(--accent); text-align: end; }
.wechat-card:has(.x-feed-context) .wx-head .unread-dot { inset-block: auto 20px; }
.xhs-card .xhs-cover img { border-radius: 7px; }
.xhs-card .xhs-foot { justify-content: flex-start; }
.article .article-links .analysis-open { color: var(--accent); }

/* A saved quotation carries more weight than the related title. */
#team-library-scopes:not([hidden]) {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 0;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
#team-library-scopes button {
  min-height: 44px;
  padding-inline: 9px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
#team-library-scopes button[aria-pressed="true"] { box-shadow: inset 0 -2px var(--accent); color: var(--ink-strong); }
.library-card[data-kind="quotes"] blockquote { border-color: #a0b9ae; color: var(--ink-strong); font-weight: 500; text-wrap: wrap; }
.library-card[data-kind="quotes"] .library-entry h2 { font-size: 15px; font-weight: 500; color: var(--muted); }
.library-entry-tags span { background: var(--orlet-well); color: var(--muted); }

/* The sticky actions and the article share one edge. Let the text use its full measure. */
.reader-view { border-color: var(--line); box-shadow: none; }
.reader-toolbar { background: var(--orlet-well); border-color: var(--line); box-shadow: none; }
.reader-toolbar #reader-back, .reader-toolbar #reader-source { color: var(--accent); }
.reader-article #reader-title { line-height: 1.38; text-wrap: wrap; }
.reader-content, .feed-original.reader-content { color: var(--ink-body); }
.reader-content p { text-wrap: wrap; }
.reader-content :is(h2, h3) { color: var(--ink-strong); }
.reader-content a { color: var(--accent); }
.reader-article .reader-listen { margin-bottom: 6px; }
.reader-subscription-actions:has(> :not([hidden])) {
  gap: 0 12px;
  margin-bottom: 16px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.reader-subscription-control {
  min-width: 0;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
}
#reader-subscription-name { color: var(--ink); font-weight: 600; }
.reader-subscription-actions .reader-pause-source { padding-inline: 6px; }
.reader-subscription-actions .reader-note-action { color: var(--muted); }
.reader-article .reader-listen button:hover:not(:disabled) { color: var(--accent); }
.analysis-dialog #analysis-close { min-width: 44px; min-height: 44px; }
.analysis-dialog .analysis-title { color: var(--muted); }
.analysis-dialog .analysis-brief { padding: 10px 13px; border-inline-start: 3px solid #8cae9e; background: var(--orlet-well); color: var(--ink-strong); }
.analysis-dialog .analysis-result h3 { color: var(--ink-strong); }

/* Monitor is a directory; settings and account dialogs are short tasks. */
.monitor-list, .monitor-detail { border-color: var(--line); box-shadow: none; }
.monitor-list-heading { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.monitor-list-heading select { background: var(--orlet-well); border-color: var(--line); border-radius: var(--orlet-control-radius); color: var(--ink); }
.monitor-item.active { background: var(--accent-soft); color: var(--ink-strong); }
.monitor-detail .source-actions button, .monitor-detail .source-manage-actions button { border-radius: var(--orlet-control-radius); }
.monitor-detail .source-actions .secondary { color: var(--accent); background: var(--orlet-well); border-color: var(--line); }
.monitor-mode .page-title #add-open { border-radius: var(--orlet-control-radius); }
#setup-dialog .platform-runtime, #setup-dialog .setup-export a { background: var(--orlet-well); border-color: var(--line); }
#setup-dialog .runtime-row button { border-radius: var(--orlet-control-radius); }
#setup-dialog .settings-notifications .runtime-row span:empty::before { content: "浏览器通知"; }
#setup-dialog .settings-notifications #notification-status:empty { display: none; }
#team-account-dialog, #notes-compose-dialog { border-color: var(--line); border-radius: var(--orlet-panel-radius); }
:is(#team-account-dialog, #notes-compose-dialog) .dialog-title h2 { font-weight: 650; }
:is(#team-account-dialog, #notes-compose-dialog) .dialog-title .icon-button { min-width: 44px; min-height: 44px; border-radius: 8px; }
:is(#team-account-dialog, #notes-compose-dialog) .dialog-actions button, #team-account-add { min-height: 44px; border-radius: var(--orlet-control-radius); }
.team-account-row { padding-block: 9px; }
.team-account-row > div:last-child { flex-shrink: 0; }
.team-account-row button { border-radius: 7px; }
.team-account-row button:last-child { color: #963a46; }
.team-account-row strong { line-height: 1.3; }
.team-gate .team-login-card {
  width: min(100%, 392px);
  padding: clamp(22px, 7vw, 36px);
  background: var(--paper);
  border-color: var(--line);
  border-top: 3px solid var(--orlet-index);
  border-radius: 14px;
  box-shadow: 0 12px 36px #23332a0a;
}
.team-gate .team-login-card h1 { font-size: 33px; font-weight: 650; }
.team-login-card label { font-weight: 600; }
.team-gate .team-login-card input { min-height: 48px; border-color: #b9c6bd; border-radius: var(--orlet-control-radius); }
.team-gate .team-login-card .primary { min-height: 48px; border-radius: var(--orlet-control-radius); font-size: 15px; font-weight: 650; }

.activity-tabs { padding-bottom: 0; }
.activity-tabs button { min-height: 44px; border-radius: 0; }
.activity-tabs button.active { background: transparent; box-shadow: inset 0 -2px var(--accent); color: var(--ink-strong); }
#operation-log-list { padding-inline: 16px; border: 1px solid var(--line); border-radius: var(--orlet-panel-radius); background: var(--paper); }
#operation-log-list:empty { display: none; }
#operation-log-list .operation-row:last-child { border-bottom: 0; }

/* Notes pair the title with its action. An attached article reads as a link,
   while comments remain visibly part of the post. */
.page-title .notes-actions { display: none; }
.shell > main:has(#notes-view:not([hidden])) .page-title .notes-actions { display: flex; gap: 6px; margin: 0; }
#notes-compose { min-height: 44px; border-radius: var(--orlet-control-radius); white-space: nowrap; }
#notes-refresh { min-height: 44px; min-width: 44px; border-radius: var(--orlet-control-radius); }
#notes-view { width: 100%; max-width: none; margin-top: 14px; }
.note-card { background: var(--paper); }
.notes-card-head { min-height: 44px; }
.notes-card-head .notes-byline > strong { color: var(--ink-strong); font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.notes-byline time { font-variant-numeric: tabular-nums; }
.notes-card-content > .notes-text { margin-top: 8px; font-size: 16px; line-height: 1.75; }
button.notes-attachment {
  margin-bottom: 6px;
  padding: 10px 14px;
  border-color: var(--line);
  border-inline-start: 3px solid #8cae9e;
  border-radius: 0 8px 8px 0;
  background: var(--orlet-well);
}
.notes-thread { margin-top: 8px; border-top: 1px solid var(--line); }
.notes-thread summary { min-height: 44px; padding-block: 10px; color: var(--accent); }
.notes-comments { gap: 0; }
.notes-comment { padding: 12px 2px; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.notes-reply textarea { min-height: 44px; }
.notes-reply button { min-height: 44px; border-radius: var(--orlet-control-radius); }
.notes-manage summary { border-radius: var(--orlet-control-radius); }
.notes-carousel { max-width: 560px; }
.notes-photo-track { background: var(--orlet-well); }

@media (min-width: 701px) {
  .topbar .top-actions { gap: 14px; }
  .article.wechat-card { padding: 15px 20px 11px; grid-template-columns: minmax(0, 1fr) clamp(120px, 14vw, 154px); gap: 6px 22px; }
  .wechat-card .wx-foot { padding-top: 6px; border-color: var(--line); }
  .article.xhs-card { padding: 15px 20px; }
  .article.xhs-card.has-cover { grid-template-columns: 108px minmax(0, 1fr); }
  .article.xhs-card .xhs-cover { width: 108px; }
  .article .article-links .analysis-open { border: 1px solid var(--line); border-radius: var(--orlet-control-radius); background: transparent; }
  .article .article-links .analysis-open:hover:not(:disabled) { background: var(--orlet-well); }
  .notes-byline time { font-size: 13px; }
}

@media (min-width: 1100px) {
  .notes-card-content:has(> .notes-carousel):has(> button.notes-attachment) {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 20px;
  }
  .notes-card-content > .notes-text { grid-column: 1 / -1; }
  .notes-card-content:has(> .notes-carousel) > button.notes-attachment { margin-top: 10px; }
}

@media (max-width: 700px) {
  .topbar { gap: 4px; padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); }
  .topbar .brand { flex-basis: 44px; width: 44px; }
  .topbar .brand img { width: 26px; height: 26px; }
  .topbar:has(#workspace-search[hidden]) .brand { flex: 1 1 auto; width: auto; }
  .topbar .workspace-search { padding-inline: 8px; gap: 5px; }
  .topbar .workspace-search input::placeholder { color: var(--muted); font-size: 13px; }
  #team-account-open {
    position: relative;
    order: 4;
    flex: 0 0 44px;
    width: 44px;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--accent-soft);
    font-size: 0;
  }
  #team-account-open::before, #team-account-open::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
  #team-account-open::before { top: 11px; width: 8px; height: 8px; border: 1.6px solid currentColor; border-radius: 50%; }
  #team-account-open::after { top: 24px; width: 15px; height: 9px; border: 1.6px solid currentColor; border-radius: 8px 8px 3px 3px; }
  .sidebar .sidebar-heading { margin-bottom: 10px; }
  body[data-ai-workspace]:has(#aihot-native-frame) #sidebar { z-index: 70; }
  .shell > main { --orlet-gutter: 12px; padding-inline: max(var(--orlet-gutter), env(safe-area-inset-left)) max(var(--orlet-gutter), env(safe-area-inset-right)); }
  .content-tab { min-height: 48px; padding-inline: 5px; gap: 5px; font-size: 18px; }
  .content-tab .button-icon { width: 16px; height: 16px; }
  .content-tab .period-count { padding: 0; font-size: 11px; }
  .filter-toolbar { gap: 6px; justify-content: space-between; }
  .filter-toolbar .workspace-platforms .platform-nav { padding-inline: clamp(5px, 1.65vw, 12px); }
  .filter-toolbar .workspace-platforms .platform-nav.active::after { inset-inline: 6px; }
  .filter-toolbar .workspace-platforms .platform-nav:first-child { padding-inline-start: 2px; margin-inline-end: 2px; }
  .filter-toolbar .workspace-platforms .platform-nav:first-child.active::after { inset-inline-start: 2px; }
  #date-toggle { min-width: 88px; padding-inline: 9px; gap: 5px; }
  .article.wechat-card { grid-template-columns: minmax(0, 1fr) minmax(104px, .8fr); padding: 11px 13px 8px; gap: 4px 6px; }
  .article .wx-title, .article .article-title, .article.xhs-card .xhs-title, .library-entry h2 { font-size: 18px; letter-spacing: 0; }
  .article.x-compact-card .wx-title .article-title { font-size: 16px; line-height: 1.58; }
  .wechat-card .wx-head { display: grid; grid-column: 2; grid-row: 2; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 1px 6px; }
  .wechat-card .wx-head .wx-name { grid-area: 1 / 1 / 2 / 3; text-align: end; }
  .wechat-card .wx-head .wx-avatar { grid-column: 3; }
  .wechat-card .wx-tag { grid-column: 1; }
  .wechat-card .wx-name, .wechat-card .wx-tag, .wechat-card .wx-time { font-size: 11px; }
  .wechat-card .wx-time { grid-column: 2 / -1; margin: 0; }
  .wechat-card .wx-foot { grid-column: 1; grid-row: 2; justify-content: start; gap: 0; }
  .wechat-card .wx-foot :is(.wx-actions, .article-links) { gap: 0; }
  .article :is(.wx-foot, .xhs-foot, .article-actions) button:is([data-analysis],[data-star],[data-read]) { color: var(--muted); }
  .article :is(.wx-foot, .xhs-foot, .article-actions) button:is([data-star],[data-read])[aria-pressed="true"] { color: var(--accent); }
  .article.xhs-card { padding: 12px 13px 8px; }
  .reader-article #reader-title { font-size: clamp(25px, 6.9vw, 30px); }
  .reader-toolbar { padding-block: 5px; }
  .reader-article .reader-subscription-actions { column-gap: 8px; }
  #reader-subscription-name, .reader-subscription-actions .reader-note-action, .reader-subscription-actions .reader-pause-source { font-size: 12px; }
  .reader-subscription-actions .reader-note-action .button-icon { width: 14px; height: 14px; }
  #notes-view { margin-top: 8px; }
  .note-card { padding: 11px 14px 8px; }
  .notes-card-content > .notes-text { margin-bottom: 9px; }
  #notes-compose, #notes-refresh { padding-inline: 8px; }
  #team-app :is(#notes-compose-dialog, #team-account-dialog) {
    max-height: calc(var(--visual-height, 100dvh) - 24px);
    top: var(--visual-top, 0px);
    bottom: auto;
    margin: 0 auto;
    translate: 0 max(12px, calc((var(--visual-height, 100dvh) - 100%) / 2));
  }
}

@media (max-width: 365px) {
  .topbar { gap: 3px; padding-inline: max(6px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-right)); }
  .topbar .workspace-search { padding-inline: 6px; }
  .topbar .workspace-search input::placeholder { font-size: 12px; }
  .content-tab { font-size: 16px; }
  .content-tab .button-icon { width: 14px; height: 14px; }
  .filter-toolbar .workspace-platforms .platform-nav { font-size: 12px; padding-inline: 5px; }
  #date-toggle { min-width: 72px; padding-inline: 7px; font-size: 12px; }
  #date-toggle > .button-icon:first-child { display: none; }
  .article.wechat-card { grid-template-columns: 132px minmax(0, 1fr); }
  .wechat-card .wx-head { grid-template-columns: minmax(0, 1fr) auto 17px; }
  .wechat-card .wx-avatar { width: 17px; height: 17px; min-width: 17px; }
  .notes-card-head .notes-byline { gap: 0 8px; }
}

@media (hover: hover) {
  #team-account-open:hover, #notes-refresh:hover, .notes-manage summary:hover { background: var(--accent-soft); }
  .article-title:hover, .xhs-title a:hover, .library-entry:hover h2 { color: var(--accent); }
}
.topbar :is(.mobile-nav-toggle, .connection-control, #team-account-open):active,
.reader-toolbar .text-button:active,
.notes-manage summary:active { background-color: var(--accent-soft); }
@media (prefers-reduced-motion: no-preference) {
  .topbar :is(button, .workspace-search), .workspace-heading .content-tab, .reader-toolbar .text-button,
  :is(#notes-compose, #notes-refresh, .notes-manage summary) {
    transition: background-color 140ms ease-out, color 140ms ease-out, border-color 140ms ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  .topbar :is(button, .workspace-search), .workspace-heading .content-tab, .reader-toolbar .text-button,
  :is(#notes-compose, #notes-refresh, .notes-manage summary) { transition: none; }
}

@media (max-width: 700px) {
  /* Hold a viewport of list space even when a filter has only a few results. */
  html:has(#team-app:not([hidden]) #feed-view:not([hidden])) { scroll-padding-top: calc(var(--topbar-height) + 8px); }
  #feed-view { min-height: calc(100svh - var(--topbar-height) - 44px); }
  #date-toggle { width: 110px; }

  /* Keep the measured site header in place for the list. The reader has one bar. */
  .reading-mode .topbar { visibility: hidden; }
  .reading-mode .shell, .reading-mode .shell > main { padding-top: 0; }
  .reading-mode .reader-view { border-top: 0; border-start-start-radius: 0; border-start-end-radius: 0; }
  .reading-mode .reader-toolbar {
    top: 0;
    padding-block: max(2px, env(safe-area-inset-top, 0px)) 2px;
    border-radius: 0;
  }
  html:has(body.reading-mode) { scroll-padding-top: calc(max(2px, env(safe-area-inset-top, 0px)) + 55px); }
}
@media (max-width: 365px) {
  #date-toggle { width: 82px; }
}

@media (max-width: 700px) {
  #search { height: 100%; font-size: 16px; }
  #search::-webkit-search-cancel-button { -webkit-appearance: none; }
  .workspace-search:has(#search-clear:not([hidden])) { padding-inline-end: 0; }
  #search-clear:not([hidden]) {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--orlet-control-radius);
    background: transparent;
    color: var(--muted);
    touch-action: manipulation;
  }
  #search-clear:active { background: var(--orlet-well); color: var(--accent); }
  #search-clear .button-icon { width: 16px; height: 16px; color: inherit; }
  .topbar .workspace-search[data-searching] { border-color: var(--accent); }
}

@media (max-width: 365px) {
  .topbar:has(#workspace-search:not([hidden])) .brand { display: none; }
  .workspace-search:has(#search-clear:not([hidden])) .workspace-search-field > .button-icon { display: none; }
}

/* Orlet's reading workspace. The content and action elements remain the same
   in the list, reader and mobile navigation. */
:root {
  --canvas: #f8f6f0;
  --paper: #f8f6f0;
  --surface: #fffdf8;
  --sidebar: #f3f0e7;
  --ink: #243844;
  --ink-strong: #172b37;
  --ink-body: #344856;
  --muted: #50616a;
  --subtle: #59656d;
  --line: #d7d4ca;
  --accent: #294e62;
  --accent-soft: #e4edf0;
  --orlet-well: #ebf0f2;
  --orlet-control-radius: 7px;
  --orlet-panel-radius: 10px;
  --editorial-rule: #9e472f;
  --editorial-pair-line: #ccd8dc;
  --editorial-heading: "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  --editorial-dock-height: calc(54px + env(safe-area-inset-bottom, 0px));
}
.editorial-dock, .editorial-desktop-nav { display: none; }
.shell, .reading-mode .shell, body[data-ai-workspace] .shell { margin-inline-start: 0; }
#team-app .topbar { height: 60px; min-height: 60px; gap: 12px; padding-inline: max(18px, calc((100vw - 1440px)/2)); background: var(--surface); color: var(--ink-strong); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
#team-app .topbar::before, .topbar .breadcrumbs { display: none; }
#team-app .topbar .brand { color: inherit; font: 700 29px/1 Georgia, serif; gap: 9px; }
#team-app .topbar #nav-toggle { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; margin: 0; padding: 0; color: var(--muted); border: 0; border-radius: 7px; background: transparent; }
#team-app .topbar #team-account-open { color: var(--ink); border-color: var(--line); }
#team-app .topbar :is(#nav-toggle,#team-account-open):is(:hover,:active) { background: var(--accent-soft); }
#team-app .topbar .workspace-search { background: #f1f3ef; border-color: #d9ded8; }
#team-app .topbar .workspace-search:is(:focus-within,[data-searching]) { border-color: #78929e; }
#team-app .topbar :is(#search,.workspace-search .button-icon) { color: var(--ink-strong); }
#team-app .topbar #search::placeholder { color: var(--muted); }
#team-app .topbar #search-clear:active { background: var(--accent-soft); }
.topbar .top-actions { margin-inline-start: auto; justify-content: flex-end; }

html:has(body.nav-open), body.nav-open { overflow: hidden; }
#team-app #sidebar { position: fixed; z-index: 75; top: 0; bottom: 0; left: 0; width: min(328px,calc(100vw - 44px)); padding: max(14px,env(safe-area-inset-top)) 16px max(14px,env(safe-area-inset-bottom)); transform: translateX(-100%); border-radius: 0; background: var(--sidebar); }
body.nav-open #team-app #sidebar.is-open { z-index: 75; transform: translateX(0); box-shadow: 14px 0 40px #172b3733; }
#team-app .sidebar-heading { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin-bottom: 10px; padding-inline: 10px 0; font: 700 26px/1 Georgia,serif; }
#team-app #nav-close { display: grid; place-items: center; padding: 0; width: 44px; height: 44px; font-size: 24px; border-color: transparent; background: transparent; }
#nav-backdrop:not([hidden]) { display: block; position: fixed; z-index: 74; inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; background: #172b3752; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sidebar .nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--ink-strong); }
.shell > main { --orlet-gutter: clamp(18px,2.7vw,38px); box-sizing: border-box; }
.shell > main:has(#feed-view:not([hidden])) { max-width: 1300px; padding-top: 14px; }
.workspace-heading .page-title { min-width: 0; margin: 0; min-height: 44px; }
.workspace-title { display: flex; align-items: center; min-width: 0; gap: 9px; }
#team-app .workspace-heading #page-heading { margin: 0; font: 680 20px/1.35 var(--type-ui); letter-spacing: 0; overflow-wrap: anywhere; }
#workspace-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; flex: none; padding: 0 8px 0 0; border: 0; border-radius: 0; border-inline-end: 1px solid var(--line); background: transparent; color: var(--accent); font-size: 13px; font-weight: 620; }
#workspace-back .button-icon { width: 17px; height: 17px; }
.workspace-back-monitor { display: none; }
.filter-toolbar { gap: 10px; }
.filter-toolbar:has(.feed-filter-actions:not([hidden])) { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 4px; }
.filter-toolbar .workspace-platforms { min-width: 0; }
.filter-toolbar .workspace-platforms .platform-nav { border-radius: 0; }
.filter-toolbar .workspace-platforms .platform-nav.active { color: var(--ink-strong); background: transparent; }
.filter-toolbar .workspace-platforms .platform-nav.active::after { background: var(--accent); }
.feed-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-inline-start: auto; min-width: 0; }
.feed-filter-actions .feed-meta { align-content: center; gap: 1px 6px; margin: 0 4px 0 0; padding: 0; border: 0; min-width: 0; color: var(--muted); font-size: 12px; }
.feed-filter-actions #feed-count { white-space: nowrap; }
.feed-filter-actions #x-feed-original { min-height: 44px; padding-inline: 3px; white-space: nowrap; color: var(--accent); }
#team-app :is(#unread-chip,#date-toggle) { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; min-width: 0; min-height: 44px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--accent); font-size: 13px; font-weight: 570; white-space: nowrap; }
#team-app :is(#unread-chip,#date-toggle):is(:hover,:active,[aria-pressed="true"],[aria-expanded="true"]) { background: var(--accent-soft); border-color: #bacbd0; color: var(--ink-strong); }
#unread-chip[aria-pressed="true"] { font-weight: 700; }
#unread-chip .unread-clear, #unread-chip[aria-pressed="true"] .unread-envelope { display: none; }
#unread-chip[aria-pressed="true"] .unread-clear { display: block; width: 15px; height: 15px; }
.date-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.date-menu-heading .date-menu-caption { margin: 0; }
#date-menu-close { width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; font-size: 21px; color: var(--muted); }
.feed-group .group-heading { border: 0; display: flex; gap: 12px; align-items: center; }
.feed-group .group-heading h2 { font: 670 15px/1.4 var(--type-ui); color: var(--ink); }
.feed-group .group-heading > span { display: none; }
.feed-group .group-articles { gap: 0; }

.article.wechat-card {
  display: grid; grid-template: "byline byline" auto "headline actions" auto / minmax(0,1fr) auto;
  align-items: center; gap: 3px 10px; padding: 10px 6px; border: 0; border-block-end: 1px solid var(--line);
  border-radius: 0; background: transparent; box-shadow: none; min-width: 0;
}
.article.wechat-card[data-reader-current] { background: #f0e6dc; box-shadow: inset 3px 0 var(--editorial-rule); }
.article.wechat-card .wx-head { grid-area: byline; width: 100%; display: grid; grid-template-columns: 30px minmax(0,1fr) auto auto; column-gap: 8px; align-items: center; justify-self: stretch; position: relative; padding: 0; }
.article.wechat-card .wx-head .wx-avatar { grid-area: 1 / 1; width: 30px; height: 30px; min-width: 30px; }
.article.wechat-card .wx-byline { grid-area: 1 / 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; min-width: 0; }
.article.wechat-card .wx-head .wx-name { max-width: 100%; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-align: start; color: var(--ink-strong); font-size: 13px; font-weight: 675; }
.article.wechat-card .wx-tag, .article.wechat-card .x-feed-context { overflow: visible; text-align: start; font-size: 11px; line-height: 1.4; }
.article.wechat-card .wx-time { grid-area: 1 / 3; margin: 0; padding: 0; font-size: 12px; }
.article.wechat-card .wx-head .unread-dot { grid-area: 1 / 4; position: static; inset: auto; background: var(--editorial-rule); }
.article.wechat-card .wx-title { grid-area: headline; margin: 0 0 0 38px; min-width: 0; }
.article.wechat-card .wx-title .article-title { font-size: 18px; line-height: 1.5; font-weight: 690; color: var(--ink-strong); }
.article.wechat-card.x-compact-card .wx-title .article-title { font-weight: 550; }
.article.wechat-card .wx-foot { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 1px; min-width: 0; padding: 0; margin: 0; border: 0; }
.article.wechat-card .wx-foot:not(:has(button,a)) { display: none; }
.article :is(.wx-foot,.xhs-foot,.article-actions) :is(.article-links,.wx-actions,.xhs-actions) { gap: 2px; }
#team-app .article :is(.wx-foot,.xhs-foot,.article-actions) button:is([data-analysis],[data-star],[data-read]) {
  display: inline-grid; place-items: center; width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); text-decoration: none; box-shadow: none;
}
#team-app .article :is(.wx-foot,.xhs-foot,.article-actions) button[data-analysis], #team-app #reader-analysis { background: var(--orlet-well); color: var(--accent); }
#team-app button:is([data-star],#reader-star)[aria-pressed="true"] { color: var(--editorial-rule); }
#team-app :is(.article,.reader-toolbar) button[aria-pressed="true"] .article-action-icon { fill: currentColor; }
#team-app button:is([data-read],#reader-read)[aria-pressed="true"] { --read-check-ink: var(--surface); }
#team-app :is(.article,.reader-toolbar) button:is([data-analysis],[data-star],[data-read],#reader-analysis,#reader-star,#reader-read,#reader-layout):is(:hover,:active) { background: var(--accent-soft); }
#team-app :is(.article,.reader-toolbar) .article-action-icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#team-app :is(.article,.reader-toolbar) .article-action-label { display: none; }
.article.xhs-card { background: var(--surface); }
.article.xhs-card .article-author { white-space: normal; overflow-wrap: anywhere; }

.reader-view { background: var(--surface); border-radius: 0; }
.reader-toolbar { --reader-control: 36px; background: var(--surface); border-bottom-color: var(--line); border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.reader-toolbar #reader-source { gap: 5px; }
.reader-toolbar #reader-source .button-icon { width: 15px; height: 15px; }
.reader-view:not([data-platform="wechat"]) .reader-listen { display: none; }
#team-app .reader-toolbar button:is(#reader-analysis,#reader-star,#reader-read,#reader-layout) {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: var(--reader-control); min-width: var(--reader-control);
  height: var(--reader-control); min-height: var(--reader-control);
  padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); text-decoration: none; box-shadow: none;
  overflow: hidden; font-size: 0; white-space: normal;
}
#team-app .reader-toolbar #reader-analysis { background: var(--orlet-well); color: var(--accent); }
#team-app .reader-toolbar :is(#reader-star,#reader-read):not(:has(svg))::before { font-size: 19px; line-height: 1; }
#reader-star:not(:has(svg))::before { content: "☆"; }
#reader-star[aria-pressed="true"]:not(:has(svg))::before { content: "★"; }
#reader-read:not(:has(svg))::before { content: "✓"; }
.reader-article #reader-title { font: 700 clamp(26px,3vw,41px)/1.37 var(--editorial-heading); letter-spacing: 0; }
#reader-author-byline .article-header { margin-bottom: 13px; }
#reader-author-byline .article-author { color: var(--ink-strong); font-weight: 680; overflow-wrap: anywhere; }
.reader-article .reader-subscription-actions { margin-block: 8px 14px; }
.article-feedback:not([hidden]) { display: inline-flex; align-items: center; flex: 0 0 auto; }
#team-app .article-feedback button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 32px; min-height: 32px; padding: 0 6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 550;
  line-height: 1; white-space: nowrap; box-shadow: none; touch-action: manipulation;
}
.article-feedback .feedback-icon {
  width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
#team-app .article-feedback button:enabled:is(:hover,:focus-visible,[aria-pressed="true"]) { color: var(--accent); background: var(--accent-soft); }
#team-app .article-feedback button[data-feedback="dislike"][aria-pressed="true"] { color: #805346; background: #f3e7e0; }
#team-app .article-feedback button[aria-pressed="true"] .feedback-icon { fill: color-mix(in srgb,currentColor 18%,transparent); }
#team-app .article-feedback button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#team-app .article-feedback button:disabled { opacity: .38; cursor: default; }
#team-app .article-feedback button[aria-disabled="true"] { opacity: .58; cursor: progress; }
.article-feedback .feedback-count { font-size: 11px; font-variant-numeric: tabular-nums; }
.article-feedback .feedback-count:empty { display: none; }
.article-feedback--card { margin-inline-start: 5px; padding-inline-start: 5px; border-inline-start: 1px solid var(--line); }
.article-feedback--card .feedback-label { display: none; }
#team-app .article-feedback--card button { gap: 3px; }
.article-actions:has(> .article-feedback--card), .xhs-foot:has(> .article-feedback--card) { flex-wrap: wrap; }
.article-feedback--reader {
  gap: 2px; padding: 3px; margin-block: 0 16px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--orlet-well); max-width: 100%;
}
#team-app .article-feedback--reader button { min-height: 36px; padding-inline: 10px; }
@media (max-width: 699px) {
  .article.wechat-card:has(.article-feedback--card) { grid-template: "byline" auto "headline" auto "actions" auto / minmax(0,1fr); }
  .article.wechat-card:has(.article-feedback--card) .wx-head { padding-block: 4px 2px; }
  .article.wechat-card:has(.article-feedback--card) .wx-foot { justify-content: flex-start; flex-wrap: wrap; margin-inline-start: 32px; }
  #team-app .article-feedback button { min-height: 44px; min-width: 44px; }
  #team-app .article-feedback--card button { padding-inline: 4px; }
  .article-feedback--reader { margin-block-end: 12px; }
}
.library-view .library-list { gap: 0; }
.library-view .library-card { border: 0; border-block-end: 1px solid var(--line); border-radius: 0; background: transparent; padding-inline: 0; }
.library-view .library-card:focus-within { border-color: var(--accent); }
.library-entry-tags span { border-radius: 5px; }
#team-app .monitor-browser .monitor-item { border-radius: 5px; }
#team-app .monitor-browser .monitor-detail { background: var(--surface); border-color: var(--line); }
#team-app .monitor-browser .monitor-detail-heading { font-weight: 700; }
.notes-view .note-card { border-color: var(--line); background: var(--surface); }
#toast { left: 50%; border: 0; background: var(--ink-strong); }
#toast:has(> button) { display: flex; align-items: center; gap: 10px; }
#toast button { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ai-board-status { position: fixed; inset: calc(var(--topbar-height) + 12px) 0 auto; z-index: 2; width: max-content; max-width: calc(100vw - 32px); margin: 0 auto; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 13px; pointer-events: none; }

@media (min-width: 1000px) {
  .editorial-desktop-nav { display: flex; align-self: stretch; gap: 6px; }
  .editorial-desktop-nav :is(button,a) { display: grid; place-items: center; padding: 0 13px; position: relative; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 570; text-decoration: none; white-space: nowrap; }
  .editorial-desktop-nav :is(button,a):hover { color: var(--ink-strong); background: var(--accent-soft); }
  .editorial-desktop-nav [aria-current="page"] { color: var(--ink-strong); font-weight: 690; }
  .editorial-desktop-nav [aria-current="page"]::after { content: ""; position: absolute; inset: auto 10px 0; height: 3px; background: var(--accent); }
}
@media (min-width: 1320px) {
  html:has(body.editorial-split) { scroll-padding-top: calc(var(--topbar-height) + 12px); }
  body.editorial-split .shell > main:has(#feed-view:not([hidden])) { display: grid; width: 100%; max-width: 1530px; grid-template-columns: minmax(0,1.03fr) minmax(0,1fr); align-items: start; column-gap: 22px; }
  body.editorial-split .shell > main > :is(.workspace-heading,.filter-toolbar) { grid-column: 1 / -1; }
  body.editorial-split #feed-view { grid-column: 1; margin-block-start: 0; }
  body.editorial-split #reader-view { grid-column: 2; align-self: start; position: sticky; top: calc(var(--topbar-height) + 12px); width: 100%; max-height: calc(100dvh - var(--topbar-height) - 26px); margin: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; background: var(--surface); border-color: var(--editorial-pair-line); }
  body.editorial-split .reader-toolbar { top: 0; padding-inline: 9px; gap: 5px; }
  body.editorial-split .reader-toolbar .reader-actions { gap: 2px; padding-inline-start: 5px; }
  body.editorial-split .reader-article { padding-inline: clamp(18px,2.1vw,34px); }
  body.editorial-split #reader-title { font-size: clamp(27px,2.4vw,36px); }
  body.editorial-split .reader-toolbar #reader-back .reader-label-desktop { font-size: 0; }
  body.editorial-split .reader-toolbar #reader-back .reader-label-desktop::after { content: "← 列表"; font-size: 13px; }
}
/* Keep the compact layout breakpoint stable when a drawer hides a desktop scrollbar. */
@media (max-width: 740px) and (hover: hover) and (pointer: fine) {
  html { scrollbar-width: none; }
}
@media (max-width: 700px) {
  .shell > main { --orlet-gutter: 13px; }
  #team-app .topbar { height: auto; min-height: 54px; padding: max(5px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) 5px max(8px,env(safe-area-inset-left)); gap: 5px; }
  #team-app .topbar #nav-toggle { display: none; }
  #team-app .topbar .brand { order: 0; font-size: 24px; }
  #team-app .topbar:has(#workspace-search:not([hidden])) .brand { flex: 0 0 39px; width: 39px; }
  #team-app .topbar:not(:has(#workspace-search:not([hidden]))) .brand { justify-content: start; }
  #team-app .topbar .workspace-search { order: 1; }
  #team-app .topbar #team-account-open { background: #f1f3ef; }
  .shell > main:has(#feed-view:not([hidden])) { padding-top: 4px; }
  .workspace-heading { margin-bottom: 6px; }
  #team-app .workspace-heading #page-heading { font-size: 17px; }
  .monitor-mode main:has(.monitor-browser[data-detail-open="true"]) :is(#workspace-back-label,.filter-toolbar,#add-open) { display: none; }
  .monitor-mode main:has(.monitor-browser[data-detail-open="true"]) .workspace-back-monitor { display: inline; }
  #team-library-scopes:not([hidden]) { display: none; }
  .filter-toolbar:has(.feed-filter-actions:not([hidden])) { display: block; margin-bottom: 4px; padding-bottom: 0; }
  .filter-toolbar .workspace-platforms .platform-nav { flex: 1 1 auto; justify-content: center; padding-inline: 4px; margin: 0; }
  .filter-toolbar .workspace-platforms .platform-nav.active::after { inset-inline: 8px; }
  .feed-filter-actions { min-height: 44px; gap: 2px; }
  .workspace-platforms:not([hidden]) + .feed-filter-actions:not([hidden]) { border-top: 1px solid var(--line); }
  .feed-filter-actions .feed-meta { display: flex; flex: 1; flex-wrap: wrap; align-items: center; }
  #team-app :is(#unread-chip,#date-toggle) { padding-inline: 6px; }
  .feed-group .group-heading { padding-block: 4px 3px; }
  .article.wechat-card { grid-template: "byline actions" auto "headline headline" auto / minmax(0,1fr) auto; gap: 0; padding: 3px 1px 9px; }
  .article.wechat-card .wx-head { grid-template-columns: 26px minmax(0,1fr); column-gap: 6px; align-content: center; }
  .article.wechat-card .wx-head .wx-avatar { grid-area: 1 / 1 / 3 / 2; width: 26px; height: 26px; min-width: 26px; }
  .article.wechat-card .wx-head .wx-name { font-size: 13px; }
  .article.wechat-card .wx-time { grid-area: 2 / 2; font-size: 11px; }
  .article.wechat-card .wx-head .unread-dot { position: absolute; grid-area: auto; inset: 0 auto auto 21px; outline: 2px solid var(--paper); }
  .article.wechat-card .wx-title { margin-inline-start: 32px; }
  .article.wechat-card .wx-title .article-title { font-size: 16px; line-height: 1.48; }
  .article.wechat-card .wx-foot { padding: 0; }
  #team-app .article :is(.wx-foot,.xhs-foot,.article-actions) button:is([data-analysis],[data-star],[data-read]) { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
  .reader-toolbar { --reader-control: 44px; display: grid; grid-template-columns: minmax(0,1fr) max-content; gap: 6px; padding-inline: max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right)); }
  .reader-toolbar .reader-actions { gap: 4px; }
  .reader-toolbar #reader-source { margin: 0 0 0 auto; }
  #team-app .article :is(.wx-foot,.xhs-foot,.article-actions) button[data-analysis] .article-action-icon { box-sizing: content-box; padding: 5px; border-radius: 6px; background: var(--orlet-well); }
  #team-app .article :is(.wx-foot,.xhs-foot,.article-actions) button[data-analysis] { background: none; }
  body:not(.reading-mode):not([data-ai-workspace]) .shell > main { padding-bottom: calc(var(--editorial-dock-height) + 26px); }
  .editorial-dock {
    display: flex; position: fixed; inset: auto 0 0; z-index: 45;
    height: var(--editorial-dock-height);
    padding: 3px max(8px,env(safe-area-inset-right)) calc(3px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left));
    align-items: stretch; gap: 4px; background: var(--surface); border-top: 1px solid var(--line);
  }
  .editorial-dock :is(button,a) { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 46px; padding: 3px 1px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 620 11px/1.35 var(--type-ui); text-decoration: none; white-space: nowrap; }
  .editorial-dock .button-icon { width: 18px; height: 18px; }
  .editorial-dock :is([aria-current="page"],[aria-expanded="true"],.workspace-active,:active) { color: var(--ink-strong); background: var(--accent-soft); }
  body:not(.reading-mode) #toast { bottom: calc(var(--editorial-dock-height) + 10px); }
  body.reading-mode #toast { bottom: max(14px,env(safe-area-inset-bottom)); }
  .reading-mode .editorial-dock { display: none; }
  #aihot-native-frame { --ai-frame-bottom: var(--editorial-dock-height); }
  .sidebar .sidebar-scroll { flex: 0 1 auto; }
  .sidebar :is(.sidebar-board-link,.sidebar-collection-link,.sidebar-note-link) { display: none; }
  .reading-mode .reader-view { border: 0; }
  .reader-article #reader-title { font: 700 clamp(25px,6.7vw,31px)/1.45 var(--type-ui); }
  #reader-author-byline .article-header { margin-bottom: 11px; }
  .reader-article .reader-subscription-actions { gap: 3px 8px; }
}
@media (max-width: 365px) {
  #unread-chip > .button-icon, #date-toggle > .button-icon:first-child { display: none; }
}
@media (max-width: 350px) {
  #reader-source-label { display: none; }
}
.library-status { min-height: 1.5em; }
#library-empty [data-library-retry] { min-height: 44px; }
@media (prefers-reduced-motion: no-preference) {
  #team-app #sidebar { transition: transform 170ms ease-out; }
  #nav-backdrop:not([hidden]), #date-menu:not([hidden]), #range-panel:not([hidden]), .ai-board-status:not([hidden]) { animation: orlet-panel-enter 165ms ease-out; }
  dialog[open] { animation: orlet-panel-enter 155ms ease-out; }
  .editorial-dock :is(button,a), .workspace-platforms button, .library-kinds button,
  #team-app :is(#unread-chip,#date-toggle,.period-tab,.range-preset) { transition: background-color 155ms ease-out, color 155ms ease-out, border-color 155ms ease-out; }
  .workspace-platforms .platform-nav.active::after { animation: orlet-filter-select 160ms cubic-bezier(.2,.72,.24,1); }
  #date-toggle .date-chevron { transition: transform 180ms cubic-bezier(.2,.72,.24,1); }
  .editorial-dock .button-icon { transition: transform 150ms ease-out; }
  .editorial-dock :is(button,a):active .button-icon { transform: scale(.92); }
}
@keyframes orlet-panel-enter { from { opacity: .66; } to { opacity: 1; } }
@keyframes orlet-filter-select { from { transform: scaleX(.62); opacity: .55; } to { transform: scaleX(1); opacity: 1; } }
