/* Luna 官网原型：配色二"晨光"
   首页第一屏、内页标题条、号召区用淡紫到蜜桃的晨光渐变；正文白底；
   主按钮用墨黑，重点色只用一个珊瑚红；页脚用墨黑收尾。 */

:root {
  --dawn-1: #f4efff;
  --dawn-2: #fde9e2;
  --dawn: linear-gradient(160deg, var(--dawn-1) 0%, var(--dawn-2) 100%);
  --peach: #ffd9c7;
  --peach-glow: rgba(255, 190, 160, 0.4);
  --footer: #1f1d2b;

  --bg: #ffffff;
  --soft: #faf8fb;
  --line: #ece8f0;
  --ink: #1f1d2b;
  --ink-hover: #000000;
  --muted: #625e70;
  --brand: #e8592a;
  --brand-ink: #c2471c;
  --brand-soft: #ffe6dc;
  --warn-bg: #fff6e0;
  --warn-ink: #7a5600;

  --radius: 14px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 var(--font);
}
img { max-width: 100%; }
a { color: var(--brand-ink); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 6vw, 52px); letter-spacing: .02em; }
h2 { font-size: clamp(22px, 4vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* 原型提示条 */
.proto-bar {
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
}

/* 页头（浅色半透明） */
.site-header {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.logo { display: flex; align-items: center; line-height: 0; }
.logo img { display: block; height: 28px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: rgba(31,29,43,.06); }
.nav a.btn { color: #fff; }
.nav .btn { margin-left: 8px; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* 按钮 */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink);
  color: #fff;
}
.btn:hover { background: var(--ink-hover); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: rgba(31,29,43,.06); }
.btn:disabled, .btn[aria-disabled="true"] { background: #cfccd6; color: #fff; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #ffb79b;
  outline-offset: 2px;
}

/* 首页第一屏（晨光 + 月亮） */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: var(--dawn);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 32px;
  padding-top: 72px;
  padding-bottom: 88px;
}
.hero .eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--brand-ink); background: rgba(255,255,255,.7); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.hero .note { font-size: 14px; color: var(--muted); }
.hero-moon {
  justify-self: center;
  width: min(300px, 60vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fff1ea 40%, var(--peach) 100%);
  box-shadow: 0 0 70px 14px var(--peach-glow), 0 0 160px 40px rgba(190,170,255,.25);
}
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 56px; }
  .hero-moon { order: -1; width: 140px; justify-self: start; }
}

/* 页面标题条（内页用，晨光延续） */
.page-head {
  background: var(--dawn);
  color: var(--ink);
  padding: 48px 0 40px;
}
.page-head p { color: var(--muted); margin: 0; }
.page-head h1 { font-size: clamp(26px, 5vw, 40px); }

/* 区块 */
section.block { padding: 64px 0; }
section.block.soft { background: var(--soft); }
.block-head { max-width: 640px; margin-bottom: 32px; }

.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: .3em; }
.card p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}
.badge.beta { background: var(--brand-soft); color: var(--brand-ink); }
.badge.soon { background: #f1eff4; color: var(--muted); }
.badge.draft { background: var(--warn-bg); color: var(--warn-ink); }

.principles li { margin-bottom: .6em; }
.honest { border-left: 4px solid var(--brand); }

/* 截图占位 */
.shot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border: 1.5px dashed #d6d0dd;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 12px;
}

/* 号召区（晨光） */
.cta {
  background: var(--dawn);
  color: var(--ink);
  padding: 64px 0;
  text-align: center;
}
.cta p { color: var(--muted); max-width: 36em; margin: 0 auto 24px; }

/* 下载页 */
.dl-card { display: flex; flex-direction: column; gap: 8px; position: relative; }
.dl-card .btn { margin-top: auto; text-align: center; }
.dl-card.recommended { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.dl-card .rec-tag {
  display: none;
  position: absolute;
  top: -11px;
  right: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
}
.dl-card.recommended .rec-tag { display: block; }
.dl-meta { font-size: 13px; color: var(--muted); }

.notice {
  border-radius: var(--radius);
  padding: 14px 18px;
  background: var(--brand-soft);
  color: var(--ink);
  font-size: 15px;
}
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
[hidden] { display: none !important; }

.extra-card h3 { margin-bottom: .4em; }
.extra-card p:last-child { margin-bottom: 0; }

.guide-step { margin: 0 0 20px; }
.guide-step img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.guide-step figcaption { margin-top: 10px; display: flex; gap: 10px; align-items: baseline; }
.step-no {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-1px);
}

