/* MarketDesk visual system */
:root {
  --bg: #050806;
  --surface: #0d130f;
  --ink: #e6eee7;
  --muted: #849088;
  --line: #26312a;
  --green: #e2b714;
  --green-dark: #9d7500;
  --red: #e94d4d;
  --navy: #070c09;
  --cream: #fff0a8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, rgba(226, 183, 20, 0.14), transparent 29rem),
    linear-gradient(rgba(226, 183, 20, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 183, 20, 0.028) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 28px 28px, 28px 28px, auto;
  color: var(--ink);
  font-family:
    "JetBrains Mono", "Cascadia Code", Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226, 183, 20, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand > span:last-child span {
  color: var(--green-dark);
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.header-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(226, 183, 20, 0.12), 0 0 12px rgba(226, 183, 20, 0.5);
}

.focus-mode-toggle {
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 8px 12px;
  background: rgba(226, 183, 20, .16);
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 0 16px rgba(226, 183, 20, .14);
  transition: color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.focus-mode-toggle:hover,
.focus-mode-toggle[aria-pressed="true"] {
  border-color: var(--green);
  background: rgba(226, 183, 20, .28);
  color: var(--cream);
  box-shadow: 0 0 22px rgba(226, 183, 20, .3);
}

body.focus-mode .launch-row,
body.focus-mode .hero,
body.focus-mode #notice {
  display: none !important;
}

body.focus-mode .market-overview {
  padding-top: 30px;
}

.hero {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px 188px auto;
  align-items: center;
  gap: 24px;
  padding: 54px 5% 44px;
}

.cat-hero-image {
  width: 205px;
  height: 205px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 183, 20, .5);
  border-radius: 4px;
  background: #0b120e;
  box-shadow: 0 0 30px rgba(226, 183, 20, .1);
}
.cat-hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }

.market-overview {
  padding: 30px 0 4px;
}

.launch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 16px;
  margin-top: 26px;
}

.launch-radar,
.steam-radar {
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid rgba(226, 183, 20, 0.22);
  border-bottom: 1px solid rgba(226, 183, 20, 0.22);
}

.steam-radar { padding-inline: 13px; border: 1px solid rgba(226, 183, 20, 0.25); background: rgba(226, 183, 20, 0.035); }
.steam-radar .eyebrow { margin-bottom: 6px; }
.steam-radar h2 { margin: 0; font-size: 19px; }
.steam-games { display: grid; gap: 8px; margin: 12px 0; }
.steam-game { display: grid; grid-template-columns: 1fr auto; align-items: end; color: var(--ink); text-decoration: none; }
.steam-game span { font-size: 11px; }
.steam-game strong { color: var(--green); font-size: 19px; line-height: 1; }
.steam-game small { grid-column: 2; color: var(--muted); font-size: 9px; }
.steam-radar > span { color: var(--muted); font-size: 9px; }
.steam-loading { margin: 18px 0; color: var(--muted); font-size: 11px; }

.launch-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.launch-heading .eyebrow { margin-bottom: 7px; }
.launch-heading h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.launch-heading > span { color: var(--muted); font-size: 11px; }
.launch-track { min-height: 112px; }
.launch-track-inner { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.launch-card { position: relative; min-width: 0; min-height: 98px; padding: 12px; border: 1px solid rgba(226, 183, 20, 0.22); border-radius: 3px; background: rgba(226, 183, 20, 0.045); }
.launch-card-head { display: flex; justify-content: space-between; gap: 6px; }
.launch-card span { display: block; color: var(--green); font-size: 10px; }
.launch-card em { color: rgba(226, 183, 20, 0.76); font-size: 28px; font-style: normal; font-weight: 800; line-height: .8; }
.launch-card > strong { display: block; overflow: hidden; margin: 8px 0; font-size: 12px; white-space: nowrap; }
.launch-card footer { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; }
.launch-card small { display: -webkit-box; min-width: 0; height: 24px; flex: 1; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.marquee-text { display: block; width: max-content; }
.marquee-text > span:last-child { display: none; }
.launch-marquee.is-overflowing .marquee-text { display: flex; gap: 28px; animation: launch-marquee 12s linear infinite; }
.launch-marquee.is-overflowing .marquee-text > span:last-child { display: inline; }
@keyframes launch-marquee { to { transform: translateX(calc(-50% - 14px)); } }
.provider-logo { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(226, 183, 20, .32); border-radius: 50%; color: var(--green); font-size: 8px; font-style: normal; }
.provider-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; filter: saturate(.9) brightness(1.12); }
.provider-logo img.spacex-logo { filter: invert(1) brightness(1.3); }
.launch-loading { margin: 28px 0; color: var(--muted); font-size: 12px; }

.overview-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.overview-heading .eyebrow {
  margin-bottom: 7px;
}

.overview-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 29px;
  font-weight: 400;
}

