:root {
  --canvas: #efe9df;
  --canvas-2: #fbf7f1;
  --sidebar: #fffdf8;
  --surface: #fffdf8;
  --surface-2: #f7f1ea;
  --surface-3: #eee4da;
  --ink: #201817;
  --ink-soft: #473936;
  --muted: #867872;
  --line: rgba(111, 17, 28, 0.14);
  --line-strong: rgba(111, 17, 28, 0.24);
  --blue: #9f1d2b;
  --blue-soft: #f8e7e9;
  --green: #16854d;
  --green-soft: #e3f5eb;
  --red: #d73535;
  --red-soft: #fae4e0;
  --amber: #b87a19;
  --amber-soft: #f7eadc;
  --shadow: 0 22px 60px rgba(38, 22, 20, 0.14);
  --shadow-sm: 0 1px 2px rgba(38, 22, 20, 0.07), 0 16px 36px rgba(38, 22, 20, 0.07);
  --radius-lg: 14px;
  /* 半透明层与纸感辅助色：全部走变量，深色主题只改这里 */
  --veil-hi: rgba(255, 255, 255, 0.9);
  --veil-mid: rgba(255, 255, 255, 0.7);
  --veil-lo: rgba(255, 253, 248, 0.97);
  --glass: rgba(255, 255, 255, 0.6);
  --paper-inset: var(--paper-inset);
  --surface-warm: var(--surface-warm);
  --on-blue: #fff7f0; /* 品牌红底上的字色，两套主题共用 */
  --radius-md: 10px;
  --radius-sm: 6px;
  --nav-width: 224px;
  --font-sans: "Outfit", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
}

/* ── 深色主题：暖色深调，品牌红提亮保对比。默认跟随系统，手动切换写 data-theme ── */
:root[data-theme="dark"] {
  --canvas: #14100d;
  --canvas-2: #1b1613;
  --sidebar: #201a16;
  --surface: #201a16;
  --surface-2: #292219;
  --surface-3: #332a22;
  --ink: #efe6dd;
  --ink-soft: #cdbfb5;
  --muted: #93857c;
  --line: rgba(236, 178, 170, 0.16);
  --line-strong: rgba(236, 178, 170, 0.3);
  --blue: #e0606c;
  --blue-soft: #3a2226;
  --green: #46bd7f;
  --green-soft: #1c2f24;
  --red: #f0685c;
  --red-soft: #3a221e;
  --amber: #d9a349;
  --amber-soft: #362c1c;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
  --veil-hi: rgba(41, 34, 27, 0.9);
  --veil-mid: rgba(41, 34, 27, 0.7);
  --veil-lo: rgba(32, 26, 22, 0.97);
  --glass: rgba(32, 26, 22, 0.6);
  --paper-inset: rgba(24, 19, 16, 0.72);
  --surface-warm: #262019;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  /* 滚动条的位置永久留着：短页面没有滚动条、长页面有，可视宽度会差出一条滚动条的宽度，
     顶栏是通栏固定的，右侧按钮就跟着页面长短左右跳。留住位置，切页面不再抖。 */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 0%, rgba(159, 29, 43, 0.055), transparent 34%),
    linear-gradient(180deg, var(--canvas-2) 0%, var(--canvas) 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(83, 74, 58, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 74, 58, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}

button,
a {
  font: inherit;
  touch-action: manipulation;
}

a { color: inherit; text-decoration: none; }

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(159, 29, 43, 0.28);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.2;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* 手机浏览器的地址栏会占掉一截可视高度，按 100vh 算首页仍要滚一下才见页脚；
     dvh 按"当前真正看得见的高度"算，不支持的老浏览器自动忽略这行退回上面那条 */
  min-height: 100dvh;
}

/* 全站页脚：单行极简，免责声明 + 客服邮箱（备案号待用户提供后加在这里） */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 18px 24px 22px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.site-footer__sep {
  opacity: 0.5;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 12px;
  padding: 18px 12px;
  background:
    radial-gradient(circle at 0% 0%, rgba(159, 29, 43, 0.055), transparent 38%),
    linear-gradient(180deg, var(--veil-hi), var(--veil-lo)),
    var(--sidebar);
  border-right: 1px solid rgba(111, 17, 28, 0.12);
  box-shadow: 10px 0 34px rgba(38, 22, 20, 0.045);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-radius: var(--radius-md);
  padding: 4px;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #7f1620;
  color: #fff7f0;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 24px rgba(80, 13, 21, 0.14), inset 0 1px rgba(255, 255, 255, 0.25);
}

.brand strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.sidebar__divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(111, 17, 28, 0.16), transparent);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.side-link__icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(159, 29, 43, 0.06);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.side-link:hover {
  background: rgba(159, 29, 43, 0.055);
  color: var(--blue);
}

.side-link.is-active,
.side-link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(159, 29, 43, 0.11), rgba(159, 29, 43, 0.035));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(159, 29, 43, 0.14);
}

.side-link.is-active .side-link__icon,
.side-link[aria-current="page"] .side-link__icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.side-link:active,
.ghost-button:active,
.primary-button:active,
.reset-link:active {
  transform: scale(0.96);
}

.sidebar-watch {
  min-width: 0;
}

.account-panel {
  min-width: 0;
  align-self: end; /* 账户区固定在侧栏底部 */
}

.account-mini__profile {
  margin-top: 8px;
  width: 100%;
}

.account-mini {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 1px solid rgba(111, 17, 28, 0.12);
}

.account-mini span,
.account-mini small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-mini strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 桌面端未登录卡片：理顺层级 + 实心 CTA */
@media (min-width: 981px) {
  .account-mini--guest {
    gap: 4px;
    padding: 16px 14px;
  }

  .account-mini--guest span {
    color: var(--blue);
    letter-spacing: 0.08em;
  }

  .account-mini--guest strong {
    font-size: 16px;
  }

  .account-mini--guest small {
    white-space: normal;
    line-height: 1.5;
    font-weight: 600;
  }

  .account-mini--guest .reset-link {
    margin-top: 10px;
    min-height: 42px;
    border-color: rgba(159, 29, 43, 0.24);
    background: linear-gradient(180deg, #b72a39 0%, #7f1620 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(80, 13, 21, 0.26);
  }

  .account-mini--guest .reset-link:hover {
    filter: brightness(1.06);
  }
}

.reset-link {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(159, 29, 43, 0.05);
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.main-surface {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 桌面双列：左=我的自选+盘面+成绩单，右=信息流。核心「股票」与「消息」并排。 */
.surface-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: start;
}

.col-watch,
.col-feed {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

/* 列内已用 gap 控制间距，去掉面板自带的 margin-top 以免叠加。 */
.surface-cols .watch-panel,
.surface-cols .scorecard-panel,
.surface-cols .market-clock-panel {
  margin-top: 0;
}

/* 未登录/空自选：退化单列，引导+推荐铺满，隐藏空的信息流列。 */
.surface-cols.is-single {
  grid-template-columns: 1fr;
}

.surface-cols.is-single .col-feed {
  display: none;
}

.surface-cols.is-feed-only {
  grid-template-columns: 1fr;
}

.surface-cols.is-feed-only .col-watch {
  display: none;
}

.surface-cols.is-feed-only .col-feed {
  display: grid;
}

/* 中等屏及以下回退单列：信息流排到自选下方。 */
@media (max-width: 1100px) {
  .surface-cols {
    grid-template-columns: 1fr;
  }
}

.topbar {
  display: none;
}

.topbar > div:first-child {
  min-width: 260px;
}

.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
  white-space: nowrap;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, #b72a39 0%, #7f1620 100%);
  border-color: rgba(127, 22, 32, 0.7);
  box-shadow: 0 10px 22px rgba(80, 13, 21, 0.22);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.watch-panel,
.scorecard-panel,
.market-clock-panel {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--veil-mid), var(--veil-lo)),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.account-workspace {
  display: grid;
  gap: 12px;
}

.account-workspace:empty {
  display: none;
}

.auth-page {
  position: fixed;
  inset: 0;
  /* 高于顶部导航(100)，低于 toast(200)：弹层打开时导航不可点、不穿透 */
  z-index: 120;
  display: grid;
  overflow-y: auto;
  padding: 24px;
  background: rgba(25, 24, 19, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-page[hidden] {
  display: none;
}

.auth-page__inner {
  position: relative;
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  /* margin auto 代替 place-items center：弹层超出视口高度时可滚动到顶部 */
  margin: auto;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface));
  border: 1px solid rgba(111, 17, 28, 0.18);
  box-shadow: 0 24px 60px rgba(35, 28, 18, 0.35);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.auth-brand .brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #b72a39 0%, #7f1620 100%);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.auth-close:hover {
  color: var(--ink);
  background: rgba(83, 74, 58, 0.08);
}

.auth-box {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface), var(--surface));
  border: 1px solid rgba(111, 17, 28, 0.14);
}

.auth-box__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.auth-box__head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-box__sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-switch {
  justify-self: center;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  /* 链接按钮永不折行；行尾问号收空腔用了负边距，会把排版宽度算小半个字，
     不锁行宽的话问号会被挤到第二行 */
  white-space: nowrap;
}

.auth-switch:hover {
  text-decoration: underline;
}

/* 登录框底部两个链接：左"去注册"，右"忘记密码？"（弱化灰） */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* 文字按钮清掉浏览器默认内边距：左右两个链接的文字要和上方输入框/按钮的边线
   严丝合缝对齐——带边框的元素靠边框对齐，纯文字靠字面对齐，差几像素一眼就歪 */
.auth-links .auth-switch {
  padding: 0;
}

