.setup-page { padding-bottom: 110px; }
.setup-column { min-width: 0; }
.setup-main { width: min(100%, 1320px); margin: 0 auto; padding: 43px 0 26px; }
.setup-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 0 0 31px; border-bottom: 1px solid var(--line); }
.setup-eyebrow, .section-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 15px; color: #8b9ab0; font-size: 9px; font-weight: 700; letter-spacing: 0.19em; }
.setup-step { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(98, 224, 226, 0.3); border-radius: 50%; color: var(--cyan); font-family: 'Space Grotesk', sans-serif; font-size: 10px; letter-spacing: 0; }
.setup-intro h1 { max-width: 750px; margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: clamp(38px, 5vw, 62px); font-weight: 500; letter-spacing: -0.065em; line-height: 1.02; }
.setup-intro h1 span { color: var(--blue); background: linear-gradient(100deg, #9ac3ff 4%, #6e9cf5 54%, #91dbe7 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.setup-description { max-width: 580px; margin: 16px 0 0; color: #97a4b7; font-size: 13px; line-height: 1.75; }
.setup-season { display: inline-flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 13px; border: 1px solid rgba(183, 205, 232, 0.14); border-radius: 999px; background: linear-gradient(145deg, rgba(18, 29, 45, 0.8), rgba(10, 17, 28, 0.66)); font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; line-height: 1; white-space: nowrap; }
.setup-season span { color: #95a3b7; }
.setup-season strong { color: #eaf1fb; font: inherit; letter-spacing: inherit; }
.team-selector { padding-top: 32px; }
.selector-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.selector-heading .section-kicker { margin-bottom: 8px; color: #718097; }
.selector-heading h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 25px; font-weight: 500; letter-spacing: -0.04em; }
.selector-hint { display: inline-flex; align-items: center; gap: 8px; padding-bottom: 4px; color: #8290a4; font-size: 10px; }
.hint-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(98, 224, 226, 0.7); }
.league-group { margin: 0 0 31px; }
.league-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; padding: 0 0 11px; border-bottom: 1px solid rgba(200, 218, 242, 0.1); }
.league-heading-title { display: flex; align-items: center; gap: 11px; }
.league-flag { display: block; width: 24px; height: 16px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 3px; object-fit: cover; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.league-heading h3 { margin: 0; color: #dfe7f2; font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; }
.league-count { color: #a7b3c4; font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 600; }
.league-count span { margin-left: 4px; color: #728096; font-family: 'DM Sans', sans-serif; font-size: 8px; letter-spacing: 0.12em; }
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.team-card { display: flex; min-width: 0; min-height: 139px; flex-direction: column; justify-content: space-between; padding: 12px 13px 11px; border: 1px solid rgba(188, 208, 237, 0.12); border-radius: 11px; color: var(--ink); background: linear-gradient(145deg, rgba(19, 29, 45, 0.87), rgba(11, 18, 29, 0.82)); text-align: left; cursor: pointer; transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease; }
.team-card.is-changed { border-color: rgba(98, 224, 226, 0.58); box-shadow: inset 0 0 0 1px rgba(98, 224, 226, 0.14), 0 0 16px rgba(36, 152, 168, 0.08); }
.team-card:hover { transform: translateY(-2px); border-color: rgba(118, 168, 255, 0.43); background: linear-gradient(145deg, rgba(27, 42, 64, 0.96), rgba(12, 22, 37, 0.94)); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.035); }
.team-card.is-changed:hover { border-color: rgba(98, 224, 226, 0.85); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.19), inset 0 0 0 1px rgba(98, 224, 226, 0.16); }
.team-card:focus-visible { outline-offset: 3px; }
.team-card-topline, .team-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-card-league { display: inline-flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; color: #8c9bb0; font-size: 8px; font-weight: 600; letter-spacing: 0.055em; text-overflow: ellipsis; white-space: nowrap; }
.team-card-league img { width: 16px; height: 11px; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 2px; object-fit: cover; }
.team-card-number { color: #5f6e83; font-family: 'Space Grotesk', sans-serif; font-size: 8px; letter-spacing: 0.08em; }
.team-card-main { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 12px 0 11px; }
.team-crest { display: block; width: 39px; height: 39px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.3)); }
.team-card-name { display: -webkit-box; min-width: 0; overflow: hidden; color: #edf2f9; font-size: 12px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.team-card-bottom { padding-top: 8px; border-top: 1px solid rgba(196, 215, 239, 0.08); color: #66768d; font-size: 7px; font-weight: 700; letter-spacing: 0.14em; }
.team-card-pot { padding: 4px 6px; border: 1px solid rgba(118, 168, 255, 0.38); border-radius: 4px; color: #c4dcff; background: rgba(73, 117, 180, 0.2); font-size: 8px; letter-spacing: 0.1em; text-shadow: 0 0 10px rgba(118, 168, 255, 0.22); }
.team-card-change { color: #94a8c3; letter-spacing: 0.1em; transition: color 170ms ease; }
.team-card:hover .team-card-change { color: var(--cyan); }
.team-card-change span { margin-left: 3px; color: var(--cyan); font-size: 10px; }
.loading-state, .load-error { display: flex; min-height: 210px; flex-direction: column; align-items: center; justify-content: center; gap: 13px; border: 1px dashed rgba(188, 208, 237, 0.17); border-radius: 14px; color: #8f9db2; font-size: 12px; }
.loading-spinner { width: 23px; height: 23px; border: 2px solid rgba(118, 168, 255, 0.18); border-top-color: var(--blue); border-radius: 50%; animation: setup-spin 0.8s linear infinite; }
.load-error strong { color: #e7edf5; font-size: 14px; }
.load-error .button { min-height: 40px; margin-top: 2px; }
.selection-dock { position: fixed; z-index: 5; right: 0; bottom: 0; left: 72px; display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px max(5.2vw, calc((100vw - 1320px) / 2)); border-top: 1px solid rgba(188, 208, 237, 0.14); background: rgba(7, 12, 21, 0.9); backdrop-filter: blur(22px); box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.18); }
.selection-progress { display: flex; align-items: center; gap: 12px; }
.progress-copy { display: grid; gap: 3px; }
.progress-copy strong { color: #62e0e2; font-size: 13px; font-weight: 600; }
.progress-copy > span { color: #79879b; font-size: 9px; }
.dock-actions { display: flex; align-items: center; gap: 17px; }
.confirm-selection { min-width: 190px; min-height: 45px; gap: 14px; padding: 0 17px; border-radius: 6px; font-size: 11px; }
.confirm-selection:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.confirm-selection svg { width: 17px; height: 17px; }
.team-picker { width: min(560px, calc(100vw - 34px)); max-width: none; max-height: min(760px, calc(100svh - 36px)); padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid rgba(176, 201, 235, 0.18); border-radius: 18px; color: var(--ink); background: linear-gradient(150deg, #111c2c, #0a111c 70%); box-shadow: 0 28px 100px rgba(0, 0, 0, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.045); }
.team-picker::backdrop { background: rgba(2, 5, 10, 0.72); backdrop-filter: blur(7px); }
.picker-topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.picker-league { display: inline-flex; align-items: center; gap: 9px; color: #aebbd0; font-size: 10px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.picker-league img { width: 22px; height: 15px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 3px; object-fit: cover; }
.picker-close { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(188, 208, 237, 0.13); border-radius: 9px; color: #9eacc0; background: rgba(255, 255, 255, 0.035); font-size: 23px; line-height: 1; cursor: pointer; transition: color 150ms ease, background 150ms ease; }
.picker-close:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.picker-copy { padding: 17px 24px 16px; }
.picker-copy .section-kicker { margin-bottom: 7px; color: #718097; }
.picker-copy h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 25px; font-weight: 500; letter-spacing: -0.045em; }
.picker-copy > p:last-child { margin: 7px 0 0; color: #8d9bb0; font-size: 11px; line-height: 1.5; }
.picker-search-wrap { display: flex; height: 44px; align-items: center; gap: 10px; margin: 0 22px 15px; padding: 0 12px; border: 1px solid rgba(188, 208, 237, 0.14); border-radius: 9px; color: #8493a8; background: rgba(4, 9, 16, 0.54); }
.picker-search-wrap svg { width: 17px; height: 17px; flex: 0 0 auto; }
.picker-search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: #e9eff8; background: transparent; font: inherit; font-size: 11px; }
.picker-search-wrap input::placeholder { color: #718097; }
.picker-search-wrap:focus-within { border-color: rgba(118, 168, 255, 0.5); box-shadow: 0 0 0 3px rgba(118, 168, 255, 0.08); }
.picker-search-wrap kbd { flex: 0 0 auto; padding: 3px 5px; border: 1px solid rgba(188, 208, 237, 0.13); border-radius: 4px; color: #718097; font-family: inherit; font-size: 8px; }
.picker-list-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 22px 7px; color: #77869b; font-size: 8px; font-weight: 700; letter-spacing: 0.15em; }
.picker-list { max-height: min(410px, calc(100svh - 330px)); min-height: 110px; overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 8px 22px; scrollbar-color: rgba(123, 150, 185, 0.35) transparent; scrollbar-width: thin; }
.picker-option { display: flex; width: 100%; min-height: 54px; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; color: #e6edf7; background: transparent; text-align: left; cursor: pointer; transition: border-color 140ms ease, background 140ms ease; }
.picker-option + .picker-option { margin-top: 3px; }
.picker-option:not(:disabled):hover { border-color: rgba(118, 168, 255, 0.23); background: rgba(84, 125, 187, 0.12); }
.picker-option[aria-current="true"] { border-color: rgba(98, 224, 226, 0.2); background: rgba(55, 130, 135, 0.11); }
.picker-option:disabled { color: #778499; cursor: not-allowed; opacity: 0.55; }
.picker-crest { width: 31px; height: 31px; flex: 0 0 auto; object-fit: contain; }
.picker-option-name { min-width: 0; flex: 1; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.picker-option-state { flex: 0 0 auto; color: #71839a; font-size: 7px; font-weight: 700; letter-spacing: 0.12em; }
.picker-option[aria-current="true"] .picker-option-state { color: var(--cyan); }
.picker-empty { display: grid; min-height: 110px; place-items: center; color: #8290a4; font-size: 11px; }

@keyframes setup-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .setup-page { padding-bottom: 104px; }
  .setup-main { padding-top: 35px; }
  .selection-dock { left: 54px; padding-right: 28px; padding-left: 28px; }
}

@media (max-width: 680px) {
  .setup-intro { align-items: flex-start; gap: 15px; }
  .setup-season { gap: 7px; padding: 9px 10px; font-size: 10px; }
  .setup-intro h1 { font-size: clamp(35px, 7.5vw, 48px); }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .team-card { min-height: 132px; padding: 10px; }
  .team-card-main { gap: 8px; }
  .team-crest { width: 33px; height: 33px; }
  .team-card-name { font-size: 11px; }
  .selection-dock { left: 50px; min-height: 72px; gap: 10px; padding: 10px 14px; }
  .selection-progress { gap: 8px; }
  .progress-copy strong { font-size: 10px; }
  .progress-copy > span { font-size: 8px; }
  .dock-actions { gap: 8px; }
  .confirm-selection { min-width: 145px; min-height: 42px; gap: 7px; padding: 0 10px; font-size: 9px; }
}

@media (max-width: 430px) {
  .setup-page { padding-bottom: 95px; }
  .setup-main { padding-top: 27px; }
  .setup-intro { flex-direction: column; align-items: flex-start; gap: 14px; }
  .setup-intro { padding-bottom: 24px; }
  .setup-eyebrow { gap: 7px; margin-bottom: 12px; font-size: 8px; }
  .setup-step { width: 23px; height: 23px; }
  .setup-intro h1 { font-size: clamp(32px, 8.5vw, 39px); }
  .setup-description { max-width: 300px; margin-top: 12px; font-size: 11px; }
  .setup-season { min-width: 0; padding: 8px 9px; font-size: 9px; }
  .team-selector { padding-top: 25px; }
  .selector-heading { align-items: flex-end; margin-bottom: 18px; }
  .selector-heading h2 { font-size: 22px; }
  .selector-hint { max-width: 112px; gap: 6px; padding-bottom: 2px; font-size: 8px; line-height: 1.35; }
  .team-grid { gap: 7px; }
  .team-card { min-height: 124px; padding: 9px 8px; border-radius: 9px; }
  .team-card-league { font-size: 7px; }
  .team-card-league img { width: 14px; height: 10px; }
  .team-card-main { gap: 6px; padding: 10px 0 8px; }
  .team-crest { width: 29px; height: 29px; }
  .team-card-name { font-size: 10px; }
  .team-card-bottom { font-size: 6px; letter-spacing: 0.1em; }
  .selection-dock { align-items: center; padding: 9px 10px; }
  .progress-copy strong { font-size: 9px; }
  .progress-copy > span { max-width: 63px; font-size: 7px; line-height: 1.25; }
  .confirm-selection { min-width: 133px; min-height: 40px; font-size: 8px; }
  .picker-topbar { padding: 15px 16px 0; }
  .picker-copy { padding: 14px 18px 13px; }
  .picker-search-wrap { margin-right: 16px; margin-left: 16px; }
  .picker-list-heading { margin-right: 16px; margin-left: 16px; }
  .picker-list { padding-left: 16px; }
}

@media (max-width: 360px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-card { min-height: 112px; }
  .team-card-main { padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .team-card, .picker-option, .picker-close { transition-duration: 0.01ms !important; }
  .loading-spinner { animation-duration: 0.01ms !important; }
}
