:root {
  /* 背景层级规范：
   * 1) 页面层（Page）：统一用灰底 --surface-page
   * 2) 内容层（Content）：主内容卡片/面板统一用白底 --surface-content
   * 3) 次级层（Subtle）：表头/弱强调背景统一用浅灰 --surface-muted
   */
  --surface-page: #f1f3f7;
  --surface-content: #fff;
  --surface-muted: #f6f8fb;
  --bg: var(--surface-page);
  --panel: var(--surface-content);
  --text: #20262f;
  --muted: #9aa3b2;
  --line: #e7ebf1;
  --tab: #8e98a9;
  --blue: #4f83f1;
  --up: #f45a68;
  --down: #0ebc9f;
  --metric-value-size: clamp(18px, 5vw, 20px);
  /* 交易记录列宽（ch） */
  --ledger-trade-col-date: 10ch;
  --ledger-trade-col-name: 11ch;
  --ledger-trade-col-type: 5ch;
  --ledger-trade-col-price: 8ch;
  --ledger-trade-col-qty: 5ch;
  --ledger-trade-col-amt: 10ch;
  --ledger-trade-col-account: 6ch;
  /* 资金记录列宽（ch） */
  --ledger-cash-col-date: 10ch;
  --ledger-cash-col-account: 6ch;
  --ledger-cash-col-type: 5ch;
  --ledger-cash-col-amt: 10ch;
  /* 个股交易记录列宽（ch） */
  --ledger-stock-col-date: 10ch;
  --ledger-stock-col-type: 4ch;
  --ledger-stock-col-price: 8ch;
  --ledger-stock-col-qty: 5ch;
  --ledger-stock-col-amt: 10ch;
  --ledger-stock-col-account: 6ch;
  /* 列宽比例（与 ch 权重一致；表宽 = max(100%, 内容最小宽) 时等比铺满） */
  --ledger-trade-min-width: calc(
    var(--ledger-trade-col-date) + var(--ledger-trade-col-name) + var(--ledger-trade-col-type) +
      var(--ledger-trade-col-price) + var(--ledger-trade-col-qty) + var(--ledger-trade-col-amt) +
      var(--ledger-trade-col-account)
  );
  --ledger-trade-pub-min-width: calc(
    var(--ledger-trade-col-date) + var(--ledger-trade-col-name) + var(--ledger-trade-col-type) +
      var(--ledger-trade-col-price) + var(--ledger-trade-col-amt) + var(--ledger-trade-col-account)
  );
  --ledger-cash-min-width: calc(
    var(--ledger-cash-col-date) + var(--ledger-cash-col-account) + var(--ledger-cash-col-type) +
      var(--ledger-cash-col-amt)
  );
  --ledger-stock-min-width: calc(
    var(--ledger-stock-col-date) + var(--ledger-stock-col-type) + var(--ledger-stock-col-price) +
      var(--ledger-stock-col-qty) + var(--ledger-stock-col-amt) + var(--ledger-stock-col-account)
  );
  --ledger-stock-pub-min-width: calc(
    var(--ledger-stock-col-date) + var(--ledger-stock-col-type) + var(--ledger-stock-col-price) +
      var(--ledger-stock-col-amt) + var(--ledger-stock-col-account)
  );
  --ledger-stock-w-date: 22.222%;
  --ledger-stock-w-type: 11.111%;
  --ledger-stock-w-price: 18.519%;
  --ledger-stock-w-qty: 18.519%;
  --ledger-stock-w-amt: 18.519%;
  --ledger-stock-w-account: 11.111%;
  --ledger-stock-pub-w-date: 27.273%;
  --ledger-stock-pub-w-type: 13.636%;
  --ledger-stock-pub-w-price: 22.727%;
  --ledger-stock-pub-w-amt: 22.727%;
  --ledger-stock-pub-w-account: 13.636%;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-boot-loading {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.22s ease;
}

.app-boot-loading.is-done {
  opacity: 0;
  pointer-events: none;
}

.app-boot-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: app-boot-spin 0.75s linear infinite;
  flex-shrink: 0;
}

.app-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  border: 1px solid var(--line);
  color: #5d687a;
  font-size: 14px;
  box-shadow: 0 6px 24px rgb(16 24 40 / 12%);
}

.app-loading-pill--sm {
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  box-shadow: none;
}

.app-loading-spinner--sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.app-route-loading {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(245 247 250 / 62%);
  pointer-events: none;
}

.app-loading-block-host {
  position: relative;
}

.app-loading-block {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(245 247 250 / 45%);
  pointer-events: none;
}

.app-loading-block--page {
  position: relative;
  inset: auto;
  min-height: 52vh;
  background: transparent;
}

.app-loading-table-cell {
  padding: 28px 12px !important;
  text-align: center;
  border-bottom: none;
}

.app-loading-table-row td {
  border-bottom: none;
}

@keyframes app-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding-bottom: 0;
  background: var(--bg);
}

.app-top-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 18;
}

.app-menu-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-menu-btn:active {
  background: #f0f2f6;
}

.app-menu-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.app-header-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.app-top-bar-spacer {
  width: 40px;
  flex-shrink: 0;
}

.app-shell-inner {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 8px);
}

.app-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(0 0 0 / 35%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(82vw, 288px);
  max-width: 100%;
  background: var(--panel);
  z-index: 201;
  box-shadow: 8px 0 28px rgb(0 0 0 / 12%);
  transform: translateX(-102%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.app-drawer.is-open {
  transform: translateX(0);
}

.app-drawer-head {
  padding: 18px 18px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
}

.app-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 6px 0 0;
  border-bottom: 1px solid var(--line);
}

.app-drawer-divider {
  border: none;
  margin: 0;
  flex-shrink: 0;
}

.app-drawer-divider--short {
  align-self: stretch;
  height: 1px;
  margin: 4px 20px;
  background: var(--line);
  box-sizing: border-box;
}

.app-drawer-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 14px 20px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
}

.app-drawer-item:active {
  background: #f4f6fa;
}

.route-pane {
  display: none;
}

.route-pane.active {
  display: block;
}

.overview-card {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.overview-head {
  height: 44px;
  padding: 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analysis-filter-panel .analysis-filter-body {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.route-pane--community-analysis .analysis-overview-head.overview-head {
  justify-content: flex-end;
}

.market-data-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.market-data-status.is-delayed {
  color: #d46b08;
}

.head-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 160px;
}

.head-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  background: #fff;
  color: #4d596e;
  font-size: 14px;
  padding: 3px 20px 3px 8px;
  line-height: 1.3;
}

.head-select-wrap .arrow {
  position: absolute;
  right: 7px;
  pointer-events: none;
}

.plain-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: #475264;
  font-size: 16px;
}

.help {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #c9d1dd;
  border-radius: 50%;
  line-height: 14px;
  text-align: center;
  font-size: 12px;
}

.arrow {
  color: #b2bac7;
  font-size: 11px;
}

.profit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.profit-block {
  padding: 12px 14px 11px;
}

.profit-label {
  margin: 0 0 8px;
  color: #9ca4b3;
  font-size: 15px;
}

.stage-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stage-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: #9ca4b3;
  font-size: 15px;
  padding: 0;
}

