@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --pink: #FF7A9C;
  --pink-deep: #E24E7C;
  --cream: #FFD98E;
  --ink: #3B3363;
  --paper: #FFF7EC;
  --card: #FFFFFF;
  --line: #F0E1D3;
  --soft: #FFF2E8;
  --r: 10px;
  --shadow-clay: 0 14px 28px rgba(59, 51, 99, .12), inset 0 -4px 0 rgba(59, 51, 99, .06), inset 0 3px 0 #fff;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 38px 0 0;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(255, 217, 142, .55), transparent 70%),
    radial-gradient(700px 380px at -10% 30%, rgba(255, 122, 156, .22), transparent 70%),
    var(--paper);
  color: var(--ink);
  font-family: 'Nunito', 'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* ---------- 顶部细条 ---------- */
.ticker {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 38px;
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .22em;
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--cream));
  box-shadow: 0 4px 14px rgba(59, 51, 99, .16);
  overflow: hidden;
  white-space: nowrap;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .35);
  flex: none;
}

/* ---------- 左侧竖排胶囊导航 ---------- */
.dock {
  position: fixed;
  left: 14px;
  top: 54px;
  z-index: 90;
  max-width: 210px;
}

.dock summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 66px;
  min-height: 66px;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-clay);
  user-select: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.dock summary::-webkit-details-marker { display: none; }

.dock summary:hover { transform: translateY(-2px); }

.dock-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(150deg, var(--pink), var(--pink-deep));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
}

.dock-hint {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #A4748C;
}

.dock-menu {
  list-style: none;
  margin: 10px 0 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 200px;
  max-height: 64vh;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-clay);
}

.details-closed .dock-menu { display: none; }
details:not([open]) .dock-menu { display: none; }

.dock-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  background: var(--soft);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.dock-menu a:hover,
.dock-menu a:focus-visible {
  background: var(--pink);
  color: #fff;
  transform: translateX(3px);
}

/* ---------- 主栅格 ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 0 26px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- 视差首屏 ---------- */
.stage {
  position: sticky;
  top: 38px;
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 0;
  height: calc(100svh - 38px);
  min-height: 430px;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(158deg, #FFE7AE 0%, var(--pink) 62%, #EE5C8B 100%);
  box-shadow: inset 0 -22px 40px rgba(59, 51, 99, .18);
  will-change: transform;
}

.layer {
  position: absolute;
  inset: -8% 0;
  pointer-events: none;
}

.layer-sky {
  background:
    radial-gradient(220px 160px at 18% 22%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(300px 220px at 82% 74%, rgba(255, 217, 142, .75), transparent 72%),
    radial-gradient(200px 200px at 60% 8%, rgba(255, 255, 255, .38), transparent 70%);
}

.layer-img { overflow: hidden; opacity: .58; }

.layer-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.layer-veil {
  background: linear-gradient(180deg, rgba(59, 51, 99, .34), rgba(59, 51, 99, .08) 42%, rgba(255, 247, 236, .82));
}

.layer-blob {
  background:
    radial-gradient(200px 140px at 26% 78%, rgba(255, 255, 255, .5), transparent 70%),
    radial-gradient(260px 160px at 74% 30%, rgba(255, 122, 156, .55), transparent 72%);
  filter: blur(2px);
}

.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  padding: 0 26px 40px 92px;
  text-align: center;
}

.hero-h1 {
  margin: 0;
  max-width: 15em;
  font-size: clamp(29px, 5.6vw, 58px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: .015em;
  color: #fff;
  text-shadow: 0 8px 26px rgba(59, 51, 99, .5), 0 2px 0 rgba(59, 51, 99, .25);
}

@supports (animation-timeline: scroll()) {
  .layer-img {
    animation: rise linear both;
    animation-timeline: scroll(root);
    animation-range: 0 110vh;
  }
  .layer-blob {
    animation: drift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 110vh;
  }
  .hero-h1 {
    animation: fade linear both;
    animation-timeline: scroll(root);
    animation-range: 0 62vh;
  }
}

@keyframes rise { to { transform: translateY(16%) scale(1.06); } }
@keyframes drift { to { transform: translateY(-26%); } }
@keyframes fade { to { opacity: .1; transform: translateY(-26px); } }

/* ---------- 正文 ---------- */
article {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  margin-top: -8vh;
  padding: 40px 32px 52px 88px;
  border-radius: 28px 28px 0 0;
  background: #FFFDF9;
  box-shadow: 0 -20px 44px rgba(59, 51, 99, .14);
}

article section {
  margin: 0 0 24px;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--cream);
  border-radius: var(--r);
  box-shadow: 0 12px 24px rgba(59, 51, 99, .07), inset 0 2px 0 #fff;
  scroll-margin-top: 96px;
}

article section:nth-of-type(even) { border-bottom-color: var(--pink); }

article small {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .2em;
  color: #B76A88;
}

article h2 {
  margin: .18em 0 .62em;
  font-size: clamp(21px, 2.7vw, 29px);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -.01em;
}

article small + h2 { margin-top: .1em; }

article h3 {
  margin: 1.5em 0 .45em;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 900;
}

article p,
article ul,
article ol { max-width: 62ch; }

article p { margin: 0 0 1.05em; }

article ul,
article ol { margin: 0 0 1.05em; padding-left: 1.35em; }

article li { margin: .35em 0; }

article a {
  color: var(--pink-deep);
  text-decoration: underline;
  text-decoration-color: var(--cream);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}
article a:hover { color: var(--ink); }

article img {
  display: block;
  height: auto;
  margin: 1.1em 0;
  border-radius: var(--r);
  box-shadow: 0 10px 22px rgba(59, 51, 99, .14);
}

article blockquote {
  margin: 0 0 1.1em;
  padding: 14px 18px;
  background: var(--soft);
  border-left: 5px solid var(--pink);
  border-radius: var(--r);
  font-style: normal;
}

article blockquote p:last-child { margin-bottom: 0; }

article table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}