.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button {
  font: inherit;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--muted);
}
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--brand); font-weight: 600; }

.steps { padding-left: 1.3em; }
.steps li { margin-bottom: .5em; }
.if-see { margin: 20px 0; }
.if-see h3 { font-size: 16px; }
.if-see .shot { aspect-ratio: 16 / 7; max-width: 520px; margin: 10px 0 0; }

.release { margin-bottom: 16px; }
.release h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.release table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.release th, .release td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.release td code { word-break: break-all; }
.table-scroll { overflow-x: auto; }

/* 问答、长文本 */
details.qa { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.qa summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; position: relative; padding-right: 28px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 20px; color: var(--muted); }
details.qa[open] summary::after { content: "−"; }
details.qa > div { padding: 0 0 12px; color: var(--muted); }

.doc h2 { font-size: 20px; margin-top: 2em; }
.doc li { margin-bottom: .4em; }
.todo { background: var(--warn-bg); color: var(--warn-ink); padding: 0 4px; border-radius: 4px; }

pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
pre { background: var(--soft); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }

.copy-box { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; white-space: pre-wrap; font-size: 15px; }

/* 弹窗 */
dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  max-width: min(420px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(31,29,43,.25);
}
dialog::backdrop { background: rgba(31,29,43,.45); }

/* 页脚（墨黑） */
.site-footer {
  background: var(--footer);
  color: rgba(255,255,255,.65);
  font-size: 14px;
  padding: 40px 0 32px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; margin-right: 16px; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0 0 6px; }
.footer-brand { display: flex; align-items: center; gap: 6px; }
.footer-brand img { height: 20px; width: auto; }

/* 首页精简版：第一屏只有 "Luna / 你的创作助手" */
.hero-simple .wrap {
  display: block;
  text-align: center;
  padding-top: 72px;
  padding-bottom: 80px;
}
.hero-simple .hero-moon { width: 120px; margin: 0 auto 28px; }
.hero-title { margin: 0 0 20px; line-height: 0; }
.hero-title img { display: inline-block; height: clamp(64px, 14vw, 100px); width: auto; }
.hero-sub { font-size: clamp(22px, 4vw, 30px); font-weight: 600; margin: 0 0 12px; }
.hero-intro { font-size: 15px; color: var(--muted); max-width: 30em; margin: 0 auto; }
.hero-simple .actions { justify-content: center; }
@media (max-width: 760px) {
  .hero-simple .wrap { padding-top: 48px; padding-bottom: 56px; }
  .hero-simple .hero-moon { width: 96px; }
}

/* 问答式介绍 */
.ask { padding: 28px 0; border-bottom: 1px solid var(--line); }
.ask:last-child { border-bottom: 0; }
.ask h2 { font-size: clamp(20px, 3.4vw, 24px); display: flex; align-items: baseline; gap: 10px; }
.ask .q {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 14px;
  transform: translateY(-2px);
}
.ask p:last-child { margin-bottom: 0; }

/* 闭环图 */
.loop-figure { margin: 16px 0 20px; text-align: center; }
.loop-figure svg { width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto 8px; }
.loop-center { font-family: var(--font); font-size: 18px; font-weight: 600; fill: var(--muted); }
.node circle { stroke-width: 2; }
.node text { text-anchor: middle; font-family: var(--font); font-size: 17px; font-weight: 700; }
.node text.st { font-size: 11px; font-weight: 600; }
.node.beta circle { fill: var(--brand); stroke: var(--brand); }
.node.beta text { fill: #fff; }
.node.soon circle { fill: #fff; stroke: #d9d2e2; }
.node.soon text { fill: var(--ink); }
.node.soon text.st { fill: var(--muted); }

.steps-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.steps-dl dt { font-weight: 700; }
.steps-dl dd { margin: 0; color: var(--muted); }
