:root {
  --field: #002D62;
  --field-2: #007AC1;
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --ink: #1A2030;
  --muted: #646E84;
  --line: #DCE1EA;
  --amber: #F5784F;
  --amber-soft: #FEEDE6;
  --win: #1E8A5A;
  --loss: #C7402B;
  --head: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pos-qb: #E6EEF9; --pos-rb: #E5F3EA; --pos-wr: #FDF1DE; --pos-te: #F6E7EE; --pos-k: #EDEDED; --pos-dst: #ECE8F6;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C111C; --surface: #141B2A; --ink: #E7EBF3; --muted: #95A0B7; --line: #252F44;
    --amber-soft: #3B1C16; --win: #4FC28A; --loss: #F07A62; --field-2: #0A5E96;
    --pos-qb: #1E2A3A; --pos-rb: #1C2F24; --pos-wr: #35291A; --pos-te: #33222B; --pos-k: #262626; --pos-dst: #26223A;
  }
}
:root[data-theme="dark"] {
  --bg: #0C111C; --surface: #141B2A; --ink: #E7EBF3; --muted: #95A0B7; --line: #252F44;
  --amber-soft: #3B1C16; --win: #4FC28A; --loss: #F07A62; --field-2: #0A5E96;
  --pos-qb: #1E2A3A; --pos-rb: #1C2F24; --pos-wr: #35291A; --pos-te: #33222B; --pos-k: #262626; --pos-dst: #26223A;
}
*, *::before, *::after { box-sizing: inherit; }
html { height: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
input, button, select, textarea, details, details *, form { box-sizing: border-box; }

/* Header */
.top { background: var(--field); color: #F3F5FA; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.top-inner { max-width: 1040px; margin: 0 auto; padding: 12px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; line-height: 1; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .brand-mark { width: 28px; height: 28px; } }
.brand-name { font: 700 30px/0.95 var(--head); letter-spacing: .5px; }
.brand-sub { font-size: 12.5px; opacity: .75; margin-top: 3px; }
.season-pick select { background: var(--field-2); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; padding: 7px 30px 7px 12px; font: 600 17px var(--head); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23fff' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.tabs { display: flex; max-width: 1040px; margin: 0 auto; padding: 0 8px; gap: 2px; overflow-x: auto; }
.tabs a { text-decoration: none; font: 600 16px var(--head); padding: 9px 12px 10px; opacity: .72; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { opacity: 1; border-bottom-color: var(--amber); }
@media (max-width: 640px) {
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--field); justify-content: space-around; padding: 0 0 env(safe-area-inset-bottom, 0px); z-index: 20; border-top: 1px solid rgba(255,255,255,.12); }
  .tabs a { flex: 1; text-align: center; padding: 11px 2px 12px; border-bottom: 0; border-top: 3px solid transparent; font-size: 15px; }
  .tabs a.on { border-top-color: var(--amber); }
  main { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

main { max-width: 1040px; margin: 0 auto; padding: 16px 12px 40px; }
.loading, .empty { color: var(--muted); padding: 40px 8px; text-align: center; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; line-height: 1.1; }
h1 { font-size: 28px; }
h2 { font-size: 22px; margin: 26px 0 10px; }
h3 { font-size: 18px; }
.sub { color: var(--muted); font-size: 13.5px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--field); color: #fff; }

/* Avatars */
.av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font: 700 13px var(--head); color: #fff; letter-spacing: .3px; }
.av.lg { width: 54px; height: 54px; font-size: 21px; }

/* Tables */
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th { font: 600 13px var(--head); color: var(--muted); text-align: right; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: default; }
th.l, td.l { text-align: left; }
th.sortable { cursor: pointer; user-select: none; }
th.sorted { color: var(--ink); }
td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.mine td { background: var(--amber-soft); }
tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.rk { color: var(--muted); font: 600 15px var(--head); width: 28px; text-align: center; }
.tm { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.tm-text { display: flex; flex-direction: column; min-width: 0; }
.tm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.tm-mgr { font-size: 12.5px; color: var(--muted); }
.clinch { font: 700 11px var(--head); color: var(--field-2); margin-left: 4px; }
.cut td { border-bottom: 2px dashed var(--muted); }
.trophy { font-size: 14px; }
.w { color: var(--win); font-weight: 600; }
.lo { color: var(--loss); font-weight: 600; }

/* Pennants */
.pennants { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.pennant { flex: none; width: 150px; text-decoration: none; position: relative; }
.pennant svg { display: block; width: 150px; height: 64px; }
.pennant .yr { position: absolute; top: 9px; left: 12px; font: 700 26px/1 var(--head); color: var(--field); }
.pennant .who { margin-top: 6px; font-weight: 600; font-size: 14px; line-height: 1.2; }
.pennant .mg { font-size: 12.5px; color: var(--muted); }
.champ-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--amber-soft); border: 1px solid var(--amber); border-radius: 10px; }
.champ-banner b { font-family: var(--head); font-size: 20px; }

/* Weeks */
.weeks { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; }
.weeks a { flex: none; text-decoration: none; border: 1px solid var(--line); background: var(--surface); padding: 6px 11px; border-radius: 18px; font: 600 15px var(--head); white-space: nowrap; }
.weeks a.on { background: var(--field); border-color: var(--field); color: #fff; }
.weeks a.po { border-style: dashed; }

/* Matchup cards */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.mcard { display: block; text-decoration: none; padding: 4px 12px; }
.mcard .tag { font: 600 12.5px var(--head); color: var(--muted); padding-top: 6px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow .score { font: 600 22px var(--head); font-variant-numeric: tabular-nums; }
.mrow.won .score { color: var(--ink); }
.mrow.lost .score, .mrow.lost .tm-name { color: var(--muted); }
.mrow .rec { font-size: 12.5px; color: var(--muted); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--loss); margin-right: 5px; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) { .live-dot { animation: pulse 1.6s infinite; } }
@keyframes pulse { 50% { opacity: .3; } }

/* Box score */
.box-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 14px; }
.box-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; text-decoration: none; }
.box-side .nm { font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.box-side .big { font: 700 34px/1 var(--head); font-variant-numeric: tabular-nums; }
.box-side.lost .big { color: var(--muted); }
.box-mid { font: 600 14px var(--head); color: var(--muted); text-align: center; }
.lineup { width: 100%; table-layout: fixed; }
.lineup td { padding: 7px 6px; vertical-align: middle; }
.lineup .slot { width: 52px; text-align: center; font: 600 13px var(--head); color: var(--muted); background: var(--bg); }
.lineup .pts { width: 58px; font: 600 17px var(--head); }
.lineup .pts small { display: block; font: 400 12px var(--body); color: var(--muted); }
.lineup .pl { overflow: hidden; text-align: left; }
.lineup .pl.r { text-align: right; }
.lineup .pl .n { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.lineup .pl .p { font-size: 12px; color: var(--muted); }
.lineup .r { text-align: right; }
.lineup .totals td { font: 700 17px var(--head); background: var(--bg); }
.lineup .bench-head td { font: 600 14px var(--head); color: var(--muted); background: var(--bg); text-align: center; padding: 6px; }
.n .short { display: none; }
@media (max-width: 520px) { .n .full { display: none; } .n .short { display: inline; } .lineup .slot { width: 42px; } .lineup .pts { width: 50px; } }
.pos { display: inline-block; font: 600 12px var(--head); padding: 0 5px; border-radius: 4px; color: var(--ink); }
.pos-QB { background: var(--pos-qb); } .pos-RB { background: var(--pos-rb); } .pos-WR { background: var(--pos-wr); } .pos-TE { background: var(--pos-te); } .pos-K { background: var(--pos-k); } .pos-DST { background: var(--pos-dst); }

/* Team page */
.team-hero { display: flex; gap: 14px; align-items: center; padding: 14px; }
.team-hero .stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.team-hero .stat b { display: block; font: 700 22px var(--head); }
.team-hero .stat span { font-size: 12.5px; color: var(--muted); }
.picker { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 12px; }
.picker a { flex: none; text-decoration: none; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; font-size: 13.5px; font-weight: 600; max-width: 190px; }
.picker a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker a.on { border-color: var(--field); box-shadow: inset 0 0 0 1px var(--field); }
.picker .av { width: 24px; height: 24px; font-size: 11px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.sched td { cursor: pointer; }
.sched tr.sel td { background: var(--amber-soft); }
.result { font: 700 14px var(--head); width: 22px; display: inline-block; }

/* Draft */
.draft td { padding: 4px; border: 1px solid var(--line); vertical-align: top; text-align: left; min-width: 112px; max-width: 132px; white-space: normal; }
.draft th { text-align: left; min-width: 112px; white-space: normal; vertical-align: bottom; line-height: 1.15; cursor: pointer; }
.draft .rd { min-width: 34px; text-align: center; color: var(--muted); font: 600 14px var(--head); background: var(--bg); }
.pick { border-radius: 6px; padding: 5px 6px; font-size: 13px; line-height: 1.2; min-height: 44px; }
.pick .num { font: 600 11.5px var(--head); color: var(--muted); }
.pick .nm { font-weight: 600; display: block; }
.pick.dim { opacity: .3; }
.pick.QB { background: var(--pos-qb); } .pick.RB { background: var(--pos-rb); } .pick.WR { background: var(--pos-wr); } .pick.TE { background: var(--pos-te); } .pick.K { background: var(--pos-k); } .pick.DST { background: var(--pos-dst); }

/* Bracket */
.bracket { display: flex; gap: 14px; padding: 12px; overflow-x: auto; }
.round { flex: none; width: 210px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.round h3 { font-size: 15px; color: var(--muted); }
.bm { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.bm .row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px; font-size: 13.5px; }
.bm .row + .row { border-top: 1px solid var(--line); }
.bm .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm .row b { font: 600 15px var(--head); }
.bm .row.lost { color: var(--muted); }
.bm .seed { color: var(--muted); font-size: 12px; margin-right: 4px; }

/* Records */
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rec-card { padding: 12px 14px; text-decoration: none; display: block; }
.rec-card .lbl { font-size: 13px; color: var(--muted); }
.rec-card .val { font: 700 30px/1.05 var(--head); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.rec-card .ctx { font-size: 13.5px; }
.h2h td, .h2h th { text-align: center; padding: 6px; font-size: 13px; }
.h2h th.l, .h2h td.l { text-align: left; }
.h2h td.self { background: var(--bg); }
.h2h td.h-up { color: var(--win); font-weight: 600; } .h2h td.h-down { color: var(--loss); font-weight: 600; }
.h2h th.l, .h2h td.l { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.h2h tr.mine td.l { background: var(--amber-soft); }
.foot { margin-top: 26px; color: var(--muted); font-size: 12.5px; text-align: center; }
.foot button { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; color: var(--muted); }
.btn-link { color: var(--field-2); font-weight: 600; text-decoration: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-link }
@media (max-width: 520px) {
  td, th { padding: 7px 5px; }
  .tm-name { max-width: 128px; white-space: normal; line-height: 1.2; }
  .hide-sm { display: none; }
  .av { width: 26px; height: 26px; font-size: 11px; }
  .tm { gap: 7px; }
}

/* Championship banners hanging from a rafter */
.rafter { overflow-x: auto; }

.banners { position: relative; display: flex; gap: 14px; padding: 4px 6px 10px; width: max-content; min-width: 100%; }
.banner { position: relative; flex: none; width: 136px; min-height: 212px; padding: 18px 10px 44px; text-decoration: none; color: #F3F5FA; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background:
    linear-gradient(var(--amber), var(--amber)) top 8px left 0 / 100% 3px no-repeat,
    linear-gradient(var(--amber), var(--amber)) bottom 30px left 0 / 100% 3px no-repeat,
    var(--field);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%); }
.b-year { font: 700 38px/1 var(--head); color: var(--amber); margin-top: 6px; }
.b-lbl { font-size: 11.5px; opacity: .75; }
.b-team { font: 700 17px/1.15 var(--head); margin-top: 8px; overflow-wrap: anywhere; }
.b-mgr { font-size: 12.5px; opacity: .85; }
.b-ru { font-size: 11.5px; opacity: .65; margin-top: 4px; line-height: 1.2; }
.rings { display: inline-flex; gap: 1px; font-size: 15px; vertical-align: 0; }
.ring { width: 20px; height: 20px; }
h1 .ring { width: 22px; height: 22px; }
.rec-card .go { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--field-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rec-card .go { color: var(--amber); } }
:root[data-theme="dark"] .rec-card .go { color: var(--amber); }
.rec-card:active { transform: scale(.99); }
th .arrow { font-size: 9px; margin-left: 3px; vertical-align: 1px; }
th .swap { border: 1px solid var(--line); background: var(--bg); border-radius: 5px; padding: 0 4px; font-size: 11px; line-height: 16px; color: var(--ink); cursor: pointer; margin-left: 2px; }
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--surface); border-radius: 50%; }
.bm-tag { font: 600 12px var(--head); color: var(--muted); padding: 5px 9px 0; }

/* ---------- Desktop and laptop screens ---------- */
@media (min-width: 1100px) {
  .top-inner, .tabs, main { max-width: 1240px; }
  main { padding: 24px 24px 56px; }
  h1 { font-size: 32px; }
  /* the champions banners all fit, so lay them out in a row instead of a scroller */
  .rafter { overflow: visible; }
  .banners { display: grid; width: auto; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
  .banners .banner { width: auto; }
  /* keep the box score readable instead of stretching both lineups to the edges */
  .box-wrap { max-width: 920px; margin: 0 auto; }
  .mgrid { grid-template-columns: repeat(3, 1fr); }
  .records { grid-template-columns: repeat(4, 1fr); }
}
/* mouse and trackpad users get hover feedback; touch screens skip it */
html.is-desktop tbody tr:hover td { background: color-mix(in srgb, var(--amber) 8%, transparent); }
html.is-desktop .mcard:hover, html.is-desktop .bm:hover, html.is-desktop .rec-card:hover, html.is-desktop .banner:hover { border-color: var(--amber); }
html.is-desktop .banner:hover { filter: brightness(1.08); }
html.is-desktop .tabs a:hover { opacity: 1; }
html.is-desktop .weeks a:hover, html.is-desktop .picker a:hover { border-color: var(--amber); }
.kbd-hint { display: none; }
html.is-desktop .kbd-hint { display: inline; }

/* Draft board on desktop: every team column fits on screen, no sideways scrolling */
@media (min-width: 1100px) {
  .draft-wrap { overflow-x: visible; }
  .draft { table-layout: fixed; width: 100%; }
  .draft th, .draft td { min-width: 0; max-width: none; }
  .draft th { font-size: 12px; padding: 6px 4px; overflow-wrap: anywhere; }
  .draft .rd { width: 30px; min-width: 0; }
  .draft td { padding: 3px; }
  .pick { padding: 4px 5px; font-size: 12px; min-height: 40px; }
  .pick .nm { overflow-wrap: anywhere; }
  .pick .sub { font-size: 11px; }
}

/* Trades */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 12px; }
.tr-card { padding: 12px 14px; }
.tr-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 600 14px var(--head); color: var(--muted); margin-bottom: 8px; }
.tr-badge { font: 700 12.5px var(--head); padding: 2px 8px; border-radius: 10px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tr-badge.lopsided { background: var(--loss); color: #fff; }
.tr-badge.edge { background: var(--amber-soft); color: var(--ink); }
.tr-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

@media (max-width: 520px) { .tr-sides { grid-template-columns: 1fr; } }
.tr-side { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.tr-side.won { border-color: var(--win); box-shadow: inset 3px 0 0 var(--win); }
.tr-players { list-style: none; margin: 8px 0; padding: 0; }
.tr-players li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tr-players b { font-weight: 600; }
.tr-pts { font: 600 15px var(--head); text-align: right; white-space: nowrap; }
.tr-pts small { display: block; font: 400 11.5px var(--body); color: var(--muted); }
.tr-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.tr-total b { font: 700 20px var(--head); color: var(--ink); }
@media (max-width: 640px) { .tabs a { font-size: 13.5px; padding-left: 0; padding-right: 0; } }

/* Team picker, week chips and season chips: wrap onto extra lines on wider screens
   instead of scrolling sideways; phones keep the swipeable row */
@media (min-width: 641px) {
  .picker, .weeks { flex-wrap: wrap; overflow-x: visible; }
  .picker a { max-width: 240px; }
}
/* where a row does still scroll, keep the scrollbar slim instead of the chunky default */
.picker, .weeks, .tabs, .scroll-x, .rafter { scrollbar-width: thin; }
.picker::-webkit-scrollbar, .weeks::-webkit-scrollbar, .tabs::-webkit-scrollbar { height: 0; }

/* line every side's total up along the bottom of the card */
.tr-sides { align-items: stretch; }
.tr-side { display: flex; flex-direction: column; }
.tr-players { flex: 1; }
.tr-total { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.tr-flip { display: block; font-size: 11.5px; color: var(--muted); font-style: italic; }

/* half trophy / half toilet paper for split titles and split last place */
.half-emoji { display: inline-block; width: .55em; overflow: hidden; vertical-align: bottom; white-space: nowrap; }
.b-and { font-size: 12px; opacity: .7; margin: 2px 0; }
.champ-banner .av + .av { margin-left: -10px; box-shadow: 0 0 0 2px var(--amber-soft); }

/* League setup */
body.setup-mode .tabs, body.setup-mode .season-pick { display: none; }
body.setup-mode main { padding-bottom: 40px; }
.setup { max-width: 560px; margin: 18px auto 0; }
.setup-hero h1 { font-size: 34px; line-height: 1.05; }
.setup-hero p { font-size: 15px; margin: 8px 0 18px; }
.setup-card { padding: 18px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.field > span { font: 600 15px var(--head); letter-spacing: .2px; }
.field em { font-style: normal; color: var(--muted); font-weight: 500; }
.field input { font: 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
.field input:focus { outline: 2px solid var(--amber); outline-offset: 0; border-color: transparent; }
.hint { margin: 2px 0 4px; font-size: 13px; color: var(--muted); }
.hint code, .notice code { font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.cookies { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.cookies summary { cursor: pointer; font: 600 15px var(--head); color: var(--field-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cookies summary, :root:not([data-theme="light"]) .btn-link, :root:not([data-theme="light"]) .moved > summary b, :root:not([data-theme="light"]) .link-panel > summary b { color: var(--amber); } }
:root[data-theme="dark"] .cookies summary, :root[data-theme="dark"] .btn-link, :root[data-theme="dark"] .moved > summary b, :root[data-theme="dark"] .link-panel > summary b { color: var(--amber); }
.btn-primary { margin-top: 14px; border: 0; border-radius: 9px; padding: 12px 16px; background: var(--amber); color: #fff; font: 700 18px var(--head); letter-spacing: .3px; cursor: pointer; }
.btn-primary:hover { filter: brightness(1.05); }
.notice { padding: 12px 14px; margin-bottom: 12px; font-size: 14px; border-left: 4px solid var(--amber); }
.notice.bad { border-left-color: var(--loss); }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rl { display: flex; align-items: stretch; }
.rl a { flex: 1; min-width: 0; text-decoration: none; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rl:hover { border-color: var(--amber); }
.rl-x { border: 0; background: none; color: var(--muted); padding: 0 14px; cursor: pointer; font-size: 14px; }
.rl-x:hover { color: var(--loss); }
.steps { margin: 6px 0 8px; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.foot a { color: inherit; font-weight: 600; }
.foot p { margin: 0 0 6px; }
.spin { width: 30px; height: 30px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .weeks a.on, :root:not([data-theme="light"]) .seg button.on { background: var(--amber); border-color: var(--amber); } }
:root[data-theme="dark"] .weeks a.on, :root[data-theme="dark"] .seg button.on { background: var(--amber); border-color: var(--amber); }

/* Platform picker */
.step-lbl { font: 600 15px var(--head); letter-spacing: .3px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; font-size: 13px; }
.plat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.plat button { border: 2px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 6px; font: 700 19px var(--head); letter-spacing: .3px; cursor: pointer; color: var(--ink); }
.plat button.on { border-color: var(--amber); background: var(--amber-soft); }
html.is-desktop .plat button:hover { border-color: var(--amber); }
.lg-pick-list { display: grid; gap: 6px; }
.lg-pick { display: flex; align-items: center; gap: 12px; text-decoration: none; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--bg); }
.lg-pick:hover { border-color: var(--amber); }
.lg-pick > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.lg-pick img, .lg-pick-dot { width: 36px; height: 36px; border-radius: 50%; flex: none; object-fit: cover; background: var(--line); }
.yahoo-btn { display: block; width: 100%; text-align: center; text-decoration: none; background: #6001D2; }
#sl-id .btn-primary { width: 100%; }
#sl-user .btn-primary { width: 100%; }

.setup-card .btn-primary { width: 100%; display: block; }

/* Leagues that moved between sites */
.moved { margin-top: 12px; padding: 14px 16px; }
.moved > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.moved > summary::-webkit-details-marker { display: none; }
.moved > summary b { font: 700 17px var(--head); color: var(--field-2); }
.moved > summary b::before { content: '+ '; }
.moved[open] > summary b::before { content: '– '; }
#extras { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.extra { border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: var(--bg); }
.extra-row { display: flex; gap: 6px; align-items: center; }
.extra-row select, .extra-row input { font: 15px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-width: 0; }
.extra-row select { flex: none; width: 104px; }
.extra-row input { flex: 1; }
.extra-row .ex-yr { flex: 0 0 76px; }
@media (max-width: 420px) { .extra-row select { width: 92px; } }
.extra .hint { margin: 6px 2px 0; }
.btn-ghost { align-self: flex-start; border: 1px dashed var(--field-2); background: none; color: var(--field-2); border-radius: 8px; padding: 8px 12px; font: 600 15px var(--head); cursor: pointer; }
.lg-pick { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.link-panel { margin-bottom: 12px; padding: 12px 14px; }
.link-panel > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.link-panel > summary b { font: 700 16px var(--head); color: var(--field-2); }
.link-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-top: 12px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--bg); }
.link-row > span { display: flex; flex-direction: column; min-width: 0; }
.link-row select { font: 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; max-width: 55%; }
.link-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.link-foot .btn-primary { width: auto; display: inline-block; }

/* Locked season help */
.notice-wrap { max-width: 1040px; margin: 0 auto; padding: 12px 12px 0; }
.lock-notice { border-left: 4px solid var(--amber); padding: 0; }
.lock-notice.expired, .lock-notice.went-private { border-left-color: var(--loss); }
.lock-notice > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; font: 600 16px var(--head); list-style: none; }
.lock-notice > summary::-webkit-details-marker { display: none; }
.lk-how { font: 600 14px var(--head); color: var(--field-2); white-space: nowrap; }
.lock-notice[open] .lk-how { display: none; }
.lk-body { padding: 0 14px 12px; font-size: 14px; }
.lk-body .steps { font-size: 14px; }
.lk-body a { color: var(--field-2); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lk-how, :root:not([data-theme="light"]) .lk-body a { color: var(--amber); } }
:root[data-theme="dark"] .lk-how, :root[data-theme="dark"] .lk-body a { color: var(--amber); }
.notice .steps { margin-bottom: 4px; }
.lk-body .btn-link, .notice .btn-link, .hint .btn-link { background: none; border: 0; padding: 0; cursor: pointer; font: 600 14px var(--body); }

/* Trades / Waiver wire switch and waiver page */
.move-switch { margin-bottom: 12px; }
.move-switch a { text-decoration: none; padding: 6px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.move-switch a.on { background: var(--field); color: #fff; }
.ww-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1100px) { .ww-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.ww td { white-space: normal; vertical-align: middle; }
.ww .ww-name { font-weight: 600; }
.ww .sub { font-size: 12.5px; margin-top: 2px; }
.ww .tm-name { max-width: 170px; }
@media (max-width: 640px) { .ww th:nth-child(3), .ww td:nth-child(3) { display: none; } }

/* player history under each pickup */
.mv { margin-top: 4px; font-size: 12.5px; }
.mv summary { cursor: pointer; color: var(--field-2); font-weight: 600; list-style: none; }
.mv summary::-webkit-details-marker { display: none; }
.mv summary::before { content: "▸ "; }
.mv[open] summary::before { content: "▾ "; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mv summary { color: var(--amber); } }
:root[data-theme="dark"] .mv summary { color: var(--amber); }
.mv ol { list-style: none; margin: 6px 0 2px; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.mv li { display: flex; gap: 8px; padding: 2px 0; }
.mv li.this { font-weight: 600; }
.mv li.this .mv-wk { color: var(--win); }
.mv-wk { flex: none; width: 54px; color: var(--muted); }
.pos-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.pos-filter button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 11px; font: 600 14px var(--head); cursor: pointer; color: var(--ink); }
.pos-filter button.on { background: var(--field); border-color: var(--field); color: #fff; }
html.is-desktop .pos-filter button:hover { border-color: var(--amber); }
.pin { display: flex; align-items: center; gap: 6px; font: 600 14px var(--head); }
.pin em { font-style: normal; color: var(--muted); font-weight: 500; }
.pin input { width: 120px; font: 15px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-ghost { color: var(--amber); border-color: var(--amber); } }
:root[data-theme="dark"] .btn-ghost { color: var(--amber); border-color: var(--amber); }
#moved { scroll-margin-top: 90px; }

/* League pages */
.slug-row { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.slug-host { padding: 10px 0 10px 12px; color: var(--muted); font: 16px var(--body); white-space: nowrap; }
.slug-row input { border: 0 !important; background: transparent !important; padding-left: 2px !important; flex: 1; min-width: 0; outline: none; font: 16px var(--body); color: var(--ink); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; margin-top: 12px; color: var(--ink); }
.check input { margin-top: 3px; flex: none; }
.share-row { display: flex; gap: 8px; margin: 8px 0; }
.share-row input { flex: 1; min-width: 0; font: 15px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.share-row .btn-primary { margin: 0; width: auto !important; flex: none; }
.btn-ghost.danger { border-color: var(--loss) !important; color: var(--loss) !important; margin-top: 14px; }

/* Other platforms */
.plat.plat-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 420px) { .plat.plat-4 button { font-size: 16px; padding: 11px 2px; } }
.other-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.other-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--bg); }
.other-row .hint { margin: 2px 0 0; }
.other-row .btn-ghost { flex: none; align-self: center; }
.other-row .btn-ghost:disabled { opacity: .6; cursor: default; }
.req-n { margin-left: 8px; font: 600 12px var(--head); color: var(--muted); }
.req-name { display: block; width: 100%; max-width: 260px; margin-top: 6px; font: 15px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }

/* Guided setup */
.wsteps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 4px 0 14px; flex-wrap: wrap; }
.wsteps li { display: flex; align-items: center; gap: 6px; font: 600 14px var(--head); color: var(--muted); padding: 4px 10px 4px 4px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.wsteps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: 12px; }
.wsteps li.on { color: var(--ink); border-color: var(--amber); }
.wsteps li.on span { background: var(--amber); color: #fff; }
.wsteps li.done span { background: var(--win); color: #fff; }
@media (max-width: 420px) { .wsteps li { font-size: 12.5px; padding-right: 8px; } }
.setup-card + .setup-card { margin-top: 12px; }
.wq { font-size: 21px; margin: 0 0 6px; }
.yn { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.yn > * { flex: 1 1 200px; margin: 0 !important; }
.btn-ghost.big { padding: 11px 14px; font-size: 16px; text-align: center; }
.wnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0; }
.wnav .btn-primary { width: auto !important; margin: 0; padding: 11px 26px; }
.wnav .btn-link { font-size: 15px; background: none; border: 0; cursor: pointer; }
.src-card { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); margin: 4px 0 8px; }
.src-ok { color: var(--win); font-size: 13.5px; font-weight: 600; }
.src-warn { color: var(--amber); font-size: 13.5px; font-weight: 600; }
.src-bad { color: var(--loss); font-size: 13.5px; font-weight: 600; }
.ex-result { margin-top: 4px; }
.ex-check { padding: 8px 10px; flex: none; }
.tline { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.tline li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.tline li b { font: 700 17px var(--head); }
.tline li.lk { opacity: .55; }
@media (max-width: 480px) { .tline li { grid-template-columns: 46px 1fr; } .tline li .sub { grid-column: 2; } }
button.btn-link { background: none; border: 0; padding: 0; cursor: pointer; font: 600 14px var(--body); color: var(--field-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.btn-link { color: var(--amber); } }
