: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; }

/* 手机上点按钮/关闭叉会闪一块灰黑色——这是移动浏览器给可点元素加的默认点击高亮，
   跟我们自己的按下反馈（背景变色）叠在一起就是脏。全站关掉，按下反馈只留我们自己的。 */
* {
  -webkit-tap-highlight-color: transparent;
}

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;
}

@media (hover: hover) {
  .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(46, 26, 24, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.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);
  /* 毛玻璃卡壳（设计稿：会员订阅设计 2026-08-31）：半透白 + 背景取样模糊，
     高光走 inset 白线。手机端在 640 媒体查询里降级成近实底（blur 抢 GPU 会卡支付面板）。
     遮罩统一用欢迎卡那层的参数（暖红调 0.35），全站弹窗与背景的关系一致；
     卡片走纯白系，把颜色让给欢迎卡自己的流光。
     踩过两头：遮罩深+卡片透 → 深色透上来把白吃成灰；遮罩浅 → 整屏发飘没聚焦。 */
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 70px -18px rgba(48, 32, 26, 0.3), 0 2px 8px rgba(48, 32, 26, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

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

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

/* ── 微信扫码登录 / 绑定墙：跳转按钮是唯一主角，配色与邮箱表单同族，
     全部走主题变量（--blue/--surface/--muted/--line），深色模式自动跟随 ── */
.auth-page__inner--wechat .auth-wechat-btn {
  display: block;
  margin-top: 6px;
  padding: 14px;
  border-radius: 2px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

@media (hover: hover) {
  .auth-page__inner--wechat .auth-wechat-btn:hover {
    background: var(--blue);
    color: var(--surface);
  }
}

.auth-page__inner--wechat .auth-wechat-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* 退出登录是纯文字按钮：清掉浏览器默认内边距，字面与上方卡片内容左边线严丝合缝
   （同 .auth-links 的对齐原则：带边框的靠边框对齐，纯文字靠字面对齐） */
/* 扫码层底部的"找回旧账号"：弱化小字，不跟主按钮抢注意力；与退出登录同一族 */
.auth-claim {
  margin-top: 18px;
  padding: 0;
  justify-self: start;
  font-weight: 500;
}

.auth-claim em {
  font-style: normal;
  color: var(--blue);
  font-weight: 700;
}

/* ── 登录卡片（只作用于登录层，绑定墙不受影响：墙那张不带 --login）──
   全窗只有一个动作，按钮就该是唯一的实心块。原先按钮是描边，视觉重量还不如
   底下那行"点这里找回"的红字，主次是反的。
   顶部的品牌行也去掉了：用户是在站内点出这个弹窗的，他知道自己在哪，
   那一行只是把标题往下推了 32px。 */
.auth-page__inner--login {
  max-width: 380px;
  padding: 28px 26px;
  border-radius: 14px;
}

.auth-page__inner--login .auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
}

.auth-titles--center {
  margin: 6px 0 22px;
  padding: 0 8px;
  text-align: center;
}

.auth-page__inner--login .auth-titles--center h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 7px;
}

.auth-page__inner--login .auth-titles--center .auth-box__sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.auth-page__inner--wechat .auth-wechat-btn--solid {
  margin-top: 0;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--surface);
  font-size: 15px;
}

/* hover 用压暗而不是换一个写死的深红：深色模式下 --blue 是亮粉红，
   写死的深红压上去会突兀，压暗在两套主题里都是"按下去"的直觉 */
@media (hover: hover) {
  .auth-page__inner--wechat .auth-wechat-btn--solid:hover {
    background: var(--blue);
    color: var(--surface);
    filter: brightness(0.92);
  }
}

/* 三个类：下面还有一条 .auth-page__inner--auth .auth-switch { justify-self: start }，
   它跟两个类的写法同分且排在后面，同分时后写的赢——这里必须多一个类才压得住 */
.auth-page__inner--login .auth-claim.auth-claim--center {
  margin-top: 14px;
  justify-self: center;
  font-size: 12px;
}

.auth-claim--center em {
  color: var(--muted);
  font-weight: 500;
  text-decoration: underline;
}

.auth-wechat-exit {
  margin-top: 20px;
  padding: 0;
  justify-self: start;
}

/* 管理列表：主名下方的原邮箱、未绑状态，都用弱化小字，不跟主名抢注意力 */
/* 最近活跃：不管有没有记录，主字都用同一字号，行高才对得齐。
   没记录时只把颜色调淡，不许改字号——之前整格套小字，那一行比别人矮一截。 */
.admin-seen {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}

.admin-seen--none {
  color: var(--muted);
}

/* 账号格：头像在左，昵称和微信标识在右，两行整体跟头像居中对齐。
   头像拉不出来时 onerror 直接摘掉节点，不留破图框，那一格自然退回没头像的样子。 */
.admin-who {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.admin-who__text {
  min-width: 0;
}

.admin-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* 管理列表里的微信账户标记 */
.admin-wx-tag {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  color: var(--muted);
}

.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;
}

@media (hover: hover) {
  .auth-page__inner--auth .auth-switch:hover {
    text-decoration: none;
  }
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
  /* 高度按最多 8 条一次装下（见 SUGGEST_MAX）：不用滚就能看全，也就不出滚动条。
     仍留 auto 兜底——"继续输入以缩小范围"那行会多占一行，或字号被系统放大时。 */
  max-height: 360px;
  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);
}

/* 系统默认滚动条又粗又深、还占一条白槽，压在圆角上很脏：换成 6px 的半透明滑块。
   注意别在这里写 scrollbar-width——新版 Chrome 只要见到它就整个忽略下面的自定义规则，
   滑块粗细退回浏览器的"thin"（实测 13px）。标准属性只留给不认自定义规则的浏览器（见文末 @supports）。 */
.stock-suggest::-webkit-scrollbar {
  width: 6px;
}

.stock-suggest::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0; /* 上下留白：滑轨不顶到圆角 */
}

.stock-suggest::-webkit-scrollbar-thumb {
  background: rgba(83, 74, 58, 0.28);
  border-radius: 999px;
}

.stock-suggest::-webkit-scrollbar-thumb:hover {
  background: rgba(83, 74, 58, 0.45);
}

:root[data-theme="dark"] .stock-suggest {
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

:root[data-theme="dark"] .stock-suggest::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.24);
}

