/**
 * 领素材端设计系统。
 *
 * 三条硬约束（YL）：零 Emoji（图标一律线性 SVG）／不靠颜色单独表意／对比度是硬要求不是加分项。
 * 一条产品约束：这是给「45 岁、只用手机、没被培训过的兼职博主」用的 ——
 * 正文最小 15px，触控目标最小 44px，任何"点了会发生什么"都要先说清楚。
 */

/* ── 色板：正文对比度全部 ≥ 4.5:1，实测标在后面 ───────────────────────────── */
:root {
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --surface-2: #F3F1EE;
  --line: #E3DFD9;
  --line-strong: #CFC9C1;

  --text: #1C1A17;          /* 在 --bg 上 15.8:1 */
  --text-2: #4A4640;        /* 8.2:1 */
  --text-3: #6B655C;        /* 5.1:1 —— 这是最浅的可用正文色，别再往浅了走 */

  --accent: #C2410C;        /* 主色（砖红）在白底 5.6:1 */
  --accent-weak: #FDF0E8;
  --accent-line: #F0C8AF;

  --ok: #15803D;            /* 4.9:1 */
  --ok-weak: #EAF6EE;
  --warn: #9A5B00;          /* 4.8:1 —— 看板已验过的那个值 */
  --warn-weak: #FBF2E3;
  --stop: #B42318;          /* 5.9:1 */
  --stop-weak: #FDECEA;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(28,26,23,.05), 0 4px 16px rgba(28,26,23,.05);

  --step--1: 13px;
  --step-0: 15px;           /* 正文基准，不再小 */
  --step-1: 17px;
  --step-2: 21px;
  --step-3: 27px;

  --gap: 14px;
  --pad: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #201F1C;
    --surface-2: #2A2825;
    --line: #35322E;
    --line-strong: #4A4640;
    --text: #F2EFEA;
    --text-2: #C9C4BC;
    --text-3: #9A948B;
    --accent: #FF8A50;
    --accent-weak: #34211696;
    --accent-line: #6B3B22;
    --ok: #5DD68F;
    --ok-weak: #16301F96;
    --warn: #E6A23C;
    --warn-weak: #33260F96;
    --stop: #FF8078;
    --stop-weak: #37191796;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
/* ★手动切换必须压过系统偏好，**两个方向都要**。
   只写 color-scheme 是不够的 —— 上面那段 @media 里的变量会继续生效，
   表现就是「点了切换没反应」（这里踩过一次）。所以两边都要把变量重新声明一遍。 */
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #FBFAF8; --surface: #FFFFFF; --surface-2: #F3F1EE; --line: #E3DFD9; --line-strong: #CFC9C1;
  --text: #1C1A17; --text-2: #4A4640; --text-3: #6B655C;
  --accent: #C2410C; --accent-weak: #FDF0E8; --accent-line: #F0C8AF;
  --ok: #15803D; --ok-weak: #EAF6EE; --warn: #9A5B00; --warn-weak: #FBF2E3;
  --stop: #B42318; --stop-weak: #FDECEA;
  --shadow: 0 1px 2px rgba(28,26,23,.05), 0 4px 16px rgba(28,26,23,.05);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #161513; --surface: #201F1C; --surface-2: #2A2825; --line: #35322E; --line-strong: #4A4640;
  --text: #F2EFEA; --text-2: #C9C4BC; --text-3: #9A948B;
  --accent: #FF8A50; --accent-weak: #34211696; --accent-line: #6B3B22;
  --ok: #5DD68F; --ok-weak: #16301F96; --warn: #E6A23C; --warn-weak: #33260F96;
  --stop: #FF8078; --stop-weak: #37191796;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}

/* 推荐卡：既然素材之间实质无差别，就别让他挑 —— 直接给一个 */
.pick { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-weak), var(--surface) 60%); }
.pick .why { color: var(--accent); font-weight: 650; font-size: var(--step--1); }
.pick .big { display: flex; gap: 14px; margin: 12px 0; }
.pick .big img { width: 96px; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
details.more > summary {
  cursor: pointer; list-style: none; padding: 12px 2px; color: var(--text-2);
  font-size: var(--step-0); font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 6px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '（展开）'; color: var(--text-3); font-weight: 400; font-size: var(--step--1); }
details.more[open] > summary::after { content: '（收起）'; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--step-0)/1.65 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;         /* 页面本体永不横向滚动；要滚的自己包一层 */
}

/* ── 无障碍基础件 ───────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── 布局 ──────────────────────────────────────────────────────────────── */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 var(--pad) 96px; }
@media (min-width: 900px) { .wrap { max-width: 720px; } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 560px; margin: 0 auto; padding: 10px var(--pad);
  display: flex; align-items: center; gap: 10px; min-height: 52px;
}
@media (min-width: 900px) { .topbar-in { max-width: 720px; } }
.topbar h1 { font-size: var(--step-1); margin: 0; font-weight: 650; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }

/* 返回按钮：44px 触控目标，图标是线性 SVG */
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; margin: -8px;
  background: none; border: 0; color: var(--text-2); cursor: pointer; border-radius: 10px;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── 卡片 ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
  margin: var(--gap) 0;
}
.card.flat { box-shadow: none; }
.card-title { font-size: var(--step-1); font-weight: 650; margin: 0 0 6px; }
.muted { color: var(--text-3); font-size: var(--step--1); }
.lead { color: var(--text-2); margin: 0 0 var(--gap); }

