:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #f8f9f6;
  --ink: #202722;
  --ink-soft: #5d6860;
  --ink-mute: #8a938c;
  --line: #e5e9e3;
  --line-strong: #d8ded6;
  --accent: #296b4d;
  --accent-hover: #20583f;
  --accent-soft: #eaf3ed;
  --warm: #d77b48;
  --danger: #b44335;
  --shadow: 0 1px 2px rgba(30, 42, 34, 0.03), 0 12px 36px rgba(30, 42, 34, 0.045);
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 1180px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.page-noise { display: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(41, 107, 77, 0.2);
  outline-offset: 3px;
}

.site-header {
  width: min(1240px, calc(100% - 64px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-sub {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.header-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 12px;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #58a279;
  box-shadow: 0 0 0 4px rgba(88, 162, 121, 0.1);
}

main {
  flex: 1;
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}


.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.lead { margin: 24px 0 36px; color: var(--ink-soft); font-size: 15px; line-height: 1.9; }
.field-hint { margin: -2px 0 2px; color: var(--ink-mute); font-size: 11px; line-height: 1.65; }

input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input::placeholder { color: #a7aea8; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(41, 107, 77, 0.08); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error, .form-error { margin: 2px 0 0; color: var(--danger); font-size: 12px; line-height: 1.6; }
.form-error { padding: 10px 12px; border-radius: 9px; background: #fbefec; }

/* 通用按钮 */
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.38; box-shadow: none; }
.btn-primary { color: #fff; background: var(--accent); box-shadow: 0 5px 14px rgba(41, 107, 77, 0.16); }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); box-shadow: 0 7px 18px rgba(41, 107, 77, 0.2); }
.btn-dark { color: #fff; background: var(--ink); }
.btn-dark:hover { background: #111712; }
.btn-quiet { color: var(--ink-soft); background: #fff; border-color: var(--line-strong); box-shadow: none; }
.btn-quiet:not(:disabled):hover { color: var(--ink); background: var(--surface-soft); border-color: #c5cec4; }
.btn-batch { color: var(--accent); background: var(--accent-soft); border-color: rgba(41, 107, 77, 0.24); box-shadow: none; }
.btn-batch:not(:disabled):hover { color: var(--accent-hover); background: #e0efe6; border-color: rgba(41, 107, 77, 0.38); }
.btn-batch svg { opacity: 0.85; }
/* 危险动作（清空全部照片的二次确认） */
.btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); box-shadow: 0 5px 14px rgba(180, 67, 53, 0.18); }
.btn-danger:not(:disabled):hover { background: #9d3729; border-color: #9d3729; }
.btn-wechat { color: #fff; background: #237a41; }
.btn-wechat:hover { background: #1b6435; }
.btn-wechat svg { width: 20px; height: 20px; }
.btn-block { width: 100%; margin-top: 8px; }

/* 操作台 */
.workspace { width: 100%; padding: 38px 0 32px; animation: rise 360ms ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.workspace-heading h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.workspace-lead { margin: 10px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }

.workflow {
  display: flex;
  align-items: center;
  width: min(610px, 100%);
  margin: 30px 0 24px;
}
.workflow-step { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--ink-mute); }
.workflow-step span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 10px;
  font-weight: 650;
}
.workflow-step strong { font-size: 12px; font-weight: 500; white-space: nowrap; }
.workflow-step.is-current { color: var(--accent); }
.workflow-step.is-current span { border-color: var(--accent); background: var(--accent); color: #fff; }
.workflow-step.is-current strong { font-weight: 650; }
.workflow-step.is-complete { color: var(--accent); }
.workflow-step.is-complete span { border-color: #b9d1c1; background: var(--accent-soft); color: var(--accent); }
.workflow-line { height: 1px; flex: 1; min-width: 24px; margin: 0 14px; background: var(--line-strong); }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
/* 图片卡和标注卡同一列：标注卡紧跟在图片下面，不受右侧控制卡高度影响 */
.stage-column { display: grid; gap: 20px; align-content: start; min-width: 0; }
.stage-card, .control-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.stage-card { min-width: 0; overflow: hidden; border-radius: 16px; }
.stage-toolbar {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.stage-heading { display: flex; align-items: center; gap: 9px; }
.stage-heading svg { width: 17px; height: 17px; color: var(--ink-mute); }
.stage-title { font-size: 12px; font-weight: 600; }
.stage-meta { overflow: hidden; color: var(--ink-mute); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stage-body { display: flex; align-items: stretch; min-width: 0; }
.stage-content { min-width: 0; flex: 1; }
.photo-rail {
  width: 148px;
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  background: #fbfcfa;
}
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 10px; color: var(--ink-mute); }
.rail-head strong { color: var(--accent); font-weight: 650; }
.photo-list { display: grid; gap: 9px; flex: 1 1 auto; min-height: 0; align-content: start; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.photo-list::-webkit-scrollbar { width: 4px; }
.photo-list::-webkit-scrollbar-thumb { border-radius: 99px; background: #cfd8ce; }
.photo-item {
  position: relative;
  width: 100%;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-soft);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.photo-item:hover:not(:disabled) { border-color: #a9c3b2; }
.photo-item.is-active { border-color: var(--accent); background: #f4f9f5; box-shadow: 0 0 0 2px rgba(41, 107, 77, 0.1); }
.photo-item:disabled { cursor: wait; }
/* 缩略图是 inline 的 span，width / padding-top 在这里都不生效，
   实际高度由 img 自身尺寸撑开；aspect-ratio 只是无害的声明，别改成 padding-top 方案。 */
.photo-thumb { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 5px; background: #e9ede7; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-number {
  position: absolute;
  top: 5px;
  left: 5px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(24, 31, 26, 0.65);
  color: #fff;
  font-size: 9px;
  backdrop-filter: blur(5px);
}
.photo-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 6px 3px 2px; font-size: 9px; }
.photo-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-status { flex: 0 0 auto; color: var(--ink-mute); }
.photo-item.is-done .photo-status { color: var(--accent); }
.photo-item.is-done .photo-thumb::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(20, 40, 28, 0.26);
}
.add-photos-btn {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  border: 1px dashed #bdcabe;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
}
.add-photos-btn svg { width: 14px; height: 14px; }
.add-photos-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.add-photos-btn:disabled { cursor: not-allowed; opacity: 0.4; }

.dropzone {
  min-height: 526px;
  margin: 14px;
  padding: 46px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #cfd8ce;
  border-radius: 12px;
  outline: none;
  background: var(--surface-soft);
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-dragging {
  border-color: var(--accent);
  background: #f2f7f2;
  box-shadow: inset 0 0 0 3px rgba(41, 107, 77, 0.035);
}
.dropzone.is-busy { pointer-events: none; cursor: progress; border-color: var(--accent); background: #f2f7f2; }
.dropzone.is-busy .upload-icon { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.upload-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid #dce8de;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(41, 107, 77, 0.06);
}
.upload-icon svg { width: 32px; height: 32px; }
.dropzone h2 { margin: 0 0 10px; font-size: 21px; font-weight: 650; letter-spacing: -0.025em; }
.dropzone p { margin: 0 0 25px; color: var(--ink-mute); font-size: 13px; }
.dropzone .btn { min-width: 142px; }
.upload-specs { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; color: var(--ink-mute); font-size: 10px; }
.upload-specs i { width: 2px; height: 2px; border-radius: 50%; background: #a9b1aa; }

.preview-wrap { position: relative; isolation: isolate; overflow: hidden; background: #171c18; }
.preview-wrap::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background-image: var(--photo-bg, none);
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(0.82) brightness(0.54);
  transform: scale(1.08);
  opacity: 0.9;
}
.preview-wrap .compare, .preview-wrap .preview-caption { position: relative; z-index: 1; }
.compare {
  position: relative;
  width: 100%;
  max-height: min(70vh, 680px);
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  overflow: hidden;
  background: #141815;
  user-select: none;
  touch-action: pan-y;
  --position: 52%;
}
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.after-layer { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--position)); will-change: clip-path; }
.compare-labels { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; pointer-events: none; }
.compare-label { padding: 6px 10px; border-radius: 6px; background: rgba(18, 24, 20, 0.62); color: rgba(255, 255, 255, 0.92); font-size: 10px; backdrop-filter: blur(8px); }
.compare-label-after { background: rgba(41, 107, 77, 0.9); color: #fff; }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--position); width: 44px; margin-left: -22px; background: transparent; cursor: ew-resize; touch-action: none; }
.compare-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 0 18px rgba(0, 0, 0, 0.18); }
.compare-line:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }
.compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25);
}
.compare-knob svg { width: 22px; height: 22px; }
.preview-caption { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 18px; background: #171c18; color: rgba(255, 255, 255, 0.66); font-size: 10px; line-height: 1.5; }
#privacyTag { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: rgba(255, 255, 255, 0.52); white-space: nowrap; }
#privacyTag .status-dot { width: 5px; height: 5px; flex-basis: 5px; box-shadow: none; }

/* 菜名标注 */
.caption-preview { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* 菜名标注卡片：沿用右侧控制卡的白卡样式，跟整个界面同一套语言 */
.caption-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.caption-group { display: grid; gap: 11px; padding: 18px 22px 19px; }
.caption-group-info {
  gap: 10px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.caption-row { display: flex; align-items: center; gap: 10px; }
.caption-section {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.caption-section::before {
  content: "";
  width: 2px;
  height: 11px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.caption-label { flex: 0 0 auto; color: var(--ink-mute); font-size: 11px; letter-spacing: 0.02em; }
.caption-input {
  height: 38px;
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.caption-input::placeholder { color: #a7aea8; }
.caption-input:hover { border-color: #c5cec4; }
.caption-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(41, 107, 77, 0.08); }
.caption-input-school { flex: 0 1 140px; }
.caption-input-title { flex: 0 1 106px; }
.caption-input-date { flex: 0 0 132px; }
.caption-apply {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-mute);
  font-size: 11px;
  white-space: nowrap;
}
.caption-apply:hover { color: var(--ink); background: rgba(30, 42, 34, 0.05); }
.caption-range {
  height: 4px;
  flex: 0 1 118px;
  min-width: 70px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #e3e8e2;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.caption-range:focus { border: 0; box-shadow: 0 0 0 4px rgba(41, 107, 77, 0.1); }
.caption-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(30, 42, 34, 0.28);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.caption-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
}
.caption-value { flex: 0 0 auto; width: 38px; color: var(--ink-mute); font-size: 11px; font-variant-numeric: tabular-nums; }
.caption-label-color { margin-left: 4px; }
.caption-colors { display: flex; flex: 0 0 auto; gap: 7px; }
.caption-colors button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(30, 42, 34, 0.16);
  border-radius: 50%;
  background: var(--swatch, #fff);
  box-shadow: 0 1px 2px rgba(30, 42, 34, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.caption-colors button:hover { transform: scale(1.12); }
.caption-colors button.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.caption-hint { margin: 0; padding-top: 2px; color: var(--ink-mute); font-size: 10px; line-height: 1.65; }
.caption-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid rgba(41, 107, 77, 0.24);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.caption-add svg { width: 13px; height: 13px; flex: 0 0 13px; }
.caption-add:hover { background: #e0efe6; border-color: rgba(41, 107, 77, 0.38); }
.caption-add.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.caption-count { flex: 0 0 auto; color: var(--ink-mute); font-size: 11px; }
.caption-note { margin-left: auto; overflow: hidden; color: #a3aba4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

/* 图上的菜名输入框：盖在药丸上，视觉上像直接改字 */
.caption-edit {
  position: absolute;
  z-index: 4;
  width: 120px;
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid rgba(140, 197, 164, 0.9);
  border-radius: 9px;
  outline: none;
  background: rgba(12, 17, 13, 0.9);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.caption-edit:focus { border-color: #8cc5a4; box-shadow: 0 0 0 3px rgba(140, 197, 164, 0.22), 0 6px 20px rgba(0, 0, 0, 0.4); }
.caption-edit::placeholder { color: rgba(255, 255, 255, 0.4); }
.place-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 4;
  padding: 7px 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(41, 107, 77, 0.94);
  color: #fff;
  font-size: 11px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(12, 30, 20, 0.28);
}
.compare.is-placing { cursor: crosshair; }
.compare.is-placing .compare-line { display: none; }

.processing-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(18, 24, 20, 0.7); backdrop-filter: blur(8px); }
.processing-inner { width: min(280px, calc(100% - 48px)); color: #fff; text-align: center; }
.spinner { width: 26px; height: 26px; display: inline-block; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
.spinner-dark { border-color: rgba(32, 39, 34, 0.14); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-inner strong { display: block; margin: 16px 0 6px; font-size: 18px; font-weight: 600; }
.processing-inner > span:not(.spinner) { display: block; color: rgba(255, 255, 255, 0.66); font-size: 11px; }
.progress-track { height: 3px; margin-top: 22px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.16); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #8cc5a4; transition: width 220ms ease; }

.control-card { position: sticky; top: 20px; padding: 24px; border-radius: 16px; }
.control-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.state-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-mute); font-size: 10px; font-weight: 600; }
.state-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #aeb5af; }
.state-badge.is-ready { color: var(--warm); }
.state-badge.is-ready::before { background: var(--warm); box-shadow: 0 0 0 3px rgba(215, 123, 72, 0.1); }
.state-badge.is-done { color: var(--accent); }
.state-badge.is-done::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(41, 107, 77, 0.1); }
.control-head h2 { margin: 11px 0 0; font-size: 21px; font-weight: 650; letter-spacing: -0.025em; }
.file-info { margin-top: 16px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.file-row { display: flex; justify-content: space-between; gap: 14px; font-size: 10px; line-height: 1.9; }
.file-row span { flex: 0 0 auto; color: var(--ink-mute); }
.file-row strong { max-width: 72%; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.retouch-scope { padding: 20px 0; border-bottom: 1px solid var(--line); }
.section-label { display: block; margin-bottom: 11px; color: var(--ink-mute); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; }
.scope-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.scope-tags span { padding: 6px 9px; border: 1px solid #dfe9e1; border-radius: 6px; background: #f5f9f5; color: var(--accent); font-size: 10px; }
.guard-list { display: grid; gap: 11px; padding: 20px 0; }
.guard-list .section-label { margin-bottom: 0; }
.guard-item { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.guard-check { width: 16px; height: 16px; flex: 0 0 16px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 700; }
.control-actions { display: grid; gap: 8px; }
.control-actions .btn-block { margin: 0; }
.control-actions .btn-primary { min-height: 48px; }
.workspace-note { display: flex; justify-content: flex-end; gap: 24px; padding: 17px 2px 0; color: var(--ink-mute); font-size: 10px; line-height: 1.7; }
.workspace-note span:last-child { flex: 0 0 auto; }

.loading-view { width: 100%; min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--ink-mute); font-size: 12px; }
.site-footer {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 20px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 10px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 30;
  max-width: min(380px, calc(100% - 40px));
  padding: 12px 17px;
  transform: translateX(-50%) translateY(8px);
  border-radius: 10px;
  background: #202722;
  color: #fff;
  box-shadow: 0 12px 32px rgba(20, 30, 23, 0.18);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 桌面端专用：不做移动端适配，窄屏保持完整工作台并横向滚动 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 问题反馈：右下角常驻小入口 + 弹层 */
.feedback-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(30, 42, 34, 0.06);
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.feedback-fab svg { width: 15px; height: 15px; flex: none; }
.feedback-fab:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* 二次确认弹层：清空全部照片这类不可撤销动作 */
.confirm-modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; }
.confirm-mask { position: absolute; inset: 0; background: rgba(18, 24, 20, 0.42); backdrop-filter: blur(3px); }
.confirm-panel {
  position: relative;
  width: 408px;
  max-width: 100%;
  padding: 24px 26px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(20, 30, 24, 0.18);
}
.confirm-panel h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.confirm-desc { margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.75; }
.confirm-desc strong { color: var(--ink); font-weight: 650; }
.confirm-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.confirm-foot .btn { min-height: 40px; min-width: 92px; padding: 0 18px; }

.feedback-modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px; }
.feedback-mask { position: absolute; inset: 0; background: rgba(18, 24, 20, 0.42); backdrop-filter: blur(3px); }
.feedback-panel {
  position: relative;
  width: 468px;
  max-width: 100%;
  padding: 22px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(20, 30, 24, 0.18);
}
.feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.feedback-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.feedback-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-mute);
}
.feedback-close svg { width: 15px; height: 15px; }
.feedback-close:hover { background: var(--surface-soft); color: var(--ink); }

.feedback-input {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.feedback-input::placeholder { color: #a6ada7; }
.feedback-input:focus { border-color: var(--accent); background: var(--surface); }
.feedback-contact { margin-top: 10px; height: 40px; resize: none; }

.feedback-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.feedback-status { flex: 1 1 auto; min-width: 0; color: var(--danger); font-size: 12px; line-height: 1.5; }
.feedback-status.is-ok { color: var(--accent); }
.feedback-foot .btn { flex: 0 0 auto; min-width: 96px; }

/* 反馈里的截图：一排 56 高的缩略图 + 虚线添加按钮 */
.feedback-shots { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.feedback-shot-list { display: flex; align-items: center; gap: 8px; }
.feedback-shot { position: relative; width: 56px; height: 56px; flex: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-soft); }
.feedback-shot img { width: 100%; height: 100%; object-fit: cover; }
/* 白底不透明 + 投影：压在深色照片上也看得见 */
.feedback-shot-del {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #2b332d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(12, 18, 14, 0.3);
}
.feedback-shot-del:hover { background: #fff; color: var(--danger); }
.feedback-shot-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.feedback-shot-add svg { width: 14px; height: 14px; flex: none; }
.feedback-shot-add:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.feedback-shot-add:disabled { opacity: 0.45; cursor: not-allowed; }
