:root {
  --ink: #06143a;
  --muted: #65728a;
  --line: #e8edf6;
  --panel: rgba(255, 255, 255, 0.95);
  --blue: #2868ff;
  --gold: #d99b2d;
  --green: #159947;
  --red: #ef2b35;
  --shadow: 0 10px 28px rgba(35, 64, 115, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #eef5ff;
  letter-spacing: 0;
}

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

.app-shell {
  width: min(100vw, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  background:
    url("assets/hero/mobile-hero-bg.png") right top / 100% auto no-repeat,
    radial-gradient(circle at 72px 80px, rgba(42, 104, 255, 0.08), transparent 150px),
    linear-gradient(180deg, #fbfdff 0%, #f8fbff 42%, #f5f8fd 100%);
  overflow-x: hidden;
  box-shadow: 0 0 34px rgba(12, 34, 74, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 6px 18px 4px;
  background: transparent;
  backdrop-filter: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand b {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-main,
.brand-gold {
  white-space: nowrap;
}

.brand-gold {
  color: #c88a18;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-weight: 900;
  text-shadow: 0 1px 0 #fff4d6, 0 2px 5px rgba(179, 112, 12, 0.22);
}

.brand small {
  color: #778397;
  font-size: 10px;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.icon-button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
}

.icon-button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

main {
  padding: 0 12px calc(40px + env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  min-height: 132px;
  overflow: visible;
  margin: 0 -12px 0;
  padding: 18px 20px 0;
}

.hero::after {
  display: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 260px;
}

.hero h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero p {
  margin: 6px 0 0;
  width: 230px;
  color: #46536d;
  font-size: 11px;
  line-height: 1.52;
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.primary,
.secondary {
  min-width: 62px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, #e6b75b, #c77f13);
  box-shadow: 0 8px 20px rgba(197, 125, 18, 0.24);
}

.secondary {
  color: #142244;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #dbe4f2;
}

.market-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
  align-items: start;
}

.panel {
  position: relative;
  min-width: 0;
  height: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.wide { grid-column: span 2; }

.wide,
.market-grid > .panel:nth-child(2) {
  min-height: 122px;
}

.wide {
  overflow: hidden;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  margin-bottom: 4px;
}

.section-title img,
.section-title .bolt {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.section-title .market-title-icon {
  width: 20px;
  height: 20px;
}

.section-title .news-title-icon {
  width: 21px;
  height: 21px;
}

.section-title h2,
.compact h2 {
  margin: 0;
  flex: 1;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
}

.section-title a {
  color: #667287;
  font-size: 9px;
  line-height: 1;
}

.expand-market-btn {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #52627b;
  font-size: 9px;
  line-height: 1;
  padding: 0;
}

.icon-numbered {
  position: relative;
}

.icon-numbered::before {
  content: attr(data-icon-no);
  position: absolute;
  left: -4px;
  top: -5px;
  z-index: 3;
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #12346f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  display: none;
}

.row.icon-numbered::before,
.prediction-head.icon-numbered::before {
  left: -3px;
  top: 0;
  width: 10px;
  height: 10px;
  font-size: 6px;
}

.icon-button.icon-numbered::before {
  left: -2px;
  top: -2px;
}

.bottom-nav .icon-numbered::before {
  left: calc(50% - 14px);
  top: -3px;
  width: 10px;
  height: 10px;
  font-size: 6px;
}

.ticker-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.ticker-card {
  min-width: 0;
  padding: 3px 1px;
}

.ticker-card strong {
  display: block;
  color: #6b768c;
  font-size: 6px;
  font-weight: 500;
  margin-bottom: 2px;
}

.ticker-card b {
  display: block;
  font-size: 8px;
  line-height: 1.1;
}

.ticker-card span {
  display: block;
  margin-top: 2px;
  font-size: 7px;
}

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

.market-group-card {
  min-width: 0;
  min-height: 45px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.market-group-card h3 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 7px;
  line-height: 1;
  font-weight: 900;
}

.market-line {
  display: grid;
  grid-template-columns: minmax(34px, 1fr) auto auto auto;
  align-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 11px;
  line-height: 1;
}

.market-line b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  line-height: 1;
  color: #fff;
  font-weight: 800;
}

.market-line span,
.market-line em,
.market-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 7px;
  line-height: 1;
}

.market-line span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.market-line em {
  font-style: normal;
  font-weight: 500;
}

.market-line strong {
  font-weight: 500;
}

.tradingview-widget-container,
.tradingview-widget-container__widget {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.market-detail iframe {
  width: 100% !important;
  height: 100% !important;
}

.up { color: var(--red); }
.down { color: var(--green); }
.flat { color: var(--muted); }

canvas {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 5px;
}

.list-tools {
  position: relative;
  z-index: 25;
  margin: -22px 0 4px;
}

.stock-task-form {
  position: relative;
  z-index: 26;
  display: grid;
  grid-template-columns: auto auto 58px 36px;
  align-items: center;
  justify-content: start;
  gap: 4px;
  width: 100%;
  height: 20px;
  min-width: 0;
  white-space: nowrap;
}

.stock-task-form span {
  color: #06143a;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.stock-task-form input,
.stock-task-form button {
  min-width: 0;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #06143a;
  font: inherit;
  font-size: 8px;
  outline: none;
}

.stock-market-dots {
  display: flex;
  gap: 2px;
  min-width: 0;
  padding: 1px;
  border-radius: 8px;
  background: #f2f6fd;
}

.stock-market-dots button {
  width: 18px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #69758c;
  font-size: 7px;
  line-height: 1;
}

.stock-market-dots button.active {
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(45, 95, 210, 0.1);
}

.stock-task-form input {
  width: 58px;
  text-align: center;
}

.stock-task-form button {
  border-color: #b8d0ff;
  background: #eef5ff;
  color: var(--blue);
  font-weight: 800;
}

.stock-task-form input:focus,
.stock-task-form button:focus,
.stock-market-dots button:focus {
  border-color: #9dbdff;
  box-shadow: 0 0 0 2px rgba(47, 105, 255, 0.12);
}

.list {
  display: grid;
  gap: 3px;
}

.market-grid > .panel:nth-child(2) .list {
  min-height: 78px;
  gap: 4px;
  align-content: start;
}

.expandable-list-panel {
  cursor: pointer;
  touch-action: manipulation;
  overflow: hidden;
}

.expandable-list-panel.is-expanded {
  z-index: 40;
  height: 100%;
  overflow: visible;
  box-shadow: 0 16px 34px rgba(33, 58, 104, 0.18);
}

.market-grid > .panel:nth-child(2).is-expanded {
  z-index: 80;
}

.expandable-list-panel.is-expanded .list {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 34px;
  z-index: 2;
  max-height: 260px;
  overflow: auto;
  padding: 0 0 7px;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 34px rgba(33, 58, 104, 0.18);
}

.expandable-list-panel .row:nth-child(n+6),
.expandable-list-panel .industry-row:nth-child(n+6) {
  display: none;
}

.expandable-list-panel #industryList .industry-row:nth-child(6) {
  display: grid;
}

.expandable-list-panel.is-expanded .row:nth-child(n+6),
.expandable-list-panel.is-expanded .industry-row:nth-child(n+6),
body.is-searching .expandable-list-panel .row:nth-child(n+6),
body.is-searching .expandable-list-panel .industry-row:nth-child(n+6) {
  display: grid;
}

.is-filtered-out {
  display: none !important;
}

.industry-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 12px;
  padding-bottom: 0;
  color: #06143a;
  font-size: 7px;
  line-height: 1;
  white-space: nowrap;
}

.industry-row b {
  font-weight: 900;
}

.industry-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.industry-row .price {
  color: #06143a;
  font-weight: 800;
  white-space: nowrap;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  min-height: 12px;
  font-size: 7px;
  line-height: 1.05;
}

.row.no-row-icon {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.row img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.row b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  line-height: 1.05;
}

.row small {
  display: block;
  color: var(--muted);
  font-size: 6px;
  line-height: 1.05;
}

.row .price {
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.row .up,
.row .down,
.row .flat {
  font-size: 7px;
  white-space: nowrap;
}

.compact {
  min-height: 108px;
}

.compact .row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 12px;
  column-gap: 4px;
}

.compact .row img,
.compact .row small {
  display: none;
}

.compact .row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact .row .price {
  white-space: nowrap;
}

.compact .row .up,
.compact .row .down,
.compact .row .flat {
  white-space: nowrap;
}

.predictions,
.news-panel {
  margin-top: 8px;
}

.analysis-title {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.analysis-title h2 {
  flex: 0 0 auto;
}

.analysis-title .market-tabs {
  flex: 0 0 auto;
}

.analysis-title .tabs {
  margin-left: auto;
}

.tabs {
  display: flex;
  gap: 0;
  padding: 1px;
  border-radius: 8px;
  background: #f4f7fd;
  border: 1px solid #e3e9f4;
}

.market-tabs {
  display: flex;
  gap: 2px;
  padding: 1px;
  border-radius: 8px;
  background: #f2f6fd;
}

.market-tabs button {
  width: 18px;
  height: 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #69758c;
  font-size: 7px;
  line-height: 1;
}

.market-tabs button.active {
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(45, 95, 210, 0.1);
}

.tabs button {
  width: 40px;
  height: 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6d7890;
  font-size: 7px;
}

.tabs button.active {
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(45, 95, 210, 0.1);
}

.tabs button:disabled,
.tabs button.is-disabled {
  color: #b5bdca;
  background: transparent;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.58;
}

.updated {
  margin: 0;
  text-align: right;
  color: #7a8498;
  font-size: 6px;
}

.prediction-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(104px, 31%);
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 3px;
  border-top: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.prediction-grid::-webkit-scrollbar {
  display: none;
}

.prediction-card {
  display: flex;
  min-width: 0;
  min-height: 150px;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 1px solid #e2e9f4;
  border-radius: 8px;
  background: #fff;
  scroll-snap-align: start;
}

.prediction-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
  font-size: 7px;
  line-height: 1;
  color: #66748a;
}

.stock-analysis-btn {
  border: 1px solid rgba(47, 105, 255, 0.22);
  border-radius: 8px;
  background: #eef5ff;
  color: #1c62d8;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 6px;
  white-space: nowrap;
}

.prediction-footer .more-link {
  display: none !important;
}

.stock-analysis-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 12, 28, 0.72);
}

.stock-analysis-panel {
  position: relative;
  width: min(92vw, 420px);
  max-height: 78vh;
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 20, 60, 0.32);
  padding: 16px 16px 14px;
}

.stock-analysis-panel h3 {
  margin: 0 26px 4px 0;
  color: #00123f;
  font-size: 16px;
  line-height: 1.25;
}

.stock-analysis-meta {
  margin-bottom: 10px;
  color: #6f7b91;
  font-size: 10px;
}

.stock-analysis-conclusion {
  display: inline-block;
  margin-bottom: 8px;
  color: #1763d1;
  font-size: 12px;
}

.stock-analysis-panel p {
  margin: 0;
  color: #1e2a44;
  font-size: 12px;
  line-height: 1.65;
}

.stock-analysis-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stock-analysis-links a {
  color: #1f67df;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.stock-analysis-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 13px;
  background: #eef3fb;
  color: #526174;
  font-size: 20px;
  line-height: 1;
}

.prediction-head {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 4px;
}

.prediction-head img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: contain;
  background: #fff;
}

.prediction-head h3 {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  font-size: 9px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-head small {
  flex: 0 0 auto;
  color: #69758c;
  font-size: 6px;
  font-weight: 700;
}

.prediction-card canvas {
  display: block;
  width: 100%;
  max-width: 138px;
  height: 74px;
  margin: 0 auto;
  cursor: zoom-in;
  border-radius: 6px;
  background: #f7f9fd;
}

.prediction-chart {
  display: block;
  width: 100%;
  max-width: 138px;
  height: 74px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
  background: #f7f9fd;
}

/* 全屏 lightbox */
.pred-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 54px 0 18px;
  cursor: zoom-out;
  animation: pred-lb-in .18s ease;
}
.pred-lightbox img {
  width: 100vw;
  max-width: 100vw;
  max-height: calc(100dvh - 72px);
  height: auto;
  border-radius: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  object-fit: contain;
}
.pred-lightbox-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  font-size: 24px;
  color: #fff;
  background: rgba(18, 28, 48, 0.72);
  border: 1px solid rgba(180, 210, 255, 0.42);
  cursor: pointer;
  line-height: 1;
  opacity: .92;
  box-shadow: 0 0 16px rgba(80, 148, 255, 0.42);
}
@keyframes pred-lb-in {
  from { opacity:0; transform:scale(.95); }
  to   { opacity:1; transform:scale(1); }
}

.prediction-card p {
  display: block;
  margin: 0;
  color: #2f3b55;
  font-size: 7px;
  line-height: 1.45;
}

.badge {
  align-self: flex-start;
  min-width: 30px;
  padding: 1px 5px;
  border-radius: 8px;
  background: #eaf7ef;
  color: var(--green);
  text-align: center;
  font-size: 7px;
  font-weight: 800;
}

.badge.warn {
  background: #fff4df;
  color: #bd7600;
}

.badge.risk {
  background: #ffe9eb;
  color: var(--red);
}

.confidence {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: auto;
  border-radius: 0;
  border: 0;
  color: #168445;
  font-size: 7px;
  font-weight: 900;
}

.confidence span {
  display: inline;
  color: #65728a;
  font-weight: 600;
}

.bar {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: #e8edf6;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3f7bff, #20ad66);
}

.more-link {
  display: block;
  padding-top: 4px;
  text-align: center;
  color: #7a8498;
  font-size: 8px;
  font-weight: 700;
}

.prediction-footer {
  position: relative;
  min-height: 16px;
  padding-top: 4px;
}

.prediction-footer p {
  margin: 0;
  max-width: 58%;
  color: var(--red);
  font-size: 8px;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.prediction-footer .more-link {
  display: none !important;
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  padding-top: 0;
  white-space: nowrap;
}

.prediction-footer .updated {
  position: absolute;
  right: 0;
  top: 5px;
  white-space: nowrap;
}

.bolt {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.news-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 0 4px;
}

.news-tabs button {
  border: 1px solid #e1e8f3;
  border-radius: 8px;
  background: #fff;
  color: #68748b;
  padding: 1px 5px;
  white-space: nowrap;
  font-size: 7px;
}

.news-tabs button.active {
  border-color: #b8d0ff;
  background: #eef5ff;
  color: var(--blue);
  font-weight: 800;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}

.news-card {
  min-height: 0;
  padding: 4px 5px;
  border: 1px solid #e2e9f4;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.news-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 4px;
}

.news-title-button,
.deep-news-card button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101b36;
  text-align: left;
  font: inherit;
}

.news-title-button {
  display: flex;
  align-items: center;
  min-width: 0;
}

.news-title-button strong,
.deep-news-card button {
  display: inline-block;
  font-size: 8px;
  line-height: 1.2;
  font-weight: 900;
}

.news-title-button strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-pill {
  display: inline-flex;
  align-items: center;
  height: 10px;
  margin-right: 3px;
  padding: 0 3px;
  border-radius: 6px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 6px;
  font-weight: 900;
  vertical-align: 1px;
}

.news-link-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.news-link-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.news-card .meta {
  display: none;
}

.news-card h3 {
  margin: 0;
  color: #101b36;
  font-size: 8px;
  line-height: 1.45;
}

.news-card p {
  margin: 4px 0 0;
  color: #4f5a70;
  font-size: 7px;
  line-height: 1.55;
}

.news-detail,
.deep-news-body {
  display: none;
}

.news-card.is-open .news-detail,
.deep-news-card.is-open .deep-news-body {
  display: block;
}

.news-detail a,
.deep-news-body a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  margin-top: 4px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
}

.deep-news {
  margin-top: 8px;
}

.deep-news h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 9px;
  line-height: 1;
}

