@font-face { font-family: "Geist"; src: url("assets/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --canvas-page-light: #f9faf8;
  --canvas-page: #f4f5f3;
  --surface: #fff;
  --surface-alt: #102529;
  --content-primary: #11272b;
  --content-secondary: #525c5c;
  --content-tertiary: #7a8385;
  --border-primary: #d4d4d2;
  --border-secondary: #e8e7e6;
  --accent: #b8965f;
  --own-content: #2c4946;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1200px; height: 100%; min-height: 100%; }
body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--canvas-page-light); color: var(--content-primary); font-family: "Geist", sans-serif; -webkit-font-smoothing: antialiased; }
button, a { color: inherit; font: inherit; }
button { appearance: none; cursor: default; }
a { text-decoration: none; }

.site-header { flex: 0 0 72px; height: 72px; border-bottom: 1px solid var(--border-secondary); background: var(--canvas-page-light); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; width: 1200px; height: 72px; margin: 0 auto; }
.site-nav, .account-controls { display: flex; align-items: center; }
.site-nav { gap: 24px; height: 100%; overflow: hidden; }
.brand { display: block; width: 28px; height: 32px; flex: 0 0 auto; }
.brand img { display: block; width: 28px; height: 32px; }
.site-nav__link { position: relative; display: flex; align-items: center; height: 100%; font-size: 16px; font-weight: 500; line-height: 24px; white-space: nowrap; }
.site-nav__link--active::after { position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--accent); content: ""; }
.nominate { display: flex; align-items: center; gap: 6px; height: 36px; padding: 6px 12px; border: 1px solid #e1e5e5; border-radius: 9999px; background: #f5fcfd; color: var(--content-secondary); font-size: 14px; font-weight: 500; line-height: 24px; white-space: nowrap; }
.nominate img { width: 20px; height: 20px; }
.account-controls { gap: 20px; }
.project-switcher { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; font-size: 16px; font-weight: 500; line-height: 24px; }
.project-switcher img { width: 16px; height: 16px; }
.header-search { display: flex; align-items: center; gap: 8px; width: 180px; height: 40px; padding-left: 12px; overflow: hidden; border: 1px solid var(--border-primary); border-radius: 12px; color: #9da3a4; font-size: 16px; line-height: 24px; white-space: nowrap; }
.header-search img { width: 18px; height: 18px; }
.notification { display: flex; align-items: center; justify-content: center; width: 24px; height: 40px; padding: 0; border: 0; background: transparent; }
.notification img { width: 20px; height: 20px; }
.account-avatar { display: block; width: 48px; height: 48px; }

.page-shell { display: flex; flex: 1 1 auto; flex-direction: column; width: 1200px; min-height: 0; margin: 0 auto; }
.page-heading { flex: 0 0 80px; width: 1200px; height: 80px; margin-top: 16px; }
.page-heading__title-row { display: flex; align-items: center; gap: 16px; height: 44px; }
.page-heading h1 { flex: 1; margin: 0; font-size: 36px; font-weight: 600; letter-spacing: -0.72px; line-height: 44px; }
.page-heading p { width: 1160px; margin: 8px 0 0; color: var(--content-tertiary); font-size: 18px; font-weight: 400; line-height: 28px; }
.share-button, .control-button, .density-button, .quick-filter { display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-primary); background: var(--surface); color: var(--content-secondary); font-size: 14px; font-weight: 400; line-height: 20px; white-space: nowrap; }
.share-button { gap: 6px; width: 94px; height: 40px; padding: 0 16px; border-radius: 9999px; }
.share-button img, .period-button img { width: 16px; height: 16px; }

.toolbar { display: flex; flex: 0 0 40px; align-items: center; justify-content: space-between; width: 1200px; height: 40px; margin-top: 24px; }
.toolbar__left, .toolbar__right { display: flex; align-items: center; height: 40px; }
.toolbar__left { gap: 16px; }
.toolbar__right { gap: 8px; }
.list-search { display: flex; align-items: center; gap: 8px; width: 280px; height: 40px; padding: 0 12px; border: 1px solid var(--border-primary); border-radius: 16px; background: var(--surface); color: var(--content-tertiary); font-size: 14px; line-height: 20px; }
.list-search img { width: 18px; height: 18px; }
.filter-button { gap: 6px; width: 104px; height: 40px; padding: 0 13px; border-radius: 9999px; }
.filter-button img, .density-button img { width: 20px; height: 20px; }
.quick-filter { position: relative; height: 40px; padding: 0 14px; border-color: transparent; border-radius: 9999px; background: var(--canvas-page); }
.quick-filter::after { position: absolute; inset: -1px; border-radius: inherit; background: var(--border-primary); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' rx='20' fill='none' stroke='black' stroke-width='2' stroke-dasharray='8 5'/%3E%3C/svg%3E") center / 100% 100% no-repeat; pointer-events: none; content: ""; }
.density-button { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.period-button { flex: 0 0 107px; gap: 8px; width: 107px; height: 40px; padding: 0 16px; border-radius: 9999px; }

.ranking-card { display: flex; flex: 1 1 auto; flex-direction: column; width: 1200px; min-height: 0; margin-top: 12px; margin-bottom: 12px; overflow: hidden; border: 1px solid var(--border-secondary); border-radius: 16px; background: var(--surface); }
.table-grid { display: grid; grid-template-columns: var(--ranking-rank-width, 56px) 260px 160px 180px minmax(0, 1fr) 120px 176px; width: 1200px; padding: 0 24px; }
.table-head { z-index: 1; flex: 0 0 44px; align-items: center; height: 44px; border-bottom: 1px solid var(--border-secondary); background: var(--surface); color: var(--content-secondary); font-size: 12px; font-weight: 400; line-height: 18px; }
.sort-heading { align-self: stretch; min-width: 0; }
.sort-button { position: relative; display: flex; align-items: center; justify-content: flex-end; width: max-content; max-width: 100%; height: 100%; min-width: 0; margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; transition: color 140ms ease-out; }
.sort-button::before { position: absolute; inset: 0 0 0 -16px; content: ""; }
.sort-button:focus-visible { outline-offset: -2px; }
.sort-label { transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1); }
.sort-arrow { position: absolute; top: 50%; right: 0; width: 12px; height: 12px; transform: translateY(-50%); background: var(--content-tertiary); mask: url("assets/sort-arrow.svg") center / 11px 11px no-repeat; opacity: 0; pointer-events: none; transition: opacity 150ms ease-out, background-color 140ms ease-out; }
.sort-button[data-active="true"] .sort-arrow { background: var(--content-primary); }
.sort-arrow[data-direction="ascending"] { transform: translateY(-50%) rotate(180deg); }
.sort-button[data-active="true"] .sort-arrow, .sort-button:focus-visible .sort-arrow { opacity: 1; transition-delay: 25ms; }
.sort-button[data-active="true"] .sort-label, .sort-button:focus-visible .sort-label { transform: translateX(-16px); }
@media (hover: hover) and (pointer: fine) {
  .sort-button:hover { color: var(--content-primary); }
  .sort-button:hover .sort-arrow { opacity: 1; transition-delay: 25ms; }
  .sort-button:hover .sort-label { transform: translateX(-16px); }
}
.sort-button:active { color: var(--content-primary); }
@media (prefers-reduced-motion: reduce) {
  .sort-button, .sort-arrow, .sort-label { transition: none; }
}
.ranking-viewport { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.own-excluded-notice { display: flex; flex: 0 0 35px; align-items: center; justify-content: center; height: 35px; padding: 8px 24px; border-top: 1px solid var(--border-secondary); background: var(--surface); color: var(--content-tertiary); font-size: 12px; font-weight: 400; line-height: 18px; text-align: center; white-space: nowrap; }
.ranking-rows { height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.ranking-row[data-pinned-source] { visibility: hidden; }
.pinned-own { position: absolute; z-index: 2; top: 0; left: 0; width: 1200px; height: 96px; pointer-events: none; }
.pinned-own::after { position: absolute; top: 48px; left: 0; width: 100%; height: 48px; background: linear-gradient(180deg, var(--surface), rgb(255 255 255 / 62%) 50%, rgb(255 255 255 / 0%)); content: ""; }
.pinned-own-row { position: relative; display: flex; gap: 12px; align-items: center; width: 1200px; height: 48px; padding: 0 24px; border-bottom: 0.5px solid #b3cac8; background: linear-gradient(180deg, rgb(255 255 255 / 36%), rgb(255 255 255 / 10%) 40%, rgb(255 255 255 / 0%)), linear-gradient(90deg, #e7f8f6, #fafdfd); box-shadow: inset 0 1px 2px rgb(255 255 255 / 70%); color: var(--own-content); font-size: 14px; line-height: 20px; pointer-events: auto; }
.pinned-own-rank { flex: 0 0 44px; }
.pinned-own-rank, .pinned-own-creator strong { font-weight: 600; }
.pinned-own-creator { display: flex; align-items: center; gap: 12px; min-width: 0; white-space: nowrap; }
.pinned-own-avatar { display: block; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid rgb(0 0 0 / 10%); border-radius: 50%; object-fit: cover; filter: drop-shadow(0 2px 2.5px rgb(62 92 89 / 13%)); }
.pinned-own-gap { flex: 1; min-width: 0; }
.pinned-own-amount { flex: 0 0 auto; font-weight: 500; text-align: right; }
.pinned-own-jump { position: absolute; top: calc(50% + 0.25px); left: 50%; display: flex; align-items: center; justify-content: center; gap: 6px; width: 146px; height: 32px; padding: 0 10px 0 12px; transform: translate(-50%, -50%); border: 0.5px solid #b2c9c7; border-radius: 9999px; background: rgb(255 255 255 / 85%); color: var(--own-content); font-size: 14px; line-height: 20px; }
.pinned-own-jump::before { position: absolute; inset: -6px; content: ""; }
.pinned-own-jump img { width: 14px; height: 14px; }
.pinned-own[data-position="bottom"] { top: auto; bottom: 0; padding-top: 48px; }
.pinned-own[data-position="bottom"]::after { top: 0; background: linear-gradient(180deg, rgb(255 255 255 / 0%), rgb(255 255 255 / 62%) 50%, var(--surface)); }
.pinned-own[data-position="bottom"] .pinned-own-row { border-top: 0.5px solid #b3cac8; border-bottom: 0; }
.pinned-own[data-position="bottom"] .pinned-own-jump { top: calc(50% - 0.25px); }
@media (hover: hover) and (pointer: fine) {
  .pinned-own-jump:hover { background: var(--button-secondary-bg-hover); }
}
.pinned-own-jump:active { background: var(--button-bg-pressed); }
.align-right, .number, .amount { text-align: right; }
.ranking-row { position: relative; align-items: center; height: 64px; border-bottom: 1px solid var(--border-secondary); color: var(--content-secondary); font-size: 14px; line-height: 20px; }
.ranking-row--gold { background: linear-gradient(90deg, #f9f5ec 0%, #fff 24%, #fff 100%); }
.ranking-row--silver { background: linear-gradient(90deg, #f5f7f8 0%, #fff 24%, #fff 100%); }
.ranking-row--bronze { background: linear-gradient(90deg, #faf4ef 0%, #fff 24%, #fff 100%); }
.ranking-row--own { color: var(--own-content); background: linear-gradient(180deg, rgb(255 255 255 / 36%) 0%, rgb(255 255 255 / 10%) 40%, rgb(255 255 255 / 0%) 100%), linear-gradient(90deg, #e7f8f6 0%, #fafdfd 100%); box-shadow: inset 0 -2px 10px rgb(62 92 89 / 5%), inset 0 1px 2px rgb(255 255 255 / 70%); }
.ranking-row::before {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.01);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease-out;
  content: "";
}
.ranking-row--own::before { background: oklch(0.45 0.035 175 / 0.035); }
.ranking-row > * { position: relative; }
@media (hover: hover) {
  .ranking-row:hover::before { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ranking-row::before { transition: none; }
}
.rank { color: var(--content-tertiary); }
.rank--medal, .rank--progress { position: relative; align-self: stretch; }
.rank--medal img { position: absolute; top: calc(50% - 11.5px); left: -8px; width: 24px; height: 30px; }
.rank--medal span { position: absolute; top: calc(50% - 10.5px); left: -1px; width: 10px; color: #c5a044; font-size: 13px; font-weight: 600; line-height: 20px; text-align: center; text-shadow: 0 0.7px 0.4px rgb(255 255 255 / 80%); }
.ranking-row--silver .rank--medal span { color: #9baeb5; }
.ranking-row--bronze .rank--medal span { color: #b98664; }
.rank--progress img { position: absolute; top: 16px; left: -12px; width: 32px; height: 32px; }
.rank--progress span { position: absolute; top: 22px; left: -1px; width: 10px; color: var(--own-content); font-weight: 500; text-align: center; }
.creator, .category { display: flex; align-items: center; }
.creator { gap: 12px; height: 64px; overflow: hidden; }
.creator__avatar, .anonymous-avatar { display: block; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover; }
.creator__avatar--gold { filter: drop-shadow(0 2px 3.5px rgb(197 160 68 / 24%)); }
.creator__avatar--own { border: 1px solid rgb(0 0 0 / 10%); filter: drop-shadow(0 2px 2.5px rgb(62 92 89 / 13%)); }
.anonymous-avatar { display: flex; align-items: center; justify-content: center; background: var(--canvas-page); }
.anonymous-avatar img { width: 28px; height: 28px; }
.creator__identity { display: flex; flex-direction: column; gap: 2px; min-width: 0; white-space: nowrap; }
.creator__identity--single { justify-content: center; }
.creator__identity strong { color: var(--content-primary); font-size: 14px; font-weight: 500; line-height: 20px; }
.creator__identity small { color: var(--content-tertiary); font-size: 12px; font-weight: 400; line-height: 18px; }
.creator__name-with-badge { display: flex; align-items: center; gap: 8px; }
.ranking-row--own .creator__identity strong { color: var(--own-content); font-weight: 600; }
.ranking-row--own .creator__identity small { color: var(--own-content); }
.you-badge { padding: 1px 6px; border: 0.5px solid #b3cac8; border-radius: 4px; background: #fff; box-shadow: inset 0 0.5px 0.7px rgb(255 255 255 / 70%); color: var(--own-content); font-size: 11px; font-weight: 500; line-height: 16px; }
.category { display: block; height: 64px; overflow: hidden; white-space: nowrap; }
.category img { position: absolute; top: calc(33px - 12.5%); left: 0; width: 14px; height: 14px; }
.category__details { position: absolute; top: calc(30px - 12.5%); right: 0; left: 22px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.country { overflow: hidden; white-space: nowrap; }
.private-particles {
  position: relative;
  display: block;
  width: 82px;
  height: 18px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.private-particles > span {
  position: absolute;
  left: var(--particle-x);
  top: var(--particle-y);
  width: var(--particle-size);
  height: var(--particle-size);
  border-radius: 50%;
  background: var(--content-tertiary);
  opacity: 0.5;
  animation: private-drift var(--particle-duration) ease-in-out var(--particle-delay) infinite alternate;
  animation-play-state: paused;
}
.private-particles[data-visible] > span { animation-play-state: running; }
@keyframes private-drift {
  0% { transform: translate(0, 0); opacity: 0.3; }
  45% { opacity: 0.75; }
  100% { transform: translate(var(--particle-dx), var(--particle-dy)); opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .private-particles > span { animation: none; }
}
.number { color: var(--content-primary); font-weight: 400; }
.amount { color: var(--content-primary); font-weight: 500; }
.ranking-row--own .number, .ranking-row--own .amount, .ranking-row--own .country, .ranking-row--own .category { color: var(--own-content); }

.density-detail { display: none; }
.ranking-card[data-columns-ready] .table-grid { grid-template-columns: var(--ranking-rank-width, 56px) 260px 160px 180px minmax(0, 1fr) 120px 0px 176px; }
.table-grid > .density-detail { display: block; min-width: 0; overflow: hidden; visibility: hidden; }
.ranking-card[data-density="detailed"] .density-detail { display: block; }
.ranking-card[data-density="detailed"] .table-grid > .density-detail { visibility: visible; }
.ranking-card[data-density="detailed"] .table-grid { grid-template-columns: var(--ranking-rank-width, 56px) 260px 224px 180px minmax(0, 1fr) 104px 104px 144px; }
.ranking-card[data-density="detailed"] :is(.ranking-row, .creator, .category) { height: 80px; }
.ranking-card[data-density="detailed"] .country:not(.country--private) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ranking-card[data-density="detailed"] small.density-detail { overflow: hidden; color: var(--content-tertiary); font-size: 12px; font-weight: 400; line-height: 18px; white-space: nowrap; }
.ranking-card[data-density="detailed"] .ranking-row--own small.density-detail { color: var(--own-content); }
.ranking-card[data-density="detailed"] .rank--progress { align-self: center; font-weight: 500; }
.ranking-card[data-density="detailed"] .rank--progress img { display: none; }
.ranking-card[data-density="detailed"] .rank--progress span { position: static; width: auto; text-align: left; }

.site-footer { flex: 0 0 88px; height: 88px; padding: 24px 0; background: var(--surface-alt); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; width: 1200px; height: 40px; margin: 0 auto; }
.site-footer p, .legal-links a { margin: 0; font-size: 14px; font-weight: 400; line-height: 20px; white-space: nowrap; }
.site-footer p { color: #fff; }
.legal-links { display: flex; align-items: center; gap: 28px; color: #c5d4d6; }
.social-links { display: flex; align-items: center; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.social-links img { width: 20px; height: 20px; }
