﻿.hdr {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur-base) var(--ease);
}

.hdr.is-stuck {
  box-shadow: 0 10px 30px -22px rgba(20, 18, 26, 0.6);
}

.hdr__in {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 74px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: var(--shadow-1);
}

.logo__mark svg {
  width: 26px;
  height: 26px;
  transition: transform var(--dur-slow) var(--ease);
}

.logo:hover .logo__mark svg {
  transform: rotate(135deg);
}

.logo__word {
  display: grid;
  gap: 1px;
}

.logo__zh {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--text);
}

.logo__en {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  color: var(--text-faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}

.nav__a {
  position: relative;
  padding: 9px 13px;
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  color: var(--text-dim);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav__a:hover {
  color: var(--text);
  background: var(--paper-2);
}

.nav__a.is-on {
  color: var(--text);
  font-weight: 600;
}

.nav__a.is-on::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.hdr__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: none;
}

.qsearch {
  display: flex;
  align-items: center;
  width: 228px;
  height: 42px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.qsearch:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.qsearch__in {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--text);
}

.qsearch__in::placeholder {
  color: var(--text-faint);
}

.qsearch__in:focus {
  outline: none;
}

.qsearch__btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-dim);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.qsearch__btn:hover {
  color: var(--accent-deep);
  background: var(--paper-2);
}

.qsearch__btn svg {
  width: 16px;
  height: 16px;
}

.themebtn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-dim);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.themebtn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.themebtn svg {
  width: 17px;
  height: 17px;
}

.themebtn__sun {
  display: none;
}

:root[data-theme="dark"] .themebtn__moon {
  display: none;
}

:root[data-theme="dark"] .themebtn__sun {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    box-shadow var(--dur-base) var(--ease), border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -18px rgba(232, 70, 124, 0.6);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.btn--quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-dim);
  font-weight: 500;
}

.btn--quiet:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: var(--fs-xs);
  border-radius: var(--r-xs);
}

.btn--block {
  width: 100%;
}

.hdr__cta {
  height: 40px;
  padding: 0 18px;
  font-size: var(--fs-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip[aria-pressed="true"],
.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text-inv);
}

.chip--plain {
  height: auto;
  padding: 3px 9px;
  border-style: solid;
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--paper-2);
  border-color: transparent;
  border-radius: var(--r-xs);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  background: var(--paper-2);
  color: var(--text-dim);
}

.badge--live {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.badge--done {
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.pcard {
  position: relative;
  display: grid;
  gap: 12px;
}

.pcard__frame {
  position: relative;
  display: block;
  aspect-ratio: 5 / 7;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
}

.pcard__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--dur-slow) var(--ease), filter var(--dur-base) var(--ease);
}

.pcard__frame:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.pcard__frame:hover .pcard__img {
  transform: scale(1.04);
}

.pcard__veil {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 26px 10px 9px;
  background: linear-gradient(to top, rgba(15, 12, 18, 0.82), transparent);
  color: #fdf9f5;
  font-size: var(--fs-2xs);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}

.pcard__frame:hover .pcard__veil,
.pcard__frame:focus-visible .pcard__veil {
  opacity: 1;
  transform: none;
}

.pcard__veil span:last-child {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: #f6c9a8;
}

.pcard__no {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.1em;
  background: rgba(15, 12, 18, 0.72);
  color: rgba(255, 248, 240, 0.9);
  backdrop-filter: blur(4px);
}

.pcard__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  transition: color var(--dur-fast) var(--ease);
}

.pcard__title a {
  display: block;
  padding: 3px 0 5px;
}

.pcard:hover .pcard__title {
  color: var(--accent-deep);
}

.pcard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.pcard__meta b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--gold-ink);
}

.pcard__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 156px;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.rail::-webkit-scrollbar {
  height: 6px;
}

.rail::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.rail::-webkit-scrollbar-track {
  background: transparent;
}

.upd {
  scroll-snap-align: start;
  display: grid;
  gap: 10px;
}

.upd__frame {
  display: block;
  aspect-ratio: 5 / 7;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  position: relative;
}

.upd__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-base) var(--ease);
}

.upd__frame:hover img {
  transform: scale(1.05);
}

.upd__ch {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 8px 7px;
  background: linear-gradient(to top, rgba(15, 12, 18, 0.8), transparent);
  color: #fdf9f5;
  font-size: var(--fs-2xs);
  letter-spacing: 0.02em;
}

.upd__title a {
  display: block;
  padding: 6px 0;
}

.upd__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.upd__time {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.rank {
  display: grid;
  gap: 0;
}

.rank__row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 180px 84px;
  align-items: center;
  gap: 18px;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-fast) var(--ease);
}

.rank__row:hover {
  background: var(--paper-2);
}

