/* StockWatcher Web — Desktop App parity
   Calm native-macOS observation surfaces with A-share red/green semantics.
*/

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --fg: #172231;
  --muted: #748296;
  --line: #e1e7ef;
  --border-bold: #cbd5e1;
  --focus: #1679ed;
  --mist-blue: #1679ed;
  --mist-blue-dark: #0b68d5;
  --veil: transparent;

  /* A-Share Color Standards */
  --ashare-red: #df3c3c;
  --ashare-red-bg: #fff0f0;
  --ashare-red-border: #ffcaca;
  --ashare-gold: #b87700;
  --ashare-green: #17814f;
  --top3-gain-red: #df3c3c;

  /* Match the native desktop app without loading third-party web fonts. */
  --font-english: -apple-system, BlinkMacSystemFont, "SF Pro Display";
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: var(--font-english), var(--font-cjk);
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --font-sans: var(--font-english), var(--font-cjk);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--focus); }

/* TOPBAR HEADER */
.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  padding: 1rem 1.8rem;
  border-bottom: 2px solid var(--border-bold);
  background: var(--bg);
}

.topbar .brand {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -0.5px;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-left: 0.5rem;
}

.topbar nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topbar nav a:hover, .topbar nav a.active {
  color: var(--ashare-red);
  border-bottom-color: var(--ashare-red);
}

.topbar .account {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--ashare-gold);
  border-radius: 0.35rem;
  background: var(--card);
  box-shadow: 3px 3px 0 var(--ashare-gold);
  font-size: 0.9rem;
}

.account-item {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  white-space: nowrap;
}

.account-item + .account-item { border-left: 1px solid var(--line); }

.account-username { font-weight: 700; }

.account-logout {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--ashare-red-bg);
  color: var(--ashare-red);
  font-size: 0.9rem;
}

.account .account-logout:hover {
  background: var(--ashare-red);
  color: #ffffff;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

h1, h2, h3 { font-family: var(--font-sans); margin-top: 0; }

.muted { color: var(--muted); }
.error { color: var(--ashare-red); font-weight: 600; }

.linklike {
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  text-decoration: underline;
}

button, .btn {
  background: var(--fg);
  color: var(--bg);
  border: 2px solid var(--border-bold);
  border-radius: 0;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 3px 3px 0px var(--border-bold);
}

button:hover, .btn:hover {
  background: var(--ashare-red);
  color: #ffffff;
  border-color: var(--ashare-red);
  box-shadow: 5px 5px 0px var(--fg);
  transform: translate(-1px, -1px);
}

.btn-hero {
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0.5px;
}

.btn-detail {
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 800;
  background: var(--bg);
  color: var(--fg);
  border: 1.5px solid var(--border-bold);
  box-shadow: 2px 2px 0px var(--border-bold);
}

.btn-detail:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  box-shadow: 4px 4px 0px var(--ashare-red);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

input, select {
  display: block;
  width: 100%;
  max-width: 26rem;
  margin: 0.25rem 0 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-bold);
  border-radius: 0;
  background: var(--card);
  color: var(--fg);
  font-size: 1rem;
}

label { font-weight: 700; }

/* STATUSBAR */
.statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 1.5rem;
}

.ws-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.24rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-lamp {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ashare-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ashare-gold) 18%, transparent);
}

.ws-status[data-state="online"] .status-lamp {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.ws-status[data-state="stale"] .status-lamp {
  background: var(--ashare-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ashare-gold) 20%, transparent);
}

.ws-status[data-state="connecting"] .status-lamp {
  animation: status-pulse 1.4s ease-in-out infinite;
}

@keyframes status-pulse {
  50% { opacity: 0.35; transform: scale(0.82); }
}

.pill {
  border-radius: 0.25rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border-bold);
}

.pill-healthy { background: var(--ashare-red-bg); color: var(--ashare-red); border-color: var(--ashare-red-border); }
.pill-warming { background: color-mix(in srgb, var(--ashare-gold) 18%, transparent); border-color: var(--ashare-gold); color: var(--ashare-gold); }
.pill-stale { background: color-mix(in srgb, var(--ashare-gold) 35%, transparent); border-color: var(--ashare-gold); }
.pill-stopped { background: var(--ashare-red-bg); border-color: var(--ashare-red); color: var(--ashare-red); }
.pill-stopped::after, .pill-stale::after { content: "（数据可能陈旧）"; font-size: 0.8rem; }

