:root {
  color-scheme: light;
  --bg-top: #f8f1e3;
  --bg-bottom: #ead9bf;
  --paper: rgba(255, 251, 245, 0.9);
  --paper-strong: rgba(255, 254, 251, 0.97);
  --paper-soft: rgba(255, 246, 231, 0.84);
  --ink: #26180d;
  --ink-soft: #705e4a;
  --line: rgba(109, 80, 45, 0.16);
  --line-strong: rgba(88, 60, 29, 0.24);
  --bronze: #7a4a22;
  --bronze-deep: #49270f;
  --platinum: #2f6d7a;
  --platinum-soft: #d9eff3;
  --gold-soft: #f3dfb5;
  --highlight: #fff5df;
  --danger-soft: #fff0ef;
  --shadow-lg: 0 28px 90px rgba(82, 53, 25, 0.14);
  --shadow-md: 0 18px 48px rgba(82, 53, 25, 0.11);
  --heading-font: "Baskerville Old Face", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-font: "Aptos", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 247, 220, 0.85), transparent 22%),
    radial-gradient(circle at 88% 15%, rgba(47, 109, 122, 0.12), transparent 20%),
    radial-gradient(circle at 84% 78%, rgba(122, 74, 34, 0.15), transparent 25%),
    linear-gradient(180deg, var(--bg-top) 0%, #f2e5d0 46%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(rgba(106, 75, 36, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 75, 36, 0.03) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.25), transparent 60%);
  background-size: 22px 22px, 22px 22px, 100% 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.archive-shell {
  position: relative;
  z-index: 1;
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px 18px 52px;
}

.archive-hero,
.archive-panel,
.ranking-gallery {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.archive-hero {
  position: relative;
  display: block;
  padding: 36px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.98), rgba(248, 234, 208, 0.94)),
    radial-gradient(circle at right top, rgba(47, 109, 122, 0.1), transparent 30%);
  overflow: hidden;
}

.archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(120deg, transparent 0 54%, rgba(122, 74, 34, 0.06) 54% 56%, transparent 56%);
}

.archive-copy {
  position: relative;
  z-index: 1;
}

.archive-eyebrow,
.panel-kicker,
.memory-label,
.fact-label,
.archive-stat-label,
.ranking-search-label {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.archive-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(73, 39, 15, 0.08);
  color: var(--bronze-deep);
}

.archive-copy h1 {
  margin: 18px 0 0;
  max-width: 900px;
  font-family: var(--heading-font);
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.archive-lead {
  margin: 20px 0 0;
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.88;
}

.archive-ribbon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.archive-ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(73, 39, 15, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--bronze-deep);
  font-size: 13px;
  font-weight: 900;
}

.archive-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.archive-stat-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(73, 39, 15, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 246, 228, 0.74));
}

.archive-stat-card-spotlight {
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(224, 243, 247, 0.88));
  border-color: rgba(47, 109, 122, 0.18);
}

.archive-stat-value {
  font-family: var(--heading-font);
  font-size: clamp(1.5rem, 2.1vw, 2.4rem);
  letter-spacing: -0.04em;
}

.archive-stat-value-small {
  font-size: clamp(1.12rem, 1.55vw, 1.55rem);
  line-height: 1.3;
}

.archive-stat-note {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.memory-card {
  align-self: stretch;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(247, 233, 211, 0.94));
}

.memory-body {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.84;
}

.memory-quote {
  margin: 20px 0 0;
  padding: 18px 18px 20px;
  border-left: 3px solid rgba(47, 109, 122, 0.26);
  border-radius: 0 18px 18px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(234, 244, 247, 0.76));
  color: #4b5f61;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

.memory-divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, rgba(106, 75, 36, 0.24), transparent);
}

.memory-actions {
  display: grid;
  gap: 12px;
}

.memory-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(73, 39, 15, 0.12);
  background: linear-gradient(180deg, #6b4020, #4e2e17);
  color: #fff8f0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.memory-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(78, 46, 23, 0.18);
}

.memory-button-alt {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(244, 233, 212, 0.98));
  color: var(--bronze-deep);
}

.archive-stage {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.archive-main-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 24px;
}

.archive-panel,
.ranking-gallery {
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 239, 223, 0.93));
}

