@import url("tokens.css");

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1c1c1c;
  --surface-raised: #1a1a1a;
  --border: #2a2a2a;
  --border-subtle: #1f1f1f;
  --text: #ffffff;
  --text-muted: #8a8a8a;
  --text-secondary: #b0b0b0;
  --accent: #2e5cff;
  --accent-hover: #1a4ae8;
  --accent-muted: rgba(46, 92, 255, 0.12);
  --live: #ff4d4d;
  --success: #00c853;
  --yes: #00c853;
  --no: #ff4d4d;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.app--wide {
  max-width: 1200px;
}

.header {
  margin-bottom: 2rem;
}

.header--with-back {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.header__nav[hidden] {
  display: none !important;
}

.header__brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.header__eyebrow {
  display: inline-block;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: 999px;
}

.header__eyebrow[hidden] {
  display: none !important;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  width: fit-content;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--text);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: none;
}

.header__refreshed {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header__status {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "start actions"
    "main main";
  gap: 1rem 2rem;
  align-items: start;
  width: 100%;
}

.header__toolbar:not(:has(.header__main)) {
  grid-template-areas: "start actions";
}

.header__start {
  grid-area: start;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.header__main {
  grid-area: main;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.header__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  flex-shrink: 0;
}

.header__context-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.context-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.context-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  width: fit-content;
  transition: color 0.15s;
}

.context-nav__link:hover {
  color: var(--text);
}

.header__context-nav[hidden] {
  display: none !important;
}

.header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  width: fit-content;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}

.header__nav-link:hover {
  color: var(--text);
}

.header__nav-link[hidden] {
  display: none !important;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.site-logo:hover {
  opacity: 0.92;
}

.site-logo--compact {
  margin-bottom: 0;
}

.site-logo__mark {
  display: block;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.site-logo--compact .site-logo__mark {
  width: 1.75rem;
  height: 1.75rem;
}

.site-logo__wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.site-logo__wordmark--compact {
  font-size: 1.1rem;
}

.site-logo__stacked {
  font-weight: 700;
  color: var(--text);
}

.site-logo__sports {
  font-weight: 700;
  color: var(--accent);
}

.header__session {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.35rem 0.3rem 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.header__session-divider {
  width: 1px;
  height: 1.35rem;
  background: var(--border);
  flex-shrink: 0;
}

.header__balance {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.25);
  border-radius: 999px;
  white-space: nowrap;
}

.header__league-wrap {
  position: relative;
}

.header__league {
  display: inline-flex;
  align-items: center;
  max-width: 14rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: rgba(46, 92, 255, 0.12);
  border: 1px solid rgba(46, 92, 255, 0.25);
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.header__league:hover,
.header__league[aria-expanded="true"] {
  background: rgba(46, 92, 255, 0.2);
  border-color: rgba(46, 92, 255, 0.45);
}

.header__league--active::after,
.header__league--has-menu::after {
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.65rem;
  opacity: 0.85;
}

.header__league-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 200;
  min-width: 220px;
  max-width: 280px;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.header__league-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__league-menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

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

.header__league-menu-item--active {
  background: rgba(46, 92, 255, 0.12);
}

.header__league-menu-item-name {
  font-weight: 600;
}

.header__league-menu-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header__league-menu-footer {
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.header__league-menu-link {
  display: block;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius);
}

.header__league-menu-link:hover {
  background: rgba(46, 92, 255, 0.08);
}

.header__league-menu-title {
  display: none;
}

.header__league-backdrop {
  display: none;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.settings-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.settings-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.settings-panel__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.settings-panel__backdrop[hidden] {
  display: none !important;
}

.settings-panel {
  width: 100%;
  max-width: 420px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.settings-panel[hidden] {
  display: none !important;
}

.settings-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.settings-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.settings-panel__close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.settings-panel__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem 1.1rem;
}

.settings-panel__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.settings-panel__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-panel__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.settings-panel__value--balance {
  color: var(--success);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.settings-form__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.settings-form__row {
  display: flex;
  gap: 0.5rem;
}

.settings-form__input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}

.settings-form__input:focus {
  border-color: var(--accent);
}

.settings-form__row .btn {
  flex-shrink: 0;
}

.settings-form--remove {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.settings-panel__message {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.settings-panel__message--error {
  color: var(--no);
}

.settings-panel__message--success {
  color: var(--success);
}

.settings-panel__message--remove {
  color: var(--no);
  font-weight: 600;
}

.settings-panel__message--remove.settings-panel__message--error {
  color: var(--no);
}

.settings-panel__message[hidden] {
  display: none !important;
}

.settings-panel__section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.settings-panel__section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.settings-panel__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-panel__link-btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.settings-form__select {
  width: 100%;
}

.settings-accounts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.settings-accounts__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.settings-accounts__item--active {
  border-color: rgba(46, 92, 255, 0.35);
  background: rgba(46, 92, 255, 0.08);
}

.settings-accounts__name {
  font-size: 0.88rem;
  font-weight: 600;
}

.settings-accounts__badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-bar__view-all {
  flex-shrink: 0;
}

.filter-bar__input {
  width: 100%;
  max-width: 360px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.filter-bar__input:focus {
  border-color: var(--accent);
}

.filter-bar__input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.filter-bar__hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tile-section {
  margin-bottom: 2rem;
}

.tile-section__title {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.sport-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.sport-tile:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.sport-tile__icon {
  font-size: 2.25rem;
  line-height: 1;
}

.sport-tile__body {
  min-width: 0;
  width: 100%;
}

.sport-tile__name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}

.sport-tile__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sport-tile__badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.sport-tile__live {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 77, 77, 0.12);
  color: var(--live);
  border-radius: 4px;
}

.competition-logo {
  display: inline-flex;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--border);
}

.competition-logo--sm {
  width: 32px;
  height: 32px;
}

.competition-logo--md {
  width: 40px;
  height: 40px;
}

.competition-logo--lg {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.competition-logo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.competition-logo__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.event-tile__logo {
  margin-bottom: 0;
}

.event-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.event-tile:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.event-tile__img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--border);
}

.event-tile__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--border);
}

.event-tile__body {
  text-align: center;
  min-width: 0;
  width: 100%;
}

.event-tile__name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  word-break: break-word;
}

.event-tile__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.event-tile__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.event-tile__live {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 77, 77, 0.12);
  color: var(--live);
  border-radius: 4px;
}

