.page-products {
  --pf-sticky: 92px;
  --pf-gap: clamp(16px, 2.2vw, 26px);
}

/* ---------- 页头 ---------- */
.page-products .page-head {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.6vw, 54px) 0 clamp(30px, 4.8vw, 58px);
  border-bottom: 1px solid var(--line);
}

.page-products .page-head::before,
.page-products .page-head::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: pf-breathe 8s var(--ease) infinite;
}

.page-products .page-head::before {
  top: -34%;
  right: -12%;
  width: min(620px, 78vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(58, 240, 220, 0.16), transparent 66%);
}

.page-products .page-head::after {
  bottom: -46%;
  left: -18%;
  width: min(520px, 70vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(139, 92, 255, 0.2), transparent 68%);
  animation-duration: 9s;
  animation-direction: reverse;
}

@keyframes pf-breathe {
  0%, 100% { opacity: 0.76; }
  50% { opacity: 0.92; }
}

.page-products .page-head > .shell {
  position: relative;
  z-index: 1;
}

.page-products .page-head__kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  margin: 14px 0 0;
}

.page-products .page-title {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(2rem, 5.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 15em;
}

.page-products .page-title strong {
  font-weight: 900;
  color: var(--cyan);
  background: linear-gradient(96deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-products .page-lead {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}

.pf-jump {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
}

.pf-jump a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.pf-jump a:hover,
.pf-jump a:focus-visible {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
}

/* ---------- 页面主体网格 ---------- */
.page-products .pf-body {
  padding: clamp(26px, 4vw, 48px) 0 clamp(40px, 6vw, 76px);
}

.page-products .pf-main {
  min-width: 0;
}

.page-products .pf-aside {
  align-self: start;
  position: sticky;
  top: var(--pf-sticky);
  display: grid;
  gap: 18px;
}

/* ---------- 章节 ---------- */
.page-products .chapter {
  padding: clamp(28px, 4.2vw, 52px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.page-products .chapter:first-child {
  border-top: 0;
  padding-top: 0;
}

.page-products .chapter__mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.page-products .chapter__index {
  color: var(--cyan);
  font-weight: 700;
}

.page-products .chapter__title {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.9vw, 2.1rem);
  line-height: 1.26;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 20em;
}

.pf-text {
  margin: 0;
  max-width: 34em;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--muted);
}

.pf-text a,
.pf-note a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(58, 240, 220, 0.4);
}

.pf-text a:hover,
.pf-note a:hover {
  border-bottom-color: var(--cyan);
}

.pf-note {
  margin: 18px 0 0;
  max-width: 34em;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.page-products .pf-fig {
  margin: 26px 0 0;
}

.page-products .media-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.page-products .media-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.page-products .media-frame__caption {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 01 板块卡片带 ---------- */
.page-products .pf-rail {
  display: flex;
  gap: 14px;
  margin: 24px 0 0;
  padding: 4px 4px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

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

.page-products .pf-rail::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

.rail-card {
  position: relative;
  flex: 0 0 min(76vw, 252px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(58, 240, 220, 0.1), transparent 60%),
    linear-gradient(160deg, rgba(12, 20, 36, 0.94), rgba(5, 7, 15, 0.78));
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.rail-card:hover {
  border-color: rgba(58, 240, 220, 0.46);
  transform: translateY(-3px);
}

.rail-card__num {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--violet);
  margin: 0;
}

.rail-card__title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.rail-card__body {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--muted);
  flex: 1;
}

/* ---------- 02 档位列表 ---------- */
.pf-tierlist {
  margin: 24px 0 0;
}

.tier-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 20, 36, 0.62);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}

.tier-row:has(.fold__trigger[aria-expanded="true"]) {
  border-color: rgba(58, 240, 220, 0.5);
  background: rgba(12, 20, 36, 0.86);
}

.tier-row__head {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tier-row__tier {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}

.tier-row__code {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.tier-row__bar {
  position: relative;
  display: block;
  height: 6px;
  min-width: 40px;
  border-radius: 999px;
  background: rgba(30, 43, 69, 0.9);
  overflow: hidden;
}

.tier-row__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.tier-row__toggle {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}

.tier-row__toggle::before,
.tier-row__toggle::after {
  content: "";
  position: absolute;
  background: var(--muted);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.tier-row__toggle::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 1.5px;
}

.tier-row__toggle::after {
  top: 0;
  left: 6px;
  width: 1.5px;
  height: 14px;
}

.tier-row:has(.fold__trigger[aria-expanded="true"]) .tier-row__toggle::after {
  transform: scaleY(0);
  opacity: 0;
}

.tier-row--w1 .tier-row__bar i,
.tier-row--w2 .tier-row__bar i {
  background: linear-gradient(90deg, rgba(58, 240, 220, 0.5), var(--cyan));
}

.tier-row--s1 .tier-row__bar i,
.tier-row--s2 .tier-row__bar i {
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.5), var(--violet));
}

.tier-row--a1 .tier-row__bar i,
.tier-row--a2 .tier-row__bar i {
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.5), var(--gold));
}

