/*
 * Desktop compatibility for the lottery H5 pages.
 *
 * The upstream pages are designed on a 375px mobile canvas with
 * 1rem = viewport / 7.5. Without a cap that makes every element grow
 * with the desktop viewport, which is why the pages looked broken.
 * Keep the same mobile layout, but center it in a 480px shell and
 * stop the rem scale at 64px (480 / 7.5).
 */

@media (min-width: 480px) {
  html {
    font-size: 64px;
  }
}

html,
body {
  overflow-x: hidden;
}

body {
  background: #eef1f5;
}

.corpus-wrap,
.consultation-table-wrap,
.stats-app,
.toolbox-warp1,
.toolbox-tool-wrap {
  width: 100%;
  max-width: 480px;
  margin-right: auto;
  margin-left: auto;
}

.corpus-wrap {
  background: #fff;
}

.consultation-table-wrap,
.stats-app {
  background: #f3f3f3;
}

.toolbox-warp1,
.toolbox-tool-wrap {
  background: #f8f8f8;
}

@media (min-width: 520px) {
  .corpus-wrap,
  .consultation-table-wrap,
  .stats-app,
  .toolbox-warp1,
  .toolbox-tool-wrap {
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
  }
}

/* Fixed bars must stay inside the centered shell. */
.consultation-head,
.stats-head,
.stats-tabbar,
.consultation-table-wrap .picker,
.toolbox-tool-head,
.mint-header.is-fixed,
.mint-tabbar.is-fixed {
  width: 100%;
  max-width: 480px;
}

.consultation-table-wrap .sel-type .sel-type-body,
.consultation-table-wrap .sel-type .btn-wrap {
  max-width: 480px;
  margin-right: auto;
  margin-left: auto;
}

.stats-tabbar {
  left: 50%;
  transform: translateX(-50%);
}

.more-panel {
  max-width: calc(480px - 0.48rem);
}

.year-sheet {
  max-width: 480px;
}

.stats-dialog,
.consultation-table-wrap .help-body {
  max-width: calc(100vw - 0.6rem);
}

@media (min-width: 480px) {
  .silkbag-year {
    right: calc(50% - 240px);
  }

  .mint-actionsheet {
    max-width: 480px;
  }
}
