:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --panel: #fffefa;
  --ink: #242a27;
  --muted: #5e665e;
  --line: #dcded3;
  --accent: #99432d;
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
:focus-visible {
  outline: 3px solid #398379;
  outline-offset: 3px;
}
.wrap {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}
.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 2;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.site-header {
  border-bottom: 1px solid var(--line);
}
.nav,
.nav-links,
.intro,
.panel-head,
.toolbar,
.foot,
.pages {
  display: flex;
  align-items: center;
}
.nav {
  justify-content: space-between;
  min-height: 62px;
  gap: 16px;
}
.brand {
  font: 700 21px/1.4 var(--serif);
  letter-spacing: 0.06em;
}
.nav-links {
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}
.nav-links [aria-current] {
  color: var(--accent);
  font-weight: 700;
}
.intro {
  justify-content: space-between;
  gap: 24px;
  padding-block: 42px 26px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font: 800 clamp(36px, 4.7vw, 64px)/1.16 var(--serif);
  letter-spacing: -0.035em;
}
.intro p {
  margin-top: 12px;
  color: var(--muted);
}
.refresh,
.pages button {
  border: 1px solid #cdd1c6;
  border-radius: 5px;
  background: var(--panel);
}
.refresh {
  padding: 7px 15px;
  white-space: nowrap;
  font-size: 14px;
}
.refresh [aria-hidden] {
  font: 22px/1 sans-serif;
  vertical-align: -2px;
  margin-right: 3px;
}
.refresh:hover,
.pages button:hover:enabled {
  border-color: var(--muted);
}
.leaders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 32px;
}
.leader {
  min-width: 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #314e46;
  color: #fff;
}
.leader[data-leader='sellers'] {
  background: #374c60;
}
.leader[data-leader='players'] {
  background: #493f50;
}
.leader:hover {
  box-shadow: inset 0 0 0 2px #ffffff70;
}
.leader-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.leader-label {
  font-size: 12px;
  font-weight: 600;
  color: #f0f2e7;
}
.leader strong {
  font-size: clamp(16px, 1.65vw, 22px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.leader-art {
  flex: 0 0 auto;
}
.leader-art img {
  display: block;
  width: clamp(70px, 8vw, 115px);
  height: auto;
  border-radius: 4px;
}
[data-leader='apple'] .leader-art img {
  width: 58px;
  height: 58px;
  border-radius: 13px;
}
#ranking {
  scroll-margin-top: 12px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 5px;
  padding: 0 0 0 1px;
  border-bottom: 1px solid #c8cdbf;
}
.tabs button {
  flex: 0 1 auto;
  padding: 10px 18px 12px;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  font-weight: 600;
  color: var(--muted);
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button[aria-selected='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
#panel {
  background: var(--panel);
  padding: 26px 28px 16px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
}
.panel-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
h2 {
  font: 700 clamp(21px, 2.3vw, 30px)/1.35 var(--serif);
}
#metric,
.source-info,
#count {
  font-size: 13px;
  color: var(--muted);
}
#metric {
  margin-top: 5px;
}
.source-info {
  text-align: right;
  white-space: nowrap;
  line-height: 1.8;
}
.source-info a {
  color: var(--accent);
}
.source-info a + a {
  margin-left: 15px;
}
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  font-size: 14px;
}
.filters button,
.filters select {
  min-height: 36px;
  border: 1px solid #cdd1c6;
  border-radius: 5px;
  padding: 4px 10px;
  background: var(--panel);
}
.filters button[aria-pressed='true'] {
  color: #fff;
  border-color: #314e46;
  background: #314e46;
}
.filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.toolbar {
  gap: 14px;
  padding: 18px 0 13px;
  flex-wrap: wrap;
}
.search {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(290px, 100%);
  border: 1px solid #cdd1c6;
  border-radius: 5px;
  padding-inline: 13px;
  background: white;
}
.search:focus-within {
  outline: 2px solid #398379;
}
.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 0;
  outline: 0;
}
.magnifier {
  width: 13px;
  height: 13px;
  position: relative;
  border: 1.6px solid var(--muted);
  border-radius: 50%;
  flex: none;
}
.magnifier::after {
  content: '';
  width: 6px;
  height: 1.6px;
  background: var(--muted);
  position: absolute;
  top: 10px;
  left: 9px;
  transform: rotate(45deg);
}
#count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.notice {
  padding: 8px 12px;
  font-size: 13px;
  color: #785020;
  background: #fcf1d9;
  margin-bottom: 8px;
}
.table-wrap {
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
th {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  color: var(--muted);
  background: #f1f2eb;
}
th,
td {
  text-align: left;
}
td {
  padding: 9px 12px;
  border-bottom: 1px solid #ebece4;
  overflow-wrap: anywhere;
}
th:first-child {
  width: 68px;
}
.rank {
  color: var(--muted);
  font:
    600 15px/1.2 ui-monospace,
    Consolas,
    monospace;
}
.rank.top {
  color: var(--accent);
}
.game {
  display: flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  max-width: 100%;
  font-weight: 600;
  line-height: 1.4;
}
.thumb {
  display: block;
  flex: none;
  width: 76px;
  aspect-ratio: 231/87;
  background: #ebeee7;
  border-radius: 3px;
  overflow: hidden;
}
[data-table='apple'] .thumb {
  width: 37px;
  aspect-ratio: 1;
  border-radius: 8px;
}
.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.game .thumb:empty {
  display: none;
}
[data-table='metacritic'] .thumb {
  width: 34px;
  aspect-ratio: 3/4;
}
.release-label {
  width: 24%;
  color: var(--muted);
  font-size: 13px;
}
[data-table='calendar'] th:first-child {
  width: 20%;
}
.release-day {
  color: #314e46;
  font-weight: 600;
}
.score {
  display: inline-block;
  min-width: 2.4em;
  padding: 2px 6px;
  text-align: center;
  border-radius: 4px;
  background: #e4efdf;
  color: #2d5534;
  font-weight: 700;
}
.artist {
  width: 33%;
  color: var(--muted);
  font-size: 13px;
}
.num {
  width: 14%;
  text-align: right;
}
td.num {
  font-family: Arial, var(--sans);
}
.positive {
  color: #246447;
}
.negative {
  color: #98472c;
}
.fresh {
  color: #76551f;
  font-size: 0.88em;
}
tbody tr:hover {
  background: #f7f7f0;
}
.empty {
  padding: 38px 14px;
  color: var(--muted);
  text-align: center;
}
.pages {
  justify-content: flex-end;
  gap: 6px;
  margin-top: 16px;
}
.pages button {
  min-width: 34px;
  min-height: 34px;
  font-size: 13px;
}
.pages button[aria-current] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.foot {
  justify-content: space-between;
  gap: 12px;
  padding-block: 24px 36px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .nav-links {
    gap: 13px;
  }
  .intro {
    padding-block: 26px 19px;
  }
  .leaders {
    gap: 8px;
    margin-bottom: 22px;
  }
  .leader {
    padding: 12px;
    min-height: 80px;
  }
  .leader-art {
    display: none;
  }
  #panel {
    padding: 18px 14px 12px;
  }
  .panel-head {
    flex-wrap: wrap;
    gap: 7px;
  }
  .source-info {
    text-align: left;
    white-space: normal;
  }
  .tabs button {
    padding-inline: 10px;
  }
  .thumb {
    width: 54px;
  }
  th,
  td {
    padding-inline: 7px;
  }
  th:first-child {
    width: 43px;
  }
  .num {
    width: 18%;
  }
  .game {
    gap: 8px;
  }
}
@media (max-width: 520px) {
  .wrap {
    width: calc(100% - 24px);
  }
  .nav {
    min-height: 49px;
  }
  .brand {
    font-size: 18px;
  }
  .nav-links {
    font-size: 12px;
    gap: 10px;
  }
  .intro {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 9px;
  }
  .intro p {
    font-size: 13px;
  }
  .refresh {
    padding: 5px 8px;
    font-size: 12px;
  }
  .leaders {
    gap: 5px;
  }
  .leader {
    padding: 9px;
    min-height: 75px;
  }
  .leader-label {
    font-size: 11px;
  }
  .leader-label span {
    display: block;
  }
  .leader strong {
    font-size: 14px;
  }
  .tabs button {
    flex: 1;
    padding: 8px 3px;
    font-size: 12px;
  }
  #panel {
    padding-inline: 9px;
  }
  .toolbar {
    padding-top: 12px;
    gap: 8px;
  }
  .search {
    width: auto;
    flex: 1 0 55%;
  }
  .search input {
    font-size: 14px;
  }
  #count {
    font-size: 12px;
  }
  th,
  td {
    padding-inline: 4px;
  }
  th {
    font-size: 11px;
  }
  td {
    font-size: 13px;
  }
  th:first-child {
    width: 32px;
  }
  .num {
    width: 21%;
  }
  .artist {
    width: 30%;
    font-size: 11px;
  }
  .release-label,
  [data-table='calendar'] th:first-child {
    width: 28%;
  }
  [data-table='metacritic'] th:last-child {
    width: 25%;
  }
  .filters {
    gap: 7px 10px;
    font-size: 13px;
  }
  .thumb {
    display: none;
  }
  [data-table='apple'] .thumb {
    display: block;
    width: 28px;
  }
  .foot {
    flex-wrap: wrap;
  }
}
