/* FOMO Top100 · Apple-clean shell (Hyperdash HL Chaos visual language)
   Keeps FOMO pink brand; remaps chrome/type/spacing/cards to match HD. */

:root {
  --hd-bg: #f5f5f7;
  --hd-panel: #ffffff;
  --hd-fg: #1d1d1f;
  --hd-muted: #86868b;
  --hd-line: rgba(0, 0, 0, 0.06);
  --hd-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --hd-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.06), 0 12px 28px rgba(0, 0, 0, 0.06);
  --hd-radius: 18px;
  --hd-radius-sm: 14px;
  --fomo-pink: #ff2974;
  --fomo-pink-soft: rgba(255, 41, 116, 0.12);
  --fomo-pink-line: rgba(255, 41, 116, 0.28);
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", system-ui, sans-serif;

  /* Remap FOMO theme tokens → Apple light */
  --background: var(--hd-bg);
  --foreground: var(--hd-fg);
  --card: var(--hd-panel);
  --card-foreground: var(--hd-fg);
  --popover: var(--hd-panel);
  --popover-foreground: var(--hd-fg);
  --primary: var(--fomo-pink);
  --primary-foreground: #fff;
  --secondary: #ececef;
  --secondary-foreground: var(--hd-fg);
  --muted: #ececef;
  --muted-foreground: var(--hd-muted);
  --accent: #ececef;
  --accent-foreground: var(--hd-fg);
  --border: rgba(0, 0, 0, 0.08);
  --input: rgba(0, 0, 0, 0.08);
  --ring: var(--fomo-pink);
  --radius: 0.9rem;

  --neutral-50: #fafafa;
  --neutral-100: #f5f5f7;
  --neutral-200: #e8e8ed;
  --neutral-500: #86868b;
  --neutral-900: #1d1d1f;

  --brand-100: var(--fomo-pink);
  --brand-60: rgba(255, 41, 116, 0.6);
  --brand-30: rgba(255, 41, 116, 0.28);
  --brand-10: rgba(255, 41, 116, 0.1);

  --bg-subtle: rgba(0, 0, 0, 0.04);
  --bg-subtle-hover: rgba(0, 0, 0, 0.06);
  --bg-base: rgba(255, 255, 255, 0.92);
  --bg-base-opaque: #fff;
  --bg-menu: #fff;
  --bg-chat: #f5f5f7;
  --bg-chat-nav: #ececef;
  --fg-base: var(--hd-fg);
  --fg-subtle: #6e6e73;
  --fg-muted: var(--hd-muted);
  --fg-disabled: #c7c7cc;
  --border-base: var(--hd-line);
  --border-strong: rgba(0, 0, 0, 0.1);
  --border-contrast: rgba(0, 0, 0, 0.14);
  --border-focus: rgba(255, 41, 116, 0.35);
}

html, body, #root {
  background: var(--hd-bg) !important;
  color: var(--hd-fg);
  font-family: var(--font-apple) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; margin: 0; }

/* Kill dark leftovers if any class flips */
html.dark, .dark {
  --background: var(--hd-bg) !important;
  --foreground: var(--hd-fg) !important;
  --card: var(--hd-panel) !important;
  --bg-base-opaque: #fff !important;
  --fg-base: var(--hd-fg) !important;
  color-scheme: light !important;
}

/* —— shell —— */
.fomo-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 88px;
}
@media (max-width: 720px) {
  .fomo-shell { width: calc(100% - 24px); padding: 28px 0 64px; }
}

/* —— hero header (Hyperdash-like) —— */
.fomo-hero {
  margin-bottom: 28px;
  border: none !important;
  background: transparent !important;
}
.fomo-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.fomo-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.fomo-brand-mark {
  width: 40px !important;
  height: 40px !important;
  margin-top: 2px;
  border-radius: 12px !important;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.08);
  ring: none !important;
}
.fomo-brand h1,
.fomo-brand .fomo-title {
  margin: 0 0 4px;
  font-size: clamp(1.45rem, 3vw, 2rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--hd-fg);
}
.fomo-brand .fomo-sub {
  margin: 0;
  font-size: 0.78rem !important;
  color: var(--hd-muted) !important;
  font-weight: 400 !important;
}

