:root {
  --accent-base: #ff4d3d;
  --on-accent: #fff;
  --bg: #0c0f14;
  --panel: #151a22;
  --panel-2: #1c232d;
  --line: #2a3340;
  --line-soft: rgba(42,51,64,.6);
  --text: #e8edf3;
  --muted: #8b97a8;
  --accent: var(--accent-base);
  --accent-2: color-mix(in srgb, var(--accent-base) 78%, white);
  --accent-hover: color-mix(in srgb, var(--accent-base) 86%, white);
  --accent-soft: color-mix(in srgb, var(--accent-base) 15%, transparent);
  --accent-line: color-mix(in srgb, var(--accent-base) 60%, transparent);
  --card-line: color-mix(in srgb, var(--accent-base) 30%, transparent);
  --win: #34d399;
  --loss: #f87171;
  --gold: #fbbf24;
  --blue: #60a5fa;
  --header-bg: rgba(12,15,20,.92);
  --card-bg: rgba(21,26,34,.82);
  --input-bg: #0f141b;
  --hover-line: #3c4757;
  --msg-me: #3a1c1a;
  --out-bg: #4b1d1d; --out-line: #7f2a2a; --out-text: #fff;
  --toast-bg: #222b36; --err-text: #fecaca;
  --shadow: rgba(0,0,0,.4);
  --ring: color-mix(in srgb, var(--accent-base) 13%, transparent);
  color-scheme: dark;
  --radius: 6px;
  --qb: #f472b6; --rb: #34d399; --wr: #60a5fa; --te: #fbbf24;
}
/* Light theme: follows the device unless the manager picks one (html[data-theme]) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f4f6;
    --panel: #ffffff;
    --panel-2: #eef0f3;
    --line: #d6dbe2;
    --line-soft: rgba(120,132,150,.25);
    --text: #141a22;
    --muted: #5b6676;
    --accent: color-mix(in srgb, var(--accent-base) 84%, black);
    --accent-2: color-mix(in srgb, var(--accent-base) 76%, black);
    --accent-hover: color-mix(in srgb, var(--accent-base) 72%, black);
    --accent-soft: color-mix(in srgb, var(--accent-base) 10%, transparent);
    --accent-line: color-mix(in srgb, var(--accent-base) 55%, transparent);
    --card-line: color-mix(in srgb, var(--accent-base) 35%, transparent);
    --win: #0e8a5f;
    --loss: #c93838;
    --gold: #a86a0c;
    --blue: #2563c9;
    --header-bg: rgba(243,244,246,.9);
    --card-bg: rgba(255,255,255,.86);
    --input-bg: #ffffff;
    --hover-line: #aab3c0;
    --msg-me: #fde4df;
    --out-bg: #fde3e3; --out-line: #f0b4b4; --out-text: #9b1c1c;
    --toast-bg: #ffffff; --err-text: #b42318;
    --shadow: rgba(20,26,34,.15);
    --ring: color-mix(in srgb, var(--accent-base) 11%, transparent);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-2: #eef0f3;
  --line: #d6dbe2;
  --line-soft: rgba(120,132,150,.25);
  --text: #141a22;
  --muted: #5b6676;
  --accent: color-mix(in srgb, var(--accent-base) 84%, black);
  --accent-2: color-mix(in srgb, var(--accent-base) 76%, black);
  --accent-hover: color-mix(in srgb, var(--accent-base) 72%, black);
  --accent-soft: color-mix(in srgb, var(--accent-base) 10%, transparent);
  --accent-line: color-mix(in srgb, var(--accent-base) 55%, transparent);
  --card-line: color-mix(in srgb, var(--accent-base) 35%, transparent);
  --win: #0e8a5f;
  --loss: #c93838;
  --gold: #a86a0c;
  --blue: #2563c9;
  --header-bg: rgba(243,244,246,.9);
  --card-bg: rgba(255,255,255,.86);
  --input-bg: #ffffff;
  --hover-line: #aab3c0;
  --msg-me: #fde4df;
  --out-bg: #fde3e3; --out-line: #f0b4b4; --out-text: #9b1c1c;
  --toast-bg: #ffffff; --err-text: #b42318;
  --shadow: rgba(20,26,34,.15);
  --ring: color-mix(in srgb, var(--accent-base) 11%, transparent);
  color-scheme: light;
}

:root[data-accent="gold"], :root[data-accent="lime"] { --on-accent: #17140a; }

* { box-sizing: border-box; }
html { background: var(--bg); }
/* body stays transparent so the fixed bullseye behind it shows through */
body { margin: 0; color: var(--text); font: 15px/1.45 Inter, system-ui, sans-serif; }
/* Bullseye backdrop behind every page; the SVG is a mask so the ring color follows the theme */
body::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 55%;
  width: 135vmin;
  height: 135vmin;
  transform: translate(-50%, -50%);
  background: var(--ring);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-100 -100 200 200'><g fill='none' stroke='black' stroke-width='14'><circle r='91'/><circle r='63'/><circle r='35'/></g><circle r='14' fill='black'/><g stroke='black' stroke-width='0.8'><line x1='-100' y1='0' x2='-8' y2='0'/><line x1='8' y1='0' x2='100' y2='0'/><line x1='0' y1='-100' x2='0' y2='-8'/><line x1='0' y1='8' x2='0' y2='100'/><line x1='-84' y1='-2.5' x2='-84' y2='2.5'/><line x1='-2.5' y1='-84' x2='2.5' y2='-84'/><line x1='-70' y1='-2.5' x2='-70' y2='2.5'/><line x1='-2.5' y1='-70' x2='2.5' y2='-70'/><line x1='-56' y1='-2.5' x2='-56' y2='2.5'/><line x1='-2.5' y1='-56' x2='2.5' y2='-56'/><line x1='-42' y1='-2.5' x2='-42' y2='2.5'/><line x1='-2.5' y1='-42' x2='2.5' y2='-42'/><line x1='-28' y1='-2.5' x2='-28' y2='2.5'/><line x1='-2.5' y1='-28' x2='2.5' y2='-28'/><line x1='-14' y1='-2.5' x2='-14' y2='2.5'/><line x1='-2.5' y1='-14' x2='2.5' y2='-14'/><line x1='14' y1='-2.5' x2='14' y2='2.5'/><line x1='-2.5' y1='14' x2='2.5' y2='14'/><line x1='28' y1='-2.5' x2='28' y2='2.5'/><line x1='-2.5' y1='28' x2='2.5' y2='28'/><line x1='42' y1='-2.5' x2='42' y2='2.5'/><line x1='-2.5' y1='42' x2='2.5' y2='42'/><line x1='56' y1='-2.5' x2='56' y2='2.5'/><line x1='-2.5' y1='56' x2='2.5' y2='56'/><line x1='70' y1='-2.5' x2='70' y2='2.5'/><line x1='-2.5' y1='70' x2='2.5' y2='70'/><line x1='84' y1='-2.5' x2='84' y2='2.5'/><line x1='-2.5' y1='84' x2='2.5' y2='84'/></g></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-100 -100 200 200'><g fill='none' stroke='black' stroke-width='14'><circle r='91'/><circle r='63'/><circle r='35'/></g><circle r='14' fill='black'/><g stroke='black' stroke-width='0.8'><line x1='-100' y1='0' x2='-8' y2='0'/><line x1='8' y1='0' x2='100' y2='0'/><line x1='0' y1='-100' x2='0' y2='-8'/><line x1='0' y1='8' x2='0' y2='100'/><line x1='-84' y1='-2.5' x2='-84' y2='2.5'/><line x1='-2.5' y1='-84' x2='2.5' y2='-84'/><line x1='-70' y1='-2.5' x2='-70' y2='2.5'/><line x1='-2.5' y1='-70' x2='2.5' y2='-70'/><line x1='-56' y1='-2.5' x2='-56' y2='2.5'/><line x1='-2.5' y1='-56' x2='2.5' y2='-56'/><line x1='-42' y1='-2.5' x2='-42' y2='2.5'/><line x1='-2.5' y1='-42' x2='2.5' y2='-42'/><line x1='-28' y1='-2.5' x2='-28' y2='2.5'/><line x1='-2.5' y1='-28' x2='2.5' y2='-28'/><line x1='-14' y1='-2.5' x2='-14' y2='2.5'/><line x1='-2.5' y1='-14' x2='2.5' y2='-14'/><line x1='14' y1='-2.5' x2='14' y2='2.5'/><line x1='-2.5' y1='14' x2='2.5' y2='14'/><line x1='28' y1='-2.5' x2='28' y2='2.5'/><line x1='-2.5' y1='28' x2='2.5' y2='28'/><line x1='42' y1='-2.5' x2='42' y2='2.5'/><line x1='-2.5' y1='42' x2='2.5' y2='42'/><line x1='56' y1='-2.5' x2='56' y2='2.5'/><line x1='-2.5' y1='56' x2='2.5' y2='56'/><line x1='70' y1='-2.5' x2='70' y2='2.5'/><line x1='-2.5' y1='70' x2='2.5' y2='70'/><line x1='84' y1='-2.5' x2='84' y2='2.5'/><line x1='-2.5' y1='84' x2='2.5' y2='84'/></g></svg>") center / contain no-repeat;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: Oswald, Inter, sans-serif; letter-spacing: .02em; margin: 0 0 .5em; text-transform: uppercase; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.02rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* Header */
