@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;
  --blush: #ffb6c1;
  --ink: #26171a;
  --ink-soft: #5d4448;
  --paper: #fff6f7;
  --card: #fffdfd;
  --line: rgba(38, 23, 26, 0.1);
  --shadow-s: 0 1px 2px rgba(38, 23, 26, 0.06), 0 8px 18px rgba(235, 135, 156, 0.16);
  --shadow-m: 0 2px 4px rgba(38, 23, 26, 0.06), 0 16px 38px rgba(235, 135, 156, 0.22);
  --r: 28px;
  --serif: 'Noto Serif TC', 'Songti SC', 'PingFang TC', serif;
  --sans: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

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

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

body {
  margin: 0;
  padding-bottom: 128px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(circle at 12% 8%, rgba(255, 182, 193, 0.35), transparent 46%),
    radial-gradient(circle at 88% 22%, rgba(235, 135, 156, 0.22), transparent 42%);
  background-repeat: no-repeat;
}

a { color: #a8445b; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(38, 23, 26, 0.6);
  outline-offset: 3px;
}

/* ===== 底部固定药丸导航 ===== */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 246, 247, 0.94);
  backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 34px rgba(38, 23, 26, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.dock-nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.dock-nav::-webkit-scrollbar { display: none; }

.dock-nav p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px;
}

.dock-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-s);
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 240ms ease, color 240ms ease, box-shadow 240ms ease, background-color 240ms ease;
}
.dock-nav a:hover {
  transform: translateY(-2px);
  color: var(--ink);
  background: #fff2f5;
  box-shadow: inset 0 0 0 1px rgba(235, 135, 156, 0.5), var(--shadow-m);
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(140deg, #f19aad, var(--pink));
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--shadow-s);
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.dock-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }

/* ===== Hero ===== */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 96px 22px 128px;
  overflow: hidden;
  background: linear-gradient(165deg, var(--blush) 0%, var(--pink) 58%, #6d3a45 100%);
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img,
.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(38, 23, 26, 0.34) 0%, rgba(38, 23, 26, 0.5) 46%, rgba(38, 23, 26, 0.74) 100%);
}
.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 20ch;
  text-align: center;
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 6.6vw, 54px);
  line-height: 1.36;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 20px rgba(38, 23, 26, 0.55);
}
.hero-band {
  position: absolute;
  z-index: 2;
  left: -6%;
  right: -6%;
  bottom: 56px;
  height: 12px;
  background: linear-gradient(90deg, var(--pink), var(--blush));
  transform: rotate(-1.8deg);
  opacity: 0.95;
}
.hero-slash {
  position: absolute;
  z-index: 2;
  left: -6%;
  right: -6%;
  bottom: -1px;
  height: 62px;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 18%, 100% 100%);
}

/* ===== 主体栅格 ===== */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  align-items: start;
  gap: 26px;
  max-width: 1180px;
  margin: 44px auto 0;
  padding: 0 20px;
}

.shell {
  min-width: 0;
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-m);
  padding: clamp(18px, 3.2vw, 44px);
}

.body { min-width: 0; }

.body div[id] { scroll-margin-top: 26px; }
.body > div { padding-top: 26px; margin-top: 30px; border-top: 1px solid var(--line); }
.body > div:first-of-type { padding-top: 0; margin-top: 0; border-top: 0; }

.body h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.7vw, 30px);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.body h3 {
  margin: 26px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.6;
}
.body hr {
  height: 0;
  border: 0;
  border-top: 2px dashed rgba(235, 135, 156, 0.6);
  margin: 0 0 18px;
}
.body p { margin: 0 0 1.05em; }
.body ul,
.body ol { margin: 0 0 1.05em; padding-left: 1.35em; }
.body li { margin-bottom: 0.45em; }
.body a { text-underline-offset: 3px; }
.body strong { color: var(--ink); }
.body blockquote {
  margin: 0 0 1.05em;
  padding: 14px 20px;
  border-radius: 0 20px 20px 0;
  border-left: 4px solid var(--blush);
  background: #fff3f6;
  color: var(--ink-soft);
}
.body blockquote p:last-child { margin-bottom: 0; }
.body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 20px;
  box-shadow: var(--shadow-s);
}
.body figure { margin: 0 0 1.05em; }
.body figcaption { font-size: 16px; color: var(--ink-soft); }
.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.05em;
  font-size: 16px;
}
.body th,
.body td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }

