:root {
  --mobile-nav-height: 72px;
  --parent-bg: #f7f8f4;
  --parent-ink: #101310;
  --parent-muted: #5f675f;
  --parent-line: rgba(30, 36, 29, 0.12);
  --parent-card: rgba(255, 255, 255, 0.94);
  --parent-card-strong: #ffffff;
  --parent-accent: #e95518;
  --parent-accent-soft: #fff0e7;
  --parent-grass: #1f7a4d;
  --parent-night: #11140f;
}

.mobile-result-summary,
.mobile-table-hint {
  display: none;
}

@media (max-width: 860px) {
  .results-layout {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .results-detail-panel {
    display: none;
  }

  .mobile-result-summary {
    background: var(--parent-card-strong);
    border: 1px solid var(--parent-line);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(16, 19, 16, 0.08);
    color: var(--parent-ink);
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
  }

  .mobile-result-summary > div {
    min-width: 0;
  }

  .mobile-result-summary .eyebrow {
    color: var(--parent-accent);
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  .mobile-result-summary h3 {
    font-size: 1.24rem;
    line-height: 1.12;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
  }

  .mobile-result-summary p {
    color: var(--parent-muted);
    font-size: 0.88rem;
    line-height: 1.35;
    margin-bottom: 0;
  }

  .mobile-result-summary .primary-button {
    width: 100%;
  }

  .mobile-result-score {
    align-items: end;
    background: var(--parent-night);
    border-radius: 14px;
    color: white;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 84px;
    padding: 12px 14px;
  }

  .mobile-result-score span {
    align-self: start;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--parent-accent);
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0;
    padding: 5px 8px;
    text-transform: uppercase;
  }

  .mobile-result-score strong {
    font-size: clamp(2.25rem, 15vw, 3.35rem);
    letter-spacing: 0;
    line-height: 0.9;
  }

  .mobile-result-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-result-stats .mini-stat {
    background: #f4f3ef;
    border: 1px solid rgba(30, 36, 29, 0.08);
    border-radius: 10px;
    min-height: 70px;
    padding: 10px;
  }

  .mobile-result-stats .mini-stat strong {
    font-size: 1.3rem;
  }

  .mobile-result-stats .mini-stat span {
    color: var(--parent-muted);
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .mobile-result-top {
    background: #faf9f5;
    border: 1px solid rgba(30, 36, 29, 0.08);
    border-radius: 12px;
    display: grid;
    gap: 4px;
    padding: 11px;
  }

  .mobile-result-top strong {
    font-size: 0.76rem;
    text-transform: uppercase;
  }

  .results-layout > .panel {
    max-height: 330px;
    overflow-y: auto;
    padding: 12px;
    overscroll-behavior: contain;
  }

  .results-layout > .panel .panel-title {
    margin-bottom: 8px;
  }

  .results-layout > .panel .panel-title p,
  .result-list-head {
    display: none;
  }

  .result-list {
    gap: 8px;
  }

  .result-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 62px;
    padding: 10px;
  }

  .result-row > span:first-child {
    min-width: 0;
  }

  .result-row > span:first-child strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-row small {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .result-row > span:nth-child(2) {
    display: none;
  }

  .result-row > strong {
    background: #f1f0eb;
    border-radius: 999px;
    font-size: 0.9rem;
    min-width: 54px;
    padding: 7px 8px;
    text-align: center;
  }

  .result-row .result-badge {
    display: none;
  }

  .report-stat-section {
    display: grid;
    gap: 10px;
  }

  .panel .grid.two-col,
  .report-panel .grid.two-col {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .report-controls {
    display: none;
  }

  .report-stat-grid {
    display: flex !important;
    gap: 8px;
    grid-template-columns: none !important;
    margin: 0 -14px;
    overflow-x: auto;
    padding: 0 14px 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .report-stat-card {
    flex: 0 0 138px;
    min-height: 92px;
    scroll-snap-align: start;
  }

  .report-awards {
    grid-template-columns: 1fr 1fr;
  }

  .report-award-item {
    min-width: 0;
  }

  .report-award-item strong {
    font-size: 0.9rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .report-top-players {
    border-radius: 12px;
  }

  .report-context-note,
  .report-substitutions-copy {
    display: none;
  }

  .report-player-stats-copy {
    margin-top: 2px;
  }

  .mobile-table-hint {
    align-items: center;
    background: #fff7f1;
    border: 1px solid rgba(233, 85, 24, 0.18);
    border-radius: 12px;
    color: #8a3515 !important;
    display: flex;
    font-size: 0.78rem !important;
    font-weight: 850;
    gap: 8px;
    line-height: 1.28 !important;
    margin: 0 0 10px;
    padding: 10px 11px;
  }

  .report-player-table-wrap {
    border-radius: 12px;
    max-height: 62vh;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .report-sub-table table,
  .report-player-table {
    min-width: 1120px !important;
  }

  .report-player-table th:first-child,
  .report-player-table td:first-child {
    min-width: 116px;
    width: 116px;
  }

  .report-player-table th,
  .report-player-table td {
    padding: 7px 6px;
  }

  .team-trends-controls {
    border-radius: 14px;
    gap: 8px;
    padding: 12px;
  }

  .team-trends-controls .segmented-control {
    background: #f1f0eb;
    border-radius: 999px;
    display: flex;
    gap: 4px;
    overflow: visible;
    padding: 4px;
  }

  .team-trends-controls .quiet-button {
    border-radius: 999px;
    flex: 1 0 70px;
    font-size: 0.76rem;
    line-height: 1.1;
    min-height: 38px;
    padding: 7px 10px;
  }

  .team-trends-stat-grid {
    gap: 7px;
    margin: 0 -14px 10px;
    padding: 0 14px 5px;
  }

  .team-trends-stat-grid .veo-stat-card {
    border-radius: 999px;
    flex: 0 0 auto;
    min-height: 0;
    padding: 8px 11px;
    width: max-content;
  }

  .team-trends-stat-grid .veo-stat-card.is-selected {
    box-shadow: 0 0 0 2px var(--parent-night);
  }

  .team-trends-stat-grid .veo-stat-title {
    font-size: 0.74rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .team-trends-stat-grid .veo-stat-value {
    display: none;
  }

  .team-trends-chart-panel {
    border-radius: 18px;
    padding: 18px 14px 16px;
  }

  .team-trends-chart-panel .veo-chart-head {
    margin-bottom: 14px;
  }

  .team-trends-chart-panel .veo-chart-head > span {
    justify-self: start;
  }

  .team-trends-chart-panel .veo-chart {
    grid-template-columns: 34px minmax(0, 1fr);
    height: min(58vh, 440px);
    min-height: 350px;
  }

  .team-trends-chart-panel .veo-y-axis {
    font-size: 0.78rem;
    padding-bottom: 68px;
  }

  .team-trends-chart-panel .veo-bars {
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-inline: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .team-trends-chart-panel .veo-bar-wrap {
    flex: 0 0 52px;
    min-width: 52px;
    scroll-snap-align: start;
  }

  .team-trends-chart-panel .veo-bar {
    background: #efeee9;
    border-radius: 7px 7px 3px 3px;
    padding: 8px 5px 0;
  }

  .team-trends-chart-panel .veo-bar strong {
    font-size: 0.74rem;
  }

  .team-trends-chart-panel .veo-bar-meta {
    min-height: 66px;
  }

  .team-trends-chart-panel .veo-bar-meta strong {
    font-size: 0.66rem;
    max-width: 52px;
  }

  .team-trends-chart-panel .veo-bar-meta small {
    font-size: 0.6rem;
  }

  .team-trends-summary {
    display: none;
  }
}

html {
  background: var(--parent-bg);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 248, 244, 0.72) 18rem, var(--parent-bg) 100%);
  color: var(--parent-ink);
}

.topbar,
.tabs,
.home-section,
.leaderboard-explainer,
.dashboard-leaders,
.stat-guide-panel,
.dashboard-recent-panel,
.panel,
.cloud-login-card,
.table-wrap {
  border-color: var(--parent-line);
}

.topbar {
  box-shadow: 0 12px 28px rgba(16, 19, 16, 0.05);
}

.brand-logo {
  border-color: var(--parent-line);
  box-shadow: 0 8px 18px rgba(16, 19, 16, 0.08);
}

.ghost-button,
.quiet-button,
.tab {
  min-height: 44px;
}

.primary-button,
.cloud-login-submit {
  min-height: 48px;
}

.dashboard-hero {
  border: 0;
  box-shadow: 0 22px 60px rgba(16, 19, 16, 0.16);
}

.dashboard-hero h2 {
  text-wrap: balance;
}

.dashboard-hero-copy > p:not(.eyebrow),
.home-section-head,
.panel-title,
.report-header p,
.cloud-login-copy p:not(.eyebrow) {
  text-wrap: pretty;
}

.dashboard-hero-photo {
  background-position: center 43%;
}

.home-section,
.dashboard-recent-panel,
.panel {
  box-shadow: 0 14px 34px rgba(16, 19, 16, 0.06);
}

.kpi,
.development-focus-grid article,
.leader-card,
.player-hub-match-row,
.player-hub-game-card,
.trend-match-card,
.result-row,
.match-row {
  border-color: var(--parent-line);
}

.cloud-login-shell {
  min-height: calc(100svh - 122px);
}

.cloud-login-card {
  box-shadow: 0 20px 60px rgba(16, 19, 16, 0.12);
}

.cloud-login-form input,
.cloud-login-form select,
.cloud-login-form textarea,
.form-field input,
.form-field select,
.form-field textarea {
  font-size: 16px;
}

@media (max-width: 860px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 248, 244, 0.86) 19rem, var(--parent-bg) 100%);
  }

  .app-shell {
    --mobile-topbar-height: 65px;
    padding-bottom: 0;
  }

  .topbar {
    align-items: center;
    background: rgba(247, 248, 244, 0.94);
    backdrop-filter: blur(16px);
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 60;
  }

  .brand-lockup {
    flex: 1 1 auto;
    gap: 10px;
  }

  .brand-logo {
    border-radius: 10px;
    height: 44px;
    padding: 4px;
    width: 44px;
  }

  .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 1px;
  }

  h1 {
    font-size: 1.08rem;
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    flex: 0 0 auto;
    gap: 6px;
    justify-content: end;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .primary-button,
  .topbar-actions .danger-button,
  .topbar-actions .quiet-button {
    min-height: 40px;
    padding: 8px 11px;
  }

  .tabs {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--parent-line);
    border-top: 1px solid rgba(30, 36, 29, 0.06);
    box-shadow: 0 12px 26px rgba(16, 19, 16, 0.08);
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 8px 12px;
    position: sticky;
    top: var(--mobile-topbar-height);
    z-index: 59;
    -webkit-overflow-scrolling: touch;
  }

  .tab {
    background: #f1f0eb;
    border: 1px solid rgba(30, 36, 29, 0.08);
    border-radius: 999px;
    color: #626a62;
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.1;
    min-height: 40px;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
  }

  .tab.is-active {
    background: var(--parent-night);
    border-color: transparent;
    box-shadow: none;
    color: white;
  }

  .tab.is-private-locked::after {
    display: none;
  }

  .main-content {
    padding: 14px 12px 20px;
  }

  .section-head {
    gap: 8px;
    margin-bottom: 12px;
  }

  .section-head h2 {
    font-size: 1.08rem;
  }

  .section-head p {
    font-size: 0.88rem;
  }

  .dashboard-hero {
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 12px;
    min-height: 0;
  }

  .dashboard-hero-copy {
    gap: 14px;
    padding: 18px;
  }

  .dashboard-hero-badge {
    font-size: 0.68rem;
    padding: 5px 10px 5px 6px;
  }

  .dashboard-hero-badge img {
    height: 24px;
    width: 24px;
  }

  .dashboard-hero h2 {
    font-size: clamp(2rem, 14vw, 3.35rem);
    line-height: 0.98;
  }

  .dashboard-hero-copy > p:not(.eyebrow) {
    font-size: 0.96rem;
    line-height: 1.42;
  }

  .dashboard-hero-metrics {
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero .mini-stat {
    border-radius: 10px;
    padding: 10px;
  }

  .dashboard-hero .mini-stat strong {
    font-size: 1.02rem;
  }

  .dashboard-hero .mini-stat span {
    font-size: 0.72rem;
  }

  .dashboard-hero-footer {
    align-items: start;
    display: grid;
    font-size: 0.8rem;
    gap: 8px;
  }

  .dashboard-hero-photo {
    min-height: clamp(170px, 44vw, 230px);
  }

  .home-section,
  .leaderboard-explainer,
  .dashboard-leaders,
  .stat-guide-panel,
  .dashboard-recent-panel,
  .panel {
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 14px;
  }

  .home-section-head,
  .panel-title,
  .player-hub-head,
  .player-hub-trend-head {
    align-items: start;
    display: grid;
    gap: 7px;
  }

  .home-section-head > span,
  .status-pill {
    justify-self: start;
    white-space: normal;
  }

  .grid.kpis.dashboard-kpis {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi {
    border-radius: 10px;
    min-height: 86px;
    padding: 12px;
  }

  .kpi-label {
    font-size: 0.72rem;
  }

  .kpi-value {
    font-size: 1.5rem;
    line-height: 1.05;
  }

  .development-focus-grid,
  .leader-card-grid,
  .top-five-grid,
  .report-stat-grid,
  .ai-summary-grid,
  .player-hub-development-grid,
  .cloud-count-grid,
  .parent-invite-grid,
  .cloud-project-card {
    gap: 9px;
    grid-template-columns: 1fr;
  }

  .development-focus-grid article {
    min-height: 0;
    padding: 13px;
  }

  .dashboard-recent-layout,
  .results-layout,
  .grid.two-col,
  .grid.three-col {
    grid-template-columns: 1fr;
  }

  .game-journal-list {
    gap: 7px;
  }

  .game-journal-item,
  .result-row,
  .match-row,
  .trend-match-card,
  .player-hub-match-row {
    border-radius: 10px;
    min-height: 56px;
  }

  .result-row {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .result-score {
    min-width: 56px;
  }

  .report-controls {
    gap: 9px;
    grid-template-columns: 1fr;
  }

  .report-header {
    border-radius: 12px;
    gap: 12px;
  }

  .report-score {
    border-radius: 10px;
    min-height: 70px;
  }

  .table-wrap {
    border-radius: 12px;
    margin-left: -2px;
    margin-right: -2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 680px;
  }

  .table-wrap th,
  .table-wrap td {
    font-size: 0.78rem;
    padding: 9px 8px;
  }

  .player-hub-selector {
    gap: 10px;
  }

  .player-hub-picker {
    display: none;
  }

  .player-prompt .player-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-prompt .player-chip {
    justify-content: flex-start;
    min-width: 0;
    padding: 10px;
    white-space: normal;
  }

  .topbar-actions [data-open-parent-view],
  .topbar-actions [data-export-backup],
  .topbar-actions [data-export],
  .topbar-actions .database-status {
    display: none !important;
  }

  .player-hub-selector select {
    min-height: 48px;
  }

  .player-hub-hero {
    gap: 12px;
  }

  .player-hub-season-stats {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-hub-season-stat {
    border-radius: 10px;
    min-height: 86px;
    padding: 12px;
  }

  .player-hub-stat-strip {
    gap: 6px;
  }

  .player-hub-stat-pill {
    border-radius: 10px;
    min-width: 74px;
  }

  .player-hub-chart-wrap {
    min-height: 260px;
    overflow-x: auto;
  }

  .player-hub-line-chart {
    min-width: 620px;
  }

  .cloud-login-shell {
    align-items: start;
    min-height: calc(100svh - 64px);
    padding: 14px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .cloud-login-card {
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(16, 19, 16, 0.11);
    gap: 16px;
    max-width: 520px;
    padding: 18px;
  }

  .cloud-login-copy h2 {
    font-size: clamp(1.72rem, 10vw, 2.35rem);
    line-height: 1.02;
  }

  .cloud-login-copy p:not(.eyebrow),
  .cloud-login-note {
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .cloud-invite-banner {
    border-radius: 10px;
    padding: 12px;
  }

  .cloud-login-tabs {
    border-radius: 12px;
    gap: 4px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cloud-login-tabs button {
    border-radius: 9px;
    font-size: 0.78rem;
    min-height: 42px;
    padding: 8px 4px;
  }

  .cloud-login-form {
    gap: 11px;
  }

  .cloud-login-form .form-field {
    gap: 6px;
  }

  .cloud-login-form input {
    min-height: 50px;
  }

  .cloud-login-submit {
    border-radius: 10px;
    min-height: 52px;
    width: 100%;
  }
}

@media (max-width: 430px) {
  .app-shell {
    --mobile-topbar-height: 61px;
  }

  .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand-logo {
    height: 40px;
    width: 40px;
  }

  h1 {
    font-size: 1rem;
    max-width: 10.8rem;
  }

  .topbar-actions .ghost-button {
    font-size: 0.82rem;
    min-height: 38px;
    padding: 8px 10px;
  }

  .tab {
    font-size: 0.66rem;
    min-height: 38px;
    padding: 8px 11px;
  }

  .main-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .dashboard-hero-copy {
    padding: 16px;
  }

  .dashboard-hero h2 {
    font-size: clamp(1.92rem, 13vw, 2.9rem);
  }

  .dashboard-hero-photo {
    min-height: 158px;
  }

  .grid.kpis.dashboard-kpis,
  .dashboard-hero-metrics,
  .player-hub-season-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-value,
  .player-hub-season-stat strong {
    font-size: 1.32rem;
  }

  .cloud-login-card {
    padding: 16px;
  }
}

@media (max-width: 360px) {
  h1 {
    max-width: 9.2rem;
  }

  .tab {
    font-size: 0.62rem;
    padding-left: 2px;
    padding-right: 2px;
  }

  .dashboard-hero-metrics,
  .grid.kpis.dashboard-kpis,
  .player-hub-season-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .main-content {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .main-content > *,
  .panel {
    min-width: 0;
    max-width: 100%;
  }

  .dashboard-recent-panel .panel-title {
    align-items: stretch;
  }

  .dashboard-recent-panel .panel-title .ghost-button {
    width: 100%;
  }

  .dashboard-recent-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-game-list {
    display: grid;
    gap: 7px;
    height: auto !important;
    max-height: none !important;
    overflow: visible;
    padding-right: 0;
  }

  .dashboard-all-games .dashboard-game-list {
    max-height: 58svh !important;
    overflow: auto;
    padding-right: 2px;
  }

  .match-row {
    align-items: start;
    gap: 8px;
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 10px;
  }

  .match-row > span:nth-child(2) {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .match-row > span:nth-child(2) strong {
    line-height: 1.14;
    overflow-wrap: anywhere;
  }

  .match-row .match-meta {
    display: block;
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .match-row .score {
    align-self: start;
    background: rgba(18, 20, 17, 0.06);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 950;
    grid-column: 2;
    justify-self: start;
    padding: 5px 7px;
  }

  .match-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    grid-column: 2 / -1;
    justify-content: flex-start;
    justify-items: start;
    margin-top: 1px;
  }

  .review-badge {
    font-size: 0.66rem;
    padding: 4px 7px;
  }

  .dashboard-match-detail {
    border-radius: 12px;
    gap: 11px;
    padding: 12px;
  }

  .dashboard-detail-head {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-detail-head h3 {
    font-size: 1rem;
    line-height: 1.18;
  }

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

  .dashboard-goal-assist-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-detail-actions {
    align-items: stretch;
    display: grid;
    gap: 8px;
  }

  .report-panel {
    gap: 12px;
    min-width: 0;
    overflow: hidden;
  }

  .report-controls {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    overflow: hidden;
  }

  .report-controls .form-field {
    grid-column: 1 / -1;
    min-width: 0;
    order: -1;
  }

  .report-controls [data-report-prev] {
    grid-column: 1;
  }

  .report-controls [data-report-next] {
    grid-column: 2;
  }

  .report-controls select {
    min-width: 0;
    width: 100%;
  }

  .report-controls .ghost-button {
    min-height: 42px;
    width: 100%;
  }

  .report-header {
    background: var(--parent-card-strong);
    border: 1px solid var(--parent-line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(16, 19, 16, 0.07);
    color: var(--parent-ink);
    display: grid;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
    padding: 14px;
  }

  .report-header > div {
    min-width: 0;
  }

  .report-header *,
  .report-controls *,
  .report-shot-comparison * {
    min-width: 0;
  }

  .report-header h2 {
    display: block;
    font-size: clamp(1.25rem, 8vw, 1.65rem);
    line-height: 1.06;
    margin-bottom: 6px;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal !important;
    word-break: break-word;
  }

  .report-title span,
  .report-title strong {
    display: block;
    min-width: 0;
    white-space: normal !important;
  }

  .report-title span {
    font-size: 0.92rem;
    font-weight: 850;
  }

  .report-title strong {
    font-size: 1.2rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .report-header p {
    color: var(--parent-muted);
    font-size: 0.9rem;
    line-height: 1.35;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  .report-result-line {
    display: none;
  }

  .report-header .eyebrow {
    color: var(--parent-accent);
  }

  .report-header-actions {
    margin-top: 9px;
  }

  .report-header .ghost-button.light,
  .report-link-pill {
    background: rgba(18, 20, 17, 0.04);
    border-color: var(--parent-line);
    color: var(--parent-ink);
  }

  .report-score,
  .report-score.W,
  .report-score.D,
  .report-score.L {
    align-items: center;
    aspect-ratio: auto;
    background: var(--parent-night);
    border-color: var(--parent-night);
    color: white;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    min-height: 58px;
    min-width: 0;
    padding: 10px 12px;
    width: 100%;
  }

  .report-score span {
    color: var(--parent-accent);
    font-size: 1.7rem;
  }

  .report-score strong {
    font-size: 0.88rem;
  }

  .report-shot-comparison {
    display: none;
  }

  .report-shot-table {
    inline-size: 100%;
    max-inline-size: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .report-shot-head {
    display: grid;
    gap: 3px;
  }

  .report-shot-head h3 {
    font-size: 0.95rem;
  }

  .report-shot-head p {
    display: none;
  }

  .report-shot-row {
    box-sizing: border-box;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    inline-size: 100%;
    max-inline-size: 100%;
    min-height: 0;
    min-width: 0;
    padding: 8px;
  }

  .report-shot-row.is-head {
    display: none;
  }

  .report-shot-row span {
    font-size: 0.78rem;
    grid-column: 1 / -1;
    line-height: 1.2;
  }

  .report-shot-row strong {
    background: rgba(18, 20, 17, 0.04);
    font-size: 0.86rem;
    padding: 4px 5px;
    text-align: left;
  }

  .report-shot-row:not(.is-head) strong:nth-of-type(1)::before {
    color: var(--parent-muted);
    content: "Us ";
    font-size: 0.66rem;
    font-weight: 900;
  }

  .report-shot-row:not(.is-head) strong:nth-of-type(2)::before {
    color: var(--parent-muted);
    content: "Opp ";
    font-size: 0.66rem;
    font-weight: 900;
  }

  .report-stat-grid {
    gap: 8px;
    grid-template-columns: 1fr !important;
    inline-size: 100%;
    max-inline-size: 100%;
    min-width: 0;
  }

  .report-stat-card {
    border-radius: 10px;
    gap: 6px;
    min-height: 86px;
    padding: 10px;
  }

  .report-stat-title {
    font-size: 0.66rem;
    line-height: 1.18;
  }

  .report-stat-value strong {
    font-size: 1.45rem;
  }

  .report-stat-value small,
  .report-stat-note {
    font-size: 0.66rem;
  }

  .report-stat-note {
    display: none;
  }

  .report-awards {
    gap: 8px;
    grid-template-columns: 1fr;
    padding-top: 12px;
  }

  .report-award-item {
    padding: 10px;
  }

  .report-copy {
    padding-top: 12px;
  }

  .report-copy h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .report-copy p,
  .report-copy li,
  .coach-notes-block p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .report-context-note {
    font-size: 0.78rem;
    padding: 9px 10px;
  }

  .report-sub-table table,
  .report-player-table {
    min-width: 720px !important;
  }

  .report-player-table th,
  .report-player-table td {
    font-size: 0.72rem;
    padding: 7px 6px;
  }

  .team-trends-controls {
    background: var(--parent-card-strong);
    border: 1px solid var(--parent-line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(16, 19, 16, 0.06);
    color: var(--parent-ink);
    gap: 10px;
    padding: 12px;
  }

  .team-trends-controls h3 {
    font-size: 1rem;
  }

  .team-trends-controls p {
    color: var(--parent-muted);
  }

  .team-trends-controls .segmented-control {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .team-trends-controls .quiet-button {
    min-height: 36px;
    padding: 6px;
  }

  .team-trends-stat-grid {
    display: flex;
    gap: 8px;
    margin: 0 -2px 12px;
    overflow-x: auto;
    padding: 0 2px 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .team-trends-stat-grid .veo-stat-card {
    border-radius: 12px;
    flex: 0 0 132px;
    gap: 4px;
    min-height: 84px;
    padding: 10px;
    scroll-snap-align: start;
  }

  .team-trends-stat-grid .veo-stat-title {
    font-size: 0.7rem;
    line-height: 1.15;
  }

  .team-trends-stat-grid .veo-stat-value strong {
    font-size: 1.36rem;
  }

  .team-trends-stat-grid .veo-stat-value small {
    font-size: 0.62rem;
  }

  .team-trends-stat-grid .veo-stat-note,
  .team-trends-stat-grid .veo-stat-delta,
  .team-trends-stat-grid .veo-stat-action {
    display: none;
  }

  .team-trends-chart-panel {
    padding: 12px;
  }

  .team-trends-chart-panel .veo-chart-head {
    align-items: start;
    display: grid;
    gap: 6px;
  }

  .team-trends-chart-panel .veo-chart-head h3 {
    font-size: 1rem;
  }

  .team-trends-chart-panel .veo-chart-head p {
    font-size: 0.82rem;
    line-height: 1.32;
  }

  .team-trends-chart-panel .veo-chart {
    min-height: 300px;
  }

  .trend-modal-tabs {
    gap: 6px;
    overflow-x: auto;
  }

  .trend-modal-tabs span {
    flex: 0 0 auto;
    font-size: 0.74rem;
    padding: 6px 8px;
  }
}

@media (max-width: 860px) {
  .results-layout {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .results-detail-panel {
    display: none;
  }

  .mobile-result-summary {
    background: var(--parent-card-strong);
    border: 1px solid var(--parent-line);
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(16, 19, 16, 0.08);
    color: var(--parent-ink);
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
  }

  .mobile-result-summary > div {
    min-width: 0;
  }

  .mobile-result-summary .eyebrow {
    color: var(--parent-accent);
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  .mobile-result-summary h3 {
    font-size: 1.24rem;
    line-height: 1.12;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
  }

  .mobile-result-summary p {
    color: var(--parent-muted);
    font-size: 0.88rem;
    line-height: 1.35;
    margin-bottom: 0;
  }

  .mobile-result-summary .primary-button {
    width: 100%;
  }

  .mobile-result-score {
    align-items: end;
    background: var(--parent-night);
    border-radius: 14px;
    color: white;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 84px;
    padding: 12px 14px;
  }

  .mobile-result-score span {
    align-self: start;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--parent-accent);
    font-size: 0.74rem;
    font-weight: 950;
    letter-spacing: 0;
    padding: 5px 8px;
    text-transform: uppercase;
  }

  .mobile-result-score strong {
    font-size: clamp(2.25rem, 15vw, 3.35rem);
    letter-spacing: 0;
    line-height: 0.9;
  }

  .mobile-result-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-result-stats .mini-stat {
    background: #f4f3ef;
    border: 1px solid rgba(30, 36, 29, 0.08);
    border-radius: 10px;
    min-height: 70px;
    padding: 10px;
  }

  .mobile-result-top {
    background: #faf9f5;
    border: 1px solid rgba(30, 36, 29, 0.08);
    border-radius: 12px;
    display: grid;
    gap: 4px;
    padding: 11px;
  }

  .mobile-result-top strong {
    font-size: 0.76rem;
    text-transform: uppercase;
  }

  .results-layout > .panel {
    max-height: 330px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
  }

  .results-layout > .panel .panel-title p,
  .result-list-head,
  .result-row > span:nth-child(2),
  .result-row .result-badge {
    display: none;
  }

  .result-row {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 62px;
    padding: 10px;
  }

  .result-row > span:first-child {
    min-width: 0;
  }

  .result-row > span:first-child strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-row > strong {
    background: #f1f0eb;
    border-radius: 999px;
    font-size: 0.9rem;
    min-width: 54px;
    padding: 7px 8px;
    text-align: center;
  }

  .report-stat-section {
    display: grid;
    gap: 10px;
  }

  .report-stat-grid {
    display: flex !important;
    gap: 8px;
    grid-template-columns: none !important;
    margin: 0 -14px;
    overflow-x: auto;
    padding: 0 14px 5px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .report-stat-card {
    flex: 0 0 138px;
    min-height: 92px;
    scroll-snap-align: start;
  }

  .report-awards {
    display: flex;
    gap: 8px;
    margin: 0 -14px;
    overflow-x: auto;
    padding: 10px 14px 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .report-award-item {
    flex: 0 0 150px;
    min-height: 72px;
    scroll-snap-align: start;
  }

  .report-award-item p {
    display: none;
  }

  .report-context-note,
  .report-substitutions-copy {
    display: none;
  }

  .report-copy,
  .report-copy p,
  .report-copy li,
  .report-top-players,
  .top-player-list span,
  .coach-notes-block p {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .mobile-table-hint {
    align-items: center;
    background: #fff7f1;
    border: 1px solid rgba(233, 85, 24, 0.18);
    border-radius: 12px;
    color: #8a3515 !important;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem !important;
    font-weight: 850;
    gap: 8px;
    line-height: 1.28 !important;
    margin: 0 0 10px;
    padding: 10px 11px;
    white-space: normal !important;
  }

  .report-player-table-wrap {
    border-radius: 12px;
    max-height: 62vh;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .report-sub-table table,
  .report-player-table {
    min-width: 860px !important;
  }

  .report-player-table th:first-child,
  .report-player-table td:first-child {
    min-width: 116px;
    width: 116px;
  }

  .report-player-table th:not(:first-child),
  .report-player-table td:not(:first-child) {
    min-width: 62px;
  }

  .report-player-table .table-sort-button {
    font-size: 0.62rem;
    gap: 3px;
    white-space: nowrap;
  }

  .report-player-table .table-sort-button span {
    display: none;
  }

  .team-trends-stat-grid .veo-stat-value,
  .team-trends-summary {
    display: none;
  }

  .team-trends-controls .segmented-control {
    background: #f1f0eb;
    border-radius: 999px;
    display: flex;
    gap: 4px;
    overflow: visible;
    padding: 4px;
  }

  .team-trends-controls .quiet-button {
    border-radius: 999px;
    flex: 1 0 70px;
    font-size: 0.74rem;
    line-height: 1.1;
    min-height: 38px;
    padding: 7px 8px;
  }

  .team-trends-stat-grid {
    gap: 7px;
    margin: 0 -14px 10px;
    padding: 3px 14px 8px;
  }

  .team-trends-stat-grid .veo-stat-card {
    border-radius: 999px;
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    padding: 9px 12px;
    width: max-content;
  }

  .team-trends-stat-grid .veo-stat-card.is-selected {
    box-shadow: 0 0 0 2px var(--parent-night);
  }

  .team-trends-stat-grid .veo-stat-title {
    font-size: 0.74rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .team-trends-chart-panel {
    border-radius: 18px;
    padding: 18px 14px 16px;
  }

  .team-trends-chart-panel .veo-chart-head {
    margin-bottom: 14px;
  }

  .team-trends-chart-panel .veo-chart-head > span {
    justify-self: start;
  }

  .team-trends-chart-panel .veo-chart {
    grid-template-columns: 34px minmax(0, 1fr);
    height: min(58vh, 440px);
    min-height: 350px;
  }

  .team-trends-chart-panel .veo-bars {
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-inline: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .team-trends-chart-panel .veo-bar-wrap {
    flex: 0 0 52px;
    min-width: 52px;
    scroll-snap-align: start;
  }

  .team-trends-chart-panel .veo-bar {
    background: #efeee9;
    border-radius: 7px 7px 3px 3px;
    padding: 8px 5px 0;
  }
}

@media (max-width: 860px) {
  .dashboard-recent-panel .panel-title p {
    display: none;
  }

  .dashboard-recent-layout {
    display: block;
  }

  .dashboard-recent-layout .dashboard-match-detail {
    display: none;
  }

  .dashboard-game-list {
    max-height: none;
    overflow: visible;
  }

  .match-row {
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 50px;
    padding: 8px;
  }

  .match-row .result-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    height: 30px;
    justify-content: center;
    min-width: 30px;
    padding: 0;
  }

  .match-row .score {
    align-self: center;
    border-radius: 999px;
    font-size: 0.86rem;
    grid-column: 3;
    grid-row: 1 / span 2;
    min-width: 52px;
    padding: 7px 8px;
  }

  .match-row strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.14;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .match-row .match-meta {
    font-size: 0.7rem;
  }

  .mobile-result-summary {
    align-items: center;
    gap: 10px;
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 10px;
  }

  .mobile-result-score {
    align-items: center;
    border-radius: 12px;
    display: grid;
    gap: 5px;
    justify-items: center;
    min-height: 64px;
    padding: 9px;
  }

  .mobile-result-score span {
    align-self: auto;
    font-size: 0.7rem;
    padding: 4px 7px;
  }

  .mobile-result-score strong {
    font-size: 1.75rem;
  }

  .mobile-result-summary h3 {
    font-size: 1.05rem;
  }

  .mobile-result-summary p {
    display: -webkit-box;
    font-size: 0.8rem;
    line-height: 1.28;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-result-summary .primary-button {
    grid-column: 2;
    justify-self: start;
    min-height: 34px;
    padding: 6px 12px;
    width: auto;
  }

  .results-layout > .panel {
    max-height: none;
    overflow: visible;
  }

  .result-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .result-row .result-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    grid-column: 1;
    grid-row: 1 / span 2;
    height: 30px;
    justify-content: center;
    min-width: 30px;
    order: -1;
    padding: 0;
  }

  .result-row > span:first-child {
    grid-column: 2;
  }

  .result-row > strong {
    align-self: center;
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .results-more-button {
    margin-top: 10px;
    width: 100%;
  }

  .report-header {
    padding: 12px;
  }

  .report-title span {
    font-size: 0.72rem;
  }

  .report-title strong {
    font-size: 1.08rem;
  }

  .report-score {
    display: none !important;
  }

  .report-panel > .coach-notes-block {
    margin: 0;
    max-height: 178px;
    overflow-y: auto;
    padding: 13px 14px;
  }

  .report-panel > .coach-notes-block h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .report-panel > .coach-notes-block p {
    font-size: 0.84rem;
    line-height: 1.38;
  }

  .report-awards {
    border-top: 0;
    margin: 0 -14px;
    padding: 0 14px 4px;
  }

  .report-award-item {
    align-items: center;
    border: 1px solid rgba(233, 85, 24, 0.18);
    border-left: 0;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
  }

  .report-award-item span {
    font-size: 0.62rem;
  }

  .report-award-item strong {
    font-size: 0.78rem;
  }

  .player-hub-trend-head {
    display: grid;
    gap: 10px;
  }

  .player-hub-trend-tabs,
  .player-hub-development-nav {
    display: flex;
    gap: 7px;
    margin: 0 -14px;
    overflow-x: auto;
    padding: 2px 14px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .player-hub-trend-tabs .quiet-button,
  .player-hub-development-nav .quiet-button {
    border-radius: 999px;
    flex: 0 0 auto;
    line-height: 1.1;
    min-height: 34px;
    padding: 6px 11px;
  }

  .player-hub-trend-tabs .quiet-button.is-selected,
  .player-hub-development-nav .quiet-button.is-selected {
    background: var(--parent-night);
    border-color: var(--parent-night);
    color: white;
  }

  .player-hub-development-grid.is-filtered {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-hub-game-column-head p {
    display: none;
  }

  .player-hub-game-list {
    gap: 7px;
  }

  .player-hub-game-card {
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 9px;
  }

  .player-hub-game-card p {
    display: -webkit-box;
    font-size: 0.78rem;
    line-height: 1.25;
    margin-bottom: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .player-hub-game-card .link-button {
    margin-top: 7px;
    min-height: 34px;
    padding: 6px 10px;
    width: max-content;
  }

  .report-top-players .report-ai-note {
    background: #f4f3ef;
    border: 1px solid rgba(30, 36, 29, 0.1);
    border-radius: 10px;
    color: var(--parent-muted);
    display: block;
    font-size: 0.76rem;
    font-weight: 850;
    line-height: 1.3;
    margin-bottom: 9px;
    padding: 9px 10px;
  }

  .trend-rotate-hint {
    margin: -2px 0 10px;
  }
}

@media (max-width: 860px) and (orientation: portrait) {
  .report-player-table-wrap,
  .player-hub-compact-wrap,
  .player-hub-trend-table-wrap {
    display: none;
  }

  .report-player-stats-copy .mobile-table-hint,
  .player-hub-table-key {
    margin-bottom: 0;
  }

  .player-hub-table-key {
    display: none;
  }
}