header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: blur(8px); border-top: 3px solid var(--accent); border-bottom: 1px solid var(--card-line); }
.bar { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: Oswald; font-weight: 700; font-size: 1.2rem; text-transform: uppercase; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.hot { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.spacer { flex: 1; }
nav.tabs { max-width: 1180px; margin: 0 auto; padding: 0 10px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; position: relative; }
nav.tabs a.on { color: var(--text); border-color: var(--accent); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: .72rem; line-height: 18px; text-align: center; margin-left: 4px; }
.iconbtn { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; cursor: pointer; position: relative; text-decoration: none; }
.iconbtn .badge { position: absolute; top: -6px; right: -8px; }
.acting { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.acting select { max-width: 160px; }

@media (max-width: 600px) {
  .bar { flex-wrap: wrap; gap: 8px 10px; }
  .bar > .pill { order: 5; }
  .brand { font-size: 1.05rem; min-width: 0; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
  .acting select { max-width: 120px; }
}

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 80px; }

/* Panels */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1.4fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } .acting span { display: none; } }
.card { background: var(--card-bg); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card.action { border-color: var(--accent-line); background: linear-gradient(160deg, var(--accent-soft), var(--card-bg) 55%); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hero .sub { color: var(--muted); }
.countdown { font-family: Oswald; font-size: 1.3rem; color: var(--accent-2); }
.stat { background: var(--panel-2); border-radius: 4px; padding: 10px 12px; }
.stat b { display: block; font-family: Oswald; font-size: 1.5rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 5px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--hover-line); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--loss); }
.btn.sm { padding: 4px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, select, textarea { background: var(--input-bg); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.form input:not([type=checkbox]), .form select { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 12px; }
.auth { max-width: 420px; margin: 40px auto; }
.auth .brand { justify-content: center; font-size: 1.6rem; margin-bottom: 18px; }

/* Tables & lists */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll-x { overflow-x: auto; }
.list { display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--panel-2); border-radius: 5px; min-width: 0; }
.item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pos { display: inline-block; width: 30px; text-align: center; border-radius: 3px; font-size: .72rem; font-weight: 800; padding: 2px 0; color: #0c0f14; flex-shrink: 0; }
.pos.QB { background: var(--qb); } .pos.RB { background: var(--rb); } .pos.WR { background: var(--wr); } .pos.TE { background: var(--te); }
.item.player .grow { display: flex; flex-direction: column; line-height: 1.25; }
.item.player .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .item.player .tag { display: none; } .item { gap: 8px; padding: 8px; } }
.hs { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--input-bg); border: 1px solid var(--line); flex-shrink: 0; }
.hs.sm { width: 26px; height: 26px; }
.board .cell { position: relative; }
.board-hs { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; }
.tag { font-size: .72rem; padding: 1px 7px; border-radius: 3px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.w { color: var(--win); border-color: rgba(52,211,153,.4); }
.tag.l { color: var(--loss); border-color: rgba(248,113,113,.4); }
.tag.i { color: var(--blue); border-color: rgba(96,165,250,.4); }
.tag.out { color: var(--out-text); background: var(--out-bg); border-color: var(--out-line); }
.tag.gold { color: var(--gold); border-color: rgba(251,191,36,.5); }
.dead { opacity: .55; }

.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.mine-card { border-color: var(--accent-line); }

/* Matchups */
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px; background: var(--panel-2); border-radius: 6px; cursor: pointer; }
.matchup .side { min-width: 0; }
.matchup .side.right { text-align: right; }
.matchup .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matchup .score { font-family: Oswald; font-size: 1.35rem; }
.matchup .vs { color: var(--muted); font-family: Oswald; font-size: .85rem; }
.matchup.mine { outline: 1px solid var(--accent-line); }
.win .score { color: var(--win); }
.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 12px; }
@media (max-width: 600px) { .lineups { grid-template-columns: 1fr; } }
.lineup-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .88rem; border-bottom: 1px dashed var(--line-soft); }
.lineup-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup-row.bench { opacity: .55; }

