/* ==========================================================================
   缠量选股 · 视觉系统
   参考同花顺的密度与红绿语言，做更轻、更简洁的桌面行情终端。
   ========================================================================== */

:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #fafbfc;
  --line: #e7ebf0;
  --line-strong: #dce2ea;
  --text: #1b2738;
  --text-2: #455267;
  --muted: #7b8798;
  --soft: #9ba6b5;
  --red: #e05252;
  --red-dark: #c63f3f;
  --red-soft: #fdf0f0;
  --green: #109b73;
  --green-dark: #0b7b5b;
  --green-soft: #edf8f3;
  --gold: #d69a2d;
  --gold-soft: #fdf6e8;
  --blue: #3d75e8;
  --blue-soft: #eef3fe;
  --navy: #18263a;
  --navy-2: #26374f;
  --purple: #9562dd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 35, 54, 0.03), 0 8px 28px rgba(22, 35, 54, 0.035);
  --shadow-lg: 0 18px 60px rgba(18, 29, 45, 0.18);
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1200px 520px at 56% -160px, rgba(210, 221, 237, 0.42), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

body.drawer-open { overflow: hidden; }
body.modal-open { overflow: hidden; }

button, input, select { font-family: inherit; font-size: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
canvas { display: block; }

::selection { background: rgba(61, 117, 232, 0.16); }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: #cbd3df transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #cbd3df; border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

.up { color: var(--red) !important; }
.down { color: var(--green) !important; }
.flat { color: var(--muted) !important; }
.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ==========================================================================
   顶栏
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  height: 62px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: var(--navy);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(24, 38, 58, 0.2);
}

