[hidden] {
  display: none !important;
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 8px;
}
.app-nav:has(.account-controls[hidden]) {
  display: none;
}
.app-nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 0;
}
.app-nav button {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 0;
  border: 0;
}
.account-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-left: 0;
}
.account-name {
  order: 1;
  color: var(--text-primary);
  margin: 0;
}
#admin-link {
  order: 2;
  color: var(--text-secondary);
}
#sign-out {
  order: 3;
  margin-left: auto;
}
.form-panel {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
  background: var(--panel, #101850);
  border: 2px solid var(--line, #5868a8);
}
.form-panel h2 {
  margin-top: 0;
}
.form-panel h3 {
  margin-top: 26px;
}
#page-status {
  color: var(--text-secondary);
  margin: 0 0 20px;
}
#page-status.error {
  color: var(--text-error);
}
form label {
  display: block;

  margin: 12px 0 6px;
}
input[type='email'],
select {
  width: 100%;
  min-height: 48px;
  padding: 10px;
  background: #e1e1e1;
  color: var(--text-on-light);
  border: 2px solid #818da8;
  border-radius: 0;
}
button {
  cursor: pointer;
}
.primary,
.review button {
  display: block;
  min-height: 48px;
  padding: 12px 16px;
  margin: 18px 0;
  background: #ffda32;
  color: var(--text-on-light);
  border: 2px solid #fff4cf;
  box-shadow: 3px 3px 0 #080c28;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid #ffda32;
  outline-offset: 4px;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 20px 0;
}
legend {
  margin-bottom: 12px;
}
.matchup-list {
  display: grid;
  gap: 0;
}
.matchup {
  padding: 12px 0 8px;
  border: 0;
  border-bottom: 1px solid #344479;
  background: transparent;
}
.matchup-sides {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  gap: 6px;
  align-items: center;
}
.matchup-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.matchup-at {
  text-align: center;
  color: var(--text-secondary);
}
.matchup-team {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.matchup-team input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.matchup-choice {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 44px;
  gap: 2px;
  width: 80px;
  border: 3px solid #a4aec4;
  border-radius: var(--radius-control);
  background: #dfe2e8;
  color: var(--text-on-neutral);
}
.matchup-team input:checked + .matchup-choice {
  border-color: #ffda32;
  background: #e9e0bd;
}
.matchup-team input:focus-visible + .matchup-choice {
  outline: 3px solid #fff4cf;
  outline-offset: 4px;
}
.matchup-team:has(input:disabled) {
  cursor: default;
}
.matchup-team.already-used .matchup-choice {
  background: #343c5b;
  border-color: #48516c;
  color: var(--text-secondary);
}
.matchup-team.already-used .team-wordmark {
  filter: grayscale(1);
  opacity: 0.45;
}
.matchup-kickoff {
  display: block;
  margin-top: 0;
  text-align: center;
  color: var(--text-secondary);
}
@media (hover: hover) {
  .matchup-team:has(input:not(:disabled)):hover .matchup-choice {
    border-color: #fff4cf;
  }
}
.pick.awaiting {
  color: var(--text-secondary);
}
.review,
.sync-run {
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #5868a8);
}
@media (max-width: 480px) {
  .form-panel {
    padding: 14px;
  }
  .app-nav {
    gap: 8px 14px;
  }
}
.pick-savebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: transparent;
  pointer-events: none;
}
#save-pick {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 6px 16px;
  opacity: 1;
  background: #ffdc60;
  color: var(--text-on-light);
  border-color: #fff4cf;
  pointer-events: auto;
}

#page-status:empty {
  display: none;
}
@media (max-width: 480px) {
  .app-nav {
    gap: 4px 12px;
  }
}

#email::placeholder {
  color: var(--text-placeholder);
  opacity: 1;
}