.auth-switch--muted {
  color: var(--muted);
  font-weight: 600;
}

/* 行尾的全角问号字形只占左半边，右侧自带约半个字宽的空腔——
   右对齐时字面看着总缩进一截。把这点空腔收回来，让文字真正贴住右边线。 */
.punct-tuck {
  margin-right: -0.5em;
}

/* ── 登录/注册/重置卡（用户重设计版）：直角卡框 / 描边小方标 / 品牌行同排关闭钮 /
   下划线输入 / 通栏描边按钮。间距全部显式声明，关掉容器 gap。 ── */
.auth-page__inner--auth {
  max-width: 420px;
  gap: 0;
  padding: 36px 32px;
  border-radius: 4px;
  background: var(--surface);
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.auth-page__inner--auth .auth-close {
  position: static;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 16px;
}

.auth-page__inner--auth .auth-brand {
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.auth-page__inner--auth .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.auth-titles h2 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.auth-page__inner--auth .auth-box__sub {
  margin: 0 0 28px;
  font-weight: 500;
}

.auth-page__inner--auth .auth-form {
  gap: 20px;
}

.auth-page__inner--auth .auth-form input {
  min-height: 0;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.auth-page__inner--auth .auth-form input:focus {
  outline: none;
  border-bottom-color: var(--blue);
}

/* 密码框右侧小眼睛：默认睁眼=点击显示明文；显示中加斜杠=点击隐藏 */
.auth-pw {
  position: relative;
}

.auth-pw input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 34px;
}

.auth-pw__eye {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease;
}

.auth-pw__eye:hover {
  color: var(--ink);
}

.auth-pw__eye svg {
  width: 18px;
  height: 18px;
}

.auth-pw__slash {
  display: none;
}

.auth-pw__eye.is-on .auth-pw__slash {
  display: block;
}

.auth-page__inner--auth .auth-form .primary-button {
  margin-top: 6px;
  min-height: 0;
  padding: 14px;
  border-radius: 2px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.auth-page__inner--auth .auth-form .primary-button:hover {
  background: var(--blue);
  color: var(--surface);
}

.auth-page__inner--auth .auth-error {
  margin-top: 16px;
}

.auth-page__inner--auth .auth-links {
  margin-top: 20px;
}

.auth-page__inner--auth .auth-switch {
  justify-self: start;
  color: var(--muted);
  font-weight: 500;
}

.auth-page__inner--auth .auth-switch em {
  font-style: normal;
  color: var(--blue);
  font-weight: 600;
}

.auth-page__inner--auth .auth-switch:hover {
  text-decoration: none;
}

.auth-page__inner--auth .auth-switch:hover em {
  text-decoration: underline;
}

/* 充值扫码步：收款码居中，金额醒目，单号等宽可全选 */
.pay-step {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.pay-step__qr {
  width: min(250px, 70vw);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* 充值层按钮统一登录页的线条简约风：细线框、直角、悬停填色 */
.auth-page__inner--recharge .primary-button {
  min-height: 0;
  padding: 13px 28px;
  border-radius: 2px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.auth-page__inner--recharge .primary-button:hover:not(:disabled) {
  background: var(--blue);
  color: var(--surface);
}

.auth-page__inner--recharge .reset-link {
  min-height: 0;
  padding: 9px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 160ms ease;
}

.auth-page__inner--recharge .reset-link:hover {
  color: var(--blue);
}

.pay-step__demo-note {
  margin-top: -4px;
  padding: 4px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--muted);
}

.pay-step__amount {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--blue);
}

.pay-step__credit {
  margin-top: -6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pay-step__orderno {
  font-size: 13px;
  color: var(--ink-soft);
}

.pay-step__orderno strong {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--blue);
  user-select: all;
  -webkit-user-select: all;
}

.pay-step__waiting {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.pay-step .primary-button {
  min-width: 220px;
  min-height: 44px;
}

/* 后台充值订单区 */
.admin-orders summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 4px 0;
}

.admin-panel__alert {
  color: var(--blue);
}

.admin-table tr.is-attention td {
  background: rgba(159, 29, 43, 0.05);
}

/* 重置码展示：等宽大号酒红，单击全选便于手动复制 */
.reset-code-display {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
  user-select: all;
  -webkit-user-select: all;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-button.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.watch-add {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
}

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* 登录/注册提交钮：无底色+线框，与导航同一套语言；红字红框保留主操作强调 */
.auth-form .primary-button {
  margin-top: 4px;
  min-height: 46px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--blue);
  border-color: rgba(159, 29, 43, 0.5);
  box-shadow: none;
}

.auth-form .primary-button:hover {
  border-color: var(--blue);
  background: rgba(159, 29, 43, 0.04);
}

.auth-form input,
.watch-add input {
  min-width: 0;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.auth-form input {
  min-height: 46px;
  border-radius: var(--radius-md);
}

.auth-form input::placeholder {
  color: var(--muted);
  font-weight: 500;
  opacity: 1;
}

.auth-form input:focus {
  outline: 3px solid rgba(159, 29, 43, 0.2);
  border-color: rgba(159, 29, 43, 0.48);
}

/* 自选添加框：聚焦只换描边色，与首页搜索框同款，不出粉色光晕 */
.watch-add input:focus {
  outline: none;
  border-color: var(--blue);
}

.watch-add {
  grid-template-columns: minmax(180px, 1fr) auto;
}

.watch-add--side {
  grid-template-columns: 1fr;
  gap: 8px;
}

.watch-add__field {
  position: relative;
  min-width: 0;
}

.watch-add__field input {
  width: 100%;
}

/* 加入自选输入框：与个人中心胶囊、首页搜索框同一形状语言（登录表单不跟随） */
.watch-add input {
  border-radius: 999px;
}

.stock-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 264px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 32px rgba(35, 28, 18, 0.22);
}

.stock-suggest li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.stock-suggest li.is-active,
.stock-suggest li:hover {
  background: rgba(159, 29, 43, 0.08);
}

.stock-suggest .code {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--blue);
}

.stock-suggest .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.stock-suggest .mkt {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.stock-suggest .more {
  cursor: default;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}

.stock-suggest .more:hover {
  background: none;
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  justify-self: center;
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(38, 22, 20, 0.92);
  color: #fff7f0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(35, 28, 18, 0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.toast--error {
  background: rgba(159, 29, 43, 0.95);
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

.watch-add--side .primary-button {
  min-height: 40px;
}

.account-message {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  margin-top: 8px;
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
}

.auth-ok {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.32);
  color: #16a34a;
  font-size: 13px;
  font-weight: 800;
}

/* ── 个人中心弹层（重设计）：头像账号行 / 细线夹余额带 / 下划线输入 / 通栏描边按钮 ──
   垂直节奏（8px 标尺）：组间 24 / 组内 ≤12 / 标题贴内容（下 10 上 24，邻近性原则）。
   关掉容器继承的 grid gap，间距全部显式声明，不许两套系统叠加。 */
.auth-page__inner--profile {
  width: min(400px, 100%);
  gap: 0;
}

/* 无标题行：关闭钮下移到与账号行同一水平线（头像中心） */
.auth-page__inner--profile .auth-close {
  top: 32px;
  right: 22px;
}

/* 充值层/扫码层仍在用的弹层标题 */
.profile-title {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.profile-account {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  /* 给右上角关闭钮留出安全区，超长邮箱靠省略号收尾不顶到 × */
  padding-right: 36px;
}

.profile-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(83, 74, 58, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.profile-account__meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-account__meta small {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--muted);
}

.profile-account__meta strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-soft);
}

.profile-pw-head {
  margin-bottom: 10px;
}

/* "修改密码"标题行：左标题右"忘记密码？"入口，基线对齐 */
.profile-pw-headrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.profile-pw-headrow .auth-switch {
  justify-self: auto;
  font-size: 12px;
  /* 清掉浏览器默认按钮内边距："忘记密码？"的右缘和上一栏"充值"按钮的右边线对齐 */
  padding: 0;
}

.profile-field {
  display: block;
  margin-bottom: 12px;
}

.profile-field:nth-of-type(2) {
  margin-bottom: 20px;
}

.profile-field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(83, 74, 58, 0.22);
  border-radius: 0;
  background: transparent;
  padding: 8px 2px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.profile-field input:focus {
  border-bottom-color: var(--blue);
}

.profile-recharge {
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.profile-recharge:hover {
  background: var(--blue);
  color: #fff7f0;
}

.profile-save {
  width: 100%;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 13px;
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background 0.15s, color 0.15s;
}

.profile-save:hover {
  background: var(--ink);
  color: #fff7f0;
}

.profile-save:disabled {
  cursor: default;
}

/* 保存结果直接写在按钮上：成功绿、失败红 */
.profile-save.is-ok {
  border-color: var(--green);
  color: var(--green);
}

.profile-save.is-ok:hover {
  background: transparent;
  color: var(--green);
}

.profile-save.is-error {
  border-color: rgba(215, 53, 53, 0.55);
  color: var(--red);
}

.profile-save.is-error:hover {
  background: transparent;
  color: var(--red);
}

.profile-logout {
  width: 100%;
  border: 1px solid rgba(159, 29, 43, 0.35);
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  padding: 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
}

.profile-logout:hover {
  background: rgba(159, 29, 43, 0.06);
}

.account-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.account-details summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 800;
}

/* 管理后台整页：放开 860px 版心，表格横向铺满 */
.page-content:has(.admin-panel) {
  max-width: none;
  padding-left: 28px;
  padding-right: 28px;
}

.admin-panel {
  display: grid;
  gap: 6px;
}

.admin-panel__head h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.02em;
}

/* 标题行：左标题右"备份数据"，两端对齐同一中线 */
.admin-panel__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-backup {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.admin-backup:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.admin-panel__stats {
  color: var(--muted);
  font-size: 13px;
}

.admin-detail-row > td {
  background: var(--surface-2);
  white-space: normal;
}

.admin-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  padding: 6px 2px 10px;
}

/* 每张子表锁在自己的格子里横向滚动，不许溢出压到旁边 */
.admin-detail > div {
  min-width: 0;
  overflow-x: auto;
}

.admin-detail__title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-table--sub {
  min-width: 0;
  background: transparent;
}

.admin-table td.pos { color: var(--red); font-weight: 700; }
.admin-table td.neg { color: var(--green); font-weight: 700; }

/* 表头里的行内搜索框：贴在"单号/邮箱"列名右侧，跟表头一起钉住。
   列名文字和框走同一条中线，靠行内 flex 居中，不吃基线的亏 */
.admin-th-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-search {
  width: 170px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}

.admin-search:focus {
  outline: none;
  border-color: var(--blue);
}

/* 名单锁在固定高度里就地下拉，页面不再无限拉长 */
.admin-table-wrap {
  margin-top: 10px;
  max-height: 62vh;
  overflow: auto;
}

.admin-orders .admin-table-wrap {
  max-height: 44vh;
}

/* 表头钉在滚动区顶部；底边框改画在阴影里，跟着表头钉住不跟着行滚走。
   只作用于两张主表，明细展开里的子表不钉 */
.admin-table-wrap > .admin-table > thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--canvas-2);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.admin-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-table button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.admin-table button {
  margin-right: 6px;
  padding: 0 9px;
}

.stock-remove {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  padding: 0;
  flex: none;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.stock-remove svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.stock-remove:hover,
.stock-remove:focus-visible {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  outline: none;
}

.stock-remove:active {
  transform: scale(0.96);
}

.scorecard-panel {
  background: linear-gradient(180deg, #fff7f0, var(--surface));
  border-color: rgba(159, 29, 43, 0.16);
}

.market-clock-panel {
  display: none;
}

.muted,
.stock-card__code,
.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.stock-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@keyframes stockCardIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

.stock-group__grid > .stock-card {
  animation: stockCardIn 320ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.stock-group__grid > .stock-card:nth-child(1) { animation-delay: 0ms; }
.stock-group__grid > .stock-card:nth-child(2) { animation-delay: 45ms; }
.stock-group__grid > .stock-card:nth-child(3) { animation-delay: 90ms; }
.stock-group__grid > .stock-card:nth-child(4) { animation-delay: 135ms; }
.stock-group__grid > .stock-card:nth-child(n+5) { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .stock-group__grid > .stock-card { animation: none; }
}

.watch-empty {
  display: grid;
  gap: 6px;
  min-height: 180px;
  align-content: center;
  justify-items: center;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px dashed rgba(100, 116, 139, 0.32);
  text-align: center;
}

.watch-empty h3 {
  font-size: 18px;
  font-weight: 800;
}

.watch-empty p {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.market-home,
.market-card,
.quick-tools {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 42px rgba(38, 22, 20, 0.07);
}

.market-home {
  display: grid;
  gap: 0;
  overflow: hidden;
  background: var(--surface);
  border-top: 2px solid var(--blue);
}

.market-home__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 14px;
  background:
    radial-gradient(circle at 88% 8%, rgba(159, 29, 43, 0.075), transparent 28%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-warm) 100%);
  color: var(--ink);
}

.market-home__top .home-kicker {
  color: var(--blue);
}

.market-home__top h2 {
  color: var(--ink);
}

.market-home__top h2 {
  margin-top: 4px;
  font-size: clamp(26px, 3.4vw, 40px);
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0;
}

.market-home__top .primary-button {
  background: linear-gradient(180deg, #a51f2d 0%, #7f1620 100%);
  border-color: rgba(127, 22, 32, 0.5);
  box-shadow: 0 10px 22px rgba(80, 13, 21, 0.16);
}

.market-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  min-height: 48px;
  padding: 0 18px 10px;
  background: var(--surface-warm);
  scrollbar-width: none;
}

.market-tabs::-webkit-scrollbar,
.market-subtabs::-webkit-scrollbar {
  display: none;
}

.market-tab,
.market-subtab {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.market-tab {
  min-height: 42px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.market-tab.is-active {
  color: var(--blue);
}

.market-subtabs {
  display: flex;
  justify-content: center;
  gap: clamp(42px, 12vw, 150px);
  overflow-x: auto;
  padding: 16px 18px 14px;
  background: var(--surface);
}

.market-subtab {
  position: relative;
  min-height: 42px;
  padding: 0 8px;
  color: #625b50;
  font-size: 18px;
  font-weight: 800;
}

.market-subtab.is-active {
  color: var(--ink);
}

.market-subtab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #a51f2d;
  transform: translateX(-50%);
}

.market-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.market-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.market-section-head h3 {
  color: var(--ink);
  font-size: 24px;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0;
}

.market-section-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.market-section-head button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.market-status {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.index-strip,
.market-overview__meta,
.market-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.index-tile,
.market-overview__meta > div,
.market-kpi-row > div {
  display: grid;
  gap: 6px;
  min-height: 96px;
  align-content: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f3fbf6, var(--surface));
  text-align: center;
}

.index-tile span,
.market-overview__meta span,
.market-kpi-row span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
}

.index-tile strong,
.market-overview__meta strong,
.market-kpi-row strong {
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.index-tile small {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.breadth-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
}

.breadth-bar > div {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.breadth-bar i,
.breadth-bar b {
  display: block;
  height: 100%;
}

.breadth-bar i { background: var(--green); }
.breadth-bar b { background: var(--red); }

.market-comment {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--paper-inset);
}

.market-comment strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.market-comment p {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.quick-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
}

.quick-tool {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 96px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
}

.quick-tool span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.quick-tool strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.quick-tool small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.market-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.market-ranking,
.market-anomaly {
  grid-row: span 2;
}

.market-pill-tabs {
  display: inline-flex;
  justify-self: start;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
}

.market-pill-tabs span {
  min-width: 76px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.market-pill-tabs .is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(35, 28, 18, 0.08);
}

.ranking-table {
  display: grid;
}

.ranking-table > div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 72px 72px minmax(82px, 0.8fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.ranking-table > div:last-child {
  border-bottom: 0;
}

.ranking-table .is-head {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
}

.ranking-table span:nth-child(2),
.ranking-table span:nth-child(3) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.market-placeholder-chart {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(83, 74, 58, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 74, 58, 0.035) 1px, transparent 1px),
    var(--surface);
  background-size: 100% 45px, 72px 100%, auto;
}

.market-placeholder-chart::before {
  content: "";
  position: absolute;
  inset: 26px 18px 24px;
  clip-path: polygon(0 60%, 12% 44%, 28% 50%, 42% 34%, 58% 46%, 72% 30%, 88% 48%, 100% 38%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(86, 137, 214, 0.42), rgba(86, 137, 214, 0.03));
}

.market-placeholder-chart::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(86, 137, 214, 0.75), transparent);
  transform: rotate(-4deg);
}

.market-placeholder-chart--bars::before {
  inset: auto 18px 24px;
  height: 120px;
  clip-path: polygon(0 72%, 5% 72%, 5% 42%, 10% 42%, 10% 88%, 15% 88%, 15% 28%, 20% 28%, 20% 70%, 25% 70%, 25% 52%, 30% 52%, 30% 84%, 35% 84%, 35% 30%, 40% 30%, 40% 76%, 45% 76%, 45% 55%, 50% 55%, 50% 86%, 55% 86%, 55% 36%, 60% 36%, 60% 58%, 65% 58%, 65% 18%, 70% 18%, 70% 64%, 75% 64%, 75% 38%, 80% 38%, 80% 80%, 85% 80%, 85% 26%, 90% 26%, 90% 62%, 95% 62%, 95% 42%, 100% 42%, 100% 100%, 0 100%);
  background: linear-gradient(90deg, rgba(215, 53, 53, 0.58), rgba(22, 133, 77, 0.58));
}

.market-placeholder-chart--area::before {
  clip-path: polygon(0 52%, 14% 50%, 28% 54%, 42% 48%, 56% 50%, 70% 64%, 84% 70%, 100% 66%, 100% 100%, 0 100%);
}

.anomaly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.anomaly-grid article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.anomaly-grid span,
.anomaly-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.anomaly-grid strong {
  color: var(--red);
  font-size: 16px;
  font-weight: 900;
}

.sentiment-heat,
.valuation-zone {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.sentiment-heat span,
.valuation-zone span {
  display: grid;
  align-items: start;
  padding: 12px;
  color: rgba(25, 24, 19, 0.52);
  font-size: 12px;
  font-weight: 900;
}

.sentiment-heat span:nth-child(1),
.valuation-zone span:nth-child(1) { background: rgba(215, 53, 53, 0.22); }
.sentiment-heat span:nth-child(2),
.valuation-zone span:nth-child(2) { background: rgba(215, 53, 53, 0.13); }
.sentiment-heat span:nth-child(3),
.valuation-zone span:nth-child(3) { background: rgba(247, 236, 210, 0.92); }
.sentiment-heat span:nth-child(4),
.valuation-zone span:nth-child(4) { background: rgba(22, 133, 77, 0.11); }
.sentiment-heat span:nth-child(5),
.valuation-zone span:nth-child(5) { background: rgba(22, 133, 77, 0.2); }

.sentiment-heat i,
.valuation-zone i {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 52%;
  height: 2px;
  background: #2d2b26;
  transform: rotate(-6deg);
}

.home-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.home-board__intro,
.home-board__stats,
.home-ai-sample {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 14px 42px rgba(35, 28, 18, 0.08);
}

.home-board__intro {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 230px;
  padding: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(159, 29, 43, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(159, 29, 43, 0.14), rgba(255, 247, 240, 0) 46%),
    var(--surface);
}

.home-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.home-board__intro h2 {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.home-board__intro p {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
  text-wrap: pretty;
}

.home-board__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-board__stats {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface));
}

.home-board__stats > div,
.home-ai-sample__facts > div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: var(--paper-inset);
  border: 1px solid rgba(83, 74, 58, 0.08);
}

.home-board__stats span,
.home-ai-sample__facts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.home-board__stats strong,
.home-ai-sample__facts strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.home-board__stats small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-board__stats .pos,
.home-ai-sample .pos {
  color: var(--red);
}

.home-board__stats .neg,
.home-ai-sample .neg {
  color: var(--green);
}

.home-section {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.home-ai-sample {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(159, 29, 43, 0.12), transparent 38%),
    linear-gradient(180deg, var(--surface), var(--surface));
}

.home-ai-sample h3 {
  margin-top: 6px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.012em;
}

.home-ai-sample p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  text-wrap: pretty;
}

