@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

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

:root {
  --rose: #ffb6c1;
  --pink: #eb879c;
  --ink: #26171a;
  --bg: #1c1013;
  --txt: #faeef1;
  --mut: #d8bcc3;
  --line: rgba(255, 182, 193, 0.22);
  --line-soft: rgba(255, 182, 193, 0.11);
  --glass: rgba(255, 255, 255, 0.055);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.28), 0 22px 44px -24px rgba(0, 0, 0, 0.72);
  --r: 4px;
  --serif: "Noto Serif TC", "Songti TC", Georgia, serif;
  --sans: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.012em;
  color: var(--txt);
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(235, 135, 156, 0.26), transparent 62%),
    radial-gradient(820px 520px at 2% 106%, rgba(255, 182, 193, 0.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.32;
  margin: 0;
  letter-spacing: 0.03em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--rose);
  text-decoration: none;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

a:hover {
  color: #fff;
}

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

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

/* ---------- 顶部：细条 + 分列导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 18px 6px;
  background: rgba(28, 16, 19, 0.78);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 34px -26px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.tick {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  padding: 4px 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.18em;
  color: var(--mut);
  border-bottom: 1px solid var(--line-soft);
}

.nav > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-l {
  justify-self: start;
}

.nav-r {
  justify-self: end;
}

.nav-r > ul {
  justify-content: flex-end;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: var(--r);
  color: var(--txt);
  font-size: 16px;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

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

.dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(235, 135, 156, 0.18);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.16em;
  color: #fff;
  background: linear-gradient(150deg, rgba(255, 182, 193, 0.22), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ---------- 舞台：左侧索引 + 右侧正文 ---------- */
.stage {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 36px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 22px 70px;
}

.rail {
  position: sticky;
  top: 136px;
  align-self: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.rail ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 5px 7px;
  border-radius: var(--r);
  border-bottom: 1px solid var(--line-soft);
  color: var(--mut);
  font-size: 16px;
  line-height: 1.4;
}

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

.idx {
  font-family: var(--serif);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--pink);
}

.main {
  min-width: 0;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 4vw, 42px);
  min-height: 68vh;
  padding: 34px 0 52px;
  overflow: hidden;
}

.hero::before {
  content: "01";
  position: absolute;
  right: -6px;
  top: 0;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(118px, 20vw, 250px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(255, 182, 193, 0.1);
  pointer-events: none;
}

.hero-art {
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(96px, 17vw, 172px);
  margin: 0;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.art {
  display: block;
  width: 100%;
  height: auto;
}

.hero-txt {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.hero-txt h1 {
  font-size: clamp(27px, 4.4vw, 48px);
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.hero-desc {
  max-width: 36ch;
  margin: 14px 0 0 auto;
  color: var(--mut);
  font-size: 16px;
}

/* ---------- 正文各节 ---------- */
.main > article {
  position: relative;
  margin: 0 0 26px;
  padding: 26px clamp(17px, 3vw, 34px) 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  scroll-margin-top: 128px;
}

.main > article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, var(--pink), rgba(255, 182, 193, 0.15) 65%, transparent);
  opacity: 0.75;
}

.main > article small {
  display: block;
  margin-bottom: 7px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--pink);
}

.main > article h2 {
  margin-bottom: 0.6em;
  font-size: clamp(21px, 2.7vw, 29px);
  color: #fff;
}

.main > article h3 {
  margin: 1.4em 0 0.5em;
  font-size: 19px;
  color: var(--rose);
}

.main > article > h2:first-child,
.main > article > small:first-child {
  margin-top: 0;
}

.main > article p,
.main > article li {
  color: #f3e2e6;
}

.main > article ul,
.main > article ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.main > article li {
  margin-bottom: 0.45em;
}

.main > article li::marker {
  color: var(--pink);
}

.main > article a {
  color: var(--rose);
  border-bottom: 1px solid rgba(255, 182, 193, 0.45);
}

.main > article a:hover {
  border-bottom-color: #fff;
}

.main > article figure {
  margin: 0 0 18px;
}

.main > article figure img {
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.main > article blockquote {
  margin: 0 0 1em;
  padding: 12px 18px;
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 182, 193, 0.08);
  color: var(--mut);
}

.main > article code,
.main > article pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.92em;
}

.main > article pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: var(--r);
  background: rgba(0, 0, 0, 0.35);
}

.main > article table {
  width: 100%;
  margin-bottom: 1em;
  border-collapse: collapse;
}

.main > article th,
.main > article td {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  text-align: left;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 20px;
  padding: 46px 22px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 182, 193, 0.07), rgba(20, 11, 13, 0.94));
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.col-brand small {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  color: var(--pink);
}

.col-brand h2 {
  font-size: clamp(28px, 5.2vw, 52px);
  letter-spacing: 0.07em;
  color: #fff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.col-addr address {
  font-style: normal;
  color: var(--mut);
  font-size: 16px;
  letter-spacing: 0.06em;
  padding-top: 6px;
}

.foot ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: var(--txt);
  font-size: 16px;
}

.foot a:hover {
  color: var(--rose);
}

.copy {
  max-width: 1100px;
  margin: 28px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--mut);
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rise {
  animation: rise 280ms cubic-bezier(0.22, 0.68, 0.36, 1) both;
}

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

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 20px 16px 56px;
  }

  .rail {
    position: static;
    padding: 8px;
  }

  .rail ul {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .rail a {
    min-height: 44px;
    white-space: nowrap;
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
  }

  .hero {
    min-height: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 0 34px;
  }

  .hero::before {
    font-size: clamp(96px, 26vw, 150px);
    top: -8px;
    right: 0;
  }

  .hero-art {
    flex: 0 0 auto;
    width: 104px;
    align-self: flex-start;
  }

  .main > article {
    padding: 22px 16px;
    scroll-margin-top: 24px;
  }

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

@media (max-width: 820px) {
  .topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 4px;
    padding: 4px 12px 10px;
  }

  .tick {
    order: -2;
    width: 100%;
  }

  .brand {
    order: -1;
  }

  .nav,
  .nav-r {
    grid-column: 1;
    justify-self: stretch;
  }

  .nav > ul {
    justify-content: center;
  }

  .nav-r > ul {
    justify-content: center;
  }

  .nav a {
    padding: 8px 8px;
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .nav a {
    padding: 8px 6px;
    gap: 5px;
  }

  .dot {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 0 2px rgba(235, 135, 156, 0.18);
  }
}

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