/* ==========================================================================
   Playtime Panorama — 本地版
   设计方向：把游戏时长当作展品。暖调近黑作墙，衬线中文标题作展签，
   唯一的彩色来自封面本身。结构线只用来分区，不做装饰。
   ========================================================================== */

:root {
  --ink: #141110;
  --ink-deep: #0c0a09;
  --ink-raised: #1b1715;
  --bone: #f0e9df;
  --bone-dim: rgba(240, 233, 223, 0.66);
  --ash: #a2968a;
  --hair: rgba(240, 233, 223, 0.14);
  --hair-strong: rgba(240, 233, 223, 0.3);
  --hot: #d96a43;
  --cool: #7fb3a8;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --bar-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 90% at 8% -10%, rgba(217, 106, 67, 0.09), transparent 55%),
    radial-gradient(90% 70% at 100% 0%, rgba(127, 179, 168, 0.06), transparent 60%),
    var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--bone);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}

img {
  border: 0;
}

/* ---------------------------------------------------------------- typography */

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: 0.012em;
}

.lede {
  margin: 0;
  max-width: min(34rem, 100%);
  font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  color: var(--bone-dim);
  text-wrap: pretty;
}

.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ash);
}

.num {
  font-variant-numeric: tabular-nums;
}

.mono-num {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- chrome */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--hair);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.wordmark::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--bone);
  box-shadow: 9px 0 0 -3px var(--bone-dim), 0 9px 0 -3px var(--bone-dim);
  margin-right: 3px;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  font-size: 0.875rem;
  color: var(--ash);
}

.masthead nav a:hover {
  color: var(--bone);
}

.masthead nav a[aria-current="page"] {
  color: var(--bone);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  --btn-bg: transparent;
  --btn-border: var(--hair-strong);
  --btn-color: var(--bone);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--btn-border);
  border-radius: 2px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.btn:hover {
  --btn-border: var(--bone);
  background: rgba(240, 233, 223, 0.06);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  --btn-border: var(--hair);
}

.btn:disabled:hover {
  background: transparent;
}

.btn--primary {
  --btn-bg: var(--bone);
  --btn-border: var(--bone);
  --btn-color: var(--ink);
}

.btn--primary:hover {
  --btn-bg: #fff;
  --btn-border: #fff;
  --btn-color: var(--ink);
}

.btn--icon {
  width: 42px;
  padding: 0;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn--busy {
  pointer-events: none;
}

.btn--busy svg {
  animation: spin 0.9s linear infinite;
}

/* ---------------------------------------------------------------- form */

.search {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.field {
  flex: 1 1 260px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > label {
  font-size: 0.8125rem;
  color: var(--ash);
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color 160ms var(--ease);
}

.field input::placeholder {
  color: rgba(162, 150, 138, 0.5);
}

.field input:hover {
  border-bottom-color: rgba(240, 233, 223, 0.45);
}

.field input:focus {
  outline: none;
  border-bottom-color: var(--bone);
}

.field input:focus-visible {
  outline: none;
}

.hint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: var(--ash);
}

.hint-row a {
  color: var(--bone-dim);
  border-bottom: 1px solid var(--hair-strong);
  padding-bottom: 1px;
}

.hint-row a:hover {
  color: var(--bone);
  border-bottom-color: var(--bone);
}

/* api key disclosure */
.keybox {
  border-top: 1px solid var(--hair);
  margin-top: 16px;
}

.keybox summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.875rem;
  color: var(--bone-dim);
  cursor: pointer;
  list-style: none;
  transition: color 160ms var(--ease);
}

.keybox summary::-webkit-details-marker {
  display: none;
}

.keybox summary:hover {
  color: var(--bone);
}

.keybox summary::after {
  content: "+";
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ash);
  line-height: 1;
}

.keybox[open] summary::after {
  content: "−";
}

.keybox .keybody {
  display: grid;
  gap: 12px;
  padding: 2px 0 20px;
}

.keybox p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ash);
  max-width: 46ch;
  line-height: 1.65;
}

.keybox a {
  color: var(--bone-dim);
  border-bottom: 1px solid var(--hair-strong);
}

.keybox a:hover {
  color: var(--bone);
}

/* ---------------------------------------------------------------- privacy steps */

.steps-block {
  margin-top: 18px;
  border-top: 1px solid var(--hair);
  padding-top: 12px;
}