.event-tile--inactive {
  opacity: 0.72;
  border-style: dashed;
}

.event-tile--inactive:hover {
  opacity: 0.9;
}

.event-tile--inactive .event-tile__badge {
  opacity: 0.65;
}

.games-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.games-section h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.games-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header--with-back .games-count {
  margin-top: 0.25rem;
}

.state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.state--error p {
  margin: 0 0 1rem;
  color: #ef9a9a;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  display: inline-block;
  margin-top: 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.btn--secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}

.game-card:hover {
  border-color: var(--accent-muted);
  background: var(--surface-hover);
}

.game-card__link {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
}

.game-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-card__live {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 77, 77, 0.12);
  color: var(--live);
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-card__live::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--live);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.game-card__phase {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.game-card__matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.game-card__team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.game-card__team--away {
  justify-content: flex-start;
}

.game-card__team--home {
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.game-card__team-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg);
  flex-shrink: 0;
}

.game-card__team-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card__vs {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
  background: var(--bg);
  border-radius: 4px;
}

.game-card__title-only {
  font-weight: 600;
  font-size: 1rem;
}

@media (max-width: 480px) {
  .game-card__matchup {
    flex-direction: column;
    align-items: stretch;
  }

  .game-card__team,
  .game-card__team--home {
    flex-direction: row;
    justify-content: flex-start;
  }

  .game-card__vs {
    align-self: center;
  }
}

/* Game detail page */
.game-hero {
  margin-bottom: 1.5rem;
}

.game-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.game-hero__matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-hero__team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.game-hero__logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--surface);
}

.game-hero__name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}

.game-hero__vs {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.3rem 0.5rem;
  background: var(--surface);
  border-radius: 6px;
}

.odds-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.odds-row--three {
  grid-template-columns: 1fr 1fr 1fr;
}

.odds-row__disclaimer {
  margin: -0.35rem 0 1.25rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.odds-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.odds-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.odds-card--draw {
  border-color: var(--border);
}

.odds-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  word-break: break-word;
}

.odds-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.props-section {
  margin-bottom: 2rem;
}

