:root {
  --bg: #0f172a;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #22d3ee;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 10% 10%, #172554, transparent 30%),
    radial-gradient(circle at 90% 10%, #0ea5e9, transparent 25%),
    var(--bg);
  color: var(--text);
  padding: 24px 16px 48px;
}

.site-header {
  max-width: 1040px;
  margin: 0 auto 10px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  height: 76px;
  width: auto;
  opacity: 0.9;
}

.site-header + .page {
  margin-top: 4px;
}

.layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  padding-top: 0;
}

.center {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body.view-playoff #week-nav,
body.view-playoff #day-buttons {
  display: none;
}
body.view-playoff #load,
body.view-playoff #refresh-scores,
body.view-playoff #refresh-game-btn,
body.view-playoff #rescore-btn {
  display: none;
}
body.view-season #playoff-series-btn {
  display: none;
}
body.view-playoff #playoff-series-btn {
  display: inline-flex;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-strong);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  width: min(100%, 800px);
}

.card.wide {
  margin-left: auto;
  margin-right: auto;
}

.league-card {
  width: min(100%, 640px);
  margin: 12px auto 0;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--panel-strong);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  color: var(--text);
}

.card h2 {
  margin: 0 0 12px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.view-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text);
}

.view-heading__icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.view-heading__label {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.01em;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  justify-content: flex-end;
  width: 100%;
}

@media (max-width: 900px) {
  .actions {
    justify-content: flex-start;
  }
}

/* Admin toolbar removed; keep classes unused to avoid layout shifts */
.admin-toolbar {
  display: none;
}
.admin-toolbar button {
  min-width: 44px;
}
.desktop-only {
  display: none;
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .action-menu {
    position: relative;
    width: 100%;
  }

  .action-menu__panel {
    width: 100%;
    max-width: 320px;
  }

}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea,
button {
  font-family: inherit;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-strong);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

button {
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1623;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
  min-width: 120px;
}

.save-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0b1623;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.25);
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.table button {
  box-shadow: none;
}

.table button:hover,
.table button:active {
  transform: none;
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--panel-strong);
  box-shadow: none;
}

.icon-btn {
  font-size: 18px;
  line-height: 1;
  padding: 10px 12px;
}

.icon-btn.small {
  font-size: 14px;
  padding: 8px 10px;
}

.action-menu {
  position: relative;
}

.menu-toggle {
  min-width: 44px;
  align-self: flex-start;
}

.action-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--panel-strong);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 10;
  flex-wrap: wrap;
  min-height: 100%;
}

.action-menu__panel[hidden] {
  display: none;
}

.action-menu__panel .icon-btn {
  min-width: 40px;
}

.action-menu__logo {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.menu-logo {
  width: 92px;
  height: 92px;
  opacity: 0.9;
}

.mode-switch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 8px;
}

.mode-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
}

.mode-btn--soon {
  position: relative;
  overflow: visible;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.08);
  border-style: dashed;
}

.mode-btn--soon .mode-icon,
.mode-btn--soon .mode-label {
  opacity: 0.72;
}

.mode-btn--soon:hover,
.mode-btn--soon:active {
  transform: none;
}

.mode-soon-badge {
  position: absolute;
  top: 0;
  right: 10px;
  transform: translateY(-45%);
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #0b1623;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.3);
  pointer-events: none;
}

.mode-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1623;
}

.mode-icon {
  width: 24px;
  height: 24px;
}

.mode-label {
  font-weight: 700;
}

.menu-spacer {
  flex: 1;
  width: 100%;
}

.leagues-view {
  width: 100%;
}

.dashed-box {
  border: 2px dashed var(--panel-strong);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.league-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.league-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.league-form-actions {
  display: flex;
  gap: 10px;
}

.league-form-actions button {
  flex: 1 1 0;
}

.league-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.league-title {
  font-weight: 800;
  font-size: 18px;
}

.league-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.league-table {
  margin-top: 8px;
}

.menu-auth {
  margin-top: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 0;
}

.user-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-block;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.user-nickname {
  flex: 1;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

.user-name-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-team-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.settings-btn {
  min-width: 32px;
  padding: 6px;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-icon {
  width: 18px;
  height: 18px;
  filter: invert(1);
}

.trophy-btn {
  border-radius: 12px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(234, 179, 8, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
}

.trophy-icon {
  width: 24px;
  height: 24px;
}

.trophy-label {
  font-weight: 700;
  color: var(--text);
}

.leagues-btn .leagues-icon,
.trophy-btn .trophy-icon,
.trophy-label,
.leagues-btn .trophy-label {
  display: inline-flex;
  align-items: center;
}

.leagues-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
}

.leagues-icon {
  width: 24px;
  height: 24px;
}

.trophy-btn.mode-active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0b1623;
  border-color: rgba(0, 0, 0, 0.2);
}

.trophy-btn.mode-active .trophy-label {
  color: #0b1623;
}

.menu-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--panel-strong);
  margin: 0 0 8px;
}

