/* Page-level layouts for the v1.16 module pages (web/pages/*.js). Tokens only. */

/* ---- 空间 ---- */
.space-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin-top: var(--sp-2); }
.space-tile {
  display: flex; flex-direction: column; gap: 2px; min-height: 112px; padding: var(--sp-4);
  border-radius: var(--r-lg); background: var(--surface-1); box-shadow: var(--shadow-1);
  color: inherit; text-decoration: none; transition: transform var(--dur-1) var(--ease);
}
a.space-tile:active { transform: scale(0.97); }
.space-tile.soon { opacity: 0.6; }
.space-tile-icon {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: var(--sp-3);
  border-radius: 10px; background: var(--tile); color: #fff; font-size: 20px;
}
.space-tile-title { font-size: var(--fs-headline); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.space-tile-desc { font-size: var(--fs-footnote); color: var(--label-2); }

/* WP6 health.js */
.muted.hl-date-line { margin: var(--sp-1) var(--sp-1) var(--sp-2); }
.hl-prose { font-size: var(--fs-subhead); line-height: 1.6; }
.hl-prose.pre { white-space: pre-wrap; }
.hl-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-1); }
.hl-kpi-name { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.hl-kpi-name .ui-icon { color: var(--label-3); }
.segmented.hl-seg-sm { max-width: 150px; margin: 0 0 var(--sp-2); }
.hl-cmp { margin-top: var(--sp-2); font-size: var(--fs-caption); font-weight: 600; color: var(--label-2); }
.hl-trend-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }
.kpi-tile.hl-mini { padding: var(--sp-3); text-align: center; }
.kpi-value.hl-mini-value { margin-top: var(--sp-1); font-size: var(--fs-headline); }
.pill.hl-pill { display: inline-flex; align-items: center; gap: var(--sp-1); font-family: inherit; cursor: pointer; }
.hl-foot { margin-top: var(--sp-4); text-align: center; }
.hl-linkbtn { text-decoration: underline; }
.hl-form-grid { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.hl-form-grid > div { flex: 1; min-width: 0; }
.hl-block { margin-top: var(--sp-3); }
.muted.hl-field { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-footnote); }
.hl-derived { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-footnote); color: var(--label-2); }
.hl-derived strong { color: var(--label); font-weight: 600; }
.hl-saved { margin-top: var(--sp-2); text-align: center; font-size: var(--fs-footnote); font-weight: 600; color: var(--good-text); }
.hl-input-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.hl-input-row > input { flex: 1 1 84px; width: auto; min-width: 0; }
.hl-input-row > input[type="date"] { flex: 1 1 130px; }
.btn.hl-btn-inline { width: auto; flex: none; }
.list-item.hl-record { display: flex; align-items: center; gap: var(--sp-2); }
.hl-record-main { flex: 1; min-width: 0; }
.list-item .title.hl-title-sm { font-size: var(--fs-subhead); }
.hl-icon-del { display: inline-flex; align-items: center; padding: 0 var(--sp-1); border: none; background: none; color: var(--label-3); font-size: 20px; cursor: pointer; }
.muted.hl-chart-label { margin-bottom: var(--sp-1); font-size: var(--fs-caption); font-weight: 600; }
.list-item.hl-report-row { display: block; color: inherit; text-decoration: none; }
.hl-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.hl-row-base { align-items: baseline; }
.hl-none { flex: none; }
.hl-mt { margin-top: var(--sp-1); }
.hl-mt-2 { margin-top: var(--sp-2); }
.hl-mt-3 { margin-top: var(--sp-3); }
.hl-center { margin: var(--sp-1) 0 var(--sp-2); text-align: center; }
.hl-flush { margin: 0; }
.hl-table { width: 100%; margin-top: var(--sp-3); border-collapse: collapse; font-size: var(--fs-caption); }
.hl-table th, .hl-table td { padding: var(--sp-1); border-bottom: 0.5px solid var(--separator); text-align: left; }
.hl-table th { font-weight: 600; color: var(--label-2); }
.hl-table strong { font-weight: 600; }
.ui-badge.hl-risk { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-footnote); }
.hl-sub { margin-top: var(--sp-1); font-size: var(--fs-footnote); line-height: 1.5; color: var(--label-2); }
.hl-watch-val { flex: none; font-size: var(--fs-footnote); font-weight: 600; }
.muted.hl-label { margin-bottom: var(--sp-1); font-size: var(--fs-footnote); font-weight: 600; }
.hl-list { margin: 0; padding-left: var(--sp-5); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); }
.hl-list li { margin-bottom: var(--sp-1); }
.list-item.hl-item { display: flex; align-items: flex-start; gap: var(--sp-3); }
.hl-item-main { flex: 1; min-width: 0; }
.list-item.hl-item-abn { border-left: 3px solid var(--warning); padding-left: var(--sp-3); }
.hl-item-val { flex: none; font-size: var(--fs-subhead); font-weight: 600; text-align: right; }
.muted.hl-unit { font-size: var(--fs-caption); font-weight: 400; }
.muted.hl-ref { margin-top: 2px; font-size: var(--fs-caption); }
.hl-toggle { display: flex; align-items: center; gap: var(--sp-2); margin: 2px var(--sp-1) var(--sp-3); font-size: var(--fs-subhead); color: var(--label-2); cursor: pointer; }
.hl-check { width: 18px; height: 18px; flex: none; }
.hl-btn-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-1); }
.hl-btn-row .btn { flex: 1; width: auto; }
.btn.secondary.hl-danger { color: var(--critical-text); border-color: var(--critical); }

/* WP6 assets.js */
.as-mb { margin: 0 0 var(--sp-3); }
.as-mb-2 { margin-bottom: var(--sp-2); }
.as-mb-3 { margin-bottom: var(--sp-3); }
.as-mt { margin-top: var(--sp-1); }
.as-mt-2 { margin-top: var(--sp-2); }
.as-mt-3 { margin-top: var(--sp-3); }
.as-flush { margin: 0; }
.card h2.as-flush { margin: 0; }
.as-prose { font-size: var(--fs-subhead); line-height: 1.6; white-space: pre-wrap; }
.as-row-start { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); }
.as-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.as-row { display: flex; align-items: center; gap: var(--sp-3); }
.as-grow { flex: 1; min-width: 0; }
.as-none { flex: none; }
.as-clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta.as-wrap { flex-wrap: wrap; }
.as-num-right { flex: none; text-align: right; }
.as-sub { margin-top: 2px; font-size: var(--fs-caption); }
.as-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-2); }
.as-day-line { margin-top: var(--sp-2); font-size: var(--fs-footnote); }
.pill.as-pill { display: inline-flex; align-items: center; gap: var(--sp-1); font-family: inherit; cursor: pointer; }
.as-range { margin-bottom: var(--sp-1); font-size: var(--fs-caption); }
.muted.as-tag { font-size: var(--fs-caption); font-weight: 400; }
.list-item .title.as-title { font-size: var(--fs-subhead); }
.list-item .title.as-title-sm { font-size: var(--fs-footnote); }
.as-card-title { font-size: var(--fs-subhead); line-height: var(--lh-subhead); font-weight: 600; }
.as-amount { flex: none; font-size: var(--fs-subhead); font-weight: 600; }
.as-note { margin: var(--sp-1) var(--sp-1) var(--sp-2); font-size: var(--fs-footnote); line-height: 1.5; }
.as-linkbtn { padding: 2px var(--sp-1); border: none; background: none; color: var(--accent); font-family: inherit; font-size: var(--fs-caption); font-weight: 600; cursor: pointer; }
.as-head-name { display: inline-flex; align-items: center; gap: var(--sp-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-inline { display: flex; flex: none; align-items: center; gap: var(--sp-2); }
.muted.as-head-meta { font-size: var(--fs-subhead); font-weight: 600; }
.card.as-card-tight { padding-top: var(--sp-1); }
.as-kpi-row { display: flex; gap: var(--sp-2); }
.as-kpi-row > .kpi-tile { flex: 1; min-width: 0; }
.as-alloc-foot { display: flex; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-1); font-size: var(--fs-caption); }
.as-alloc-dev { display: inline-flex; align-items: center; gap: 2px; flex: none; font-weight: 600; }
.as-table { width: 100%; border-collapse: collapse; font-size: var(--fs-caption); }
.as-table th, .as-table td { padding: var(--sp-1); border-bottom: 0.5px solid var(--separator); }
.as-table th { font-weight: 600; color: var(--label-2); text-align: left; }
.as-table .num { text-align: right; }
.as-scroll-x { overflow-x: auto; }
.alert-strip.as-alert { margin-bottom: var(--sp-2); }
.as-form-grid { display: flex; gap: var(--sp-2); }
.as-form-grid > div, .as-form-grid > input { flex: 1; min-width: 0; }
.muted.as-field { display: block; margin: var(--sp-2) 0 var(--sp-1); font-size: var(--fs-footnote); }
.muted.as-field-tight { display: block; margin: 0 0 var(--sp-1); font-size: var(--fs-footnote); }
.btn.as-btn-auto { width: auto; flex: none; text-decoration: none; }
.btn.secondary.as-danger { margin-top: var(--sp-3); color: var(--critical-text); border-color: var(--critical); }
.btn.as-btn-sm { min-height: 34px; padding: 0 var(--sp-4); font-size: var(--fs-footnote); }
.btn.as-suggest-btn { margin: var(--sp-1) 0 var(--sp-2); }
.as-import { margin-bottom: var(--sp-2); }
.as-row-btns { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.as-row-btns .btn { flex: 1; width: auto; }
.as-msg { display: none; margin: 0 0 var(--sp-2); text-align: center; }
.as-msg.on { display: block; }
.as-msg.ok { color: var(--good-text); }
.as-msg.err { color: var(--critical-text); }
.muted.as-err { margin-top: var(--sp-2); color: var(--critical-text); }
.muted.as-warn { color: var(--serious); }
.as-tap { cursor: pointer; }
.as-radio { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-footnote); font-weight: 600; cursor: pointer; }
.as-radio + .as-radio { margin-top: var(--sp-3); }
.as-radio > input[type="radio"] { flex: none; margin-top: 2px; }
.muted.as-hint { display: block; font-size: var(--fs-caption); font-weight: 400; }
.as-check-label { display: flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-footnote); font-weight: 600; color: var(--accent); cursor: pointer; }
.as-check-label > input[type="checkbox"] { width: 18px; height: 18px; flex: none; }
.as-label-clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-subhead); font-weight: 500; color: var(--label); }
.muted.as-lock { flex: none; font-size: var(--fs-caption); }
.as-row > .as-num-input { width: 76px; flex: none; }
.as-icon-del { display: inline-flex; align-items: center; padding: 0 var(--sp-1); border: none; background: none; color: var(--label-3); font-size: 20px; cursor: pointer; }
.as-action-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); }
.ui-btn.as-dismiss { color: var(--label-2); text-decoration: underline; }
.as-detail { margin-top: var(--sp-2); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); white-space: pre-wrap; }
.card.as-hist { padding: var(--sp-1) var(--sp-4); }
.muted.as-fineprint { margin-top: var(--sp-1); font-size: var(--fs-caption); text-align: center; }
.as-suggest { margin-bottom: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--accent-soft); }
.as-suggest-head { margin-bottom: var(--sp-1); font-weight: 600; }
.as-suggest-row { display: flex; justify-content: space-between; font-size: var(--fs-subhead); }
.as-sum { margin-top: var(--sp-3); font-weight: 600; }
.as-sum .ui-badge { margin-left: var(--sp-1); }
/* ---- 我 (#/me, #/memories, #/push-settings, #/security) ---- */
.me-footer { margin: var(--sp-6) 0 0; text-align: center; font-size: var(--fs-footnote); color: var(--label-3); }
.me-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.me-textarea { display: block; min-height: 76px; padding: var(--sp-2) var(--sp-3); line-height: var(--lh-body); resize: vertical; }
.me-time { width: 110px; flex: none; text-align: right; }
.me-sheet-note { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-2) 0 var(--sp-4); }
.me-sheet-note p { margin: 0; font-size: var(--fs-subhead); line-height: var(--lh-subhead); color: var(--label-2); }
.me-field { display: flex; align-items: center; gap: var(--sp-3); }
.me-field > span { flex: none; font-size: var(--fs-subhead); color: var(--label-2); }
.me-field .ui-input { flex: 1; }

