:root {
  color-scheme: light;
  --ink: #f8fbff;
  --muted: #b8c7dc;
  --line: rgba(255, 255, 255, 0.34);
  --panel: #071a38;
  --panel-2: #0a244e;
  --panel-3: #0d2f66;
  --page: #06142b;
  --navy: #071a38;
  --blue: #0c2d66;
  --blue-2: #06142b;
  --aqua: #0082f1;
  --aqua-soft: #e8fbff;
  --red: #d84d57;
  --gold: #0082f1;
  --green: #0796a8;
  --shadow: 0 18px 45px rgba(5, 18, 44, 0.18);
  --blue-gradient: linear-gradient(135deg, #06142b 0%, #0a2a63 48%, #103f8f 100%);
  --workspace-panel-height: 720px;
}

* {
  box-sizing: border-box;
  scrollbar-color: rgba(255, 255, 255, 0.55) rgba(7, 26, 56, 0.62);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(0, 130, 241, 0.22), transparent 24rem),
    linear-gradient(180deg, #071a38 0, #0a2a63 86px, var(--page) 280px);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(7, 26, 56, 0.62);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 26, 56, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.82);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

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

.taskbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #040d1e 0%, #071c45 48%, #0b2c66 100%);
  box-shadow: 0 12px 30px rgba(5, 18, 44, 0.24);
  backdrop-filter: blur(12px);
  padding: 6px clamp(12px, 3vw, 32px);
}

.topbar,
main {
  width: min(1680px, 100%);
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 22px;
  width: auto;
}

.taskbar-center {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.league-tabs {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  gap: 3px;
  height: 32px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.league-tab {
  width: 48px;
  height: 26px;
  min-height: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  font-weight: 800;
}

.league-tab.is-active {
  background: #fff;
  color: var(--navy);
  box-shadow: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow:empty {
  display: none;
}

h2 {
  margin: 0;
  line-height: 1.04;
}

h2 {
  font-size: 1.35rem;
  color: var(--aqua);
}

h3 {
  color: var(--aqua);
}

.taskbar-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 12px;
}

select {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 34px 0 10px;
  font-weight: 800;
}

select option {
  background: var(--panel);
  color: var(--ink);
}

.taskbar-controls label {
  color: rgba(255, 255, 255, 0.82);
  min-width: 0;
  gap: 0;
}

.taskbar-controls select,
.account-actions a,
.account-actions button {
  width: 86px;
  min-height: 32px;
}

.account-actions .settings-icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  place-items: center;
}

.settings-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.taskbar-controls select {
  width: 104px;
  min-height: 32px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
  padding: 0 24px 0 10px;
}

.account-box {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.account-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.account-status span {
  overflow: hidden;
  max-width: 150px;
  text-overflow: ellipsis;
}

.refresh-indicator {
  display: none;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 9px 12px;
  white-space: nowrap;
}

.refresh-indicator.is-error {
  border-color: rgba(216, 77, 87, 0.72);
  background: rgba(216, 77, 87, 0.18);
}

.account-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.account-menu {
  position: relative;
}

.account-profile-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
}

.account-profile-button .account-avatar {
  width: 100%;
  height: 100%;
  flex: none;
  border: 0;
}

.account-avatar-fallback {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 2px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.account-dropdown.is-hidden {
  display: none;
}

.account-dropdown-username {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
}

.account-dropdown-item {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 9px 10px;
}

.account-dropdown-item:hover {
  background: var(--panel-2);
}

.account-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-actions a,
.account-actions button,
.favorite-toggle {
  display: inline-grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  background: var(--blue-gradient);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 10px;
  text-decoration: none;
}

.account-actions a:last-of-type,
.favorite-toggle {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 130, 241, 0.24), transparent 34rem),
    linear-gradient(135deg, #06142b 0%, #0a2a63 45%, #edf5ff 100%);
}

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

.auth-card {
  display: grid;
  gap: 22px;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-brand {
  width: fit-content;
}

.auth-card h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.05;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  color: var(--muted);
}

.auth-form button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: var(--blue-gradient);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.auth-form button:disabled,
.auth-links button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.auth-links a,
.auth-links button {
  border: 0;
  background: transparent;
  color: var(--aqua);
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-decoration: underline;
}

.auth-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  line-height: 1.45;
  padding: 12px;
}

.auth-message.is-error {
  border-color: rgba(216, 77, 87, 0.34);
  background: rgba(216, 77, 87, 0.08);
  color: #8d2530;
}

main {
  padding: 14px clamp(18px, 4vw, 56px) 56px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: -24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.status-strip > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  background: var(--panel-2);
  padding: 18px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.team-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(430px, 1.25fr) minmax(330px, 1fr);
  gap: 18px;
  align-items: stretch;
  height: var(--workspace-panel-height);
  min-height: 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 38px rgba(1, 8, 22, 0.28);
}

.panel-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.focus-panel > .panel-heading {
  justify-content: center;
  text-align: center;
}

.focus-panel > .panel-heading > div:first-child {
  min-width: 0;
}

.focus-panel > .panel-heading .eyebrow:empty {
  display: none;
}

.focus-panel-tools {
  position: absolute;
  right: 18px;
  left: 18px;
  justify-content: space-between;
}

.ask-panel > .panel-heading {
  justify-content: center;
  text-align: center;
}

.ask-panel > .panel-heading .eyebrow {
  margin: 0;
  font-size: 1rem;
  font-family: "Tourney", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.ask-panel-tools {
  position: absolute;
  right: 18px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

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

.focus-panel-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.focus-panel-tools span {
  margin-left: auto;
}

.panel-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 0;
  padding: 0;
}

.panel-back-button span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  transform: translateY(-1px);
}

.panel-back-button:hover {
  border-color: #fff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.team-link {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.team-link:hover {
  color: var(--green);
  text-decoration: underline;
}

.standing-parent-row td {
  border-bottom: 0;
  background: var(--panel-3);
  color: var(--aqua);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.standing-group-row td {
  background: rgba(0, 130, 241, 0.1);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.game-card,
.team-card,
.warning-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.game-card span,
.team-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.score-block {
  min-width: 86px;
  text-align: right;
}

.focus-panel {
  display: flex;
  flex-direction: column;
  height: var(--workspace-panel-height);
  max-height: var(--workspace-panel-height);
  overflow: hidden;
}

#standings-view,
.team-profile-view,
.focus-panel .game-detail-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.right-rail {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 18px;
  height: var(--workspace-panel-height);
  max-height: var(--workspace-panel-height);
  min-width: 0;
}

.right-rail .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ask-panel .ask-answer,
.ask-panel .profile-result {
  min-height: 0;
}

.ask-panel .ask-answer {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.ask-panel .profile-result {
  flex: 1 1 auto;
  overflow: auto;
}

.team-schedule-panel {
  display: flex;
  flex-direction: column;
  height: var(--workspace-panel-height);
  max-height: var(--workspace-panel-height);
  overflow: hidden;
}

.team-schedule-panel .game-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.ask-panel {
  margin-top: 0;
  overflow: auto;
}

.ask-panel-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.panel-icon-button:hover {
  border-color: #fff;
}

.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px 18px 0;
}

.ask-form button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  background: var(--blue-gradient);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 18px;
}

.ask-answer {
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  line-height: 1.55;
  padding: 14px;
  white-space: pre-wrap;
}

.profile-result {
  margin: 0 18px 18px;
}

.profile-result.is-hidden {
  display: none;
}

.howl-bot-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1500px, calc(100vw - 44px));
  height: min(880px, calc(100vh - 44px));
}