/* pill topnav */
.fomo-topnav {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.055);
  border-radius: 980px;
  padding: 5px;
  flex-shrink: 0;
  border: none !important;
}
.fomo-navtab {
  appearance: none;
  border: none !important;
  background: transparent !important;
  color: rgba(0, 0, 0, 0.55);
  border-radius: 980px;
  padding: 11px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s;
  box-shadow: none !important;
}
.fomo-navtab:hover { color: var(--hd-fg); }
.fomo-navtab.active {
  background: #fff !important;
  color: var(--hd-fg) !important;
  font-weight: 780;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.08) !important;
}

.fomo-hero-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 18px;
}
.fomo-search-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.fomo-search-wrap > div > div {
  border-radius: 980px !important;
  background: var(--hd-panel) !important;
  border: 1px solid var(--hd-line) !important;
  box-shadow: var(--hd-shadow);
  padding: 9px 16px !important;
}
.fomo-search-wrap input {
  font-size: 0.9rem !important;
  background: transparent !important;
}
.fomo-search-wrap > div > div:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 41, 116, 0.18) !important;
  border-color: var(--fomo-pink-line) !important;
}

/* main */
.fomo-main {
  padding: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

/* summary pills */
.fomo-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px !important;
}
@media (max-width: 980px) {
  .fomo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.fomo-stats > * {
  background: var(--hd-panel) !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: 16px !important;
  padding: 16px 16px 14px !important;
  box-shadow: var(--hd-shadow) !important;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.fomo-stats > *:hover {
  transform: translateY(-1px);
  box-shadow: var(--hd-shadow-hover) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
.fomo-stats > *[class*="border-brand"],
.fomo-stats > *.active-stat {
  border-color: var(--fomo-pink-line) !important;
  background: linear-gradient(180deg, #fff 0%, #fff5f9 100%) !important;
  box-shadow: 0 2px 8px rgba(255, 41, 116, 0.08), 0 10px 24px rgba(255, 41, 116, 0.06) !important;
}
.fomo-stats .text-xs { font-size: 0.7rem !important; color: var(--hd-muted) !important; font-weight: 500; }
.fomo-stats .text-xl {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em;
  font-family: var(--font-apple) !important;
}

/* board + sidebar grid */
.fomo-layout {
  gap: 20px !important;
  grid-template-columns: minmax(0, 1fr) 340px !important;
}
@media (max-width: 980px) {
  .fomo-layout { grid-template-columns: 1fr !important; }
}

/* board table → Apple panel */
.fomo-board,
div.overflow-x-auto.rounded-xl {
  background: var(--hd-panel) !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: var(--hd-radius) !important;
  box-shadow: var(--hd-shadow) !important;
  overflow: hidden;
}
.fomo-board table,
div.overflow-x-auto.rounded-xl table {
  border-collapse: collapse;
}
.fomo-board thead th,
div.overflow-x-auto.rounded-xl thead th {
  font-size: 0.72rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em;
  color: var(--hd-muted) !important;
  background: transparent;
  padding-top: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--hd-line) !important;
  text-transform: none;
}
.fomo-board tbody tr,
div.overflow-x-auto.rounded-xl tbody tr {
  border-bottom: 1px solid var(--hd-line) !important;
  transition: background .15s;
}
.fomo-board tbody tr:last-child,
div.overflow-x-auto.rounded-xl tbody tr:last-child {
  border-bottom: none !important;
}
.fomo-board tbody tr:hover,
div.overflow-x-auto.rounded-xl tbody tr:hover {
  background: rgba(0, 0, 0, 0.015) !important;
}
.fomo-board td,
div.overflow-x-auto.rounded-xl td {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  vertical-align: middle;
}

/* sidebar: sticky column capped to viewport so 共同持仓 can scroll */
.fomo-side {
  max-height: calc(100vh - 1rem);
  display: flex !important;
  flex-direction: column;
  overflow: hidden; /* list inside cohold scrolls; avoid nested page fight */
}
.fomo-side > a.group,
.fomo-side > *:not(.fomo-cohold) {
  flex-shrink: 0;
}
/* sidebar cards */
.fomo-side > * ,
.fomo-side aside {
  background: var(--hd-panel) !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: var(--hd-radius) !important;
  box-shadow: var(--hd-shadow) !important;
}
.fomo-side a.group {
  background: var(--hd-panel) !important;
  border: 1px solid var(--hd-line) !important;
  border-radius: var(--hd-radius-sm) !important;
  box-shadow: var(--hd-shadow) !important;
}
.fomo-side a.group[href*="fomo.family"] {
  border-color: var(--fomo-pink-line) !important;
  background: linear-gradient(180deg, #fff 0%, #fff7fa 100%) !important;
}
.fomo-side aside .border-b-2 {
  border-bottom-width: 2px !important;
  border-color: var(--fomo-pink) !important;
}

/* chips (moves / filters) */
.fomo-chip,
button.rounded-full,
.fomo-chips button {
  border-radius: 980px !important;
  font-weight: 560;
  transition: color .15s, background .15s, border-color .15s;
}
button.rounded-full.bg-fg-base,
button.rounded-full.bg-brand-100,
.fomo-chip.active {
  background: var(--hd-fg) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* moves story cards */
.fomo-moves .rounded-xl,
.fomo-moves [class*="rounded-xl"] {
  border-radius: 16px !important;
  box-shadow: var(--hd-shadow);
  border-color: var(--hd-line) !important;
  background: var(--hd-panel);
}
.fomo-moves .rounded-xl:hover {
  box-shadow: var(--hd-shadow-hover);
  transform: translateY(-1px);
}

/* feed cards */
.fomo-feed .rounded-xl,
.fomo-feed [class*="rounded-xl"] {
  border-radius: 14px !important;
  border-color: var(--hd-line) !important;
  background: var(--hd-bg);
  box-shadow: none;
}
.fomo-feed .rounded-xl:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.1) !important;
}

/* detail page */
.fomo-detail h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em;
}
.fomo-detail .rounded-xl {
  border-radius: 16px !important;
  border-color: var(--hd-line) !important;
  box-shadow: var(--hd-shadow);
  background: var(--hd-panel);
}

/* footer */
.fomo-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hd-line);
  color: var(--hd-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}
.fomo-footer a {
  color: var(--fomo-pink);
  text-decoration: none;
  font-weight: 560;
}
.fomo-footer a:hover { text-decoration: underline; }
.fomo-footer .fine {
  margin-top: 8px;
  font-size: 0.7rem;
  opacity: 0.85;
}

/* misc polish */
.min-h-screen.bg-background { background: var(--hd-bg) !important; }
.text-brand-100 { color: var(--fomo-pink) !important; }
.bg-brand-10, .bg-brand-10\/40 { background: var(--fomo-pink-soft) !important; }
.border-brand-30, .border-brand-60 { border-color: var(--fomo-pink-line) !important; }

/* hide Surf/Plaza badge chrome if floated */
[data-plaza-badge], a[href*="plaza.computer"], a[href*="surf.computer"] {
  /* keep if in-content; only soften floating makers if present */
}


/* —— 共同持仓 (cohold) · Apple-clean cards —— */
.fomo-cohold {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0; /* allow flex child to shrink → list can scroll */
  overflow: hidden; /* clip to radius; scrolling lives on .fomo-cohold-list */
}
.fomo-cohold-header {
  flex-shrink: 0;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--hd-line);
  margin-bottom: 10px;
}
.fomo-cohold-heading {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hd-fg);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--fomo-pink);
}
.fomo-cohold-count {
  font-size: 0.72rem;
  font-weight: 560;
  color: var(--hd-muted);
  background: rgba(0,0,0,0.045);
  border-radius: 980px;
  padding: 2px 8px;
  letter-spacing: 0;
}
.fomo-cohold-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--hd-muted);
  font-weight: 450;
}