.leagues-view {
  width: 100%;
}

.dashed-box {
  border: 2px dashed var(--panel-strong);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.league-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.league-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.league-form-actions {
  display: flex;
  gap: 10px;
}

.league-form-actions button {
  flex: 1 1 0;
}

.league-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.league-title {
  font-weight: 800;
  font-size: 18px;
}

.league-table {
  margin-top: 8px;
}

.league-actions-head {
  text-align: right;
  width: 90px;
}

.league-leave-wrap {
  margin-top: 12px;
  text-align: right;
}

.league-leave-btn {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
}

.league-leave-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.league-member-row.pending {
  opacity: 0.7;
}

.league-member-row {
  position: relative;
  overflow: visible;
}

.league-member-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.league-member-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.league-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.04);
}

.league-member-avatar-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.league-member-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.league-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px dashed var(--panel-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.league-member-status {
  color: var(--muted);
  font-size: 12px;
}

.league-member-actions-cell {
  width: 1%;
  text-align: right;
}

.league-member-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  z-index: auto;
}

.league-member-kebab {
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.league-kebab-icon {
  width: 18px;
  height: 18px;
  filter: invert(1);
  opacity: 0.9;
}

.league-member-menu {
  position: fixed;
  right: auto;
  top: auto;
  min-width: 180px;
  border-radius: 8px;
  border: 1px solid #1c2433;
  background: #0b0f17;
  box-shadow: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2147483647;
}

.league-member-menu[hidden] {
  display: none !important;
}

.league-member-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: none;
}

.league-member-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.league-member-menu-item.danger {
  color: #f87171;
}

.league-invite-row td {
  border-bottom: none;
  padding: 10px 10px 8px;
}

.league-invite-inline {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.league-invite-icon {
  width: 20px;
  height: 20px;
  filter: invert(1);
  opacity: 0.85;
}

.league-invite-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--panel-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.league-invite-input input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  padding: 0;
}

.league-invite-input input:focus {
  outline: none;
}

.league-invite-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.league-invite-status {
  min-height: 18px;
  min-width: 140px;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.league-invite-send {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.06);
  padding: 0;
  cursor: not-allowed;
  opacity: 0.6;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
}

.league-invite-send-icon {
  width: 18px;
  height: 18px;
  filter: grayscale(1) brightness(1.2);
  opacity: 0.7;
}

.league-invite-send.ready {
  cursor: pointer;
  opacity: 1;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  transform: translateY(-1px);
}

.league-invite-send.ready .league-invite-send-icon {
  filter: invert(1);
  opacity: 1;
}

.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
}

.notif-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  position: static;
  margin-bottom: 8px;
}

.notif-icon {
  width: 32px;
  height: 32px;
  filter: invert(1);
  opacity: 1;
  display: block;
  position: relative;
}

.notif-btn.has-notifications {
  background: transparent;
  border-color: transparent;
}

.notif-btn.has-notifications .notif-icon {
  filter: invert(1);
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: none;
  line-height: 1;
}

.notif-badge[hidden] {
  display: none !important;
}

.mobile-only {
  display: inline-flex;
}

@media (min-width: 900px) {
  body {
    padding-left: 24px;
    padding-right: 24px;
    overflow-x: hidden;
  }

  .layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 220px;
    gap: 24px;
    min-height: 100vh;
    position: relative;
  }

  .action-menu {
    position: sticky;
    top: 16px;
    align-self: start;
    width: 180px;
    height: calc(100vh - 32px);
  }

  .action-menu__panel {
    position: relative;
    top: 0;
    left: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    padding: 12px 10px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--panel-strong);
    box-shadow: var(--shadow);
  }

  .action-menu__panel[hidden] {
    display: flex !important;
  }

  .action-menu__panel .icon-btn {
    width: 100%;
    min-width: unset;
    justify-content: center;
  }

  .menu-toggle {
    display: none;
  }

  .page {
    margin: 0;
    max-width: 1040px;
    width: 100%;
    padding-top: 0;
    justify-self: center;
  }

  .card.wide {
    width: 100%;
    max-width: 1040px;
  }

  .leaderboard-sidebar {
    display: block;
    position: sticky;
    top: 16px;
    align-self: start;
    width: 220px;
    height: calc(100vh - 32px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .leaderboard-card {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .mobile-only {
    display: none;
  }

  .notif-container {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    justify-content: flex-end;
    margin-bottom: 0;
    z-index: 2;
  }

  .admin-toolbar {
    display: none;
  }
  .desktop-only {
    display: none;
  }
}

.menu-logo {
  width: 92px;
  height: 92px;
  opacity: 0.9;
}

.inline-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--panel-strong);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  width: min(320px, calc(100% - 40px));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 0;
  padding: 6px;
  border: none;
  box-shadow: none;
  color: var(--muted);
  background: transparent;
}