.deep-news-list {
  display: grid;
  gap: 5px;
}

.deep-news-card {
  padding: 6px;
  border: 1px solid #e2e9f4;
  border-radius: 8px;
  background: #fff;
}

.deep-news-body p {
  margin: 5px 0 0;
  color: #46536d;
  font-size: 7px;
  line-height: 1.6;
}

.news-panel .section-title {
  gap: 4px;
  min-height: 20px;
  margin-bottom: 4px;
}

.news-panel .section-title h2 {
  flex: 0 0 auto;
  font-size: 11px;
}

.news-panel .section-title > a {
  display: none;
}

.news-panel .section-title .news-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 2px;
  padding: 0;
  justify-content: flex-end;
  gap: 2px;
}

.news-panel .news-tabs button {
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  font-size: 6px;
  line-height: 1;
}

.news-panel .news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid #e2e9f4;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.news-column {
  min-width: 0;
}

.news-column-title {
  height: 13px;
  margin-bottom: 2px;
  color: #06143a;
  font-size: 7px;
  line-height: 13px;
  font-weight: 900;
}

.news-list {
  display: grid;
  gap: 1px;
}

.news-panel .news-time {
  height: 7px;
  color: #a0a9ba;
  font-size: 5px;
  line-height: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-panel .news-card {
  min-height: 0;
  padding: 2px 3px;
  border-radius: 8px;
  border-color: #edf2fa;
  box-shadow: none;
}

.news-panel .news-row {
  grid-template-columns: minmax(0, 1fr) 13px;
  gap: 2px;
}

.news-panel .news-title-button strong {
  font-size: 7px;
  line-height: 1.1;
}

.news-panel .news-pill,
.news-panel .meta {
  display: none;
}

.news-panel .news-link-icon {
  width: 13px;
  height: 13px;
}

.news-panel .news-link-icon img {
  width: 12px;
  height: 12px;
}

.news-panel .news-detail p {
  margin: 3px 0 1px;
  color: #46536d;
  font-size: 7px;
  line-height: 1.55;
}

.news-panel .news-card.is-open {
  background: #fff;
  box-shadow: 0 8px 18px rgba(33, 58, 104, 0.12);
}

.news-empty {
  padding: 4px 2px;
  color: #9aa4b5;
  font-size: 7px;
}

.news-panel .section-title {
  align-items: center;
  gap: 2px;
  min-height: 18px;
  margin-bottom: 2px;
}

.news-panel .section-title h2 {
  flex: 0 0 auto;
  font-size: 10px;
}

.news-panel .section-title .news-tabs {
  margin-left: 0;
  gap: 1px;
  justify-content: flex-start;
}

.news-panel .news-tabs button {
  height: 14px;
  padding: 0 3px;
  border-radius: 6px;
  font-size: 5px;
  line-height: 14px;
}

.news-panel .news-grid {
  gap: 4px;
  padding: 4px;
  border-radius: 9px;
  align-items: start;
}

.news-column-title {
  height: 11px;
  margin-bottom: 1px;
  font-size: 6px;
  line-height: 11px;
}

.news-list {
  gap: 1px;
}

.news-panel .news-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.news-panel .news-card.is-open {
  background: transparent;
  box-shadow: none;
}

.news-panel .news-row {
  grid-template-columns: 31px minmax(0, 1fr) 10px;
  min-height: 15px;
  gap: 2px;
  align-items: center;
}

.news-panel .news-time {
  display: block;
  height: auto;
  color: #a9b0be;
  font-size: 5px;
  line-height: 1.2;
}

.news-panel .news-title-button strong {
  font-size: 7px;
  line-height: 1.25;
}

.news-panel .news-link-icon {
  width: 10px;
  height: 10px;
}

.news-panel .news-link-icon img {
  width: 9px;
  height: 9px;
}

.news-panel .news-detail p {
  margin: 2px 0 3px 33px;
  font-size: 7px;
  line-height: 1.45;
}

.news-panel [data-category="股市"] .news-title-button strong {
  color: #1f62d6;
}

.news-panel [data-category="商品"] .news-title-button strong {
  color: #18823e;
}

.news-panel [data-category="能源"] .news-title-button strong {
  color: #8a5a22;
}

.news-panel [data-category="AI产业链"] .news-title-button strong {
  color: #111827;
}

.news-panel [data-category="其它"] .news-title-button strong {
  color: #667085;
}

.news-panel .news-tabs button[data-category="股市"] {
  color: #1f62d6;
}

.news-panel .news-tabs button[data-category="商品"] {
  color: #18823e;
}

.news-panel .news-tabs button[data-category="能源"] {
  color: #8a5a22;
}

.news-panel .news-tabs button[data-category="AI产业链"] {
  color: #111827;
}

.news-panel .news-tabs button[data-category="其它"] {
  color: #667085;
}

/* Final override: keep market news visible in local file preview and on mobile. */
.news-panel {
  display: block !important;
  height: auto !important;
  min-height: 230px !important;
  overflow: visible !important;
}

.news-panel .section-title {
  display: flex !important;
}

.news-panel .news-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  min-height: 190px !important;
  height: auto !important;
  overflow: visible !important;
}

