:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #627085;
  --line: #d8dee7;
  --surface: #ffffff;
  --background: #f5f7f9;
  --accent: #0b7a75;
  --accent-strong: #075f5b;
  --warn: #ad5f00;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-header {
  align-items: center;
  background: #102126;
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.eyebrow {
  color: #9ccfca;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.1;
  margin-bottom: 0;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

.score-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: grid;
  gap: 4px 10px;
  grid-template-columns: auto auto;
  min-width: 112px;
  padding: 10px 12px;
}

.score-chip span {
  color: #cfe0df;
  font-size: 12px;
}

.score-chip strong {
  font-size: 20px;
}

.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.tab,
button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  min-height: 42px;
  padding: 9px 12px;
}

.tab.active,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button:hover {
  border-color: var(--accent);
}

button.danger {
  border-color: #f0b6b1;
  color: var(--danger);
}

main {
  margin: 0 auto;
  max-width: 980px;
  padding: 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.scoreboard {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.scoreboard > div,
.current-kicker,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.big {
  font-size: 28px;
  font-weight: 800;
}

.current-kicker {
  margin-bottom: 12px;
}

.current-kicker h2 {
  margin-bottom: 0;
}

.bases {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.base {
  min-height: 72px;
}

.base.occupied {
  background: #e4f3ee;
  border-color: var(--accent);
}

.base span {
  color: var(--muted);
  font-size: 12px;
}

.panel {
  margin-bottom: 12px;
}

.button-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-log {
  color: var(--muted);
  margin-bottom: 0;
  padding-left: 22px;
}

.lineup-list,
.roster-list {
  display: grid;
  gap: 8px;
}

.lineup-item,
.roster-item,
.position-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  padding: 8px;
}

.roster-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.gender {
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.gender.female {
  background: #7a4f9f;
}

.gender.male {
  background: #1f6f9f;
}

.warning {
  color: var(--warn);
  font-weight: 700;
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

.positions {
  display: grid;
  gap: 8px;
}

.position-row {
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
}

select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 7px 9px;
  width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 7px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.notes {
  color: var(--muted);
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .scoreboard,
  .button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bases {
    grid-template-columns: 1fr;
  }

  .lineup-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .lineup-item button,
  .lineup-item .gender {
    grid-column: span 1;
  }
}