.howl-bot-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.howl-form {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.howl-results {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(520px, 1.45fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.howl-results .ask-answer,
.howl-results .profile-result {
  margin: 0;
  min-height: 0;
}

.howl-results .ask-answer {
  max-height: none;
  overflow: visible;
}

.howl-results .profile-result {
  overflow: auto;
}

.howl-results .profile-card {
  grid-template-columns: 150px minmax(0, 1fr);
}

.howl-results .profile-photo,
.howl-results .profile-initials {
  width: 150px;
  height: 150px;
}

.howl-results .profile-meta,
.howl-results .profile-stats {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.profile-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.profile-photo,
.profile-initials {
  width: 112px;
  height: 112px;
  border-radius: 8px;
}

.profile-photo {
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.profile-initials {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--aqua);
  font-size: 2rem;
  font-weight: 900;
}

.profile-main {
  min-width: 0;
}

.profile-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-title span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-meta,
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 8px;
}

.profile-meta div,
.profile-stats div {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px;
}

.profile-meta span,
.profile-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-meta strong,
.profile-stats strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-section-title {
  margin: 14px 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-stats-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.profile-stats-header .profile-section-title {
  margin: 0;
}

.profile-stat-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-stat-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 10px;
}

.profile-stat-tabs button.is-active {
  background: var(--blue-gradient);
  color: #fff;
}

.profile-stats {
  margin-top: 8px;
}

.profile-stats.is-hidden {
  display: none;
}

.draft-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.draft-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.draft-card-heading h3 {
  margin: 2px 0 0;
  font-size: 1.05rem;
}

.draft-card-heading > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.draft-tabs {
  justify-self: start;
}

.draft-pick-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.draft-pick-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  padding: 9px;
  text-align: left;
}

.draft-pick-row:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.draft-pick-number {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 6px;
  background: rgba(0, 130, 241, 0.12);
}

.draft-pick-number strong {
  color: var(--aqua);
  font-size: 1rem;
}

.draft-pick-number span,
.draft-pick-row span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.draft-pick-row > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.draft-pick-row strong,
.draft-pick-row span {
  overflow-wrap: anywhere;
}

.draft-tabs .draft-count-label {
  align-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 0;
  padding: 0 4px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(5, 18, 44, 0.68);
  padding: 22px;
}

.modal-panel {
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.howl-bot-panel .modal-heading {
  justify-content: center;
  text-align: center;
}

.howl-bot-panel .modal-heading .eyebrow {
  margin: 0;
  font-size: 1rem;
  font-family: "Tourney", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.howl-bot-panel .modal-heading .ask-panel-tools {
  position: absolute;
  right: 18px;
}

.modal-close {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.draft-overlay-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1120px, calc(100vw - 44px));
  height: min(760px, calc(100vh - 44px));
}

.draft-overlay-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 18px;
  min-height: 0;
  padding: 18px;
}

.draft-overlay-layout > div,
.draft-player-panel {
  min-height: 0;
  overflow: auto;
}

.overlay-draft-list {
  max-height: calc(100vh - 260px);
  margin-top: 12px;
}

.draft-player-panel .profile-card {
  grid-template-columns: 96px minmax(0, 1fr);
}

.draft-player-panel .profile-photo,
.draft-player-panel .profile-initials {
  width: 96px;
  height: 96px;
}

.settings-page {
  margin: 18px auto 0;
  width: min(760px, calc(100% - 32px));
}

.settings-page.is-hidden {
  display: none;
}

#stats-page.is-hidden {
  display: none;
}

.account-settings-panel {
  width: 100%;
}

.settings-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.settings-form label {
  color: var(--muted);
}

.profile-picture-settings {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.profile-picture-settings legend {
  color: var(--aqua);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 6px;
}

.file-picker-label input {
  display: grid;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
}

.file-picker-label input::file-selector-button {
  height: 28px;
  margin-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.settings-form button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 7px;
  background: var(--blue-gradient);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 18px;
}

.danger-zone div {
  display: grid;
  gap: 4px;
}

.danger-zone span {
  color: var(--muted);
  font-size: 0.84rem;
}

.danger-zone button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.account-settings-panel .auth-message {
  margin: 0 18px 18px;
}

.roster-panel {
  margin-top: 18px;
}

.favorites-panel {
  margin-top: 18px;
}

.team-detail-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.game-detail-panel {
  margin-top: 18px;
  scroll-margin-top: 12px;
}

.focus-panel .game-detail-panel {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.game-detail-heading {
  justify-content: stretch;
  padding-block: 12px;
}

.game-detail-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.schedule-tools {
  display: flex;
  align-items: end;
  gap: 12px;
}

.compact-filter {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-filter span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.is-highlighted {
  border-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(0, 130, 241, 0.2), 0 10px 28px rgba(5, 18, 44, 0.16) !important;
}

.warning-card {
  justify-content: flex-start;
  border-color: rgba(216, 77, 87, 0.34);
  background: rgba(216, 77, 87, 0.08);
  color: #8d2530;
  font-weight: 800;
}

.schedule-game-card {
  width: 100%;
  background: var(--panel-2);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.schedule-game-card:hover {
  border-color: #fff;
  box-shadow: 0 8px 20px rgba(5, 18, 44, 0.12);
}

.game-detail-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.team-profile {
  padding: 18px;
}

.team-profile-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
}

.team-profile-logo {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.1);
}

.team-profile-initials {
  display: grid;
  place-items: center;
  color: var(--aqua);
  font-size: 2rem;
  font-weight: 900;
}

.team-profile-main {
  min-width: 0;
}

.legacy-stats-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.legacy-stats-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.legacy-stats-heading strong {
  color: var(--aqua);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.legacy-stats-heading span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.legacy-stat-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.team-profile-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.team-profile-title h3 {
  margin: 0;
  color: var(--aqua);
  font-size: 1.35rem;
}

.team-profile-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.favorites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 18px;
}

.favorite-team {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.favorite-team:hover {
  border-color: #fff;
}

.favorite-team-open {
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.favorite-team span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.favorite-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 10px;
  text-align: left;
}

.favorite-theme-toggle::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--team-accent, currentColor);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.favorite-theme-toggle:hover {
  border-color: #fff;
}

.favorite-theme-toggle.is-active {
  border-color: var(--team-accent, var(--aqua));
  background: rgba(255, 255, 255, 0.14);
}

.stat-section-title {
  margin-top: 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-2);
}

.stat-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stat-card-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}

.stat-pill {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px;
}

.stat-pill span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.stat-pill strong {
  color: #fff;
  font-size: 0.96rem;
}

.roster-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.roster-position {
  margin-top: 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-2);
}

