/* 空即是色3 — Soft UI Evolution */
:root {
  --bg: #26171a;
  --bg-2: #2e1c21;
  --card: #342029;
  --card-hi: #3d2630;
  --ink: #f9ecf0;
  --body-ink: #f2dde3;
  --muted: #dbb9c3;
  --pink: #eb879c;
  --pink-soft: #ffb6c1;
  --line: rgba(255, 182, 193, 0.16);
  --line-strong: rgba(255, 182, 193, 0.34);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.42), 0 10px 28px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 182, 193, 0.09);
  --shadow-lift: 0 4px 10px rgba(0, 0, 0, 0.46), 0 20px 44px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 182, 193, 0.14);
  --radius: 10px;
  --t: 240ms cubic-bezier(0.22, 0.7, 0.3, 1);
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 88% -8%, rgba(235, 135, 156, 0.2), transparent 70%),
    radial-gradient(720px 380px at 4% 4%, rgba(255, 182, 193, 0.1), transparent 72%);
  color: var(--ink);
  font-family: "Work Sans", "Outfit", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Outfit", "Work Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}

img { max-width: 100%; }

a {
  color: var(--pink-soft);
  text-decoration: none;
  transition: color var(--t), background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}

a:hover { color: #fff; }

:focus-visible {
  outline: 3px solid var(--pink-soft);
  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;
}

/* 顶栏：品牌行 + 菜单行 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px clamp(14px, 3vw, 36px) 0;
  background: rgba(38, 23, 26, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(120%);
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 2px 4px;
  color: var(--ink);
}

.brand-name {
  font-family: "Outfit", "Work Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand:hover { color: var(--pink-soft); }

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.brand-dot {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--pink) 0%, var(--pink-soft) 58%, #7b3b4a 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.finder {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.finder input {
  width: min(46vw, 220px);
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.32);
  transition: border-color var(--t), box-shadow var(--t);
}

.finder input::placeholder { color: #bf9aa6; }

.finder input:focus {
  border-color: var(--pink);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(235, 135, 156, 0.22);
  outline: none;
}

.finder button {
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--pink);
  color: #26171a;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.finder button:hover { background: var(--pink-soft); }
.finder button:active { transform: translateY(1px); }

.menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
}

.menu-toggle {
  display: none;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-nav .chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  color: var(--ink);
  font-size: 16px;
  box-shadow: var(--shadow);
}

.primary-nav .chip::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pink);
  opacity: 0.85;
  transition: opacity var(--t), box-shadow var(--t);
}

.primary-nav .chip:hover {
  color: var(--pink-soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.primary-nav .chip:hover::before {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(235, 135, 156, 0.18);
}

/* 主区网格 */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  align-items: start;
  gap: clamp(18px, 2.4vw, 30px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) clamp(14px, 3vw, 36px) clamp(40px, 6vw, 72px);
}

/* 头图 */
.hero {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: clamp(260px, 45vh, 372px);
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 68px var(--radius);
  background: linear-gradient(122deg, #3d2733 0%, #241419 72%);
  box-shadow: var(--shadow-lift);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(38, 23, 26, 0.2) 0%, rgba(38, 23, 26, 0.64) 46%, rgba(38, 23, 26, 0.92) 100%);
}

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

.hero-tag {
  position: absolute;
  z-index: 3;
  top: clamp(14px, 3vw, 26px);
  left: clamp(14px, 3vw, 26px);
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--pink);
  color: #26171a;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
}

.hero-tag > span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #26171a;
  opacity: 0.6;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(100%, 620px);
  padding: clamp(18px, 3vw, 34px);
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: clamp(1.85rem, 4.6vw, 3rem);
  line-height: 1.16;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

.hero-desc {
  margin: 0;
  color: #f4d9e0;
  font-size: 1.02rem;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* 正文 */
.prose {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card-hi) 0%, var(--card) 22%);
  box-shadow: var(--shadow);
}

.prose > div { scroll-margin-top: 170px; }

.prose > div + div {
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--line);
}

.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  line-height: 1.32;
  scroll-margin-top: 170px;
}

.prose h2 > span {
  position: relative;
  padding-right: 0.15rem;
}

.prose h2 > span::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 0.5rem;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--pink), var(--pink-soft));
  box-shadow: 0 2px 8px rgba(235, 135, 156, 0.45);
  transform: rotate(45deg) translateY(-1px);
}

.prose h3 {
  margin: 1.5rem 0 0.7rem;
  color: var(--pink-soft);
  font-size: 1.12rem;
  line-height: 1.4;
  scroll-margin-top: 170px;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--body-ink);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--pink); }

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 182, 193, 0.45);
  text-underline-offset: 3px;
}

.prose a:hover { text-decoration-color: #fff; }

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 182, 193, 0.07);
  color: var(--body-ink);
}

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

.prose figure {
  margin: 1.3rem 0;
  padding: 0;
}

.prose img {
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose table {
  width: 100%;
  margin: 0 0 1.2rem;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th {
  color: var(--pink-soft);
  font-weight: 600;
}

/* 右侧栏 */
.rail {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 168px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: var(--shadow);
}

.rail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: 1.02rem;
}

.rail-title > span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--pink);
  transform: rotate(45deg) translateY(-2px);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 16px;
}

.rail-nav a:hover {
  background: rgba(255, 182, 193, 0.12);
  color: #fff;
}

.rail-foot {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 182, 193, 0.1);
  color: var(--ink);
  font-size: 16px;
}

.to-top:hover {
  background: var(--pink);
  border-color: transparent;
  color: #26171a;
}

/* 页脚 */
.colophon {
  margin-top: clamp(30px, 5vw, 60px);
  padding: clamp(20px, 4vw, 34px) clamp(14px, 3vw, 36px);
  border-top: 1px solid var(--line);
  background: #1c1114;
}

.colophon nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.colophon dl { margin: 0; }

.colophon dt {
  margin: 0 0 0.3rem;
  color: var(--pink-soft);
  font-family: "Outfit", "Work Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.colophon dd { margin: 0; }

.colophon dd a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 16px;
}

.colophon dd a:hover { color: #fff; }

.colophon .copy {
  max-width: 1180px;
  margin: 16px auto 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: #c6a3ae;
  font-size: 16px;
  text-align: center;
}

/* 显现 */
.vz .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.22, 0.7, 0.3, 1);
  transition-delay: var(--d, 0ms);
}

.vz .reveal.in {
  opacity: 1;
  transform: none;
}

/* 中屏 */
@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-column: 1; }
  .rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin-top: 4px;
  }
  .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .rail-nav a {
    padding: 6px 13px;
    background: rgba(255, 182, 193, 0.08);
  }
  .rail-foot { display: none; }
}

/* 窄屏 */
@media (max-width: 680px) {
  body { font-size: 17px; }
  .menu-row { flex-wrap: wrap; padding-bottom: 12px; }
  .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: flex; }
  .primary-nav .chip { flex: 1 1 auto; justify-content: flex-start; }
  .finder { margin-left: auto; }
  .finder input { width: min(48vw, 190px); }
  .hero {
    min-height: 300px;
    border-radius: var(--radius) var(--radius) 42px var(--radius);
  }
  .hero-copy { padding: 18px; }
  .prose > div { scroll-margin-top: 190px; }
}

@media (max-width: 420px) {
  .colophon nav { gap: 6px; }
  .colophon dd a { padding: 0 4px; }
  .finder button { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vz .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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