/* 探校评估 H5 —— 移动优先。375px 基准，桌面端居中 420px。
   字体走系统栈：iOS 的 PingFang SC / 安卓的思源黑体都自带，零下载、
   国内网络下秒开，也省掉了 Google Fonts 在大陆不可达的老问题。

   视觉基调对齐设计稿「探校评估 H5」：纸白底、砖红点缀、2px 直角、
   发丝线分隔、中文字距拉开。不用圆角卡片和投影 —— 一份要拿给家长看的
   评估报告，排版语言更接近印刷品而不是 App 面板。 */

:root {
  --bg: #ffffff;          /* 屏内底色 */
  --canvas: #f1eee9;      /* 桌面端页面两侧的画布色 */
  --tint: #fbf8f5;        /* 提示块底色 */

  --ink: #26221f;         /* 标题、正文强调 */
  --ink-2: #3a3532;       /* 长段正文 */
  --ink-3: #6e6862;       /* 次级文字 */
  --ink-4: #8c857e;       /* 更次级 */
  --faint: #a79f98;       /* 字段名、辅助信息 */
  --faint-2: #bdb6af;
  --faint-3: #cfc8c1;     /* 序号、占位 */

  --line: #eae6e0;        /* 常规分隔线 */
  --line-soft: #f2efea;   /* 密集列表的行线 */
  --line-mid: #ede9e3;
  --line-strong: #ded7ce;

  --accent: #af3a2b;
  --accent-dark: #8e2c1f;
  --accent-tint: rgba(175, 58, 43, 0.07);

  --radius: 2px;
  --gutter: 20px;         /* 屏内左右安全边距 */
  --page: 420px;
}

* { box-sizing: border-box; }

/* [hidden] 来自浏览器默认样式表，任何带 display 的作者规则都能盖过它。
   本文件里 .overlay / .upload-add / .record 都设了 display，没有这条规则
   它们的 el.hidden = true 会完全失效（遮罩常驻、搜索过滤不掉记录）。 */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.4; }

a { color: var(--accent); text-decoration: none; }

/* 屏：手机上铺满，桌面端收成一条 420px 的纸。所有内容块自带左右内边距，
   .page 本身不留 padding —— 报告页的作品照要整幅出血。 */
.shell {
  max-width: var(--page);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}

.page {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.page.has-bottom-bar {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.gut { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
}

.topbar h1 { font-size: 17px; letter-spacing: 0.08em; color: var(--ink); }

.topbar .sub {
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 5px;
}

.topbar-actions { display: flex; align-items: baseline; gap: 16px; flex-shrink: 0; }

/* 顶栏动作是排版里的一行小字，不是按钮 —— 设计稿里它们没有边框和底色 */
.link-btn {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.link-btn.primary { color: var(--accent); }
.link-btn.danger { color: var(--accent); }

.chip-flag {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px 10px;
}

/* -------------------------------------------------------------- 节标题 */

/* 「壹 孩子信息 ————」这一行。序号用汉字数字，和 14 项里的 01/02 阿拉伯
   数字分层：一个是章节，一个是条目。 */
.sec {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 var(--gutter);
}

.sec .idx { font-size: 12px; color: var(--accent); letter-spacing: 0.1em; flex-shrink: 0; }

.sec .name {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink-3);
  white-space: nowrap;
}

.sec .rule { flex: 1; height: 1px; background: var(--line); }

.sec .aside { font-size: 11px; color: var(--faint); flex-shrink: 0; }

.sec.accent .name { color: var(--accent); }

/* ---------------------------------------------------------------- 表单 */

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
  padding: 20px var(--gutter) 0;
}

.field.wide { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin-bottom: 8px;
}

.field .req { color: var(--accent); }

/* 下划线式输入框：设计稿里表单是一张纸上的填空，不是一排输入控件。
   必填项的下划线用墨色，选填用发丝线，一眼能扫出哪些必须填。 */
input[type="text"],
input[type="date"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0 0 8px;
  font: inherit;
  font-size: 16px; /* < 16px 会让 iOS Safari 聚焦时自动放大页面 */
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  appearance: none;
}

.field.required input { border-bottom-color: var(--ink); }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

input::placeholder { color: var(--faint-3); }

/* iOS 上空的 date 输入框宽度会缩成文字那么宽，靠左飘着 */
input[type="date"] { min-height: 25px; }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%),
                    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: right 4px center, right 0 center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

textarea { resize: vertical; min-height: 84px; line-height: 1.8; }

