body {
  padding-bottom: 4rem;
  overflow: hidden;
  background: #f6f0dc;
}

a,
a:visited {
  color: #245c3a !important;
  text-decoration: none;
}

#refresh {
  background-color: darkgreen;
  color: #e9dfbf;
}

#leaderboard-head * {
  text-align: center;
}

/* 排行榜需要比 Tocas UI 的預設容器更寬。 */
.page-container {
  display: flex;
  flex-direction: column;
  width: min(1500px, calc(100% - 2rem));
  height: calc(100vh - 4rem);
  max-width: none;
  padding-block: 2.5rem 3.5rem;
  overflow: hidden;
}

.page-container > .ts-box {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.table-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.ts-table {
  min-width: 1100px;
}

.ts-table thead {
  position: sticky;
  z-index: 5;
  top: 0;
  background: #ffffff;
}

.ts-table thead th {
  background: inherit;
}

.ts-table td {
  max-width: 230px;
  overflow-wrap: anywhere;
}

.replay-content {
  max-height: min(60vh, 520px);
  overflow: auto;
}

#replay-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Footer 需獨立於頁面內容固定在視窗底部。 */
.ts-content.page-footer {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  background: #e9dfbf;
}

@media (max-width: 680px) {
  .page-container {
    width: calc(100% - 1rem);
    padding-block: 1.5rem 2.25rem;
  }

  .ts-modal {
    --width: calc(100vw - 1rem);
  }
}