/* Draft board: fits the window. Columns share the width, rounds share the height; cells drop detail as they shrink. */
.draft-layout { display: grid; gap: 16px; }
.draft-layout.with-pool { grid-template-columns: minmax(0, 1fr) 360px; }
.board-card { padding: 8px; display: flex; flex-direction: column; min-height: 320px; }
.board { display: grid; gap: 3px; flex: 1; min-height: 0; }
.board .cell { background: var(--panel-2); border-radius: 4px; padding: 3px 5px; font-size: .74rem; border-left: 3px solid transparent;
  min-width: 0; min-height: 0; overflow: hidden; container-type: inline-size; }
.board .cell.QB { border-left-color: var(--qb); } .board .cell.RB { border-left-color: var(--rb); } .board .cell.WR { border-left-color: var(--wr); } .board .cell.TE { border-left-color: var(--te); }
.board .cell.now { outline: 2px solid var(--accent); outline-offset: -2px; }
.board .cell .pk { font-size: .64rem; }
.board .cell .p { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.board .cell .meta { font-size: .64rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .head { font-weight: 700; font-size: .7rem; color: var(--muted); padding: 2px 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: end; }
.board .head.mine { color: var(--accent); }
.board .head div { font-size: .62rem; }
.board .cell .short { display: none; }
@container (max-width: 90px) { .board-hs { display: none; } .board .cell .full { display: none; } .board .cell .short { display: inline; } }
@container (max-width: 60px) { .board .cell .meta { display: none; } .board .cell .p { font-size: .66rem; } }
.pool-card { display: flex; flex-direction: column; min-height: 0; }
.pool-card .pool-list { flex: 1; overflow-y: auto; min-height: 0; }
@media (max-width: 900px) { .draft-layout.with-pool { grid-template-columns: 1fr; } .draft-layout.with-pool .pool-card { order: -1; max-height: 70vh; } }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 380px; }
.chat .msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 12px; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); align-self: flex-start; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--msg-me); border: 1px solid var(--accent-line); }
.msg .who { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.msg.sys { align-self: center; max-width: 92%; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: .85rem; text-align: center; }
.chat form { display: flex; gap: 8px; }
.chat form input { flex: 1; }
.feed .f { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.feed .f:last-child { border: 0; }

.seg { display: inline-flex; background: var(--panel-2); border-radius: 6px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { padding: 4px 10px; border-radius: 4px; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; }
.seg .on { background: var(--accent); color: var(--on-accent); }
.empty { padding: 18px; text-align: center; color: var(--muted); }
.copy { font-family: ui-monospace, monospace; font-size: .75rem; word-break: break-all; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#toast div { background: var(--toast-bg); border: 1px solid var(--line); padding: 10px 16px; border-radius: 6px; box-shadow: 0 6px 30px var(--shadow); max-width: 90vw; }
#toast div.err { border-color: var(--loss); color: var(--err-text); }

.theme-btn { font-size: 1rem; line-height: 1; color: var(--text); background: none; }

/* "Your move" label on cards that need the manager to act */
.card.action::before { content: "Your move"; display: block; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.brand svg { color: var(--accent); }
.iconbtn svg { width: 18px; height: 18px; display: block; }
.iconbtn { color: var(--muted); display: inline-flex; align-items: center; }
.iconbtn:hover { color: var(--text); border-color: var(--hover-line); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }

/* Password box with show/hide button */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); display: flex; }
.pw-toggle:hover { color: var(--text); }
.pw-toggle svg { width: 18px; height: 18px; }
.bye { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.bye::before { content: '· '; }
.bye.past { opacity: .55; }
.tag.l[title^="On bye"] { margin-left: 2px; }

/* League switcher (managers in more than one league) */
.league-switch { position: relative; }
.league-switch summary { list-style: none; cursor: pointer; }
.league-switch summary::-webkit-details-marker { display: none; }
.league-switch .caret { width: 16px; height: 16px; opacity: .7; transition: transform .15s; }
.league-switch[open] .caret { transform: rotate(180deg); }
.league-switch .menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 260px; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: 0 10px 30px var(--shadow); padding: 6px; }
.league-switch .menu-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px 4px; }
.league-switch .menu a { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--text); }
.league-switch .menu a:hover { background: var(--panel-2); }
.league-switch .menu a.on { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }

/* Landing page */
.landing { max-width: 1080px; margin: 0 auto; }
.land-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: center; padding: 28px 0 12px; }
.land-hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; margin-bottom: .4em; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 34em; margin: 0 0 20px; }
.land-h { margin: 40px 0 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-i { font-size: 1.5rem; margin-bottom: 6px; }
.step p { margin: 0; }
.format ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }
.format h3 { margin-top: 10px; }
.land-request { margin: 32px 0 40px; }
@media (max-width: 820px) {
  .land-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 12px; }
  .steps { grid-template-columns: 1fr; }
}

