:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #6a6f76;
  --line: #dfe3e8;
  --green: #0b8f78;
  --green-soft: #e2f6f1;
  --red: #c9342b;
  --red-soft: #fae8e6;
  --yellow: #a66c00;
  --yellow-soft: #fff4d6;
  --black: #111111;
}

@media (max-width: 700px) {
  #article-module {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  #article-module.is-hidden {
    display: none;
  }

  #article-module .article-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--obsidian-line);
    border-radius: 8px;
    box-shadow: none;
  }

  #article-module .brand {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
  }

  #article-module .brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  #article-module h1 {
    font-size: 21px;
    line-height: 1.15;
  }

  #article-module .article-subtitle {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
  }

  #article-module .actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  #article-module .actions button {
    min-height: 36px !important;
    padding: 0 6px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  #article-module .article-summary {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 8px;
  }

  #article-module .summary-pill {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: none;
  }

  #article-module .summary-pill span {
    font-size: 10px;
  }

  #article-module .summary-pill strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #article-module .article-panel {
    overflow: hidden;
    border-radius: 8px;
  }

  #article-module .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
  }

  #article-module .section-head h2 {
    font-size: 16px;
  }

  #article-module .section-head span {
    max-width: 52%;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #article-module .article-list {
    gap: 8px;
    padding: 8px;
    background-size: 22px 100%;
  }

  #article-module .article-card {
    gap: 6px;
    min-width: 0;
    padding: 9px 9px 9px 11px;
    border-radius: 8px;
    box-shadow: none;
  }

  #article-module .article-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  #article-module .article-card h3 {
    margin: 3px 0 0;
    font-size: 14px;
    line-height: 1.28;
  }

  #article-module .article-title-button {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #article-module .article-delete-button {
    min-height: 26px;
    padding: 0 7px;
    font-size: 11px;
  }

  #article-module .article-meta,
  #article-module .article-file-meta {
    font-size: 10px;
    line-height: 1.25;
  }

  #article-module .article-related-inline,
  #article-module .article-tags {
    max-height: 44px;
    overflow: hidden;
  }

  #article-module .article-related-inline span,
  #article-module .article-tag,
  #article-module .article-type-badge {
    min-height: 17px;
    padding: 1px 5px;
    font-size: 10px;
  }

  #article-module .article-summary-text {
    font-size: 11px;
    line-height: 1.42;
    -webkit-line-clamp: 2;
  }

  #article-module .article-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #article-module .article-card-actions > * {
    justify-content: center;
    min-width: 0;
    min-height: 28px;
    padding: 0 6px;
    overflow: hidden;
    border-radius: 8px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .article-detail-dialog,
  .article-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .article-reader-topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 10px;
  }

  .article-reader-topbar h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #article-detail-meta {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .article-detail-body {
    max-height: none;
    padding: 0 13px;
  }

  .article-reader-layout {
    width: 100%;
    padding: 14px 0 24px;
  }

  .article-reader-summary,
  .article-related-stocks,
  .article-reader-meta-section {
    margin-bottom: 14px;
    padding: 10px 11px;
    border-radius: 8px;
  }

  .article-reader-summary p,
  .article-reader-content {
    font-size: 14px;
    line-height: 1.75;
  }

  .article-reader-content h2 {
    margin-top: 18px;
    font-size: 18px;
  }

  .article-reader-content h3 {
    margin-top: 16px;
    font-size: 16px;
  }

  .article-reader-content p,
  .article-reader-content li {
    margin-bottom: 10px;
  }

  .article-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 9px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .article-detail-actions .is-hidden {
    display: none;
  }

  .article-detail-link {
    width: 100%;
    min-height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }

  .article-form-body {
    max-height: calc(100dvh - 112px);
    overflow: auto;
    padding: 12px;
  }

  .article-form textarea {
    min-height: 34vh;
  }
}

@media (max-width: 700px) {
  #article-module {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #article-module.is-hidden {
    display: none !important;
  }

  #article-module .article-topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--obsidian-line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  #article-module .brand {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
  }

  #article-module .brand img {
    width: 34px !important;
    height: 34px !important;
  }

  #article-module .actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  #article-module .actions button {
    min-height: 36px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }

  #article-module .article-summary {
    display: grid !important;
    grid-template-columns: 0.72fr 1.28fr !important;
    gap: 8px !important;
  }

  #article-module .article-list {
    gap: 8px !important;
    padding: 8px !important;
  }

  #article-module .article-card {
    gap: 6px !important;
    min-width: 0 !important;
    padding: 9px 9px 9px 11px !important;
    box-shadow: none !important;
 }

  #article-module .article-card-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
  }

  #article-module .article-card h3 {
    font-size: 14px !important;
  }

  #article-module .article-card-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #article-module .article-card-actions > * {
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .article-detail-dialog,
  .article-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .article-detail-body {
    max-height: none !important;
    padding: 0 13px !important;
  }

  .article-reader-layout {
    width: 100% !important;
    padding: 14px 0 24px !important;
  }

  .article-detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 700px) {
  .mobile-card-actions {
    gap: 6px;
  }

  .mobile-card-actions .intro-button,
  .mobile-card-actions .remove-watchlist-button {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    margin-left: 0;
  }

  .mobile-card-actions .remove-watchlist-button {
    flex: 0 0 auto;
    padding-inline: 8px;
  }
}

.mobile-action-toggle {
  display: none;
}

@media (max-width: 700px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: start;
  }

  .brand {
    grid-column: 1;
  }

  .mobile-action-toggle {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 8px;
    border-color: #d8e0ec;
    background: #fff;
    color: #111827;
    box-shadow: none;
  }

  .mobile-action-toggle span {
    font-size: 16px;
    line-height: 1;
  }

  .stock-search-inline {
    grid-column: 1 / -1;
  }

  .actions {
    grid-column: 1 / -1;
    display: none !important;
    margin-top: -2px;
  }

  .topbar.actions-open .actions {
    display: grid !important;
  }

  .index-tape {
    margin-bottom: 5px;
  }

  .index-tape-content {
    min-height: 28px !important;
    gap: 10px !important;
    align-items: center;
  }

  .index-chip {
    display: inline-grid !important;
    grid-template-columns: auto auto;
    column-gap: 5px;
    row-gap: 0;
    align-items: baseline;
    min-width: max-content !important;
    min-height: 24px !important;
    padding: 2px 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .index-chip-name {
    font-size: 11px !important;
    font-weight: 800;
  }

  .index-chip-price {
    display: none;
  }

  .index-chip-change {
    font-size: 11px !important;
    font-weight: 800;
  }

  .index-chip-spark,
  .index-spark {
    display: none;
  }

  .market-volume-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 5px;
    padding: 6px 8px !important;
  }

  .market-volume-head {
    display: contents;
  }

  .market-volume-head > div {
    min-width: 72px;
  }

  .market-volume-kicker {
    display: block;
    font-size: 9px;
    line-height: 1.1;
  }

  #market-volume-ratio {
    font-size: 15px;
    line-height: 1.1;
  }

  .market-volume-status {
    grid-column: 2;
    justify-self: end;
    padding: 2px 7px;
    font-size: 10px;
  }

  .market-volume-track {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    height: 10px;
    margin-top: 16px;
  }

  .market-volume-marker {
    top: 50%;
    padding: 1px 5px;
    font-size: 9px;
  }

  .market-volume-meta {
    grid-column: 1 / -1;
    font-size: 9px;
    line-height: 1.15;
  }

  .message {
    margin-bottom: 5px;
  }
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea,
select,
table {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 0 24px;
}

.app-shell {
  display: grid;
  gap: 10px;
}

.is-hidden {
  display: none !important;
}

.home-view,
.module-view {
  display: grid;
  gap: 12px;
}

.home-hero {
  padding: 14px 0 4px;
}

.home-brand {
  align-items: flex-start;
}

.home-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

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

.module-card {
  display: grid;
  gap: 18px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.module-kicker {
  color: var(--muted);
  font-size: 12px;
}

.module-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 6px;
}

.index-tape {
  position: sticky;
  top: 8px;
  z-index: 8;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.index-tape.is-empty {
  position: static;
}

.index-tape-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
}

.index-tape-label {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.index-tape-track {
  overflow: hidden;
  min-width: 0;
}

.index-tape-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  min-width: 100%;
  animation: index-marquee 42s linear infinite;
  will-change: transform;
}

.index-tape:hover .index-tape-content {
  animation-play-state: paused;
}

.index-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.index-chip-name {
  color: var(--text);
  font-weight: 700;
}

.index-chip-price {
  color: var(--text);
}

.index-chip-change {
  font-size: 11px;
}

.index-empty {
  color: var(--muted);
  font-size: 12px;
}

.market-volume-card {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  border-color: var(--line);
  background: var(--surface);
}

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

.market-volume-head > div {
  display: grid;
  gap: 4px;
}

.market-volume-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#market-volume-ratio {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.market-volume-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.market-volume-track {
  position: relative;
  height: 36px;
  margin: 8px 0 0;
  border-radius: 8px;
  background: #edf2f7;
  box-shadow: inset 0 1px 3px rgb(15 23 42 / 8%);
}

.market-volume-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #38bdf8 0%, #6478ff 38%, #f59e0b 66%, #ef4444 100%);
  transition: width 0.35s ease;
}

.market-volume-marker {
  position: absolute;
  top: 50%;
  left: 44.4%;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgb(15 23 42 / 16%);
  transform: translate(-50%, -50%);
  transition: left 0.35s ease;
  white-space: nowrap;
}

.market-volume-threshold {
  position: absolute;
  top: -24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transform: translateX(-50%);
}

.threshold-85 {
  left: 27.777%;
}

.threshold-100 {
  left: 44.444%;
}

.threshold-115 {
  left: 61.111%;
}

.threshold-120 {
  left: 66.667%;
}

.market-volume-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.market-volume-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.market-breadth {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.market-breadth strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.volume-cold .market-volume-status,
.volume-weak .market-volume-status {
  background: #eaf8f4;
  color: var(--green);
}

.volume-mainline .market-volume-status {
  background: #fff4e6;
  color: #b45309;
}

.volume-hot .market-volume-status {
  background: #fff1f2;
  color: var(--red);
}

@keyframes index-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 6px));
  }
}

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

.dashboard-clock {
  display: grid;
  gap: 2px;
  min-width: 84px;
  margin-left: 2px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-clock-time {
  font-size: 17px;
  font-weight: 800;
}

.dashboard-clock-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center 18%;
}

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