.news-panel .news-column,
.news-panel .news-list {
  display: block !important;
  min-height: 170px !important;
  height: auto !important;
}

.news-panel .news-card,
.news-panel .news-empty {
  display: block !important;
  min-height: 15px !important;
}

.news-panel .news-row {
  display: grid !important;
}

.news-panel .news-title-button {
  display: block !important;
}

.news-panel .news-list {
  display: grid;
  gap: 2px;
  min-height: 168px;
  max-height: 238px;
  overflow-y: auto;
  padding-right: 1px;
  scrollbar-width: none;
}

.news-panel .news-list::-webkit-scrollbar {
  display: none;
}

.news-panel [data-category="股市"] .news-title-button strong {
  color: #1f62d6;
}

.news-panel [data-category="商品"] .news-title-button strong {
  color: #18823e;
}

.news-panel [data-category="能源"] .news-title-button strong {
  color: #8a5a22;
}

.news-panel [data-category="AI产业链"] .news-title-button strong {
  color: #111827;
}

.news-panel [data-category="其它"] .news-title-button strong {
  color: #667085;
}

.news-panel .news-tabs button[data-category="股市"] {
  color: #1f62d6;
}

.news-panel .news-tabs button[data-category="商品"] {
  color: #18823e;
}

.news-panel .news-tabs button[data-category="能源"] {
  color: #8a5a22;
}