/* ---- 对话 rich cards (assistant.js) ---- */
.chat-approval { margin: 10px 0; }
.chat-approval-head { display: flex; align-items: center; gap: 6px; font-size: var(--fs-footnote); color: var(--label-2); }
.chat-approval-head .ui-icon { color: var(--warning); }
.chat-approval-title { margin-top: 4px; font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; }
.chat-approval-detail { margin-top: 6px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--fill); color: var(--label-2); font-size: var(--fs-subhead); line-height: var(--lh-subhead); white-space: pre-wrap; max-height: 200px; overflow: auto; }
.chat-approval-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-subhead); color: var(--label-2); }
.chat-approval-status .ui-icon { font-size: 18px; }
.chat-approval-status.ok .ui-icon { color: var(--good); }
.chat-approval-status.bad .ui-icon { color: var(--critical); }

.chat-tool-card { display: flex; align-items: center; gap: var(--sp-3); margin: 8px 0; padding: 9px var(--sp-3); border-radius: var(--r-md); background: var(--fill); }
.chat-tool-tile { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--tile, var(--accent)); color: #fff; font-size: 17px; flex: none; }
.chat-tool-body { flex: 1; min-width: 0; }
.chat-tool-label { display: block; font-size: var(--fs-caption); color: var(--label-2); }
.chat-tool-text { display: block; font-size: var(--fs-subhead); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-tool-link { flex: none; font-size: var(--fs-subhead); color: var(--accent); text-decoration: none; }
.chat-tool-undo { flex: none; border: none; background: none; color: var(--accent); font: inherit; font-size: var(--fs-subhead); cursor: pointer; padding: 0; }
.chat-tool-undone { flex: none; font-size: var(--fs-subhead); color: var(--label-2); }

.chat-email-card { margin: 8px 0; border-radius: var(--r-md); background: var(--fill); }
.chat-email-head { display: flex; align-items: center; gap: 6px; padding: 9px var(--sp-3) 4px; font-size: var(--fs-footnote); color: var(--label-2); }
.chat-email-head .ui-icon { color: var(--accent); }
.chat-email-row { display: block; padding: 7px var(--sp-3) 9px; color: inherit; text-decoration: none; }
.chat-email-row + .chat-email-row { border-top: 0.5px solid var(--separator); }
.chat-email-subject { font-size: var(--fs-subhead); line-height: var(--lh-subhead); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-email-meta { margin-top: 1px; font-size: var(--fs-caption); color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-log .act-row .act-mark .ui-icon { font-size: 15px; }

/* ------------------------------------------------------------------ WP6 english.js */
/* Legacy English screens: the classes below replace inline styles / raw colours that
   used to live in the templates. Selectors are doubled up (.card.en-x) where they have
   to beat ui/legacy.css, which is loaded AFTER this file. */

/* top search bar — the sprite icon replaces the magnifier emoji that sat in the placeholder */
.en-search-icon {
  position: absolute; left: var(--sp-3); top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; font-size: 16px; color: var(--label-3); pointer-events: none;
}
.en-search-wrap .en-search-input { padding-left: 38px; }

/* streak line above the segmented control */
.en-status {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 2px var(--sp-2); font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  color: var(--label-2);
}
.en-status > .ui-icon { font-size: 15px; color: var(--accent); }

/* sprite icons inside the small legacy pills and widget titles (were emoji) */
.mini-btn .ui-icon { font-size: 14px; vertical-align: -0.28em; }
.en-add-word .ui-icon, .en-pop-add .ui-icon, .en-d-add .ui-icon { margin-right: 2px; }
.widget-title .ui-icon { font-size: 15px; vertical-align: -0.28em; }
.en-check { width: 16px; height: 16px; accent-color: var(--accent); }
.en-check-label {
  display: flex; align-items: center; gap: 5px; flex: none;
  font-size: var(--fs-caption); color: var(--label-2);
}

/* ---- 对话 ---- */
.en-scenario-icon { color: var(--accent); }
.en-scenario-icon .ui-icon { display: block; }
.list-item.en-past-row { cursor: pointer; }
.en-past-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.en-past-date { flex: none; }

.card.en-session-card { padding: var(--sp-3) var(--sp-4); }
.en-session-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.en-session-head-text { flex: 1; min-width: 0; }
.en-session-title { font-size: var(--fs-subhead); line-height: var(--lh-subhead); font-weight: 600; }
.en-chat-mode-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: 6px 2px 0; }
.btn.en-btn-compact {
  width: auto; flex: none; min-height: 36px; padding: 0 14px;
  font-size: var(--fs-footnote); gap: 6px;
}
.en-asr-hint { flex: 1; min-width: 0; align-self: center; }
.en-voice-orb .ui-icon { font-size: 30px; }
.en-voice-actions .btn { gap: 6px; }

.en-score-tile { background: var(--surface-2); border: none; }
.en-score-icon { line-height: 1; color: var(--accent); }
.en-report-block { margin-top: var(--sp-3); }
.en-report-label { margin-bottom: 6px; font-size: var(--fs-footnote); font-weight: 600; color: var(--label-2); }
.list-item.en-expr-row { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; }
.en-expr-body { flex: 1; min-width: 0; }
.en-expr-en { font-size: var(--fs-subhead); font-weight: 600; }
.en-report-tip {
  margin-top: var(--sp-3); padding: 10px var(--sp-3); border-radius: var(--r-md);
  background: var(--surface-2); font-size: var(--fs-footnote); line-height: 1.6;
}
.en-report-tip p { margin: 0; }
.en-report-next { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; color: var(--label-2); }
.en-report-next .ui-icon { font-size: 14px; margin-top: 2px; }

/* ---- 跟读 ---- */
.kpi-tile.en-shadow-kpi { margin-bottom: var(--sp-3); }
.en-shadow-kpi .ui-icon { font-size: 15px; vertical-align: -0.3em; margin-right: 4px; }
.en-shadow-controls { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin: 0 2px 10px; }
.en-shadow-row { display: flex; gap: var(--sp-2); align-items: flex-start; }
.en-shadow-main { flex: 1; min-width: 0; }
.en-shadow-en { font-size: var(--fs-subhead); line-height: 1.5; font-weight: 600; }
.en-shadow-zh { margin-top: var(--sp-1); }
.en-shadow-focus { color: var(--accent); background: var(--accent-soft); }
.en-shadow-focus .ui-icon { font-size: 14px; vertical-align: -0.25em; }
.en-shadow-result { margin-top: var(--sp-2); }
.en-shadow-words { line-height: 1.7; }
.en-shadow-said { margin-top: 6px; }
.en-shadow-score {
  display: flex; align-items: center; gap: 6px; margin-top: var(--sp-1);
  font-size: var(--fs-subhead); font-weight: 600;
}
.en-shadow-best { margin-top: 6px; }

/* ---- 阅读 ---- */
.en-read-head { display: flex; align-items: center; gap: var(--sp-2); }
.en-read-title { flex: 1; margin: 0; }
.en-read-meta { margin: var(--sp-1) 0 10px; }
.en-read-passage { font-size: var(--fs-subhead); line-height: 1.8; }
.list-item.en-word-row { display: flex; gap: var(--sp-2); align-items: baseline; }
.en-word-term { flex: none; }
.en-word-meaning { flex: 1; font-size: var(--fs-footnote); color: var(--label-2); }
.en-quiz { margin-bottom: var(--sp-4); }
.en-quiz-q { margin-bottom: var(--sp-2); font-size: var(--fs-subhead); font-weight: 600; }
.en-explain .ui-badge { vertical-align: middle; }
.en-pop-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.en-pop-word { font-size: var(--fs-headline); }
.en-pop-add { margin-left: auto; }
.en-pop-meaning { margin-top: 6px; font-size: var(--fs-footnote); }
.en-pop-example { margin-top: var(--sp-1); }

/* ---- 词汇 ---- */
.en-review-head { display: flex; align-items: center; gap: 10px; }
.en-review-head-text { flex: 1; }
.en-review-empty { margin: 6px 0 0; }
.en-vocab-add-row { display: flex; gap: var(--sp-2); }
.en-vocab-add-row input[type="text"] { flex: 1; min-width: 0; width: auto; }
.btn.en-vocab-add { width: auto; flex: none; padding: 0 var(--sp-4); }
.en-vocab-hint { margin: 6px 0 0; }
.en-review-done { text-align: center; padding: 10px 0; }
.en-review-done > .ui-icon { font-size: 30px; color: var(--good); }
.en-review-done-title { margin-top: 6px; font-size: var(--fs-headline); font-weight: 700; }
.en-review-done p { margin: var(--sp-1) 0 0; }
.en-fc-progress { margin-bottom: var(--sp-2); }
.en-fc { cursor: pointer; text-align: center; padding: var(--sp-4) 0; }
.en-fc-word { font-size: var(--fs-title); font-weight: 700; }
.en-fc-back { margin-top: 10px; }
.en-fc-meaning { font-size: var(--fs-headline); color: var(--accent); }
.en-fc-example { margin-top: 6px; }
.en-fc-hint { margin-top: 10px; }
.en-fc-grades { display: flex; gap: var(--sp-2); margin-top: 6px; }
.en-grade { flex: 1; }
.list-item.en-word-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.en-word-body { flex: 1; min-width: 0; }
.en-word-example { margin-top: var(--sp-1); }
.en-word-due { display: inline-flex; align-items: center; gap: 4px; }
.en-del {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 32px; height: 32px; margin: -6px -6px -6px 0; padding: 0;
  border: none; background: none; color: var(--label-3); font-size: 18px; cursor: pointer;
}
.en-del:active { color: var(--critical-text); }

/* ---- 词典 ---- */
.en-hist-row { flex-wrap: wrap; }
.en-hist-row > .muted { flex: 1 0 100%; margin: 0; }
.en-pill-btn { cursor: pointer; font-family: inherit; }
.en-d-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.en-d-word { font-size: var(--fs-title); font-weight: 700; }
.en-d-add { margin-left: auto; }
.en-d-trans { margin-top: 10px; font-size: var(--fs-subhead); line-height: 1.7; }
.en-d-def { margin-top: var(--sp-2); line-height: 1.5; }
.en-d-example { margin-top: var(--sp-2); }
.en-block-top { margin-top: var(--sp-3); border-top: 0.5px solid var(--separator); padding-top: var(--sp-2); }
.en-d-sug-label { margin-bottom: 6px; }
.en-t-dir {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: var(--fs-footnote); color: var(--label-2);
}
.en-t-src { margin-bottom: var(--sp-2); font-size: var(--fs-footnote); }
.en-t-row { display: flex; align-items: flex-start; gap: var(--sp-2); }
.en-t-out { flex: 1; font-size: var(--fs-body); font-weight: 600; line-height: 1.5; }
.en-t-speak, .en-t-copy { flex: none; }
.en-t-alt-label { margin-bottom: var(--sp-1); }
.en-t-alt { margin-top: 2px; font-size: var(--fs-subhead); }
.en-t-notes { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }
.en-t-notes .ui-icon { font-size: 14px; margin-top: 2px; color: var(--accent); }

/* ------------------------------------------------------- WP6 app.js — 邮件 / 资讯 / 目标 */

.ms-stack { margin-top: var(--sp-2); }
/* #send-btn carries an inline display:block (the JS toggles it), so `gap` can't apply:
   space the leading icon with a margin instead */
.ms-btn-icon .ui-icon { margin-right: 6px; vertical-align: -0.15em; }

.list-item.ms-mail-row { display: block; text-decoration: none; color: inherit; }
.ms-mail-summary {
  margin-top: 6px; font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--label-2);
}
.ms-mail-subject {
  margin-bottom: 6px; font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600;
}
.ms-mail-meta {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: 10px;
  font-size: var(--fs-footnote); color: var(--label-2);
}
.ms-mail-body { white-space: pre-wrap; font-size: var(--fs-subhead); line-height: 1.6; }
.ms-mail-status { margin-top: var(--sp-2); font-size: var(--fs-footnote); color: var(--label-2); }
.ms-reply-text { margin-top: 10px; }
.ms-confirm-to { margin-bottom: var(--sp-2); font-size: var(--fs-footnote); color: var(--label-2); }
.ms-confirm-body {
  white-space: pre-wrap; padding: 10px; border-radius: var(--r-sm);
  background: var(--surface-2); font-size: var(--fs-subhead); line-height: 1.6;
}
.ms-confirm-note { margin: var(--sp-2) 0 0; font-size: var(--fs-footnote); color: var(--label-2); }

/* (legacy ms-news-* rules retired with the v1.16 viewNews — replaced by news-* below) */

.list-item.ms-goal-row { display: flex; align-items: flex-start; gap: 10px; }
.ms-goal-check { width: 18px; height: 18px; flex: none; margin-top: 3px; accent-color: var(--accent); }
.ms-goal-body { flex: 1; min-width: 0; }
.ms-goal-title.done { text-decoration: line-through; color: var(--label-3); }
.ms-goal-desc { margin-top: 3px; font-size: var(--fs-footnote); color: var(--label-2); }
.ms-goal-date {
  display: flex; align-items: center; gap: 4px; margin-top: 3px;
  font-size: var(--fs-caption); color: var(--label-3);
}
.ms-del {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 32px; height: 32px; margin: -6px -6px -6px 0; padding: 0;
  border: none; background: none; color: var(--label-3); font-size: 18px; cursor: pointer;
}
.ms-del:active { color: var(--critical-text); }

/* ---- 今日 ---- */
.today-page { padding-bottom: var(--sp-2); }

.today-brief { display: flex; gap: var(--sp-3); align-items: flex-start; }
.today-brief-icon { flex: none; margin-top: 2px; color: var(--accent); font-size: 18px; }
.today-brief-body { flex: 1; min-width: 0; }
.today-brief-title { display: block; font-size: var(--fs-subhead); line-height: var(--lh-subhead); font-weight: 700; }
.today-brief-text {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: var(--sp-1); font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  color: var(--label-2); white-space: pre-wrap;
}
.today-brief-full {
  max-height: 60vh; overflow-y: auto; white-space: pre-wrap;
  font-size: var(--fs-subhead); line-height: 1.6; color: var(--label-2);
}
.today-quiet { display: flex; align-items: center; gap: var(--sp-2); color: var(--label-3); font-size: var(--fs-footnote); }
.today-quiet .ui-icon { font-size: 16px; }

.today-section-action {
  border: none; background: none; padding: 2px 0; cursor: pointer; text-decoration: none;
  color: var(--accent); font-size: var(--fs-footnote); font-weight: 600; font-family: inherit;
}

.today-rings { display: flex; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2); }
.today-ring { flex: 1; min-width: 0; display: flex; justify-content: center; color: inherit; text-decoration: none; }
.today-ring:active { opacity: 0.7; }

