/* Tactivela · modules/matchday — scope: .md (screens) and .mdp (printed team sheet).
   The printed sheet uses the same tokens as the screen: TK.Shell.print()
   switches to the chosen kit (day by default) while printing. */
.md .md-hlist { display: flex; flex-direction: column; gap: 10px; }
.md .md-hc { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; cursor: pointer; text-align: left; color: var(--tk-text); font: inherit;
  transition: border-color var(--tk-dur) var(--tk-ease); }
.md .md-hc:hover { border-color: var(--tk-violet); }
.md .md-hc-dt { font-family: var(--tk-font-display); font-size: var(--tk-fs-label); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tk-text-subtle); }
.md .md-hc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.md .md-hc-mt { font-size: var(--tk-fs-meta); color: var(--tk-text-muted); }
.md .md-score { font-size: 24px; color: var(--tk-now); }
.md .md-big { font-size: 44px; line-height: 1; color: var(--tk-now); }
.md .md-when { margin: 0; }
.md .md-notes { margin: 0; color: var(--tk-text-muted); font-size: var(--tk-fs-body-s); }
.md .md-sub { display: flex; align-items: center; gap: 10px; font-size: var(--tk-fs-body-s); }
.md .md-on { color: var(--tk-ok); } .md .md-off { color: var(--tk-bad-text); }
.md .md-preview { display: flex; justify-content: center; }
.md .md-canvas { width: 100%; max-width: 340px; height: auto; border-radius: var(--tk-radius); border: var(--tk-border) solid var(--tk-line); }
.md .tk-btn .tk-icon { margin-right: 2px; }

/* ── Tablets (700px and up) and PCs (1100px and up), design system 6.6. Every rule below sits in a
   media query, so a phone keeps the rules above and nothing else.
   History: #md-hist carries .tk-column (a centred 720px column); on a PC it widens to --tk-column-wide
   and lays the match cards out two across. Share sheet: the 1080 x 1350 preview keeps its ratio and
   never grows past 60vh. Held sideways (a landscape tablet or phone) or on a PC the sheet itself becomes
   a grid: the preview on the left, the kit choice and buttons in a 320px column beside it (the width of the
   Tactics tools column; Download and Print side by side, as on a phone), and the preview is capped so the whole sheet fits inside its 86vh
   without scrolling, down to a phone held sideways. Portrait tablets keep the phone's single column. */
@media (min-width: 700px) {
  .md .scroll.pad { padding: var(--tk-space-4); }
  .md .md-preview { display: block; text-align: center; }
  .md .md-canvas { display: inline-block; vertical-align: top; width: auto; height: auto; max-width: 100%; max-height: 60vh; }
}
@media (min-width: 1100px), (min-width: 700px) and (orientation: landscape) {
  .md#mod-share > .tk-sheet { max-width: var(--tk-column); display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--tk-space-16) * 5); grid-template-rows: auto auto 1fr;
    column-gap: var(--tk-space-5); row-gap: var(--tk-space-3); align-content: start; }
  .md#mod-share .tk-sheet__head { grid-column: 1 / -1; }
  .md#mod-share .md-preview { grid-column: 1; grid-row: 2 / -1; }     /* spans both control rows; the 1fr row takes its extra height */
  .md#mod-share #md-kit, .md#mod-share .tk-sheet > .col { grid-column: 2; }
  .md#mod-share .tk-sheet > .col { align-self: start; }
  .md#mod-share .tk-sheet > .col .row > .tk-btn { white-space: nowrap; }   /* 320px gives each 156px; PRINT SHEET needs 152 */
  /* 86vh is the sheet's limit (tactivela.css); its padding, border, title and one row gap take 92px, so 108 leaves some spare */
  .md .md-canvas { max-height: min(60vh, calc(86vh - var(--tk-touch) - var(--tk-space-16))); }
}
@media (min-width: 1100px) {
  .md .scroll.pad { padding: var(--tk-space-5); }
  .md .md-hlist { max-width: var(--tk-column-wide); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tk-space-3); }
  .md .md-hlist > .md-hc { justify-content: space-between; }       /* a card without a score still lines up with its taller neighbour */
  .md .md-hlist > .tk-empty { grid-column: 1 / -1; }
}

/* ── printed team sheet (A4) ── */
.mdp { width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 12mm; position: relative; display: flex; flex-direction: column; gap: 8mm;
  background: var(--tk-bg); color: var(--tk-text); font-family: var(--tk-font-body); }
.mdp .mdp-head { display: flex; align-items: center; gap: 6mm; padding-bottom: 5mm; border-bottom: 1.2mm solid var(--tk-touchline); }
.mdp .mdp-crest { width: 22mm; height: 22mm; }
.mdp .mdp-kicker { font-family: var(--tk-font-display); font-size: 10pt; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tk-now); }
.mdp .mdp-club { margin: 0; font-family: var(--tk-font-display); font-size: 30pt; font-weight: 900; line-height: 0.95; text-transform: uppercase; }
.mdp .mdp-sub { font-family: var(--tk-font-display); font-size: 13pt; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tk-violet-soft); }
.mdp .mdp-date { margin-left: auto; align-self: flex-start; font-size: 10pt; color: var(--tk-text-muted); }
.mdp .mdp-body { display: flex; gap: 8mm; align-items: flex-start; }
.mdp .mdp-pitch { flex-shrink: 0; }
.mdp .mdp-lines { position: absolute; inset: 0; }
.mdp .mdp-lines svg { width: 100%; height: 100%; display: block; }
.mdp .mdp-lines svg * { vector-effect: non-scaling-stroke; }
.mdp .tk-nametag { font-size: 7pt; max-width: 22mm; }
.mdp .mdp-list { flex: 1; display: flex; flex-direction: column; gap: 1.2mm; }
.mdp .mdp-line { margin-top: 3mm; font-family: var(--tk-font-display); font-size: 9pt; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tk-violet); }
.mdp .mdp-line:first-child { margin-top: 0; }
.mdp .mdp-p { display: flex; gap: 3mm; align-items: baseline; font-family: var(--tk-font-display); font-size: 13pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.mdp .mdp-p b { width: 8mm; text-align: right; color: var(--tk-now); font-weight: 800; }
.mdp .mdp-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 4mm; border-top: 0.5mm solid var(--tk-line);
  font-size: 10pt; color: var(--tk-text-muted); }
.mdp .mdp-made { display: flex; align-items: center; gap: 2mm; font-family: var(--tk-font-display); font-weight: 700; letter-spacing: 0.06em; }
.mdp .mdp-made b { color: var(--tk-text); }
