@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');

:root {
  --pink: #eb879c;
  --pink-2: #ffb6c1;
  --ink: #26171a;
  --muted: #6a5459;
  --bg: #fff8f9;
  --card: rgba(255, 255, 255, 0.62);
  --line: rgba(38, 23, 26, 0.12);
  --r: 4px;
  --shadow: 0 2px 4px rgba(38, 23, 26, 0.05), 0 16px 32px -22px rgba(38, 23, 26, 0.42);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", "PingFang TC", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(58vw 58vw at 10% -12%, #ffe1e8 0%, rgba(255, 225, 232, 0) 62%),
    radial-gradient(50vw 50vw at 98% 4%, #ffffff 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #fffafb 0%, #fdf0f3 56%, #fff8f9 100%);
}

h1, h2, h3, h4 {
  font-family: "Noto Serif TC", Georgia, "Songti SC", serif;
  line-height: 1.34;
  letter-spacing: 0.01em;
}

a { color: #9c3f56; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #b85c72;
  outline-offset: 2px;
  border-radius: var(--r);
}

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

/* ---------- 顶部导航 ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.topnav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 6px 14px;
}

.nav-a,
.nav-b {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.nav-a { justify-content: flex-end; }
.nav-b { justify-content: flex-start; }

.topnav li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r);
  text-decoration: none;
  color: #4a373c;
  font-size: 0.92rem;
  transition: background 0.22s ease, color 0.22s ease;
}

.topnav li a:hover { background: rgba(235, 135, 156, 0.16); color: var(--ink); }

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink);
  flex: 0 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  text-decoration: none;
  color: var(--ink);
  font-family: "Noto Serif TC", Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.mark { color: var(--pink); }

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: var(--r);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transition: background 0.22s ease, transform 0.22s ease;
}

.cta:hover { background: #9c3f56; transform: translateY(-1px); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px 76px;
}

@supports (min-height: 100svh) {
  .hero { min-height: calc(100svh - 62px); }
}

.hero-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: clamp(190px, 31vw, 400px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(235, 135, 156, 0.16);
  pointer-events: none;
  user-select: none;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.34em;
  max-width: 15em;
  font-size: clamp(2rem, 5.6vw, 4.1rem);
  font-weight: 700;
}

.hero-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.9em;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: #a44b62;
}

.hero .subtitle {
  position: relative;
  z-index: 1;
  max-width: 36em;
  margin: 0 auto 2.1em;
  color: #57424a;
  font-size: 1.02rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--r);
  background: var(--pink);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, background 0.24s ease;
}

.btn:hover { transform: translateY(-2px); background: var(--pink-2); }

.btn.ghost {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

/* ---------- 粘性锚点条 ---------- */
.anchorbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 248, 249, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(38, 23, 26, 0.08);
}

.anchorbar ul {
  display: flex;
  gap: 4px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 16px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchorbar ul::-webkit-scrollbar { display: none; }

.anchorbar li { flex: 0 0 auto; }

.anchorbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
  border-radius: var(--r);
  text-decoration: none;
  color: #4a373c;
  font-size: 0.94rem;
  transition: background 0.22s ease, color 0.22s ease;
}

.anchorbar a:hover,
.anchorbar a.active {
  background: rgba(235, 135, 156, 0.2);
  color: var(--ink);
}

/* ---------- 正文 ---------- */
.doc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 30px;
  align-items: start;
}

.doc > div {
  grid-column: 1;
  padding: 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--r);
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  scroll-margin-top: 84px;
}

.doc > div h2 {
  font-size: clamp(1.32rem, 2.4vw, 1.66rem);
  margin: 1.7em 0 0.5em;
  padding-bottom: 0.34em;
  border-bottom: 2px solid rgba(235, 135, 156, 0.45);
}

.doc > div > h2:first-child { margin-top: 0; }

.doc > div h3 { font-size: 1.18rem; margin: 1.4em 0 0.45em; }

.doc p.subtitle {
  color: var(--muted);
  margin: -0.28em 0 1.35em;
  font-size: 1rem;
}

.doc p { margin: 0 0 1.1em; }

.doc ul,
.doc ol { margin: 0 0 1.1em; padding-left: 1.45em; }

.doc li { margin: 0.34em 0; }

.doc figure {
  margin: 1.4em 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.76);
}

.doc figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }

.doc blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--pink);
  border-radius: var(--r);
  background: rgba(255, 245, 247, 0.9);
  color: #4a373c;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  margin: 1.2em 0;
}

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

.doc th { background: rgba(255, 182, 193, 0.22); font-weight: 600; }

.doc > .rail {
  grid-column: 2;
  grid-row: 1 / span 60;
  position: sticky;
  top: 76px;
  align-self: start;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.railcard {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--r);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

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

.railcard nav ul a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-left: 2px solid transparent;
  border-radius: var(--r);
  text-decoration: none;
  color: #4a373c;
  font-size: 0.92rem;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.railcard nav ul a:hover {
  background: rgba(235, 135, 156, 0.16);
  color: var(--ink);
  border-left-color: var(--pink);
}

.totop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  margin-top: 12px;
  padding: 0 10px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.totop:hover { color: var(--ink); }

/* ---------- 页脚 ---------- */
.sitefoot {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.foot-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 20px 26px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 32px;
}

address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fname {
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.fhost { color: var(--muted); font-size: 0.94rem; word-break: break-all; }

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

.footlinks a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #4a373c;
  text-decoration: none;
  font-size: 0.94rem;
}

.footlinks a:hover { color: #9c3f56; }

.subform label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.sfrow { display: flex; gap: 8px; }

.sfrow input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.sfrow button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r);
  background: var(--pink);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.22s ease;
}

.sfrow button:hover { background: var(--pink-2); }

.foot-base {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy { margin: 0; font-size: 0.9rem; color: var(--muted); }

.totop.flat {
  width: auto;
  margin: 0;
  padding: 0;
  border-top: 0;
  min-height: 40px;
}

/* ---------- 动效 ---------- */
.js .doc > div {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.js .doc > div.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .doc > div { opacity: 1; transform: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 980px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 24px;
    gap: 22px;
  }
  .doc > .rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
  .railcard { padding: 12px; }
  .railcard ul { flex-direction: row; flex-wrap: wrap; }
  .railcard nav ul a { border-left: 0; border-bottom: 2px solid transparent; padding: 0 12px; }
  .railcard nav ul a:hover { border-left-color: transparent; border-bottom-color: var(--pink); }
  .totop { width: auto; border-top: 0; margin-top: 8px; padding-top: 0; }
}

@media (max-width: 860px) {
  .topnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
  }
  .nav-a,
  .nav-b { display: contents; }
  .brand { order: -1; flex: 0 0 100%; justify-content: center; }
  .cta { flex: 0 0 100%; justify-content: center; margin-top: 6px; }
  .topnav li a { font-size: 0.88rem; padding: 0 8px; }

  .hero { min-height: auto; padding: 54px 18px 62px; }
  .hero-num { font-size: clamp(150px, 44vw, 240px); }
  .hero-kicker { letter-spacing: 0.24em; font-size: 0.94rem; }

  .doc { padding: 22px 14px 56px; }
  .doc > div { padding: 22px 18px; scroll-margin-top: 74px; }
  .doc > div h2 { font-size: 1.3rem; }

  .foot-grid { grid-template-columns: 1fr; gap: 24px; padding: 34px 18px 22px; }
  .foot-base { padding: 14px 18px 34px; }
}

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