.archive-panel-controls,
.archive-panel-preview,
.ranking-gallery {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-head h2 {
  margin: 6px 0 0;
  font-family: var(--heading-font);
  font-size: 30px;
  letter-spacing: -0.03em;
}

.panel-copy,
.preview-summary,
.ranking-summary {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(73, 39, 15, 0.08);
  color: var(--bronze-deep);
  font-size: 12px;
  font-weight: 900;
}

.status-pill[data-status="loading"] {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
}

.status-pill[data-status="preview"] {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.status-pill[data-status="error"] {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.field-block {
  margin-top: 24px;
}

.field-block label,
.group-label {
  display: block;
  margin-bottom: 12px;
  color: var(--bronze-deep);
  font-size: 14px;
  font-weight: 900;
}

#handle-input,
#ranking-filter-input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(106, 75, 36, 0.18);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

#handle-input:focus,
#ranking-filter-input:focus {
  border-color: rgba(47, 109, 122, 0.34);
  box-shadow: 0 0 0 5px rgba(47, 109, 122, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.example-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(106, 75, 36, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--bronze-deep);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.example-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 109, 122, 0.24);
  background: rgba(255, 255, 255, 0.95);
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.version-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(106, 75, 36, 0.14);
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.version-card:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 109, 122, 0.28);
  background: rgba(255, 255, 255, 0.86);
}

.version-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.version-card-active {
  border-color: rgba(47, 109, 122, 0.28);
  background: linear-gradient(180deg, rgba(246, 252, 253, 0.98), rgba(232, 244, 246, 0.94));
  box-shadow: inset 0 0 0 1px rgba(47, 109, 122, 0.1);
}

.version-title {
  font-size: 19px;
  font-weight: 900;
}

.version-note {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.toggle-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(106, 75, 36, 0.14);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.toggle-card input {
  width: 16px;
  height: 16px;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.ranking-more-button,
.featured-action,
.ranking-action {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.featured-action,
.ranking-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button,
.featured-action,
.ranking-more-button {
  background: linear-gradient(180deg, #6f4321, #4e2f19);
  color: #fff8ef;
}

.primary-button:hover,
.featured-action:hover,
.ranking-more-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(78, 46, 23, 0.18);
}

.secondary-button,
.ranking-action {
  border-color: rgba(106, 75, 36, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--bronze-deep);
}

.secondary-button:hover:not(:disabled),
.ranking-action:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 109, 122, 0.28);
  background: rgba(255, 255, 255, 0.95);
}

.secondary-button:disabled {
  cursor: not-allowed;
  border-color: rgba(106, 75, 36, 0.08);
  background: rgba(255, 255, 255, 0.45);
  color: rgba(111, 97, 83, 0.56);
}

.snapshot-facts {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.fact-card,
.message-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(106, 75, 36, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

#data-source {
  display: block;
  margin-top: 10px;
  word-break: break-word;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.fact-copy,
.message-card,
.preview-caption {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.78;
}

.message-card {
  margin-top: 18px;
}

.message-card.is-error {
  border-color: rgba(220, 38, 38, 0.16);
  background: var(--danger-soft);
  color: #991b1b;
}

.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(106, 75, 36, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--bronze-deep);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.open-link[aria-disabled="true"] {
  pointer-events: none;
  color: rgba(111, 97, 83, 0.55);
  background: rgba(255, 255, 255, 0.42);
}

.preview-stage {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 520px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(106, 75, 36, 0.12);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.88), transparent 34%),
    linear-gradient(180deg, rgba(90, 60, 32, 0.11), rgba(90, 60, 32, 0.03));
}

.preview-empty {
  align-self: center;
  max-width: 420px;
  text-align: center;
  color: var(--ink-soft);
}

.preview-empty-title {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 34px;
  font-weight: 700;
}

.preview-empty-copy {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

.preview-canvas {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 470px;
  padding: 30px;
  border-radius: 26px;
  border: 1px solid rgba(220, 206, 182, 0.88);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 248, 240, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -20px 46px rgba(173, 138, 94, 0.06);
}

.preview-canvas svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.preview-caption {
  margin-top: 16px;
}

.ranking-gallery {
  display: grid;
  gap: 18px;
}

.ranking-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.ranking-head h2 {
  margin: 6px 0 0;
  font-family: var(--heading-font);
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.ranking-tools {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
}

.ranking-search {
  display: grid;
  gap: 10px;
}

.ranking-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(106, 75, 36, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--bronze-deep);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.ranking-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 109, 122, 0.28);
  background: rgba(255, 255, 255, 0.95);
}

.ranking-chip.is-active {
  border-color: rgba(47, 109, 122, 0.2);
  background: linear-gradient(180deg, rgba(234, 246, 249, 0.96), rgba(221, 241, 246, 0.92));
  color: #1d5964;
}

.ranking-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
}

.ranking-info-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(106, 75, 36, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 239, 223, 0.8));
}

.ranking-info-card-accent {
  background:
    linear-gradient(135deg, rgba(255, 249, 239, 0.96), rgba(224, 244, 248, 0.92));
  border-color: rgba(47, 109, 122, 0.16);
}

.ranking-info-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ranking-info-title {
  font-family: var(--heading-font);
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.03em;
}

