/* DChan Bet Scanner v5 — five destinations, accessible mobile navigation.
 * All colors inherit the currently selected NFL/NBA team palette. */
body.dchan-v5-active[data-team-theme]{
 --v5-bg:var(--team-background,#081320);
 --v5-panel:var(--team-panel-deep,#102339);
 --v5-card:var(--team-card-dark,#10243b);
 --v5-line:color-mix(in srgb,var(--team-border-light,#365a81) 58%,transparent);
 --v5-accent:var(--team-accent-light,#91cbff);
 --v5-fg:var(--team-fg,#f0f6ff);
 --v5-muted:var(--team-muted,#bbcada);
}
body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav{
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 gap:4px!important;margin:0 0 9px!important;padding:5px!important;
 position:sticky!important;top:env(safe-area-inset-top,0px)!important;
 z-index:35!important;border:1px solid var(--v5-line)!important;
 background:color-mix(in srgb,var(--v5-panel) 95%,transparent)!important;
 border-radius:13px!important
}
body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav button{
 position:relative!important;display:flex!important;flex-direction:column!important;
 justify-content:center!important;align-items:center!important;
 gap:4px!important;min-width:0!important;max-width:100%!important;
 min-height:59px!important;height:59px!important;
 padding:6px 2px!important;border-radius:9px!important;
 background:transparent!important;box-shadow:none!important;
 color:var(--v5-muted)!important;font-size:11px!important;
 font-weight:750!important;line-height:1.15!important;
 text-align:center!important;white-space:normal!important;
 overflow:visible!important
}
body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav button>span:last-child{
 display:flex!important;align-items:center!important;justify-content:center!important;
 gap:2px!important;flex-wrap:nowrap!important;min-width:0!important;
 max-width:100%!important;white-space:nowrap!important;
 line-height:1.2!important;font-size:10.5px!important;
 letter-spacing:0!important
}
body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav .dchan-nav-icon{
 display:grid!important;place-items:center!important;
 width:23px!important;height:23px!important;min-height:23px!important;
 margin:0!important;color:var(--v5-accent)!important
}
body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav .dchan-nav-icon svg{
 width:22px!important;height:22px!important
}
body.dchan-v5-active[data-team-theme] #research-slip-count{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 position:absolute!important;top:2px!important;right:3px!important;
 min-width:15px!important;height:15px!important;
 padding:1px 3px!important;line-height:1!important;font-size:9px!important;
 font-weight:850!important;color:var(--v5-bg)!important;
 background:var(--v5-accent)!important;border-radius:10px!important;
 border:1px solid var(--v5-panel)!important;
 pointer-events:none!important
}
body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav button[aria-current="page"]{
 color:var(--v5-fg)!important;background:var(--team-control,var(--v5-card))!important;
 border:1px solid var(--v5-accent)!important
}
/* The original legacy social-view rule hid this navigation because it was not
   in the whitelist. Specific ID selectors restore it on all three views. */
body.dchan-v5-active:is(.community-view,.messages-view,.profile-view) .wrap > #research-shortcuts.dchan-pro-main-nav{
 display:grid!important;visibility:visible!important;opacity:1!important
}
body.dchan-v5-active:is(.community-view,.messages-view,.profile-view) .wrap > #dchan-workspace-switch-v2,
body.dchan-v5-active:is(.community-view,.messages-view,.profile-view) .wrap > .theme-bar,
body.dchan-v5-active:is(.community-view,.messages-view,.profile-view) .wrap > #dchan-sport-bar{
 display:none!important
}
/* Replace the duplicate Community tab with Messages and Account utilities.
   The working Community trigger remains available to existing JS but is not
   presented a second time. */
body.dchan-v5-active[data-team-theme] #dchan-social-nav{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:6px!important;margin:0 0 5px!important
}
body.dchan-v5-active[data-team-theme] #dchan-social-nav #dchan-community-open{display:none!important}
body.dchan-v5-active:is(.community-view,.messages-view,.profile-view) #dchan-social-nav{
 display:none!important
}
body.dchan-v5-active[data-team-theme] .focus-home-button,
body.dchan-v5-active[data-team-theme] #back-to-picks{
 display:none!important
}
body.dchan-v5-active[data-team-theme] .dchan-v5-heading{
 margin:0 0 9px;padding:10px 12px;
 border:1px solid var(--v5-line);border-radius:12px;
 background:var(--v5-panel);box-shadow:none
}
body.dchan-v5-active[data-team-theme] .dchan-v5-heading strong{
 display:block;color:var(--v5-fg);font-size:17px;line-height:1.2
}
body.dchan-v5-active[data-team-theme] .dchan-v5-heading small{
 display:block;margin-top:4px;color:var(--v5-muted);
 font-size:12px;line-height:1.4
}
/* Real screen destinations: live + top market on Home, game slate on Games,
   advanced comparisons and AI on Research. Bet slip retains original logic. */
body.dchan-v5-active[data-dchan-destination="home"] #scan-panel,
body.dchan-v5-active[data-dchan-destination="home"] #dchan-v4-history,
body.dchan-v5-active[data-dchan-destination="home"] #dchan-v4-prices,
body.dchan-v5-active[data-dchan-destination="home"] #dchan-v4-research{
 display:none!important
}
body.dchan-v5-active[data-dchan-destination="games"] #live-score-panel,
body.dchan-v5-active[data-dchan-destination="games"] #top3-panel,
body.dchan-v5-active[data-dchan-destination="games"] #dchan-v4-history,
body.dchan-v5-active[data-dchan-destination="games"] #dchan-v4-prices,
body.dchan-v5-active[data-dchan-destination="games"] #dchan-v4-research{
 display:none!important
}
body.dchan-v5-active[data-dchan-destination="research"] #live-score-panel,
body.dchan-v5-active[data-dchan-destination="research"] #scan-panel,
body.dchan-v5-active[data-dchan-destination="research"] #top3-panel{
 display:none!important
}
body.dchan-v5-active[data-dchan-destination="research"] #dchan-v4-history,
body.dchan-v5-active[data-dchan-destination="research"] #dchan-v4-prices,
body.dchan-v5-active[data-dchan-destination="research"] #dchan-v4-research{
 display:block!important
}
body.dchan-v5-active[data-dchan-destination="research"] #dchan-v4-research{
 border-color:var(--v5-line)!important
}
/* When an actual social view is open its original panels own the screen. */
body.dchan-v5-active:is(.community-view,.messages-view,.profile-view) .wrap > #dchan-v5-screen-heading{
 display:none!important
}
/* Bet-slip UI: no analytics cards or sportsbook CTA when there are zero legs. */
body.dchan-v5-active[data-dchan-slip-empty="true"] #smart-audit-card,
body.dchan-v5-active[data-dchan-slip-empty="true"] .bet-note-actions{
 display:none!important
}
body.dchan-v5-active[data-dchan-slip-empty="true"] #premium-probability{
 margin:8px 0!important
}
body.dchan-v5-active #probability-lab .heading{
 align-items:center!important;gap:7px!important
}
body.dchan-v5-active #probability-lab .heading h2{
 font-size:20px!important;line-height:1.2!important
}
/* "Odds closed" means markets are locked, not that the match is final. */
body.dchan-v5-active .game-market-closed{
 display:inline-flex;align-items:center;justify-content:center;
 min-height:32px;padding:6px 8px;border:1px solid var(--v5-line);
 border-radius:8px;background:var(--v5-card);color:var(--v5-muted);
 font-size:11px;font-weight:750;line-height:1.2
}
/* Show essential price source and freshness even while top-pick cards are folded. */
body.dchan-v5-active .top3-compact-chance .top3-compact-source{
 display:block!important;margin-top:3px;max-width:105px;
 overflow-wrap:anywhere;white-space:normal!important;
 color:var(--v5-muted);font-size:10px!important;font-weight:550!important;
 line-height:1.25!important
}
body.dchan-v5-active .top3-compact-row{
 gap:7px!important;padding:10px 9px!important
}
body.dchan-v5-active .top3-compact-main b{font-size:12px!important}
body.dchan-v5-active .top3-compact-chance{font-size:16px!important}
body.dchan-v5-active .top3-caption{font-size:11px!important;line-height:1.5!important}
body.dchan-v5-active .dchan-v4-fold-copy small,
body.dchan-v5-active .live-score-meta,
body.dchan-v5-active #scan-panel .gamehead,
body.dchan-v5-active .dchan-social-head p{
 font-size:11.5px!important;line-height:1.4!important
}
/* Prevent invisible content from intercepting taps and keep focus visible. */
body.dchan-v5-active #research-shortcuts button:focus-visible,
body.dchan-v5-active .dchan-v4-fold>summary:focus-visible{
 outline:2px solid var(--v5-accent)!important;outline-offset:2px!important
}
@media(max-width:390px){
 body.dchan-v5-active #research-shortcuts.dchan-pro-main-nav button{
  min-height:56px!important;height:56px!important;font-size:10px!important
 }
 body.dchan-v5-active #research-shortcuts.dchan-pro-main-nav button>span:last-child{
  font-size:9.5px!important
 }
 body.dchan-v5-active #research-slip-count{right:1px!important}
 body.dchan-v5-active .dchan-v5-heading{padding:9px 10px}
}
@media(min-width:768px){
 body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav{
  max-width:850px;margin-inline:auto!important
 }
 body.dchan-v5-active[data-team-theme] #research-shortcuts.dchan-pro-main-nav button{
  min-height:65px!important;height:65px!important;font-size:12px!important
 }
}

body.dchan-v5-active[data-dchan-destination="slip"] #dchan-v5-screen-heading{
 display:none!important
}
body.dchan-v5-active[data-dchan-destination="slip"] #dchan-v4-history,
body.dchan-v5-active[data-dchan-destination="slip"] #dchan-v4-prices,
body.dchan-v5-active[data-dchan-destination="slip"] #dchan-v4-research{
 display:none!important
}
body.dchan-v5-active[data-dchan-slip-empty="true"] #premium-probability:not([open]){
 padding:0!important
}