.inline-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.inline-dialog[hidden] {
  display: none;
}

.notifications-popover {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 40;
}

.notifications-popover[hidden] {
  display: none;
}

.notifications-panel {
  width: 320px;
  max-height: 420px;
  overflow: auto;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--panel-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px;
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-divider {
  height: 1px;
  background: var(--panel-strong);
  width: 100%;
  opacity: 0.7;
}

.notif-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.notif-invite {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-invite-text {
  font-size: 15px;
  font-weight: 400;
}

.notif-invite-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notif-row {
  border: 1px solid var(--panel-strong);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.notif-row.notif-read {
  opacity: 0.7;
}

.notif-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.notif-body {
  color: var(--muted);
  font-size: 14px;
}

.notif-date {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.notif-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.small-btn {
  padding: 6px 10px;
  min-width: unset;
}

.inline-dialog__title {
  font-weight: 700;
  font-size: 14px;
}

.inline-dialog__field span {
  color: var(--muted);
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.inline-dialog__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.inline-dialog__status {
  min-height: 18px;
  font-size: 13px;
}

.season-coming-soon-dialog {
  width: min(360px, calc(100% - 40px));
}

.season-coming-soon-copy {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.playoff-series-dialog {
  width: min(1100px, calc(100% - 48px));
  max-height: 82vh;
  overflow: auto;
}

.legal-dialog {
  width: min(720px, calc(100% - 40px));
  max-height: 82vh;
  overflow: auto;
  gap: 14px;
  padding: 18px 18px 20px;
}

.legal-dialog__content {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.legal-section:first-child {
  padding-top: 0;
  border-top: none;
}

.legal-section:last-child {
  padding-bottom: 0;
}

.legal-dialog__content h3,
.legal-dialog__content h4,
.legal-dialog__content p,
.legal-dialog__content ul {
  margin: 0;
}

.legal-dialog__content h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.legal-dialog__content h4 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.9);
}

.legal-dialog__content ul {
  padding-left: 20px;
}

.legal-dialog__content li + li {
  margin-top: 4px;
}

.legal-dialog__content a {
  color: #c4f1ff;
  text-decoration-color: rgba(56, 189, 248, 0.7);
  text-underline-offset: 3px;
}
.playoff-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}
.playoff-series-group {
  border: 1px solid var(--panel-strong);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.playoff-series-header {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 8px;
  row-gap: 6px;
  align-items: center;
  min-width: 0;
}
.playoff-series-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.playoff-series-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
  justify-self: end;
}
.playoff-games-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.playoff-game-editor-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(190px, 1.1fr) minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.playoff-picks-dialog {
  width: min(760px, calc(100% - 40px));
  max-height: 80vh;
  overflow: auto;
}

.playoff-picks-header {
  position: relative;
  min-height: 24px;
}

#playoff-picks-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.playoff-picks-title {
  font-weight: 800;
  font-size: 16px;
}

.playoff-picks-series {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.playoff-picks-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.playoff-picks-team .team-logo {
  width: 68px;
  height: 68px;
  padding: 3px;
  border-radius: 10px;
}

.playoff-picks-team-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.playoff-picks-score {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.playoff-picks-score input {
  width: 80px;
  min-width: 80px;
  height: 76px;
  padding: 0;
  text-align: center;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  border-radius: 16px;
}

.playoff-picks-score-sep {
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
}

.points-badge--series-outcome {
  display: inline-grid;
  grid-column: 1 / -1;
  gap: 2px;
  justify-items: center;
  margin-bottom: 4px;
  padding: 8px 10px 9px;
  min-width: 112px;
  text-align: center;
  line-height: 1.05;
}

.points-badge--series-outcome .points-badge__value {
  font-size: 18px;
  font-weight: 800;
  color: inherit;
}

.points-badge--series-outcome .points-badge__label {
  font-size: 10px;
  font-weight: 200;
  letter-spacing: 0;
  color: rgba(226, 232, 240, 0.8);
}

.playoff-picks-save-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-align: center;
}

.playoff-wildcard-row {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.playoff-wildcard-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 184px;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.46);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}

.playoff-wildcard-toggle:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 10px 22px rgba(251, 191, 36, 0.14);
  transform: translateY(-1px);
}

.playoff-wildcard-toggle.is-active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(245, 158, 11, 0.2));
  border-color: rgba(251, 191, 36, 0.78);
  color: #fde68a;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.12), 0 14px 26px rgba(245, 158, 11, 0.16);
}