.home-ai-sample__facts {
  display: grid;
  gap: 10px;
}

/* 推荐关注：新用户/空自选时的入口，覆盖人工信息源的股票。 */
/* 注册欢迎弹窗：币数醒目，两档资费和余额入口逐段列出 */
/* 数字真正居中：两侧各留一个 1fr 占位列互相抵消，"到账"角标贴在数字右侧；
   两者字号差太多，end（对齐盒子底边）会让角标视觉上偏低，改用 baseline 对齐文字基线才是真的同一水平线 */
.welcome-coins {
  margin: 4px 0 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  column-gap: 6px;
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.1;
}

.welcome-coins__num {
  grid-column: 2;
}

.welcome-coins small {
  grid-column: 3;
  justify-self: start;
  font-size: 16px;
  font-weight: 700;
}

.welcome-tier {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.welcome-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.welcome-accent {
  color: var(--blue);
  font-weight: 700;
}

/* 散花特效：一块全屏画布，事件穿透，放完由脚本自动移除 */
.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
}

/* 客服联系方式：加粗深色，在弱化文案里可辨识、可选中复制 */
.support-contact {
  color: var(--ink);
  font-weight: 700;
  user-select: all;
}

/* 关注到期浮窗的说明文案 */
.expired-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* 卡片右上角：叉号占第一行右格、权益角标占第二行右格，打散后直接落在头部的 2×2 网格里 */
.stock-card__side {
  display: contents;
}