.steps-title {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bone);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ash);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--serif);
  font-size: 0.8125rem;
  color: var(--bone-dim);
  padding-top: 1px;
}

.steps strong {
  color: var(--bone);
  font-weight: 500;
}

/* ---------------------------------------------------------------- home layout */

body.home {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.home-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  flex: 1 1 auto;
  min-height: 0;
}

.pitch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 1.8vw, 22px);
  padding: clamp(24px, 4vw, 48px) var(--gutter);
  min-width: 0;
}

.pitch .display {
  max-width: 14ch;
}

.preview {
  position: relative;
  min-height: 420px;
  border-left: 1px solid var(--hair);
  overflow: hidden;
  background: var(--ink-deep);
}

.preview .wall {
  position: absolute;
  inset: 0;
}

/* the wall emerges out of the mat */
.preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(20, 17, 16, 0) 26%),
    linear-gradient(0deg, var(--ink) 0%, rgba(20, 17, 16, 0.78) 9%, rgba(20, 17, 16, 0) 30%),
    linear-gradient(180deg, rgba(20, 17, 16, 0.55) 0%, rgba(20, 17, 16, 0) 14%);
}

.preview-caption {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--bone-dim);
  pointer-events: none;
}

.preview-caption .num {
  font-family: var(--serif);
  font-size: 0.9375rem;
  color: var(--bone);
  letter-spacing: 0.02em;
}

.page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px var(--gutter) 22px;
  border-top: 1px solid var(--hair);
  font-size: 0.8125rem;
  color: var(--ash);
}

.page-foot a {
  color: var(--bone-dim);
}

.page-foot a:hover {
  color: var(--bone);
}

/* ---------------------------------------------------------------- wall */

.wall {
  --columns: 12;
  --row: 40px;
  --gap: 3px;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  grid-auto-rows: var(--row);
  grid-auto-flow: dense;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  background: var(--ink);
  font-size: 0;
}

.wall--bare {
  gap: 0;
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: hsl(var(--h, 30) 15% 9%);
  outline-offset: -2px;
  animation: tile-in 520ms var(--ease) backwards;
  animation-delay: var(--d, 0ms);
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 380ms var(--ease), opacity 300ms var(--ease);
}

.tile img.is-loaded {
  opacity: 1;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--bone);
  transition: border-width 120ms var(--ease);
  pointer-events: none;
}

.wall[data-hover] .tile {
  opacity: 0.42;
  transition: opacity 160ms var(--ease);
}

.wall[data-hover] .tile[data-active] {
  opacity: 1;
}

.wall[data-hover] .tile[data-active]::after {
  border-width: 1px;
}

.tile:hover img,
.tile[data-active] img {
  transform: scale(1.035);
}

.tile.is-missing {
  background:
    repeating-linear-gradient(135deg, rgba(240, 233, 223, 0.05) 0 1px, transparent 1px 9px),
    var(--ink-deep);
}

.tile.is-missing img {
  display: none;
}

.tile.is-missing::before {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  font-family: var(--serif);
  font-size: clamp(11px, 1.4vw, 20px);
  color: var(--ash);
  overflow: hidden;
  text-align: center;
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: scale(0.955);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------- profile bar */

.profile-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  height: var(--bar-h);
  padding: 0 clamp(12px, 2.4vw, 22px);
  background: rgba(20, 17, 16, 0.92);
  border-bottom: 1px solid var(--hair);
  backdrop-filter: blur(14px) saturate(1.2);
}

.profile-bar .back {
  flex: none;
}

.who {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.who h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.96rem + 0.5vw, 1.3125rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42ch;
}

.who .meta {
  font-size: 0.8125rem;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who .meta b {
  font-weight: 500;
  color: var(--bone-dim);
  font-variant-numeric: tabular-nums;
}

.profile-bar .spacer {
  flex: 1 1 auto;
}

.profile-bar .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--hair-strong);
  border-radius: 2px;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
}

/* ---------------------------------------------------------------- placard */

.placard {
  position: fixed;
  left: clamp(14px, 2.4vw, 26px);
  bottom: clamp(14px, 2.4vw, 26px);
  z-index: 30;
  width: min(380px, calc(100vw - 28px));
  padding: 14px 18px 16px;
  border: 1px solid var(--hair-strong);
  border-radius: 3px;
  background: rgba(14, 12, 11, 0.94);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px) saturate(1.1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  pointer-events: none;
}

