/* The theme control is absolutely positioned; reserve space for the first tab. */
.tab-nav[data-theme-corner] {
  box-sizing: border-box;
  padding-inline-start: 104px;
}

/* PC2868's single trend chart must fill its card on wide screens too. */
#content-3 .stats-trend-box .chart-box {
  width: 100%;
}

@media (max-width: 640px) {
  .tab-nav[data-theme-corner] {
    padding-inline-start: 68px;
  }
  .tab-nav .tab-item {
    min-width: 0;
    gap: 2px;
    font-size: 12px;
  }
  .lottery-panel {
    height: auto;
    min-height: 90px;
    display: grid;
    grid-template-columns: 34% minmax(0, 66%);
    grid-template-rows: auto auto;
    gap: 4px 0;
  }
  .lottery-panel .box-left {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }
  .lottery-panel .box-center {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }
  .lottery-panel .box-right {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    padding: 0 0 7px;
  }
  #content-3 .nav-bar-stats {
    flex-direction: column;
    align-items: stretch;
  }
  #content-3 .stats-hero-copy,
  #content-3 .stats-hero-side {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
  #content-3 .date-query-box {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
  }
}