/* 单次解锁卡没有删除钮，这里放一个同尺寸的不可见占位：保住第一行右格的位置和高度，
   让订阅卡与单次解锁卡头部骨架一致。visibility:hidden 既不显示、不可点击、也不进读屏。 */
.stock-remove-placeholder {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: block;
  width: 28px;
  height: 28px;
  visibility: hidden;
}

/* 单次解锁卡的时限角标：占第二行右格（代码行），与代码同视觉中心 */
.unlock-badge {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  flex: none;
  padding: 3px 8px;
  border: 1px solid rgba(159, 29, 43, 0.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue);
  background: var(--glass);
  white-space: nowrap;
}

/* 关注卡的剩余天数角标：弱化灰，不与单次的红角标抢注意力 */
.unlock-badge--watch {
  border-color: var(--line-strong);
  color: var(--muted);
}

/* 已过期：灰底灰字角标，整卡置灰沉底；× 删除钮仍可点，续费点卡进详情 */
.unlock-badge--expired {
  border-color: var(--line-strong);
  background: rgba(131, 124, 113, 0.14);
  color: var(--muted);
}

.stock-card.is-expired {
  opacity: 0.6;
  filter: grayscale(0.9);
}

.stock-card.is-expired:hover {
  opacity: 0.85;
}

/* 侧边栏里的权益小标：单次解锁 / 剩余天数 / 已过期，红=需留意，灰=正常或仅供查看 */
.watch-sidebar__tag {
  flex: none;
  padding: 1px 5px;
  border: 1px solid rgba(159, 29, 43, 0.35);
  border-radius: 999px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
}

.watch-sidebar__tag--muted {
  border-color: var(--line-strong);
  color: var(--muted);
}