.today-insight { display: flex; gap: var(--sp-3); align-items: flex-start; }
.today-insight-icon { flex: none; margin-top: 2px; color: var(--accent); font-size: 18px; }
.today-insight-body { flex: 1; min-width: 0; }
.today-insight-title { display: block; font-size: var(--fs-subhead); line-height: var(--lh-subhead); font-weight: 700; }
.today-insight-text {
  display: block; margin-top: var(--sp-1); font-size: var(--fs-footnote);
  line-height: var(--lh-footnote); color: var(--label-2); white-space: pre-wrap;
}

.today-approval-title { font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 700; }
.today-approval-detail {
  margin-top: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--label-2);
  font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  white-space: pre-wrap; max-height: 40vh; overflow-y: auto;
}
.today-approval-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }

.today-skel { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: var(--sp-2); }
.today-skel-rings { display: flex; gap: var(--sp-2); }
.today-skel-rings > * { flex: 1; }

/* composer pinned above the tab bar (like .chat-composer in style.css) */
.today-composer {
  position: sticky;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) 0 calc(var(--sp-2) + env(safe-area-inset-bottom) / 2);
  margin-top: var(--sp-4);
  background: var(--page);
  border-top: 1px solid var(--border);
  z-index: 4;
}
.today-composer-input { flex: 1; min-width: 0; }
.today-composer .icon-btn, .today-composer .send-btn { width: 40px; height: 40px; flex: none; }
.today-composer .send-btn:disabled { opacity: 0.4; }

