.page-home {
  position: relative;
  display: block;
  overflow-x: clip;
  color: var(--text-on-ink);
  background:
    radial-gradient(1100px 560px at 84% -4%, rgba(47, 191, 160, 0.10), transparent 62%),
    radial-gradient(880px 520px at 4% 14%, rgba(232, 181, 74, 0.09), transparent 58%),
    var(--ink);
}

/* ---------- 面包屑 ---------- */
.page-home > .breadcrumb {
  display: flex;
  align-items: center;
  width: min(var(--wrap), 100% - 32px);
  margin: 0 auto;
  padding: 20px 0 6px;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.page-home > .breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}

.page-home > .breadcrumb a:hover,
.page-home > .breadcrumb a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 首屏框景 ---------- */
.page-home .home-hero {
  position: relative;
  padding: clamp(14px, 2.4vw, 28px) clamp(12px, 2vw, 22px) clamp(34px, 5vw, 60px);
}

.page-home .home-hero__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  min-height: clamp(430px, 74vh, 650px);
  border: 1px solid var(--line-gold);
  border-radius: 40px 12px 40px 12px;
  background: linear-gradient(165deg, var(--ink-deep), var(--ink) 48%, var(--ink-layer));
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  isolation: isolate;
}

.page-home .home-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-home .home-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.page-home .home-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(178deg, rgba(5, 18, 31, 0.28) 0%, rgba(5, 18, 31, 0.74) 48%, rgba(5, 18, 31, 0.96) 100%),
    linear-gradient(96deg, rgba(7, 26, 47, 0.6) 0%, rgba(7, 26, 47, 0) 64%);
  pointer-events: none;
}

.page-home .home-hero__rule {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 8px;
  color: var(--gold);
  opacity: 0.55;
  pointer-events: none;
}

.page-home .home-hero__rule line {
  stroke: currentColor;
  stroke-width: 0.7;
}

.page-home .home-hero__body {
  position: relative;
  z-index: 3;
  max-width: 760px;
  padding: clamp(96px, 20vw, 160px) clamp(20px, 4vw, 56px) clamp(16px, 2.6vw, 24px);
}

.page-home .home-hero__body .eyebrow {
  display: block;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold-light);
}

.page-home .home-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 6.6vw, 54px);
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow:
    0 0 1px rgba(232, 181, 74, 0.95),
    0 0 24px rgba(232, 181, 74, 0.34),
    0 6px 26px rgba(0, 0, 0, 0.72);
}

.page-home .home-hero__lede {
  max-width: 34em;
  margin: 16px 0 0;
  font-size: clamp(15px, 3.5vw, 17px);
  line-height: 1.78;
  color: var(--text-on-ink);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 30px);
}

.page-home .home-hero__facts {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-gold);
  background: linear-gradient(180deg, rgba(5, 18, 31, 0.52), rgba(5, 18, 31, 0.92));
}

.page-home .home-hero__facts li {
  flex: 1 1 46%;
  min-width: 132px;
  padding: 13px clamp(12px, 2vw, 20px);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-mute);
}

.page-home .home-hero__facts li + li {
  border-left: 1px solid var(--line-hair);
}

.page-home .home-hero__facts .mono {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--gold);
}

/* ---------- 章节公共头部 ---------- */
.page-home .home-head {
  max-width: 760px;
}

.page-home .chapter-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.page-home .chapter-marker__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-gold), rgba(232, 181, 74, 0));
}

.page-home h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(23px, 4.7vw, 38px);
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.page-home .home-head__lede {
  max-width: 34em;
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-mute);
}

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

.page-home .home-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 64px;
  background: linear-gradient(100deg, rgba(232, 181, 74, 0) 0%, rgba(232, 181, 74, 0.12) 38%, rgba(47, 191, 160, 0.11) 64%, rgba(47, 191, 160, 0) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 24%, 0 100%);
  pointer-events: none;
}

