.market-menu {
  width: min(320px, calc(100vw - 18px));
  max-height: min(78vh, 610px);
  overflow-y: auto;
  padding: 0;
  border-radius: 10px;
  overscroll-behavior: contain;
}
.market-menu > .watchlist-search-wrap,
.market-menu > .watchlist-picker,
.market-menu > .watchlist-section { display: block; }
.watchlist-search-wrap {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--overlay);
}
.watchlist-search-label,
.watchlist-sort-label { color: var(--muted); font-size: 11px; font-weight: 650; }
.watchlist-search {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}
.watchlist-search::placeholder { color: var(--muted); }
.watchlist-picker { padding: 7px 8px 4px; border-bottom: 1px solid var(--line); }
.watchlist-picker-head { padding: 2px 4px 7px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.watchlist-picker-rows { max-height: min(28vh, 220px); overflow-y: auto; padding: 0 2px; }
.watchlist-picker-row { min-height: 46px; display: flex; align-items: center; gap: 6px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
.watchlist-picker-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.watchlist-picker-copy strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-picker-price { min-width: 52px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.watchlist-add-coin,
.watchlist-select,
.watchlist-remove { min-height: 40px; border: 0; border-radius: 5px; cursor: pointer; }
.market-menu .watchlist-add-coin { width: auto; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; background: var(--surface-3); color: var(--blue); font-size: 11px; font-weight: 700; white-space: nowrap; }
.watchlist-add-coin:hover { background: var(--surface-2); }
.watchlist-picker-row .watchlist-change { min-width: 58px; padding: 4px 5px; font-size: 10px; }
.watchlist-section { padding: 0 7px 8px; }
.watchlist-head { min-height: 40px; display: flex; align-items: center; padding: 3px 3px 2px; }
.watchlist-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 13px; font-weight: 850; letter-spacing: .015em; }
.watchlist-spark { display: inline-block; color: var(--yellow); font-size: 15px; line-height: 1; text-shadow: 0 0 4px color-mix(in srgb, var(--yellow) 58%, transparent); transform-origin: center; animation: watchlistSparkle 2.4s ease-in-out infinite; }
.watchlist-columns { display: grid; grid-template-columns: 28px minmax(0, 1fr) 72px 82px; align-items: center; min-height: 30px; margin-right: 33px; padding: 0 5px; border-top: 1px solid var(--line); color: var(--muted); }
.watchlist-column-spacer { grid-column: 1 / 3; }
.watchlist-sort-button { min-width: 0; min-height: 30px; width: 100%; display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 1px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.watchlist-sort-button:hover, .watchlist-sort-button:focus-visible, .watchlist-sort-button[aria-pressed="true"] { color: var(--text); }
.watchlist-sort-button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 3px; }
.watchlist-sort-arrow { flex: 0 0 10px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: var(--muted); font-size: 7px; line-height: 5px; text-align: center; }
.watchlist-sort-arrow .sort-up,
.watchlist-sort-arrow .sort-down { display: block; height: 5px; color: var(--muted); }
.watchlist-sort-arrow .is-active { color: var(--yellow); }
#watchlistSortPrice { justify-content: flex-end; gap: 0; padding-right: 0; text-align: right; font-size: 9px; }
#watchlistSortPrice > span:first-child { transform: translateX(23px); }
#watchlistSortPrice .watchlist-sort-arrow { flex-basis: 8px; transform: translateX(11px); }
#watchlistSortChange { padding-right: 0; gap: 3px; transform: none; }
#watchlistSortChange > span:first-child { transform: translateX(14px); }
#watchlistSortChange .watchlist-sort-arrow { transform: translateX(18px); }
.watchlist-column-remove { display: block; }
.watchlist-rows { max-height: min(40vh, 310px); overflow-y: auto; padding-top: 0; }
.watchlist-row { display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; gap: 3px; border-radius: 5px; }
.watchlist-row:hover, .watchlist-row.is-current { background: var(--surface-2); }
.market-menu .watchlist-select { width: 100%; min-height: 46px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 72px 82px; align-items: center; gap: 5px; padding: 4px 5px; border: 0; background: transparent; color: var(--text); text-align: left; }
.market-menu .watchlist-select:hover { background: var(--surface-3); }
.watchlist-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.watchlist-copy strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.watchlist-copy > span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.watchlist-change { min-width: 64px; padding: 5px 6px; border-radius: 4px; background: color-mix(in srgb, var(--green) 11%, transparent); color: var(--green); font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.watchlist-change.negative { background: color-mix(in srgb, var(--red) 11%, transparent); color: var(--red); }
.market-menu .watchlist-remove { width: 32px; min-height: 40px; display: grid; grid-template-columns: 1fr; place-items: center; padding: 0; color: var(--muted); background: transparent; font-size: 20px; }
.watchlist-remove:hover { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.watchlist-empty, .watchlist-no-results { margin: 0; padding: 15px 10px; color: var(--muted); text-align: center; }
.market-menu .watchlist-legacy { display: none !important; }
@keyframes watchlistSparkle {
  0%, 100% { opacity: .72; filter: brightness(.95); transform: rotate(-9deg) scale(.88); }
  48% { opacity: 1; filter: brightness(1.5) drop-shadow(0 0 3px var(--yellow)); transform: rotate(12deg) scale(1.16); }
}
@media (prefers-reduced-motion: reduce) { .watchlist-spark { animation: none; } }
@media (max-width: 700px) {
  .market-menu { top: 51px; left: 42px; width: min(320px, calc(100vw - 14px)); }
  .watchlist-rows { max-height: 37vh; }
}