.mobile-header-meta,
.mobile-header-note {
  display: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 16px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button {
  border: 1px solid var(--black);
  border-radius: 8px;
  background: var(--black);
  color: #ffffff;
  padding: 7px 11px;
  cursor: pointer;
  min-height: 34px;
}

button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status-grid {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  flex-wrap: wrap;
  margin: 0 0 6px 42px;
}

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

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 0;
  padding: 0;
  color: var(--muted);
}

.stat span,
.section-head span {
  display: inline;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: inline;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.message {
  margin: 6px 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.message.ok {
  border-color: #b8e3d9;
  background: var(--green-soft);
  color: #086b5b;
}

.message.warn {
  border-color: #f0d38a;
  background: var(--yellow-soft);
  color: var(--yellow);
}

.message.error {
  border-color: #efb8b2;
  background: var(--red-soft);
  color: var(--red);
}

.layout {
  display: block;
}

.stock-list-switcher {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stock-list-button {
  min-height: 30px;
  padding: 5px 12px;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.stock-list-button:hover {
  transform: translateY(-1px);
}

.stock-list-button.active {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

.stock-list-button.loading {
  opacity: 0.8;
}

.watchlist-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin: 0 0 10px;
  overflow: visible;
}

.watchlist-groups[hidden] {
  display: none;
}

.watchlist-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.watchlist-group-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.watchlist-group-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.watchlist-group-item {
  display: flex;
  min-width: 0;
  cursor: pointer;
}

.watchlist-group-button {
  appearance: none;
  display: grid;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  white-space: normal;
}

.watchlist-group-button:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: #f8fbff;
}

.watchlist-group-item.active .watchlist-group-button {
  border-color: var(--blue);
  background: #eef5ff;
  color: var(--blue);
  box-shadow: 0 0 0 2px rgb(37 99 235 / 10%);
}

.watchlist-group-main,
.watchlist-group-metrics {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.watchlist-group-main {
  justify-content: space-between;
}

.watchlist-group-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watchlist-group-mode {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.watchlist-group-average {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
}

.watchlist-group-average strong {
  font-weight: 800;
}

.watchlist-group-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.article-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  overflow: hidden;
}

.table-panel {
  overflow: visible;
}

.industry-chain-view[hidden] {
  display: none;
}

.industry-chain-view {
  display: grid;
  gap: 10px;
  padding: 16px 18px 18px;
  background:
    radial-gradient(circle at 2% 8%, rgb(37 99 235 / 9%), transparent 24%),
    radial-gradient(circle at 98% 8%, rgb(37 99 235 / 8%), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, #fff 38%),
    var(--surface);
}

.chain-hero,
.chain-structure,
.chain-section,
.chain-core-logic {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chain-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: end;
  padding: 4px 10px 10px;
  border: 0;
  background: transparent;
  text-align: center;
}

.chain-kicker {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.chain-hero h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #0a2b66;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.chain-subtitle {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #0b3b7c;
  font-size: 21px;
  font-weight: 900;
}

.chain-note {
  grid-column: 1 / -1;
  margin: 2px 0 8px;
  color: #374151;
  font-size: 15px;
}

.chain-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.chain-summary span {
  display: grid;
  gap: 3px;
  padding: 7px 10px;
  border: 1px solid #dbe7f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgb(15 23 42 / 5%);
}

.chain-summary strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-summary small {
  color: var(--muted);
  font-size: 11px;
}

.chain-structure {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-style: dashed;
  border-color: #9db8df;
  background: rgb(255 255 255 / 82%);
}

.pcb-stack-card {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.pcb-stack-card > strong {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 5px;
  background: #0a4a9f;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
}

.pcb-stack {
  width: min(230px, 100%);
  display: grid;
  gap: 4px;
  padding: 10px 20px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #eef4fb, #f9fbff);
  box-shadow: inset 0 0 0 1px rgb(10 74 159 / 12%);
}

.pcb-stack span {
  height: 13px;
  border-radius: 1px;
  background: #dfe7f2;
  transform: skewX(-18deg);
}

.pcb-stack span:nth-child(1),
.pcb-stack span:nth-child(5) {
  background: linear-gradient(90deg, #c77b33, #f4b66d);
}

.pcb-stack span:nth-child(3) {
  background: repeating-linear-gradient(90deg, #95a6bb 0 5px, #e4ebf3 5px 10px);
}

.pcb-stack-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.chain-structure strong {
  color: #10213f;
}

.chain-structure p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.chain-flow {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr;
  align-items: center;
  gap: 6px;
}

.chain-flow span {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--blue);
  font-weight: 800;
  text-align: center;
}

.chain-flow b {
  height: 2px;
  background: var(--blue);
  position: relative;
}

.chain-flow b::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--blue);
}

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

.chain-section {
  min-height: 202px;
  padding: 13px 14px 14px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 94%), rgb(255 255 255 / 80%)),
    var(--surface);
}

.chain-section:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  min-height: 145px;
}

.chain-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.chain-section-title {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.chain-section-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--blue);
  box-shadow: inset 0 -10px 22px rgb(255 255 255 / 20%);
  position: relative;
}

.chain-section-icon::before,
.chain-section-icon::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 3px solid rgb(255 255 255 / 90%);
  border-radius: 3px;
}

.chain-section-icon::after {
  inset: 21px 9px 9px 21px;
  border-width: 0 0 3px 3px;
}

.chain-section-index {
  display: inline;
  margin-right: 5px;
  color: currentColor;
  font-size: 22px;
  font-weight: 900;
}

.chain-section h4 {
  display: inline;
  margin: 0;
  color: currentColor;
  font-size: 22px;
  line-height: 1.1;
}

.chain-section p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chain-section-average {
  display: grid;
  justify-items: end;
  gap: 2px;
  white-space: nowrap;
}

.chain-section-average span {
  color: var(--muted);
  font-size: 11px;
}

.chain-section-average strong {
  font-size: 15px;
}

.chain-stock-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 7px;
}

.chain-stock-chip {
  display: grid;
  grid-template-columns: minmax(72px, auto) auto;
  gap: 1px 8px;
  min-width: 0;
  padding: 7px 8px 7px 14px;
  border: 1px solid rgb(15 23 42 / 8%);
  border-radius: 7px;
  background: rgb(255 255 255 / 82%);
  text-decoration: none;
  position: relative;
}

.chain-stock-chip::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.chain-stock-chip:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: #f8fbff;
  transform: translateY(-1px);
}

.chain-stock-name {
  color: var(--text);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-stock-code {
  grid-row: 2;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.chain-stock-chip strong {
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  font-size: 13px;
}

.chain-blue {
  --chain-theme: #2563eb;
  color: #0a4a9f;
  border-color: #8bb3ec;
  box-shadow: inset 3px 0 0 #2563eb;
}

.chain-orange {
  --chain-theme: #f97316;
  color: #d45700;
  border-color: #fdba74;
  box-shadow: inset 3px 0 0 #f97316;
}

.chain-green {
  --chain-theme: #16a34a;
  color: #27713a;
  border-color: #9bd3a4;
  box-shadow: inset 3px 0 0 #16a34a;
}

.chain-purple {
  --chain-theme: #7c3aed;
  color: #6b3aa1;
  border-color: #c4b5fd;
  box-shadow: inset 3px 0 0 #7c3aed;
}

.chain-red {
  --chain-theme: #ef4444;
  color: #b91c1c;
  border-color: #fca5a5;
  box-shadow: inset 3px 0 0 #ef4444;
}

.chain-orange .chain-section-icon {
  background: #f97316;
}

.chain-green .chain-section-icon {
  background: #2f8f48;
}

.chain-purple .chain-section-icon {
  background: #7c3aed;
}

.chain-red .chain-section-icon {
  background: #ef4444;
}

.chain-core-logic {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #0756a7;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.chain-core-logic strong {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
}

.chain-card-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 18%, rgb(96 165 250 / 24%), transparent 28%),
    linear-gradient(110deg, #071f57, #0d55b8);
  box-shadow: 0 14px 32px rgb(37 99 235 / 12%);
}

.chain-card-hero .chain-kicker {
  margin: 0 0 5px;
  color: #cfe2ff;
}

.chain-card-hero h3 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.chain-card-hero p {
  margin: 7px 0 0;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.chain-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chain-card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff4bf;
  color: #183153;
  font-size: 11px;
  font-weight: 900;
}

.chain-card-score {
  display: grid;
  gap: 3px;
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 8px;
  background: rgb(255 255 255 / 10%);
}

.chain-card-score span,
.chain-card-score small {
  color: #dbeafe;
  font-size: 11px;
  font-weight: 800;
}

.chain-card-score strong {
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.chain-card-briefs {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1fr;
  gap: 10px;
}

.chain-card-briefs article {
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chain-card-briefs strong {
  display: block;
  margin-bottom: 6px;
  color: #12366f;
  font-size: 15px;
}

.chain-card-briefs p {
  margin: 0;
  color: #41506b;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.chain-reference-images {
  display: grid;
  gap: 10px;
}

.chain-reference-image {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 5%);
}

.chain-reference-image figcaption {
  display: grid;
  gap: 6px;
  align-content: center;
}

.chain-reference-image strong {
  color: #12366f;
  font-size: 16px;
  line-height: 1.25;
}

.chain-reference-image span {
  color: #52627f;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 800;
}

.chain-reference-image img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid #edf2fb;
  border-radius: 8px;
  background: #f8fbff;
}

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

.chain-card-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 5%);
}

.chain-card-section > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--chain-theme, #2563eb), color-mix(in srgb, var(--chain-theme, #2563eb) 70%, #071836));
}

.chain-card-section > header small {
  display: block;
  margin-bottom: 4px;
  color: rgb(255 255 255 / 86%);
  font-size: 11px;
  font-weight: 800;
}

.chain-card-section > header h4 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.chain-card-section > header > strong {
  color: #fff;
  font-size: 17px;
  white-space: nowrap;
}

.chain-stock-card-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.chain-stock-card {
  min-height: 102px;
  padding: 10px 11px;
  border: 1px solid #e2ecf8;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: inset 3px 0 0 currentColor;
}

.chain-stock-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
}

.chain-card-name {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  text-decoration: none;
}