article th,
article td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

article pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: var(--r);
  background: #F7EEF6;
  font-size: 15px;
}

/* ---------- 右侧栏 ---------- */
.rail {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  position: sticky;
  top: 62px;
  z-index: 3;
  margin-top: -8vh;
  padding: 18px 16px 20px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-clay);
}

.rail-k {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .22em;
  color: #B76A88;
}

.rail-h {
  margin: .1em 0 .8em;
  font-size: 19px;
  font-weight: 900;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: railc;
}

.rail-list li { counter-increment: railc; }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  background: var(--soft);
  transition: background .18s ease, color .18s ease;
}

.rail-list a::before {
  content: counter(railc, decimal-leading-zero);
  font-size: 12px;
  font-weight: 900;
  color: var(--pink-deep);
}

.rail-list a:hover { background: var(--cream); color: var(--ink); }

/* ---------- 页脚 ---------- */
.ft {
  position: relative;
  z-index: 4;
  margin-top: 56px;
  padding: 44px 22px 26px;
  background: var(--ink);
  color: #FFF3E4;
  border-radius: 30px 30px 0 0;
}

.ft-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 217, 142, .28);
}

.ft-mark {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--cream);
}

.ft-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ft-form input {
  min-height: 44px;
  padding: 0 16px;
  width: 220px;
  max-width: 60vw;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: #FFF7EC;
}

.ft-form button {
  min-height: 44px;
  padding: 0 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--cream), var(--pink));
  cursor: pointer;
  transition: transform .18s ease;
}

.ft-form button:hover { transform: translateY(-2px); }

.ft-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto 26px;
}

.ft-cols dl { margin: 0; }

.ft-cols dt {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2em;
  color: var(--cream);
}

.ft-cols dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.ft-cols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-right: 14px;
  color: #FFF3E4;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 217, 142, .3);
}

.ft-cols dd a + a { margin-left: 6px; }

.ft-cols dd a:hover { color: var(--cream); }

.ft-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 217, 142, .28);
  font-size: 15px;
}

.ft-base p { margin: 0; }

.ft-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--cream);
  text-decoration: none;
  font-weight: 800;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 880px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .stage {
    border-radius: 0 0 22px 22px;
  }

  .hero-copy { padding: 0 22px 30px; }

  article {
    grid-column: 1;
    margin-top: -6vh;
    padding: 28px 18px 36px;
    border-radius: 22px 22px 0 0;
  }

  article section { padding: 18px 16px; }

  .rail {
    grid-column: 1;
    grid-row: 3;
    position: static;
    margin: 22px 18px 0;
  }

  .dock { left: 10px; top: 48px; }
  .dock summary { width: 60px; min-height: 60px; }
  .dock-menu { width: min(200px, 62vw); }

  .ft-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ft-base { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