.playoff-wildcard-toggle:disabled,
.playoff-wildcard-toggle.is-locked {
  opacity: 0.78;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.playoff-wildcard-status {
  max-width: 340px;
  font-size: 12px;
  line-height: 1.35;
}

.playoff-picks-games {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.playoff-picks-game {
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.playoff-picks-game--correct {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.05);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08), 0 0 18px rgba(34, 197, 94, 0.14);
}

.playoff-picks-game--incorrect {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08), 0 0 18px rgba(239, 68, 68, 0.14);
}

.playoff-picks-game-title {
  font-weight: 700;
}

.playoff-picks-game-meta {
  color: var(--muted);
  font-size: 12px;
}

.playoff-picks-game-pickrow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.playoff-picks-team-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  --team-color: var(--accent, #4f46e5);
  box-shadow: none;
}

.playoff-picks-team-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.playoff-picks-team-pill-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: opacity 180ms ease;
}


.playoff-picks-team-pill.is-selected {
  border-color: var(--team-color);
  box-shadow: 0 0 14px var(--team-color);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.playoff-picks-team-pill.is-loser .playoff-picks-team-pill-logo {
  opacity: 0.3;
}

.playoff-picks-game-info {
  border: 1px solid var(--panel-strong);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.02);
  width: 100%;
}

.playoff-picks-game-info-title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.playoff-picks-game-info-meta,
.playoff-picks-game-info-venue {
  font-size: 12px;
  color: var(--muted);
}