.ranking-info-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.ranking-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.featured-card {
  position: relative;
  min-height: 270px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(106, 75, 36, 0.14);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 233, 212, 0.94));
  box-shadow: var(--shadow-md);
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.12), rgba(35, 22, 10, 0.36));
}

.featured-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -38% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 66%);
  pointer-events: none;
}

.featured-card.is-selected {
  border-color: rgba(47, 109, 122, 0.28);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px rgba(47, 109, 122, 0.12) inset;
}

.featured-bg {
  position: absolute;
  inset: 0;
}

.featured-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(0.95);
}

.featured-bg-fallback {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.85), transparent 22%),
    linear-gradient(135deg, rgba(47, 109, 122, 0.18), rgba(122, 74, 34, 0.18));
}

.featured-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  height: 100%;
}

.featured-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.featured-rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--bronze-deep);
  font-size: 12px;
  font-weight: 900;
}

.featured-tier {
  width: 34px;
  height: 34px;
}

.featured-middle {
  display: grid;
  align-content: end;
  gap: 12px;
}

.featured-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 24px rgba(20, 12, 8, 0.2);
}

.featured-handle {
  margin: 0;
  color: #fffdf8;
  font-family: var(--heading-font);
  font-size: clamp(1.7rem, 2.2vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.featured-subline {
  color: rgba(255, 250, 242, 0.88);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.featured-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #4d3926;
  font-size: 12px;
  font-weight: 900;
}

.featured-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.featured-class {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 250, 242, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.featured-class img {
  width: 28px;
  height: 28px;
}

.featured-action {
  min-height: 40px;
  padding: 0 14px;
}

.ranking-board {
  border: 1px solid rgba(106, 75, 36, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.66);
  overflow: hidden;
}

.ranking-board-head,
.ranking-row {
  display: grid;
  grid-template-columns: 88px minmax(220px, 1.5fr) 110px 120px 120px 124px;
  gap: 12px;
  align-items: center;
}

.ranking-board-head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(106, 75, 36, 0.12);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.95), rgba(249, 239, 222, 0.92));
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ranking-list {
  display: grid;
}

.ranking-row {
  appearance: none;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid rgba(106, 75, 36, 0.08);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.ranking-row:nth-child(even) {
  background: rgba(255, 252, 247, 0.55);
}

.ranking-row:hover {
  background: linear-gradient(90deg, rgba(255, 248, 237, 0.95), rgba(237, 248, 250, 0.9));
}

.ranking-row:focus-visible {
  outline: 2px solid rgba(47, 109, 122, 0.35);
  outline-offset: -2px;
}

.ranking-row.is-selected {
  background: linear-gradient(90deg, rgba(255, 248, 236, 0.98), rgba(221, 244, 248, 0.96));
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-rank {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
}

.ranking-rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 253, 244, 0.98), rgba(241, 221, 173, 0.96));
  color: #8b5e23;
  font-size: 12px;
  font-weight: 900;
}

.ranking-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ranking-tier-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.ranking-user-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranking-user-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
}

.ranking-user-copy span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.ranking-class {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}

.ranking-class img {
  width: 28px;
  height: 28px;
}

.ranking-stat {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
}

.ranking-stat strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.ranking-action {
  min-height: 40px;
  padding: 0 14px;
}

.ranking-board-footer {
  display: flex;
  justify-content: center;
  padding: 18px;
  border-top: 1px solid rgba(106, 75, 36, 0.1);
  background: rgba(255, 251, 245, 0.68);
}

.ranking-more-button[hidden] {
  display: none;
}

.ranking-empty {
  padding: 36px 18px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.9;
}

@media (max-width: 1200px) {
  .archive-stat-grid,
  .ranking-panels,
  .ranking-featured {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .archive-hero,
  .archive-main-grid {
    grid-template-columns: 1fr;
  }

  .ranking-head {
    flex-direction: column;
    align-items: start;
  }

  .ranking-tools {
    width: 100%;
  }
}

@media (max-width: 880px) {
  .ranking-board-head {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .ranking-rank,
  .ranking-class,
  .ranking-stat {
    justify-content: space-between;
  }

  .ranking-stat strong {
    display: inline;
    margin-left: 8px;
  }

  .ranking-stat {
    flex-direction: row;
    align-items: center;
  }

  .ranking-action {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .archive-shell {
    padding-inline: 14px;
  }

  .archive-hero,
  .archive-panel,
  .ranking-gallery {
    padding: 20px;
    border-radius: 24px;
  }

  .version-grid,
  .button-row {
    grid-template-columns: 1fr;
  }

  .preview-stage {
    min-height: 320px;
  }

  .preview-canvas {
    min-height: 260px;
    padding: 14px;
  }
}
