/* =============================================
   BASKETBALL.CSS — 籃球麥迪第二波共用樣式（index.html 常駐載入、放在 components.css 之後）
   規格：docs/basketball-plan.md §10
   ★ 各區塊由不同負責人追加、用「斜線星號 ── 區塊名（負責人）── 星號斜線」註解分隔；只動自己的區塊。
   ★ 顏色只准用變數（var(--accent)、var(--accent-bg)、var(--bg-card)…）——主題色集中在 css/site-nav.css
     的 html[data-sport="basketball"]，用戶之後可能換色。唯一例外：客隊色 #7aa7d6。
   ============================================= */

/* ── 足球｜籃球切換膠囊＋手機頂欄讓位 sport-fit-* → 已搬到 css/site-nav.css（首頁與獨立頁共用；膠囊由 js/site-nav.js 畫）── */

/* 籃球模式：賽程頁 sticky chips 列的底色跟著主題（components.css 寫死深藍） */
html[data-sport="basketball"] #schedule-league-chips,
html[data-sport="baseball"] #schedule-league-chips { background: var(--bg-primary); }   /* 棒球模式同款 */

/* ── 籃球賽程卡（D1）── 外框沿用 .match-card（三欄 grid），下面幾段跨整列 */
.match-card.hoop-card .match-team-flag .flag-img { width: 46px; height: 46px; object-fit: contain; }   /* 2026-10-19 直排版：跟足球卡同尺寸 */
.hoop-card .hoop-score-row { color: var(--text-primary); }
.hoop-card .hoop-score-row .hoop-win { color: var(--accent); }
.hoop-card.match-finished { border-color: var(--border); background: var(--bg-card); }
.hoop-card .hoop-final-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 999px; margin-bottom: 4px;
  color: var(--text-secondary); border: 1px solid var(--border);
}
.hoop-card .hoop-postponed { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* 兩段勝率條（主 accent、客 #7aa7d6） */
.hoop-prob { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.hoop-prob-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-size: 12px; color: var(--text-secondary); margin-bottom: 6px;
}
.hoop-prob-line b { font-size: 14px; font-weight: 900; }
.hoop-prob-line .h b { color: var(--accent); }
.hoop-prob-line .a b { color: #7aa7d6; }
.hoop-prob-line .mid { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.hoop-prob-track { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--border); }
.hoop-prob-track i { display: block; height: 100%; }
.hoop-prob-track i.h { background: var(--accent); }
.hoop-prob-track i.a { background: #7aa7d6; }

/* pills：讓分 / 大小 / 麥迪預測 */
.hoop-pills { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hoop-pill {
  font-size: 11.5px; font-weight: 700; line-height: 1.2;
  padding: 3px 9px; border-radius: 999px;
  color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-border, var(--border-accent));
  white-space: nowrap;
}
.hoop-pill.muted { color: var(--text-secondary); background: transparent; border-color: var(--border); }

/* 每節比分列 */
.hoop-quarters {
  grid-column: 1 / -1; margin-top: 8px;
  font-size: 11.5px; color: var(--text-muted); text-align: center;
  font-variant-numeric: tabular-nums; line-height: 1.6;
}
.hoop-quarters span { white-space: nowrap; }

@media (max-width: 600px) {
  .match-card.hoop-card .match-team-flag .flag-img { width: 40px; height: 40px; }
  .hoop-prob-line { font-size: 11px; }
  .hoop-prob-line b { font-size: 13px; }
}

/* ── 數據/球隊頁（D2／U1 重刻）── 2026-10-13 起一律套足球零件（.scorer-card / .standings-table / .team-card /
   .modal-team-header / .form-dots / .trm-row / .player-pill，見 docs/basketball-plan.md §13），本區不再有專屬樣式 ── */

/* ── 彈窗（E）── js/pred-modal-basketball.js；前綴 bbm-（bb- 已被 bet-board.css 佔用）；骨架沿用 odds-only-pred.css 的 oo-* ── */
.bbm-modal { padding: 4px 2px 8px; }
.bbm-modal .oo-league-tag { margin-bottom: 12px; }
.bbm-team-link { cursor: pointer; }
.bbm-result { margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--accent); }
.bbm-live-wrap { margin-top: 6px; }
.bbm-chip-pp { color: var(--text-secondary); border: 1px solid var(--border); }

/* 勝率兩卡 + 雙色條 */
.bbm-pred .oo-pred-head .confidence-badge { margin-left: auto; font-size: 11px; padding: 2px 10px; }
.bbm-wp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bbm-wp-card {
  position: relative; min-width: 0; text-align: center; padding: 12px 6px;
  border-radius: 13px; background: var(--bg-card); border: 1px solid var(--border);
}
.bbm-wp-card.is-lead { border-color: var(--bbm-c); box-shadow: 0 0 0 1px var(--bbm-c) inset; }
.bbm-wp-side { position: absolute; top: 6px; left: 8px; font-size: 9px; font-weight: 800; color: var(--text-muted); }
.bbm-wp-badge { height: 28px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.bbm-wp-logo { width: 28px; height: 28px; object-fit: contain; display: block; }
.bbm-wp-nm { font-size: 12px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbm-wp-pct { margin-top: 6px; font-size: 28px; font-weight: 900; line-height: 1; color: var(--bbm-c); font-variant-numeric: tabular-nums; }
.bbm-wp-pct i { font-style: normal; font-size: 13px; margin-left: 1px; opacity: .6; }
.bbm-wp-bar { display: flex; height: 6px; margin-top: 10px; border-radius: 3px; overflow: hidden; background: var(--border); }
.bbm-wp-bar b { display: block; background: var(--accent); }
.bbm-wp-bar i { display: block; background: #7aa7d6; }
.bbm-score-h, .bbm-score-a { font-size: 12px; color: var(--text-secondary); }

/* 讓分 / 大小分建議 */
.bbm-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.bbm-pick { min-width: 0; padding: 10px; border-radius: 12px; background: var(--accent-bg); border: 1px solid var(--accent-border, var(--border-accent)); text-align: center; }
.bbm-pick-k { font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.bbm-pick-v { margin-top: 4px; font-size: 15px; font-weight: 900; color: var(--accent); word-break: break-word; }
.bbm-pick-s { margin-top: 4px; font-size: 10.5px; line-height: 1.45; color: var(--text-secondary); }
.bbm-noodds { margin-top: 12px; padding: 9px 11px; border-radius: 10px; border: 1px dashed var(--border); font-size: 12px; line-height: 1.6; color: var(--text-secondary); text-align: center; }
.bbm-mvm { margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--bg-card); font-size: 12px; line-height: 1.65; color: var(--text-secondary); }
.bbm-mvm b { color: var(--text-primary); }
.bbm-mvm-k { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: var(--accent); background: var(--accent-bg); }
.bbm-sub-head { margin: 14px 0 8px; font-size: 12px; font-weight: 800; color: var(--text-secondary); }

/* 兩隊對比列（近況 / 全隊數據） */
.bbm-cmp { display: flex; flex-direction: column; }
.bbm-cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bbm-cmp-row:first-child { border-top: 0; }
.bbm-cmp-h { text-align: left; font-weight: 700; }
.bbm-cmp-a { text-align: right; font-weight: 700; }
.bbm-cmp-l { text-align: center; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.bbm-cmp-hd { font-size: 11.5px; padding-bottom: 6px; }
.bbm-cmp-hd .bbm-cmp-h { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbm-cmp-hd .bbm-cmp-a { color: #7aa7d6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbm-cmp-h.is-better { color: var(--accent); }
.bbm-cmp-a.is-better { color: #7aa7d6; }

/* 近期賽果（兩欄） */
.bbm-rc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bbm-rc-col { min-width: 0; }
.bbm-rc-hd { font-size: 11.5px; font-weight: 800; color: var(--accent); margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbm-rc-col + .bbm-rc-col .bbm-rc-hd { color: #7aa7d6; }
.bbm-rc-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 0; font-size: 11px; }
.bbm-rc-mid { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.bbm-rc-d { color: var(--text-muted); font-size: 9.5px; }
.bbm-rc-op { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.bbm-rc-s { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bbm-rc-none { font-size: 11px; color: var(--text-muted); padding: 4px 0; }

/* 每節比分表 */
.bbm-qt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bbm-qt { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.bbm-qt th, .bbm-qt td { padding: 7px 4px; text-align: center; white-space: nowrap; border-top: 1px solid var(--border); }
.bbm-qt thead th { border-top: 0; font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.bbm-qt tbody th { text-align: left; font-weight: 700; max-width: 110px; }
.bbm-qt tbody th span { display: inline-block; max-width: 84px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.bbm-qt-logo { width: 18px; height: 18px; object-fit: contain; vertical-align: middle; margin-right: 5px; }
.bbm-qt td { color: var(--text-secondary); }
.bbm-qt-home td.is-win { color: var(--accent); font-weight: 800; }
.bbm-qt-away td.is-win { color: #7aa7d6; font-weight: 800; }
.bbm-qt td.bbm-qt-tot { font-size: 14px; font-weight: 900; color: var(--text-primary); }

/* 得分手 */
.bbm-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bbm-top-col { min-width: 0; }
.bbm-top-hd { font-size: 11.5px; font-weight: 800; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbm-top-home .bbm-top-hd { color: var(--accent); }
.bbm-top-away .bbm-top-hd { color: #7aa7d6; }
.bbm-top-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 6px; padding: 5px 0; }
.bbm-top-nm { min-width: 0; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbm-top-pts { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bbm-top-pts i { font-style: normal; font-size: 10px; font-weight: 700; margin-left: 1px; color: var(--text-muted); }
.bbm-top-sub { grid-column: 1 / -1; font-size: 10.5px; color: var(--text-muted); }
.bbm-top-home .bbm-top-row.is-lead .bbm-top-pts { color: var(--accent); }
.bbm-top-away .bbm-top-row.is-lead .bbm-top-pts { color: #7aa7d6; }

/* 進行中即時數據（§18 A2）：#bbm-live-stats＝即時得分手（bbm-top）＋全隊數據（bbm-cmp）；手機收合成一行摘要 */
.bbm-live-stats .oo-sec-sub { color: #ef4444; }
.bbm-lbox-sum { display: none; }
@media (max-width: 600px) {
  .bbm-lbox-sum {
    display: flex; align-items: center; gap: 4px; width: 100%; margin: 0; padding: 8px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: -0.2px; text-align: left; cursor: pointer;
  }
  .bbm-lbox-sum span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bbm-lbox-sum i { flex: 0 0 auto; font-style: normal; font-size: 12px; color: var(--accent); }
  .bbm-lbox.is-open .bbm-lbox-sum { margin-bottom: 6px; }
  .bbm-lbox:not(.is-open) .bbm-cmp { display: none; }
}
/* 賽程卡進行中當前得分王 */
.bb-live-top { margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--text-secondary); }

.bbm-empty { text-align: center; font-size: 12.5px; color: var(--text-muted); }
.bbm-foot { margin-top: 14px; text-align: center; font-size: 10.5px; color: var(--text-muted); }

@media (max-width: 400px) {
  .bbm-wp-pct { font-size: 24px; }
  .bbm-pick-v { font-size: 14px; }
  .bbm-cmp-row { font-size: 11.5px; }
  .bbm-qt { font-size: 11px; }
  .bbm-qt tbody th span { max-width: 60px; }
}

/* ── 主頁（D3）── js/basketball-home.js；前綴 bbh-（足球首頁入口 .bb-entry 已移除、改頂欄膠囊）── */
.bbh { display: flex; flex-direction: column; gap: 10px; max-width: 880px; margin: 0 auto; padding: 12px 16px 40px; }
/* 焦點區：木地板紋理 */
.bbh-hero {
  position: relative; overflow: hidden; border-radius: 16px; padding: 16px;
  background: repeating-linear-gradient(90deg, rgba(201,138,75,.10) 0 28px, rgba(201,138,75,.04) 28px 56px),
              linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--border);
}
.bbh-kicker { font-size: 12px; letter-spacing: 3px; color: var(--accent-2); font-weight: 700; }
.bbh-title { font-size: 22px; font-weight: 900; line-height: 1.3; margin: 4px 0 0; max-width: 62%; color: var(--text-primary); }
.bbh-title em { font-style: normal; color: var(--accent); }
.bbh-sub { font-size: 12.5px; color: var(--text-secondary); max-width: 60%; margin-top: 6px; }
.bbh-cta {
  margin-top: 12px; padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--bg-primary); font: inherit; font-size: 13.5px; font-weight: 900;
}
.bbh-maddy { position: absolute; right: -6px; bottom: -12px; width: 40%; max-width: 190px; height: auto; pointer-events: none; }

/* 聯賽 chips */
.bbh-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.bbh-chips::-webkit-scrollbar { display: none; }
.bbh-chip {
  flex: none; white-space: nowrap; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 5px 12px; border-radius: 14px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary);
}
.bbh-chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.bbh-days, .bbh-list { display: flex; flex-direction: column; gap: 8px; }
.bbh-lbl { font-size: 12.5px; color: var(--text-secondary); font-weight: 700; margin-top: 6px; display: flex; justify-content: space-between; }
.bbh-lbl-n { font-weight: 400; color: var(--text-muted); }
.bbh-empty { font-size: 13px; color: var(--text-muted); padding: 10px 2px; }
.bbh-more { align-self: flex-start; background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; }

/* 備援賽程卡（D1 的 cardHtml 沒載時用） */
.bbh-mini { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.bbh-mini-tg { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); }
.bbh-mini-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; font-size: 14px; font-weight: 900; margin-top: 4px; }
.bbh-mini-vs span:last-child { text-align: right; }
.bbh-mini-vs em { font-style: normal; color: var(--accent-2); font-size: 13px; }

/* 麥迪籃球日選 */
.bbh-pick {
  display: flex; flex-direction: column; gap: 2px; border-radius: 14px; padding: 12px; margin-top: 6px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent-bg), var(--accent-bg-deep)); border: 1px solid var(--accent-border);
}
.bbh-pick-empty { cursor: default; }
.bbh-pick-k { font-size: 11.5px; font-weight: 900; letter-spacing: 1px; color: var(--accent-2); }
.bbh-pick-b { font-size: 19px; font-weight: 900; color: var(--accent); }
.bbh-pick-s { font-size: 12px; color: var(--text-secondary); }

/* 排名 */
.bbh-rank[hidden] { display: none; }
.bbh-tbl { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 14px; padding: 6px 12px; font-size: 12.5px; }
.bbh-tbl > div { display: grid; grid-template-columns: 22px 1fr 50px; padding: 5px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.bbh-tbl > div:last-child { border-bottom: 0; }
.bbh-tbl b { color: var(--accent-2); text-align: right; }

/* ── 球員（P2）── 球員榜／球隊名單已改用足球 .scorer-card / .player-pill；這裡只留足球沒有的：頭像圓形小圖、傷兵小標（比賽彈窗用）── */
.bbp-av { border-radius: 50%; object-fit: cover; background: var(--border); flex: none; }
.bbp-av-empty { display: inline-block; }
.player-pill .bbp-av { display: inline-block; width: 24px; height: 24px; vertical-align: middle; margin: -3px 6px -2px -6px; }
.bbp-inj { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 800; line-height: 16px; color: #fff; vertical-align: 1px; flex: none; }
.bbp-inj.out { background: var(--danger); }
.bbp-inj.dtd { background: var(--warning); }
/* 比賽彈窗：缺陣／傷兵 */
.bbp-mi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bbp-mi-col { min-width: 0; }
.bbp-mi { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; min-width: 0; }
.bbp-mi .bbp-inj { margin-left: 0; }
.bbp-mi-n { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbp-mi-s { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
@media (max-width: 420px) { .bbp-mi { flex-wrap: wrap; row-gap: 0; } .bbp-mi-s { flex-basis: 100%; padding-left: 0; } }

/* ── bbr- 登錄名單卡（2026-10-18、js/basketball-roster-card.js、§19「呈現」）──
   足球沒有對應零件（足球是 lmc-pitch 球場圖）→ 借它的語言畫籃球半場：深藍底＋主色線、頭像圓標釘位；
   主隊 var(--accent)、客隊 #7aa7d6（同勝率條）。進場淡入上浮、reduced-motion 關。 */
.bbr-card { --bbr-c: var(--accent); --bbr-c-rgb: var(--accent-rgb, 255,122,26); min-width: 0; }
.bbr-card[data-k="1"] { --bbr-c: #7aa7d6; --bbr-c-rgb: 122,167,214; }
.bbr-hd { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.bbr-title { font-size: 13px; font-weight: 800; margin-right: 2px; }
.bbr-title::before { content: '📋 '; }
.bbr-src, .bbr-time, .bbr-rule { font-size: 10.5px; font-weight: 800; line-height: 18px; padding: 0 8px; border-radius: var(--radius-pill, 999px); white-space: nowrap; }
.bbr-src.official { color: #fff; background: var(--accent); }
.bbr-src.news { color: var(--accent-2); background: var(--accent-bg); border: 1px solid var(--accent-border); }
.bbr-time { color: var(--text-secondary); background: rgba(255,255,255,.06); }
.bbr-rule { color: var(--text-muted); margin-left: auto; padding: 0; }

/* 兩隊 tab＋滑動底條 */
.bbr-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.bbr-tab { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 7px 6px; border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; border-radius: 9px; transition: color .25s; }
.bbr-tab.on { color: var(--text-primary); }
.bbr-tab-logo { width: 20px; height: 20px; object-fit: contain; flex: none; }
.bbr-tab-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbr-tab-n { flex: none; font-size: 10.5px; font-weight: 900; padding: 0 6px; line-height: 16px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-secondary); }
.bbr-tab.on .bbr-tab-n { background: var(--bbr-c); color: #0b1422; }
.bbr-tab-bar { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px;
  background: linear-gradient(180deg, rgba(var(--bbr-c-rgb), .22), rgba(var(--bbr-c-rgb), .08)); box-shadow: inset 0 -2px 0 var(--bbr-c);
  transition: transform .35s cubic-bezier(.3,.8,.3,1), background .35s, box-shadow .35s; }
.bbr-card[data-k="1"] .bbr-tab-bar { transform: translateX(100%); }

/* 半場球場 */
.bbr-panel { display: none; }
.bbr-panel.on { display: block; }
.bbr-court { position: relative; margin-top: 10px; aspect-ratio: 450 / 360; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #0f2240 0%, #0b1a31 70%, #091427 100%); border: 1px solid rgba(var(--bbr-c-rgb), .35);
  box-shadow: inset 0 0 40px rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.25); }
.bbr-court::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(180deg, transparent, rgba(9,20,39,.85)); pointer-events: none; }
.bbr-court-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bbr-lines { stroke: var(--accent); stroke-width: 2.2; opacity: .75; }
.bbr-lines .bbr-paint { fill: rgba(var(--accent-rgb, 255,122,26), .09); }
.bbr-lines .bbr-three { stroke-width: 2.6; }
.bbr-lines .bbr-board { stroke-width: 4; stroke: #e8eef7; opacity: .8; }
.bbr-lines .bbr-rim { stroke-width: 3; }
.bbr-court-hd { position: absolute; z-index: 4; left: 8px; right: 8px; top: 7px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.bbr-court-tag { font-size: 10.5px; font-weight: 900; letter-spacing: .5px; padding: 2px 8px; border-radius: 999px; color: var(--text-secondary); background: rgba(9,20,39,.75); border: 1px dashed rgba(255,255,255,.25); }
.bbr-court-tag.real { color: #0b1422; background: var(--bbr-c); border: 0; }
.bbr-court-est { font-size: 10.5px; font-weight: 900; letter-spacing: 1px; padding: 2px 8px; border-radius: 999px; color: #f5b53d; background: rgba(9,20,39,.8); border: 1px dashed #f5b53d; }
.bbr-court-note { margin: 5px 2px 0; font-size: 10.5px; color: var(--text-muted); }

/* 頭像圓標（球場＋名單格共用） */
.bbr-av { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #22344f, #142238); flex: none; }
.bbr-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.bbr-av-ini { font-weight: 900; color: var(--text-secondary); }
.bbr-pin { position: absolute; z-index: 3; width: 64px; margin-left: -32px; margin-top: -23px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.bbr-pin .bbr-av { width: 46px; height: 46px; border: 2.5px solid var(--bbr-c); box-shadow: 0 0 0 3px rgba(9,20,39,.7), 0 0 16px rgba(var(--bbr-c-rgb), .55); }
.bbr-pin .bbr-av-ini { font-size: 17px; }
.bbr-pin-no { position: absolute; top: -3px; left: 50%; margin-left: 13px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; font-style: normal; font-size: 10px; font-weight: 900; line-height: 18px; color: #0b1422; background: var(--bbr-c); box-shadow: 0 0 0 2px #0b1a31; }
.bbr-pin-nm { margin-top: 3px; max-width: 64px; font-size: 11px; font-weight: 900; color: #fff; line-height: 15px; padding: 0 5px; border-radius: 6px; background: rgba(9,20,39,.78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbr-pin-pos { font-size: 9.5px; font-weight: 800; color: var(--bbr-c); letter-spacing: 1px; line-height: 12px; }
.bbr-pin.est .bbr-av { border: 2.5px dashed #f5b53d; box-shadow: 0 0 0 3px rgba(9,20,39,.7), 0 0 12px rgba(245,181,61,.35); }
.bbr-pin.est .bbr-pin-pos { color: #f5b53d; }

/* 名單格（手機一行 5 顆） */
.bbr-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 12px 2px 8px; font-size: 11.5px; color: var(--text-secondary); }
.bbr-sum b { color: var(--bbr-c); font-size: 13px; }
.bbr-sum .bbr-sum-out b { color: var(--danger, #ef4444); }
.bbr-sum-hint { margin-left: auto; font-size: 10.5px; color: var(--text-muted); }
.bbr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 10px 4px; }
.bbr-cell { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.bbr-cell-av { position: relative; }
.bbr-cell .bbr-av { width: 44px; height: 44px; border: 2px solid rgba(255,255,255,.14); }
.bbr-cell .bbr-av-ini { font-size: 16px; }
.bbr-cell.st .bbr-av { border-color: var(--bbr-c); }
.bbr-cell.inj .bbr-av { border-color: var(--warning, #f59e0b); box-shadow: 0 0 0 2px rgba(245,158,11,.3); }
.bbr-cell-no { position: absolute; left: -6px; bottom: -2px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; font-style: normal; font-size: 9.5px; font-weight: 900; line-height: 17px; color: var(--text-primary); background: #1b2c46; border: 1px solid rgba(255,255,255,.18); }
.bbr-cell.st .bbr-cell-no { color: #0b1422; background: var(--bbr-c); border-color: transparent; }
.bbr-cell-fx { position: absolute; left: -5px; top: -4px; font-style: normal; font-size: 12px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.bbr-cell-nm { margin-top: 5px; max-width: 100%; font-size: 11.5px; font-weight: 800; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbr-cell-sub { max-width: 100%; font-size: 10px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bbr-cell-sub b { color: var(--text-secondary); }
.bbr-cell.out .bbr-av { filter: grayscale(1) brightness(.7); border-color: rgba(239,68,68,.55); }
.bbr-cell.out .bbr-cell-nm { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(239,68,68,.7); }
.bbr-slash { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(135deg, transparent calc(50% - 1.5px), var(--danger, #ef4444) calc(50% - 1.5px), var(--danger, #ef4444) calc(50% + 1.5px), transparent calc(50% + 1.5px)); }
.bbr-cell-out { max-width: 100%; font-size: 10px; font-weight: 800; color: var(--danger, #ef4444); line-height: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 進場：依序淡入上浮；切隊重播（.replay）；減少動態時關掉 */
@keyframes bbrUp { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes bbrPin { from { opacity: 0; transform: translateY(14px) scale(.7); } to { opacity: 1; transform: none; } }
.bbr-panel.on .bbr-cell { animation: bbrUp .45s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--i, 0) * 35ms + 120ms); }
.bbr-panel.on .bbr-pin { animation: bbrPin .5s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(var(--i, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) {
  .bbr-panel.on .bbr-cell, .bbr-panel.on .bbr-pin { animation: none; }
  .bbr-tab-bar, .bbr-tab { transition: none; }
}
@media (max-width: 380px) { .bbr-pin { width: 56px; margin-left: -28px; } .bbr-pin .bbr-av { width: 40px; height: 40px; } .bbr-pin-nm { max-width: 56px; font-size: 10.5px; } }

/* 賽程卡小標：名單已出（點了開彈窗並捲到名單區） */
.hoop-card .bbr-chip { grid-column: 1 / -1; justify-self: center; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: var(--accent-2); background: var(--accent-bg); border: 1px solid var(--accent-border); cursor: pointer; }
.hoop-card .bbr-chip i { font-style: normal; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 255,122,26), .25); }

/* ── 麥迪能力值小圓標（2026-10-18）：頭像右下角；≥85 金、75–84 橘、<75 灰、無數據 — ── */
.bbr-ovr { position: absolute; right: -6px; bottom: -3px; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 9px; box-sizing: border-box; font-style: normal; font-size: 10.5px; font-weight: 900; line-height: 18px; text-align: center; letter-spacing: -.2px; z-index: 2; box-shadow: 0 0 0 2px #0b1a31; }
.bbr-ovr.hi { color: #3a2500; background: linear-gradient(160deg, #ffe08a, #f5b53d); }
.bbr-ovr.mid { color: #3a1c00; background: #f08a3c; }
.bbr-ovr.lo { color: #e4ebf5; background: #5b6b82; }
.bbr-ovr.na { color: #9fb0c6; background: #2a3a54; font-weight: 700; }
.bbr-pin .bbr-ovr { right: calc(50% - 31px); bottom: auto; top: 27px; }
