/* Printed team sheet on desktop, switchable rosters on compact screens. */
.card.match-squads {
  --ms-pad: clamp(12px, 2.4vw, 24px);
  --squad-header-art: url("/static/img/lineup-board-violet.webp");
  padding: 0;
  overflow: hidden;
  scroll-margin-block-start: .5rem;
}
.ms-masthead {
  position: relative;
  isolation: isolate;
  padding: 20px var(--ms-pad);
  background: linear-gradient(110deg, #302047, #402758 65%, #58356f);
  color: #fff;
}
.ms-masthead-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 46%;
  background-image: var(--squad-header-art, none);
  background-size: cover;
  background-position: center;
  mask-image: linear-gradient(90deg, transparent, #000 40%);
  pointer-events: none;
}
.ms-head-content { position: relative; width: fit-content; max-width: 100%; }
.ms-eyebrow, .ms-team-head small { display: block; font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.ms-eyebrow { color: #e3ccfd; }
.ms-masthead h2 { margin: 3px 0 7px; color: #fff; font: 750 clamp(19px, 2.3vw, 28px)/1.18 var(--font-head); }
.ms-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; color: #eadff5; }
.ms-meta time, .ms-formation, .ms-shirt, .ms-report-time { font-variant-numeric: tabular-nums; }
.ms-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid #f4e9ff68; border-radius: 100px; font-weight: 650; }
.ms-badge.is-confirmed { color: #dafff2; border-color: #a4e7ce7a; background: #164d43; }
.ms-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ms-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px;
  padding: 6px 12px; border: 1px solid #ffffff55; border-radius: 8px; cursor: pointer;
  color: #fff; background: #322043; font: 650 13px/1.2 var(--font);
}
.ms-actions button:first-child { color: #332044; background: #f4ebff; border-color: #f4ebff; }
.ms-actions button:hover { box-shadow: inset 0 0 0 1px currentColor; }
.ms-actions button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.ms-actions svg { flex: none; width: 16px; height: 16px; }
.ms-rosters { margin: 0; min-width: 0; border: 0; padding: var(--ms-pad); }
.ms-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ms-choice, .ms-switch { display: none; }
.ms-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(10px, 1.7vw, 20px); align-items: start; }
.ms-team { --ms-ink: var(--accent-ink); --ms-tint: var(--accent-soft); min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ms-team.is-away { --ms-ink: var(--score-ink); --ms-tint: var(--score-surface); }
.ms-team-head {
  padding: 10px 12px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px;
  background: var(--ms-tint); border-block-start: 3px solid var(--ms-ink);
}
.ms-team-head .team-crest { --crest-size: 36px; --crest-font: 13px; }
.ms-team-head small { color: var(--ms-ink); }
.ms-team-head h3 { display: block; margin: 2px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: clamp(15px,1.8vw,20px); line-height: 1.15; }
.ms-formation { padding: 4px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--ms-ink); white-space: nowrap; font-size: 12px; }
.ms-players, .ms-reports, .mb-facts { list-style: none; margin: 0; padding: 0; }
.ms-players > li { display: grid; grid-template-columns: 33px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 5px 12px; min-height: 34px; }
.ms-players > li:nth-child(even) { background: var(--surface-2); }
.ms-shirt { display: grid; place-items: center; min-height: 25px; border: 1px solid var(--line); border-radius: 6px; color: var(--ms-ink); background: var(--ms-tint); font-size: 12px; font-weight: 750; line-height: 1; }
.ms-player-name { color: var(--text); font-weight: 650; overflow-wrap: anywhere; font-size: 14px; line-height: 1.32; }
.ms-role { max-width: 10em; color: var(--muted); text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.match-squads .ms-coach { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0; border-top: 1px solid var(--line); padding: 8px 12px; font-size: 13px; }
.ms-coach span { color: var(--muted); }
.ms-bench { border-top: 1px solid var(--line); }
.match-squads summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; cursor: pointer; color: var(--text); font-weight: 650; list-style: none; }
.match-squads summary::-webkit-details-marker { display: none; }
.match-squads summary:hover { background: var(--surface-2); }
.match-squads summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.ms-bench summary small { border-radius: 6px; padding: 1px 6px; background: var(--ms-tint); color: var(--ms-ink); }
.match-squads summary i { flex: none; width: 8px; height: 8px; margin: -4px 3px 0 auto; border: solid var(--muted); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.match-squads details[open] > summary i { transform: rotate(225deg); margin-top: 4px; }
.ms-availability { border-top: 1px solid var(--line); }
.ms-availability > summary { padding-inline: var(--ms-pad); flex-wrap: wrap; }
.ms-availability > summary i { margin-inline-start: 0; }
.ms-report-label { margin-inline-start: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.ms-reports { padding: 0 var(--ms-pad) 10px; }
.ms-reports > li { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ms-reports small { display: block; color: var(--muted); }
.match-squads .ms-report-time, .match-squads .ms-notice, .match-squads .ms-placeholder { margin: 0; padding: 12px var(--ms-pad); color: var(--muted); font-size: 13px; line-height: 1.5; }
.match-squads .ms-notice { border-inline-start: 3px solid var(--accent); background: var(--surface-2); }
.ms-team .ms-placeholder { padding-inline: 12px; }
.match-brief .mb-lead { margin: 0; padding: 4px 0 8px; line-height: 1.6; }
.mb-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 8px; }
.mb-facts li { border-inline-start: 2px solid var(--accent); border-radius: 3px; background: var(--surface-2); padding: 8px 11px; color: var(--text); font-size: 13px; line-height: 1.55; }
.match-team-comparison .stt { font-variant-numeric: tabular-nums; }
.match-team-comparison .stt tr:nth-child(even) { background: var(--surface-2); }
.match-team-comparison .stt td, .match-team-comparison .stt th { padding: 8px; }
@media (max-width: 680px) {
  .ms-masthead { padding-block: 15px; }
  .ms-masthead-art { width: 44%; background-position: 85% center; opacity: .82; }
  .ms-choice { display: block; position: absolute; height: 1px; width: 1px; margin: 0; clip-path: inset(50%); }
  .ms-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 10px; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
  .ms-switch label { display: flex; justify-content: center; align-items: center; gap: 6px; min-width: 0; padding: 5px; min-height: 40px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 650; cursor: pointer; color: var(--muted); overflow-wrap: anywhere; }
  .ms-switch .team-crest { --crest-size: 20px; --crest-font: 8px; }
  #ms-home:checked ~ .ms-switch [for="ms-home"], #ms-away:checked ~ .ms-switch [for="ms-away"] { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
  #ms-home:focus-visible ~ .ms-switch [for="ms-home"], #ms-away:focus-visible ~ .ms-switch [for="ms-away"] { outline: 2px solid var(--accent); outline-offset: -2px; }
  .ms-grid { display: block; }
  #ms-home:checked ~ .ms-grid .is-away, #ms-away:checked ~ .ms-grid .is-home { display: none; }
  .ms-actions button { min-height: 42px; }
}
@media (max-width: 360px) {
  .ms-role { max-width: 6.2em; }
  .ms-team-head { gap: 6px; }
}
@media print {
  .ms-grid { display: grid !important; }
  .ms-grid .ms-team { display: block !important; }
  .ms-switch,.ms-choice,.ms-actions,.ms-masthead-art { display: none !important; }
}