/* Filter chips (chat and league activity) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.chip.clear { border-style: dashed; }
.act-week { margin: 16px 0 4px; }
.feed .f.act { display: flex; align-items: center; gap: 10px; }
.feed .f.act.mine { box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
.act-i { width: 1.4em; text-align: center; }
.nowrap { white-space: nowrap; }

/* Weekly status bar across the top of every page: one bar split into sections */
.status { list-style: none; margin: 0; padding: 0; display: flex; border-bottom: 1px solid var(--card-line); }
.status li { flex: 1; min-width: 0; display: flex; border-right: 1px solid var(--line-soft); color: var(--muted); }
.status li a { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 12px; color: inherit; text-decoration: none; }
.status li a:hover { background: color-mix(in srgb, var(--accent-base) 14%, transparent); }
.status li a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.status li:last-child { border-right: 0; }
.status li.done { background: color-mix(in srgb, var(--accent-base) 9%, transparent); }
.status li.now { background: linear-gradient(90deg, color-mix(in srgb, var(--accent-base) 28%, transparent), color-mix(in srgb, var(--accent-base) 12%, transparent));
  color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.status li.next { opacity: .6; }
.status .lbl { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.status b { font-family: Oswald, Inter, sans-serif; text-transform: uppercase; letter-spacing: .03em; font-size: .8rem; font-weight: 500; }
.status li.now b { font-weight: 700; }
.status .chk { color: var(--accent); font-size: .75rem; }
.status .info { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .status li a { padding: 4px 6px; }
  .status b { font-size: .66rem; }
  .status li:not(.now) b { display: none; }
  .status li:not(.now) { flex: 0 0 38px; }
  .status li:not(.now) a { align-items: center; }
  .status li:not(.now) .info, .status .chk { display: none; }
}

/* Dynasty */
.tag.dyn { color: var(--blue); border-color: rgba(96,165,250,.45); }
.trade-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.trade-asset { padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: .88rem; flex-wrap: wrap; }
@media (max-width: 600px) { .trade-sides { grid-template-columns: 1fr; } }

/* Players page: sortable headers and minimum filters */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover, th.sortable.on { color: var(--text); }
.minf { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); margin: 0; white-space: nowrap; }
.minf input { width: 70px; }

/* Created leagues */
.meter { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; background: var(--accent); }
.claim { margin-bottom: 16px; }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.format-opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; margin: 0; }
.format-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.format-opt input { position: absolute; opacity: 0; pointer-events: none; }
.create .card { margin-bottom: 14px; }
.land-create { margin: 32px 0 0; }
.league-switch .menu a.menu-create { border-top: 1px solid var(--line-soft); margin-top: 4px; }
@media (max-width: 700px) { .formats { grid-template-columns: 1fr; } }