/* 章节标题：小、克制、不抢正文 */
.sec {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--step--1); font-weight: 650; color: var(--text-3);
  letter-spacing: .04em; margin: 26px 0 6px;
}
.sec svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ── 按钮 ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  font-size: var(--step-1); font-weight: 600; font-family: inherit;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none;   /* <a class=btn> 不能带下划线 */
  transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: scale(.985); }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] {
  /* ★不用 opacity —— 那会把对比度一起砍掉，读屏和弱视用户都读不出 */
  background: var(--surface-2); color: var(--text-3); border-color: var(--line-strong);
  cursor: not-allowed; filter: none;
}
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.sm { min-height: 40px; font-size: var(--step-0); padding: 0 14px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 底部固定操作条：手机上主操作永远够得着 */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
}
.dock-in { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
@media (min-width: 900px) { .dock-in { max-width: 720px; } }

/* ── 表单 ──────────────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: var(--step-0); }
.hint { color: var(--text-3); font-size: var(--step--1); margin: -2px 0 8px; font-weight: 400; }
input[type=text], input[type=tel], input[type=password], textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 11px;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.field { margin: 0 0 var(--gap); }
.err { color: var(--stop); font-size: var(--step--1); margin: 6px 0 0; }

/* ── 状态：色块 + 文字 + 形状，三重编码，绝不只靠颜色 ────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--step--1); font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.tag .dot { width: 8px; height: 8px; flex: none; }
.tag.ok { color: var(--ok); background: var(--ok-weak); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.tag.ok .dot { border-radius: 50%; background: currentColor; }                    /* 圆 = 顺利 */
.tag.warn { color: var(--warn); background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.tag.warn .dot { background: currentColor; transform: rotate(45deg); }            /* 菱形 = 要注意 */
.tag.stop { color: var(--stop); background: var(--stop-weak); border-color: color-mix(in srgb, var(--stop) 35%, transparent); }
.tag.stop .dot { background: currentColor; }                                      /* 方 = 有问题 */
.tag.idle { color: var(--text-3); background: var(--surface-2); border-color: var(--line); }
.tag.idle .dot { background: currentColor; border-radius: 2px; }

/* ── 硬规则清单：整个产品最重要的一块，做完拿不到钱全靠它 ──────────────── */
.rules { list-style: none; margin: 0; padding: 0; }
.rules li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.rules li:last-child { border-bottom: 0; }
.rules .n {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 50%; font-size: 12px; font-weight: 700;
}
.rules b { font-weight: 650; }

/* ── 检查项 ────────────────────────────────────────────────────────────── */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .mark { flex: none; width: 22px; height: 22px; display: grid; place-items: center; }
.checks .mark svg { width: 20px; height: 20px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.checks .pass .mark { color: var(--ok); }
.checks .fail .mark { color: var(--stop); }
.checks .unknown .mark { color: var(--text-3); }
.checks .label { font-weight: 600; }
.checks .fix { color: var(--text-2); font-size: var(--step--1); margin-top: 2px; }

/* ── 素材图逐张保存 ────────────────────────────────────────────────────── */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: var(--gap) 0 0; }
.shot { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.shot img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.shot .idx {
  position: absolute; left: 6px; top: 6px;
  background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; letter-spacing: .02em;
}
.shot.cover { border-color: var(--accent); border-width: 2px; }
.shot.cover .idx { background: var(--accent); }
.shot .saved {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px;
  display: none; place-items: center; background: var(--ok); color: #fff; border-radius: 50%;
}
.shot.done .saved { display: grid; }
.shot .saved svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.cover-note {
  display: flex; gap: 8px; align-items: center;
  background: var(--accent-weak); border: 1px solid var(--accent-line);
  color: var(--accent); border-radius: var(--radius-sm); padding: 9px 12px;
  font-size: var(--step--1); font-weight: 600; margin-top: 10px;
}
/* ★内联 SVG 不写尺寸就会撑成原始大小（这里漏过一次，页面中间出现一个巨大的黑三角）。
   兜底规则：卡片里任何没被更具体规则命中的图标，一律 1em。 */
.cover-note svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card svg:not([width]):not(.sized) { max-width: 20px; max-height: 20px; }

/* ── 文案复制块 ────────────────────────────────────────────────────────── */
.caption {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  white-space: pre-wrap;                 /* ★星子那边就是缺这一行，换行被折成空格 */
  line-height: 1.75; word-break: break-word;
}

/* ── 列表项（可领的一单）───────────────────────────────────────────────── */
.item {
  display: flex; gap: 12px; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin: 10px 0; box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
}
.item:hover { border-color: var(--line-strong); }
.item .thumb { flex: none; width: 74px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.item .thumb img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item .topics { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
}
.item .meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: var(--step--1); color: var(--text-3); }
.item .reward { color: var(--text); font-weight: 700; }

/* ── 空态 / 提示条 ─────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 1.4; margin-bottom: 10px; }
.note {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: var(--step--1);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
.note svg { flex: none; width: 17px; height: 17px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.note.warn { background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.note.stop { background: var(--stop-weak); border-color: color-mix(in srgb, var(--stop) 30%, transparent); color: var(--stop); }

/* ── 回执条：任何动作之后都要有话说（读屏用 role=status 自动播报）────────── */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 60; max-width: min(92vw, 420px);
  background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; font-size: var(--step-0); font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
}
.toast:empty { display: none; }

/* ── 加载骨架 ─────────────────────────────────────────────────────────── */
.skel { background: var(--surface-2); border-radius: var(--radius-sm); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
