:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #102a2e;
  background: #add2d4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --teal: #007a82;
  --deep-teal: #12363b;
  --orange: #f26a21;
  --muted: #40575b;
  --border: #d7e2e0;
}

a {
  color: var(--deep-teal);
  text-decoration: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
}

button,
textarea {
  font: inherit;
}

.page {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 40px 0 32px;
}

.site-header {
  max-width: 760px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  color: var(--deep-teal);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.intro {
  max-width: 550px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.lineup-section,
.roster-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(16 42 46 / 5%);
}

.lineup-section {
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

h2 {
  margin-bottom: 0;
  color: var(--deep-teal);
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 750;
  transition: background-color 140ms ease, transform 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f7a878;
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: var(--teal);
}

.button-primary:hover {
  background: var(--deep-teal);
}

.lineup-board {
  display: grid;
  gap: 22px;
}

.board-title {
  margin: 0 0 10px;
  color: var(--deep-teal);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.forward-row {
  display: grid;
  grid-template-columns: 104px repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}

.column-headings {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.column-headings span:not(:first-child) {
  padding: 4px 8px;
  border-bottom: 2px solid var(--teal);
}

.line-number,
.forward-player {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.line-number {
  justify-content: center;
  color: #fff;
  border-color: var(--deep-teal);
  background: var(--deep-teal);
  font-size: 0.8rem;
  font-weight: 750;
}

.forward-player {
  min-height: 146px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  color: #19363a;
  font-weight: 700;
}

.forward-player.empty-state {
  color: #9aa8aa;
  font-weight: 450;
  font-style: normal;
}

.supporting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.line-card.injury-reserve-card {
  border-left-color: #b42318;
}

.line-card {
  min-height: 112px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: 7px;
  padding: 13px 15px;
  background: #f8fafb;
}

.line-card.goalie-card {
  border-left-color: var(--orange);
}

.line-card h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.line-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 650;
}

.line-card li {
  min-width: 0;
}

.defense-card li[data-position] {
  position: relative;
  padding-top: 18px;
}

.defense-card li[data-position]::before {
  content: attr(data-position);
  position: absolute;
  top: 0;
  left: 50%;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 850;
  transform: translateX(-50%);
}

.goalie-card ul {
  grid-template-columns: 1fr;
}

.player-display {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.player-photo,
.player-photo-placeholder {
  display: grid;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #c5d7d6;
  border-radius: 50%;
  background: #e4efee;
}

.player-photo {
  object-fit: cover;
}

.player-photo-placeholder {
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 850;
}

.player-name {
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-align: center;
}

.supporting-player .player-photo,
.supporting-player .player-photo-placeholder {
  width: 72px;
  height: 72px;
}

.supporting-player .player-name {
  font-size: 0.82rem;
}

.empty-state {
  color: #829396;
  font-weight: 450;
  font-style: italic;
}

.roster-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.roster-note.error {
  color: #b42318;
  font-weight: 700;
}

.roster-panel {
  margin-top: 18px;
  padding: 20px 24px;
}

.roster-panel summary {
  color: var(--deep-teal);
  cursor: pointer;
  font-weight: 750;
}

.roster-help {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.roster-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.roster-fields label {
  display: grid;
  gap: 8px;
  color: var(--deep-teal);
  font-size: 0.9rem;
  font-weight: 700;
}

.roster-fields textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  color: #102a2e;
  line-height: 1.5;
}

footer {
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 720px) {
  .page {
    padding-top: 42px;
  }

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

@media (max-width: 480px) {
  .lineup-section {
    padding: 18px 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .roster-fields {
    grid-template-columns: 1fr;
  }

  .button-primary {
    width: 100%;
  }

  .forward-row {
    grid-template-columns: 48px repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .column-headings {
    font-size: 0.65rem;
  }

  .line-number {
    min-height: 64px;
    padding: 4px;
    font-size: 0.68rem;
    text-align: center;
  }

  .forward-player {
    min-height: 132px;
    justify-content: center;
    overflow-wrap: anywhere;
    padding: 8px 4px;
    font-size: 0.78rem;
    text-align: center;
  }

  .player-photo,
  .player-photo-placeholder {
    width: 60px;
    height: 60px;
  }

  .supporting-player .player-photo,
  .supporting-player .player-photo-placeholder {
    width: 64px;
    height: 64px;
  }

  .forward-player::before {
    content: attr(data-position);
    color: var(--teal);
    font-size: 0.62rem;
    font-weight: 850;
  }
}


.roster-fields textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  color: #102a2e;
  line-height: 1.5;
}

footer {
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 720px) {
  .page {
    padding-top: 42px;
  }

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

@media (max-width: 480px) {
  .lineup-section {
    padding: 18px 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .roster-fields {
    grid-template-columns: 1fr;
  }

  .button-primary {
    width: 100%;
  }

  .forward-row {
    grid-template-columns: 48px repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .column-headings {
    font-size: 0.65rem;
  }

  .line-number {
    min-height: 64px;
    padding: 4px;
    font-size: 0.68rem;
    text-align: center;
  }

  .forward-player {
    min-height: 132px;
    justify-content: center;
    overflow-wrap: anywhere;
    padding: 8px 4px;
    font-size: 0.78rem;
    text-align: center;
  }

  .player-photo,
  .player-photo-placeholder {
    width: 60px;
    height: 60px;
  }

  .supporting-player .player-photo,
  .supporting-player .player-photo-placeholder {
    width: 64px;
    height: 64px;
  }

  .forward-player::before {
    content: attr(data-position);
    color: var(--teal);
    font-size: 0.62rem;
    font-weight: 850;
  }
}