.hint {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
  background: var(--tint);
  border-left: 2px solid var(--accent);
  padding: 12px 14px;
  margin: 14px var(--gutter) 0;
}
.hint b { color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------------ 进度条 */

.progress { padding: 0 var(--gutter); }

.progress .track { height: 2px; background: var(--line-mid); position: relative; }

.progress .bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width .25s;
}

.progress .stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
  margin-top: 7px;
}
.progress .stat b { color: var(--accent); font-weight: 600; }

/* -------------------------------------------------------- 四档评价 */

/* 一项 = 一行：序号 + 项名 + 四格连排，14 项全部平铺不折叠。
   档位写全称（待提升/达标/良好/优秀）—— 老师点的时候不用回想缩写指什么，
   四格因此占到 192px，项名压到 14px 仍装得下最长的「天马行空想象力」。 */

.rate-section { padding-top: 22px; }

.rate-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 var(--gutter);
  padding-bottom: 9px;
  border-bottom: 1px solid var(--ink);
}

.rate-head .axis-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: var(--ink);
  white-space: nowrap;
}

.rate-head .axis-count { font-size: 10.5px; color: var(--accent); letter-spacing: 0.08em; }

.rate-list { counter-reset: rate; }

.rate-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  margin: 0 var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  counter-increment: rate;
}

/* 序号跨轴连续编到 14 —— 老师说的是「第 12 项」，不是「第三组第二项」。
   decimal-leading-zero 直接给出 01/02 的补零形式。 */
.rate-item::before {
  content: counter(rate, decimal-leading-zero);
  font-size: 10px;
  font-weight: 600;
  color: var(--faint-3);
  width: 14px;
  flex-shrink: 0;
}

.rate-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ink);
}

/* 评完的项压暗一档，剩下没评的自己浮出来 */
.rate-item.done .rate-name { color: var(--ink-4); font-weight: 400; }

.rate-options {
  display: flex;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rate-options button {
  width: 48px;
  height: 38px;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--faint);
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--line);
  cursor: pointer;
  transition: background .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
.rate-options button:first-child { border-left: none; }

.rate-options button[aria-pressed="true"] {
  background: var(--accent);
  border-left-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------------------------------------------------------------- 上传 */

.uploader input[type="file"] { display: none; }

.upload-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px var(--gutter) 0;
}

.upload-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tint);
}

.upload-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.upload-tile .remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(38, 34, 31, 0.55);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.upload-add {
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.upload-add .plus { font-size: 22px; line-height: 1; font-weight: 300; }

/* ---------------------------------------------------------------- 底栏 */

.bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}

.bottom-bar .inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 12px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 填表页把进度文字和按钮包在一个 div 里 —— .btn 的 flex:1 在块级容器里不起作用，
   得显式给宽度，否则按钮只有文字那么宽、缩在左下角。 */
.bottom-bar .inner > div { flex: 1; min-width: 0; }
.bottom-bar .inner > div > .btn { width: 100%; }

.btn {
  flex: 1;
  min-height: 48px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-indent: 0.2em; /* 抵消末字右侧的字距，让文字真正居中 */
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dim { opacity: .35; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { flex: 0 0 auto; padding: 0 20px; font-size: 14px; letter-spacing: 0.08em; text-indent: 0.08em; }

.progress-text {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 9px;
}

/* ---------------------------------------------------------------- 报告 */

.report-head { text-align: center; padding: 34px 32px 0; }

.report-head .meta { font-size: 10.5px; letter-spacing: 0.24em; color: var(--faint-2); }

.report-head .name {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--ink);
  margin-top: 14px;
  line-height: 1.3;
}

.report-head .rule { width: 26px; height: 1px; background: var(--accent); margin: 20px auto 0; }

.portrait { padding: 26px 28px 0; text-align: center; }

.portrait .label {
  font-size: 10px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--accent);
}

.portrait .text {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-top: 12px;
  text-wrap: pretty;
}

/* ------------------------------------------------ 四张能力卡 + 横滑明细 */

/* 只有四个维度，雷达图的形状说明不了什么，换成四张直接写结论的卡片。
   卡片同时是下面明细面板的切换器。 */
.axis-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 30px var(--gutter) 0;
}

.axis-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  font: inherit;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.axis-card .cname { font-size: 12.5px; letter-spacing: 0.08em; color: var(--ink-3); }
.axis-card .clabel { font-size: 18px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); }