.tasks { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
.task { border: 1px solid var(--line); border-radius: 0.25rem; padding: 0.35rem 0.75rem; font-size: 0.88rem; background: var(--card); }

/* STRONG-MOVEMENT ALERT — compact editorial cards with native browser fallback */
.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: var(--veil);
  backdrop-filter: blur(3px);
  animation: alert-overlay-enter 0.22s ease-out both;
}

.alert-overlay[hidden] { display: none !important; }
body.alert-open { overflow: hidden; }

.alert-overlay.is-leaving { animation: alert-overlay-leave 0.18s ease-in both; }

.strong-alert-dialog {
  width: min(48rem, 100%);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
  padding: clamp(1.2rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-top: 6px solid var(--ashare-gold);
  background: var(--card);
  box-shadow: 10px 10px 0 rgba(166, 138, 88, 0.7), 0 24px 70px rgba(24, 28, 29, 0.28);
  animation: strong-alert-enter 0.28s ease-out both;
}

@keyframes alert-overlay-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes alert-overlay-leave { from { opacity: 1; } to { opacity: 0; } }

@keyframes strong-alert-enter {
  from { opacity: 0; transform: translate3d(0, 1.2rem, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.strong-alert-header,
.strong-alert-footer,
.strong-alert-mini-top,
.strong-alert-mini-market {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.strong-alert-header time,
.strong-alert-footer,
.strong-alert-summary {
  color: var(--muted);
  font-size: 0.75rem;
}

.strong-alert-kicker {
  display: inline-block;
  margin-right: 0.55rem;
  color: var(--ashare-gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.strong-alert-dismiss {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 0.72rem;
}

.strong-alert-dismiss:hover {
  border-color: var(--ashare-red);
  background: var(--ashare-red-bg);
  color: var(--ashare-red);
  box-shadow: none;
  transform: none;
}

.strong-alert-title {
  margin: 0.45rem 0 0.1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.strong-alert-summary { margin: 0 0 0.8rem; }

.strong-alert-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.strong-alert-mini-card {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--muted);
  background: var(--bg);
}

.strong-alert-mini-card.is-trigger {
  border-color: var(--ashare-gold);
  border-top-color: var(--ashare-gold);
  background: rgba(166, 138, 88, 0.12);
  box-shadow: 3px 3px 0 rgba(166, 138, 88, 0.35);
}

.strong-alert-mini-card .rank {
  padding: 0.08rem 0.3rem;
  font-size: 0.72rem;
}

.strong-alert-mini-card .level-tag {
  padding: 0.08rem 0.25rem;
  border-width: 1px;
  font-size: 0.62rem;
}

.strong-alert-mini-name,
.strong-alert-mini-code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strong-alert-mini-name {
  margin-top: 0.4rem;
  font-size: 1rem;
}

.strong-alert-mini-code {
  margin-top: 0.05rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.strong-alert-mini-market { margin-top: 0.35rem; }
.strong-alert-mini-price { color: var(--fg); font-family: var(--font-mono); font-size: 0.66rem; opacity: 0.6; }
.strong-alert-mini-pct { color: var(--ashare-red); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 800; }
.strong-alert-syncing { grid-column: 1 / -1; padding: 0.7rem; border: 1px dashed var(--ashare-red-border); color: var(--muted); font-size: 0.78rem; }

.strong-alert-footer {
  margin-top: 0.8rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
}

.strong-alert-footer a { font-weight: 800; }

/* HERO TOP3 SECTION */
.hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 4.5vw, 3.225rem);
  font-weight: 650;
  margin: 0 0 0.3rem 0;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.live-clock {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-subtitle { margin: 0; font-size: 0.95rem; color: var(--muted); }

.hero-action-box {
  display: flex;
  flex-direction: column;
  width: min(100%, 15rem);
  gap: 0.55rem;
  align-items: stretch;
}

.hero-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.3rem;
  border-width: 1px;
  box-shadow: 3px 3px 0 var(--ashare-gold);
  font-size: 0.95rem;
  line-height: 1.2;
}

.hero-action-button.is-working {
  cursor: wait;
  opacity: 1;
}

.hero-action-button.is-working::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: refresh-spin 0.8s linear infinite;
}

.refresh-progress[hidden] { display: none !important; }

.refresh-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.35rem 0.55rem;
  min-height: 2.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.refresh-spinner {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--ashare-red-border);
  border-top-color: var(--ashare-red);
  border-radius: 50%;
  animation: refresh-spin 0.8s linear infinite;
}

.refresh-progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.refresh-progress-label { color: var(--fg); }

.refresh-progress-elapsed {
  min-width: 4.5rem;
  color: var(--ashare-red);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.refresh-progress-track {
  grid-column: 1 / -1;
  display: block;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}

.refresh-progress-track::after {
  content: "";
  display: block;
  width: 36%;
  height: 100%;
  background: linear-gradient(90deg, var(--ashare-red), var(--ashare-gold));
  animation: refresh-sweep 1.6s ease-in-out infinite;
}

.refresh-progress[data-state="done"] .refresh-spinner,
.refresh-progress[data-state="failed"] .refresh-spinner,
.refresh-progress[data-state="timeout"] .refresh-spinner {
  border-color: var(--ashare-gold);
  animation: none;
}

.refresh-progress[data-state="done"] .refresh-progress-label { color: var(--ashare-gold); }
.refresh-progress[data-state="failed"] .refresh-progress-label,
.refresh-progress[data-state="timeout"] .refresh-progress-label { color: var(--ashare-red); }

.refresh-progress[data-state="done"] .refresh-progress-track::after,
.refresh-progress[data-state="failed"] .refresh-progress-track::after,
.refresh-progress[data-state="timeout"] .refresh-progress-track::after {
  width: 100%;
  animation: none;
}

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

@keyframes refresh-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(300%); }
}

.hero-action-button.btn-refresh {
  background: var(--ashare-red);
  border-color: var(--ashare-red);
  color: #ffffff;
}

.hero-action-button.btn-notify {
  background: var(--mist-blue);
  border-color: var(--mist-blue);
  color: #ffffff;
}

.hero-action-button.btn-refresh:hover {
  background: #8F504C;
  border-color: #8F504C;
  box-shadow: 4px 4px 0 var(--ashare-gold);
}

.hero-action-button.btn-notify:hover {
  background: var(--mist-blue-dark);
  border-color: var(--mist-blue-dark);
  box-shadow: 4px 4px 0 var(--ashare-gold);
}

/* 3-CANDIDATE GRID */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.6rem;
  align-items: stretch;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--border-bold);
  border-radius: 0;
  padding: 1.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
}

.rank-1-card {
  border-top: 5px solid var(--ashare-gold) !important;
  box-shadow: 0 10px 28px rgba(166, 138, 88, 0.16) !important;
}

.card-top-tag {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.rank {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 900;
  padding: 0.2rem 0.7rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 0;
}

.rank-1-badge { background: var(--ashare-gold) !important; color: #ffffff !important; }
.rank-2-badge { background: var(--mist-blue) !important; color: #ffffff !important; }
.rank-3-badge { background: var(--muted) !important; color: #ffffff !important; }

.level-tag {
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
  border: 1px solid var(--line);
}

.level-strong {
  color: var(--ashare-gold);
  border-color: var(--ashare-gold);
  background: rgba(166, 138, 88, 0.10);
}

.level-medium {
  color: var(--mist-blue);
  border-color: rgba(98, 127, 146, 0.40);
  background: rgba(98, 127, 146, 0.10);
}

.level-near {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(111, 113, 111, 0.08);
}

.level-placeholder {
  color: var(--muted);
  border-color: var(--line);
  background: var(--bg);
}

.formal-pill, .weak-note {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  margin-left: auto;
  font-weight: 700;
}

.placeholder-state {
  margin-left: auto;
  margin-right: 0.55rem;
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  min-width: max-content;
  gap: 0.08rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.placeholder-state-label { flex: 0 0 auto; }

.placeholder-dots {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 3em;
  min-width: 3em;
  overflow: visible;
  vertical-align: bottom;
}

.placeholder-dot {
  display: inline-block;
  opacity: 0;
  animation: placeholder-dot-appear 1.2s steps(1, end) infinite;
}

.placeholder-dot:nth-child(2) { animation-delay: 0.2s; }
.placeholder-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes placeholder-dot-appear {
  0%, 24% { opacity: 0; }
  25%, 100% { opacity: 1; }
}

/* HUGE DISPLAY TYPOGRAPHY FOR STOCK NAME & CODE */
.card-stock-hero { margin-bottom: 1.2rem; }

.stock-name-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.display-name {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 650;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--fg);
}

.display-code-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.display-code {
  font-size: 1.45rem !important; /* 增大 4-5px */
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--fg);
  letter-spacing: 0.5px;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.sector-tag {
  font-size: 1.05rem !important; /* 显著增大板块标识 */
  font-weight: 700;
  line-height: 1.1;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border-bold);
  background: var(--bg);
  color: var(--fg);
  border-radius: 0;
}

/* STREAMLINED PRICE & FUND BLOCK */
.price-fund-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 0;
  margin-bottom: 1.2rem;
  background: var(--bg);
  border: 1px solid var(--line);
}

.price-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 1.2rem;
}

.ashare-price {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--fg);
  opacity: 0.5;
}

.ashare-pct {
  font-size: clamp(1.85rem, 2.4vw, 2rem);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--ashare-red);
}

.cards .ashare-pct[data-direction="up"] {
  color: var(--top3-gain-red) !important;
}

.placeholder-card .display-name,
.placeholder-card .display-code,
.placeholder-card .sector-tag,
.placeholder-card .ashare-price,
.placeholder-card .ashare-pct {
  color: var(--muted);
  opacity: 0.5;
}

.placeholder-card .stock-name-row {
  flex-wrap: nowrap;
}

.placeholder-card .display-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 2rem;
  letter-spacing: 0.1em;
}

