/* ============================================================
   糖心Vlog 信息站 · 全站样式
   视觉来源：源站存档提取（布局/交互骨架），深色参考按规范换算为浅色底
   ============================================================ */

:root {
  --bg: #faf5ee;
  --bg-2: #f3ead9;
  --card: #fffdf7;
  --line: #ead9bd;
  --red: #e03e3e;
  --red-deep: #c22f2f;
  --cream: #ffdfb4;
  --cta-text: #fff3dc;
  --cta-grad: linear-gradient(180deg, #c9302c, #a82222);
  --cta-grad-hover: linear-gradient(180deg, #bf2b28, #99201f);
  --topbar-bg: rgba(250, 245, 238, 0.92);
  --chip-bg: rgba(255, 253, 247, 0.8);
  --tag-border: rgba(224, 62, 62, 0.35);
  --tag-bg: rgba(255, 223, 180, 0.28);
  --tag-ink: #a82222;
  --note-bg: rgba(255, 223, 180, 0.30);
  --white: #ffffff;
  --cta-shadow: 0 14px 30px rgba(150, 30, 30, 0.38);
  --cta-shadow-hover: 0 16px 34px rgba(150, 30, 30, 0.45);
  --cta-inset: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --blush: radial-gradient(130% 160% at 12% 0%, rgba(255, 223, 180, 0.5) 0%, rgba(255, 223, 180, 0) 58%);
  --hero-glow: radial-gradient(120% 90% at 50% 0%, #fff 0%, rgba(255, 255, 255, 0) 55%);
  --ink: #3d3229;
  --ink-2: #6f6052;
  --ink-3: #74634f;
  --grad-red: linear-gradient(180deg, #f05a4a, #cf3232);
  --shadow: 0 14px 30px rgba(93, 52, 22, 0.10);
  --radius: 18px;
  --shell: min(1080px, 100% - 40px);
  --cta-h: 60px;
}

* { box-sizing: border-box; }

html, body, div, section, header, footer, nav, main, article, aside,
h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--cta-h) + 36px);
}

h1 {
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.3;
  font-weight: 800;
}

h3 { font-size: 19px; line-height: 1.45; font-weight: 700; }

p { margin: 0 0 1em; }

a { color: var(--red-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

.shell { width: var(--shell); margin: 0 auto; }

.grad-text {
  background: var(--grad-red);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.small-note { color: var(--ink-3); }

/* ---------- 顶部导航（复刻图标条布局） ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad-red);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  flex: none;
}

.brand b { color: var(--red-deep); font-weight: 800; }

.topnav {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.topnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}
.topnav a:hover { text-decoration: none; background: var(--bg-2); color: var(--red-deep); }
.topnav a[aria-current="page"] { background: var(--bg-2); color: var(--red-deep); font-weight: 700; }

.topnav svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Hero：时钟主视觉（复刻核心布局） ---------- */

.hero {
  background:
    var(--hero-glow),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: clamp(48px, 8vh, 96px) 0 clamp(40px, 6vh, 72px);
}

.hero .kicker {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.35em;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.hero h1 span {
  display: block;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.14em;
  margin-top: 10px;
}

.clock {
  font-size: clamp(72px, 11vw, 150px);
  line-height: 1;
  font-weight: 700;
  color: var(--red-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin: clamp(14px, 3vh, 28px) 0;
}

.hero-sub {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 22px;
  font-size: 16px;
  color: var(--ink-2);
  box-shadow: var(--shadow);
}

.hero-chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.hero-chips span {
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 14px;
}

/* ---------- 正文板块 ---------- */

.section { padding: clamp(40px, 7vh, 72px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tint { background: var(--bg-2); }

.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head p { color: var(--ink-2); margin-top: 8px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cards.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 8px; }
.card h3 .tag {
  display: inline-block;
  vertical-align: 3px;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tag-ink);
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  padding: 1px 10px;
  background: var(--tag-bg);
}

.card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.card p + p { margin-top: 8px; }

/* 条目短评列表 */
.entry-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
}

.entry-list h3 { margin-bottom: 4px; }
.entry-list p { color: var(--ink-2); margin: 0; font-size: 15px; }

/* 步骤/编号列表（复刻编号圆点样式） */
.steps li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  color: var(--ink);
}

.steps .n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red-deep);
  color: var(--white);
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  margin-top: 4px;
}

.steps em { font-style: normal; color: var(--red-deep); font-weight: 600; }

/* 折叠教程（复刻 install-doc 交互骨架） */
.fold {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.fold summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  min-height: 44px;
}

.fold summary::-webkit-details-marker { display: none; }

.fold summary .chev {
  margin-left: auto;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 14px;
  transition: transform 0.18s ease-out;
}

.fold[open] summary .chev { transform: rotate(90deg); }
.fold[open] summary { color: var(--red-deep); }

.fold .fold-body {
  border-top: 1px dashed var(--line);
  padding: 18px 20px 20px;
  color: var(--ink-2);
}

.fold .fold-body ol { padding-left: 0; }

/* FAQ */
.faq dt {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  padding: 14px 0 6px;
}

.faq dd {
  color: var(--ink-2);
  margin: 0 0 6px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

/* 页内提示块 */
.note {
  background: var(--note-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--ink-2);
  font-size: 15px;
}

.note b { color: var(--ink); }

/* 页头（内页公共） */
.page-head {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: clamp(36px, 6vh, 60px) 0;
}

.page-head h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.page-head .crumb {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.page-head .crumb a { color: var(--ink-3); }
.page-head .crumb a:hover { color: var(--red-deep); }

.page-head p.lead {
  max-width: 760px;
  color: var(--ink-2);
  margin-top: 12px;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 26px 0 30px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

.footer .foot-brand {
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  color: var(--red-deep);
  margin-bottom: 8px;
}
.footer .foot-brand:hover { text-decoration: none; color: var(--red); }

.footer nav {
  display: flex;
  justify-content: center;
  gap: 6px 18px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.footer nav a { color: var(--ink-3); }
.footer nav a:hover { color: var(--red-deep); }

/* ---------- 唯一寻芳 CTA（每页一个，固定底部） ---------- */

.site-cta {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(560px, calc(100vw - 32px));
  min-height: var(--cta-h);
  padding: 0 26px;
  border-radius: 999px;
  background: var(--cta-grad);
  color: var(--cta-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: var(--cta-shadow), var(--cta-inset);
  overflow: hidden;
  white-space: nowrap;
}

.site-cta:hover {
  text-decoration: none;
  color: var(--white);
  background: var(--cta-grad-hover);
  box-shadow: var(--cta-shadow-hover), var(--cta-inset);
}

.site-cta:focus-visible {
  outline: 3px solid var(--red-deep);
  outline-offset: 3px;
}

/* 动效通道一（动）：糖粒跳秒 —— 左缘一粒糖点沿 2px 幅度上浮回落，2.4s 一轮 */
.site-cta::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream);
  opacity: 0.25;
  animation: cta-grain 2.4s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}

/* 动效通道二（色）：奶油洇糖 —— 表面一层极淡奶油色从左上洇开再收回，3.2s 错半拍 */
.site-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--blush);
  opacity: 0;
  pointer-events: none;
  animation: cta-blush 3.2s ease-out infinite;
}

@keyframes cta-grain {
  0% { opacity: 0.25; transform: translateY(2px); }
  35% { opacity: 1; transform: translateY(-1px); }
  58% { opacity: 0.85; transform: translateY(0); }
  100% { opacity: 0.25; transform: translateY(2px); }
}

@keyframes cta-blush {
  0% { opacity: 0; }
  28% { opacity: 0; }
  52% { opacity: 0.3; }
  78% { opacity: 0.1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-cta::before { animation: none; opacity: 0.95; transform: none; }
  .site-cta::after { animation: none; opacity: 0.12; }
  .fold summary .chev { transition: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --cta-h: 54px; }

  .shell { width: min(100% - 32px, 560px); }

  body { padding-bottom: calc(var(--cta-h) + 30px); }

  .topbar-inner { justify-content: center; }

  .topnav { justify-content: center; }
  .topnav a { min-width: 52px; padding: 5px 6px; }
  .topnav svg { width: 20px; height: 20px; }

  .cards, .cards.two { grid-template-columns: 1fr; }

  .site-cta {
    bottom: calc(12px + env(safe-area-inset-bottom));
    font-size: 16px;
    min-height: var(--cta-h);
    padding: 0 18px;
  }
}