.placard[data-open] {
  opacity: 1;
  transform: none;
}

.placard .name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.015em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.placard .stats {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 5px;
  font-size: 0.8125rem;
  color: var(--ash);
  font-variant-numeric: tabular-nums;
}

.placard .stats .hours {
  font-family: var(--serif);
  font-size: 0.9375rem;
  color: var(--bone);
}

.placard .bar {
  position: relative;
  height: 2px;
  margin-top: 12px;
  background: rgba(240, 233, 223, 0.12);
  overflow: hidden;
}

.placard .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--cool), var(--hot));
  transition: width 200ms var(--ease);
}

.placard .recent {
  margin-left: auto;
  color: var(--bone-dim);
  font-size: 0.75rem;
}

/* ---------------------------------------------------------------- states */

.state {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 32rem;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(40px, 8vw, 96px);
}

.state h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.state p {
  margin: 0;
  color: var(--bone-dim);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.state .hint {
  color: var(--ash);
  font-size: 0.8438rem;
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.state--center {
  justify-items: center;
  text-align: center;
  max-width: none;
  margin: 0 auto;
  padding-block: clamp(56px, 12vh, 140px);
}

.state--center p {
  max-width: 44ch;
}

/* skeleton before data arrives */
.skeleton-wall {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  grid-auto-rows: 26px;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 3px;
}

.skeleton-wall i {
  background: linear-gradient(100deg, rgba(240, 233, 223, 0.04), rgba(240, 233, 223, 0.09), rgba(240, 233, 223, 0.04));
  background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite;
  grid-column: span var(--c, 2);
  grid-row: span var(--c, 2);
}

@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -60% 0;
  }
}

/* ---------------------------------------------------------------- leaderboard */

.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 56px) var(--gutter) 22px;
}

.board-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.board-head p {
  margin: 8px 0 0;
  color: var(--ash);
  font-size: 0.875rem;
  max-width: 34rem;
  text-wrap: pretty;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 56px);
  margin: 0;
  padding: 0 var(--gutter) 26px;
  border-bottom: 1px solid var(--hair);
}

.summary div {
  display: grid;
  gap: 2px;
}

.summary dt {
  font-size: 0.75rem;
  color: var(--ash);
}

.summary dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.375rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.sort-tabs {
  display: flex;
  gap: 18px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--hair);
  font-size: 0.875rem;
  color: var(--ash);
  overflow-x: auto;
}

.sort-tabs a {
  position: relative;
  padding: 13px 0 12px;
  white-space: nowrap;
}

.sort-tabs a:hover {
  color: var(--bone-dim);
}

.sort-tabs a[aria-current="true"] {
  color: var(--bone);
}

.sort-tabs a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--bone);
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.board-table th {
  padding: 12px 24px 10px 0;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ash);
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}

.board-table th:first-child,
.board-table td:first-child {
  padding-left: var(--gutter);
  width: 64px;
}

.board-table th:last-child,
.board-table td:last-child {
  padding-right: var(--gutter);
}

.board-table td {
  padding: 14px 24px 14px 0;
  border-bottom: 1px solid var(--hair);
  vertical-align: baseline;
}

.board-table tbody tr {
  transition: background 140ms var(--ease);
}

.board-table tbody tr:hover {
  background: rgba(240, 233, 223, 0.035);
}

.board-table .rank {
  font-family: var(--serif);
  color: var(--ash);
  font-variant-numeric: tabular-nums;
}

.board-table tbody tr:nth-child(-n + 3) .rank {
  color: var(--bone);
}

.board-table .player {
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: 0.015em;
}

.board-table .player small {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ash);
  letter-spacing: 0;
}

.board-table .figure {
  font-variant-numeric: tabular-nums;
  color: var(--bone-dim);
  white-space: nowrap;
}

/* 数字列靠右，名字列留白 */
.board-table th:nth-child(3),
.board-table td:nth-child(3),
.board-table th:nth-child(4),
.board-table td:nth-child(4),
.board-table th:nth-child(5),
.board-table td:nth-child(5) {
  text-align: right;
}

.board-table th:nth-child(4),
.board-table td:nth-child(4) {
  padding-right: 24px;
}

