/* 馬雅鞠球賽 /library/ballgame —— 卡屯的記分石板(2026-11-28)。
   夜間球場的石板記分台:玄武岩底、朱砂太陽隊、青色月亮隊(遊戲裡 HIR/HIC)、玉與金點綴。
   ⚠ 全部收在 .bgm 底下,不碰全站的 body/header 樣式。
   原型在 claude.ai 的 artifact,這份由 build_css 轉出,之後直接改這裡就好。 */
.bgm {
  --basalt: #14130f;      
  --slab: #1e1c17;        
  --slab-2: #2a2720;      
  --groove: #3a362c;      
  --dust: #a39c8a;        
  --bone: #efe7d6;        
  --red: #d9482b;         
  --red-dim: #5a2418;
  --white: #5fd0dc;       
  --white-dim: #163e44;
  --jade: #3fae8c;        
  --gold: #e0b34a;        
  --live: #ff4d3d;
  --f-display: "Bahnschrift", "DIN Alternate", "Arial Narrow", sans-serif;
  --f-label: "Bahnschrift SemiCondensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --f-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color-scheme: dark;
}
.bgm * { box-sizing: border-box; }
.bgm {
  background: var(--basalt);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
}
.bgm .wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bgm .num { font-family: var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.bgm .label { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--dust); font-weight: 600; }
.bgm .red { color: var(--red); }
.bgm .wht { color: var(--white); }
.bgm .fret {
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 9 H8 V5 H12 V1 H20 V5 H16 V9 H28 V5 H24 V1 H32 V5 H36 V9 H40' fill='none' stroke='%23e0b34a' stroke-width='1.4' opacity='.55'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
}
.bgm .ticker-band { background: var(--slab); border-bottom: 1px solid var(--groove); }
.bgm .ticker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px 6px; }
.bgm .brand { display: flex; align-items: baseline; gap: 10px; }
.bgm .brand b { font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: .02em; }
.bgm .brand span { color: var(--dust); font-size: 13px; }
.bgm .ticker { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.bgm .tk {
  flex: 0 0 auto; min-width: 128px;
  background: var(--slab-2); border: 1px solid var(--groove);
  padding: 6px 10px 7px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.bgm .tk .top { display: flex; justify-content: space-between; font-family: var(--f-label); font-size: 11px; letter-spacing: .08em; color: var(--dust); }
.bgm .tk .sc { display: flex; gap: 8px; align-items: baseline; font-family: var(--f-display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.bgm .tk .sc .w { opacity: 1; }
.bgm .tk .sc .l { opacity: .45; }
.bgm .tk.ring { border-color: var(--gold); }
.bgm .tk.ring .top em { color: var(--gold); font-style: normal; }
.bgm .tk.next .sc { font-size: 15px; font-family: var(--f-body); font-weight: 700; }
.bgm .hero { padding-block: 26px 22px; }
.bgm .hero-top { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 14px; }
.bgm .badge { font-family: var(--f-label); font-weight: 700; letter-spacing: .1em; font-size: 12px; padding: 3px 9px 2px; text-transform: uppercase; }
.bgm .badge.open { background: var(--jade); color: #06150f; }
.bgm .badge.closed { background: var(--groove); color: var(--dust); }
.bgm .badge.live { background: var(--live); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.bgm .badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .2; } }
.bgm .match-no { font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: .04em; }
.bgm .hero-meta { color: var(--dust); font-size: 14px; }
.bgm .versus {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch;
  background: linear-gradient(100deg, var(--red-dim) 0%, var(--slab) 38%, var(--slab) 62%, var(--white-dim) 100%);
  border: 1px solid var(--groove); padding: 22px clamp(14px, 3vw, 28px);
}
.bgm .team { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.bgm .team.r { align-items: flex-start; }
.bgm .team.w { align-items: flex-end; text-align: right; }
.bgm .team h2 { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(34px, 6vw, 56px); line-height: .9; letter-spacing: .02em; }
.bgm .team.r h2 { color: var(--red); }
.bgm .team.w h2 { color: var(--white); }
.bgm .slot { display: grid; gap: 3px; width: min(260px, 100%); }
.bgm .slot .pos { font-family: var(--f-label); font-size: 12px; letter-spacing: .14em; color: var(--dust); }
.bgm .slot .who { font-size: 20px; font-weight: 900; }
.bgm .bar { height: 6px; background: var(--groove); position: relative; }
.bgm .bar i { position: absolute; inset: 0 auto 0 0; background: var(--jade); }
.bgm .bar i.mid { background: var(--gold); }
.bgm .bar i.low { background: var(--red); }
.bgm .team.w .bar i { inset: 0 0 0 auto; }
.bgm .slot .st { font-family: var(--f-label); font-size: 12px; color: var(--dust); letter-spacing: .06em; }
.bgm .center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-width: 120px; }
.bgm .vs { font-family: var(--f-display); font-weight: 900; font-size: 30px; color: var(--gold); letter-spacing: .1em; }
.bgm .count { font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1; }
.bgm .count small { display: block; font-family: var(--f-label); font-size: 12px; letter-spacing: .14em; color: var(--dust); font-weight: 600; margin-top: 4px; }
.bgm .weather { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dust); }
.bgm .weather svg { width: 26px; height: 26px; stroke: var(--bone); }
.bgm .money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.bgm .money div { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; background: var(--slab); border: 1px solid var(--groove); }
.bgm .money .o { font-family: var(--f-display); font-weight: 800; font-size: 28px; }
.bgm .money div:first-child { border-left: 4px solid var(--red); }
.bgm .money div:last-child { border-right: 4px solid var(--white); }
.bgm .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; padding-block: 8px 26px; }
.bgm section h3 { margin: 0 0 12px; display: flex; align-items: baseline; gap: 12px; font-size: 18px; font-weight: 900; }
.bgm section h3 .label { font-size: 12px; }
.bgm .panel { background: var(--slab); border: 1px solid var(--groove); }
.bgm .pbp-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--groove); gap: 10px; flex-wrap: wrap; }
.bgm .final { display: flex; align-items: baseline; gap: 10px; }
.bgm .final .num { font-size: 34px; font-weight: 900; line-height: 1; }
.bgm .pbp { list-style: none; margin: 0; padding: 6px 0; max-height: 440px; overflow-y: auto; }
.bgm .rally { padding: 10px 16px 10px 46px; position: relative; border-bottom: 1px dashed var(--groove); }
.bgm .rally:last-child { border-bottom: 0; }
.bgm .rally .rn { position: absolute; left: 14px; top: 10px; font-family: var(--f-display); font-weight: 800; font-size: 18px; color: var(--dust); }
.bgm .rally p { margin: 0; font-size: 14px; color: var(--dust); }
.bgm .rally p b { color: var(--bone); font-weight: 700; }
.bgm .rally .pt { margin-top: 4px; font-weight: 700; color: var(--bone); display: flex; align-items: center; gap: 8px; }
.bgm .rally .pt .chip { font-family: var(--f-display); font-size: 15px; font-weight: 800; padding: 0 7px; }
.bgm .chip.r { background: var(--red); color: #1a0703; }
.bgm .chip.w { background: var(--white); color: #1a1710; }
.bgm .rally.ringed { background: linear-gradient(90deg, rgba(224,179,74,.16), transparent 70%); }
.bgm .rally.ringed .rn { color: var(--gold); }
.bgm .odds { width: 100%; border-collapse: collapse; font-size: 14px; }
.bgm .odds th, .bgm .odds td { padding: 9px 12px; border-bottom: 1px solid var(--groove); text-align: left; }
.bgm .odds th { font-family: var(--f-label); font-weight: 600; letter-spacing: .1em; font-size: 12px; color: var(--dust); text-transform: uppercase; }
.bgm .odds td.o { font-family: var(--f-display); font-weight: 800; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bgm .pool { height: 6px; display: flex; margin-top: 5px; background: var(--groove); }
.bgm .pool .pr { background: var(--red); }
.bgm .pool .pw { background: var(--white); }
.bgm .odds .line { color: var(--dust); font-size: 12px; }
.bgm .scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; padding: 12px; }
.bgm .scores div { background: var(--slab-2); padding: 6px 8px; display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-display); font-weight: 700; }
.bgm .scores div b { font-size: 16px; }
.bgm .scores div span { color: var(--dust); font-size: 14px; }
.bgm .panel-foot { padding: 10px 14px; color: var(--dust); font-size: 12px; border-top: 1px solid var(--groove); }
.bgm .players { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bgm .pc { background: var(--slab); border: 1px solid var(--groove); padding: 14px 14px 12px; display: grid; gap: 8px; position: relative; }
.bgm .pc.on { border-color: var(--jade); }
.bgm .pc .tag { position: absolute; top: 10px; right: 10px; font-family: var(--f-label); font-size: 11px; letter-spacing: .1em; padding: 1px 6px; }
.bgm .pc .tag.r { background: var(--red); color: #1a0703; }
.bgm .pc .tag.w { background: var(--white); color: #1a1710; }
.bgm .pc .tag.rest { background: var(--groove); color: var(--dust); }
.bgm .pc .nm { font-size: 20px; font-weight: 900; line-height: 1.1; }
.bgm .pc .day { color: var(--dust); font-size: 12px; }
.bgm .pc .ttl { color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.bgm .pc .fo { color: var(--dust); font-size: 12px; }
.bgm .pc .fo b { color: var(--bone); font-weight: 600; }
.bgm .pc .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--dust); }
.bgm .form { display: flex; gap: 4px; }
.bgm .form i { width: 11px; height: 11px; border-radius: 50%; background: var(--groove); }
.bgm .form i.W { background: var(--jade); }
.bgm .form i.L { background: var(--red-dim); outline: 1px solid var(--red); }
.bgm .pc .wr { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--bone); }
.bgm .bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; padding-block: 26px 40px; }
.bgm .table-scroll { overflow-x: auto; }
.bgm .std { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.bgm .std th, .bgm .std td { padding: 9px 10px; border-bottom: 1px solid var(--groove); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bgm .std th:nth-child(2), .bgm .std td:nth-child(2) { text-align: left; }
.bgm .std th { font-family: var(--f-label); font-size: 12px; letter-spacing: .1em; color: var(--dust); font-weight: 600; }
.bgm .std td.rk { font-family: var(--f-display); font-weight: 800; font-size: 18px; color: var(--dust); text-align: center; }
.bgm .std tr:nth-child(1) td.rk { color: var(--gold); }
.bgm .std tr:nth-child(2) td.rk, .bgm .std tr:nth-child(3) td.rk { color: var(--bone); }
.bgm .std td b { font-weight: 900; }
.bgm .hall { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bgm .hall li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; padding: 12px 14px; background: var(--slab); border: 1px solid var(--groove); border-left: 3px solid var(--gold); }
.bgm .ringmark { width: 46px; height: 46px; }
.bgm .hall .who { font-weight: 900; font-size: 17px; }
.bgm .hall .meta { color: var(--dust); font-size: 13px; }
.bgm .note { color: var(--dust); font-size: 12px; padding-block: 0 30px; }
@media (max-width: 860px) {
.bgm .cols, .bgm .bottom { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
.bgm .versus { grid-template-columns: 1fr; }
.bgm .team.w { align-items: flex-start; text-align: left; }
.bgm .team.w .bar i { inset: 0 auto 0 0; }
.bgm .center { flex-direction: row; justify-content: space-between; min-width: 0; order: -1; }
.bgm .money .o { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
.bgm .badge.live::before { animation: none; }
}
.bgm :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bgm .status { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dust); }
.bgm .status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--jade); }
.bgm .status.stale .dot { background: var(--gold); }
.bgm .status.err .dot { background: var(--live); }
.bgm .count.kick { font-size: 26px; }
.bgm .live-score { display: flex; gap: 14px; align-items: baseline; font-family: var(--f-display); font-weight: 900; font-size: 56px; line-height: 1; }
.bgm .empty { padding: 22px 16px; color: var(--dust); font-size: 14px; }
.bgm .rally p span { display: block; }
.bgm .rally p span + span { margin-top: 2px; }
.bgm .npcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.bgm .npc { background: var(--slab); border: 1px solid var(--groove); padding: 12px 14px; display: grid; gap: 4px; }
.bgm .npc .nm { font-weight: 900; font-size: 16px; }
.bgm .npc .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--dust); }
.bgm .npc .net { font-family: var(--f-display); font-weight: 800; font-size: 20px; }
.bgm .npc .net.up { color: var(--jade); }
.bgm .npc .net.down { color: var(--red); }
.bgm .npcs-wrap { padding-block: 0 40px; }
.bgm .err-box { margin: 40px auto; max-width: 560px; padding: 18px 20px; background: var(--slab); border: 1px solid var(--live); }

.bgm { padding-bottom: 8px; border-radius: 2px; overflow: hidden; }
.bgm .ticker-band { border-top: 1px solid var(--groove); }

/* 頁面容器:不用 .ui-container(min-width:1000px 要靠 JS 解除),同 .tips-page 自帶響應式 */
.bgm-page { max-width: 1212px; margin: 0 auto; padding: 20px 16px 50px; box-sizing: border-box; }
.bgm-noscript { color: #cccccc; padding: 12px 0; }

/* 抵銷 library.css 的全站 table 樣式(width:60%、min-width:600px、半透明底、圓角、hover 反白)——
   不抵銷的話賠率表會撐出面板,賠率那兩欄被裁掉 */
.bgm table { width: 100%; min-width: 0; margin: 0; background: none; border-radius: 0; }
.bgm .std { min-width: 460px; }
.bgm tbody tr:hover { background: none; }
.bgm th:last-child { padding-right: 12px !important; }
.bgm .scores div b { white-space: nowrap; }