:root[data-theme="dark"] .stock-suggest::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 不支持自定义滚动条的浏览器（Firefox）走标准属性兜底 */
@supports not selector(::-webkit-scrollbar) {
  .stock-suggest {
    scrollbar-width: thin;
    scrollbar-color: rgba(83, 74, 58, 0.32) transparent;
  }
  :root[data-theme="dark"] .stock-suggest {
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  }
}

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

/* 联想项只有一种高亮：「当前选中」。鼠标滑动会把选中挪过来（脚本里做），
   键盘上下键也挪它——不给 hover 单独的样式，否则两套高亮同屏各指一行，
   回车选的是哪个说不清（实际踩过）。 */
.stock-suggest li.is-active {
  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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

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

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

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

@media (hover: hover) {
  .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);
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

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

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

/* 活跃走势：左边一堆柱子看每天来过多少人（下段付费、上段免费），右边铺开选中那天来过的是谁。
   人一多就没法一行行翻表找谁登录过，柱子加头像是一眼的事。 */
.admin-trend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 2px 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.admin-trend__chart {
  flex: 1 1 420px;
  min-width: 0;
}

.admin-trend__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-trend__head h3 {
  font-size: 14px;
  font-weight: 800;
}

.admin-trend__hint {
  color: var(--muted);
  font-size: 12px;
}

/* 图例：付费/免费两个色块，颜色和柱子两段一一对应 */
.admin-trend__legend {
  display: flex;
  gap: 10px;
}

.admin-trend__key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-trend__chip {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.admin-trend__chip--paid { background: var(--blue); }
.admin-trend__chip--free { background: var(--surface-3); border: 1px solid var(--line-strong); }

/* 画布按 viewBox 等比缩放：窗口多宽都不变形，也不用监听 resize 重画 */
.admin-trend__svg {
  display: block;
  width: 100%;
  height: auto;
}

.admin-trend__grid { stroke: var(--line-strong); stroke-width: 1; }
.admin-trend__grid--soft { stroke: var(--line); stroke-dasharray: 3 4; }

.admin-trend__bar { cursor: pointer; transition: filter 0.12s ease; }
.admin-trend__bar--paid { fill: var(--blue); }
/* 免费用纸感中性色退后一步，付费那截品牌红才跳得出来 */
.admin-trend__bar--free { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1; }
/* 选中的那天柱子描一圈边，和没选的区分开 */
.admin-trend__bar.is-on { stroke: var(--ink-soft); stroke-width: 1.5; }
/* 悬停提亮柱子、数字加深，让人知道这一条能点 */
.admin-trend__day:hover .admin-trend__bar { filter: brightness(1.15); }
.admin-trend__day:hover .admin-trend__val { fill: var(--ink); }

/* 没人来的日子：基线小点 + 灰色 0，别让一排 0 抢了柱子的视线 */
.admin-trend__zero { fill: var(--line-strong); pointer-events: none; }

/* 柱子太细不好点，每天罩一条透明的竖条当点击区 */
.admin-trend__hit { fill: transparent; cursor: pointer; }
/* 字不接鼠标：点在数字和日期上也要落到底下那条点击区，不能点了没反应 */
.admin-trend__svg text { pointer-events: none; }
.admin-trend__axis { fill: var(--muted); font-size: 10px; }
.admin-trend__axis.is-today { fill: var(--blue); }
.admin-trend__axis.is-on { fill: var(--blue); font-weight: 700; }
.admin-trend__val { fill: var(--ink-soft); font-size: 10px; font-weight: 700; }
.admin-trend__val.is-zero { fill: var(--muted); font-weight: 400; }
.admin-trend__val.is-on { fill: var(--blue); }

.admin-trend__people {
  flex: 0 1 268px;
  min-width: 200px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.admin-trend__people-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.admin-trend__faces {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 132px;
  overflow-y: auto;
  list-style: none;
}

.admin-trend__person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 52px;
}

.admin-trend__face {
  width: 34px;
  height: 34px;
}

/* 没头像的人给个首字圆牌，占位一样大，一排头像不会高低不齐 */
.admin-trend__face--blank {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.admin-trend__name {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* 名字底下的小会员标：金色，和柱子里付费那段的位置（下段）呼应 */
.admin-trend__vip {
  padding: 0 4px;
  border-radius: 2px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
}

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

/* 窄屏时人名那栏落到曲线下面，竖线改成横线，不然一条竖线孤零零挂在左边 */
@media (max-width: 760px) {
  .admin-trend__people {
    flex-basis: 100%;
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.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;
  /* 点击面保留 28px，向卡片内边距借 7px，让可见的 14px 叉号右缘与下方现价右缘对齐。 */
  margin-right: -7px;
  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:focus-visible {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  outline: none;
}

@media (hover: hover) {
  .stock-remove:hover {
    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-card--enter（重绘后真正新来的票）播；老卡重绘不带动画，避免频闪 */
.stock-group__grid > .stock-card--enter {
  animation: stockCardIn 320ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

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

@media (prefers-reduced-motion: reduce) {
  .stock-group__grid > .stock-card--enter { 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;
}

/* 曾经关注过：已移出池子的票，灰底陈列。免费额度用掉不退、删光后容易忘了花在哪几只上，
   这里让用户照着加回来。灰色是刻意的——它不是当前在跟的票，别和自选卡抢注意力。 */
.history-pool {
  margin-top: 28px;
}

.history-pool__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  /* 与上方"免费可试…"那行同样的内缩：那行有 18px 内边距，不补上两行文字对不齐 */
  padding: 0 18px;
}

.history-pool__head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.history-pool__head span {
  font-size: 12px;
  color: var(--muted);
}

/* 与自选网格同一套尺寸：两排卡等宽等距，视觉上是同一个列表的上下两段 */
.history-pool__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 10px;
}

/* 历史池里的卡就是自选卡本身，只是整块压灰、不参与入场动画 */
.history-pool .stock-card {
  animation: none;
  filter: grayscale(0.8);
  opacity: 0.78;
  transition: filter 160ms ease, opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.history-pool .stock-card:hover,
.history-pool .stock-card:focus-visible {
  filter: none;
  opacity: 1;
}

/* 右上角原本放删除叉的位置，历史卡改成"加回要不要额度"——
   点下去才被拦比不给这个池子还糟，所以写在卡上 */
.history-back {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.history-back.is-free {
  color: var(--green);
}

/* 推荐关注：新用户/空自选时的入口，覆盖人工信息源的股票。 */
/* ── 注册欢迎卡（设计稿：欢迎卡片H5）：彩色流光垫底 + 毛玻璃卡身 + 像素走势底纹。
   流光和玻璃的色值不走主题变量——它们是这张卡的记忆点，深色主题只把玻璃换成深底 ── */
/* 跟手旋转作用在这层透明缓冲壳上，不直接转卡片：Safari 重采样旋转中的图层时，
   亮色和投影贴着图层边界会渗出一圈光晕（实机排查锁定）；壳的透明内边距把边界让开，
   采样溢出的是透明像素。负外边距抵掉内边距，占位跟没有这层壳时一样。 */
/* 舞台层：只提供透视。透视只作用于直接子元素，所以必须写在卡片的父层上，
   写在更外面的弹层里管不到，卡片会退化成没有近大远小的轻微压扁。 */
.welcome-holder {
  position: relative;
  width: 100%;
  max-width: 380px;
  perspective: 900px;
  animation: welcome-rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* 投影长在卡片自己身上、跟着一起转（影子跟手才有实体感）。
   Safari 本来会在这种"圆角 + 3D 变换 + 内部裁剪"的组合下把边缘渗成一圈光晕/白边，
   靠下面这行 mask 偏方压住：它强制 Safari 换一条合成路径，边缘就干净了。
   这套组合（收缩型投影 + preserve-3d + mask 偏方）抄自 cloudflare.pay 的线上实现，
   是生产环境验证过的；改动这几行前先在 Safari 实机确认，别想当然。 */
.welcome-card {
  position: relative;
  width: 100%;
  border-radius: 16px;
  clip-path: inset(0 round 16px);
  transform: translateZ(0);
  transform-style: preserve-3d;
  will-change: transform;
  /* 负扩散让投影向内收，不会大幅漫出卡片边界——漫出来的部分正是被衬亮的那圈 */
  box-shadow: 0 36px 72px -32px rgba(88, 20, 26, 0.45), 0 10px 24px -17px rgba(88, 20, 26, 0.28);
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}

/* 投影和裁剪必须分两层：Safari 给带 3D 变换的圆角元素做裁剪时，四角会把里面的
   流光颜色渗出一圈光晕。clip-path 剪得干净，但它连投影一起剪——所以外层只管
   投影和旋转，这层专职把流光和毛玻璃关严实。 */
.welcome-card__clip {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  clip-path: inset(0 round 16px);
  background: #f7e3de;
}

.welcome-card__blob,
.welcome-card__sheen {
  position: absolute;
  pointer-events: none;
}

/* 补回原先毛玻璃顺带做的提饱和，颜色不掉档 */
.welcome-card__blob {
  filter: saturate(150%);
}

.welcome-card__blob--a {
  left: -30%;
  top: -40%;
  width: 90%;
  height: 110%;
  background: radial-gradient(circle, rgba(159, 29, 43, 0.5), transparent 62%);
  animation: welcome-drift-a 14s ease-in-out infinite;
}

.welcome-card__blob--b {
  left: -20%;
  bottom: -45%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, rgba(224, 123, 57, 0.45), transparent 65%);
  animation: welcome-drift-b 18s ease-in-out infinite;
}

.welcome-card__blob--c {
  right: -25%;
  top: -30%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, rgba(181, 73, 139, 0.35), transparent 65%);
  animation: welcome-drift-c 22s ease-in-out infinite;
}

.welcome-card__sheen {
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 253, 248, 0.5), transparent 55%);
  animation: welcome-sheen 9s ease-in-out infinite;
}

/* 不用 backdrop-filter 毛玻璃：Safari 的背景取样会把卡内亮色沿整条边往外糊一圈光晕，
   裁剪管不住它。玻璃身后只有我们自己画的流光（本来就是柔和渐变），不需要实时取样模糊——
   半透明底色 + 流光加饱和就是同样的观感，渗色机制连根拔掉。 */
.welcome-card__glass {
  position: relative;
  overflow: hidden;
  clip-path: inset(0 round 16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  background: rgba(255, 246, 244, 0.62);
  /* 底纹画布的 z-index:-1 需要玻璃层自成堆叠上下文（原先由 backdrop-filter 顺带提供） */
  isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 28px 26px;
  display: grid;
  gap: 20px;
}

/* 玻璃层的 isolation 让它自成堆叠上下文：z-index:-1 恰好落在玻璃底色之上、正文之下 */
.welcome-card__chart {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

.welcome-card__titles {
  text-align: center;
}

.welcome-card__title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
}

.welcome-card__sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.welcome-card__rows {
  display: grid;
  gap: 10px;
}

.welcome-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.welcome-card__row b {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.welcome-card__go {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--blue);
  color: var(--on-blue);
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(159, 29, 43, 0.3);
}

@media (hover: hover) {
  .welcome-card__go:hover {
    filter: brightness(0.92);
  }
}

.welcome-card__go:active {
  transform: translateY(1px);
}

.welcome-card__note {
  margin: -8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* 深色主题：玻璃换深底、描边压暗，流光原色不动——彩斑在深底上反而更亮 */
:root[data-theme="dark"] .welcome-card__clip {
  background: #2a1d1a;
}

:root[data-theme="dark"] .welcome-card__glass {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(32, 26, 22, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .welcome-card__sheen {
  background: linear-gradient(120deg, rgba(255, 253, 248, 0.14), transparent 55%);
}

:root[data-theme="dark"] .welcome-card__row {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

@keyframes welcome-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes welcome-drift-a {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.18); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes welcome-drift-b {
  0% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(-70px, 50px) scale(0.92); }
  100% { transform: translate(0, 0) scale(1.1); }
}

@keyframes welcome-drift-c {
  0% { transform: translate(0, 0); }
  50% { transform: translate(40px, 60px); }
  100% { transform: translate(0, 0); }
}

@keyframes welcome-sheen {
  0% { opacity: 0.35; }
  50% { opacity: 0.7; }
  100% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-card,
  .welcome-card__blob,
  .welcome-card__sheen {
    animation: none;
  }
}

/* 金币雨特效：一块全屏画布，事件穿透，放完由脚本自动移除 */
.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;
}

/* 卡片右上角只保留叉号；名称、代码和权益时间共用左侧一行。 */
.stock-card__side {
  display: contents;
}

/* 单次解锁卡没有删除钮，这里放一个同尺寸的不可见占位：保住第一行右格的位置和高度，
   让订阅卡与单次解锁卡头部骨架一致。visibility:hidden 既不显示、不可点击、也不进读屏。 */
/* 左划确认层是手机专用（桌面 × 常驻，不需要左划这套） */
.swipe-confirm {
  display: none;
}

/* 撤销条两端都用：手机左划删除后弹，桌面点 × 删除后也弹——
   桌面那个 × 单击即删、没有确认，手滑一下就没了，给条退路。
   桌面底部居中，手机在 640 媒体查询里改成贴两边的通栏。 */
.swipe-undo {
  position: fixed;
  left: 50%;
  /* 抬到页脚免责声明之上：这条只停 3.5 秒，压着正文读起来很脏 */
  bottom: 76px;
  z-index: 190;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(122, 16, 28, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--on-blue);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(88, 20, 26, 0.3);
  animation: swipe-sheet-up-center 280ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.swipe-undo__timer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 247, 240, 0.16);
  animation: swipe-shrink 3.5s linear both;
}

.swipe-undo span,
.swipe-undo button {
  position: relative;
}

.swipe-undo button {
  border: 0;
  background: none;
  color: #ffd9dd;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

@keyframes swipe-sheet-up-center {
  from { transform: translateX(-50%) translateY(24px); opacity: 0; }
  to { transform: translateX(-50%); opacity: 1; }
}

@keyframes swipe-shrink {
  from { width: 100%; }
  to { width: 0%; }
}

.stock-remove-placeholder {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: block;
  /* 与带 -7px 右外边距的删除按钮占用同样的 21px 布局宽度。 */
  width: 21px;
  height: 28px;
  visibility: hidden;
}

/* 权益时间常驻名称右侧：用纯文本弱化，不再做胶囊强调。 */
.unlock-badge {
  flex: none;
  margin-left: 10px;
  padding: 0;
  border: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--blue);
  background: transparent;
  white-space: nowrap;
}

/* 正常订阅弱化为灰色，不与单次的红角标抢注意力。 */
.unlock-badge--watch {
  color: var(--muted);
}

/* 已过期：保留文字提示，整卡置灰；叉号仍可点。 */
.unlock-badge--expired {
  color: var(--muted);
}

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

@media (hover: hover) {
  .stock-card.is-expired:hover {
    opacity: 0.85;
  }
}

/* 侧边栏里的权益小标：单次解锁 / 剩余天数 / 已过期，红=需留意，灰=正常或仅供查看 */
.watch-sidebar__tag {
  flex: none;
  grid-column: 2;
  justify-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  min-height: 22px;
  padding: 1px 2px;
  border: 1px solid rgba(159, 29, 43, 0.35);
  border-radius: 999px;
  background: transparent;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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: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;
}

@media (hover: hover) {
  .recommend-card:hover {
    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;
}

@media (hover: hover) {
  .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:focus-visible::before {
  opacity: 1;
}

@media (hover: hover) {
  .stock-card:hover::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);
}

/* 头部单行：「名称 + 悬停代码 + 剩余时间 ↔ 叉号/预留位」。
   右侧操作位固定；名称过长时只截断名称，权益时间和操作位不换行。 */
.stock-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.stock-card__identity {
  display: contents;
}

.stock-card__identity-line {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  /* 名称、悬停代码、剩余时间字号不同，按视觉中线对齐比基线对齐更稳。 */
  align-items: center;
  align-self: center;
}

.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 {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 140ms ease;
}

.stock-card__top .stock-card__code {
  flex: none;
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-4px);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: max-width 160ms cubic-bezier(0.16, 1, 0.3, 1), margin-left 160ms cubic-bezier(0.16, 1, 0.3, 1), opacity 120ms ease, transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .stock-card__identity:has(.stock-card__name:hover) .stock-card__name {
    color: var(--blue);
  }

  .stock-card__identity:has(.stock-card__name:hover) .stock-card__code {
    max-width: 7ch;
    margin-left: 8px;
    opacity: 1;
    transform: none;
  }
}

.stock-card:focus-visible .stock-card__name {
  color: var(--blue);
}

.stock-card:focus-visible .stock-card__code {
  max-width: 7ch;
  margin-left: 8px;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .stock-card__name,
  .stock-card__top .stock-card__code {
    transition: none;
  }

  .stock-card__top .stock-card__code {
    transform: none;
  }
}

.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;
  /* 名字行没有统一的 gap（代码和权益角标各自带 margin），这里自己留出间距 */
  margin-left: 10px;
  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__base {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.35;
  vector-effect: non-scaling-stroke;
}

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

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

/* 图例只给手机看：桌面每张卡下面已经写了同一句话 */
.trend-legend { display: none; }

.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;
  /* 2026-09-15 去掉旧的 8px 右边距：顶行状态标签和下方板块内卡都贴内容右缘，
     就它缩进 8px，三条右边缘立不齐。"%" 字形自带的留白抹不掉，但肉眼看不出。 */
  margin-right: 0;
}

.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;
}

@media (hover: hover) {
  .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;
}

/* 详情页手机版紧凑头：同一份数据的第二套头部，只服务手机断点，桌面上不存在 */
.dossier-mhead { display: none; }

/* 详情页手机版板块导航：同上，只在手机断点显示 */
.dossier-secnav { display: none; }

/* 报告正文的分点列表版：同上，只在手机断点显示（桌面看整段） */
.report-points { display: none; }

/* 未登录：板块正文的登录门，视觉沿用“待生成”虚线空态 */
.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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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);
  /* 欢迎卡的 3D 跟手倾斜靠它出立体感：没有透视，rotateX/Y 只是轻微压扁，
     看起来像动效幅度被砍小。普通确认卡没有 3D 变换，不受影响。 */
  perspective: 900px;
}

.confirm-card {
  width: min(420px, 100%);
  padding: 22px 22px 16px;
  /* 与 .auth-page__inner 同款毛玻璃（设计稿：会员订阅设计），确认/到期弹窗一并换肤 */
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 22px 60px rgba(38, 22, 20, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 14px;
}

/* 深色主题：玻璃换深底（同欢迎卡先例：描边压暗、高光减弱） */
:root[data-theme="dark"] .auth-page__inner,
:root[data-theme="dark"] .confirm-card {
  background: rgba(32, 26, 22, 0.93);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.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;
}

@media (hover: hover) {
  .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);
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

/* "9月15日收盘分析"日期行只长在右侧档案上方（22px 行高 + 10px 下边距），
   左侧栏没有这行，顶边会高出 32px；有日期行时侧栏同步下移对齐档案卡顶边。
   锁定/生成中的档案没有日期行，:has 不命中就不偏移。窄屏侧栏变横条时在下方断点归零。 */
.dossier-layout:has(.report-date-context) .watch-sidebar { margin-top: 32px; }

.watch-sidebar {
  --watch-sidebar-row-inline: 8px;
  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;
  gap: 6px;
  /* 标题与股票名称的文字起点对齐。 */
  padding: 4px var(--watch-sidebar-row-inline);
  font-size: 13px;
}

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

/* 版本 05：新增入口跟随最后一只股票，外框与列表内容区左右边缘对齐。 */
.watch-sidebar__new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: calc(100% - var(--watch-sidebar-row-inline) - var(--watch-sidebar-row-inline));
  min-height: 34px;
  margin: 2px var(--watch-sidebar-row-inline) 0;
  padding: 0 12px;
  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;
  transition: transform 120ms ease, background-color 140ms ease;
}

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

.watch-sidebar__new:active {
  transform: scale(0.98);
}

.watch-sidebar__new[hidden],
.watch-sidebar__add[hidden] {
  display: none;
}

.watch-sidebar__add input {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 0 var(--watch-sidebar-row-inline);
  border: 1px solid rgba(159, 29, 43, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(159, 29, 43, 0.025);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.watch-sidebar__add .watch-add__field input {
  padding-right: 36px;
}

.watch-input-clear {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease, color 120ms ease;
}

.watch-input-clear svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.watch-input-clear:focus-visible,
.watch-input-clear.is-clearing {
  color: var(--red);
}

@media (hover: hover) {
  .watch-input-clear:hover {
    color: var(--red);
  }
}

.watch-input-clear:active,
.watch-input-clear.is-clearing {
  transform: translateY(-50%) scale(0.96);
}

.watch-input-clear:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.watch-input-clear[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .watch-input-clear {
    transition: none;
  }
}

.watch-sidebar__add {
  margin-inline: 0;
}

.watch-sidebar__add input::placeholder {
  color: var(--muted);
  font-weight: 600;
  opacity: 0.72;
}

@media (hover: hover) {
  .watch-sidebar__add input:hover {
    border-color: rgba(159, 29, 43, 0.3);
    background: rgba(159, 29, 43, 0.04);
  }
}

.watch-sidebar__add input:focus {
  outline: none;
  border-color: rgba(159, 29, 43, 0.5);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(159, 29, 43, 0.08);
}

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

.watch-sidebar__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 54px;
  align-items: center;
  column-gap: 4px;
  padding: 8px var(--watch-sidebar-row-inline);
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

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

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

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

.watch-sidebar__pct {
  grid-column: 3;
  justify-self: end;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.watch-sidebar__pct.pos { color: var(--red); }
.watch-sidebar__pct.neg { color: var(--green); }
.watch-sidebar__pct.is-empty { text-align: center; }

/* 数据条不带底色：报纸式裸排，靠留白分区 */
/* 固定一行横排；极端窄屏才折行兜底 */
.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:focus-visible::after,
.stock-dossier__status.is-open::after {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .stock-dossier__status:hover::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 }，是左侧边栏那版布局留下的。
     侧栏早就改成顶部横条，规则却留着，把整页的自动撑开能力关掉了：内容不够一屏时
     页脚停在内容末尾，离屏幕底还差一大截（实测自选池只有一只票时差 177px）。
     首页当年单独加了一条规则把撑开能力抢回去，所以只有首页看着正常。删掉之后
     全站统一走外层的纵向弹性布局，页脚该贴底就贴底，内容多的时候行为不变。 */

  /* 移动端：侧栏改成顶部横条，保留品牌 / 导航 / 账户入口；时钟在主区已有面板故隐藏 */
  .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);
  }

  /* 手机端弹层不用毛玻璃：微信支付面板/密码键盘滑出时，webview 要一边播原生动画
     一边对整页持续实时模糊，GPU 抢不过来就掉帧（真机实测卡顿）。遮罩加深补偿可读性。 */
  .auth-page {
    background: rgba(46, 26, 24, 0.42);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* 卡壳的毛玻璃同理在手机降级：血泪同源，别在手机上开 blur。近实底保住观感。 */
  .auth-page__inner,
  .confirm-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }

  :root[data-theme="dark"] .auth-page__inner,
  :root[data-theme="dark"] .confirm-card {
    background: rgba(32, 26, 22, 0.96);
  }

  /* 详情页头部整个换成紧凑头（用户定稿）：桌面那两层头直接藏掉，
     mhead 顶上。砍掉：股票代码、行业、成交额。 */
  .stock-dossier__topline,
  .stock-dossier__hero {
    display: none;
  }

  .dossier-mhead { display: block; }

  /* 报告更新时间悬在大卡外面的正上方、居中（用户定稿，顶了原来盘面截止
     时间的位置）。绝对定位挪出卡外，卡让出 22px 顶部空间给它。
     隔夜报告的提醒沿用桌面的做法——字加深，不用警示色。 */
  .stock-dossier {
    position: relative;
    margin-top: 22px;
  }

  /* 顶栏到时间行收紧到 8px（通用顶距剩 6 + 这里给 2），只动详情页。
     gap 归零是关键：页面容器是网格，自选页的工作区在详情页里是个空格位，
     网格行距 14px 却照样垫在卡片上面——前两轮收不下来就是它在垫。 */
  .page-content:has(.dossier-layout) {
    padding-top: 2px;
    gap: 0;
  }

  .mhead-updated {
    position: absolute;
    top: -22px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
  }

  .mhead-updated.is-stale {
    color: var(--ink);
    font-weight: 600;
  }

  /* 原位置（信息面页签里）那份在手机上藏掉，避免同屏出现两遍 */
  .decision-block--info .decision-block__head .decision-block__updated { display: none; }

  .mhead-row1 {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .mhead-name {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 900;
    color: var(--ink);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mhead-quote {
    margin-left: auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex: none;
  }

  .mhead-quote strong {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }

  .mhead-quote span {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

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

  .mhead-row2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 9px;
  }

  /* 状态词的解释气泡默认从右边缘向左展开——桌面上状态词在页面右侧，
     向左展开正好；手机上状态词在卡片最左边，向左展开会冲出屏幕被截断。
     手机把方向翻过来：从左边缘向右展开。桌面那套定位一字不动。 */
  .stock-dossier__status::after {
    left: 0;
    right: auto;
  }

  .mhead-metrics {
    font-size: 12px;
    color: var(--muted);
  }

  .mhead-metrics b {
    color: var(--ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .mhead-sep {
    font-style: normal;
    opacity: 0.45;
    margin: 0 6px;
  }

  .mhead-side { margin-left: auto; }

  /* 右下角那格：订阅剩余/续费/订阅按钮共用一个胶囊样子 */
  .mhead-days {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid rgba(159, 29, 43, 0.4);
    border-radius: 999px;
    background: none;
    color: var(--blue);
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
  }

  .mhead-days.is-urgent {
    color: var(--red);
    border-color: rgba(215, 53, 53, 0.55);
  }

  /* 板块页签：四颗胶囊等分一行，跟着正文一起滚走，不吸顶（用户定稿）。
     切页回顶时它要停在顶栏下方 8px 处，跟卡片顶距一个节奏。 */
  .dossier-secnav {
    display: flex;
    gap: 6px;
    margin: 2px 0 10px;
    padding: 8px 0;
    scroll-margin-top: 60px;
  }

  .dossier-secnav button {
    flex: 1;
    padding: 6px 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }

  .dossier-secnav button.is-on {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff7f0;
    font-weight: 700;
  }


  /* 页签模式：四个板块一次只显示当前选中的那个。
     规则只写在手机断点里——桌面永远四块全显，这行它根本读不到。 */
  .stock-dossier .decision-block:not(.is-sec-on) { display: none; }

  /* 拆壳（用户在真机比例下的定稿）：外层档案卡保留、顶到页面上方，
     中层板块盒和内层带色盒两层壳去掉，正文直接铺在大卡里，
     分区靠小标题+分隔线。桌面三层原样保留。 */
  .stock-dossier .decision-block,
  .stock-dossier .decision-block .decision-fact-grid > article,
  .stock-dossier .decision-block .concept-box,
  .stock-dossier .decision-block .verdict-card,
  .stock-dossier .decision-block .judgment-box {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  /* 结论页第一句是整份报告的答案，居中放大、字底压一条印章红短线，
     像书卷的标题——比加底色轻，又一眼分得出它和论据的层级 */
  .stock-dossier .verdict-card strong {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 16.5px;
    margin: 2px 0 12px;
  }

  .stock-dossier .verdict-card strong::after {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    margin: 8px auto 0;
    border-radius: 2px;
    background: var(--blue);
  }

  /* 板块标题（01 信息面…）跟亮着的页签完全重复，藏掉；
     只留"报告更新于"那行小字——它是有效信息。
     信息面的序号有一套加强样式（红底圆徽章），优先级压过普通写法，
     必须用同等长度的选择器点名才藏得掉。 */
  .decision-block__head span,
  .decision-block--info .decision-block__head span,
  .decision-block__head h3,
  .decision-block--info .decision-block__head h3 { display: none; }
  .decision-block__head { margin-bottom: 0; }

  /* 看点/风险由左右两栏改上下排，中间一条细分隔线接棒色块的分区职责 */
  .stock-dossier .decision-fact-grid { grid-template-columns: 1fr; gap: 0; }
  .stock-dossier .decision-block .decision-fact-grid > article + article {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(83, 74, 58, 0.14);
  }

  /* 概念/结论/分析：手机看分点列表，整段藏起来（拆不出两句的仍走整段） */
  .report-points {
    display: block;
    margin: 0;
    padding-left: 18px;
    color: var(--ink-soft);
    font-weight: 650;
    line-height: 1.7;
  }

  .report-points li { margin-bottom: 6px; }
  .report-points li:last-child { margin-bottom: 0; }

  :is(.concept-box, .verdict-card, .judgment-box):has(.report-points) .report-prose {
    display: none;
  }

  /* 详情页顶部的关注列表横条整条隐藏（用户拍板）。桌面端看得见左侧栏，
     "顺手切一只"才成立；手机上这条横条一屏只露得出一只票的半个名字，
     切换功能名存实亡，54px 还给正文。手机切股票走：返回自选列表再点。 */
  .dossier-layout .watch-sidebar { display: none; }

  /* 等待 AI 分析的占位：跟桌面一样居中（改成页签后一次只见一条，短句居中
     不再有断词问题）；占位不是内容，上下留白从 26px 收到 14px */
  .insight-pending,
  .decision-block--info .insight-pending {
    padding: 14px 4px;
  }

  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;
    /* 窄屏侧栏是档案上方的横条，不跟桌面一起下移 */
    margin-top: 0;
  }

  .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 200px;
    grid-template-columns: minmax(0, 1fr) 48px 54px;
    column-gap: 4px;
    padding: 6px 10px;
  }

  .watch-sidebar__new {
    flex: 0 0 200px;
    align-self: stretch;
    min-height: 36px;
    margin: 0 10px;
  }

  .watch-sidebar__add {
    margin-inline: 0;
  }

  .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;
}

/* 这里原本有一条 body.is-hero .app-shell 的 flex 补偿，存在的唯一理由是抢回被
   ≤980px 那条 display:block 关掉的纵向弹性布局。那条旧规则已删，补偿也就没用了。 */

.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;
}

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

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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;
}

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

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

@media (hover: hover) {
  .user-pill:hover .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;
}

/* ── 开通会员弹层（设计稿：会员订阅弹窗）── */
.member-modal__sub {
  margin: -8px 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.member-plan {
  padding: 20px;
  border: 1px solid rgba(111, 17, 28, 0.24);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(159, 29, 43, 0.05), transparent 60%);
}

.member-plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.member-plan__price strong {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  color: var(--blue);
}

.member-plan__price span {
  font-size: 13px;
  color: var(--muted);
}

.member-plan__note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

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

.member-perks li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

.member-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* 个人中心会员状态卡（设计稿：会员订阅设计·替代原查查币余额区块）：
   会员见"生效中"卡，试用见"免费试用"卡带背景折线。外层弹窗已是毛玻璃，
   内卡用半透白垫层即可，不再叠一层 blur（嵌套取样费 GPU 且看不出差别）。 */
.member-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 20px;
  /* 不给底色不给边框：外层弹窗本身已经是一张卡，内层再画一个方块就成了"卡里套卡"
     （设计稿里这块是独立展示的，搬进弹窗必须去壳）。上下细线分隔足够。 */
  border-top: 1px solid rgba(83, 74, 58, 0.15);
  border-bottom: 1px solid rgba(83, 74, 58, 0.15);
}

.member-card__text {
  position: relative;
}

.member-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.member-card__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.member-card .profile-recharge {
  position: relative;
  flex-shrink: 0;
}

:root[data-theme="dark"] .member-card {
  border-top-color: rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* 个人中心会员状态行（管理员仍用行式） */
.member-status__line {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.member-status__line.is-ok {
  color: var(--green);
}

.member-status__line.is-trial {
  color: var(--amber);
}

.profile-recharge--solid {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--on-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;
}


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

/* 到期横幅：跟资费标语共用 18px 的左右缩进，和上面那行小字、下面的卡片墙对齐一条竖线。
   底色用会员红的最浅一档，够显眼但不抢卡片——这块的任务是被看见，不是被盯着。 */
.watch-expired-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 18px 0;
  padding: 10px 10px 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(159, 29, 43, 0.18);
  background: rgba(159, 29, 43, 0.06);
}

.watch-expired-bar__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.watch-expired-bar__cta {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

/* 手机上一行摆不下文案加按钮：竖排，按钮拉满宽度当整块的落点 */
@media (max-width: 720px) {
  .watch-expired-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .watch-expired-bar__cta {
    width: 100%;
  }
}

/* 价格和时长这几个数字挑红：整行是灰的，扫一眼先抓到"多少钱、管多久"。
   只换字色不加粗——这行本来就小，再加粗会跟旁边的充值链接抢。 */
.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;
}

@media (hover: hover) {
  .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;
}

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

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

@media (hover: hover) {
  .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__part {
  display: inline-block;
}

.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;
}

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

/* 搜索框下面那个示例入口只服务手机，默认不存在。
   桌面顶栏已有同一个入口，两处都冒出来就是重复。 */
.home-demo--mobile {
  display: none;
}

/* 示例分析引导横幅：细线框提示条，放在分析板块最上方 */
.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;
}

@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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) {
  /* body 一直按 100vh 算，那是"地址栏收起后"的高度；外壳早就改成按当前看得见的
     高度算了。两层对不上，body 比屏幕高出 40px（实测 iPhone：836 对 796），
     首页明明一屏放得下，底下却能滑出一截空白。让 body 跟着走同一套算法。 */
  body { min-height: 100dvh; }

  .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: 20px; } /* 首屏就一句名言，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; }

  /* 顶栏在 375 宽里塞不下四样东西：示例入口只分到 49px，实际要 122px，
     结果是"看看示例分析"被裁掉一半。手机上把它从顶栏撤走，改挂到搜索框下面——
     那里正是拇指和视线的落点，比缩在顶栏角落更容易被点到。 */
  body.is-hero .home-pitch { display: none; }

  .home-demo--mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* 手指的最小落点，比按钮本身的文字高度重要 */
    margin: 14px 0 0;
    font-size: 14px;
  }

  /* 免责声明在手机上折成三行、吃掉八分之一屏。只收排版，文案一个字不动。 */
  .site-footer {
    gap: 4px;
    padding: 14px 20px 16px;
    font-size: 11px;
    line-height: 1.5;
  }

  /* 自选卡片在手机上压成一行三格：股票名 | 趋势图 | 涨跌幅。
     底子是 Claude Design 里"自选卡片样式.dc.html"的 1b 版，用户从三版里选的，
     之后又逐项砍到只剩这三样。砍掉的东西和代价，按砍的顺序记在这里：

     - 移除自选的按钮（那个 ×）：单行放不下。手机上目前没有删自选的入口，
       得回详情页或桌面端操作。这是已知缺口，等入口方案定了再补。
     - 卡片底部那块：未解读的票显示「30日/近5日」涨跌，已解读的显示「主线/风险」
       ——AI 解读结论就长在这里。手机上想看得点进详情页。
     - 会员剩余时间（「约 20 天」「单次·23 小时」）：手机列表上看不到自己还剩多久，
       快到期没有提示，得进详情页或桌面端才知道。
     - 盘面截止时间：原先每张卡都重复一遍，而且同一批行情拉下来时间本来就一样。
     - 现价：卡片上只剩涨跌幅，看绝对价格得点进去。

     留下的三样是扫一眼就能判断的：哪只票、走势形状、今天涨跌多少。 */
  /* 三列：名称 | 趋势图 | 涨跌幅。
     左右两列必须等分，中间那格才真的落在卡片正中——右列若按内容宽（auto），
     左列会吃掉全部剩余空间，两边不等宽，趋势图看着就偏右（实测偏了 20px）。
     中间列给到 1.4 份而不是写死像素：折线是用来一眼看形状的，写死 104px 时
     在 430 宽的屏幕上只占卡片 27%，两边空一大片，形状挤得看不清。 */
  /* 中间那格从 1.4fr 收到 1.15fr：左列除了股票名还要放涨跌停角标，1.4fr 时左右两列各
     102px，「国芳集团」加「涨停」要 96px、五个字的名字就得省略号。让出 15px 给两边，
     常见的四五字名字都放得下，折线形状照样看得清。 */
  .stock-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.15fr minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    padding: 10px 14px;
  }

  .stock-card__top { display: contents; }

  /* .stock-card__identity 本身是 display:contents（透明层，不占格子），
     grid-column 设在它身上没用——真正落进 .stock-card 网格的是它的孩子
     .stock-card__identity-line，行列都在这层钉死，不靠自动摆放猜。 */
  .stock-card__identity-line {
    grid-column: 1;
    grid-row: 1;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
  }

  .stock-card__name { font-size: 15px; }

  /* 剩余时长暂不显示（用户定稿：订阅逻辑后面要改，改完再定这里怎么展示）。
     位置试过三轮：名称下方居中、2a 小胶囊都做过又撤了，
     历史方案见设计稿"自选卡片样式.dc.html"的 2a-2d。 */
  .unlock-badge { display: none; }

  .stock-card__side { display: none; }

  /* 这层自己不占格子，好让趋势图直接落进卡片网格的中间列 */
  .stock-trend {
    display: contents;
  }

  .stock-trend__chart {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 30px;
  }

  .stock-trend > span { display: none; }

  /* 手机端这一屏的两行小字对调了位置：资费标语升到搜索框上面（用 order 调，DOM 不动，
     桌面端顺序不受影响），分时说明落到卡片墙正上方——谁说明谁，就挨着谁。 */
  .watch-fee-note {
    order: -1;
    margin: 0;
    text-align: center;
  }

  .trend-legend {
    display: block;
    margin: 0 4px 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1.4;
    text-align: center;
  }

  .stock-card__hero {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 0;
  }

  /* ── 手机删自选入口 A：列表顶部"编辑"开关 ──
     打开后卡片多出第 4 列放 ×，点"完成"收回。桌面 × 常驻所以没有这个开关。 */
  /* ── 手机删自选入口 B：左划删除（设计稿"左划删除设计" 2a）──
     行 = 轨道（红底 + 删除键，藏在卡后）+ 卡片。卡片向左划，露出轨道右端；
     轨道颜色跟着露出程度从淡红到正红（--reveal 由脚本写入），到位变深红。 */
  .swipe-row {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: opacity 180ms ease;
  }

  .swipe-row.is-collapsing {
    transition: height 200ms cubic-bezier(0.2, 0.7, 0.3, 1), opacity 180ms ease;
    opacity: 0;
  }

  .swipe-track {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    border-radius: var(--radius-md);
    background: rgba(159, 29, 43, calc(0.12 + var(--reveal, 0) * 0.88));
    transition: background 120ms ease;
  }

  .swipe-row.is-armed .swipe-track {
    background: #7a101c;
  }

  .swipe-del {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 84px;
    border: 0;
    background: transparent;
    color: var(--on-blue);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: width 120ms ease;
  }

  .swipe-del svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    transform: scale(calc(0.7 + var(--reveal, 0) * 0.3));
    transition: transform 120ms ease;
  }

  .swipe-row.is-armed .swipe-del svg {
    transform: scale(1.15);
  }

  .swipe-row .stock-card {
    position: relative;
    animation: none;
    transition: transform 240ms cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 150ms ease, opacity 150ms ease,
      background-color 160ms ease, border-color 160ms ease;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
  }

  .swipe-row.is-dragging .stock-card {
    transition: box-shadow 150ms ease, opacity 150ms ease;
    box-shadow: 0 14px 30px rgba(38, 22, 20, 0.18);
  }

  /* 有一张在拖，其他卡淡下去，注意力落在手上的那张 */
  .stock-group__grid:has(.swipe-row.is-dragging) .swipe-row:not(.is-dragging) .stock-card {
    opacity: 0.7;
  }

  .swipe-row.is-flying .stock-card {
    transition: transform 230ms cubic-bezier(0.4, 0, 1, 1);
    transform: translateX(-115%) !important;
  }

  /* 手机版撤销条：贴两边通栏，抬高让出底部手势条/安全区 */
  .swipe-undo {
    left: 14px;
    right: 14px;
    bottom: calc(var(--undo-lift, 76px) + env(safe-area-inset-bottom, 0px));
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 14px;
    transform: none;
    animation-name: swipe-sheet-up-full;
  }

  @keyframes swipe-sheet-up-full {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }

  .swipe-confirm__sheet {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.94);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    animation: swipe-sheet-up 320ms cubic-bezier(0.2, 0.8, 0.3, 1.1) both;
  }

  :root[data-theme="dark"] .swipe-confirm__sheet {
    background: rgba(32, 26, 22, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .swipe-confirm__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
  }

  .swipe-confirm__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
  }

  .swipe-confirm__ok {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: var(--on-blue);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(159, 29, 43, 0.28);
  }

  .swipe-confirm__cancel {
    width: 100%;
    padding: 6px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
  }

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

  @keyframes swipe-sheet-up {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }

  @keyframes swipe-shrink {
    from { width: 100%; }
    to { width: 0%; }
  }

  .stock-card__move { gap: 4px; }

  /* 角标在手机上做小一号：一行三格，桌面那个尺寸放进去太占地方，
     名字动不动就被挤成省略号。位置两端一致，都跟在股票名后面。 */
  .limit-badge {
    /* 名字行在手机上有 6px 的统一间距，桌面那 10px 的外边距要撤掉，不然离名字太远 */
    margin-left: 0;
    min-height: 18px;
    padding: 0 5px;
    font-size: 10px;
  }

  .stock-card__pct { font-size: 17px; }

  .stock-card__price { display: none; }

  .metric-row,
  .stock-card__pending {
    display: none;
  }
}