.page-home .home-band--rev {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 22%);
}

/* ---------- CH.01 房间阶梯 ---------- */
.page-home .home-rooms,
.page-home .home-order,
.page-home .home-range,
.page-home .home-updates {
  position: relative;
  padding: clamp(52px, 9vw, 100px) 0;
}

.page-home .home-rooms__figure {
  margin: clamp(26px, 4vw, 40px) 0 0;
}

.page-home .stair-list {
  display: grid;
  gap: 8px;
  margin-top: clamp(18px, 3vw, 28px);
}

.page-home .room-step {
  position: relative;
  margin-left: calc((var(--step, 1) - 1) * 4.2%);
  border: 1px solid var(--line-hair);
  border-radius: var(--radius-soft);
  background: linear-gradient(118deg, rgba(14, 44, 74, 0.9), rgba(7, 26, 47, 0.93));
  transition: border-color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.page-home .room-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: var(--radius-soft) 0 0 var(--radius-soft);
  background: linear-gradient(180deg, var(--gold-light), rgba(232, 181, 74, 0.16));
  opacity: calc(0.3 + var(--step, 1) * 0.115);
}

.page-home .room-step:hover {
  border-color: var(--line-gold);
}

.page-home .room-step[data-open="true"] {
  border-color: var(--line-gold);
  transform: translateX(-3px);
  box-shadow: 0 20px 44px -32px rgba(232, 181, 74, 0.95);
}

.page-home .room-step__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px clamp(14px, 2.4vw, 22px);
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.page-home .room-step__head:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: -2px;
}

.page-home .room-step__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.page-home .room-step__name {
  font-size: clamp(15.5px, 3.6vw, 17px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.page-home .room-step__gate {
  flex: none;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
}

.page-home .room-step__sign {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: 10px;
}

.page-home .room-step__sign::before,
.page-home .room-step__sign::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--gold);
  transform: translate(-50%, -50%);
  transition: transform 240ms var(--ease);
}

.page-home .room-step__sign::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.page-home .room-step[data-open="true"] .room-step__sign::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.page-home .room-step__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms var(--ease);
}

.page-home .room-step[data-open="true"] .room-step__body {
  max-height: 340px;
}

.page-home .room-step__pad {
  padding: 0 clamp(14px, 2.4vw, 22px) 18px;
}

.page-home .room-step__desc {
  max-width: 40em;
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-mute);
}

.page-home .room-step__fit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-on-ink);
}

.page-home .room-step__link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--jade);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 191, 160, 0.4);
  padding-bottom: 1px;
}

.page-home .room-step__link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--line-gold);
}

/* ---------- CH.02 出牌顺序 ---------- */
.page-home .order-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2vw, 18px);
  margin-top: clamp(26px, 4vw, 44px);
}

.page-home .order-card {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line-hair);
  border-radius: var(--radius-organic);
  background: linear-gradient(150deg, rgba(14, 44, 74, 0.84), rgba(7, 26, 47, 0.92));
  overflow: hidden;
}

.page-home .order-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 181, 74, 0.16), rgba(232, 181, 74, 0) 68%);
  pointer-events: none;
}

.page-home .order-card:nth-child(2)::after {
  background: radial-gradient(circle, rgba(255, 122, 69, 0.16), rgba(255, 122, 69, 0) 68%);
}

.page-home .order-card:nth-child(3)::after {
  background: radial-gradient(circle, rgba(47, 191, 160, 0.16), rgba(47, 191, 160, 0) 68%);
}

.page-home .order-card:nth-child(4)::after {
  background: radial-gradient(circle, rgba(111, 227, 255, 0.15), rgba(111, 227, 255, 0) 68%);
}

.page-home .order-card__idx {
  display: inline-block;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border-bottom: 1px solid var(--line-gold);
}

.page-home .order-card h3 {
  margin: 14px 0 10px;
  font-size: clamp(16.5px, 3.8vw, 19px);
  font-weight: 800;
  line-height: 1.42;
  color: #ffffff;
}

