:root {
  color-scheme: light;
  --temple-red: #a7191f;
  --deep-red: #771217;
  --bright-red: #c72b2d;
  --gold: #f4d57b;
  --ink: #201b16;
  --stone: #5e554c;
  --stone-light: #ece7de;
  --paper: #fff8e8;
  --white: #fffdf8;
  --sage: #52725f;
  --blue: #315f7c;
  --shadow: 0 18px 48px rgba(54, 21, 12, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 248, 232, 0.78), rgba(236, 231, 222, 0.96)),
    var(--stone-light);
  color: var(--ink);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
blockquote {
  margin-top: 0;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(72, 10, 12, 0.94), rgba(112, 18, 21, 0.76) 46%, rgba(37, 61, 54, 0.34)),
    url("assets/temple-stairs-hero.jpg") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 16vh;
  background: linear-gradient(180deg, transparent, var(--stone-light));
  pointer-events: none;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--gold);
  font-size: 1.18rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: rgba(255, 253, 248, 0.86);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
  align-items: center;
  gap: 34px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 112px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 900;
}

h1 {
  margin-bottom: 18px;
  font-size: 4.6rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 34px;
  color: rgba(255, 253, 248, 0.9);
  font-size: 1.25rem;
  line-height: 1.75;
}

.age-form {
  width: min(560px, 100%);
}

.age-form label {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 253, 248, 0.88);
  font-weight: 800;
}

.age-control {
  display: grid;
  grid-template-columns: minmax(92px, 132px) minmax(150px, 1fr);
  gap: 12px;
}

.age-control input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(244, 213, 123, 0.46);
  border-radius: 8px;
  padding: 0 18px;
  background: rgba(255, 248, 232, 0.94);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
}

.age-control button {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  padding: 0 24px;
  background: var(--gold);
  color: #441108;
  font-weight: 950;
  box-shadow: var(--shadow);
}

.quote-preview {
  min-height: 34px;
  margin: 14px 0 0;
  color: rgba(255, 248, 220, 0.92);
  line-height: 1.6;
}

.age-guide-card {
  min-width: 0;
  border: 1px solid rgba(255, 248, 232, 0.58);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.result-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.result-kicker,
.panel-label {
  margin: 0 0 8px;
  color: var(--deep-red);
  font-size: 0.82rem;
  font-weight: 950;
}

.result-head h2 {
  margin: 0;
  color: var(--deep-red);
  font-size: 5rem;
  line-height: 0.9;
  letter-spacing: 0;
}

.result-head small {
  font-size: 1.45rem;
}

.result-head p:last-child {
  margin: 0 0 4px;
  color: #4a3027;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.65;
}

blockquote {
  margin: 0 0 18px;
  border-left: 5px solid var(--gold);
  padding: 10px 0 10px 16px;
  color: #24170f;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.5;
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.guide-panel {
  min-width: 0;
}

.guide-panel > p:last-child,
.quote-panel > p {
  color: #4b372f;
  line-height: 1.85;
}

.psychology-card {
  margin-top: 14px;
  border: 1px solid rgba(167, 25, 31, 0.16);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(244, 213, 123, 0.16);
}

.psychology-card strong,
.psychology-card span {
  display: block;
}

.psychology-card strong {
  margin-bottom: 6px;
  color: var(--deep-red);
  font-size: 0.9rem;
  line-height: 1.45;
}

.psychology-card span {
  color: #5c4437;
  font-size: 0.88rem;
  line-height: 1.75;
}

.spire-list {
  display: grid;
  gap: 9px;
}

.spire-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.spire-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--deep-red);
  color: var(--gold);
  font-weight: 950;
}

.spire-item span {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 900;
}

.spire-item p {
  margin: 0;
  color: #564139;
  font-size: 0.9rem;
  line-height: 1.65;
}

.age-dock {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 248, 232, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(128, 34, 24, 0.15);
}

.dock-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 84px;
  margin: 0 auto;
}

.dock-current {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 14px;
}

.dock-age {
  flex: 0 0 auto;
  color: var(--deep-red);
  font-size: 1.7rem;
  font-weight: 950;
}

