@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #26171a;
  --pink: #eb879c;
  --rose: #ffb6c1;
  --plum-a: #2c1a1e;
  --plum-b: #1b1013;
  --cream: #fdeef1;
  --line: rgba(255, 182, 193, 0.22);
  --card: rgba(255, 246, 247, 0.05);
  --r: 12px;
  --sh: 0 2px 4px rgba(18, 10, 12, 0.35), 0 12px 30px rgba(18, 10, 12, 0.28);
  --sh-soft: 0 1px 2px rgba(18, 10, 12, 0.28), 0 8px 20px rgba(18, 10, 12, 0.2);
}

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

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

body {
  margin: 0;
  font-family: Nunito, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--cream);
  background:
    radial-gradient(1100px 620px at 12% -10%, rgba(235, 135, 156, 0.3), transparent 62%),
    radial-gradient(900px 520px at 98% 6%, rgba(255, 182, 193, 0.16), transparent 60%),
    linear-gradient(160deg, #26171a 0%, #1c1114 56%, #150c0e 100%);
  background-attachment: fixed;
}

a { color: var(--rose); }

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hide { display: none !important; }

/* 左侧固定胶囊导航 */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 148px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 12px 22px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(44, 26, 30, 0.97), rgba(22, 13, 16, 0.99));
  border-right: 1px solid var(--line);
  box-shadow: 2px 0 18px rgba(12, 6, 8, 0.4);
}

.mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-height: 44px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(140deg, var(--pink), #b9576f);
  box-shadow: var(--sh-soft);
  overflow: hidden;
}

.mark img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 13px;
}

.search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  font: inherit;
  font-size: 15px;
  color: var(--cream);
  background: rgba(255, 182, 193, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search input::placeholder { color: rgba(253, 238, 241, 0.6); }

.search button {
  min-height: 40px;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #2b1216;
  background: linear-gradient(140deg, var(--rose), var(--pink));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.search button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(235, 135, 156, 0.32); }

.pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  color: #fbe4e8;
  background: rgba(255, 182, 193, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 220ms ease, transform 220ms ease, color 220ms ease;
}

.pill:hover,
.pill:focus-visible {
  color: #2b1216;
  background: linear-gradient(140deg, var(--rose), var(--pink));
  transform: translateY(-1px);
}

/* 主体：main > section > div */
.stage {
  padding: 26px 26px 64px 176px;
}

.canvas {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 32px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.canvas > aside {
  grid-column: 1;
  grid-row: 1 / span 40;
  position: sticky;
  top: 18px;
  padding: 20px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

.canvas > :not(aside) { grid-column: 2; }

.side-h {
  margin: 0 0 6px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
}

.side .subtitle {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--rose);
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #f9e6ea;
  background: rgba(255, 182, 193, 0.07);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.side-link:hover,
.side-link:focus-visible {
  color: #fff;
  background: rgba(255, 182, 193, 0.16);
  border-color: var(--line);
}

/* Hero：左图右文 */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  align-items: center;
  min-height: 70vh;
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(235, 135, 156, 0.2), rgba(255, 182, 193, 0.06) 70%);
  border: 1px solid var(--line);
  box-shadow: var(--sh);
  overflow: hidden;
}

.hero.no-media { grid-template-columns: 1fr; min-height: 42vh; }

.hero-copy { text-align: center; }

.hero h1 {
  margin: 0 0 18px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(21, 12, 14, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: #2b1216;
  background: linear-gradient(140deg, var(--rose), var(--pink));
  border-radius: 999px;
  box-shadow: var(--sh-soft);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(235, 135, 156, 0.32); }

.btn.ghost {
  color: #fdeef1;
  background: rgba(255, 246, 247, 0.08);
  border: 1px solid var(--line);
}

.hero-media {
  position: relative;
  order: -1;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 246, 247, 0.06);
  box-shadow: var(--sh-soft);
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms ease;
}

.hero-media img.is-on { opacity: 1; }

.band {
  height: 12px;
  margin: 30px 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--pink), var(--rose) 45%, rgba(255, 182, 193, 0.1));
  transform: skewY(-1.4deg);
  box-shadow: var(--sh-soft);
}