.move-sel { font-size: .78rem; padding: 3px 6px; max-width: 120px; }

/* Draft list view: scrolls inside its card, so the page itself still doesn't scroll */
.board-card.is-list { padding: 0; }
.draft-list { flex: 1; overflow-y: auto; min-height: 0; }
.draft-list .table { margin: 0; }
.draft-list thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.draft-list tr.alt td { background: color-mix(in srgb, var(--panel-2) 45%, transparent); }
.draft-list tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.draft-list tr.now td { background: var(--accent-soft); }
.accent { color: var(--accent); }

/* Pre-draft list */
.queue #queue-q { width: 100%; }
.queue .qrank { width: 20px; text-align: right; font-weight: 700; color: var(--muted); font-size: .8rem; }
.queue .item.blocked { opacity: .55; }
.iconbtn.sm { padding: 2px 7px; font-size: .7rem; }
.iconbtn:disabled { opacity: .35; cursor: default; }

.queue .queue-tabs { align-self: flex-start; margin-bottom: 10px; }
.queue .row { gap: 6px; }

/* Chat @mentions */
.chat-form { position: relative; }
.mention-pop { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; min-width: 240px; max-width: 100%; background: var(--panel);
  border: 1px solid var(--card-line); border-radius: 6px; box-shadow: 0 10px 30px var(--shadow); padding: 4px; display: flex; flex-direction: column; }
