:root {
  color-scheme: light;
  --paper: #f6f2eb;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #182027;
  --muted: #68736f;
  --line: #d9dfd8;
  --teal: #0f766e;
  --teal-soft: #d9f1ec;
  --coral: #b94e48;
  --amber: #c98924;
  --mint: #81b29a;
  --charcoal: #25302f;
  --shadow: 0 18px 50px rgba(33, 40, 37, 0.1);
}

/* Match detail refresh: a readable analysis surface shared by desktop and phone. */
.match-detail {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f4f8f6;
}

.match-hero-card {
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: 20px 22px 22px;
  border: 1px solid #d8e5df;
  border-radius: 16px;
  background: #f7fbf9;
  box-shadow: 0 12px 28px rgba(30, 70, 57, 0.08);
}

.match-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-right: 54px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.match-hero-meta .name-with-logo {
  color: var(--charcoal);
  font-weight: 950;
}

.match-hero-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.match-hero-team {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.match-hero-team.away {
  justify-items: center;
}

.match-hero-team > span:not(.team-profile-trigger) {
  max-width: 100%;
  color: var(--charcoal);
  font-size: 1.1rem;
  font-weight: 950;
  line-height: 1.15;
}

.match-hero-team small,
.match-hero-score small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

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

.match-hero-score {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.match-hero-score strong {
  color: var(--teal);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 950;
  line-height: 1;
}

.match-status-pill,
.data-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #e4f3eb;
  color: #16715d;
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.match-status-pill.scheduled,
.data-state-pill {
  background: #fff4d9;
  color: #9a6913;
}

.match-status-pill.live {
  background: #ffe7e3;
  color: #b94e48;
}

.match-hero-card > .detail-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: block;
}

.match-stat-board {
  display: grid;
  gap: 14px;
  padding: 17px 18px 18px;
  border: 1px solid #d8e5df;
  border-radius: 14px;
  background: #ffffff;
}

.match-stat-empty {
  background: #f9fcfa;
}

.match-stat-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.match-section-heading h3 {
  margin: 0;
  color: var(--charcoal);
  font-size: 1rem;
  font-weight: 950;
}

.stat-team-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.stat-team-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-team-key i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--teal);
}

.stat-team-key i.away-dot {
  background: var(--coral);
}

.match-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.match-stat-item {
  display: grid;
  gap: 8px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid #e2ece7;
  border-radius: 10px;
  background: #f8fbf9;
  text-align: center;
}

.match-stat-item > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}

.match-stat-item > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 5px;
}

.match-stat-item b {
  color: var(--charcoal);
  font-size: 1rem;
  font-weight: 950;
}

.match-stat-item b:first-child {
  color: var(--teal);
}

.match-stat-item b:last-child {
  color: var(--coral);
}

.match-stat-item em {
  color: #b4c1bb;
  font-style: normal;
  font-weight: 950;
}

.team-analysis-block-v2 {
  gap: 14px;
  padding: 17px 18px 18px;
  border: 1px solid #d8e5df;
  border-radius: 14px;
  background: #ffffff;
}

.team-history-heading {
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
}

.team-history-heading .analysis-team-title {
  display: grid;
  justify-content: start;
  gap: 4px;
  color: var(--charcoal);
  text-transform: none;
}

.team-history-heading .analysis-team-title .name-with-logo > span:last-child {
  color: var(--charcoal);
  font-size: 1rem;
}

.team-history-heading .analysis-team-title small {
  padding-left: 32px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.history-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.history-metric-card {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 10px;
  border: 1px solid #e1ebe6;
  border-radius: 10px;
  background: #f8fbf9;
  text-align: center;
}

.history-metric-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-metric-card strong {
  color: var(--charcoal);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1;
}

.history-metric-card em {
  color: #91a29a;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
}

.history-list {
  display: grid;
  gap: 9px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.history-row-v2 {
  display: grid;
  gap: 9px;
  min-height: 0;
  padding: 12px;
  border: 1px solid #e0ebe6;
  border-radius: 11px;
  background: #fcfefd;
}

.history-row-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8a9991;
  font-size: 0.65rem;
  font-weight: 850;
}

.history-row-topline > b {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 950;
}

.history-row-topline > b.win { background: var(--teal); }
.history-row-topline > b.draw { background: var(--amber); }
.history-row-topline > b.loss { background: var(--coral); }
.history-row-topline > b.scheduled { background: #c7d1cb; }

.history-matchup-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.history-team-name {
  min-width: 0;
}

.history-team-name:last-child .name-with-logo {
  justify-content: flex-end;
  text-align: right;
}

.history-team-name.focus .name-with-logo > span:last-child {
  color: var(--charcoal);
  font-weight: 950;
}

.history-team-name .name-with-logo > span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-scoreline-v2 {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #eaf5f0;
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 950;
}

.history-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.history-stat-strip > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 7px;
  background: #f1f6f3;
  color: var(--charcoal);
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
}

.history-stat-strip > span b {
  color: #91a29a;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .match-detail {
    gap: 11px;
    padding: 10px;
  }

  .match-hero-card {
    gap: 13px;
    padding: 14px 12px 15px;
    border-radius: 13px;
  }

  .match-hero-meta {
    padding-right: 42px;
    font-size: 0.62rem;
  }

  .match-hero-teams {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    gap: 5px;
  }

  .detail-team-logo {
    width: 42px;
    height: 42px;
  }

  .match-hero-team > span:not(.team-profile-trigger) {
    width: 100%;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .match-hero-team small,
  .match-hero-score small {
    font-size: 0.56rem;
  }

  .match-hero-score strong {
    font-size: 1.35rem;
  }

  .match-status-pill,
  .data-state-pill {
    min-height: 20px;
    padding: 2px 6px;
    font-size: 0.5rem;
  }

  .match-hero-card > .detail-actions {
    top: 12px;
    right: 12px;
  }

  .match-hero-card .star-button {
    width: 31px;
    height: 31px;
    font-size: 1.05rem;
  }

  .match-stat-board,
  .team-analysis-block-v2 {
    padding: 12px;
    border-radius: 12px;
  }

  .match-section-heading {
    align-items: center;
  }

  .match-section-heading h3 {
    font-size: 0.86rem;
  }

  .section-kicker {
    font-size: 0.52rem;
  }

  .stat-team-key {
    display: grid;
    justify-items: end;
    gap: 3px;
    font-size: 0.54rem;
  }

  .stat-team-key span {
    max-width: 110px;
  }

  .match-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .match-stat-item {
    min-height: 60px;
    padding: 8px 6px;
  }

  .match-stat-item > span {
    font-size: 0.56rem;
  }

  .match-stat-item b {
    font-size: 0.82rem;
  }

  .team-history-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .team-history-heading .analysis-team-title .name-with-logo > span:last-child {
    font-size: 0.86rem;
  }

  .team-history-heading .analysis-team-title small {
    padding-left: 27px;
    font-size: 0.58rem;
  }

  .history-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .history-metric-card {
    min-height: 62px;
    padding: 7px 4px;
  }

  .history-metric-card span {
    font-size: 0.5rem;
  }

  .history-metric-card strong {
    font-size: 0.82rem;
  }

  .history-metric-card em {
    font-size: 0.48rem;
  }

  .history-row-v2 {
    gap: 7px;
    padding: 9px;
  }

  .history-matchup-v2 {
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    gap: 5px;
  }

  .history-team-name .name-with-logo > span:last-child {
    font-size: 0.61rem;
  }

  .history-team-name .team-logo {
    width: 17px;
    height: 17px;
  }

  .history-scoreline-v2 {
    min-height: 25px;
    font-size: 0.7rem;
  }

  .history-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .history-stat-strip > span {
    padding: 5px 4px;
    font-size: 0.62rem;
  }
}

html[data-iddaa-public="true"] [data-tab="admin"],
html[data-iddaa-public="true"] [data-tab="data"],
html[data-iddaa-public="true"] [data-panel="admin"],
html[data-iddaa-public="true"] [data-panel="data"] {
  display: none !important;
}

/* Match analysis categories and compact history rows. */
.detail-analysis-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
  padding: 5px;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #eef5f1;
}

.detail-analysis-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 6px 7px;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: left;
}

.detail-analysis-tab > span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #dcece5;
  color: var(--teal);
  font-size: 0.78rem;
}

.detail-analysis-tab b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-analysis-tab.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 4px 12px rgba(18, 74, 65, 0.1);
}

.detail-analysis-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-history-list {
  display: grid;
  gap: 6px;
}

.compact-history-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 92px;
  gap: 7px;
  min-width: 0;
  align-items: center;
  border: 1px solid #e1eae5;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fbfdfc;
}

.compact-history-date {
  display: grid;
  justify-items: start;
  gap: 3px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
}

.compact-history-date .analysis-score {
  display: inline-grid;
  min-width: 22px;
  min-height: 20px;
  place-items: center;
  border-radius: 5px;
  padding: 2px 5px;
  color: #fff;
  font-size: 0.62rem;
}

.compact-history-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  align-items: center;
}

.compact-history-match > .name-with-logo {
  min-width: 0;
}

.compact-history-match > .name-with-logo:last-child {
  justify-content: flex-end;
  text-align: right;
}

.compact-history-match > .name-with-logo > span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-history-match .team-logo {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.compact-history-match > strong {
  color: var(--teal);
  font-size: 0.7rem;
  text-align: center;
  white-space: nowrap;
}

.compact-history-value {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}

.compact-history-value strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--charcoal);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-history-value small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  white-space: nowrap;
}

.fixture-teams .fixture-v {
  place-items: center;
  display: none;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.today-mobile-list {
  display: none;
}

.today-desktop-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 760px) {
  .today-desktop-list {
    display: none;
  }

  .today-mobile-list {
    display: grid;
    gap: 7px;
  }

  .detail-analysis-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 10px;
  }

  .detail-analysis-tab {
    min-height: 34px;
    padding: 5px 6px;
    font-size: 0.61rem;
  }

  .detail-analysis-tab > span {
    width: 19px;
    height: 19px;
    font-size: 0.66rem;
  }

  .detail-analysis-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-analysis-summary .analysis-metric-card:last-child {
    display: none;
  }

  .compact-history-row {
    grid-template-columns: 40px minmax(0, 1fr) 64px;
    gap: 4px;
    padding: 6px 5px;
  }

  .compact-history-date {
    font-size: 0.54rem;
  }

  .compact-history-date .analysis-score {
    min-width: 19px;
    min-height: 18px;
    padding: 1px 4px;
    font-size: 0.53rem;
  }

  .compact-history-match {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    gap: 2px;
  }

  .compact-history-match > .name-with-logo > span:last-child {
    font-size: 0.5rem;
  }

  .compact-history-match .team-logo {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }

  .compact-history-match > strong,
  .compact-history-value strong {
    font-size: 0.55rem;
  }

  .compact-history-value small {
    font-size: 0.48rem;
  }

  .fixture-teams .name-with-logo > span:last-child {
    font-size: 0.68rem;
  }

  .fixture-teams {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
    align-items: center;
  }

  .fixture-teams .fixture-v {
    display: inline-grid;
  }

  .fixture-teams .name-with-logo:first-of-type {
    justify-content: flex-end;
    text-align: right;
  }

  .fixture-teams .name-with-logo:last-of-type {
    justify-content: flex-start;
    text-align: left;
  }

  .fixture-teams .fixture-v {
    font-size: 0.67rem;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(246, 242, 235, 0.96), rgba(238, 243, 237, 0.9)),
    repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.04), rgba(15, 118, 110, 0.04) 1px, transparent 1px, transparent 84px);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.top-band {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 132px;
  padding: 24px 28px;
  border: 1px solid rgba(24, 32, 39, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(37, 48, 47, 0.96)),
    linear-gradient(90deg, rgba(201, 137, 36, 0.18), transparent);
  color: #fffaf0;
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 112px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  overflow-x: auto;
}

.sport-switch {
  display: inline-flex;
  gap: 6px;
  margin: 14px 0 0;
  padding: 5px;
  border: 1px solid #d4ddd8;
  border-radius: 9px;
  background: #edf3ef;
}

