:root {
  color-scheme: dark;
  --bg: #10141c;
  --surface: #1a2130;
  --surface-hover: #243049;
  --line: #1e2634;
  --line-strong: #2a3344;
  --text: #f3f6fb;
  --muted: #9aa6b8;
  --soft: #c5cdd8;
  --accent: #3d7eff;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Pretendard Variable", sans-serif;
}

.page {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 32px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.logo {
  width: min(280px, 80vw);
  height: auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.lead,
.blurb,
.status,
.list-count {
  margin: 0;
  color: var(--muted);
}

.lead {
  font-size: 1rem;
  max-width: 28em;
}

.blurb {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--soft);
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.download.is-off {
  background: #3a4458;
  color: var(--muted);
  pointer-events: none;
}

.status:empty {
  display: none;
}

.board {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: min(720px, calc(100vh - 96px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.board-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.s-strip {
  display: none;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 0 4px;
  overflow-x: auto;
  list-style: none;
}

.s-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 600;
}

.s-chip img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface-hover);
}

.board input {
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  padding: 8px 10px;
  outline: none;
}

.board input:focus {
  border-color: var(--accent);
}

.list-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.list-head,
.champ-row {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}

.list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.list-head .rank,
.champ-row .rank,
.list-head .tier-col,
.champ-row .tier-mark {
  justify-self: center;
}

#tierList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.champ-row {
  border-radius: 8px;
}

.champ-row:hover {
  background: var(--surface);
}

.champ-row .rank {
  color: var(--muted);
  font: 600 12px/1 "Pretendard Variable", sans-serif;
  font-variant-numeric: tabular-nums;
}

.champ-col {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.champ-row img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-hover);
}

.champ-row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.tier-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  color: #fff;
  font: 800 12px/1 "Pretendard Variable", sans-serif;
}

.tier-mark.t1 {
  background: var(--accent);
}

.tier-mark.t2 {
  background: #2bb673;
}

.tier-mark.t3 {
  background: #f0a020;
}

.tier-mark.t4 {
  background: #6b7280;
}

.tier-mark.t5 {
  background: #4b5563;
}

@media (max-width: 820px) {
  .page {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 28px;
    min-height: 0;
    padding: 28px 18px 40px;
  }

  .hero {
    align-items: center;
    text-align: center;
  }

  .s-strip {
    display: flex;
  }

  .board {
    height: min(640px, 72vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