.placeholder-card .display-code { text-decoration-style: dashed; }

.placeholder-card .price-fund-block { border-style: dashed; }

.placeholder-card-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.fund-pill-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.8rem;
}

.fund-title { color: var(--muted); margin-bottom: 0.1rem; }
.fund-val { font-weight: 700; color: var(--fg); }

.factor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.chip {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
}

.chip-gold {
  background: var(--ashare-gold) !important;
  color: #ffffff !important;
  border-color: var(--ashare-gold) !important;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.metric-row {
  display: flex;
  gap: 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.metric-row strong { color: var(--fg); }

.btn-detail {
  padding: 0.4rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

/* TABLES & FORMS */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 800; font-family: var(--font-serif); }
.table-wrap { overflow-x: auto; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.2rem; }
.kv dt { font-weight: 700; }

.filters, .actions { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; margin: 1.2rem 0; }

/* DRAWER MODAL */
.drawer-overlay[hidden] { display: none !important; }
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  z-index: 2000;
}

.drawer-content {
  width: 100%;
  max-width: 520px;
  height: 100%;
  background: var(--card);
  color: var(--fg);
  border-left: 2px solid var(--border-bold);
  padding: 1.8rem;
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.drawer-title {
  margin: 0;
  font-family: var(--font-serif);
}

.drawer-close {
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

.detail-stock-name {
  margin-bottom: 0.3rem;
  font-size: 1.9rem;
}

.detail-stock-code {
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.detail-factor-json {
  padding: 0.6rem;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.8rem;
}

/* CANDIDATE OUTCOME REVIEW */
.outcome-editorial,
.outcome-slot-card,
.outcome-portfolio {
  margin-top: 2.5rem;
  padding: clamp(1.1rem, 2.8vw, 2rem);
  border: 1px solid var(--line);
  background: var(--card);
}

.outcome-editorial { border-top: 5px solid var(--mist-blue); }

.outcome-editorial-header,
.outcome-page-header,
.outcome-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.editorial-kicker {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--mist-blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.outcome-editorial h2,
.outcome-page h1,
.outcome-slot-card h2,
.outcome-portfolio h2 { margin-bottom: 0.35rem; }

.outcome-detail-link {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--mist-blue);
  color: var(--mist-blue);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.outcome-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.outcome-summary-card {
  min-width: 0;
  padding: 1rem;
  border-left: 3px solid var(--ashare-gold);
  background: var(--bg);
}

.outcome-summary-card span,
.outcome-summary-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.outcome-summary-card strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-variant-numeric: tabular-nums;
}

.outcome-summary-card small { margin-top: 0.25rem; }
.outcome-backfill { margin: 1rem 0 0; }
.outcome-page-header { margin-bottom: 1rem; }
.outcome-page-header > div:first-child { max-width: 48rem; }

.outcome-range {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.outcome-range button {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  box-shadow: none;
}

.outcome-range button:hover,
.outcome-range button.is-active {
  border-color: var(--mist-blue);
  background: var(--mist-blue);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.outcome-page-status {
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--mist-blue);
  background: rgba(98, 127, 146, 0.10);
}

.outcome-disclaimer {
  max-width: 46rem;
  margin: 0.8rem 0 0;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--ashare-gold);
  background: rgba(166, 138, 88, 0.10);
  color: var(--fg);
  font-size: 0.85rem;
}

.outcome-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.outcome-slot-card { margin-top: 1.5rem; }

.outcome-slot-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.outcome-slot-stats div {
  padding: 0.75rem;
  border-top: 1px solid var(--line);
}

.outcome-slot-stats dt { color: var(--muted); font-size: 0.76rem; }
.outcome-slot-stats dd { margin: 0.2rem 0 0; font-size: 1.2rem; font-weight: 800; }

[data-direction="up"] { color: var(--ashare-red) !important; }
[data-direction="down"] { color: var(--ashare-green) !important; }
[data-direction="neutral"] { color: var(--muted) !important; }

.outcome-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}

.outcome-record-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--muted);
  background: var(--card);
}

.outcome-record-card[data-direction="up"] { border-top-color: var(--ashare-red); }
.outcome-record-card[data-direction="down"] { border-top-color: var(--ashare-green); }
.outcome-record-head { color: var(--muted); font-size: 0.76rem; }
.outcome-record-card h3 { margin: 0.8rem 0 0.3rem; font-size: 1.1rem; }
.outcome-record-card h3 small { color: var(--muted); font-family: var(--font-mono); }
.outcome-price-line { font-family: var(--font-mono); }
.outcome-return { margin: 0.3rem 0; font-size: 1.25rem; font-weight: 900; }
.outcome-empty { padding: 1.5rem; }

/* DESKTOP APP PARITY — current observation and alert lifecycle */
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(22, 121, 237, 0.07), transparent 34rem),
    var(--bg);
  font-weight: 450;
}