.overview-heading > span {
  color: var(--muted);
  font-size: 12px;
}

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

.market-index-card {
  min-height: 148px;
  padding: 15px;
  border: 1px solid rgba(226, 183, 20, 0.2);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(226, 183, 20, 0.06), rgba(13, 19, 15, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.market-index-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.market-index-card strong { font-size: 14px; }
.market-index-card span { color: var(--muted); font-size: 11px; }
.market-index-card > b { display: block; margin: 8px 0 10px; font-family: Georgia, serif; font-size: 23px; font-weight: 400; }
.market-index-card dl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0; }
.market-index-card dt { color: var(--muted); font-size: 10px; }
.market-index-card dd { margin: 3px 0 0; font-size: 11px; font-weight: 700; }
.market-index-card dl > div:first-child dd { font-size: 14px; }
.overview-error { margin: 0; color: var(--muted); font-size: 13px; }

.eyebrow {
  margin: 0 0 15px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(46px, 6vw, 78px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-copy {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.weather-panel {
  width: 218px;
  min-height: 164px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(226, 183, 20, 0.42);
  border-radius: 4px;
  background: rgba(226, 183, 20, 0.045);
}

.deepseek-panel {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid rgba(226, 183, 20, 0.32);
  border-radius: 4px;
  background: rgba(13, 19, 15, 0.72);
}
.deepseek-panel > span, .deepseek-panel small { color: var(--muted); font-size: 10px; }
.deepseek-panel strong { margin: 10px 0 5px; color: var(--cream); font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.deepseek-panel button { width: fit-content; margin-top: 12px; padding: 6px 9px; border: 1px solid rgba(226, 183, 20, .55); border-radius: 2px; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; }
.deepseek-panel button:hover { background: rgba(226, 183, 20, .1); }

.weather-panel > span,
.weather-panel small {
  color: var(--muted);
  font-size: 10px;
}

.weather-panel > div { display: flex; align-items: center; gap: 12px; margin: 7px 0 3px; }
.weather-panel i { color: var(--green); font-size: 37px; font-style: normal; line-height: 1; }
.weather-panel strong { font-family: Georgia, serif; font-size: 44px; font-weight: 400; }
.weather-panel b { color: var(--ink); font-size: 13px; }
.weather-panel small { margin-top: 7px; line-height: 1.6; }
}

.toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 28px;
  border: 1px solid rgba(226, 183, 20, 0.35);
  border-radius: 4px;
  background: var(--navy);
  box-shadow: 0 16px 55px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 255, 255, 0.025);
}

.toolbar form {
  min-width: 0;
  flex: 1 1 auto;
}

.toolbar-controls {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.source-control {
  width: 160px;
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source-control select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  outline: none;
  background: #0b120e;
  color: white;
  padding: 0 36px 0 13px;
  cursor: pointer;
}

.source-control select:focus {
  border-color: var(--cream);
}

.source-control .refresh-button {
  width: 100%;
  justify-content: center;
}

.pinned-summary {
  width: 170px;
  min-height: 104px;
  flex: 0 0 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 13px;
  border-left: 1px solid rgba(226, 183, 20, 0.3);
}
.pinned-summary > span, .pinned-summary small { color: var(--muted); font-size: 11px; }
.pinned-summary strong { margin: 7px 0 5px; color: var(--cream); font-size: 20px; line-height: 1.15; }
.pinned-summary small { line-height: 1.45; }
.pinned-summary { cursor: pointer; }
.pinned-summary:hover { background: rgba(226, 183, 20, .06); }
.loading-card { border-color: rgba(226, 183, 20, .46); }
.loading-card-main { align-items: center; min-height: 88px; }.loading-card-main strong { display: block; color: rgba(226, 183, 20, .9); font-size: 14px; }.loading-card-main small { color: var(--muted); font-size: 11px; }
.loading-pulse { width: 86px; height: 46px; border-radius: 3px; background: linear-gradient(100deg, rgba(226, 183, 20, .08) 20%, rgba(226, 183, 20, .38) 50%, rgba(226, 183, 20, .08) 80%); background-size: 200% 100%; animation: shimmer 1.15s linear infinite; }

.pinned-trend {
  width: 280px;
  min-height: 104px;
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 0 11px 13px;
  border-left: 1px solid rgba(226, 183, 20, .3);
}
.pinned-trend > span { color: var(--muted); font-size: 11px; }
.pinned-trend-chart { height: 61px; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 61px; }
.pinned-trend-chart .sparkline { height: 61px; }
.refresh-note { width: 118px; min-height: 104px; display: flex; flex-direction: column; justify-content: flex-end; padding-left: 13px; }
.refresh-note span { margin-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }.refresh-note strong { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }

.toolbar label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.input-wrap {
  position: relative;
  display: flex;
  gap: 10px;
}

.search-status {
  min-height: 17px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.selected-symbols {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.selected-symbols b {
  max-width: 82px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(233, 255, 159, 0.14);
  color: var(--cream);
  padding: 3px 7px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestions {
  position: absolute;
  z-index: 20;
  top: 54px;
  right: 81px;
  left: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 183, 20, 0.38);
  border-radius: 4px;
  background: #0b120e;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.52);
}

.suggestion-item {
  width: 100%;
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid #1e2b22;
  background: #0b120e;
  color: var(--ink);
  padding: 8px 13px;
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: rgba(226, 183, 20, 0.12);
}

.suggestion-item span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.suggestion-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-item small {
  color: var(--muted);
  font-size: 10px;
}

.suggestion-item b {
  color: var(--green-dark);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.input-wrap input {
  min-width: 0;
  flex: 1;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0 15px;
  text-transform: uppercase;
  transition: border-color 160ms, background 160ms;
}

.input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  text-transform: none;
}

.input-wrap input:focus {
  border-color: var(--cream);
  background: rgba(255, 255, 255, 0.12);
}

.input-wrap button,
.refresh-button {
  height: 46px;
  border: 0;
  border-radius: 9px;
  padding: 0 21px;
  font-weight: 700;
}

.input-wrap button {
  background: var(--cream);
  color: var(--navy);
}

.refresh-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.refresh-button span {
  font-size: 21px;
}

.spinning {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.notice {
  margin: 18px 0 -6px;
  border: 1px solid #f1d7a2;
  border-radius: 9px;
  background: #fff7e6;
  color: #825d12;
  padding: 11px 15px;
  font-size: 14px;
}

.watchlist-section {
  padding: 64px 0 52px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 23px;
}

.section-heading h2,
.detail-title h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading > span {
  color: var(--muted);
  font-size: 13px;
}

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

.stock-card {
  height: 212px;
  padding: 21px 22px 18px;
  border: 1px solid #202b23;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 5px 20px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  outline: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms;
}

.stock-card:hover,
.stock-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(226, 183, 20, 0.62);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), 0 0 24px rgba(226, 183, 20, 0.06);
}

.stock-card.selected {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 24px rgba(0, 0, 0, 0.28);
}

.stock-card.pinned {
  background: linear-gradient(135deg, rgba(226, 183, 20, 0.32), rgba(226, 183, 20, 0.16));
  border-color: rgba(226, 183, 20, 0.64);
  color: var(--ink);
}

.stock-card.pinned .company-name { color: var(--cream); }
.stock-card.pinned .card-footer span { color: rgba(230, 238, 231, 0.72); }

.card-actions { display: flex; align-items: center; gap: 3px; }

.pin-button {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(132, 144, 136, .8);
  font-size: 18px;
  line-height: 1;
}

.pin-button:hover,
.pin-button.active { color: var(--green); background: rgba(226, 183, 20, .12); }
.stock-card.pinned .pin-button { color: var(--cream); }
.stock-card.pinned .pin-button.active { background: rgba(255, 240, 168, .14); }

.card-top,
.card-main,
.card-footer {
  display: flex;
  justify-content: space-between;
}

.card-top {
  align-items: flex-start;
}

.symbol {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.company-name {
  max-width: 260px;
  overflow: hidden;
  margin: 0;
  color: var(--cream);
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-button {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #a1a6a2;
  font-size: 22px;
  line-height: 1;
}

.remove-button:hover {
  background: #f2f3f0;
  color: var(--red);
}

.card-main {
  align-items: end;
  gap: 18px;
  margin-top: 16px;
}

.stock-price {
  display: block;
  margin-bottom: 5px;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.change {
  font-size: 14px;
  font-weight: 700;
}

.change span {
  margin-left: 8px;
}

.positive {
  color: var(--red);
}

.negative {
  color: #168653;
}

.sparkline {
  width: min(42%, 180px);
  height: 72px;
  overflow: visible;
}

.mini-chart-group {
  width: min(61%, 300px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.mini-chart {
  position: relative;
  min-width: 0;
}

.mini-chart::before {
  position: absolute;
  z-index: 1;
  top: 2px;
  left: 3px;
  color: #8f9690;
  content: attr(data-chart-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
}

.mini-chart .sparkline {
  width: 100%;
  height: 78px;
}

.card-footer {
  align-items: center;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid #202b23;
  color: #929893;
  font-size: 11px;
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr);
  gap: 45px;
  padding: 42px;
  border: 1px solid rgba(226, 183, 20, 0.3);
  border-radius: 4px;
  background: linear-gradient(135deg, #080d0a, #101a12);
  color: white;
  overflow: hidden;
}

.detail-panel .eyebrow {
  color: var(--cream);
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.detail-title h2 {
  color: white;
  font-size: 46px;
}

.detail-title p {
  max-width: 190px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.detail-title > div:last-child {
  text-align: right;
}

.detail-title strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  white-space: nowrap;
}

.detail-title span {
  display: inline-block;
  margin-top: 5px;
  font-size: 14px;
  font-weight: 700;
}

.eastmoney-link {
  display: block;
  width: fit-content;
  margin: 11px 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(226, 183, 20, .38);
  border-radius: 3px;
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}

.eastmoney-link:hover {
  border-color: var(--green);
  background: rgba(226, 183, 20, .12);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 32px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.stats div {
  padding: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats dt {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.stats dd {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 700;
}

.stats dd {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.stats dd em {
  font-style: normal;
}

.stats dd small {
  font-size: 11px;
}

.large-chart {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

.sparkline.large {
  width: 100%;
  height: 250px;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.32);
  font-size: 11px;
}

.history-range-control {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}

.history-range-control button {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 3px;
  padding: 5px 7px;
  background: transparent;
  color: rgba(255, 255, 255, .48);
  font-size: 11px;
}

.history-range-control button:hover,
.history-range-control button.active {
  border-color: rgba(226, 183, 20, .72);
  background: rgba(226, 183, 20, .13);
  color: var(--cream);
}

.chart-legend {
  display: flex;
  gap: 13px;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.chart-legend span::before {
  display: inline-block;
  width: 13px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  background: currentColor;
  content: "";
}

.chart-legend .stock-line { color: #e94d4d; }
.chart-legend .benchmark-line { color: #e2b714; }

.empty-state {
  padding: 70px 20px;
  border: 1px dashed rgba(226, 183, 20, 0.45);
  border-radius: 4px;
  text-align: center;
}

.empty-state > span {
  color: var(--green-dark);
  font-family: Georgia, serif;
  font-size: 41px;
}

.empty-state h3 {
  margin: 8px 0;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.skeleton {
  cursor: default;
}

.skeleton i {
  display: block;
  height: 15px;
  margin-bottom: 18px;
  border-radius: 4px;
  background: linear-gradient(90deg, #111a14, #1c2a20, #111a14);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

.skeleton i:nth-child(1) {
  width: 25%;
}

.skeleton i:nth-child(2) {
  width: 46%;
}

.skeleton i:nth-child(3) {
  width: 90%;
  height: 65px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 54px;
  padding: 28px 0 34px;
  border-top: 1px solid rgba(226, 183, 20, 0.22);
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin: 0;
}

.device-memory {
  color: rgba(226, 183, 20, 0.82);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.reset-memory-button {
  padding: 5px 8px;
  border: 1px solid rgba(226, 183, 20, 0.34);
  background: transparent;
  color: rgba(226, 183, 20, 0.8);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
}

.reset-memory-button:hover { border-color: rgba(226, 183, 20, 0.8); color: #f6d94c; }

.weights-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid rgba(226, 183, 20, .55); background: #0a0c0d; color: var(--cream); box-shadow: 0 24px 90px rgba(0, 0, 0, .7); }
.weights-dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.weights-dialog form { padding: 20px; }
.weights-dialog header, .weights-dialog footer { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 0; border: 0; }
.weights-dialog header span { color: rgba(226, 183, 20, .92); font-size: 12px; letter-spacing: .12em; }
.weights-dialog header button, .weights-dialog footer button { border: 1px solid rgba(226, 183, 20, .45); background: transparent; color: var(--cream); cursor: pointer; font: inherit; }
.weights-dialog header button { width: 28px; height: 28px; font-size: 20px; }
.weights-dialog p { margin: 15px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.weights-list { display: grid; gap: 8px; }
.weights-list label { display: grid; grid-template-columns: 1fr 84px 16px; align-items: center; gap: 8px; padding: 9px; border: 1px solid rgba(226, 183, 20, .18); }
.weights-list span { font-size: 13px; }.weights-list small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }.weights-list input { width: 100%; box-sizing: border-box; padding: 6px; border: 1px solid rgba(226, 183, 20, .35); background: #121516; color: var(--cream); font: inherit; }.weights-list b { color: var(--muted); font-size: 12px; }
.weights-dialog footer { margin-top: 16px; justify-content: flex-end; gap: 8px; }.weights-dialog footer button { padding: 8px 12px; }.weights-dialog footer button[value="save"] { border-color: rgba(226, 183, 20, .8); color: #f6d94c; }

@media (max-width: 840px) {
  main {
    width: min(100% - 28px, 720px);
  }

  .hero {
    min-height: 355px;
    padding-inline: 2%;
    grid-template-columns: minmax(0, 1fr) 180px;
  }

  .cat-hero-image { width: 180px; height: 180px; }
  .deepseek-panel { grid-column: 1 / -1; }

  .weather-panel {
    display: none;
  }

  .toolbar-controls { width: 100%; flex-wrap: wrap; }
  .pinned-summary, .pinned-trend, .refresh-note { border-left: 0; border-top: 1px solid rgba(226, 183, 20, .3); }

  .stock-grid,
  .detail-panel {
    grid-template-columns: 1fr;
  }

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

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

  .launch-row { grid-template-columns: 1fr; }

  .detail-panel {
    padding: 30px 24px;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 72px;
  }

  .hero {
    min-height: 325px;
    padding-block: 42px;
    grid-template-columns: 1fr;
  }

  .cat-hero-image { width: min(205px, 100%); height: 205px; }

  .hero h1 {
    font-size: 47px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }

  .toolbar-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .refresh-button {
    justify-content: center;
  }

  .source-control {
    width: 100%;
    flex-basis: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .market-overview-grid {
    grid-template-columns: 1fr;
  }

  .launch-track-inner { grid-template-columns: 1fr; }

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

  .card-main {
    gap: 5px;
  }

  .detail-title {
    flex-direction: column;
  }

  .detail-title > div:last-child {
    text-align: left;
  }

  .sparkline.large {
    height: 190px;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
