.pb {
    --panel: #192538;
    --line: #41516a;
    --ink: #f1f6ff;
    --muted: #bcc9df;
    --accent: #d8f77c;
    --visitor: #9ce2ff;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(10px, 2vw, 24px);
    color: var(--ink);
}
.pb [hidden] { display: none !important; }
.pb .app-loader { background: #111926; color: var(--ink); }
.pb .app-loader p { color: var(--accent); }
.pb .app-loader span { color: var(--muted); }
.pb .app-loader__progress { background: var(--accent); }
.pb-heading, .pb-match-head, .pb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-heading, .pb-match-head { justify-content: space-between; }
.pb h1 { font-size: clamp(1.2rem, 4vw, 2rem); margin: 0 0 8px; }
.pb h2, .pb h3 { margin: 0; }
.pb p { margin: 6px 0; }
.pb p, .pb-caption, .pb-serve span, .pb-heading span { color: var(--muted); }
.pb-panel { padding: clamp(10px, 2vw, 18px); margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pb-match-head img { width: clamp(84px, 17vw, 150px); height: auto; }
.pb-match-head strong { font-size: 1.1rem; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: 10px; }
.pb [data-form] > .pb-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
}
.pb fieldset { min-inline-size: 0; margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.pb label { display: grid; gap: 4px; font-size: .86rem; font-weight: 650; min-width: 0; }
.pb-grid :is(select, input) {
    box-sizing: border-box;
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
}
.pb-grid select { text-overflow: ellipsis; }
.pb button, .pb select, .pb input:not([type=checkbox]) {
    border: 1px solid #60748c;
    border-radius: 8px;
    background: #101b2a;
    color: var(--ink);
    min-height: 44px;
    padding: 7px 10px;
    font: inherit;
}
.pb button { cursor: pointer; font-weight: 700; }
.pb button:disabled { opacity: .55; cursor: default; }
.pb button.pb-primary { background: var(--accent); border-color: var(--accent); color: #14200b; }
.pb :is(button, input, select, summary):focus-visible { outline: 3px solid var(--visitor); outline-offset: 2px; }
.pb .pb-check { display: flex; align-items: center; gap: 8px; }
.pb .pb-check input { accent-color: var(--accent); }
.pb form .pb-actions, .pb-tools .pb-actions { margin-top: 10px; }
.pb-serve, .pb-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.pb-serve > div { padding: 8px 10px; background: #142139; border-radius: 8px; }
.pb-serve span, .pb-serve strong { display: block; }
.pb-serve strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.pb-board { margin-top: 7px; }
.pb-team {
    --side: var(--accent);
    position: relative;
    min-width: 0;
    text-align: center;
    padding: clamp(8px, 2vw, 18px);
    border: 2px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(160deg, #253751, #172338 70%);
}
.pb-team[data-team="1"] { --side: var(--visitor); }
.pb-team[data-serving="true"] { border-color: var(--side); }
.pb-team[data-winner="true"] { border-color: var(--side); box-shadow: inset 0 0 20px color-mix(in srgb, var(--side) 25%, transparent); }
.pb-team output {
    display: block;
    color: var(--side);
    font-size: clamp(3rem, 13vw, 7rem);
    font-variant-numeric: tabular-nums;
    font-weight: 850;
    line-height: 1;
    border-radius: 12px;
}
.pb-team button { width: 100%; }
.pb-team[data-team="1"] button { background: var(--visitor); border-color: var(--visitor); }
.pb .pb-banner { padding: 10px; border: 1px solid var(--accent); border-radius: 8px; background: #283a28; color: var(--accent); font-size: 1.2rem; font-weight: 800; }
.pb .pb-status { min-height: 1.5em; }
.pb .pb-point-pulse, .pb .pb-win-pulse { outline: 2px solid var(--side, var(--accent)); outline-offset: -2px; }
@media (prefers-reduced-motion: no-preference) {
    .pb .pb-point-pulse { animation: pb-score-glow .55s ease-out; }
    .pb .pb-win-pulse { animation: pb-score-glow .8s ease-out 2; }
}
@keyframes pb-score-glow {
    from { box-shadow: inset 0 0 24px var(--side, var(--accent)); }
    to { box-shadow: inset 0 0 24px transparent; }
}
.pb summary { cursor: pointer; font-weight: 700; }
.pb details[open] summary { margin-bottom: 8px; }
.pb table { width: 100%; border-collapse: collapse; text-align: left; }
.pb caption { text-align: left; font-weight: 700; margin-top: 8px; }
.pb th, .pb td { border-bottom: 1px solid var(--line); padding: 6px 4px; }
.pb-print-brand { display: none; }
.pb [role=alert] { color: #ffd08c; }
.pb:fullscreen { max-width: none; overflow: auto; background: #111926; }
.pb:fullscreen .pb-team output { font-size: clamp(3rem, min(17vw, 24vh), 15rem); }
@media print {
    body:has(.pb) :is(.site-header, .site-footer, .site-app-search, .skip-link),
    .pb :is(.pb-heading, .pb-match-head, .pb-banner, .pb-board, .pb-serve, .pb-status, .pb-tools, .pb-actions, [data-setup], [role=alert]) { display: none !important; }
    .pb, .pb .pb-record, .pb .pb-record p { background: #fff; color: #000; border: 0; padding: 0; }
    .pb .pb-print-brand { display: flex; align-items: center; gap: 12px; font-weight: 750; }
    .pb-print-brand img { width: 115px; height: auto; }
    .pb tr { break-inside: avoid; }
}
