/* Competitions module (agent A): scoreboard, medals, public live board. Only design tokens, light + dark. */
.cmp-medal { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 50%; font-weight: 800; font-size: 13px; background: var(--plbm-surface-2); color: var(--plbm-text); border: 1px solid var(--plbm-border); }
.cmp-medal.gold { background: var(--plbm-gold); color: #fff; border-color: var(--plbm-gold); }
.cmp-medal.silver { background: var(--plbm-silver); color: #fff; border-color: var(--plbm-silver); }
.cmp-medal.bronze { background: var(--plbm-bronze); color: #fff; border-color: var(--plbm-bronze); }
.cmp-dim { opacity: .55; }
.cmp-match-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--plbm-border); text-decoration: none; color: var(--plbm-text); flex-wrap: wrap; }
.cmp-match-row:last-child { border-bottom: 0; }
.cmp-match-row .cmp-vs { flex: 1 1 200px; min-width: 0; }
.cmp-match-row:hover .cmp-vs { text-decoration: underline; }

/* scoreboard */
.cmp-board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 18px 12px; text-align: center; }
.cmp-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: var(--plbm-radius-sm); border: 2px solid transparent; min-width: 0; }
.cmp-side.win { border-color: var(--plbm-good); background: var(--plbm-good-soft); }
.cmp-team { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.cmp-team small { display: block; font-weight: 400; color: var(--plbm-text-muted); font-size: 12px; }
.cmp-total { font-family: var(--plbm-font-head); font-size: 56px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cmp-mid { padding: 0 6px; }
.cmp-ends .cmp-in { width: 84px; min-height: 48px; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; margin-left: auto; }
.cmp-ends .cmp-in.bad, .cmp-ends tr.bad .cmp-in { border-color: var(--plbm-bad); background: var(--plbm-bad-soft); }
.cmp-ends td, .cmp-ends th { padding: 6px 8px; }
.cmp-run { white-space: nowrap; font-size: 13px; }
.cmp-sign { border-bottom: 1px solid var(--plbm-text); height: 38px; margin-bottom: 4px; }
.cmp-sheet td, .cmp-sheet th { border: 1px solid var(--plbm-border); }
@media (max-width: 575.98px) {
  .cmp-board { grid-template-columns: 1fr 1fr; }
  .cmp-mid { grid-column: 1 / -1; order: 3; }
  .cmp-total { font-size: 44px; }
  .cmp-ends .cmp-in { width: 72px; }
}

/* public pages */
.cmp-public { background: var(--plbm-bg); color: var(--plbm-text); min-height: 100vh; font-family: var(--plbm-font); }
.cmp-pub-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--plbm-primary); color: var(--plbm-on-primary); position: sticky; top: 0; z-index: 10; }
.cmp-pub-top .brand-mark { width: 30px; height: 30px; display: grid; place-items: center; }
.cmp-pub-top .spacer { flex: 1; }
.cmp-pub-top .icon-btn { color: var(--plbm-on-primary); }
.cmp-pub-main { max-width: 980px; margin: 0 auto; padding: 18px 14px 40px; }
.cmp-pub-head h1 { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.cmp-pub-foot { text-align: center; color: var(--plbm-text-muted); font-size: 12.5px; padding: 0 14px 28px; }
.cmp-h { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--plbm-text-muted); margin: 16px 0 6px; font-weight: 700; }
.cmp-h:first-child { margin-top: 0; }
.cmp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--plbm-bad); animation: cmp-pulse 1.4s infinite; }
@keyframes cmp-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .cmp-dot { animation: none; } }
.cmp-pm { padding: 8px 0; border-bottom: 1px solid var(--plbm-border); }
.cmp-pm:last-child { border-bottom: 0; }
.cmp-pm-info { font-size: 12px; color: var(--plbm-text-muted); margin-bottom: 2px; }
.cmp-pm-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.cmp-pm-teams > div:last-child { text-align: right; }
.cmp-pm-teams .win .cmp-tn { font-weight: 800; }
.cmp-pm-score { font-family: var(--plbm-font-head); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-sc { color: var(--plbm-text-muted); font-size: 12px; }
.cmp-pl { display: block; color: var(--plbm-text-muted); font-size: 12px; }
.cmp-podium-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--plbm-border); }
.cmp-podium-row:last-child { border-bottom: 0; }
@media (max-width: 575.98px) { .cmp-pm-teams { grid-template-columns: 1fr; gap: 2px; } .cmp-pm-teams > div:last-child { text-align: left; } .cmp-pm-score { font-size: 18px; } }
@media print {
  .cmp-board { border: 1px solid #000; }
  .print-keep { break-inside: avoid; }
  .cmp-sheet td, .cmp-sheet th { border: 1px solid #000 !important; }
}
.cmp-pub-head p, .cmp-pub-main { overflow-wrap: anywhere; }
.cmp-pub-main { min-width: 0; } .cmp-pub-main .table-wrap { overflow-x: auto; }
@media (max-width: 575.98px) { .cmp-ends .cmp-run, .cmp-ends thead th:nth-child(4) { display: none; } }
