:root {
  color-scheme: light;
  --navy-950: #091519;
  --navy-900: #0d1b20;
  --navy-800: #14272d;
  --navy-700: #1d343b;
  --cream-50: #fbfaf6;
  --cream-100: #f4f1e9;
  --cream-200: #e9e4d9;
  --cream-300: #d9d1c2;
  --ink: #102026;
  --muted: #68777a;
  --lime: #d8ff4f;
  --lime-dark: #a9d800;
  --red: #e4533f;
  --qb: #82aefd;
  --rb: #5dcc97;
  --wr: #efc452;
  --te: #b993ed;
  --dst: #ee8b6d;
  --k: #7ccbd9;
  --shadow: 0 20px 60px rgba(9, 21, 25, .13);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 9% 0%, rgba(216, 255, 79, .1), transparent 24rem),
    linear-gradient(180deg, #eff0e9 0, var(--cream-100) 34rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, input[type="search"], select { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(169, 216, 0, .5);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 12px clamp(16px, 2.6vw, 42px);
  color: #f8f8f2;
  background: rgba(9, 21, 25, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 26px rgba(9, 21, 25, .18);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: rgba(216, 255, 79, .08);
  border: 1px solid rgba(216, 255, 79, .24);
  border-radius: 13px;
}

.brand-mark svg { width: 30px; height: 30px; }
.brand-mark .football-body, .setup-mark .football-body, .access-football .football-body { fill: #a85d2d; stroke: #e6b77b; stroke-width: 1.15; }
.brand-mark .football-stripe, .setup-mark .football-stripe, .access-football .football-stripe { fill: none; stroke: #fff9eb; stroke-width: 1.65; stroke-linecap: round; }
.brand-mark .football-laces, .setup-mark .football-laces, .access-football .football-laces { fill: none; stroke: #fffdf5; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 1px; color: #96a4a6; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.on-clock {
  min-width: 470px;
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto 138px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: var(--navy-950);
  background: var(--lime);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 24px rgba(216, 255, 79, .09);
}

.on-clock.is-complete { background: #fff; }
.on-clock.timer-expired:not(.is-complete) { background: #ffc2b4; }
.on-clock > div:nth-child(2) { min-width: 0; }
.clock-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--navy-900); box-shadow: 0 0 0 0 rgba(13, 27, 32, .4); animation: pulse 1.7s infinite; }
.on-clock.is-complete .clock-pulse { background: #43a35e; animation: none; }
.on-clock.timer-expired .clock-pulse { background: #a63022; animation-duration: .7s; }
.clock-label { display: block; margin-bottom: -1px; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; opacity: .65; }
.on-clock strong { display: block; max-width: 165px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.clock-meta { padding-left: 14px; text-align: right; border-left: 1px solid rgba(9, 21, 25, .2); }
.clock-meta span { display: block; font-size: 10px; opacity: .65; }
.clock-meta b { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }

.pick-timer { min-width: 0; padding-left: 11px; border-left: 1px solid rgba(9, 21, 25, .2); }
.timer-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.timer-setting-row label { font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; opacity: .62; }
.timer-setting-row select { width: 72px; height: 20px; padding: 0 3px; color: var(--navy-950); background: rgba(255, 255, 255, .32); border: 1px solid rgba(9, 21, 25, .2); border-radius: 5px; font-size: 8px; font-weight: 800; outline: none; cursor: pointer; }
.timer-setting-row select:disabled { cursor: not-allowed; opacity: .55; }
.timer-countdown { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.timer-display { min-width: 47px; margin-right: auto; font-size: 15px; font-style: normal; font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.timer-control { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; color: var(--navy-950); background: rgba(255, 255, 255, .28); border: 1px solid rgba(9, 21, 25, .2); border-radius: 6px; cursor: pointer; }
.timer-control:hover:not(:disabled) { background: rgba(255, 255, 255, .58); }
.timer-control:disabled { cursor: not-allowed; opacity: .35; }
.timer-control svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.timer-control .timer-icon-play { fill: currentColor; stroke: none; }
.timer-icon-pause { display: none; }
.pick-timer.is-running .timer-icon-play { display: none; }
.pick-timer.is-running .timer-icon-pause { display: block; }
.pick-timer.is-warning .timer-display { color: #9f2e20; animation: timer-warning .75s ease-in-out infinite alternate; }
.pick-timer.is-off .timer-display { opacity: .55; }

@keyframes timer-warning {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(13, 27, 32, .44); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(13, 27, 32, 0); }
}

.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.action-button, .icon-button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  color: #eef1eb;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.action-button:hover:not(:disabled), .icon-button:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .28); }
.action-button:active:not(:disabled), .icon-button:active { transform: translateY(1px); }
.action-button:disabled { cursor: not-allowed; opacity: .36; }
.action-button svg, .icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.action-button kbd { padding: 1px 5px; color: #aeb9ba; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .12); border-radius: 4px; font-size: 9px; font-family: inherit; }
.action-button--primary { color: var(--navy-950); background: var(--lime); border-color: var(--lime); font-weight: 750; }
.action-button--primary:hover:not(:disabled) { background: #e2ff78; border-color: #e2ff78; }
.action-button[hidden] { display: none; }
.room-button.is-connected { border-color: rgba(216, 255, 79, .35); }
.room-button.is-commissioner { color: var(--navy-950); background: #fff; border-color: #fff; }
.icon-button { width: 40px; padding: 0; }

.workspace {
  width: min(1840px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: start;
  gap: 20px;
  margin: 0 auto;
  padding: 22px clamp(14px, 2vw, 32px) 38px;
}

.board-panel, .players-panel { border-radius: var(--radius); box-shadow: var(--shadow); }
.board-panel { min-width: 0; padding: clamp(18px, 2.1vw, 30px); background: var(--cream-50); border: 1px solid rgba(16, 32, 38, .08); }

.board-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: #637174; font-size: 10px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow > span { width: 7px; height: 7px; background: var(--red); border-radius: 50%; }
.eyebrow--dark { color: #839194; }
.board-heading h1 { margin: 0; color: var(--navy-900); font-size: clamp(25px, 2.3vw, 38px); line-height: 1.03; letter-spacing: -.04em; }
.board-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.league-facts { display: flex; flex: 0 0 auto; gap: 6px; }
.league-facts span { min-width: 76px; padding: 9px 10px; color: #566568; background: var(--cream-100); border: 1px solid var(--cream-200); border-radius: 10px; font-size: 9px; font-weight: 750; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.league-facts b { display: block; margin-bottom: 1px; color: var(--navy-900); font-size: 17px; line-height: 1; letter-spacing: -.03em; }

.draft-progress { margin-top: 22px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.progress-track { height: 5px; overflow: hidden; background: var(--cream-200); border-radius: 999px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--lime-dark), var(--lime)); border-radius: inherit; transition: width .3s ease; }

.board-help { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 10px; color: #7a8586; font-size: 10px; }
.board-help > span:first-child { margin-right: auto; }
.board-help b { color: var(--navy-800); letter-spacing: .14em; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-item i { width: 9px; height: 9px; display: inline-block; border-radius: 3px; }
.legend-current { background: var(--lime); border: 1px solid var(--lime-dark); }
.legend-filled { background: var(--navy-800); }

.board-viewport { overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--cream-300); border-radius: 13px; scrollbar-color: #b9b3a7 transparent; }
.draft-board { width: 100%; min-width: 1020px; table-layout: fixed; border-spacing: 0; border-collapse: separate; color: var(--navy-900); }
.draft-board th, .draft-board td { border-right: 1px solid var(--cream-300); border-bottom: 1px solid var(--cream-300); }
.draft-board tr > :last-child { border-right: 0; }
.draft-board tbody tr:last-child > * { border-bottom: 0; }
.draft-board thead th { height: 60px; padding: 7px 8px; background: #ede9df; }
.draft-board thead th:first-child { width: 48px; padding: 0; color: #839092; font-size: 9px; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.draft-board thead th.active-team { background: #e4e9cd; box-shadow: inset 0 3px 0 var(--lime-dark); }

.team-name {
  width: 100%;
  display: block;
  padding: 6px 5px 5px;
  overflow: hidden;
  color: var(--navy-900);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
}
.team-name:hover { border-color: #c7c0b4; }
.team-name:focus { background: var(--cream-50); border-color: var(--lime-dark); outline: none; }
.team-name[readonly] { cursor: default; }
.team-name[readonly]:hover { border-color: transparent; }
.team-slot { display: block; margin-top: -2px; color: #8c9696; font-size: 8px; font-weight: 750; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.team-owner { display: block; overflow: hidden; margin-top: 1px; color: #6e7b7d; font-size: 7px; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.draft-board thead th.your-team { box-shadow: inset 0 -3px 0 var(--qb); }
.draft-board thead th.active-team.your-team { box-shadow: inset 0 3px 0 var(--lime-dark), inset 0 -3px 0 var(--qb); }

.round-cell { width: 48px; padding: 0 4px; color: #728082; background: #f0ede5; text-align: center; }
.round-cell strong { display: block; font-size: 10px; }
.round-cell span { display: block; margin-top: 1px; color: #9da5a5; font-size: 11px; }
.draft-board tbody tr:nth-child(even) .round-cell { background: #e9e5dc; }

.draft-cell { position: relative; height: 64px; padding: 5px; background: #faf9f4; vertical-align: middle; }
.draft-board tbody tr:nth-child(even) .draft-cell { background: #f6f3ec; }
.draft-cell::before { content: attr(data-pick); position: absolute; top: 4px; right: 5px; color: #c0bbb0; font-size: 7px; font-weight: 800; font-variant-numeric: tabular-nums; }
.draft-cell.is-current { z-index: 1; background: rgba(216, 255, 79, .28) !important; box-shadow: inset 0 0 0 2px var(--lime-dark), 0 0 0 1px var(--lime-dark); }
.draft-cell.is-current::after { content: "ON CLOCK"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #668000; font-size: 8px; font-weight: 900; letter-spacing: .12em; white-space: nowrap; }

.pick-card { height: 52px; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: 1fr 1fr; column-gap: 6px; align-items: center; padding: 5px 6px 5px 5px; background: #fff; border: 1px solid rgba(16, 32, 38, .11); border-left: 4px solid var(--position-color); border-radius: 8px; box-shadow: 0 2px 5px rgba(13, 27, 32, .05); }
.pick-card .position-badge { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; color: var(--navy-950); background: color-mix(in srgb, var(--position-color) 66%, white); border-radius: 7px; font-size: 8px; font-weight: 900; }
.pick-name { align-self: end; overflow: hidden; padding-right: 11px; font-size: 10px; font-weight: 850; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.pick-meta { align-self: start; color: #7b8788; font-size: 8px; line-height: 1.15; }

.pos-QB { --position-color: var(--qb); }
.pos-RB { --position-color: var(--rb); }
.pos-WR { --position-color: var(--wr); }
.pos-TE { --position-color: var(--te); }
.pos-DST { --position-color: var(--dst); }
.pos-K { --position-color: var(--k); }

.draft-complete { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 13px 15px; color: #eaf4e8; background: var(--navy-800); border-radius: 12px; }
.draft-complete[hidden] { display: none; }
.draft-complete > span { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; color: var(--navy-950); background: var(--lime); border-radius: 50%; font-weight: 900; }
.draft-complete div { min-width: 0; margin-right: auto; }
.draft-complete strong, .draft-complete small { display: block; }
.draft-complete small { margin-top: 1px; color: #adbbbc; font-size: 10px; }
.draft-complete button { padding: 8px 11px; color: var(--navy-950); background: var(--lime); border: 0; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; }

.board-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; color: #889293; font-size: 9px; }

.players-panel {
  position: sticky;
  top: 98px;
  height: calc(100vh - 118px);
  min-height: 590px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f4ef;
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, .08);
}

.players-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px 22px 13px; }
.players-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.players-heading .eyebrow { margin-bottom: 4px; }
.available-count { min-width: 40px; padding: 5px 8px; color: var(--lime); background: rgba(216, 255, 79, .08); border: 1px solid rgba(216, 255, 79, .16); border-radius: 999px; font-size: 11px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }

.pick-instruction { display: flex; align-items: center; gap: 10px; margin: 0 16px 13px; padding: 10px 12px; color: #9fadae; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; font-size: 10px; }
.pick-instruction.is-complete { opacity: .65; }
.pick-instruction strong { display: inline-block; max-width: 225px; overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.pick-instruction > span:nth-child(2) { min-width: 0; margin-right: auto; }
.instruction-number { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--navy-950); background: var(--lime); border-radius: 8px; font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pick-instruction.is-complete .instruction-number { background: #fff; }

.search-box { position: relative; display: flex; align-items: center; margin: 0 16px 12px; }
.search-box svg { position: absolute; left: 12px; width: 16px; fill: none; stroke: #7c8b8d; stroke-width: 1.8; pointer-events: none; }
.search-box input { width: 100%; height: 42px; padding: 0 42px 0 38px; color: #f7f9f4; background: #14272d; border: 1px solid rgba(255, 255, 255, .11); border-radius: 10px; outline: none; }
.search-box input::placeholder { color: #718184; }
.search-box input:focus { border-color: rgba(216, 255, 79, .65); box-shadow: 0 0 0 3px rgba(216, 255, 79, .08); }
.search-box kbd { position: absolute; right: 10px; padding: 2px 6px; color: #758588; background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px; font: 10px inherit; }

.position-filters { display: flex; gap: 5px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.position-filters::-webkit-scrollbar { display: none; }
.position-filters button { flex: 0 0 auto; padding: 6px 8px; color: #8d9b9d; background: transparent; border: 1px solid rgba(255, 255, 255, .1); border-radius: 7px; font-size: 9px; font-weight: 800; cursor: pointer; }
.position-filters button span { margin-left: 2px; opacity: .55; font-size: 8px; }
.position-filters button:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.position-filters button[aria-pressed="true"] { color: var(--navy-950); background: var(--lime); border-color: var(--lime); }

.player-list-labels { display: grid; grid-template-columns: 40px 1fr; padding: 7px 22px; color: #66777a; border-top: 1px solid rgba(255, 255, 255, .07); border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.player-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #344b51 transparent; scrollbar-width: thin; }

.player-row { position: relative; width: 100%; min-height: 56px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 0; padding: 7px 42px 7px 20px; color: #eff3ee; background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .065); text-align: left; cursor: pointer; transition: background .13s ease, padding-left .13s ease; }
.player-row:hover, .player-row:focus-visible { z-index: 1; padding-left: 23px; background: #193139; outline-offset: -2px; }
.player-row:disabled { cursor: not-allowed; opacity: .52; }
.player-row:disabled:hover { padding-left: 20px; background: transparent; }
.player-row:disabled::after { display: none; }
.player-row::after { content: "+"; position: absolute; right: 8px; top: 50%; width: 18px; height: 18px; display: grid; place-items: center; transform: translateY(-50%) scale(.8); color: var(--navy-950); background: var(--lime); border-radius: 50%; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .13s ease, transform .13s ease; }
.player-row:hover::after, .player-row:focus-visible::after { opacity: 1; transform: translateY(-50%) scale(1); }
.player-rank { color: #718286; font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; }
.player-main { min-width: 0; padding-right: 8px; }
.player-main strong { display: block; overflow: hidden; font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.player-main small { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #7e8f91; font-size: 8px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.mini-position { min-width: 27px; padding: 2px 4px; color: var(--navy-950); background: var(--position-color); border-radius: 4px; font-size: 7px; font-weight: 900; text-align: center; }
.empty-state { flex: 1; display: grid; place-content: center; justify-items: center; padding: 30px; color: #7c8d8f; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state svg { width: 30px; margin-bottom: 8px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.empty-state strong { color: #b5c0c1; font-size: 12px; }
.empty-state span { margin-top: 3px; font-size: 10px; }

.players-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; color: #6f8183; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 8px; }
.players-footer span { display: flex; align-items: center; gap: 5px; }
.players-footer i { width: 6px; height: 6px; background: #62ce79; border-radius: 50%; }
.players-footer i.is-connecting { background: #e8bb4b; animation: pulse 1.2s infinite; }
.players-footer i.is-offline { background: var(--red); }
.connection-status { min-width: 0; }
.connection-status b { overflow: hidden; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.players-footer button { padding: 5px 7px; color: #a2b0b2; background: transparent; border: 1px solid rgba(255, 255, 255, .1); border-radius: 6px; font-size: 8px; cursor: pointer; }
.players-footer button:hover { color: #fff; border-color: rgba(255, 255, 255, .25); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 11px 15px; color: #f4f7f1; background: var(--navy-950); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; box-shadow: 0 14px 45px rgba(0, 0, 0, .26); font-size: 11px; font-weight: 650; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.setup-dialog {
  width: min(760px, calc(100vw - 28px));
  max-width: none;
  max-height: none;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  overflow: visible;
}
.setup-dialog::backdrop { background: rgba(5, 14, 17, .76); backdrop-filter: blur(8px); }
.setup-dialog[open] { animation: setup-in .22s ease-out; }
.setup-card { max-height: calc(100vh - 32px); overflow-y: auto; background: var(--cream-50); border: 1px solid rgba(255, 255, 255, .24); border-radius: 22px; box-shadow: 0 30px 100px rgba(0, 0, 0, .42); scrollbar-color: #b9b3a7 transparent; }
.setup-header { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 17px; padding: 28px 30px 24px; color: #f4f7ef; background: radial-gradient(circle at 85% 0, rgba(216, 255, 79, .13), transparent 17rem), var(--navy-900); }
.setup-mark { width: 58px; height: 58px; display: grid; place-items: center; color: var(--lime); background: rgba(216, 255, 79, .08); border: 1px solid rgba(216, 255, 79, .24); border-radius: 17px; }
.setup-mark svg { width: 42px; height: 42px; }
.setup-eyebrow { margin: 0 0 6px; color: var(--lime); font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.setup-header h2 { margin: 0; font-size: clamp(25px, 4vw, 36px); line-height: 1.04; letter-spacing: -.04em; }
.setup-header p:last-child { max-width: 560px; margin: 8px 0 0; color: #9eadaf; font-size: 11px; }
.setup-format { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 11px 20px; color: #697678; background: #ebe8df; border-bottom: 1px solid var(--cream-300); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.setup-format span { display: flex; align-items: baseline; gap: 4px; }
.setup-format b { color: var(--navy-900); font-size: 13px; }
.setup-format i { color: var(--lime-dark); font-size: 13px; font-style: normal; font-weight: 900; }
.setup-dialog form { padding: 22px 28px 26px; }
.setup-team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.setup-team-field { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; background: #fff; border: 1px solid var(--cream-300); border-radius: 11px; transition: border-color .15s ease, box-shadow .15s ease; }
.setup-team-field:focus-within { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(169, 216, 0, .13); }
.setup-slot { width: 32px; height: 32px; display: grid; place-items: center; color: #657275; background: var(--cream-100); border: 1px solid var(--cream-200); border-radius: 8px; font-size: 9px; font-weight: 900; font-variant-numeric: tabular-nums; }
.setup-team-copy { min-width: 0; }
.setup-team-copy small { display: block; margin-bottom: 1px; color: #879193; font-size: 7px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.setup-team-copy input { width: 100%; padding: 0 0 4px; color: var(--navy-900); background: transparent; border: 0; border-bottom: 1px solid var(--cream-200); outline: 0; font-size: 13px; font-weight: 800; }
.setup-assignee-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; margin-top: 6px; color: #788486; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.setup-assignee-row select { min-width: 0; width: 100%; height: 28px; padding: 0 24px 0 7px; color: var(--navy-900); background: var(--cream-50); border: 1px solid var(--cream-300); border-radius: 7px; font-size: 8px; font-weight: 750; letter-spacing: 0; text-transform: none; outline: none; }
.setup-assignee-row select:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 2px rgba(169, 216, 0, .12); }
.setup-assignment-help { margin: 9px 2px 0; color: #7a8688; font-size: 8px; line-height: 1.45; }
.setup-timer-field { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 11px; padding: 10px 11px; background: var(--cream-100); border: 1px solid var(--cream-300); border-radius: 11px; }
.setup-timer-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--navy-800); background: rgba(216, 255, 79, .48); border: 1px solid rgba(169, 216, 0, .38); border-radius: 9px; }
.setup-timer-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.setup-timer-copy { min-width: 0; }
.setup-timer-copy label { display: block; color: var(--navy-900); font-size: 11px; font-weight: 850; }
.setup-timer-copy small { display: block; margin-top: 2px; color: #7d898b; font-size: 8px; }
.setup-timer-field select { min-width: 150px; height: 36px; padding: 0 31px 0 10px; color: var(--navy-900); background: #fff; border: 1px solid var(--cream-300); border-radius: 8px; font-size: 10px; font-weight: 750; outline: none; cursor: pointer; }
.setup-timer-field select:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(169, 216, 0, .12); }
.setup-message { min-height: 17px; margin: 13px 1px 0; color: #7a8688; font-size: 9px; }
.setup-message.is-warning { color: #ad4c3f; font-weight: 700; }
.setup-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--cream-200); }
.setup-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border-radius: 10px; font-size: 11px; font-weight: 800; cursor: pointer; }
.setup-button[hidden] { display: none; }
.setup-button--secondary { color: #647174; background: transparent; border: 1px solid var(--cream-300); }
.setup-button--secondary:hover { color: var(--navy-900); background: var(--cream-100); }
.setup-button--primary { color: var(--navy-950); background: var(--lime); border: 1px solid var(--lime-dark); box-shadow: 0 6px 18px rgba(169, 216, 0, .2); }
.setup-button--primary:hover { background: #e3ff7b; }
.setup-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.access-dialog {
  width: min(510px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #566568 transparent;
  scrollbar-width: thin;
}
.access-dialog::backdrop { background: rgba(5, 14, 17, .82); backdrop-filter: blur(9px); }
.access-dialog[open] { animation: setup-in .2s ease-out; }
.access-card { overflow: hidden; background: var(--cream-50); border: 1px solid rgba(255, 255, 255, .22); border-radius: 20px; box-shadow: 0 28px 90px rgba(0, 0, 0, .46); }
.access-header { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 15px; padding: 25px 26px 23px; color: #f4f7ef; background: radial-gradient(circle at 88% 0, rgba(216, 255, 79, .13), transparent 14rem), var(--navy-900); }
.access-header--compact { grid-template-columns: 46px minmax(0, 1fr); padding-block: 20px; }
.access-football { width: 54px; height: 54px; display: grid; place-items: center; background: rgba(216, 255, 79, .08); border: 1px solid rgba(216, 255, 79, .22); border-radius: 15px; }
.access-football svg { width: 40px; height: 40px; }
.access-header p { margin: 0 0 5px; color: var(--lime); font-size: 8px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.access-header h2 { margin: 0; font-size: 27px; line-height: 1.05; letter-spacing: -.035em; }
.access-header > div > span { display: block; margin-top: 6px; color: #9eadaf; font-size: 10px; }
.access-header > div > span strong { color: #fff; }
.access-body { padding: 22px 24px 24px; }
.access-field { display: block; margin-bottom: 13px; }
.access-field > span { display: block; margin: 0 0 5px 2px; color: #657275; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.access-field input { width: 100%; height: 46px; padding: 0 13px; color: var(--navy-900); background: #fff; border: 1px solid var(--cream-300); border-radius: 10px; outline: none; }
.access-field input:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(169, 216, 0, .13); }
.access-field input::placeholder { color: #9ba4a4; }
.access-note, .room-help { margin: 2px 2px 0; color: #7a8688; font-size: 9px; line-height: 1.45; }
.access-message { min-height: 18px; margin: 10px 2px 0; color: #b04436; font-size: 9px; font-weight: 700; }
.access-primary, .access-secondary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border-radius: 10px; font-size: 10px; font-weight: 850; cursor: pointer; }
.access-primary { width: 100%; color: var(--navy-950); background: var(--lime); border: 1px solid var(--lime-dark); box-shadow: 0 6px 18px rgba(169, 216, 0, .18); }
.access-primary:hover:not(:disabled) { background: #e3ff7b; }
.access-primary:disabled { cursor: wait; opacity: .65; }
.access-primary svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.access-primary--small { width: auto; min-width: 84px; }
.access-secondary { color: #647174; background: transparent; border: 1px solid var(--cream-300); }
.access-secondary:hover { color: var(--navy-900); background: var(--cream-100); }
.access-secondary--danger { color: #a64a3d; margin-right: auto; }
.room-dialog { width: min(630px, calc(100vw - 24px)); }
.room-avatar { width: 46px; height: 46px; display: grid; place-items: center; color: var(--navy-950); background: var(--lime); border-radius: 13px; font-size: 17px; font-weight: 900; text-transform: uppercase; }
.room-help { margin-bottom: 14px; }
.team-claim-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-claim-card { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 31px minmax(0, 1fr) minmax(105px, 135px); align-items: center; gap: 9px; padding: 8px 9px; color: var(--navy-900); background: #fff; border: 1px solid var(--cream-300); border-radius: 10px; text-align: left; }
.team-claim-card.is-yours { background: rgba(216, 255, 79, .18); border-color: var(--lime-dark); }
.team-claim-card.is-current { box-shadow: inset 3px 0 0 var(--red); }
.claim-slot { width: 30px; height: 30px; display: grid; place-items: center; color: #687578; background: var(--cream-100); border-radius: 7px; font-size: 8px; font-weight: 900; }
.claim-copy { min-width: 0; }
.claim-copy strong, .claim-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.claim-copy strong { font-size: 10px; }
.claim-copy small { margin-top: 2px; color: #859092; font-size: 7px; }
.claim-state { color: #708000; font-size: 7px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.claim-assignee { min-width: 0; width: 100%; height: 31px; padding: 0 24px 0 7px; color: var(--navy-900); background: var(--cream-50); border: 1px solid var(--cream-300); border-radius: 7px; font-size: 8px; font-weight: 750; outline: none; cursor: pointer; }
.claim-assignee:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 2px rgba(169, 216, 0, .12); }
.room-actions { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--cream-200); }

@keyframes setup-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.print-sheet { display: none; }

@media (max-width: 1380px) {
  .topbar { grid-template-columns: 1fr auto; }
  .on-clock { grid-column: 1 / -1; grid-row: 2; width: min(650px, 100%); justify-self: center; }
  .topbar { padding-top: 10px; padding-bottom: 10px; }
  .players-panel { top: 148px; height: calc(100vh - 168px); }
}

@media (max-width: 1040px) {
  .workspace { display: flex; flex-direction: column; }
  .players-panel { position: relative; top: auto; order: -1; width: 100%; height: min(720px, calc(100vh - 175px)); min-height: 500px; }
  .board-panel { width: 100%; }
  .player-list { max-height: 440px; }
}

@media (max-width: 720px) {
  .topbar { position: relative; display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .brand { flex: 1; }
  .brand small, .action-button kbd, .action-button > span { display: none; }
  .on-clock { order: 3; width: 100%; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; }
  .pick-timer { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0 0; border-top: 1px solid rgba(9, 21, 25, .17); border-left: 0; }
  .timer-setting-row { flex: 1; justify-content: flex-start; }
  .timer-setting-row select { width: 90px; }
  .timer-countdown { min-width: 105px; margin-top: 0; }
  .top-actions { gap: 6px; }
  .action-button { width: 40px; padding: 0; }
  .action-button--primary { width: auto; padding: 0 12px; }
  .action-button--primary > span { display: inline; }
  .workspace { padding: 12px 8px 26px; gap: 12px; }
  .players-panel { height: 620px; min-height: 0; border-radius: 14px; }
  .board-panel { padding: 16px 10px; border-radius: 14px; }
  .board-heading { align-items: flex-start; }
  .league-facts { display: none; }
  .board-heading h1 { font-size: 25px; }
  .board-subtitle { max-width: 320px; }
  .board-help > span:first-child { width: 100%; margin-right: 0; }
  .board-footer { display: block; }
  .board-footer span { display: block; margin-top: 4px; }
  .draft-complete { align-items: flex-start; flex-wrap: wrap; }
  .draft-complete button { margin-left: 44px; }
  .setup-dialog { width: min(100% - 16px, 760px); }
  .setup-card { max-height: calc(100vh - 16px); border-radius: 16px; }
  .setup-header { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 20px 18px 18px; }
  .setup-mark { width: 44px; height: 44px; border-radius: 13px; }
  .setup-mark svg { width: 29px; }
  .setup-header h2 { font-size: 25px; }
  .setup-header p:last-child { font-size: 10px; }
  .setup-format { gap: 8px; padding-inline: 10px; }
  .setup-dialog form { padding: 16px 14px 18px; }
  .setup-team-grid { grid-template-columns: 1fr; gap: 7px; }
  .setup-team-field { padding-block: 6px; }
  .setup-timer-field { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; }
  .setup-timer-icon { width: 32px; height: 32px; }
  .setup-timer-field select { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .setup-actions { flex-direction: column-reverse; }
  .setup-button { width: 100%; }
  .access-dialog { width: min(100% - 16px, 510px); }
  .room-dialog { width: min(100% - 16px, 630px); }
  .access-header { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 20px 18px 18px; }
  .access-football { width: 44px; height: 44px; border-radius: 13px; }
  .access-football svg { width: 33px; height: 33px; }
  .access-header h2 { font-size: 23px; }
  .access-body { padding: 17px 15px 18px; }
  .team-claim-grid { grid-template-columns: 1fr; }
  .room-actions { flex-wrap: wrap; }
  .access-secondary--danger { order: 3; width: 100%; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  @page { size: landscape; margin: .28in; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { width: auto; min-width: 0; background: #fff !important; }
  .app-shell, .toast, .setup-dialog, .access-dialog { display: none !important; }
  .print-sheet { display: block; color: #142328; font-family: Arial, Helvetica, sans-serif; }
  .print-sheet > header { height: .44in; display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: .07in; border-bottom: 2px solid #142328; }
  .print-sheet > header small { display: block; color: #667276; font-size: 6.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .print-sheet > header h2 { margin: .015in 0 0; font-size: 16pt; line-height: 1; letter-spacing: -.03em; }
  .print-sheet > header div:last-child { text-align: right; }
  .print-sheet > header strong, .print-sheet > header span { display: block; }
  .print-sheet > header strong { font-size: 7.5pt; }
  .print-sheet > header span { margin-top: .025in; color: #778184; font-size: 6.5pt; }
  .print-sheet table { width: 100%; height: 6.88in; table-layout: fixed; border-spacing: 0; border-collapse: collapse; margin-top: .07in; }
  .print-sheet th, .print-sheet td { border: .5pt solid #b7b8b3; }
  .print-sheet thead th { height: .39in; padding: .035in; background: #e8e9e2; font-size: 7pt; text-align: center; }
  .print-sheet thead th:first-child { width: .36in; color: #687478; font-size: 5.5pt; letter-spacing: .08em; text-transform: uppercase; }
  .print-sheet tbody tr { height: .4in; }
  .print-sheet .print-round { width: .36in; padding: 0; color: #5d696d; background: #f0f0eb; font-size: 6pt; font-weight: 800; text-align: center; }
  .print-sheet .print-cell { position: relative; padding: .025in .035in .02in .06in; background: #fff; border-left: 3pt solid var(--position-color, #d8d9d4); vertical-align: middle; }
  .print-sheet .print-cell.empty { border-left-color: #d8d9d4; }
  .print-sheet .print-pick { position: absolute; top: .018in; right: .025in; color: #a5aaab; font-size: 4.5pt; font-weight: 700; }
  .print-sheet .print-player { display: block; max-width: 100%; overflow: hidden; padding-right: .16in; font-size: 6.4pt; font-weight: 800; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
  .print-sheet .print-meta { display: block; margin-top: .018in; color: #697578; font-size: 5pt; font-weight: 600; line-height: 1; }
  .print-sheet > footer { margin-top: .045in; color: #747d7f; font-size: 5.5pt; text-align: right; }
}