.app-title {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.pick-action {
  margin-left: auto;
}
.pick-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 16px;
  border: 2px solid #fff4cf;
  background: #ffdc60;
  color: var(--text-on-light);
  box-shadow: 3px 3px 0 #080c28;

  text-decoration: none;
}
.pick-action-link:hover {
  background: #fff4cf;
}
.week-action-footer {
  display: flex;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid #5868a8;
}
.week-action-footer .pick-action-link {
  width: 80%;
  max-width: 280px;
  min-height: 40px;
  padding: 6px 10px;
}
@media (min-width: 761px) {
  #scoreboard-page .section-heading {
    height: 48px;
  }
  #scoreboard-page .pick-action-link {
    min-height: 36px;
    padding: 4px 10px;
    white-space: nowrap;
  }
}
.pick-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
#pick-heading {
  margin: 0;
  min-width: 0;
}
#pick-deadline {
  flex: 0 1 auto;
  margin: 0;
  text-align: left;
  margin-bottom: 14px;

  color: var(--text-secondary);
}
#team-options {
  margin: 0;
}

.pick-week-label {
  margin: 0;
  flex: 0 1 245px;
  min-width: 0;
}
#pick-week {
  min-height: var(--heading-control-height);
}
.matchup-scores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 4px;
}
.matchup-summary {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
}
.matchup-score {
  display: block;
  color: var(--text-primary);
  text-align: center;
}
.matchup-status {
  color: var(--text-primary);

  text-align: center;
}
.read-only .matchup-team {
  cursor: default;
}
#picks-link {
  order: 0;
}
.hero .app-nav {
  left: 16px;
}
.hero .account-controls {
  width: 100%;
}
#picks-link {
  margin-right: auto;
}

.form-panel,
.matchup {
  border-radius: var(--radius-panel);
}
.matchup {
  box-shadow: none;
}
:root[data-style='retro'] :is(.primary, .review button, input[type='email'], select) {
  border-radius: var(--radius-control);
}

/* Pick editor: one outer surface, divided matchups, and a saved-pick summary. */
.pick-page-shell {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}
.pick-page-shell > .section-heading {
  margin-top: 0;
}
.pick-page-controls {
  display: flex;
}
.pick-content {
  padding: 0 12px 12px;
}
.current-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin: 0 -12px 12px;
  background: #283880;
  border-bottom: 1px solid #5868a8;
}
.current-pick-label {
  color: var(--text-primary);
}
#current-pick {
  flex-shrink: 0;
}
.current-pick-empty {
  display: flex;
  width: 80px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.matchup-day {
  margin: 18px 0 8px;
  color: var(--text-secondary);
}
.matchup-team-note {
  display: block;
  margin-top: 4px;
  text-align: center;
  color: var(--text-secondary);
}
.matchup-summary {
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pick-savebar.picker-open {
  visibility: hidden;
}
#pick-week[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
.matchup-choice[data-result='pending'] {
  border-color: #ffda32;
  background: #e9e0bd;
}
.matchup-choice[data-result='win'],
.matchup-team input:checked + .matchup-choice[data-result='win'] {
  border-color: var(--result-win-border);
  background: var(--result-win-fill);
}
.matchup-choice[data-result='loss'],
.matchup-team input:checked + .matchup-choice[data-result='loss'] {
  border-color: var(--result-loss-border);
  background: var(--result-loss-fill);
}
.matchup-choice:is([data-result='tie'], [data-result='canceled']),
.matchup-team input:checked + .matchup-choice:is([data-result='tie'], [data-result='canceled']) {
  border-color: #77859e;
  background: #dfe2e8;
}
@media (max-width: 360px) {
  .matchup-choice,
  .current-pick-empty {
    width: 72px;
  }
  .matchup-sides {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
  }
}

#pick-week-label {
  transform: translateY(1px);
}

/* Login uses the same red section banner and framed surface as league pages. */
.login-shell {
  max-width: 480px;
  margin: 0 auto;
}
.login-shell > .section-heading {
  margin-top: 0;
}
.login-content {
  padding: 20px;
}
.login-content form label {
  margin: 0 0 8px;
}
.login-content .primary {
  width: 100%;
  margin: 20px 0 0;
  background: #ffdc60;
}
.login-content .primary:hover:not(:disabled) {
  background: #fff4cf;
}
.login-content #page-status {
  margin: 18px 0 0;
  color: var(--text-primary);
}
.login-content #page-status:first-child,
.login-content #login-form[hidden] + #page-status {
  margin-top: 0;
}
.login-content #page-status.error {
  color: var(--text-error);
}
.login-content #link-requested p {
  margin: 12px 0 0;
}
.login-content #link-confirm .primary {
  margin-top: 0;
}
@media (max-width: 480px) {
  .login-content {
    padding: 16px;
  }
}
