.rank-index-page { padding-top: clamp(44px, 8vh, 92px); }
.rank-index-page h1 { margin-bottom: 26px; }
.rank-topic-list { border-top: 1px solid var(--line); }
.rank-topic {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.rank-topic strong { font-size: 1.05rem; font-weight: 400; }
.rank-topic > span:first-child { color: var(--muted); font-size: .85rem; }
.rank-topic > span:last-child { font-size: 1.05rem; }
.rank-topic:hover strong { text-decoration: underline; text-underline-offset: .3em; }
.rank-topic-soon { color: #9b9b9b; }
.rank-topic-soon small { font-size: .78rem; }

.rank-board-page { width: min(calc(100% - 40px), 1120px); padding-top: clamp(34px, 7vh, 76px); }
.rank-top-nav { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 58px; color: var(--muted); font-size: .95rem; }
.rank-header { margin-bottom: 34px; }
.rank-header h1 { margin-bottom: 5px; font-size: clamp(1.7rem, 4vw, 2.15rem); }
.rank-header p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.rank-board {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #111;
  border-radius: 10px;
  background: #d1d3d6;
}
.rank-lane {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  min-height: 122px;
  border: 0;
  border-bottom: 1px solid #111;
  background: #d1d3d6;
}
.rank-lane:last-child { border-bottom: 0; }
.rank-lane-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-right: 1px solid #111;
  background: #fff;
  font-family: "Latin Modern Roman", "Fandol Hei", "Fandol Song", serif;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.rank-lane:nth-child(1) .rank-lane-label { background: #ff1f25; }
.rank-lane:nth-child(2) .rank-lane-label { background: #ffb347; }
.rank-lane:nth-child(3) .rank-lane-label { background: #fff500; }
.rank-lane:nth-child(4) .rank-lane-label { background: #fff0c7; }
.rank-lane:nth-child(5) .rank-lane-label { background: #fff; }
.rank-lane-items {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  min-height: 120px;
  padding: 16px;
  background: #d1d3d6;
}
.rank-item { display: flex; flex-direction: column; align-items: flex-start; max-width: 208px; }
.rank-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  min-height: 52px;
  padding: 8px 16px;
  border: 1px solid #555;
  border-radius: 2px;
  background: #f8f8f7;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
}
.rank-card:hover { border-color: #333; }
.rank-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.rank-card:active { cursor: grabbing; }
.rank-last-edit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 3px;
  max-width: 208px;
  margin-top: 5px;
  color: #60646a;
  font-size: .68rem;
  line-height: 1.45;
}
.rank-last-edit img { width: 14px; height: 14px; margin-inline: 1px; border-radius: 50%; object-fit: cover; }
.rank-last-edit time { font-variant-numeric: tabular-nums; }
.rank-status { min-height: 1.6em; margin: 15px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.rank-status.is-error { color: #9b2424; }
.rank-disclaimer { margin: 24px 0 0; color: #888; font-size: .74rem; line-height: 1.7; }
.rank-item.is-dragging { opacity: .23; }
.rank-ghost { position: fixed; z-index: 1000; margin: 0; opacity: .96; pointer-events: none; }
.rank-ghost .rank-card { box-shadow: 0 5px 16px rgb(0 0 0 / .13); cursor: grabbing; }
.ranking-dragging { user-select: none; }

@media (max-width: 620px) {
  .rank-board-page { width: min(calc(100% - 28px), 1120px); }
  .rank-top-nav { margin-bottom: 38px; }
  .rank-header { margin-bottom: 27px; }
  .rank-lane { grid-template-columns: 82px minmax(0, 1fr); min-height: 112px; }
  .rank-lane-label { min-height: 110px; padding: 8px; border-right: 1px solid #111; font-size: 1rem; }
  .rank-lane-items { min-height: 110px; gap: 9px; padding: 11px; }
  .rank-card { min-width: 84px; min-height: 46px; padding-inline: 10px; }
  .rank-last-edit { max-width: 164px; }
}