.chain-card-name strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-card-name code {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.chain-card-change {
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.chain-stock-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.chain-stock-card-tags span {
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, #fff);
  color: color-mix(in srgb, currentColor 78%, #0f172a);
  font-size: 10px;
  font-weight: 900;
}

.chain-stock-card-role {
  margin: 7px 0 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 720;
}

.chain-stock-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: #64748b;
  font-size: 11px;
  font-weight: 780;
}

.chain-stock-card-meta strong {
  color: var(--text);
}

.chain-cyan {
  --chain-theme: #0891b2;
  color: #0891b2;
  border-color: #7dd3fc;
  box-shadow: inset 3px 0 0 #0891b2;
}

.chain-cyan .chain-section-icon {
  background: #0891b2;
}

.chain-topic-tabs {
  padding: 10px 12px;
  overflow: visible;
}

.chain-topic-tab-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.chain-topic-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.chain-topic-tab:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: #f8fbff;
}

.chain-topic-tab.active {
  border-color: var(--blue);
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgb(37 99 235 / 10%);
}

.chain-topic-tab span {
  font-weight: 900;
}

.chain-topic-tab small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.chain-module-panel {
  overflow: visible;
}

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

.section-head-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
}

.article-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#article-module {
  --obsidian-accent: #7058d8;
  --obsidian-soft: #f4f2ff;
  --obsidian-line: #e4e0f5;
}

#article-module .article-topbar {
  border-color: var(--obsidian-line);
  background:
    linear-gradient(90deg, rgb(244 242 255 / 92%), rgb(255 255 255 / 96%)),
    #fff;
}

#sync-obsidian-button {
  border-color: var(--obsidian-line);
  background: var(--obsidian-soft);
  color: #3f2f89;
}

.summary-pill {
  display: inline-grid;
  gap: 2px;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.summary-pill strong {
  font-size: 15px;
}

.article-list {
  display: grid;
  gap: 7px;
  padding: 10px;
  background:
    linear-gradient(90deg, rgb(246 247 251 / 72%) 0 1px, transparent 1px),
    #fff;
  background-size: 30px 100%;
}

.article-card {
  display: grid;
  gap: 7px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
  border-left: 3px solid #d8dce5;
}

.article-card:has(.article-type-badge.obsidian) {
  border-left-color: var(--obsidian-accent);
  background: linear-gradient(90deg, rgb(244 242 255 / 62%), #fff 44%);
}

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

.article-card h3 {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.3;
}

.article-title-button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.article-title-button:hover {
  color: var(--red);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.article-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f5f6f8;
  color: var(--muted);
  font-size: 11px;
}

.article-type-badge.link {
  border-color: #b8e3d9;
  background: var(--green-soft);
  color: var(--green);
}

.article-type-badge.note {
  border-color: #cdd5df;
  background: #eef2f6;
  color: #3f4d5f;
}

.article-type-badge.file {
  border-color: #f0d38a;
  background: var(--yellow-soft);
  color: var(--yellow);
}

.article-type-badge.obsidian {
  border-color: #d8d1ff;
  background: var(--obsidian-soft);
  color: #4d3bb0;
}

.article-file-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f5f6f8;
  color: var(--muted);
  font-size: 11px;
}

.article-related-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.article-related-inline span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f7ff;
  color: #1b5ea8;
  font-size: 11px;
  font-weight: 800;
}

.article-related-inline code {
  color: #7890ad;
  font-family: inherit;
  font-size: 10px;
}

.article-summary-text {
  color: var(--text);
  display: -webkit-box;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 1px;
}

.article-link {
  color: var(--green);
  text-decoration: none;
}

.article-link:hover {
  text-decoration: underline;
}

.mobile-sort,
.mobile-stock-list {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
  table-layout: fixed;
  font-size: 13px;
}

col.col-index {
  width: 48px;
}

col.col-name {
  width: 16%;
}

col.col-concept {
  width: 19%;
}

col.col-price,
col.col-percent {
  width: 9%;
}

col.col-market-cap {
  width: 14%;
}

col.col-turnover {
  width: 17%;
}

col.col-three-day {
  width: 10%;
}

col.col-intro {
  width: 64px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: #fbfbfc;
}

.sort-button {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: inherit;
}

.sort-button:hover,
.sort-button:focus {
  color: var(--text);
  outline: none;
}

.sort-mark {
  color: var(--red);
  font-weight: 700;
}

th.col-index,
td:first-child {
  text-align: center;
}

th.col-price,
th.col-market-cap,
th.col-percent,
th.col-turnover,
th.col-three-day {
  text-align: right;
}

tbody tr.added-row {
  background: var(--green-soft);
}

.stock-name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-name-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.stock-joined {
  color: var(--red);
  font-size: 11px;
  white-space: nowrap;
}

.stock-code {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.15;
}

.concept-cell {
  overflow: hidden;
}

.concept-editor {
  display: block;
  width: 100%;
  min-height: 22px;
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.concept-editor:hover,
.concept-editor:focus {
  border-color: var(--line);
  background: #fbfbfc;
  outline: none;
}

.concept-editor.custom-concept {
  color: var(--red);
  font-weight: 700;
}

.concept-editor:empty::before {
  content: "点击填写";
  color: var(--muted);
}

.stock-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.stock-link:hover {
  color: var(--red);
  border-bottom-color: currentColor;
}

.kline-popup {
  position: fixed;
  z-index: 30;
  width: 628px;
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 16px 40px rgb(0 0 0 / 14%);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  pointer-events: none;
  visibility: hidden;
  backdrop-filter: blur(10px);
}

.kline-popup.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.kline-popup-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.kline-popup-head strong {
  font-size: 13px;
}

.kline-popup-head span,
.kline-popup-note {
  color: var(--muted);
  font-size: 11px;
}

.kline-popup-panel {
  min-width: 0;
  margin-bottom: 8px;
}

.kline-popup-panel-title {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

#kline-canvas,
#minute-canvas {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #fcfcfd;
}

#kline-canvas {
  height: 220px;
}

#minute-canvas {
  height: 190px;
}

.kline-popup-note {
  margin-top: 6px;
}

.number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.quote.positive {
  color: var(--red);
  font-weight: 700;
}

.quote.negative {
  color: var(--green);
  font-weight: 700;
}

.quote.flat {
  color: var(--muted);
}

.turnover-cell {
  min-width: 120px;
}

.turnover-live {
  color: var(--text);
  font-weight: 700;
}

.turnover-main,
.turnover-sub {
  display: inline;
}

.turnover-sub {
  color: var(--muted);
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.added {
  border-color: #8cd7c7;
  background: var(--green-soft);
  color: var(--green);
}

.badge.removed {
  border-color: #efb8b2;
  background: var(--red-soft);
  color: var(--red);
}

.history-list {
  padding: 10px;
  display: grid;
  gap: 8px;
  max-height: min(62vh, 560px);
  overflow: auto;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  display: grid;
  gap: 8px;
}

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

.history-title {
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.history-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(82vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 52px rgb(0 0 0 / 18%);
}

.intro-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(86vh, 820px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 52px rgb(0 0 0 / 18%);
}

.article-dialog,
.article-detail-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(86vh, 820px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 52px rgb(0 0 0 / 18%);
}

.article-detail-dialog:not([open]):not(.is-visible) {
  display: none;
}

.article-detail-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(900px, calc(100% - 28px));
  max-height: min(92vh, 920px);
}

.article-dialog::backdrop,
.article-detail-dialog::backdrop {
  background: rgb(0 0 0 / 32%);
}

.article-reader-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e7e3f5;
  background:
    linear-gradient(90deg, rgb(244 242 255 / 86%), rgb(251 252 254 / 96%)),
    #fbfcfe;
}

.article-reader-topbar-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.article-reader-eyebrow {
  color: var(--muted);
  font-size: 11px;
}

.article-reader-topbar h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.28;
}

#article-detail-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.article-detail-body {
  max-height: calc(92vh - 136px);
  overflow: auto;
  padding: 0 20px 0;
  background: #ffffff;
}

.article-reader-layout {
  width: min(100%, 700px);
  margin: 0 auto;
  padding: 24px 0 32px;
}

.article-reader-section-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.article-reader-summary {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-left: 3px solid #1b8f74;
  background: #f5faf8;
  color: #27413a;
}

.article-reader-summary p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.article-reader-content {
  color: #1f2329;
  font-size: 16px;
  line-height: 1.9;
}

.article-reader-content p,
.article-reader-content li {
  margin: 0 0 12px;
  white-space: normal;
}

.article-reader-content p:last-child {
  margin-bottom: 0;
}

.article-reader-content h2,
.article-reader-content h3,
.article-reader-content h4,
.article-reader-content h5 {
  margin: 24px 0 10px;
  color: #111827;
  line-height: 1.35;
  letter-spacing: 0;
}

.article-reader-content h2 {
  padding-bottom: 7px;
  border-bottom: 1px solid #eceef4;
  font-size: 22px;
}

.article-reader-content h3 {
  font-size: 18px;
}

.article-reader-content h4,
.article-reader-content h5 {
  font-size: 16px;
}

.article-reader-content ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.article-reader-content blockquote,
.article-callout {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid #7058d8;
  border-radius: 6px;
  background: #f7f5ff;
  color: #374151;
}

.article-reader-content pre {
  overflow-x: auto;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
}

.article-reader-content code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.92em;
}

.article-reader-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-reader-content a {
  color: #2563eb;
  text-decoration: none;
}

.article-reader-content a:hover {
  text-decoration: underline;
}

.article-related-stocks {
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #f8fbff;
}

.article-related-stocks > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.article-related-stocks a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #cfe0f7;
  border-radius: 6px;
  background: #fff;
  color: #1b5ea8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.article-related-stocks code {
  color: #7890ad;
  font-family: inherit;
  font-size: 11px;
}

.article-reader-empty,
.article-reader-placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.article-reader-placeholder {
  margin-bottom: 22px;
  padding: 18px 0 2px;
  border-top: 1px solid #eef1f4;
}

.article-reader-meta-section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #eef1f4;
}

.article-reader-meta-grid {
  display: grid;
  gap: 14px;
  margin: 0;
}

.article-reader-meta-item {
  display: grid;
  gap: 4px;
}

.article-reader-meta-item dt {
  color: var(--muted);
  font-size: 12px;
}

.article-reader-meta-item dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.article-detail-actions {
  justify-content: center;
  padding: 12px 20px 18px;
  border-top: 1px solid #eceef2;
  background: #fbfcfe;
}

.article-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #b8e3d9;
  border-radius: 8px;
  background: var(--green-soft);
  text-decoration: none;
  color: #086b5b;
  font-size: 13px;
  font-weight: 600;
}

.article-detail-link:hover {
  background: #e6f4f0;
}

.article-form {
  display: grid;
}

.article-form-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  overflow: auto;
}

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

