:root {
  --bg: #f5f6f7;
  --paper: #ffffff;
  --text: #1f2329;
  --muted: #646a73;
  --line: #dee0e3;
  --blue: #3370ff;
  --blue-soft: #e8f0ff;
  --yellow: #fff4c8;
  --green: #d4f4e2;
  --rose: #fff1f0;
  --shadow: 0 8px 28px rgba(31, 35, 41, 0.06);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.75;
}

a {
  color: var(--blue);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3370ff, #14c9c9);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  gap: 28px;
}

.toc {
  position: sticky;
  top: 84px;
  align-self: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 14px;
}

.toc h2 {
  margin: 0 0 12px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.toc a:hover,
.toc a.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 48px 56px 64px;
}

.doc-title {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.meta {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.lead,
.section p,
.section li {
  font-size: 16px;
}

.lead {
  margin: 0 0 10px;
}

.section {
  margin: 36px 0 0;
  padding-top: 8px;
  scroll-margin-top: 76px;
}

.section h2 {
  margin: 0 0 16px;
  display: inline-block;
  font-size: 22px;
  line-height: 1.5;
  padding: 2px 8px;
  background: var(--yellow);
  border-radius: 6px;
}

.section.notes h2,
.section.gift h2 {
  background: #ffe8cc;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.link-box a {
  display: inline-block;
  padding: 4px 8px;
  background: var(--green);
  border-radius: 6px;
  word-break: break-all;
  text-decoration: none;
}

.copy-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
}

.copy-btn:hover {
  opacity: 0.9;
}

.shot {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  margin: 8px auto 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.steps {
  margin: 8px 0 0;
  padding-left: 22px;
}

.tip {
  margin-top: 18px;
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 12px;
}

.gift-card {
  margin-top: 8px;
  padding: 18px 20px;
  background: var(--rose);
  border-radius: 12px;
}

footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .menu-btn {
    display: inline-flex;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-top: 16px;
  }

  .toc {
    display: none;
    position: static;
  }

  .toc.open {
    display: block;
  }

  .paper {
    padding: 28px 18px 40px;
  }

  .doc-title {
    font-size: 28px;
  }
}