.dock-quote {
  min-width: 0;
  color: #4b3127;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.icon-button,
.back-top {
  border: 0;
  border-radius: 8px;
  background: var(--temple-red);
  color: var(--gold);
  font-weight: 950;
}

.icon-button {
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
  line-height: 1;
}

input[type="range"] {
  accent-color: var(--temple-red);
}

.milestones {
  background: var(--paper);
  border-bottom: 1px solid rgba(128, 34, 24, 0.12);
}

.section-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
}

.milestone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.milestone-list button {
  min-height: 40px;
  border: 1px solid rgba(167, 25, 31, 0.2);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--white);
  color: var(--deep-red);
  font-weight: 850;
}

.milestone-list button.active {
  background: var(--temple-red);
  color: var(--gold);
  border-color: var(--temple-red);
}

.gift-section {
  padding: 60px 0 74px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(236, 231, 222, 0.9)),
    var(--white);
}

.section-heading {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 24px;
}

.section-heading h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 2.25rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--stone);
  line-height: 1.65;
}

.gift-showcase,
.gift-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gift-showcase {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.gift-item {
  min-width: 0;
  border: 1px solid rgba(128, 34, 24, 0.16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 253, 248, 0.9);
}

.gift-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.gift-item strong,
.gift-item span,
.gift-item small {
  display: block;
}

.gift-item strong {
  color: var(--deep-red);
  font-size: 1rem;
  line-height: 1.35;
}

.gift-item em {
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(82, 114, 95, 0.12);
  color: var(--sage);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.gift-item span {
  color: #574239;
  font-size: 0.9rem;
  line-height: 1.7;
}

.gift-item small {
  margin-top: 8px;
  color: #807169;
  font-size: 0.76rem;
  line-height: 1.45;
}

.buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.buy-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(49, 95, 124, 0.28);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(49, 95, 124, 0.08);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.buy-links a:hover,
.buy-links a:focus-visible {
  background: rgba(49, 95, 124, 0.15);
}

.stairs-section {
  position: relative;
  padding: 68px 0 96px;
  background:
    linear-gradient(180deg, rgba(236, 231, 222, 0.74), rgba(236, 231, 222, 0.96)),
    url("assets/temple-stairs-gate.jpg") center top / cover fixed;
}

.stair-frame {
  position: relative;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.stair-shadow {
  position: absolute;
  inset: 18px 10px 18px;
  background: rgba(31, 27, 23, 0.24);
  filter: blur(20px);
  transform: skewY(-1.6deg);
  pointer-events: none;
}

.stair-list {
  position: relative;
  display: grid;
  gap: 10px;
}

.stair-step {
  position: relative;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 154, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(125, 18, 21, 0.95), rgba(194, 43, 44, 0.96)),
    var(--temple-red);
  color: var(--gold);
  box-shadow:
    inset 0 -10px 0 rgba(72, 10, 12, 0.18),
    0 8px 18px rgba(63, 26, 18, 0.2);
  scroll-margin-top: 120px;
  transform: translateX(calc(var(--indent) * 1px));
  width: calc(100% - calc(var(--indent) * 1px));
}

.stair-step::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 44%),
    radial-gradient(circle at 12% 30%, rgba(244, 213, 123, 0.18), transparent 28%);
  pointer-events: none;
}

.stair-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(82px, 128px) minmax(0, 1fr) 52px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.stair-step.is-active {
  outline: 4px solid rgba(255, 248, 220, 0.88);
  background:
    linear-gradient(90deg, #8d1016, #db3434),
    var(--bright-red);
}

.stair-step.is-active .age-number,
.stair-step.is-active .age-quote,
.stair-step.is-expanded .age-number,
.stair-step.is-expanded .age-quote {
  color: #fff3b4;
}

.age-number,
.age-quote,
.expand-mark {
  position: relative;
  z-index: 1;
}

.age-number {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid rgba(244, 213, 123, 0.28);
  font-size: 2rem;
  font-weight: 950;
  white-space: nowrap;
}

.age-quote {
  min-width: 0;
  padding: 12px 26px;
  font-size: 1.55rem;
  font-weight: 850;
  line-height: 1.35;
}

.expand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(244, 213, 123, 0.42);
  border-radius: 8px;
  color: #fff3b4;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.stair-step.is-expanded .expand-mark {
  transform: rotate(45deg);
}