.page-home .order-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.86;
  color: var(--text-mute);
}

.page-home .order-card__tag {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  color: var(--neon);
}

/* ---------- CH.03 残局关数 ---------- */
.page-home .home-range__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(24px, 4vw, 38px);
}

.page-home .stair-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--silver);
  text-decoration: none;
  border: 1px solid var(--line-hair);
  border-radius: 999px;
  background: rgba(14, 44, 74, 0.7);
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease);
}

.page-home .stair-nav__item:hover,
.page-home .stair-nav__item:focus-visible {
  color: var(--gold-light);
  border-color: var(--line-gold);
}

.page-home .stair-nav__item[aria-current="true"],
.page-home .stair-nav__item[aria-pressed="true"] {
  color: var(--ink-deep);
  background: var(--jade);
  border-color: var(--jade);
}

.page-home .home-range__panels {
  display: grid;
  gap: 10px;
  margin-top: clamp(18px, 3vw, 26px);
}

.page-home .range-panel {
  position: relative;
  margin-right: calc((var(--step, 1) - 1) * 5%);
  padding: clamp(16px, 2.6vw, 24px);
  border: 1px dashed var(--line-hair);
  border-radius: 4px 18px 4px 18px;
  background: linear-gradient(140deg, rgba(7, 26, 47, 0.74), rgba(14, 44, 74, 0.52));
  transition: border-color 220ms var(--ease), background 220ms var(--ease);
}

.page-home .range-panel:hover {
  border-color: var(--line-gold);
  background: linear-gradient(140deg, rgba(14, 44, 74, 0.86), rgba(7, 26, 47, 0.7));
}

.page-home .range-panel__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(16px, 3.4vw, 21px);
  letter-spacing: 0.04em;
  color: var(--gold);
}

.page-home .range-panel h3 {
  margin: 8px 0 8px;
  font-size: clamp(15.5px, 3.6vw, 18px);
  font-weight: 800;
  line-height: 1.42;
  color: #ffffff;
}

.page-home .range-panel p {
  max-width: 42em;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-mute);
}

.page-home .range-panel__link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--jade);
  text-decoration: none;
}

.page-home .range-panel__link:hover {
  color: var(--gold-light);
}

.page-home .home-range__figure {
  margin: clamp(24px, 4vw, 40px) 0 0;
}

/* ---------- CH.04 机制护栏（暖纸色） ---------- */
.page-home .home-rails {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0;
  color: var(--soot);
  background:
    radial-gradient(1000px 480px at 10% 0%, rgba(232, 181, 74, 0.16), transparent 62%),
    radial-gradient(760px 420px at 96% 88%, rgba(47, 191, 160, 0.13), transparent 64%),
    var(--paper);
}

.page-home .home-rails::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 46px;
  background: linear-gradient(96deg, var(--gold) 0%, rgba(232, 181, 74, 0) 58%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: 0.55;
  pointer-events: none;
}

.page-home .home-rails h2,
.page-home .home-rails h3 {
  color: var(--soot);
}

.page-home .home-rails .chapter-marker {
  color: #946c1c;
}

.page-home .home-rails .chapter-marker__line {
  background: linear-gradient(90deg, rgba(148, 108, 28, 0.5), rgba(148, 108, 28, 0));
}

.page-home .home-rails .home-head__lede {
  color: rgba(27, 26, 23, 0.76);
}

.page-home .home-rails .img-frame__tag {
  color: var(--soot);
}

.page-home .rail-track {
  position: relative;
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  margin: clamp(28px, 4vw, 42px) 0 0;
  padding: 0 0 0 28px;
  list-style: none;
}

.page-home .rail-track::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(232, 181, 74, 0.18));
}

.page-home .rail-node {
  position: relative;
}

.page-home .rail-node::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 181, 74, 0.2);
}