.roster-player-row {
  width: 100%;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  appearance: none;
}

.roster-player-row:hover,
.roster-player-row:focus-visible {
  border-color: #fff;
  background: var(--panel-3);
}

.player-row img,
.player-number {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
}

.player-row img {
  object-fit: cover;
}

.player-number {
  display: grid;
  place-items: center;
  background: rgba(0, 130, 241, 0.12);
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 900;
}

.player-row span,
.empty-state {
  color: var(--muted);
  font-size: 0.86rem;
}

.empty-state {
  padding: 18px;
}

.empty-state.compact {
  padding: 0;
}

.skeleton-card,
.skeleton-row td {
  min-height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(0, 130, 241, 0.16), rgba(255, 255, 255, 0.07));
  background-size: 200% 100%;
  animation: pulse 1.4s linear infinite;
}

.skeleton-row td {
  border: 8px solid var(--panel);
}

@keyframes pulse {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1210px) {
  .team-workspace {
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

  .taskbar-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-box,
  .account-status,
  .refresh-indicator {
    justify-self: start;
    min-width: 0;
    text-align: left;
  }

  .account-actions {
    justify-content: flex-start;
  }

  .ask-form {
    grid-template-columns: 1fr;
  }

  .howl-bot-panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  .howl-results {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .howl-results .profile-card {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .team-workspace,
  .right-rail,
  .status-strip {
    grid-template-columns: 1fr;
  }

  .team-workspace {
    height: auto;
    min-height: 0;
  }

  .focus-panel,
  .team-schedule-panel,
  .right-rail {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .team-schedule-panel,
  #standings-view,
  .team-profile-view,
  .focus-panel .game-detail-panel {
    max-height: none;
  }

  .game-detail-heading {
    justify-content: stretch;
  }

  .game-detail-tools {
    display: grid;
    align-items: stretch;
  }

  .status-strip {
    margin-top: -18px;
  }

  .modal-overlay {
    align-items: start;
    overflow: auto;
    padding: 12px;
  }

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

  .overlay-draft-list {
    max-height: 320px;
  }

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

@media (max-width: 520px) {
  .taskbar {
    padding-inline: 14px;
  }

  main {
    padding-inline: 14px;
  }

  .league-tabs {
    width: 100%;
  }

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

  th,
  td {
    padding: 12px;
  }
}