.fomo-cohold-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 8px 0;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.22) transparent;
}
.fomo-cohold-list::-webkit-scrollbar {
  width: 6px;
}
.fomo-cohold-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 980px;
}
.fomo-cohold-list::-webkit-scrollbar-track {
  background: transparent;
}

/* stacked layout (no sticky column): still give the list a reachable scroll box */
@media (max-width: 980px) {
  .fomo-side {
    max-height: none;
    overflow: visible;
  }
  .fomo-cohold {
    flex: none;
    max-height: min(70vh, 720px);
  }
}

.fomo-cohold-card {
  position: relative;
  background: #fafafa;
  border: 1px solid var(--hd-line);
  border-radius: 14px;
  padding: 12px 12px 11px;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.fomo-cohold-card:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: var(--hd-shadow);
}
.fomo-cohold-card.is-active {
  background: linear-gradient(180deg, #fff 0%, #fff5f9 100%);
  border-color: var(--fomo-pink-line);
  box-shadow: 0 2px 8px rgba(255, 41, 116, 0.08), 0 8px 20px rgba(255, 41, 116, 0.05);
}
.fomo-cohold-card.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--fomo-pink);
}

.fomo-cohold-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.fomo-cohold-head img,
.fomo-cohold-head [class*="rounded"] {
  border-radius: 10px !important;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.fomo-cohold-id {
  min-width: 0;
  flex: 1;
}
.fomo-cohold-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.fomo-cohold-sym {
  font-size: 0.95rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--hd-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fomo-cohold-card.is-active .fomo-cohold-sym {
  color: var(--fomo-pink);
}
.fomo-cohold-chain {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--hd-muted);
  background: rgba(0,0,0,0.045);
  border-radius: 980px;
  padding: 2px 7px;
}
.fomo-cohold-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--hd-muted);
  min-width: 0;
}
.fomo-cohold-holders {
  color: var(--fomo-pink);
  font-weight: 650;
  background: var(--fomo-pink-soft);
  border-radius: 980px;
  padding: 1px 7px;
  font-size: 0.68rem;
  letter-spacing: -0.01em;
}
.fomo-cohold-dot { opacity: 0.45; }
.fomo-cohold-price {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fomo-cohold-val {
  flex-shrink: 0;
  text-align: right;
  min-width: 64px;
}
.fomo-cohold-usd {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--hd-fg);
  font-family: var(--font-apple);
}
.fomo-cohold-badge {
  margin-top: 3px;
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--fomo-pink);
  background: var(--fomo-pink-soft);
  border-radius: 980px;
  padding: 1px 7px;
}

.fomo-cohold-meta {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--hd-line);
}
.fomo-cohold-intro {
  margin: 0 0 9px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #6e6e73;
  cursor: pointer;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.25em; /* keep card rhythm even with short intros */
  transition: color .15s;
}
.fomo-cohold-intro:hover { color: var(--hd-fg); }
.fomo-cohold-intro.is-open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  white-space: pre-line;
  min-height: 0;
}
.fomo-cohold-intro.is-empty {
  cursor: default;
  color: #c7c7cc;
  font-style: italic;
}

.fomo-cohold-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fomo-cohold-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 980px;
  border: 1px solid var(--hd-line);
  background: #fff;
  padding: 4px 9px;
  font-size: 0.68rem;
  font-weight: 560;
  color: #6e6e73;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.fomo-cohold-link:hover {
  color: var(--fomo-pink);
  border-color: var(--fomo-pink-line);
  background: var(--fomo-pink-soft);
  box-shadow: 0 1px 2px rgba(255, 41, 116, 0.08);
}

.fomo-cohold-empty {
  padding: 28px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--hd-muted);
}