.page-home .rail-node__label {
  display: inline-block;
  margin-bottom: 9px;
  padding: 3px 11px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: #7a5716;
  background: rgba(232, 181, 74, 0.24);
  border-radius: 999px;
}

.page-home .rail-node h3 {
  margin: 0 0 8px;
  font-size: clamp(16px, 3.6vw, 18.5px);
  font-weight: 800;
  line-height: 1.45;
}

.page-home .rail-node__text {
  max-width: 42em;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: rgba(27, 26, 23, 0.76);
}

.page-home .home-rails__figure {
  margin: clamp(26px, 4vw, 40px) 0 0;
}

/* ---------- CH.05 最近更新 ---------- */
.page-home .home-updates {
  background:
    radial-gradient(900px 420px at 88% 6%, rgba(255, 122, 69, 0.11), transparent 62%),
    radial-gradient(700px 400px at 2% 64%, rgba(111, 227, 255, 0.07), transparent 62%);
}

.page-home .updates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 26px);
  margin-top: clamp(26px, 4vw, 40px);
}

.page-home .updates-list {
  display: grid;
  gap: 0;
  align-content: start;
}

.page-home .note-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px clamp(10px, 2vw, 16px);
  text-decoration: none;
  border-bottom: 1px solid var(--line-hair);
  transition: background 220ms var(--ease), padding-left 220ms var(--ease);
}

.page-home .note-item:hover,
.page-home .note-item:focus-visible {
  background: rgba(232, 181, 74, 0.08);
  padding-left: clamp(16px, 3vw, 26px);
}

.page-home .note-item__time {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gold);
  white-space: nowrap;
}

.page-home .note-item__title {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-on-ink);
}

.page-home .note-item__tag {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.page-home .note-item:hover .note-item__tag,
.page-home .note-item:focus-visible .note-item__tag {
  opacity: 1;
  transform: none;
}

.page-home .updates-more {
  justify-self: start;
  margin-top: 20px;
}

.page-home .updates-help {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-organic);
  background: linear-gradient(150deg, rgba(14, 44, 74, 0.92), rgba(5, 18, 31, 0.96));
  overflow: hidden;
}

.page-home .updates-help::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 191, 160, 0.22), rgba(47, 191, 160, 0) 70%);
  pointer-events: none;
}

.page-home .updates-help h3 {
  margin: 0 0 10px;
  font-size: clamp(17px, 4vw, 20px);
  font-weight: 800;
  color: #ffffff;
}

.page-home .updates-help p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.86;
  color: var(--text-mute);
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .page-home .note-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .page-home .note-item__tag {
    display: none;
  }

  .page-home .room-step {
    margin-left: calc((var(--step, 1) - 1) * 3.2%);
  }

  .page-home .range-panel {
    margin-right: 0;
  }
}

@media (max-width: 560px) {
  .page-home .room-step__gate {
    display: none;
  }

  .page-home .home-hero__facts li {
    flex: 1 1 100%;
  }

  .page-home .home-hero__facts li + li {
    border-left: 0;
    border-top: 1px solid var(--line-hair);
  }

  .page-home .home-hero__frame {
    border-radius: 26px 8px 26px 8px;
  }
}

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

  .page-home .order-card:nth-child(2n) {
    transform: translateY(-10px);
  }
}

@media (min-width: 880px) {
  .page-home .updates-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
  }

  .page-home .home-hero__facts li {
    flex: 1 1 0;
    border-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .room-step,
  .page-home .room-step__body,
  .page-home .room-step__sign::before,
  .page-home .room-step__sign::after,
  .page-home .note-item,
  .page-home .note-item__tag,
  .page-home .stair-nav__item,
  .page-home .range-panel {
    transition-duration: 120ms;
  }

  .page-home .room-step[data-open="true"],
  .page-home .order-card:nth-child(2n) {
    transform: none;
  }
}

.page-home {
  --step: 1;
}