.playoff-picks-team-pill[data-team="ANA"] { --team-color: #f47a38; }
.playoff-picks-team-pill[data-team="BOS"] { --team-color: #ffb81c; }
.playoff-picks-team-pill[data-team="BUF"] { --team-color: #003087; }
.playoff-picks-team-pill[data-team="CAR"] { --team-color: #cc0000; }
.playoff-picks-team-pill[data-team="CBJ"] { --team-color: #002654; }
.playoff-picks-team-pill[data-team="CGY"] { --team-color: #c8102e; }
.playoff-picks-team-pill[data-team="CHI"] { --team-color: #cf0a2c; }
.playoff-picks-team-pill[data-team="COL"] { --team-color: #6f263d; }
.playoff-picks-team-pill[data-team="DAL"] { --team-color: #006847; }
.playoff-picks-team-pill[data-team="DET"] { --team-color: #ce1126; }
.playoff-picks-team-pill[data-team="EDM"] { --team-color: #ff4c00; }
.playoff-picks-team-pill[data-team="FLA"] { --team-color: #c8102e; }
.playoff-picks-team-pill[data-team="LAK"] { --team-color: #a2aaad; }
.playoff-picks-team-pill[data-team="MIN"] { --team-color: #154734; }
.playoff-picks-team-pill[data-team="MTL"] { --team-color: #af1e2d; }
.playoff-picks-team-pill[data-team="NJD"] { --team-color: #ce1126; }
.playoff-picks-team-pill[data-team="NSH"] { --team-color: #ffb81c; }
.playoff-picks-team-pill[data-team="NYI"] { --team-color: #00539b; }
.playoff-picks-team-pill[data-team="NYR"] { --team-color: #0038a8; }
.playoff-picks-team-pill[data-team="OTT"] { --team-color: #c52032; }
.playoff-picks-team-pill[data-team="PHI"] { --team-color: #f74902; }
.playoff-picks-team-pill[data-team="PIT"] { --team-color: #ffb81c; }
.playoff-picks-team-pill[data-team="SEA"] { --team-color: #99d9d9; }
.playoff-picks-team-pill[data-team="SJS"] { --team-color: #006d75; }
.playoff-picks-team-pill[data-team="STL"] { --team-color: #002f87; }
.playoff-picks-team-pill[data-team="TBL"] { --team-color: #002868; }
.playoff-picks-team-pill[data-team="TOR"] { --team-color: #00205b; }
.playoff-picks-team-pill[data-team="UTA"] { --team-color: #4b5563; }
.playoff-picks-team-pill[data-team="VAN"] { --team-color: #00843d; }
.playoff-picks-team-pill[data-team="VGK"] { --team-color: #b4975a; }
.playoff-picks-team-pill[data-team="WPG"] { --team-color: #041e42; }
.playoff-picks-team-pill[data-team="WSH"] { --team-color: #c8102e; }

@media (max-width: 640px) {
  .playoff-picks-series {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    text-align: center;
    align-items: start;
  }
  .playoff-picks-team {
    gap: 4px;
    min-width: 0;
  }
  .playoff-picks-team .team-logo {
    width: 52px;
    height: 52px;
    padding: 2px;
  }
  .playoff-picks-team-name {
    font-size: 12px;
    line-height: 1.15;
  }
  .playoff-picks-score {
    gap: 6px;
  }
  .playoff-picks-score input {
    width: 58px;
    min-width: 58px;
    height: 56px;
    font-size: 28px;
    border-radius: 14px;
  }
  .playoff-picks-score-sep {
    font-size: 26px;
  }
  .points-badge--series-outcome {
    margin-top: 4px;
    margin-left: 0;
    min-width: 104px;
    padding: 7px 8px 8px;
  }
  .playoff-picks-game-pickrow {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }
  .playoff-picks-game {
    gap: 6px;
  }
  .playoff-picks-team-pill {
    width: 60px;
    height: 60px;
    padding: 4px;
    }
  .playoff-picks-team-pill-logo {
    width: 52px;
    height: 52px;
  }
  .playoff-picks-game-info {
    min-width: 0;
    order: 0;
  }
  .playoff-picks-game-info-title {
    font-size: 13px;
  }
  .playoff-picks-game-info-meta,
  .playoff-picks-game-info-venue {
    font-size: 11px;
    line-height: 1.35;
  }
}

@media (max-width: 380px) {
  .playoff-picks-series {
    gap: 6px;
  }
  .playoff-picks-team .team-logo {
    width: 46px;
    height: 46px;
  }
  .playoff-picks-team-name {
    font-size: 11px;
  }
  .playoff-picks-score input {
    width: 52px;
    min-width: 52px;
    height: 50px;
    font-size: 24px;
  }
  .playoff-picks-score-sep {
    font-size: 22px;
  }
  .points-badge--series-outcome {
    min-width: 96px;
  }
  .playoff-picks-game-pickrow {
    gap: 6px;
  }
  .playoff-picks-team-pill {
    width: 54px;
    height: 54px;
    padding: 3px;
  }
  .playoff-picks-team-pill-logo {
    width: 46px;
    height: 46px;
  }
  .playoff-picks-game-info-title {
    font-size: 12px;
  }
  .playoff-picks-game-info-meta,
  .playoff-picks-game-info-venue {
    font-size: 10px;
  }
}
.playoff-series-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.playoff-series-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
}
@media (max-width: 900px) {
  .playoff-series-dialog {
    width: min(520px, calc(100% - 32px));
  }
  .playoff-series-grid {
    grid-template-columns: 1fr;
  }
}

.hidden-date-picker {
  position: fixed;
  top: 16px;
  left: 50%;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.week-nav {
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.week-range {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pill-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.day-buttons {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.day-btn {
  box-sizing: border-box;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 9px 6px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  min-width: 0;
}

.day-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.day-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1623;
  border-color: transparent;
  transform: translateY(-1px);
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--panel-strong);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.table thead {
  display: none;
}

.table th,
.table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--panel-strong);
}

.action-cell {
  position: relative;
  z-index: 1;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  filter: brightness(1.05);
}


.table tbody tr.match-row {
  position: relative;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.match-cell {
  position: relative;
}

.row-points-0 {
  --points-gradient: linear-gradient(90deg, rgba(239, 68, 68, 0.16), transparent 30%);
}

.row-points-1 {
  --points-gradient: linear-gradient(90deg, rgba(251, 191, 36, 0.18), transparent 30%);
}

.row-points-3 {
  --points-gradient: linear-gradient(90deg, rgba(34, 197, 94, 0.26), transparent 30%);
}

.row-points-0,
.row-points-1,
.row-points-3 {
  position: relative;
}

.row-points-0 .match-cell,
.row-points-1 .match-cell,
.row-points-3 .match-cell {
  overflow: visible;
}

.row-points-0 .match-cell::before,
.row-points-1 .match-cell::before,
.row-points-3 .match-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: auto;
  width: calc(100% + var(--points-extra, 0px));
  height: var(--points-row-height, 100%);
  background: var(--points-gradient);
  background-repeat: no-repeat;
  background-size: calc(100% + var(--points-extra, 0px)) 100%;
  pointer-events: none;
  z-index: 0;
}

.row-points-0 .match-cell > *,
.row-points-1 .match-cell > *,
.row-points-3 .match-cell > * {
  position: relative;
  z-index: 1;
}

.table tbody tr.match-row:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  filter: brightness(1.1);
}

.points-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--panel-strong);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
}

.points-badge.inline {
  position: static;
  margin-left: 8px;
  align-self: center;
}

.points-0 {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecdd3;
}

.points-1 {
  background: rgba(251, 191, 36, 0.3);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fef3c7;
}

.points-3 {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(34, 197, 94, 0.7);
  color: #0b1623;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.match-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

.logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.06);
}

.logo-win {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(74, 222, 128, 0.15));
  border-color: rgba(34, 197, 94, 0.3);
}

.logo-loss {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.15));
  border-color: rgba(239, 68, 68, 0.3);
}

.score-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-boxes {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.score-input {
  width: 48px;
  text-align: center;
  padding: 8px 6px;
  font-weight: 700;
  font-size: 22px;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input[type="number"] {
  -moz-appearance: textfield;
}

.score-separator {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mid-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 60px;
  padding: 8px 0;
  min-width: 160px;
}

.mid-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.kickoff-chip {
  align-self: center;
  padding: 2px 6px;
  color: #cbd5e1;
  font-weight: 400;
  font-size: 12px;
  text-align: center;
}

.game-id-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15px;
}

.btn-disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--muted);
  border: 1px solid var(--panel-strong);
  cursor: not-allowed;
  box-shadow: none;
  min-width: 120px;
}

.btn-disabled-saved {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.45), rgba(22, 163, 74, 0.35)) !important;
  color: rgba(11, 22, 35, 0.8);
  border: 1px solid rgba(34, 197, 94, 0.35);
  cursor: not-allowed;
  box-shadow: none;
  min-width: 120px;
}

.btn-past {
  background: rgba(255, 255, 255, 0.12) !important;
  color: var(--muted);
  border: 1px solid var(--panel-strong);
  cursor: not-allowed;
  box-shadow: none;
  min-width: 120px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.auth-modal[hidden] {
  display: none !important;
}

.leaderboard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 30;
}

.leaderboard-modal[hidden] {
  display: none !important;
}

.leaderboard-card {
  background: #0f172a;
  border: 1px solid var(--panel-strong);
  border-radius: 16px;
  padding: 18px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-right: 26px;
}

.leaderboard-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.leaderboard-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.leaderboard-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--panel-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  min-height: 48px;
}

.leaderboard-rank {
  font-weight: 700;
  color: var(--muted);
  width: 52px;
  flex: 0 0 52px;
}

.leaderboard-name {
  flex: 1;
  font-weight: 700;
}

.leaderboard-points {
  font-weight: 700;
}

.leaderboard-row--self {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.lb-gold {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(234, 179, 8, 0.12));
  border-color: rgba(234, 179, 8, 0.35);
}

.lb-silver {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(148, 163, 184, 0.12));
  border-color: rgba(148, 163, 184, 0.35);
}

.lb-bronze {
  background: linear-gradient(135deg, rgba(244, 114, 65, 0.25), rgba(244, 114, 65, 0.12));
  border-color: rgba(244, 114, 65, 0.35);
}

.leaderboard-sidebar {
  width: 100%;
  z-index: 25;
  position: relative;
}

.leaderboard-self {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-self-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.leaderboard-self-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 899px) {
  .leaderboard-sidebar {
    display: none;
  }

  .notifications-popover {
    position: fixed;
    top: 60px;
    right: 12px;
  }

  .notif-container {
    position: fixed;
    top: 10px;
    right: 12px;
    width: auto;
    z-index: 30;
    justify-content: flex-end;
    margin-bottom: 0;
  }
}

.sticky-card {
  position: sticky;
  top: 16px;
}

@media (max-width: 899px) {
  .leaderboard-sidebar.open {
    display: block;
    position: fixed;
    inset: 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.65);
  }

  .leaderboard-sidebar.open .leaderboard-card {
    max-width: 420px;
    margin: 0 auto;
    max-height: calc(100vh - 32px);
  }

  .leaderboard-sidebar.open .sticky-card {
    position: relative;
    top: 0;
  }

  .leaderboard-sidebar.open .notif-container {
    position: fixed;
    top: 10px;
    right: 12px;
    width: auto;
  }
}

.auth-card {
  background: #0f172a;
  border: 1px solid var(--panel-strong);
  border-radius: 16px;
  padding: 22px;
  width: min(400px, 100%);
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  padding-right: 40px;
}

.auth-header h3 {
  margin: 0;
}

.auth-header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-close {
  position: absolute;
  top: -2px;
  right: -2px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--muted);
  padding: 6px;
  min-width: 0;
}

.auth-entry-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-entry-panel[hidden],
.auth-form[hidden],
.verify-email-panel[hidden],
.profile-panel[hidden],
.profile-identity[hidden] {
  display: none !important;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form label span {
  color: var(--muted);
  font-size: 14px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.04);
}

.auth-mode-btn {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  box-shadow: none;
}

.auth-mode-btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.auth-mode-btn:hover {
  transform: none;
  border-color: transparent;
}

.profile-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verify-email-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.verify-email-copy {
  color: var(--text);
  line-height: 1.5;
}

.verify-email-address {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-strong);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.verify-email-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.verify-email-actions > button {
  width: 100%;
}

.profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 6px 0 12px;
}

.profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
}

.profile-avatar-badge {
  width: 24px;
  height: 24px;
  right: -6px;
  bottom: -6px;
}

.profile-identity-nick {
  font-weight: 800;
  font-size: 16px;
}

.profile-identity-rank {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.team-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

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

.team-name {
  font-weight: 700;
}

.auth-status {
  min-height: 20px;
  font-size: 14px;
  text-align: center;
}

.auth-utility {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.auth-utility-link {
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.45);
  text-underline-offset: 3px;
}

.auth-utility-link:hover {
  color: var(--text);
  text-decoration-color: rgba(226, 232, 240, 0.7);
  transform: none;
}

.auth-utility-copy {
  color: rgba(148, 163, 184, 0.88);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--panel-strong);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.provider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--panel-strong);
  background: #1f2937;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.provider-btn:hover {
  background: #273548;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.full-width {
  width: 100%;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: transparent;
  border: none;
  object-fit: contain;
}

.empty {
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.table-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.kickoff-hidden {
  display: none;
}

body.view-leagues #week-nav,
body.view-leagues #day-buttons {
  display: none !important;
}

@media (max-width: 760px) {
  .table {
    width: 100%;
    border-radius: 14px;
    table-layout: fixed;
  }

  .table thead {
    display: none;
  }

  .table tbody tr {
    display: table-row;
    border-bottom: 1px solid var(--panel-strong);
  }

  .table td {
    padding: 12px 8px;
    border-bottom: none;
  }

  .match-cell {
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .mid-stack {
    min-width: unset;
    padding: 4px 0 8px;
    flex: 1;
    align-items: center;
  }

  .kickoff-chip {
    display: inline-block;
  }

  .table td:nth-child(2),
  .table td:nth-child(3) {
    display: block;
    text-align: center;
    padding: 0;
    border: none;
  }

  .table td:nth-child(2)::before,
  .table td:nth-child(3)::before {
    content: none;
  }

  .table td:nth-child(3) {
    margin-top: 12px;
  }

  .table tbody tr:last-child {
    border-bottom: none;
  }

  .save-btn,
  .btn-disabled,
  .btn-disabled-saved,
  .btn-past {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 16px;
    display: block;
  }

  .league-table {
    table-layout: auto;
  }

  .league-table thead {
    display: none;
  }

  .league-table tbody tr {
    display: table-row;
  }

  .league-table td {
    display: table-cell;
    vertical-align: middle;
    padding: 12px 8px;
  }

  .league-table td:nth-child(2),
  .league-table td:nth-child(3) {
    display: table-cell;
    text-align: right;
    padding: 12px 8px;
    border-bottom: none;
  }

  .league-table td:nth-child(3) {
    margin-top: 0;
    width: 1%;
    white-space: nowrap;
  }

  .league-member-cell {
    min-width: 0;
  }

  .league-member-name {
    min-width: 0;
    flex-wrap: wrap;
  }

  .league-member-actions-cell {
    width: 1%;
    padding-left: 4px;
    white-space: nowrap;
  }

  .league-member-actions {
    align-items: center;
    justify-content: flex-end;
    min-width: 34px;
  }

  .league-member-kebab {
    flex-shrink: 0;
  }
}

/* Playoff bracket (UI-only) */
.playoff-view {
  margin-top: 18px;
}
.playoff-shell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-strong);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.playoff-shell.light-mode {
  background: #f8fafc;
  color: #0f172a;
}
.playoff-shell.light-mode .round,
.playoff-shell.light-mode .series {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}
.playoff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.playoff-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.playoff-logo {
  width: 52px;
  height: 52px;
}
.playoff-title {
  font-weight: 700;
  font-size: 20px;
}
.playoff-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.playoff-actions .icon-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-strong);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
}
.playoff-actions .icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.bracket-container {
  overflow-x: auto;
  overflow-y: visible;
  container-type: inline-size;
  scrollbar-gutter: stable;
  padding-bottom: 6px;
}
.bracket-grid {
  display: grid;
  --series-w: 130px;
  --series-h: 118px;
  --series-gap: 24px;
  --round-gap: 10px;
  --series-pad: 8px;
  --series-logo: 46px;
  --series-score-size: 17px;
  --series-pick-size: 11px;
  --series-gap-x: 8px;
  --series-gap-y: 4px;
  --series-step: calc(var(--series-h) + var(--series-gap));
  grid-template-columns: repeat(7, var(--series-w));
  column-gap: var(--round-gap);
  align-items: start;
  justify-content: space-between;
  width: 100%;
  min-width: max-content;
}
.round {
  background: transparent;
  border: 0;
  padding: 0;
}
.round-title {
  display: none;
}
.series-list {
  display: flex;
  flex-direction: column;
  gap: var(--series-gap);
}
.series {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-strong);
  border-radius: 10px;
  width: 100%;
  height: var(--series-h);
  padding: var(--series-pad);
  position: relative;
  cursor: pointer;
}
.series.series--loading {
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: playoff-shimmer 1.2s ease-in-out infinite;
  border-color: rgba(255, 255, 255, 0.08);
}
@keyframes playoff-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.series.series--locked {
  opacity: 0.4;
  cursor: not-allowed;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: none;
}
.series.series--locked:hover {
  transform: none;
}
.round-2 .series-list {
  padding-top: calc(var(--series-step) / 2);
  gap: calc(var(--series-step) + var(--series-gap));
}
.round-3 .series-list,
.round-final .series-list {
  padding-top: calc(var(--series-step) * 1.5);
}
.series.series--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-strong);
}

.series.series--wildcard {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.12), 0 0 22px rgba(245, 158, 11, 0.1);
}

.series.series--selected.series--wildcard {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-strong), 0 0 0 3px rgba(251, 191, 36, 0.12);
}
.series-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  align-items: center;
  align-content: center;
  gap: var(--series-gap-y) var(--series-gap-x);
  height: 100%;
}
.series .team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.series .team-logo {
  width: var(--series-logo);
  height: var(--series-logo);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
}
.series-score {
  grid-column: 1 / -1;
  grid-row: 2;
  text-align: center;
  font-weight: 700;
  font-size: var(--series-score-size);
  line-height: 1.05;
}
.series-pick {
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: center;
  align-self: center;
  text-align: center;
  font-size: var(--series-pick-size);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.15;
}
.series-pick.is-empty {
  opacity: 0.9;
}
.series-points-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 12px;
  color: var(--accent);
}

.series-wildcard-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.92), rgba(245, 158, 11, 0.92));
  color: #1f2937;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 18px rgba(245, 158, 11, 0.18);
  pointer-events: none;
}

.series-wildcard-badge[hidden] {
  display: none !important;
}

.series-points-badge.points-badge {
  font-size: 11px;
  padding: 4px 8px;
  min-width: 24px;
}

@container (max-width: 1000px) {
  .bracket-grid {
    --series-w: 124px;
    --series-h: 112px;
    --series-gap: 20px;
    --round-gap: 8px;
    --series-logo: 42px;
    --series-score-size: 16px;
  }
}

@container (max-width: 930px) {
  .bracket-grid {
    --series-w: 116px;
    --series-h: 104px;
    --series-gap: 18px;
    --round-gap: 8px;
    --series-pad: 7px;
    --series-logo: 38px;
    --series-score-size: 15px;
    --series-gap-x: 6px;
  }

  .series-points-badge.points-badge {
    font-size: 10px;
    padding: 4px 7px;
  }
}

@container (max-width: 840px) {
  .bracket-grid {
    --series-w: 108px;
    --series-h: 96px;
    --series-gap: 16px;
    --round-gap: 6px;
    --series-pad: 6px;
    --series-logo: 34px;
    --series-score-size: 14px;
    --series-pick-size: 10px;
    --series-gap-x: 5px;
    --series-gap-y: 3px;
  }

  .series-wildcard-badge {
    top: 5px;
    left: 5px;
    padding: 3px 7px;
    font-size: 9px;
  }
}

@container (max-width: 780px) {
  .bracket-grid {
    --series-w: 102px;
    --series-h: 92px;
    --series-gap: 14px;
    --round-gap: 6px;
    --series-logo: 32px;
    --series-score-size: 13px;
    --series-pick-size: 10px;
  }

  .series-points-badge.points-badge {
    top: 3px;
    right: 3px;
    padding: 3px 6px;
    min-width: 22px;
  }
}
.playoff-shell.light-mode .series-pick {
  color: rgba(71, 85, 105, 0.82);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
@media (max-width: 700px) {
  .bracket-container {
    overflow-x: hidden;
  }
  .bracket-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    align-items: stretch;
  }
  .round {
    width: 100%;
    order: 0;
  }
  .round-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin: 8px 0;
  }
  .round-2 .series-list,
  .round-3 .series-list,
  .round-final .series-list {
    padding-top: 0;
    gap: 12px;
  }
  .series-list {
    gap: 12px;
  }
  .series {
    width: 100%;
    height: auto;
    min-height: var(--series-h);
    padding: 10px;
  }
  .series-inner {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: center;
    align-content: center;
    gap: 8px 6px;
    height: 100%;
  }
  .series-score {
    grid-column: 2;
    grid-row: 1;
  }
  .series-pick {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .series .team {
    justify-content: flex-start;
  }
  .series .team:last-child {
    justify-content: flex-end;
  }
  .series .team .team-logo {
    width: 64px;
    height: 64px;
  }
}