.board-table .figure b {
  font-weight: 500;
  color: var(--bone);
}

.board-table .top-game {
  color: var(--ash);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 26ch;
}

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  transform: translate(-50%, 8px);
  padding: 10px 16px;
  border: 1px solid var(--hair-strong);
  border-radius: 2px;
  background: rgba(14, 12, 11, 0.96);
  color: var(--bone);
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.toast[data-open] {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------------------------------------- footer */

.site-foot {
  padding: 22px var(--gutter) 26px;
  border-top: 1px solid var(--hair);
  font-size: 0.8125rem;
  color: var(--ash);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.site-foot a:hover {
  color: var(--bone);
}

/* ---------------------------------------------------------------- poster */

.poster {
  position: relative;
}

.wall--poster {
  min-height: calc(100svh - var(--bar-h));
  align-content: start;
}

.skeleton {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 3px;
  background: var(--ink);
}

.skeleton-wall {
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------- list view */

#list-view {
  padding-top: clamp(24px, 4vw, 44px);
  border-top: 1px solid var(--hair);
  background: var(--ink);
  scroll-margin-top: calc(var(--bar-h) + 6px);
}

#list-view .board-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

#list-view .board-table th:nth-child(3),
#list-view .board-table td:nth-child(3) {
  width: 150px;
}

#list-view .board-table th:nth-child(4),
#list-view .board-table td:nth-child(4) {
  width: 120px;
}

#list-view .board-table th:nth-child(5),
#list-view .board-table td:nth-child(5) {
  width: 120px;
}

.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 0 var(--gutter) 14px;
}

.list-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.list-head p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ash);
}

#list-view .board-table .player {
  font-size: 1rem;
}

#list-view .board-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------------------------------------------------------------- responsive */

/* 矮屏笔记本上也要一屏放得下，别让左边比右边高出一截 */
@media (min-width: 981px) and (max-height: 880px) {
  .pitch {
    gap: 12px;
    padding-block: 22px;
  }

  .pitch .display {
    font-size: clamp(2.05rem, 1.2rem + 2.1vw, 2.9rem);
  }

  .lede {
    font-size: 1rem;
  }

  .keybox {
    margin-top: 12px;
  }

  .keybox summary {
    padding: 10px 0;
  }

  .steps-block {
    margin-top: 12px;
    padding-top: 10px;
  }

  .steps li {
    padding: 6px 0;
  }
}

@media (max-width: 980px) {
  .home-main {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .pitch {
    padding-top: clamp(30px, 6vw, 56px);
    padding-bottom: clamp(26px, 5vw, 44px);
  }

  .pitch .display {
    max-width: 18ch;
  }

  .preview {
    order: 2;
    border-left: 0;
    border-top: 1px solid var(--hair);
    min-height: 0;
    height: 52svh;
  }

  .preview::after {
    background:
      linear-gradient(180deg, rgba(20, 17, 16, 0.9) 0%, rgba(20, 17, 16, 0) 16%),
      linear-gradient(0deg, var(--ink) 0%, rgba(20, 17, 16, 0) 24%);
  }

  .skeleton-wall {
    grid-template-columns: repeat(9, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --bar-h: 58px;
    --gutter: 18px;
  }

  .search {
    flex-direction: column;
    align-items: stretch;
  }

  .search .field {
    flex: 0 0 auto;
  }

  .search .btn {
    width: 100%;
  }

  .who .meta {
    display: none;
  }

  .profile-bar .btn__text {
    display: none;
  }

  .profile-bar #download {
    width: 42px;
    padding: 0;
  }

  .board-table th:nth-child(3),
  .board-table td:nth-child(3),
  .board-table th:nth-child(5),
  .board-table td:nth-child(5),
  .board-table th:nth-child(6),
  .board-table td:nth-child(6) {
    display: none;
  }

  .summary {
    gap: 18px 28px;
  }

  .placard {
    left: 10px;
    right: 10px;
    width: auto;
  }
}

@media (hover: none) {
  .wall[data-hover] .tile {
    opacity: 1;
  }

  .placard {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .tile {
    animation: none;
  }
}

/* print: the wall is the deliverable */
@media print {
  .profile-bar,
  .masthead,
  .placard,
  .toast,
  .site-foot {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .wall {
    --gap: 1px;
  }
}