.article-type-button {
  min-height: 34px;
  border-color: var(--line);
  background: #fbfbfc;
  color: var(--text);
}

.article-type-button.active {
  border-color: var(--black);
  background: var(--black);
  color: #ffffff;
}

.article-form-section {
  display: grid;
  gap: 10px;
}

.article-form label {
  display: grid;
  gap: 6px;
}

.article-form label > span {
  color: var(--muted);
  font-size: 12px;
}

.article-form input,
.article-form textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfc;
  color: var(--text);
  font: inherit;
}

.article-form textarea {
  resize: vertical;
}

.article-file-hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.intro-dialog::backdrop {
  background: rgb(0 0 0 / 32%);
}

.intro-body {
  max-height: calc(86vh - 54px);
  overflow: auto;
  padding: 14px 16px 16px;
}

.intro-content.empty {
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.intro-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.intro-section {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.intro-section:first-of-type {
  border-top: 0;
}

.intro-section h3 {
  margin: 0 0 5px;
  font-size: 13px;
}

.article-detail-link.obsidian-link,
.article-link.obsidian-link {
  border-color: #d8d1ff;
  background: #f4f2ff;
  color: #4d3bb0;
}

.intro-section p {
  color: var(--text);
  line-height: 1.65;
}

.intro-sources div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.intro-sources a {
  color: var(--green);
  text-decoration: none;
}

.intro-sources a:hover {
  text-decoration: underline;
}

.intro-button {
  min-height: 28px;
  padding: 4px 8px;
}

.history-dialog::backdrop {
  background: rgb(0 0 0 / 32%);
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.dialog-head {
  border-bottom: 1px solid var(--line);
}

.dialog-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.dialog-actions {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.stock-search-result {
  display: grid;
  gap: 10px;
}

.stock-search-result[hidden] {
  display: none;
}

.stock-search-inline {
  position: relative;
  width: min(280px, 32vw);
  min-width: 190px;
  margin: 0;
  flex: 0 0 auto;
}

.stock-search-inline input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.stock-search-inline input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgb(17 24 39 / 10%);
}

.stock-search-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: min(520px, calc(100vw - 24px));
  max-height: min(72vh, 620px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgb(0 0 0 / 16%);
}

.search-empty,
.search-warning {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 13px;
}

.search-empty.error,
.search-warning {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}

.search-batch-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #f4f8ff;
}

.search-batch-panel.empty {
  background: #f7f9fb;
  border-color: var(--line);
}

.search-batch-panel strong,
.search-batch-panel span {
  display: block;
}

.search-batch-panel strong {
  color: var(--text);
  font-size: 13px;
}

.search-batch-panel span {
  color: var(--muted);
  font-size: 12px;
}

.search-batch-head,
.search-batch-actions,
.search-batch-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-batch-head {
  justify-content: space-between;
}

.search-batch-actions {
  flex-shrink: 0;
}

.search-batch-list {
  flex-wrap: wrap;
}

.batch-stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 7px;
  border-color: #cfe2ff;
  background: #fff;
  color: var(--text);
}

.batch-stock-chip small {
  color: var(--muted);
  font-size: 11px;
}

.batch-stock-chip b {
  color: var(--muted);
  font-weight: 700;
}

.stock-search-card {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stock-search-card-head,
.search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stock-search-card-head strong {
  display: block;
  font-size: 16px;
}

.stock-search-card-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

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

.search-metric-grid div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f7f9fb;
}

.search-metric-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.search-metric-grid strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

button.compact {
  min-height: 30px;
  padding: 5px 9px;
}

@media (max-width: 700px) {
  .stock-search-inline {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .stock-search-popover {
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
  }

  .search-metric-grid {
    grid-template-columns: 1fr;
  }

  .stock-search-card-head,
  .search-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-batch-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-batch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .article-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .article-card-head {
    flex-direction: column;
  }

  .article-card-actions {
    justify-content: flex-start;
  }

  .article-type-picker {
    grid-template-columns: 1fr;
  }

  .kline-popup {
    display: none;
  }

  body {
    font-size: 13px;
  }

  .shell {
    width: min(100% - 14px, 1280px);
    padding-top: 8px;
  }

  .topbar {
    gap: 8px;
  }

  .index-tape {
    top: 6px;
  }

  .index-tape-inner {
    gap: 8px;
    padding: 6px 8px;
  }

  .index-tape-label {
    font-size: 10px;
  }

  .index-tape-content {
    gap: 10px;
    animation-duration: 34s;
  }

  .index-chip {
    gap: 5px;
    font-size: 11px;
  }

  .index-chip-change {
    font-size: 10px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .eyebrow {
    margin-bottom: 1px;
    font-size: 11px;
  }

  .mobile-header-meta,
  .mobile-header-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
  }

  .mobile-header-meta {
    font-size: 11px;
  }

  .mobile-header-note {
    font-size: 10px;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  button {
    min-height: 32px;
    padding: 6px 9px;
  }

  .message {
    margin: 5px 0;
  }

  .panel {
    border: 0;
    background: transparent;
    border-radius: 0;
  }

  .status-grid {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin: 0 0 8px;
  }

  .stat {
    display: grid;
    gap: 2px;
  }

  .section-head {
    padding: 8px 0;
    align-items: center;
    flex-wrap: wrap;
  }

  .section-head-title {
    width: 100%;
    justify-content: space-between;
  }

  .table-wrap {
    display: none;
  }

  .mobile-sort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    margin-top: 2px;
  }

  .mobile-sort label {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-sort select {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 5px 8px;
    font: inherit;
  }

  .mobile-stock-list {
    display: grid;
    gap: 10px;
  }

  .mobile-stock-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 11px 10px 10px;
  }

  .mobile-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: flex-start;
  }

  .mobile-title-block {
    min-width: 0;
    display: grid;
    gap: 6px;
  }

  .mobile-title-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
  }

  .mobile-index-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f1f3f6;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
  }

  .mobile-name-wrap {
    min-width: 0;
  }

  .mobile-name-wrap .stock-name-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
  }

  .mobile-name-wrap .stock-link {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }

  .mobile-code-chip,
  .mobile-state-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f5f6f8;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-state-chip.added {
    background: var(--green-soft);
    color: var(--green);
  }

  .mobile-state-chip.custom {
    background: var(--red-soft);
    color: var(--red);
  }

  .mobile-price-block {
    min-width: 82px;
    text-align: right;
  }

  .mobile-price-value {
    display: block;
    font-size: 18px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
  }

  .mobile-price-change {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .mobile-concept-row {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .mobile-concept-label {
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-concept-row .concept-editor {
    min-height: 30px;
    padding: 6px 8px;
    border-color: var(--line);
    background: #fbfbfc;
    border-radius: 6px;
    line-height: 1.3;
  }

  .mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 10px;
  }

  .mobile-metric {
    min-width: 0;
    border-top: 1px solid var(--line);
    padding-top: 7px;
    text-align: left;
    font-variant-numeric: tabular-nums;
  }

  .mobile-metric-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-metric-main {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-metric-detail {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
  }

  .mobile-card-actions {
    display: flex;
    justify-content: stretch;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .mobile-card-actions .intro-button,
  .mobile-card-actions .remove-watchlist-button {
    width: 100%;
  }

  .history-dialog,
  .intro-dialog,
  .article-dialog,
  .article-detail-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: 0;
  }

  .history-list {
    max-height: calc(100vh - 112px);
  }

  .intro-body {
    max-height: calc(100vh - 54px);
  }

  .article-detail-body {
    max-height: calc(100vh - 112px);
  }
}

@media (max-width: 700px) {
  body {
    background: #f7f9fc;
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .shell {
    padding: 10px 8px 12px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    margin-bottom: 8px;
  }

  .brand {
    align-items: center;
    grid-column: 1;
    gap: 8px;
  }

  .mobile-action-toggle {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 8px;
    border-color: #d8e0ec;
    background: #fff;
    color: #111827;
    box-shadow: none;
  }

  .mobile-action-toggle span {
    font-size: 16px;
    line-height: 1;
  }

  .brand img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .eyebrow,
  .mobile-header-note {
    display: none;
  }

  h1 {
    font-size: 20px;
    line-height: 1.1;
  }

  .mobile-header-meta {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stock-search-inline {
    grid-column: auto;
    order: 2;
  }

  .stock-search-inline input {
    min-height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }

  .actions {
    order: 3;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .actions button {
    min-height: 32px !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    font-weight: 700;
  }

  #local-pool-sync-button {
    display: none !important;
  }

  .index-tape {
    margin: 0 0 7px;
    padding: 0;
  }

  .index-tape-inner {
    padding: 0;
  }

  .index-tape-label {
    display: none;
  }

  .index-tape-track {
    overflow: visible;
  }

  .index-tape-content {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 6px !important;
    max-width: calc(100vw - 16px);
    overflow-x: auto !important;
    padding: 0 0 2px !important;
    scrollbar-width: none;
  }

  .index-tape-content::-webkit-scrollbar {
    display: none;
  }

  .index-chip {
    min-width: 106px !important;
    min-height: 46px !important;
    padding: 6px 7px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  .index-chip-main {
    display: flex !important;
    align-items: baseline;
    gap: 5px;
  }

  .index-chip-name,
  .index-chip-price {
    font-size: 11px !important;
  }

  .index-chip-change {
    font-size: 10px !important;
  }

  .index-chip-spark {
    width: 34px;
    height: 16px;
  }

  .market-volume-card {
    display: grid;
    gap: 6px;
    margin-bottom: 7px;
    padding: 7px 8px !important;
  }

  .market-volume-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .market-volume-kicker {
    font-size: 10px;
  }

  #market-volume-ratio {
    font-size: 16px;
  }

  .market-volume-status,
  .market-volume-meta {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .market-volume-track {
    height: 18px;
  }

  .market-volume-marker {
    padding: 2px 5px;
    font-size: 10px;
  }

  .market-volume-band {
    display: none;
  }

  .message {
    margin: 0 0 7px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
  }

  .status-grid {
    display: none !important;
  }

  .stock-list-switcher {
    gap: 6px;
    margin-bottom: 7px;
  }

  .stock-list-switcher button {
    min-height: 32px;
    font-size: 12px;
  }

  .layout > .watchlist-groups {
    margin-bottom: 7px !important;
    padding: 6px !important;
  }

  .watchlist-group-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .watchlist-group-heading {
    grid-column: 1 / -1;
    margin: 2px 0 -2px;
    font-size: 10px;
  }

  .watchlist-group-button {
    min-height: 46px !important;
    padding: 6px !important;
  }

  .watchlist-group-name {
    font-size: 11px !important;
  }

  .watchlist-group-average,
  .watchlist-group-count {
    font-size: 9px !important;
  }

  #add-watchlist-group-button {
    min-height: 32px;
    font-size: 12px;
  }

  .table-panel {
    padding: 0;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid #edf1f7;
  }

  .section-head-title {
    width: auto;
    min-width: 0;
  }

  .section-head h2 {
    font-size: 16px;
  }

  #table-note {
    display: none;
  }

  .table-tools {
    width: auto;
    gap: 5px;
    padding: 0;
    overflow: visible;
  }

  .table-tools button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  .table-tools button:nth-child(2),
  .table-tools button:nth-child(3) {
    display: none;
  }

  .mobile-stock-list {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-stock-header,
  .mobile-stock-card {
    grid-template-columns: 24px minmax(92px, 1.4fr) minmax(48px, 0.6fr) minmax(54px, 0.66fr) minmax(54px, 0.66fr) 14px;
  }

  .mobile-stock-header {
    min-height: 30px;
    padding: 0 6px;
    font-size: 10px;
    letter-spacing: 0;
  }

  .mobile-stock-card {
    min-height: 64px;
    padding: 7px 6px 6px;
    row-gap: 2px;
  }

  .mobile-index-badge {
    font-size: 12px;
    color: #7b879b;
  }

  .mobile-title-block {
    gap: 2px;
  }

  .mobile-name-wrap .stock-link {
    font-size: 13px;
    line-height: 1.1;
    max-width: 72px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }

  .stock-joined {
    font-size: 9px;
  }

  .mobile-meta-row {
    gap: 4px;
  }

  .mobile-code-chip,
  .mobile-state-chip {
    min-height: 14px;
    font-size: 10px;
    line-height: 1;
  }

  .mobile-concept-row .concept-editor {
    max-width: 96px;
    min-height: 16px;
    padding: 1px 5px;
    font-size: 10px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-price-block,
  .mobile-change-block,
  .mobile-three-day-block {
    font-size: 12px;
  }

  .mobile-price-value {
    font-size: 12px;
  }

  .mobile-more-button {
    width: 14px;
    min-height: 28px;
    font-size: 16px;
  }

  .mobile-extra-row {
    grid-column: 2 / 6;
    display: flex;
    gap: 8px;
    min-width: 0;
    color: #7b879b;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
  }

  .mobile-extra-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-item {
    min-height: 40px;
    gap: 1px;
    font-size: 10px;
  }

  .mobile-bottom-item span {
    font-size: 0;
  }

  .mobile-bottom-item span::before {
    content: "";
    display: block;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.28;
  }

  .mobile-bottom-item strong {
    font-size: 10px;
  }

  .mobile-bottom-item:nth-child(n + 5) {
    display: none;
  }
}

@media (max-width: 700px) {
  #article-module {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #article-module.is-hidden {
    display: none !important;
  }

  #article-module .article-topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--obsidian-line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  #article-module .brand {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
  }

  #article-module .brand img {
    width: 34px !important;
    height: 34px !important;
  }

  #article-module .actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  #article-module .actions button {
    min-height: 36px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }

  #article-module .article-summary {
    display: grid !important;
    grid-template-columns: 0.72fr 1.28fr !important;
    gap: 8px !important;
  }

  #article-module .article-list {
    gap: 8px !important;
    padding: 8px !important;
  }

  #article-module .article-card {
    gap: 6px !important;
    min-width: 0 !important;
    padding: 9px 9px 9px 11px !important;
    box-shadow: none !important;
  }

  #article-module .article-card-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
  }

  #article-module .article-card h3 {
    font-size: 14px !important;
  }

  #article-module .article-card-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #article-module .article-card-actions > * {
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .article-detail-dialog,
  .article-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .article-detail-body {
    max-height: none !important;
    padding: 0 13px !important;
  }

  .article-reader-layout {
    width: 100% !important;
    padding: 14px 0 24px !important;
  }

  .article-detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