.sport-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.sport-button.active {
  border-color: #0a6c66;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 5px 12px rgba(13, 122, 116, 0.16);
}

.sport-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 1rem;
}

.sport-workspace {
  margin-top: 14px;
}

.basketball-toolbar {
  align-items: end;
  justify-content: space-between;
}

.basketball-source-note {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.basketball-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.42fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.basketball-detail-panel {
  position: sticky;
  top: 90px;
}

.sport-panel-mark {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d5e2dc;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f4f8f5;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
}

.basketball-tabs {
  display: flex;
  gap: 7px;
  margin: 14px 0 0;
  border-bottom: 1px solid #d7e2dc;
}

.basketball-tab {
  min-height: 39px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.basketball-tab.active {
  border-color: #d7e2dc;
  background: #fff;
  color: var(--teal);
}

.basketball-match-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.basketball-match-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 76px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  border: 1px solid #dfe7e1;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: 150ms ease;
}

.basketball-match-row:hover,
.basketball-match-row.selected {
  border-color: #65ad98;
  background: #f2faf6;
  box-shadow: 0 7px 16px rgba(21, 85, 76, 0.08);
}

.basketball-match-time {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 950;
}

.basketball-match-teams {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.basketball-team-badge {
  min-width: 0;
}

.basketball-team-badge > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-team-badge.hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 190px;
  text-align: center;
}

.basketball-team-badge.hero .team-logo {
  width: 52px;
  height: 52px;
}

.basketball-match-score {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 46px;
  color: var(--charcoal);
  font-size: 0.96rem;
  font-weight: 950;
  text-align: center;
}

.basketball-match-score small,
.basketball-score-result small {
  display: block;
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.basketball-score-result {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.basketball-match-score.scheduled {
  color: var(--muted);
  font-weight: 800;
}

.basketball-match-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: right;
}

.basketball-match-status.finished {
  color: var(--teal);
}

.basketball-detail {
  min-height: 360px;
  padding: 18px;
}

.basketball-detail-hero {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.basketball-league-line,
.basketball-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.basketball-scoreboard {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr);
  gap: 18px;
  align-items: center;
  text-align: center;
}

.basketball-scoreboard > strong {
  color: var(--teal);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
}

.basketball-status-line {
  justify-content: space-between;
}

.basketball-detail-tabs {
  display: flex;
  gap: 6px;
  margin: 18px 0 14px;
  border-bottom: 1px solid #dce7e1;
}

.basketball-detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.basketball-detail-tab span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  border-radius: 999px;
  padding: 2px 5px;
  background: #eef5f1;
  color: var(--muted);
  font-size: 0.62rem;
}

.basketball-detail-tab.active {
  border-color: #dce7e1;
  background: #fff;
  color: var(--teal);
}

.basketball-detail-tab.active span {
  background: var(--teal-soft);
  color: var(--teal);
}

.basketball-detail-view[hidden] {
  display: none;
}

.basketball-players-note {
  margin-bottom: 12px;
  border: 1px dashed #cbdcd3;
  border-radius: 7px;
  padding: 9px 11px;
  background: #f7fbf8;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.45;
}

.basketball-match-players-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.basketball-match-players-block {
  min-width: 0;
  border: 1px solid #dfe9e2;
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfc;
}

.basketball-match-players-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 2px 2px 9px;
  border-bottom: 1px solid #e5eee8;
}

.basketball-match-players-heading > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.basketball-match-player-list {
  display: grid;
  gap: 6px;
}

.basketball-match-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid #e3ece6;
  border-radius: 7px;
  padding: 7px;
  background: #fff;
}

.basketball-match-player-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.basketball-match-player-identity .player-logo,
.basketball-match-player-identity .team-logo {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.basketball-match-player-identity .team-logo {
  object-fit: contain;
}

.basketball-match-player-identity div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.basketball-match-player-identity strong {
  overflow: hidden;
  color: var(--charcoal);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-match-player-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-match-player-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  grid-column: 1 / -1;
  gap: 3px;
  min-width: 0;
}

.basketball-match-player-metrics div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-left: 1px solid #e5eee8;
  padding-left: 5px;
}

.basketball-match-player-metrics span {
  color: var(--muted);
  font-size: 0.5rem;
  font-weight: 850;
}

.basketball-match-player-metrics strong {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 950;
}

.basketball-player-analyze {
  min-height: 27px;
  border: 1px solid #b9ddd0;
  border-radius: 5px;
  padding: 4px 7px;
  background: #eff9f4;
  color: var(--teal);
  font-size: 0.58rem;
  font-weight: 900;
  white-space: nowrap;
}

.basketball-player-analyze:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.basketball-player-unavailable {
  color: #9aa9a2;
  font-size: 0.57rem;
  font-weight: 850;
  white-space: nowrap;
}

.basketball-no-stats {
  display: grid;
  gap: 5px;
  margin: 16px 0;
  border: 1px dashed #cbd9d1;
  border-radius: 7px;
  padding: 14px;
  background: #f7fbf8;
}

.basketball-no-stats strong {
  color: var(--charcoal);
  font-size: 0.9rem;
}

.basketball-no-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.basketball-stats-section {
  margin-top: 16px;
}

.basketball-section-heading,
.basketball-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.basketball-section-heading span,
.basketball-history-heading > span:last-child {
  color: var(--charcoal);
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

.basketball-section-heading em,
.basketball-history-heading > span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  text-transform: none;
}

.basketball-stat-grid {
  overflow: hidden;
  border: 1px solid #dfe7e1;
  border-radius: 7px;
}

.basketball-stat-row {
  display: grid;
  grid-template-columns: 1fr minmax(110px, 1.2fr) 1fr;
  gap: 10px;
  align-items: center;
  min-height: 35px;
  border-bottom: 1px solid #e7eee9;
  padding: 5px 12px;
  text-align: center;
}

.basketball-stat-row:last-child {
  border-bottom: 0;
}

.basketball-stat-row:nth-child(odd) {
  background: #fbfdfc;
}

.basketball-stat-row strong {
  color: var(--teal);
  font-size: 0.8rem;
}

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

.basketball-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.basketball-history-block {
  min-width: 0;
  border: 1px solid #dfe7e1;
  border-radius: 7px;
  padding: 12px;
  background: #fbfdfc;
}

.basketball-history-heading {
  align-items: flex-start;
}

.basketball-form-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 9px;
}

.basketball-form-summary div {
  display: grid;
  gap: 3px;
  border: 1px solid #e1e9e3;
  padding: 7px;
  background: #fff;
}

.basketball-form-summary span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}

.basketball-form-summary strong {
  color: var(--charcoal);
  font-size: 0.78rem;
}

.basketball-history-list {
  display: grid;
  gap: 7px;
}

.basketball-history-row {
  display: grid;
  grid-template-columns: 48px minmax(130px, 1fr) minmax(190px, auto) 26px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  border: 1px solid #e1ebe5;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  font-size: 0.72rem;
}

.basketball-history-row:last-child {
  border-bottom: 1px solid #e1ebe5;
}

.basketball-history-date {
  display: grid;
  place-items: center start;
  min-height: 40px;
  border-right: 1px solid #e7eee9;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.basketball-history-row .team-logo {
  width: 19px;
  height: 19px;
}

.basketball-history-row .name-with-logo {
  gap: 4px;
}

.basketball-history-opponent {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.basketball-history-opponent-main {
  min-width: 0;
}

.basketball-history-opponent-main .name-with-logo {
  width: 100%;
}

.basketball-history-opponent-main .name-with-logo > span:last-child {
  overflow: hidden;
  color: var(--charcoal);
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: normal;
}

.basketball-history-statline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 23px;
}

.basketball-history-statline span {
  border: 1px solid #e1ebe5;
  border-radius: 999px;
  padding: 3px 6px;
  background: #f4f8f5;
  color: var(--muted);
  font-size: 0.57rem;
  font-weight: 850;
  line-height: 1;
}

.basketball-history-score {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 0;
  text-align: right;
}

.basketball-history-score strong {
  color: var(--charcoal);
  font-size: 0.94rem;
  font-weight: 950;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.basketball-periods {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 100%;
}

.basketball-periods span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #e1ebe5;
  border-radius: 5px;
  padding: 3px 5px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.basketball-periods b {
  color: var(--teal);
  font-size: 0.54rem;
  font-weight: 950;
}

.basketball-players-panel {
  min-height: 420px;
}

.basketball-player-search {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 16px 18px 8px;
}

.basketball-player-search label {
  display: grid;
  gap: 6px;
  width: min(100%, 420px);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.basketball-player-search input {
  min-height: 42px;
  border: 1px solid #cfdad3;
  border-radius: 7px;
  padding: 8px 11px;
  background: #fff;
  color: var(--ink);
}

.basketball-player-search .primary-button {
  min-height: 42px;
  white-space: nowrap;
}

.basketball-player-results {
  display: grid;
  gap: 12px;
  padding: 8px 18px 18px;
}

.basketball-player-card {
  overflow: hidden;
  border: 1px solid #dce6df;
  border-radius: 7px;
  background: #fff;
}

.basketball-player-card-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e4ece6;
  background: #f7fbf8;
}

.basketball-player-bet-lines {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 16px;
  border-bottom: 1px solid #e4ece6;
  background: #fcfefc;
}

.basketball-player-bet-lines > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
}

.basketball-player-bet-lines > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.basketball-player-bet-lines b {
  border: 1px solid #b9ddd0;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eff9f4;
  color: var(--teal);
  font-size: 0.62rem;
  font-weight: 950;
}

.basketball-player-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.basketball-player-identity h3 {
  margin: 0 0 3px;
  color: var(--charcoal);
  font-size: 1rem;
}

.basketball-player-identity span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.player-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.basketball-player-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 12px 16px;
}

.basketball-player-metrics div {
  display: grid;
  gap: 3px;
  border: 1px solid #e1eae3;
  padding: 8px;
  background: #fbfdfc;
}

.basketball-player-metrics span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
}

.basketball-player-metrics strong {
  color: var(--teal);
  font-size: 1rem;
}

.basketball-player-table-wrap {
  overflow-x: auto;
  padding: 0 16px 16px;
}

.basketball-player-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.basketball-player-table th,
.basketball-player-table td {
  border-bottom: 1px solid #e6eee8;
  padding: 8px 7px;
  text-align: left;
  white-space: nowrap;
}

.basketball-player-table th {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.basketball-player-table td {
  color: var(--charcoal);
  font-weight: 700;
}

.basketball-player-table td strong {
  color: var(--teal);
}

.basketball-history-row .analysis-score {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 5px;
  color: #fff;
  font-size: 0.65rem;
}

.tab-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tab-button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0.72;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}

.status-strip span,
.data-chip,
.result-pill,
.form-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 253, 248, 0.14);
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.name-with-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  vertical-align: middle;
}

.team-profile-trigger {
  border-radius: 6px;
  padding: 1px 2px;
  margin: -1px -2px;
  cursor: pointer;
}