.props-section__title {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.props-section__empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.props-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.props-toolbar__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.props-dropdown {
  flex: 1;
  max-width: 360px;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.props-dropdown:focus {
  border-color: var(--accent);
}

.props-dropdown:hover {
  border-color: var(--text-muted);
}

.props-panel {
  min-height: 2rem;
}

.props-category {
  margin-bottom: 1.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.props-category__title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.props-category .props-toolbar {
  margin-bottom: 0.85rem;
}

.props-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.prop-market {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prop-market__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.prop-market__title--sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.result-odds-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.result-odds-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0.6rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-align: center;
}

.result-odds-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}

.result-odds-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.prop-slider-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.prop-slider-block__header {
  display: flex;
  justify-content: center;
}

.prop-slider-block__line {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.prop-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prop-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.prop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}

.prop-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.prop-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.prop-slider__ticks {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
}

.prop-slider__tick {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0.15rem;
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.prop-slider__tick:hover {
  color: var(--text);
  background: var(--accent-muted);
}

.prop-slider__tick--active {
  color: var(--accent);
  font-weight: 700;
  border-color: var(--accent-muted);
  background: var(--accent-muted);
}

.prop-slider-block__outcomes {
  display: flex;
  justify-content: center;
}

.prop-slider-block__outcomes .prop-row__outcomes {
  width: 100%;
  max-width: 320px;
}

.prop-slider-block__outcomes .prop-pill {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
}

.props-group {
  margin-bottom: 0;
}

.props-group__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.prop-row:hover {
  border-color: var(--border);
}

.prop-row__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}

.prop-row__outcomes {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.prop-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 56px;
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}

.prop-pill:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.prop-pill__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.prop-pill__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.prop-pill--over {
  border-color: rgba(0, 200, 83, 0.5);
  background: rgba(0, 200, 83, 0.08);
}

.prop-pill--over .prop-pill__price {
  color: var(--yes);
}

.prop-pill--under {
  border-color: rgba(255, 77, 77, 0.5);
  background: rgba(255, 77, 77, 0.08);
}

.prop-pill--under .prop-pill__price {
  color: var(--no);
}

.prop-pill--yes {
  border-color: rgba(0, 200, 83, 0.5);
  background: rgba(0, 200, 83, 0.08);
}

.prop-pill--yes .prop-pill__price {
  color: var(--yes);
}

.prop-pill--no {
  border-color: rgba(255, 77, 77, 0.5);
  background: rgba(255, 77, 77, 0.08);
}

.prop-pill--no .prop-pill__price {
  color: var(--no);
}

/* Spread Display */
.spread-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spread-outcomes {
  min-height: 100px;
}

.spread-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.spread-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-align: center;
}

.spread-card__team {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.spread-card__line {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.spread-card__odds {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Category Tabs */
.props-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.props-tabs::-webkit-scrollbar {
  display: none;
}

.props-tab {
  position: relative;
  flex-shrink: 0;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}

.props-tab:hover {
  color: var(--text-secondary);
}

.props-tab--active {
  color: var(--text);
}

.props-tab--active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.props-tab-panel {
  min-height: 2rem;
  animation: fadeIn 0.15s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .game-hero__matchup {
    flex-direction: column;
  }

  .odds-row--three {
    grid-template-columns: 1fr;
  }

  .odds-row:not(.odds-row--three) {
    grid-template-columns: 1fr;
  }

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

  .prop-row__outcomes {
    justify-content: stretch;
  }

  .prop-pill {
    flex: 1;
  }

  .result-odds-row {
    grid-template-columns: 1fr;
  }

  .prop-slider__ticks {
    flex-wrap: wrap;
  }

  .prop-slider__tick {
    flex: 0 1 auto;
    min-width: 2.5rem;
  }

  .spread-teams {
    grid-template-columns: 1fr;
  }

  .league-leaderboard__table-wrap {
    display: none;
  }

  .league-leaderboard__cards {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

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

  .league-leaderboard__card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem 0.75rem;
    align-items: center;
    padding: 0.85rem 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }

  .league-leaderboard__card--you {
    border-color: rgba(46, 92, 255, 0.35);
    background: rgba(46, 92, 255, 0.08);
  }

  .league-leaderboard__card-rank {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
  }

  .league-leaderboard__card-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
  }

  .league-leaderboard__card-name {
    font-size: 0.98rem;
    font-weight: 600;
  }

  .league-leaderboard__card-balance {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success);
  }

  .league-leaderboard__card .league-leaderboard__remove {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .competition-picker__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bet-slip-backdrop {
    position: fixed;
    inset: 0;
    z-index: 499;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
  }

  .bet-slip-backdrop[hidden] {
    display: none !important;
  }

  .bet-slip.bet-slip--sheet-open {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 500;
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    max-height: min(75dvh, calc(100dvh - env(safe-area-inset-bottom)));
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bet-slip.bet-slip--sheet-open .bet-slip__inner {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .bet-slip__actions {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}

.bet-slip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.bet-slip-toggle:hover,
.bet-slip-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.bet-slip-toggle--has-picks {
  color: var(--accent);
  border-color: rgba(46, 92, 255, 0.35);
  background: rgba(46, 92, 255, 0.08);
}

.bet-slip-toggle__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

.bet-slip-toggle__badge[hidden] {
  display: none !important;
}

@media (min-width: 769px) {
  .bet-slip-backdrop {
    display: none !important;
  }
}

/* App nav */
.app-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.app-nav__link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.app-nav__link--active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.app-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

.app-nav__badge[hidden] {
  display: none !important;
}

/* Game layout + bet slip */
.app--game {
  max-width: 1400px;
}

.header--game .header__toolbar--game {
  align-items: center;
}

.header--game .header__actions {
  gap: 0.65rem;
}

.header__session--game .header__session-divider {
  flex-shrink: 0;
}

.game-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.game-header__row--tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.game-header__back {
  flex: 1 1 auto;
  min-width: 0;
}

.game-header__slip {
  flex-shrink: 0;
}

.game-header__row--league {
  width: 100%;
}

.game-header__row--league .header__league-wrap {
  width: 100%;
}

.game-header__row--league .header__league {
  display: flex;
  width: 100%;
  max-width: none;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

/* Safety net if old game.html is still cached on the CDN */
.app--game [data-app-nav],
.app--game .header__account-btn,
.app--game .header__start .site-logo {
  display: none !important;
}

@media (min-width: 769px) {
  .game-header {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .game-header__row--tools {
    flex: 1 1 auto;
    min-width: 0;
  }

  .game-header__row--league {
    flex: 0 1 16rem;
    width: auto;
  }

  .game-header__row--league .header__league {
    justify-content: flex-start;
    text-align: left;
  }
}

.game-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.game-layout[hidden] {
  display: none !important;
}

.game-layout__main {
  flex: 1;
  min-width: 0;
}

.bet-slip {
  flex: 0 0 30%;
  max-width: 30%;
  min-width: 280px;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.bet-slip[hidden] {
  display: none !important;
}

.bet-slip__inner {
  background: #fff;
  color: #1a1a1a;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.bet-slip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e5e5e5;
}

.bet-slip__modes {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem 0;
}

.bet-slip__mode {
  flex: 1;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666;
  background: #f3f3f3;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  cursor: pointer;
}

.bet-slip__mode--active {
  color: #1a1a1a;
  background: #fff;
  border-color: #1a1a1a;
}

.bet-slip__hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
}

.bet-slip__legs {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bet-slip__leg {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  background: #f8f8f8;
  border: 1px solid #ececec;
  border-radius: var(--radius);
}

.bet-slip__leg-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bet-slip__leg-game {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
}

.bet-slip__leg-pick {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1a1a;
}

.bet-slip__leg-odds {
  font-size: 0.78rem;
  color: #666;
}

.bet-slip__leg-remove {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: #666;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  cursor: pointer;
}

.bet-slip__leg-remove:hover {
  color: #b91c1c;
  border-color: #fca5a5;
}

.bet-slip__empty {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: #888;
}

.bet-slip__panel[hidden] {
  display: none !important;
}

.bet-slip__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
}

.bet-slip__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: #666;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.bet-slip__close:hover {
  color: #1a1a1a;
  background: #f0f0f0;
}

.bet-slip__body {
  padding: 1rem 1.1rem 1.1rem;
}

.bet-slip__pick {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
}

.bet-slip__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.bet-slip__row--payout {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
}

.bet-slip__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
}

.bet-slip__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
}

.bet-slip__value--payout {
  color: #00a040;
  font-size: 1.1rem;
}

.bet-slip__form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bet-slip__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  outline: none;
}

.bet-slip__input:focus {
  border-color: var(--accent);
}

.bet-slip__message {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.bet-slip__message--error {
  color: #d32f2f;
}

.bet-slip__message--success {
  color: #00a040;
}

.bet-slip__message[hidden] {
  display: none !important;
}

.bet-slip__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.bet-slip__actions .btn {
  flex: 1;
}

.bet-slip__actions .btn--secondary {
  margin-top: 0;
  color: #1a1a1a;
  border-color: #ccc;
}

.bet-slip__actions .btn--secondary:hover {
  color: var(--accent);
}

/* League-scoped betting gate */
.betting-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: var(--radius);
}

.betting-gate[hidden] {
  display: none !important;
}

.betting-gate__message {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.betting-gate__link {
  flex-shrink: 0;
}

/* Clickable bets */
.bet-option {
  cursor: pointer;
  font-family: inherit;
  text-align: inherit;
}

.bet-option--disabled,
.bet-option[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

button.odds-card,
button.prop-pill,
button.result-odds-card,
button.spread-card {
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

button.prop-pill {
  padding: 0.45rem 0.75rem;
}

.bet-option.bet-selected,
.bet-selected.odds-card,
.bet-selected.prop-pill,
.bet-selected.result-odds-card,
.bet-selected.spread-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
  background: var(--accent-muted);
}

/* My Bets page */
.bets-tabs {
  margin-bottom: 1rem;
}

.bets-tab-panel[hidden] {
  display: none !important;
}

.state--inline {
  padding: 2rem 1rem;
  text-align: center;
}

.bets-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bets-list[hidden] {
  display: none !important;
}

.bet-card {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.bet-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.bet-card__header-start {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.bet-card__header-start .bet-card__game {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-card__header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.bet-card__status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.bet-card__status--open {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.bet-card__status--won {
  color: #15803d;
  background: rgba(34, 197, 94, 0.15);
}

.bet-card__status--lost {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.bet-card--won {
  border-color: rgba(34, 197, 94, 0.35);
}

.bet-card--lost {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.07);
  opacity: 1;
}

.bet-card--lost .bet-card__game {
  color: #f87171;
}

.bet-card__result {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.bet-card__result--won {
  color: #15803d;
}

.bet-card__result--lost {
  color: #b91c1c;
}

.bet-card__pending {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bet-card__live {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.bet-card__live--pending,
.bet-card__live--tracking {
  color: var(--text-muted);
}

.bet-card__live--clinched,
.bet-card__live--won {
  color: #15803d;
}

.bet-card__live--dead,
.bet-card__live--lost {
  color: #b91c1c;
}

.bet-card--live-dead {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: inset 4px 0 0 #ef4444;
}

.bet-card--live-hit {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  box-shadow: inset 4px 0 0 #22c55e;
}

.bet-card__live-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.bet-card__live-badge--dead,
.bet-card__live-badge--lost {
  color: #fff;
  background: #dc2626;
}

.bet-card__live-badge--clinched,
.bet-card__live-badge--won {
  color: #fff;
  background: #16a34a;
}

.bet-card__live-badge--tracking {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.bet-card__game {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.bet-card__game:hover {
  text-decoration: underline;
}

.bet-card__date {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.bet-card__pick {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.bet-card__pick-block {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.bet-card__pick-block--dead {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
  box-shadow: inset 4px 0 0 #ef4444;
}

.bet-card__pick-block--lost {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  box-shadow: inset 4px 0 0 #ef4444;
}

.bet-card__pick-block--lost .bet-card__pick {
  color: #fca5a5;
}

.bet-card__pick-block--hit {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
  box-shadow: inset 4px 0 0 #22c55e;
}

.bet-card__pick-block .bet-card__live {
  margin: 0.45rem 0 0;
}

.bet-card__pick-block .bet-card__pick {
  margin: 0;
}

.bet-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.bet-card__stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bet-card__stat-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.bet-card--parlay .bet-card__game {
  font-weight: 700;
}

.bet-card__legs {
  list-style: none;
  margin: 0.5rem 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bet-card__leg {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.bet-card__leg--dead {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  box-shadow: inset 4px 0 0 #ef4444;
}

.bet-card__leg--hit {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.16);
  box-shadow: inset 4px 0 0 #22c55e;
}

.bet-card__leg--dead .bet-card__leg-pick {
  color: #fecaca;
}

.bet-card__leg--hit .bet-card__leg-pick {
  color: #bbf7d0;
}

.bet-card__leg-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  max-width: 46%;
  text-align: right;
}

.bet-card__leg-live {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.bet-card__leg-live--dead,
.bet-card__leg-live--lost {
  color: #b91c1c;
}

.bet-card__leg-live--clinched,
.bet-card__leg-live--won {
  color: #15803d;
}

.bet-card__leg-live--tracking {
  color: var(--text-muted);
}

.bet-card__leg-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.bet-card__leg-game {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.bet-card__leg-pick {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.bet-card__leg-status {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.bet-card__leg-status--open {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.bet-card__leg-status--won,
.bet-card__leg-status--clinched {
  color: #fff;
  background: #16a34a;
}

.bet-card__leg-status--lost,
.bet-card__leg-status--dead {
  color: #fff;
  background: #dc2626;
}

.bet-card__leg-status--tracking,
.bet-card__leg-status--pending {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.bet-card__status--building {
  color: #a16207;
  background: rgba(234, 179, 8, 0.18);
}

.bet-card--draft {
  border-style: dashed;
  border-color: rgba(234, 179, 8, 0.45);
}

.bet-card__pending--building {
  color: #a16207;
}

.bet-card__draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.btn--small {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.bet-slip__delete-all {
  flex: 1;
}

.header__account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.header__account-btn:hover {
  color: var(--accent);
  border-color: rgba(46, 92, 255, 0.35);
  background: rgba(46, 92, 255, 0.08);
}

@media (max-width: 640px) {
  .header__toolbar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "start"
      "actions"
      "main";
    gap: 0.85rem;
  }

  .header__actions {
    justify-content: flex-start;
  }

  .header__session {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
  }

  .header__league {
    max-width: 100%;
  }
}

.account-hub {
  max-width: 720px;
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.account-nav__link {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.account-nav__link:hover {
  color: var(--accent);
  border-color: rgba(46, 92, 255, 0.35);
}

.account-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.account-section:last-child {
  border-bottom: none;
}

.account-section__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.account-section__hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.account-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.account-section__balance {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success);
}

.account-hub__message {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.account-hub__message--error {
  color: var(--no);
}

.account-hub__message--success {
  color: var(--success);
}

.account-hub__message[hidden] {
  display: none !important;
}

.leagues-memberships__empty {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.leagues-memberships__empty[hidden] {
  display: none !important;
}

.leagues-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.leagues-page {
  max-width: 960px;
}

.leagues-page__message {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.leagues-page__message--error {
  color: var(--no);
}

.leagues-page__message--success {
  color: var(--success);
}

.leagues-page__message[hidden] {
  display: none !important;
}

.leagues-page__empty-hint {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.leagues-page__layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .leagues-page__layout {
    grid-template-columns: 1fr;
  }
}

.leagues-page__sidebar-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.leagues-page__sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.leagues-page__sidebar-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  font: inherit;
  text-align: left;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.leagues-page__sidebar-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.leagues-page__sidebar-item:hover {
  border-color: rgba(46, 92, 255, 0.35);
}

.leagues-page__sidebar-item--selected {
  border-color: rgba(46, 92, 255, 0.55);
  background: rgba(46, 92, 255, 0.1);
}

.leagues-page__sidebar-item--active {
  box-shadow: inset 3px 0 0 var(--success);
}

.leagues-page__sidebar-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.leagues-page__sidebar-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.leagues-page__sidebar-badge {
  margin-top: 0.25rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
  border-radius: 999px;
}

.league-detail__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.league-detail__copy {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.league-detail__logo {
  flex-shrink: 0;
}

.league-detail__text {
  min-width: 0;
}

.league-detail__name {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.league-detail__meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.league-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.league-leaderboard {
  margin-bottom: 1.75rem;
}

.league-leaderboard__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.league-leaderboard__hint {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.league-leaderboard__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
}

.league-leaderboard__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.league-leaderboard__table th,
.league-leaderboard__table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.league-leaderboard__table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

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

.league-leaderboard__rank {
  width: 4rem;
  font-weight: 700;
  color: var(--text-muted);
}

.league-leaderboard__row--first .league-leaderboard__rank {
  color: #fbbf24;
}

.league-leaderboard__player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.league-leaderboard__player-name {
  font-weight: 600;
}

.league-leaderboard__player-link {
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: #93c5fd;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(147, 197, 253, 0.35);
  text-underline-offset: 0.15em;
}

.league-leaderboard__player-link:hover {
  color: #bfdbfe;
  text-decoration-color: rgba(191, 219, 254, 0.7);
}

.league-leaderboard__card-name .league-leaderboard__player-link {
  display: inline;
}

.league-player-profile {
  margin-bottom: 1.75rem;
}

.league-player-profile[hidden] {
  display: none !important;
}

.league-player-profile__back {
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.league-player-profile__back:hover {
  color: var(--text);
}

.league-player-profile__header {
  margin-bottom: 1rem;
}

.league-player-profile__name {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.league-player-profile__meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.league-player-profile__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.league-player-profile__stat {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
}

.league-player-profile__stat-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.league-player-profile__stat-value {
  font-size: 1rem;
  font-weight: 700;
}

.league-player-profile__bets-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.league-player-profile__loading,
.league-player-profile__empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.league-player-profile__loading--error {
  color: #f87171;
}

.league-player-profile__bet-list {
  display: grid;
  gap: 0.75rem;
}

.league-player-bet {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.league-player-bet--won {
  border-color: rgba(34, 197, 94, 0.35);
}

.league-player-bet--lost {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}

.league-player-bet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.league-player-bet__title {
  font-weight: 600;
}

.league-player-bet__status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.league-player-bet__status--won {
  color: #4ade80;
}

.league-player-bet__status--lost {
  color: #f87171;
}

.league-player-bet__status--cancelled {
  color: var(--text-muted);
}

.league-player-bet__date {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.league-player-bet__pick,
.league-player-bet__legs {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.league-player-bet__legs {
  padding-left: 1.1rem;
}

.league-player-bet__leg + .league-player-bet__leg {
  margin-top: 0.25rem;
}

.league-player-bet__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.league-player-bet__result {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f87171;
}

.league-player-bet__result--won {
  color: #4ade80;
}

.league-leaderboard__crown {
  font-size: 0.85rem;
  line-height: 1;
}

.league-leaderboard__actions {
  text-align: right;
  white-space: nowrap;
}

.league-leaderboard__remove {
  border: none;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
}

.league-leaderboard__remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.league-leaderboard__you-badge {
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(46, 92, 255, 0.12);
  border-radius: 999px;
}

.league-leaderboard__row--you {
  background: rgba(46, 92, 255, 0.06);
}

.league-leaderboard__balance {
  font-weight: 700;
  color: var(--success);
  text-align: right;
  white-space: nowrap;
}

.league-wallet {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.league-wallet__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.league-wallet__hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.league-wallet__balance {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success);
}

.league-wallet__inactive {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.league-wallet__inactive[hidden],
.league-wallet__forms[hidden] {
  display: none !important;
}

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

.auth-page {
  max-width: 420px;
}

.auth-page__title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-page__hint {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-page__footer {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form__submit {
  margin-top: 0.35rem;
}

.auth-form__message {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-form__message--error {
  color: var(--no);
}

.auth-form__hint {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-form__hint--ok {
  color: #16a34a;
}

.auth-form__hint--error {
  color: #ef4444;
}

.bets-load-more {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.league-settings__reset-balances {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.league-form__subheading {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.cors-check__result {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.leagues-hub__card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.leagues-hub__card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
}

.leagues-hub__card-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.leagues-hub__card-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.leagues-memberships__title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

.leagues-memberships__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.leagues-memberships__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.leagues-memberships__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}

.leagues-memberships__leave {
  color: var(--no);
  border-color: rgba(255, 77, 77, 0.35);
}

.leagues-memberships__leave:hover {
  background: rgba(255, 77, 77, 0.12);
}

.leagues-memberships__message {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.leagues-memberships__message--error {
  color: var(--no);
}

.leagues-memberships__message--success {
  color: var(--success);
}

.leagues-memberships__message[hidden] {
  display: none !important;
}

.leagues-memberships__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.leagues-memberships__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.league-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
}

.league-form--join {
  max-width: 420px;
}

.league-form__section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.league-form__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.league-form__hint,
.league-form__note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.league-form__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.league-form__input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  font: inherit;
}

.league-form__selected {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #16a34a;
}

.league-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.league-form__message {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.league-form__message--error {
  color: #ef4444;
}

.league-form__message--success {
  color: #16a34a;
}

.league-form__message[hidden] {
  display: none;
}

.league-settings__banner {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.league-settings__banner--readonly {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.league-form__checkbox {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.league-form__checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.league-form__choice-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.league-form__choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.league-form__choice:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
}

.league-form__choice input {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.league-form__choice-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.league-form__choice-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.league-form__choice-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ufc-card-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.league-settings__sport {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.league-settings__competition {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.league-settings__meta {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.competition-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.competition-filter__btn {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.competition-filter__btn--active {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.competition-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}

.competition-picker__toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 1rem;
}

.competition-picker__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.competition-tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.competition-tile__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.competition-tile--selected {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.1);
}

.competition-tile__name {
  font-size: 0.88rem;
  font-weight: 600;
}

.competition-tile__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.competition-tile--inactive {
  opacity: 0.72;
  border-style: dashed;
}

.competition-tile--inactive:hover {
  opacity: 0.9;
}

.bet-card__league-badge-wrap {
  flex-shrink: 0;
}

.bet-card__league-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  white-space: nowrap;
}

.bet-card__league-badge:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}

.bet-card__league-popover {
  position: fixed;
  z-index: 700;
  max-width: min(18rem, calc(100vw - 1rem));
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.onboarding-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.onboarding-banner__text {
  margin: 0 0 0.75rem;
}

.onboarding-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.join-preview {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.join-preview__name {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.join-preview__meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.bets-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bets-filter__label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.bets-filter__btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.bets-filter__btn--active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: var(--text);
}

.league-detail__invite {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.league-detail__invite-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.league-detail__invite-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.league-detail__invite-link {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.league-detail__invite-row .btn {
  flex-shrink: 0;
}

/* Mobile-only helpers — hidden on desktop */
.leagues-page__mobile-only {
  display: none !important;
}

/* Mobile layout and readability (desktop unchanged above 768px) */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .app {
    padding: 1rem 1rem 2.75rem;
  }

  .header {
    margin-bottom: 1.35rem;
  }

  .header h1 {
    font-size: 1.55rem;
  }

  .header__subtitle {
    font-size: 1rem;
    line-height: 1.45;
  }

  .context-nav__link,
  .back-link {
    font-size: 0.95rem;
    min-height: 2.75rem;
    align-items: center;
  }

  .btn {
    min-height: 2.75rem;
    padding: 0.65rem 1.15rem;
    font-size: 0.95rem;
  }

  .btn--secondary {
    margin-top: 0;
  }

  .btn--small {
    min-height: 2.5rem;
    font-size: 0.9rem;
  }

  .leagues-page__mobile-only {
    display: inline-flex !important;
  }

  .leagues-hub {
    margin-bottom: 1.25rem;
  }

  .leagues-hub__card {
    padding: 1.1rem 1.15rem;
  }

  .leagues-hub__card-title {
    font-size: 1.05rem;
  }

  .leagues-hub__card-text {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .leagues-page--detail-open .leagues-hub {
    display: none;
  }

  .leagues-page__sidebar-title {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
  }

  .leagues-page__sidebar-item {
    padding: 0.95rem 1rem;
    gap: 0.75rem;
  }

  .leagues-page__sidebar-name {
    font-size: 1.02rem;
    line-height: 1.3;
  }

  .leagues-page__sidebar-meta {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .leagues-page__sidebar-badge {
    font-size: 0.72rem;
    padding: 0.18rem 0.5rem;
  }

  .leagues-page__layout:not(.leagues-page__layout--detail-open) .leagues-page__detail {
    display: none !important;
  }

  .leagues-page__layout--detail-open .leagues-page__sidebar {
    display: none;
  }

  .league-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0.35rem 0;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
  }

  .league-detail__back:hover {
    color: var(--text);
  }

  .league-detail__header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }

  .league-detail__name {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .league-detail__meta {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .league-detail__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    width: 100%;
  }

  .league-detail__actions .btn,
  .league-detail__actions .btn--secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .league-leaderboard__title,
  .league-wallet__title {
    font-size: 1.15rem;
  }

  .league-leaderboard__hint,
  .league-wallet__hint {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .league-leaderboard__table {
    font-size: 0.95rem;
  }

  .league-leaderboard__table th {
    font-size: 0.78rem;
    padding: 0.85rem 0.85rem;
  }

  .league-leaderboard__table td {
    padding: 0.85rem 0.85rem;
  }

  .league-leaderboard__player-name {
    font-size: 0.98rem;
  }

  .league-leaderboard__balance {
    font-size: 1rem;
  }

  .league-wallet__balance {
    font-size: 2rem;
  }

  .league-detail__invite-title {
    font-size: 1rem;
  }

  .league-detail__invite-link {
    font-size: 0.92rem;
    padding: 0.65rem 0.75rem;
  }

  .league-detail__invite-row {
    flex-direction: column;
    align-items: stretch;
  }

  .league-detail__invite-row .btn {
    width: 100%;
  }

  .league-form__heading {
    font-size: 1.08rem;
  }

  .league-form__label {
    font-size: 0.92rem;
  }

  .league-form__hint,
  .league-form__note {
    font-size: 0.9rem;
  }

  .league-form__input,
  .league-form select,
  .league-form textarea {
    font-size: 16px;
    padding: 0.75rem 0.85rem;
  }

  .league-form__actions {
    flex-direction: column;
  }

  .league-form__actions .btn,
  .league-form__actions .btn--secondary {
    width: 100%;
    text-align: center;
  }

  .account-nav__link {
    font-size: 0.9rem;
    padding: 0.55rem 0.85rem;
  }

  .account-section__title {
    font-size: 1.15rem;
  }

  .game-card__title-only {
    font-size: 1.05rem;
  }

  .game-hero__name {
    font-size: 1.08rem;
  }

  .odds-card {
    padding: 1.1rem 0.85rem;
  }

  .odds-card__label {
    font-size: 0.92rem;
  }

  .odds-card__price {
    font-size: 1.15rem;
  }

  .bets-filter__btn {
    font-size: 0.92rem;
    padding: 0.45rem 0.95rem;
  }

  /* Simpler mobile header: session bar full width, league on its own row */
  [data-settings-mount] {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .header__actions {
    width: 100%;
    gap: 0.5rem;
  }

  .header__session {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    border-radius: var(--radius-lg);
    padding: 0.55rem 0.65rem;
    gap: 0.5rem;
    box-sizing: border-box;
  }

  .header__session-divider {
    display: none;
  }

  .header__league-wrap {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .header__league {
    display: flex;
    width: 100%;
    max-width: none;
    justify-content: center;
    text-align: center;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
  }

  .header__balance {
    font-size: 0.9rem;
  }

  /* League picker bottom sheet on phone */
  .header__league-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 649;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
  }

  .header__league-backdrop[hidden] {
    display: none !important;
  }

  body.league-menu-open {
    overflow: hidden;
  }

  .header__league-menu {
    position: fixed;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    max-height: min(75dvh, calc(100dvh - 4rem));
    overflow-y: auto;
    z-index: 650;
    -webkit-overflow-scrolling: touch;
  }

  .header__league-menu-title {
    display: block;
    margin: 0 0 0.65rem;
    padding: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
  }

  .header__league-menu-item {
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
  }

  .header__league-menu-item-meta {
    font-size: 0.82rem;
    text-align: center;
  }

  .header__league-menu-footer {
    text-align: center;
  }

  .header__league-menu-link {
    display: inline-block;
    text-align: center;
  }

  /* Center secondary / hint text on phone */
  .state,
  .state p,
  .header__subtitle,
  .app {
    padding: 1rem 1rem calc(2.75rem + env(safe-area-inset-bottom, 0px));
  }

  body.bet-slip-mobile-bar-visible .app--game {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  body.bet-slip-mobile-bar-visible .app--game .bet-slip-toggle,
  body.bet-slip-mobile-bar-visible .app--game .game-header__slip {
    display: none;
  }

  .game-header__back .header__nav-link {
    min-height: 2.75rem;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .game-header__row--tools [data-game-balance-mount] .header__balance {
    flex-shrink: 0;
    min-height: 2.5rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
  }

  .game-header__slip {
    min-height: 2.5rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
  }

  .game-header__row--league .header__league {
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 400;
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    background: var(--bg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .header__brand {
    min-width: 0;
  }

  .header__subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header__main {
    align-items: flex-start;
  }

  .games-count {
    display: none;
  }

  .app-nav__link {
    flex-shrink: 0;
    min-height: 2.75rem;
  }

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

  .filter-bar__input {
    max-width: none;
    width: 100%;
  }

  .filter-bar__view-all {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .onboarding-banner__actions {
    flex-direction: column;
  }

  .onboarding-banner__actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .tile-section {
    margin-bottom: 1.35rem;
  }

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

  .sport-tile {
    min-height: 5.5rem;
  }

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

  .game-card__link {
    padding: 1.1rem 1rem;
  }

  .game-card__matchup {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .game-card__team,
  .game-card__team--home {
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }

  .game-card__team-name {
    white-space: normal;
    text-align: center;
  }

  .state {
    padding-top: 0.5rem;
  }

  .game-layout {
    display: block;
  }

  .bet-slip {
    display: none;
  }

  .bet-slip:not([hidden]) {
    display: block;
  }

  .bet-slip-mobile-bar {
    display: flex;
  }

  .bet-slip__handle {
    display: block;
    width: 2.5rem;
    height: 0.28rem;
    margin: 0.65rem auto 0;
    border-radius: 999px;
    background: #d4d4d4;
  }

  .game-hero__logo {
    width: 48px;
    height: 48px;
  }

  .game-hero__matchup {
    gap: 0.65rem;
  }

  .game-hero__name {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .odds-row,
  .odds-row--three,
  .odds-row:not(.odds-row--three) {
    grid-template-columns: 1fr;
  }

  .prop-pill {
    min-height: 2.75rem;
  }

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

  .prop-row__outcomes {
    justify-content: stretch;
  }

  .spread-teams {
    grid-template-columns: 1fr;
  }

  .bets-tabs .props-tab {
    flex: 1 1 50%;
    text-align: center;
    min-height: 2.75rem;
  }

  .bet-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .bet-card__header-start {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;
    overflow: hidden;
  }

  .bet-card__header-start .bet-card__game {
    flex: 0 1 auto;
    max-width: 38%;
  }

  .bet-card__date {
    font-size: 0.62rem;
    flex-shrink: 0;
  }

  .bet-card__league-badge {
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bet-card__header-actions {
    flex-shrink: 0;
  }

  .bet-card__leg {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .bet-card__leg-meta {
    align-items: flex-start;
    max-width: none;
    text-align: left;
  }

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

  .bet-card__stats .bet-card__stat:nth-child(3) {
    grid-column: 1 / -1;
  }

  .leagues-page__sidebar-item--active,
  .leagues-page__sidebar-item--selected {
    border-left: 3px solid var(--accent);
    padding-left: calc(1rem - 3px);
  }

  .competition-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  .competition-filter::-webkit-scrollbar {
    display: none;
  }

  .competition-filter__btn {
    flex-shrink: 0;
  }

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

  .join-preview {
    text-align: center;
  }

  .league-form--join .league-form__actions {
    flex-direction: column;
  }

  .account-nav {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: -0.25rem;
    padding-top: 0.25rem;
    background: var(--bg);
  }

  .account-nav::-webkit-scrollbar {
    display: none;
  }

  .account-nav__link {
    flex-shrink: 0;
    min-height: 2.5rem;
  }

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

  .settings-form__row .settings-form__input,
  .settings-form__row .league-form__input {
    width: 100%;
  }

  .settings-form__row .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .settings-accounts__item {
    min-height: 2.75rem;
  }

  .auth-page {
    margin-inline: auto;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
  }

  .auth-form__submit,
  .auth-page .settings-form__input {
    width: 100%;
  }

  .auth-page__footer {
    text-align: center;
    line-height: 1.8;
  }

  .auth-page__footer a {
    display: inline-block;
    min-height: 2.25rem;
    line-height: 2.25rem;
  }

  .game-hero__meta,
  .props-section__empty,
  .bet-slip__hint,
  .bet-slip__empty,
  .filter-bar__hint,
  .account-section__hint,
  .league-leaderboard__hint,
  .league-wallet__hint,
  .league-form__hint,
  .league-form__note,
  .auth-page__hint,
  .auth-form__hint {
    text-align: center;
  }

  .game-hero__meta {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.bet-card--draft-focus {
  outline: 2px solid rgba(46, 92, 255, 0.65);
  outline-offset: 3px;
  animation: draftFocusPulse 2.5s ease-out;
}

#draft-parlay {
  scroll-margin-top: 5.5rem;
}

.game-hero,
.odds-row,
.props-section {
  scroll-margin-top: 5rem;
}

[data-app-nav] {
  min-width: 0;
  max-width: 100%;
}

.app-nav {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.bet-slip__handle {
  display: none;
}

.bet-slip-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 450;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  font: inherit;
  color: #fff;
  text-align: left;
  background: var(--accent);
  border: 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.bet-slip-mobile-bar[hidden] {
  display: none !important;
}

.bet-slip-mobile-bar__label {
  font-size: 0.95rem;
  font-weight: 700;
}

.bet-slip-mobile-bar__meta {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bet-slip-mobile-bar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  border-radius: 999px;
}

.game-section-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.game-section-jumps[hidden] {
  display: none !important;
}

.game-section-jumps__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.game-section-jumps__link:hover {
  color: var(--accent);
  border-color: rgba(46, 92, 255, 0.35);
}

.league-leaderboard__cards {
  display: none;
}

.league-form__section--collapsible summary {
  list-style: none;
  cursor: pointer;
}

.league-form__section--collapsible summary::-webkit-details-marker {
  display: none;
}

@media (min-width: 769px) {
  .league-form__section--collapsible summary {
    pointer-events: none;
    cursor: default;
  }
}

@keyframes draftFocusPulse {
  0%,
  15% {
    outline-color: rgba(46, 92, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(46, 92, 255, 0.15);
  }

  100% {
    outline-color: transparent;
    box-shadow: none;
  }
}

.bet-slip__place:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.15rem;
  border: 1px solid rgba(46, 92, 255, 0.25);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(46, 92, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.02) 55%
  );
}

.landing-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
}

.landing-hero__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 36rem;
}

.landing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.25rem 0 0.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer__copy {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.site-footer__nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.site-footer__nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--accent);
}

.legal-page {
  max-width: 42rem;
}

.legal-page h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.legal-page__updated {
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-page__section {
  margin-bottom: 1.35rem;
}

.legal-page__section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.legal-page__section p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .landing-hero__actions .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

/* --- Roadmap enhancements --- */

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(22rem, calc(100vw - 2rem));
}

.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { border-color: rgba(0, 200, 83, 0.35); }
.toast--error { border-color: rgba(255, 77, 77, 0.35); }

.bet-slip__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.75rem;
}

.bet-slip__preset {
  margin-top: 0;
  min-width: 3.25rem;
  color: #1a1a1a;
  background: #f3f3f3;
  border-color: #ccc;
}

.bet-slip__preset:hover {
  color: var(--accent);
  background: #ececec;
  border-color: var(--accent);
}

.bet-option--selected { outline: 2px solid var(--accent); outline-offset: 2px; }

.game-bets-strip {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.game-bets-strip__title { margin: 0 0 0.5rem; font-weight: 600; }
.game-bets-strip__list { margin: 0 0 0.5rem; padding-left: 1.1rem; color: var(--text-secondary); }
.game-bets-strip__link { color: var(--accent); font-size: 0.85rem; }
.game-hero__score, .game-hero__phase { font-weight: 600; color: var(--text-secondary); }

.props-tabs-wrap--sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding-bottom: 0.5rem;
}

.props-tabs { overflow-x: auto; flex-wrap: nowrap; }

.props-search {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.bets-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; }

.bets-filter {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.bets-filter--active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-muted);
}

.bet-card__leg-progress { display: flex; gap: 0.25rem; margin: 0.5rem 0 0.75rem; }
.bet-card__leg-progress-seg { flex: 1; height: 4px; border-radius: 999px; background: var(--border); }
.bet-card__leg-progress-seg--clinched,
.bet-card__leg-progress-seg--won,
.bet-card__leg-progress-seg--hit { background: var(--success); }
.bet-card__leg-progress-seg--dead,
.bet-card__leg-progress-seg--lost { background: var(--no); }
.bet-card__leg-progress-seg--tracking,
.bet-card__leg-progress-seg--pending { background: var(--accent); }

.mobile-tab-bar { display: none; }

@media (max-width: 768px) {
  .mobile-tab-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    border-top: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(8px);
  }

  .mobile-tab-bar__list { display: grid; grid-template-columns: repeat(4, 1fr); }
  .mobile-tab-bar__link {
    display: block;
    text-align: center;
    padding: 0.65rem 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
  }
  .mobile-tab-bar__link--active { color: var(--accent); }
  body.has-mobile-tab-bar .app { padding-bottom: 4.5rem; }
}

.landing-steps {
  margin: 0 0 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.landing-steps__title { margin: 0 0 1rem; }
.landing-steps__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; }

@media (min-width: 768px) {
  .landing-steps__list { grid-template-columns: repeat(3, 1fr); }
}

.landing-steps__item p { margin: 0.25rem 0 0; color: var(--text-secondary); font-size: 0.85rem; }

.landing-steps__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.landing-steps__trust { margin: 1rem 0 0; font-size: 0.85rem; color: var(--text-muted); }

.league-leaderboard__callout { margin: 0.25rem 0 0.75rem; font-size: 0.85rem; color: var(--success); }
.league-leaderboard__delta { margin-left: 0.35rem; font-size: 0.75rem; }
.league-leaderboard__delta--up { color: var(--success); }
.league-leaderboard__delta--down { color: var(--no); }

.league-player-profile__tabs { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }

.league-player-profile__tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}

.league-player-profile__tab--active { border-color: var(--accent); color: var(--text); }

.league-player-profile__compare {
  grid-column: 1 / -1;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--surface-hover);
  font-size: 0.85rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1300;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: #fff;
}

.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.offline-banner {
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  background: rgba(255, 165, 0, 0.12);
  border-bottom: 1px solid rgba(255, 165, 0, 0.35);
  color: #ffb74d;
}

.skeleton-list { display: grid; gap: 0.75rem; }

.skeleton-card {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
}

.skeleton-line {
  height: 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--surface-hover), var(--border-subtle), var(--surface-hover));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease infinite;
}

.skeleton-line--short { width: 35%; }
.skeleton-line--medium { width: 60%; }
.skeleton-line--long { width: 90%; }

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