/* 选中的卡片换成红边 + 淡红底，跟下面正在显示的那一屏对应起来 */
.axis-card[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.axis-card[aria-selected="true"] .cname { color: var(--accent); }

.axis-swipe {
  display: flex;
  margin-top: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.axis-swipe::-webkit-scrollbar { display: none; }

.axis-panel { flex: 0 0 100%; scroll-snap-align: start; padding: 0 var(--gutter); }

/* 维度名已经写在上面选中的那张卡上了，面板里不再写第二遍 */
.axis-panel-head { display: none; }
.axis-panel .detail-row:first-of-type { border-top: 1px solid var(--ink); }

.swipe-hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--faint-3);
  letter-spacing: 0.14em;
  margin-top: 12px;
}

/* ---------------------------------------------------------- 作品解读 */

.reading { padding-top: 28px; }

/* 作品图按原图比例整幅铺开，不裁切 —— 老师拍的横图竖图各占各的高度，
   统一切成固定高度会把作品切掉一半。点一下看大图。 */
.artwork {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  position: relative;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.artwork img { display: block; width: 100%; height: auto; }

.artwork .zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 9px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(38, 34, 31, 0.5);
  border-radius: var(--radius);
}

.reading-body { padding: 20px var(--gutter) 0; }

.reading-body .head { display: flex; align-items: baseline; gap: 10px; }
.reading-body .num { font-size: 10px; font-weight: 600; color: var(--faint-3); flex-shrink: 0; }
.reading-body .title {
  flex: 1;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--ink);
}

.reading-body .para { margin-top: 18px; }

.para-label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin-bottom: 6px;
}
.para-label.accent { color: var(--accent); }

/* 天赋标签 + 艺术表达正文 */
.talent { padding: 22px var(--gutter) 0; }

.talent-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.talent-chip {
  padding: 5px 10px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: var(--radius);
}

/* 没有标签时这一段就是天赋段的全部内容，不该再往下垫一截空白 */
.talent-chips + .prose { margin-top: 22px; }

.prose {
  margin: 0;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  text-wrap: pretty;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 18px;
}

/* 逐项打分的行，四张卡下面的横滑面板用 */

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  border-bottom: 1px solid var(--line-soft);
}

.detail-row .dt-name { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); }

.detail-row .dt-label {
  width: 42px;
  text-align: right;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
}

/* 四格刻度条：比色块更克制，也不需要给家长解释颜色的含义 */
.dt-bars { display: flex; gap: 3px; flex-shrink: 0; }
.dt-bars i { width: 10px; height: 3px; background: var(--line-mid); }
.dt-bars i.on { background: var(--accent); }

.report-foot {
  text-align: center;
  padding: 46px var(--gutter) 0;
  font-size: 11.5px;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.report-foot .brand {
  display: block;
  font-size: 11px;
  color: var(--faint-2);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  margin-top: 12px;
}

/* ---------------------------------------------------------- 校长列表页 */

.search-box { padding: 0 var(--gutter); }
.search-box input { font-size: 14px; padding-bottom: 9px; }

.record-list { padding: 0 var(--gutter); }

.record {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.record .row1 { display: flex; align-items: baseline; gap: 8px; }
.record .rname { font-size: 17px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink); }
.record .rage { font-size: 11px; color: var(--faint); }
.record .rdate { margin-left: auto; font-size: 11px; color: var(--faint); }

.record .rtag { font-size: 13px; line-height: 1.6; color: var(--accent); margin-top: 7px; }

.record .row3 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 11px;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 0.04em;
}

.axis-chip {
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--accent-tint);
  color: var(--accent);
}

.type-chip {
  padding: 2px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}

/* 状态是一行小字，不是彩色胶囊 —— 列表里最该跳出来的是孩子的名字 */
.status-chip { margin-left: auto; letter-spacing: 0.06em; color: var(--ink-4); }
.status-chip[data-status="ai_draft"],
.status-chip[data-status="confirmed"] { color: var(--ink); }
.status-chip[data-status="pending"],
.status-chip[data-status="processing"],
.status-chip[data-status="failed"] { color: var(--accent); }

.empty { text-align: center; color: var(--faint-2); font-size: 13.5px; padding: 60px 20px; }

.list-foot {
  text-align: center;
  padding: 36px 20px;
  font-size: 10.5px;
  color: var(--faint-3);
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

/* ---------------------------------------------------------------- 登录 */

.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 44px 90px;
}

/* 竖排品牌字：设计稿的开场就是这一竖行字 + 一道红线 */
.login-wrap .brand {
  writing-mode: vertical-rl;
  height: 200px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.62em;
  text-indent: 0.62em;
  color: var(--ink);
}