.team-profile-trigger:hover > span:last-child {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.name-with-logo > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-with-logo.strong > span:last-child {
  color: var(--ink);
  font-weight: 950;
}

.name-with-logo.muted > span:last-child {
  color: var(--muted);
  font-weight: 800;
}

.name-with-logo.compact {
  gap: 5px;
}

.name-with-logo.inline {
  max-width: 210px;
}

.team-logo,
.league-logo,
.mini-logo {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.league-logo {
  width: 24px;
  height: 24px;
}

.name-with-logo.compact .team-logo,
.name-with-logo.compact .league-logo,
.history-stat-line .team-logo {
  width: 18px;
  height: 18px;
}

.name-with-logo.chip .team-logo {
  width: 16px;
  height: 16px;
}

.team-logo.placeholder,
.league-logo.placeholder,
.mini-logo.placeholder {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4ef;
}

.title-separator {
  color: var(--muted);
  margin: 0 4px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 34px rgba(33, 40, 37, 0.07);
  backdrop-filter: blur(18px);
}

.match-toolbar {
  grid-template-columns: 150px minmax(180px, 1fr) 140px minmax(160px, 1fr);
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

select,
input,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
  outline: none;
}

textarea {
  min-height: 84px;
  line-height: 1.35;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.primary-button,
.ghost-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 12px;
  font-weight: 850;
}

.primary-button {
  background: var(--teal);
  color: #fff;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.ghost-button {
  align-self: end;
  border-color: #cfd8d1;
  background: #fff;
  color: var(--charcoal);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 116px;
  padding: 16px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.72rem;
  line-height: 1;
  letter-spacing: 0;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.35;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.fixture-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.5fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.detail-panel {
  position: sticky;
  top: 90px;
}

.content-grid.wide-left {
  grid-template-columns: minmax(0, 1.75fr) minmax(340px, 0.75fr);
}

.panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-league-filter {
  display: grid;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.panel-filter-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.league-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.league-check-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 5px 8px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  transition: 150ms ease;
}

.league-check-option input {
  width: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: var(--teal);
}

.league-check-option.checked {
  border-color: var(--teal);
  background: #eaf6f0;
  color: var(--charcoal);
}

.form-strip,
.stat-bars,
.health-list,
.match-list,
.fixture-list,
.highlight-tabs,
.highlight-list,
.favorites-list,
.match-detail,
.sync-box,
.team-table-wrap,
.import-panel > p {
  padding: 16px 18px;
}

.form-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 64px;
}

.form-strip.small {
  min-height: auto;
  padding: 0;
}

.form-dot {
  min-width: 36px;
  color: #fff;
}

.form-dot.win,
.result-pill.win {
  background: var(--teal);
}

.form-dot.draw,
.result-pill.draw {
  background: var(--amber);
}

.form-dot.loss,
.result-pill.loss {
  background: var(--coral);
}

.stat-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: center;
}

.bar-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ede8;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--mint));
}

.bar-fill.warn {
  background: linear-gradient(90deg, var(--amber), var(--coral));
}

.health-list {
  display: grid;
  gap: 10px;
}

.health-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.4;
}

.health-item::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--teal);
}

.health-item.warn::before {
  background: var(--amber);
}

.health-item.bad::before {
  background: var(--coral);
}

.fixture-list {
  display: grid;
  gap: 12px;
  max-height: 780px;
  overflow: auto;
}

.favorites-list {
  display: grid;
  gap: 12px;
}

.highlight-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.highlight-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 950;
}

.highlight-tabs button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.highlight-tabs em {
  min-width: 22px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--teal);
  text-align: center;
  font-size: 0.72rem;
  font-style: normal;
}

.highlight-tabs button.active em {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.highlight-list {
  display: grid;
  gap: 10px;
}

.highlight-card {
  display: grid;
  grid-template-columns: 46px minmax(260px, 1.25fr) minmax(220px, 1fr) 140px 70px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.highlight-card:hover {
  border-color: rgba(15, 118, 110, 0.36);
  background: #f7fbf7;
}

.highlight-rank {
  color: var(--teal);
  font-size: 1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.highlight-match,
.highlight-pick,
.highlight-score {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.highlight-match small,
.highlight-pick em,
.highlight-score em,
.highlight-sample {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.highlight-match strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.highlight-match b {
  color: var(--teal);
  font-size: 0.78rem;
}

.highlight-pick strong {
  color: var(--charcoal);
  font-size: 0.88rem;
  font-weight: 950;
}

.highlight-score {
  min-height: 58px;
  border-left: 5px solid #d6d9d4;
  border-radius: 6px;
  background: #f5f6f3;
  padding: 8px 10px;
  text-align: center;
}

.highlight-score.good {
  border-color: #9fcc00;
}

.highlight-score.warn {
  border-color: var(--amber);
}

.highlight-score.low {
  border-color: var(--coral);
}

.highlight-score strong {
  color: var(--charcoal);
  font-size: 1.06rem;
  font-weight: 950;
}

.highlight-sample {
  justify-self: end;
  white-space: nowrap;
}

.ai-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.ai-bet-tabs,
.ai-suggestion-list,
.ai-notes-board,
.ai-match-comment-board {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.ai-bet-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.ai-bet-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 950;
}

.ai-bet-tabs button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.ai-bet-tabs em {
  min-width: 22px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--teal);
  text-align: center;
  font-size: 0.72rem;
  font-style: normal;
}

.ai-bet-tabs button.active em {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ai-suggestion-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(160px, 0.42fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.ai-rank {
  color: var(--teal);
  font-size: 1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.ai-suggestion-main,
.ai-pick-box {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ai-suggestion-main small,
.ai-suggestion-main em,
.ai-pick-box span,
.ai-pick-box em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.ai-suggestion-main strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ai-suggestion-main b {
  color: var(--teal);
  font-size: 0.78rem;
}

.ai-suggestion-main p {
  margin: 0;
  color: var(--charcoal);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.35;
}

.ai-pick-box {
  min-height: 70px;
  border-left: 5px solid var(--teal);
  border-radius: 6px;
  background: #f5f6f3;
  padding: 9px 10px;
}

.ai-pick-box strong {
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 950;
}

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

.ai-note-form,
.ai-match-form {
  display: grid;
  gap: 10px;
}

.ai-note-textarea {
  min-height: 130px;
}

.ai-note-list,
.ai-comment-result {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.ai-note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  border: 0;
  border-top: 1px solid #eef1ed;
  background: transparent;
  color: var(--ink);
  padding: 8px 0 0;
  text-align: left;
}

.ai-note-row strong,
.ai-comment-result > strong {
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 950;
}

.ai-note-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.ai-comment-panel {
  margin-top: 14px;
}

.ai-match-form {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
}

.ai-comment-line {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-top: 1px solid #eef1ed;
  padding-top: 8px;
}

.ai-comment-line b {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 950;
}

.ai-comment-line.rejected b {
  color: var(--muted);
}

.ai-comment-line span {
  color: var(--charcoal);
  font-size: 0.84rem;
  font-weight: 820;
  line-height: 1.35;
}

body.team-profile-open {
  overflow: hidden;
}

.team-profile-drawer[hidden] {
  display: none;
}

.team-profile-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 680px);
}

.team-profile-backdrop {
  grid-column: 1 / -1;
  grid-row: 1;
  background: rgba(24, 32, 39, 0.42);
}

.team-profile-panel {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  border-left: 1px solid rgba(24, 32, 39, 0.14);
  background: var(--surface);
  box-shadow: -18px 0 48px rgba(24, 32, 39, 0.18);
}

.team-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  background: #fff;
}

.team-profile-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
}

.team-profile-head .team-logo {
  width: 34px;
  height: 34px;
}

.team-profile-body {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 16px 18px 28px;
}

.team-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-profile-meta > span,
.team-profile-meta > .name-with-logo {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.team-profile-note-form {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #f8faf7;
  padding: 12px;
}

.team-profile-note-form textarea {
  min-height: 112px;
  resize: vertical;
}

.team-profile-section,
.team-profile-stat-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.team-profile-match-list {
  display: grid;
  gap: 8px;
}

.team-profile-match-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  border: 1px solid #edf1ec;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

button.team-profile-match-row:hover {
  border-color: rgba(15, 118, 110, 0.38);
  background: var(--teal-soft);
}

div.team-profile-match-row {
  cursor: default;
}

.team-profile-match-date,
.team-profile-match-row > em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
}

.team-profile-match-row > strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.team-profile-match-row b,
.team-profile-stat-head b {
  min-width: 44px;
  border-radius: 6px;
  background: #eef4ef;
  color: var(--teal);
  padding: 3px 6px;
  text-align: center;
  font-size: 0.78rem;
}

.team-profile-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-profile-stat-head > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.team-profile-stat-head span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.team-profile-stat-head strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.team-profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.team-profile-stat-grid > div {
  display: grid;
  gap: 4px;
  min-height: 64px;
  border: 1px solid #edf1ec;
  border-radius: 7px;
  background: #f8faf7;
  padding: 9px;
}

.team-profile-stat-grid span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.team-profile-stat-grid strong {
  color: var(--charcoal);
  font-size: 0.95rem;
  font-weight: 950;
}

.favorite-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.favorite-card-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.favorite-card-main > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.favorite-card-main strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.favorite-card-main b {
  color: var(--teal);
  font-size: 0.86rem;
}

.favorite-card-main p {
  margin: 0;
  color: var(--charcoal);
  line-height: 1.42;
  font-size: 0.9rem;
  font-weight: 800;
}

.favorite-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.favorite-coupon-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4ef;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 950;
}

.favorite-coupon-pill.hard {
  background: #fff7df;
  color: var(--amber);
}

.favorite-coupon-pill.sure {
  background: var(--teal-soft);
  color: var(--teal);
}

.favorite-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coupon-add-box {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(150px, 0.7fr) minmax(190px, 1fr) 130px;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #f8faf7;
}

.coupon-add-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.coupon-add-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.favorite-date-tabs,
.coupon-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.favorite-date-tabs:empty {
  display: none;
}

.favorite-date-tabs button,
.coupon-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 950;
}

.favorite-date-tabs button.active,
.coupon-tabs button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.favorite-date-tabs em,
.coupon-tabs em {
  min-width: 22px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--teal);
  text-align: center;
  font-size: 0.72rem;
  font-style: normal;
}

.favorite-date-tabs button.active em,
.coupon-tabs button.active em {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.coupon-board {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.coupon-manual-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.coupon-manual-bar div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.coupon-manual-bar strong {
  color: var(--charcoal);
  font-size: 0.92rem;
  font-weight: 950;
}

.coupon-manual-bar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.coupon-manual-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: #f8faf7;
  padding: 12px;
}

.coupon-selection-edit-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.coupon-summary-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) repeat(5, minmax(120px, 0.7fr));
  gap: 10px;
}