.news-panel .news-tabs button[data-category="AI产业链"] {
  color: #111827;
}

.news-panel .news-tabs button[data-category="其它"] {
  color: #667085;
}

/* Stable news layout restored from the 6/14 working version. */
.news-panel {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.news-panel .section-title {
  display: flex !important;
  align-items: center !important;
  min-height: 18px !important;
  margin-bottom: 2px !important;
}

.news-panel .news-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 4px !important;
  border: 1px solid #e2e9f4 !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.76) !important;
  overflow: visible !important;
}

.news-panel .news-column {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.news-panel .news-column-title {
  height: 11px !important;
  margin-bottom: 1px !important;
  color: #06143a !important;
  font-size: 6px !important;
  line-height: 11px !important;
  font-weight: 900 !important;
}

.news-panel .news-list {
  display: grid !important;
  gap: 2px !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.news-panel .news-card,
.news-panel .news-empty {
  display: block !important;
  min-height: 0 !important;
  padding: 2px 3px !important;
  border: 1px solid #edf2fa !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.news-panel .news-row {
  display: grid !important;
  grid-template-columns: 31px minmax(0, 1fr) 10px !important;
  min-height: 15px !important;
  gap: 2px !important;
  align-items: center !important;
}

.news-panel .news-title-button {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: left !important;
}

.news-panel .news-title-button strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 7px !important;
  line-height: 1.25 !important;
}

.news-panel .news-time {
  display: block !important;
  height: auto !important;
  color: #a9b0be !important;
  font-size: 5px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.news-panel .news-link-icon {
  display: grid !important;
  width: 10px !important;
  height: 10px !important;
  place-items: center !important;
}

.news-panel .news-link-icon img {
  width: 9px !important;
  height: 9px !important;
}

.news-panel .news-detail {
  display: none !important;
}

.news-panel .news-card.is-open .news-detail {
  display: block !important;
}

.news-panel .news-detail p {
  margin: 2px 0 3px 33px !important;
  color: #46536d !important;
  font-size: 7px !important;
  line-height: 1.45 !important;
}

/* RSS快讯左栏最终压缩覆盖：去线、去胶囊、减半行距。 */
.news-panel .news-column:first-child .news-list {
  gap: 0 !important;
}

.news-panel .news-column:first-child .news-card {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.news-panel .news-column:first-child .news-row {
  min-height: 11px !important;
  gap: 1px !important;
  padding: 0 !important;
  line-height: 1.12 !important;
}

.news-panel .news-column:first-child .news-title-button strong {
  font-size: 6.5px !important;
  line-height: 1.05 !important;
}

.news-panel .news-column:first-child .news-time {
  font-size: 4.5px !important;
  line-height: 1.15 !important;
}

.news-panel .news-column:first-child .news-link-icon {
  width: 9px !important;
  height: 9px !important;
}

.news-panel .news-column:first-child .news-link-icon img {
  width: 8px !important;
  height: 8px !important;
}

.news-panel .news-column:first-child .news-detail p {
  margin: 1px 0 2px 32px !important;
  font-size: 6.5px !important;
  line-height: 1.25 !important;
}

/* Ultra-compact news rows to save vertical space. */
.news-panel .news-grid {
  gap: 3px !important;
  padding: 3px !important;
}

.news-panel .news-list {
  gap: 0 !important;
}

.news-panel .news-column-title {
  height: 9px !important;
  margin-bottom: 0 !important;
  font-size: 5.5px !important;
  line-height: 9px !important;
}

.news-panel .news-card,
.news-panel .news-empty {
  padding: 1px 2px !important;
  border-radius: 5px !important;
  border-width: 1px !important;
}

.news-panel .news-row {
  grid-template-columns: 25px minmax(0, 1fr) 8px !important;
  min-height: 11px !important;
  gap: 1px !important;
}

.news-panel .news-time {
  font-size: 4.5px !important;
  line-height: 1 !important;
}

.news-panel .news-title-button strong {
  font-size: 6.3px !important;
  line-height: 1.05 !important;
}

.news-panel .news-link-icon {
  width: 8px !important;
  height: 8px !important;
}

.news-panel .news-link-icon img {
  width: 7px !important;
  height: 7px !important;
}

.news-panel .news-detail p {
  margin: 1px 0 2px 26px !important;
  font-size: 6.5px !important;
  line-height: 1.28 !important;
}

.sources {
  padding: 10px 4px 2px;
  color: #65728a;
}

.sources h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 9px;
}

.sources p {
  margin: 0;
  font-size: 7px;
  line-height: 1.6;
}

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

.source-grid article {
  min-width: 0;
  padding: 6px;
  border: 1px solid #e2e9f4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.source-grid h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 8px;
  line-height: 1.15;
}

.source-grid p {
  margin: 0;
  color: #35415a;
  font-size: 6.5px;
  line-height: 1.35;
}

.source-grid small {
  display: block;
  margin-top: 3px;
  color: #7a8498;
  font-size: 6px;
  line-height: 1.35;
}

.market-detail {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px 12px calc(88px + env(safe-area-inset-bottom));
  background: rgba(6, 20, 58, 0.22);
}

.market-detail.is-open {
  display: flex;
}

.market-detail-panel {
  width: min(100%, 406px);
  max-height: 72dvh;
  overflow: auto;
  padding: 12px;
  border: 1px solid #dfe7f4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(23, 42, 79, 0.2);
}

.market-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-detail-head h2 {
  margin: 0;
  font-size: 12px;
}

.market-detail-head button {
  width: 24px;
  height: 24px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  line-height: 1;
}

.market-detail-panel p {
  margin: 6px 0 10px;
  color: #65728a;
  font-size: 7px;
}

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

.stock-market-card {
  min-width: 0;
  height: 214px;
  padding: 6px;
  border: 1px solid #e2e9f4;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.stock-market-card h3 {
  margin: 0 0 5px;
  font-size: 9px;
}

.stock-market-card .tradingview-widget-container {
  height: 142px;
}

.stock-market-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-height: 43px;
  overflow: auto;
  padding-top: 4px;
}

.stock-market-links a,
.stock-market-links span {
  min-width: 0;
  padding: 2px 4px;
  border: 1px solid #e4ebf6;
  border-radius: 6px;
  background: #f7faff;
  color: #102044;
  font-size: 7px;
  line-height: 1.1;
  white-space: nowrap;
}

.stock-market-links small {
  margin-left: 2px;
  color: #738098;
  font-size: 6px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(100vw, 430px);
  min-height: calc(34px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 3px 16px calc(2px + env(safe-area-inset-bottom));
  border: 1px solid rgba(138, 184, 255, 0.55);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 -5px 16px rgba(61, 121, 255, 0.16),
    inset 0 1px 8px rgba(137, 190, 255, 0.2);
  backdrop-filter: blur(20px);
}

.bottom-nav a {
  position: relative;
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 29px;
  border-radius: 12px;
  color: #8a94a8;
  font-size: 7px;
  font-weight: 700;
  transition: color 0.16s ease, filter 0.16s ease, transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.bottom-nav a.active {
  color: var(--blue);
  text-shadow: 0 0 7px rgba(80, 148, 255, 0.45);
}

.bottom-nav a img,
.bottom-nav a .nav-symbol {
  filter:
    drop-shadow(0 0 4px rgba(102, 163, 255, 0.38))
    drop-shadow(0 0 8px rgba(188, 218, 255, 0.28));
}

.bottom-nav a:active {
  transform: translateY(-1px) scale(0.98);
  color: #1f65ff;
  background:
    radial-gradient(circle at 50% 22%, rgba(47, 105, 255, 0.24), transparent 36px),
    radial-gradient(circle at 50% 75%, rgba(217, 155, 45, 0.28), transparent 42px);
  box-shadow:
    0 0 12px rgba(47, 105, 255, 0.42),
    0 0 16px rgba(217, 155, 45, 0.3),
    inset 0 0 9px rgba(255, 214, 116, 0.22);
}

.bottom-nav a:active img,
.bottom-nav a:active .nav-symbol {
  filter:
    drop-shadow(0 0 6px rgba(47, 105, 255, 0.72))
    drop-shadow(0 0 8px rgba(217, 155, 45, 0.58));
}

.bottom-nav img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.nav-symbol {
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 374px) {
  .brand b { font-size: 14px; }
  .brand small { font-size: 9px; }
  .hero h1 { font-size: 16px; }
}

/* Last-pass stable news layout restored from the 6/14 working version. */
.news-panel {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.news-panel .news-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 4px !important;
  border: 1px solid #e2e9f4 !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.76) !important;
  overflow: visible !important;
}

.news-panel .news-column,
.news-panel .news-list {
  display: grid !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.news-panel .news-list {
  gap: 2px !important;
  max-height: none !important;
  padding-right: 0 !important;
}

.news-panel .news-column-title {
  height: 11px !important;
  margin-bottom: 1px !important;
  color: #06143a !important;
  font-size: 6px !important;
  line-height: 11px !important;
  font-weight: 900 !important;
}

.news-panel .news-card,
.news-panel .news-empty {
  display: block !important;
  min-height: 0 !important;
  padding: 2px 3px !important;
  border: 1px solid #edf2fa !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.news-panel .news-row {
  display: grid !important;
  grid-template-columns: 31px minmax(0, 1fr) 10px !important;
  min-height: 15px !important;
  gap: 2px !important;
  align-items: center !important;
}

.news-panel .news-title-button {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: left !important;
}

.news-panel .news-title-button strong {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 7px !important;
  line-height: 1.25 !important;
}

.news-panel .news-time {
  display: block !important;
  height: auto !important;
  color: #a9b0be !important;
  font-size: 5px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.news-panel .news-link-icon {
  display: grid !important;
  width: 10px !important;
  height: 10px !important;
  place-items: center !important;
}

.news-panel .news-link-icon img {
  width: 9px !important;
  height: 9px !important;
}

.news-panel .news-detail {
  display: none !important;
}

.news-panel .news-card.is-open .news-detail {
  display: block !important;
}

.news-panel .news-detail p {
  margin: 2px 0 3px 33px !important;
  color: #46536d !important;
  font-size: 7px !important;
  line-height: 1.45 !important;
}