@media (max-width: 700px) {
  #article-module {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #article-module.is-hidden {
    display: none !important;
  }

  #article-module .article-topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--obsidian-line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  #article-module .brand {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
  }

  #article-module .brand img {
    width: 34px !important;
    height: 34px !important;
  }

  #article-module .actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  #article-module .actions button {
    min-height: 36px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }

  #article-module .article-summary {
    display: grid !important;
    grid-template-columns: 0.72fr 1.28fr !important;
    gap: 8px !important;
  }

  #article-module .article-list {
    gap: 8px !important;
    padding: 8px !important;
  }

  #article-module .article-card {
    gap: 6px !important;
    min-width: 0 !important;
    padding: 9px 9px 9px 11px !important;
    box-shadow: none !important;
  }

  #article-module .article-card-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
  }

  #article-module .article-card h3 {
    font-size: 14px !important;
  }

  #article-module .article-card-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #article-module .article-card-actions > * {
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .article-detail-dialog,
  .article-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .article-detail-body {
    max-height: none !important;
    padding: 0 13px !important;
  }

  .article-reader-layout {
    width: 100% !important;
    padding: 14px 0 24px !important;
  }

  .article-detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 700px) {
  .topbar {
    position: relative;
  }

  .actions {
    position: absolute;
    top: 40px;
    right: 0;
    z-index: 60;
    width: min(220px, calc(100vw - 24px)) !important;
    max-width: min(220px, calc(100vw - 24px)) !important;
    padding: 6px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 34px rgb(15 23 42 / 16%);
  }

  .topbar.actions-open .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .actions button {
    min-height: 30px !important;
    justify-content: flex-start;
    text-align: left;
  }

  #add-stock-button {
    justify-content: center;
  }

  .index-tape {
    overflow: hidden;
  }

  .index-tape-content {
    min-height: 24px !important;
    gap: 12px !important;
    overflow-x: auto !important;
    scroll-snap-type: x proximity;
  }

  .index-chip {
    scroll-snap-align: start;
  }

  .market-volume-card {
    display: grid;
    grid-template-columns: auto minmax(64px, 1fr) auto;
    grid-template-rows: 18px 12px;
    align-items: center;
    min-height: 34px;
    gap: 1px 6px;
    padding: 5px 8px !important;
  }

  .market-volume-head {
    display: contents;
  }

  .market-volume-head > div {
    grid-column: 1;
    grid-row: 1 / 3;
    min-width: 0;
  }

  .market-volume-kicker {
    color: #7b879b;
    font-size: 9px;
    line-height: 1;
  }

  #market-volume-ratio {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .market-volume-track {
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    height: 5px;
    margin: 0;
    border-radius: 999px;
  }

  .market-volume-marker {
    display: none;
  }

  .market-volume-status {
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    justify-self: end;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    z-index: 2;
  }

  .market-volume-meta {
    display: none;
  }

  .message {
    padding: 6px 8px;
  }

  #back-home-button,
  .message {
    display: none !important;
  }

  .mobile-sort {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #edf1f7;
    background: #fff;
  }

  .mobile-sort label {
    display: none;
  }

  .mobile-sort select {
    width: 100%;
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    font-size: 11px;
    font-weight: 700;
  }

  #mobile-sort-direction {
    min-height: 30px;
    padding: 0;
    border-color: #dbe3ef;
    background: #fff;
    color: #111827;
    font-size: 11px;
    box-shadow: none;
  }
}

.mobile-action-toggle {
  display: none;
}