.coupon-stake-card,
.coupon-total-card,
.coupon-play-card {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.coupon-stake-card {
  display: grid;
  gap: 7px;
}

.coupon-stake-card span,
.coupon-total-card span,
.coupon-play-card span,
.coupon-selection-pick span,
.coupon-selection-odd span,
.coupon-selection-result span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coupon-stake-card em,
.coupon-total-card em,
.bankroll-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.coupon-stake-card b {
  color: var(--charcoal);
}

.coupon-total-card,
.coupon-play-card {
  display: grid;
  align-content: center;
  gap: 7px;
}

.coupon-total-card strong {
  color: var(--teal);
  font-size: 1.32rem;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.coupon-play-card {
  align-content: stretch;
}

.coupon-play-card .primary-button,
.coupon-play-card .ghost-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.coupon-state-pill,
.selection-result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef4ef;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
}

.coupon-state-pill.played,
.selection-result-pill.pending {
  background: #f5efe1;
  color: var(--amber);
}

.coupon-state-pill.won,
.selection-result-pill.won {
  background: #d9f1ec;
  color: var(--teal);
}

.coupon-state-pill.lost,
.selection-result-pill.lost {
  background: #f8dddd;
  color: var(--coral);
}

.coupon-inline-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.coupon-selection-list {
  display: grid;
  gap: 10px;
}

.coupon-selection-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.4fr) 96px 110px auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.coupon-selection-main,
.coupon-selection-pick,
.coupon-selection-odd,
.coupon-selection-result {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.coupon-selection-main small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.coupon-selection-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.coupon-selection-match b {
  color: var(--teal);
  font-size: 0.82rem;
}

.coupon-selection-pick strong {
  color: var(--charcoal);
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 950;
}

.coupon-selection-odd {
  justify-items: center;
  min-height: 56px;
  border-radius: 7px;
  background: #eef4ef;
  padding: 8px;
}

.coupon-selection-odd strong {
  color: var(--teal);
  font-size: 1.1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.coupon-selection-card.won {
  border-color: rgba(15, 118, 110, 0.35);
  background: #fbfffd;
}

.coupon-selection-card.lost {
  border-color: rgba(185, 78, 72, 0.35);
  background: #fffafa;
}

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

.result-button {
  min-height: 34px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--charcoal);
  padding: 7px 9px;
  font-size: 0.76rem;
  font-weight: 950;
}

.result-button.won.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.result-button.lost.active {
  border-color: var(--coral);
  background: var(--coral);
  color: #fff;
}

.bankroll-board,
.report-board {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.bankroll-summary-grid,
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.report-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bankroll-card {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.bankroll-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.bankroll-card strong {
  color: var(--charcoal);
  font-size: 1.24rem;
  line-height: 1.05;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.bankroll-card.positive strong {
  color: var(--teal);
}

.bankroll-card.negative strong {
  color: var(--coral);
}

.bankroll-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.bankroll-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bankroll-form p {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.transaction-list,
.report-section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.transaction-row,
.report-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  border-top: 1px solid #eef1ed;
  padding-top: 8px;
}

.transaction-row:first-of-type,
.report-rank-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.transaction-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.transaction-row strong,
.report-rank-row strong {
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 950;
}

.transaction-row span,
.report-rank-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.transaction-row b,
.report-rank-row b {
  color: var(--charcoal);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.transaction-row.positive b {
  color: var(--teal);
}

.transaction-row.negative b {
  color: var(--coral);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.league-group {
  overflow: hidden;
  border: 1px solid #dbe2dc;
  border-radius: 8px;
  background: #fff;
}

.league-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  background: #eef4ef;
  color: var(--charcoal);
  font-weight: 900;
}

.league-title strong {
  min-width: 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  text-align: center;
  font-size: 0.78rem;
}

.fixture-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 86px 92px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.fixture-row:hover,
.fixture-row.selected {
  background: var(--teal-soft);
}

.fixture-panel .fixture-row {
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px;
}

.fixture-panel .fixture-status {
  display: none;
}

.fixture-panel .fixture-score {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 0.74rem;
}

.fixture-time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.fixture-teams {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.fixture-row-league {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.fixture-row-league .league-logo {
  width: 14px;
  height: 14px;
}

.fixture-row-league .name-with-logo > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-teams .name-with-logo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-score,
.fixture-status {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 30px;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.fixture-score {
  background: var(--charcoal);
  color: #fff;
}

.fixture-score.scheduled {
  background: #f5efe1;
  color: var(--amber);
}

.fixture-status {
  background: #eef4ef;
  color: var(--muted);
}

.fixture-status.live {
  background: #f8dddd;
  color: var(--coral);
}

.fixture-status.finished {
  background: #e5eee7;
  color: var(--teal);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--charcoal);
}

.empty-state.compact {
  min-height: 70px;
  padding: 16px;
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-hero > div:first-child {
  display: grid;
  gap: 5px;
}

.detail-hero > div > span,
.detail-actions em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.star-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--amber);
  font-size: 1.32rem;
  font-weight: 950;
  line-height: 1;
}

.star-button.active {
  border-color: rgba(201, 137, 36, 0.55);
  background: #fff7df;
  color: var(--amber);
}

.favorite-box {
  display: grid;
  gap: 10px;
  margin: -2px 0 16px;
  padding: 12px;
  border: 1px solid rgba(201, 137, 36, 0.34);
  border-radius: 8px;
  background: #fffaf0;
}

.favorite-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.favorite-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.detail-hero strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 1.04rem;
  line-height: 1.25;
}

.detail-hero b {
  display: inline-block;
  margin: 0 6px;
  color: var(--teal);
}

.history-scope-tabs,
.standing-scope-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4ef;
}

.history-scope-tabs button,
.standing-scope-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 950;
}

.history-scope-tabs button.active,
.standing-scope-tabs button.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 6px 18px rgba(33, 40, 37, 0.08);
}

.standing-scope-tabs {
  margin: 10px 12px 0;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

.history-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.team-analysis-block {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.analysis-title-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 240px;
  gap: 12px;
  align-items: end;
}

.analysis-team-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #2f6da3;
  font-size: 0.98rem;
  font-weight: 950;
  text-transform: uppercase;
}

.analysis-team-title .name-with-logo > span:last-child {
  color: #2f6da3;
}

.analysis-team-title > span:last-child {
  color: #2f6da3;
  font-size: 0.88rem;
}

.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 9px;
}

.analysis-metric-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid #d3d7d2;
  border-radius: 4px;
  background: #fff;
  text-align: center;
}

.analysis-metric-card::after {
  content: "";
  position: absolute;
  top: 34px;
  right: 0;
  bottom: 0;
  width: 6px;
  background: #b1d600;
}

.analysis-metric-card.warn::after {
  background: #f08a00;
}

.analysis-metric-card.low::after {
  background: var(--coral);
}

.analysis-metric-card.neutral::after {
  background: #d6d9d4;
}

.analysis-metric-card span {
  display: grid;
  place-items: center;
  min-height: 34px;
  background: #e7e7e7;
  color: #111;
  font-size: 0.75rem;
  font-weight: 950;
}

.analysis-metric-card strong {
  color: #9fcc00;
  font-size: 1.35rem;
  line-height: 1;
}

.analysis-metric-card.warn strong {
  color: #f08a00;
}

.analysis-metric-card.low strong {
  color: var(--coral);
}

.analysis-metric-card.neutral strong {
  color: #5c625f;
}

.analysis-metric-card em {
  color: #5c625f;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.analysis-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.analysis-table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.analysis-table th,
.analysis-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf0ec;
  color: #5c625f;
  text-align: center;
  white-space: nowrap;
  font-weight: 850;
}

.analysis-table th {
  background: #e7e7e7;
  color: #5c625f;
  font-size: 0.72rem;
  font-weight: 950;
}

.analysis-table tbody tr:nth-child(odd) {
  background: #fafafa;
}

.analysis-table tbody tr:last-child td {
  border-bottom: 0;
}

.analysis-table th:nth-child(3),
.analysis-table td:nth-child(3) {
  text-align: left;
}

.analysis-match-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 280px;
}

.analysis-match-cell .name-with-logo {
  flex: 1 1 0;
}

.analysis-match-cell .name-with-logo.focus > span:last-child {
  color: var(--charcoal);
  font-weight: 950;
}

.analysis-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 28px;
  border-radius: 4px;
  color: #111;
  font-size: 0.86rem;
  font-weight: 950;
}

.analysis-score.win {
  background: #b7dc00;
}

.analysis-score.draw {
  background: #f08a00;
}

.analysis-score.loss {
  background: #e86266;
}

.analysis-score.scheduled {
  background: #d8d8d8;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--charcoal);
  font-size: 0.86rem;
  font-weight: 950;
}

.section-title em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.detail-metrics div {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.detail-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.detail-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.history-list,
.h2h-block {
  display: grid;
  gap: 8px;
}

.history-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

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

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: start;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.history-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.history-main span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.history-main strong {
  font-size: 0.78rem;
}

.history-scoreline {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.history-scoreline .name-with-logo {
  flex: 1 1 0;
}

.history-scoreline em {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.history-stats {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
}

.history-stat-line {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) repeat(3, auto);
  gap: 5px;
  align-items: center;
  min-height: 24px;
  border: 1px solid #dbe2dc;
  border-radius: 7px;
  background: #f8faf7;
  padding: 4px 6px;
}

.history-stat-line.focus {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--teal-soft);
}

.history-stat-line .name-with-logo {
  min-width: 0;
}

.history-stat-line .name-with-logo > span:last-child {
  overflow: hidden;
  color: var(--charcoal);
  font-size: 0.67rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-stat-line span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  white-space: nowrap;
}

.history-row b {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
}

.history-row b.win {
  background: var(--teal);
}

.history-row b.draw {
  background: var(--amber);
}

.history-row b.loss {
  background: var(--coral);
}

.sync-box {
  border-top: 1px solid var(--line);
}

.sync-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.inline-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.match-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
}

.match-card {
  border: 1px solid #dbe2dc;
  border-radius: 8px;
  background: #fff;
}

.match-main {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
}

.match-date {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.match-teams {
  display: grid;
  gap: 4px;
}

.team-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 850;
}

.team-line.muted {
  color: var(--muted);
}

.score {
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 13px 13px;
}

.data-chip {
  background: #eef4ef;
  color: var(--muted);
}

.match-stats {
  display: grid;
  gap: 8px;
  padding: 12px 13px 13px;
  border-top: 1px solid var(--line);
}

.compare-row {
  display: grid;
  grid-template-columns: 48px 1fr 112px 1fr 48px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.mini-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ede8;
}

.mini-fill {
  height: 100%;
  background: var(--teal);
}

.mini-fill.away {
  margin-left: auto;
  background: var(--coral);
}

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

.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.team-table th,
.team-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.team-table th:first-child,
.team-table td:first-child {
  text-align: left;
}

.team-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.standings-list {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.standings-shortcuts {
  position: sticky;
  top: 76px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 10px 28px rgba(33, 40, 37, 0.08);
  backdrop-filter: blur(16px);
}

.standings-shortcuts button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 54px;
  min-height: 34px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--charcoal);
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 950;
  white-space: nowrap;
}

.standings-shortcuts button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.standings-shortcuts button.active .league-logo.placeholder {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.2);
}

.detail-standings {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.standings-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.standings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #eef4ef;
}

.standings-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.standings-card-head span,
.standings-card-head em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.standings-card-head .name-with-logo > span:last-child {
  color: var(--charcoal);
  font-size: 0.92rem;
  font-weight: 950;
}

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

.standings-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.standings-table th,
.standings-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  min-width: 210px;
  text-align: left;
}

.standings-table th {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.standings-table tbody tr:nth-child(even) {
  background: #fbfdf9;
}

.standings-table tbody tr.focus-row {
  background: var(--teal-soft);
}

.standings-table .table-team {
  width: 100%;
}

.standings-card.compact .standings-card-head {
  min-height: 48px;
  padding: 8px 10px;
}

.standings-card.compact .standing-scope-tabs {
  margin: 8px 10px 0;
}

.standings-card.compact .standings-table {
  min-width: 560px;
  font-size: 0.74rem;
}

.standings-card.compact .standings-table th,
.standings-card.compact .standings-table td {
  padding: 7px 7px;
}

.import-panel {
  margin-bottom: 24px;
}

.import-panel input {
  max-width: 320px;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}

.mobile-package-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 18px 14px;
  padding: 16px;
  border: 1px solid #cfe0d7;
  border-radius: 10px;
  background: #f2faf5;
}

.mobile-package-box h3 {
  margin: 2px 0 4px;
  color: var(--ink);
}

.mobile-package-box p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.mobile-package-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-package-file {
  align-self: center;
  cursor: pointer;
}

.mobile-package-file input {
  display: none;
}

.league-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
}

.league-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.league-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  background: #eef4ef;
}

.league-card-head div {
  display: grid;
  gap: 3px;
}

.league-card-head span,
.league-card-head em,
.muted-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.league-card-head strong {
  color: var(--charcoal);
}

.team-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 30px;
  border: 1px solid #d6dfd8;
  border-radius: 999px;
  background: #fff;
  color: var(--charcoal);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.team-chip .name-with-logo {
  max-width: 190px;
}

.team-chip:hover,
.team-chip.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.season-fixture-list {
  display: grid;
  gap: 12px;
  max-height: 760px;
  overflow: auto;
  padding: 16px 18px;
}

.season-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 56px minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
}

.season-row.focus-team {
  background: #f7fbf7;
}

.season-row .team-focus {
  color: var(--teal);
}

.season-row span,
.season-row em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 850;
}

.season-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}

.season-row b {
  justify-self: center;
  min-width: 44px;
  border-radius: 7px;
  background: var(--charcoal);
  color: #fff;
  padding: 5px 6px;
  text-align: center;
  font-size: 0.76rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-match-list {
  display: grid;
  gap: 12px;
  max-height: 760px;
  overflow: auto;
  padding: 16px 18px;
}

.admin-date-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-date-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 9px 11px;
  background: #eef4ef;
  color: var(--charcoal);
  font-weight: 950;
}

