body.vote-results-page,
.kpop-page,
.kpop-results { margin: 0; padding: 0; }
.kpop-page { background: #030c19; color: #f6f7ff; }

:root.vote-results-embedded { scrollbar-width: none; }
:root.vote-results-embedded::-webkit-scrollbar:vertical { display: none; }

.kpop-results__container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.kpop-results__title { margin: 0; font-size: 48px; font-weight: 500; line-height: 1.3; text-align: center; letter-spacing: -.035em; }
.kpop-round-row { margin-top: 70px; }
.kpop-round-tabs { display: flex; width: max-content; align-items: center; gap: 20px; margin-inline: auto; padding: 4px 6px 8px; }
.kpop-round-tabs__button { flex: 0 0 auto; min-width: 144px; min-height: 52px; padding: 0 25px; border: 1px solid #24344f; border-radius: 999px; color: #e4e8f2; line-height: 1.2; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.kpop-round-tabs__button[aria-pressed="true"] { border-color: #1048a6; background: #1048a6; color: #fff; }
.kpop-round-tabs__button:hover { border-color: #4776c8; }
.kpop-category-row { margin-top: 55px; }
.kpop-tab-row { --tab-arrow-width: 38px; --tab-fade: 24px; display: grid; grid-template-columns: var(--tab-arrow-width) minmax(0, 1fr) var(--tab-arrow-width); align-items: center; gap: 12px; }
.kpop-category-arrow--left { grid-area: 1 / 1; }
.kpop-category-arrow--right { grid-area: 1 / 3; }
.kpop-tab-scroller { grid-area: 1 / 2; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-behavior: smooth; }
.kpop-tab-scroller::-webkit-scrollbar { display: none; }
.kpop-tab-scroller.has-overflow-left { mask-image: linear-gradient(to right, transparent 0, #000 var(--tab-fade), #000 100%); }
.kpop-tab-scroller.has-overflow-right { mask-image: linear-gradient(to right, #000 0, #000 calc(100% - var(--tab-fade)), transparent 100%); }
.kpop-tab-scroller.has-overflow-left.has-overflow-right { mask-image: linear-gradient(to right, transparent 0, #000 var(--tab-fade), #000 calc(100% - var(--tab-fade)), transparent 100%); }
.kpop-category-list { display: flex; width: max-content; min-width: 100%; align-items: center; justify-content: space-between; gap: 26px; padding: 5px 2px 12px; }
.kpop-category { flex: 0 0 auto; color: #d7dbea; line-height: 1.4; white-space: nowrap; transition: color .2s; }
.kpop-category:hover, .kpop-category[aria-pressed="true"] { color: #8fb2ff; }
.kpop-category-arrow { display: grid; width: var(--tab-arrow-width); height: 38px; place-items: center; border-radius: 50%; background: #111d32; color: #dce5f9; }
.kpop-category-arrow[hidden] { display: none; }
.kpop-category-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.kpop-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 60px; row-gap: 76px; margin-top: 43px; }
.kpop-card { min-width: 0; }
.kpop-card[hidden] { display: none; }
.kpop-card__image { display: block; width: 100%; aspect-ratio: 1; border-radius: 9px; background: #121a27; object-fit: cover; }
.kpop-card__caption { padding-top: 15px; }
.kpop-card__heading { display: flex; min-width: 0; align-items: baseline; gap: 20px; }
.kpop-card__rank { flex: 0 0 auto; color: #7182d8; font-size: 34px; font-weight: 800; line-height: 1.15; }
.kpop-card:nth-child(-n+3) .kpop-card__rank { color: #ffd424; }
.kpop-card__heading h3 { min-width: 0; overflow: hidden; font-size: 19px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.kpop-card__stats { display: flex; align-items: center; gap: 8px; margin: 3px 0 0 40px; color: #e3e7f1; font-size: 14px; line-height: 1.45; white-space: nowrap; }
.kpop-card__stats strong { font-weight: 700; }
.kpop-card__track { height: 12px; margin: 9px 8px 0 40px; overflow: hidden; border-radius: 999px; background: #0e1b2e; }
.kpop-card__fill { display: block; width: var(--vote-share, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5940d4 0%, #e20adf 100%); transition: width .6s cubic-bezier(.22, 1, .36, 1); }

.fx .kpop-results__title[data-reveal], .fx .kpop-round-tabs[data-reveal], .fx .kpop-category-row[data-reveal], .fx .kpop-card[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.fx .kpop-results__title[data-reveal].is-in, .fx .kpop-round-tabs[data-reveal].is-in, .fx .kpop-category-row[data-reveal].is-in, .fx .kpop-card[data-reveal].is-in { opacity: 1; transform: none; }

.update {display:flex;align-items: center; font-size: 14px; color: #ddd; justify-content: flex-end; gap:10px; margin-top:20px;  font-size:14px; color:#ddd;}
.update svg {width:auto; height:14px;}
.update .btns {display:flex; gap:4px;}
.update .btns > div {display:flex; align-items:center; gap:8px; border:1px solid #364c6d; padding:4px 8px; border-radius:8px;}
.update .btns > div:hover,
.update.btns > div.active {background:#0e1435; cursor:pointer;}
.update h4 {color:#4b5fc5;}
.update .reload {margin-left:4px; height:18px;}
.update .fandora svg {height:20px;}
.update [data-vote-refresh] { flex-shrink: 0; padding: 4px 8px; border: 1px solid #364c6d; border-radius: 8px; }
.vote-updated { display: flex; flex-wrap: wrap; column-gap: 8px; margin: 0; min-width: 0; }
.vote-updated-times { display: grid; row-gap: 2px; }
.vote-updated-row { display: block; }
.kpop-vote-note { margin-top: 10px; color: #e3e7f1; font-size: 14px; }
[data-vote-status] { min-block-size: 1.5em; }
[data-vote-page] { min-block-size: 100svh; }
.kpop-card__image--empty { display: grid; place-items: center; color: #aeb9cf; }

@media (max-width: 1024px) {
  .kpop-round-tabs { gap: 12px; }
  .kpop-round-tabs__button { min-width: 122px; min-height: 48px; padding: 0 18px; font-size: 16px; }
  .kpop-category-list { justify-content: flex-start; }
  .kpop-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 28px; }
}

@media (max-width: 640px) {
  .kpop-results__container { width: calc(100% - 32px); }
  .kpop-results__title { font-size: 30px; }
  .kpop-round-row { margin-top: 38px; }
  .kpop-round-tabs { gap: 4px; }
  .kpop-round-tabs__button { min-width: 100px; min-height: 42px; padding: 0 14px; font-size:14px; }
  .kpop-tab-row { --tab-arrow-width: 28px; --tab-fade: 18px; gap: 5px; }
  .kpop-category-row { margin-top: 28px; }
  .kpop-category-list { gap: 22px; }
  .kpop-category { font-size: 14px; }
  .kpop-category-arrow { height: 32px; }
  .kpop-category-arrow svg { width: 17px; height: 17px; }
  .kpop-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 14px; margin-top: 25px; }
  .kpop-card__image { border-radius: 6px; }
  .kpop-card__caption { padding-top: 9px; }
  .kpop-card__heading { gap: 9px; }
  .kpop-card__rank { font-size: 24px; }
  .kpop-card__heading h3 { font-size: 22px; }
  .kpop-card__stats { flex-wrap: wrap; gap: 4px; margin: 3px 0 0 30px; font-size:16px; }
  .kpop-card__track { height: 8px; margin: 6px 0 0 30px; }
}

@media (max-width: 380px) {
  .kpop-card-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .kpop-tab-scroller { scroll-behavior: auto; }
  .fx .kpop-results__title[data-reveal], .fx .kpop-round-tabs[data-reveal], .fx .kpop-category-row[data-reveal], .fx .kpop-card[data-reveal] { opacity: 1; transform: none; transition: none; }
}