.rank__no {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.rank__row:nth-child(-n + 3) .rank__no {
  color: var(--accent-deep);
}

.rank__main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rank__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank__tags {
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank__bar {
  position: relative;
  height: 5px;
  border-radius: 99px;
  background: var(--paper-3);
  overflow: hidden;
}

.rank__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform-origin: left;
  animation: bar-grow 1.1s var(--ease) both;
}

@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
}

.rank__heat {
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.acc {
  border-top: 1px solid var(--line);
}

.acc__item {
  border-bottom: 1px solid var(--line);
}

.acc__h {
  margin: 0;
}

.acc__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 2px;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--text);
  transition: color var(--dur-fast) var(--ease);
}

.acc__q:hover {
  color: var(--accent-deep);
}

.acc__sign {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-fast) var(--ease);
}

.acc__sign::before,
.acc__sign::after {
  content: "";
  position: absolute;
  background: var(--text-dim);
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
}

.acc__sign::before {
  left: 5px;
  right: 5px;
  top: 9px;
  height: 1px;
}

.acc__sign::after {
  top: 5px;
  bottom: 5px;
  left: 9px;
  width: 1px;
}

.acc__item.is-open .acc__sign {
  transform: rotate(90deg);
  border-color: var(--accent);
}

.acc__item.is-open .acc__sign::after {
  opacity: 0;
}

.acc__body {
  display: none;
  padding: 0 2px 22px;
  max-width: 46em;
  color: var(--text-dim);
  font-size: var(--fs-base);
  line-height: 1.8;
}

.acc__item.is-open .acc__body {
  display: block;
}

.tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  gap: 2px;
}

.tab {
  height: 34px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--text-inv);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 40px;
}

.pager__btn {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.pager__btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.pager__btn[aria-current="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text-inv);
}

.pager__btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.sel {
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  appearance: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.stat {
  display: grid;
  gap: 4px;
}

.stat dt {
  order: 2;
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mnav {
  display: none;
  position: relative;
}

.mnav__sum {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  list-style: none;
  cursor: pointer;
  color: var(--text);
}

.mnav__sum::-webkit-details-marker {
  display: none;
}

.mnav__sum svg {
  width: 18px;
  height: 18px;
}

.mnav__panel {
  position: absolute;
  top: 52px;
  right: 0;
  width: min(78vw, 320px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 4px;
}

.mnav__panel a {
  padding: 10px 12px;
  border-radius: var(--r-xs);
  font-size: var(--fs-base);
  color: var(--text-dim);
}

.mnav__panel a:hover {
  background: var(--paper-2);
  color: var(--text);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--text-inv);
  font-size: var(--fs-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.foot {
  margin-top: var(--sect-y);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}

.foot__in {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 56px 36px;
}

.foot__brand {
  display: grid;
  gap: 14px;
  align-content: start;
}

.foot__brand .logo__mark {
  width: 46px;
  height: 46px;
  background: var(--ink);
}

.foot__brand p {
  max-width: 24em;
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--text-dim);
}

.foot__col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.foot__col h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.foot__col a {
  display: block;
  padding: 4px 0;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  transition: color var(--dur-fast) var(--ease);
}

.foot__col a:hover {
  color: var(--accent-deep);
}

.foot__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-2xs);
  color: var(--text-faint);
}

.foot__bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.foot__bar a {
  display: inline-block;
  padding: 5px 0;
}

.foot__bar a:hover {
  color: var(--accent-deep);
}

@media (max-width: 1100px) {
  .qsearch {
    width: 176px;
  }

  .nav__a {
    padding: 9px 10px;
  }
}

@media (max-width: 960px) {
  .nav,
  .qsearch,
  .hdr__cta {
    display: none;
  }

  .mnav {
    display: block;
  }

  .hdr__in {
    height: 66px;
    gap: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot__in {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 720px) {
  .rank__row {
    grid-template-columns: 40px minmax(0, 1fr) 80px;
    gap: 12px;
  }

  .rank__bar {
    display: none;
  }

  .rail {
    grid-auto-columns: 132px;
    gap: 14px;
  }

  .foot__in {
    grid-template-columns: 1fr;
  }
}

.pcard__bt {
  display: grid;
  gap: 8px;
}

.rank__bar span[data-w="20"] { width: 20%; }
.rank__bar span[data-w="30"] { width: 30%; }
.rank__bar span[data-w="40"] { width: 40%; }
.rank__bar span[data-w="50"] { width: 50%; }
.rank__bar span[data-w="60"] { width: 60%; }
.rank__bar span[data-w="70"] { width: 70%; }
.rank__bar span[data-w="80"] { width: 80%; }
.rank__bar span[data-w="90"] { width: 90%; }
.rank__bar span[data-w="100"] { width: 100%; }

.upd__title a:hover {
  color: var(--accent-deep);
}