.admin-date-title strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-match-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(108px, 0.52fr) 86px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.admin-match-row:hover,
.admin-match-row.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.admin-match-row > span,
.admin-match-row > small,
.admin-match-row > em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.admin-match-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-match-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.admin-match-teams {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.admin-match-teams .name-with-logo {
  flex: 1 1 0;
}

.admin-match-teams em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.admin-match-row em.finished {
  color: var(--teal);
}

.admin-match-row em.live {
  color: var(--coral);
}

.admin-form-host {
  padding: 16px 18px;
}

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

.admin-link-reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-link-reader small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.admin-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

.admin-stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-stat-card h3 {
  min-height: 28px;
  margin: 0 0 10px;
  color: var(--charcoal);
}

.stat-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

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

@media (max-width: 1180px) {
  .toolbar,
  .match-toolbar,
  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-grid,
  .admin-layout,
  .ai-layout,
  .league-directory,
  .content-grid.wide-left {
    grid-template-columns: 1fr;
  }

  .coupon-summary-grid,
  .bankroll-summary-grid,
  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coupon-selection-card {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.55fr) 96px 110px;
  }

  .coupon-selection-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .highlight-card {
    grid-template-columns: 42px minmax(0, 1fr) 136px;
  }

  .ai-suggestion-card {
    grid-template-columns: 42px minmax(0, 1fr) 150px;
  }

  .highlight-pick,
  .highlight-sample,
  .ai-card-actions {
    grid-column: 2 / -1;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .mobile-package-box {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-package-actions {
    justify-content: stretch;
  }

  .mobile-package-actions > * {
    flex: 1 1 100%;
    text-align: center;
  }

  .app-shell {
    width: min(100% - 18px, 1440px);
    padding-top: 9px;
  }

  .top-band {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 20px;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .toolbar,
  .match-toolbar,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .fixture-layout,
  .analysis-title-row,
  .ai-match-form,
  .ai-suggestion-card,
  .ai-comment-line {
    grid-template-columns: 1fr;
  }

  .toolbar {
    position: static;
  }

  .standings-shortcuts {
    position: static;
  }

  .panel-header,
  .sync-row,
  .match-main {
    grid-template-columns: 1fr;
  }

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

  .bar-row {
    grid-template-columns: 96px minmax(0, 1fr) 54px;
  }

  .compare-row {
    grid-template-columns: 38px 1fr 86px 1fr 38px;
  }

  .fixture-row {
    grid-template-columns: 58px minmax(0, 1fr) 74px;
  }

  .fixture-status {
    display: none;
  }

  .history-grid,
  .detail-metrics,
  .admin-score-grid,
  .admin-stat-columns,
  .stat-input-grid,
  .coupon-add-box,
  .coupon-manual-form,
  .coupon-selection-edit-form,
  .coupon-summary-grid,
  .coupon-selection-card,
  .team-profile-match-row,
  .team-profile-stat-grid,
  .bankroll-summary-grid,
  .report-summary-grid,
  .bankroll-form,
  .report-grid {
    grid-template-columns: 1fr;
  }

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

  .team-profile-panel {
    grid-column: 1;
  }

  .team-profile-head,
  .team-profile-stat-head {
    align-items: stretch;
    flex-direction: column;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .history-stat-line {
    grid-template-columns: 1fr repeat(3, auto);
  }

  .favorite-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .highlight-rank,
  .ai-rank,
  .highlight-sample {
    justify-self: start;
  }

  .highlight-pick,
  .highlight-sample,
  .ai-card-actions {
    grid-column: auto;
  }

  .favorite-card-actions,
  .favorite-actions,
  .coupon-manual-bar,
  .coupon-add-actions,
  .coupon-selection-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .favorite-actions span,
  .coupon-add-actions span {
    flex-basis: 100%;
    margin-right: 0;
  }

  .season-row {
    grid-template-columns: 82px minmax(0, 1fr) 44px;
  }

  .admin-match-row {
    grid-template-columns: 58px minmax(0, 1fr) 74px;
  }

  .admin-match-row small {
    display: none;
  }

  .season-row strong:nth-of-type(2),
  .season-row em {
    display: none;
  }

  .detail-hero {
    flex-direction: column;
  }
}

.basketball-bets-panel {
  overflow: hidden;
}

.basketball-bet-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid #e0e8e2;
  background: #f8fbf9;
}

.basketball-bet-tab {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  min-width: 0;
  min-height: 62px;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--muted);
  text-align: left;
  transition: 150ms ease;
}

.basketball-bet-tab:hover,
.basketball-bet-tab.active {
  border-color: #66aa97;
  background: #eef9f3;
  color: var(--teal);
}

.basketball-bet-tab span,
.basketball-bet-tab small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-bet-tab span {
  font-size: 0.79rem;
  font-weight: 950;
}

.basketball-bet-tab small {
  grid-column: 1 / -1;
  font-size: 0.64rem;
  font-weight: 800;
}

.basketball-bet-tab b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e7f1eb;
  color: var(--teal);
  font-size: 0.68rem;
}

.basketball-bet-list {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: #fcfdfc;
}

.basketball-bet-card,
.basketball-team-100-card {
  display: grid;
  border: 1px solid #dce6df;
  border-radius: 8px;
  background: #fff;
}

.basketball-bet-card {
  grid-template-columns: 42px minmax(230px, 1.35fr) 92px minmax(260px, 1fr) 100px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.basketball-bet-card:hover,
.basketball-team-100-card:hover,
.basketball-team-100-card:focus-visible {
  border-color: #9ac7b6;
  box-shadow: 0 7px 18px rgba(22, 76, 63, 0.06);
}

.basketball-team-100-card {
  cursor: pointer;
}

.basketball-bet-rank {
  color: #94a39d;
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.basketball-bet-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.basketball-bet-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.basketball-bet-player-trigger {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.basketball-bet-player-trigger:hover strong {
  color: var(--teal);
}

.basketball-bet-identity .player-logo,
.basketball-bet-identity .team-logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.basketball-bet-identity > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.basketball-bet-identity strong,
.basketball-bet-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-bet-identity strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
}

.basketball-bet-identity span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.basketball-bet-pick {
  display: grid;
  gap: 3px;
  min-width: 82px;
  border-left: 1px solid #e2ebe5;
  padding-left: 12px;
}

.basketball-bet-pick span,
.basketball-bet-pick strong {
  white-space: nowrap;
}

.basketball-bet-pick span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.basketball-bet-pick strong {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 950;
}

.basketball-bet-probability {
  display: grid;
  justify-items: center;
  gap: 2px;
  border-left: 1px solid #e2ebe5;
  border-right: 1px solid #e2ebe5;
  padding: 3px 10px;
}

.basketball-bet-probability strong {
  color: var(--teal);
  font-size: 1.24rem;
  font-weight: 950;
}

.basketball-bet-probability span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 850;
  text-transform: uppercase;
}

.basketball-bet-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.basketball-bet-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.basketball-bet-meta b {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 950;
  white-space: nowrap;
}

.basketball-bet-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-bet-recent {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.basketball-bet-recent span {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border: 1px solid #d5e5dc;
  border-radius: 5px;
  background: #f2f9f5;
  color: var(--teal);
  font-size: 0.66rem;
  font-weight: 950;
}

.basketball-team-100-card {
  gap: 0;
  overflow: hidden;
}

.basketball-team-100-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e4ebe6;
  padding: 13px 15px;
  background: #f7fbf8;
}

.basketball-team-100-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.basketball-team-100-head strong,
.basketball-team-100-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basketball-team-100-head strong {
  font-size: 0.86rem;
  font-weight: 950;
}

.basketball-team-100-head span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.basketball-team-100-head > b {
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 950;
  white-space: nowrap;
}

.basketball-team-100-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 15px;
}

.basketball-team-100-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.basketball-team-100-metrics {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.basketball-team-100-metrics strong {
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 950;
}

.basketball-team-100-metrics span,
.basketball-team-100-metrics small {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 1160px) {
  .basketball-bet-card {
    grid-template-columns: 34px minmax(220px, 1fr) 82px minmax(220px, 0.9fr);
  }

  .basketball-bet-recent {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .basketball-bet-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .basketball-bet-card {
    grid-template-columns: 30px minmax(0, 1fr) 76px;
    gap: 9px;
    padding: 11px;
  }

  .basketball-bet-main {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .basketball-bet-pick {
    border-left: 0;
    padding-left: 0;
  }

  .basketball-bet-probability {
    border-right: 0;
    padding-right: 0;
  }

  .basketball-bet-meta {
    grid-column: 2 / -1;
  }

  .basketball-bet-recent {
    grid-column: 2 / -1;
  }

  .basketball-team-100-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .basketball-layout {
    grid-template-columns: 1fr;
  }

  .basketball-detail-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .sport-switch {
    display: flex;
    width: 100%;
  }

  .sport-button {
    flex: 1;
    justify-content: center;
  }

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

  .basketball-match-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }

  .basketball-match-status {
    display: none;
  }

  .basketball-scoreboard {
    gap: 8px;
  }

  .basketball-team-badge.hero .team-logo {
    width: 42px;
    height: 42px;
  }

  .basketball-history-grid {
    grid-template-columns: 1fr;
  }

  .basketball-history-row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(125px, auto) 22px;
    gap: 7px;
    min-height: 60px;
    padding: 8px;
  }

  .basketball-history-date {
    font-size: 0.68rem;
  }

  .basketball-history-statline {
    padding-left: 23px;
  }

  .basketball-history-statline span {
    padding: 3px 5px;
    font-size: 0.52rem;
  }

  .basketball-periods {
    gap: 3px;
  }

  .basketball-periods span {
    padding: 3px 4px;
    font-size: 0.52rem;
  }

  .basketball-detail-tabs {
    overflow-x: auto;
  }

  .basketball-detail-tab {
    flex: 0 0 auto;
  }

  .basketball-match-players-grid {
    grid-template-columns: 1fr;
  }

  .basketball-match-players-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .basketball-match-players-heading > span {
    text-align: left;
  }

  .basketball-match-player-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .basketball-match-player-metrics {
    grid-column: 1 / -1;
  }

  .basketball-player-analyze,
  .basketball-player-unavailable {
    grid-column: 2;
    justify-self: end;
  }

  .basketball-player-search {
    align-items: stretch;
    flex-direction: column;
  }

  .basketball-player-search label {
    width: 100%;
  }

  .basketball-player-search .primary-button {
    width: 100%;
  }

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

/* Visual refresh: a calmer analysis-desk surface with stronger hierarchy. */
:root {
  --paper: #eef2f1;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #12232b;
  --muted: #65747a;
  --line: #d9e1df;
  --teal: #0d7a74;
  --teal-soft: #e0f4ef;
  --coral: #df665d;
  --amber: #c48620;
  --mint: #6bb99f;
  --charcoal: #122f37;
  --shadow: 0 10px 30px rgba(17, 42, 49, 0.07);
  --shadow-strong: 0 20px 50px rgba(17, 42, 49, 0.13);
}

html {
  background: var(--paper);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(18, 47, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 47, 55, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 58%);
}

.app-shell {
  width: min(1540px, calc(100% - 48px));
  padding: 28px 0 56px;
}

.top-band {
  position: relative;
  align-items: center;
  min-height: 148px;
  overflow: hidden;
  border: 1px solid #284a50;
  border-radius: 12px;
  background: #12323a;
  box-shadow: var(--shadow-strong);
}

.top-band::before {
  position: absolute;
  top: 0;
  right: 34%;
  bottom: 0;
  width: 1px;
  content: "";
  background: rgba(205, 239, 216, 0.14);
  transform: skewX(-24deg);
}

.top-band::after {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 150px;
  height: 1px;
  background: rgba(196, 240, 91, 0.68);
  box-shadow: 0 12px 0 rgba(196, 240, 91, 0.28), 0 24px 0 rgba(196, 240, 91, 0.12);
  content: "";
  pointer-events: none;
  transform: rotate(-23deg);
}

.hero-copy,
.status-strip {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b9d9d1;
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.brand-mark {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(196, 240, 91, 0.68);
  border-radius: 7px;
  color: #c4f05b;
  font-size: 0.64rem;
  letter-spacing: 0;
}

.hero-title-row {
  display: flex;
  align-items: end;
  gap: 18px;
}

.hero-title-row h1 {
  font-size: clamp(2.35rem, 4vw, 4rem);
  letter-spacing: 0;
}

.hero-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #d5e4de;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.hero-live-mark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4f05b;
  box-shadow: 0 0 0 4px rgba(196, 240, 91, 0.13);
}

.status-strip {
  max-width: 430px;
}

.status-strip span {
  border: 1px solid rgba(218, 239, 231, 0.17);
  background: rgba(255, 255, 255, 0.08);
  color: #e1eee9;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 8;
  gap: 6px;
  margin: 16px 0 10px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #d6dfdd;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 20px rgba(18, 47, 55, 0.06);
  scrollbar-width: thin;
  backdrop-filter: blur(14px);
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: #b7cac4;
}

.tab-button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5d7077;
  padding: 8px 13px;
  font-size: 0.77rem;
  font-weight: 950;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.tab-button:hover {
  background: #edf5f2;
  color: var(--charcoal);
  transform: translateY(-1px);
}

.tab-button.active {
  border-color: transparent;
  background: var(--charcoal);
  color: #efffd0;
  box-shadow: 0 5px 14px rgba(18, 47, 55, 0.18);
}

.toolbar {
  gap: 13px;
  margin: 10px 0 16px;
  padding: 14px 16px;
  border: 1px solid #d5dfdc;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

label {
  color: #708086;
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

select,
input,
textarea {
  min-height: 40px;
  border: 1px solid #cfdbd8;
  border-radius: 7px;
  background: #fbfdfc;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 0.84rem;
}

select:hover,
input:hover,
textarea:hover {
  border-color: #9fbab2;
}

select:focus,
input:focus,
textarea:focus {
  border-color: #31948a;
  box-shadow: 0 0 0 3px rgba(49, 148, 138, 0.13);
}

.panel,
.metric-card {
  border: 1px solid #d8e1df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel-header {
  min-height: 76px;
  padding: 18px 20px;
  border-bottom-color: #e3eae8;
}

.panel-header h2 {
  color: var(--charcoal);
  font-size: 1.16rem;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  opacity: 0.84;
}

.panel-header .eyebrow {
  margin-bottom: 7px;
}

.fixture-layout {
  grid-template-columns: minmax(300px, 0.56fr) minmax(0, 1.44fr);
  gap: 16px;
}

.detail-panel {
  top: 80px;
}

.fixture-list,
.favorites-list,
.highlight-list,
.ai-suggestion-list,
.team-table-wrap,
.season-fixture-list,
.admin-match-list {
  padding: 15px;
}

.fixture-list {
  gap: 10px;
  max-height: 760px;
}

.league-group,
.league-card,
.admin-date-group {
  border-color: #dbe5e2;
  border-radius: 9px;
}

.league-title,
.league-card-head,
.admin-date-title {
  min-height: 48px;
  background: #f1f7f4;
  color: var(--charcoal);
}

.league-title strong,
.league-card-head strong,
.admin-date-title strong {
  color: var(--teal);
}

.fixture-row {
  min-height: 64px;
  border-top-color: #edf2f0;
  background: #fff;
  transition: background 150ms ease, padding 150ms ease;
}

.fixture-row:hover,
.fixture-row.selected {
  background: #edf8f4;
}

.fixture-time {
  color: var(--charcoal);
  font-size: 0.78rem;
  font-weight: 950;
}

.fixture-score {
  border-radius: 6px;
  background: var(--charcoal);
  color: #e7f5e6;
}

.fixture-score.scheduled {
  border: 1px solid #ecd9a5;
  background: #fff8e6;
  color: #aa7314;
}

.fixture-status.finished {
  background: #e3f5ec;
  color: #187260;
}

.fixture-status.live {
  background: #ffe7e3;
}

.name-with-logo > span:last-child {
  font-weight: 850;
}

.name-with-logo.strong > span:last-child {
  font-weight: 950;
}

.team-logo,
.league-logo,
.mini-logo {
  width: 24px;
  height: 24px;
}

.summary-grid {
  gap: 10px;
}

.metric-card {
  min-height: 110px;
  padding: 15px 16px;
}

.metric-card strong {
  color: var(--charcoal);
  font-size: 1.62rem;
}

.highlight-tabs,
.ai-bet-tabs,
.favorite-date-tabs,
.coupon-tabs {
  gap: 7px;
  padding: 13px 15px;
  border-bottom-color: #e3eae8;
  background: #f6faf8;
}

.highlight-tabs button,
.ai-bet-tabs button,
.favorite-date-tabs button,
.coupon-tabs button {
  min-height: 36px;
  border: 1px solid #d3dfda;
  border-radius: 7px;
  background: #fff;
  color: #64777b;
  padding: 7px 10px;
  transition: 150ms ease;
}

.highlight-tabs button:hover,
.ai-bet-tabs button:hover,
.favorite-date-tabs button:hover,
.coupon-tabs button:hover {
  border-color: #8eb7aa;
  background: #eef7f3;
  color: var(--charcoal);
}

.highlight-tabs button.active,
.ai-bet-tabs button.active,
.favorite-date-tabs button.active,
.coupon-tabs button.active {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #efffd0;
}

.highlight-card,
.ai-suggestion-card,
.favorite-card,
.coupon-selection-card,
.bankroll-card,
.team-profile-section,
.team-profile-stat-card,
.team-profile-note-form,
.history-row,
.detail-metrics div,
.analysis-metric-card {
  border-color: #dce6e3;
  box-shadow: none;
}

.highlight-card:hover,
.ai-suggestion-card:hover,
.favorite-card:hover {
  border-color: #9bc8bb;
  background: #fbfffd;
  box-shadow: 0 8px 20px rgba(21, 85, 76, 0.07);
}

.highlight-score,
.ai-pick-box,
.coupon-selection-odd {
  background: #f3f8f5;
}

.highlight-score.good,
.analysis-metric-card::after {
  border-color: #9fc800;
}

.highlight-score strong,
.ai-pick-box strong,
.coupon-total-card strong,
.team-profile-stat-grid strong {
  color: var(--teal);
}

.analysis-title-row {
  padding: 0 0 2px;
}

.analysis-team-title,
.analysis-team-title .name-with-logo > span:last-child {
  color: var(--teal);
}

.analysis-metric-card span,
.analysis-table th {
  background: #eff4f1;
  color: #4a6262;
}

.analysis-table-wrap,
.standings-card,
.team-table-wrap,
.transaction-list,
.report-section,
.ai-note-list,
.ai-comment-result {
  border-color: #dce6e3;
}

.analysis-table tbody tr:nth-child(odd),
.standings-table tbody tr:nth-child(even) {
  background: #fbfdfc;
}

.analysis-table tbody tr:hover,
.standings-table tbody tr:hover {
  background: #edf8f4;
}

.analysis-score.win,
.analysis-score.draw,
.analysis-score.loss {
  border-radius: 6px;
}

.analysis-score.win {
  background: #c9e94a;
}

.analysis-score.draw {
  background: #f4c05d;
}

.analysis-score.loss {
  background: #f18b84;
}

.standing-scope-tabs,
.history-scope-tabs {
  border-color: #d7e3df;
  background: #edf5f1;
}

.standing-scope-tabs button.active,
.history-scope-tabs button.active {
  color: var(--teal);
  box-shadow: 0 4px 12px rgba(18, 47, 55, 0.1);
}

.standings-table th {
  border-bottom-color: #dce6e3;
}

.standings-table tbody tr.focus-row {
  background: #e2f4ed;
}

.primary-button {
  border-color: #0a6c66;
  background: var(--teal);
  box-shadow: 0 5px 12px rgba(13, 122, 116, 0.14);
  transition: 150ms ease;
}

.primary-button:hover {
  background: #09635e;
  box-shadow: 0 7px 16px rgba(13, 122, 116, 0.22);
  transform: translateY(-1px);
}

.ghost-button,
.result-button,
.star-button {
  border-color: #d2dfdb;
  background: #fff;
  transition: 150ms ease;
}

.ghost-button:hover,
.result-button:hover {
  border-color: #85b4a5;
  background: #edf8f4;
  color: var(--charcoal);
}

.star-button.active {
  border-color: #d3a33b;
  background: #fff6dc;
}

.team-chip {
  min-height: 34px;
  border-color: #d8e4df;
  background: #fff;
  transition: 150ms ease;
}

.team-chip:hover,
.team-chip.active {
  border-color: #65ad98;
  background: #e4f5ee;
  color: var(--charcoal);
  box-shadow: 0 4px 10px rgba(21, 85, 76, 0.08);
}

.admin-form-host,
.bankroll-board,
.report-board,
.coupon-board {
  background: #fbfdfc;
}

.admin-stat-card,
.admin-link-reader,
.bankroll-form,
.coupon-manual-form,
.coupon-add-box {
  border-color: #dce6e3;
  background: #f5faf7;
}

.team-profile-panel {
  background: #f4f8f6;
}

.team-profile-head {
  background: #12323a;
  color: #fff;
}

.team-profile-head h2,
.team-profile-head .eyebrow {
  color: #f4fff2;
}

.team-profile-head .ghost-button {
  border-color: rgba(231, 249, 237, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #efffd0;
}

.team-profile-body {
  padding: 18px 20px 32px;
}

.team-profile-meta > span,
.team-profile-meta > .name-with-logo {
  border-color: #d6e3df;
  background: #fff;
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 32px, 1540px);
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 18px);
    padding-top: 10px;
  }

  .top-band {
    min-height: 164px;
    padding: 18px;
  }

  .hero-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hero-title-row h1 {
    font-size: 2.45rem;
  }

  .hero-live-mark {
    margin-bottom: 0;
  }

  .status-strip {
    justify-content: flex-start;
  }

  .tabs {
    top: 0;
    margin-top: 10px;
  }

  .panel-header {
    min-height: 68px;
    padding: 15px 16px;
    align-items: stretch;
    flex-direction: column;
  }

  .panel-league-filter {
    padding: 12px 16px;
  }

  .fixture-list,
  .favorites-list,
  .highlight-list,
  .ai-suggestion-list,
  .team-table-wrap,
  .season-fixture-list,
  .admin-match-list {
    padding: 12px;
  }
}

/* Mobile app shell: keep every primary surface readable at one-hand width. */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 760px) {
  html {
    -webkit-text-size-adjust: 100%;
    background: var(--paper);
  }

  body {
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-tap-highlight-color: rgba(13, 122, 116, 0.12);
  }

  body,
  button,
  input,
  select,
  textarea {
    font-size: 14px;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    padding: max(8px, env(safe-area-inset-top)) 10px calc(82px + env(safe-area-inset-bottom));
  }

  .top-band {
    min-height: 0;
    margin: 0;
    padding: 14px 15px 15px;
    border-radius: 16px;
  }

  .brand-lockup {
    gap: 7px;
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .brand-mark {
    width: 23px;
    height: 23px;
    border-radius: 6px;
  }

  .hero-copy {
    gap: 8px;
  }

  .hero-title-row {
    gap: 5px;
  }

  .hero-title-row h1 {
    max-width: 100%;
    font-size: 1.78rem;
    line-height: 1.08;
  }

  .hero-live-mark {
    font-size: 0.66rem;
  }

  .status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: none;
    margin-top: 2px;
  }

  .status-strip span {
    display: grid;
    min-height: 30px;
    place-items: center;
    padding: 5px 7px;
    text-align: center;
    white-space: normal;
  }

  .sport-switch {
    width: 100%;
    margin: 10px 0 0;
    padding: 4px;
    border-radius: 13px;
  }

  .sport-button {
    flex: 1 1 0;
    min-height: 44px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .tabs {
    position: sticky;
    top: max(4px, env(safe-area-inset-top));
    z-index: 8;
    margin: 10px 0 8px;
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(18, 47, 55, 0.1);
  }

  .tab-button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 0.72rem;
  }

  .toolbar,
  .match-toolbar {
    position: static;
    gap: 8px;
    margin: 8px 0 10px;
    padding: 10px;
    border-radius: 13px;
  }

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

  .match-toolbar label:nth-child(2),
  .match-toolbar label:nth-child(4) {
    grid-column: 1 / -1;
  }

  .match-toolbar label:nth-child(3) {
    grid-column: 2;
  }

  label {
    gap: 4px;
    font-size: 0.6rem;
  }

  select,
  input,
  textarea {
    min-height: 44px;
    border-radius: 9px;
    padding: 9px 10px;
    font-size: 0.86rem;
  }

  .panel,
  .metric-card {
    border-radius: 14px;
  }

  .panel-header {
    min-height: 64px;
    padding: 13px 15px;
  }

  .panel-header h2 {
    font-size: 1rem;
  }

  .fixture-layout,
  .content-grid,
  .content-grid.wide-left,
  .basketball-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
    width: 100%;
  }

  .fixture-panel,
  .detail-panel,
  .basketball-fixture-panel,
  .basketball-detail-panel {
    width: 100%;
    min-width: 0;
  }

  .detail-panel,
  .basketball-detail-panel {
    position: static;
  }

  .fixture-list,
  .match-detail,
  .basketball-match-list,
  .basketball-detail,
  .favorites-list,
  .highlight-list,
  .ai-suggestion-list,
  .team-table-wrap,
  .season-fixture-list,
  .admin-match-list {
    padding: 10px;
  }

  .fixture-list,
  .basketball-match-list {
    max-height: none;
    overflow: visible;
  }

  .fixture-row,
  .fixture-panel .fixture-row {
    grid-template-columns: 46px minmax(0, 1fr) 58px !important;
    gap: 7px;
    min-height: 64px;
    padding: 9px 8px;
  }

  .fixture-row-league {
    display: none;
  }

  .fixture-teams .name-with-logo {
    max-width: 100%;
    font-size: 0.75rem;
  }

  .fixture-score {
    min-width: 58px;
    min-height: 30px;
    padding: 5px 4px;
    font-size: 0.68rem;
  }

  .fixture-time {
    font-size: 0.72rem;
  }

  .detail-hero {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .detail-hero > div:first-child {
    width: 100%;
  }

  .detail-hero strong {
    gap: 4px;
    font-size: 0.88rem;
  }

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

  .detail-actions em {
    font-size: 0.7rem;
  }

  .history-grid {
    gap: 16px;
  }

  .analysis-title-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .analysis-team-title {
    font-size: 0.84rem;
  }

  .history-scope-tabs,
  .standing-scope-tabs {
    width: 100%;
  }

  .analysis-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .analysis-metric-card {
    min-height: 76px;
  }

  .analysis-metric-card span {
    min-height: 28px;
    padding: 4px 2px;
    font-size: 0.6rem;
  }

  .analysis-metric-card strong {
    font-size: 1rem;
  }

  .analysis-metric-card em {
    font-size: 0.58rem;
  }

  .analysis-table-wrap,
  .standings-table-wrap,
  .basketball-player-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .analysis-table,
  .standings-table,
  .basketball-player-table {
    min-width: 700px;
  }

  .standings-list {
    gap: 10px;
    padding: 10px;
  }

  .standings-shortcuts {
    top: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0;
    padding: 7px;
    -webkit-overflow-scrolling: touch;
  }

  .standings-shortcuts button {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .basketball-tabs {
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 1px;
    -webkit-overflow-scrolling: touch;
  }

  .basketball-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 11px;
    font-size: 0.72rem;
  }

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

  .basketball-source-note {
    min-height: 30px;
    justify-content: center;
  }

  .basketball-match-row {
    grid-template-columns: 44px minmax(0, 1fr) 58px;
    gap: 7px;
    min-height: 66px;
    padding: 9px 8px;
  }

  .basketball-match-status {
    display: none;
  }

  .basketball-match-time {
    font-size: 0.72rem;
  }

  .basketball-match-score {
    min-width: 58px;
    font-size: 0.82rem;
  }

  .basketball-scoreboard {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }

  .basketball-team-badge.hero {
    max-width: 125px;
    font-size: 0.76rem;
  }

  .basketball-team-badge.hero .team-logo {
    width: 44px;
    height: 44px;
  }

  .basketball-detail-tabs {
    overflow-x: auto;
    margin: 14px 0 12px;
    -webkit-overflow-scrolling: touch;
  }

  .basketball-detail-tab {
    flex: 0 0 auto;
    min-height: 42px;
  }

  .basketball-match-players-grid,
  .basketball-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .basketball-match-players-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .basketball-match-player-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .basketball-match-player-metrics {
    grid-column: 1 / -1;
  }

  .basketball-player-analyze,
  .basketball-player-unavailable {
    grid-column: 2;
    justify-self: end;
  }

  .basketball-bet-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
  }

  .basketball-bet-tab {
    min-height: 58px;
    padding: 9px;
  }

  .basketball-bet-card {
    grid-template-columns: 28px minmax(0, 1fr) 70px;
    gap: 8px;
    padding: 10px;
  }

  .basketball-player-search {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 10px 6px;
  }

  .basketball-player-search label,
  .basketball-player-search .primary-button {
    width: 100%;
  }

  .basketball-player-results {
    padding: 6px 10px 12px;
  }

  .basketball-player-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }

  .basketball-player-metrics div {
    padding: 7px;
  }

  .team-profile-panel {
    width: 100%;
    max-width: none;
  }

  .team-profile-head,
  .team-profile-body {
    padding-left: 15px;
    padding-right: 15px;
  }

  .team-profile-body {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid #d5e1dd;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -8px 24px rgba(18, 47, 55, 0.12);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav button {
    display: grid;
    min-height: 50px;
    place-items: center;
    gap: 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #718187;
    padding: 5px 2px;
    font-weight: 900;
  }

  .mobile-bottom-nav button span {
    font-size: 1.08rem;
    line-height: 1;
  }

  .mobile-bottom-nav button small {
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .mobile-bottom-nav button.active {
    background: #e2f4ed;
    color: var(--teal);
  }

  body.basketball-active .mobile-bottom-nav {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero-title-row h1 {
    font-size: 1.58rem;
  }

  .tab-button {
    padding-right: 10px;
    padding-left: 10px;
  }

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

/* Edge-to-edge phone layout for the native WebView. */
@media (max-width: 760px) {
  body {
    min-height: 100svh;
    background: var(--paper);
  }

  .app-shell {
    width: 100%;
    padding: 0 0 calc(82px + env(safe-area-inset-bottom));
  }

  .top-band {
    min-height: 0;
    padding: max(11px, env(safe-area-inset-top)) 15px 11px;
    border-radius: 0 0 16px 16px;
  }

  .top-band::before,
  .top-band::after {
    display: none;
  }

  .hero-copy {
    gap: 4px;
  }

  .brand-lockup {
    font-size: 0.54rem;
  }

  .hero-title-row {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .hero-title-row h1 {
    font-size: 1.32rem;
    line-height: 1.12;
  }

  .hero-live-mark {
    display: none;
  }

  .status-strip {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .status-strip span {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 27px;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .status-strip span:nth-child(n + 3) {
    display: none;
  }

  .sport-switch {
    width: calc(100% - 20px);
    margin: 8px 10px 0;
  }

  #footballWorkspace > .tabs,
  #footballWorkspace > .toolbar,
  #footballWorkspace > .tab-panel {
    width: calc(100% - 20px);
    margin-right: 10px;
    margin-left: 10px;
  }

  #basketballWorkspace {
    margin-right: 10px;
    margin-left: 10px;
  }

  .tabs {
    margin-top: 8px;
  }

  .toolbar,
  .match-toolbar {
    margin-top: 8px;
  }

  .fixture-layout,
  .content-grid,
  .content-grid.wide-left,
  .basketball-layout {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .panel-header {
    min-height: 58px;
    padding: 12px 14px;
  }

  .mobile-bottom-nav {
    padding-bottom: max(7px, env(safe-area-inset-bottom));
    background: #ffffff;
  }
}

/* Compact phone navigation: the list is the home screen, details are a separate view. */
.mobile-back-button {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  body {
    background: #f2f6f4;
  }

  body.mobile-more-open {
    overflow: hidden;
  }

  .app-shell {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0 calc(82px + env(safe-area-inset-bottom));
  }

  .top-band {
    min-height: 0;
    border-radius: 0 0 18px 18px;
    padding: max(10px, env(safe-area-inset-top)) 14px 12px;
  }

  .brand-lockup {
    letter-spacing: 0.16em;
  }

  .hero-title-row h1 {
    max-width: 75vw;
    overflow: hidden;
    font-size: 1.22rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    overflow: hidden;
  }

  .status-strip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status-strip span:nth-child(n + 3) {
    display: none;
  }

  .sport-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: calc(100% - 20px);
    margin: 9px 10px 0;
    padding: 4px;
  }

  .sport-button {
    min-width: 0;
    min-height: 43px;
    justify-content: center;
    padding: 8px 5px;
  }

  #footballWorkspace > .tabs {
    display: none !important;
  }

  #footballWorkspace > .toolbar {
    display: none;
    width: calc(100% - 20px);
    margin: 8px 10px 0;
    padding: 9px;
  }

  body.mobile-tab-matches #footballWorkspace > .toolbar {
    display: grid;
  }

  #footballWorkspace > .tab-panel {
    width: calc(100% - 20px);
    margin: 8px 10px 0;
  }

  .match-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .match-toolbar label {
    min-width: 0;
  }

  .match-toolbar label:nth-child(2),
  .match-toolbar label:nth-child(4) {
    grid-column: 1 / -1;
  }

  .match-toolbar input,
  .match-toolbar select {
    width: 100%;
    min-width: 0;
  }

  #matchesPanel .fixture-layout,
  #basketballMatchesView .basketball-layout {
    display: block;
    width: 100%;
    margin: 0;
  }

  #matchesPanel .detail-panel,
  #basketballMatchesView .basketball-detail-panel {
    display: none;
  }

  body.mobile-match-detail #matchesPanel .fixture-panel,
  body.mobile-basketball-detail #basketballMatchesView .basketball-fixture-panel {
    display: none;
  }

  body.mobile-match-detail #matchesPanel .detail-panel,
  body.mobile-basketball-detail #basketballMatchesView .basketball-detail-panel {
    display: block;
  }

  .panel {
    min-width: 0;
    border-radius: 14px;
  }

  .panel-header {
    min-width: 0;
    min-height: 54px;
    padding: 11px 12px;
  }

  .panel-header > div {
    min-width: 0;
  }

  .panel-header h2 {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-back-button {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid #d3e0da;
    border-radius: 10px;
    background: #f5faf7;
    color: var(--teal);
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1;
  }

  #matchesPanel .detail-panel .panel-header,
  #basketballMatchesView .basketball-detail-panel .panel-header {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .fixture-list,
  .basketball-match-list {
    display: grid;
    gap: 7px;
    max-height: none;
    padding: 8px;
  }

  .league-group {
    overflow: hidden;
    border-radius: 12px;
  }

  .league-title {
    min-height: 37px;
    padding: 7px 9px;
  }

  .league-title strong {
    min-width: 23px;
  }

  .fixture-row,
  .fixture-panel .fixture-row {
    grid-template-columns: 43px minmax(0, 1fr) 53px !important;
    gap: 6px;
    min-height: 62px;
    padding: 7px 8px;
  }

  .fixture-time {
    font-size: 0.68rem;
  }

  .fixture-teams {
    min-width: 0;
    gap: 2px;
  }

  .fixture-row-league {
    display: none;
  }

  .fixture-teams .name-with-logo,
  .basketball-match-teams .name-with-logo {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 5px;
    align-items: center;
  }

  .fixture-teams .name-with-logo > span:last-child,
  .basketball-match-teams .name-with-logo > span:last-child {
    min-width: 0;
    overflow: hidden;
    font-size: 0.73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fixture-teams .team-logo,
  .basketball-match-teams .team-logo {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .fixture-score {
    min-width: 53px;
    min-height: 28px;
    padding: 4px 2px;
    font-size: 0.64rem;
  }

  .fixture-panel .fixture-status {
    display: none;
  }

  .match-detail,
  .basketball-detail {
    min-height: 0;
    padding: 10px;
  }

  .detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .detail-hero > div:first-child {
    min-width: 0;
  }

  .detail-hero strong {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    font-size: 0.75rem;
  }

  .detail-hero strong > .name-with-logo {
    min-width: 0;
  }

  .detail-hero strong > .name-with-logo:last-child {
    justify-content: flex-end;
    text-align: right;
  }

  .detail-hero strong > .name-with-logo > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .detail-hero b {
    margin: 0;
    text-align: center;
  }

  .detail-actions {
    display: grid;
    justify-items: end;
    gap: 5px;
  }

  .detail-actions em {
    max-width: 70px;
    overflow: hidden;
    font-size: 0.6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .history-grid,
  .basketball-history-grid {
    gap: 10px;
  }

  .team-analysis-block,
  .basketball-history-block {
    gap: 8px;
    overflow: hidden;
    border: 1px solid #dce7e1;
    border-radius: 12px;
    background: #fff;
  }

  .team-analysis-block {
    padding: 8px;
  }

  .analysis-title-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
  }

  .analysis-team-title {
    min-width: 0;
    font-size: 0.76rem;
  }

  .history-scope-tabs,
  .standing-scope-tabs {
    width: 100%;
  }

  .history-scope-tabs button,
  .standing-scope-tabs button {
    min-height: 30px;
    font-size: 0.65rem;
  }

  .analysis-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .analysis-metric-card {
    min-height: 61px;
  }

  .analysis-metric-card span {
    min-height: 25px;
    font-size: 0.48rem;
    line-height: 1.05;
  }

  .analysis-metric-card strong {
    font-size: 0.82rem;
  }

  .analysis-metric-card em {
    font-size: 0.48rem;
  }

  .analysis-table-wrap,
  .standings-table-wrap,
  .basketball-player-table-wrap {
    width: 100%;
    overflow: hidden !important;
    padding: 0;
  }

  .analysis-table,
  .standings-table,
  .basketball-player-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
  }

  .analysis-table {
    font-size: 0.52rem;
  }

  .analysis-table th,
  .analysis-table td {
    overflow: hidden;
    padding: 5px 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .analysis-table th:nth-child(2),
  .analysis-table td:nth-child(2),
  .analysis-table th:nth-child(5),
  .analysis-table td:nth-child(5),
  .analysis-table th:nth-child(6),
  .analysis-table td:nth-child(6) {
    display: none;
  }

  .analysis-table th:nth-child(1),
  .analysis-table td:nth-child(1) {
    width: 12%;
  }

  .analysis-table th:nth-child(3),
  .analysis-table td:nth-child(3) {
    width: 45%;
  }

  .analysis-table th:nth-child(4),
  .analysis-table td:nth-child(4),
  .analysis-table th:nth-child(7),
  .analysis-table td:nth-child(7),
  .analysis-table th:nth-child(8),
  .analysis-table td:nth-child(8) {
    width: 14.3%;
  }

  .analysis-match-cell {
    max-width: 0;
  }

  .analysis-match-cell .name-with-logo {
    display: inline-flex;
    max-width: 43%;
    gap: 2px;
    vertical-align: middle;
  }

  .analysis-match-cell .name-with-logo > span:last-child {
    overflow: hidden;
    font-size: 0.48rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .analysis-match-cell .team-logo {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
  }

  .standings-list {
    gap: 9px;
    padding: 9px;
  }

  .standings-shortcuts {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    padding: 7px;
  }

  .standings-shortcuts button {
    min-width: 0;
    min-height: 32px;
    padding: 5px 3px;
    font-size: 0.61rem;
  }

  .standings-table {
    font-size: 0.61rem;
  }

  .standings-table th,
  .standings-table td {
    overflow: hidden;
    padding: 6px 3px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .standings-table th:nth-child(5),
  .standings-table td:nth-child(5),
  .standings-table th:nth-child(6),
  .standings-table td:nth-child(6),
  .standings-table th:nth-child(7),
  .standings-table td:nth-child(7),
  .standings-table th:nth-child(8),
  .standings-table td:nth-child(8) {
    display: none;
  }

  .standings-table th:nth-child(2),
  .standings-table td:nth-child(2) {
    width: 58%;
  }

  .highlight-tabs,
  .ai-bet-tabs,
  .coupon-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    padding: 9px;
  }

  .highlight-tabs button,
  .ai-bet-tabs button,
  .coupon-tabs button {
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    padding: 6px 4px;
    font-size: 0.64rem;
  }

  .favorite-date-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    overflow: visible;
    padding: 9px;
  }

  .favorite-date-tabs button {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.62rem;
  }

  .league-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
  }

  .league-check-option {
    min-width: 0;
    padding: 5px 6px;
    font-size: 0.62rem;
  }

  .basketball-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    margin-top: 8px;
    border: 0;
  }

  .basketball-tab {
    min-width: 0;
    min-height: 38px;
    border: 1px solid #d6e3dd;
    border-radius: 10px;
    padding: 7px 4px;
    font-size: 0.62rem;
  }

  #basketballWorkspace {
    width: calc(100% - 20px);
    margin: 8px 10px 0;
  }

  #basketballWorkspace .basketball-toolbar {
    display: grid;
    width: 100%;
    margin: 8px 0 0;
  }

  .basketball-source-note {
    min-height: 30px;
    font-size: 0.65rem;
  }

  .basketball-match-row {
    grid-template-columns: 43px minmax(0, 1fr) 58px !important;
    gap: 6px;
    min-height: 64px;
    padding: 7px 8px;
  }

  .basketball-match-time {
    font-size: 0.68rem;
  }

  .basketball-match-score {
    min-width: 58px;
    font-size: 0.74rem;
  }

  .basketball-match-score small {
    overflow: hidden;
    max-width: 58px;
    text-overflow: ellipsis;
  }

  .basketball-match-status {
    display: none;
  }

  .basketball-detail-hero {
    gap: 9px;
    padding-bottom: 10px;
  }

  .basketball-scoreboard {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 5px;
  }

  .basketball-scoreboard > strong {
    font-size: 1.35rem;
  }

  .basketball-team-badge.hero {
    max-width: 100%;
    gap: 5px;
    font-size: 0.68rem;
  }

  .basketball-team-badge.hero .team-logo {
    width: 42px;
    height: 42px;
  }

  .basketball-team-badge.hero > span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .basketball-detail-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    margin: 10px 0;
    border: 0;
  }

  .basketball-detail-tab {
    min-width: 0;
    min-height: 34px;
    justify-content: center;
    border: 1px solid #dce7e1;
    border-radius: 9px;
    padding: 6px 4px;
    font-size: 0.62rem;
  }

  .basketball-history-block {
    padding: 8px;
  }

  .basketball-history-heading {
    min-width: 0;
  }

  .basketball-history-heading > span {
    overflow: hidden;
    font-size: 0.64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .basketball-player-table {
    font-size: 0.55rem;
  }

  .basketball-player-table th,
  .basketball-player-table td {
    overflow: hidden;
    padding: 6px 3px;
    text-overflow: ellipsis;
  }

  .basketball-player-table th:nth-child(4),
  .basketball-player-table td:nth-child(4),
  .basketball-player-table th:nth-child(5),
  .basketball-player-table td:nth-child(5) {
    display: none;
  }

  .basketball-player-table th:nth-child(1),
  .basketball-player-table td:nth-child(1) {
    width: 31%;
  }

  .basketball-player-table th:nth-child(6),
  .basketball-player-table td:nth-child(6),
  .basketball-player-table th:nth-child(7),
  .basketball-player-table td:nth-child(7),
  .basketball-player-table th:nth-child(8),
  .basketball-player-table td:nth-child(8),
  .basketball-player-table th:nth-child(9),
  .basketball-player-table td:nth-child(9) {
    width: 13%;
  }

  .mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 7px max(6px, env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 49px;
  }

  .mobile-bottom-nav button span {
    font-size: 1rem;
  }

  .mobile-bottom-nav button small {
    font-size: 0.56rem;
  }

  .mobile-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
  }

  .mobile-more-sheet.open {
    display: flex;
    align-items: flex-end;
  }

  .mobile-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 42, 0.38);
  }

  .mobile-more-panel {
    position: relative;
    width: 100%;
    max-height: min(78svh, 620px);
    overflow: auto;
    border-radius: 20px 20px 0 0;
    padding: 15px 14px calc(18px + env(safe-area-inset-bottom));
    background: #fffdf8;
    box-shadow: 0 -18px 50px rgba(10, 37, 42, 0.2);
  }

  .mobile-more-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-more-head h2 {
    margin: 2px 0 0;
    font-size: 1.1rem;
  }

  .mobile-sheet-close {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid #d5e1dc;
    border-radius: 10px;
    background: #f2f7f4;
    color: var(--teal);
    font-size: 1.25rem;
  }

  .mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-more-grid button {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 8px;
    min-width: 0;
    min-height: 62px;
    align-items: center;
    border: 1px solid #dbe7e1;
    border-radius: 12px;
    padding: 8px;
    background: #f7fbf8;
    color: var(--charcoal);
    text-align: left;
  }

  .mobile-more-grid button > span {
    grid-row: 1 / span 2;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: #dff3eb;
    color: var(--teal);
    font-size: 1rem;
    font-weight: 950;
  }

  .mobile-more-grid button b {
    min-width: 0;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-grid button small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.55rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav button.active {
    background: #dff3eb;
  }

  .panel-league-filter,
  .import-panel > p,
  .form-strip,
  .sync-box,
  .health-list,
  .match-detail,
  .favorites-list,
  .highlight-list,
  .coupon-board,
  .bankroll-board,
  .report-board,
  .season-fixture-list {
    padding-right: 9px;
    padding-left: 9px;
  }
}