/* ---- 待办 (rows + sheet, shared by 今日/待办 pages) ---- */
.todos-row {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
}
.todos-row:last-child { border-bottom: none; }
.todos-check {
  flex: none; border: none; background: none; padding: 0; margin-top: 1px;
  color: var(--label-3); font-size: 22px; line-height: 1; cursor: pointer;
}
.todos-check .ui-icon { font-size: 22px; }
.todos-row.done .todos-check { color: var(--accent); }
.todos-row-body { flex: 1; min-width: 0; cursor: pointer; }
.todos-row-title { font-size: var(--fs-subhead); line-height: var(--lh-subhead); }
.todos-row.done .todos-row-title { text-decoration: line-through; color: var(--label-3); }
.todos-row-due {
  margin-top: 2px; font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--label-2);
}

.todos-page { padding-bottom: var(--sp-4); }
.todos-page .ui-seg { margin: var(--sp-2) 0 0; }
.todos-skel { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: var(--sp-4); }

.todos-sheet-input { width: 100%; resize: none; padding: var(--sp-3); font-size: var(--fs-subhead); line-height: var(--lh-subhead); }
.todos-sheet-parse { min-height: 24px; margin: var(--sp-2) 0 var(--sp-1); }
.todos-sheet-hint { font-size: var(--fs-caption); color: var(--label-3); }
.todos-field { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-top: 1px solid var(--border); }
.todos-field-label { flex: none; width: 3em; font-size: var(--fs-subhead); color: var(--label-2); }
.todos-field input { flex: 1; min-width: 0; }
.todos-field-clear {
  flex: none; border: none; background: none; cursor: pointer; padding: var(--sp-1);
  color: var(--label-3); font-size: var(--fs-footnote); font-family: inherit;
}
.todos-delete { margin-top: var(--sp-3); }
.todos-delete .ui-row { padding-left: 0; padding-right: 0; }

/* ---- 短信 (#/sms, v1.17) ---- */
.sms-page { padding-bottom: var(--sp-4); }
.sms-page .ui-seg { margin: var(--sp-2) 0 0; }
.sms-skel { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: var(--sp-4); }
.sms-more { display: flex; justify-content: center; padding: var(--sp-3) 0; }

/* handled rows read as done: dimmed tile + struck-through-grey text */
.ui-row.sms-handled .ui-row-title, .ui-row.sms-handled .ui-row-sub { color: var(--label-3); }
.ui-row.sms-handled .ui-row-tile { opacity: 0.45; }

/* detail sheet */
.sms-detail { padding-bottom: var(--sp-2); }
.sms-detail-meta { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.sms-detail-time { font-size: var(--fs-footnote); color: var(--label-2); }
.sms-detail-summary { margin-top: var(--sp-2); font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; }
.sms-detail-body {
  margin: var(--sp-3) 0 0; padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--surface-2); white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: var(--fs-subhead); line-height: 1.6; color: var(--label);
  -webkit-user-select: text; user-select: text;
}
.sms-detail-suggest {
  display: flex; align-items: baseline; gap: var(--sp-2); margin-top: var(--sp-3);
  padding: var(--sp-3); border-radius: var(--r-md); background: var(--accent-soft);
  font-size: var(--fs-subhead); line-height: var(--lh-subhead);
}
.sms-detail-label { flex: none; font-size: var(--fs-caption); font-weight: 600; color: var(--accent); }
.sms-detail-due { display: flex; align-items: center; gap: 6px; margin-top: var(--sp-2); font-size: var(--fs-footnote); color: var(--label-2); }
.sms-detail-due .ui-icon { font-size: 15px; }
.sms-detail-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.sms-detail-delete { margin-top: var(--sp-3); }
.sms-detail-delete .ui-row { padding-left: 0; padding-right: 0; }

/* setup sheet */
.sms-setup { padding-bottom: var(--sp-2); }
.sms-setup-status {
  display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-3);
  font-size: var(--fs-subhead); color: var(--label-2);
}
.sms-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-4); flex: none; }
.sms-dot.on { background: var(--good); }
.sms-field { margin-bottom: var(--sp-3); }
.sms-field-label { margin-bottom: var(--sp-1); font-size: var(--fs-footnote); color: var(--label-2); }
.sms-copybox {
  display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm); background: var(--surface-2); border: 0.5px solid var(--separator);
}
.sms-copybox code {
  flex: 1; min-width: 0; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); color: var(--label);
}
.sms-setup-actions { display: flex; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-1); }
.sms-setup-warn { margin: 0 0 var(--sp-2); font-size: var(--fs-caption); color: var(--label-3); }
.sms-steps {
  margin: 0; padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 1.2em);
  font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2);
}
.sms-steps li { margin-bottom: var(--sp-2); }
.sms-steps li:last-child { margin-bottom: 0; }
.sms-steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--fill); padding: 0 4px; border-radius: 4px; color: var(--label); word-break: break-all;
}

/* ---- 电脑 (v1.18 #/pc) ---- */
.pc-page { padding-bottom: var(--sp-4); }
.pc-skel { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: var(--sp-4); }

/* status header card */
.pc-hero {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-top: var(--sp-4); padding: var(--sp-4);
  border-radius: var(--r-lg); background: var(--surface-1); box-shadow: var(--shadow-1);
}
.pc-hero-icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: var(--r-md); background: var(--tile, var(--accent)); color: #fff; font-size: 30px; }
.pc-hero-body { flex: 1; min-width: 0; }
.pc-hero-name { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 700; }
.pc-hero-status { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: var(--fs-subhead); line-height: var(--lh-subhead); color: var(--label-2); }
.pc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-4); flex: none; }
.pc-dot.on { background: var(--good); }
.pc-dot.off { background: var(--label-4); }
.pc-dot.paused { background: var(--warning); }

/* 直接执行 composer */
.pc-run { padding: var(--sp-2) 0 var(--sp-1); }
.pc-input {
  display: block; width: 100%; min-height: 88px; padding: var(--sp-3);
  border: none; border-radius: var(--r-sm); background: var(--fill); color: var(--label);
  font: inherit; font-size: var(--fs-subhead); line-height: var(--lh-subhead); resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.pc-input::placeholder { color: var(--label-3); font-family: inherit; }
.pc-input:focus { outline: 2px solid var(--accent-soft); }
.pc-run-btns { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }

/* confirm sheet for 直接执行 */
.pc-confirm { padding: 0 0 var(--sp-2); }
.pc-confirm-cmd {
  margin: 0; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); line-height: 1.6; color: var(--label);
  white-space: pre-wrap; word-break: break-word;
}
.pc-confirm-note {
  display: flex; align-items: flex-start; gap: 6px; margin-top: var(--sp-2);
  font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--label-2);
}
.pc-confirm-note .ui-icon { font-size: 14px; margin-top: 2px; flex: none; }
.pc-confirm-note.danger { color: var(--critical-text); }
.pc-confirm-note.danger .ui-icon { color: var(--critical); }
.pc-confirm-btns { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.pc-confirm-btns .ui-btn { flex: 1; }
.pc-confirm-err { margin-top: var(--sp-2); font-size: var(--fs-footnote); color: var(--critical-text); }

/* setup sheet */
.pc-setup { padding-bottom: var(--sp-2); }
.pc-setup-status { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-3); font-size: var(--fs-subhead); color: var(--label-2); }
.pc-setup-warn { margin: var(--sp-2) 0 0; font-size: var(--fs-caption); color: var(--label-3); }
.pc-steps { margin: 0; padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 1.2em); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); }
.pc-steps li { margin-bottom: var(--sp-2); }
.pc-steps li:last-child { margin-bottom: 0; }

