:root {
  color-scheme: dark;
  --ink-0: #f7f9ff;
  --ink-1: #d9e1f2;
  --ink-2: #a7b3ca;
  --ink-3: #8391ab;
  --night-0: #070b14;
  --night-1: #0b1220;
  --night-2: #101a2c;
  --night-3: #152033;
  --night-4: #1d2a40;
  --night-5: #263650;
  --line: rgba(140, 165, 210, 0.18);
  --line-strong: rgba(140, 165, 210, 0.3);
  --control-line: rgba(140, 165, 210, 0.42);
  --aqua: #2dd4bf;
  --aqua-soft: rgba(45, 212, 191, 0.13);
  --lime: #b9f36b;
  --lime-soft: rgba(185, 243, 107, 0.13);
  --violet: #9e8cff;
  --violet-soft: rgba(158, 140, 255, 0.14);
  --amber: #f2b84b;
  --amber-soft: rgba(242, 184, 75, 0.14);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.13);
  --position-qb-ink: #ff9cac;
  --position-qb-border: rgba(255, 113, 132, 0.34);
  --position-qb-fill: rgba(255, 113, 132, 0.18);
  --position-rb-ink: #5bd9ff;
  --position-rb-border: rgba(56, 189, 248, 0.34);
  --position-rb-fill: rgba(56, 189, 248, 0.17);
  --position-wr-ink: #b9f36b;
  --position-wr-border: rgba(163, 230, 53, 0.34);
  --position-wr-fill: rgba(163, 230, 53, 0.16);
  --position-te-ink: #c2b6ff;
  --position-te-border: rgba(167, 139, 250, 0.36);
  --position-te-fill: rgba(167, 139, 250, 0.18);
  --position-k-ink: #ffd166;
  --position-k-border: rgba(250, 204, 21, 0.36);
  --position-k-fill: rgba(250, 204, 21, 0.17);
  --position-def-ink: #8db5ff;
  --position-def-border: rgba(59, 130, 246, 0.38);
  --position-def-fill: rgba(59, 130, 246, 0.19);
  --position-idp-ink: #ffad66;
  --position-idp-border: rgba(249, 115, 22, 0.4);
  --position-idp-fill: rgba(249, 115, 22, 0.2);
  --shadow-soft: 0 16px 50px rgba(0, 0, 0, 0.28);
  --shadow-hard: 0 22px 70px rgba(0, 0, 0, 0.46);
  --radius-xs: 0.45rem;
  --radius-sm: 0.7rem;
  --radius-md: 1rem;
  --radius-lg: 1.35rem;
  --global-header-height: 4.5rem;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  background: var(--night-0);
  font-size: clamp(17px, 0.95vw, 18.5px);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink-1);
  background:
    radial-gradient(circle at 12% -10%, rgba(63, 105, 180, 0.22), transparent 29rem),
    radial-gradient(circle at 96% 4%, rgba(82, 216, 255, 0.08), transparent 25rem),
    linear-gradient(145deg, var(--night-0), #070b15 48%, #050810);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button,
input,
select {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
ol,
ul {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-0);
  letter-spacing: -0.025em;
}

strong {
  color: var(--ink-0);
}

[hidden] {
  display: none !important;
}

::selection {
  color: #07101a;
  background: var(--aqua);
}

::-webkit-scrollbar {
  width: 0.68rem;
  height: 0.68rem;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 0.18rem solid transparent;
  border-radius: 1rem;
  background: rgba(151, 169, 202, 0.3);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(151, 169, 202, 0.5);
  background-clip: padding-box;
}

:focus-visible {
  outline: 0.16rem solid var(--aqua);
  outline-offset: 0.18rem;
}

[tabindex="-1"]:focus {
  outline: none;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: #041019;
  background: var(--aqua);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.global-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--global-header-height);
  padding: 0.75rem clamp(1rem, 2.3vw, 2.3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 17, 0.82);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand,
.brand-copy,
.global-header-actions,
.data-status {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.72rem;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 184, 75, 0.58);
  border-radius: 50%;
  background: #080808;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 1rem rgba(242, 184, 75, 0.12);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.brand-copy {
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.08;
}

