/* Match presentation only: status outlines and symmetric logo/name stacks. */
.rm-ui .rm-match[data-status],.rm-ui .match-card[data-status],.rm-schedule-card[data-status],.rm-display-match[data-status]{--match-edge:#8d7740;border:1px solid var(--match-edge)}
.rm-ui .rm-match[data-status=finished],.rm-ui .match-card[data-status=finished],.rm-schedule-card[data-status=finished],.rm-display-match[data-status=finished]{--match-edge:#388661}
.rm-ui .rm-match[data-status=live],.rm-ui .match-card[data-status=live],.rm-schedule-card[data-status=live],.rm-display-match[data-status=live]{--match-edge:#d24b55}
.rm-schedule-card[data-status]::before{background:linear-gradient(90deg,transparent,var(--match-edge),transparent)}
.rm-ui .rm-match-team,.rm-ui .rm-match-team:last-child,.matches-page .rm-team-name{flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;gap:12px}
.rm-ui .rm-match-team img,.matches-page .rm-team-name .rm-match-logo{width:110px;height:106px;object-fit:contain;background:transparent;border-radius:0;padding:0;flex:0 0 auto;max-width:100%;order:-1}
.rm-ui .rm-match-main,.matches-page .match-versus{align-items:start}
.rm-ui .rm-match-score{align-self:center}
.matches-page .match-versus .match-score{align-self:center}
.matches-page .match-team{text-align:center;min-width:0}
.matches-page .rm-team-name strong{max-width:100%;overflow-wrap:anywhere}
.rm-display-match{border-radius:14px;padding:16px}
.rm-display-match .team,.rm-display-match .match-team{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;overflow-wrap:anywhere}
.rm-display-match img{object-fit:contain;background:transparent;border-radius:0;width:90px;height:90px;max-width:100%}
@media(max-width:640px){
 .rm-ui .rm-match-team img,.matches-page .rm-team-name .rm-match-logo{width:76px;height:76px}
 .matches-page .match-versus{grid-template-columns:minmax(0,1fr) 100px minmax(0,1fr);gap:8px}
 .matches-page .match-team strong{font-size:.85rem}
 .matches-page .match-score{width:100%;min-width:0}
 .matches-page .match-score input[type=number]{font-size:1rem}
 .rm-ui .rm-match-team,.rm-ui .rm-match-team:last-child{align-items:center;text-align:center}
 .rm-ui .rm-match-main{grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr)}
}

/* Balanced lighting; status is communicated only by the consistent outline. */
.rm-ui .rm-match[data-status],.rm-ui .match-card[data-status],.rm-schedule-card[data-status],.rm-display-match[data-status]{background:radial-gradient(ellipse at 50% 0,#34414d38,transparent 75%),linear-gradient(180deg,#191e25,#0e131a);box-shadow:0 8px 24px #0003}
.rm-schedule-card[data-status]::before{display:none}
.rmsc-name,.matches-page .rm-team-name strong,.rm-match-team .rm-clamped-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:100%;height:3.2em;line-height:1.6;overflow-wrap:anywhere}
.rmsc-team,.matches-page .rm-team-name{min-width:0;overflow:hidden}
.rmsc-live .rmsc-links{display:flex;flex-wrap:wrap;gap:6px}
.rmsc-live .rmsc-links a{border-radius:99px;min-height:44px;padding:6px 12px;font-size:.75rem;flex:0 1 auto;background:#ffffff08;color:#d5dce5;border-color:#ffffff28}
.rmsc-live .rmsc-links a[data-platform=youtube]{background:#c3243020;color:#ff989e;border-color:#d74a5555}
.rmsc-live .rmsc-links a[data-platform=facebook]{background:#2668cd20;color:#91bdff;border-color:#477ed355}
.rmsc-links svg{width:17px;height:17px;flex-shrink:0;fill:currentColor}

.rm-penalty-result{font-size:.7rem;line-height:1.4;color:#e2c67b;margin-top:7px;overflow-wrap:anywhere}.rm-penalty-result small{display:block;font-size:.65rem}
.rm-penalty-fields{flex-basis:100%;width:100%;min-width:0;font-size:.7rem;text-align:left;margin-top:8px}.rm-penalty-fields summary{cursor:pointer;color:#d7bd75}.rm-penalty-fields label{display:block;font-size:.68rem}.rm-penalty-fields input[type=checkbox]{width:auto}.rm-penalty-inputs{display:flex;gap:6px}.rm-penalty-inputs label{min-width:0;flex:1}.rm-penalty-inputs input{width:100%;min-width:0}.ko-match form:has(.rm-penalty-fields){flex-wrap:wrap}

.rm-ui.rm-broadcast .match-card[data-status]{background:radial-gradient(ellipse at 50% 0,#34414d38,transparent 75%),linear-gradient(180deg,#191e25,#0e131a)}
.rm-penalty-result small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}

/* The score form is a grid, not flex: penalty details must span all columns. */
.matches-page .match-score>.rm-penalty-fields{grid-column:1/-1;justify-self:stretch;line-height:1.6}
.matches-page .rm-penalty-fields>label{display:flex;align-items:flex-start;gap:6px;margin:8px 0}
.matches-page .rm-penalty-fields input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;margin:3px 0 0}
.matches-page .rm-penalty-inputs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.matches-page .rm-penalty-inputs input{min-height:44px;text-align:center}
.matches-page .rm-penalty-fields small{display:block;margin-top:6px;font-weight:400;line-height:1.6}
@media(min-width:641px){
 .matches-page .match-versus{grid-template-columns:minmax(0,1fr) minmax(190px,240px) minmax(0,1fr)}
 .matches-page .rm-penalty-fields{font-size:.8rem}
 .matches-page .rm-penalty-fields label{font-size:.75rem}
}
@media(max-width:640px){
 .matches-page .match-versus:has(.rm-penalty-fields[open])>.match-team{grid-row:1}
 .matches-page .match-versus:has(.rm-penalty-fields[open])>.match-team:last-child{grid-column:3}
 .matches-page .match-versus:has(.rm-penalty-fields[open])>.match-score{grid-column:1/-1;grid-row:2;width:100%;max-width:280px;justify-self:center}
}
