/* Shared responsive guardrails for both themes. */
@media (max-width: 1024px) {
  .shell .corner-results { min-width: 0; max-width: 100%; }
  .shell .corner-table-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
  .shell .corner-table-scroll > table { min-width: 1200px; table-layout: fixed; }
  .shell .corner-results th { box-sizing: border-box; vertical-align: middle; }
  .shell .corner-results th:nth-child(1) { width: 70px; }
  .shell .corner-results th:nth-child(2) { width: 180px; }
  .shell .corner-results th:nth-child(3) { width: 120px; }
  .shell .corner-results th:nth-child(n+4):nth-child(-n+7) { width: 126px; }
  .shell .corner-results th:nth-child(8) { width: 300px; }
  .shell .corner-results th > button[data-finder-sort] { box-sizing: border-box; min-width: 0; width: 100%; padding: 4px; overflow-wrap: normal; word-break: normal; white-space: normal; line-height: 1.4; }
  .shell .corner-results th > button[data-finder-sort] > span { flex-shrink: 0; }
  html, body { max-width: 100%; }
  .shell { display: block !important; padding-left: 0 !important; }
  .shell .main { width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 14px !important; gap: 18px !important; }
  .shell .main :is(section,article,aside,header,div) { min-width: 0; }
  .shell .topbar { width: 100% !important; position: relative !important; height: auto !important; }
  .shell .topbar { max-width: 100% !important; inset: auto !important; }
  .shell .sidebar-toggle { display: none !important; }
  .shell .topbar-inner { padding: 12px !important; width: 100% !important; }
  .shell .topbar-inner { display: flex !important; flex-wrap: wrap !important; height: auto !important; }
  .shell .nav-actions { width: 100% !important; min-width: 0 !important; }
  .shell .nav-primary { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; gap: 6px !important; padding: 6px 0 10px !important; }
  .shell .nav-primary .nav-button { flex: 0 0 auto !important; width: auto !important; min-height: 42px; }
  .shell .nav-account { flex-wrap: wrap !important; gap: 8px !important; }
  .shell .main :is(.home-hero,.home-league-selector,.home-fixtures-workspace,.fixture-detail,.panel,.hero,.trend-dashboard-head) { padding: 14px !important; max-width: 100% !important; }
  .shell .main :is(h1,h2,h3,p,strong,small,label,button) { overflow-wrap: anywhere; }
  .shell .main h1 { font-size: 26px !important; line-height: 1.2 !important; }
  .shell .main h2 { font-size: 21px !important; line-height: 1.25 !important; }
  .shell .home-league-selector { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; }
  .shell .home-league-selector .chip { min-width: 0 !important; min-height: 42px; flex: 1 1 125px; padding: 8px !important; }
  .shell .section-banner { width: 100%; min-height: 220px !important; height: auto !important; flex-direction: column !important; align-items: stretch !important; gap: 14px; padding: 14px !important; }
  .shell .section-banner-copy p { font-size: 14px !important; line-height: 1.5; }
  .shell .section-banner-controls { flex-direction: row !important; flex-wrap: wrap; justify-content: space-between; align-items: center !important; gap: 10px; }
  .shell .section-banner-controls button[data-banner-view] { max-width: 100%; white-space: normal; }
  .shell .home-match-filter>summary { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 14px; padding: 12px !important; }
  .shell .home-filter-summary-actions { display: flex !important; flex-wrap: wrap !important; gap: 12px !important; width: 100%; }
  .shell .home-filter-scope { display: flex !important; flex-direction: column; align-items: stretch !important; width: 100%; gap: 6px; }
  .shell .home-filter-scope>div { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .shell .home-filter-size { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .shell :is(.home-filter-size,.home-filter-scope) button { min-height: 38px; white-space: normal; padding: 6px !important; }
  .shell .home-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
  .shell .home-filter-card { padding: 12px !important; grid-column: auto !important; }
  .shell .home-filter-card header { min-height: 32px; }
  .shell .home-filter-card .home-filter-line-row button { min-height: 38px !important; font-size: 12px !important; white-space: normal !important; }
  .shell .home-filter-footer { display: flex; flex-wrap: wrap; gap: 12px; }
  .shell .home-filter-method { text-align: left !important; line-height: 1.5; }
  .shell .matches-grid { grid-template-columns: minmax(0,1fr) !important; }
  .shell .analysis-match-heading { grid-template-columns: minmax(0,1fr) !important; }
  .shell .analysis-match-crests { min-width: 0 !important; width: fit-content; }
  .shell .analysis-match-heading h2 { line-height: 1.3 !important; }
  .shell :is(.lab-layout,.radar-layout,.allstats-layout,.trend-layout,.daily-pick-card,.card-market-grid,.metric-grid,.cards-controls,.corners-controls,.streaks-filters,.trend-charts-grid) { grid-template-columns: minmax(0,1fr) !important; }
  .shell :is(.daily-pick-teams,.daily-rank-line,.card-model-match,.section-head) { flex-wrap: wrap; gap: 12px; }
  .shell .daily-pick-teams strong { white-space: normal !important; text-overflow: clip !important; overflow: visible !important; font-size: 14px !important; }
  .shell .daily-pick-match { border-right: 0 !important; }
  .shell .daily-market { grid-template-columns: 30px minmax(0,1fr) !important; }
  .shell .daily-market h3 { font-size: 19px !important; padding: 10px !important; }
  .shell .analysis-breakdown { display: grid !important; grid-template-columns: minmax(0,1fr) !important; gap: 10px; }
  .shell .streak-card-grid { grid-template-columns: minmax(0,1fr) !important; }
  .shell .streak-run-head { display: none !important; }
  .shell .streak-run-match { display: grid !important; grid-template-columns: 28px minmax(0,1fr) auto !important; gap: 8px !important; }
  .shell .streak-run-index { grid-column: 1; grid-row: 1 / 3; }
  .shell .streak-run-date { grid-column: 2; grid-row: 1; }
  .shell .streak-run-fixture { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; white-space: normal !important; }
  .shell .streak-result-badge { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .shell .streak-venue-action-row { grid-template-columns: minmax(0,1fr) !important; gap: 12px; }
  .shell .corners-venue-control { width: 100% !important; padding: 10px !important; }
  .shell .corners-venue-control>div { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 4px; padding: 4px !important; }
  .shell .corners-venue-control button { width: 100%; min-width: 0 !important; padding: 8px 2px !important; white-space: nowrap !important; overflow-wrap: normal !important; font-size: 12px !important; }
  .shell .nav-account .chip { min-width: 66px; }
  .shell :is(.table-wrap,.radar-table,.data-table-wrap) { width: 100% !important; max-width: 100% !important; min-width: 0 !important; overflow-x: auto !important; }
  .shell .table-toolbar { display: flex; flex-wrap: wrap; gap: 8px; height: auto !important; }
  .shell .stat-value { font-size: 24px !important; }
  .shell :is(input,select,textarea) { max-width: 100%; font-size: 16px !important; }
  .shell .analysis-meter-head>strong { flex-shrink: 0; font-size: 28px !important; }
  .shell .distribution-lines>div { grid-template-columns: 72px minmax(0,1fr) 54px; }
  .shell .distribution-lines span { white-space: normal; font-size: 11px; }
  .shell .h2h-duel-feature .team-crest { width: 72px !important; height: 72px !important; }
  .seo-footer { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px; }
}
@media(max-width:480px) {
  .shell .home-filter-grid { grid-template-columns: minmax(0,1fr) !important; }
  .shell .main { padding: 10px !important; }
  .shell .main :is(.home-fixtures-workspace,.fixture-detail,.panel) { padding: 10px !important; }
}

@media (max-width: 1024px) {
  .shell .poisson-probability-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .shell .poisson-preview { min-width: 0; margin: 10px; padding: 12px; max-width: calc(100% - 20px); }
  .shell .poisson-row { font-size: 14px; padding: 12px 6px; }
  .shell .poisson-column-head { font-size: 12px; }
  .shell .poisson-probabilities h4 { font-size: 16px; }
  .shell .corner-chart-toggles { display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; }
  .shell .corner-chart-toggles label { min-height: 44px; padding: 6px 0; font-size: 13px; }
  .shell .corner-chart-toggles input { flex: 0 0 20px; width: 20px; height: 20px; }
  .shell .corner-chart-toggles span { min-width: 0; overflow-wrap: anywhere; }
  .shell .corner-history-chart svg { height: 180px; aspect-ratio: auto; }
}