.mention-pop[hidden] { display: none; }
.mention-pop button { text-align: left; background: none; border: 0; color: var(--text); padding: 7px 10px; border-radius: 4px; cursor: pointer; font: inherit; }
.mention-pop button.on, .mention-pop button:hover { background: var(--accent-soft); }
.mention { color: var(--accent); font-weight: 600; }
.mention.me { background: var(--accent-soft); border-radius: 3px; padding: 0 3px; }
.msg.tagged { box-shadow: inset 3px 0 0 var(--accent); }

/* Push alerts */
.ios-steps { margin: 6px 0 10px; padding-left: 20px; line-height: 1.7; }
.push-tip { border-color: var(--accent-line); }

/* Clickable player names and the player card */
.plink { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.plink:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.plink.pname { font-weight: 700; }
.board .cell.clickable { cursor: pointer; }
.board .cell.clickable:hover { filter: brightness(1.15); }
#modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
#modal[hidden] { display: none; }
.modal-open { overflow: hidden; }
.modal-box { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel);
  border: 1px solid var(--card-line); border-radius: var(--radius); padding: 18px; box-shadow: 0 20px 60px var(--shadow); }
.modal-x { position: absolute; top: 12px; right: 12px; }
.pc-head { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.pc-hs { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--panel-2); flex-shrink: 0; }
.pc-stats { margin: 14px 0; }
.pc-log td, .pc-log th { padding: 6px 8px; font-size: .84rem; white-space: nowrap; }
.pc-log .spark { display: inline-block; height: 6px; margin-left: 6px; border-radius: 3px; background: var(--accent); opacity: .6; vertical-align: middle; }
@media (max-width: 600px) { .modal-box { padding: 14px; } .pc-hs { width: 56px; height: 56px; } }