.recommend {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.recommend__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.recommend__head h3 {
  font-size: 16px;
  font-weight: 800;
}

.recommend__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.recommend__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.recommend-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface), var(--surface));
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.recommend-card:hover,
.recommend-card:focus-visible {
  border-color: rgba(159, 29, 43, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(35, 28, 18, 0.1);
  outline: none;
}

.recommend-card__top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.recommend-card__code {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.recommend-card__name {
  font-size: 15px;
  font-weight: 800;
}

.recommend-card__hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.recommend-card__pct {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.recommend-card__pct.pos { color: var(--red); }
.recommend-card__pct.neg { color: var(--green); }

.recommend-card__theme {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.recommend-card__cta {
  justify-self: start;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue);
}

/* 自选股命中不到人工信息源时的占位（行情仍实时）。 */
.stock-card__pending {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(100, 116, 139, 0.3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

/* pending 卡片里的最新真实公告（点击外链东财，阻止冒泡到卡片钻取） */
.stock-card__ann {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.stock-card__ann:hover {
  border-color: rgba(159, 29, 43, 0.28);
  background: #fff7f0;
}

.stock-card__ann-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stock-card__ann-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stock-card__ann-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stock-card--pending {
  opacity: 0.92;
}

.stock-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 10px;
}

.stock-card {
  position: relative;
  display: grid;
  /* 同行卡片被外层网格拉平到统一高度时，多余空间必须堆在底部，
     不能让 normal(=stretch) 把它摊进内部每一行——否则本卡片的分割线位置
     会被"同一行里另一张卡片的文字长短"带偏，两者本应互不相干。 */
  align-content: start;
  gap: 14px;
  padding: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stock-card {
  min-width: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.stock-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(159, 29, 43, 0.09), transparent 36%);
  opacity: 0;
  transition: opacity 160ms ease;
}

.stock-card:hover::before,
.stock-card:focus-visible::before {
  opacity: 1;
}

.stock-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(159, 29, 43, 0.7), var(--shadow-sm);
}

/* 头部是 2×2 网格：第一行「名称↔叉号」、第二行「代码↔剩余时间」，左右两列各自居中，
   视觉中心严格对齐。右侧列 auto 靠内容区右侧；名称列 minmax(0,1fr) 让长名走省略号不挤掉右侧。
   identity 与 side 都用 display:contents 打散，四个元素直接落在各自的格子里。 */
.stock-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
}

.stock-card__identity {
  display: contents;
}

.stock-card--positive {
  background: linear-gradient(180deg, var(--surface), var(--red-soft));
  border-color: rgba(215, 53, 53, 0.18);
}

.stock-card--negative {
  background: linear-gradient(180deg, var(--surface), var(--green-soft));
  border-color: rgba(22, 133, 77, 0.18);
}

.stock-card--caution {
  background: linear-gradient(180deg, var(--surface), var(--amber-soft));
  border-color: rgba(184, 122, 25, 0.22);
}

.stock-card.is-alert {
  box-shadow: 0 0 0 1px rgba(159, 29, 43, 0.18), var(--shadow-sm);
}

/* 名称：网格第一行第一列，占满左侧列宽；超长走省略号，右侧叉号永远不被挤走 */
.stock-card__name {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-card__top .stock-card__code {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stock-card__price {
  display: inline-flex;
  justify-content: flex-end;
  align-items: baseline;
  min-width: 58px;
  /* 价格永远不许被挤走：涨跌幅是三位数时（新股首日能到 +146%），这行会顶到卡片边，
     默认的 flex 收缩会把价格切掉半个字——现价是卡片上最不能丢的数字。 */
  flex: 0 0 auto;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.stock-card__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.stock-card__move {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stock-card__pct {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stock-card__pct.pos { color: var(--red); }
.stock-card__pct.neg { color: var(--green); }

.trend-delta.pos { color: var(--red); }
.trend-delta.neg { color: var(--green); }

.limit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  /* 横向挤到了也不折行、不缩小：折行会把"涨停"两个字摞成上下两行，比放不下还难看 */
  flex: 0 0 auto;
  white-space: nowrap;
}

.limit-badge--up {
  background: var(--red-soft);
  color: var(--red);
}

.limit-badge--down {
  background: var(--green-soft);
  color: var(--green);
}

.stock-trend {
  display: grid;
  gap: 14px;
  min-height: 54px;
  padding: 2px 0 0;
}

.stock-trend__chart {
  display: block;
  width: 100%;
  height: 38px;
  overflow: visible;
}

.stock-trend__chart polyline {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-trend--pos .stock-trend__chart polyline {
  stroke: var(--red);
}

.stock-trend--neg .stock-trend__chart polyline {
  stroke: var(--green);
}

.stock-trend span {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.stock-dossier {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(159, 29, 43, 0.055), transparent 28%),
    linear-gradient(180deg, var(--surface), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.stock-dossier--positive { border-color: rgba(239, 68, 68, 0.24); }
.stock-dossier--negative { border-color: rgba(34, 197, 94, 0.24); }
.stock-dossier--caution { border-color: rgba(245, 158, 11, 0.26); }

.stock-dossier__hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* 主行：行业标签、数据条、现价涨幅按视觉中线对齐；现价推到最右 */
.stock-dossier__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
}

/* 胶囊按钮对名字光学居中，不参与基线对齐 */
.stock-dossier__name-row .stock-dossier__watch {
  align-self: center;
}

.stock-dossier__name-row .stock-dossier__quote {
  margin-left: auto;
  margin-right: 8px;
}

.stock-dossier__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.stock-dossier__title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-width: 0;
}

.stock-dossier__code {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stock-dossier__industry {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.stock-dossier__watch {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(159, 29, 43, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.stock-dossier__watch:hover {
  background: rgba(159, 29, 43, 0.05);
}

/* 顶行三段式：行业标签｜盘面截至居中｜状态标签（1fr auto 1fr 保证中间真居中） */
.stock-dossier__topline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  /* 三段中线对齐：大号标题、小号日期、状态标签各自高矮不同，对中线不对基线 */
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.stock-dossier__topline > :first-child { justify-self: start; }
.stock-dossier__topline > :last-child { justify-self: end; }

.stock-dossier__dateline {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* 未登录：板块正文的登录门，视觉沿用“待生成”虚线空态 */
.locked-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 28px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}

.locked-box:hover {
  color: var(--blue);
  border-color: rgba(159, 29, 43, 0.45);
}

/* 登录后的付费门：整块就是一个按钮，点开选择卡再挑价位。
   页面上不铺价位——价格、说明、余额都在卡里，摆两遍是同一份菜单印两次。 */
.locked-box--paywall {
  border-style: solid;
  border-color: rgba(159, 29, 43, 0.35);
  background: rgba(159, 29, 43, 0.04);
  color: var(--blue);
  font-weight: 600;
}

.locked-box--paywall:hover {
  border-color: rgba(159, 29, 43, 0.5);
  background: rgba(159, 29, 43, 0.08);
}

/* 后续被锁板块只留一句浅提示：四块都摆同一个按钮太吵，也一路显得在催付费。
   仍可点，省得用户滚回第一块。 */
.locked-hint {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  opacity: 0.7;
  cursor: pointer;
  transition: color 120ms, opacity 120ms;
}

.locked-hint:hover {
  color: var(--blue);
  opacity: 1;
}

/* 扣费确认弹层：动钱之前必须亮价 */
.confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(46, 26, 24, 0.35);
}

.confirm-card {
  width: min(420px, 100%);
  padding: 22px 22px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface), var(--surface));
  box-shadow: 0 18px 50px rgba(46, 26, 24, 0.22);
  display: grid;
  gap: 14px;
}

/* 注册欢迎弹窗：比常规确认卡略宽，但两侧留够边距，避免文字顶到卡片边缘；全部内容居中对齐 */
.confirm-card--welcome {
  width: min(520px, 100%);
  padding: 26px 32px 18px;
  text-align: center;
}

.confirm-card--welcome .confirm-card__foot {
  justify-content: center;
}

.confirm-card--welcome .confirm-card__foot > span:empty {
  display: none;
}

.confirm-card__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

/* 股票代码做成小标签：去掉全角括号自带的空隙，数字用等宽字体对齐基线 */
.confirm-card__code {
  display: inline-block;
  vertical-align: 1px;
  margin: 0 2px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--glass);
}

/* 两个价位竖排：一行一个套餐，左边名称+说明，右边价格 */
.confirm-options {
  display: grid;
  gap: 8px;
}

.confirm-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: none;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms, background 140ms;
}

.confirm-option:hover {
  border-color: var(--line-strong);
}

.confirm-option.is-selected {
  border-color: rgba(159, 29, 43, 0.5);
  background: rgba(159, 29, 43, 0.04);
}

.confirm-option__main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

/* 标题行：名称 + 时长标签并排 */
.confirm-option__head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.confirm-option__main strong {
  font-size: 14px;
  font-weight: 700;
}

/* 订阅时长标签：把"30 天"摆在标题旁边，别让人以为 15 查查币是买断。
   沿用站内权益角标的胶囊样式，底色再实一点，在弹窗里能跳出来。 */
.confirm-option__tag {
  flex: none;
  padding: 2px 7px;
  border: 1px solid rgba(159, 29, 43, 0.35);
  border-radius: 999px;
  background: rgba(159, 29, 43, 0.08);
  color: var(--blue);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.confirm-option.is-selected .confirm-option__main strong {
  color: var(--blue);
}

.confirm-option__main small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* 窄屏换行只发生在"·"分隔处，不把词拆开、不让末行剩一个孤字 */
.confirm-option__main small > span {
  white-space: nowrap;
}

.confirm-option__price {
  flex: none;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}

.confirm-option.is-selected .confirm-option__price {
  color: var(--blue);
}

.confirm-option__price small {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* 底栏：左余额右按钮；窄屏放不下就整行换，而不是把按钮文字压断成两行 */
.confirm-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.confirm-card__balance {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.confirm-card__actions {
  display: flex;
  gap: 10px;
  margin-left: auto;   /* 换行后按钮组仍然贴右 */
}

.confirm-card__cancel,
.confirm-card__ok {
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.confirm-card__cancel {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}

.confirm-card__cancel:hover {
  border-color: rgba(159, 29, 43, 0.45);
  color: var(--blue);
}

.confirm-card__ok {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff7f0;
}

.confirm-card__ok:hover {
  filter: brightness(1.08);
}

/* 详情页两栏布局：左侧自选侧栏（ChatGPT 会话栏式切换） + 右侧档案 */
.dossier-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* 详情页整页放开 860px 居中限制：侧栏与导航「查」标左对齐（同 28px 内边距），档案区横向铺满剩余宽度 */
.page-content:has(.dossier-layout) {
  max-width: none;
  padding-left: 28px;
  padding-right: 28px;
}

.dossier-main {
  min-width: 0;
}

.watch-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* 侧栏顶部："关注列表 · 新增"标题行；点新增原地换成输入框（联想+付费同自选页） */
.watch-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  /* 左右内边距与列表项一致（8px）：标题与股票名左对齐，按钮右缘与涨跌幅右对齐 */
  padding: 4px 8px;
  font-size: 13px;
}

.watch-sidebar__label {
  color: var(--ink-soft);
  font-weight: 700;
}

/* 与详情页"＋ 加入自选"同款胶囊线框 */
.watch-sidebar__new {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 7px 0 11px;
  border: 1px solid rgba(159, 29, 43, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  /* 胶囊边框与列表项整行右边对齐，胶囊内文字与涨跌幅数字右对齐 */
  margin-right: -8px;
}

.watch-sidebar__new:hover {
  background: rgba(159, 29, 43, 0.05);
}

.watch-sidebar__add input {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: color 140ms;
}

.watch-sidebar__add input::placeholder {
  color: var(--ink-soft);
  font-weight: 700;
  transition: color 140ms;
}

.watch-sidebar__add input:hover::placeholder {
  color: var(--blue);
}

.watch-sidebar__add input:focus {
  outline: none;
}

.watch-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}

.watch-sidebar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.watch-sidebar__item:hover {
  background: var(--surface-2);
}

.watch-sidebar__item.is-active {
  background: var(--surface-2);
  font-weight: 700;
}

.watch-sidebar__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-sidebar__pct {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.watch-sidebar__pct.pos { color: var(--red); }
.watch-sidebar__pct.neg { color: var(--green); }

/* 数据条不带底色：报纸式裸排，靠留白分区 */
/* 固定一行横排；极端窄屏才折行兜底 */
.stock-dossier__snapshot {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 6px 16px;
}

.stock-dossier__snapshot > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-dossier__snapshot span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.stock-dossier__snapshot strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.stock-dossier__title {
  margin-top: 2px;
  font-size: 28px;
  /* 行框贴紧字形，按钮与名字才能真正视觉居中 */
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

/* 现价 + 涨跌幅：与数据条同基线，居右 */
.stock-dossier__quote {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.stock-dossier__quote strong {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  color: var(--ink);
  line-height: 1.1;
  white-space: nowrap;
}

.stock-dossier__quote span {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.stock-dossier__quote span.positive { color: var(--red); }
.stock-dossier__quote span.negative { color: var(--green); }
.stock-dossier__quote span.neutral  { color: var(--muted); }

.stock-dossier__status {
  position: relative;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.stock-dossier__status::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 4;
  width: min(320px, calc(100vw - 56px));
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--canvas-2);
  box-shadow: 0 14px 32px rgba(38, 22, 20, 0.18);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.stock-dossier__status:hover::after,
.stock-dossier__status:focus-visible::after,
.stock-dossier__status.is-open::after {
  opacity: 1;
  transform: translateY(0);
}

.stock-dossier__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.85fr);
  gap: 12px;
  min-width: 0;
}

.stock-dossier__chart,
.stock-dossier__facts > div,
.stock-dossier__score > div,
.stock-dossier__latest {
  min-width: 0;
  padding: 13px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.decision-block {
  min-width: 0;
  padding: 15px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.decision-block--info {
  padding: 20px;
  border-color: rgba(159, 29, 43, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(159, 29, 43, 0.075), transparent 30%),
    linear-gradient(90deg, rgba(159, 29, 43, 0.055), transparent 42%),
    var(--surface);
  box-shadow: 0 18px 42px rgba(80, 13, 21, 0.08);
}

.decision-block__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.decision-block__head span {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.decision-block__head h3 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.decision-block--info .decision-block__head h3 {
  font-size: 24px;
}

.decision-block--info .decision-block__head {
  /* 圆形序号徽标是个盒子，没有文字基线，baseline 对齐会跟标题错位——改成居中对齐 */
  align-items: center;
  /* "报告最后更新于"紧跟标题排，不再甩到最右——离标题近才读得出"这是报告的时间" */
  grid-template-columns: auto auto minmax(0, 1fr);
}

.decision-block--info .decision-block__head span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
}

.decision-block--info .decision-block__head .decision-block__updated {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  /* 与标题文字基线对齐：徽标保持居中，标题和时间按文字底边站一条线，不再浮在半空 */
  align-self: baseline;
}

/* 不是今天的报告：灰字读者会略过去，当成最新的。给个浅底加深字把它拎起来，
   但不用红色——报告隔夜是常态，不是错误，警示色会造成没必要的紧张。 */
.decision-block--info .decision-block__head .decision-block__updated.is-stale {
  color: var(--ink);
  font-weight: 600;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border-radius: 999px;
  padding: 2px 9px;
  /* 窄屏时这行会独占一整行，不收宽度的话浅底会拉成一条通栏 */
  width: fit-content;
}

.decision-block--info .decision-block__head h3 {
  align-self: baseline;
}

.decision-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.decision-metrics > div,
.decision-fact-grid > article,
.concept-box,
.verdict-card {
  min-width: 0;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: var(--paper-inset);
  border: 1px solid rgba(111, 17, 28, 0.08);
}

.decision-block--info .decision-fact-grid > article:first-child {
  background: var(--surface);
  border-color: rgba(159, 29, 43, 0.16);
}

.decision-block--info .decision-fact-grid > article:last-child {
  background: var(--amber-soft);
  border-color: rgba(184, 122, 25, 0.16);
}

.decision-metrics span,
.decision-metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.decision-metrics strong {
  display: block;
  margin: 3px 0 1px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.decision-metrics strong.pos { color: var(--red); }
.decision-metrics strong.neg { color: var(--green); }

.decision-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.decision-fact-grid h4,
.concept-box strong,
.verdict-card strong {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.decision-fact-grid ul {
  margin: 0;
  padding-left: 18px;
}

.decision-fact-grid li {
  margin: 6px 0;
  color: var(--ink-soft);
  font-weight: 750;
}

.decision-fact-grid p,
.concept-box p,
.verdict-card p,
.judgment-box {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 650;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.concept-box {
  background: var(--blue-soft);
}

.verdict-card {
  background: var(--blue-soft);
}

.verdict-card--positive { background: var(--red-soft); border-color: rgba(215, 53, 53, 0.18); }
.verdict-card--negative { background: var(--green-soft); border-color: rgba(22, 133, 77, 0.18); }
.verdict-card--caution { background: var(--amber-soft); border-color: rgba(184, 122, 25, 0.18); }

/* ── 报告未出的整版浮现提示 ─────────────────────────────
   报告没出来时五个板块都不摆小容器，只在板块背景上浮一句状态话术；
   前置红色呼吸点表示系统活着、在干活。凑数的占位卡片曾让用户以为报告残缺。 */
.insight-pending {
  padding: 26px 12px;
  text-align: center;
}
.insight-pending p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 15px;
}
.decision-block--info .insight-pending { padding: 34px 12px; }
.insight-pending .pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  margin-right: 9px;
  vertical-align: 1px;
  animation: insight-pulse 1.2s ease-in-out infinite;
}
@keyframes insight-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .insight-pending .pulse { animation: none; }
}

/* 字号/字重/颜色/行高全部交给上面那条共享正文规则，这里只留盒子本身的样子——
   原先这里写死 14px 是它和其余板块观感不一致的根源。 */
.judgment-box {
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-2);
}

/* 空占位不是正文，得继续弱下去：共享规则会把它一起放大加粗，这里显式压回原样。 */
.judgment-box--empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--line-strong);
  background: transparent;
}

.stock-dossier__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stock-dossier__facts span,
.stock-dossier__score span,
.stock-dossier__latest > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stock-dossier__facts strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stock-dossier__score {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stock-dossier__score strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stock-dossier__score small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.detail-forecast {
  display: grid;
  gap: 5px;
  margin-top: 4px;
}

.detail-forecast strong {
  margin-top: 0;
  font-family: var(--font-sans);
  font-size: 16px;
}

.detail-forecast small {
  margin-top: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.detail-empty {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stock-dossier__latest h3 {
  margin-top: 6px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.stock-dossier__latest p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.stock-dossier__latest ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.stock-dossier__latest li {
  margin: 5px 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill--green { background: var(--green-soft); color: var(--green); border-color: rgba(34, 197, 94, 0.28); }
.pill--red { background: var(--red-soft); color: var(--red); border-color: rgba(239, 68, 68, 0.28); }
.pill--amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(245, 158, 11, 0.28); }
.pill--blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(159, 29, 43, 0.28); }
.pill--gray { background: rgba(148, 163, 184, 0.14); color: var(--muted); border-color: rgba(148, 163, 184, 0.22); }

.metric-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(83, 74, 58, 0.1);
}

/* 主线/风险：裸排文字，标签灰、内容黑粗，靠留白分隔——与全站报纸风一致，
   不用胶囊底色（风险的红底会让每张卡都像在报警），长文案自然换行不截断 */
.stock-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  width: 100%;
  color: var(--ink);
  font-size: 12px;
}

.stock-chip i {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.stock-chip b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.summary {
  color: var(--ink-soft);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.forecast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}

.forecast-tag {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.forecast-dir {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.forecast-conf {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.score-cell {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 13px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.score-value.pos { color: var(--red); }
.score-value.neg { color: var(--green); }

.score-cell small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.market-clock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.market-clock-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.market-clock-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.market-clock-card__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.market-clock-card__top strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 800;
}

.market-clock-card__time {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.market-clock-card__meta {
  display: grid;
  gap: 5px;
}

.market-clock-card__meta span,
.market-clock-card__foot {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.market-clock-card__meta b {
  display: inline-block;
  min-width: 64px;
  color: var(--muted);
  font-weight: 700;
}

.market-clock-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.market-clock-card--trading .market-clock-card__top strong { color: var(--red); }
.market-clock-card--lunch .market-clock-card__top strong,
.market-clock-card--preopen .market-clock-card__top strong { color: var(--amber); }
.market-clock-card--holiday .market-clock-card__top strong,
.market-clock-card--weekend .market-clock-card__top strong,
.market-clock-card--closed .market-clock-card__top strong { color: var(--muted); }

.muted.is-warning {
  color: var(--amber);
  font-weight: 800;
}

@media (min-width: 1440px) {
  .stock-group__grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  }
}

@media (max-width: 1180px) {
  .stock-group__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scorecard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-clock-panel {
    display: block;
  }

  .stock-dossier__score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  /* 移动端：侧栏改成顶部横条，保留品牌 / 导航 / 账户入口；时钟在主区已有面板故隐藏 */
  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .brand {
    flex: 1 1 auto;
    min-height: 0;
  }

  .account-panel {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center; /* 复位桌面的 end 对齐 */
  }

  /* 移动端：加入自选表单独占一行，置于顶部横条最后 */
  .sidebar-watch {
    flex: 1 1 100%;
    order: 9;
  }

  .account-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
  }

  .account-mini span,
  .account-mini small {
    display: none;
  }

  /* 未登录态：移动端只留"登录/注册"按钮，文字与卡片外壳都去掉 */
  .account-mini--guest {
    padding: 0;
    background: none;
    border: 0;
  }

  .account-mini--guest strong {
    display: none;
  }

  .account-mini .reset-link {
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .side-nav {
    order: 3;
    flex: 1 1 100%;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-link {
    width: auto;
    min-height: 38px;
    padding: 0 14px;
  }

  .main-surface {
    max-width: none;
    padding: 16px 14px 44px;
  }

  .topbar {
    display: block;
    min-height: 0;
    padding: 12px 0 14px;
    border-bottom: 1px solid var(--line);
  }

  .topbar h1 {
    font-size: 24px;
    line-height: 1.05;
  }

  .stock-group__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scorecard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-dossier__grid {
    grid-template-columns: 1fr;
  }

  .auth-form,
  .watch-add {
    grid-template-columns: 1fr;
  }

  .auth-box__head {
    display: grid;
  }
}

@media (max-width: 640px) {
  body {
    background: linear-gradient(180deg, var(--canvas-2) 0%, var(--canvas) 100%);
    color: var(--ink);
  }

  /* 窄屏顶行不再三段并排（名称会被日期挤成两行）：改上下堆叠 */
  .stock-dossier__topline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  h1 {
    font-size: 32px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 19px;
  }

  .main-surface {
    padding: 12px 10px 38px;
  }

  .stock-group__grid {
    grid-template-columns: 1fr;
  }

  .stock-dossier {
    padding: 12px;
  }

  .stock-dossier__title {
    font-size: 24px;
  }

  .stock-dossier__facts,
  .stock-dossier__score {
    grid-template-columns: 1fr;
  }

  .decision-block {
    padding: 13px;
  }

  .decision-block--info {
    padding: 15px;
  }

  .decision-block__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  /* 屏幕太窄放不下第三列，"报告最后更新于"换到标题下方单独一行 */
  .decision-block--info .decision-block__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .decision-block--info .decision-block__head .decision-block__updated {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .decision-metrics,
  .decision-fact-grid {
    grid-template-columns: 1fr;
  }

  .auth-box {
    padding: 12px;
  }

  .auth-actions {
    width: 100%;
  }

  .auth-actions .ghost-button {
    flex: 1 1 auto;
  }
}

@media (max-width: 380px) {
  .ghost-button {
    min-height: 36px;
    padding: 0 10px;
  }
}

@media (max-width: 760px) {
  /* 窄屏：侧栏折叠成档案上方的横向滚动条 */
  .dossier-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .watch-sidebar {
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
  }

  .watch-sidebar__head {
    flex: 0 0 auto;
    padding: 0;
    white-space: nowrap;
  }

  .watch-sidebar__add {
    flex: 0 0 132px;
  }

  .watch-sidebar__list {
    flex-direction: row;
    gap: 4px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .watch-sidebar__item {
    flex: 0 0 auto;
    padding: 6px 10px;
  }

  .market-home__top {
    display: grid;
    padding: 18px 16px 2px;
  }

  .market-home__top .primary-button {
    width: 100%;
  }

  .market-tab {
    min-height: 38px;
    padding: 0 12px;
    font-size: 15px;
  }

  .market-subtabs {
    justify-content: space-around;
    gap: 20px;
  }

  .market-card {
    padding: 16px;
  }

  .market-section-head h3 {
    font-size: 22px;
  }

  .index-strip,
  .market-overview__meta,
  .market-kpi-row,
  .market-module-grid {
    grid-template-columns: 1fr;
  }

  .quick-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-table > div {
    grid-template-columns: minmax(92px, 1fr) 58px 58px minmax(68px, 0.8fr);
    gap: 8px;
    font-size: 13px;
  }

  .market-placeholder-chart,
  .sentiment-heat,
  .valuation-zone {
    min-height: 150px;
  }

  .home-board,
  .home-ai-sample {
    grid-template-columns: 1fr;
  }

  .home-board__intro {
    min-height: 0;
    padding: 18px;
  }

  .home-board__intro h2 {
    font-size: 30px;
  }

  .home-board__actions {
    display: grid;
  }

  .home-board__actions .primary-button,
  .home-board__actions .ghost-button {
    width: 100%;
  }

  .home-board__stats,
  .home-ai-sample {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .topbar,
  .watch-panel {
    animation: fade-in 180ms ease-out both;
  }

  .watch-panel { animation-delay: 40ms; }

  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ============================================================
   TOP NAV
   ============================================================ */

/* 导航栏默认透明——不管在哪个页面，只要还在顶部就该是这样，
   切页面那一刻不会撞出"有条/没条"的硬切换。 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  height: 58px;
  padding: 0 28px;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 240ms, border-color 240ms, backdrop-filter 240ms;
}

/* 滚动超过一点后才需要实体背景：固定导航开始遮挡下方内容，靠这层
   毛玻璃保证文字仍然可读；一旦滚回顶部又立刻退回透明。 */
body.is-nav-solid .top-nav {
  background: var(--veil-lo);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* 首页（巴菲特名言页）例外：整屏就是一句名言，没有会被导航遮住的正文，保持透明。
   自选页不再例外——从自选点进的股票详情在代码里仍算自选页，跟着例外一起透明后，
   滚动时正文会直接透到导航文字上。透不透明只看滚没滚动，不看在哪个页面。 */
body.is-hero.is-nav-solid .top-nav {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 非首页：内容区顶部补偿固定导航高度 */
body:not(.is-hero) .main-surface {
  padding-top: 58px;
}

/* 首页：清除所有媒体查询对 main-surface 的 padding（旧侧边栏遗留规则），保证 home-A 从视口顶端开始 */
body.is-hero .main-surface {
  padding: 0 !important;
}

/* 首页：确保 app-shell 保持 flex 列布局（覆盖 ≤980px 的 display:block 旧规则） */
body.is-hero .app-shell {
  display: flex;
  flex-direction: column;
}

.top-nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.top-nav__brand .brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
}

.top-nav__brand strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  transition: color 140ms;
}

/* 悬停反馈：字变品牌红（与自选按钮同一信号），查字方块轻微上浮——标志可点、点了回首页 */
.top-nav__brand .brand__mark {
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.top-nav__brand:hover strong {
  color: var(--blue);
}

.top-nav__brand:hover .brand__mark {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(80, 13, 21, 0.22), inset 0 1px rgba(255, 255, 255, 0.25);
}

.top-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  margin-right: 16px;
}

/* 深浅色切换钮：个人中心里的圆钮，只装图标 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 140ms, color 140ms;
}

.theme-toggle:hover {
  border-color: var(--line);
  color: var(--blue);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .theme-toggle__sun { display: none; }
.theme-toggle .theme-toggle__moon { display: block; }
.theme-toggle.is-dark .theme-toggle__sun { display: block; }
.theme-toggle.is-dark .theme-toggle__moon { display: none; }

.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px; /* 与个人中心胶囊（26px 头像 + 上下 6px + 边框）等高 */
  border: 1px solid transparent; /* 占位边框，高亮切圈线时不跳动 */
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px;
  border-radius: 999px; /* 与个人中心胶囊、首页搜索框同一形状语言 */
  cursor: pointer;
  transition: background 140ms, color 140ms;
  white-space: nowrap;
}

.top-link:hover {
  border-color: var(--line); /* 悬停浮现线框，与高亮同一套语言 */
  color: var(--blue);
}

.top-link.is-active,
.top-link[aria-current="page"] {
  background: var(--surface);
  border-color: var(--line); /* 高亮 = 圈线，与个人中心圆钮同一套设计 */
  color: var(--blue);
}

/* 登录：与「自选」完全同款——平时黑字无框，悬停红字浮现线框 */
.top-link--cta {
  background: transparent;
  color: var(--ink-soft);
  padding: 0 18px;
}

/* ============================================================
   USER MENU (top-right dropdown)
   ============================================================ */

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

/* 与「自选」top-link 同一套状态语言：平时黑字无框，悬停红字浮现线框，
   下拉展开（aria-expanded=true）= 红字 + 圈线高亮 */
.user-pill {
  display: flex;
  align-items: center;
  padding: 6px;
  border: 1px solid transparent; /* 占位边框，高亮切圈线时不跳动 */
  border-radius: 999px; /* 只留头像的 40px 圆钮，昵称收进下拉菜单 */
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color 140ms, box-shadow 140ms;
  user-select: none;
}

.user-pill:hover {
  border-color: var(--line);
}

.user-pill:hover .user-pill__avatar,
.user-pill[aria-expanded="true"] .user-pill__avatar {
  color: var(--blue);
}

.user-pill[aria-expanded="true"] {
  background: var(--surface);
  border-color: var(--line);
}

.user-pill__avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent; /* 只留外圈线，去掉底色块，避免双层视觉 */
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.user-pill__caret {
  font-size: 11px;
  color: var(--muted);
}

/* 余额带：上下细线夹出一条水平分区 */
.profile-coins {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  margin-bottom: 24px;
  border-top: 1px solid rgba(83, 74, 58, 0.15);
  border-bottom: 1px solid rgba(83, 74, 58, 0.15);
}

.coin-num {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.coin-num small {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.auth-page__inner--recharge {
  max-width: 460px;
}

.coin-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coin-rate {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 6px;
}

.coin-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.coin-tier {
  display: grid;
  gap: 4px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: none;
  font: inherit;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
}

.coin-tier:hover {
  border-color: var(--line-strong);
}

.coin-tier.is-selected {
  border-color: rgba(159, 29, 43, 0.5);
  background: rgba(159, 29, 43, 0.04);
  color: var(--blue);
}

.coin-tier__price {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
}

.coin-tier__label {
  font-size: 13px;
  font-weight: 600;
}

.coin-tier__anchor {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.coin-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.coin-custom input {
  width: 88px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.coin-custom input:focus {
  outline: none;
  border-color: var(--blue);
}

.coin-custom__hint {
  font-size: 12px;
  color: var(--muted);
}

.coin-methods {
  display: flex;
  gap: 8px;
}

.coin-method {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 140ms, color 140ms, background 140ms;
}

.coin-method.is-selected {
  border-color: rgba(159, 29, 43, 0.5);
  background: rgba(159, 29, 43, 0.04);
  color: var(--blue);
}

.coin-pay {
  display: grid;
  gap: 6px;
}

.coin-pay .primary-button {
  min-height: 46px;
  background: transparent;
  color: var(--blue);
  border-color: rgba(159, 29, 43, 0.5);
  box-shadow: none;
}

.coin-pay .primary-button:hover:not(:disabled) {
  border-color: var(--blue);
  background: rgba(159, 29, 43, 0.04);
}

.coin-rules {
  margin: 0;
  padding: 10px 0 0 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

/* 资费标语：上下各 10px 正好居中在输入框与卡片之间；
   总高度不变——顶部让出的 4px 从底部收回 */
.watch-fee-note {
  margin: -2px 0 -4px;
  padding: 0 18px;
  font-size: 12px;
  color: var(--muted);
}

/* 价格和时长这几个数字挑红：整行是灰的，扫一眼先抓到"多少钱、管多久"。
   只换字色不加粗——这行本来就小，再加粗会跟旁边的充值链接抢。 */
.watch-fee-note b {
  color: var(--blue);
  font-weight: inherit;
}

/* 同一行里数字也是红的，红色不再等于"可点"：靠箭头留住可点这层意思，
   比下划线干净，手机上也不像 hover 下划线那样彻底没提示。 */
.fee-link {
  /* 箭头和文字交给 flex 居中：写死像素偏移会跟着字体变，换个字重就又歪了 */
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
}

.fee-link i {
  font-style: normal;
  font-size: 1.15em;
  line-height: 1;
  /* 箱体已由 flex 居中，但"›"的墨迹在自己格子里偏下约 0.15em，
     再抬这一档才和汉字视觉中线齐。用 em 写，字号变了也不会歪。 */
  transform: translateY(-0.15em);
  transition: transform 140ms ease;
}

.fee-link:hover i {
  transform: translate(2px, -0.15em);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(38, 22, 20, 0.14);
  z-index: 200;
  overflow: hidden;
}

.user-dropdown__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.user-dropdown__info strong {
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown__info .theme-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  /* 图标中心与上方头像胶囊里的字母中心对同一条竖线，而非贴卡片右侧留白边界 */
  margin-right: -11px;
}

.user-dropdown__info .theme-toggle svg {
  width: 14px;
  height: 14px;
}

.user-dropdown__info small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.user-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 120ms;
}

.user-dropdown__item:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.user-dropdown__item--danger {
  color: var(--red);
}

.user-dropdown__item--danger:hover {
  background: var(--red-soft);
  color: var(--red);
}

/* ============================================================
   HOME HERO
   ============================================================ */

/* 名言区吃掉"整屏减去页脚"的高度，不再死占一整屏——
   写死 100vh 时页脚被挤到屏幕外，进首页必须先滚一下才看得到免责声明。
   靠 flex 自动分配，页脚文案长短变化也不用回来改数字。 */
.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-hero[hidden] {
  display: none;
}

/* 单层 grid 居中：撑满名言区剩下的高度，内容落在这块区域的正中，略高于整屏正中 */
.home-A {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  flex: 1;
}

.home-topbrand {
  position: absolute;
  top: 24px;
  left: 32px;
  display: none; /* 顶部 nav 已有品牌，hero 内部不重复 */
}

.home-center {
  position: relative;
  width: min(680px, 90vw);
  text-align: center;
}

.home-slogan {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.45;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 14px 0 28px;
  transform: translateY(-40px);
}

.home-attr {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  font-family: var(--font-serif); /* 与主标题同字体同斜体 */
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.12em;
  margin: 0;
  pointer-events: none;
  white-space: nowrap;
  transform-origin: left center;
}

/* 顶栏一句话价值说明 + 示例分析入口：与 logo 同一水平线，居中；小屏隐藏说明只留入口 */
.home-pitch {
  display: none; /* 只在首页展示（body.is-hero），进了自选/详情等页面不再打扰 */
  flex: 1;
  min-width: 0;
  margin: 0 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.is-hero .home-pitch {
  display: block;
}

@media (max-width: 860px) {
  .home-pitch { font-size: 12px; }
  .home-pitch .home-pitch__text { display: none; }
}

.home-demo {
  margin-left: 10px;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms;
}

.home-demo:hover {
  border-bottom-color: var(--blue);
}

/* 示例分析引导横幅：细线框提示条，放在分析板块最上方 */
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--ink-soft);
}

.demo-banner__cta {
  padding: 5px 16px;
  border: 1px solid var(--blue);
  border-radius: 2px;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms, color 140ms;
}

.demo-banner__cta:hover {
  background: var(--blue);
  color: var(--surface);
}

.home-searchbox {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 22px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 22px 60px rgba(38, 22, 20, 0.14);
  transition: border-color 200ms, box-shadow 200ms;
}

.home-searchbox:focus-within {
  border-color: var(--blue);
  box-shadow: 0 26px 70px rgba(159, 29, 43, 0.18);
}

.home-searchbox input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 17px;
  padding: 12px 0;
  color: var(--ink);
  font-family: var(--font-sans);
}

.home-searchbox input::placeholder {
  color: #b3a59d;
}

.home-go-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-go {
  border: 0;
  background: #7f1620;
  color: #fff7f0;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(127, 22, 32, 0.24);
  transition: background 160ms;
  cursor: pointer;
}

.home-go:hover {
  background: #9f1d2b;
}

.home-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 16px;
  right: 16px;
  width: auto;
  z-index: 50;
}

/* ============================================================
   PAGE CONTENT (non-home views)
   ============================================================ */

.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 24px 76px;
  width: 100%;
  display: grid;
  gap: 14px;
  align-content: start;
}

.page-content[hidden] {
  display: none;
}

/* page-content 用 grid gap 控制间距，消除面板自带 margin-top 的叠加 */
.page-content > .watch-panel {
  margin-top: 0;
}

/* 加入自选 / 切换精选 — inline 在内容区顶部 */
.watch-add--inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px; /* 与导航自选高亮、个人中心胶囊、首页搜索框统一 */
  box-shadow: var(--shadow-sm);
}

.watch-add--inline .watch-add__field {
  flex: 1;
  position: relative;
}

.watch-add--inline input {
  width: 100%;
  border: 0;
  /* 圆角归零：外层胶囊已经是圆角形状，这个透明输入框自己再带 999px 圆角
     （继承自 .watch-add input 的历史规则）只剩一个副作用——内容按它自己的
     圆角裁切，光标落在最左端 x≈0 时正好被圆弧切成一小段弯月牙。
     矩形裁切 + 2px 内边距，让光标完整并彻底离开裁切边。 */
  border-radius: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 6px 2px;
  color: var(--ink);
}

.watch-add--inline input::placeholder {
  color: var(--muted);
  transition: opacity 120ms;
}

/* 点进输入框就让提示文字让位，不用等打字才消失；失焦且没输入内容时原生自动恢复显示 */
.watch-add--inline input:focus::placeholder {
  opacity: 0;
}

@media (max-width: 640px) {
  .top-nav { padding: 0 16px; height: 52px; }
  .top-nav__links { gap: 0; margin-right: 10px; }
  .top-link { padding: 0 12px; min-height: 34px; font-size: 13px; }
  .home-slogan { font-size: 17px; }
  .home-searchbox { padding-left: 16px; }
  .home-searchbox input { font-size: 16px; }
  .home-go { padding: 11px 18px; font-size: 14px; }
  .page-content { padding: 18px 16px 60px; }
}

/* ============ 新闻页 ============ */
/* 竖向时间轴：左边一条线，时间刻在线外，卡片挂在线上。
   单列但卡片放宽——横向靠卡片宽度用掉，不靠分栏，时间顺序才读得连贯。 */
body.is-news .page-content {
  max-width: 1120px;
  padding-left: 28px;
  padding-right: 28px;
}

.news-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* 拿的是上一轮的旧内容时挑出来说，不让它冒充最新 */
.news-head__stale {
  flex-basis: 100%;
  color: var(--blue);
}

.news-day { margin-bottom: 26px; }

.news-day__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  /* 和时间刻度对齐：日期标题压在时间列上方，不是浮在正中 */
  padding-left: 4px;
}

.news-day__main {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.news-day__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.news-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 时间列定宽 + 轴线 + 圆点，卡片占剩下的空间 */
.news-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

/* 轴线：贯穿整条，靠 li 自身的伪元素接续，不用整段的长条 */
.news-item::before {
  content: "";
  position: absolute;
  left: 66px;
  top: 0;
  bottom: -10px;
  width: 1px;
  background: var(--line);
}
.news-item:last-child::before { bottom: auto; height: 22px; }

/* 圆点：钉在轴线上，和时间同一条基线 */
.news-item::after {
  content: "";
  position: absolute;
  left: 63px;
  top: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background-color 140ms ease, transform 140ms ease;
}
.news-item:hover::after {
  background: var(--blue);
  transform: scale(1.25);
}

.news-item__time {
  padding-top: 14px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.news-item__link {
  display: grid;
  gap: 6px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.news-item__link:hover {
  border-color: rgba(159, 29, 43, 0.3);
  box-shadow: var(--shadow-sm);
}

.news-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

/* 来源做成胶囊：四家权威性不同，这是每条消息的分量所在，得先被看见 */
.news-item__source {
  padding: 2px 8px;
  border: 1px solid rgba(159, 29, 43, 0.28);
  border-radius: 999px;
  background: rgba(159, 29, 43, 0.05);
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.news-item__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

/* 摘要封两行：卡片宽了，两行已经能放不少字，再多就把时间轴撑散了 */
.news-item__summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.news-empty {
  margin: 0;
  padding: 44px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 版权与下架通道：低调但一直在，不是藏起来的 */
.news-notice {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  opacity: 0.85;
}

@media (max-width: 700px) {
  body.is-news .page-content { padding-left: 16px; padding-right: 16px; }
  /* 窄屏收掉时间列和轴线：58px 的空列在手机上太奢侈，时间并进来源那行 */
  .news-item { grid-template-columns: 1fr; gap: 0; }
  .news-item::before, .news-item::after { display: none; }
  .news-item__time {
    padding: 0 0 4px 2px;
    text-align: left;
  }
  .news-item__link { padding: 12px 14px; }
  .news-item__title { font-size: 14px; }
}
/* ↑ 这个收尾括号在合并分支时丢过一次：少了它，后面的术语样式会被整段
   吞进这个窄屏媒体查询里，桌面端词条直接退化成浏览器默认按钮方框。 */

/* ============ 术语解释 ============ */
/* 专业词保留原样，标红并可点开解释：老股民照常读，新手能就地问一句这是什么。
   做成 button 而不是 span，键盘能 tab 到、读屏能念出来，手机上也点得动。 */
.jargon {
  position: relative;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  /* 正文里高亮词成片出现，品牌红会盖过正文本身。退回正文色，可点这件事交给虚线去说。
     必须走变量：写死颜色在深色主题下就是黑底黑字。 */
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  /* 跟着文字色走，深浅主题各自成立——原先写死的浅色红在深色主题下不跟随。 */
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

/* 气泡挂在 body 下，用 fixed + JS 视口定位，避开术语所在卡片、图表和圆角容器的
   overflow 裁剪。关着时彻底 display:none，不参与布局，也不会撑出横向滚动条。 */
.jargon-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--canvas-2);
  box-shadow: 0 14px 32px rgba(38, 22, 20, 0.18);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  pointer-events: none;
  animation: jargonTipIn 140ms ease;
}

.jargon-tooltip[hidden] {
  display: none;
}

@keyframes jargonTipIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .jargon-tooltip { animation: none; }
}
