@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 {
  --ink: #26171a;
  --ink-2: #4a3238;
  --pink: #eb879c;
  --blush: #ffb6c1;
  --deep: #a83f57;
  --paper: #fdf5f6;
  --card: #ffffff;
  --line: rgba(38, 23, 26, 0.16);
  --line-2: rgba(38, 23, 26, 0.1);
  --r: 4px;
  --soft: 0 2px 4px rgba(38, 23, 26, 0.05), 0 10px 26px rgba(38, 23, 26, 0.07);
  --serif: "Noto Serif TC", "Songti SC", Georgia, serif;
  --sans: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --edge: max(18px, calc((100% - 1140px) / 2));
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
}

img {
  max-width: 100%;
}

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 90;
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 12px;
}

/* 头部 */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 245, 246, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: var(--soft);
}

.head-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px var(--edge) 8px;
}

.brand {
  justify-self: center;
  min-width: 0;
  padding: 9px 6px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.menu-box {
  justify-self: start;
  position: relative;
}

.menu-box > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.menu-box > summary::-webkit-details-marker {
  display: none;
}

.menu-box > summary::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.menu-box[open] > summary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 70;
  min-width: 232px;
  margin: 0;
  padding: 8px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--soft);
}

.menu-list a {
  display: block;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}

.menu-list a:hover {
  background: #fdeef1;
  color: var(--deep);
}

.head-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s ease, transform 0.22s ease;
}

.head-cta:hover {
  background: var(--blush);
  transform: translateY(-1px);
}

.pill-nav {
  overflow-x: auto;
  padding: 2px var(--edge) 12px;
  scrollbar-width: thin;
}

.pill-nav ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.pill-nav a:hover {
  background: #fdeef1;
  border-color: var(--pink);
  color: var(--deep);
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 56px var(--edge) 44px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--blush), var(--pink) 55%, #c0637a);
}

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

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(38, 23, 26, 0.52), rgba(38, 23, 26, 0.18) 58%, rgba(38, 23, 26, 0.06));
}

.hero-in {
  position: relative;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--deep);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--soft);
  transition: transform 0.25s ease;
}

.hero-badge:hover {
  transform: translateY(-2px);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.28;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(38, 23, 26, 0.5);
}

.hero-sub {
  margin: 0;
  max-width: 44ch;
  font-size: 1.02rem;
  color: #fdeef1;
  text-shadow: 0 1px 10px rgba(38, 23, 26, 0.55);
}

/* 正文与侧栏 */
.page-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 34px;
  align-items: start;
  padding: 44px var(--edge) 68px;
}

.doc {
  min-width: 0;
}

.doc > div {
  margin: 0 0 20px;
  padding: 26px 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  scroll-margin-top: 140px;
}

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

.doc > div > :last-child {
  margin-bottom: 0;
}

.doc h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.doc h3 {
  margin: 1.3em 0 0.4em;
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.45;
}

.doc hr {
  width: 54px;
  border: 0;
  border-top: 2px solid var(--pink);
  margin: 0.5em 0 1em;
}

.doc p {
  margin: 0 0 1em;
  text-align: justify;
  text-justify: inter-ideograph;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

.doc li {
  margin: 0.3em 0;
}

.doc blockquote {
  margin: 1em 0;
  padding: 10px 16px;
  background: #fdeef1;
  border-left: 3px solid var(--blush);
  border-radius: 0 4px 4px 0;
}

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

.doc img {
  height: auto;
  border-radius: var(--r);
}

.doc pre {
  overflow-x: auto;
  padding: 14px;
  background: #fdeef1;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: 0.95rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

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

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

.rail h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}

.rail hr {
  width: 38px;
  border: 0;
  border-top: 2px solid var(--pink);
  margin: 8px 0 12px;
}

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

.rail-list a {
  display: block;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 16px;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.rail-list a:hover {
  background: #fdeef1;
  border-color: var(--line-2);
  color: var(--deep);
}

.rail-back {
  margin: 0;
}

.rail-back a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

/* 页脚 */
.site-foot {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 56px var(--edge) 0;
  background: var(--ink);
  color: #f7e6e9;
}

.fb-name {
  margin: 0 0 0.5em;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
}

.fb-note {
  margin: 0;
  max-width: 34ch;
  font-size: 0.98rem;
  color: #e2c8ce;
}

.site-foot h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: #ffd9e0;
}

.site-foot hr {
  width: 38px;
  border: 0;
  border-top: 2px solid var(--pink);
  margin: 8px 0 14px;
}

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.foot-links a {
  display: inline-block;
  min-height: 42px;
  padding: 9px 0;
  color: #ecd4d9;
  text-decoration: none;
  font-size: 16px;
}

.foot-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.subform label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #e9cfd5;
}

.subform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subform input {
  flex: 1 1 130px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid rgba(247, 230, 233, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 16px;
}

.subform input::placeholder {
  color: #d3b9c0;
}

.subform button {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.22s ease;
}

.subform button:hover {
  background: var(--blush);
}

.foot-bar {
  grid-column: 1 / -1;
  margin-top: 26px;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(247, 230, 233, 0.18);
  text-align: center;
}

.foot-bar p {
  margin: 0;
  font-size: 0.92rem;
  color: #cdb3ba;
}

/* 进场 */
.js .doc > div {
  opacity: 0;
  transform: translateY(14px);
}

.js .doc > div.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 断点 */
@media (max-width: 980px) {
  .page-main {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .rail {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 17px;
  }

  .head-row {
    padding-top: 10px;
    gap: 8px;
  }

  .menu-box > summary::before {
    display: none;
  }

  .menu-box > summary {
    padding: 8px 12px;
  }

  .brand {
    font-size: 1.08rem;
    letter-spacing: 0.04em;
    padding: 9px 2px;
  }

  .head-cta {
    padding: 8px 12px;
  }

  .hero {
    min-height: 72vh;
    padding: 40px 18px 32px;
  }

  .page-main {
    padding: 28px 18px 48px;
  }

  .doc > div {
    padding: 20px 18px 18px;
    scroll-margin-top: 128px;
  }

  .site-foot {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 42px;
  }

  .foot-links ul {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .skip,
  .hero-badge,
  .head-cta,
  .menu-box > summary,
  .menu-list a,
  .pill-nav a,
  .rail-list a,
  .subform button {
    transition: none;
  }
}

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