/* Buy the Dip tab + favorites (additive; does not restyle existing board elements). */
.dip-tabs-wrap { flex-basis: 100%; width: 100%; margin-top: 8px; }
.dip-tabs-row { width: max-content; max-width: 100%; }
.category-btn.dip-tab-btn { color: #ff7a1a; font-weight: 600; border-color: rgba(255,122,26,.6); }
.category-btn.dip-tab-btn:hover { background: rgba(255,122,26,.12); }
.category-btn.dip-tab-btn.active { background: #ff7a1a; color: #0b0e11; border-color: #ff7a1a; }
.dip-tab-sep { width: 1px; align-self: stretch; background: #2a3340; margin: 0 4px; }
.dip-panel { margin-top: 4px; }
.dip-panel.hidden, .board-wrap.dip-hidden { display: none !important; }
.dip-explainer { background: #0b0e11; border: 1px solid #2a3340; border-left: 4px solid #ff7a1a; border-radius: 10px; padding: 14px 18px; margin: 0 0 14px; color: #e8edf5; line-height: 1.55; font-size: 14px; }
.dip-explainer h3 { margin: 0 0 6px; font-size: 16px; color: #fff; letter-spacing: .3px; }
.dip-explainer .c-bull { color: var(--green, #00c853); font-weight: 800; }
.dip-explainer .c-bear { color: var(--red, #ff3d57); font-weight: 800; }
.dip-explainer .dip-meta { color: #8b97a8; font-size: 12.5px; margin-top: 6px; }
.dip-table { width: 100%; border-collapse: collapse; }
.dip-table th { text-align: left; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #8b97a8; padding: 10px 12px; border-bottom: 1px solid #2a3340; font-weight: 700; }
.dip-table th.num, .dip-table td.num { text-align: right; }
.dip-table td { padding: 11px 12px; border-bottom: 1px solid #1a2029; color: #e8edf5; font-size: 14px; }
.dip-table tbody tr { cursor: pointer; }
.dip-table tbody tr:hover td { background: rgba(255,122,26,.07); }
.dip-table .dip-ticker { color: #ff7a1a; font-weight: 800; font-size: 15px; }
.dip-table .dip-name { color: #8b97a8; font-size: 12px; margin-left: 6px; }
.dip-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid #2a3340; color: #c9d2de; margin: 0 4px 2px 0; white-space: nowrap; }
.dip-pill { display: inline-block; min-width: 54px; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .5px; }
/* BULL/BEAR pills now use the board's own .bias.bull/.bias.bear (green/red); orange stays on the tab buttons only. */
.dip-pill.na { color: #8b97a8; border: 1px solid #2a3340; }
.dip-badge-in { color: #0b0e11; background: #ff7a1a; font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 6px; letter-spacing: .5px; }
.dip-badge-out { color: #8b97a8; font-size: 12px; }
.dip-star { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 6px 0 0; color: #4a5566; vertical-align: middle; }
.dip-star:hover { color: #ffb27a; }
.dip-star.on { color: #ff7a1a; }
td.sym .dip-star { font-size: 16px; opacity: 0; transition: opacity .12s; }
#boardBody tr:hover td.sym .dip-star, #dipPanel tr:hover td.sym .dip-star, td.sym .dip-star:focus-visible, td.sym .dip-star.on { opacity: 1; }
#boardBody tr:hover td.sym .dip-star:not(.on), #dipPanel tr:hover td.sym .dip-star:not(.on) { color: #ff9a4d; }
/* Compact star tucked right beside the asset (no extra column width). */
/* 2026-11-12 starundo: 32x32 tap target (was 18x16). Glyph 17px, centered in the box; negative vertical margins
   keep the row height unchanged, negative left margin uses the cell's left padding so the ticker barely moves. */
td.sym .dip-star { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 32px; height: 32px; padding: 0; margin: -8px 2px -8px -8px; font-size: 17px; text-align: center;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; border-radius: 0; }
td.sym .dip-star:focus-visible { outline: 2px solid #ff7a1a; outline-offset: -2px; }
.dip-table td.sym .dip-ticker { vertical-align: middle; }
@media (hover: none) { td.sym .dip-star { opacity: .55; } td.sym .dip-star.on { opacity: 1; } }
.dip-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #ff7a1a; color: #0b0e11; font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 8px; z-index: 12500; /* chartstar: above the chart viewer (.ui-modal 12000) */ box-shadow: 0 6px 20px rgba(0,0,0,.5); opacity: 0; transition: opacity .2s; pointer-events: none; }
.dip-toast.show { opacity: 1; }
.dip-empty { color: #8b97a8; padding: 22px 12px; text-align: center; }
.dip-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 14px 0 6px; color: #8b97a8; font-size: 12.5px; }
.dip-nfa { color: #8b97a8; font-size: 12.5px; }
.dip-admin { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border: 1px dashed #ff7a1a; border-radius: 10px; padding: 10px 14px; margin-top: 12px; color: #e8edf5; font-size: 13px; }
.dip-admin .dip-admin-label { color: #ff7a1a; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 11px; }
.dip-admin a { color: #ff9a4d; }
body.dip-view-on #errorPanel { display: none !important; }

/* Even, compact columns on Buy the Dip + Favorites tables (no column soaks up spare width). */
.dip-table.dip-eq { table-layout: fixed; min-width: 720px; }
.dip-table.dip-eq thead th:first-child { width: 10rem; }
.dip-table.dip-eq td { overflow: hidden; text-overflow: ellipsis; }
.dip-table.dip-eq td.dip-lists { white-space: normal; }
@media (max-width: 720px) { .dip-table.dip-eq thead th:first-child { width: 7.5rem; } .dip-table.dip-eq th, .dip-table.dip-eq td { padding-left: 8px; padding-right: 8px; } }

/* 🔔 Buy the Dip alert bell next to the ★ (2026-10-24). Off = grey, on = full colour. */
.dip-bell { background: none; border: 0; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; margin: 0 6px 0 0; width: 18px; text-align: center; vertical-align: middle; filter: grayscale(1); opacity: .45; }
.dip-bell:hover { opacity: .8; }
.dip-bell.on { filter: none; opacity: 1; }
td.sym .dip-bell { opacity: 0; transition: opacity .12s; }
#boardBody tr:hover td.sym .dip-bell:not(.on), #dipPanel tr:hover td.sym .dip-bell:not(.on), td.sym .dip-bell:focus-visible { opacity: .45; }
td.sym .dip-bell.on { opacity: 1; }
@media (hover: none) { td.sym .dip-bell { opacity: .4; } td.sym .dip-bell.on { opacity: 1; } }
.dip-table td.sym .dip-bell { margin-right: 6px; }
/* All setups | My alerts filter inside the Buy the Dip tab */
.dip-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.dip-filter-btn { background: transparent; border: 1px solid #2a3340; color: #c9d2de; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.dip-filter-btn:hover { border-color: #ff7a1a; color: #fff; }
.dip-filter-btn.active { background: #ff7a1a; color: #0b0e11; border-color: #ff7a1a; }
/* 2026-10-24: Buy the Dip tab row sizes to its button like the regular tabs (mobile rule made .category-tabs fill 100%). */
@media (max-width: 720px) { .filter-row-lists .category-tabs.dip-tabs-row { flex: 0 0 auto; width: max-content; max-width: 100%; } }

/* ★ Favorite / 🔔 Add alert buttons in the See Trend action row (2026-10-25): same look as Close (.btn.list-btn). */
.lookup-act-btn[hidden] { display: none; }
.lookup-act-btn.on { color: var(--text, #e6edf3); }
@media (max-width: 460px) {
  .lookup-modal-footer .modal-actions.has-fav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .lookup-modal-footer .modal-actions.has-fav-actions .btn { width: 100%; white-space: nowrap; }
}

/* 2026-10-28: Buy the Dip removal follow-up. .category-tabs-wrap sets display:inline-flex, which overrode the
   hidden attribute, so the (flag-off) "Buy the Dip" tab row stayed visible. Hidden now really means hidden. */
.dip-tabs-wrap[hidden] { display: none !important; }

/* ★ Undo toast + pending-removal rows (2026-11-12 starundo) */
.fav-undo { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); z-index: 12500; /* above the chart viewer (.ui-modal 12000) */
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box;
  background: #14181e; color: #e8edf5; border: 1px solid rgba(255,122,26,.55); border-radius: 12px;
  padding: 10px 10px 10px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility 0s linear .18s; }
.fav-undo.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s, transform .18s; }
.fav-undo-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fav-undo-btn { flex: none; background: #ff7a1a; color: #0b0e11; border: 0; border-radius: 8px; font: inherit; font-weight: 800;
  padding: 8px 14px; min-height: 36px; cursor: pointer; }
.fav-undo-btn:hover { background: #ff9a4d; }
.fav-undo-btn:focus-visible { outline: 2px solid #e8edf5; outline-offset: 2px; }
body.fav-undo-on .dip-toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
tr.fav-pending > td { opacity: .4; transition: opacity .15s; }
tr.fav-pending > td.sym { opacity: 1; }
tr.fav-pending > td.sym > :not(.dip-star) { opacity: .4; }
tr.fav-pending .sym-btn { text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .fav-undo, .fav-undo.show { transition: none; } }

/* ★ + 🔔 in the chart viewer's top bar (2026-11-12 chartstar). 32px tap targets; X stays 44px. */
.chart-modal-top .chart-top-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 32px; height: 32px; padding: 0; margin: 0; border: 0; border-radius: 9px; background: rgba(255,255,255,.06);
  color: #8b97a8; cursor: pointer; font-size: 19px; line-height: 1; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.chart-modal-top .chart-top-btn[hidden] { display: none; }
@media (hover: hover) { .chart-modal-top .chart-top-btn:hover { background: rgba(255,122,26,.14); color: #ffb27a; } }  /* no sticky hover after a tap on phones */
.chart-modal-top .chart-top-btn:focus-visible { outline: 2px solid #ff7a1a; outline-offset: 1px; }
.chart-modal-top .chart-fav-btn.on { color: #ff7a1a; }
.chart-modal-top .chart-alerts-btn:disabled { opacity: .5; cursor: progress; }
.chart-modal-top .chart-alerts-btn svg { display: block; }
/* Sticky asset text: ticker never truncates; the " · $price" part ellipsizes if it must. */
.chart-modal-card .chart-modal-sticky-asset { display: flex; justify-content: center; align-items: baseline; white-space: nowrap; }
.chart-modal-card .chart-modal-sticky-asset .chart-sticky-tk { flex: 0 0 auto; }
.chart-modal-card .chart-modal-sticky-asset .chart-sticky-px { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .chart-modal-top .chart-top-btn { font-size: 18px; }
  /* make room for ★ + 🔔 so "NVDA · $160.13" still fits at 390px */
  .chart-modal-card .chart-modal-top { gap: 6px; }
  /* phone: show just the bull mark from the wordmark (left part of the same image) */
  .chart-modal-card .chart-modal-top .ui-modal-brand { flex: none; width: 34px; max-width: 34px; overflow: hidden; }
  .chart-modal-card .chart-modal-top .ui-modal-brand .ui-brand-logo { width: 34px; max-width: none; height: 24px; object-fit: cover; object-position: left center; }
}
@media (max-width: 374px) {  /* small Android (360) / iPhone SE (320) */
  .chart-modal-card .chart-modal-top { gap: 4px; }
  .chart-modal-card .chart-modal-sticky-asset { font-size: 12px; letter-spacing: 0; }
}
@media (max-width: 339px) {  /* iPhone SE 1st gen / 320px: drop the bull mark so ticker + price fit */
  .chart-modal-card .chart-modal-top .ui-modal-brand { display: none; }
}