/* command detail (#/pc/<id>) */
.pc-detail-hero { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); }
.pc-detail-hero .ui-icon { font-size: 22px; flex: none; }
.pc-detail-status { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 700; }
.pc-detail-sub { margin-top: 2px; font-size: var(--fs-subhead); color: var(--label-2); }
.pc-status-running { color: var(--accent); }
.pc-status-ok { color: var(--good-text); }
.pc-status-bad { color: var(--critical-text); }
.pc-status-pending { color: var(--label-2); }
.pc-detail-block { padding: var(--sp-3) var(--sp-4); }
.pc-cmdbox { position: relative; margin: 0; padding: var(--sp-3); border-radius: var(--r-sm); background: var(--fill); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-footnote); line-height: 1.6; color: var(--label); white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.pc-cmdbox-copy { position: absolute; top: var(--sp-2); right: var(--sp-2); }
.pc-cmdbox:has(.pc-cmdbox-copy) { padding-right: 76px; min-height: 48px; }   /* keep text clear of the button */
.pc-input::placeholder { font-family: var(--font); }
.pc-kv { display: flex; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); font-size: var(--fs-subhead); line-height: var(--lh-subhead); }
.pc-kv + .pc-kv { border-top: 0.5px solid var(--separator); }
.pc-kv-label { flex: none; color: var(--label-2); }
.pc-kv-value { flex: 1; min-width: 0; word-break: break-all; }
.pc-kv-value a { color: var(--accent); text-decoration: none; font-weight: 600; }
.pc-out-block {
  margin: 0; padding: var(--sp-3) var(--sp-4); max-height: 50vh; overflow: auto; overscroll-behavior: contain;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); line-height: 1.6; color: var(--label);
  white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text;
}
.pc-out-err { color: var(--critical-text); }
.pc-shot-block { padding: var(--sp-3) var(--sp-4); }
.pc-shot-full { display: block; width: 100%; border-radius: var(--r-sm); }
.pc-detail-cancel { display: flex; justify-content: center; padding: var(--sp-4) 0 0; }
.pc-plain { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-subhead); color: var(--label-2); }
.pc-copybtn { flex: none; }

/* ---- PC 审批卡 (chat / feed / 今日, v1.18) ---- */
/* head row: icon + 在电脑上执行 · device + risk badge */
.chat-approval-head .pc-risk { margin-left: auto; }
.pc-risk.read { background: var(--fill); color: var(--label-2); }
.pc-risk.change { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--label); }
.pc-risk.danger { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical-text); }
.chat-approval-device { color: var(--label-2); }
.feed-result a { color: var(--accent); font-weight: 600; text-decoration: none; }

.chat-approval-cmd {
  margin-top: 8px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  background: var(--fill); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); line-height: 1.6; color: var(--label);
  white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text;
}
.chat-approval-cmd.collapsed { position: relative; max-height: 12.8em; overflow: hidden; }
.chat-approval-cmd.collapsed::after {
  content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3em;
  background: linear-gradient(transparent, var(--fill));
}
.pc-cmd-expand { display: inline-block; margin: 4px 0 0; border: none; background: none; padding: 0; color: var(--accent); font: inherit; font-size: var(--fs-footnote); cursor: pointer; }
.chat-approval-meta { margin-top: 6px; font-size: var(--fs-footnote); color: var(--label-2); }
.ui-btn.pc-armed { background: var(--critical); color: var(--on-accent); }
.feed-actions .btn.pc-armed { background: var(--critical); color: var(--on-accent); }

/* live status card in chat (after approving) */
.pc-live { margin-top: 10px; }
.pc-live-status { display: flex; align-items: center; gap: 6px; font-size: var(--fs-subhead); color: var(--label-2); }
.pc-live-status .ui-icon { font-size: 17px; }
.pc-live-status.ok .ui-icon { color: var(--good); }
.pc-live-status.bad .ui-icon { color: var(--critical); }
.pc-spin {
  display: inline-block; width: 14px; height: 14px; flex: none;
  border: 2px solid var(--fill-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: pc-spin 0.8s linear infinite;
}
@keyframes pc-spin { to { transform: rotate(360deg); } }
.pc-live-cancel { margin-left: auto; border: none; background: none; padding: 0; color: var(--accent); font: inherit; font-size: var(--fs-subhead); cursor: pointer; }
.pc-live-tail {
  margin: 6px 0 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--fill);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-caption); line-height: 1.5; color: var(--label-2);
  white-space: pre-wrap; word-break: break-word;
}
.pc-live-out {
  margin: 6px 0 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--fill);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); line-height: 1.6; color: var(--label);
  white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text;
}
.pc-live-out.pc-out-err { color: var(--critical-text); }
.pc-live-shot { display: block; width: 100%; margin-top: 8px; border-radius: var(--r-md); background: var(--fill); }
.pc-conv-note { margin: 10px 0; text-align: center; font-size: var(--fs-caption); color: var(--label-3); }
.pc-shot-sheet { display: flex; justify-content: center; padding: var(--sp-2) 0 var(--sp-4); }
.pc-shot-sheet img { max-width: 100%; max-height: 72vh; border-radius: var(--r-sm); }

/* feed PC approval card */
.pc-feed-cmd {
  margin-top: 6px; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-caption); line-height: 1.6; color: var(--label);
  white-space: pre-wrap; word-break: break-word;
}
.pc-feed-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fs-footnote); color: var(--label-2); }

/* 今日 approval sheet (PC variant) */
.pc-sheet-cmd {
  margin-top: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); line-height: 1.6; color: var(--label);
  white-space: pre-wrap; word-break: break-word;
}
.pc-sheet-res { margin-top: var(--sp-3); text-align: center; font-size: var(--fs-subhead); color: var(--label-2); }
.pc-sheet-res a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* recent-command rows whose first line is the raw command */
.pc-row-cmd .ui-row-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-subhead);
}
/* the monitor icon in a PC approval card head reads as the device, not a warning */
.chat-approval.pc .chat-approval-head .ui-icon { color: var(--accent); }

/* token / command copy boxes (setup sheet + detail) */
.pc-field { margin-bottom: var(--sp-3); }
.pc-field-label { margin-bottom: var(--sp-1); font-size: var(--fs-footnote); color: var(--label-2); }
.pc-copybox {
  display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm); background: var(--surface-2); border: 0.5px solid var(--separator);
}
.pc-copybox code {
  flex: 1; min-width: 0; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-footnote); color: var(--label);
}

/* ---- 资讯 2.0 (v1.19 #/news) ---- */
.news-page { --news-serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif; padding-bottom: var(--sp-4); }
.news-skel { display: flex; flex-direction: column; gap: var(--sp-4); }
.news-segrow { margin: var(--sp-2) 0 0; }

/* masthead */
.news-masthead { margin-top: var(--sp-4); }
.news-dateline { margin: 0; font-size: 12px; line-height: 16px; letter-spacing: 0.08em; font-weight: 600; color: var(--label-3); }
.news-lede { margin: var(--sp-2) 0 0; font-family: var(--news-serif); font-size: var(--fs-body); line-height: 1.7; color: var(--label-2); }
.news-rule { margin: var(--sp-4) 0 0; border: none; border-top: 0.5px solid var(--separator); }

/* typographic item (精选 / 全部 / 收藏) — no boxes, no shadows */
.news-item { margin-top: var(--sp-4); }
.news-item-link, a.news-row { display: block; color: inherit; text-decoration: none; }
.news-kicker { margin: 0; font-size: 12px; line-height: 16px; letter-spacing: 0.05em; color: var(--label-3); }
.news-headline { margin: 6px 0 0; font-family: var(--news-serif); font-size: 21px; line-height: 1.35; font-weight: 700; color: var(--label); }
.news-item.opened .news-headline, a.news-row.opened .news-headline { color: var(--label-2); }
.news-why {
  margin: var(--sp-2) 0 0; padding-left: 10px; border-left: 2px solid var(--separator);
  font-size: var(--fs-subhead); line-height: 1.55; color: var(--label-2);
}
.news-votes { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.news-vote {
  display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 var(--sp-3);
  border: none; border-radius: var(--r-pill); background: var(--fill); color: var(--label-2);
  font: inherit; font-size: var(--fs-footnote); font-weight: 500; cursor: pointer;
}
.news-vote .ui-icon { font-size: 14px; }
.news-vote:active { opacity: 0.6; }
.news-vote.on { background: var(--accent-soft); color: var(--accent); }
.news-vote:disabled { cursor: default; }
a.news-row { padding: var(--sp-3) 0; border-bottom: 0.5px solid var(--separator); }
a.news-row:last-child { border-bottom: none; }
.news-row-summary {
  margin: 6px 0 0; font-size: var(--fs-footnote); line-height: 1.5; color: var(--label-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-more { display: flex; justify-content: center; padding: var(--sp-4) 0; }

/* issue footer + 往期 */
.news-issue-foot { margin: var(--sp-5) 0 0; font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--label-2); }
.news-issue-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.news-h2 { margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-footnote); line-height: var(--lh-footnote); font-weight: 600; color: var(--label-2); }
.news-past-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* shared pill chip (category / board / 往期) */
.news-chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 var(--sp-3);
  border: 0.5px solid var(--separator); border-radius: var(--r-pill);
  background: none; color: var(--label-2); font: inherit; font-size: var(--fs-footnote); font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.news-chip[aria-current="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }

/* generating (running) state */
.news-building {
  display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-5);
  padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-1);
  font-size: var(--fs-subhead); line-height: var(--lh-subhead); color: var(--label-2);
}
.news-building .ui-icon { flex: none; color: var(--accent); margin-top: 2px; }
.news-building-sub { display: block; margin-top: 2px; font-size: var(--fs-footnote); color: var(--label-3); }

