/* 穿搭衣影解读站：午后木地板的暖色编辑风。主题变量同时供框架的迭代记录页（changelog.css）使用 */
:root {
  --bg: #f7f1e7;
  --paper: #fffdf9;
  --ink: #2a2420;
  --muted: #6f655c;
  --line: #e9dfd1;
  --accent: #b8432c;
  --accent-dark: #93331f;
  --amber: #c98a3c;
  --amber-soft: #f6ead6;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(60, 40, 20, .07);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px; line-height: 1.8; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); }
code { padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .05); font-family: var(--mono); font-size: .92em; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 231, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 960px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.nav a.is-active { background: var(--ink); color: var(--paper); }

/* ---------- 页面容器 ---------- */
.page { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ---------- Hero ---------- */
.hero { margin: 28px 0 40px; }
.hero-cover { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper); }
.hero-cover img { width: 100%; height: auto; }
.hero-body { padding: 26px 4px 0; }
.hero-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.hero-title { margin: 0 0 12px; font-size: clamp(26px, 4.6vw, 38px); line-height: 1.25; letter-spacing: -.01em; }
.hero-sub { margin: 0 0 18px; font-size: 17px; line-height: 1.75; color: var(--muted); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.hero-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.hero-author img { width: 24px; height: 24px; border-radius: 50%; }
.hero-author small { color: var(--muted); font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: transform .05s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--amber); color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- 内容块通用 ---------- */
.block {
  margin: 0 0 28px; padding: 28px 30px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.block-head { display: grid; gap: 6px; justify-items: start; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-size: 24px; line-height: 1.3; }
.block-head .kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--amber); }
.block-head .sub { margin: 0; font-size: 14px; color: var(--muted); }
.origin-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.origin-original .origin-tag { background: var(--amber-soft); color: #8a5a1c; }
.origin-interpret { border-color: #f0d9cf; }
.origin-interpret .origin-tag { background: #f9e3dd; color: var(--accent); }

/* ---------- richtext ---------- */
.richtext p { margin: 0 0 14px; font-size: 17px; line-height: 1.9; }
.richtext p:last-child { margin-bottom: 0; }
.richtext.is-quote p { padding-left: 18px; border-left: 3px solid var(--amber); }
.richtext ul { margin: 0; padding-left: 20px; }

/* ---------- callout ---------- */
.callout { display: grid; gap: 16px; }
.callout-body { margin: 0; font-size: 17px; line-height: 1.85; }
.callout strong { color: var(--accent); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.flow li { position: relative; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 4px; }
.flow li + li::before {
  content: "→"; position: absolute; left: -9px; top: 50%; transform: translate(-50%, -50%);
  color: var(--amber); font-weight: 700;
}
.flow-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.flow-text { font-size: 14px; line-height: 1.6; }

/* ---------- compare：对比滑块 ---------- */
.compare-item { display: none; margin: 0; }
.compare-item.is-current { display: block; }
.compare-frame {
  --p: 12%;
  position: relative; width: min(100%, 520px); aspect-ratio: 3 / 4; margin: 0 auto;
  border-radius: 16px; overflow: hidden; background: #e8dcc8;
  cursor: ew-resize; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.compare-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.compare-before { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--p); width: 0;
  border-left: 2px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); transform: translateX(-1px);
}
.compare-handle i {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-style: normal; font-size: 18px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.compare-tag {
  position: absolute; top: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(42, 36, 32, .72); color: #fff; font-size: 12px; font-weight: 600;
}
.compare-tag-before { left: 12px; }
.compare-tag-after { right: 12px; }
.compare-range { display: block; width: min(100%, 520px); margin: 14px auto 0; accent-color: var(--accent); cursor: ew-resize; }
.compare-caption { max-width: 560px; margin: 10px auto 0; text-align: center; font-size: 14px; line-height: 1.6; color: var(--muted); }
.compare-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.compare-thumb {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border: 2px solid transparent; border-radius: 999px; background: var(--bg); cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.compare-thumb img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.compare-thumb.is-current { border-color: var(--accent); }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px;
}
.step-body h3 { margin: 3px 0 4px; font-size: 17px; line-height: 1.4; }
.step-body p { margin: 0; font-size: 15px; line-height: 1.8; color: #3d352f; }
.tip { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); font-size: 14px; line-height: 1.7; }
.tip b { margin-right: 8px; color: #8a5a1c; }

/* ---------- gallery：图片网格 + 放大 ---------- */
.gallery { display: grid; gap: 14px; }
.gallery-three { grid-template-columns: repeat(3, 1fr); }
.gallery-two { grid-template-columns: repeat(2, 1fr); }
.gallery-item { margin: 0; }
.gallery-open { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: none; cursor: zoom-in; }
.gallery-open img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; transition: transform .3s; }
.gallery-open:hover img { transform: scale(1.02); }
.gallery-item figcaption { display: grid; gap: 2px; margin-top: 8px; font-size: 13px; line-height: 1.5; }
.gallery-item figcaption span { color: var(--muted); }
.lightbox { max-width: min(92vw, 1100px); padding: 0; border: 0; background: transparent; cursor: zoom-out; }
.lightbox::backdrop { background: rgba(20, 14, 10, .86); }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; margin: 0 auto; }
.lightbox p { margin: 10px 0 0; color: #fff; text-align: center; font-size: 14px; }

/* ---------- prompt：提示词卡片 ---------- */
.prompt { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fbf6ee; }
.prompt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.prompt-stat { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prompt-body { max-height: 560px; padding: 6px 20px 14px; overflow: auto; }
.prompt-sec { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.prompt-sec:last-child { border-bottom: 0; }
.prompt-sec h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent); }
.prompt-sec h3.is-muted { color: var(--muted); }
.prompt-sec pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 15px; line-height: 1.85; color: var(--ink); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.card blockquote {
  margin: 0; padding: 10px 12px; border-left: 3px solid var(--amber); border-radius: 0 10px 10px 0;
  background: var(--amber-soft); font-size: 13.5px; line-height: 1.7; color: #6b4a1e;
}
.card h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.card p { margin: 0; font-size: 15px; line-height: 1.8; color: #3d352f; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 0; list-style: none; }
.tags li { padding: 2px 9px; border-radius: 999px; background: #f1e9dc; font-size: 12px; color: var(--muted); }

/* ---------- checklist：验收清单 ---------- */
.checklist-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.checklist-track { flex: 1; height: 8px; border-radius: 999px; background: #efe6d8; overflow: hidden; }
.checklist-bar { width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--amber), var(--accent)); transition: width .25s; }
.checklist-text { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li label {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 15px; line-height: 1.6;
  transition: background .15s, border-color .15s;
}
.checklist li label:hover { background: #fbf6ee; }
.checklist input { flex: none; width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); }
.checklist li.is-done label { background: #f3f6ee; border-color: #cfdcc4; color: var(--muted); }
.checklist li.is-done span { text-decoration: line-through; }
.linklike { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--accent); font-family: inherit; font-size: 13px; cursor: pointer; }

/* ---------- source：来源与声明 ---------- */
.source { display: grid; gap: 16px; }
.source-author { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.source-author img { width: 44px; height: 44px; border-radius: 50%; }
.source-author span { display: grid; line-height: 1.3; }
.source-author b { font-size: 15px; }
.source-author small { color: var(--muted); }
.verified {
  display: inline-block; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%;
  background: #1d9bf0; color: #fff; font-size: 11px; font-style: normal; line-height: 16px; text-align: center; vertical-align: 2px;
}
.source-facts { display: grid; gap: 10px; margin: 0; }
.source-facts div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.source-facts dt { color: var(--muted); }
.source-facts dd { margin: 0; }
.source-facts small { display: block; color: var(--muted); font-size: 12px; }
.source-note { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ---------- feedback：点赞与留言 ---------- */
.feedback { display: grid; gap: 16px; }
.feedback-like { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.like {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid #f0cfc6; background: #fdf1ed; color: var(--accent);
  font-family: inherit; font-weight: 700; cursor: pointer; transition: transform .1s;
}
.like:active { transform: scale(.96); }
.like.is-liked { background: var(--accent); border-color: var(--accent); color: #fff; }
.like-icon { font-size: 18px; }
.like b { font-variant-numeric: tabular-nums; }
.feedback-hint { font-size: 13px; color: var(--muted); }
.feedback-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font-family: inherit; font-size: 15px; resize: vertical;
}
.feedback-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.feedback-msg { font-size: 13px; color: var(--muted); }
.feedback-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feedback-list li { padding: 10px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; line-height: 1.6; }
.feedback-list small { margin-left: 6px; color: var(--muted); }

/* ---------- 页脚 / toast ---------- */
.foot { max-width: 860px; margin: 40px auto 60px; padding: 24px 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.7; }
.foot-note { margin: 0 0 6px; }
.foot-meta { margin: 0; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: calc(100vw - 32px);
  padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 13px;
  opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: .96; transform: translateX(-50%) translateY(0); }

/* ---------- 窄屏 ---------- */
@media (max-width: 640px) {
  .block { padding: 20px 18px; border-radius: 16px; }
  .block-head h2 { font-size: 20px; }
  .richtext p, .callout-body { font-size: 16px; }
  .flow { grid-template-columns: 1fr; gap: 14px; }
  .flow li + li::before { content: "↓"; left: 50%; top: -10px; transform: translate(-50%, -50%); }
  .gallery-three, .gallery-two { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .prompt-body { max-height: none; }
  .source-facts div { grid-template-columns: 1fr; gap: 2px; }
  .brand { max-width: 40vw; }
}
