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

:root {
  --ink: #26171a;
  --ink-soft: #4a3336;
  --rose: #eb879c;
  --blush: #ffb6c1;
  --paper: #fff7f6;
  --card: #fffdfd;
  --line: #ecd6d8;
  --muted: #75575b;
  --radius: 10px;
  --serif: "Newsreader", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Roboto", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  padding-bottom: 96px;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(255, 182, 193, .34), transparent 42%),
    radial-gradient(circle at 92% 32%, rgba(235, 135, 156, .18), transparent 46%);
  background-repeat: no-repeat;
  background-size: 100% 720px, 100% 900px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
}

img { max-width: 100%; height: auto; }

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 底部固定条 ---------- */

.navbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 10px clamp(14px, 4vw, 32px);
  background: rgba(255, 249, 249, .95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 6px rgba(38, 23, 26, .06), 0 -12px 28px rgba(38, 23, 26, .05);
}

.bar-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 4px;
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.bar-brand:hover { color: #b6476a; }

.bar-home,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}

.bar-home {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--card);
}

.bar-home:hover { border-color: var(--rose); color: #b6476a; }

.menu-toggle {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff4f5;
}

.menu-toggle:hover { background: var(--rose); border-color: var(--rose); color: var(--ink); }

.menu-toggle .t-close { display: none; }
body.menu-open .menu-toggle .t-open { display: none; }
body.menu-open .menu-toggle .t-close { display: inline; }
body.menu-open .menu-toggle { background: var(--blush); border-color: var(--blush); color: var(--ink); }
body.menu-open { overflow: hidden; }

/* ---------- 全屏遮罩菜单 ---------- */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-content: center;
  padding: 70px clamp(18px, 5vw, 60px) 130px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 78% 18%, rgba(235, 135, 156, .32), transparent 48%),
    linear-gradient(158deg, #26171a 0%, #3b2327 52%, #201316 100%);
  color: #ffeef0;
  transform: translateY(101%);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .24s ease;
}

body.menu-open .menu-overlay {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.menu-overlay ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px 26px;
}

.menu-overlay li:nth-child(-n+3) { grid-column: 1; justify-self: end; }
.menu-overlay li:nth-child(4) { grid-column: 2; grid-row: 1 / span 4; justify-self: center; }
.menu-overlay li:nth-child(n+5) { grid-column: 3; justify-self: start; }

.menu-overlay a {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 6px 14px;
  font-size: 19px;
  color: #ffeef0;
  text-decoration: none;
  border-radius: var(--radius);
  border-bottom: 1px solid rgba(255, 182, 193, .22);
  transition: background .2s ease, color .2s ease, padding .2s ease;
}

.menu-overlay a:hover {
  background: rgba(235, 135, 156, .2);
  color: #fff;
  padding-left: 22px;
}

.menu-brand a {
  border-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--blush);
  padding: 8px 20px;
}

/* ---------- 首屏 ---------- */

.hero-band {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(340px, 45vh, 470px);
  overflow: hidden;
  border-radius: 0 0 46px 46px;
  background: linear-gradient(142deg, #26171a 0%, #5d3138 58%, #eb879c 100%);
}

.hero-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 15px;
  background: linear-gradient(90deg, var(--rose), var(--blush));
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-figure {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  margin: 0;
  padding-top: 26px;
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(102deg, rgba(38, 23, 26, .9) 0%, rgba(38, 23, 26, .62) 46%, rgba(38, 23, 26, .18) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 730px;
  padding: 0 clamp(18px, 4.5vw, 60px) 44px;
  color: #fff;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 5.4vw, 50px);
  line-height: 1.14;
  letter-spacing: .01em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .38);
}

.hero-lead {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.66;
  color: #ffe2e7;
}

/* ---------- 主栅格 ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px clamp(16px, 4vw, 40px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 298px;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.prose { min-width: 0; }

.prose article {
  padding: 4px 0 30px;
  border-bottom: 1px dashed var(--line);
  scroll-margin-bottom: 128px;
}

.prose article + article { padding-top: 32px; }
.prose article:last-child { border-bottom: 0; padding-bottom: 0; }

.prose h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.7vw, 31px);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: .01em;
}

.prose h2 + p { font-size: 18px; color: var(--ink-soft); }

.prose h3 {
  margin: 24px 0 8px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.prose p { margin: 0 0 16px; }

.prose a {
  color: #b04363;
  text-decoration: underline;
  text-decoration-color: rgba(235, 135, 156, .75);
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--ink); text-decoration-color: var(--ink); }

.prose ul,
.prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }

.prose figure {
  margin: 0 0 20px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.prose figcaption {
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
}

.prose blockquote {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #fff1f3;
  color: var(--ink-soft);
}

.prose table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.prose th,
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: #ffeef1; }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- 右侧栏 ---------- */

.rail {
  position: sticky;
  top: 24px;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.rail-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.rail .subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: .1em;
  color: var(--muted);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 10px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.rail-list a:hover {
  background: #ffeef1;
  border-left-color: var(--rose);
  color: #a8395a;
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-top: 12px;
  padding: 46px clamp(16px, 4vw, 44px) 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px 40px;
  align-items: start;
  border-radius: 40px 40px 0 0;
  background: linear-gradient(172deg, #26171a 0%, #332025 100%);
  color: #fbe9ea;
}

.foot-mega {
  grid-column: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 8.4vw, 86px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--blush);
}

.foot-desc {
  grid-column: 2;
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #efd2d6;
}

.foot-copy {
  grid-column: 1;
  align-self: end;
  font-size: 15px;
  color: #c3a7aa;
}

.foot-links {
  grid-column: 2;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  font-size: 16px;
  color: #fbe9ea;
  text-decoration: none;
  border: 1px solid rgba(255, 182, 193, .34);
  border-radius: var(--radius);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.foot-links a:hover {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--ink);
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 0; }
  .rail-list { flex-direction: row; flex-wrap: wrap; }
  .rail-list li { flex: 1 1 auto; }
  .rail-list a { min-height: 40px; }
}

@media (max-width: 820px) {
  .menu-overlay ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .menu-overlay li:nth-child(-n+3),
  .menu-overlay li:nth-child(4),
  .menu-overlay li:nth-child(n+5) {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
  .menu-brand a { padding: 10px 14px; font-size: 26px; }
  .menu-overlay a { font-size: 18px; width: 100%; }
}

@media (max-width: 620px) {
  body { font-size: 16px; padding-bottom: 90px; }
  .hero-band { min-height: clamp(320px, 42vh, 420px); border-radius: 0 0 32px 32px; }
  .hero-copy { padding-bottom: 36px; }
  .shell { padding-top: 30px; }
  .site-foot { grid-template-columns: minmax(0, 1fr); }
  .foot-mega,
  .foot-desc,
  .foot-copy,
  .foot-links { grid-column: 1; }
  .foot-links { justify-content: flex-start; }
  .foot-desc { margin-top: 4px; }
}

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

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