/* ---- reader (#/news/a/<id>) ---- */
.news-reader { padding-bottom: var(--sp-4); }
.news-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; pointer-events: none; }
.news-progress > div { height: 100%; background: var(--accent); transform-origin: 0 50%; }
/* reader nav: back link + source name (no large title — the article title is it) */
.ui-nav-source { flex: 1; min-width: 0; text-align: center; font-size: var(--fs-footnote); font-weight: 600; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-reader-title { margin: 6px 0 0; font-family: var(--news-serif); font-size: 26px; line-height: 1.3; font-weight: 700; }
.news-reader-meta { margin: var(--sp-2) 0 0; font-size: var(--fs-footnote); color: var(--label-3); }
.news-pull {
  margin: var(--sp-4) 0 0; padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--accent-soft); font-family: var(--news-serif);
  font-size: var(--fs-subhead); line-height: 1.6; color: var(--label);
}
.news-pull-label { display: block; margin-bottom: 2px; font-family: var(--font); font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.04em; color: var(--accent); }
.news-body { margin: var(--sp-5) 0 0; max-width: 34em; font-size: 18px; line-height: 1.75; color: var(--label); -webkit-user-select: text; user-select: text; }
.news-body p { margin: 0 0 1.15em; }
.news-body h2, .news-body h3 { font-family: var(--news-serif); margin: 1.4em 0 0.5em; line-height: 1.4; }
.news-body h2 { font-size: 20px; }
.news-body h3 { font-size: 18px; }
.news-body blockquote { margin: 1.2em 0; padding-left: 12px; border-left: 2px solid var(--separator); color: var(--label-2); }
.news-body img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.news-body figure { margin: 1.4em 0; }
.news-body figcaption { margin-top: 6px; font-size: var(--fs-footnote); line-height: 1.5; color: var(--label-3); }
.news-body a { color: var(--accent); }
.news-nobody { margin: var(--sp-5) 0 0; }
.news-body-summary { margin: 0; font-size: var(--fs-body); line-height: 1.6; color: var(--label-2); }
.news-nobody-note { display: flex; align-items: center; gap: 6px; margin: var(--sp-2) 0 var(--sp-3); font-size: var(--fs-footnote); color: var(--label-3); }
.news-nobody-note .ui-icon { flex: none; }
.news-nobody .ui-btn { text-decoration: none; }

.news-readerbar {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  display: flex; gap: var(--sp-2); margin-top: var(--sp-6);
  padding: var(--sp-2) 0 calc(var(--sp-2) + env(safe-area-inset-bottom) / 2);
  background: var(--bg); border-top: 1px solid var(--border); z-index: 4;
}
.news-readerbar .ui-btn { flex: 1; }
.news-readerbar .ui-btn.saved { background: var(--accent-soft); color: var(--accent); }

/* ---- 热榜 ---- */
.news-chipbar { display: flex; gap: var(--sp-2); overflow-x: auto; margin: var(--sp-3) 0 0; padding: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.news-chipbar::-webkit-scrollbar { display: none; }
.news-hotmeta-line { margin: var(--sp-2) 0 0; font-size: var(--fs-footnote); color: var(--label-3); }
.news-stale { display: flex; align-items: center; gap: 6px; margin-top: var(--sp-2); font-size: var(--fs-footnote); color: var(--serious); }
.news-stale .ui-icon { flex: none; font-size: 14px; }
.news-hotlist { margin-top: var(--sp-2); }
a.news-hotrow { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 0.5px solid var(--separator); text-decoration: none; color: inherit; }
a.news-hotrow:last-child { border-bottom: none; }
.news-rank { flex: none; width: 30px; font-size: 22px; line-height: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--label-3); text-align: center; }
.news-rank.top { color: var(--accent); }
.news-hotmain { flex: 1; min-width: 0; }
.news-hottitle { font-size: var(--fs-body); line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.news-hotmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.news-srcchip { padding: 1px 7px; border-radius: var(--r-pill); background: var(--fill); color: var(--label-2); font-size: var(--fs-caption); }
.news-heat { font-size: var(--fs-caption); color: var(--label-3); font-variant-numeric: tabular-nums; }
.news-trend { flex: none; font-size: var(--fs-footnote); font-weight: 600; color: var(--label-3); }
.news-trend.new { color: var(--accent); }
.news-trend.up { color: var(--rise); }
.news-trend.down { color: var(--fall); }

/* ---- 全部 ---- */
.news-search { position: relative; margin-top: var(--sp-3); }
.news-search .ui-icon { position: absolute; left: var(--sp-3); top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--label-3); pointer-events: none; }
.news-search .ui-input { padding-left: 38px; }
.news-list { margin-top: var(--sp-3); }

/* ---- 看板 ---- */
.news-selectrow { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; }
.news-select-label { flex: none; font-size: var(--fs-footnote); color: var(--label-2); }
.news-select { min-height: 36px; padding: 0 var(--sp-2); border: 0.5px solid var(--separator); border-radius: var(--r-sm); background: var(--surface-1); color: var(--label); font: inherit; font-size: var(--fs-footnote); }

.news-funnel { display: flex; align-items: stretch; margin-top: var(--sp-4); }
.news-funnel .news-fstep:disabled { opacity: 1; cursor: default; color: inherit; }   /* 抓取 has nothing to expand, but isn't "off" */
.news-fstep { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; border: none; background: none; font: inherit; padding: 0 1px; cursor: pointer; text-align: center; }
.news-fstep[disabled] { cursor: default; }
.news-fstep-label { font-size: var(--fs-caption); color: var(--label-3); }
.news-fstep-count { margin-top: 2px; font-size: var(--fs-headline); line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
.news-fstep-bar { width: 100%; height: 8px; border-radius: 4px; background: var(--series-1); margin-top: 6px; min-width: 8px; }
.news-fstep.picked .news-fstep-bar { background: var(--accent); }
.news-fstep[aria-expanded="true"] .news-fstep-count { color: var(--accent); }
.news-fdrop { flex: none; width: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: var(--fs-caption); line-height: 14px; color: var(--label-3); }
.news-fdrop-n { font-variant-numeric: tabular-nums; }
.news-fdrop-l { color: var(--label-3); }

.news-dropped-wrap { margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-4) var(--sp-3); border-radius: var(--r-md); background: var(--surface-1); }
.news-dropped-head { display: flex; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-1) 0; font-size: var(--fs-footnote); color: var(--label-2); }
.news-dropped { display: flex; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 0.5px solid var(--separator); }
.news-dropped:last-of-type { border-bottom: none; }
.news-dropped-main { flex: 1; min-width: 0; }
.news-dropped-title { font-size: var(--fs-subhead); line-height: var(--lh-subhead); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.news-dropped-reason { margin-top: 2px; font-size: var(--fs-footnote); color: var(--label-3); }
.news-dropped-score { flex: none; font-variant-numeric: tabular-nums; color: var(--label-2); font-size: var(--fs-footnote); }

.news-stat-head { margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-footnote); font-weight: 600; color: var(--label-2); }
.news-srow { display: flex; align-items: center; gap: var(--sp-2); padding: 4px 0; font-size: var(--fs-footnote); }
.news-srow-name { flex: none; width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--label-2); }
.news-srow-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--seq-450); min-width: 8px; }
.news-srow-count { flex: none; font-variant-numeric: tabular-nums; color: var(--label-2); }
.news-topicchips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.news-runinfo { margin-top: var(--sp-2); font-size: var(--fs-footnote); color: var(--label-3); }

.news-chart { display: block; width: 100%; height: 64px; }
.news-chart-legend { display: flex; gap: var(--sp-3); margin-top: 6px; font-size: var(--fs-caption); color: var(--label-2); }
.news-chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.news-chart-dates { display: flex; justify-content: space-between; margin-top: 2px; font-size: var(--fs-caption); color: var(--label-3); }