.brand-mark svg { width: 31px; height: 31px; }
.brand-mark rect:nth-of-type(1) { fill: #e05252; }
.brand-mark rect:nth-of-type(2) { fill: #f0b64d; }
.brand-mark rect:nth-of-type(3) { fill: #38b48e; }
.brand-mark path { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.4; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; letter-spacing: 0.06em; color: var(--navy); }
.brand-text small { font-size: 8px; color: var(--soft); letter-spacing: 0.16em; margin-top: 4px; }

.main-nav { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; }

.nav-item {
  position: relative;
  height: 34px;
  padding: 0 15px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}

.nav-item:hover { color: var(--text); background: #f5f7fa; }
.nav-item.active { color: var(--navy); background: #eef2f7; font-weight: 600; }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 18px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--red);
  border-radius: 2px;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 99px;
  background: #e8ecf2;
  color: var(--muted);
  font-size: 10px;
  font-family: var(--font-num);
  vertical-align: 1px;
}
.nav-item.active .nav-count { background: var(--navy); color: #fff; }

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

.search-box {
  position: relative;
  width: 238px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fb;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.search-box:focus-within {
  border-color: #b9c8e4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(61, 117, 232, 0.08);
}
.search-box .icon { color: var(--soft); width: 15px; height: 15px; }
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
}
.search-box input::placeholder { color: var(--soft); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box kbd {
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 17px;
}
.search-box:focus-within kbd { display: none; }

.market-state {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 11.5px;
  white-space: nowrap;
}
.state-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--soft); }
.market-state.open .state-dot { background: var(--red); box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12); }
.market-state.closed .state-dot { background: var(--soft); }
.market-state.auction .state-dot { background: var(--gold); }
.state-date { color: var(--soft); font-family: var(--font-num); font-size: 10.5px; }

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  transition: all 0.16s;
}
.icon-btn:hover { color: var(--navy); border-color: var(--line-strong); background: #f8f9fb; }
.icon-btn .icon { width: 15px; height: 15px; }
.icon-btn.spinning .icon { animation: spin 0.8s linear infinite; }

.data-strip { border-top: 1px solid #f0f2f5; background: #fbfcfd; }
.data-strip-inner {
  max-width: 1480px;
  margin: 0 auto;
  height: 29px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
}
.source-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.source-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.strip-sep { width: 1px; height: 9px; background: var(--line-strong); }
.strip-spacer { flex: 1; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--blue);
  font-size: 11.5px;
  white-space: nowrap;
}
.text-link .icon { width: 12px; height: 12px; }
.text-link:hover { color: #245bc7; }
.data-strip .text-link { font-size: 10.5px; }

/* ==========================================================================
   页面基础
   ========================================================================== */

.main-content { max-width: 1480px; margin: 0 auto; padding: 16px 22px 28px; }

.page { display: none; animation: page-in 0.25s ease; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 50px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.panel-title h3 { font-size: 14px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.panel-note { font-size: 10.5px; color: var(--soft); white-space: nowrap; }
.panel-icon { width: 18px; height: 18px; color: #b8c1cf; }
.panel-foot-note {
  padding: 8px 17px 10px;
  border-top: 1px solid #f2f4f7;
  color: var(--soft);
  font-size: 9.5px;
}

.eyebrow {
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 0.19em;
  color: var(--soft);
  margin-bottom: 5px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 2px 17px;
}
.page-head h1 { font-size: 24px; line-height: 1.2; letter-spacing: 0.02em; color: var(--navy); font-weight: 700; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 12px; max-width: 720px; }
.page-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.16s;
}
.btn .icon { width: 15px; height: 15px; }
.btn.primary { color: #fff; background: var(--navy); border: 1px solid var(--navy); }
.btn.primary:hover { background: #243852; }
.btn.primary:active { transform: translateY(1px); }
.btn.ghost { color: var(--text-2); background: #fff; border: 1px solid var(--line-strong); }
.btn.ghost:hover { border-color: #c4cedb; background: #f9fafb; }
.btn.small { height: 30px; padding: 0 12px; font-size: 11.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 9px;
  border-radius: 99px;
  background: #f2f5f9;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.status-pill.up { background: var(--red-soft); color: var(--red); }
.status-pill.down { background: var(--green-soft); color: var(--green); }

.error-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
  padding: 18px 20px;
  background: #fff;
  border: 1px dashed #e3c9c9;
  border-radius: var(--radius);
  color: var(--muted);
}
.error-banner strong { display: block; color: var(--text-2); font-size: 13px; }
.error-banner span { display: block; margin-top: 3px; color: var(--soft); font-size: 10.5px; }

/* ==========================================================================
   首页 · 指数条
   ========================================================================== */

.index-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.index-card {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 11px 14px 9px;
  min-height: 112px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.index-card:hover { border-color: #cfd8e5; box-shadow: 0 8px 26px rgba(22, 35, 54, 0.07); transform: translateY(-1px); }
.index-card.active { border-color: #b8c7dc; }
.index-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--navy);
}
.index-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -55px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 231, 240, 0.6), transparent 68%);
  pointer-events: none;
}

.index-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.index-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.index-name strong { font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.index-name span { font-family: var(--font-num); font-size: 9.5px; color: var(--soft); }
.index-tag {
  font-size: 9px;
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  line-height: 15px;
  padding: 0 4px;
}
.index-card-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 6px; }
.index-quote { min-width: 0; }
.index-value {
  font-family: var(--font-num);
  font-size: 26px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.index-change {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
}
.index-spark { width: 98px; height: 42px; opacity: 0.95; flex: none; }
.index-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #f2f4f7;
  margin-top: 6px;
  padding-top: 5px;
  color: var(--soft);
  font-size: 9.5px;
  white-space: nowrap;
}
.index-card-foot b { color: var(--muted); font-weight: 500; font-family: var(--font-num); }

/* ==========================================================================
   首页 · 布局
   ========================================================================== */

.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 14px; align-items: start; }
.home-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(230px, 0.9fr); gap: 14px; }

/* 走势图 */
.chart-panel { overflow: hidden; }
.chart-head { padding: 13px 17px 9px; align-items: flex-start; }
.chart-heading { min-width: 0; }
.title-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.title-line h2 { font-size: 19px; line-height: 1.2; font-weight: 700; color: var(--navy); letter-spacing: 0.01em; }
.code-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  background: #f3f5f8;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 0.03em;
}
.chan-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  color: #95641c;
  background: var(--gold-soft);
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}
.chart-subline { color: var(--muted); font-size: 11px; margin-top: 3px; font-family: var(--font-num); }
.chart-mode { flex: none; }
.segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fa;
}
.segmented button {
  height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  transition: all 0.15s;
}
.segmented button.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 3px rgba(24, 38, 58, 0.1); }

.chart-stats {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 0 17px 7px;
  font-family: var(--font-num);
  font-size: 10.5px;
  white-space: nowrap;
  overflow-x: auto;
}
.chart-stats span { display: inline-flex; gap: 5px; align-items: baseline; }
.chart-stats i { font-style: normal; color: var(--soft); font-family: var(--font); font-size: 10px; }
.chart-stats b { font-weight: 500; color: var(--text-2); }

.chart-frame { position: relative; height: 376px; margin: 0 4px; }
.chart-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 11px;
  z-index: 2;
  backdrop-filter: blur(1px);
}
.spinner {
  width: 13px;
  height: 13px;
  border: 1.6px solid #dbe1ea;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.chart-tooltip {
  position: absolute;
  z-index: 6;
  width: 212px;
  padding: 9px 10px;
  border: 1px solid #dfe5ed;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 26px rgba(22, 35, 54, 0.14);
  pointer-events: none;
  font-size: 10.5px;
  color: var(--text-2);
  backdrop-filter: blur(4px);
}
.ct-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid #f0f3f6; font-family: var(--font-num); }
.ct-head span:first-child { color: var(--text); font-weight: 600; }
.ct-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 7px; align-items: baseline; }
.ct-grid span { color: var(--soft); font-size: 9.5px; }
.ct-grid b { font-family: var(--font-num); font-weight: 500; color: var(--text-2); text-align: right; }
.ct-foot { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid #f0f3f6; margin-top: 6px; padding-top: 5px; color: var(--soft); font-family: var(--font-num); font-size: 9px; }

.chart-foot {
  height: 35px;
  padding: 0 15px;
  border-top: 1px solid #f2f4f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chart-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 9.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg-line { width: 12px; height: 2px; border-radius: 2px; display: inline-block; }
.lg-line.ma5 { background: #d69a2d; }
.lg-line.ma10 { background: #3d75e8; }
.lg-line.ma20 { background: #9562dd; }
.lg-line.pen { background: #31518f; }
.lg-zone { width: 11px; height: 7px; background: rgba(224, 158, 50, 0.18); border: 1px dashed rgba(203, 144, 31, 0.6); display: inline-block; }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; color: #fff; font-size: 7px; font-style: normal; display: inline-grid; place-items: center; font-weight: 700; }
.lg-dot.buy { background: var(--red); }
.lg-dot.sell { background: var(--green); }
.chart-disclaimer { color: #b1bac7; font-size: 9px; white-space: nowrap; }

/* 市场温度 */
.breadth-panel { overflow: hidden; }
.breadth-top { display: grid; grid-template-columns: minmax(220px, 1.15fr) minmax(180px, 0.85fr); gap: 16px; padding: 1px 17px 12px; }
.breadth-main { min-width: 0; }
.breadth-counts { display: flex; align-items: flex-end; gap: 13px; }
.count-block { display: flex; flex-direction: column; gap: 0; }
.count-block span { color: var(--soft); font-size: 9.5px; }
.count-block strong { font-family: var(--font-num); font-size: 27px; line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; }
.count-block.up strong { color: var(--red); }
.count-block.down strong { color: var(--green); }
.count-block.flat strong { color: var(--muted); font-size: 21px; }
.count-divider { width: 1px; height: 30px; background: var(--line); margin-bottom: 3px; }
.breadth-bar { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: #f1f3f6; margin-top: 10px; }
.breadth-bar span { height: 100%; transition: width 0.5s ease; }
.bar-up { background: var(--red); }
.bar-down { background: var(--green); }
.bar-flat { background: #c9d1dc; min-width: 2px; }
.breadth-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--soft); font-size: 9.5px; }
.breadth-meta b { font-family: var(--font-num); color: var(--text-2); font-weight: 500; }

.bucket-chart { height: 93px; display: flex; align-items: flex-end; justify-content: space-between; gap: 3px; padding-top: 5px; }
.bucket { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.bucket-bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.bucket-bar { width: 68%; max-width: 17px; min-height: 2px; border-radius: 2px 2px 1px 1px; transition: height 0.45s ease; }
.bucket-bar.up { background: #ed8b8b; }
.bucket-bar.down { background: #63bfa2; }
.bucket-bar.flat { background: #c9d1dc; }
.bucket-label { font-family: var(--font-num); font-size: 8px; color: var(--soft); white-space: nowrap; transform: scale(0.92); }
.bucket-count { font-family: var(--font-num); font-size: 8px; color: transparent; }
.bucket:hover .bucket-count { color: var(--muted); }

.breadth-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #f2f4f7; }
.breadth-stats > div { padding: 9px 12px 10px; border-right: 1px solid #f4f6f8; }
.breadth-stats > div:last-child { border-right: 0; }
.breadth-stats span { display: block; color: var(--soft); font-size: 9px; }
.breadth-stats b { display: block; margin-top: 1px; font-family: var(--font-num); font-size: 15px; font-weight: 600; }

/* 盘面脉冲 */
.pulse-panel { overflow: hidden; }
.pulse-list { padding: 0 17px 6px; }
.pulse-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  border-top: 1px solid #f4f6f8;
  font-size: 11px;
}
.pulse-item:first-child { border-top: 0; }
.pulse-item span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-item b { font-family: var(--font-num); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pulse-note { display: flex; align-items: center; gap: 5px; margin: 0 13px 13px; padding: 7px 9px; border-radius: 6px; background: #f7f9fb; color: var(--soft); font-size: 9.5px; }
.pulse-note .icon { width: 12px; height: 12px; flex: none; }

/* 板块预览 */
.boards-panel { overflow: hidden; }
.head-tools { display: flex; align-items: center; gap: 14px; }
.tab-mini { display: flex; gap: 2px; background: #f4f6f9; border-radius: 6px; padding: 2px; }
.tab-mini button { height: 23px; padding: 0 9px; border-radius: 4px; color: var(--muted); font-size: 10.5px; }
.tab-mini button.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 2px rgba(24, 38, 58, 0.08); }
.board-preview-list { padding: 0 9px 9px; }
.board-preview-row {
  display: grid;
  grid-template-columns: 28px minmax(125px, 1.15fr) 74px minmax(145px, 1.35fr) minmax(150px, 1.5fr) 66px;
  align-items: center;
  gap: 9px;
  min-height: 61px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.14s;
}
.board-preview-row + .board-preview-row { border-top: 1px solid #f4f6f8; border-radius: 0; }
.board-preview-row:hover { background: #fafbfc; }
.board-rank { font-family: var(--font-num); font-size: 11px; color: var(--soft); text-align: center; }
.board-rank.top { color: var(--red); font-weight: 700; }
.board-name { min-width: 0; }
.board-name strong { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-name span { display: block; color: var(--soft); font-size: 9px; margin-top: 2px; font-family: var(--font-num); }
.board-change { font-family: var(--font-num); font-size: 14px; font-weight: 600; text-align: right; }
.leader-cell { min-width: 0; }
.leader-cell strong { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-cell strong em { font-style: normal; font-family: var(--font-num); font-size: 9px; font-weight: 500; }
.leader-cell span { display: block; margin-top: 2px; color: var(--soft); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-signals { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.mini-tag {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 5px;
  border-radius: 4px;
  background: #f4f6f9;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.mini-tag.buy { color: #b63c3c; background: var(--red-soft); }
.mini-tag.macd { color: #2f63c9; background: var(--blue-soft); }
.mini-tag.chan { color: #8e6019; background: var(--gold-soft); }
.mini-tag.risk { color: #0c7d5d; background: var(--green-soft); }

.mini-score { text-align: right; }
.mini-score strong { font-family: var(--font-num); font-size: 18px; line-height: 1; font-weight: 600; }
.mini-score span { display: block; font-size: 8.5px; color: var(--soft); margin-top: 2px; }
.score-strong { color: #c44848; }
.score-good { color: #b47b20; }
.score-mid { color: #66748a; }
.score-weak { color: #8b95a4; }

/* 热度榜 */
.hot-panel { overflow: hidden; }
.hot-tag {
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.hot-list { padding: 0 9px 4px; }
.hot-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 7px;
  padding: 7px 6px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s;
}
.hot-row:hover { background: #f9fafc; }
.hot-row + .hot-row { border-top: 1px solid #f5f6f8; border-radius: 0; }
.hot-rank {
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--soft);
  text-align: center;
  font-weight: 500;
}
.hot-rank.top { color: #fff; background: var(--red); border-radius: 4px; height: 18px; line-height: 18px; width: 19px; font-size: 10px; margin: 0 auto; }
.hot-rank.top.two { background: #e58f48; }
.hot-rank.top.three { background: #d5a13e; }
.hot-stock { min-width: 0; }
.hot-stock-top { display: flex; align-items: center; gap: 4px; }
.hot-stock strong { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92px; }
.hot-code { font-family: var(--font-num); font-size: 8.5px; color: var(--soft); }
.hot-delta { font-family: var(--font-num); font-size: 8px; color: var(--soft); margin-left: auto; }
.heat-track { height: 3px; background: #f1f3f7; border-radius: 99px; margin-top: 5px; overflow: hidden; }
.heat-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f0b3b3, #e05252); }
.hot-price { text-align: right; }
.hot-price strong { display: block; font-family: var(--font-num); font-size: 11.5px; font-weight: 600; line-height: 1.15; }
.hot-price span { display: block; font-family: var(--font-num); font-size: 9.5px; margin-top: 1px; }
.star-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #c3cbd6;
  transition: all 0.14s;
}
.star-btn .icon { width: 14px; height: 14px; }
.star-btn:hover { color: var(--gold); background: var(--gold-soft); }
.star-btn.active { color: var(--gold); }
.star-btn.active .icon { fill: var(--gold); }

/* 迷你自选 */
.watch-mini-panel { overflow: hidden; }
.watch-mini { padding: 0 9px 8px; }
.watch-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 58px;
  align-items: center;
  gap: 8px;
  padding: 8px 7px;
  border-radius: 7px;
  cursor: pointer;
}
.watch-mini-row:hover { background: #f9fafc; }
.watch-mini-row + .watch-mini-row { border-top: 1px solid #f5f6f8; border-radius: 0; }
.watch-mini-row strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-mini-row small { display: block; font-family: var(--font-num); color: var(--soft); font-size: 8.5px; margin-top: 1px; }
.watch-mini-row .wm-price { text-align: right; font-family: var(--font-num); font-size: 11px; font-weight: 500; }
.watch-mini-row .wm-change { text-align: right; font-family: var(--font-num); font-size: 10px; }
.empty-mini { padding: 17px 12px 21px; text-align: center; color: var(--muted); }
.empty-icon { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: #f5f7fa; color: #b9c3d1; margin-bottom: 7px; }
.empty-icon .icon { width: 16px; height: 16px; }
.empty-mini p { font-size: 11.5px; color: var(--text-2); }
.empty-mini small { display: block; margin-top: 3px; font-size: 9.5px; color: var(--soft); }

/* 快速策略 */
.strategy-panel { overflow: hidden; }
.strategy-list { padding: 0 9px 9px; }
.strategy-item {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr 14px;
  align-items: center;
  gap: 9px;
  padding: 8px 7px;
  text-align: left;
  border-radius: 7px;
  transition: background 0.14s;
}
.strategy-item + .strategy-item { border-top: 1px solid #f5f6f8; border-radius: 0; }
.strategy-item:hover { background: #f9fafc; }
.strategy-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: #f2f5f9; color: #6e7e94; }
.strategy-icon .icon { width: 14px; height: 14px; }
.strategy-item strong { display: block; font-size: 11.5px; font-weight: 600; }
.strategy-item small { display: block; color: var(--soft); font-size: 9.5px; margin-top: 1px; }
.strategy-item .chevron { width: 13px; height: 13px; color: #c2cad6; }

/* ==========================================================================
   条件选股
   ========================================================================== */

.screener-layout { display: grid; grid-template-columns: 352px minmax(0, 1fr); gap: 14px; align-items: start; }
.filter-panel {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.filter-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.filter-head { flex: none; display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 17px 13px; border-bottom: 1px solid #f2f4f7; }
.filter-head h3 { font-size: 15px; font-weight: 650; }
.filter-head p { color: var(--soft); font-size: 9.5px; margin-top: 3px; }
.filter-section { padding: 14px 17px 15px; border-bottom: 1px solid #f2f4f7; }
.filter-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.filter-section-title span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.filter-section-title i { font-style: normal; font-family: var(--font-num); font-size: 8.5px; color: #a4aebb; font-weight: 500; }
.filter-section-title small { font-size: 9px; color: var(--soft); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span:first-child { color: var(--muted); font-size: 10px; }
.field.full { margin-top: 10px; }
.input-unit { display: flex; align-items: center; height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfc; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.input-unit:focus-within { border-color: #b9c8e4; background: #fff; box-shadow: 0 0 0 2px rgba(61, 117, 232, 0.07); }
.input-unit input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--font-num); font-size: 12px; color: var(--text); }
.input-unit em { font-style: normal; color: var(--soft); font-size: 9px; flex: none; }
.select-wrap { display: block; }
.select-wrap select, .sort-control select, .mini-select select {
  width: 100%;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
  background: #fafbfc;
  color: var(--text-2);
  outline: none;
  font-size: 11px;
  cursor: pointer;
}
.chip-label { color: var(--muted); font-size: 10px; margin: 11px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  transition: all 0.14s;
}
.chip:hover { border-color: #c9d3e1; color: var(--text-2); }
.chip.active { color: var(--navy); border-color: #9eb0c8; background: #eef2f7; font-weight: 600; }
.chips.small .chip { height: 23px; font-size: 10px; padding: 0 7px; border-radius: 5px; }
.hint-line { display: flex; gap: 4px; margin-top: 9px; padding: 6px 7px; border-radius: 5px; background: #f8f9fb; color: var(--soft); font-size: 9px; line-height: 1.55; }
.hint-line .icon { width: 11px; height: 11px; margin-top: 1px; flex: none; }
.check-row { display: flex; align-items: center; gap: 7px; margin-top: 11px; color: var(--muted); font-size: 10.5px; cursor: pointer; }
.check-row input { width: 13px; height: 13px; accent-color: var(--navy); margin: 0; }
.range-field { display: flex; flex-direction: column; gap: 8px; }
.range-field > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.range-field b { color: var(--navy); font-family: var(--font-num); font-size: 13px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 99px; background: linear-gradient(90deg, #18263a, #9db0c9); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--navy); box-shadow: 0 1px 4px rgba(24, 38, 58, 0.25); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 3px solid var(--navy); cursor: pointer; }
.scan-note { margin-top: 9px; color: var(--soft); font-size: 9px; line-height: 1.5; }
.filter-actions { flex: none; display: flex; gap: 8px; padding: 14px 17px 16px; background: #fff; border-top: 1px solid #f2f4f7; }
.filter-actions .primary { flex: 1; }
.filter-actions .ghost { flex: none; }

.save-scheme-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.save-scheme-row input { flex: 1; max-width: 380px; height: 31px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; outline: 0; font-size: 11.5px; }
.save-scheme-row input:focus { border-color: #b9c8e4; }
.saved-schemes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.saved-schemes:empty { display: none; }
.saved-scheme {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 4px 0 8px;
  border-radius: 5px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
}
.saved-scheme button { display: inline-grid; place-items: center; border-radius: 3px; color: #b0bac7; }
.saved-scheme .scheme-name { width: auto; height: 17px; padding: 0 2px; color: var(--text-2); font-size: 10px; white-space: nowrap; }
.saved-scheme .scheme-name:hover { color: var(--blue); }
.saved-scheme button[data-delete-scheme] { width: 17px; height: 17px; flex: none; }
.saved-scheme button[data-delete-scheme]:hover { color: var(--red); background: var(--red-soft); }
.saved-scheme .icon { width: 10px; height: 10px; }

.results-column { min-width: 0; }
.results-toolbar { min-height: 58px; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.results-title { display: flex; align-items: baseline; gap: 9px; }
.results-title h3 { font-size: 14px; }
.result-count { color: var(--soft); font-size: 10.5px; }
.results-actions { display: flex; align-items: center; gap: 13px; color: var(--soft); font-size: 9.5px; }
.sort-control { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted); }
.sort-control select { width: auto; height: 28px; font-size: 10.5px; }
.result-column-head {
  display: grid;
  grid-template-columns: minmax(145px, 1.35fr) 100px 112px minmax(190px, 1.8fr) 68px 66px;
  gap: 8px;
  padding: 7px 15px;
  color: var(--soft);
  font-size: 9px;
}
.result-column-head span:nth-child(n+2) { text-align: right; }
.result-column-head span:nth-child(4) { text-align: left; }
.result-list { display: flex; flex-direction: column; gap: 6px; min-height: 320px; }
.result-row {
  display: grid;
  grid-template-columns: minmax(145px, 1.35fr) 100px 112px minmax(190px, 1.8fr) 68px 66px;
  align-items: center;
  gap: 8px;
  min-height: 67px;
  padding: 9px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(22, 35, 54, 0.02);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.result-row:hover { border-color: #cbd6e4; box-shadow: 0 7px 22px rgba(22, 35, 54, 0.06); transform: translateY(-1px); }
.result-stock { min-width: 0; display: flex; align-items: center; gap: 8px; }
.stock-avatar { width: 31px; height: 31px; border-radius: 7px; display: grid; place-items: center; background: #f2f5f9; color: #635f54; font-size: 10px; font-weight: 700; flex: none; letter-spacing: -0.03em; }
.stock-avatar.up { background: var(--red-soft); color: var(--red); }
.stock-avatar.down { background: var(--green-soft); color: var(--green); }
.result-stock-text { min-width: 0; }
.result-stock-text strong { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-stock-text span { display: block; color: var(--soft); font-family: var(--font-num); font-size: 9px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-price { text-align: right; }
.result-price strong { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.result-price span { display: block; font-family: var(--font-num); font-size: 10px; margin-top: 1px; }
.result-metrics { text-align: right; color: var(--muted); font-family: var(--font-num); font-size: 9.5px; line-height: 1.7; white-space: nowrap; }
.result-metrics b { color: var(--text-2); font-weight: 500; }
.result-tags { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.result-score { text-align: right; }
.result-score strong { display: block; font-family: var(--font-num); font-size: 20px; line-height: 1; font-weight: 600; }
.result-score span { display: block; color: var(--soft); font-size: 8.5px; margin-top: 2px; }
.result-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-action { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 5px; color: #b3bdcb; }
.row-action:hover { color: var(--navy); background: #f2f5f9; }
.row-action.star.active { color: var(--gold); }
.row-action.star.active .icon { fill: var(--gold); }
.row-action .icon { width: 14px; height: 14px; }

.result-empty, .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 22px; color: var(--muted); }
.empty-state.large { min-height: 360px; background: #fff; border: 1px dashed #dbe2ec; border-radius: 10px; }
.empty-state.compact { min-height: 128px; padding: 24px 18px; }
.empty-art { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: #f3f6fa; color: #aab6c7; margin-bottom: 12px; }
.empty-art .icon { width: 23px; height: 23px; }
.empty-state h4 { font-size: 14px; color: var(--text-2); font-weight: 600; }
.empty-state p { max-width: 460px; margin-top: 6px; color: var(--soft); font-size: 10.5px; line-height: 1.7; }
.empty-state .btn { margin-top: 16px; }
.quick-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 15px; color: var(--soft); font-size: 9.5px; }
.quick-add button { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 10px; }
.quick-add button:hover { border-color: #c9d3e1; color: var(--navy); }

.screening-progress { margin: 7px 0; }
.screening-skeleton { height: 67px; border-radius: 9px; border: 1px solid #edf0f4; background: linear-gradient(90deg, #f7f8fa 25%, #f0f2f6 37%, #f7f8fa 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.screening-note { display: flex; align-items: center; gap: 7px; padding: 12px 4px; color: var(--muted); font-size: 10.5px; }
.screening-note .spinner { width: 12px; height: 12px; }

/* ==========================================================================
   板块龙头
   ========================================================================== */

.tab-switch { display: inline-flex; padding: 3px; background: #e9edf3; border-radius: 8px; }
.tab-switch button { height: 29px; padding: 0 13px; border-radius: 6px; color: var(--muted); font-size: 11.5px; }
.tab-switch button.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 3px rgba(24, 38, 58, 0.11); }

.boards-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; align-items: start; }
.board-list-panel { overflow: hidden; }
.board-list { max-height: calc(100vh - 220px); overflow-y: auto; padding: 0 8px 8px; }
.board-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 57px;
  padding: 7px 7px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s;
}
.board-row + .board-row { border-top: 1px solid #f4f6f8; border-radius: 0; }
.board-row:hover { background: #f9fafc; }
.board-row.active { background: #eef2f7; }
.board-row.active .board-row-name strong { color: var(--navy); }
.board-row-name { min-width: 0; }
.board-row-name strong { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row-name span { display: block; margin-top: 2px; color: var(--soft); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row-right { text-align: right; }
.board-row-right strong { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.board-row-right span { display: block; color: var(--soft); font-size: 8.5px; margin-top: 1px; }
.mini-select select { height: 27px; border: 0; background: #f5f7fa; font-size: 10px; padding: 0 5px; }

.board-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.board-hero { min-height: 122px; overflow: hidden; position: relative; }
.board-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 236, 245, 0.9), transparent 66%);
  pointer-events: none;
}
.board-hero-inner { position: relative; z-index: 1; padding: 17px 19px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.board-hero-left { min-width: 0; }
.board-hero-name { display: flex; align-items: center; gap: 8px; }
.board-hero-name h2 { font-size: 20px; font-weight: 700; color: var(--navy); }
.board-hero-name span { color: var(--soft); font-family: var(--font-num); font-size: 10px; }
.board-hero-stats { display: flex; gap: 22px; margin-top: 13px; flex-wrap: wrap; }
.board-hero-stats div { min-width: 54px; }
.board-hero-stats span { display: block; color: var(--soft); font-size: 9px; }
.board-hero-stats b { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 600; margin-top: 1px; }
.board-hero-right { text-align: right; flex: none; }
.board-hero-change { font-family: var(--font-num); font-size: 31px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.board-hero-sub { color: var(--soft); font-size: 9.5px; margin-top: 4px; }
.board-hero-leader { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; height: 24px; padding: 0 8px; border-radius: 5px; background: #f5f7fa; color: var(--muted); font-size: 10px; }
.board-hero-leader b { color: var(--text-2); }

.leader-panel { overflow: hidden; }
.leader-head, .leader-row { display: grid; grid-template-columns: minmax(145px, 1.3fr) 104px 95px minmax(120px, 1.1fr) 86px 66px 62px; gap: 8px; align-items: center; }
.leader-head { padding: 8px 17px; color: var(--soft); font-size: 9px; border-bottom: 1px solid #f4f6f8; }
.leader-head span:nth-child(n+2) { text-align: right; }
.leader-head span:nth-child(4) { text-align: left; }
.leader-list { padding: 4px 8px 8px; }
.leader-row { min-height: 63px; padding: 8px 9px; border-radius: 7px; cursor: pointer; transition: background 0.14s; }
.leader-row:hover { background: #fafbfc; }
.leader-row + .leader-row { border-top: 1px solid #f5f6f8; border-radius: 0; }
.leader-stock { display: flex; align-items: center; gap: 8px; min-width: 0; }
.leader-stock-text { min-width: 0; }
.leader-stock-text strong { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-stock-text span { display: block; color: var(--soft); font-size: 9px; font-family: var(--font-num); margin-top: 1px; }
.leader-tag { display: inline-flex; height: 15px; padding: 0 4px; border-radius: 3px; background: var(--red-soft); color: var(--red); font-size: 8px; font-weight: 600; align-items: center; }
.leader-price { text-align: right; }
.leader-price strong { display: block; font-family: var(--font-num); font-size: 12px; font-weight: 600; }
.leader-price span { display: block; font-family: var(--font-num); font-size: 9.5px; }
.leader-vol { text-align: right; color: var(--muted); font-family: var(--font-num); font-size: 9.5px; line-height: 1.65; }
.leader-struct { text-align: left; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.leader-struct span { color: var(--soft); font-size: 8.5px; }
.leader-macd { text-align: right; font-size: 9.5px; color: var(--muted); line-height: 1.6; }
.leader-macd b { display: block; color: var(--text-2); font-weight: 500; }
.leader-score { text-align: right; }
.leader-score strong { font-family: var(--font-num); font-size: 19px; font-weight: 600; }
.leader-score span { display: block; font-size: 8px; color: var(--soft); }
.leader-action { text-align: right; }

/* ==========================================================================
   自选
   ========================================================================== */

.watch-add { align-items: center; }
.watch-search { position: relative; width: 240px; height: 36px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 10px; }
.watch-search:focus-within { border-color: #b9c8e4; box-shadow: 0 0 0 3px rgba(61, 117, 232, 0.07); }
.watch-search .icon { width: 14px; height: 14px; color: var(--soft); }
.watch-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 11.5px; }
.watch-search .search-results { top: 41px; left: 0; width: 330px; }

.watch-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.summary-card { padding: 13px 16px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.summary-card span { width: 100%; color: var(--soft); font-size: 9.5px; }
.summary-card strong { font-family: var(--font-num); font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--navy); }
.summary-card small { color: var(--soft); font-size: 9.5px; }

.watch-table-panel { overflow: hidden; }
.watch-head, .watch-row { display: grid; grid-template-columns: minmax(155px, 1.4fr) 108px 70px 96px minmax(180px, 1.7fr) 66px 66px; gap: 8px; align-items: center; }
.watch-head { padding: 8px 17px; border-top: 1px solid #f2f4f7; border-bottom: 1px solid #f2f4f7; background: #fbfcfd; color: var(--soft); font-size: 9px; }
.watch-head span:nth-child(n+2) { text-align: right; }
.watch-head span:nth-child(5) { text-align: left; }
.watch-list { padding: 6px 8px 10px; min-height: 260px; }
.watch-row { min-height: 66px; padding: 9px; border-radius: 7px; cursor: pointer; transition: background 0.14s; }
.watch-row:hover { background: #fafbfc; }
.watch-row + .watch-row { border-top: 1px solid #f5f6f8; border-radius: 0; }
.watch-price { text-align: right; }
.watch-price strong { display: block; font-family: var(--font-num); font-size: 12.5px; font-weight: 600; }
.watch-price span { display: block; font-family: var(--font-num); font-size: 9.5px; }
.watch-metric { text-align: right; font-family: var(--font-num); font-size: 10.5px; color: var(--text-2); }
.watch-metric small { display: block; color: var(--soft); font-size: 8.5px; }
.watch-signal { display: flex; flex-direction: row; flex-wrap: wrap; gap: 3px; align-items: center; }
.watch-score { text-align: right; }
.watch-score strong { font-family: var(--font-num); font-size: 19px; font-weight: 600; }
.watch-score span { display: block; font-size: 8px; color: var(--soft); }
.watch-action { display: flex; justify-content: flex-end; gap: 2px; }

/* ==========================================================================
   搜索下拉
   ========================================================================== */

.search-results {
  position: absolute;
  top: 41px;
  right: 0;
  width: 390px;
  max-height: 430px;
  overflow-y: auto;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(20, 32, 51, 0.16);
  z-index: 80;
}
.search-empty { padding: 20px 12px; text-align: center; color: var(--soft); font-size: 11px; }
.search-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 10px;
  align-items: center;
  padding: 8px 8px;
  border-radius: 7px;
  cursor: pointer;
}
.search-item:hover, .search-item.active { background: #f5f7fa; }
.search-item-main { min-width: 0; }
.search-item-main strong { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-main span { display: block; margin-top: 1px; color: var(--soft); font-size: 9px; font-family: var(--font-num); }
.search-item-price { text-align: right; }
.search-item-price strong { display: block; font-family: var(--font-num); font-size: 11.5px; font-weight: 600; }
.search-item-price span { display: block; font-family: var(--font-num); font-size: 9px; }
.search-item .star-btn { width: 26px; height: 26px; }

/* ==========================================================================
   详情抽屉
   ========================================================================== */

.drawer-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; }
.drawer-root.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 24, 38, 0.34); opacity: 0; transition: opacity 0.25s; backdrop-filter: blur(2px); }
.drawer-root.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 860px;
  max-width: 94vw;
  height: 100%;
  background: #f6f8fa;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.28, 1);
  display: flex;
  flex-direction: column;
}
.drawer-root.open .drawer-panel { transform: translateX(0); }
.drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.drawer-id { min-width: 0; flex: 1; }
.drawer-title-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.drawer-title-line h2 { font-size: 21px; font-weight: 700; color: var(--navy); }
.star-inline { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 5px; color: #bdc6d3; }
.star-inline:hover { color: var(--gold); background: var(--gold-soft); }
.star-inline.active { color: var(--gold); }
.star-inline.active .icon { fill: var(--gold); }
.drawer-subline { margin-top: 2px; color: var(--soft); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-price { text-align: right; flex: none; }
.drawer-price strong { display: block; font-family: var(--font-num); font-size: 24px; font-weight: 600; line-height: 1.05; }
.drawer-price span { display: block; font-family: var(--font-num); font-size: 11px; margin-top: 2px; }
.drawer-close { flex: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; }
.drawer-loading { min-height: 340px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; }

.detail-content { display: flex; flex-direction: column; gap: 12px; }
.detail-overview {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 100px;
  gap: 18px;
  align-items: center;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.score-block { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.score-ring {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: conic-gradient(var(--ring, #d69a2d) calc(var(--score, 0) * 1%), #edf0f4 0);
  display: grid;
  place-items: center;
  position: relative;
}
.score-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.score-ring-inner { position: relative; z-index: 1; text-align: center; line-height: 1.1; }
.score-ring-inner strong { display: block; font-family: var(--font-num); font-size: 31px; font-weight: 600; letter-spacing: -0.03em; }
.score-ring-inner span { display: block; font-size: 8.5px; color: var(--soft); margin-top: 2px; }
.grade-badge { display: inline-flex; height: 20px; padding: 0 8px; align-items: center; border-radius: 99px; background: var(--gold-soft); color: #9a6b1c; font-size: 9.5px; font-weight: 600; }
.score-block small { color: var(--soft); font-size: 8px; }
.score-bars { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.score-bar-row { display: grid; grid-template-columns: 60px 1fr 34px; gap: 8px; align-items: center; }
.score-bar-row > span { color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.score-bar-row > span em { font-style: normal; color: var(--soft); font-size: 8px; }
.score-bar-track { height: 6px; border-radius: 99px; background: #f0f2f5; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.score-bar-fill.volume { background: linear-gradient(90deg, #e88b8b, #dc4d4d); }
.score-bar-fill.macd { background: linear-gradient(90deg, #ecc076, #d69a2d); }
.score-bar-fill.trend { background: linear-gradient(90deg, #9eaec4, #5f7594); }
.score-bar-row b { text-align: right; font-family: var(--font-num); font-size: 11px; font-weight: 600; color: var(--text-2); }
.detail-date { text-align: right; border-left: 1px solid #f0f2f5; padding-left: 12px; }
.detail-date span { display: block; color: var(--soft); font-size: 8.5px; }
.detail-date b { display: block; margin-top: 2px; font-family: var(--font-num); font-size: 12px; font-weight: 600; }
.detail-date small { display: block; color: var(--soft); font-size: 8px; margin-top: 2px; }

.detail-chart-panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-chart-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px 5px; }
.detail-chart-head > div { display: flex; align-items: center; gap: 7px; }
.detail-chart-head strong { font-size: 12.5px; font-weight: 600; }
.detail-chart-hint { color: var(--soft); font-size: 9px; }
.detail-chart-frame { position: relative; height: 365px; margin: 0 4px 4px; }
.detail-chart-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; }
.detail-card-title { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 11.5px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid #f3f5f7; }
.detail-card-title .icon { width: 14px; height: 14px; color: #98a5b7; }
.detail-kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; padding-top: 9px; font-size: 10px; }
.detail-kv span { color: var(--soft); }
.detail-kv b { text-align: right; font-family: var(--font-num); font-weight: 500; color: var(--text-2); }
.detail-kv b.text { font-family: var(--font); }

.detail-section { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; }
.detail-section-title { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 11.5px; font-weight: 600; margin-bottom: 9px; }
.detail-section-title .icon { width: 14px; height: 14px; color: var(--gold); }
.signal-list { display: flex; flex-direction: column; gap: 5px; }
.signal-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 6px; background: #fafbfc; }
.signal-type { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; font-family: var(--font-num); font-size: 9px; font-weight: 700; flex: none; }
.signal-type.buy { background: var(--red-soft); color: var(--red); }
.signal-type.watch { background: var(--blue-soft); color: var(--blue); }
.signal-type.risk { background: var(--green-soft); color: var(--green); }
.signal-text { min-width: 0; }
.signal-text strong { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-2); }
.signal-text span { display: block; color: var(--soft); font-size: 9px; margin-top: 1px; line-height: 1.55; }
.signal-empty { color: var(--soft); font-size: 10px; padding: 4px 0; }
.risk-section { border-color: #f0e3d9; background: #fffdfb; }
.risk-list { display: flex; flex-direction: column; gap: 4px; }
.risk-list li { position: relative; padding-left: 11px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.risk-list li::before { content: ""; position: absolute; left: 1px; top: 6px; width: 3px; height: 3px; border-radius: 50%; background: #d8a069; }
.detail-disclaimer { color: #aab3c0; font-size: 8.5px; line-height: 1.6; padding: 0 2px 6px; }

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-stack { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 12px 8px 14px;
  background: rgba(24, 38, 58, 0.95);
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(15, 24, 38, 0.24);
  font-size: 11.5px;
  pointer-events: auto;
  animation: toast-in 0.22s ease;
  max-width: 90vw;
}
.toast.error { background: rgba(165, 50, 50, 0.96); }
.toast.success { background: rgba(13, 107, 80, 0.96); }
.toast button { color: #f5c96e; font-size: 11px; font-weight: 600; padding: 0 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 全局加载条 */
.global-loading { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300; background: transparent; }
.global-loading span { display: block; width: 32%; height: 100%; background: var(--red); animation: loading-bar 1.1s ease-in-out infinite; }
@keyframes loading-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(420%); } }

/* 骨架屏 */
.skeleton-card, .skeleton-row {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.skeleton-card { min-height: 112px; }
.skeleton-row { height: 52px; margin: 6px 0; border-radius: 7px; border-color: transparent; }
.skeleton-card::after, .skeleton-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(238, 242, 247, 0.85), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* 页脚 */
.app-footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 17px 22px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  color: var(--soft);
  font-size: 9.5px;
}
.app-footer > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.app-footer strong { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.footer-right { display: flex; gap: 15px; align-items: center; text-align: right; }
#footer-time { font-family: var(--font-num); white-space: nowrap; }

/* ==========================================================================
   首页 AI 推荐
   ========================================================================== */

.home-recommend {
  margin-top: 14px;
  overflow: hidden;
}
.recommend-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: #3a68c8;
  font-size: 8.5px;
  white-space: nowrap;
}
.recommend-badge.ai {
  background: var(--gold-soft);
  color: #98671c;
}
.recommend-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 11px;
}
.recommend-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #fbfcfd;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.recommend-card:hover {
  border-color: #d7e2f2;
  background: #fff;
  box-shadow: 0 3px 10px rgba(24, 38, 58, 0.06);
  transform: translateY(-1px);
}
.recommend-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.recommend-rank {
  display: inline-flex;
  width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #eef2f7;
  color: #6e7f95;
  font-family: var(--font-num);
  font-size: 9px;
  flex: none;
}
.recommend-rank.top {
  background: var(--red-soft);
  color: var(--red);
}
.recommend-name { min-width: 0; flex: 1; }
.recommend-name strong { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recommend-name span { display: block; color: var(--soft); font-size: 8px; font-family: var(--font-num); margin-top: 1px; }
.recommend-price { text-align: right; flex: none; }
.recommend-price strong { display: block; font-family: var(--font-num); font-size: 12px; }
.recommend-price span { display: block; font-family: var(--font-num); font-size: 9px; }
.recommend-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 7px; min-height: 17px; }
.recommend-tags .mini-tag { font-size: 8px; padding: 2px 4px; }
.recommend-tags .recommend-score { margin-left: auto; font-family: var(--font-num); font-size: 11px; font-weight: 600; }
.recommend-reason {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
}
.recommend-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  border-top: 1px solid #f1f4f7;
  color: var(--soft);
  font-size: 8.5px;
  line-height: 1.5;
}
.recommend-footer .text-link { flex: none; font-size: 9px; }
.recommend-skeleton {
  height: 98px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f4f6f8 25%, #fafbfc 37%, #f4f6f8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
.recommend-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  color: var(--soft);
  font-size: 10px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ==========================================================================
   AI 复盘
   ========================================================================== */

.ai-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: #e9edf3;
}
.ai-tabs button {
  height: 31px;
  padding: 0 15px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11.5px;
}
.ai-tabs button.active {
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(24, 38, 58, 0.1);
}

.ai-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.ai-control { padding: 16px 17px; }
.ai-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ai-section-title span { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.ai-section-title small { font-size: 9px; color: var(--soft); }
.ai-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}
.ai-search:focus-within { border-color: #b9c8e4; background: #fff; box-shadow: 0 0 0 3px rgba(61, 117, 232, 0.07); }
.ai-search .icon { width: 15px; height: 15px; color: var(--soft); }
.ai-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; color: var(--text); }
.ai-search .search-results { top: 43px; left: 0; right: auto; width: 100%; }
.ai-stock-card {
  margin-top: 9px;
  min-height: 72px;
  padding: 10px 11px;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #fbfcfd;
}
.ai-stock-card.compact { min-height: 52px; }
.ai-stock-empty { color: var(--soft); font-size: 10px; display: flex; align-items: center; gap: 6px; min-height: 50px; }
.ai-stock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ai-stock-name { min-width: 0; }
.ai-stock-name strong { display: block; font-size: 14px; color: var(--navy); }
.ai-stock-name span { display: block; margin-top: 1px; color: var(--soft); font-size: 9px; font-family: var(--font-num); }
.ai-stock-price { text-align: right; }
.ai-stock-price strong { display: block; font-family: var(--font-num); font-size: 16px; }
.ai-stock-price span { display: block; font-family: var(--font-num); font-size: 10px; }
.ai-stock-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; align-items: center; }
.ai-stock-score { margin-left: auto; font-family: var(--font-num); font-size: 17px; font-weight: 600; }
.ai-stock-score small { font-family: var(--font); font-size: 8px; color: var(--soft); margin-left: 2px; }
.ai-field-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}
.ai-field-label em { font-style: normal; color: var(--soft); font-size: 8.5px; margin-left: 4px; }
.ai-textarea {
  width: 100%;
  margin-top: 5px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 9px;
  outline: none;
  background: #fafbfc;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.6;
}
.ai-textarea:focus { border-color: #b9c8e4; background: #fff; }
.ai-auto-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9.5px;
  cursor: pointer;
}
.ai-auto-row input { accent-color: var(--navy); width: 13px; height: 13px; margin: 0; }
.ai-auto-row em { margin-left: auto; color: #c08a35; font-style: normal; font-size: 8px; }
.ai-actions { display: flex; gap: 7px; margin-top: 13px; }
.ai-actions .primary { flex: 1; }
.ai-config-hint {
  margin-top: 9px;
  padding: 7px 8px;
  border-radius: 5px;
  background: #f8f9fb;
  color: var(--soft);
  font-size: 9px;
  line-height: 1.55;
}
.ai-config-hint.good { background: var(--green-soft); color: var(--green-dark); }
.ai-config-hint.warn { background: var(--gold-soft); color: #98671c; }

.ai-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ai-field-row select,
.ai-field-row input {
  width: 100%;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 7px;
  background: #fafbfc;
  color: var(--text-2);
  outline: none;
  font-size: 10.5px;
}
.ai-field-row select:focus,
.ai-field-row input:focus { border-color: #b9c8e4; background: #fff; }
.btn.full { width: 100%; }
.ai-review-summary {
  margin-top: 11px;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}
.ai-review-summary p { color: inherit; }
.ai-review-summary .review-kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; }
.ai-review-summary .review-kv span { color: var(--soft); }
.ai-review-summary .review-kv b { text-align: right; color: var(--text-2); font-weight: 500; font-family: var(--font-num); }
.ai-journal-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1f4f7; }
.ai-journal-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ai-rating { display: flex; gap: 4px; }
.ai-rating button {
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--soft);
  font-size: 9px;
}
.ai-rating button.active { color: var(--navy); border-color: #9eb0c8; background: #eef2f7; }

.ai-output-panel { min-height: 600px; display: flex; flex-direction: column; overflow: hidden; }
.ai-output-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f4f7;
}
.ai-output-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ai-output-title strong { font-size: 13.5px; }
.ai-output-title span { color: var(--soft); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-output-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.ai-model-badge {
  display: inline-flex;
  height: 21px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: #3a68c8;
  font-size: 8.5px;
  font-family: var(--font-num);
}
.ai-copy-btn { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 5px; color: var(--soft); }
.ai-copy-btn:hover { color: var(--navy); background: #f3f5f8; }
.ai-copy-btn .icon { width: 13px; height: 13px; }
.ai-output {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 24px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-output.is-streaming::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--red);
  animation: blink 0.8s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.ai-output .ai-heading { display: block; margin: 13px 0 3px; color: var(--navy); font-weight: 650; }
.ai-empty { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.ai-empty-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #f1f5fa; color: #8ca0bc; margin-bottom: 10px; }
.ai-empty-icon .icon { width: 22px; height: 22px; }
.ai-empty h4 { font-size: 14px; color: var(--text-2); }
.ai-empty p { max-width: 460px; margin-top: 5px; color: var(--soft); font-size: 10px; line-height: 1.7; }
.ai-empty .btn { margin-top: 14px; }

.ai-review-chart-panel { margin-top: 14px; overflow: hidden; }
.ai-review-chart-frame { position: relative; height: 360px; margin: 0 4px 4px; }
.ai-review-chart-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.ai-future-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid #f1f4f7;
}
.ai-future-strip > div { padding: 9px 12px; border-right: 1px solid #f4f6f8; }
.ai-future-strip > div:last-child { border-right: 0; }
.ai-future-strip span { display: block; color: var(--soft); font-size: 8.5px; }
.ai-future-strip b { display: block; margin-top: 1px; font-family: var(--font-num); font-size: 14px; font-weight: 600; }

.ai-journal-panel { margin-top: 14px; overflow: hidden; }
.ai-journal-list { padding: 0 12px 12px; }
.ai-journal-empty { padding: 20px 8px 25px; text-align: center; color: var(--soft); font-size: 10px; line-height: 1.7; }
.ai-journal-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 7px;
  border-radius: 7px;
}
.ai-journal-item + .ai-journal-item { border-top: 1px solid #f4f6f8; border-radius: 0; }
.ai-journal-rating {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #f1f5fa;
  color: var(--navy);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
}
.ai-journal-main { min-width: 0; }
.ai-journal-main strong { font-size: 11px; color: var(--text-2); }
.ai-journal-main small { margin-left: 5px; color: var(--soft); font-size: 8.5px; font-family: var(--font-num); }
.ai-journal-main p { margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.ai-journal-del { width: 22px; height: 22px; display: grid; place-items: center; color: #b9c2cf; border-radius: 4px; }
.ai-journal-del:hover { color: var(--red); background: var(--red-soft); }
.ai-journal-del .icon { width: 12px; height: 12px; }

.ai-settings-panel { width: 460px; }
.ai-settings-status {
  padding: 8px 9px;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
  margin-bottom: 6px;
}
.ai-settings-status.good { background: var(--green-soft); color: var(--green-dark); }
.ai-settings-select,
.ai-settings-input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: #fafbfc;
  color: var(--text);
  outline: none;
  font-size: 12px;
}
.ai-settings-select:focus,
.ai-settings-input:focus { border-color: #b9c8e4; background: #fff; }
.ai-key-note {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  padding: 7px 8px;
  border-radius: 5px;
  background: #f8fafc;
  color: var(--soft);
  font-size: 9px;
  line-height: 1.6;
}
.ai-key-note .icon { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.ai-settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.ai-test-result { margin-top: 9px; font-size: 9.5px; line-height: 1.6; color: var(--muted); }
.ai-test-result.good { color: var(--green); }
.ai-test-result.error { color: var(--red); }

.detail-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid #dbe3ee;
  border-radius: 5px;
  background: #f7f9fc;
  color: #49658e;
  font-size: 9px;
  white-space: nowrap;
}
.detail-ai-btn:hover { background: #eef3fb; border-color: #b9c8e4; }
.detail-ai-btn .icon { width: 12px; height: 12px; }

/* ==========================================================================
   iPhone / PWA
   ========================================================================== */

.mobile-tabbar { display: none; }
.ios-install-banner { display: none; }

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 38, 0.42);
  backdrop-filter: blur(3px);
}
.phone-modal-panel {
  position: relative;
  z-index: 1;
  width: 500px;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 24, 38, 0.28);
  animation: modal-in 0.22s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.phone-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 13px;
  border-bottom: 1px solid #f1f4f7;
}
.phone-modal-heading { display: flex; align-items: center; gap: 11px; }
.phone-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  flex: none;
}
.phone-modal-icon .icon { width: 19px; height: 19px; }
.phone-modal-heading h2 { font-size: 17px; font-weight: 700; color: var(--navy); }
.phone-modal-heading p { margin-top: 2px; font-size: 10px; color: var(--soft); }
.phone-modal-body { padding: 16px 18px 20px; }
.lan-section label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.lan-url-row { display: flex; align-items: center; gap: 7px; }
.lan-url-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--navy);
  font-family: var(--font-num);
  font-size: 12px;
  outline: none;
}
.lan-url-row input:focus { border-color: #b9c8e4; background: #fff; }
.lan-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.lan-list button {
  height: 23px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
  font-family: var(--font-num);
  font-size: 9.5px;
}
.lan-list button:hover { border-color: #b9c8e4; color: var(--navy); }
.install-steps { display: flex; flex-direction: column; gap: 13px; margin: 18px 0 15px; padding: 0; list-style: none; }
.install-steps li { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; }
.install-steps li > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: var(--navy);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 600;
}
.install-steps strong { display: block; font-size: 11.5px; color: var(--text-2); }
.install-steps small { display: block; margin-top: 2px; font-size: 9.5px; line-height: 1.6; color: var(--soft); }
.phone-modal-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 8px 9px;
  border-radius: 7px;
  background: #f8fafc;
  color: var(--soft);
  font-size: 9px;
  line-height: 1.6;
}
.phone-modal-note .icon { width: 12px; height: 12px; margin-top: 1px; flex: none; }

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1280px) {
  .topbar-inner { gap: 18px; }
  .search-box { width: 200px; }
  .nav-item { padding: 0 12px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 318px; }
  .index-value { font-size: 23px; }
  .index-spark { width: 78px; }
  .home-split { grid-template-columns: minmax(0, 1.5fr) minmax(210px, 0.9fr); }
  .breadth-top { grid-template-columns: minmax(200px, 1.1fr) minmax(155px, 0.9fr); gap: 12px; }
  .board-preview-row { grid-template-columns: 26px minmax(115px, 1.1fr) 64px minmax(130px, 1.25fr) minmax(120px, 1.35fr) 58px; }
  .leader-head, .leader-row { grid-template-columns: minmax(135px, 1.2fr) 96px 86px minmax(100px, 1fr) 76px 60px 56px; }
}

@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; }
  .ai-layout { grid-template-columns: 320px minmax(0, 1fr); }
  .recommend-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .hot-panel { grid-row: span 2; }
  .hot-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
  .hot-row + .hot-row { border-top: 0; }
  .hot-row:nth-child(n+3) { border-top: 1px solid #f5f6f8; border-radius: 0; }
  .boards-layout { grid-template-columns: 292px minmax(0, 1fr); }
  .screener-layout { grid-template-columns: 322px minmax(0, 1fr); }
  .result-column-head, .result-row { grid-template-columns: minmax(135px, 1.3fr) 92px 96px minmax(160px, 1.5fr) 58px 60px; }
  .watch-head, .watch-row { grid-template-columns: minmax(140px, 1.3fr) 96px 62px 84px minmax(150px, 1.4fr) 56px 58px; }
}

@media (max-width: 900px) {
  .ai-layout { grid-template-columns: 1fr; }
  .ai-output-panel { min-height: 440px; }
  .ai-review-chart-frame { height: 300px; }
  .recommend-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-inner { gap: 12px; padding: 0 16px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }
  .main-nav { gap: 1px; }
  .nav-item { padding: 0 9px; font-size: 12px; }
  .search-box { width: 180px; }
  .market-state .state-date { display: none; }
  .main-content { padding: 13px 16px 24px; }
  .data-strip-inner { padding: 0 16px; }
  .index-strip { grid-template-columns: 1fr 1fr; }
  .index-spark { width: 110px; }
  .screener-layout, .boards-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; max-height: none; }
  .filter-scroll { overflow: visible; }
  .board-list { max-height: 330px; }
  .leader-head, .leader-row { grid-template-columns: minmax(130px, 1.2fr) 92px 82px minmax(90px, 1fr) 66px 54px; }
  .leader-head span:nth-child(5), .leader-macd { display: none; }
  .watch-head, .watch-row { grid-template-columns: minmax(130px, 1.3fr) 92px 60px 78px minmax(140px, 1.4fr) 52px 54px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-head-actions { width: 100%; }
  .watch-add { width: 100%; }
  .watch-search { flex: 1; width: auto; }
  .drawer-panel { max-width: 100vw; width: 100%; }
  .drawer-body { padding: 10px; }
}

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 9px 12px 0; gap: 9px; }
  .brand { order: 1; }
  .top-actions { order: 2; margin-left: auto; }
  .main-nav { order: 3; flex: 0 0 100%; width: 100%; overflow-x: auto; padding-bottom: 0; border-top: 1px solid #f4f6f8; margin-top: 1px; }
  .nav-item { height: 37px; flex: none; }
  .nav-item.active::after { bottom: 0; }
  .search-box { width: 150px; }
  .search-box kbd { display: none; }
  .search-box .search-results { position: fixed; top: 94px; left: 12px; right: 12px; width: auto; max-height: 60vh; }
  .watch-search .search-results { position: absolute; top: 41px; left: 0; right: auto; width: 100%; max-height: 55vh; }
  .market-state { padding: 0 8px; }
  .data-strip { display: none; }
  .main-content { padding: 11px 10px 22px; }
  .index-strip { gap: 8px; margin-bottom: 10px; }
  .index-card { min-height: 104px; padding: 9px 11px 7px; }
  .index-value { font-size: 21px; }
  .index-spark { width: 74px; height: 36px; }
  .index-card-foot { font-size: 8.5px; }
  .home-main, .home-side { gap: 10px; }
  .home-side { grid-template-columns: 1fr; }
  .hot-panel { grid-row: auto; }
  .hot-list { display: block; }
  .hot-row:nth-child(n+3) { border-top: 1px solid #f5f6f8; border-radius: 0; }
  .home-split { grid-template-columns: 1fr; gap: 10px; }
  .chart-frame { height: 330px; }
  .chart-stats { gap: 12px; padding-left: 12px; padding-right: 12px; }
  .chart-head { padding: 11px 12px 8px; }
  .title-line h2 { font-size: 17px; }
  .chart-foot { padding: 0 10px; }
  .chart-disclaimer { display: none; }
  .chart-legend { gap: 8px; }
  .breadth-top { grid-template-columns: 1fr; gap: 10px; padding: 0 13px 10px; }
  .bucket-chart { height: 70px; }
  .breadth-stats > div { padding: 8px 9px; }
  .board-preview-row { grid-template-columns: 22px minmax(100px, 1.15fr) 58px minmax(105px, 1.15fr) 48px; min-height: 57px; }
  .board-signals { display: none; }
  .board-preview-row .mini-score { display: block; }
  .panel-title { gap: 6px; }
  .panel-title h3 { font-size: 13px; }
  .panel-note { font-size: 9px; }
  .page-head h1 { font-size: 21px; }
  .page-head p { font-size: 11px; }
  .screener-layout { gap: 10px; }
  .filter-section { padding: 12px 14px 13px; }
  .results-toolbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .results-actions { width: 100%; justify-content: space-between; }
  #screener-status { overflow: hidden; text-overflow: ellipsis; }
  .result-column-head { display: none; }
  .result-list { gap: 7px; }
  .result-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "stock price" "tags score" "actions actions";
    gap: 6px 10px;
    padding: 10px 12px;
    min-height: 0;
  }
  .result-stock { grid-area: stock; }
  .result-price { grid-area: price; align-self: start; }
  .result-metrics { display: none; }
  .result-tags { grid-area: tags; }
  .result-score { grid-area: score; display: flex; align-items: baseline; gap: 4px; }
  .result-score strong { font-size: 17px; }
  .result-actions { grid-area: actions; justify-content: flex-end; border-top: 1px solid #f5f6f8; padding-top: 5px; margin-top: 2px; }
  .watch-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { padding: 10px 12px; }
  .summary-card strong { font-size: 21px; }
  .watch-head { display: none; }
  .watch-list { padding: 4px 6px 8px; }
  .watch-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "stock price" "signal score" "actions actions";
    gap: 5px 10px;
    padding: 10px 8px;
    min-height: 0;
  }
  .watch-row .leader-stock { grid-area: stock; }
  .watch-price { grid-area: price; }
  .watch-metric { display: none; }
  .watch-signal { grid-area: signal; flex-direction: row; flex-wrap: wrap; }
  .watch-score { grid-area: score; }
  .watch-action { grid-area: actions; justify-content: flex-end; border-top: 1px solid #f5f6f8; padding-top: 5px; }
  .watch-head, .watch-row { grid-template-columns: none; }
  .boards-layout { gap: 10px; }
  .board-list { max-height: 290px; }
  .board-hero-inner { flex-direction: column; gap: 8px; }
  .board-hero-right { text-align: left; }
  .board-hero-stats { gap: 16px; }
  .leader-head { display: none; }
  .leader-list { padding: 2px 6px 6px; }
  .leader-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "stock price" "struct score" "action action";
    gap: 5px 10px;
    padding: 9px 8px;
  }
  .leader-stock { grid-area: stock; }
  .leader-price { grid-area: price; }
  .leader-vol, .leader-macd { display: none; }
  .leader-struct { grid-area: struct; flex-direction: row; align-items: center; gap: 5px; }
  .leader-score { grid-area: score; }
  .leader-action { grid-area: action; text-align: right; border-top: 1px solid #f5f6f8; padding-top: 4px; }
  .search-results { width: 310px; right: auto; left: 0; }
  .drawer-head { padding: 10px 12px; gap: 10px; }
  .drawer-title-line h2 { font-size: 18px; }
  .drawer-price strong { font-size: 20px; }
  .drawer-body { padding: 8px; }
  .detail-overview { grid-template-columns: 115px 1fr; gap: 10px; padding: 12px; }
  .score-ring { width: 88px; height: 88px; }
  .score-ring-inner strong { font-size: 26px; }
  .detail-date { display: none; }
  .score-bar-row { grid-template-columns: 52px 1fr 30px; gap: 5px; }
  .score-bar-row > span { font-size: 8.5px; }
  .detail-chart-frame { height: 315px; }
  .detail-grid { grid-template-columns: 1fr; }
  .app-footer { flex-direction: column; align-items: flex-start; padding: 14px 12px 20px; }
  .footer-right { flex-direction: column; align-items: flex-start; gap: 3px; }
  .toast-stack { bottom: 15px; width: calc(100% - 24px); }
  .toast { width: 100%; justify-content: space-between; }
}

@media (max-width: 430px) {
  .brand-mark { width: 33px; height: 33px; border-radius: 8px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .brand-text strong { font-size: 14px; }
  .search-box { width: 118px; }
  .search-box input { font-size: 11px; }
  .market-state { display: none; }
  .index-strip { grid-template-columns: 1fr 1fr; gap: 7px; }
  .index-card { min-height: 96px; padding: 8px 10px 7px; }
  .index-spark { width: 64px; height: 34px; }
  .index-value { font-size: 20px; }
  .index-change { font-size: 10px; }
  .index-card-foot span:last-child { display: none; }
  .index-card-foot { font-size: 8.5px; }
  .chart-frame { height: 300px; }
  .chart-mode button { padding: 0 8px; }
  .title-line .chan-badge { display: none; }
  .breadth-stats b { font-size: 13px; }
  .field-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .watch-search { min-width: 0; }
  .page-head-actions .btn { padding: 0 10px; }
  .saved-scheme { max-width: 100%; }
}

/* ==========================================================================
   iPhone 专用：底部标签栏、安全区、安装引导
   ========================================================================== */

@media (max-width: 720px) {
  html, body { min-height: 100dvh; }
  body { overscroll-behavior-y: none; }
  .topbar { padding-top: 0; }
  .topbar-inner {
    flex-wrap: nowrap;
    height: 54px;
    padding: 0 12px;
    gap: 8px;
  }
  .chart-stats span:last-child { display: none; }
  .ai-tabs { width: 100%; }
  .ai-tabs button { flex: 1; height: 34px; }
  .ai-layout { grid-template-columns: 1fr; }
  .ai-control { padding: 14px; }
  .ai-output-panel { min-height: 420px; }
  .ai-output { min-height: 320px; padding: 15px 14px 20px; font-size: 12.5px; }
  .ai-output-title span { max-width: 120px; }
  .ai-empty { min-height: 300px; padding: 22px 12px; }
  .ai-review-chart-frame { height: 300px; }
  .ai-future-strip { grid-template-columns: repeat(2, 1fr); }
  .ai-future-strip > div { border-bottom: 1px solid #f4f6f8; }
  .ai-journal-list { padding: 0 7px 8px; }
  .ai-search { height: 40px; }
  .ai-search input,
  .ai-textarea,
  .ai-settings-select,
  .ai-settings-input,
  .ai-field-row input,
  .ai-field-row select { font-size: 16px; }
  .ai-field-row select,
  .ai-field-row input { height: 38px; }
  .ai-settings-panel { width: 100%; }
  .recommend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0 10px 9px; }
  .recommend-card { padding: 9px; }
  .recommend-footer { align-items: flex-start; padding: 8px 11px; font-size: 8px; }
  .recommend-name strong { font-size: 12.5px; }
  .recommend-reason { font-size: 9.5px; }
  .main-nav { display: none; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .brand-mark svg { width: 28px; height: 28px; }
  .brand-text strong { font-size: 14.5px; }
  .top-actions { gap: 7px; }
  .search-box { width: min(40vw, 158px); height: 33px; }
  .icon-btn { width: 33px; height: 33px; }
  .phone-access-btn { display: none; }
  .market-state { height: 33px; }
  .main-content { padding: 10px 10px 20px; }
  .app-footer { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .btn { height: 38px; }
  .input-unit { height: 38px; }
  .input-unit input,
  .search-box input,
  .watch-search input,
  .save-scheme-row input,
  .lan-url-row input,
  .select-wrap select,
  .sort-control select,
  .mini-select select,
  #scheme-name { font-size: 16px; }
  .chip { height: 31px; font-size: 11px; padding: 0 10px; }
  .segmented button { height: 30px; }
  .chart-mode button { height: 30px; }
  .watch-search { height: 38px; }
  .sort-control select { height: 32px; }

  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px rgba(20, 32, 51, 0.07);
    backdrop-filter: blur(18px);
  }
  .mobile-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding-top: 2px;
    color: var(--soft);
    font-size: 9.5px;
    letter-spacing: 0.02em;
  }
  .mobile-tab .icon { width: 20px; height: 20px; stroke-width: 1.65; }
  .mobile-tab.active { color: var(--navy); font-weight: 600; }
  .mobile-tab.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 20px;
    height: 2px;
    background: var(--red);
    border-radius: 0 0 2px 2px;
  }
  .mobile-tab.active .icon { stroke-width: 1.9; }
  .tab-icon-wrap { position: relative; display: inline-flex; }
  .tab-icon-wrap em {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 99px;
    background: var(--red);
    color: #fff;
    font-style: normal;
    font-family: var(--font-num);
    font-size: 8px;
    line-height: 15px;
    text-align: center;
    font-weight: 500;
  }

  .ios-install-banner:not([hidden]) {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: 8px;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 54;
    padding: 9px 9px 9px 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(20, 32, 51, 0.16);
    backdrop-filter: blur(12px);
  }
  .ios-install-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eef2f7;
    color: var(--navy);
  }
  .ios-install-icon .icon { width: 16px; height: 16px; }
  .ios-install-copy { min-width: 0; }
  .ios-install-copy strong { display: block; font-size: 10.5px; color: var(--text-2); }
  .ios-install-copy small { display: block; margin-top: 1px; color: var(--soft); font-size: 8.5px; }
  .ios-install-action {
    height: 25px;
    padding: 0 8px;
    border-radius: 5px;
    background: var(--navy);
    color: #fff;
    font-size: 9.5px;
    font-weight: 600;
  }
  .ios-install-close { width: 24px; height: 24px; display: grid; place-items: center; color: var(--soft); }
  .ios-install-close .icon { width: 12px; height: 12px; }

  .toast-stack { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .modal-root { place-items: end center; padding: 0; }
  .phone-modal-panel {
    width: 100%;
    max-height: 94dvh;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .phone-modal-head { padding: 16px 16px 12px; }
  .phone-modal-body { padding: 14px 16px 18px; }
  .drawer-panel { height: 100dvh; }
  .drawer-body { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