@media (max-width: 700px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) 34px !important;
    align-items: start;
  }

  .brand {
    grid-column: 1;
  }

  .mobile-action-toggle {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 8px;
    border-color: #d8e0ec;
    background: #fff;
    color: #111827;
    box-shadow: none;
  }

  .mobile-action-toggle span {
    font-size: 16px;
    line-height: 1;
  }

  .stock-search-inline {
    grid-column: 1 / -1;
  }

  .actions {
    grid-column: 1 / -1;
    display: none !important;
    margin-top: -2px;
  }

  .topbar.actions-open .actions {
    display: grid !important;
  }

  .index-tape {
    margin-bottom: 5px;
  }

  .index-tape-content {
    min-height: 28px !important;
    gap: 10px !important;
    align-items: center;
  }

  .index-chip {
    display: inline-grid !important;
    grid-template-columns: auto auto;
    column-gap: 5px;
    row-gap: 0;
    align-items: baseline;
    min-width: max-content !important;
    min-height: 24px !important;
    padding: 2px 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .index-chip-main {
    display: flex !important;
    align-items: baseline;
    gap: 5px;
  }

  .index-chip-name {
    font-size: 11px !important;
    font-weight: 800;
  }

  .index-chip-price {
    display: none;
  }

  .index-chip-change {
    display: none;
  }

  .index-chip-spark {
    display: none;
  }

  .market-volume-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 5px;
    padding: 6px 8px !important;
  }

  .market-volume-head {
    display: contents;
  }

  .market-volume-head > div {
    min-width: 72px;
  }

  .market-volume-kicker {
    display: block;
    font-size: 9px;
    line-height: 1.1;
  }

  #market-volume-ratio {
    font-size: 15px;
    line-height: 1.1;
  }

  .market-volume-status {
    grid-column: 2;
    justify-self: end;
    padding: 2px 7px;
    font-size: 10px;
  }

  .market-volume-track {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    height: 10px;
    margin-top: 16px;
  }

  .market-volume-marker {
    top: 50%;
    padding: 1px 5px;
    font-size: 9px;
  }

  .market-volume-meta {
    grid-column: 1 / -1;
    font-size: 9px;
    line-height: 1.15;
  }

  .message {
    margin-bottom: 5px;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 700px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    background: #f7f9fd;
  }

  .workspace-frame {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #e7ebf2;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 -8px 24px rgb(17 24 39 / 8%);
  }

  .mobile-bottom-item {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8490a6;
    text-decoration: none;
    box-shadow: none;
    font-size: 11px;
  }

  .mobile-bottom-item span {
    font-size: 19px;
    line-height: 1;
  }

  .mobile-bottom-item strong {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
  }

  .mobile-bottom-item.active {
    color: var(--v2-blue);
    background: transparent;
  }

  .mobile-bottom-item:disabled {
    opacity: 1;
  }

  .shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 18px 10px 16px;
  }

  .topbar,
  .index-tape,
  .status-grid,
  .layout,
  .table-panel,
  .section-head,
  .mobile-stock-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 0 2px;
  }

  .brand {
    align-items: center;
  }

  .brand img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  .eyebrow {
    font-size: 12px;
  }

  h1 {
    font-size: 26px;
    line-height: 1.1;
  }

  .stock-search-inline {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .stock-search-inline input {
    min-height: 46px;
    border-radius: 8px;
    box-shadow: none;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: none;
    overflow: visible;
  }

  .actions button {
    min-height: 48px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: none;
  }

  #refresh-button {
    border-color: #111827;
    background: #111827;
    color: #fff;
  }

  #add-stock-button {
    border-color: var(--v2-blue);
    background: var(--v2-blue);
    color: #fff;
  }

  #history-button-count {
    background: transparent;
    font-size: inherit;
    min-width: 0;
    height: auto;
    margin-left: 2px;
  }

  .index-tape {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .index-tape-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .index-chip {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    min-height: 112px;
    padding: 13px 12px 11px;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgb(17 24 39 / 4%);
  }

  .index-chip-main {
    gap: 6px;
  }

  .index-chip-name {
    font-size: 14px;
  }

  .index-chip-price {
    font-size: 14px;
  }

  .index-spark {
    justify-self: end;
    width: 62px;
    height: 28px;
    margin-top: -24px;
  }

  .status-grid {
    display: flex;
    margin: 8px 0 0;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
  }

  .stat:nth-child(2),
  .stat:nth-child(5) {
    display: none;
  }

  .stat {
    flex: 0 0 auto;
    gap: 6px;
  }

  .stat span,
  .stat strong {
    font-size: 13px;
  }

  .message {
    min-height: 46px;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: none;
  }

  .message.warn::after,
  .message.ok::after {
    content: "›";
    float: right;
    color: #c79c5f;
    font-size: 24px;
    line-height: 0.7;
  }

  .table-panel {
    margin-top: 2px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .section-head {
    display: grid;
    gap: 12px;
    min-height: 0;
    padding: 16px 0 10px;
    border-bottom: 0;
  }

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

  .section-head-title h2 {
    max-width: 108px;
    font-size: 24px;
    line-height: 1.05;
  }

  .section-head-title span {
    font-size: 13px;
    line-height: 1.35;
  }

  .table-tools {
    display: grid;
    grid-template-columns: 74px 104px 44px;
    gap: 10px;
    width: auto;
    justify-content: end;
    overflow: visible;
  }

  .table-tools button {
    min-height: 44px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    box-shadow: none;
  }

  .mobile-sort {
    display: none;
  }

  .layout > .watchlist-groups {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 7px;
    margin: 0 0 10px;
    padding: 7px;
    overflow: visible;
  }

  .watchlist-group-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .watchlist-group-button {
    min-height: 38px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .watchlist-group-average,
  .watchlist-group-count {
    font-size: 11px;
  }

  .mobile-stock-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(17 24 39 / 5%);
  }

  .mobile-stock-header,
  .mobile-stock-card {
    display: grid;
    grid-template-columns: 40px minmax(122px, 1.45fr) minmax(64px, 0.7fr) minmax(68px, 0.72fr) minmax(78px, 0.8fr) 20px;
    align-items: center;
  }

  .mobile-stock-header {
    min-height: 42px;
    padding: 0 8px;
    background: #f7f9fd;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-stock-header span {
    min-width: 0;
    white-space: nowrap;
  }

  .mobile-stock-header span:nth-child(n + 3) {
    text-align: right;
  }

  .mobile-stock-card {
    min-height: 82px;
    padding: 9px 8px;
    border: 0;
    border-top: 1px solid #edf1f7;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .mobile-stock-card.added-row {
    background: #eefbf7;
  }

  .mobile-index-badge {
    justify-self: center;
    min-width: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
  }

  .mobile-title-block {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .mobile-title-line {
    display: block;
    min-width: 0;
  }

  .mobile-name-wrap .stock-link {
    display: inline;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
  }

  .mobile-name-wrap .stock-name-line {
    display: flex;
    align-items: baseline;
    gap: 5px;
  }

  .stock-joined {
    font-size: 11px;
  }

  .mobile-meta-row {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-code-chip,
  .mobile-state-chip {
    min-height: 17px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #7b879b;
    font-size: 12px;
    font-family: "SFMono-Regular", Consolas, monospace;
  }

  .mobile-state-chip.custom {
    display: none;
  }

  .mobile-state-chip.added {
    color: var(--v2-red);
  }

  .mobile-concept-row {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .mobile-concept-row .concept-editor {
    width: auto;
    max-width: 100%;
    min-height: 20px;
    padding: 2px 7px;
    border: 0;
    border-radius: 6px;
    background: #edf4ff;
    color: var(--v2-blue);
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-price-block,
  .mobile-change-block,
  .mobile-three-day-block {
    min-width: 0;
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .mobile-price-value {
    font-size: 15px;
    font-weight: 500;
  }

  .mobile-card-actions {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .mobile-more-button {
    width: 20px;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9aa6bb;
    box-shadow: none;
    font-size: 22px;
    line-height: 1;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

  .status-grid {
    margin-left: 0;
  }

}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1280px);
    padding-top: 10px;
  }

  .module-card {
    min-height: 0;
  }

  .index-tape-inner {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .index-tape-label {
    display: none;
  }

  h1 {
    font-size: 20px;
  }

  .status-grid {
    gap: 5px 10px;
  }

  .actions {
    width: 100%;
  }

  .actions button {
    width: 100%;
  }

  .mobile-stock-card {
    padding: 10px 9px 9px;
  }

  .mobile-card-top {
    gap: 8px;
  }

  .mobile-price-block {
    min-width: 76px;
  }

  .mobile-price-value {
    font-size: 17px;
  }
}

/* v2 stock dashboard skin */
:root {
  --v2-bg: #f5f7fb;
  --v2-panel: #ffffff;
  --v2-line: #e7ebf2;
  --v2-line-strong: #d8dfeb;
  --v2-text: #111827;
  --v2-muted: #788398;
  --v2-blue: #2563eb;
  --v2-blue-soft: #edf4ff;
  --v2-red: #f03745;
  --v2-green: #059669;
  --v2-orange: #f59e0b;
  --v2-shadow: 0 10px 30px rgb(17 24 39 / 6%);
}

body {
  background: var(--v2-bg);
  color: var(--v2-text);
  font-size: 13px;
}

.workspace-frame {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100vh;
  padding: 144px 10px 18px 0;
  border-right: 1px solid var(--v2-line);
  background: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.side-nav-button,
.side-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 118px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--v2-text);
  text-decoration: none;
  font-weight: 600;
  box-shadow: none;
}

.side-nav-button.secondary {
  border: 0;
  background: transparent;
  color: var(--v2-text);
}

.side-nav-button.active,
.side-nav-link.active {
  background: var(--v2-blue-soft);
  color: var(--v2-blue);
}

.side-nav-button.active::before,
.side-nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 28px;
  border-radius: 0 999px 999px 0;
  background: var(--v2-blue);
  transform: translateY(-50%);
}

.side-nav-button:disabled {
  cursor: default;
  opacity: 1;
}

.side-nav-button:disabled span:last-child,
.side-nav-link span:last-child {
  color: var(--v2-text);
}

.side-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  color: currentColor;
}

.side-collapse-button {
  width: 44px;
  min-height: 34px;
  margin-left: 38px;
  border: 0;
  background: transparent;
  color: var(--v2-muted);
  font-size: 26px;
  box-shadow: none;
}

.shell {
  width: min(100% - 48px, 1500px);
  padding: 42px 0 28px;
}

.app-shell,
.module-view {
  gap: 14px;
}

.home-view {
  align-content: start;
  min-height: calc(100vh - 70px);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(340px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 0;
}

.brand {
  gap: 12px;
}

.dashboard-clock {
  border-color: var(--v2-line);
  background: var(--v2-panel);
  color: var(--v2-text);
  box-shadow: 0 8px 24px rgb(17 24 39 / 4%);
}

.dashboard-clock-date {
  color: var(--v2-muted);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgb(17 24 39 / 12%);
}

.eyebrow {
  margin-bottom: 1px;
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.2;
}

h1 {
  color: var(--v2-text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

h2 {
  color: var(--v2-text);
  font-size: 20px;
  font-weight: 800;
}

.stock-search-inline {
  width: min(100%, 410px);
  min-width: 280px;
  justify-self: center;
}

.stock-search-inline input {
  min-height: 46px;
  padding: 0 48px 0 20px;
  border-color: var(--v2-line-strong);
  border-radius: 8px;
  background: var(--v2-panel);
  color: var(--v2-text);
  font-size: 14px;
  box-shadow: 0 8px 24px rgb(17 24 39 / 4%);
}

.stock-search-inline::after {
  content: "⌕";
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--v2-muted);
  font-size: 22px;
  transform: translateY(-50%);
  pointer-events: none;
}

.stock-search-inline input:focus {
  border-color: #9ab8ff;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 10%);
}

.actions {
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

button,
.button-link {
  min-height: 42px;
  padding: 0 18px;
  border-color: var(--v2-line-strong);
  border-radius: 8px;
  background: var(--v2-panel);
  color: var(--v2-text);
  font-weight: 600;
  box-shadow: 0 6px 18px rgb(17 24 39 / 4%);
}

button.secondary {
  border-color: var(--v2-line-strong);
  background: var(--v2-panel);
  color: var(--v2-text);
}

#add-stock-button {
  border-color: var(--v2-blue);
  background: var(--v2-blue);
  color: #fff;
}

#refresh-button {
  border-color: var(--v2-line-strong);
  background: var(--v2-panel);
  color: var(--v2-text);
}

#history-button {
  position: relative;
}

#history-button-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--v2-text);
  font-size: 11px;
}

.index-tape {
  position: static;
  z-index: 1;
  overflow: hidden;
  border-color: var(--v2-line);
  background: var(--v2-panel);
  box-shadow: var(--v2-shadow);
}

.index-tape-inner {
  display: block;
  padding: 0;
}

.index-tape-label {
  display: none;
}

.index-tape-track {
  overflow: visible;
}

.index-tape-content {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 0;
  width: 100%;
  min-width: 0;
  animation: none;
}

.index-chip {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  align-items: end;
  gap: 12px;
  min-height: 96px;
  padding: 18px 20px 16px;
  border-right: 1px solid #f0f3f8;
  background: var(--v2-panel);
  font-size: 13px;
}

.index-chip:last-child {
  border-right: 0;
}

.index-chip-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.index-chip-name {
  color: var(--v2-text);
  font-size: 14px;
  font-weight: 800;
}

.index-chip-price {
  color: var(--v2-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.index-spark {
  position: relative;
  display: block;
  height: 34px;
  overflow: hidden;
}

.index-spark::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28px;
  background:
    linear-gradient(135deg, transparent 0 24%, currentColor 24% 27%, transparent 27% 44%, currentColor 44% 47%, transparent 47% 63%, currentColor 63% 66%, transparent 66%),
    linear-gradient(to top, currentColor, transparent);
  clip-path: polygon(0 70%, 18% 45%, 34% 62%, 54% 30%, 72% 44%, 100% 10%, 100% 100%, 0 100%);
  opacity: 0.18;
}

.index-sparkline {
  display: block;
  width: 92px;
  height: 38px;
  overflow: visible;
}

.index-sparkline-area {
  fill: currentColor;
  opacity: 0.12;
}

.index-sparkline-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.index-spark-empty {
  width: 92px;
  height: 38px;
}

.status-grid {
  margin: 8px 0 0 18px;
  gap: 10px 18px;
}

.stat {
  gap: 7px;
  color: var(--v2-muted);
}

.stat::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #e3e8f1;
}

.stat span,
.section-head span,
.stat strong {
  color: var(--v2-muted);
  font-size: 13px;
}

.message {
  margin: 10px 0 0;
  min-height: 44px;
  padding: 12px 18px;
  border-color: #fde8b7;
  background: #fff8e8;
  color: #a15c07;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgb(245 158 11 / 8%);
}

.message.ok {
  border-color: #dbe7f3;
  background: #f8fafc;
  color: var(--v2-muted);
}

.message.warn {
  border-color: #fde8b7;
  background: #fff8e8;
  color: #a15c07;
}


.message.error {
  border-color: #ffd3d7;
  background: #fff3f4;
  color: var(--v2-red);
}

.layout {
  display: grid;
  gap: 0;
}

.layout > .stock-list-switcher {
  display: none;
}

.layout > .watchlist-groups {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid var(--v2-line);
  border-radius: 8px;
  background: var(--v2-panel);
  box-shadow: 0 6px 16px rgb(15 23 42 / 4%);
}

.watchlist-group-button {
  border-color: var(--v2-line);
  background: #fff;
  color: var(--v2-ink);
  cursor: pointer;
  touch-action: manipulation;
}

.watchlist-group-button:hover {
  border-color: color-mix(in srgb, var(--v2-blue) 45%, var(--v2-line));
  background: #f8fbff;
}

.watchlist-group-heading {
  color: var(--v2-muted);
}

.watchlist-group-heading::after {
  background: var(--v2-line);
}

.watchlist-group-item.active .watchlist-group-button {
  border-color: var(--v2-blue);
  background: #eff6ff;
  color: var(--v2-blue);
  box-shadow: 0 0 0 2px rgb(37 99 235 / 10%);
}

.table-panel {
  border-color: var(--v2-line);
  background: var(--v2-panel);
  box-shadow: var(--v2-shadow);
}

.section-head {
  min-height: 70px;
  padding: 16px 18px;
  border-bottom-color: var(--v2-line);
}

.section-head-title {
  align-items: center;
}

.section-head-title h2 {
  font-size: 20px;
}

.section-head-title span {
  color: var(--v2-muted);
  font-size: 13px;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

button.compact,
.intro-button {
  min-height: 34px;
  padding: 0 14px;
  box-shadow: none;
}

.table-wrap {
  overflow: auto;
}

table {
  min-width: 1200px;
  font-size: 14px;
  color: var(--v2-text);
}

col.col-check {
  width: 42px;
}

col.col-index {
  width: 62px;
}

col.col-name {
  width: 17%;
}

col.col-concept {
  width: 17%;
}

col.col-price,
col.col-percent,
col.col-three-day {
  width: 9%;
}

col.col-market-cap {
  width: 16%;
}

col.col-turnover {
  width: 17%;
}

col.col-intro {
  width: 116px;
}

th,
td {
  height: 58px;
  padding: 10px 14px;
  border-bottom-color: #eef2f7;
}

th {
  height: 42px;
  background: #f7f9fd;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

tbody tr {
  background: var(--v2-panel);
}

tbody tr:hover {
  background: #fbfdff;
}

tbody tr.added-row {
  background: #f4fbf8;
}

th.col-check,
td.check-cell {
  text-align: center;
}

.fake-checkbox {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border: 2px solid #d7dee9;
  border-radius: 4px;
  background: #fff;
  vertical-align: middle;
}

th.col-index,
td:nth-child(2) {
  color: var(--v2-text);
  text-align: center;
  font-weight: 700;
}

th.col-price,
th.col-market-cap,
th.col-percent,
th.col-turnover,
th.col-three-day {
  text-align: right;
}

.stock-name-cell {
  font-weight: 700;
}

.stock-name-line {
  gap: 8px;
}

.stock-link {
  color: var(--v2-text);
  font-weight: 800;
}

.stock-link:hover {
  color: var(--v2-blue);
}

.stock-code {
  color: var(--v2-muted);
  font-size: 12px;
}

.stock-joined {
  color: var(--v2-red);
  font-weight: 600;
}

.concept-editor {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #edf4ff;
  color: var(--v2-blue);
  font-weight: 700;
}

.concept-editor.custom-concept {
  background: #fff1f1;
  color: var(--v2-red);
}

.quote.positive {
  color: var(--v2-red);
}

.quote.negative {
  color: var(--v2-green);
}

.number {
  font-variant-numeric: tabular-nums;
}

.turnover-sub {
  color: var(--v2-muted);
}

.intro-button {
  border-color: #d8e4fb;
  background: #fff;
  color: var(--v2-blue);
}

.remove-watchlist-button {
  margin-left: 6px;
  border-color: #ffd3d7;
  color: #e5333f;
}

td:last-child {
  white-space: nowrap;
}

.stock-search-popover {
  top: calc(100% + 10px);
  right: 0;
  width: min(560px, calc(100vw - 190px));
  border-color: var(--v2-line);
  box-shadow: 0 24px 70px rgb(17 24 39 / 16%);
}

.home-view,
.article-module {
  max-width: 1160px;
}

.module-card,
.summary-pill,
.article-card {
  border-color: var(--v2-line);
  box-shadow: var(--v2-shadow);
}

@media (max-width: 900px) {
  .chain-hero,
  .chain-structure,
  .chain-section-grid {
    grid-template-columns: 1fr;
  }

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

  .chain-flow {
    grid-template-columns: 1fr;
  }

  .chain-flow b {
    display: none;
  }

  .chain-section:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .industry-chain-view {
    padding: 10px;
    gap: 10px;
  }

  .chain-hero {
    padding: 13px;
  }

  .chain-hero h3 {
    font-size: 20px;
  }

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

  .chain-summary span {
    padding: 7px 8px;
  }

  .chain-structure {
    padding: 10px;
  }

  .chain-section {
    min-height: 0;
    padding: 11px;
  }

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

  .chain-stock-chip {
    min-width: 0;
    padding: 7px;
  }

  .chain-stock-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chain-card-hero,
  .chain-card-briefs,
  .chain-reference-image,
  .chain-card-section-grid {
    grid-template-columns: 1fr;
  }

  .chain-card-hero {
    padding: 13px;
  }

  .chain-card-hero h3 {
    font-size: 20px;
  }

  .chain-card-score {
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    min-width: 0;
  }

  .chain-card-score strong {
    font-size: 19px;
  }

  .chain-card-score small {
    text-align: right;
  }

  .chain-card-briefs {
    gap: 8px;
  }

  .chain-card-briefs article {
    min-height: 0;
    padding: 10px;
  }

  .chain-reference-image {
    padding: 10px;
  }

  .chain-reference-image img {
    max-height: none;
  }

  .chain-card-section > header h4 {
    font-size: 16px;
  }

  .chain-stock-card {
    min-height: 0;
  }

  .chain-stock-card-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 1100px) {
  .workspace-frame {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 10px 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--v2-line);
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .side-nav-button,
  .side-nav-link {
    width: auto;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    white-space: nowrap;
  }

  .side-nav-button.active::before,
  .side-collapse-button {
    display: none;
  }

  .shell {
    width: min(100% - 24px, 1500px);
    padding-top: 18px;
  }

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

  .stock-search-inline {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .index-tape-content {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .workspace-frame {
    display: block;
  }

  body {
    overflow-x: hidden;
    font-size: 13px;
  }

  .shell {
    width: min(100% - 18px, 1500px);
    padding-top: 12px;
  }

  .topbar {
    align-items: stretch;
  }

  h1 {
    font-size: 22px;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, calc((100vw - 30px) / 2)));
    gap: 8px;
    width: 100%;
    max-width: calc(100vw - 18px);
    min-width: 0;
    overflow: hidden;
  }

  .actions button {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .index-tape {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .index-tape-content {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .index-chip {
    min-width: 172px;
    min-height: 82px;
    border: 1px solid var(--v2-line);
    border-radius: 8px;
    padding: 12px;
    box-shadow: none;
  }

  .status-grid {
    margin-left: 0;
  }

  .message {
    min-height: 0;
    font-size: 13px;
  }

  .section-head {
    padding: 12px 0 10px;
  }

  .table-tools {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mobile-stock-card {
    border-color: var(--v2-line);
    box-shadow: 0 8px 24px rgb(17 24 39 / 5%);
  }

  .mobile-code-chip,
  .mobile-state-chip,
  .mobile-metric {
    border-radius: 8px;
  }

  .stock-search-popover {
    width: 100%;
  }
}

@media (max-width: 700px) {
  body {
    overflow-x: hidden;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: grid !important;
  }

  .shell {
    width: 100%;
    padding: 18px 10px 16px;
  }

  .actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .actions button {
    min-height: 48px !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 2px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    font-size: 12px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .index-tape-content {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .index-chip {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: 0 !important;
    min-height: 112px;
    padding: 12px 10px 10px;
    box-shadow: 0 8px 20px rgb(17 24 39 / 4%);
  }

  .index-chip-name,
  .index-chip-price {
    font-size: 13px;
  }

  .status-grid {
    display: flex;
    margin: 8px 0 0;
  }

  .market-volume-card {
    gap: 8px;
    padding: 12px !important;
    border-radius: 8px;
  }

  .market-volume-head {
    align-items: center;
  }

  #market-volume-ratio {
    font-size: 20px;
  }

  .market-volume-track {
    height: 28px;
    margin-top: 4px;
  }

  .market-volume-marker {
    padding: 4px 7px;
    font-size: 12px;
  }

  .market-volume-threshold {
    display: none;
  }

  .market-volume-band {
    font-size: 10px;
  }

  .market-volume-meta {
    font-size: 12px;
  }

  .stat:nth-child(2),
  .stat:nth-child(5) {
    display: none;
  }

  .mobile-sort {
    display: none;
  }

  .layout > .watchlist-groups {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 0 0 10px !important;
    padding: 8px !important;
    overflow: visible !important;
  }

  .watchlist-group-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .watchlist-group-button {
    min-height: 64px !important;
    padding: 8px !important;
    border-radius: 8px !important;
  }

  .watchlist-group-main,
  .watchlist-group-metrics {
    gap: 5px;
  }

  .watchlist-group-name {
    max-width: 100%;
    font-size: 12px;
  }

  .watchlist-group-average {
    font-size: 10px;
  }

  .watchlist-group-count {
    min-width: 16px;
    font-size: 10px;
  }

  #add-watchlist-group-button {
    min-height: 38px;
    width: 100%;
  }

  .mobile-stock-list {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(17 24 39 / 5%);
  }

  .mobile-stock-header,
  .mobile-stock-card {
    display: grid;
    grid-template-columns: 34px minmax(104px, 1.45fr) 58px 64px 72px 16px;
    align-items: center;
    min-width: 0;
  }

  .mobile-stock-header {
    min-height: 42px;
    padding: 0 8px;
    background: #f7f9fd;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-stock-header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-stock-header span:nth-child(n + 3) {
    text-align: right;
  }

  .mobile-stock-card {
    min-height: 82px;
    padding: 9px 8px;
    border: 0;
    border-top: 1px solid #edf1f7;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .mobile-stock-card.added-row {
    background: #eefbf7;
  }

  .mobile-index-badge {
    justify-self: center;
    min-width: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
  }

  .mobile-title-block {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .mobile-title-line {
    display: block;
  }

  .mobile-name-wrap .stock-link {
    display: inline;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
  }

  .mobile-name-wrap .stock-name-line {
    display: flex;
    align-items: baseline;
    gap: 5px;
  }

  .mobile-meta-row {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-code-chip,
  .mobile-state-chip {
    min-height: 17px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #7b879b;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
  }

  .mobile-state-chip.added {
    color: var(--v2-red);
  }

  .mobile-state-chip.custom {
    display: none;
  }

  .mobile-concept-row {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .mobile-concept-row .concept-editor {
    min-height: 20px;
    padding: 2px 7px;
    border: 0;
    border-radius: 6px;
    background: #edf4ff;
    color: var(--v2-blue);
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-price-block,
  .mobile-change-block,
  .mobile-three-day-block {
    min-width: 0;
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .mobile-change-block,
  .mobile-three-day-block {
    font-size: 14px;
  }

  .mobile-price-value {
    font-size: 15px;
    font-weight: 500;
  }

  .mobile-card-actions {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .mobile-more-button {
    width: 20px;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9aa6bb;
    box-shadow: none;
    font-size: 22px;
  }
}

@media (max-width: 700px) {
  body {
    background: #f7f9fc;
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .shell {
    padding: 10px 8px 12px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }

  .brand {
    align-items: center;
    gap: 8px;
  }

  .dashboard-clock {
    min-width: 74px;
    padding: 5px 6px;
    justify-self: start;
  }

  .dashboard-clock-time {
    font-size: 14px;
  }

  .dashboard-clock-date {
    font-size: 9px;
  }

  .brand img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .eyebrow,
  .mobile-header-note {
    display: none;
  }

  h1 {
    font-size: 20px;
    line-height: 1.1;
  }

  .mobile-header-meta {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stock-search-inline {
    grid-column: 1 / -1;
    order: 2;
  }

  .stock-search-inline input {
    min-height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }

  .actions {
    grid-column: 1 / -1;
    order: 3;
    display: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  .topbar.actions-open .actions {
    display: grid !important;
  }

  .actions button {
    min-height: 32px !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    font-weight: 700;
  }

  #local-pool-sync-button {
    display: none !important;
  }

  .index-tape {
    margin: 0 0 7px;
    padding: 0;
  }

  .index-tape-inner {
    padding: 0;
  }

  .index-tape-label {
    display: none;
  }

  .index-tape-content {
    display: flex !important;
    grid-template-columns: none !important;
    max-width: calc(100vw - 16px);
    min-height: 28px !important;
    gap: 10px !important;
    align-items: center;
    overflow-x: auto !important;
    padding: 0 0 2px !important;
    scrollbar-width: none;
  }

  .index-tape-content::-webkit-scrollbar {
    display: none;
  }

  .index-chip {
    display: inline-grid !important;
    grid-template-columns: auto auto;
    column-gap: 5px;
    row-gap: 0;
    align-items: baseline;
    min-width: max-content !important;
    min-height: 24px !important;
    padding: 2px 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .index-chip-name {
    font-size: 11px !important;
    font-weight: 800;
  }

  .index-chip-price {
    display: none;
  }

  .index-chip-change {
    display: none;
  }

  .index-chip-spark,
  .index-spark {
    display: none;
  }

  .market-volume-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 8px;
    margin-bottom: 5px;
    padding: 6px 8px !important;
  }

  .market-volume-head {
    display: contents;
  }

  .market-volume-head > div {
    min-width: 72px;
  }

  .market-volume-kicker {
    display: block;
    font-size: 9px;
    line-height: 1.1;
  }

  .market-volume-status {
    grid-column: 2;
    justify-self: end;
    padding: 2px 7px;
    font-size: 10px;
  }

  .market-volume-meta {
    display: none;
  }

  .market-breadth {
    grid-column: 1 / -1;
    gap: 8px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.1;
  }

  .market-breadth strong {
    font-size: 10px;
  }

  #market-volume-ratio {
    font-size: 15px;
    line-height: 1.1;
  }

  .market-volume-track {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    height: 10px;
    margin-top: 16px;
  }

  .market-volume-marker {
    top: 50%;
    padding: 1px 5px;
    font-size: 9px;
  }

  .market-volume-band,
  .status-grid {
    display: none !important;
  }

  .message {
    margin: 0 0 7px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
  }

  .stock-list-switcher {
    gap: 6px;
    margin-bottom: 7px;
  }

  .stock-list-switcher button {
    min-height: 32px;
    font-size: 12px;
  }

  .layout > .watchlist-groups {
    margin-bottom: 7px !important;
    padding: 6px !important;
  }

  .watchlist-group-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .watchlist-group-heading {
    grid-column: 1 / -1;
    margin: 2px 0 -2px;
    font-size: 10px;
  }

  .watchlist-group-button {
    min-height: 46px !important;
    padding: 6px !important;
  }

  .watchlist-group-name {
    font-size: 11px !important;
  }

  .watchlist-group-average,
  .watchlist-group-count {
    font-size: 9px !important;
  }

  #add-watchlist-group-button {
    min-height: 32px;
    font-size: 12px;
  }

  .table-panel {
    padding: 0;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid #edf1f7;
  }

  .section-head-title {
    width: auto;
    min-width: 0;
  }

  .section-head h2 {
    font-size: 16px;
  }

  #table-note {
    display: none;
  }

  .table-tools {
    width: auto;
    gap: 5px;
    padding: 0;
    overflow: visible;
  }

  .table-tools button {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  .table-tools button:nth-child(2),
  .table-tools button:nth-child(3) {
    display: none;
  }

  .mobile-stock-list {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-stock-header,
  .mobile-stock-card {
    grid-template-columns: 24px minmax(92px, 1.4fr) minmax(48px, 0.6fr) minmax(54px, 0.66fr) minmax(54px, 0.66fr) 14px;
  }

  .mobile-stock-header {
    min-height: 30px;
    padding: 0 6px;
    font-size: 10px;
    letter-spacing: 0;
  }

  .mobile-stock-card {
    min-height: 64px;
    padding: 7px 6px 6px;
    row-gap: 2px;
  }

  .mobile-index-badge {
    font-size: 12px;
    color: #7b879b;
  }

  .mobile-title-block {
    gap: 2px;
  }

  .mobile-name-wrap .stock-link {
    display: inline-block;
    max-width: 72px;
    overflow: hidden;
    color: #111827;
    font-size: 13px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }

  .stock-joined {
    font-size: 9px;
  }

  .mobile-meta-row {
    gap: 4px;
  }

  .mobile-code-chip,
  .mobile-state-chip {
    min-height: 14px;
    font-size: 10px;
    line-height: 1;
  }

  .mobile-concept-row .concept-editor {
    max-width: 96px;
    min-height: 16px;
    padding: 1px 5px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-price-block,
  .mobile-change-block,
  .mobile-three-day-block,
  .mobile-price-value {
    font-size: 12px;
  }

  .mobile-more-button {
    width: 14px;
    min-height: 28px;
    font-size: 16px;
  }

  .mobile-extra-row {
    grid-column: 2 / 6;
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    color: #7b879b;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .mobile-extra-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-item {
    min-height: 40px;
    gap: 1px;
    font-size: 10px;
  }

  .mobile-bottom-item span {
    font-size: 0;
  }

  .mobile-bottom-item span::before {
    content: "";
    display: block;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.28;
  }

  .mobile-bottom-item strong {
    font-size: 10px;
  }

  .mobile-bottom-item:nth-child(n + 5) {
    display: none;
  }
}

/* Mobile article module final overrides */
@media (max-width: 700px) {
  #article-module {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  #article-module.is-hidden {
    display: none !important;
  }

  #article-module .article-topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid var(--obsidian-line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  #article-module .brand {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
  }

  #article-module .brand img {
    width: 34px !important;
    height: 34px !important;
  }

  #article-module .actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  #article-module .actions button {
    min-height: 36px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }

  #article-module .article-summary {
    display: grid !important;
    grid-template-columns: 0.72fr 1.28fr !important;
    gap: 8px !important;
  }

  #article-module .article-list {
    gap: 8px !important;
    padding: 8px !important;
  }

  #article-module .article-card {
    gap: 6px !important;
    min-width: 0 !important;
    padding: 9px 9px 9px 11px !important;
    box-shadow: none !important;
  }

  #article-module .article-card-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
  }

  #article-module .article-card h3 {
    font-size: 14px !important;
  }

  #article-module .article-card-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #article-module .article-card-actions > * {
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 28px !important;
    padding: 0 6px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .article-detail-dialog,
  .article-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .article-detail-body {
    max-height: none !important;
    padding: 0 13px !important;
  }

  .article-reader-layout {
    width: 100% !important;
    padding: 14px 0 24px !important;
  }

  .article-detail-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