/* ===== 侧栏 ===== */
.rail {
  position: sticky;
  top: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-s);
  padding: 22px 20px 24px;
}
.rail h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.rail hr {
  height: 3px;
  width: 48px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--blush));
  margin: 10px 0 16px;
}
.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 14px;
  background: #fff4f6;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}
.rail-list a:hover { background: #ffe6eb; transform: translateX(3px); }
.rail-list a.is-active {
  background: var(--blush);
  box-shadow: inset 0 0 0 2px rgba(38, 23, 26, 0.3);
}

/* ===== 页脚 ===== */
.foot {
  margin-top: 56px;
  padding: 44px 20px 30px;
  border-radius: 42px 42px 0 0;
  background: var(--ink);
  color: #f6e6ea;
  box-shadow: 0 -14px 40px rgba(38, 23, 26, 0.18);
}
.foot-top,
.foot-bar {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 32px;
}
.foot-brand {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.08em;
  color: #fff;
}
.foot-form { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-form input {
  flex: 1 1 150px;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
}
.foot-form input::placeholder { color: #e2ccd2; }
.foot-form button {
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--blush);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 240ms ease, background-color 240ms ease;
}
.foot-form button:hover { transform: translateY(-2px); background: var(--pink); }

.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.foot-cols dl { margin: 0; }
.foot-cols dt {
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--blush);
}
.foot-cols dd { margin: 0; }
.foot-cols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #f3e0e4;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 240ms ease, border-color 240ms ease;
}
.foot-cols dd a:hover { color: #fff; border-color: var(--blush); }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 16px;
  color: #e0cbd1;
}
.foot-bar p { margin: 0; }
.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--blush);
  text-decoration: none;
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1 { animation: rise 640ms cubic-bezier(0.2, 0.72, 0.3, 1) both; }
  .hero-band { animation: swipe 720ms cubic-bezier(0.2, 0.72, 0.3, 1) both; }
  .rail-list li { animation: slide-in 460ms ease both; }
  .rail-list li:nth-child(2n) { animation-delay: 70ms; }
  .rail-list li:nth-child(3n) { animation-delay: 130ms; }
  .rail-list li:nth-child(4n) { animation-delay: 190ms; }
  .foot-form button:active { transform: scale(0.97); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes swipe {
  from { opacity: 0; transform: rotate(-1.8deg) scaleX(0.4); }
  to { opacity: 0.95; transform: rotate(-1.8deg) scaleX(1); }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
html.reduce .hero-copy h1,
html.reduce .hero-band,
html.reduce .rail-list li { animation: none; }

/* ===== 断点 ===== */
@media (max-width: 940px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .dock {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand cta" "nav nav";
    gap: 6px 10px;
    padding-top: 8px;
  }
  .brand { grid-area: brand; padding-left: 2px; }
  .dock-nav { grid-area: nav; }
  .dock-cta { grid-area: cta; }
  .hero { min-height: 64vh; padding: 84px 18px 116px; }
  .hero-band { bottom: 48px; height: 10px; }
  .hero-slash { height: 52px; }
  .wrap { margin-top: 32px; padding: 0 14px; }
  .foot { border-radius: 32px 32px 0 0; padding: 34px 16px 26px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body { padding-bottom: 148px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .shell { padding: 16px 14px 22px; border-radius: 22px; }
  .rail { border-radius: 22px; padding: 18px 14px 20px; }
  .body h2 { font-size: 22px; }
}

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