/* ---- 设置 (推送需求) ---- */
.news-field { margin-top: var(--sp-4); }
.news-field-label { display: block; margin-bottom: var(--sp-2); font-size: var(--fs-footnote); font-weight: 600; color: var(--label-2); }
.news-textarea { display: block; width: 100%; min-height: 84px; padding: var(--sp-3); border: none; border-radius: var(--r-sm); background: var(--fill); color: var(--label); font: inherit; font-size: var(--fs-subhead); line-height: 1.6; resize: vertical; }
.news-textarea:focus, .news-chipadd input:focus, .news-select:focus, .news-time:focus { outline: 2px solid var(--accent-soft); }
.news-taglist { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.news-tag { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 var(--sp-2) 0 var(--sp-3); border-radius: var(--r-pill); background: var(--fill); color: var(--label); font-size: var(--fs-footnote); }
.news-tag-empty { font-size: var(--fs-footnote); color: var(--label-3); }
.news-tag button { display: grid; place-items: center; width: 22px; height: 22px; border: none; border-radius: 50%; background: none; color: var(--label-3); cursor: pointer; }
.news-tag button .ui-icon { font-size: 12px; }
.news-chipadd { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.news-chipadd .ui-input { flex: 1; min-width: 0; }
.news-stepper { display: flex; align-items: center; gap: var(--sp-3); }
.news-stepper button { display: grid; place-items: center; width: 44px; height: 44px; border: none; border-radius: var(--r-sm); background: var(--fill); color: var(--label); font-size: 20px; cursor: pointer; }
.news-stepper button:disabled { opacity: 0.35; cursor: default; }
.news-stepper-val { min-width: 56px; text-align: center; font-size: var(--fs-headline); font-weight: 600; font-variant-numeric: tabular-nums; }
.news-timerow { display: flex; align-items: center; gap: var(--sp-3); }
.news-time { min-height: 44px; padding: 0 var(--sp-2); border: none; border-radius: var(--r-sm); background: var(--fill); color: var(--label); font: inherit; font-size: var(--fs-body); }
.news-field-note { margin: var(--sp-2) 0 0; font-size: var(--fs-caption); color: var(--label-3); }
.news-learned { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 0.5px solid var(--separator); font-size: var(--fs-footnote); }
.news-learned:last-child { border-bottom: none; }
.news-learned-key { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-learned-weight { flex: none; font-variant-numeric: tabular-nums; color: var(--label-2); }
.news-learned-trend { flex: none; width: 16px; text-align: center; font-weight: 700; color: var(--label-3); }
.news-learned-trend.up { color: var(--rise); }
.news-learned-trend.down { color: var(--fall); }
.news-reset { flex: none; min-height: 32px; padding: var(--sp-1) var(--sp-2); border: none; background: none; color: var(--accent); font: inherit; font-size: var(--fs-footnote); cursor: pointer; }
.news-save { margin-top: var(--sp-5); }
.news-err-inline { margin: var(--sp-2) 0 0; font-size: var(--fs-footnote); color: var(--critical-text); }
/* ---- 监控 (v1.19.4 #/monitor): the model-hub H5 embedded under the nav bar ---- */
.mon-embed { display: flex; flex-direction: column; margin: 0 calc(-1 * var(--margin));
  height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom)); }
.mon-embed .ui-nav { padding-inline: var(--margin); }
.mon-embed-frame { flex: 1; width: 100%; border: 0; background: var(--bg); opacity: 0; transition: opacity .2s; }
.mon-embed-frame.ready { opacity: 1; }
.mon-embed-wait { position: absolute; left: var(--sp-4); right: var(--sp-4); top: 110px; }
@media (prefers-reduced-motion: reduce) { .mon-embed-frame { transition: none; } }

/* ================================================= v1.21 交互增强 (WP-B) ==
   A 对话传图 · B 审批记录 · C 英文长按查词 */

/* ---- A: 对话传图 ---- */
/* 输入区改成两行：上方缩略图条（可选），下方按钮 + 输入框 */
.chat-composer { flex-direction: column; align-items: stretch; }
.chat-composer-row { display: flex; align-items: flex-end; gap: var(--sp-2); }
.vh-file { position: absolute; width: 1px; height: 1px; margin: -1px; border: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); }

/* 待发送的缩略图条（64px 圆角方块 + 上传进度/失败态 + ✕ 移除） */
.chat-attach-strip { display: flex; gap: var(--sp-2); padding: 0 0 var(--sp-2); overflow-x: auto; scrollbar-width: none; }
.chat-attach-strip::-webkit-scrollbar { display: none; }
.chat-attach-thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--separator); background: var(--fill); }
.chat-attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-attach-thumb.error img { opacity: 0.4; }
.chat-attach-progress { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.38); color: #fff; font-size: var(--fs-footnote); font-weight: 600; font-variant-numeric: tabular-nums; }
.chat-attach-err { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.38); color: #fff; }
.chat-attach-err .ui-icon { font-size: 20px; }
.chat-attach-remove { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: none; border-radius: 50%; padding: 0; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-attach-remove .ui-icon { font-size: 12px; }

/* 用户气泡里的附件网格：≤3/行、4px 间距、12px 圆角、最宽 220px */
.chat-attachments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; max-width: 220px; margin: 0 0 6px; }
.chat-attachments[data-count="1"] { grid-template-columns: minmax(0, 220px); }
.chat-attachments[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.chat-attach-cell { aspect-ratio: 1; padding: 0; border: none; border-radius: 12px; overflow: hidden; background: var(--fill); cursor: zoom-in; }
.chat-attachments[data-count="1"] .chat-attach-cell { aspect-ratio: auto; max-height: 220px; }
.chat-attach-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 全屏图片查看器：暗底、contain、双指缩放、左右切换、下滑关闭 */
.chat-viewer { position: fixed; inset: 0; z-index: 220; background: rgba(0, 0, 0, 0.92); }
.chat-viewer-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom; }
.chat-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chat-viewer-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border: none; border-radius: 50%; padding: 0; background: rgba(255, 255, 255, 0.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: none; border-radius: 50%; padding: 0; background: rgba(255, 255, 255, 0.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-viewer-prev { left: 10px; }
.chat-viewer-next { right: 10px; }
.chat-viewer-count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.9); font-size: var(--fs-footnote); font-variant-numeric: tabular-nums; }

/* 对话头部「待审批 n」chip */
.chat-approval-chip { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

/* ---- B: 审批记录页 #/approvals ---- */
.ap-page { padding-bottom: var(--sp-8); }
.ap-page .ui-seg { margin-top: var(--sp-2); }
.ap-count { margin: var(--sp-2) var(--margin) 0; font-size: var(--fs-footnote); color: var(--label-3); }
.ap-day { margin: var(--sp-5) var(--margin) var(--sp-1); font-size: var(--fs-footnote); font-weight: 700; color: var(--label-2); }
.ap-day:first-of-type { margin-top: var(--sp-3); }
.ap-list { margin: 0 var(--margin); border-radius: var(--r-lg); background: var(--surface-1); box-shadow: var(--shadow-1); overflow: hidden; }
.ap-row { display: flex; gap: var(--sp-3); width: 100%; padding: var(--sp-3) var(--sp-4); border: none; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ap-row + .ap-row { border-top: 0.5px solid var(--separator); }
.ap-row-tile { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--tile, var(--accent)); color: #fff; }
.ap-row-tile .ui-icon { font-size: 18px; }
.ap-row-main { flex: 1; min-width: 0; }
.ap-row-top { display: flex; align-items: center; gap: var(--sp-2); }
.ap-row-tool { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-subhead); font-weight: 600; }
.ap-row-summary { margin-top: 2px; font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--label-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ap-row-time { margin-top: 2px; font-size: var(--fs-caption); color: var(--label-3); font-variant-numeric: tabular-nums; }
.ap-badge { flex: none; padding: 2px 8px; border-radius: var(--r-pill); font-size: var(--fs-caption); font-weight: 600; }
.ap-badge.pending, .ap-badge.executing { background: var(--accent-soft); color: var(--accent); }
.ap-badge.approved { background: rgba(12, 163, 12, 0.14); color: var(--good-text); }
.ap-badge.rejected, .ap-badge.failed { background: rgba(208, 59, 59, 0.14); color: var(--critical-text); }
.ap-badge.expired { background: var(--fill); color: var(--label-2); }
.ap-more { margin: var(--sp-3) 0 0; text-align: center; font-size: var(--fs-footnote); color: var(--label-3); }
.ap-skel { margin: var(--sp-3) var(--margin) 0; display: grid; gap: var(--sp-3); }

/* 详情 Sheet */
.ap-sheet { padding: var(--sp-2) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom)); }
.ap-sheet-top { display: flex; align-items: center; gap: var(--sp-2); }
.ap-sheet-title { flex: 1; min-width: 0; font-size: var(--fs-headline); font-weight: 600; }
.ap-sheet-summary { margin-top: var(--sp-2); font-size: var(--fs-subhead); line-height: var(--lh-subhead); color: var(--label-2); }
.ap-sheet-meta { margin-top: var(--sp-1); font-size: var(--fs-footnote); color: var(--label-3); font-variant-numeric: tabular-nums; }
.ap-sheet-detail { margin-top: var(--sp-3); }
.ap-args { margin-top: var(--sp-3); }
.ap-sheet-result { margin-top: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); font-size: var(--fs-footnote); }
.ap-sheet-result.approved { background: rgba(12, 163, 12, 0.14); color: var(--good-text); }
.ap-sheet-result.rejected, .ap-sheet-result.failed { background: rgba(208, 59, 59, 0.14); color: var(--critical-text); }
.ap-sheet-result.executing, .ap-sheet-result.pending { background: var(--accent-soft); color: var(--accent); }
.ap-sheet-link { display: inline-block; margin-top: var(--sp-3); color: var(--accent); text-decoration: none; font-size: var(--fs-subhead); }
.ap-sheet-actions { margin-top: var(--sp-4); }
.ap-sheet-actions .ui-btn { flex: 1; }
.ap-sheet-foot { margin: var(--sp-3) 0 0; font-size: var(--fs-footnote); color: var(--label-3); }

