:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2ef;
  color: #172019;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: #204d3a;
  color: #fff;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #e4ebe5;
  color: #1e3025;
}

button.danger {
  background: #8b2f25;
}

button.text-button {
  min-height: auto;
  background: transparent;
  color: #204d3a;
  padding: 4px 0;
}

.back-button span {
  display: inline-block;
  margin-right: 4px;
  font-size: 1.15em;
  line-height: 1;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #bfcbc1;
  border-radius: 6px;
  background: #fff;
  color: #172019;
  padding: 0 10px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #d5ded7;
  background: #fff;
  min-height: 96px;
  padding: 10px 20px;
}

.brand-logo {
  display: block;
  line-height: 0;
}

.brand-logo img {
  display: block;
  width: 260px;
  max-width: 42vw;
  height: auto;
}

.muted {
  color: #5d6b61;
  font-size: 0.9rem;
}

.preseason-note {
  margin: 0.35rem 0 0;
  color: #5d6b61;
  font-size: 0.82rem;
  line-height: 1.35;
}

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.grid {
  display: grid;
  gap: 18px;
}

.columns,
.pool-layout,
.dashboard {
  display: grid;
  gap: 18px;
}

.dashboard {
  grid-template-columns: 1fr 340px;
  align-items: start;
}

.pool-layout {
  grid-template-columns: 220px 1fr;
  align-items: start;
}

.panel,
.game {
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.panel h1,
.panel h2,
.panel h3 {
  margin: 0 0 14px;
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
}

.auth-logo {
  display: block;
  width: min(290px, 86%);
  height: auto;
  margin: 0 auto 24px;
}

.auth-links {
  margin-top: 14px;
}

.auth-note {
  margin: 14px 0 0;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  color: #33463a;
  font-size: 0.9rem;
  font-weight: 700;
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.stack {
  display: grid;
  gap: 12px;
}

.menu-wrap {
  position: relative;
  justify-self: end;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: grid;
  gap: 8px;
  width: min(260px, 88vw);
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 18px 42px rgba(23, 32, 25, 0.16);
}

.account-menu button {
  width: 100%;
}

.account-id {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf1ee;
  padding: 4px 4px 10px;
}

.account-id > div { display: grid; gap: 2px; min-width: 0; }

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f7f2;
  color: #1e3025;
  padding: 4px 12px 4px 4px;
  border: 1px solid #d5ded7;
  border-radius: 999px;
  max-width: 220px;
}

.profile-trigger-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #204d3a, #3f755c);
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
}