/* 正文区块 */
.canvas > div:not(.hero) {
  margin: 0 0 22px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-soft);
  scroll-margin-top: 96px;
}

.hero { scroll-margin-top: 96px; }

.canvas > div:not(.hero) h2 {
  margin: 0 0 8px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.canvas > div:not(.hero) h3 {
  margin: 22px 0 8px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}

.canvas p { margin: 0 0 14px; }

.canvas p.subtitle {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--rose);
}

.canvas ul,
.canvas ol { margin: 0 0 14px; padding-left: 22px; }

.canvas li { margin: 0 0 8px; }

.canvas a { color: var(--rose); text-underline-offset: 3px; }

.canvas img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--sh-soft);
}

.canvas blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--pink);
  background: rgba(255, 182, 193, 0.08);
  border-radius: 4px 8px 8px 4px;
}

.canvas code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.94em;
  background: rgba(255, 182, 193, 0.14);
  padding: 1px 6px;
  border-radius: 4px;
}

/* 页脚 */
.foot {
  padding: 0 26px 46px 176px;
  max-width: 1420px;
  margin: 0 auto;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px;
  margin-bottom: 26px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(235, 135, 156, 0.3), rgba(255, 182, 193, 0.1));
  box-shadow: var(--sh);
}

.cta-band h2 {
  margin: 0;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.foot-grid dl {
  margin: 0;
  padding: 18px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-soft);
}

.foot-grid dt {
  margin-bottom: 8px;
  font-family: Fredoka, Nunito, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--rose);
}

.foot-grid dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.foot-grid dd a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 4px;
  font-size: 15.5px;
  text-decoration: none;
  color: #f8e5e9;
  border-bottom: 1px dashed rgba(255, 182, 193, 0.18);
}

.foot-grid dd a:hover,
.foot-grid dd a:focus-visible { color: #fff; }

.foot-end {
  margin-top: 26px;
  text-align: center;
  font-size: 15px;
  color: rgba(253, 238, 241, 0.62);
}

.foot-end p { margin: 0; }

/* 移动端 */
@media (max-width: 900px) {
  .rail {
    position: sticky;
    top: 0;
    inset: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 14px rgba(12, 6, 8, 0.45);
  }

  .mark { width: 42px; height: 42px; min-height: 42px; border-radius: 12px; }
  .mark img { width: 40px; height: 40px; }

  .search { flex-direction: row; flex: 0 0 auto; }
  .search input { width: 104px; min-height: 42px; }
  .search button { min-height: 42px; }

  .pills { flex-direction: row; gap: 8px; }
  .pill { flex: 0 0 auto; white-space: nowrap; padding: 10px 15px; }

  .stage { padding: 16px 15px 44px; }

  .canvas { display: block; max-width: none; }

  .canvas > aside {
    position: static;
    grid-row: auto;
    grid-column: auto;
    margin-bottom: 16px;
    padding: 16px 14px;
  }

  .side-h { font-size: 1.05rem; margin-bottom: 4px; }

  .side .subtitle {
    margin: 0 0 10px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .side-links {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .side-link { flex: 0 0 auto; white-space: nowrap; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 20px;
    gap: 18px;
  }

  .hero-media { order: 0; }

  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); }

  .band { margin: 22px 0; }

  .canvas > div:not(.hero) { padding: 18px; scroll-margin-top: 78px; }
  .hero { scroll-margin-top: 78px; }

  .foot { padding: 0 15px 36px; }

  .cta-band { padding: 20px; }
  .cta-band h2 { font-size: 1.2rem; }

  .foot-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .hero-media img { transition: none; }
}

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