/* ---- C: 英文长按查词 ---- */
/* 宿主容器去掉 iOS 长按系统菜单，但保留文字可选中（合约 §C） */
.lookup-host { -webkit-touch-callout: none; }
/* 选区上方的操作条 */
.lookup-bar { position: fixed; z-index: 150; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface-1); border: 0.5px solid var(--separator); box-shadow: var(--shadow-2); }
/* display:flex above out-ranks the UA's [hidden] rule — without this the bar never hid */
.lookup-bar[hidden] { display: none; }
.lookup-bar button { border: none; border-radius: 9px; padding: 7px 12px; background: none; font: inherit; font-size: var(--fs-footnote); font-weight: 600; color: var(--label); white-space: nowrap; cursor: pointer; }
.lookup-bar button:active { background: var(--accent-soft); color: var(--accent); }
/* 查词 Sheet */
.lookup-sheet .lookup-body { padding: 0 var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom)); max-height: min(78vh, 640px); overflow-y: auto; }
.lookup-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.lookup-word { font-size: var(--fs-title); font-weight: 700; }
.lookup-phon { font-size: var(--fs-footnote); color: var(--label-2); font-variant-numeric: tabular-nums; }
.lookup-head .mini-btn { margin-left: auto; }
.lookup-tags { display: flex; gap: 4px; margin-top: var(--sp-1); }
.lookup-tags span { padding: 1px 7px; border-radius: var(--r-pill); background: var(--fill); font-size: var(--fs-caption); color: var(--label-2); }
.lookup-meta { margin-top: 4px; font-size: var(--fs-caption); color: var(--label-3); }
.lookup-trans { margin-top: var(--sp-2); font-size: var(--fs-subhead); line-height: 1.7; white-space: pre-wrap; }
.lookup-def { margin-top: var(--sp-2); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); }
.lookup-example { margin-top: var(--sp-2); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); font-style: italic; }
.lookup-block { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 0.5px solid var(--separator); }
.lookup-label { margin-bottom: 4px; font-size: var(--fs-caption); font-weight: 700; color: var(--label-3); }
.lookup-sent-text { margin: 0 0 var(--sp-2); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); }
.lookup-sent-out { margin-top: var(--sp-2); }
.lookup-out { margin-top: var(--sp-1); font-size: var(--fs-body); font-weight: 600; line-height: 1.5; }
.lookup-alt { margin-top: var(--sp-2); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-2); }
.lookup-notes { margin-top: var(--sp-2); font-size: var(--fs-footnote); line-height: 1.6; color: var(--label-3); }
.lookup-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.lookup-actions .btn { flex: 1; width: auto; min-width: 120px; }
.lookup-loading { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-4) 0; font-size: var(--fs-subhead); color: var(--label-2); }
.lookup-miss { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) 0; font-size: var(--fs-subhead); color: var(--label-2); }
.lookup-miss .ui-icon { font-size: 16px; color: var(--label-3); }
.lookup-loading .act-spin { flex: none; }

/* ---------- 全球市场 (#/market, v1.22) ---------- */
.mkt-page {
  padding-bottom: var(--sp-2);
}

/* 今日一句话 */
.mkt-note-card {
  padding: var(--sp-3) var(--sp-4);
}
.mkt-note-text {
  margin: 0;
  font-size: var(--fs-subhead);
  line-height: 1.65;
  color: var(--label-1);
}
.mkt-note-meta {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-caption);
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
}

/* 2-column tile grid */
.mkt-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.mkt-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-3) var(--sp-4);
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button.mkt-tile:active {
  background: var(--fill);
}
.mkt-tile:nth-child(n + 3) {
  border-top: 0.5px solid var(--separator);
}
.mkt-tile:nth-child(2n) {
  border-left: 0.5px solid var(--separator);
}
.mkt-tile-name {
  font-size: var(--fs-footnote);
  color: var(--label-2);
}
.mkt-tile-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1);
  margin-top: 1px;
}
.mkt-tile-last {
  font-size: var(--fs-headline);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.mkt-tile-row .ui-rise,
.mkt-tile-row .ui-fall {
  font-size: var(--fs-footnote);
  font-weight: 600;
}
.mkt-spark {
  display: block;
  width: 100%;
  height: 26px;
  margin-top: 3px;
  overflow: visible;
}
.mkt-spark polyline {
  stroke: var(--rise);
}
.mkt-spark.down polyline {
  stroke: var(--fall);
}
.mkt-tile-ytd {
  margin-top: 2px;
  font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
}
.mkt-tile.stale .mkt-tile-last,
.mkt-tile.stale .mkt-tile-name {
  color: var(--label-3);
}
.mkt-tile-stale {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-caption);
  color: var(--serious);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mkt-tile-stale .ui-icon {
  flex: none;
  font-size: 11px;
}

/* detail sheet */
.mkt-sheet {
  padding: var(--sp-2) 0 var(--sp-4);
}
.mkt-hero {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.mkt-hero-last {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.mkt-hero-chg {
  font-size: var(--fs-headline);
  font-weight: 600;
}
.mkt-sheet .ui-seg {
  margin: var(--sp-3) 0;
}
.mkt-range {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-footnote);
  font-weight: 600;
}
.mkt-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--sp-2);
}
.mkt-chart text {
  font-variant-numeric: tabular-nums;
}
.mkt-chart-none {
  margin: var(--sp-4) 0;
  text-align: center;
}
.mkt-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.mkt-stat {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
  min-width: 0;
}
.mkt-stat-label {
  font-size: var(--fs-caption);
  color: var(--label-3);
}
.mkt-stat-val {
  margin-top: 2px;
  font-size: var(--fs-subhead);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A股成交额 */
.mkt-turnover {
  padding: var(--sp-3) var(--sp-4) var(--sp-3);
}
.mkt-to-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.mkt-to-today {
  font-size: var(--fs-title);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.mkt-to-today small {
  font-size: var(--fs-footnote);
  font-weight: 500;
  color: var(--label-2);
  margin-left: 1px;
}
.mkt-to-avg {
  flex-basis: 100%;
  font-size: var(--fs-footnote);
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
}
.mkt-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
  margin-top: var(--sp-3);
}
.mkt-bar {
  flex: 1;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--seq-250);
}
.mkt-bar.today {
  background: var(--accent);
}
.mkt-to-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: var(--fs-caption);
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
}

/* 全球股市市值 */
.mkt-caps {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
}
.mkt-caps-world {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}
.mkt-caps-world-num {
  font-size: var(--fs-title);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.mkt-caps-world-unit {
  font-size: var(--fs-footnote);
  color: var(--label-2);
}
.mkt-caps-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: var(--sp-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--fill);
  font-size: var(--fs-caption);
  color: var(--label-2);
}
.mkt-caps-note .ui-icon {
  flex: none;
  font-size: 12px;
  color: var(--label-3);
}
.mkt-cap-rows {
  margin-top: var(--sp-3);
}
.mkt-cap-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 0;
}
.mkt-cap-name {
  flex: none;
  width: 60px;
  font-size: var(--fs-footnote);
  color: var(--label-2);
}
.mkt-cap-track {
  flex: 1;
  min-width: 0;
  height: 10px;
  border-radius: 5px;
  background: var(--fill);
  overflow: hidden;
}
.mkt-cap-fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--series-1);
}
.mkt-cap-val {
  flex: none;
  width: 112px;
  text-align: right;
  font-size: var(--fs-footnote);
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 年初至今排行 */
.mkt-rank {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
}
.mkt-rank-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 3px 0;
}
.mkt-rank-name {
  flex: none;
  width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-footnote);
  color: var(--label-2);
}
.mkt-rank-track {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 16px;
}
.mkt-rank-zero {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0.5px;
  background: var(--separator);
}
.mkt-rank-bar {
  position: absolute;
  top: 3px;
  height: 10px;
  border-radius: 3px;
}
.mkt-rank-bar.up {
  left: 50%;
  background: var(--rise);
}
.mkt-rank-bar.down {
  right: 50%;
  background: var(--fall);
}
.mkt-rank-val {
  flex: none;
  width: 58px;
  text-align: right;
  font-size: var(--fs-footnote);
  font-variant-numeric: tabular-nums;
}

/* footer & skeleton */
.mkt-foot {
  margin: var(--sp-5) 0 0;
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
}
.mkt-skel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.mkt-skel-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

/* 概览 top card (assets.js) */
.mkt-mini {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: var(--sp-3);
}
.mkt-mini:active {
  transform: scale(0.985);
}
.mkt-mini-head {
  display: flex;
  align-items: center;
}
.mkt-mini-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: var(--fs-subhead);
}
.mkt-mini-title .ui-icon {
  color: var(--accent);
  font-size: 16px;
}
.mkt-mini-more {
  margin-left: auto;
  color: var(--label-3);
  font-size: 18px;
  line-height: 1;
}
.mkt-mini-tiles {
  display: flex;
  margin-top: var(--sp-2);
}
.mkt-mini-tile {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.mkt-mini-tile + .mkt-mini-tile {
  border-left: 0.5px solid var(--separator);
  padding-left: var(--sp-3);
}
.mkt-mini-name {
  font-size: var(--fs-caption);
  color: var(--label-2);
}
.mkt-mini-last {
  font-size: var(--fs-subhead);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.mkt-mini-chg {
  font-size: var(--fs-footnote);
  margin-top: 1px;
}

/* 今日 big-move-day card (today.js) */
.mkt-today {
  display: block;
  color: inherit;
  text-decoration: none;
}
.mkt-today-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.mkt-today-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: var(--fs-subhead);
}
.mkt-today-title .ui-icon {
  color: var(--accent);
  font-size: 17px;
}
.mkt-today-move {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--fill);
  font-size: var(--fs-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mkt-today-move.up {
  color: var(--rise);
}
.mkt-today-move.down {
  color: var(--fall);
}
.mkt-today-more {
  margin-left: auto;
  color: var(--label-3);
  font-size: 18px;
  line-height: 1;
}
.mkt-today-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: var(--sp-2);
  font-size: var(--fs-footnote);
  line-height: 1.5;
  color: var(--label-2);
}