.stair-detail {
  position: relative;
  z-index: 1;
  padding: 0 24px 28px 152px;
  color: #fff8d8;
}

.stair-detail[hidden] {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  padding-top: 8px;
  border-top: 1px solid rgba(244, 213, 123, 0.26);
}

.detail-panel {
  min-width: 0;
  padding-top: 18px;
}

.detail-panel h3 {
  margin: 0 0 10px;
  color: #fff3b4;
  font-size: 1.08rem;
  line-height: 1.3;
}

.detail-panel p {
  margin: 0;
  color: rgba(255, 248, 216, 0.9);
  font-size: 0.98rem;
  line-height: 1.85;
}

.detail-kicker {
  margin-bottom: 8px !important;
  color: rgba(244, 213, 123, 0.84) !important;
  font-size: 0.8rem !important;
  font-weight: 900;
}

.detail-wish {
  margin-top: 12px !important;
  color: #ffe9a1 !important;
  font-weight: 800;
}

.detail-panel .psychology-card {
  border-color: rgba(255, 243, 180, 0.24);
  background: rgba(255, 243, 180, 0.1);
}

.detail-panel .psychology-card strong {
  color: #fff3b4;
}

.detail-panel .psychology-card span {
  color: rgba(255, 248, 216, 0.84);
}

.commerce-note {
  margin: -2px 0 12px !important;
  color: rgba(255, 248, 216, 0.72) !important;
  font-size: 0.84rem !important;
  line-height: 1.6 !important;
}

.detail-panel .gift-item {
  border-color: rgba(244, 213, 123, 0.22);
  background: rgba(71, 10, 12, 0.28);
}

.detail-panel .gift-item strong {
  color: #fff3b4;
}

.detail-panel .gift-item em {
  border: 1px solid rgba(255, 243, 180, 0.24);
  background: transparent;
  color: #ffe9a1;
}

.detail-panel .gift-item span {
  color: rgba(255, 248, 216, 0.84);
}

.detail-panel .gift-item small {
  color: rgba(255, 248, 216, 0.58);
}

.detail-panel .buy-links a {
  border-color: rgba(255, 243, 180, 0.28);
  background: rgba(255, 243, 180, 0.12);
  color: #fff3b4;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  width: 48px;
  height: 48px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

:focus-visible {
  outline: 3px solid #2f7cc0;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .age-guide-card {
    max-width: 760px;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 88vh;
  }

  .nav,
  .hero-grid {
    width: min(100% - 28px, 1180px);
  }

  .nav-links {
    gap: 12px;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  .hero-copy {
    font-size: 1.06rem;
  }

  .age-control,
  .guide-grid,
  .detail-grid,
  .gift-showcase,
  .gift-list {
    grid-template-columns: 1fr;
  }

  .result-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .result-head h2 {
    font-size: 4rem;
  }

  .dock-inner {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 1180px);
    gap: 10px;
    padding: 12px 0;
  }

  .dock-current {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .dock-quote {
    width: 100%;
  }

  .section-inner,
  .section-heading,
  .gift-showcase {
    width: min(100% - 28px, 1180px);
  }

  .section-heading h2 {
    font-size: 1.85rem;
  }

  .stairs-section {
    padding-top: 48px;
    background-attachment: scroll;
  }

  .stair-step {
    min-height: 76px;
    transform: none;
    width: 100%;
  }

  .stair-summary {
    grid-template-columns: 82px minmax(0, 1fr) 44px;
    min-height: 76px;
  }

  .age-number {
    font-size: 1.35rem;
  }

  .age-quote {
    padding: 12px 16px;
    font-size: 1.06rem;
    line-height: 1.45;
  }

  .expand-mark {
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
  }

  .stair-detail {
    padding: 0 16px 22px 98px;
  }
}

@media (max-width: 460px) {
  .nav-links {
    display: none;
  }

  h1 {
    font-size: 2.7rem;
  }

  .age-guide-card {
    padding: 18px;
  }

  blockquote {
    font-size: 1.18rem;
  }

  .stair-summary {
    grid-template-columns: 68px minmax(0, 1fr) 40px;
  }

  .age-number {
    font-size: 1.08rem;
  }

  .age-quote {
    font-size: 0.98rem;
  }

  .stair-detail {
    padding-left: 82px;
  }
}