.avatar-small { width: 32px; height: 32px; font-size: .75rem; }
.avatar-large { width: 112px; height: 112px; font-size: 1.8rem; box-shadow: 0 8px 24px rgba(23,32,25,.16); }
.profile-page { display: grid; gap: 20px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.page-heading h1 { margin: 2px 0 6px; }
.eyebrow { margin: 0; color: #3f755c; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.profile-grid-single { grid-template-columns: minmax(0, 720px); }
.managed-pool-list { display: grid; }
.managed-pool-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; min-height: 0; border-radius: 8px; background: transparent; color: #172019; padding: 16px 12px; text-align: left; transition: background-color .15s ease, box-shadow .15s ease; }
.managed-pool-row:hover { background: #f4f7f2; }
.managed-pool-row:focus-visible { outline: 3px solid rgba(32, 77, 58, .28); outline-offset: 2px; }
.managed-pool-row h2 { font-size: 1.15rem; }
.managed-pool-row h2, .managed-pool-row p { margin: 0; }
.managed-pool-row p { margin-top: 5px; }
.managed-pool-open { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: #204d3a; font-weight: 800; }
.managed-pool-open span { font-size: 1.45rem; line-height: .8; }
.empty-state { padding: 18px 0; text-align: center; }
.empty-state h2 { margin-bottom: 6px; }
.profile-card > p { margin-top: -6px; }
.avatar-editor { display: flex; align-items: center; gap: 20px; padding: 6px 0 22px; margin-bottom: 20px; border-bottom: 1px solid #edf1ee; }
#avatar-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-button { display: inline-flex; align-items: center; min-height: 40px; border-radius: 6px; background: #e4ebe5; color: #1e3025; padding: 0 14px; font-weight: 700; cursor: pointer; }
.avatar-editor p { margin: 7px 0 2px; }
.danger-text { color: #8b2f25 !important; }
.field small { color: #5d6b61; line-height: 1.4; }
.pool-settings-section { display: grid; gap: 14px; }
.settings-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; max-width: 720px; }
.settings-inline-form .field { margin: 0; }
.member-management-list { display: grid; }
.member-management-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid #edf1ee; }
.member-management-row:last-child { border-bottom: 0; padding-bottom: 0; }
.member-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-identity > div { display: grid; gap: 3px; }
.member-identity span { color: #5d6b61; font-size: .85rem; }
.member-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.danger-zone { border-color: #d9aaa5; }
.site-footer { display: flex; align-items: end; justify-content: space-between; gap: 32px; border-top: 1px solid #d5ded7; padding: 30px max(24px, calc((100vw - 1132px) / 2)); color: #5d6b61; background: #e7ede8; font-size: .82rem; }
.footer-main { display: grid; gap: 22px; }
.footer-links { display: grid; justify-items: start; gap: 9px; }
.footer-links a, .public-home-link { color: #204d3a; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-copyright { display: block; }
.footer-brand { display: grid; justify-items: end; gap: 8px; text-align: right; }
.footer-brand img { display: block; width: 88px; height: auto; }
.footer-brand span { font-weight: 650; }
.public-home-link { justify-self: end; }
.help-main { width: min(1000px, 100%); padding-top: 44px; padding-bottom: 56px; }
.help-hero { max-width: 760px; margin-bottom: 28px; }
.help-hero h1 { margin: 5px 0 10px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; color: #173f30; }
.help-hero > p:last-child { margin: 0; color: #506157; font-size: 1.12rem; line-height: 1.65; }
.help-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.help-jump a { border-radius: 999px; background: #dfeae2; color: #204d3a; padding: 9px 14px; font-weight: 750; text-decoration: none; }
.help-steps { display: grid; gap: 16px; }
.help-step { display: grid; grid-template-columns: 46px 1fr; gap: 16px; scroll-margin-top: 20px; border: 1px solid #d5ded7; border-radius: 12px; background: #fff; padding: 24px; }
.help-step h2, .help-card h2, .help-cta h2 { margin: 0 0 8px; }
.help-step p { max-width: 720px; line-height: 1.65; }
.step-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #204d3a; color: #fff; font-size: 1.1rem; font-weight: 850; }
.help-note { border-left: 4px solid #d4a72c; background: #fff9e8; padding: 12px 14px; }
.naming-guide { max-width: 720px; margin-top: 18px; border-radius: 9px; background: #edf5ef; padding: 16px 18px; }
.naming-guide ul { margin: 9px 0 0; padding-left: 20px; line-height: 1.6; }
.naming-guide li + li { margin-top: 5px; }
.ui-preview { display: grid; gap: 8px; max-width: 520px; border: 1px solid #cdd9d0; border-radius: 9px; background: #f5f8f5; padding: 16px; color: #34483b; }
.ui-preview > span, .ui-preview > small { color: #607066; }
.preview-card { display: grid; gap: 4px; border-radius: 7px; background: #fff; padding: 14px; box-shadow: 0 3px 12px rgba(23,32,25,.08); font-weight: 750; }
.preview-card small { color: #607066; font-weight: 500; }
.lock-preview { grid-template-columns: 1fr auto; align-items: center; }
.lock-preview small { grid-column: 1 / -1; }
.help-cta { margin-top: 20px; border-radius: 12px; background: #173f30; color: #fff; padding: 26px; }
.help-cta p { color: #d9e7dd; }
.button-link { display: inline-flex; align-items: center; min-height: 40px; border-radius: 6px; background: #fff; color: #173f30; padding: 0 14px; font-weight: 800; text-decoration: none; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.help-card { border: 1px solid #d5ded7; border-radius: 10px; background: #fff; padding: 22px; }
.help-card ul { margin: 0; padding-left: 20px; line-height: 1.65; }
.help-card li + li { margin-top: 7px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid #d5ded7; border-radius: 9px; background: #fff; padding: 0 18px; }
.faq-list summary { cursor: pointer; padding: 18px 30px 18px 0; color: #173f30; font-weight: 800; }
.faq-list p { margin: -5px 0 18px; color: #506157; line-height: 1.65; }
.legal-copy { border: 1px solid #d5ded7; border-radius: 12px; background: #fff; padding: clamp(22px, 5vw, 44px); line-height: 1.75; }
.legal-copy h2 { margin: 30px 0 5px; color: #173f30; }
.legal-copy h2:first-of-type { margin-top: 18px; }
.legal-copy p { margin-top: 6px; }
.effective-date { color: #607066; font-size: .9rem; }

.account-id span {
  color: #5d6b61;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.pool-card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 6px;
  min-height: 104px;
  background: #f4f7f2;
  color: #172019;
  text-align: left;
  padding: 16px;
}

.pool-card span {
  color: #5d6b61;
  font-size: 0.9rem;
}

.pool-nav {
  position: sticky;
  top: 18px;
}

.pool-nav > .back-button {
  width: 100%;
  margin-bottom: 18px;
}

.pool-section-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin: 0 0 12px;
  border: 2px solid #9b7200;
  background: linear-gradient(180deg, #ffe36e 0%, #ffc72c 58%, #e8aa00 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 0 #805d00,
    0 6px 12px rgba(79, 57, 0, 0.2);
  color: #18372b;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.pool-section-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 4px 0 #805d00,
    0 8px 16px rgba(79, 57, 0, 0.24);
}

.pool-section-button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 4px rgba(110, 76, 0, 0.18),
    0 1px 0 #805d00;
}

.pool-section-button.active {
  border-color: #173f30;
  background: linear-gradient(180deg, #ffdc51 0%, #ffc107 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.58),
    0 3px 0 #173f30,
    0 7px 14px rgba(23, 63, 48, 0.23);
}

.goalpost-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 17px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  border-radius: 0 0 2px 2px;
}

.goalpost-icon::after {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 3px;
  height: 8px;
  border-radius: 0 0 2px 2px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.week-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.segmented button,
.week-list button {
  background: #f4f7f2;
  color: #172019;
  min-height: 38px;
  padding: 0 10px;
}

.segmented button.active,
.week-list button.active {
  background: #204d3a;
  color: #ffffff;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.toolbar .field {
  width: 160px;
  margin: 0;
}

.leaderboard-panel {
  margin: 0;
}

.leaderboard-page-heading {
  align-items: start;
}

.leaderboard-season-field {
  min-width: 180px;
}

.leaderboard-heading h2 {
  margin-bottom: 4px;
}

.leaderboard-heading p {
  margin: 0 0 14px;
}

.leaderboard {
  overflow: hidden;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  background: #ffffff;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1fr) 62px 44px;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
}

.leaderboard-row > :first-child,
.leaderboard-row > :nth-child(3),
.leaderboard-row > :nth-child(4) {
  text-align: center;
}

.compact-label {
  display: none;
}

.leaderboard-header {
  min-height: 38px;
  background: #e8eee9;
  color: #33463a;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leaderboard-entry + .leaderboard-entry {
  border-top: 1px solid #e1e7e2;
}

.leaderboard-entry summary {
  cursor: pointer;
  list-style: none;
}

.leaderboard-entry summary::-webkit-details-marker {
  display: none;
}

.leaderboard-entry summary:hover {
  background: #f4f7f2;
}

.leaderboard-entry[open] summary {
  background: #edf3ee;
}

.leaderboard-player {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.leaderboard-player strong {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.leaderboard-avatar {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: #204d3a;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
}

.player-history {
  display: grid;
  gap: 8px;
  border-top: 1px solid #d5ded7;
  background: #fbfcfb;
  padding: 12px 16px 16px 80px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(110px, 1fr));
  gap: 10px;
  color: #4d5e52;
  font-size: 0.84rem;
}

.leaderboard-help {
  margin: 10px 0 0;
}

.pick-save-controls {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #c8d4ca;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 18px rgba(23, 43, 31, 0.14);
  padding: 10px 12px;
  backdrop-filter: blur(8px);
}

.pick-viewer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid #b8caba;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf5ee, #f8faf8);
  padding: 14px 16px;
}

.pick-viewer > div:first-child {
  display: grid;
  gap: 3px;
}

.pick-viewer > div:first-child span {
  color: #5d6b61;
  font-size: 0.88rem;
}

.pick-viewer .field {
  width: min(260px, 100%);
  margin: 0;
}

.pick-trend-comparison {
  display: grid;
  gap: 2px;
}

.pick-trend-combined {
  position: relative;
  height: 92px;
}

.trend-rail {
  position: absolute;
  top: 34px;
  right: 0;
  left: 0;
  width: 100%;
  height: 24px;
}

.trend-rail rect {
  stroke: rgba(23, 32, 25, 0.34);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.trend-rail line {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.trend-team-labels {
  position: absolute;
  top: 34px;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
}

.trend-team-labels span {
  padding: 0 12px;
}

.trend-marker {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.trend-marker-anchor {
  position: absolute;
  display: grid;
  justify-items: center;
  width: 36px;
  transform: translateX(-50%);
}

.trend-marker.top .trend-marker-anchor {
  top: 0;
}

.trend-marker.bottom .trend-marker-anchor {
  top: 61px;
}

.trend-marker-line {
  display: block;
  width: 1px;
  border-left: 1px dashed #173f30;
}

.trend-marker.top .trend-marker-line {
  height: 6px;
}

.trend-marker.bottom .trend-marker-line {
  order: -1;
  height: 4px;
}

.trend-down-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border: 2px solid #b83a20;
  border-radius: 3px;
  background: #ff5a36;
  box-shadow: 0 2px 4px rgba(26, 25, 19, 0.28);
  color: #171717;
  font-family: Impact, "Arial Black", sans-serif;
  line-height: 1;
}

.trend-down-marker strong {
  font-size: 1.36rem;
  letter-spacing: -0.06em;
  transform: scaleX(0.92);
}

.trend-fp-marker {
  display: block;
  width: 27px;
  height: 27px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(18, 45, 32, 0.25));
}

.trend-position-0 { left: clamp(45px, 0%, calc(100% - 45px)); }
.trend-position-1 { left: clamp(45px, 1%, calc(100% - 45px)); }
.trend-position-2 { left: clamp(45px, 2%, calc(100% - 45px)); }
.trend-position-3 { left: clamp(45px, 3%, calc(100% - 45px)); }
.trend-position-4 { left: clamp(45px, 4%, calc(100% - 45px)); }
.trend-position-5 { left: clamp(45px, 5%, calc(100% - 45px)); }
.trend-position-6 { left: clamp(45px, 6%, calc(100% - 45px)); }
.trend-position-7 { left: clamp(45px, 7%, calc(100% - 45px)); }
.trend-position-8 { left: clamp(45px, 8%, calc(100% - 45px)); }
.trend-position-9 { left: clamp(45px, 9%, calc(100% - 45px)); }
.trend-position-10 { left: clamp(45px, 10%, calc(100% - 45px)); }
.trend-position-11 { left: clamp(45px, 11%, calc(100% - 45px)); }
.trend-position-12 { left: clamp(45px, 12%, calc(100% - 45px)); }
.trend-position-13 { left: clamp(45px, 13%, calc(100% - 45px)); }
.trend-position-14 { left: clamp(45px, 14%, calc(100% - 45px)); }
.trend-position-15 { left: clamp(45px, 15%, calc(100% - 45px)); }
.trend-position-16 { left: clamp(45px, 16%, calc(100% - 45px)); }
.trend-position-17 { left: clamp(45px, 17%, calc(100% - 45px)); }
.trend-position-18 { left: clamp(45px, 18%, calc(100% - 45px)); }
.trend-position-19 { left: clamp(45px, 19%, calc(100% - 45px)); }
.trend-position-20 { left: clamp(45px, 20%, calc(100% - 45px)); }
.trend-position-21 { left: clamp(45px, 21%, calc(100% - 45px)); }
.trend-position-22 { left: clamp(45px, 22%, calc(100% - 45px)); }
.trend-position-23 { left: clamp(45px, 23%, calc(100% - 45px)); }
.trend-position-24 { left: clamp(45px, 24%, calc(100% - 45px)); }
.trend-position-25 { left: clamp(45px, 25%, calc(100% - 45px)); }
.trend-position-26 { left: clamp(45px, 26%, calc(100% - 45px)); }
.trend-position-27 { left: clamp(45px, 27%, calc(100% - 45px)); }
.trend-position-28 { left: clamp(45px, 28%, calc(100% - 45px)); }
.trend-position-29 { left: clamp(45px, 29%, calc(100% - 45px)); }
.trend-position-30 { left: clamp(45px, 30%, calc(100% - 45px)); }
.trend-position-31 { left: clamp(45px, 31%, calc(100% - 45px)); }
.trend-position-32 { left: clamp(45px, 32%, calc(100% - 45px)); }
.trend-position-33 { left: clamp(45px, 33%, calc(100% - 45px)); }
.trend-position-34 { left: clamp(45px, 34%, calc(100% - 45px)); }
.trend-position-35 { left: clamp(45px, 35%, calc(100% - 45px)); }
.trend-position-36 { left: clamp(45px, 36%, calc(100% - 45px)); }
.trend-position-37 { left: clamp(45px, 37%, calc(100% - 45px)); }
.trend-position-38 { left: clamp(45px, 38%, calc(100% - 45px)); }
.trend-position-39 { left: clamp(45px, 39%, calc(100% - 45px)); }
.trend-position-40 { left: clamp(45px, 40%, calc(100% - 45px)); }
.trend-position-41 { left: clamp(45px, 41%, calc(100% - 45px)); }
.trend-position-42 { left: clamp(45px, 42%, calc(100% - 45px)); }
.trend-position-43 { left: clamp(45px, 43%, calc(100% - 45px)); }
.trend-position-44 { left: clamp(45px, 44%, calc(100% - 45px)); }
.trend-position-45 { left: clamp(45px, 45%, calc(100% - 45px)); }
.trend-position-46 { left: clamp(45px, 46%, calc(100% - 45px)); }
.trend-position-47 { left: clamp(45px, 47%, calc(100% - 45px)); }
.trend-position-48 { left: clamp(45px, 48%, calc(100% - 45px)); }
.trend-position-49 { left: clamp(45px, 49%, calc(100% - 45px)); }
.trend-position-50 { left: clamp(45px, 50%, calc(100% - 45px)); }
.trend-position-51 { left: clamp(45px, 51%, calc(100% - 45px)); }
.trend-position-52 { left: clamp(45px, 52%, calc(100% - 45px)); }
.trend-position-53 { left: clamp(45px, 53%, calc(100% - 45px)); }
.trend-position-54 { left: clamp(45px, 54%, calc(100% - 45px)); }
.trend-position-55 { left: clamp(45px, 55%, calc(100% - 45px)); }
.trend-position-56 { left: clamp(45px, 56%, calc(100% - 45px)); }
.trend-position-57 { left: clamp(45px, 57%, calc(100% - 45px)); }
.trend-position-58 { left: clamp(45px, 58%, calc(100% - 45px)); }
.trend-position-59 { left: clamp(45px, 59%, calc(100% - 45px)); }
.trend-position-60 { left: clamp(45px, 60%, calc(100% - 45px)); }
.trend-position-61 { left: clamp(45px, 61%, calc(100% - 45px)); }
.trend-position-62 { left: clamp(45px, 62%, calc(100% - 45px)); }
.trend-position-63 { left: clamp(45px, 63%, calc(100% - 45px)); }
.trend-position-64 { left: clamp(45px, 64%, calc(100% - 45px)); }
.trend-position-65 { left: clamp(45px, 65%, calc(100% - 45px)); }
.trend-position-66 { left: clamp(45px, 66%, calc(100% - 45px)); }
.trend-position-67 { left: clamp(45px, 67%, calc(100% - 45px)); }
.trend-position-68 { left: clamp(45px, 68%, calc(100% - 45px)); }
.trend-position-69 { left: clamp(45px, 69%, calc(100% - 45px)); }
.trend-position-70 { left: clamp(45px, 70%, calc(100% - 45px)); }
.trend-position-71 { left: clamp(45px, 71%, calc(100% - 45px)); }
.trend-position-72 { left: clamp(45px, 72%, calc(100% - 45px)); }
.trend-position-73 { left: clamp(45px, 73%, calc(100% - 45px)); }
.trend-position-74 { left: clamp(45px, 74%, calc(100% - 45px)); }
.trend-position-75 { left: clamp(45px, 75%, calc(100% - 45px)); }
.trend-position-76 { left: clamp(45px, 76%, calc(100% - 45px)); }
.trend-position-77 { left: clamp(45px, 77%, calc(100% - 45px)); }
.trend-position-78 { left: clamp(45px, 78%, calc(100% - 45px)); }
.trend-position-79 { left: clamp(45px, 79%, calc(100% - 45px)); }
.trend-position-80 { left: clamp(45px, 80%, calc(100% - 45px)); }
.trend-position-81 { left: clamp(45px, 81%, calc(100% - 45px)); }
.trend-position-82 { left: clamp(45px, 82%, calc(100% - 45px)); }
.trend-position-83 { left: clamp(45px, 83%, calc(100% - 45px)); }
.trend-position-84 { left: clamp(45px, 84%, calc(100% - 45px)); }
.trend-position-85 { left: clamp(45px, 85%, calc(100% - 45px)); }
.trend-position-86 { left: clamp(45px, 86%, calc(100% - 45px)); }
.trend-position-87 { left: clamp(45px, 87%, calc(100% - 45px)); }
.trend-position-88 { left: clamp(45px, 88%, calc(100% - 45px)); }
.trend-position-89 { left: clamp(45px, 89%, calc(100% - 45px)); }
.trend-position-90 { left: clamp(45px, 90%, calc(100% - 45px)); }
.trend-position-91 { left: clamp(45px, 91%, calc(100% - 45px)); }
.trend-position-92 { left: clamp(45px, 92%, calc(100% - 45px)); }
.trend-position-93 { left: clamp(45px, 93%, calc(100% - 45px)); }
.trend-position-94 { left: clamp(45px, 94%, calc(100% - 45px)); }
.trend-position-95 { left: clamp(45px, 95%, calc(100% - 45px)); }
.trend-position-96 { left: clamp(45px, 96%, calc(100% - 45px)); }
.trend-position-97 { left: clamp(45px, 97%, calc(100% - 45px)); }
.trend-position-98 { left: clamp(45px, 98%, calc(100% - 45px)); }
.trend-position-99 { left: clamp(45px, 99%, calc(100% - 45px)); }
.trend-position-100 { left: clamp(45px, 100%, calc(100% - 45px)); }

.trend-marker-anchor.trend-position-0 { left: 0; }
.trend-marker-anchor.trend-position-100 { left: 100%; }

.pick-trend-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #647168;
  font-size: 0.68rem;
}

.pick-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pick-save-status {
  color: #526157;
  font-size: 0.88rem;
  font-weight: 700;
}

.pick-save-status.saving {
  color: #765900;
}

.pick-save-status.saved {
  color: #1d6840;
}

.pick-save-status.waiting {
  color: #765900;
}

.pick-save-status.error {
  color: #8b2f25;
}

.pick-save-status.locked {
  color: #1d6840;
}

.lock-picks-button {
  flex: 0 0 auto;
  background: #204d3a;
}

.pick-lock-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  border-radius: 999px;
  background: #dceadf;
  color: #185b37;
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 800;
}

.game {
  display: grid;
  gap: 12px;
}

.game.correct {
  border-color: #7ba87e;
  background:
    linear-gradient(90deg, rgba(67, 136, 88, 0.16), rgba(255, 255, 255, 0) 64px),
    #ffffff;
}

.game.incorrect {
  border-color: #c78377;
  background:
    linear-gradient(90deg, rgba(171, 75, 61, 0.14), rgba(255, 255, 255, 0) 64px),
    #ffffff;
}

.game-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5d6b61;
  font-size: 0.9rem;
}

.teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.team-option {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.team-option:has(input:checked) {
  border-color: #204d3a;
  background: #edf6ef;
  box-shadow: inset 0 0 0 2px rgba(32, 77, 58, 0.18);
}

.team-option.locked {
  cursor: default;
}

.team-option.locked.selected {
  border-color: #253f35;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(37, 63, 53, 0.18);
}

.team-option.locked.winner {
  border-color: #c09a2f;
  background: linear-gradient(135deg, #fff7d6, #ffffff 74%);
  box-shadow: inset 4px 0 0 #c09a2f;
}

.team-option.locked.correct-pick {
  border-color: #2c7a45;
  box-shadow:
    inset 4px 0 0 #2c7a45,
    inset 0 0 0 2px rgba(44, 122, 69, 0.2);
}

.team-option.locked.wrong-pick {
  border-color: #a44b3d;
  box-shadow:
    inset 4px 0 0 #a44b3d,
    inset 0 0 0 2px rgba(164, 75, 61, 0.18);
}

.team-option.locked.loser:not(.selected) {
  border-color: #d8dedb;
  background: #f7f8f7;
  color: #69756d;
}

.team-option img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.team-option span {
  font-weight: 700;
}

.team-choice { display: grid; align-content: start; gap: 7px; min-width: 0; }
.team-picker-group { min-width: 0; border-radius: 7px; background: #f4f7f5; padding: 8px 10px; }
.picker-context { display: block; min-height: 1.2em; margin-bottom: 6px; overflow: hidden; color: #43554a; font-size: .72rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.picker-avatar-row { display: flex; align-items: center; min-height: 30px; gap: 9px; }
.picker-avatar, .picker-more { display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; min-height: 30px; border: 0; border-radius: 50%; padding: 0; }
.picker-avatar { background: transparent; }
.picker-avatar:hover .picker-avatar-image { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(23,32,25,.24); }
.picker-avatar:focus-visible { outline: 3px solid rgba(32,77,58,.3); outline-offset: 2px; }
.picker-avatar-image { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(135deg, #204d3a, #3f755c); color: #fff; object-fit: cover; font-size: .62rem; font-weight: 850; transition: transform .15s ease, box-shadow .15s ease; }
.picker-avatar.current-user .picker-avatar-image { border-color: #d4a72c; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d4a72c; }
.picker-avatar.viewed-user:not(.current-user) .picker-avatar-image { border-color: #258c78; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #258c78; }
.picker-more { background: #dfe8e1; color: #204d3a; font-size: .7rem; font-weight: 850; }
.picker-more:hover { background: #d2dfd5; }
.desktop-overflow, .mobile-more { display: none; }

.score {
  min-width: 28px;
  text-align: right;
  font-size: 1.2rem;
}

.result-tag {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.result-tag.picked {
  background: #e4ebe5;
  color: #33463a;
}

.result-tag.winner {
  background: #253f35;
  color: #ffffff;
}

.pick-summary {
  border-top: 1px solid #edf1ee;
  padding-top: 10px;
  color: #5d6b61;
  font-size: 0.9rem;
}

.message {
  border-radius: 6px;
  background: #edf6ef;
  color: #204d3a;
  padding: 10px 12px;
}

.error {
  background: #f8e6e2;
  color: #8b2f25;
}

.invite-notice {
  display: grid;
  gap: 3px;
}

.invite-notice span,
.invite-notice small {
  font-size: 0.82rem;
  color: #5d6b61;
}

.invite-notice strong {
  font-size: 1.05rem;
}

.invite-link {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: #f4f7f2;
  padding: 10px;
}

.invite-link > span {
  min-width: 0;
  flex: 1 1 auto;
}

.invite-link-wrap {
  position: relative;
  margin: 8px 0 12px;
}

.invite-create-wrap {
  position: relative;
  display: inline-flex;
}

.invite-create-tooltip {
  right: 0;
}

.copy-invite-link {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #b7c6ba;
  background: #ffffff;
  color: #204d3a;
}

.copy-invite-link:hover {
  background: #e8f0ea;
}

.copy-invite-link svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.invite-link-input { min-width: 0; flex: 1 1 auto; border: 0; background: transparent; padding: 0; color: #172019; font-size: .86rem; }
.invite-link-input:focus { outline: 2px solid rgba(32,77,58,.25); outline-offset: 3px; }

.invite-copy-tooltip {
  position: absolute;
  right: 3px;
  bottom: calc(100% + 6px);
  z-index: 2;
  border-radius: 999px;
  background: #172019;
  color: #ffffff;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.invite-copy-tooltip::after {
  position: absolute;
  top: 100%;
  right: 12px;
  border: 4px solid transparent;
  border-top-color: #172019;
  content: "";
}

.invite-copy-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.invite-copy-tooltip.copy-error { background: #5d4931; }
.invite-copy-tooltip.copy-error::after { border-top-color: #5d4931; }

.clipboard-fallback {
  position: fixed;
  top: -1000px;
  left: -1000px;
}

@media (max-width: 860px) {
  .topbar {
    min-height: 78px;
    gap: 8px;
    padding-inline: 12px;
  }

  .brand-logo img {
    width: 170px;
    max-width: 48vw;
  }

  .profile-trigger {
    flex-direction: column;
    gap: 1px;
    width: 88px;
    min-height: 62px;
    padding: 3px 4px;
    border: 0;
    background: transparent;
    border-radius: 8px;
  }

  .profile-trigger-name {
    display: block;
    width: 80px;
    color: #33463a;
    font-size: 0.68rem;
    line-height: 1.15;
    text-align: center;
  }

  .menu-wrap {
    position: absolute;
    right: 2px;
  }

  .columns,
  .dashboard,
  .pool-layout,
  .teams,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .pool-nav {
    position: static;
  }

  .week-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .field {
    width: 100%;
  }

  .pool-actions {
    justify-content: space-between;
    width: 100%;
  }

  .pool-actions button {
    flex: 0 0 auto;
  }

  .managed-pool-row {
    align-items: stretch;
    flex-direction: column;
  }

  .managed-pool-row button {
    width: 100%;
  }

  .leaderboard-row {
    grid-template-columns: 30px minmax(0, 1fr) 38px 30px;
    gap: 4px;
    padding: 7px 6px;
  }

  .leaderboard-shell {
    margin-inline: -12px;
    padding: 14px 10px;
  }

  .leaderboard-page-heading h1 {
    font-size: 1.65rem;
    line-height: 1.15;
  }

  .leaderboard-header {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }

  .wide-label {
    display: none;
  }

  .compact-label {
    display: inline;
  }

  .leaderboard-player {
    gap: 6px;
  }

  .leaderboard-avatar {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
  }

  .player-history {
    padding: 12px;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e7e2;
  }

  .history-row > :nth-child(even) {
    text-align: right;
  }

  .pick-save-controls {
    bottom: 6px;
  }

  .pick-viewer {
    align-items: stretch;
    flex-direction: column;
  }

  .pick-viewer .field {
    width: 100%;
  }


  .lock-picks-button {
    min-height: 44px;
  }

  .page-heading { align-items: stretch; flex-direction: column; }
  .site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; }
  .footer-main { min-width: 0; }
  .footer-brand { justify-items: end; max-width: 132px; }
  .footer-brand img { width: 68px; }
  .footer-brand span { font-size: .76rem; line-height: 1.35; }
  .help-grid { grid-template-columns: 1fr; }
  .help-step { grid-template-columns: 1fr; }
  .lock-preview { grid-template-columns: 1fr; }
  .lock-preview small { grid-column: auto; }
  .avatar-editor { align-items: flex-start; }
  .settings-inline-form { grid-template-columns: 1fr; }
  .member-management-row { align-items: stretch; flex-direction: column; }
  .member-actions { justify-content: flex-start; }
  .picker-avatar.mobile-overflow { display: none; }
  .desktop-more { display: none; }
  .mobile-more { display: inline-grid; }
}

@media (max-width: 319px) {
  .site-footer { grid-template-columns: 1fr; }
  .footer-brand { justify-self: end; }
}
