.game-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.game-form-grid label { display: flex; flex-direction: column; gap: 5px; }
.game-form-grid .cb2-create-checkbox { flex-direction: row; align-items: center; }
.game-form-grid input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; padding: 0; flex: 0 0 20px; }
.game-form-grid [hidden], [data-rule-set][hidden], [data-score-tie][hidden], [data-game-score][hidden], [data-custom-rules][hidden] { display: none !important; }
[data-game-rules] fieldset, [data-played-game] fieldset { min-inline-size: 0; }
.game-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.game-team-list { padding-left: 20px; overflow-wrap: anywhere; }
.game-score-row { display: grid; grid-template-columns: minmax(80px, 1fr) repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; margin-block: 12px; }
.game-score-row label { min-width: 0; }
.game-score-row input { width: 100%; }
.game-result-table { width: 100%; }
.game-result-table th, .game-result-table td { padding: 6px; text-align: left; overflow-wrap: anywhere; }
.game-participant-results { display: flex; flex-direction: column; gap: 6px; margin-block: 8px; }
.game-participant-results button { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.feed-editor [data-game-editor] .cb2-create-checkbox { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
.feed-editor [data-game-editor] .cb2-create-checkbox input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; flex: 0 0 20px; }
@media (max-width: 600px) { .game-teams { grid-template-columns: 1fr; } }

/* Shared compact scoreboard for feed publications and sports profiles. */
.profile-game__outcome { display:inline-flex; align-items:center; justify-content:center; padding:2px 7px; background:#edf2ef; border-radius:4px; font-size:.75rem; font-weight:700; line-height:1.5; }
.profile-game__outcome[data-outcome="Vitória"] { background:#e1f3e9; color:#006b60; }
.profile-game__outcome[data-outcome="Derrota"] { background:#fff1ef; color:#96514a; }
.profile-games__event-head { display:flex; align-items:baseline; gap:4px 10px; flex-wrap:wrap; padding:10px 12px; background:#eef7f5; border-bottom:1px solid #bfd9ce; }
.profile-games__event-head h3 { margin:0; flex:1; min-width:0; font-size:1rem; font-weight:700; overflow-wrap:anywhere; }
.profile-games__stats .game-source-link,
.profile-games__event-head .game-source-link { color:inherit; font:inherit; text-decoration:none; }
.profile-games__stats .game-source-link span,
.profile-games__event-head .game-source-link span { font-size:.75em; font-weight:400; }
.profile-games__stats .game-source-link:hover,
.profile-games__stats .game-source-link:focus-visible,
.profile-games__event-head .game-source-link:hover,
.profile-games__event-head .game-source-link:focus-visible { text-decoration:none; }
.profile-games__event-head > span { font-size:.75rem; color:#526d65; white-space:nowrap; }
.profile-games__event-head p { width:100%; margin:0; font-size:.75rem; color:#526d65; overflow-wrap:anywhere; }
.profile-game + .profile-game { border-top:3px solid #dce8e5; }
.profile-game__heading { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:6px 12px; background:#f7fbfa; font-size:.75rem; }
.profile-game__heading > span { min-width:0; overflow-wrap:anywhere; }
.profile-game__status-actions { display:flex; align-items:center; gap:6px; }
.profile-game__status-actions .hpj-icon-action { flex:none; width:28px; height:28px; background:transparent; border-color:transparent; }
.profile-game__status-actions .hpj-icon-action svg { width:16px; height:16px; }
.profile-game__table { width:100%; table-layout:fixed; border-collapse:collapse; margin:0; }
.profile-game__table thead { background:#f7fbfa; color:#526d65; font-size:.65rem; }
.profile-game__table th,
.profile-game__table td { padding:5px 12px; border-bottom:1px solid #dce8e5; vertical-align:middle; }
.profile-game__table th { font-weight:500; }
.profile-game__table thead th:first-child { width:60%; }
.profile-game__table td { border-left:1px solid #dce8e5; }
.profile-game__table .profile-game__winner { background:#f0f8f4; }
.profile-game__person { display:flex; align-items:center; gap:7px; min-width:0; line-height:1.35; }
.profile-game__person + .profile-game__person { margin-top:4px; }
.profile-game__person a,
.profile-game__person > span:last-child { min-width:0; overflow-wrap:anywhere; }
.profile-game__person a { color:#08735d; text-decoration:none; }
.profile-game__person a:hover { text-decoration:underline; }
.profile-game__avatar { width:24px; object-fit:cover; display:inline-flex; align-items:center; justify-content:center; flex:0 0 24px; height:24px; border-radius:50%; background:#dce8e5; color:#006b60; font-size:.7rem; font-weight:700; }
.profile-game__scores { display:grid; grid-template-columns:repeat(var(--score-columns),minmax(0,1fr)); gap:4px; text-align:center; font-variant-numeric:tabular-nums; }
.profile-game__score { font-size:1.1rem; font-weight:650; overflow-wrap:anywhere; line-height:1.3; }
.profile-game__score sup { margin-left:1px; font-size:.6rem; }
.profile-game__footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; padding:5px 12px; background:#f7fbfa; font-size:.75rem; color:#526d65; }
.profile-game__footer > span { flex:1 1 180px; overflow-wrap:anywhere; }
.profile-game__actions { display:flex; gap:5px; flex-wrap:wrap; }
.profile-game .profile-game__actions .cb2-soft-button { width:auto; min-height:32px; padding:4px 7px; gap:4px; font-size:.7rem; }
@media(max-width:480px) {
    .profile-game__table th,.profile-game__table td { padding:5px 8px; }
    .profile-game__table thead th:first-child { width:56%; }
    .profile-game__avatar { width:22px; flex-basis:22px; height:22px; }
    .profile-game__person { gap:5px; }
    .profile-game .profile-game__actions .cb2-soft-button { min-height:44px; }
}

.played-game-result { min-width:0; margin-block:10px; overflow:hidden; border:1px solid #dce8e5; border-radius:5px; font-size:.875rem; }
.played-game-result .profile-game__heading > span { font-weight:600; }
.played-game-result__rules { border-top:1px solid #dce8e5; padding:7px 12px; font-size:.75rem; color:#526d65; }
.played-game-result__rules summary { cursor:pointer; }
.played-game-result__rules p { margin:8px 0; }
.played-game-result__rules ul { padding-left:18px; margin:8px 0 0; }
.played-game-result .profile-game__table { margin-bottom:0; }
.played-game-result .profile-games__event-head h3 { margin:0; font-size:1rem; }

/* Confirmation of consecutive repeated results; shared modal appearance. */
.game-duplicate-dialog{width:min(580px,calc(100vw - 30px))}
.game-duplicate-dialog .hpj-whatsapp-session-modal__panel>footer{flex-direction:row;flex-wrap:wrap;align-items:center}
.game-duplicate-dialog .hpj-whatsapp-session-modal__panel>footer :is(button,a){flex:1 1 180px;min-height:44px}
.game-duplicate-dialog .hpj-whatsapp-session-modal__body{min-height:0}

/* Numeric pairs stay side by side for quick entry, including on phones. */
.game-score-row--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-free-stage] { margin-block: 12px; }
[data-free-stage] legend { font-family: inherit; }
[data-free-tie-fields][hidden], [data-free-editor][hidden], [data-legacy-result][hidden], [data-free-result-panel][hidden] { display: none !important; }

/* Source roster: one equal-width row per person, with natural wrapping. */
.game-source-people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.game-source-people > li { min-width: 0; width: 100%; margin: 0; box-sizing: border-box; }
[data-game-event-fields].hpj-row-actions > .cb2-soft-button { min-height: 50px; align-self: flex-start; }