.login-wrap .stroke { width: 1px; height: 34px; background: var(--accent); margin: 22px 0 20px; }

.login-wrap .sub {
  font-size: 11px;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  color: var(--faint);
}

.login-wrap form { width: 100%; margin-top: 74px; }
.login-wrap .field label { font-size: 11px; letter-spacing: 0.2em; margin-bottom: 12px; }
.login-wrap input { font-size: 17px; letter-spacing: 0.42em; padding-bottom: 11px; border-bottom-color: var(--ink); }
.login-wrap .btn { width: 100%; min-height: 50px; margin-top: 44px; }
.login-wrap .foot { text-align: center; font-size: 11.5px; color: var(--faint-2); letter-spacing: 0.06em; margin-top: 20px; }
.login-err { color: var(--accent); font-size: 13px; text-align: center; margin-top: 14px; }

/* ------------------------------------------------------------- 空状态页 */

.notice-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 40px 90px;
  text-align: center;
}
.notice-wrap .title { font-size: 17px; letter-spacing: 0.16em; text-indent: 0.16em; color: var(--ink); }
.notice-wrap .stroke { width: 26px; height: 1px; background: var(--accent); margin: 20px 0 0; }
.notice-wrap .desc { font-size: 13px; color: var(--faint); margin: 16px 0 28px; letter-spacing: 0.04em; }

/* ------------------------------------------------------------ 生成中页 */

.job-wrap {
  min-height: calc(100dvh - 190px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter) 60px;
}

.job-wrap .job-title {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  color: var(--ink);
  margin-top: 32px;
  text-align: center;
}

.job-wrap .job-msg {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--faint);
  margin-top: 12px;
  text-align: center;
}

.job-steps { width: 100%; margin-top: 52px; }

.job-step {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  border-bottom: 1px solid var(--line-soft);
}
.job-step .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.job-step .label { flex: 1; font-size: 13px; color: var(--faint-2); }
.job-step .state { font-size: 11px; color: var(--faint-3); letter-spacing: 0.06em; }

.job-step[data-state="done"] .dot { background: var(--ink); }
.job-step[data-state="done"] .label { color: var(--ink-4); }
.job-step[data-state="done"] .state { color: var(--faint); }

.job-step[data-state="active"] .dot { background: var(--accent); }
.job-step[data-state="active"] .label { color: var(--ink); font-weight: 500; }
.job-step[data-state="active"] .state { color: var(--accent); }

.job-wrap .btn { flex: 0 0 auto; margin-top: 36px; padding: 0 28px; }

/* ---------------------------------------------------------------- 遮罩 */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.spinner {
  width: 40px; height: 40px;
  border: 1.5px solid var(--line-mid);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 26px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay .msg { font-size: 15px; color: var(--ink); letter-spacing: 0.08em; }
.overlay .sub { font-size: 12.5px; color: var(--faint); margin-top: 10px; line-height: 1.9; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  max-width: 82vw;
  padding: 10px 18px;
  background: rgba(38, 34, 31, 0.92);
  color: #fff;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* 底部动作面板：选照片来源（相机 / 相册） */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(20, 18, 16, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-panel {
  width: 100%;
  max-width: var(--page);
  background: var(--bg);
  padding: 0 0 env(safe-area-inset-bottom);
}

.sheet-btn {
  display: block;
  width: 100%;
  min-height: 54px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--bg);
  border: none;
  border-top: 1px solid var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sheet-btn:first-child { border-top: none; }
.sheet-btn.danger { color: var(--accent); }
.sheet-btn.cancel { color: var(--faint); border-top: 6px solid var(--canvas); }

.sheet-note {
  padding: 22px var(--gutter) 18px;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  color: var(--faint);
}

/* 作品大图 —— 点作品图铺满屏幕看细节，报告页唯一的浮层 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20, 18, 16, .97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox .close {
  flex: 0 0 auto;
  padding: 10px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .4);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 桌面 */

@media (min-width: 640px) {
  body { padding: 0; }
  .shell { box-shadow: 0 24px 60px rgba(70, 55, 45, .10); }
  /* 底栏跟着那条纸走。width:100% + right:auto 是必须的 —— 只写 left:50% 时
     宽度会由 right:0 算出来（视口 640-840px 之间会算成不足 420），跟纸对不齐。 */
  .bottom-bar {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: var(--page);
    transform: translateX(-50%);
  }
}