.profit-main {
  margin: 0;
  font-size: clamp(22px, 5.6vw, 24px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.25px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}

.profit-rate-inline {
  margin-left: 3px;
  font-size: 12px;
}

.profit-amt {
  font-weight: inherit;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.kpi-item {
  min-height: 42px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.kpi-item:nth-child(2n + 1) {
  border-right: 1px solid var(--line);
}

.kpi-item:nth-last-child(-n + 2) {
  border-bottom: none;
}

.kpi-item--empty {
  pointer-events: none;
}

.kpi-label {
  margin: 0;
  color: #9ca5b4;
  font-size: 15px;
}

.kpi-value {
  margin: 0;
  color: #565f70;
  font-size: var(--metric-value-size);
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}

.stock-card {
  margin-top: 8px;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stock-head {
  min-height: 40px;
  padding: 0 14px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.stock-head-row {
  justify-content: space-between;
  gap: 12px;
}

.stock-currency-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  line-height: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.stock-currency-toggle-icon {
  display: block;
  flex-shrink: 0;
}

.stock-currency-toggle:hover {
  background: #f3f5f9;
}

.stock-currency-toggle.active {
  border-color: #2b6cff;
  color: #2b6cff;
  background: #eef3ff;
}

.stock-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.stock-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
}

/* 首页持仓表：列宽由 JS 按 max(表头, 人民币/原币内容) 锁定，切换 ¥ 不再抖动 */
.stock-table.stock-table--layout-locked {
  table-layout: fixed;
  width: max(100%, var(--stock-table-layout-width-px, 1050px));
  min-width: max(1050px, var(--stock-table-layout-width-px, 1050px));
}

.stock-table thead th {
  background: #f6f8fb;
  color: #8f99a9;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  padding: 7px 9px;
  text-align: right;
}

.stock-table .name-head {
  text-align: left !important;
}

.stock-table .name-head .th-sort-btn--name {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.th-sort-static {
  font: inherit;
  color: inherit;
  font-weight: 500;
}

.th-sort-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.th-sort-btn--right {
  justify-content: flex-end;
  width: 100%;
  text-align: right;
}

.stock-col-valuation-pct {
  text-align: right;
}

.sort-icon {
  width: 9px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b4bfd1;
  font-size: 10px;
}

.sort-icon::before {
  content: "↕";
  line-height: 1;
}

.th-sort-btn.desc .sort-icon::before {
  content: "↓";
  color: #5b86f3;
}

.th-sort-btn.asc .sort-icon::before {
  content: "↑";
  color: #5b86f3;
}

.stock-table tbody td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  padding: 8px 9px;
  text-align: right;
  font-size: 12px;
  vertical-align: middle;
}

.stock-table th:first-child,
.stock-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  border-right: none;
  overflow: visible;
}

.stock-table th:first-child::after,
.stock-table td:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
  z-index: 5;
}

.stock-table thead th:first-child {
  background: #f6f8fb;
  z-index: 3;
}

.stock-table thead th:first-child::after {
  z-index: 6;
}

.stock-table.stock-table--layout-locked th.name-head,
.stock-table.stock-table--layout-locked td.stock-name {
  width: var(--stock-table-name-col-px, 6.5rem);
  min-width: var(--stock-table-name-col-px, 6.5rem);
  max-width: var(--stock-table-name-col-px, 6.5rem);
}

.stock-table thead th:last-child,
.stock-table td:last-child {
  text-align: left;
}

/* 个人页首页「个股收益」：除首列外各列为内容宽度（单行、不挤压），表宽随内容；容器横向滚动保证能看全 */
.public-profile-stock-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.public-profile-stock-table thead th:not(.name-head),
.public-profile-stock-table tbody td:not(.stock-name) {
  white-space: nowrap;
  padding-left: 6px;
  padding-right: 6px;
}

.public-profile-stock-table thead th.name-head,
.public-profile-stock-table tbody td.stock-name {
  width: auto;
  min-width: 10rem;
}

/* 覆盖主持仓表格对 .stock-name 的 62px / 省略号，个人页名称与代码需完整展示 */
.public-profile-stock-table .stock-name {
  min-width: 10rem;
  width: auto;
  max-width: none;
}

.public-profile-stock-table .stock-name strong {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.stock-name {
  min-width: 0;
  text-align: left !important;
  box-sizing: border-box;
}

.stock-name strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: #2e3541;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  max-width: 100%;
}

.stock-name span {
  display: block;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  max-width: 100%;
  color: #8f97a7;
  font-size: 11px;
}

.market-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.market-tag--cn {
  background: #ff7e4c;
}

.market-tag--hk {
  background: #4f83f1;
}

.market-tag--us {
  background: #2e7d4a;
}

.market-tag--ot {
  background: #9aa3b2;
}

.cell-main {
  color: #2e3541;
}

.quote-session-tag {
  display: inline-block;
  margin-right: 4px;
  padding: 0 4px;
  border-radius: 3px;
  background: #f0f1f3;
  color: #8b93a1;
  border: 1px solid #e2e5ea;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
}

.stock-col-price .cell-main {
  text-align: right;
}

.stock-col-price .cell-sub {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
  text-align: right;
}

.stock-col-price .cell-sub-pct {
  white-space: nowrap;
}

.stock-record-price .quote-session-tag {
  font-size: 11px;
  vertical-align: text-bottom;
}

.cell-sub {
  margin-top: 2px;
  color: #9ba4b2;
  font-size: 11px;
}

.record-link {
  color: #4f83f1;
  text-decoration: underline;
  cursor: pointer;
}

.stock-table-op-cell {
  white-space: nowrap;
}

.stock-table-op-cell .stock-table-record-link {
  margin-right: 1.25em;
}

.panel {
  margin-top: 8px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.panel.analysis-filter-panel {
  margin-top: 0;
  padding: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-head-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.panel-head-title-row h2 {
  flex-shrink: 0;
}

.chart-latest-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.chart-latest-label {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #8b95a5;
  background: #eef1f5;
}

.chart-latest-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-latest-value--up {
  color: var(--up);
}

.chart-latest-value--down {
  color: var(--down);
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.caption {
  color: #a0a8b7;
  font-size: 12px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.form-row label {
  width: 90px;
  color: #697486;
  font-size: 14px;
}

.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}

.form-row--note {
  align-items: flex-start;
}

.form-row--note label {
  padding-top: 8px;
}

.ledger-note-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ledger-note-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: calc(1.45em * 3 + 16px);
  padding: 8px 10px;
  line-height: 1.45;
  resize: none;
  overflow: hidden;
  field-sizing: content;
}

@supports not (field-sizing: content) {
  .ledger-note-textarea {
    overflow-y: hidden;
  }
}

.ledger-note-suggest {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 20;
  max-height: min(40vh, 200px);
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
}

.ledger-note-suggest[hidden] {
  display: none;
}

.ledger-note-suggest li {
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #3d4654;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.ledger-note-suggest li:hover,
.ledger-note-suggest li:focus {
  background: #f3f6fa;
}

.range-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.range-chip {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: #63718b;
  font-size: 12px;
  line-height: 24px;
  padding: 0 10px;
}

.range-chip.active {
  border-color: var(--blue);
  color: var(--blue);
}

.custom-range-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.custom-range-row input {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  color: #5d6a82;
  background: #fff;
}

.custom-range-row.hidden {
  display: none;
}

#analysisRateChart,
#analysisProfitChart,
#analysisAssetChart {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgb(79 131 241 / 8%), transparent);
}

.chart-wrap {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.chart-tooltip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  min-width: 116px;
  max-width: 180px;
  background: rgb(21 31 47 / 88%);
  color: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  display: none;
}

.chart-tooltip.show {
  display: block;
}

.chart-tooltip--with-trades {
  max-width: 220px;
}

.chart-tooltip-gap {
  height: 6px;
}

.chart-tooltip-trades {
  margin-top: 2px;
  border-top: 1px solid rgb(255 255 255 / 20%);
  padding-top: 6px;
}

.chart-tooltip-trade + .chart-tooltip-trade {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgb(255 255 255 / 12%);
}

.chart-wrap canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.asset-mode-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.asset-mode-select {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  color: #5d6a82;
  background: #fff;
}

.analysis-stock-rank-panel .analysis-stock-rank-body {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.analysis-stock-rank-table {
  min-width: 780px;
  --stock-rank-col-rank: 28px;
  --stock-rank-col-action: 2.5rem;
  /* 名称列固定宽：超长截断，且不撑开 grid 侵入右侧列 */
  --stock-rank-col-name: 6.75rem;
  --stock-rank-col-gap: 8px;
  /* 低于 .app-top-bar (18)，避免整页上滑时 sticky 列盖住顶栏 */
  --stock-rank-sticky-z-head-rank: 5;
  --stock-rank-sticky-z-head-name: 4;
  --stock-rank-sticky-z-row-rank: 4;
  --stock-rank-sticky-z-row-name: 3;
  display: grid;
  min-width: max-content;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
  font-size: 13px;
  align-items: stretch;
}

/* 整表 grid + 行 display:contents；列数由是否渲染 .col-profit（公开页隐藏区间收益）决定 */
.analysis-stock-rank-table:has(.col-profit) {
  grid-template-columns:
    var(--stock-rank-col-rank)
    var(--stock-rank-col-name)
    minmax(5.5rem, max-content)
    minmax(4.5rem, max-content)
    minmax(5rem, max-content)
    minmax(4.5rem, max-content)
    minmax(4.5rem, max-content)
    minmax(12rem, 1fr)
    var(--stock-rank-col-action);
}

.analysis-stock-rank-table:not(:has(.col-profit)) {
  grid-template-columns:
    var(--stock-rank-col-rank)
    var(--stock-rank-col-name)
    minmax(4.5rem, max-content)
    minmax(5rem, max-content)
    minmax(4.5rem, max-content)
    minmax(6rem, max-content)
    minmax(11rem, 1fr)
    var(--stock-rank-col-action);
}

.analysis-stock-rank-table > .analysis-stock-rank-head,
.analysis-stock-rank-table > .analysis-stock-rank-row {
  display: contents;
}

.analysis-stock-rank-table > .analysis-stock-rank-head > *,
.analysis-stock-rank-table > .analysis-stock-rank-row > * {
  padding: 8px calc(var(--stock-rank-col-gap) / 2);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-width: 0;
}

.analysis-stock-rank-table > .analysis-stock-rank-head > *:first-child,
.analysis-stock-rank-table > .analysis-stock-rank-row > *:first-child {
  padding-left: 0;
}

.analysis-stock-rank-table > .analysis-stock-rank-head > *:last-child,
.analysis-stock-rank-table > .analysis-stock-rank-row > *:last-child {
  padding-right: 0;
}

.analysis-stock-rank-table > .analysis-stock-rank-head > * {
  background: #f6f8fb;
  border-bottom: 1px solid var(--line);
}

.analysis-stock-rank-table > .analysis-stock-rank-row > * {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.analysis-stock-rank-table > .analysis-stock-rank-row:last-child > * {
  border-bottom: none;
}

.analysis-stock-rank-table .col-rank {
  justify-content: center;
}

.analysis-stock-rank-table .col-profit,
.analysis-stock-rank-table .col-px,
.analysis-stock-rank-table .col-trades,
.analysis-stock-rank-table .col-days,
.analysis-stock-rank-table .col-profit-share,
.analysis-stock-rank-table .col-profit-share-head {
  justify-content: flex-end;
  white-space: nowrap;
  overflow: visible;
}

.analysis-stock-rank-table .analysis-stock-rank-head .stock-rank-help-wrap {
  flex-wrap: nowrap;
  min-width: max-content;
}

.analysis-stock-rank-head,
.analysis-stock-rank-row {
  font-size: 13px;
}

.analysis-stock-rank-head .stock-rank-help-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  z-index: 30;
  overflow: visible;
}

.analysis-stock-rank-head .stock-rank-help-wrap .col-th-label {
  white-space: nowrap;
}

.stock-rank-help-btn {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #c5cad3;
  background: #fff;
  color: #8e98a9;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stock-rank-help-btn:hover {
  border-color: #9aa3b2;
  color: #63718b;
}

.stock-rank-help-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  min-width: 200px;
  max-width: min(280px, 72vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgb(21 31 47 / 92%);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
  pointer-events: auto;
}

.stock-rank-help-bubble::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 10px;
  border: 6px solid transparent;
  border-bottom-color: rgb(21 31 47 / 92%);
}

.stock-rank-help-bubble.is-open {
  display: block;
}

.stock-rank-help-bubble.is-open.is-fixed::before {
  right: auto;
  left: var(--help-arrow-left, calc(100% - 26px));
}

.stock-rank-help-bubble.is-open.is-fixed {
  position: fixed;
  z-index: 100001;
  width: max-content;
}

.analysis-stock-rank-head {
  color: #8f99a9;
  font-weight: 500;
}

/* sticky：整表 grid 下 # / 名称 固定；滚动列 z-index 压低 */
.analysis-stock-rank-table .analysis-stock-rank-head .col-rank,
.analysis-stock-rank-table .analysis-stock-rank-row .col-rank {
  position: sticky;
  left: 0;
}

.analysis-stock-rank-table .analysis-stock-rank-head .col-name,
.analysis-stock-rank-table .analysis-stock-rank-row .col-name {
  position: sticky;
  left: var(--stock-rank-col-rank);
}

.analysis-stock-rank-table .analysis-stock-rank-head .col-rank {
  z-index: var(--stock-rank-sticky-z-head-rank);
}

.analysis-stock-rank-table .analysis-stock-rank-row .col-rank {
  z-index: var(--stock-rank-sticky-z-row-rank);
}

.analysis-stock-rank-table .analysis-stock-rank-head .col-name {
  z-index: var(--stock-rank-sticky-z-head-name);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-stock-rank-table .analysis-stock-rank-row .col-name {
  z-index: var(--stock-rank-sticky-z-row-name);
}

.analysis-stock-rank-table > .analysis-stock-rank-row > *:not(.col-rank):not(.col-name),
.analysis-stock-rank-table > .analysis-stock-rank-head > *:not(.col-rank):not(.col-name) {
  position: relative;
  z-index: 0;
}

.analysis-stock-rank-table .analysis-stock-rank-head .col-rank,
.analysis-stock-rank-table .analysis-stock-rank-row .col-rank,
.analysis-stock-rank-table .analysis-stock-rank-head .col-name,
.analysis-stock-rank-table .analysis-stock-rank-row .col-name {
  box-shadow: none;
}

.analysis-stock-rank-table .analysis-stock-rank-head .col-name,
.analysis-stock-rank-table .analysis-stock-rank-row .col-name {
  border-right: 1px solid var(--line);
}

/* 名称列：固定轨宽内纵向堆叠，超出直接裁切 */
.analysis-stock-rank-table .analysis-stock-rank-head .col-name,
.analysis-stock-rank-table .analysis-stock-rank-row .col-name {
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
  max-width: var(--stock-rank-col-name);
  width: 100%;
  overflow: hidden;
}

.analysis-stock-rank-table .col-name {
  min-width: 0;
}

.analysis-stock-rank-table .analysis-stock-rank-row .col-name strong {
  display: block;
  min-width: 0;
  width: 100%;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-stock-rank-table .analysis-stock-rank-row .col-name .rank-code {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analysis-stock-rank-table .analysis-stock-rank-head .col-hold-interval,
.analysis-stock-rank-table .analysis-stock-rank-row .col-hold-interval {
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.analysis-stock-rank-head .col-hold-interval {
  color: #8f99a9;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.analysis-stock-rank-table .analysis-stock-rank-row .col-hold-interval {
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-line;
  word-break: normal;
  overflow: hidden;
  /* iOS Chrome：避免多段长行被自动放大字号 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.analysis-stock-rank-table .col-profit,
.analysis-stock-rank-table .col-px,
.analysis-stock-rank-table .col-days {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analysis-stock-rank-table .col-profit-share,
.analysis-stock-rank-table .col-profit-share-head {
  justify-content: flex-end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.analysis-stock-rank-table .col-action {
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.analysis-stock-rank-table .col-rank {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.analysis-stock-rank-table .col-profit.up,
.analysis-stock-rank-table .col-px.up {
  color: var(--up);
}

.analysis-stock-rank-table .col-profit.down,
.analysis-stock-rank-table .col-px.down {
  color: var(--down);
}

.btn {
  border-radius: 8px;
  border: 1px solid var(--line);
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: #74839c;
}

.actions {
  display: flex;
  gap: 6px;
}

.record-list {
  display: grid;
  gap: 8px;
}

.trade-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.trade-account-wrap {
  max-width: 140px;
}

.trade-filter-select {
  min-width: 106px;
}

.trade-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trade-add-btn {
  min-height: 30px;
}

.trade-hub-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 12px 20px;
}

.trade-hub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trade-hub-action-btn {
  width: 100%;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}

.trade-hub-card {
  margin: 0;
}

.trade-subtab-bar {
  display: flex;
  gap: 0;
  margin: 0 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #eef1f6;
}

.trade-subtab-btn {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #7a8495;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.trade-subtab-btn.is-active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line);
}

.trade-subtab-panel.hidden {
  display: none !important;
}

.cash-transfer-delete-btn {
  margin-top: 8px;
  color: var(--up) !important;
}

.trade-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  container-type: inline-size;
  container-name: trade-record-scroll;
}

.trade-list-loading-row td {
  padding: 18px 12px !important;
  text-align: center;
  border-bottom: none;
}

/* 交易 / 资金 / 个股记录表：内容宽 < 容器时 100% 等比铺满；内容宽 > 容器时保持 ch 最小宽并横向滚动 */
.trade-table-wrap,
.stock-record-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.trade-table,
.trade-table--cash {
  border-collapse: collapse;
  table-layout: fixed;
}

.trade-table:not(.trade-table--cash):not(.trade-table--ledger-6) {
  width: max(100%, var(--ledger-trade-min-width));
}

.trade-table.trade-table--ledger-6 {
  width: max(100%, var(--ledger-trade-pub-min-width));
}

.trade-table--cash {
  width: max(100%, var(--ledger-cash-min-width));
}

.stock-record-table {
  width: max(100%, var(--ledger-stock-min-width));
  border-collapse: collapse;
  table-layout: fixed;
}

.stock-record-table.stock-record-table--pub {
  width: max(100%, var(--ledger-stock-pub-min-width));
}

.trade-table th,
.trade-table td,
.trade-table--cash th,
.trade-table--cash td,
.stock-record-table th,
.stock-record-table td {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.trade-table--cash tbody tr {
  cursor: pointer;
}

.trade-table thead th {
  background: var(--surface-muted);
  color: #8f99a9;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding: 7px 4px;
  white-space: nowrap;
  text-align: left;
}

.trade-table thead {
  background: var(--surface-muted);
}

.trade-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 4px;
  font-size: 13px;
  white-space: nowrap;
  text-align: left;
}

.trade-table tbody tr {
  cursor: pointer;
}

.trade-table tbody tr:hover {
  background: #fafbfd;
}

.trade-table .num {
  text-align: right;
}

.trade-table .type-cell {
  font-weight: 500;
}

/* 交易记录：列宽/对齐按语义类名（私人 7 列 / 公开 6 列共用） */
.trade-table:not(.trade-table--cash) :is(th, td).trade-col-date {
  width: var(--ledger-trade-col-date);
  text-align: left;
}

.trade-table:not(.trade-table--cash) :is(th, td).trade-col-name {
  width: var(--ledger-trade-col-name);
  text-align: left;
}

.trade-table:not(.trade-table--cash) :is(th, td).trade-col-type {
  width: var(--ledger-trade-col-type);
  text-align: left;
}

.trade-table:not(.trade-table--cash) :is(th, td).trade-col-price {
  width: var(--ledger-trade-col-price);
  text-align: right;
}

.trade-table:not(.trade-table--cash) :is(th, td).trade-col-qty {
  width: var(--ledger-trade-col-qty);
  text-align: right;
}

.trade-table:not(.trade-table--cash) :is(th, td).trade-col-amt {
  width: var(--ledger-trade-col-amt);
  text-align: right;
}

.trade-table:not(.trade-table--cash) :is(th, td).trade-col-account,
.trade-table:not(.trade-table--cash) :is(th, td).trade-account-cell {
  width: var(--ledger-trade-col-account);
  text-align: left;
}

/* 资金记录：日期 | 账户 | 操作类型 | 金额 */
.trade-table--cash th:nth-child(1),
.trade-table--cash td:nth-child(1) {
  width: var(--ledger-cash-col-date);
}

.trade-table--cash th:nth-child(2),
.trade-table--cash td:nth-child(2) {
  width: var(--ledger-cash-col-account);
}

.trade-table--cash th:nth-child(3),
.trade-table--cash td:nth-child(3) {
  width: var(--ledger-cash-col-type);
}

.trade-table--cash th:nth-child(4),
.trade-table--cash td:nth-child(4) {
  width: var(--ledger-cash-col-amt);
}

.trade-record-note-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

@supports (width: 1cqw) {
  .trade-record-note-wrap {
    max-width: 100cqw;
  }
}

@supports not (width: 1cqw) {
  .trade-record-note-wrap {
    max-width: calc(100vw - 28px);
  }
}

.trade-record-note {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #5c6675;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.trade-record-note-label {
  color: #8b95a5;
  margin-right: 4px;
}

.trade-record-note-text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.trade-note-subrow td {
  border-top: none !important;
  border-bottom: 1px solid var(--line);
  padding-top: 0;
  padding-bottom: 10px;
  text-align: left !important;
  white-space: normal !important;
  overflow: visible;
}

.trade-row:has(+ .trade-note-subrow) td,
.stock-record-trade-row:has(+ .trade-note-subrow) td,
.cash-transfer-row:has(+ .trade-note-subrow) td {
  border-bottom: none;
  padding-bottom: 2px;
}

.trade-row:not(:has(+ .trade-note-subrow)) td,
.cash-transfer-row:not(:has(+ .trade-note-subrow)) td,
.stock-record-trade-row:not(:has(+ .trade-note-subrow)) td {
  border-bottom: 1px solid var(--line);
}

.stock-record-table .trade-note-subrow td {
  white-space: normal !important;
  border-top: none !important;
  border-bottom: none;
  padding: 0 4px 10px;
}

.stock-record-table .trade-note-subrow + .stock-record-trade-row td,
.stock-record-table .trade-note-subrow + tr td {
  border-top: 1px solid var(--line);
}

.stock-record-table tbody tr.trade-note-subrow:last-child td {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.stock-record-table .stock-record-trade-row:has(+ .trade-note-subrow) td {
  border-bottom: none;
  padding: 8px 4px 2px;
}

.trade-row--clickable,
.stock-record-trade-row,
.account-table-row {
  cursor: pointer;
}

.record-actions-dialog__inner {
  padding: 16px;
}

.record-actions-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.record-actions-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-actions-btns .btn {
  min-height: 44px;
  font-size: 14px;
}

.record-actions-delete-btn {
  color: var(--up);
}

.record-actions-dialog .panel-head .btn-ghost {
  -webkit-tap-highlight-color: transparent;
}

.record-actions-dialog .panel-head .btn-ghost:focus,
.record-actions-dialog .panel-head .btn-ghost:focus-visible,
.record-actions-dialog .panel-head .btn-ghost:active {
  outline: none;
  box-shadow: none;
}

.holdings-guide-dialog {
  width: min(100% - 16px, 420px);
  max-height: 92vh;
}

.holdings-guide-dialog__inner {
  padding: 12px;
  max-height: 92vh;
  overflow-y: auto;
}

.holdings-guide-dialog__body p {
  margin: 8px 0;
  line-height: 1.6;
  font-size: 14px;
}

.holdings-guide-dialog__lead {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.holdings-guide-dialog__scenarios {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.6;
  font-size: 14px;
}

.holdings-guide-dialog__scenarios li + li {
  margin-top: 6px;
}

.holdings-guide-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.guest-feed-login-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgb(255 255 255 / 4%);
}

.guest-feed-login-banner--top {
  margin-bottom: 0;
}

.guest-feed-login-banner--bottom {
  margin-top: 0;
}

.guest-feed-login-separator {
  height: 10px;
  width: 100%;
  margin: 0;
  background: #e8ecf1;
}

.guest-feed-login-banner__text {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: #93a0b4;
  line-height: 1.45;
}

.guest-feed-login-btn {
  flex-shrink: 0;
  min-width: 72px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.account-manage-delete {
  margin-top: 8px;
  color: var(--down);
}

.record-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.record-main h3 {
  margin: 0;
  font-size: 14px;
}

.record-main p {
  margin: 4px 0 0;
  color: #93a0b4;
  font-size: 12px;
}

.record-side {
  text-align: right;
  font-size: 12px;
}

.record-side p {
  margin: 0 0 4px;
}

.delete-btn {
  border: 1px solid #f0ccd1;
  background: #fff6f7;
  color: #d9434c;
  border-radius: 8px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.intro-panel p {
  margin: 8px 0;
  line-height: 1.6;
}

.dialog {
  width: min(100% - 16px, 408px);
  border: none;
  border-radius: 12px;
  padding: 0;
}

.dialog::backdrop {
  background: rgb(0 0 0 / 42%);
}

.dialog form {
  padding: 12px;
  overflow: visible;
}

.stock-record-dialog {
  width: min(100% - 10px, 410px);
  max-height: 92vh;
}

.stock-record-wrap {
  padding: 12px;
  overflow-y: auto;
  max-height: 92vh;
}

.stock-record-page-loading.hidden {
  display: none;
}

.stock-record-charts-panel {
  position: relative;
}

.stock-record-charts-loading.hidden {
  display: none;
}

.analysis-charts-panel {
  position: relative;
}

.analysis-charts-loading.hidden {
  display: none;
}

.stock-record-body.hidden {
  display: none;
}

.stock-record-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: none;
  padding: 12px 14px;
}

#closeStockRecordDialogBtn {
  flex-shrink: 0;
  min-width: 56px;
}

.stock-record-head-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.stock-record-head-left {
  flex: 1;
  min-width: 0;
}

.stock-record-head-right {
  text-align: right;
  flex-shrink: 0;
}

.stock-record-title {
  margin: 0;
  font-size: 18px;
}

.stock-record-time {
  margin: 4px 0 0;
  color: #98a2b3;
  font-size: 12px;
}

.stock-record-price {
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
}

.stock-record-change {
  margin-top: 4px;
  font-size: 18px;
}

.stock-record-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #79869a;
  font-size: 13px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

.legend-blue {
  background: #4091e0;
}

.legend-red {
  background: #ff4d4f;
}

.legend-buy {
  background: #3b7bf6;
}

.legend-sell {
  border: 1px solid #3b7bf6;
  background: #fff;
}

#stockRecordChart,
#stockRecordProfitChart,
#stockRecordWeightChart {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
}

.stock-record-chart-block {
  margin-top: 0;
}

.stock-record-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.stock-record-chart-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-top: 8px;
}

.stock-record-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #5f6b7a;
  cursor: pointer;
  user-select: none;
}

.stock-record-toggle input {
  accent-color: #4091e0;
}

.stock-record-toggle-line {
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  vertical-align: middle;
  margin-left: 2px;
}

.stock-record-toggle-line--close {
  background: #4091e0;
}

.stock-record-toggle-line--shares {
  background: #ff4d4f;
}

.stock-record-toggle-line--market-value {
  background: #f59e0b;
}

.stock-record-note {
  color: #8f9aad;
  font-size: 12px;
  margin: 8px 0 0;
}

.stock-record-body .stock-rank-help-wrap,
.stock-record-interval-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 2;
}

.stock-record-interval-help-wrap .stock-rank-help-bubble {
  left: 0;
  right: auto;
  min-width: 220px;
  max-width: min(300px, 86vw);
  z-index: 30;
}

.stock-record-interval-help-wrap .stock-rank-help-bubble::before {
  left: 10px;
  right: auto;
}

.stock-record-section-gap {
  height: 8px;
  background: var(--bg);
  margin: 0;
  flex-shrink: 0;
}

.stock-record-wrap {
  background: var(--panel);
}

.stock-detail-page .stock-record-wrap {
  background: var(--bg);
}

.stock-record-summary-panel,
.stock-record-chart-section,
.stock-record-chart-block,
.stock-record-trades-section {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stock-record-summary-panel {
  border-top: none;
}

.stock-record-head-main {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.stock-record-subhead {
  padding: 12px 14px 10px;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  overflow: visible;
}

.stock-record-range-row {
  padding: 0 14px 12px;
}

.stock-record-chart-section,
.stock-record-chart-block,
.stock-record-trades-section {
  padding: 12px 14px;
}

.stock-record-trades-section {
  padding-bottom: 12px;
}

.stock-record-subhead-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.stock-record-interval-label {
  color: #667085;
  font-size: 13px;
}

.stock-record-interval-value {
  font-size: 14px;
  font-weight: 600;
}

.stock-record-interval-value.up {
  color: var(--up, #e34d59);
}

.stock-record-interval-value.down {
  color: var(--down, #00a870);
}

.stock-record-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.stock-record-section-head .stock-record-section-title {
  margin: 0;
}

.stock-record-section-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.chart-latest-pill--stock-hold {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 4px;
}

.stock-record-trades-section .stock-record-section-title {
  margin-bottom: 10px;
}

.stock-record-dynamics-section {
  padding: 12px 0 0;
}

.stock-record-dynamics-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 10px;
}

.stock-record-dynamics-filter-wrap {
  flex-shrink: 0;
}

.stock-record-dynamics-filter {
  min-width: 108px;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-content);
  color: var(--text);
  font-size: 13px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9aa3b2 50%),
    linear-gradient(135deg, #9aa3b2 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 13px,
    calc(100% - 9px) 13px;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}

.stock-record-dynamics-section .stock-record-section-title {
  margin-bottom: 0;
}

.stock-record-subhead-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stock-record-account-wrap {
  min-width: 148px;
}

.stock-record-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  container-type: inline-size;
  container-name: trade-record-scroll;
}

.stock-record-table {
  margin-top: 0;
}

.stock-record-table thead th {
  background: var(--surface-muted);
  color: #8f99a9;
  font-weight: 500;
}

.stock-record-table th,
.stock-record-table td {
  border-top: 1px solid var(--line);
  padding: 8px 4px;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

/* 个股记录（本人）：日期 | 类型 | 价格 | 数量 | 金额 | 账户（列宽 ch；表宽 max(100%, 列宽之和)） */
.stock-record-table:not(.stock-record-table--pub) th:nth-child(1),
.stock-record-table:not(.stock-record-table--pub) td:nth-child(1) {
  width: var(--ledger-stock-col-date);
}

.stock-record-table:not(.stock-record-table--pub) th:nth-child(2),
.stock-record-table:not(.stock-record-table--pub) td:nth-child(2) {
  width: var(--ledger-stock-col-type);
}

.stock-record-table:not(.stock-record-table--pub) th:nth-child(3),
.stock-record-table:not(.stock-record-table--pub) td:nth-child(3) {
  width: var(--ledger-stock-col-price);
  text-align: right;
}

.stock-record-table:not(.stock-record-table--pub) th:nth-child(4),
.stock-record-table:not(.stock-record-table--pub) td:nth-child(4) {
  width: var(--ledger-stock-col-qty);
  text-align: right;
}

.stock-record-table:not(.stock-record-table--pub) th:nth-child(5),
.stock-record-table:not(.stock-record-table--pub) td:nth-child(5) {
  width: var(--ledger-stock-col-amt);
  text-align: right;
}

.stock-record-table:not(.stock-record-table--pub) th:nth-child(6),
.stock-record-table:not(.stock-record-table--pub) td:nth-child(6) {
  width: var(--ledger-stock-col-account);
  text-align: left;
}

/* 个股记录（公开）：日期 | 类型 | 价格 | 金额占比 | 账户 */
.stock-record-table--pub th:nth-child(1),
.stock-record-table--pub td:nth-child(1) {
  width: var(--ledger-stock-col-date);
}

.stock-record-table--pub th:nth-child(2),
.stock-record-table--pub td:nth-child(2) {
  width: var(--ledger-stock-col-type);
}

.stock-record-table--pub th:nth-child(3),
.stock-record-table--pub td:nth-child(3) {
  width: var(--ledger-stock-col-price);
  text-align: right;
}

.stock-record-table--pub th:nth-child(4),
.stock-record-table--pub td:nth-child(4) {
  width: var(--ledger-stock-col-amt);
  text-align: right;
}

.stock-record-table--pub th:nth-child(5),
.stock-record-table--pub td:nth-child(5) {
  width: var(--ledger-stock-col-account);
  text-align: left;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
}

.account-table th,
.account-table td {
  border-top: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  font-size: 13px;
}

.stock-detail-page {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: auto;
  display: none;
}

.stock-detail-page.active {
  display: block;
}

.stock-detail-page .stock-record-wrap {
  max-width: none;
  margin: 0;
  max-height: none;
  min-height: calc(100vh - 62px);
  padding: 0 0 80px;
  background: var(--bg);
}

.full {
  width: 100%;
}

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  max-width: 100%;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  border-top: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 100;
}

.bottom-tabs--holdings,
.bottom-tabs--profile {
  grid-template-columns: repeat(4, 1fr);
}

.bottom-tab-btn {
  border: none;
  background: var(--panel);
  color: var(--tab);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-tab-btn .tab-ico {
  font-size: 17px;
  line-height: 1;
}

.bottom-tab-btn.active {
  color: var(--blue);
}

.mine-stack {
  margin: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mine-panel {
  margin: 0;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.mine-nav-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  text-align: left;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.mine-nav-row:last-child {
  border-bottom: none;
}

.mine-nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.mine-nav-title {
  font-size: 15px;
  font-weight: 500;
}

.mine-nav-value {
  font-size: 14px;
  color: var(--muted);
}

.mine-nav-chevron {
  flex-shrink: 0;
  color: #c5ccd6;
  font-size: 18px;
  line-height: 1;
}

.mine-sub-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.mine-sub-head h2 {
  margin: 0;
  font-size: 17px;
  justify-self: center;
  text-align: center;
}

.secondary-head-spacer {
  width: 56px;
  min-width: 56px;
  visibility: hidden;
}

.mine-back-btn,
#tradeSearchBackBtn,
.community-profile-back-btn {
  min-width: 56px;
}

.secondary-page-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.secondary-page-topbar > :first-child {
  justify-self: start;
}

.secondary-page-title {
  grid-column: 2;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  justify-self: center;
}

.secondary-page-topbar-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.stock-record-add-trade-btn {
  font-size: 12px;
  padding: 6px 8px;
  white-space: nowrap;
  max-width: 100%;
}

.empty {
  text-align: center;
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #96a0b1;
  padding: 14px 10px;
  font-size: 13px;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

.hidden {
  display: none !important;
}

body.auth-mode,
body.subscription-expired-mode {
  background: var(--bg);
}

.auth-invite-hint {
  margin: -4px 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.subscription-expired-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  box-sizing: border-box;
}

.subscription-expired-top {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  padding: max(12px, env(safe-area-inset-top, 0px)) 14px 12px;
}

.subscription-expired-screen {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 16px max(32px, calc(24px + env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.subscription-expired-main {
  flex: 1 1 auto;
  padding-top: 8px;
}

.subscription-expired-lead {
  width: 100%;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  text-align: left;
}

.subscription-expired-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 8px;
  width: 100%;
  max-width: 380px;
  align-self: center;
}

.auth-gate {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 16px 24px;
  overflow-y: auto;
}

.auth-gate__topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 0 4px;
  background: var(--bg, #f5f7fa);
}

.auth-gate__back-btn {
  margin: 0;
  padding: 8px 4px;
}

.auth-screen {
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: center;
}

.auth-card {
  width: 100%;
  background: var(--panel);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 8px 28px rgb(0 0 0 / 8%);
}

.guest-login-required-dialog {
  width: min(92vw, 320px);
  border: none;
  border-radius: 14px;
  padding: 0;
}

.guest-login-required-dialog__inner {
  padding: 20px 18px 16px;
}

.guest-login-required-dialog__title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
}

.guest-login-required-dialog__text {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.guest-login-required-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.product-brand__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
}

.product-brand__name {
  margin: 12px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
}

.product-brand__intro {
  margin-top: 16px;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: left;
  max-height: min(42vh, 280px);
  overflow-y: auto;
}

.product-brand__intro p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text);
}

.product-brand__intro p:last-child {
  margin-bottom: 0;
}

.product-brand--mine .product-brand__intro {
  max-height: none;
  overflow: visible;
}

.auth-form .form-row {
  margin-bottom: 12px;
}

.auth-error {
  color: var(--up);
  font-size: 13px;
  margin: 0 0 10px;
}

.auth-switch {
  text-align: center;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.btn-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.mine-user-block {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.mine-user-phone {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.mine-nav-danger .mine-nav-title {
  color: var(--up);
}

.mine-panel-head {
  padding: 12px 16px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.mine-nickname-row {
  padding: 8px 16px 4px;
}

.mine-nickname-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #5c6675;
}

.mine-nickname-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9e1ee;
  border-radius: 10px;
  font-size: 15px;
}

.mine-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.mine-public-community-row {
  align-items: flex-start;
}

.mine-public-community-copy {
  flex: 1;
  min-width: 0;
  padding-right: 12px;
  max-width: calc(100% - 48px - 12px);
}

.mine-public-community-copy .mine-switch-label {
  display: block;
}

.mine-community-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9399a3;
  font-weight: 400;
}

.mine-switch-label {
  font-size: 15px;
  font-weight: 500;
}

.mine-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.mine-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.mine-switch-slider {
  position: absolute;
  inset: 0;
  background: #c9d1dd;
  border-radius: 14px;
  transition: background 0.18s ease;
  cursor: pointer;
}

.mine-switch-slider::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 3px rgb(0 0 0 / 18%);
}

.mine-switch input:checked + .mine-switch-slider {
  background: var(--blue);
}

.mine-switch input:checked + .mine-switch-slider::after {
  transform: translateX(20px);
}

.mine-community-msg {
  margin: 0 16px 10px;
  font-size: 13px;
  color: var(--muted);
}

.mine-community-msg.is-error {
  color: var(--up);
}

.mine-community-msg.is-ok {
  color: var(--down);
}

.mine-community-msg--home {
  margin: 8px 0 0;
  font-size: 13px;
}

.mine-community-save {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
}

.community-list {
  padding: 10px 0 20px;
}

.community-empty-panel {
  margin: 16px 12px;
  text-align: center;
  padding: 36px 20px;
}

.community-empty-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.community-empty-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.ai-analysis-page {
  padding: 0 0 20px;
}

.ai-mcp-info-card {
  margin: 16px 12px 12px;
  padding: 18px 16px 20px;
}

.ai-mcp-info-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.ai-mcp-info-box {
  margin: 0 0 16px;
  padding: 14px 14px 4px;
  border-radius: 10px;
  background: #f3f6fb;
  border: 1px solid #e8edf5;
}

.ai-mcp-info-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  padding: 0 0 12px;
}

.ai-mcp-info-row--url {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
}

.ai-mcp-info-label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.ai-mcp-info-value {
  min-width: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
}

.ai-mcp-info-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.ai-mcp-info-copy-btn {
  flex-shrink: 0;
  border: 1px solid #dbe4f0;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.ai-mcp-info-copy-btn.is-copied {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.ai-analysis-lead {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.ai-analysis-intro-copy {
  margin: 0 0 16px;
}

.ai-analysis-examples-item {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.ai-analysis-examples-item:last-child {
  margin-bottom: 0;
}

.ai-analysis-notes {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ai-analysis-intro {
  margin: 16px 12px 12px;
  padding: 18px 16px 20px;
}

.ai-analysis-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-provider-card {
  margin: 0 12px;
  padding: 18px 16px 20px;
}

.ai-provider-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.ai-provider-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  min-height: 24px;
}

.ai-provider-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.ai-provider-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.ai-provider-status.is-connected {
  color: #047857;
}

.ai-provider-status.is-connected::before {
  background: #10b981;
}

.ai-provider-status.is-error {
  color: #b91c1c;
}

.ai-provider-status.is-error::before {
  background: #ef4444;
}

.ai-provider-disconnect {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  line-height: 1.4;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ai-provider-disconnect.hidden {
  display: none;
}

.ai-provider-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-provider-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  line-height: 1.2;
}

.ai-provider-guide {
  margin-top: 4px;
}

.ai-provider-section-lead {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.ai-provider-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.ai-provider-examples {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.65;
}

.ai-provider-examples-item {
  margin: 0 0 8px;
  color: var(--muted);
}

.ai-provider-examples-item:last-child {
  margin-bottom: 0;
}

.ai-provider-connector-info {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}

.ai-provider-connector-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 10px;
  align-items: center;
  margin-top: 8px;
}

.ai-provider-connector-row:first-of-type {
  margin-top: 0;
}

.ai-provider-connector-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.ai-provider-connector-value {
  display: block;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text);
}

.ai-provider-copy-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.ai-provider-copy-btn.is-copied {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.community-card {
  background: var(--panel);
  border-radius: 0;
  border: 1px solid var(--line);
  margin: 0 0 12px;
  padding: 14px 14px 12px;
}

.community-card__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.community-card__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.community-card-name-stack {
  min-width: 0;
}

.community-card__header-follow {
  flex-shrink: 0;
}

.community-card__header-follow .community-follow-btn {
  border-radius: 999px;
  padding: 6px 14px;
}

.community-card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.community-card-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.community-follow-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.community-follow-btn.is-on {
  background: var(--blue);
  color: #fff;
}

.community-returns-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #fff;
  overflow: hidden;
}

.community-returns-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 4px;
  text-align: center;
}

.community-returns-seg--up {
  background: rgba(244, 90, 104, 0.1);
}

.community-returns-seg--down {
  background: rgba(14, 188, 159, 0.1);
}

.community-returns-seg--flat {
  background: var(--surface-muted);
}

.community-returns-seg__label {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.community-returns-seg__value {
  font-size: var(--metric-value-size);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.community-returns-seg--up .community-returns-seg__value {
  color: var(--up);
}

.community-returns-seg--down .community-returns-seg__value {
  color: var(--down);
}

.community-returns-seg--flat .community-returns-seg__value {
  color: var(--muted);
}

.community-card .community-returns-bar {
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.community-card .community-top3 {
  margin-top: 0;
}

.community-profile-overview-min .overview-head--public-earn {
  justify-content: flex-end;
  height: auto;
  min-height: 0;
  padding: 8px 14px 0;
}

.community-profile-overview-min .community-returns-bar--profile {
  margin-bottom: 0;
  padding: 12px 14px 12px;
}

.community-positions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #5c6675;
}

.community-positions ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.community-feed-item {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 0 12px 10px;
  padding: 12px 14px;
}

.community-feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.community-feed-user {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  text-align: left;
}

.community-feed-date {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.community-feed-main {
  font-size: 14px;
  line-height: 1.45;
}

.community-feed-side {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.community-feed-side.buy {
  background: rgb(244 90 104 / 12%);
  color: var(--up);
}

.community-feed-side.sell {
  background: rgb(14 188 159 / 12%);
  color: var(--down);
}

.community-feed-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: #5c6675;
}

.community-rank-index {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef1f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.community-rank-index.top1 {
  background: linear-gradient(135deg, #ffd76a, #ffb347);
  color: #5c3d00;
}

.community-rank-index.top2 {
  background: linear-gradient(135deg, #e8eaed, #c5cbd6);
  color: #3d4555;
}

.community-rank-index.top3 {
  background: linear-gradient(135deg, #e8c9a8, #c9a27e);
  color: #4d3518;
}

.community-profile-body {
  padding: 4px 0 16px;
}

.community-profile-section {
  margin-top: 14px;
}

.community-profile-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.community-profile-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.community-profile-table th,
.community-profile-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.community-profile-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.community-profile-head-panel {
  margin-top: 0;
  margin-bottom: 0;
  border-top: none;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
}

.community-profile-top-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 2px 0 0;
}

.community-profile-top-row > :first-child {
  justify-self: start;
}

.community-profile-back-btn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
}

.community-profile-page-title {
  grid-column: 2;
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  min-width: 0;
  line-height: 1.25;
  justify-self: center;
}

.community-profile-follow-slot {
  grid-column: 3;
  justify-self: end;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.community-profile-disclaimer {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.community-profile-earning-disclaimer {
  margin: 12px 14px 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.community-profile-subtabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 4px 0 10px;
  padding: 6px 0 0;
  background: var(--panel);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--line);
}

.community-profile-subtab {
  border: none;
  background: transparent;
  color: var(--tab);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  padding: 10px 4px;
  cursor: pointer;
}

.community-profile-subtab .tab-ico {
  font-size: 17px;
  line-height: 1;
}

.community-profile-subtab.active {
  color: var(--blue);
}

.community-profile-tab-panel {
  display: none;
}

.community-profile-tab-panel.is-active {
  display: block;
}

.community-profile-tab-panel[data-profile-panel="analysis"] .route-pane--community-analysis {
  display: block;
}

.route-pane--community-analysis {
  padding: 0;
}

.route-pane--community-analysis.active {
  display: block;
}

.community-profile-tab-panel[data-profile-panel="trade"] .route-pane--community-trade {
  display: block;
}

.route-pane--community-trade {
  padding: 0;
}

.route-pane--community-trade.active {
  display: block;
}

.trade-table :is(th, td)[class*="trade-col-"],
.trade-table .trade-account-cell {
  box-sizing: border-box;
}

.trade-table .stock-record-amt-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 他人主页个股记录表头：金额 + 与收益排行一致的气泡 */
.stock-record-amt-th-inner {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.stock-record-table--pub .stock-record-amt-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.community-profile-toolbar {
  padding: 0 12px 12px;
  display: flex;
  justify-content: flex-end;
}

.community-desensitize-tag {
  margin: 8px 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.stock-currency-toggle.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.community-card--interactive {
  display: block;
}

.community-card__main {
  width: 100%;
  min-width: 0;
}

.community-card-name-line {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blue);
}

.community-top3 {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.community-top3-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 8px 0 0;
}

.community-top3-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.community-top3-row:last-child {
  border-bottom: none;
}

.community-top3-rank {
  width: 28px;
  font-size: 20px;
  font-weight: 600;
  color: #c5ccd6;
  flex-shrink: 0;
  text-align: center;
}

.community-top3-mid {
  flex: 1;
  min-width: 0;
}

.community-stock-identity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.community-stock-identity__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.community-stock-identity__code {
  flex-shrink: 0;
  color: var(--muted);
}

.community-stock-identity--feed .community-stock-identity__name {
  font-size: 17px;
  font-weight: 700;
}

.community-stock-identity--feed .community-stock-identity__code {
  font-size: 14px;
}

.community-stock-identity--top3 .community-stock-identity__name {
  font-size: 15px;
}

.community-stock-identity--top3 .community-stock-identity__code {
  font-size: 12px;
  text-transform: uppercase;
}

.community-top3-val {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.community-top3-pct {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.community-feed-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 0 12px 14px;
  box-shadow: 0 2px 10px rgb(0 0 0 / 4%);
  overflow: hidden;
}

.community-feed-card__inner {
  padding: 12px 16px;
}

.community-feed-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.community-feed-card__user {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.community-feed-user-icon {
  flex-shrink: 0;
  color: #9aa3b2;
}

.community-feed-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-feed-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.community-feed-card__action-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}

.community-feed-card__stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.community-feed-side-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.community-feed-side-pill--buy {
  color: #e5484d;
  background: rgb(229 72 77 / 12%);
}

.community-feed-side-pill--sell {
  color: var(--down);
  background: rgb(46 125 74 / 12%);
}

.community-feed-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  padding: 10px 0;
  background: #f3f4f6;
  border-radius: 10px;
}

.community-feed-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 0 12px;
  text-align: left;
}

.community-feed-metric + .community-feed-metric {
  border-left: 1px solid rgb(0 0 0 / 6%);
}

.community-feed-metric-label {
  font-size: 12px;
  color: var(--muted);
}

.community-feed-metric-label--with-help {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.community-feed-metric-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.community-feed-side-text {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
}

.community-feed-card__body {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.community-feed-card__col--stock {
  flex: 1;
  min-width: 0;
  padding-right: 12px;
}

.community-feed-card__col--detail {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.community-feed-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.community-feed-kv-label {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.community-feed-kv-label--with-help {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.community-feed-card .community-feed-amt-help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.community-feed-kv-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.community-feed-card__body .community-feed-stock-name {
  font-size: 16px;
  font-weight: 600;
}

.community-feed-card__body .community-feed-stock-sub {
  margin-top: 6px;
}

.community-feed-card__top {
  margin-bottom: 12px;
}

.community-feed-card__stock {
  margin-bottom: 14px;
}

.community-feed-stock-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.community-feed-stock-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.community-feed-stock-code {
  font-size: 14px;
  color: var(--muted);
}

.community-market-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.community-market-tag--cn {
  background: #ff7e4c;
}

.community-market-tag--hk {
  background: #4f83f1;
}

.community-market-tag--us {
  background: #2e7d4a;
}

.community-market-tag--ot {
  background: #9aa3b2;
}

.community-feed-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.community-feed-meta-item--full {
  grid-column: 1 / -1;
}

.community-feed-dt {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.community-feed-dd {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.community-feed-side-buy {
  color: var(--up);
}

.community-feed-side-sell {
  color: var(--down);
}

.community-feed-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.45;
  color: #5c6675;
}

.community-feed-note .community-feed-dt {
  display: inline;
  margin-right: 6px;
}

.community-feed-note .community-feed-dd {
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.community-feed-note .community-feed-dd {
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.community-feed-card__actions--end {
  margin-left: auto;
  justify-content: flex-end;
}

/* 动态流：白底通栏卡片 + 灰色间隔条（社区首页 / 组合动态 / 个股动态 / 他人主页） */
#route-dynamics,
#route-community-feed,
.community-profile-tab-panel[data-profile-panel="dynamics"] {
  background: var(--surface-content);
}

.dynamics-list {
  background: var(--surface-content);
  padding: 0 0 12px;
}

.community-list.dynamics-list {
  padding: 0 0 12px;
}

.dynamics-list .community-feed-card--stream,
.community-list.dynamics-list .community-feed-card--stream,
.dynamics-list .dyn-card {
  background: var(--surface-content);
  border: none;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
  overflow-anchor: none;
}

.dynamics-list-gap {
  height: 8px;
  background: var(--surface-page);
  margin: 0;
  flex-shrink: 0;
}

.dynamics-list-load-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  visibility: hidden;
}

.dynamics-list-loading-more {
  padding: 16px 12px;
  text-align: center;
  color: var(--muted);
}

.dynamics-list .empty {
  padding: 24px 12px;
}

/* dyn-card 母版：槽位间距与图三交易卡一致 */
.dyn-card__inner {
  padding: 12px 16px;
}

/* 槽位间距只由 slot 兄弟规则控制，覆盖 legacy community-feed-card__* 的 margin */
.dyn-card__inner > .dyn-card__slot {
  margin-top: 0;
}

.dyn-card__inner > .dyn-card__slot + .dyn-card__slot {
  margin-top: 12px;
}

.dyn-card__slot--header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.dyn-card__slot--stock-tags {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.dyn-card__slot--stock-tags .dyn-card__stock-tags {
  margin: 0;
}

.dyn-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 10px 0;
  background: #f3f4f6;
  border-radius: 10px;
}

.dyn-card__metrics--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dyn-card__metrics--2,
.community-feed-card__metrics--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dyn-card__metrics--2 .community-feed-metric,
.community-feed-card__metrics--2 .community-feed-metric {
  padding: 0 12px;
}

.dyn-card__body-wrap {
  position: relative;
  display: block;
}

.dyn-card__body,
.dynamics-list .dyn-card .community-feed-card__content {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.dyn-card__body.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.dyn-card__body-toggle {
  margin: 0 0 0 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 14px;
  line-height: inherit;
  vertical-align: baseline;
  cursor: pointer;
}

.dyn-card__body-wrap > .dyn-card__body-toggle:not(.hidden) {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0 0 0 12px;
  line-height: calc(18px * 1.5);
}

.dyn-card__body-wrap.is-collapsed > .dyn-card__body-toggle:not(.hidden) {
  background: linear-gradient(90deg, transparent, var(--surface-content) 10px);
}

.dyn-card__body-wrap:not(.is-collapsed) > .dyn-card__body-toggle:not(.hidden) {
  padding-left: 6px;
  background: var(--surface-content);
}

.dyn-card__body-toggle.hidden {
  display: none;
}

.dyn-card__slot--footer,
.dyn-card .community-feed-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: #8a94a3;
}

.dynamics-list .dyn-card .community-feed-note {
  margin: 0;
  padding-top: 0;
  border-top: none;
  color: var(--text);
}

.app-header-action-btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 6px 12px;
  white-space: nowrap;
}

.app-top-bar-spacer.hidden {
  display: none;
}

.dynamics-route-head {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px 0;
}

.dynamics-compose-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  background: var(--surface-content);
  z-index: 1200;
}

.dynamics-compose-dialog::backdrop {
  background: var(--surface-content);
  opacity: 1;
}

html.dynamics-compose-open,
html.dynamics-compose-open body {
  overflow: hidden;
}

.dynamics-compose-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
}

.dynamics-compose-head {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-content);
}

.dynamics-compose-cancel {
  justify-self: start;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

.dynamics-compose-cancel:focus,
.dynamics-compose-cancel:focus-visible,
.dynamics-compose-cancel:active {
  outline: none;
  box-shadow: none;
}

.dynamics-compose-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dynamics-compose-submit {
  justify-self: end;
  border: none;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  min-width: 56px;
}

.dynamics-compose-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dynamics-compose-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 12px;
  -webkit-overflow-scrolling: touch;
  background: var(--surface-content);
  overscroll-behavior: contain;
  isolation: isolate;
}

.dynamics-compose-editor {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--surface-content);
}

.dynamics-compose-textarea--solo {
  min-height: 72px;
}

.dynamics-compose-valuation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-content);
}

.dynamics-compose-valuation.hidden {
  display: none;
}

.dynamics-compose-valuation-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dynamics-compose-valuation-label {
  font-size: 13px;
  color: #9aa3b2;
}

.dynamics-compose-valuation-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  background: var(--surface-content);
  box-sizing: border-box;
}

.dynamics-compose-tool--valuation {
  color: var(--muted);
}

.dynamics-compose-tool--valuation.is-active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.dynamics-compose-tool--valuation:hover:not(:disabled) {
  color: var(--blue);
}

.dynamics-compose-tool-scale {
  display: block;
  width: auto;
  height: 20px;
}

.dynamics-compose-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  color: #9aa3b2;
}

.dynamics-compose-main {
  flex: 1;
  min-width: 0;
  background: var(--surface-content);
}

.dynamics-compose-user-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.dynamics-compose-textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  resize: none;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-content);
  outline: none;
  overflow: hidden;
  box-sizing: border-box;
}

.dynamics-compose-textarea::placeholder {
  color: #9aa3b2;
}

.dynamics-compose-symbols {
  margin-top: 12px;
  margin-bottom: 0;
}

.dynamics-compose-symbols:empty {
  display: none;
}

.dynamics-compose-images {
  margin-top: 12px;
  margin-bottom: 0;
}

.dynamics-compose-images:empty {
  display: none;
}

.dynamics-compose-error {
  margin: 12px 0 0;
}

.dynamics-compose-delete {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--up);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.dynamics-compose-delete.hidden {
  display: none;
}

.dynamics-compose-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--surface-content);
}

.dynamics-compose-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dynamics-compose-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.dynamics-compose-tool:hover:not(:disabled) {
  background: #eef3fd;
}

.dynamics-compose-tool:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dynamics-compose-tool--dollar {
  font-family: inherit;
}

.dynamics-compose-tool-dollar {
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.dynamics-compose-char-count {
  font-size: 13px;
  color: #9aa3b2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dynamics-compose-char-count.is-warn {
  color: #e6a23c;
}

.dynamics-compose-char-count.is-limit {
  color: var(--up);
}

.dynamics-compose-images .dynamics-image-picker-item img {
  border-radius: 12px;
}

.dynamics-publish-btn {
  font-size: 14px;
  padding: 6px 14px;
}

.community-feed-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: #8a94a3;
}

.community-feed-card__footer-account {
  color: #8a94a3;
}

.community-feed-card__content {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.community-feed-card__content a {
  color: var(--primary);
  text-decoration: underline;
}

.community-feed-card__stock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.community-feed-card__metrics--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dynamics-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.dynamics-image-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  background: #f2f4f7;
}

.dynamics-image-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.dynamics-image-picker-item {
  position: relative;
  aspect-ratio: 1;
}

.dynamics-image-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.dynamics-image-picker-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
}

.dynamics-symbol-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.dynamics-symbol-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f7;
  font-size: 13px;
}

.dynamics-symbol-tag button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #667085;
}

.dynamics-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
}

.dynamics-lightbox.hidden {
  display: none;
}

.dynamics-lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

.dynamics-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.community-profile-tab-panel [data-profile-dynamics-list] {
  padding: 0 0 12px;
}

.stock-record-dynamics-section .dynamics-list {
  background: var(--surface-content);
}

.trade-search-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trade-search-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.trade-search-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  justify-self: center;
  text-align: center;
}

.trade-search-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.trade-search-input-wrap {
  position: relative;
}

.trade-stock-search-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.trade-stock-search-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79, 131, 241, 0.2);
}

.trade-stock-search-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: min(56vh, 420px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(32, 38, 47, 0.12);
}

.trade-stock-search-results[hidden] {
  display: none !important;
}

.trade-stock-search-results li {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.trade-stock-search-results li:last-child {
  border-bottom: none;
}

.trade-stock-search-results li:active {
  background: #f4f6fa;
}

.trade-stock-search-name {
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.trade-stock-search-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
}

.trade-stock-search-code {
  font-weight: 600;
  color: #5c6675;
}

.trade-stock-search-loading,
.trade-stock-search-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.trade-search-history[hidden] {
  display: none !important;
}

.trade-search-history__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.trade-search-history__list .community-feed-card__stock-tags {
  margin-top: 0;
}

.trade-search-history__tag {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.trade-search-history__tag:active .community-stock-identity {
  opacity: 0.72;
}
