:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body {
  margin: 0 auto; padding: 1.25rem; max-width: 32rem;
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a; background: #fafafa;
}
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; margin: 2rem 0 0.5rem; }
p { margin: 0 0 1rem; }
label { display: block; margin: 1.25rem 0 0.375rem; font-weight: 600; }
input, select, button {
  display: block; width: 100%; min-height: 3rem; padding: 0.5rem 0.75rem;
  font-size: 1rem; font-family: inherit; border-radius: 0.5rem;
}
input, select { border: 2px solid #767676; background: #fff; color: inherit; }
input[name="code"] {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.5rem; letter-spacing: 0.15em; text-align: center; text-transform: uppercase;
}
button {
  margin-top: 1.5rem; border: 0; background: #0b5cad; color: #fff; font-weight: 700; cursor: pointer;
}
button:hover { background: #094a8c; }
a.button {
  display: block; box-sizing: border-box; width: 100%; min-height: 3rem; padding: 0.75rem; margin-top: 1.5rem; text-align: center; text-decoration: none;
  border: 2px solid #0b5cad; border-radius: 0.5rem; color: #0b5cad; font-weight: 700;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid #f5a623; outline-offset: 2px;
}
[aria-invalid="true"] { border-color: #b3261e; }
.leagues { border: 0; padding: 0; margin: 1.25rem 0 0; }
.leagues legend { font-weight: 600; padding: 0; margin-bottom: 0.375rem; }
.league { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin: 0 0 0.5rem; }
.league input[type="radio"] { display: inline-block; width: 1.5rem; height: 1.5rem; min-height: 0; padding: 0; margin: 0; accent-color: #0b5cad; }
.league label { display: flex; align-items: center; flex: 1; min-height: 3rem; margin: 0; }
.league select { display: none; flex-basis: 100%; }
.league input[type="radio"]:checked ~ select { display: block; }
.live-game { border: 1px solid #9a9a9a; border-radius: 0.5rem; margin: 0; padding: 0 0.75rem 0.75rem; }
.live-game legend { font-weight: 600; }
.live-game p { margin: 0; }
.live-game > .hint { margin-top: 0.5rem; }
.live-game + p { margin-top: 0.75rem; }
.live-game-options { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0.5rem 0.625rem; padding-top: 0.5rem; }
.live-game-options label { margin: 0; cursor: pointer; }
.toggle { display: flex; align-items: center; gap: 0.625rem; margin: 0; min-height: 2.75rem; }
.toggle input, .league-modes > input, .live-game-options > input { width: 1.25rem; height: 1.25rem; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: #0b5cad; }
.live-game-options > input { margin-top: 0.125rem; }
/* The several-interests form (ADR-0111): each league a collapsible section, each team a row with its own rank. */
.league-options { border: 1px solid #9a9a9a; border-radius: 0.5rem; padding: 0 0.75rem; margin-bottom: 0.5rem; }
.league-options > summary { font-weight: 600; padding: 0.75rem 0; cursor: pointer; }
.league-options[open] > summary { border-bottom: 1px solid #9a9a9a; }
.league-modes { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 0.625rem; padding: 0.25rem 0; }
.league-modes > label { margin: 0; padding: 0.5rem 0; cursor: pointer; }
.league-modes small { display: block; font-weight: 400; }
.team-options { display: none; grid-column: 1 / -1; padding: 0.5rem 0; }
.league-modes > input[value="teams"]:checked ~ .team-options { display: block; }
.slate-option { display: none; grid-column: 1 / -1; padding: 0.5rem 0; }
.league-modes > input[value="teams"]:checked ~ .slate-option, .league-modes > input[value="any"]:checked ~ .slate-option { display: block; }
.team-options p { margin: 0 0 0.5rem; }
.team-ranks { max-height: 15rem; overflow: auto; padding: 0 0.5rem; border: 1px solid #9a9a9a; border-radius: 0.5rem; }
.slate-option .toggle { margin-top: 0.5rem; }
.interest { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 3rem; }
.interest + .interest { border-top: 1px solid #e0e0e0; }
.interest label { display: block; flex: 1; margin: 0; font-weight: 400; }
.interest select { width: auto; min-width: 6.5rem; flex-shrink: 0; }
[role="alert"] {
  margin: 0 0 1rem; padding: 0.75rem 1rem; border: 2px solid #b3261e; border-left-width: 0.5rem;
  border-radius: 0.5rem; background: #fdecea;
}
[role="alert"] p { margin: 0 0 0.25rem; font-weight: 700; }
[role="alert"] ul { margin: 0; padding-left: 1.25rem; }
a { color: #0b5cad; overflow-wrap: anywhere; }
.hint { margin: 0.5rem 0 0; font-size: 0.9375rem; color: #595959; }
@media (prefers-color-scheme: dark) {
  body { color: #ececec; background: #121212; }
  input, select { background: #1e1e1e; border-color: #9a9a9a; }
  button { background: #4d9be8; color: #0a0a0a; }
  button:hover { background: #6ab0f0; }
  a { color: #7db9f5; }
  .hint { color: #b0b0b0; }
  [role="alert"] { background: #3a1d1b; border-color: #f2867d; }
  [aria-invalid="true"] { border-color: #f2867d; }
}