/* Keep the refreshed detail surface above legacy panel rules. */
.match-detail {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f4f8f6;
}

.history-list {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.team-analysis-block-v2 {
  gap: 14px;
  padding: 17px 18px 18px;
  border: 1px solid #d8e5df;
  border-radius: 14px;
  background: #ffffff;
}

.history-row-v2 {
  grid-template-columns: 1fr;
  gap: 9px;
  min-height: 0;
  padding: 12px;
  border: 1px solid #e0ebe6;
  border-radius: 11px;
  background: #fcfefd;
}

.history-row-v2 .history-row-topline > b {
  grid-column: auto;
  grid-row: auto;
  min-height: 24px;
  margin: 0;
}

@media (max-width: 760px) {
  .match-detail {
    gap: 11px;
    padding: 10px;
  }

  .history-row-v2 {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
  }

  .team-analysis-block-v2 {
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
  }
}

/* Keep both teams' five-match comparison visible in one desktop viewport. */
.match-detail .history-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.team-analysis-block-v2 {
  gap: 10px;
  padding: 12px;
}

.history-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.history-metric-card {
  min-height: 61px;
  padding: 7px 5px;
}

.history-metric-card strong {
  font-size: 0.9rem;
}

.history-row-v2 {
  grid-template-columns: 1fr;
  gap: 6px;
  min-height: 0;
  padding: 8px;
}

.history-matchup-v2 {
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  gap: 6px;
}

.history-team-name .name-with-logo > span:last-child {
  font-size: 0.68rem;
}

.history-scoreline-v2 {
  min-height: 26px;
  font-size: 0.76rem;
}

.history-stat-strip > span {
  padding: 5px 4px;
  font-size: 0.62rem;
}

@media (max-width: 760px) {
  .match-detail .history-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .match-detail {
    gap: 11px;
    padding: 10px;
  }

  .history-row-v2 {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
  }

  .team-analysis-block-v2 {
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
  }
}
