/* Shared visual tokens mirror miniprogram/app.wxss. */
html, body {
  background: #f4f6fa;
  color: #17191d;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
.page { min-height: 100vh; box-sizing: border-box; padding: 0 12px calc(86px + env(safe-area-inset-bottom)); }
.app-header { padding: calc(48px + env(safe-area-inset-top)) 4px 15px; }
.brand { display: flex; align-items: center; min-width: 0; }
.brand-icon { width: 30px; height: 30px; flex: none; margin-right: 9px; }
.title { font-size: 26px; font-weight: 750; letter-spacing: .5px; line-height: 1.2; }
.header-actions { display: flex; gap: 9px; align-items: center; margin-left: auto; }
.header-action { width: 31px; height: 31px; padding: 5px; box-sizing: border-box; border-radius: 50%; background: #eaf0f7; }
.header-action image { width: 21px; height: 21px; }
.header-meta { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.time-line { font-size: 11px; color: #71809b; line-height: 1.7; margin-top: 9px; }
.status-pill { display: inline-flex; align-items: center; color: #159c55; background: #e8f8f0; font-size: 12px; border-radius: 20px; padding: 5px 10px; margin-top: 10px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #24b657; margin-right: 5px; }
.panel { background: #fff; border-radius: 17px; padding: 15px 12px 12px; margin-bottom: 12px; box-shadow: 0 3px 16px rgba(66, 90, 126, .025); overflow: hidden; }
.panel-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; }
.panel-title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.panel-title::before { content: ""; display: inline-block; width: 4px; height: 19px; margin-right: 8px; vertical-align: -2px; border-radius: 3px; background: #ff7250; }
.panel:first-of-type .panel-title::before { background: #f0524d; }
.panel-subtitle { color: #8592a9; font-size: 11px; margin: -3px 0 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric-cell { background: #f5f7fa; border-radius: 9px; padding: 10px; min-width: 0; }
.metric-top, .metric-bottom { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-width: 0; }
.metric-name { color: #6b7890; font-size: 13px; }
.metric-date { color: #8b95a8; font-size: 10px; flex: none; }
.metric-value { font-size: 20px; font-weight: 650; color: #14191f; margin-top: 5px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.metric-change { font-size: 12px; font-weight: 500; margin-top: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-detail { color: #8792a8; font-size: 10px; margin-top: 3px; }
.up { color: #f0524d; }
.down { color: #24b657; }
.neutral { color: #7a879b; }
.section-note { color: #8190a9; font-size: 11px; margin: 8px 0; line-height: 1.65; }
.table-head, .sector-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; align-items: center; gap: 4px; min-width: 0; }
.table-head { background: #f5f7fa; border-radius: 7px; padding: 7px 8px; color: #78869e; font-size: 11px; }
.table-head > :nth-child(n+2), .sector-row > :nth-child(n+2) { text-align: right; }
.sector-row { padding: 12px 8px; border-bottom: 1px solid #f0f2f6; font-size: 14px; font-variant-numeric: tabular-nums; }
.sector-row:last-child { border-bottom: 0; }
.sector-link { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; color: #65758e; font-size: 13px; white-space: nowrap; }
.sector-row .sector-link { color: #1e232a; font-size: 14px; }
.chevron { color: #8996ad; font-size: 21px; font-weight: 400; line-height: 1; margin-left: 2px; }
.segment { display: flex; gap: 5px; margin: 11px 0 6px; border-radius: 8px; }
.segment-button { flex: 1; text-align: center; border-radius: 7px; padding: 7px 4px; background: #f0f3f8; color: #75839a; font-size: 13px; }
.segment-button.active { background: #fff0f1; color: #f0524d; font-weight: 600; }
.stock-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .95fr); gap: 3px; align-items: center; padding: 10px 3px; border-top: 1px solid #eff2f6; min-width: 0; }
.stock-identity, .stock-sector, .stock-result { min-width: 0; }
.stock-name { font-size: 14px; font-weight: 550; display: block; color: #191e26; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-code { display: block; color: #8995ab; font-size: 10px; margin-top: 2px; }
.stock-sector .sector-link { font-size: 12px; }
.stock-result { text-align: right; font-variant-numeric: tabular-nums; }
.change-value { font-size: 16px; white-space: nowrap; }
.limit-badge { display: inline-block; color: #ed6660; background: #fff0f1; border-radius: 5px; font-size: 10px; padding: 1px 7px; margin-top: 3px; }
.watch-button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 0 2px 0 0; padding: 0; border: 0; border-radius: 5px; color: #a1aabb; font-size: 18px; background: transparent; vertical-align: middle; }
.watch-button img { width: 15px; height: 15px; }
.watch-button.watched { color: #dc9a27; }
.stock-name-line { display: flex; align-items: center; min-width: 0; }
.stock-name-line .stock-name { flex: 1; }
.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: flex; border-top: 1px solid #edf0f5; background: rgba(255,255,255,.98); padding: 8px 4px calc(7px + env(safe-area-inset-bottom)); }
.nav-item { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #8e98ad; min-height: 45px; }
.nav-item.active { color: #f0524d; }
.nav-icon { width: 25px; height: 25px; }
.nav-label { font-size: 12px; }
.footer-note { text-align: center; color: #94a0b5; font-size: 10px; padding: 2px 4px 10px; line-height: 1.8; }
.empty-state, .error-state { padding: 25px 15px; color: #8b97aa; text-align: center; font-size: 13px; line-height: 1.8; }
.error-state { background: #fff4f2; color: #b85d50; border-radius: 12px; margin-bottom: 12px; }
.refresh-button { display: inline-block; color: #687b99; background: #eaf0f7; font-size: 12px; border: 0; border-radius: 7px; padding: 6px 13px; margin-top: 8px; line-height: 1.7; }
.search-input { background: #f3f6fa; border-radius: 8px; font-size: 13px; height: 38px; padding: 0 12px; box-sizing: border-box; width: 100%; margin: 10px 0; color: #273548; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.filter-chip { padding: 5px 9px; border-radius: 7px; font-size: 11px; background: #f3f5f9; color: #7f8ba1; }
.filter-chip.active { background: #fff0f1; color: #e76760; }
.daily-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.daily-cell { display: flex; flex-direction: column; gap: 5px; background: #f5f7fa; border-radius: 7px; padding: 9px 3px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.back-button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #596c86; font-size: 26px; flex: none; }
.back-button image { width: 22px; height: 22px; }
.page-title { font-size: 22px; font-weight: 650; }
.settings-row { padding: 14px 3px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eff2f6; color: #374358; font-size: 14px; }
.settings-note { color: #8793a8; font-size: 12px; line-height: 1.8; margin: 10px 0; }
.settings-value { color: #7e8ca2; font-size: 12px; }
@media (max-width: 350px) {
  .page { padding-left: 9px; padding-right: 9px; }
  .panel { padding-left: 10px; padding-right: 10px; }
  .title { font-size: 23px; }
  .metric-cell { padding: 9px 7px; }
  .metric-value { font-size: 17px; }
  .metric-change { font-size: 11px; }
  .metric-name { font-size: 12px; }
  .stock-name { font-size: 13px; }
  .stock-sector .sector-link { font-size: 11px; }
  .change-value { font-size: 14px; }
  .stock-row { grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr) minmax(0, .93fr); }
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button::after { border: none; }
button { border: 0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
.app-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; }
.bottom-nav { max-width: 480px; margin: 0 auto; }
img { max-width: 100%; }
input { outline-color: #b8c9df; border: none; }
.app-header { padding-top: 27px; }
.brand-icon, .nav-icon { display: block; }
.header-action img { width: 21px; height: 21px; }
button:focus-visible, a:focus-visible { outline: 2px solid #527ab5; outline-offset: 3px; }
@media (min-width: 600px) { body { background: #e8edf4; } .app-shell { background: #f4f6fa; box-shadow: 0 0 60px #cdd7e555; } }

/* Shared native component resets and screen composition. */
button { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; text-align: left; }
button::after { border: 0; }
.app-header { display: flex; align-items: center; gap: 5px; padding-bottom: 0; }
.home-page .app-header { justify-content: space-between; }
.settings-button { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.settings-button img { width: 21px; height: 21px; }
.time-line { display: flex; align-items: center; gap: 10px; margin: 12px 4px 14px; }
.time-line .status-pill { margin-top: 0; flex: none; }
.time-copy { min-width: 0; }
.time-caption { display: block; }
.sector-page .time-line { display: block; }
.settings-page .app-header { margin-bottom: 20px; }
.panel-subtitle, .section-note, .metric-detail, .metric-date, .settings-note { display: block; }
.panel-heading .panel-subtitle { margin: 0; padding-top: 4px; }
.metric-line { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.metric-date { margin-top: 4px; font-size: 9px; }
.daily-cell .metric-date { margin: 0; }
.table-head.sector-row { padding-top: 7px; padding-bottom: 7px; font-size: 11px; border: 0; }
.segment-button { text-align: center; border-radius: 7px; padding: 7px 4px; background: #f0f3f8; color: #75839a; font-size: 13px; }
.stock-sector.sector-link { font-size: 12px; justify-self: start; }
.stock-meta { display: flex; align-items: center; gap: 4px; }
.stock-meta .stock-code { margin-top: 0; }
.stock-result .change-value, .stock-status { display: block; }
.stock-status { font-size: 9px; color: #8c96a7; margin-top: 2px; }
.stock-name { text-align: left; }
.stock-today { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.sector-summary .metric-value { display: block; }
.metric-value.up { color: #f0524d; }
.metric-value.down { color: #24b657; }
.metric-value.neutral { color: #7a879b; }
.ai-stock-row { display: grid; grid-template-columns: 1.5fr .8fr .8fr; align-items: center; gap: 5px; border-bottom: 1px solid #eff2f6; padding: 10px 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ai-stock-row > :nth-child(n+2) { text-align: right; }
.ai-stock-row.table-head { font-size: 10px; border: none; padding: 7px 5px; }
.nav-item { text-align: center; }
.filter-chip { padding: 5px 9px; border-radius: 7px; font-size: 11px; background: #f3f5f9; color: #7f8ba1; }
.refresh-button { color: #687b99; background: #eaf0f7; font-size: 12px; border-radius: 7px; padding: 6px 13px; line-height: 1.7; }
.footer-note > span { display: block; }
.settings-row { width: 100%; text-align: left; }
.settings-row > div { flex: 1; min-width: 0; }
.settings-row > span { flex: none; font-size: 11px; color: #8793a8; }
.settings-row.active > span { color: #e56a61; }
.settings-row .settings-note { font-size: 11px; margin: 5px 0 0; }
@media (max-width: 350px) {
 .stock-sector.sector-link { font-size: 11px; }
 .time-line { gap: 6px; font-size: 10px; }
 .status-pill { font-size: 11px; padding: 5px 8px; }
}
/* Reference v2: compact editorial quote cards and always-visible navigation. */
.quote-panel .metric-cell { padding: 11px 9px; }
.quote-top, .quote-bottom { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.quote-top { margin-bottom: 6px; }
.quote-date { font-size: 10px; color: #8692a7; flex: none; }
.quote-panel .metric-value { font-size: 18px; margin: 0; white-space: nowrap; letter-spacing: -.6px; }
.quote-panel .metric-change { font-size: 12px; margin: 0; letter-spacing: -.3px; }
.quote-panel .bp-change { font-size: 10px; }
.theme-panel .panel-heading { flex-wrap: wrap; gap: 4px; }
.theme-panel .panel-subtitle { font-size: 11px; }
.theme-cell { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-height: 43px; box-sizing: border-box; padding: 10px 8px; }
.theme-name { font-size: 14px; font-weight: 550; white-space: nowrap; }
.theme-change { font-size: 14px; white-space: nowrap; }
.clue-row { display: flex; align-items: center; justify-content: space-between; width: 100%; border-top: 1px solid #eef1f5; padding: 12px 8px; text-align: left; box-sizing: border-box; }
.clue-title { display: block; font-size: 17px; font-weight: 600; }
.clue-subtitle { display: block; font-size: 12px; color: #8792a8; margin-top: 3px; }
.clue-action { font-size: 13px; color: #7e8a9e; white-space: nowrap; }
.clue-action .chevron { margin-left: 12px; }
.related-row { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 5px; border-bottom: 1px solid #eef1f5; box-sizing: border-box; font-size: 16px; text-align: left; }
.related-change { margin-left: auto; font-variant-numeric: tabular-nums; }
.ai-stocks-panel .filter-chip { border-radius: 22px; padding: 6px 14px; font-size: 13px; }
.ai-stocks-panel .ai-stock-row { grid-template-columns: 1.35fr 1fr 1fr; }
.ai-stocks-panel .stock-name { font-size: 16px; font-weight: 600; }
.ai-stocks-panel .stock-code { font-size: 11px; }
.ai-stocks-panel .metric-date { font-size: 9px; }
.clues-panel .panel-title::before, .related-panel .panel-title::before { background: #ff8745; }
.page { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
@media (max-width: 350px) {
 .quote-panel .metric-value { font-size: 15px; }
 .quote-panel .metric-change { font-size: 10px; }
 .quote-panel .bp-change { font-size: 9px; }
 .theme-name, .theme-change { font-size: 12px; }
 .quote-panel .metric-name { font-size: 12px; }
 .quote-date { font-size: 9px; }
 .ai-stocks-panel .ai-stock-row { font-size: 12px; }
}
.market-page-intro { margin: 6px 4px 14px; }
.history-link { display: block; margin-top: 8px; color: #73849d; font-size: 11px; text-align: left; padding: 3px 0; }
.quote-top, .quote-bottom { cursor: pointer; }
.metric-page .panel-heading { flex-wrap: wrap; }
.detail-quote { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.detail-quote .metric-value { font-size: 30px; }
.history-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eff2f6; padding: 15px 8px; font-variant-numeric: tabular-nums; }
.history-row.table-head { display: flex; padding: 8px; }
.history-date { color: #596981; font-size: 14px; }
.history-change { font-size: 18px; }
