:root {
  --bg: #11100d;
  --panel: #191713;
  --panel-raised: #211d16;
  --text: #f4ead2;
  --muted: #aa9d82;
  --gold: #d9ad55;
  --gold-bright: #f2c96d;
  --line: transparent;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 14px; }
button, input { font: inherit; }
main { width: min(1440px, calc(100% - 56px)); margin: 0 auto; padding: 28px 0 80px; }
.app-bar { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.brand { color: var(--gold-bright); font-size: 20px; font-weight: 800; letter-spacing: -.05em; text-decoration: none; }
.status-badge { color: var(--muted); font-size: 11px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.035em; }
h2 { font-size: 18px; }
h3 { color: var(--gold); font-size: 13px; }
.team-card, .roster-card { margin-top: 16px; background: var(--panel); }
.team-card { padding: 18px 20px; }
#team-filter { display: grid; gap: 14px; }
.team-group { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: start; }
.team-button-grid { display: grid; grid-template-columns: repeat(auto-fit, 96px); gap: 6px; justify-content: start; }
.team-button { display: flex; width: 96px; min-width: 0; min-height: 32px; align-items: center; justify-content: space-between; gap: 4px; border: 0; border-radius: 4px; padding: 6px; background: var(--panel-raised); color: var(--text); cursor: pointer; font-size: 12px; text-align: left; }
.team-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-button small { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.team-button:hover { background: #2b251a; color: var(--gold-bright); }
.team-button[data-state="active"] { background: var(--gold); color: #1a1409; font-weight: 700; }
.team-button:focus-visible, .search-field:focus-within { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.unregistered-group { padding-top: 2px; }
.unregistered-group .team-button { max-width: 220px; }
.roster-card { overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--panel-raised); color: var(--muted); font-size: 12px; }
.search-field input { width: 180px; border: 0; outline: 0; background: transparent; color: var(--text); }
.summary { margin: 0; padding: 0 20px 8px; color: var(--muted); font-size: 12px; }
#player-list { padding: 0 20px 20px; overflow-x: auto; }
table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12px; }
caption { padding: 6px 0; color: var(--muted); font-size: 11px; text-align: left; }
th { height: 32px; color: var(--gold); font-size: 11px; font-weight: 650; text-align: left; white-space: nowrap; }
th button { border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; text-align: left; }
th button:hover { color: var(--gold-bright); }
th button:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
td { height: 36px; padding: 5px 8px; color: var(--text); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
.match-divider { padding-left: 18px !important; background: rgba(217, 173, 85, .045); }
thead .match-divider { color: var(--gold-bright); }
tbody .match-divider span { color: var(--gold); font-size: 11px; font-weight: 650; }
.empty-state, .loading { padding: 44px 0; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  main { width: calc(100% - 28px); padding-top: 18px; }
  .team-card { padding: 16px; }
  .team-group { grid-template-columns: 1fr; gap: 8px; }
  .team-button-grid { grid-template-columns: repeat(auto-fit, 96px); }
  .toolbar { align-items: stretch; flex-direction: column; padding: 16px; }
  .search-field, .search-field input { width: 100%; }
  #player-list { padding: 0 16px 16px; }
}