.topbar {
  min-height: 3.4rem;
  gap: 1.4rem;
  padding: 0.7rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid #dbe2eb;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 6px rgba(31, 47, 68, 0.06);
  backdrop-filter: blur(16px);
}

.topbar .brand {
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.topbar nav { gap: 0.3rem; margin-left: 0; }
.topbar nav a {
  padding: 0.45rem 0.68rem;
  border: 0;
  border-radius: 0.55rem;
  color: #5d6b7e;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.topbar nav a:hover,
.topbar nav a.active {
  border: 0;
  background: #eaf3ff;
  color: #1670df;
}

.topbar .account {
  border: 1px solid #d9e1ec;
  border-radius: 0.6rem;
  background: #f8fafc;
  box-shadow: none;
  font-size: 0.78rem;
}
.account-logout { background: #ffffff; color: #667487; }
.account .account-logout:hover {
  background: #eef5ff;
  color: #1670df;
}

main {
  width: min(100%, 1440px);
  max-width: none;
  padding: clamp(1.3rem, 3vw, 2.6rem);
}

button,
.btn {
  border-width: 1px;
  border-radius: 0.58rem;
  box-shadow: none;
}
button:hover,
.btn:hover {
  box-shadow: none;
  transform: none;
}

.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.dashboard-eyebrow {
  margin: 0 0 0.55rem;
  color: #364456;
  font-size: 0.92rem;
  font-weight: 760;
}
.dashboard-eyebrow span {
  display: inline-flex;
  margin-left: 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e7f1ff;
  color: #1670df;
  font-size: 0.72rem;
  font-weight: 700;
}
.dashboard-intro h1 {
  margin: 0;
  color: #142235;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 780;
  letter-spacing: -0.05em;
}
.desktop-history-link {
  padding: 0.55rem 0.8rem;
  border-radius: 0.55rem;
  color: #526176;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.desktop-history-link:hover { background: #eaf3ff; color: #1670df; }

.statusbar {
  display: grid;
  grid-template-columns: 0.75fr 1.15fr 1.3fr 0.75fr 0.9fr;
  align-items: stretch;
  gap: 0;
  margin: 0 0 1rem;
  padding: 0.35rem 0;
  overflow: hidden;
  border: 1px solid #e1e7ef;
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(41, 58, 80, 0.04);
}
.status-item {
  min-width: 0;
  padding: 0.85rem 1.15rem;
  border-right: 1px solid #edf1f6;
}
.status-item:last-child { border-right: 0; }
.status-item-label,
.status-item-value,
.status-item-meta { display: block; }
.status-item-label {
  margin-bottom: 0.35rem;
  overflow: hidden;
  color: #748296;
  font-size: 0.72rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-item-value {
  overflow: hidden;
  color: #1c2d42;
  font-size: 0.94rem;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-item-value[class*="pill-"] {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.status-item-value.status-warming { color: #b87700; }
.status-item-value.pill-healthy { color: #17814f; }
.status-item-value.pill-stale,
.status-item-value.pill-stopped { color: #c63f3f; }
.status-item-value::after { content: none; }
.status-item-meta {
  margin: 0.22rem 0 0 1rem;
  color: #17814f;
  font-size: 0.7rem;
  font-weight: 650;
}
.ws-status {
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #17814f;
  font-size: 0.9rem;
  font-weight: 750;
}
.status-lamp { width: 0.55rem; height: 0.55rem; }

.tasks {
  gap: 0.45rem;
  margin: 0 0 1.15rem;
}
.task {
  padding: 0.28rem 0.62rem;
  border-color: #dce4ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #677589;
  font-size: 0.72rem;
}

.hero-top3-section { margin-top: 0.2rem; }
.hero-header {
  align-items: center;
  margin-bottom: 0.8rem;
}
.hero-title {
  margin: 0;
  color: #405067;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 760;
  letter-spacing: -0.025em;
}
.live-clock {
  margin-top: 0.28rem;
  color: #8490a0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
.dashboard-cards > .card {
  display: grid;
  grid-template-columns: 3rem minmax(10rem, 1.25fr) minmax(7.5rem, 0.7fr) 4.6rem minmax(10rem, 1fr) 2.2rem;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.4rem);
  min-height: 7.1rem;
  padding: 1rem 1.35rem;
  border: 1px solid #e1e7ef;
  border-radius: 0.88rem;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(43, 61, 84, 0.035);
}
.dashboard-cards > .card:hover,
.dashboard-cards > .rank-1-card {
  border-color: #b8d4f8 !important;
  border-top-width: 1px !important;
  box-shadow: 0 7px 20px rgba(22, 112, 223, 0.07) !important;
}
.rank {
  display: inline-grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: #eaf3ff !important;
  color: #1670df !important;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 750;
}
.candidate-identity,
.candidate-quote,
.candidate-sector { min-width: 0; }
.display-name {
  margin: 0;
  overflow: hidden;
  color: #172231;
  font-family: var(--font-sans);
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.display-code {
  display: block;
  margin-top: 0.28rem;
  overflow: hidden;
  color: #7d8999;
  font-family: var(--font-sans);
  font-size: 0.86rem !important;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.candidate-quote {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.ashare-pct {
  color: var(--top3-gain-red);
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 780;
}
.ashare-price {
  margin-top: 0.25rem;
  color: #667487;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 1;
}
.level-tag {
  display: inline-grid;
  min-width: 3.7rem;
  min-height: 4.3rem;
  place-items: center;
  padding: 0.45rem;
  border-radius: 0.58rem;
  font-size: 1rem;
  font-weight: 760;
}
.level-strong { color: #d93636; border-color: #ffcaca; background: #fff0f0; }
.level-medium { color: #b87700; border-color: #ffe0a0; background: #fff7df; }
.level-near,
.level-placeholder { color: #6d7785; border-color: #d8dee6; background: #f0f2f5; }
.candidate-sector {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.candidate-meta-label,
.candidate-sector small {
  color: #7d8999;
  font-size: 0.72rem;
  font-weight: 500;
}
.candidate-sector strong {
  margin: 0.23rem 0;
  overflow: hidden;
  color: #26364a;
  font-size: 0.95rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-open-detail {
  display: grid;
  width: 2.2rem;
  height: 2.8rem;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8e9bad;
  font-size: 1.85rem;
}
.card-open-detail:hover { background: #eef5ff; color: #1670df; }
.card-arrow { color: #a4aebb; font-size: 1.7rem; text-align: center; }
.placeholder-card { opacity: 0.72; }
.placeholder-card .placeholder-text { color: #8b97a6; opacity: 0.65; }
.placeholder-dots { width: 1.8rem; min-width: 1.8rem; }

.hero-action-box {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  width: 100%;
  margin-top: 0.8rem;
  gap: 0.65rem;
}
.hero-action-button,
.hero-history-button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #d3dce8;
  border-radius: 0.62rem;
  background: #ffffff;
  color: #33445a;
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 680;
  text-decoration: none;
}
.hero-action-button.btn-refresh {
  border-color: #1679ed;
  background: #1679ed;
  color: #ffffff;
}
.hero-action-button.btn-refresh:hover { border-color: #0b68d5; background: #0b68d5; box-shadow: none; }
.hero-action-button.btn-notify { border-color: #d3dce8; background: #ffffff; color: #33445a; }
.hero-action-button.btn-notify:hover,
.hero-history-button:hover { border-color: #a8c7ee; background: #eef5ff; color: #1670df; }
.refresh-progress {
  grid-column: 1 / -1;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  background: #ffffff;
}
.refresh-progress-track { background: #e6ebf1; }
.refresh-progress-track::after { background: #1679ed; }
.readonly-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.8rem 0 0;
  color: #7d8999;
  font-size: 0.74rem;
}
.readonly-note > span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #24b56a;
  box-shadow: 0 0 0 3px rgba(36, 181, 106, 0.12);
}

.alert-overlay {
  inset: auto clamp(0.8rem, 2.4vw, 1.8rem) clamp(0.8rem, 2.4vw, 1.8rem) auto;
  display: block;
  width: min(34rem, calc(100vw - 1.6rem));
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}
.alert-overlay.is-leaving { animation: none; }
.strong-alert-dialog {
  width: 100%;
  max-height: min(38rem, calc(100vh - 2rem));
  padding: 1rem;
  overflow: auto;
  border: 1px solid #d6e0ec;
  border-top: 1px solid #d6e0ec;
  border-radius: 0.95rem;
  background: #ffffff;
  box-shadow: 0 20px 55px rgba(29, 44, 64, 0.2), 0 3px 12px rgba(29, 44, 64, 0.08);
  pointer-events: auto;
  animation: desktop-alert-enter 0.24s ease-out both;
}
.alert-overlay.is-leaving .strong-alert-dialog { animation: desktop-alert-leave 0.18s ease-in both; }
@keyframes desktop-alert-enter {
  from { opacity: 0; transform: translate3d(0, 1rem, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes desktop-alert-leave {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 0; transform: translate3d(0, 0.6rem, 0) scale(0.99); }
}
.strong-alert-header { align-items: flex-start; }
.strong-alert-kicker {
  color: #718096;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0;
}
.strong-alert-header time { font-size: 0.68rem; }
.strong-alert-dismiss {
  min-width: 2.8rem;
  padding: 0.32rem 0.55rem;
  border: 0;
  border-radius: 0.45rem;
  color: #718096;
  font-size: 0.78rem;
}
.strong-alert-dismiss:hover { border: 0; background: #eef5ff; color: #1670df; }
.strong-alert-title {
  margin: 0.38rem 0 0.18rem;
  color: #172231;
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 780;
}
.strong-alert-summary { margin: 0 0 0.75rem; font-size: 0.8rem; }
.strong-alert-mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.48rem;
}
.strong-alert-mini-card {
  display: grid;
  grid-template-columns: 2rem minmax(7rem, 1fr) auto auto 3.2rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #e1e8f2;
  border-top-width: 1px;
  border-radius: 0.65rem;
  background: #fbfdff;
}
.strong-alert-mini-card.is-trigger {
  border-color: #a9c9f2;
  background: #f1f7ff;
  box-shadow: none;
}
.strong-alert-mini-card .rank { width: 1.8rem; height: 1.8rem; font-size: 0.8rem; }
.strong-alert-mini-identity { min-width: 0; }
.strong-alert-mini-name { margin: 0; font-size: 0.95rem; }
.strong-alert-mini-code { margin: 0.1rem 0 0; font-family: var(--font-sans); font-size: 0.7rem; }
.repeat-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: #6b3aa0;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  vertical-align: 0.08em;
  white-space: nowrap;
}
.repeat-filter { display: inline-flex; align-items: center; gap: 0.35rem; }
#history td .repeat-badge { margin-left: 0.4rem; }
.strong-alert-mini-pct { color: #df3c3c; font-family: var(--font-sans); font-size: 1rem; font-weight: 780; }
.strong-alert-mini-price { color: #667487; font-family: var(--font-sans); font-size: 0.72rem; opacity: 1; }
.strong-alert-mini-card .level-tag {
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0.25rem;
  font-size: 0.82rem;
}
.strong-alert-syncing {
  padding: 0.75rem;
  border-color: #ced7e2;
  border-radius: 0.6rem;
  background: #f8fafc;
}
.strong-alert-footer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 0;
}
.strong-alert-open {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 0.58rem;
  background: #1679ed;
  color: #ffffff;
  text-decoration: none;
}
.strong-alert-open:hover { background: #0b68d5; color: #ffffff; }

.outcome-editorial,
.outcome-slot-card,
.outcome-portfolio {
  border-radius: 0.9rem;
  box-shadow: 0 5px 18px rgba(41, 58, 80, 0.04);
}
.outcome-editorial { border-top-width: 1px; }
.outcome-summary-card { border-left-color: #9bc2ef; border-radius: 0.6rem; background: #f7f9fc; }
.drawer-overlay { background: rgba(23, 34, 49, 0.35); }
.drawer-content { border-left: 1px solid #d9e1ec; background: #ffffff; }

@media (max-width: 720px) {
  .statusbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-item { border-bottom: 1px solid #edf1f6; }
  .status-item:nth-child(2n) { border-right: 0; }
  .status-item:last-child { border-bottom: 0; }
  .dashboard-cards > .card {
    grid-template-columns: 2.7rem minmax(8rem, 1fr) auto;
    gap: 0.7rem;
  }
  .candidate-quote { grid-column: 3; grid-row: 1 / span 2; }
  .level-tag { grid-column: 2; min-width: 3.2rem; min-height: 2.2rem; justify-self: start; }
  .candidate-sector { grid-column: 2 / -1; }
  .card-open-detail,
  .card-arrow { grid-column: 3; grid-row: 3; }
  .hero-action-box { grid-template-columns: 1fr 1fr; width: 100%; }
  .hero-action-button.btn-refresh { grid-column: 1 / -1; }
  .outcome-page-header { display: block; }
  .outcome-range { margin-top: 1rem; }
  .outcome-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome-slot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .topbar .account { width: 100%; margin-left: 0; }
  .account-item { flex: 1; }
  main { padding: 0.8rem; }
  .dashboard-intro { align-items: flex-start; }
  .statusbar { grid-template-columns: 1fr; }
  .status-item { border-right: 0; border-bottom: 1px solid #edf1f6; }
  .hero-title { font-size: 1.2rem; }
  .display-name { font-size: 1.14rem; }
  .cards { grid-template-columns: 1fr; }
  .hero-action-box { grid-template-columns: 1fr; }
  .hero-action-button.btn-refresh { grid-column: auto; }
  .alert-overlay { inset: auto 0.55rem 0.55rem; width: auto; }
  .strong-alert-mini-card { grid-template-columns: 1.8rem minmax(0, 1fr) auto; }
  .strong-alert-mini-price { display: none; }
  .strong-alert-mini-card .level-tag { grid-column: 3; }
  .outcome-summary-grid { grid-template-columns: 1fr; }
  .outcome-slot-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
/* Shared Mac / Web product version. */
.version-note { padding: 12px 20px 20px; text-align: center; color: #718096; font-size: 12px; }