/* ============ 新闻页 ============ */
/* 竖向时间轴：左边一条线，时间刻在线外，卡片挂在线上。
   单列但卡片放宽——横向靠卡片宽度用掉，不靠分栏，时间顺序才读得连贯。 */
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;
}
@media (hover: hover) {
  .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;
}

@media (hover: hover) {
  .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; }
}

/* 会员弹层的法务小字：虚拟商品不退款，掏钱前明示 */
.member-modal__legal {
  margin: 2px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* 报告日期独立放在股票卡片外上方，手机/电脑共用；不覆盖盘面时间。 */
.report-with-date { min-width: 0; }
.report-with-date > .stock-dossier { margin-top: 0; }
.report-date-context {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 4px 7px; margin: 0 0 10px; min-height: 22px; color: var(--ink-soft);
}
.report-date-context strong { font-size: 12px; line-height: 1.6; font-weight: 500; white-space: nowrap; color: var(--ink); }
.report-date-context__reason { font-size: 12px; color: var(--ink-soft); }
.report-date-context__badge {
  padding: 2px 5px; border-radius: 4px; white-space: nowrap;
  background: color-mix(in srgb, var(--blue) 9%, var(--surface)); color: var(--blue);
  font-size: 10px; line-height: 1.6; font-weight: 600;
}
@media (max-width: 640px) {
  .report-date-context { column-gap: 4px; }
  .report-date-context strong, .report-date-context__reason { font-size: 11px; }
}
