.matches-section { padding-top: 28px; padding-bottom: 72px; }
.matches-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
}
.matches-import h2 { margin: 4px 0 6px; font-size: 22px; }
.matches-import p { margin: 0; max-width: 640px; color: var(--muted); font-size: 13px; }
.matches-file-button { position: relative; flex: 0 0 auto; overflow: hidden; }
.matches-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.matches-status { min-height: 1.4em; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.matches-status.warn { color: var(--accent-dark); }
.matches-list-head, .matches-detail-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.matches-list-head h2, .matches-board h2 { margin: 4px 0 0; }
.matches-list-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.matches-list { display: grid; gap: 12px; margin-top: 14px; }
.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(88px, 0.6fr) auto;
  gap: 12px 18px;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.match-card:hover { border-color: #f0c2b2; transform: translateY(-1px); }
.match-card strong { display: block; font-size: 16px; }
.match-card small, .match-card time { color: var(--muted); font-size: 12px; }
.match-score { font-size: 22px; font-weight: 900; letter-spacing: -0.04em; white-space: nowrap; }
.match-score b { color: var(--accent-dark); }
.match-card-meta { text-align: right; }
.matches-empty {
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.matches-board { margin-top: 18px; }
.matches-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.matches-banner ul { margin: 6px 0 0; padding-left: 18px; }
.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 22px 20px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
}
.score-side { display: flex; flex-direction: column; gap: 2px; }
.score-side.away { text-align: right; }
.score-side span, .score-mid span { color: #aeb8c9; font-size: 12px; font-weight: 700; }
.score-side strong { font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -0.05em; }
.score-side.winner strong { color: #ffb089; }
.score-side small { color: #c5cedb; font-size: 12px; }
.score-mid { text-align: center; }
.score-mid b { display: block; margin: 4px 0; font-size: 16px; }
.score-track { grid-column: 1 / -1; height: 6px; margin-top: 6px; background: rgba(255,255,255,0.12); border-radius: 99px; overflow: hidden; }
.score-track span { display: block; height: 100%; background: var(--accent); }
.lineup-block { margin-top: 16px; }
.lineup-block h3 { margin: 0 0 8px; font-size: 14px; }
.lineup-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.match-player {
  min-width: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.match-player.is-mvp { border-color: #f0b39a; box-shadow: 0 8px 22px rgba(237, 113, 70, 0.16); }
.match-player img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-2);
  border-radius: 10px;
}
.match-player-name { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 8px; }
.match-player-name strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.match-player-name span, .match-duty { color: var(--muted); font-size: 11px; font-weight: 800; }
.match-badges, .match-titles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.match-badge, .match-title, .npc-chip {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.match-badge { color: #fff; background: var(--accent); }
.match-title { color: var(--ink); background: #fff4d8; }
.npc-chip { color: var(--muted); background: var(--surface-2); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0 0; }
.mini-stats div { padding: 4px 0; text-align: center; background: var(--paper); border-radius: 6px; }
.mini-stats dt { color: var(--muted); font-size: 9px; font-weight: 800; }
.mini-stats dd { margin: 0; font-size: 13px; font-weight: 900; }
.matches-table-wrap { margin-top: 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.matches-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.matches-table th, .matches-table td { padding: 8px 10px; white-space: nowrap; text-align: right; border-bottom: 1px solid var(--line); }
.matches-table th:first-child, .matches-table td:first-child { text-align: left; }
.matches-table caption { padding: 12px 14px 0; font-weight: 800; text-align: left; }
.matches-draft { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.share-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.share-panel h3 { margin: 0; }
.share-fields { display: grid; grid-template-columns: 1.4fr 0.8fr auto; gap: 10px; align-items: end; }
.share-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; }
.share-fields input {
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.share-hint { margin: 0; color: var(--muted); font-size: 12px; }
.detail-actions { display: flex; gap: 10px; align-items: center; }

@media (max-width: 1280px) {
  .main-nav { margin-left: 16px; }
  .nav-item { padding-inline: 9px; }
  .nav-item::after { right: 9px; left: 9px; }
}

@media (max-width: 800px) {
  .matches-import, .share-fields, .match-card { grid-template-columns: 1fr; }
  .matches-import, .share-fields { display: grid; }
  .match-card-meta, .score-side.away { text-align: left; }
  .lineup-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scoreboard { grid-template-columns: 1fr; }
  .score-mid { text-align: left; }
}

@media (max-width: 560px) {
  .lineup-row { gap: 8px; }
  .match-player { padding: 8px; }
}