.brand-name {
  color: var(--ink-0);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-league {
  margin-top: 0.24rem;
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.global-header-actions {
  gap: 0.7rem;
}

.button-label-short {
  display: none;
}

.data-status {
  gap: 0.55rem;
  padding-right: 0.7rem;
  border-right: 1px solid var(--line);
  line-height: 1.15;
}

.data-status > span:last-child {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.status-dot {
  position: relative;
  width: 0.52rem;
  height: 0.52rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0.22rem rgba(185, 243, 107, 0.08), 0 0 0.9rem rgba(185, 243, 107, 0.5);
}

.data-status-label {
  color: var(--ink-1);
  font-size: 0.76rem;
  font-weight: 750;
}

.data-status-detail {
  margin-top: 0.17rem;
  color: var(--ink-3);
  font-size: 0.68rem;
}

.main-content {
  min-height: calc(100dvh - var(--global-header-height));
}

.screen {
  width: 100%;
}

.review-screen {
  width: min(94rem, 100%);
  margin-inline: auto;
  padding: clamp(0.7rem, 1.2vw, 1.2rem) clamp(1rem, 2.3vw, 2.3rem) 2.25rem;
}

.review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4.8rem);
  align-items: center;
  min-height: 0;
  padding-block: clamp(0.35rem, 1vw, 0.8rem) clamp(0.75rem, 1.4vw, 1.3rem);
}

.review-hero-copy {
  max-width: 53rem;
}

.eyebrow,
.section-kicker {
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 1.25rem;
  color: var(--aqua);
}

.eyebrow-pulse {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0.3rem rgba(89, 216, 255, 0.1);
}

.review-hero h1 {
  max-width: 13ch;
  margin-bottom: 0.75rem;
  font-size: clamp(2.35rem, 4.8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.hero-summary {
  max-width: 49rem;
  margin-bottom: 1.6rem;
  color: var(--ink-2);
  font-size: clamp(0.98rem, 1.4vw, 1.12rem);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-meta span,
.context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 99rem;
  color: var(--ink-2);
  background: rgba(13, 20, 36, 0.7);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.simulation-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.05rem, 1.6vw, 1.4rem);
  border: 1px solid rgba(89, 216, 255, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(89, 216, 255, 0.08), transparent 44%),
    rgba(11, 17, 32, 0.9);
  box-shadow: var(--shadow-hard);
}

.simulation-card::before {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 13rem;
  height: 13rem;
  border: 1px solid rgba(89, 216, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 1.7rem rgba(89, 216, 255, 0.025),
    0 0 0 3.5rem rgba(89, 216, 255, 0.018);
  content: "";
}

.simulation-card > * {
  position: relative;
}

.simulation-card-topline {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-kicker {
  margin-bottom: 0.38rem;
}

.simulation-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.simulation-badge {
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(89, 216, 255, 0.25);
  border-radius: 99rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulation-badge::before {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.65rem currentColor;
  content: "";
}

.simulation-progress {
  display: block;
  width: 100%;
  height: 0.44rem;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  background: var(--night-4);
  appearance: none;
}

.simulation-progress::-webkit-progress-bar {
  border-radius: 1rem;
  background: var(--night-4);
}

.simulation-progress::-webkit-progress-value {
  border-radius: 1rem;
  background: linear-gradient(90deg, var(--violet), var(--aqua));
  box-shadow: 0 0 1rem rgba(89, 216, 255, 0.38);
  transition: width 420ms ease;
}

.simulation-progress::-moz-progress-bar {
  border-radius: 1rem;
  background: linear-gradient(90deg, var(--violet), var(--aqua));
}

.simulation-detail {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  color: var(--ink-2);
  font-size: 0.78rem;
}

.simulation-detail span:last-child {
  color: var(--ink-0);
  font-family: var(--font-mono);
  font-weight: 800;
}

.simulation-phases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.simulation-phases span {
  position: relative;
  padding-top: 0.7rem;
  color: var(--ink-3);
  font-size: 0.62rem;
  font-weight: 750;
  text-align: center;
}

.simulation-phases span::before {
  position: absolute;
  top: -1.24rem;
  left: 50%;
  width: 0.36rem;
  height: 0.36rem;
  border: 0.13rem solid var(--night-4);
  border-radius: 50%;
  background: var(--night-3);
  content: "";
  transform: translateX(-50%);
}

.simulation-phases .is-complete {
  color: var(--ink-2);
}

.simulation-phases .is-complete::before {
  border-color: rgba(185, 243, 107, 0.25);
  background: var(--lime);
}

.simulation-phases .is-active {
  color: var(--aqua);
}

.simulation-phases .is-active::before {
  border-color: rgba(89, 216, 255, 0.28);
  background: var(--aqua);
  box-shadow: 0 0 0.7rem rgba(89, 216, 255, 0.7);
}

.data-freshness-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.58rem 0.8rem;
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  background: rgba(45, 212, 191, 0.055);
  font-size: 0.7rem;
}

.data-freshness-banner > div {
  display: flex;
  min-width: 0;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.data-freshness-banner strong {
  color: var(--aqua);
  font-size: 0.7rem;
}

.freshness-mark {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0.22rem rgba(45, 212, 191, 0.08), 0 0 0.8rem rgba(45, 212, 191, 0.42);
}

.freshness-date {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  white-space: nowrap;
}

.review-workspace {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(9, 14, 27, 0.77);
  box-shadow: var(--shadow-soft);
}

.review-workspace-header {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.9rem clamp(0.9rem, 1.4vw, 1.2rem) 0.75rem;
}

.review-workspace-header h2 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.review-run-id {
  margin-bottom: 0.15rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0 clamp(0.9rem, 1.4vw, 1.2rem);
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(4, 7, 15, 0.64);
}

.segmented-tab {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  color: var(--ink-3);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.segmented-tab:hover {
  color: var(--ink-1);
  background: rgba(255, 255, 255, 0.025);
}

.segmented-tab.is-active,
.segmented-tab[aria-selected="true"] {
  border-color: rgba(89, 216, 255, 0.2);
  color: var(--ink-0);
  background: linear-gradient(145deg, rgba(89, 216, 255, 0.1), rgba(158, 140, 255, 0.07));
  box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.2);
}

.tab-step {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.tab-count {
  display: inline-grid;
  min-width: 1.45rem;
  min-height: 1.45rem;
  padding-inline: 0.35rem;
  place-items: center;
  border-radius: 99rem;
  color: var(--ink-2);
  background: var(--night-4);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.tab-count--ready {
  color: var(--lime);
  background: var(--lime-soft);
}

.review-panels {
  padding: clamp(0.8rem, 1.2vw, 1.15rem);
}

.review-panel {
  animation: panel-in 240ms ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(0.3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 6.1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(14, 22, 40, 0.62);
}

.metric-card--user {
  border-color: rgba(185, 243, 107, 0.2);
  background: linear-gradient(145deg, rgba(185, 243, 107, 0.075), rgba(14, 22, 40, 0.65));
}

.metric-label,
.metric-note {
  display: block;
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 720;
}

.metric-label {
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-mono);
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1;
}

.metric-value--aqua {
  color: var(--aqua);
}

.metric-value--lime {
  color: var(--lime);
}

.review-grid,
.keeper-draft-layout,
.setup-grid {
  display: grid;
  gap: 0.65rem;
}

.review-grid--keepers {
  grid-template-columns: minmax(22rem, 1.15fr) minmax(19rem, 0.95fr) minmax(18rem, 0.9fr);
}

.keeper-draft-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
}

.setup-grid {
  grid-template-columns: 1.15fr 0.85fr 0.9fr;
}

.surface-card {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(14, 21, 38, 0.7);
}

.surface-card--table {
  padding-bottom: 0;
}

.surface-card-header {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.surface-card-header h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.context-chip--aqua {
  border-color: rgba(89, 216, 255, 0.22);
  color: var(--aqua);
  background: var(--aqua-soft);
}

.review-table-wrap {
  max-height: 23rem;
  overflow: auto;
  margin-inline: -1.05rem;
}

.review-table,
.player-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.review-table th,
.review-table td {
  height: 2.85rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.review-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: var(--ink-3);
  background: #0d1425;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-table tbody tr {
  transition: background 150ms ease;
}

.review-table tbody tr:hover {
  background: rgba(89, 216, 255, 0.035);
}

.review-table tbody tr.is-user-team {
  background: var(--lime-soft);
}

.review-table .team-cell {
  color: var(--ink-0);
  font-weight: 750;
}

.review-table .positive-value {
  color: var(--lime);
  font-family: var(--font-mono);
}

.loading-row td {
  height: 8rem !important;
  color: var(--ink-3);
  text-align: center !important;
}

.no-player-results-copy {
  display: flex;
  max-width: 24rem;
  gap: 0.4rem;
  align-items: center;
  margin-inline: auto;
  flex-direction: column;
}

.no-player-results-copy strong {
  color: var(--ink-1);
  font-size: 0.85rem;
}

.no-player-results-copy span {
  font-size: 0.68rem;
}

.no-player-results-copy .button {
  min-height: 2.75rem;
  margin-top: 0.35rem;
}

.inline-loader {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.45rem;
  border: 0.12rem solid var(--line-strong);
  border-top-color: var(--aqua);
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.user-keeper-card,
.keeper-pool-card {
  align-self: start;
}

.user-keeper-card {
  background:
    linear-gradient(145deg, rgba(185, 243, 107, 0.055), transparent 48%),
    rgba(14, 21, 38, 0.74);
}

.keeper-pool-card {
  background:
    linear-gradient(145deg, rgba(89, 216, 255, 0.045), transparent 48%),
    rgba(14, 21, 38, 0.72);
}

.review-grid--keepers .review-table-wrap {
  max-height: 18.5rem;
}

.keeper-review-card-header {
  align-items: end;
}

.keeper-team-picker {
  display: grid;
  width: min(14.5rem, 100%);
  gap: 0.3rem;
}

.keeper-team-picker > span {
  color: var(--ink-3);
  font-size: 0.6rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.keeper-team-picker select {
  width: 100%;
  height: 2.25rem;
  padding: 0.38rem 2rem 0.38rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  outline: none;
  color: var(--ink-0);
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%) calc(100% - 0.85rem) 50% / 0.32rem 0.32rem no-repeat,
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%) calc(100% - 0.63rem) 50% / 0.32rem 0.32rem no-repeat,
    rgba(6, 10, 21, 0.72);
  font: 720 0.72rem/1 var(--font-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
}

.keeper-team-picker select:focus-visible {
  border-color: var(--aqua);
  box-shadow: 0 0 0 0.18rem rgba(89, 216, 255, 0.13);
}

.keeper-review-section {
  min-width: 0;
}

.keeper-review-section + .keeper-review-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.keeper-review-section-heading {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.62rem;
}

.keeper-review-section-heading span:not(.context-chip) {
  display: block;
  margin-bottom: 0.14rem;
  color: var(--ink-3);
  font-size: 0.59rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.keeper-review-section-heading strong {
  color: var(--ink-0);
  font-size: 0.78rem;
}

.team-monogram {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(185, 243, 107, 0.22);
  border-radius: 0.68rem;
  color: var(--lime);
  background: var(--lime-soft);
  font-size: 0.66rem;
  font-weight: 900;
}

.keeper-chip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keeper-chip-list li:not(.skeleton-line) {
  overflow: hidden;
  padding: 0.5rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--ink-2);
  background: rgba(6, 10, 21, 0.42);
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-chip-list .keeper-review-empty {
  grid-column: 1 / -1;
  color: var(--ink-3);
  font-weight: 650;
  white-space: normal;
}

.keeper-pool-list {
  display: grid;
  max-height: 15rem;
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  list-style: none;
  scrollbar-color: rgba(89, 216, 255, 0.34) transparent;
}

.keeper-pool-list li {
  display: flex;
  min-width: 0;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.62rem 0.68rem;
  background: rgba(6, 10, 21, 0.32);
}

.keeper-pool-list li + li {
  border-top: 1px solid var(--line);
}

.keeper-pool-list li > div {
  min-width: 0;
}

.keeper-pool-list strong,
.keeper-pool-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-pool-list strong {
  color: var(--ink-1);
  font-size: 0.73rem;
}

.keeper-pool-list span {
  margin-top: 0.17rem;
  color: var(--ink-3);
  font-size: 0.62rem;
}

.keeper-pool-list small {
  flex: 0 0 auto;
  max-width: 8.5rem;
  padding: 0.22rem 0.38rem;
  border-radius: 999px;
  color: var(--ink-3);
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.56rem;
  font-weight: 760;
  line-height: 1.25;
  text-align: right;
}

.keeper-pool-list small.is-keeper-drafted {
  color: var(--aqua);
  background: var(--aqua-soft);
}

.keeper-pool-list .keeper-review-empty {
  color: var(--ink-3);
  font-size: 0.68rem;
  line-height: 1.45;
}

.skeleton-line {
  height: 2rem;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.025) 20%,
    rgba(255, 255, 255, 0.065) 40%,
    rgba(255, 255, 255, 0.025) 60%
  );
  background-size: 220% 100%;
  animation: shimmer 1.6s ease infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

.card-insight {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(89, 216, 255, 0.14);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: var(--aqua-soft);
}

.card-insight p {
  margin-bottom: 0;
  font-size: 0.69rem;
  line-height: 1.55;
}

.insight-mark {
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(89, 216, 255, 0.3);
  border-radius: 50%;
  color: var(--aqua);
  font-family: Georgia, serif;
  font-size: 0.7rem;
  font-weight: 800;
}

.card-insight--warning {
  border-color: rgba(255, 201, 107, 0.18);
  background: var(--amber-soft);
}

.card-insight--warning .insight-mark {
  border-color: rgba(255, 201, 107, 0.35);
  color: var(--amber);
  font-family: var(--font-sans);
}

.keeper-draft-flow {
  min-height: 19rem;
}

.keeper-draft-pick {
  display: grid;
  grid-template-columns: 2rem minmax(8rem, 0.75fr) minmax(8rem, 0.9fr) minmax(12rem, 1.35fr);
  gap: 0.8rem;
  align-items: center;
  min-height: 3.45rem;
  padding: 0.55rem 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.73rem;
}

.keeper-draft-pick-number {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-weight: 800;
}

.keeper-draft-pick-team,
.keeper-draft-pick-player {
  overflow: hidden;
  color: var(--ink-0);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-draft-pick-reason {
  color: var(--ink-3);
}

.review-stats--keeper-draft {
  margin-bottom: 0.8rem;
}

.keeper-draft-summary-card,
.keeper-draft-side-stack {
  min-width: 0;
}

.keeper-draft-summary-card > .surface-intro {
  max-width: 58rem;
  margin: 0 0 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.keeper-draft-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 0.75rem;
}

.keeper-draft-team-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(21, 32, 51, 0.7);
}

.keeper-draft-team-summary.is-user-team {
  border-color: rgba(190, 242, 100, 0.3);
  box-shadow: inset 0 0 0 1px rgba(190, 242, 100, 0.08);
}

.keeper-draft-team-summary > header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 31, 0.38);
}

.keeper-draft-team-summary > header span {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--ink-3);
  font-size: 0.58rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.keeper-draft-team-summary > header h4 {
  margin: 0;
  color: var(--ink-0);
  font-size: 0.88rem;
}

.keeper-draft-team-summary > header > strong {
  display: grid;
  min-width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid rgba(89, 216, 255, 0.24);
  border-radius: 0.65rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.keeper-draft-selection-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keeper-draft-selection {
  display: grid;
  min-width: 0;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
}

.keeper-draft-selection + .keeper-draft-selection {
  border-top: 1px solid var(--line);
}

.keeper-draft-selection-number {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 0.6rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 850;
}

.keeper-draft-selection strong {
  display: block;
  overflow: hidden;
  color: var(--ink-0);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-draft-selection small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-2);
  font-size: 0.66rem;
  line-height: 1.45;
}

.keeper-draft-selection p {
  margin: 0.35rem 0 0;
  color: var(--ink-3);
  font-size: 0.68rem;
  line-height: 1.5;
}

.keeper-draft-empty-summary {
  grid-column: 1 / -1;
  min-height: 15rem;
}

.keeper-draft-side-stack {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.keeper-draft-withdrawal-list {
  display: grid;
  gap: 0.55rem;
}

.keeper-draft-withdrawal {
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(255, 107, 107, 0.16);
  border-radius: var(--radius-sm);
  background: var(--red-soft);
}

.keeper-draft-withdrawal > div {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  justify-content: space-between;
}

.keeper-draft-withdrawal strong {
  color: var(--ink-0);
  font-size: 0.74rem;
}

.keeper-draft-withdrawal span {
  flex: 0 0 auto;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
}

.keeper-draft-withdrawal p,
.keeper-draft-no-withdrawals,
.keeper-draft-exception p {
  margin: 0.3rem 0 0;
  color: var(--ink-3);
  font-size: 0.67rem;
  line-height: 1.5;
}

.keeper-draft-no-withdrawals {
  margin: 0;
}

.keeper-draft-exception {
  margin-top: 0.65rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 201, 107, 0.18);
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
}

.keeper-draft-exception strong {
  color: var(--amber);
  font-size: 0.72rem;
}

.rule-trace {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-trace li {
  display: flex;
  gap: 0.72rem;
  align-items: flex-start;
}

.rule-trace li > span {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--aqua);
  background: var(--night-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 800;
}

.rule-trace p {
  margin: 0.1rem 0 0;
  color: var(--ink-3);
  font-size: 0.72rem;
  line-height: 1.45;
}

.surface-intro {
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.55;
}

.pool-count {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 1.5rem;
}

.position-distribution {
  display: grid;
  gap: 0.63rem;
}

.position-distribution > div {
  display: grid;
  grid-template-columns: 2.6rem minmax(4rem, 1fr) 1.6rem;
  gap: 0.55rem;
  align-items: center;
}

.position-distribution span,
.position-distribution strong {
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.position-distribution span {
  color: var(--ink-2);
}

.position-distribution strong {
  color: var(--ink-0);
  text-align: right;
}

.position-distribution i {
  position: relative;
  height: 0.34rem;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--night-4);
}

.position-distribution i::after {
  display: block;
  width: var(--fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--aqua));
  content: "";
}

.position-distribution .fill-40 { --fill: 40%; }
.position-distribution .fill-54 { --fill: 54%; }
.position-distribution .fill-72 { --fill: 72%; }
.position-distribution .fill-88 { --fill: 88%; }
.position-distribution .fill-100 { --fill: 100%; }

.order-preview {
  min-height: 13rem;
  text-align: center;
}

.order-preview-orbit {
  position: relative;
  display: grid;
  width: 8rem;
  height: 8rem;
  margin: 0.3rem auto 1rem;
  place-items: center;
  border: 1px dashed rgba(158, 140, 255, 0.25);
  border-radius: 50%;
}

.order-preview-orbit::before {
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(89, 216, 255, 0.25);
  border-radius: 50%;
  background: var(--aqua-soft);
  content: "";
}

.order-preview-orbit span {
  position: absolute;
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  background: var(--night-3);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.order-preview-orbit span:nth-child(1) {
  top: -0.35rem;
}

.order-preview-orbit span:nth-child(2) {
  right: -0.35rem;
}

.order-preview-orbit span:nth-child(3) {
  bottom: -0.35rem;
}

.order-preview-orbit span:nth-child(4) {
  left: -0.35rem;
}

.order-preview p {
  margin-bottom: 0;
  color: var(--ink-3);
  font-size: 0.72rem;
  line-height: 1.55;
}

.ready-indicator {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 850;
}

.ready-indicator i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.65rem currentColor;
}

.ready-checks {
  display: grid;
  gap: 0.78rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ready-checks li {
  display: flex;
  gap: 0.6rem;
  color: var(--ink-2);
  font-size: 0.72rem;
}

.ready-checks li span {
  color: var(--lime);
  font-weight: 900;
}

.review-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.1rem, 2vw, 1.7rem);
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 15, 0.38);
}

.review-actions-copy,
.button-row {
  display: flex;
  align-items: center;
}

.review-actions-copy {
  gap: 0.72rem;
}

.review-actions-copy p {
  margin-bottom: 0;
  color: var(--ink-3);
  font-size: 0.7rem;
}

.review-actions-copy strong {
  display: block;
}

.keyboard-hint,
kbd {
  display: inline-grid;
  min-width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-bottom-color: rgba(140, 165, 210, 0.5);
  border-radius: 0.4rem;
  color: var(--ink-2);
  background: var(--night-3);
  box-shadow: 0 0.13rem 0 rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.button-row {
  gap: 0.55rem;
}

.button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.66rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-0.08rem);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.42;
  filter: saturate(0.6);
}

.button--compact {
  min-height: 2.35rem;
  padding: 0.52rem 0.72rem;
  font-size: 0.7rem;
}

.button--primary {
  border-color: rgba(89, 216, 255, 0.65);
  color: #06131c;
  background: linear-gradient(135deg, #7ae2ff, var(--aqua));
  box-shadow: 0 0.45rem 1.5rem rgba(89, 216, 255, 0.14);
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 0.55rem 1.8rem rgba(89, 216, 255, 0.25);
}

.button--secondary,
.button--quiet,
.button--danger-quiet {
  border-color: var(--line);
  color: var(--ink-1);
  background: rgba(18, 27, 47, 0.74);
}

.button--secondary:hover:not(:disabled),
.button--quiet:hover:not(:disabled) {
  border-color: rgba(89, 216, 255, 0.28);
  color: var(--ink-0);
  background: rgba(29, 43, 72, 0.78);
}

.button--danger {
  border-color: rgba(255, 113, 132, 0.5);
  color: #fff4f6;
  background: #b8324b;
}

.button--danger-quiet {
  color: #ffafba;
}

.button--danger-quiet:hover:not(:disabled) {
  border-color: rgba(255, 113, 132, 0.34);
  color: #ffd5da;
  background: var(--red-soft);
}

.button-arrow {
  font-size: 1rem;
  line-height: 1;
}

.button-icon {
  position: relative;
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
}

.button-icon--sync,
.button-icon--rerun {
  border: 0.12rem solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.button-icon--sync::after,
.button-icon--rerun::after {
  position: absolute;
  right: -0.16rem;
  bottom: -0.02rem;
  width: 0;
  height: 0;
  border-top: 0.2rem solid transparent;
  border-bottom: 0.2rem solid transparent;
  border-left: 0.28rem solid currentColor;
  content: "";
  transform: rotate(35deg);
}

.button-icon--export {
  display: block;
  width: 1rem;
  height: 1rem;
  overflow: visible;
}

/* Draft room */
body[data-phase="draft"] {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

html:has(body[data-phase="draft"]) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

.draft-screen:not([hidden]) {
  display: flex;
  height: calc(100vh - var(--global-header-height));
  height: calc(100dvh - var(--global-header-height));
  min-height: calc(100vh - var(--global-header-height));
  min-height: calc(100dvh - var(--global-header-height));
  max-height: calc(100dvh - var(--global-header-height));
  overflow: hidden;
  flex-direction: column;
}

.draft-statusbar {
  display: grid;
  z-index: 20;
  grid-template-columns: minmax(13rem, 1fr) auto minmax(13rem, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 5.75rem;
  padding: 0.8rem clamp(0.85rem, 1.5vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(158, 140, 255, 0.045), transparent 35%, rgba(89, 216, 255, 0.035)),
    rgba(9, 14, 27, 0.88);
  backdrop-filter: blur(16px);
}

.draft-context h1 {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
}

.draft-context-divider {
  color: var(--ink-3);
  font-weight: 400;
}

#pick-label {
  color: var(--ink-2);
  font-weight: 600;
}

.turn-distance-label {
  margin: 0.32rem 0 0;
  color: var(--aqua);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1.2;
}

.turn-distance-label.is-user-turn {
  color: var(--lime);
}

.turn-distance-label[hidden] {
  display: none;
}

.on-clock-card {
  display: flex;
  gap: clamp(0.55rem, 1.25vw, 1rem);
  align-items: center;
  min-width: min(26rem, 36vw);
  padding: 0.65rem 0.9rem 0.65rem 1.05rem;
  border: 1px solid rgba(242, 184, 75, 0.34);
  border-radius: var(--radius-md);
  background:
    linear-gradient(120deg, rgba(242, 184, 75, 0.12), rgba(158, 140, 255, 0.035)),
    var(--night-2);
  box-shadow: 0 0.6rem 2.2rem rgba(0, 0, 0, 0.24);
}

.on-clock-meta {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

#clock-label {
  margin-bottom: 0.15rem;
  color: var(--amber);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#on-clock-team {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-clock {
  min-width: 4ch;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
  text-align: right;
  text-shadow: 0 0 1.2rem rgba(242, 184, 75, 0.34);
}

.force-cpu-pick-button {
  display: inline-flex;
  min-height: 2.35rem;
  flex: 0 0 auto;
  gap: 0.32rem;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(242, 184, 75, 0.38);
  border-radius: 0.65rem;
  color: var(--amber);
  background: rgba(242, 184, 75, 0.09);
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}

.force-cpu-pick-button[hidden] {
  display: none;
}

.force-cpu-pick-button:hover:not(:disabled),
.force-cpu-pick-button:focus-visible {
  border-color: rgba(242, 184, 75, 0.68);
  color: #fff0c8;
  background: rgba(242, 184, 75, 0.17);
}

.force-cpu-pick-button:focus-visible {
  outline: 0.16rem solid var(--amber);
  outline-offset: 0.12rem;
}

.force-cpu-pick-button:disabled {
  cursor: wait;
  opacity: 0.52;
}

.force-cpu-pick-button > span:first-child {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1;
}

.sound-toggle,
.draft-pause-toggle {
  position: relative;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--aqua);
  background: rgba(89, 216, 255, 0.07);
}

.sound-toggle:hover,
.sound-toggle:focus-visible,
.draft-pause-toggle:hover:not(:disabled),
.draft-pause-toggle:focus-visible {
  border-color: rgba(89, 216, 255, 0.5);
  background: rgba(89, 216, 255, 0.14);
}

.sound-toggle-glyph {
  position: relative;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.sound-toggle.is-muted {
  color: var(--ink-3);
  background: rgba(125, 139, 165, 0.07);
}

.sound-toggle.is-muted .sound-toggle-glyph::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.15rem;
  height: 0.12rem;
  border-radius: 99rem;
  background: var(--red);
  content: "";
  transform: translate(-50%, -50%) rotate(-42deg);
}

.draft-pause-toggle {
  color: var(--ink-2);
  background: rgba(125, 139, 165, 0.07);
}

.draft-pause-toggle[hidden] {
  display: none;
}

.draft-pause-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.draft-pause-toggle.is-paused {
  border-color: rgba(185, 243, 107, 0.42);
  color: var(--lime);
  background: rgba(185, 243, 107, 0.09);
}

.draft-pause-icon,
.draft-play-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.draft-play-icon {
  display: none;
}

.draft-pause-toggle.is-paused .draft-pause-icon {
  display: none;
}

.draft-pause-toggle.is-paused .draft-play-icon {
  display: block;
}

body.draft-is-paused .on-clock-card {
  border-color: rgba(158, 140, 255, 0.48);
  background:
    linear-gradient(120deg, rgba(158, 140, 255, 0.14), rgba(89, 216, 255, 0.035)),
    var(--night-2);
}

body.draft-is-paused .draft-clock {
  color: var(--violet);
  animation: none;
  text-shadow: 0 0 1.1rem rgba(158, 140, 255, 0.3);
}

.draft-clock.is-warning {
  color: var(--red);
  text-shadow: 0 0 1.1rem rgba(255, 107, 107, 0.38);
}

.draft-clock.is-critical {
  color: var(--red);
  animation: critical-clock 900ms ease infinite;
  text-shadow: 0 0 1.1rem rgba(255, 107, 107, 0.55);
}

body.user-on-clock .on-clock-card {
  border-color: rgba(45, 212, 191, 0.52);
  background:
    linear-gradient(120deg, rgba(45, 212, 191, 0.14), rgba(158, 140, 255, 0.045)),
    var(--night-2);
  box-shadow: 0 0.6rem 2.2rem rgba(0, 0, 0, 0.24), 0 0 1.4rem rgba(45, 212, 191, 0.08);
}

body.user-on-clock #clock-label,
body.user-on-clock .draft-clock:not(.is-warning):not(.is-critical) {
  color: var(--aqua);
}

@keyframes critical-clock {
  50% {
    opacity: 0.58;
  }
}

.draft-status-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.draft-seat {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  margin-right: 0.2rem;
  line-height: 1.1;
}

.draft-seat span {
  color: var(--ink-3);
  font-size: 0.54rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.draft-seat strong {
  margin-top: 0.2rem;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.draft-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(15rem, 17rem) minmax(32rem, 1fr) minmax(18.75rem, 21.25rem);
  grid-template-rows: minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.65rem;
}

.draft-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 16, 30, 0.83);
  box-shadow: 0 0.6rem 2.5rem rgba(0, 0, 0, 0.16);
}

.player-pool,
.board-column,
.rosters-column {
  grid-column: 2;
  grid-row: 1 / -1;
}

.player-pool {
  container-name: player-pool;
  container-type: inline-size;
}

.column-header,
.rail-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.column-header {
  min-height: 4.35rem;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--line);
}

.column-header h2,
.rail-header h2 {
  margin-bottom: 0;
  font-size: 0.96rem;
}

.column-header-actions {
  display: flex;
  min-width: 0;
  gap: 0.6rem;
  align-items: center;
}

.board-team-picker {
  display: flex;
  min-width: 0;
  gap: 0.38rem;
  align-items: center;
  color: var(--ink-3);
  font-size: 0.62rem;
  font-weight: 760;
}

.board-team-picker select {
  width: clamp(9.5rem, 15vw, 13.5rem);
  min-width: 0;
  min-height: 2rem;
  padding: 0.34rem 1.7rem 0.34rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.48rem;
  color: var(--ink-1);
  background-color: rgba(5, 9, 19, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
}

.center-view-tabs {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(5, 9, 19, 0.58);
}

.center-view-tab {
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border: 0;
  border-radius: 0.38rem;
  color: var(--ink-3);
  background: transparent;
  font-size: 0.59rem;
  font-weight: 820;
}

.center-view-tab:hover {
  color: var(--ink-1);
}

.center-view-tab.is-active,
.center-view-tab[aria-selected="true"] {
  color: #171006;
  background: var(--amber);
  box-shadow: 0 0.25rem 0.8rem rgba(242, 184, 75, 0.15);
}

.pool-total {
  align-self: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.player-controls {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto auto auto;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.search-control,
.select-control {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.search-control input,
.select-control select {
  width: 100%;
  height: 2.75rem;
  border: 1px solid var(--control-line);
  border-radius: 0.58rem;
  color: var(--ink-1);
  background: rgba(5, 9, 19, 0.72);
  font-size: 0.7rem;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.search-control input {
  padding: 0.45rem 2.2rem 0.45rem 2rem;
}

.select-control select {
  min-width: 7.7rem;
  padding: 0.45rem 1.7rem 0.45rem 0.65rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position:
    calc(100% - 0.8rem) 50%,
    calc(100% - 0.55rem) 50%;
  background-repeat: no-repeat;
  background-size: 0.25rem 0.25rem, 0.25rem 0.25rem;
}

.search-control input:hover,
.select-control select:hover {
  border-color: var(--line-strong);
  background-color: rgba(10, 15, 28, 0.92);
}

.search-control input:focus,
.select-control select:focus {
  border-color: rgba(89, 216, 255, 0.45);
  box-shadow: 0 0 0 0.18rem rgba(89, 216, 255, 0.08);
}

.search-control input:focus-visible,
.select-control select:focus-visible {
  outline: 0.16rem solid var(--aqua);
  outline-offset: 0.12rem;
}

.search-control input::placeholder {
  color: var(--ink-3);
}

.search-icon {
  position: absolute;
  z-index: 2;
  left: 0.75rem;
  width: 0.66rem;
  height: 0.66rem;
  border: 0.11rem solid var(--ink-3);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  position: absolute;
  right: -0.33rem;
  bottom: -0.23rem;
  width: 0.38rem;
  height: 0.1rem;
  border-radius: 1rem;
  background: var(--ink-3);
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-control kbd {
  position: absolute;
  right: 0.55rem;
  min-width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}

.active-filter-bar {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.15rem;
  padding: 0.42rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  background: rgba(5, 8, 17, 0.34);
  font-size: 0.62rem;
}

.filter-context {
  display: flex;
  gap: 0.42rem;
  align-items: center;
  color: var(--aqua);
  font-weight: 800;
}

.filter-context i {
  width: 0.37rem;
  height: 0.37rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.55rem currentColor;
}

.cpu-rationale-chip {
  overflow: hidden;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(158, 140, 255, 0.18);
  border-radius: 99rem;
  color: #beb4ff;
  background: var(--violet-soft);
  font-size: 0.54rem;
  font-weight: 790;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-table-wrap {
  min-height: 0;
  overflow: auto;
  flex: 1;
}

.player-table {
  min-width: 0;
}

.player-table th,
.player-table td {
  height: 3.1rem;
  padding: 0.5rem 0.68rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.player-table thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 2.25rem;
  color: var(--ink-3);
  background: #0b1120;
  box-shadow: 0 1px 0 var(--line);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sortable-heading {
  display: flex;
  gap: 0.28rem;
  align-items: center;
}

.column-label-compact {
  display: none;
}

.table-sort-button {
  display: inline-flex;
  min-height: 2rem;
  padding: 0.28rem 0.18rem;
  border: 0;
  gap: 0.3rem;
  align-items: center;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.table-sort-button:hover,
.table-sort-button.is-active {
  color: var(--aqua);
}

.table-sort-button:focus-visible,
.stat-info-button:focus-visible {
  border-radius: 0.32rem;
  outline: 0.14rem solid rgba(89, 216, 255, 0.45);
  outline-offset: 0.08rem;
}

.sort-indicator {
  display: inline-grid;
  min-width: 0.9rem;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.table-sort-button.is-active .sort-indicator {
  color: var(--aqua);
}

.stat-info-button {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid rgba(89, 216, 255, 0.28);
  border-radius: 50%;
  place-items: center;
  color: var(--aqua);
  background: rgba(89, 216, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
}

.stat-info-button:hover,
.stat-info-button.is-tooltip-active {
  border-color: rgba(89, 216, 255, 0.55);
  background: rgba(89, 216, 255, 0.14);
}

.rank-column {
  width: 2.6rem;
}

.actions-column {
  width: 6.6rem;
  min-width: 6.6rem;
}

.actions-column .table-sort-button {
  width: 100%;
  justify-content: space-between;
}

.player-table thead .actions-column {
  z-index: 5;
  left: 0;
  box-shadow:
    1px 0 0 var(--line),
    0 1px 0 var(--line);
}

.player-table tbody .player-actions {
  position: sticky;
  z-index: 2;
  left: 0;
  min-width: 6.6rem;
  background: var(--night-1);
  box-shadow: 1px 0 0 var(--line);
}

.player-table tbody tr:hover .player-actions {
  background: #0d1728;
}

.player-table tbody tr {
  transition:
    background 120ms ease,
    opacity 120ms ease;
}

.player-table tbody tr:hover {
  background: rgba(89, 216, 255, 0.035);
}

.player-table tbody tr.is-recommended {
  background: linear-gradient(90deg, rgba(185, 243, 107, 0.075), transparent 70%);
}

.player-rank {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
}

.player-identity {
  display: flex;
  min-width: 0;
  align-items: center;
}

.player-initials {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  margin-right: 0.55rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.58rem;
  color: var(--ink-2);
  background: var(--night-3);
  font-size: 0.59rem;
  font-weight: 900;
}

.player-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.player-name {
  overflow: hidden;
  color: var(--ink-0);
  font-size: 0.72rem;
  font-weight: 790;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-team {
  margin-top: 0.1rem;
  color: var(--ink-3);
  font-size: 0.57rem;
}

.position-badge,
.player-position-badge {
  --position-border: var(--line);
  --position-ink: var(--ink-2);
  --position-fill: var(--night-3);
  display: inline-grid;
  min-width: 2.2rem;
  min-height: 1.5rem;
  padding: 0.22rem 0.4rem 0.18rem;
  place-items: center;
  border: 1px solid var(--position-border);
  border-radius: 0.42rem;
  color: var(--position-ink);
  background: var(--position-fill);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1;
}

.position-badge[data-position="QB"],
.player-position-badge[data-position="QB"] {
  --position-border: var(--position-qb-border);
  --position-ink: var(--position-qb-ink);
  --position-fill: var(--position-qb-fill);
}

.position-badge[data-position="RB"],
.player-position-badge[data-position="RB"] {
  --position-border: var(--position-rb-border);
  --position-ink: var(--position-rb-ink);
  --position-fill: var(--position-rb-fill);
}

.position-badge[data-position="WR"],
.player-position-badge[data-position="WR"] {
  --position-border: var(--position-wr-border);
  --position-ink: var(--position-wr-ink);
  --position-fill: var(--position-wr-fill);
}

.position-badge[data-position="TE"],
.player-position-badge[data-position="TE"] {
  --position-border: var(--position-te-border);
  --position-ink: var(--position-te-ink);
  --position-fill: var(--position-te-fill);
}

.position-badge[data-position="K"],
.player-position-badge[data-position="K"] {
  --position-border: var(--position-k-border);
  --position-ink: var(--position-k-ink);
  --position-fill: var(--position-k-fill);
}

.position-badge[data-position="DEF"],
.player-position-badge[data-position="DEF"] {
  --position-border: var(--position-def-border);
  --position-ink: var(--position-def-ink);
  --position-fill: var(--position-def-fill);
}

.position-badge:is(
  [data-position="D"],
  [data-position="DI"],
  [data-position="ED"],
  [data-position="LB"],
  [data-position="CB"],
  [data-position="S"],
  [data-position="DB"]
),
.player-position-badge:is(
  [data-position="D"],
  [data-position="DI"],
  [data-position="ED"],
  [data-position="LB"],
  [data-position="CB"],
  [data-position="S"],
  [data-position="DB"]
) {
  --position-border: var(--position-idp-border);
  --position-ink: var(--position-idp-ink);
  --position-fill: var(--position-idp-fill);
}

.tb-value {
  color: var(--ink-0);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
}

.future-tag {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  color: var(--ink-3);
  font-size: 0.58rem;
  font-weight: 760;
  white-space: nowrap;
}

.future-tag.is-eligible {
  color: var(--lime);
}

.future-tag::before {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.player-actions {
  display: table-cell;
  text-align: left;
  white-space: nowrap;
}

.queue-turn-badge {
  display: inline-flex;
  min-height: 1.9rem;
  padding-inline: 0.55rem;
  align-items: center;
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 99rem;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.58rem;
  font-weight: 850;
}

.icon-button {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink-2);
  background: rgba(17, 26, 45, 0.75);
  font-size: 0.85rem;
  font-weight: 800;
  transition:
    color 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.icon-button:hover {
  border-color: rgba(89, 216, 255, 0.3);
  color: var(--aqua);
  background: var(--aqua-soft);
}

.icon-button.is-queued {
  border-color: rgba(255, 201, 107, 0.28);
  color: var(--amber);
  background: var(--amber-soft);
}

.player-table tbody .player-actions .icon-button:not(.is-queued) {
  font-size: 0;
}

.player-table tbody .player-actions .icon-button:not(.is-queued)::before {
  content: "";
  display: block;
  width: 0.72em;
  height: 0.72em;
  background-color: currentColor;
  font-size: 0.85rem;
  -webkit-mask-image: url("./plus-symbol.png");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-image: url("./plus-symbol.png");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  pointer-events: none;
}

.draft-player-button {
  min-width: 3.4rem;
  height: 1.9rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(89, 216, 255, 0.28);
  border-radius: 0.5rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-size: 0.61rem;
  font-weight: 850;
  text-transform: uppercase;
}

.draft-player-button:hover {
  color: #06131c;
  background: var(--aqua);
}

.draft-player-button:disabled {
  border-color: var(--line);
  color: var(--ink-3);
  background: var(--night-3);
  cursor: not-allowed;
  opacity: 0.48;
}

.column-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  background: rgba(5, 8, 17, 0.4);
  font-size: 0.56rem;
}

.column-footer p {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  margin: 0;
}

.board-legend {
  display: flex;
  gap: 0.65rem;
  align-self: center;
  color: var(--ink-3);
  font-size: 0.57rem;
}

.board-legend span {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.board-legend i {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 0.16rem;
}

.legend-highlighted {
  border: 1px solid rgba(242, 184, 75, 0.52);
  background: var(--amber-soft);
}

.legend-current {
  border: 1px solid rgba(185, 243, 107, 0.8);
  background: rgba(185, 243, 107, 0.3);
}

.draft-board {
  position: relative;
  min-height: 0;
  overflow: auto;
  flex: 1;
  background:
    linear-gradient(rgba(140, 165, 210, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 165, 210, 0.025) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
}

.draft-board-grid {
  display: grid;
  min-width: 54rem;
  grid-template-columns: 2.3rem repeat(12, minmax(4.15rem, 1fr));
}

.league-roster-tools {
  display: flex;
  min-height: 3.25rem;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 25, 0.54);
}

.league-roster-legend {
  display: flex;
  min-width: 0;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink-3);
  font-size: 0.62rem;
  font-weight: 760;
}

.league-roster-legend span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  white-space: nowrap;
}

.roster-source-mark {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 0.16rem;
}

.roster-source-mark--keeper {
  border: 1px solid rgba(45, 212, 191, 0.58);
  background: rgba(45, 212, 191, 0.24);
}

.roster-source-mark--pick {
  border: 1px solid rgba(242, 184, 75, 0.58);
  background: rgba(242, 184, 75, 0.24);
}

.roster-source-mark--trade {
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0.45rem rgba(158, 140, 255, 0.4);
}

.league-roster-jump {
  display: flex;
  min-width: 12rem;
  gap: 0.5rem;
  align-items: center;
}

.league-roster-jump > span {
  flex: 0 0 auto;
  color: var(--ink-3);
  font-size: 0.62rem;
  font-weight: 780;
}

.league-roster-jump select {
  width: min(15rem, 100%);
  min-height: 2.35rem;
  padding: 0.42rem 2rem 0.42rem 0.62rem;
  border: 1px solid var(--control-line);
  border-radius: 0.55rem;
  color: var(--ink-1);
  background-color: var(--night-2);
  font-size: 0.72rem;
  font-weight: 700;
}

.league-rosters {
  position: relative;
  min-height: 0;
  overflow: auto;
  flex: 1;
  background:
    linear-gradient(rgba(140, 165, 210, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 165, 210, 0.025) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  scrollbar-gutter: stable;
}

/* Concise roster lists */
.rosters-column > .column-header {
  min-height: 3.45rem;
  align-items: center;
  justify-content: flex-end;
}

.rosters-column > .column-header .column-header-actions {
  margin-left: auto;
}

.league-rosters {
  padding: 0.65rem;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 0.65rem;
  scroll-snap-type: x proximity;
}

.league-rosters:focus-visible {
  outline: 0.18rem solid var(--aqua);
  outline-offset: -0.28rem;
}

.league-roster-lists {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 0.65rem;
  align-items: flex-start;
}

.league-roster-list {
  flex: 0 0 14.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(8, 13, 25, 0.9);
  scroll-snap-align: start;
}

.league-roster-list.is-controlled {
  border-color: rgba(242, 184, 75, 0.58);
  box-shadow: inset 0 0.16rem 0 var(--amber);
}

.league-roster-list h3 {
  min-height: 3rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  align-content: center;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
  color: var(--ink-1);
  background: #111a2b;
  font-size: 0.85rem;
  line-height: 1.25;
}

.league-roster-list.is-controlled h3 {
  color: var(--amber);
  background:
    linear-gradient(145deg, rgba(242, 184, 75, 0.12), rgba(17, 26, 43, 0.96)),
    #111a2b;
}

.league-roster-list h3:focus-visible {
  outline: 0.18rem solid var(--aqua);
  outline-offset: -0.24rem;
}

.league-roster-list dl {
  margin: 0;
}

.league-roster-list-row {
  display: grid;
  min-height: 1.65rem;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-bottom: 1px solid rgba(118, 131, 157, 0.14);
}

.league-roster-list-row:last-child {
  border-bottom: 0;
}

.league-roster-list-row dt,
.league-roster-list-row dd {
  min-width: 0;
  margin: 0;
}

.league-roster-list-row dt {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 820;
}

.league-roster-list-row dd {
  overflow: hidden;
  color: var(--ink-1);
  font-size: 0.78rem;
  font-weight: 720;
}

.league-roster-player-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.league-roster-player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-roster-player-bye {
  display: none;
}

.league-roster-list-row.is-empty dd {
  color: var(--ink-3);
  font-weight: 620;
}

.board-round-label {
  position: sticky;
  z-index: 30;
  left: 0;
  display: grid;
  min-height: 4.45rem;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  background: #0b1120;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.board-pick {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 4.45rem;
  padding: 0.48rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  justify-content: center;
  background: rgba(10, 16, 30, 0.68);
}

.board-pick-expand,
.board-pick-mobile-detail {
  display: none;
}

.board-owner-detail,
.board-bye-detail {
  display: none;
}

.board-position-wash {
  position: absolute;
  z-index: 0;
  inset: 1px;
  border-radius: 0.18rem;
  background: var(--board-position-fill);
  opacity: 0.94;
  pointer-events: none;
}

.board-pick.has-player:hover .board-position-wash {
  filter: brightness(1.14) saturate(1.08);
}

.board-pick:not(.board-pick-mobile-detail):hover {
  z-index: 2;
  background: var(--night-4);
}

.board-pick.is-highlighted-team {
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.5);
  background: linear-gradient(145deg, var(--amber-soft), rgba(10, 16, 30, 0.78));
}

.board-pick.is-on-clock {
  background: linear-gradient(145deg, rgba(185, 243, 107, 0.26), rgba(10, 16, 30, 0.78));
}

.board-pick.is-on-clock::before {
  position: absolute;
  z-index: 4;
  inset: 1px;
  border: 2px solid rgba(185, 243, 107, 0.96);
  border-radius: 0.18rem;
  box-shadow: 0 0 0.7rem rgba(185, 243, 107, 0.16);
  content: "";
  pointer-events: none;
  animation: board-on-clock-glow 1.6s ease infinite;
}

.board-pick.is-highlighted-team.is-on-clock {
  box-shadow: inset 0 0 0 2px rgba(242, 184, 75, 0.78);
}

.board-pick.is-highlighted-team.is-on-clock::before {
  inset: 3px;
}

.board-pick.is-on-clock .board-position-wash {
  background:
    linear-gradient(rgba(185, 243, 107, 0.24), rgba(185, 243, 107, 0.24)),
    var(--board-position-fill);
}

.board-team-header {
  position: sticky;
  z-index: 25;
  top: 0;
  border-bottom-color: var(--line-strong);
  background: #111a2b;
}

.draft-board-row:first-child .board-round-label {
  z-index: 40;
  top: 0;
}

.board-team-header.is-highlighted-team {
  color: var(--amber);
  background: #2c271e;
}

.board-pick.is-keeper {
  color: var(--ink-3);
  background: rgba(29, 42, 64, 0.48);
}

.board-pick.is-keeper .board-player-name {
  color: var(--ink-3);
  font-size: 0.65rem;
  letter-spacing: 0.07em;
}

.board-pick.is-traded::after {
  position: absolute;
  top: 0.28rem;
  left: 0.3rem;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0.5rem rgba(158, 140, 255, 0.45);
  content: "";
  z-index: 3;
}

@keyframes on-clock-glow {
  50% {
    box-shadow:
      inset 0 0 0 2px rgba(185, 243, 107, 1),
      0 0 1rem rgba(185, 243, 107, 0.2);
  }
}

@keyframes board-on-clock-glow {
  50% {
    border-color: rgba(185, 243, 107, 1);
    box-shadow: 0 0 1rem rgba(185, 243, 107, 0.26);
  }
}

.board-pick-number {
  position: absolute;
  top: 0.26rem;
  right: 0.3rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  z-index: 2;
}

.board-on-clock-label {
  position: absolute;
  z-index: 5;
  right: 0.28rem;
  bottom: 0.22rem;
  padding: 0.08rem 0.22rem;
  border: 1px solid rgba(185, 243, 107, 0.72);
  border-radius: 0.22rem;
  color: var(--lime);
  background: rgba(7, 12, 22, 0.92);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.board-player-name {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: var(--ink-0);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-player-meta {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.26rem;
  color: var(--ink-3);
  font-size: 0.62rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.board-pick.is-empty .board-player-name {
  color: var(--ink-3);
  font-weight: 600;
}

.fit-cell span {
  display: block;
  margin-top: 0.1rem;
  color: var(--ink-3);
  font-size: 0.5rem;
}

.compact-order-list,
.compact-trade-list {
  display: grid;
  gap: 0.35rem;
}

.snake-reroll-button {
  min-height: 2.35rem;
  gap: 0.38rem;
  flex: 0 0 auto;
  padding: 0.38rem 0.58rem;
  color: var(--aqua);
  font-size: 0.66rem;
}

.snake-reroll-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.snake-reroll-icon circle {
  fill: currentColor;
  stroke: none;
}

.compact-order-list > div,
.compact-trade-list > div {
  display: grid;
  min-width: 0;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.52rem;
  background: rgba(7, 11, 20, 0.36);
}

.compact-order-list > div {
  grid-template-columns: 1.7rem minmax(0, 1fr);
}

.compact-order-list > div.is-user-team {
  border-color: rgba(242, 184, 75, 0.5);
  color: var(--amber);
  background: var(--amber-soft);
  box-shadow: none;
}

.compact-order-list span,
.compact-trade-list > div > span {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

.compact-order-list strong {
  overflow: hidden;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-trade-list {
  max-height: 30rem;
  overflow: auto;
}

.compact-trade-list > div {
  grid-template-columns: 2rem minmax(0, 1fr);
}

.compact-trade-list p {
  min-width: 0;
  margin: 0;
}

.compact-trade-list strong,
.compact-trade-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-trade-list strong {
  font-size: 0.61rem;
}

.compact-trade-list small {
  margin-top: 0.12rem;
  color: #bcb2ff;
  font-size: 0.5rem;
}

.draft-board-empty {
  position: absolute;
  inset: 0;
  padding: 2rem;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--ink-3);
  text-align: center;
}

.empty-state--compact {
  min-height: 17rem;
}

.empty-state-mark {
  display: grid;
  width: 3.35rem;
  height: 3.35rem;
  margin-bottom: 0.9rem;
  place-items: center;
  border: 1px solid rgba(89, 216, 255, 0.2);
  border-radius: 1rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 900;
}

.empty-state-mark--board {
  border-color: rgba(158, 140, 255, 0.25);
  color: #b6a8ff;
  background: var(--violet-soft);
}

.empty-state h3,
.empty-state h4 {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.empty-state p {
  max-width: 27rem;
  margin-bottom: 0;
  font-size: 0.68rem;
  line-height: 1.55;
}

.board-footer {
  font-family: var(--font-mono);
}

.board-swipe-hint {
  display: none;
}

.board-direction {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
}

.board-direction strong {
  min-width: 1.5rem;
  color: var(--aqua);
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
}

.team-rail {
  display: contents;
}

.rail-stack {
  display: flex;
  min-width: 0;
  min-height: 0;
  gap: 0.65rem;
  overflow-y: auto;
  flex-direction: column;
  align-content: flex-start;
  scrollbar-gutter: stable;
}

.rail-stack:focus-visible {
  outline: 0.14rem solid var(--aqua);
  outline-offset: -0.14rem;
}

.rail-stack--left {
  grid-column: 1;
  grid-row: 1;
}

.rail-stack--right {
  grid-column: 3;
  grid-row: 1;
}

.rail-section {
  min-width: 0;
  min-height: 0;
  overflow: visible;
  flex: 0 0 auto;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(10, 16, 30, 0.83);
  box-shadow: 0 0.6rem 2.5rem rgba(0, 0, 0, 0.16);
}

.rail-section--order {
  order: 1;
}

.rail-section--recent {
  order: 2;
}

.mobile-recent-picks-section {
  display: none;
}

.rail-section--roster {
  order: 1;
}

.rail-section--queue {
  order: 2;
}

.rail-header {
  margin-bottom: 0.75rem;
}

.upcoming-picks,
.recent-picks,
.my-roster,
.queue-list {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upcoming-pick {
  display: grid;
  min-height: 2.75rem;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.38rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--ink-3);
}

.upcoming-pick-sequence,
.upcoming-pick-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.upcoming-pick-sequence strong,
.upcoming-pick-sequence small {
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.upcoming-pick-sequence strong {
  font-size: 0.68rem;
  font-weight: 900;
}

.upcoming-pick-sequence small {
  margin-top: 0.08rem;
  font-size: 0.62rem;
}

.upcoming-pick-copy strong,
.upcoming-pick-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-pick-copy strong {
  color: var(--ink-1);
  font-size: 0.7rem;
  font-weight: 760;
}

.upcoming-pick-copy small {
  margin-top: 0.1rem;
  color: var(--ink-3);
  font-size: 0.62rem;
}

.upcoming-pick.is-user-team .upcoming-pick-copy strong {
  color: var(--amber);
}

.upcoming-pick.is-traded:not(.is-user-team) .upcoming-pick-copy small {
  color: #bcb2ff;
}

.upcoming-pick.is-on-clock {
  border-color: rgba(242, 184, 75, 0.3);
  background: var(--amber-soft);
  box-shadow: inset 0.15rem 0 0 var(--amber);
}

.upcoming-pick.is-on-clock .upcoming-pick-sequence strong {
  color: var(--amber);
}

.recent-picks li:not(.empty-list-item),
.queue-list li:not(.empty-list-item) {
  display: grid;
  min-height: 2.65rem;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

.recent-picks li:last-child,
.queue-list li:last-child {
  border-bottom: 0;
}

.recent-pick-index,
.queue-index {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.55rem;
}

.recent-pick-copy,
.queue-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.recent-pick-copy strong,
.queue-copy strong {
  overflow: hidden;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-pick-copy span,
.queue-copy span {
  margin-top: 0.1rem;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 0.52rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-count,
.queue-count {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.roster-team-controls {
  display: grid;
  min-width: 0;
  gap: 0.38rem;
  justify-items: end;
}

.roster-team-picker {
  display: block;
  min-width: 0;
}

.roster-team-picker select {
  width: min(12rem, 100%);
  height: 2rem;
  padding: 0.34rem 1.7rem 0.34rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink-2);
  background-color: var(--night-2);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position:
    calc(100% - 0.78rem) 0.82rem,
    calc(100% - 0.53rem) 0.82rem;
  background-repeat: no-repeat;
  background-size: 0.26rem 0.26rem, 0.26rem 0.26rem;
  font-size: 0.68rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
}

.roster-team-picker select:focus-visible {
  border-color: var(--aqua);
  box-shadow: 0 0 0 0.18rem rgba(89, 216, 255, 0.13);
  outline: none;
}

.need-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin-bottom: 0.65rem;
}

.need-chip {
  padding: 0.25rem 0.45rem;
  border: 1px solid rgba(255, 201, 107, 0.2);
  border-radius: 99rem;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 0.64rem;
  font-weight: 800;
}

.need-chip--urgent {
  border-color: rgba(255, 113, 132, 0.24);
  color: #ff9baa;
  background: var(--red-soft);
}

.need-chip--settled {
  border-color: var(--line);
  color: var(--ink-3);
  background: rgba(118, 131, 157, 0.08);
}

.my-roster {
  grid-template-columns: minmax(0, 1fr);
}

.my-roster .roster-slot {
  display: grid;
  min-width: 0;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.32rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(5, 9, 19, 0.42);
  font-size: 0.66rem;
}

.my-roster .roster-slot-label {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
}

.my-roster .roster-slot-player {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.my-roster .roster-slot-player strong,
.my-roster .roster-slot-player small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-roster .roster-slot-player strong {
  color: var(--ink-2);
  font-size: 0.66rem;
  font-weight: 760;
}

.my-roster .roster-slot-player small {
  margin-top: 0.05rem;
  color: var(--ink-3);
  font-size: 0.58rem;
}

.my-roster .roster-slot.is-empty {
  border-style: dashed;
  background: rgba(118, 131, 157, 0.035);
}

.my-roster .roster-slot.is-empty .roster-slot-player strong {
  color: var(--ink-3);
}

.my-roster .roster-slot--starter.is-empty {
  border-color: rgba(242, 184, 75, 0.24);
  background: rgba(242, 184, 75, 0.035);
}

.my-roster .roster-slot--reserve {
  opacity: 0.72;
}

.my-roster .roster-group-label {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  margin-top: 0.35rem;
  padding: 0.28rem 0.15rem 0.12rem;
  color: var(--ink-2);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.my-roster .roster-group-label:first-child {
  margin-top: 0;
}

.roster-overflow-warning {
  display: flex;
  grid-column: 1 / -1;
  gap: 0.15rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 113, 132, 0.3);
  border-radius: 0.48rem;
  color: #ffb0bb;
  background: var(--red-soft);
  flex-direction: column;
  font-size: 0.52rem;
}

.empty-list-item {
  padding: 0.65rem 0.1rem;
  color: var(--ink-3);
  font-size: 0.6rem;
  line-height: 1.45;
}

.mobile-nav {
  display: none;
}

/* Engine-rendered review and draft content */
.review-panel > .review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-panel > .review-grid--keepers {
  grid-template-columns: minmax(22rem, 1.15fr) minmax(19rem, 0.95fr) minmax(18rem, 0.9fr);
  align-items: start;
}

.team-review-card {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(45, 212, 191, 0.025), transparent 48%),
    rgba(21, 32, 51, 0.72);
}

.team-review-card.is-user-team {
  border-color: rgba(242, 184, 75, 0.38);
  background:
    linear-gradient(145deg, rgba(242, 184, 75, 0.11), transparent 55%),
    rgba(21, 32, 51, 0.8);
  box-shadow: inset 0.18rem 0 0 var(--amber);
}

.team-review-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.team-avatar {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.62rem;
  color: var(--ink-2);
  background: var(--night-4);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.team-review-card.is-user-team .team-avatar,
.team-order-row.is-user-team .team-avatar {
  border-color: rgba(242, 184, 75, 0.36);
  color: var(--amber);
  background: var(--amber-soft);
}

.team-review-card header h3 {
  overflow: hidden;
  margin-bottom: 0.12rem;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-review-card header p {
  overflow: hidden;
  margin-bottom: 0;
  color: var(--ink-3);
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-review-card .keeper-chip-list {
  display: flex;
  min-height: 0;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.player-chip {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.25rem 0.42rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  color: var(--ink-2);
  background: rgba(7, 11, 20, 0.42);
  font-size: 0.57rem;
  font-weight: 720;
}

.player-chip small {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.46rem;
}

.player-chip.is-keeper-drafted {
  border-color: rgba(45, 212, 191, 0.24);
  color: var(--aqua);
  background: var(--aqua-soft);
}

.team-review-card details {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.58rem;
}

.team-review-card summary {
  min-height: 1.7rem;
  color: var(--ink-2);
  font-weight: 760;
}

.team-review-card details p {
  margin: 0.25rem 0 0;
  line-height: 1.45;
}

.team-review-card .detail-label {
  margin-top: 0.65rem;
  color: var(--aqua);
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-intro {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.section-intro h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.section-intro > p {
  max-width: 35rem;
  margin-bottom: 0;
  color: var(--ink-3);
  font-size: 0.68rem;
  line-height: 1.5;
}

.keeper-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-event {
  display: grid;
  min-width: 0;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(21, 32, 51, 0.7);
}

.timeline-event > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 0.56rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 900;
}

.timeline-event.is-withdrawal > span {
  border-color: rgba(255, 107, 107, 0.22);
  color: var(--red);
  background: var(--red-soft);
}

.timeline-event strong {
  display: block;
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-event p {
  margin: 0.15rem 0 0;
  color: var(--ink-3);
  font-size: 0.55rem;
  line-height: 1.4;
}

.expired-note {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(242, 184, 75, 0.18);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  background: var(--amber-soft);
  font-size: 0.65rem;
}

.setup-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.setup-card {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(21, 32, 51, 0.7);
}

.setup-card h2 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.order-list,
.check-list {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-list li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem;
  border-radius: 0.48rem;
  color: var(--ink-3);
  font-size: 0.58rem;
}

.order-list li.is-user-team {
  color: var(--amber);
  background: var(--amber-soft);
}

.order-list li > span,
.order-list li > small {
  font-family: var(--font-mono);
  font-size: 0.49rem;
}

.order-list li strong {
  overflow: hidden;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-list {
  display: grid;
  max-height: 21rem;
  overflow-y: auto;
}

.trade-list > div {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0 0.45rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.58rem;
}

.trade-list > div > span {
  grid-row: 1 / 3;
  color: var(--aqua);
  font-family: var(--font-mono);
}

.trade-list > div > small {
  color: var(--ink-3);
}

.check-list li {
  position: relative;
  padding: 0.45rem 0.5rem 0.45rem 1.5rem;
  border-radius: 0.45rem;
  color: var(--ink-3);
  background: rgba(7, 11, 20, 0.36);
  font-size: 0.59rem;
}

.check-list li::before {
  position: absolute;
  left: 0.55rem;
  color: currentColor;
  content: "•";
}

.check-list .is-good {
  color: var(--aqua);
}

.check-list .is-warning {
  color: var(--amber);
}

.check-list .is-bad {
  color: var(--red);
}

.source-note {
  margin: 0.75rem 0 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink-3);
  background: rgba(7, 11, 20, 0.38);
  font-size: 0.56rem;
}

.team-order-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: 0.58rem;
}

.team-order-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.team-order-row strong,
.team-order-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-order-row strong {
  font-size: 0.63rem;
}

.team-order-row small {
  color: var(--ink-3);
  font-size: 0.48rem;
}

.team-order-row .next-pick {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.5rem;
}

.team-order-row.is-user-team {
  color: var(--amber);
}

.team-order-row.is-on-clock {
  border-color: rgba(242, 184, 75, 0.36);
  background: var(--amber-soft);
  box-shadow: inset 0.15rem 0 0 var(--amber);
}

.board-grid {
  display: grid;
  min-width: 55rem;
  grid-template-columns: 3rem repeat(var(--team-count), minmax(4.3rem, 1fr));
}

.board-corner,
.board-team {
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  min-height: 2.4rem;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  background: #111a2b;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 850;
}

.board-corner {
  z-index: 6;
  left: 0;
}

.board-team.is-user-team {
  color: var(--amber);
  background: #2c271e;
}

.board-round {
  position: sticky;
  z-index: 3;
  left: 0;
  display: grid;
  min-height: 4.25rem;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  background: #111a2b;
  font-family: var(--font-mono);
  font-size: 0.57rem;
  font-weight: 850;
}

.board-cell {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 4.25rem;
  padding: 0.45rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-direction: column;
  justify-content: center;
  background: rgba(16, 26, 44, 0.74);
}

.board-cell strong,
.board-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-cell strong {
  font-size: 0.59rem;
}

.board-cell small {
  margin-top: 0.2rem;
  color: var(--ink-3);
  font-size: 0.47rem;
}

.board-cell.is-keeper {
  color: var(--ink-3);
  background: rgba(29, 42, 64, 0.45);
}

.board-cell.is-keeper strong {
  font-size: 0.5rem;
  letter-spacing: 0.08em;
}

.board-cell.is-traded::after {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--violet);
  content: "";
}

.board-cell.is-user-pick {
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.48);
  background: linear-gradient(145deg, var(--amber-soft), rgba(16, 26, 44, 0.78));
}

.board-cell.is-active {
  box-shadow: inset 0 0 0 2px var(--amber), 0 0 1rem rgba(242, 184, 75, 0.12);
  animation: on-clock-glow 1.6s ease infinite;
}

.rank-cell {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.player-cell {
  min-width: 10rem;
}

.player-cell-inner {
  display: flex;
  min-width: 0;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}

.mobile-player-row-toggle {
  display: none;
}

.mobile-rookie-badge {
  display: none;
}

.mobile-stat-label {
  display: none;
}

.mobile-expanded-metrics-cell {
  display: none;
}

.player-stat-details-button {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(89, 216, 255, 0.3);
  border-radius: 50%;
  color: var(--aqua);
  background: rgba(89, 216, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 900;
}

.player-stat-details-button:hover,
.player-stat-details-button:focus-visible {
  border-color: rgba(89, 216, 255, 0.62);
  background: rgba(89, 216, 255, 0.16);
}

.player-cell strong,
.player-cell span,
.bye-cell strong,
.bye-cell span,
.numeric-cell strong,
.numeric-cell span,
.future-cell small {
  display: block;
}

.player-cell strong {
  overflow: hidden;
  max-width: 17rem;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-cell span,
.bye-cell span,
.numeric-cell span,
.future-cell small {
  margin-top: 0.1rem;
  color: var(--ink-3);
  font-size: 0.5rem;
}

.bye-cell {
  text-align: center;
  white-space: nowrap;
}

.bye-cell strong {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.numeric-cell strong,
.fit-cell strong {
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.future-badge {
  display: inline-flex;
  min-height: 1.45rem;
  align-items: center;
  padding: 0.22rem 0.4rem;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 99rem;
  color: var(--aqua);
  background: var(--aqua-soft);
  font-size: 0.52rem;
  font-weight: 800;
  white-space: nowrap;
}

.muted {
  color: var(--ink-3);
  font-size: 0.54rem;
}

.fit-cell strong {
  color: var(--aqua);
}

.stat-heading {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
  border-bottom: 1px dotted rgba(167, 181, 207, 0.45);
  cursor: help;
  outline: none;
}

.stat-heading i {
  display: inline-grid;
  width: 0.85rem;
  height: 0.85rem;
  place-items: center;
  border: 1px solid rgba(89, 216, 255, 0.28);
  border-radius: 50%;
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.42rem;
  font-style: normal;
}

.stat-tooltip-target {
  cursor: help;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.stat-tooltip-target.is-tooltip-active,
.stat-heading.is-tooltip-active {
  background: rgba(89, 216, 255, 0.08);
  box-shadow: inset 0 -0.12rem 0 rgba(89, 216, 255, 0.38);
}

.stat-heading:focus-visible {
  border-radius: 0.2rem;
  box-shadow: 0 0 0 0.18rem rgba(89, 216, 255, 0.2);
}

.stat-tooltip {
  position: fixed;
  z-index: 400;
  visibility: hidden;
  width: min(24rem, calc(100vw - 1.5rem));
  padding: 0.82rem 0.9rem;
  border: 1px solid rgba(89, 216, 255, 0.28);
  border-radius: 0.72rem;
  color: var(--ink-1);
  background:
    linear-gradient(145deg, rgba(89, 216, 255, 0.08), transparent 55%),
    rgba(12, 20, 35, 0.98);
  box-shadow:
    0 1rem 3rem rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0.35rem) scale(0.985);
  transition:
    opacity 1s ease,
    transform 1s ease,
    visibility 0s linear 1s;
}

.stat-tooltip.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}

.stat-tooltip strong,
.stat-tooltip p,
.stat-tooltip small {
  display: block;
}

.stat-tooltip strong {
  margin-bottom: 0.35rem;
  color: var(--aqua);
  font-size: 0.82rem;
}

.stat-tooltip p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.76rem;
  line-height: 1.55;
}

.stat-tooltip small {
  margin-top: 0.48rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.draft-button {
  min-width: 3.5rem;
  min-height: 1.9rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 0.5rem;
  color: #1a1204;
  background: var(--amber);
  font-size: 0.6rem;
  font-weight: 880;
}

.draft-button:hover:not(:disabled) {
  box-shadow: 0 0.3rem 1rem rgba(242, 184, 75, 0.2);
}

.draft-button:disabled {
  border-color: var(--line);
  color: var(--ink-3);
  background: var(--night-3);
  opacity: 0.5;
}

.my-roster {
  display: grid;
}

.roster-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
  padding: 0.65rem;
  border: 1px solid rgba(242, 184, 75, 0.18);
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
}

.roster-summary strong {
  grid-row: 1 / 3;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 1rem;
}

.roster-summary span,
.roster-summary small {
  color: var(--ink-3);
  font-size: 0.5rem;
}

.roster-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.roster-groups > section {
  min-width: 0;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.48rem;
  background: rgba(7, 11, 20, 0.36);
}

.roster-groups h4 {
  margin-bottom: 0.35rem;
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.49rem;
}

.roster-player {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0.23rem 0;
  border-top: 1px solid var(--line);
}

.roster-player strong,
.roster-player span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-player strong {
  font-size: 0.53rem;
}

.roster-player span,
.roster-empty {
  color: var(--ink-3);
  font-size: 0.45rem;
}

.need-chips .need-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 0.35rem;
  align-items: center;
  border-color: rgba(255, 107, 107, 0.2);
  color: var(--red);
  background: var(--red-soft);
}

.need-chips .need-chip--settled {
  border-color: rgba(45, 212, 191, 0.24);
  color: var(--aqua);
  background: var(--aqua-soft);
}

.need-chip > span {
  grid-row: 1 / 3;
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.need-chip > strong {
  font-size: 0.51rem;
}

.need-chip > small {
  color: var(--ink-3);
  font-size: 0.44rem;
}

.need-chip.is-good {
  border-color: rgba(45, 212, 191, 0.2);
  color: var(--aqua);
  background: var(--aqua-soft);
}

.queue-item,
.recent-pick {
  display: grid;
  min-width: 0;
  gap: 0.5rem;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.queue-item {
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
}

.recent-pick {
  grid-template-columns: 1.6rem minmax(0, 1fr);
}

.queue-item > span,
.recent-pick > span {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.53rem;
}

.queue-item > div:not(.queue-actions),
.recent-pick > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.queue-item strong,
.queue-item small,
.recent-pick strong,
.recent-pick small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item strong,
.recent-pick strong {
  font-size: 0.61rem;
}

.queue-item small,
.recent-pick small {
  color: var(--ink-3);
  font-size: 0.48rem;
}

.queue-actions {
  display: flex;
  gap: 0.2rem;
}

.queue-actions button {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  color: var(--ink-2);
  background: var(--night-3);
  font-size: 0.68rem;
}

.queue-actions button:hover:not(:disabled) {
  border-color: rgba(242, 184, 75, 0.3);
  color: var(--amber);
}

.queue-actions .queue-draft-button {
  width: auto;
  min-width: 3.75rem;
  padding-inline: 0.65rem;
  color: var(--aqua);
}

.queue-actions button:disabled {
  opacity: 0.35;
}

.recent-pick em {
  grid-column: 2;
  overflow: hidden;
  padding: 0.18rem 0.36rem;
  border: 1px solid rgba(158, 140, 255, 0.17);
  border-radius: 99rem;
  color: #bcb2ff;
  background: var(--violet-soft);
  font-size: 0.45rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dialogs and feedback */
.app-dialog {
  width: min(35rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-1);
  background: transparent;
  box-shadow: var(--shadow-hard);
}

.app-dialog::backdrop {
  background: rgba(2, 4, 10, 0.78);
  backdrop-filter: blur(10px);
}

.modal-card {
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  border-radius: inherit;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.09), transparent 18rem),
    var(--night-2);
}

.modal-card h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.modal-card > p:not(.eyebrow) {
  color: var(--ink-2);
  font-size: 0.78rem;
  line-height: 1.6;
}

.modal-player-line {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0.9rem 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.42);
  font-size: 0.68rem;
}

.modal-player-line > span:last-child {
  margin-left: auto;
  color: var(--aqua);
  font-size: 0.58rem;
  font-weight: 780;
}

.modal-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.modal-actions-stack {
  align-items: stretch;
  flex-direction: column;
}

.button-primary {
  border-color: rgba(242, 184, 75, 0.6);
  color: #1a1204;
  background: var(--amber);
  box-shadow: 0 0.4rem 1.3rem rgba(242, 184, 75, 0.14);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink-1);
  background: var(--night-3);
}

.button-danger {
  border-color: rgba(255, 107, 107, 0.48);
  color: #fff4f4;
  background: #b93f4b;
}

.dialog-card {
  position: relative;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-radius: inherit;
  background:
    radial-gradient(circle at 100% 0, rgba(89, 216, 255, 0.1), transparent 18rem),
    var(--night-2);
}

.dialog-card--compact {
  text-align: center;
}

.dialog-card h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
}

.dialog-card > p:not(.section-kicker) {
  color: var(--ink-2);
  font-size: 0.8rem;
  line-height: 1.6;
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.58rem;
  color: var(--ink-2);
  background: rgba(5, 8, 17, 0.48);
  font-size: 1.15rem;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--ink-0);
  background: var(--night-4);
}

.dialog-player-header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding-right: 2.2rem;
}

.dialog-player-header .player-position-badge {
  min-width: 3rem;
  min-height: 3rem;
  border-radius: 0.85rem;
  font-size: 0.76rem;
}

.dialog-player-header h2 {
  margin-bottom: 0.2rem;
}

.dialog-player-meta {
  margin-bottom: 0;
  color: var(--ink-3);
  font-size: 0.72rem;
}

.dialog-card > .dialog-pick-context {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.dialog-pick-context time {
  color: var(--amber);
  font-weight: 900;
}

.dialog-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.3rem 0;
}

.dialog-metrics > div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 19, 0.47);
}

.dialog-metrics span,
.dialog-metrics strong {
  display: block;
}

.dialog-metrics span {
  margin-bottom: 0.32rem;
  color: var(--ink-3);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.dialog-metrics strong {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-fit {
  padding: 0.85rem;
  border: 1px solid rgba(89, 216, 255, 0.15);
  border-radius: var(--radius-sm);
  background: var(--aqua-soft);
}

.dialog-fit p:last-child {
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: 0.74rem;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.fast-forward-progress {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.fast-forward-progress progress {
  width: 100%;
  height: 0.75rem;
  overflow: hidden;
  border: 0;
  border-radius: 99rem;
  accent-color: var(--aqua);
}

.fast-forward-progress strong {
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.player-stat-details-meta {
  margin-bottom: 1rem;
}

.player-stat-details-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.player-stat-details-list > div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.34fr) minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 19, 0.48);
}

.player-stat-details-list dt {
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.player-stat-details-list dd {
  min-width: 0;
  margin: 0;
}

.player-stat-details-list dd strong,
.player-stat-details-list dd span {
  display: block;
}

.player-stat-details-list dd strong {
  margin-bottom: 0.35rem;
  color: var(--aqua);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.player-stat-details-list dd span {
  color: var(--ink-2);
  font-size: 0.74rem;
  line-height: 1.55;
}

.dialog-alert-mark,
.completion-mark {
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  margin: 0 auto 1rem;
  place-items: center;
  border: 1px solid rgba(255, 201, 107, 0.25);
  border-radius: 1rem;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 1.3rem;
  font-weight: 900;
}

.reset-details {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem 1rem;
  margin: 1.2rem 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 19, 0.45);
  font-size: 0.7rem;
  text-align: left;
}

.reset-details span {
  color: var(--ink-3);
}

.reset-details strong {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-align: right;
}

.completion-card {
  text-align: center;
}

.completion-mark {
  border-color: rgba(185, 243, 107, 0.28);
  color: var(--lime);
  background: var(--lime-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.completion-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.completion-summary > div {
  padding: 0.8rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 9, 19, 0.45);
}

.completion-summary span,
.completion-summary strong {
  display: block;
}

.completion-summary span {
  margin-bottom: 0.3rem;
  color: var(--ink-3);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.completion-summary strong {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.toast-region {
  position: fixed;
  z-index: 350;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  width: min(22rem, calc(100vw - 2rem));
  gap: 0.55rem;
  pointer-events: none;
}

.toast-region.dialog-toast-region {
  z-index: 20;
  right: 0.75rem;
  bottom: 0.75rem;
  width: min(22rem, calc(100vw - 1.5rem));
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.16rem 0.65rem;
  align-items: center;
  padding: 0.78rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 40, 0.96);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
  user-select: none;
  animation: toast-in 220ms ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.98);
  }
}

.toast::before {
  grid-row: 1 / span 2;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0.7rem rgba(89, 216, 255, 0.55);
  content: "";
}

.toast.is-success::before {
  background: var(--lime);
  box-shadow: 0 0 0.7rem rgba(185, 243, 107, 0.55);
}

.toast.is-error::before {
  background: var(--red);
  box-shadow: 0 0 0.7rem rgba(255, 113, 132, 0.55);
}

.toast p {
  min-width: 0;
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.toast strong {
  display: block;
  min-width: 0;
  margin-bottom: 0.1rem;
  font-size: 0.73rem;
  overflow-wrap: anywhere;
}

.noscript-banner {
  position: fixed;
  z-index: 999;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 113, 132, 0.35);
  border-radius: var(--radius-sm);
  color: #ffdce1;
  background: #481521;
  box-shadow: var(--shadow-hard);
  text-align: center;
}

/* Readability floor for dense draft-room and simulation metadata. */
.order-preview-orbit span,
kbd,
.draft-seat span,
.center-view-tab,
.cpu-rationale-chip,
.player-table thead th,
.player-team,
.player-position-badge,
.future-tag,
.column-footer,
.board-legend,
.board-round-label,
.board-pick.is-keeper .board-player-name,
.board-pick-number,
.board-player-meta,
.fit-cell span,
.compact-trade-list > div > span,
.compact-trade-list small,
.upcoming-pick-sequence small,
.upcoming-pick-copy small,
.queue-index,
.queue-copy span,
.need-chip,
.my-roster .roster-slot,
.my-roster .roster-slot-label,
.my-roster .roster-slot-player small,
.roster-overflow-warning,
.team-avatar,
.team-review-card header p,
.player-chip,
.player-chip small,
.team-review-card details,
.team-review-card .detail-label,
.timeline-event > span,
.timeline-event p,
.order-list li,
.order-list li > small,
.trade-list > div,
.check-list li,
.source-note,
.team-order-row small,
.team-order-row .next-pick,
.board-team,
.board-round,
.board-cell strong,
.board-cell small,
.board-cell.is-keeper strong,
.future-cell small,
.future-badge,
.muted,
.bye-cell span,
.stat-heading i,
.roster-groups h4,
.roster-player strong,
.roster-empty,
.need-chip > span,
.need-chip > strong,
.need-chip > small,
.recent-pick > span,
.recent-pick small,
.recent-pick em,
.modal-player-line > span:last-child,
.dialog-metrics span,
.completion-summary span,
.mobile-nav-badge {
  font-size: 0.68rem;
}

.my-roster .roster-slot-player strong,
.my-roster .roster-group-label,
.draft-player-button,
.draft-button {
  font-size: 0.74rem;
}

/* Targeted type lift after removing repeated row-level labels. */
#clock-label,
.force-cpu-pick-button,
.pool-total,
.active-filter-bar,
.player-table thead th,
.rank-cell,
.player-cell span.player-team,
.player-position-badge,
.future-tag,
.queue-turn-badge,
.player-stat-details-button,
.board-player-meta,
.board-pick-number,
.board-round-label,
.upcoming-pick-sequence small,
.upcoming-pick-copy small,
.queue-copy span,
.recent-pick-copy span,
.queue-index,
.recent-pick-index,
.roster-count,
.queue-count,
.empty-list-item,
.my-roster .roster-slot-label,
.my-roster .roster-slot-player small,
.freshness-date,
.simulation-phases span,
.review-table thead th,
.tab-step,
.tab-count,
.section-kicker,
.context-chip,
.metric-label,
.keeper-priority-list small,
.keeper-live-player-copy span,
.keeper-draft-room-header-stats span,
.mobile-nav-button {
  font-size: 0.72rem;
}

.center-view-tab,
.field-help,
.field-error,
.queue-copy strong,
.recent-pick-copy strong,
.upcoming-pick-copy strong {
  font-size: 0.76rem;
}

.player-cell strong.player-name,
.my-roster .roster-slot-player strong {
  font-size: 0.78rem;
}

.numeric-cell strong,
.fit-cell strong,
.bye-cell strong,
.tb-value,
.board-player-name {
  font-size: 0.74rem;
}

@media (max-width: 62rem) {
  .toast-region:not(.dialog-toast-region) {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .rosters-column > .column-header {
    display: none;
  }

  .league-rosters {
    padding: 0 0.5rem 0.5rem;
    scroll-padding-inline: 0.5rem;
    /*
     * Mobile roster paging is settled by the gesture handler after release.
     * Native scroll snapping stays off so it cannot pull a card toward a snap
     * point while the user's finger is still down.
    */
    scroll-snap-type: none;
    touch-action: pan-x pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
  }

  .league-rosters.is-roster-swiping {
    scroll-behavior: auto;
    cursor: grabbing;
  }

  .league-roster-lists {
    gap: 0.5rem;
  }

  .league-roster-list {
    flex-basis: min(18rem, calc(100vw - 2rem));
  }
}

/* Mid-size desktop and tablet */
@media (max-width: 82rem) {
  .draft-layout {
    grid-template-columns: minmax(14rem, 15.5rem) minmax(28rem, 1fr) minmax(17.5rem, 19.5rem);
  }

  .draft-seat {
    display: none;
  }

  .setup-grid {
    grid-template-columns: 1fr 1fr;
  }

  .setup-grid > :last-child {
    grid-column: 1 / -1;
  }

  .ready-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-panel > .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-panel > .review-grid--keepers {
    grid-template-columns: minmax(0, 1.15fr) minmax(15.5rem, 0.95fr) minmax(15.5rem, 0.9fr);
  }

  .setup-layout {
    grid-template-columns: 1fr 1fr;
  }

  .setup-layout > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 70rem) {
  .draft-layout {
    grid-template-columns: minmax(13rem, 14rem) minmax(26rem, 1fr) minmax(16.5rem, 18rem);
  }

  .player-controls {
    grid-template-columns: 1fr 1fr;
  }

  .search-control {
    grid-column: 1 / -1;
  }

  .data-status {
    display: none;
  }

  .review-panel > .review-grid--keepers {
    grid-template-columns: minmax(0, 1.15fr) minmax(15.5rem, 0.95fr) minmax(15.5rem, 0.9fr);
  }

  .keeper-draft-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.7fr);
  }
}

@media (min-width: 62.01rem) and (max-height: 42rem) {
  .draft-statusbar {
    min-height: 4.5rem;
    padding-block: 0.4rem;
  }

  .draft-round-context .section-kicker,
  .player-pool > .column-header .section-kicker {
    display: none;
  }

  .draft-context h1 {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    line-height: 1.25;
  }

  .draft-context-divider {
    display: none;
  }

  #pick-label {
    font-size: 0.68rem;
  }

  .turn-distance-label {
    margin-top: 0.16rem;
    font-size: 0.62rem;
  }

  .player-pool > .column-header {
    min-height: 3.15rem;
    align-items: center;
    padding: 0.42rem 0.58rem;
  }

  .player-pool > .column-header h2 {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .player-pool .column-header-actions {
    gap: 0.28rem;
  }

  .player-pool .pool-total {
    display: none;
  }

  .player-pool > .player-controls {
    grid-template-columns: minmax(9rem, 1.4fr) minmax(6rem, 0.8fr) minmax(6rem, 0.8fr);
    gap: 0.28rem;
    padding: 0.34rem 0.48rem;
  }

  .player-pool .search-control {
    grid-column: auto;
  }

  .player-pool .search-control input,
  .player-pool .select-control select {
    height: 2.25rem;
    min-width: 0;
    font-size: 0.62rem;
  }

  .player-pool > .active-filter-bar {
    min-height: 1.75rem;
    padding: 0.24rem 0.52rem;
  }

  .player-pool .filter-context {
    white-space: nowrap;
  }

  .player-pool .cpu-rationale-chip {
    display: none;
  }
}

/* Mobile draft room: bottom tabs switch the four primary views. */
@media (max-width: 62rem) {
  :root {
    --global-header-height: 4rem;
  }

  .draft-screen:not([hidden]) {
    height: calc(100dvh - var(--global-header-height));
    min-height: 0;
    max-height: calc(100dvh - var(--global-header-height));
    overflow: hidden;
  }

  .global-header {
    min-height: var(--global-header-height);
    padding: 0.58rem 0.8rem;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .review-screen {
    padding-top: 0.75rem;
  }

  .review-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-block: 0.5rem 1rem;
  }

  .review-hero h1 {
    max-width: 15ch;
  }

  .review-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-panel > .review-grid--keepers,
  .keeper-draft-layout {
    grid-template-columns: 1fr;
  }

  .setup-grid {
    grid-template-columns: 1fr;
  }

  .setup-grid > :last-child {
    grid-column: auto;
  }

  .ready-checks {
    grid-template-columns: 1fr;
  }

  .review-panel > .review-grid,
  .setup-layout,
  .keeper-timeline {
    grid-template-columns: 1fr;
  }

  .setup-layout > :last-child {
    grid-column: auto;
  }

  .section-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .draft-statusbar {
    position: sticky;
    top: 0;
    flex: 0 0 auto;
    grid-template-columns: minmax(7rem, 1fr) auto auto;
    gap: 0.55rem;
    min-height: 4.65rem;
    padding: 0.5rem 0.65rem;
  }

  .draft-context .section-kicker {
    display: none;
  }

  .draft-context h1 {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .draft-context-divider {
    display: none;
  }

  #pick-label {
    color: var(--ink-3);
    font-size: 0.62rem;
  }

  .turn-distance-label {
    margin-top: 0.12rem;
    font-size: 0.64rem;
  }

  .on-clock-card {
    gap: 0.65rem;
    min-width: min(16rem, 44vw);
    padding: 0.45rem 0.6rem;
    border-radius: 0.75rem;
  }

  #on-clock-team {
    max-width: 8rem;
    font-size: 0.65rem;
  }

  .draft-clock {
    font-size: clamp(1.45rem, 5vw, 2rem);
  }

  .sound-toggle,
  .draft-pause-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }

  .force-cpu-pick-button {
    min-height: 2.75rem;
    padding-inline: 0.58rem;
  }

  .draft-status-actions .button--quiet,
  .draft-status-actions .button--danger-quiet {
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    gap: 0;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    line-height: 1;
  }

  .draft-status-actions .button--quiet .button-icon {
    color: var(--ink-1);
  }

  #export-btn .button-icon--export {
    margin: 0;
  }

  #simulate-rest-btn::before {
    color: var(--aqua);
    content: "»";
    font-size: 1rem;
  }

  #reset-btn::before {
    color: var(--red);
    content: "↻";
    font-size: 1rem;
  }

  #simulate-rest-btn::before,
  #reset-btn::before {
    display: grid;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    place-items: center;
    line-height: 1;
  }

  .draft-layout {
    display: block;
    min-height: 0;
    overflow: hidden;
    padding: 0.5rem 0.5rem calc(4.75rem + env(safe-area-inset-bottom));
  }

  .draft-column:not(.team-rail),
  .rail-section[data-mobile-panel] {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  .team-rail {
    display: contents;
  }

  .rail-stack {
    display: contents;
  }

  .rail-section--recent {
    display: none;
  }

  [data-mobile-panel] {
    display: none;
  }

  body:not([data-active-mobile-view]) #players-panel,
  body[data-active-mobile-view="players"] #players-panel,
  body[data-active-mobile-view="board"] #board-panel,
  body[data-active-mobile-view="rosters"] #rosters-panel {
    display: flex;
    animation: panel-in 180ms ease both;
  }

  body[data-active-mobile-view="queue"] #queue-panel,
  body[data-active-mobile-view="team"] #my-team-panel,
  body[data-active-mobile-view="picks"] #league-order-panel {
    display: block;
    overflow-y: auto;
    animation: panel-in 180ms ease both;
  }

  .mobile-recent-picks-section {
    display: block;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line-strong);
  }

  .mobile-recent-picks-section header {
    margin-bottom: 0.55rem;
  }

  .mobile-recent-picks-section h3 {
    margin-bottom: 0;
    font-size: 0.9rem;
  }

  .mobile-recent-picks-section .recent-pick {
    grid-template-areas:
      "index copy"
      "reason reason";
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .mobile-recent-picks-section .recent-pick-index {
    grid-area: index;
  }

  .mobile-recent-picks-section .recent-pick-copy {
    grid-area: copy;
  }

  .mobile-recent-picks-section .recent-pick em {
    grid-area: reason;
    max-width: calc(100% - 2.55rem);
    margin-left: 2.55rem;
    overflow: visible;
    justify-self: stretch;
    text-overflow: clip;
    white-space: normal;
  }

  .center-view-tabs {
    display: none;
  }

  .draft-board-grid,
  .board-grid {
    min-width: 72rem;
  }

  .draft-board-grid {
    grid-template-columns: 2.3rem repeat(12, minmax(5.75rem, 1fr));
  }

  .draft-board-grid .board-team-header .board-player-name {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .board-grid {
    grid-template-columns: 3rem repeat(var(--team-count), minmax(5.75rem, 1fr));
  }

  .player-pool > .column-header,
  .player-pool > .player-controls,
  .player-pool > .active-filter-bar {
    flex: 0 0 auto;
  }

  .column-header-actions {
    justify-content: flex-end;
  }

  .player-table-wrap {
    overflow: visible;
    flex: 0 0 auto;
    padding: 0.5rem;
    background: rgba(5, 9, 19, 0.32);
  }

  .player-pool {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .player-table {
    display: block;
    min-width: 0;
  }

  .player-table thead {
    position: sticky;
    z-index: 6;
    top: 0;
    display: block;
    overflow-x: auto;
    margin: -0.5rem -0.5rem 0.5rem;
    padding: 0.42rem 0.5rem;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 11, 20, 0.96);
    scrollbar-width: thin;
  }

  .player-table thead tr {
    display: flex;
    width: max-content;
    gap: 0.38rem;
  }

  .player-table thead th {
    position: static;
    display: none;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .player-table thead th[data-sort-header] {
    display: block;
  }

  .player-table thead th:not([data-sort-header]) {
    position: absolute;
    display: block;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .player-table thead .actions-column {
    left: auto;
    width: auto;
    min-width: 0;
    box-shadow: none;
  }

  .player-table thead .table-sort-button {
    min-height: 2.75rem;
    padding: 0.52rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    justify-content: center;
    color: var(--ink-2);
    background: rgba(21, 32, 51, 0.84);
  }

  .player-table thead .table-sort-button.is-active {
    border-color: rgba(89, 216, 255, 0.42);
    color: var(--aqua);
    background: rgba(89, 216, 255, 0.12);
  }

  .player-table thead .stat-info-button {
    display: none;
  }

  .player-table tbody {
    display: grid;
    gap: 0.5rem;
  }

  .player-table tbody tr:not(.loading-row) {
    display: grid;
    min-width: 0;
    grid-template-columns: 2rem minmax(0, 1fr) repeat(4, auto);
    grid-template-areas:
      "actions actions actions actions actions actions"
      "rank player player player player pos"
      "projection positionrank adp bonus bye fit"
      "timeline timeline timeline timeline timeline timeline";
    gap: 0.5rem 0.65rem;
    align-items: center;
    padding: 0.72rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: rgba(21, 32, 51, 0.82);
    box-shadow: 0 0.4rem 1.4rem rgba(0, 0, 0, 0.14);
  }

  .player-table tbody tr:not(.loading-row):hover {
    border-color: var(--line-strong);
    background: rgba(29, 42, 64, 0.92);
  }

  .player-table tbody tr:not(.loading-row) td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(1) {
    grid-area: actions;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(2) {
    grid-area: rank;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(3) {
    grid-area: player;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(4) {
    grid-area: pos;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(5) {
    grid-area: bye;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(6) {
    grid-area: projection;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(7) {
    grid-area: positionrank;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(8) {
    grid-area: adp;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(9) {
    grid-area: bonus;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(10) {
    grid-area: timeline;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(11) {
    grid-area: fit;
  }

  .player-table tbody .player-cell {
    min-width: 0;
  }

  .player-stat-details-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .app-dialog .dialog-close {
    width: 2.75rem;
    height: 2.75rem;
  }

  .player-table tbody .stat-tooltip-target {
    display: grid;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-content: center;
  }

  .player-table tbody .player-actions {
    position: static;
    display: flex;
    width: 100%;
    gap: 0.28rem;
    min-width: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    justify-content: flex-start;
    background: transparent;
    box-shadow: none;
  }

  .player-table .icon-button,
  .player-table .draft-button,
  .player-table .draft-player-button {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .player-table .draft-button,
  .player-table .draft-player-button {
    min-width: 5.25rem;
  }

  .queue-actions button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .queue-list li:not(.empty-list-item) {
    grid-template-areas:
      "index copy"
      "actions actions";
    grid-template-columns: 2rem minmax(0, 1fr);
    padding-block: 0.55rem;
  }

  .queue-list .queue-index {
    grid-area: index;
  }

  .queue-list .queue-copy {
    grid-area: copy;
  }

  .queue-list .queue-actions {
    grid-area: actions;
    justify-content: flex-end;
    padding-top: 0.2rem;
  }

  .queue-copy strong,
  .recent-pick-copy strong,
  .upcoming-pick-copy strong {
    font-size: 0.76rem;
  }

  .queue-copy span,
  .recent-pick-copy span,
  .upcoming-pick-copy small,
  .empty-list-item {
    font-size: 0.68rem;
  }

  .queue-index,
  .recent-pick-index,
  .upcoming-pick-sequence strong,
  .roster-count,
  .queue-count {
    font-size: 0.7rem;
  }

  .queue-actions .queue-draft-button {
    width: auto;
    min-width: 5.25rem;
  }

  .mobile-nav {
    position: fixed;
    z-index: 80;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(4.25rem + env(safe-area-inset-bottom));
    padding: 0.35rem 0.5rem env(safe-area-inset-bottom);
    border-top: 1px solid var(--line-strong);
    background: rgba(7, 11, 22, 0.94);
    box-shadow: 0 -0.6rem 2.5rem rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-button {
    position: relative;
    display: flex;
    gap: 0.26rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.68rem;
    color: var(--ink-3);
    background: transparent;
    flex-direction: column;
    font-size: 0.7rem;
    font-weight: 780;
  }

  .mobile-nav-button.is-active,
  .mobile-nav-button[aria-current="page"] {
    color: var(--aqua);
    background: var(--aqua-soft);
  }

  body.user-on-clock .mobile-nav-button[data-mobile-view="players"]::after {
    position: absolute;
    top: 0.28rem;
    right: 0.45rem;
    width: 0.42rem;
    height: 0.42rem;
    border: 0.08rem solid var(--night-1);
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0.7rem rgba(242, 184, 75, 0.72);
    content: "";
  }

  .mobile-nav-icon {
    position: relative;
    display: block;
    width: 1.15rem;
    height: 1.15rem;
  }

  .mobile-nav-icon--players::before,
  .mobile-nav-icon--players::after {
    position: absolute;
    right: 0;
    left: 0;
    height: 0.12rem;
    border-radius: 1rem;
    background: currentColor;
    content: "";
    box-shadow: 0 0.34rem 0 currentColor, 0 0.68rem 0 currentColor;
  }

  .mobile-nav-icon--players::before {
    top: 0.1rem;
    width: 0.18rem;
  }

  .mobile-nav-icon--players::after {
    top: 0.1rem;
    left: 0.35rem;
  }

  svg.mobile-nav-icon--picks,
  svg.mobile-nav-icon--queue,
  svg.mobile-nav-icon--rosters {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    overflow: visible;
    flex: 0 0 auto;
  }

  .mobile-nav-icon--board {
    border: 0.1rem solid currentColor;
    border-radius: 0.16rem;
    background:
      linear-gradient(90deg, transparent 45%, currentColor 46%, currentColor 54%, transparent 55%),
      linear-gradient(transparent 45%, currentColor 46%, currentColor 54%, transparent 55%);
  }

  .mobile-nav-badge {
    position: absolute;
    top: 0.25rem;
    left: calc(50% + 0.55rem);
    display: grid;
    min-width: 1.15rem;
    height: 1.15rem;
    padding-inline: 0.2rem;
    place-items: center;
    border: 0.1rem solid var(--night-1);
    border-radius: 99rem;
    color: #071019;
    background: var(--amber);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 900;
  }

  .toast-region {
    bottom: calc(4.8rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 44.01rem) and (max-width: 62rem) and (max-height: 38rem) {
  :root {
    --global-header-height: 3.5rem;
  }

  .global-header {
    min-height: var(--global-header-height);
    padding-block: 0.35rem;
  }

  .global-header-actions .button--compact,
  .roster-team-picker select {
    min-height: 2.75rem;
  }

  .roster-team-picker select {
    height: 2.75rem;
    background-position:
      calc(100% - 0.78rem) 1.18rem,
      calc(100% - 0.53rem) 1.18rem;
    font-size: 0.72rem;
  }

  .draft-statusbar {
    min-height: 3.65rem;
    padding-block: 0.35rem;
  }

  .on-clock-card {
    padding-block: 0.3rem;
  }

  .draft-layout {
    padding-bottom: calc(3.7rem + env(safe-area-inset-bottom));
  }

  .mobile-nav {
    min-height: calc(3.45rem + env(safe-area-inset-bottom));
    padding-block: 0.2rem env(safe-area-inset-bottom);
  }

  .mobile-nav-button {
    gap: 0.42rem;
    flex-direction: row;
  }

  .player-pool > .column-header,
  .player-pool > .active-filter-bar {
    display: none;
  }

  .player-pool > .player-controls {
    grid-template-columns: minmax(12rem, 1.5fr) repeat(2, minmax(8rem, 1fr));
    padding-block: 0.25rem;
  }

  .player-pool .search-control {
    grid-column: auto;
  }

  .player-table thead {
    margin-bottom: 0.3rem;
    padding-block: 0.18rem;
  }

  .player-table tbody tr:not(.loading-row) {
    grid-template-columns: auto minmax(8rem, 1fr) repeat(3, minmax(3.5rem, auto));
    grid-template-areas:
      "actions player player player pos"
      "rank projection positionrank adp bye"
      "bonus timeline timeline fit fit";
  }

  .player-table tbody .player-actions {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .board-column > .column-header {
    min-height: 3.25rem;
    align-items: center;
    padding: 0.45rem 0.65rem;
  }

  .board-column > .column-header .section-kicker {
    display: none;
  }

  .board-column > .column-header h2 {
    font-size: 0.88rem;
  }

  .board-column > .board-footer {
    min-height: 0;
    padding: 0.34rem 0.55rem;
  }

  .toast-region {
    bottom: calc(3.9rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 44rem) {
  .review-workspace {
    overflow: visible;
  }

  .keeper-review-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .keeper-team-picker {
    width: 100%;
  }

  .review-grid--keepers .review-table-wrap {
    max-height: none;
  }

  .keeper-team-picker select,
  .roster-team-picker select {
    min-height: 2.75rem;
    font-size: 0.78rem;
  }

  .keeper-team-picker > span {
    font-size: 0.7rem;
  }

  .global-header-actions .button--compact {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .keeper-pool-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .keeper-pool-list small {
    max-width: none;
    text-align: left;
  }

  .keeper-draft-team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-draft-selection strong {
    white-space: normal;
  }

  .button-label-full {
    display: none;
  }

  .button-label-short {
    display: inline;
  }

  .review-screen {
    padding-inline: 0.72rem;
  }

  .data-freshness-banner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
  }

  .data-freshness-banner > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .freshness-date {
    grid-column: 2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .review-hero {
    min-height: auto;
  }

  .review-hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .hero-summary {
    font-size: 0.92rem;
  }

  .hero-meta {
    gap: 0.35rem;
  }

  .hero-meta span {
    font-size: 0.68rem;
  }

  .simulation-card {
    padding: 1rem;
  }

  .simulation-phases span {
    font-size: 0.64rem;
  }

  .review-workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-run-id {
    margin-bottom: 0;
  }

  .segmented-tabs {
    position: sticky;
    z-index: 40;
    top: calc(var(--global-header-height) + 0.25rem);
    gap: 0.22rem;
    margin-inline: 0.7rem;
    padding: 0.25rem;
    background: rgba(4, 7, 15, 0.94);
    box-shadow: 0 0.55rem 1.4rem rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px) saturate(125%);
  }

  .segmented-tab {
    min-height: 3.3rem;
    gap: 0.15rem;
    padding: 0.45rem 0.25rem;
    flex-direction: column;
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .tab-step {
    display: none;
  }

  .tab-count {
    min-width: 1.2rem;
    min-height: 1.2rem;
    font-size: 0.64rem;
  }

  .review-panels {
    padding: 0.7rem;
  }

  .review-stats {
    gap: 0.45rem;
  }

  .metric-card {
    min-height: 6.5rem;
    padding: 0.8rem;
  }

  .metric-label,
  .metric-note {
    font-size: 0.74rem;
  }

  .review-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .review-table {
    min-width: 35rem;
    font-size: 0.8rem;
  }

  .review-table thead th {
    font-size: 0.7rem;
  }

  .review-table th:first-child,
  .review-table td:first-child {
    position: sticky;
    z-index: 2;
    left: 0;
    background: #0b1322;
    box-shadow: 1px 0 0 var(--line-strong), 0.45rem 0 0.9rem rgba(2, 5, 12, 0.28);
  }

  .review-table thead th:first-child {
    z-index: 4;
    background: #101a2b;
  }

  .review-table-wrap:focus-visible {
    border-radius: var(--radius-sm);
    outline: 0.16rem solid var(--aqua);
    outline-offset: 0.12rem;
  }

  .keeper-chip-list {
    grid-template-columns: 1fr;
  }

  .keeper-review-section-heading span:not(.context-chip) {
    font-size: 0.68rem;
  }

  .keeper-chip-list li:not(.skeleton-line) {
    font-size: 0.78rem;
  }

  .keeper-pool-list strong {
    font-size: 0.78rem;
  }

  .keeper-pool-list span {
    font-size: 0.7rem;
  }

  .keeper-pool-list small {
    font-size: 0.66rem;
  }

  .review-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 0.85rem 0.7rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .review-actions-copy {
    display: none;
  }

  .button-row,
  .button-row .button {
    width: 100%;
  }

  .review-actions .button-row {
    flex-direction: column;
  }

  .draft-statusbar {
    grid-template-areas:
      "context actions"
      "clock clock";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.55rem;
    padding-block: 0.5rem 0.65rem;
  }

  .draft-context {
    grid-area: context;
    min-width: 0;
  }

  .on-clock-card {
    grid-area: clock;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }

  .on-clock-meta {
    max-width: none;
  }

  #on-clock-team {
    max-width: min(22rem, 72vw);
  }

  .draft-status-actions {
    grid-area: actions;
    gap: 0.3rem;
  }

  .draft-status-actions .button--compact {
    width: 2.75rem;
    min-height: 2.75rem;
  }

  .draft-column {
    border-radius: 0.8rem;
  }

  .player-controls {
    grid-template-columns: 1fr 1fr;
  }

  .select-control select {
    min-width: 0;
  }

  .active-filter-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.28rem 0.5rem;
    font-size: 0.66rem;
  }

  .sort-context {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    border: 0;
    grid-column: 1 / -1;
    color: var(--ink-2);
  }

  .cpu-rationale-chip {
    max-width: 100%;
  }

  .board-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.28rem 0.65rem;
  }

  .board-footer > [data-board-progress] {
    min-width: 0;
  }

  .board-footer .board-direction {
    grid-column: 2;
    grid-row: 1;
  }

  .board-swipe-hint {
    display: inline;
    grid-column: 1 / -1;
    grid-row: 2;
    color: var(--ink-2);
  }

  .dialog-metrics {
    grid-template-columns: 1fr;
  }

  .completion-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.85rem;
  }

  .completion-summary > div {
    padding: 0.62rem 0.28rem;
  }

  .completion-card .dialog-actions {
    margin-top: 0.85rem;
  }

  .player-stat-details-list > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .dialog-actions--stack-mobile,
  .dialog-card--compact .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-actions--stack-mobile .button,
  .dialog-card--compact .dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 25rem) {
  .brand-league {
    display: none;
  }

  .player-pool .pool-total {
    display: none;
  }

  .rail-section--roster .rail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .roster-team-controls {
    justify-items: stretch;
  }

  .roster-team-picker select {
    width: 100%;
  }

  .roster-count {
    text-align: right;
  }

  .review-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #on-clock-team {
    max-width: min(14rem, 62vw);
  }
}

@media (max-width: 44rem) and (max-height: 38rem) {
  .player-pool > .column-header {
    display: none;
  }

  .player-pool > .active-filter-bar {
    display: none;
  }

  .player-table thead {
    margin-bottom: 0.3rem;
    padding-block: 0.25rem;
  }

  .player-table tbody tr:not(.loading-row) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "actions actions player player"
      "rank projection positionrank pos"
      "adp bonus bye fit"
      "timeline timeline timeline timeline";
    gap: 0.42rem 0.3rem;
    padding: 0.62rem;
  }

  .player-table tbody .player-actions {
    width: max-content;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .player-table tbody .player-actions > button {
    flex: 0 0 auto;
  }

  .player-table .draft-player-button {
    min-width: 4.25rem;
  }

  .board-column > .column-header {
    min-height: 3.25rem;
    align-items: center;
    padding: 0.45rem 0.65rem;
  }

  .board-column > .column-header .section-kicker {
    display: none;
  }

  .board-column > .column-header h2 {
    font-size: 0.88rem;
  }

  .board-column .board-legend {
    gap: 0.45rem;
  }

  .board-team-picker {
    gap: 0.3rem;
  }

  .board-team-picker select {
    width: min(12rem, 34vw);
    min-height: 2.75rem;
    font-size: 0.72rem;
  }

  .board-column > .board-footer {
    min-height: 0;
    padding: 0.34rem 0.55rem;
  }
}

@media (min-width: 32rem) and (max-height: 38rem) {
  .app-dialog {
    max-height: calc(100dvh - 0.75rem);
  }

  .roster-team-picker select {
    width: min(15rem, 45vw);
  }

  .dialog-card {
    max-height: calc(100dvh - 0.75rem);
    padding: 0.8rem 1rem;
  }

  .dialog-card h2 {
    margin-bottom: 0.35rem;
    font-size: 1.15rem;
  }

  .dialog-card > p:not(.section-kicker) {
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .dialog-alert-mark,
  .completion-mark {
    width: 2.4rem;
    height: 2.4rem;
    margin-bottom: 0.35rem;
    border-radius: 0.72rem;
  }

  .dialog-card .section-kicker {
    margin-bottom: 0.2rem;
  }

  .reset-details {
    gap: 0.3rem 0.75rem;
    margin: 0.55rem 0;
    padding: 0.55rem 0.7rem;
    font-size: 0.64rem;
  }

  .completion-summary {
    gap: 0.38rem;
    margin-top: 0.55rem;
  }

  .completion-summary > div {
    padding: 0.5rem 0.4rem;
  }

  .dialog-actions {
    position: sticky;
    z-index: 5;
    bottom: -0.8rem;
    margin: 0.65rem -1rem -0.8rem;
    padding: 0.6rem 1rem 0.8rem;
    background: linear-gradient(to bottom, rgba(11, 18, 32, 0.9), var(--night-2) 32%);
    box-shadow: 0 -0.55rem 1rem rgba(2, 5, 12, 0.3);
  }

  .dialog-actions--stack-mobile,
  .dialog-card--compact .dialog-actions {
    align-items: stretch;
    flex-direction: row;
  }

  .dialog-actions--stack-mobile .button,
  .dialog-card--compact .dialog-actions .button {
    width: auto;
    flex: 1 1 0;
  }
}

@media (min-width: 32rem) and (max-width: 44rem) and (max-height: 38rem) {
  :root {
    --global-header-height: 3.5rem;
  }

  .global-header {
    min-height: var(--global-header-height);
    padding-block: 0.35rem;
  }

  .global-header-actions .button--compact,
  .roster-team-picker select {
    min-height: 2.75rem;
  }

  .draft-statusbar {
    grid-template-areas: "context clock actions";
    grid-template-columns: minmax(6rem, 0.65fr) minmax(12rem, 1fr) auto;
    gap: 0.5rem;
    min-height: 3.65rem;
    padding-block: 0.35rem;
  }

  .on-clock-card {
    width: auto;
    min-width: 0;
    padding-block: 0.3rem;
  }

  #on-clock-team {
    max-width: 9rem;
  }

  .draft-layout {
    padding-bottom: calc(3.7rem + env(safe-area-inset-bottom));
  }

  .mobile-nav {
    min-height: calc(3.45rem + env(safe-area-inset-bottom));
    padding-block: 0.2rem env(safe-area-inset-bottom);
  }

  .mobile-nav-button {
    gap: 0.42rem;
    flex-direction: row;
  }

  .player-pool > .player-controls {
    grid-template-columns: minmax(12rem, 1.5fr) repeat(2, minmax(8rem, 1fr));
    padding-block: 0.25rem;
  }

  .player-pool .search-control {
    grid-column: auto;
  }

  .player-table thead {
    margin-bottom: 0.3rem;
    padding-block: 0.18rem;
  }

  .player-table tbody tr:not(.loading-row) {
    grid-template-columns: auto minmax(8rem, 1fr) repeat(3, minmax(3.5rem, auto));
    grid-template-areas:
      "actions player player player pos"
      "rank projection positionrank adp bye"
      "bonus timeline timeline fit fit";
  }

  .player-table tbody .player-actions {
    width: max-content;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .board-column > .column-header {
    min-height: 3.25rem;
    align-items: center;
    padding: 0.45rem 0.65rem;
  }

  .board-column > .column-header .section-kicker {
    display: none;
  }

  .board-column > .column-header h2 {
    font-size: 0.88rem;
  }

  .board-column > .board-footer {
    min-height: 0;
    padding: 0.34rem 0.55rem;
  }

  .toast-region {
    bottom: calc(3.9rem + env(safe-area-inset-bottom));
  }

  .dialog-toast-region {
    bottom: 0.75rem;
  }
}

@media (min-width: 32rem) and (max-width: 62rem) and (max-height: 38rem) {
  .review-screen {
    padding: 0.7rem 0.75rem calc(4.7rem + env(safe-area-inset-bottom));
  }

  .review-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(16rem, 0.92fr);
    gap: 1rem;
    min-height: 0;
    padding-block: 0.45rem 0.9rem;
  }

  .review-hero h1 {
    max-width: 12ch;
    margin-bottom: 0.65rem;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    line-height: 1;
  }

  .review-hero .eyebrow {
    margin-bottom: 0.55rem;
  }

  .hero-summary {
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .hero-meta {
    display: none;
  }

  .hero-meta span {
    min-height: 1.6rem;
    padding: 0.22rem 0.48rem;
    font-size: 0.6rem;
  }

  .simulation-card {
    padding: 0.8rem;
  }

  .simulation-card-topline {
    margin-bottom: 0.65rem;
  }

  .simulation-card h2 {
    font-size: 1rem;
  }

  .simulation-card .simulation-phases {
    display: none;
  }

  .review-actions {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 0.38rem 0.7rem calc(0.38rem + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 0;
    background: rgba(7, 11, 22, 0.96);
    box-shadow: 0 -0.6rem 2rem rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
  }

  .review-actions .button-row {
    width: 100%;
    gap: 0.5rem;
    flex-direction: row;
  }

  .review-actions .button-row .button {
    width: auto;
    min-height: 2.75rem;
    flex: 1 1 0;
  }
}

@media (max-width: 31.99rem) {
  .review-screen {
    padding-bottom: calc(4.7rem + env(safe-area-inset-bottom));
  }

  .review-actions {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 0.38rem 0.55rem calc(0.38rem + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 0;
    background: rgba(7, 11, 22, 0.96);
    box-shadow: 0 -0.6rem 2rem rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
  }

  .review-actions .button-row {
    width: 100%;
    gap: 0.42rem;
    flex-direction: row;
  }

  .review-actions .button-row .button {
    width: auto;
    min-height: 2.75rem;
    padding-inline: 0.45rem;
    flex: 1 1 0;
    font-size: 0.72rem;
  }
}

@media (max-width: 31.99rem) and (max-height: 36rem) {
  :root {
    --global-header-height: 3.5rem;
  }

  .app-dialog {
    max-height: calc(100dvh - 0.75rem);
  }

  .dialog-card {
    max-height: calc(100dvh - 0.75rem);
    padding: 0.85rem;
  }

  .dialog-card h2 {
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
  }

  .dialog-card > p:not(.section-kicker) {
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .dialog-alert-mark,
  .completion-mark {
    width: 2.4rem;
    height: 2.4rem;
    margin-bottom: 0.4rem;
    border-radius: 0.72rem;
  }

  .completion-summary {
    gap: 0.35rem;
    margin-top: 0.6rem;
  }

  .completion-summary > div {
    padding: 0.5rem 0.3rem;
  }

  .global-header {
    min-height: var(--global-header-height);
    padding: 0.35rem 0.65rem;
  }

  .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .draft-statusbar {
    gap: 0.25rem 0.35rem;
    min-height: 0;
    padding: 0.3rem 0.55rem;
  }

  .on-clock-card {
    gap: 0.3rem;
    min-height: 2.75rem;
    padding-inline: 0.45rem;
    padding-block: 0;
  }

  #clock-label {
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .force-cpu-pick-button {
    width: 3.2rem;
    min-width: 3.2rem;
    gap: 0;
    padding-inline: 0;
  }

  .force-cpu-pick-button > span:first-child {
    display: none;
  }

  .force-cpu-pick-button > span:last-child {
    font-size: 0;
  }

  .force-cpu-pick-button > span:last-child::after {
    content: "Now";
    font-size: 0.62rem;
  }

  .draft-layout {
    padding-top: 0.35rem;
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .mobile-nav {
    min-height: calc(3.75rem + env(safe-area-inset-bottom));
    padding: 0.18rem 0.35rem env(safe-area-inset-bottom);
  }

  .mobile-nav-button {
    gap: 0.1rem;
    font-size: 0.64rem;
  }

  .player-controls {
    gap: 0.3rem;
    padding: 0.32rem 0.5rem;
  }

  .player-pool > .player-controls {
    grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 0.925fr));
    gap: 0.2rem;
    padding: 0.3rem 0.4rem;
  }

  .player-pool .search-control {
    grid-column: auto;
  }

  .player-pool .search-control kbd {
    display: none;
  }

  .player-pool .search-control input,
  .player-pool .select-control select {
    min-width: 0;
    font-size: 0.64rem;
  }

  .player-pool .search-control input {
    padding-right: 0.35rem;
    padding-left: 1.65rem;
  }

  .player-pool .search-icon {
    left: 0.55rem;
  }

  .player-pool .select-control select {
    padding-right: 1.05rem;
    padding-left: 0.42rem;
    background-position:
      calc(100% - 0.58rem) 50%,
      calc(100% - 0.38rem) 50%;
  }

  .player-table thead {
    margin-bottom: 0.2rem;
    padding-block: 0.18rem;
  }

  .toast-region {
    bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .dialog-toast-region {
    bottom: 0.75rem;
  }
}

@media (max-width: 18rem) and (max-height: 32rem) {
  .player-table tbody .player-actions {
    gap: 0.15rem;
  }

  .player-table .draft-player-button {
    min-width: 3.25rem;
    padding-inline: 0.3rem;
  }
}

/* Multi-franchise setup and live Keeper Draft */
.controlled-team-chip {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  flex-direction: column;
  padding: 0.36rem 0.68rem;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 0.7rem;
  background: rgba(45, 212, 191, 0.07);
  line-height: 1.1;
}

.controlled-team-chip span {
  color: var(--ink-3);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.controlled-team-chip strong {
  max-width: 14rem;
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--aqua);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-team-mobile-label {
  display: none;
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-board-row {
  display: contents;
}

#team-selection-modal {
  width: min(42rem, calc(100vw - 2rem));
}

#commissioner-modal {
  width: min(48rem, calc(100vw - 2rem));
}

#keeper-selection-modal {
  width: min(64rem, calc(100vw - 2rem));
}

.team-selection-card {
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.commissioner-entry {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  display: inline-flex;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.72rem;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(137, 153, 184, 0.54);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1;
}

.commissioner-entry:hover,
.commissioner-entry:focus-visible {
  border-color: var(--line);
  color: var(--ink-1);
  background: rgba(20, 30, 49, 0.72);
}

.commissioner-entry:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.25);
  outline-offset: 2px;
}

.team-selection-mark {
  display: grid;
  width: 3.8rem;
  height: 3.8rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 1rem;
  color: var(--aqua);
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.15), rgba(158, 140, 255, 0.08));
  box-shadow: 0 0 2.5rem rgba(45, 212, 191, 0.1);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.team-beer-art-mark {
  display: block;
  overflow: hidden;
  border-color: rgba(242, 184, 75, 0.58);
  border-radius: 50%;
  background: #080808;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 1.4rem rgba(242, 184, 75, 0.15);
}

.team-beer-art-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.team-selection-field,
.keeper-slot-field {
  display: grid;
  gap: 0.42rem;
}

.team-selection-field {
  margin-top: 1.3rem;
}

.team-selection-field > span,
.keeper-slot-field > span {
  color: var(--ink-2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.team-selection-field select,
.team-selection-field input,
.keeper-slot-field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 2.4rem 0.65rem 0.8rem;
  border: 1px solid var(--control-line);
  border-radius: 0.72rem;
  color: var(--ink-0);
  background: var(--night-1);
}

.team-selection-field select:focus-visible,
.team-selection-field input:focus-visible,
.keeper-slot-field select:focus-visible {
  border-color: var(--aqua);
  outline: 3px solid rgba(45, 212, 191, 0.2);
  outline-offset: 2px;
}

.commissioner-card {
  display: grid;
  max-height: calc(100dvh - 2rem);
  gap: 0.8rem;
  overflow: hidden;
}

.commissioner-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding-right: 2.5rem;
}

.commissioner-heading h2,
.commissioner-heading p {
  margin-bottom: 0;
}

.commissioner-auth-copy {
  color: var(--ink-2);
  font-size: 0.82rem;
  line-height: 1.55;
}

.commissioner-editor {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-gutter: stable;
}

.commissioner-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.7rem;
}

.commissioner-fields .team-selection-field,
.commissioner-player-move .team-selection-field {
  margin-top: 0;
}

.commissioner-eligible-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.commissioner-eligible-heading h3 {
  margin: 0;
  color: var(--ink-1);
  font-size: 0.9rem;
}

.commissioner-eligible-heading span {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.commissioner-eligible-list {
  display: grid;
  max-height: min(18rem, 34dvh);
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-gutter: stable;
}

.commissioner-eligible-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.38rem 0.45rem 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.62rem;
  background: rgba(7, 11, 20, 0.42);
}

.commissioner-eligible-list strong {
  overflow: hidden;
  color: var(--ink-1);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commissioner-eligible-list button {
  min-width: 4.3rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  color: var(--ink-2);
  background: var(--night-3);
  font-size: 0.68rem;
  font-weight: 780;
}

.commissioner-player-move {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.85rem;
}

.commissioner-player-move .button {
  min-height: 3rem;
}

.commissioner-utility-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
  margin-top: 0.85rem;
}

.commissioner-reset {
  color: #ffb1b1;
}

.field-help,
.field-warning,
.field-error {
  margin: 0.55rem 0 0;
  color: var(--ink-3);
  font-size: 0.68rem;
}

.field-warning {
  color: var(--amber);
}

.field-error {
  color: #ffb1b1;
}

.keeper-selection-card {
  overflow-x: hidden;
  padding: clamp(1rem, 2.5vw, 1.6rem);
}

.keeper-selection-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.keeper-selection-heading-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.keeper-selection-heading p:last-child {
  max-width: 44rem;
  margin: 0.35rem 0 0;
  color: var(--ink-2);
  font-size: 0.76rem;
}

.keeper-cost-provenance-note {
  margin: 0.7rem 0 0;
  border: 1px solid rgba(89, 216, 255, 0.2);
  border-radius: 0.72rem;
  color: var(--ink-2);
  background: rgba(89, 216, 255, 0.06);
  font-size: 0.74rem;
  line-height: 1.45;
}

.keeper-cost-provenance-note summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.5rem 0.72rem;
  color: var(--cyan);
  cursor: pointer;
  font-weight: 800;
}

.keeper-cost-provenance-note p {
  margin: 0;
  padding: 0 0.72rem 0.62rem;
}

.keeper-selection-slots {
  display: grid;
  width: 100%;
  min-inline-size: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.8rem;
  margin-top: 1rem;
  padding: 0;
  border: 0;
}

.keeper-slot-field {
  position: relative;
  padding: 0.66rem;
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  background: rgba(5, 8, 17, 0.35);
}

.keeper-slot-field.has-player {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.06);
}

.keeper-slot-field.is-locked {
  border-color: rgba(137, 153, 184, 0.14);
  background: rgba(5, 8, 17, 0.24);
}

.keeper-slot-field select:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.keeper-slot-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.keeper-slot-field > span small {
  color: var(--ink-3);
  font-size: 0.75rem;
}

.keeper-selection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.keeper-selection-summary > div {
  display: flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: var(--night-1);
}

.keeper-selection-summary span {
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 750;
}

.keeper-selection-summary strong {
  color: var(--ink-0);
  font-size: 0.76rem;
  text-align: right;
}

.keeper-selection-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.keeper-selection-actions .button {
  min-height: 3rem;
}

.keeper-draft-room-screen {
  width: 100%;
  min-height: calc(100dvh - var(--global-header-height));
  padding: clamp(1rem, 2vw, 1.6rem);
}

.keeper-draft-room-header {
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 0 1rem;
}

.keeper-draft-room-header h1 {
  margin: 0.12rem 0 0;
  color: var(--ink-0);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
}

.keeper-draft-room-header p:last-child {
  min-height: 1.15rem;
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: var(--ink-2);
  font-size: 0.74rem;
}

.keeper-draft-room-header-stats {
  display: flex;
  gap: 0.45rem;
}

.keeper-draft-room-header-stats > div {
  min-width: 7.5rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: rgba(11, 18, 32, 0.82);
}

.keeper-draft-room-header-stats span,
.keeper-draft-room-header-stats strong {
  display: block;
}

.keeper-draft-room-header-stats span {
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.keeper-draft-room-header-stats strong {
  margin-top: 0.2rem;
  color: var(--ink-0);
  font-size: 0.78rem;
}

.keeper-draft-room-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(24rem, 1.8fr) minmax(14rem, 0.8fr);
  gap: 0.85rem;
  align-items: start;
}

.keeper-draft-room-grid .surface-card {
  min-width: 0;
}

.keeper-priority-list,
.keeper-live-roster-list {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keeper-priority-list li {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.52rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: 0.62rem;
  background: rgba(5, 8, 17, 0.28);
}

.keeper-priority-list li.is-on-clock {
  border-color: rgba(185, 243, 107, 0.42);
  background: var(--lime-soft);
}

.keeper-priority-list li.is-user-team {
  box-shadow: inset 3px 0 0 var(--aqua);
}

.keeper-priority-list .priority-rank {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.keeper-priority-list strong {
  overflow: hidden;
  color: var(--ink-0);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-priority-list small {
  color: var(--ink-3);
  font-size: 0.68rem;
  white-space: nowrap;
}

.keeper-live-pool-card {
  min-height: 34rem;
}

.keeper-live-pool-header {
  gap: 0.8rem;
}

.keeper-live-player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  max-height: min(64dvh, 40rem);
  margin-top: 0.85rem;
  padding-right: 0.22rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.keeper-live-player-list:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 0.25rem;
}

.keeper-live-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  padding: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: rgba(5, 8, 17, 0.35);
}

.keeper-live-player.is-favorite-fit {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.05);
}

.keeper-live-player-copy {
  min-width: 0;
}

.keeper-live-player-copy strong,
.keeper-live-player-copy span {
  display: block;
}

.keeper-live-player-copy strong {
  overflow: hidden;
  color: var(--ink-0);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-live-player-copy span {
  margin-top: 0.2rem;
  color: var(--ink-3);
  font-size: 0.68rem;
}

.keeper-live-player-metrics {
  display: flex;
  gap: 0.32rem;
  margin-top: 0.4rem;
}

.keeper-live-player-metrics span {
  padding: 0.2rem 0.34rem;
  border-radius: 99rem;
  color: var(--ink-2);
  background: var(--night-4);
  font-size: 0.64rem;
  font-weight: 750;
}

.keeper-live-player .button {
  min-width: 5.3rem;
  min-height: 2.65rem;
  padding-inline: 0.7rem;
}

.keeper-live-player-list.is-waiting {
  display: grid;
  min-height: 15rem;
  overflow: hidden;
  place-items: center;
}

.keeper-live-waiting {
  max-width: 24rem;
  color: var(--ink-2);
  text-align: center;
}

.keeper-live-reveal {
  display: grid;
  width: min(100% - 1.5rem, 25rem);
  min-height: 10rem;
  padding: 1rem;
  border: 1px solid rgba(163, 230, 53, 0.34);
  border-radius: 0.9rem;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(163, 230, 53, 0.13), transparent 58%),
    rgba(15, 23, 38, 0.92);
  box-shadow: inset 0 0 0 1px rgba(163, 230, 53, 0.05);
  text-align: center;
}

.keeper-live-reveal-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.65rem;
  border: 1px solid rgba(163, 230, 53, 0.52);
  border-radius: 50%;
  place-items: center;
  color: var(--lime);
  background: rgba(163, 230, 53, 0.1);
  font-size: 1.15rem;
  font-weight: 900;
}

.keeper-live-reveal p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.keeper-live-reveal strong {
  margin-top: 0.3rem;
  color: var(--ink-0);
  font-size: 1.05rem;
}

.keeper-live-reveal > span:last-child:not(.keeper-live-reveal-mark) {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.74rem;
}

.keeper-zero-exception-picker {
  grid-column: 1 / -1;
  width: min(100%, 38rem);
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 0.9rem;
  background: rgba(45, 212, 191, 0.06);
}

.keeper-zero-exception-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
}

.keeper-zero-exception-fields .team-selection-field {
  min-width: 0;
  margin-top: 0;
}

.keeper-zero-exception-fields input[type="search"] {
  color-scheme: dark;
}

.keeper-zero-exception-picker .dialog-actions {
  justify-content: flex-start;
}

.keeper-live-roster-list li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  padding: 0.48rem 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
}

.keeper-live-roster-list li strong {
  overflow: hidden;
  color: var(--ink-0);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keeper-live-roster-list li span {
  flex: 0 0 auto;
  margin-left: 0.5rem;
  color: var(--ink-3);
}

@media (max-width: 70rem) {
  .controlled-team-chip {
    display: none;
  }

  .switch-team-desktop-label {
    display: none;
  }

  .switch-team-mobile-label {
    display: block;
  }

  .keeper-draft-room-grid {
    grid-template-columns: minmax(12rem, 0.75fr) minmax(22rem, 1.75fr);
  }

  .keeper-live-roster-card {
    grid-column: 1 / -1;
  }

  .keeper-live-roster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 62rem) {
  .global-header-actions .button--compact,
  .keeper-team-picker select,
  .roster-team-picker select {
    min-height: 2.75rem;
  }

  .keeper-team-picker select,
  .roster-team-picker select {
    font-size: 0.78rem;
  }

  .board-column > .column-header > div:first-child {
    display: none;
  }

  .board-column > .column-header .column-header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(13rem, 1fr) auto;
    gap: 0.45rem;
  }

  .board-team-picker {
    width: 100%;
  }

  .board-team-picker select {
    width: 100%;
    min-height: 2.75rem;
    font-size: 0.78rem;
  }

  .roster-team-picker select {
    background-position:
      calc(100% - 0.78rem) 1.18rem,
      calc(100% - 0.53rem) 1.18rem;
  }

  .keeper-draft-room-screen {
    padding: 0.75rem 0.7rem 5.5rem;
  }

  .keeper-draft-room-header {
    align-items: stretch;
    flex-direction: column;
  }

  .keeper-draft-room-header-stats {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .keeper-draft-room-header-stats > div {
    min-width: 8rem;
  }

  .keeper-draft-room-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-priority-card {
    order: 2;
  }

  .keeper-live-pool-card {
    order: 1;
    min-height: 0;
  }

  .keeper-live-roster-card {
    order: 3;
    grid-column: auto;
  }

  .keeper-live-player-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-live-roster-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 44rem) {
  .global-header-actions {
    gap: 0.35rem;
  }

  .board-column > .column-header .column-header-actions {
    grid-template-columns: auto minmax(9.5rem, 1fr);
  }

  .board-team-picker > span,
  .board-legend .legend-highlighted-item {
    display: none;
  }

  .board-column .board-legend {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .rosters-column > .column-header {
    min-height: 3.6rem;
    align-items: center;
  }

  .rosters-column > .column-header .section-kicker,
  .rosters-column > .column-header .pool-total {
    display: none;
  }

  .league-roster-tools {
    gap: 0.45rem;
    align-items: stretch;
    flex-direction: column;
    padding: 0.5rem 0.6rem;
  }

  #switch-team-btn {
    max-width: 7.5rem;
    min-width: 2.8rem;
    padding-inline: 0.55rem;
  }

  .switch-team-mobile-label {
    max-width: 6.3rem;
  }

  .keeper-selection-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .keeper-selection-heading-actions {
    justify-content: flex-start;
  }

  .keeper-draft-room-header-stats {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .keeper-draft-room-header-stats > div {
    min-width: 0;
    padding: 0.52rem 0.48rem;
  }

  .keeper-selection-slots,
  .keeper-selection-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-selection-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .keeper-selection-actions .button {
    width: 100%;
  }

  .keeper-live-pool-header {
    align-items: stretch;
    flex-direction: column;
  }

  .keeper-live-player {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-live-player .button {
    width: 100%;
  }

  .commissioner-card {
    padding: 1rem;
  }

  .commissioner-fields,
  .commissioner-player-move {
    grid-template-columns: minmax(0, 1fr);
  }

  .commissioner-player-move .button,
  .commissioner-editor > .dialog-actions .button {
    width: 100%;
  }

  .commissioner-utility-actions,
  .commissioner-editor > .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .commissioner-eligible-list {
    max-height: 30dvh;
  }
}

@media (min-width: 32rem) and (max-width: 44rem) and (max-height: 38rem) {
  .keeper-selection-card {
    padding: 0.72rem 0.85rem;
  }

  .keeper-selection-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .keeper-selection-slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
    margin-top: 0.55rem;
  }

  .keeper-slot-field {
    padding: 0.4rem;
  }

  .keeper-slot-field > span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.35rem;
  }

  .keeper-slot-field > span small {
    overflow: hidden;
    font-size: 0.72rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .keeper-slot-field select {
    min-height: 2.6rem;
    padding: 0.4rem 1.55rem 0.4rem 0.45rem;
    font-size: 0.72rem;
  }

  .keeper-selection-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.45rem;
  }

  .keeper-selection-summary > div {
    min-height: 2.65rem;
    padding: 0.4rem 0.5rem;
  }

  .keeper-selection-actions {
    position: sticky;
    z-index: 5;
    bottom: -0.72rem;
    flex-direction: row;
    margin: 0.5rem -0.85rem -0.72rem;
    padding: 0.55rem 0.85rem 0.72rem;
    background: linear-gradient(to bottom, rgba(11, 18, 32, 0.9), var(--night-2) 32%);
    box-shadow: 0 -0.55rem 1rem rgba(2, 5, 12, 0.3);
  }

  .keeper-selection-actions .button {
    width: auto;
    min-height: 2.65rem;
    flex: 1 1 0;
  }
}

@media (max-height: 42rem) and (min-width: 45rem) {
  .keeper-selection-card {
    padding: 0.8rem 1rem;
  }

  .keeper-selection-heading p:last-child {
    margin-top: 0.15rem;
  }

  .keeper-selection-slots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0.55rem;
  }

  .keeper-slot-field {
    gap: 0.25rem;
    padding: 0.42rem;
  }

  .keeper-slot-field select {
    min-height: 2.6rem;
    padding: 0.45rem 1.7rem 0.45rem 0.5rem;
    font-size: 0.66rem;
  }

  .keeper-selection-summary {
    margin-top: 0.5rem;
  }

  .keeper-selection-summary > div {
    min-height: 2.8rem;
    padding: 0.45rem 0.6rem;
  }

  .keeper-selection-actions {
    margin-top: 0.55rem;
  }
}

/* Preserve the readability floor after late responsive and short-screen rules. */
.player-pool .search-control input,
.player-pool .select-control select,
#pick-label,
.mobile-nav-button,
.controlled-team-chip span,
.keeper-slot-field select {
  font-size: 0.72rem;
}

/* One consistent, comfortably inset caret for every single-value dropdown. */
select:not([multiple]) {
  --select-edge-inset: 0.65rem;
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: calc(var(--select-edge-inset) + 1rem);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position:
    right calc(var(--select-edge-inset) + 0.22rem) center,
    right var(--select-edge-inset) center;
  background-repeat: no-repeat;
  background-size: 0.28rem 0.28rem, 0.28rem 0.28rem;
}

.keeper-team-picker select {
  --select-edge-inset: 0.62rem;
}

.board-team-picker select,
.roster-team-picker select {
  --select-edge-inset: 0.55rem;
}

.select-control select {
  --select-edge-inset: 0.65rem;
}

.league-roster-jump select {
  --select-edge-inset: 0.62rem;
}

.team-selection-field select,
.keeper-slot-field select {
  --select-edge-inset: 0.8rem;
}

@media (min-width: 32rem) and (max-width: 44rem) and (max-height: 38rem) {
  .keeper-slot-field select {
    --select-edge-inset: 0.45rem;
  }
}

@media (max-height: 42rem) and (min-width: 45rem) {
  .keeper-slot-field select {
    --select-edge-inset: 0.5rem;
  }
}

@media (forced-colors: active) {
  select:not([multiple]) {
    -webkit-appearance: menulist;
    appearance: auto;
    background-image: none;
  }
}

/* Compact mobile player cards without reducing interactive touch targets. */
@media (min-width: 21.01rem) and (max-width: 44rem) {
  .player-pool > .column-header,
  .player-pool > .active-filter-bar {
    display: none;
  }

  .player-pool > .player-controls {
    grid-template-columns:
      minmax(7.5rem, 1.35fr)
      minmax(5rem, 0.75fr)
      minmax(6rem, 1fr);
    gap: 0.3rem;
    padding: 0.35rem 0.45rem;
  }

  .player-pool .search-control {
    grid-column: auto;
  }

  .player-pool .search-control kbd {
    display: none;
  }

  .player-pool .search-control input {
    padding-right: 0.6rem;
  }

  .player-pool .select-control select {
    min-width: 0;
  }

  .player-table-wrap {
    padding: 0.4rem;
  }

  .player-table tbody {
    gap: 0.3rem;
  }

  .player-table tbody tr:not(.loading-row) {
    position: relative;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "actions actions actions player player player"
      "pos projection positionrank adp bonus fit";
    gap: 0.25rem 0.3rem;
    padding: 0.4rem 0.45rem;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(2),
  .player-table tbody tr:not(.loading-row) td:nth-child(5),
  .player-table tbody tr:not(.loading-row) td:nth-child(10) {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(4) {
    display: flex;
    min-width: 0;
    gap: 0.12rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(4)::-webkit-scrollbar {
    display: none;
  }

  .player-table tbody .player-actions {
    width: 100%;
    gap: 0.15rem;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .player-table tbody .queue-turn-badge {
    display: none;
  }

  .player-table .draft-player-button {
    min-width: 4.5rem;
  }

  #upcoming-picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }

  #upcoming-picks .upcoming-pick {
    min-height: 2.6rem;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.35rem;
    padding: 0.25rem 0.35rem;
  }

  .queue-list li:not(.empty-list-item) {
    min-height: 3.2rem;
    grid-template-areas: "index copy actions";
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    gap: 0.38rem;
    padding-block: 0.2rem;
  }

  .queue-list .queue-actions {
    align-items: center;
    padding-top: 0;
  }

  .queue-list .queue-actions button {
    flex: 0 0 2.75rem;
  }

  .queue-list .queue-actions .queue-draft-button {
    width: auto;
    min-width: 4.25rem;
    padding-inline: 0.45rem;
    flex-basis: 4.25rem;
  }
}

/* Mobile Board cells open a full-text overlay while the grid stays aligned. */
@media (max-width: 62rem) {
  .draft-board-grid {
    min-width: 66rem;
    grid-template-columns: 1.75rem repeat(12, minmax(5.35rem, 1fr));
  }

  .draft-board-row:first-child .board-round-label,
  .board-team-header {
    min-height: 3.15rem;
    padding-block: 0.32rem;
  }

  .board-round-label {
    font-size: 0.63rem;
  }

  .board-pick:not(.board-team-header) {
    justify-content: flex-start;
    padding-top: 0.95rem;
  }

  .board-pick:not(.board-team-header) .board-player-name {
    width: calc(100% - 0.9rem);
  }

  .board-pick-expand {
    position: absolute;
    z-index: 7;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: transparent;
    cursor: zoom-in;
    touch-action: pan-x pan-y;
  }

  .board-pick.is-mobile-expanded {
    box-shadow:
      inset 0 0 0 2px rgba(89, 216, 255, 0.7),
      0 0 0.8rem rgba(89, 216, 255, 0.18);
  }

  .board-pick-mobile-detail {
    position: fixed;
    z-index: 300;
    display: flex;
    min-width: 0;
    min-height: 5.5rem;
    max-height: calc(100dvh - 1rem);
    padding: 1.05rem 0.8rem 0.75rem;
    overflow: visible;
    border: 1px solid rgba(89, 216, 255, 0.58);
    border-radius: 0.72rem;
    flex-direction: column;
    justify-content: center;
    background: #111a2b;
    box-shadow:
      0 1.1rem 3rem rgba(0, 0, 0, 0.58),
      0 0 0 1px rgba(255, 255, 255, 0.035);
    pointer-events: auto;
    cursor: zoom-out;
    animation: board-detail-in 150ms ease both;
  }

  .board-pick.board-pick-mobile-detail {
    background: #111a2b;
  }

  .board-pick-mobile-detail .board-player-name,
  .board-pick-mobile-detail .board-player-meta {
    display: block;
    overflow: visible;
    width: 100%;
    padding-right: 0;
    text-overflow: clip;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-line-clamp: unset;
  }

  .board-pick-mobile-detail .board-player-name {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .board-pick-mobile-detail .board-player-meta {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .board-pick-mobile-detail .board-owner-detail {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.3rem;
    color: var(--ink-2);
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .board-pick-mobile-detail .board-bye-detail {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.3rem;
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 760;
    line-height: 1.4;
  }

  .board-pick-mobile-detail .board-position-wash {
    border-radius: 0.65rem;
  }
}

/* Desktop Board picks use the same one-at-a-time detail interaction as mobile. */
@media (min-width: 62.01rem) {
  .board-pick-expand {
    position: absolute;
    z-index: 7;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: transparent;
    background: transparent;
    cursor: zoom-in;
  }

  .board-pick.is-mobile-expanded {
    box-shadow:
      inset 0 0 0 2px rgba(89, 216, 255, 0.7),
      0 0 0.8rem rgba(89, 216, 255, 0.18);
  }

  .board-pick-mobile-detail {
    position: fixed;
    z-index: 300;
    display: flex;
    min-width: 0;
    min-height: 5.5rem;
    max-height: calc(100dvh - 1rem);
    padding: 1.05rem 0.8rem 0.75rem;
    overflow: visible;
    border: 1px solid rgba(89, 216, 255, 0.58);
    border-radius: 0.72rem;
    flex-direction: column;
    justify-content: center;
    background: #111a2b;
    box-shadow:
      0 1.1rem 3rem rgba(0, 0, 0, 0.58),
      0 0 0 1px rgba(255, 255, 255, 0.035);
    pointer-events: auto;
    cursor: zoom-out;
    animation: board-detail-in 150ms ease both;
  }

  .board-pick.board-pick-mobile-detail {
    background: #111a2b;
  }

  .board-pick-mobile-detail .board-player-name,
  .board-pick-mobile-detail .board-player-meta {
    display: block;
    overflow: visible;
    width: 100%;
    padding-right: 0;
    text-overflow: clip;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-line-clamp: unset;
  }

  .board-pick-mobile-detail .board-player-name {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .board-pick-mobile-detail .board-player-meta,
  .board-pick-mobile-detail .board-owner-detail {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .board-pick-mobile-detail .board-owner-detail {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.3rem;
    color: var(--ink-2);
  }

  .board-pick-mobile-detail .board-position-wash {
    border-radius: 0.65rem;
  }
}

/* Mobile Board and roster density pass: keep context visible while shortening scroll. */
@media (max-width: 62rem) {
  .board-column > .column-header {
    min-height: 0;
    align-items: center;
    padding: 0.45rem 0.6rem;
  }

  .board-column > .column-header .column-header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
  }

  .board-team-picker {
    width: 100%;
    grid-column: 1;
  }

  .board-team-picker select {
    width: 100%;
    min-height: 2.75rem;
  }

  .board-column .board-legend {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    white-space: nowrap;
  }

  .draft-board-row:not(:first-child) > .board-round-label,
  .board-pick:not(.board-team-header):not(.board-pick-mobile-detail) {
    min-height: 3.5rem;
  }

  .board-pick:not(.board-team-header):not(.board-pick-mobile-detail) {
    padding: 0.82rem 0.42rem 0.28rem;
  }

  .board-pick:not(.board-team-header):not(.board-pick-mobile-detail) .board-player-meta {
    display: block;
    overflow: hidden;
    margin-top: 0.18rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-line-clamp: 1;
  }

  .board-pick.is-on-clock:not(.board-pick-mobile-detail) .board-player-meta {
    padding-right: 3rem;
  }

  .league-roster-list {
    overflow: clip;
  }

  .league-roster-list h3 {
    position: sticky;
    z-index: 3;
    top: 0;
    min-height: 2.6rem;
    padding: 0.42rem 0.65rem;
  }

  .league-roster-list-row {
    min-height: 1.4rem;
    padding: 0.16rem 0.5rem;
    line-height: 1.15;
  }

  .league-roster-player-bye {
    display: inline;
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 720;
    white-space: nowrap;
  }
}

@keyframes board-detail-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile density pass: shorten the keeper chooser without shrinking controls. */
@media (max-width: 44rem) {
  #keeper-selection-modal {
    width: min(100vw - 0.75rem, 64rem);
  }

  .keeper-selection-card {
    padding: 0.72rem 0.75rem;
  }

  .keeper-selection-heading {
    gap: 0.55rem;
  }

  .keeper-selection-heading p:last-child {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .keeper-selection-heading-actions {
    gap: 0.4rem;
  }

  .keeper-selection-heading-actions .button {
    min-height: 2.75rem;
    padding: 0.45rem 0.65rem;
  }

  .keeper-cost-provenance-note {
    margin-top: 0.45rem;
    border-radius: 0.6rem;
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .keeper-cost-provenance-note summary {
    padding: 0.4rem 0.55rem;
  }

  .keeper-cost-provenance-note p {
    padding: 0 0.55rem 0.5rem;
  }

  .keeper-selection-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    margin-top: 0.55rem;
  }

  .keeper-slot-field {
    padding: 0.45rem;
    border-radius: 0.68rem;
  }

  .keeper-slot-field > span {
    min-width: 0;
  }

  .keeper-slot-field > span small {
    overflow: hidden;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .keeper-slot-field select {
    --select-edge-inset: 0.55rem;
    min-height: 2.75rem;
    padding-block: 0.42rem;
    padding-inline-start: 0.55rem;
  }

  .keeper-selection-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.36rem;
    margin-top: 0.55rem;
  }

  .keeper-selection-summary > div {
    min-height: 2.75rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 0.4rem 0.55rem;
  }

  .keeper-selection-summary strong {
    text-align: left;
  }

  .keeper-selection-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.42rem;
    margin-top: 0.55rem;
  }

  .keeper-selection-actions .button {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.45rem 0.6rem;
  }
}

/* Mobile setup-flow density pass: shorten scrolling without shrinking controls. */
@media (max-width: 44rem) {
  #team-selection-modal {
    width: min(100vw - 0.75rem, 42rem);
  }

  .team-selection-card {
    padding: 0.9rem;
  }

  .team-selection-mark {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.55rem;
    border-radius: 0.8rem;
  }

  .team-selection-card h2 {
    margin-bottom: 0.35rem;
  }

  .team-selection-card .team-selection-field {
    margin-top: 0.7rem;
  }

  .team-selection-card .field-help {
    margin-top: 0.3rem;
  }

  .team-selection-card .dialog-actions {
    margin-top: 0.7rem;
  }

  .keeper-draft-room-screen {
    padding: 0.5rem 0.55rem;
    padding-bottom: calc(0.55rem + env(safe-area-inset-bottom));
  }

  .keeper-draft-room-header {
    gap: 0.45rem;
    padding-bottom: 0.5rem;
  }

  .keeper-draft-room-header p:last-child {
    min-height: 2.1em;
  }

  .keeper-draft-room-header-stats {
    gap: 0.3rem;
  }

  .keeper-draft-room-header-stats > div {
    padding: 0.42rem 0.4rem;
  }

  .keeper-draft-room-grid {
    gap: 0.5rem;
  }

  .keeper-draft-room-grid .surface-card {
    padding: 0.65rem;
  }

  .keeper-draft-room-grid .surface-card-header {
    margin-bottom: 0.4rem;
  }

  .keeper-draft-room-grid .surface-card-header h2 {
    margin: 0;
    line-height: 1.15;
  }

  .keeper-live-pool-header h2 {
    font-size: 1.08rem;
  }

  .keeper-priority-card h2,
  .keeper-live-roster-card h2 {
    font-size: 1rem;
  }

  .keeper-live-pool-card > .surface-intro {
    margin-bottom: 0;
    line-height: 1.35;
  }

  .keeper-live-player-list {
    /*
     * Keep the final Keeper Draft candidate above mobile browser chrome.
     * This clearance belongs to the list's own scrollport (not the page), so
     * its last Draft button can scroll past both a full row and the bottom UI.
     */
    --keeper-mobile-scroll-tail: calc(
      clamp(8.5rem, 18dvh, 10.5rem) + env(safe-area-inset-bottom)
    );
    gap: 0.4rem;
    margin-top: 0.45rem;
    padding-bottom: var(--keeper-mobile-scroll-tail);
    scroll-padding-bottom: var(--keeper-mobile-scroll-tail);
  }

  .keeper-live-player {
    gap: 0.4rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.5rem 0.55rem;
  }

  .keeper-live-player .button {
    width: auto;
    min-width: 5.3rem;
  }

  .keeper-priority-list,
  .keeper-live-roster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .keeper-priority-list li {
    grid-template-areas:
      "rank name"
      "rank meta";
    grid-template-columns: 1.45rem minmax(0, 1fr);
    gap: 0.08rem 0.38rem;
    padding: 0.35rem 0.42rem;
  }

  .keeper-priority-list .priority-rank {
    grid-area: rank;
  }

  .keeper-priority-list strong {
    grid-area: name;
  }

  .keeper-priority-list small {
    grid-area: meta;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .keeper-live-player-copy > span {
    margin-top: 0.12rem;
  }

  .keeper-live-player-metrics {
    gap: 0.24rem;
    margin-top: 0.3rem;
  }

  .keeper-live-player-metrics span {
    padding: 0.16rem 0.3rem;
  }

  .keeper-live-roster-list li {
    padding: 0.38rem 0.42rem;
  }

  .keeper-live-roster-card .card-insight {
    display: none;
  }

  .review-grid--keepers .review-table-wrap {
    max-height: 17rem;
    overflow-x: auto;
    overflow-y: auto;
  }

  .keeper-chip-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .keeper-pool-list li {
    align-items: center;
    flex-direction: row;
  }

  .keeper-pool-list small {
    max-width: 7.5rem;
    text-align: right;
  }

  .metric-card {
    min-height: 4.25rem;
    padding: 0.6rem;
  }

  .keeper-live-player-list.is-waiting,
  .keeper-draft-empty-summary,
  .empty-state--compact {
    min-height: 8rem;
  }

  .keeper-live-reveal {
    min-height: 7.5rem;
    padding: 0.75rem;
  }

  .button--compact,
  .keeper-slot-field select,
  .keeper-selection-actions .button,
  .keeper-live-player .button,
  .commissioner-eligible-list button {
    min-height: 2.75rem;
  }

  .review-screen.is-ready {
    padding-top: 0.45rem;
  }

  .review-screen.is-ready .review-hero {
    display: block;
    padding-block: 0 0.45rem;
  }

  .review-screen.is-ready .review-hero-copy {
    display: none;
  }

  .review-screen.is-ready .simulation-card {
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
  }

  .review-screen.is-ready .simulation-card-topline {
    align-items: center;
    margin-bottom: 0.22rem;
  }

  .review-screen.is-ready .simulation-card .section-kicker,
  .review-screen.is-ready .simulation-progress,
  .review-screen.is-ready .simulation-phases,
  .review-screen.is-ready [data-simulation-percent] {
    display: none;
  }

  .review-screen.is-ready .simulation-card h2 {
    font-size: 1rem;
  }

  .review-screen.is-ready .simulation-detail {
    min-height: 0;
    line-height: 1.35;
  }

  .review-screen.is-ready .data-freshness-banner {
    display: flex;
    min-height: 2.75rem;
    gap: 0.45rem;
    align-items: center;
    padding: 0.4rem 0.6rem;
  }

  .review-screen.is-ready .data-freshness-banner > div {
    display: block;
    flex: 0 0 auto;
  }

  .review-screen.is-ready [data-freshness-copy] {
    display: none;
  }

  .review-screen.is-ready .freshness-date {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .review-screen.is-ready .review-workspace-header {
    align-items: center;
    flex-direction: row;
    padding: 0.62rem 0.7rem 0.48rem;
  }

  .review-screen.is-ready .review-workspace-header h2 {
    font-size: 1rem;
  }

  .review-screen.is-ready .review-run-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .review-screen.is-ready .segmented-tabs {
    margin-inline: 0.5rem;
    padding: 0.2rem;
  }

  .review-screen.is-ready .segmented-tab {
    min-height: 2.75rem;
    padding-block: 0.32rem;
  }

  .player-stat-details-card {
    padding: 0.85rem 0.9rem;
  }

  .player-stat-details-meta {
    margin-bottom: 0.55rem;
  }

  .player-stat-details-list {
    gap: 0.45rem;
  }

  .player-stat-details-list > div {
    gap: 0.22rem;
    padding: 0.6rem;
  }

  .player-stat-details-list dd strong {
    margin-bottom: 0.2rem;
  }

  .player-stat-details-list dd span {
    line-height: 1.45;
  }

  .player-stat-details-card .dialog-actions {
    margin-top: 0.65rem;
  }
}

@media (max-width: 21rem) {
  .player-table tbody .queue-turn-badge {
    display: none;
  }

  #upcoming-picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
  }

  #upcoming-picks .upcoming-pick {
    min-height: 2.6rem;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.24rem;
    padding: 0.22rem 0.25rem;
  }

  .queue-list li:not(.empty-list-item):not(.has-draft-action) {
    min-height: 3.2rem;
    grid-template-areas: "index copy actions";
    grid-template-columns: 1.2rem minmax(0, 1fr) auto;
    gap: 0.25rem;
    padding-block: 0.15rem;
  }

  .queue-list li:not(.empty-list-item):not(.has-draft-action) .queue-actions {
    align-items: center;
    padding-top: 0;
  }
}

@media (max-width: 18rem) {
  .keeper-selection-slots {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-live-player,
  .keeper-priority-list,
  .keeper-live-roster-list,
  .keeper-chip-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .keeper-live-player .button {
    width: 100%;
  }

  .keeper-pool-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .keeper-pool-list small {
    max-width: none;
    text-align: left;
  }
}

@media (min-width: 21.01rem) and (max-width: 44rem) {
  .snake-reroll-button {
    min-height: 2.75rem;
  }

  .compact-order-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .compact-order-list > div {
    min-height: 2rem;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0.3rem;
    padding: 0.35rem 0.4rem;
  }
}

/* Reconcile the late phone-density rules with short landscape keeper setup. */
@media (min-width: 32rem) and (max-width: 44rem) and (max-height: 38rem) {
  .on-clock-card {
    gap: 0.38rem;
    padding-inline: 0.45rem;
  }

  .force-cpu-pick-button {
    width: 2.75rem;
    min-width: 2.75rem;
    gap: 0;
    padding-inline: 0;
  }

  .force-cpu-pick-button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .keeper-live-player-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #upcoming-picks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .keeper-selection-slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .keeper-slot-field {
    padding: 0.4rem;
  }

  .keeper-slot-field select {
    min-height: 2.75rem;
  }

  .keeper-selection-actions {
    position: sticky;
    z-index: 5;
    bottom: -0.72rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    margin: 0.5rem -0.85rem -0.72rem;
    padding: 0.55rem 0.85rem 0.72rem;
    background: linear-gradient(to bottom, rgba(11, 18, 32, 0.9), var(--night-2) 32%);
    box-shadow: 0 -0.55rem 1rem rgba(2, 5, 12, 0.3);
  }
}

@media (min-width: 38rem) and (max-width: 44rem) and (max-height: 38rem) {
  #upcoming-picks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Narrow phones trade one extra stat row for unclipped, full-size touch targets. */
@media (max-width: 22.49rem) {
  .player-pool > .column-header,
  .player-pool > .active-filter-bar {
    display: none;
  }

  .player-table-wrap {
    padding: 0.4rem;
  }

  .player-table tbody {
    gap: 0.3rem;
  }

  .player-table tbody tr:not(.loading-row) {
    grid-template-columns: max-content repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "actions player player player"
      "pos projection positionrank adp"
      "bonus fit fit fit";
    gap: 0.25rem 0.3rem;
    padding: 0.4rem 0.45rem;
  }

  .player-table tbody tr:not(.loading-row) td:nth-child(2),
  .player-table tbody tr:not(.loading-row) td:nth-child(5),
  .player-table tbody tr:not(.loading-row) td:nth-child(10) {
    position: absolute;
    width: 1px;
    height: 1px;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .player-table tbody .player-actions {
    width: 100%;
    gap: 0.15rem;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .keeper-live-player-metrics {
    flex-wrap: wrap;
    white-space: normal;
  }
}

@media (max-width: 62rem) {
  .team-review-card summary,
  .commissioner-eligible-list button {
    min-height: 2.75rem;
  }

  .need-chips {
    flex-wrap: nowrap;
    margin-bottom: 0.35rem;
    padding-bottom: 0.1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .need-chips::-webkit-scrollbar {
    display: none;
  }

  .need-chips > .need-chip {
    flex: 0 0 auto;
  }

  #queue-panel > .rail-header {
    display: none;
  }
}

@media (max-width: 44rem) {
  .review-screen.is-ready .review-workspace-header {
    display: none;
  }

  .keeper-zero-exception-picker {
    margin: 0.45rem auto;
    padding: 0.6rem;
  }

  .keeper-zero-exception-fields {
    gap: 0.45rem;
  }

  .keeper-zero-exception-picker .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .keeper-zero-exception-picker .dialog-actions .button {
    width: 100%;
    min-height: 2.75rem;
    padding-inline: 0.45rem;
  }
}

/* Phone dialogs keep every primary action reachable without extra button rows. */
@media (min-width: 20rem) and (max-width: 44rem) {
  .commissioner-card {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .commissioner-utility-actions,
  .commissioner-editor > .dialog-actions,
  #switch-team-modal .dialog-actions,
  #keeper-draft-withdraw-modal .dialog-actions,
  #simulate-rest-modal .dialog-actions,
  #completion-modal .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    align-items: stretch;
  }

  .commissioner-utility-actions .button,
  .commissioner-editor > .dialog-actions .button,
  #switch-team-modal .dialog-actions .button,
  #keeper-draft-withdraw-modal .dialog-actions .button,
  #simulate-rest-modal .dialog-actions .button,
  #completion-modal .dialog-actions .button {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
  }

  #reset-modal .dialog-actions {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  #reset-modal .dialog-actions .button {
    width: 100%;
    min-height: 2.75rem;
  }
}

/* Phone player rows stay single-line until their semantic summary is opened. */
@media (max-width: 44rem) {
  .player-table tbody tr:not(.loading-row):not(.is-mobile-player-expanded) {
    min-height: 2.75rem;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-areas: "actions player";
    gap: 0.2rem;
    padding: 0.02rem 0.3rem;
  }

  .player-table tbody tr.is-mobile-player-expanded {
    min-height: 2.75rem;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-areas:
      "actions player"
      "metrics metrics";
    gap: 0.2rem;
    padding: 0.02rem 0.3rem;
  }

  .player-table tbody
    tr:not(.loading-row):not(.is-mobile-player-expanded)
    > td:not(.player-actions):not(.player-cell) {
    display: none;
  }

  .player-table tbody .desktop-player-copy {
    display: none;
  }

  .player-table tbody .player-cell-inner {
    gap: 0.2rem;
  }

  .mobile-player-row-toggle {
    display: flex;
    width: auto;
    min-width: 0;
    min-height: 2.75rem;
    flex: 1 1 auto;
    gap: 0.28rem;
    align-items: center;
    padding: 0 0.18rem;
    overflow: hidden;
    border: 0;
    border-radius: 0.45rem;
    color: inherit;
    background: transparent;
    text-align: left;
  }

  .mobile-player-row-toggle:focus-visible {
    outline: 0.16rem solid var(--aqua);
    outline-offset: -0.12rem;
    background: rgba(89, 216, 255, 0.08);
  }

  .mobile-player-identity {
    display: inline-flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 0.2rem;
    align-items: center;
    overflow: hidden;
    line-height: 1;
  }

  .mobile-player-name {
    min-width: 0;
    max-width: none;
    flex: 0 1 auto;
    overflow: hidden;
    color: var(--ink-0);
    font-size: 0.72rem;
    font-weight: 790;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-rookie-badge {
    display: inline-flex;
    position: static;
    width: auto;
    max-width: max-content;
    flex: 0 0 auto;
    align-self: center;
    align-items: center;
    justify-content: center;
    padding: 0.09rem 0.24rem 0.07rem;
    border: 1px solid #b9f36b;
    border-radius: 0.16rem;
    color: #c9ff7f;
    background: #102114;
    font-family: var(--font-mono);
    font-size: 0.48rem;
    font-weight: 820;
    letter-spacing: 0.015em;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(185, 243, 107, 0.08);
    white-space: nowrap;
  }

  /*
   * The generic desktop copy rules above target every span inside a player
   * cell. These higher-specificity resets keep the phone identity as one row
   * and preserve the rookie badge's semantic color.
   */
  .player-table tbody .player-cell .mobile-player-identity {
    display: inline-flex;
    margin-top: 0;
    color: inherit;
    font-size: inherit;
  }

  .player-table tbody .player-cell .mobile-player-name {
    display: block;
    max-width: none;
    font-size: 0.72rem;
  }

  .player-table tbody .player-cell .mobile-rookie-badge {
    display: inline-flex;
    width: auto;
    max-width: max-content;
    margin-top: 0;
    color: var(--lime);
    background: #102114;
    font-size: 0.48rem;
  }

  .mobile-player-positions,
  .mobile-player-team {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .mobile-player-positions {
    display: inline-flex;
    flex: 0 0 2.1rem;
    gap: 0.1rem;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mobile-player-positions .position-badge {
    display: inline-grid;
    min-width: 1.75rem;
    min-height: 1.3rem;
    margin: 0;
    padding: 0.1rem 0.22rem 0.06rem;
    font-size: 0.5rem;
  }

  .mobile-player-team {
    display: inline;
    width: 2.25rem;
    flex: 0 0 2.25rem;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 760;
    text-align: left;
  }

  .player-table tbody
    tr.is-mobile-player-expanded
    > td:not(.player-actions):not(.player-cell):not(
      .mobile-expanded-metrics-cell
    ) {
    display: none;
  }

  .player-table tbody
    .player-cell
    .player-stat-details-button {
    display: none;
  }

  .player-table tbody
    tr:not(.loading-row)
    .player-actions {
    width: auto;
    gap: 0.16rem;
    padding: 0;
    border: 0;
    align-items: center;
  }

  .player-table tbody
    tr:not(.loading-row):hover
    > .player-actions {
    background: transparent;
    box-shadow: none;
  }

  .player-table tbody
    tr:not(.loading-row)
    .icon-button {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    font-size: 0.68rem;
  }

  .player-table tbody
    tr:not(.loading-row)
    .draft-player-button {
    width: auto;
    height: 2.75rem;
    min-width: 3.35rem;
    min-height: 2.75rem;
    padding-inline: 0.35rem;
    font-size: 0.62rem;
  }

  .player-table tbody
    tr.is-mobile-player-expanded
    > .mobile-expanded-metrics-cell {
    display: grid;
    grid-area: metrics;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-width: 0;
    min-height: 2.75rem;
    gap: 0.08rem;
    padding-top: 0.08rem;
    align-content: center;
    overflow: visible;
    text-align: center;
  }

  .player-table tbody tr.is-mobile-player-expanded .mobile-expanded-metric {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
    align-content: center;
    justify-items: center;
  }

  .player-table tbody tr.is-mobile-player-expanded .mobile-expanded-info {
    display: grid;
    min-width: 0;
    place-items: center;
  }

  .player-table tbody
    tr.is-mobile-player-expanded
    .mobile-expanded-info
    .player-stat-details-button {
    position: static;
    display: inline-grid;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0;
  }

  .player-table tbody
    tr.is-mobile-player-expanded
    .mobile-expanded-info
    .player-stat-details-button::before {
    content: "i";
    display: grid;
    width: 1.4rem;
    height: 1.4rem;
    place-items: center;
    border: 1px solid rgba(89, 216, 255, 0.3);
    border-radius: 50%;
    background: rgba(89, 216, 255, 0.07);
    font-family: var(--font-mono);
    font-size: 0.52rem;
    font-weight: 900;
  }

  .player-table tbody
    tr.is-mobile-player-expanded
    .mobile-expanded-info
    .player-stat-details-button:hover,
  .player-table tbody
    tr.is-mobile-player-expanded
    .mobile-expanded-info
    .player-stat-details-button:focus-visible {
    border: 0;
    background: transparent;
  }

  .player-table tbody
    tr.is-mobile-player-expanded
    .mobile-expanded-info
    .player-stat-details-button:hover::before,
  .player-table tbody
    tr.is-mobile-player-expanded
    .mobile-expanded-info
    .player-stat-details-button:focus-visible::before {
    border-color: rgba(89, 216, 255, 0.62);
    background: rgba(89, 216, 255, 0.16);
  }

  .player-table tbody tr.is-mobile-player-expanded .mobile-stat-label {
    display: block;
    color: #7f9fbd;
    font-family: var(--font-mono);
    font-size: 0.48rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }
}

/*
 * Narrow desktop / tablet shell: keep the useful mobile navigation, but avoid
 * the oversized four-row player cards used by the broad <=62rem fallback.
 * Phone rows retain their separate single-line expand/collapse treatment.
 */
@media (min-width: 44.01rem) and (max-width: 62rem) {
  .player-table-wrap {
    padding: 0.35rem;
  }

  .player-table tbody {
    gap: 0.35rem;
  }

  .player-table tbody tr:not(.loading-row) {
    min-height: 0;
    grid-template-columns:
      minmax(6.6rem, max-content)
      1.75rem
      minmax(10rem, 1fr)
      max-content
      repeat(6, minmax(2.35rem, auto));
    grid-template-areas:
      "actions rank player pos bye projection positionrank adp bonus fit"
      ". . timeline timeline timeline timeline timeline timeline timeline timeline";
    gap: 0.2rem 0.4rem;
    padding: 0.35rem 0.45rem;
    border-radius: 0.55rem;
    box-shadow: none;
  }

  .player-table tbody .player-actions {
    width: auto;
    gap: 0.2rem;
    padding: 0;
    border: 0;
    align-items: center;
  }

  .player-table tbody .stat-tooltip-target {
    min-width: 0;
    min-height: 0;
  }

  .player-table tbody .future-cell {
    min-height: 0;
    justify-self: start;
  }
}

@media (min-width: 62.01rem) {
  /*
   * Preserve player identity for as long as possible. Short numeric columns
   * share the remaining space evenly, so compacting the draft room does not
   * create arbitrary gaps or force early name truncation.
   */
  .player-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .player-table th,
  .player-table td {
    min-width: 0;
    padding-inline: clamp(0.2rem, 0.14rem + 0.08cqi, 0.5rem);
  }

  .player-table th:nth-child(1) { width: 10.5%; }
  .player-table th:nth-child(2) { width: 3.5%; }
  .player-table th:nth-child(3) { width: 24.5%; }
  .player-table th:nth-child(4) { width: 4.5%; }
  .player-table th:nth-child(5) { width: 4.5%; }
  .player-table th:nth-child(6),
  .player-table th:nth-child(7),
  .player-table th:nth-child(8),
  .player-table th:nth-child(9),
  .player-table th:nth-child(10),
  .player-table th:nth-child(11) {
    width: 8.75%;
  }

  .player-table thead .actions-column,
  .player-table tbody .player-actions,
  .player-table .player-cell {
    min-width: 0;
  }

  /*
   * Treat Queue and Draft as one scaled desktop control pair. They retain
   * their natural aspect ratios while each vertical inset stays between 3px
   * and 0.5rem. If a narrow column would create a larger vertical gap, width
   * and height decouple so the pair keeps the 3px horizontal boundary without
   * exceeding the original 0.5rem vertical padding.
   */
  .player-table tbody .player-actions {
    --player-action-gap: 0.25rem;

    padding: 3px 3px 2px;
    text-align: center;
    font-size: 0;
    line-height: 0;
  }

  .player-table tbody .player-actions .icon-button {
    width: var(--desktop-player-queue-width, 1.9rem);
    min-width: 0;
    height: var(--desktop-player-action-height, 1.9rem);
    min-height: 0;
    margin: 0 var(--player-action-gap) 0 0;
    font-size: var(--desktop-player-queue-font-size, 0.9rem);
    line-height: 1;
    vertical-align: middle;
  }

  .player-table tbody .player-actions .icon-button:not(.is-queued)::before {
    font-size: var(--desktop-player-queue-font-size, 0.9rem);
  }

  .player-table tbody .player-actions .draft-player-button {
    width: var(--desktop-player-draft-width, 3.6rem);
    min-width: 0;
    max-width: none;
    height: var(--desktop-player-action-height, 1.9rem);
    min-height: 0;
    margin: 0;
    font-size: var(--desktop-player-draft-font-size, 0.66rem);
    line-height: 1;
    vertical-align: middle;
  }

  .player-table .player-cell-inner {
    gap: 0.1rem;
  }

  .player-table tbody .player-stat-details-button {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.45rem;
  }

  .player-table tbody .queue-turn-badge {
    display: none;
  }

  .player-table thead th:nth-child(2),
  .player-table thead th:nth-child(4),
  .player-table thead th:nth-child(5),
  .player-table tbody .rank-cell,
  .player-table tbody td:nth-child(4),
  .player-table tbody .bye-cell,
  .player-table tbody .numeric-cell,
  .player-table tbody .future-cell,
  .player-table tbody .fit-cell {
    text-align: center;
  }

  .player-table tbody .bye-cell strong,
  .player-table tbody .numeric-cell strong,
  .player-table tbody .fit-cell strong {
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 720;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    letter-spacing: 0.01em;
  }

  .player-table[data-active-sort="projection"] tbody td:nth-child(6) strong,
  .player-table[data-active-sort="rank"] tbody td:nth-child(7) strong,
  .player-table[data-active-sort="adp"] tbody td:nth-child(8) strong,
  .player-table[data-active-sort="bonus"] tbody td:nth-child(9) strong,
  .player-table[data-active-sort="fit"] tbody td:nth-child(11) strong,
  .player-table[data-active-sort="queue"] tbody .player-actions .icon-button.is-queued {
    color: var(--aqua);
  }

  .player-table thead .actions-column .table-sort-button {
    gap: 0.15rem;
    justify-content: center;
  }

  .player-table thead .actions-column .table-sort-button::before {
    width: 0.7rem;
    flex: 0 0 0.7rem;
    content: "";
  }

  .player-table thead .actions-column .sort-indicator {
    width: 0.7rem;
    min-width: 0.7rem;
  }

  .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .sortable-heading {
    position: relative;
    width: 100%;
    padding: 0;
    gap: 0.25rem;
    justify-content: center;
  }

  .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .sortable-heading::before {
    width: 1.1rem;
    flex: 0 0 1.1rem;
    content: "";
  }

  .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .table-sort-button {
    flex: 0 1 auto;
    min-width: 0;
    padding-inline: 0;
    gap: 0.15rem;
    justify-content: center;
  }

  .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .table-sort-button::before {
    width: 0.7rem;
    flex: 0 0 0.7rem;
    content: "";
  }

  .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .sort-indicator {
    min-width: 0.7rem;
  }

  .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .stat-info-button {
    position: static;
    right: auto;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 1.1rem;
    font-size: 0.43rem;
  }
}

@media (min-width: 62.01rem) {
  /*
   * The center panel, rather than the browser viewport, determines when the
   * table needs to compact. Protect the action lane and transfer the rest of
   * the recovered width to Player; six short data columns remain uniform.
   */
  @container player-pool (max-width: 100rem) {
    .column-label-full {
      display: none;
    }

    .column-label-compact {
      display: inline;
    }

    /*
     * A two-tier header removes the sort/info collision before the panel gets
     * extremely narrow. The label stays centered above the controls, and the
     * fluid type scale follows the panel rather than the browser viewport.
     */
    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) {
      height: clamp(2.45rem, 2.05rem + 0.7cqi, 2.8rem);
      padding-inline: 0.08rem;
    }

    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .sortable-heading {
      position: relative;
      display: block;
      width: 100%;
      height: 2.15rem;
      padding: 0;
    }

    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .sortable-heading::before,
    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .table-sort-button::before {
      content: none;
    }

    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .table-sort-button {
      position: absolute;
      inset: 0;
      display: block;
      width: 100%;
      min-height: 0;
      padding: 0;
    }

    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .table-sort-button
      > span:not(.sort-indicator),
    .player-table thead th:nth-child(10) .sortable-heading > span:first-child {
      position: absolute;
      top: 0.08rem;
      left: 50%;
      overflow: visible;
      font-size: clamp(0.5rem, 0.44rem + 0.15cqi, 0.58rem);
      text-overflow: clip;
      transform: translateX(-50%);
      white-space: nowrap;
    }

    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .sort-indicator {
      position: absolute;
      bottom: 0.08rem;
      left: calc(50% - 0.82rem);
      width: 0.6rem;
      min-width: 0.6rem;
      height: 0.72rem;
      font-size: 0.52rem;
    }

    .player-table thead th:nth-child(n + 6):nth-child(-n + 11) .stat-info-button {
      position: absolute;
      right: auto;
      bottom: 0.04rem;
      left: calc(50% + 0.04rem);
      width: 0.78rem;
      min-width: 0.78rem;
      height: 0.78rem;
      font-size: 0.33rem;
    }

    .player-table thead th:nth-child(10) .stat-info-button {
      left: 50%;
      transform: translateX(-50%);
    }

    .player-table th:nth-child(4),
    .player-table td:nth-child(4) {
      padding-inline: 0.08rem;
    }

    .player-table td:nth-child(4) .player-position-badge {
      min-width: 2rem;
      padding-inline: 0.22rem;
    }

    /*
     * The action-cell background always remains wider than its two controls.
     * Removing inline whitespace makes that relationship deterministic.
     */
    .player-table tbody .player-actions {
      overflow: hidden;
      --player-action-gap: clamp(0.08rem, 0.04rem + 0.08cqi, 0.15rem);
    }

    .player-table tbody .player-actions .draft-player-button {
      padding-inline: clamp(0.18rem, 0.12rem + 0.1cqi, 0.3rem);
    }

  }

  @container player-pool (max-width: 50rem) {
    .player-table th:nth-child(1) { width: 12%; }
    .player-table th:nth-child(2) { width: 3.5%; }
    .player-table th:nth-child(3) { width: 24.5%; }
    .player-table th:nth-child(4) { width: 4.5%; }
    .player-table th:nth-child(5) { width: 4.5%; }
    .player-table th:nth-child(6),
    .player-table th:nth-child(7),
    .player-table th:nth-child(8),
    .player-table th:nth-child(9),
    .player-table th:nth-child(10),
    .player-table th:nth-child(11) {
      width: 8.5%;
    }

    .player-table tbody .player-actions {
      --player-action-gap: 0.12rem;
    }

    .player-table tbody .player-actions .draft-player-button {
      padding-inline: 0.25rem;
    }
  }

  @container player-pool (max-width: 45rem) {
    /*
     * Rank/Player and Pos/BYE become visually dense before their cells
     * geometrically overlap. Painted dividers clarify those two boundaries
     * without consuming track width or moving any header/body center.
     */
    .player-table thead th:nth-child(3),
    .player-table thead th:nth-child(5) {
      background-image: linear-gradient(
        to bottom,
        transparent 20%,
        rgba(129, 153, 190, 0.3) 20%,
        rgba(129, 153, 190, 0.3) 80%,
        transparent 80%
      );
      background-position: left center;
      background-repeat: no-repeat;
      background-size: 1px 100%;
    }

    .player-table thead .actions-column {
      padding-inline: 0.08rem;
    }

    .player-table thead .actions-column .table-sort-button {
      gap: 0.08rem;
      font-size: 0.55rem;
    }

    .player-table thead .actions-column .table-sort-button::before,
    .player-table thead .actions-column .sort-indicator {
      width: 0.55rem;
      min-width: 0.55rem;
      flex-basis: 0.55rem;
    }

    .player-table tbody .player-actions {
      --player-action-gap: 0.05rem;
    }

    .player-table tbody .player-actions .draft-player-button {
      padding-inline: 0.1rem;
    }
  }

  @container player-pool (max-width: 32rem) {
    .player-table th:nth-child(1) { width: 14%; }
    .player-table th:nth-child(2) { width: 3.5%; }
    .player-table th:nth-child(3) { width: 22.5%; }
    .player-table th:nth-child(4) { width: 4.5%; }
    .player-table th:nth-child(5) { width: 4.5%; }
    .player-table th:nth-child(6),
    .player-table th:nth-child(7),
    .player-table th:nth-child(8),
    .player-table th:nth-child(9),
    .player-table th:nth-child(10),
    .player-table th:nth-child(11) {
      width: 8.5%;
    }

    /*
     * At the 32rem desktop-panel floor, the Pos content box is 1.28rem wide.
     * Fit all three-letter labels inside that box so they cannot intrude into
     * BYE without reallocating any width away from Player.
     */
    .player-table td:nth-child(4) .player-position-badge {
      width: 100%;
      min-width: 0;
      max-width: 1.28rem;
      padding-inline: 0.04rem;
      font-size: 0.54rem;
    }
  }
}

@supports not (container-type: inline-size) {
  @media (min-width: 62.01rem) and (max-width: 112rem) {
    .player-table th:nth-child(1) { width: 10.5%; }
    .player-table th:nth-child(2) { width: 3.5%; }
    .player-table th:nth-child(3) { width: 24.5%; }
    .player-table th:nth-child(4) { width: 4.5%; }
    .player-table th:nth-child(5) { width: 4.5%; }
    .player-table th:nth-child(6),
    .player-table th:nth-child(7),
    .player-table th:nth-child(8),
    .player-table th:nth-child(9),
    .player-table th:nth-child(10),
    .player-table th:nth-child(11) {
      width: 8.75%;
    }

    .column-label-full {
      display: none;
    }

    .column-label-compact {
      display: inline;
    }
  }
}

/* Short phone landscape keeps a complete player row visible without shrinking touch targets. */
@media (min-width: 32rem) and (max-width: 44rem) and (max-height: 22rem) {
  :root {
    --global-header-height: 3rem;
  }

  .global-header {
    min-height: var(--global-header-height);
    padding-block: 0.1rem;
  }

  .draft-statusbar {
    min-height: 3rem;
    padding-block: 0.1rem;
  }

  .on-clock-card {
    min-height: 2.75rem;
    padding-block: 0.05rem;
  }

  .on-clock-meta {
    justify-content: center;
  }

  #clock-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .draft-layout {
    padding-top: 0.1rem;
    padding-bottom: calc(3.05rem + env(safe-area-inset-bottom));
  }

  .mobile-nav {
    min-height: calc(3rem + env(safe-area-inset-bottom));
    padding-block: 0 env(safe-area-inset-bottom);
  }

  .player-pool > .player-controls {
    padding-block: 0.1rem;
  }

  .player-table thead {
    margin: -0.5rem -0.5rem 0;
    padding-block: 0.08rem;
  }

  .toast {
    gap: 0.08rem 0.5rem;
    padding: 0.55rem 0.65rem;
  }

  .toast strong,
  .toast p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Four independent player controls stay compact without squeezing their copy. */
@media (max-width: 70rem) {
  .player-pool > .player-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .player-pool .search-control {
    grid-column: 1 / -1;
  }
}

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

@media (prefers-contrast: more) {
  :root {
    --line: rgba(190, 207, 238, 0.36);
    --line-strong: rgba(210, 222, 245, 0.55);
    --ink-2: #c1cbe0;
    --ink-3: #9ca9c2;
  }
}