.tier-row--w1 .tier-row__bar i { width: 14%; }
.tier-row--w2 .tier-row__bar i { width: 24%; }
.tier-row--s1 .tier-row__bar i { width: 38%; }
.tier-row--s2 .tier-row__bar i { width: 50%; }
.tier-row--a1 .tier-row__bar i { width: 68%; }
.tier-row--a2 .tier-row__bar i { width: 88%; }

.tier-row .fold__inner p {
  margin: 0;
  padding: 0 14px 14px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 03 玩法分类 ---------- */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.genre {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 20, 36, 0.9), rgba(5, 7, 15, 0.7));
  transition: border-color 0.22s var(--ease);
}

.genre:hover {
  border-color: rgba(139, 92, 255, 0.44);
}

.genre__num {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.genre__name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.genre__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

/* ---------- 04 对照卡片 ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 24px 0 0;
}

.compare-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(139, 92, 255, 0.1), transparent 62%),
    linear-gradient(160deg, rgba(12, 20, 36, 0.92), rgba(5, 7, 15, 0.74));
  overflow: hidden;
}

.compare-card::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  opacity: 0.75;
}

.compare-card__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.compare-card__num {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.compare-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.compare-card__specs {
  display: grid;
  gap: 7px;
  margin: 14px 0 14px;
}

.compare-card__specs > div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.compare-card__specs dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.compare-card__specs dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

.compare-card .tag {
  align-self: flex-start;
}

/* ---------- 05 设置影响 ---------- */
.setting-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 24px 0 0;
}

.setting {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 15px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(58, 240, 220, 0.55);
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.66);
}

.setting__key {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.setting__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.setting__body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
}

.setting .tag {
  align-self: flex-start;
}

/* ---------- 06 常见误读 ---------- */
.pf-foldlist {
  margin: 24px 0 0;
}

.myth {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.6);
  margin-bottom: 10px;
  overflow: hidden;
}

.myth__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 15px;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  text-align: left;
  cursor: pointer;
}

.myth__trigger::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}

.myth__trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  border-color: var(--cyan);
}

.myth .fold__inner p {
  margin: 0;
  padding: 0 15px 15px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--muted);
  border-left: 2px solid rgba(255, 108, 147, 0.55);
  margin-left: 15px;
  padding-left: 12px;
}

/* ---------- 侧栏 ---------- */
.page-products .pf-toc {
  padding: 16px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 20, 36, 0.7);
}

.page-products .toc__title {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.pf-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  counter-reset: pf-toc;
}

.pf-toc__list li {
  counter-increment: pf-toc;
}

.page-products .toc__link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.pf-toc__list .toc__link::before {
  content: counter(pf-toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--line);
  transition: color 0.2s var(--ease);
}

.page-products .toc__link:hover {
  color: var(--text);
  background: rgba(58, 240, 220, 0.08);
}

.page-products .toc__link.is-active {
  color: var(--cyan);
  background: rgba(58, 240, 220, 0.1);
}

.page-products .toc__link.is-active::before {
  color: var(--cyan);
}

.pf-tagbox {
  padding: 16px 15px;
  border: 1px solid rgba(255, 179, 71, 0.28);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 179, 71, 0.07), rgba(12, 20, 36, 0.72));
}

.pf-tagbox__title {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.pf-tagbox__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.pf-tagbox__note {
  margin: 12px 0 0;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 959px) {
  .page-products .pf-aside {
    position: static;
    top: auto;
    margin-top: 8px;
  }

  .pf-tagbox__list .tag {
    font-size: 0.68rem;
  }
}

@media (min-width: 640px) {
  .page-products .compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (min-width: 900px) {
  .genre-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tier-row__head {
    grid-template-columns: 88px 44px minmax(0, 1fr) 16px;
    gap: 14px;
    padding: 15px 18px;
  }

  .tier-row .fold__inner p {
    padding: 0 18px 16px;
  }
}

@media (max-width: 419px) {
  .tier-row__head {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 12px;
  }

  .tier-row__tier {
    font-size: 0.82rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  .page-products .page-head::before,
  .page-products .page-head::after {
    animation: none;
  }

  .rail-card,
  .pf-jump a,
  .tier-row__toggle::before,
  .tier-row__toggle::after,
  .myth__trigger::after {
    transition: none;
  }

  .rail-card:hover {
    transform: none;
  }
}
