/* =========================================================
   作品复刻工坊 · 设计系统
   品牌色取自闲鱼黄，正文以中性灰阶承载信息层级
   ========================================================= */
:root {
  --brand: #ffda00;
  --brand-hover: #ffd000;
  --brand-soft: #fffbe6;
  --brand-line: #ffe9a3;
  --ink: #101114;
  --ink-2: #4b4f58;
  --ink-3: #8a8f99;
  --ink-4: #b7bac1;
  --line: #ecedf0;
  --line-strong: #dfe1e6;
  --bg: #ffffff;
  --bg-soft: #fafafb;
  --bg-mute: #f5f6f8;
  --ok: #0f9d58;
  --err: #d93025;
  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(16, 17, 20, .05);
  --shadow-sm: 0 1px 3px rgba(16, 17, 20, .05), 0 6px 16px rgba(16, 17, 20, .045);
  --shadow-md: 0 2px 6px rgba(16, 17, 20, .06), 0 16px 40px rgba(16, 17, 20, .08);
  --shadow-lg: 0 24px 64px rgba(16, 17, 20, .16);
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* 兼容管理端沿用的旧变量名 */
  --card: #ffffff;
  --accent: #101114;
  --accent-ink: #ffffff;
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { padding-bottom: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--ink); }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(255, 218, 0, .45);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand-tag {
  font-size: 11.5px;
  color: var(--ink-3);
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  margin-left: 2px;
  letter-spacing: .02em;
}
.topbar-spacer { flex: 1; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.btn:hover { border-color: var(--ink-4); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: var(--brand);
  border-color: #f2cc00;
  color: #14140f;
  box-shadow: 0 2px 8px rgba(255, 218, 0, .38);
}
.btn-primary:hover { background: var(--brand-hover); border-color: #e8c400; box-shadow: 0 6px 18px rgba(255, 218, 0, .45); }
.btn-ghost { background: var(--bg); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }

.btn-draft { background: var(--brand); border-color: #f2cc00; color: #14140f; padding: 0 14px; }
.btn-draft:hover { background: var(--brand-hover); }
.draft-count {
  font-style: normal;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #141414;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.icon-btn:hover { background: var(--bg-mute); }

/* ---------------- 版心 ---------------- */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 120px;
}

/* ---------------- 首页 Hero ---------------- */
.hero { padding: 64px 0 8px; text-align: center; position: relative; }
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -60px;
  width: min(920px, 96vw);
  height: 420px;
  transform: translateX(-50%);
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(255, 218, 0, .22), rgba(255, 218, 0, 0) 70%),
    radial-gradient(40% 40% at 78% 18%, rgba(255, 218, 0, .16), rgba(255, 218, 0, 0) 72%);
  pointer-events: none;
  z-index: -1;
}
.hero > * { position: relative; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: #6b5a00;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0b400;
}
.hero h1 {
  margin: 20px 0 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.18;
}
.hero-sub {
  margin: 0 auto;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 15.5px;
}

/* 粘贴卡 */
.paste-card {
  margin: 32px auto 0;
  max-width: 760px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  text-align: left;
  overflow: hidden;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.paste-card:focus-within { border-color: #e6e6ea; box-shadow: var(--shadow-md); }
.paste-field { display: flex; gap: 12px; padding: 18px 20px 6px; }
.paste-icon { color: var(--ink-4); margin-top: 3px; }
.paste-field textarea {
  flex: 1;
  min-height: 84px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.7;
  padding: 0;
}
.paste-field textarea::placeholder { color: var(--ink-4); }
.paste-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.paste-hint { font-size: 12.5px; color: var(--ink-3); }

/* 流程条 */
.steps {
  margin: 36px auto 0;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.step-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.step-item i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-mute);
  color: var(--ink-2);
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step-line { width: 24px; height: 1px; background: var(--line-strong); }

.notice {
  margin: 28px auto 0;
  max-width: 760px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: #6b5a00;
  font-size: 13px;
}
.notice svg { width: 16px; height: 16px; margin-top: 2px; }
.notice a { text-decoration: underline; font-weight: 600; }

/* ---------------- 草稿箱 ---------------- */
.drafts { margin-top: 64px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.015em; }
.section-spacer { flex: 1; }
.chip-count {  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-mute);
  border-radius: 999px;
  padding: 3px 10px;
}

/* 快捷入口（书签回传） */
.quick-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .16s var(--ease);
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: var(--ink-4); color: var(--ink); background: var(--bg-soft); transform: translateY(-1px); }

.draft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.draft-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.draft-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.draft-thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-mute);
  overflow: hidden;
  position: relative;
}
.draft-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #f7f8fa; transition: transform .3s var(--ease); }
.draft-card:hover .draft-thumb img { transform: scale(1.03); }

.draft-over {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 10px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(16, 17, 20, .55), rgba(16, 17, 20, 0));
  opacity: 0;
  transform: translateY(6px);
  transition: .18s var(--ease);
}
.draft-card:hover .draft-over { opacity: 1; transform: translateY(0); }
.draft-open,
.draft-dl {
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.draft-open svg, .draft-dl svg { width: 13px; height: 13px; }
.draft-open:hover { background: #fff; }
.draft-dl { background: var(--brand); border-color: #f2cc00; color: #14140f; }
.draft-dl:hover { background: var(--brand-hover); }
.draft-body { padding: 12px 14px 14px; }
.draft-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.draft-meta { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.draft-meta .sep { color: var(--ink-4); }
.draft-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(16, 17, 20, .55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s var(--ease), background .16s var(--ease);
  backdrop-filter: blur(6px);
}
.draft-del svg { width: 14px; height: 14px; }
.draft-card:hover .draft-del { opacity: 1; }
.draft-del:hover { background: var(--err); }

.empty {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-xl);
  text-align: center;
  background: var(--bg-soft);
}
.empty.on { display: flex; }
.empty-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand);
  color: #14140f;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  box-shadow: 0 6px 18px rgba(255, 218, 0, .35);
}
.empty-mark svg { width: 26px; height: 26px; }
.empty b { font-size: 15px; }
.empty p { margin: 0; font-size: 13px; color: var(--ink-3); max-width: 340px; }

/* ---------------- 通用卡片 / 表单 ---------------- */
.view-head { display: flex; align-items: center; gap: 10px; padding: 28px 0 16px; }
.view-meta { font-size: 12.5px; color: var(--ink-3); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.hint { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }

.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > .lab {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.lab-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.lab-row .lab { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.lab-row { justify-content: space-between; }
.mini-group { display: inline-flex; gap: 6px; }
.mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s var(--ease);
}
.mini svg { width: 13px; height: 13px; }
.mini:hover { border-color: var(--ink-4); color: var(--ink); background: var(--bg-soft); }
.mini:active { transform: scale(.97); }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
input[type=text], input[type=password], textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.65;
  outline: none;
  resize: vertical;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus {
  border-color: #c9ccd3;
  box-shadow: 0 0 0 3.5px rgba(16, 17, 20, .05);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag-row span {
  font-size: 12px;
  color: var(--ink-2);
  background: var(--bg-mute);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---------------- 图片网格 ---------------- */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 10px;
}
.thumb-grid-sm { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-mute);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.thumb:hover { transform: translateY(-2px); }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #f7f8fa; }
.thumb.off { opacity: .35; filter: grayscale(1); }
.thumb .tick {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(16, 17, 20, .08);
  display: grid;
  place-items: center;
  color: transparent;
  transition: .16s var(--ease);
}
.thumb .tick svg { width: 12px; height: 12px; }
.thumb.on .tick { background: var(--brand); border-color: #f0cc00; color: #14140f; }
.thumb .badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(16, 17, 20, .6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}
.thumb .del {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(16, 17, 20, .6);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}
.thumb .del svg { width: 13px; height: 13px; }
.thumb .del:hover { background: var(--err); }

/* 对比卡 */
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}
.pair figure { margin: 0; position: relative; background: var(--bg-mute); }
.pair figure img { width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover; cursor: zoom-in; }
.pair figcaption {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 17, 20, .58);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  backdrop-filter: blur(4px);
}
.pair figure:nth-child(2) figcaption { background: rgba(255, 218, 0, .92); color: #14140f; }
.pair-acts {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.pair-acts .idx { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-right: auto; }
.pair-acts .mini { background: var(--bg-soft); }
.pair-acts .mini.ai { background: var(--brand-soft); border-color: var(--brand-line); color: #6b5a00; }
.pair-acts .mini.ai:hover { background: #fff7cc; }

.fail-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--bg-soft);
}
.fail-card .fail-title { font-size: 13px; font-weight: 650; margin-bottom: 4px; }
.fail-card .fail-msg { font-size: 12.5px; color: var(--err); }

.log {
  margin-top: 16px;
  border-radius: var(--r-md);
  background: #14151a;
  color: #c9ccd6;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  max-height: 210px;
  overflow: auto;
  white-space: pre-wrap;
}

/* ---------------- 底栏 ---------------- */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
}
.actionbar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 17, 20, .34);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.drawer-mask.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  z-index: 61;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 86vh;
  overflow: auto;
  transform: translateY(102%);
  transition: transform .26s var(--ease);
}
@media (min-width: 820px) {
  .drawer {
    left: auto;
    right: 32px;
    bottom: 32px;
    width: 560px;
    border-radius: var(--r-xl);
    transform: translateY(calc(100% + 40px));
  }
}
.drawer.on { transform: translateY(0); }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer-head h3 { margin: 0 0 3px; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.drawer-head .hint { margin: 0; }
.drawer-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; }

/* 结果页：左原文 / 右二创 的整体对照 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.compare-col { min-width: 0; }
.compare-head {
  position: sticky;
  top: 64px;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 2px 10px;
  background: linear-gradient(to bottom, var(--bg) 70%, rgba(255, 255, 255, 0));
  backdrop-filter: blur(2px);
}
.compare-head b { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.compare-head .hint { font-size: 11.5px; }
.cmp-badge {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--bg-mute);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}
.cmp-badge.b { background: var(--brand); color: #14140f; }
.compare-col:first-child .shot-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.compare-col:first-child .shot img { max-height: none; }
.compare-head.accent b { display: inline-flex; align-items: center; gap: 6px; }
.compare-head.accent b::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 218, 0, .25);
}
.ro-text {
  min-height: 44px;
  padding: 11px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.ro-text.ro-multi { max-height: 260px; overflow: auto; }

/* 图片展示：不裁切、按等比缩放 */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.shot {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
/* 图片按自身比例完整展示：宽度撑满、高度自适应，不做任何裁切 */
.shot img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: var(--bg);
}
.shot .shot-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.shot .shot-idx { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-right: auto; }
.shot .mini { height: 24px; }
.shot .mini.ai { background: var(--brand-soft); border-color: var(--brand-line); color: #6b5a00; }
.shot .mini.ai:hover { background: #fff7cc; }
.shot .shot-tag {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: rgba(16, 17, 20, .58);
  color: #fff;
  backdrop-filter: blur(4px);
}
.shot .shot-tag.new { background: rgba(255, 218, 0, .94); color: #14140f; }
.shot.fail { padding: 14px; }

@media (max-width: 960px) {
  .compare { grid-template-columns: 1fr; gap: 10px; }
  .compare-head { position: static; background: none; backdrop-filter: none; padding: 6px 2px; }
  .compare-col + .compare-col { margin-top: 6px; }
  .shot-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
/* 等待页：关页面提示 */
.work-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.work-aside svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--ok, #0f9d58); }
.work-aside b { color: var(--ink); font-weight: 650; }
/* ---------------- 书签回传 ---------------- */
.bm-steps {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
}
.bm-steps li { margin-bottom: 4px; }
.bm-steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--brand);
  color: #14140f;
  font-size: 11px;
  font-weight: 700;
}
.bm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.bm-tip {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.bm-hint {
  font-size: 12.5px;
  color: #6b5a00;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.7;
}
.bm-hint:empty { display: none; }

/* ---------------- 进行中 · 鱼缸等待动画 ---------------- */
.work-card {
  max-width: 900px;
  margin: 36px auto 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px 24px 20px;
}
.work-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.work-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand);
  color: #14140f;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(255, 218, 0, .45);
  animation: markPulse 2.4s var(--ease) infinite;
}
@keyframes markPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(255, 218, 0, .40); }
  50% { transform: scale(1.06); box-shadow: 0 10px 26px rgba(255, 218, 0, .55); }
}
.work-title-wrap h3 { margin: 0 0 2px; font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.work-pct-wrap { text-align: right; line-height: 1.2; }
.work-pct-wrap b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.work-pct-wrap .hint { font-size: 11px; }

/* 进度鱼道 */
.fish-track { position: relative; height: 34px; margin: 4px 2px 10px; }
.track-line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #eef0f3 0 10px, transparent 10px 18px);
}
.track-fill {
  position: absolute;
  left: 0; top: 50%;
  height: 6px;
  margin-top: -3px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe066, #ffc400);
  box-shadow: 0 0 12px rgba(255, 200, 0, .5);
  transition: width .45s var(--ease);
}
.track-flag {
  position: absolute;
  right: -2px; top: 0;
  color: var(--ink-4);
  transform: translateY(-2px);
}
.track-flag svg { width: 18px; height: 18px; }
.track-fish {
  position: absolute;
  top: 50%;
  left: 0;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  margin-left: -6px;
  color: #14140f;
  background: var(--brand);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(255, 210, 0, .5);
  transition: left .45s var(--ease);
  animation: fishBob 1.6s ease-in-out infinite;
}
.track-fish svg { width: 18px; height: 18px; }
@keyframes fishBob {
  0%, 100% { transform: translateY(-1px) rotate(-4deg); }
  50% { transform: translateY(1px) rotate(4deg); }
}

.work-stats { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.work-stats b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }

/* 鱼缸 */
.tank {
  position: relative;
  height: 400px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -20%, #ffffff 0%, #eaf3ff 26%, #cfe0f7 62%, #b9cfea 100%);
  border: 1px solid #d7e3f2;
  box-shadow: inset 0 -40px 60px rgba(120, 160, 210, .18), inset 0 12px 30px rgba(255, 255, 255, .9);
  cursor: pointer;
  isolation: isolate;
}
.tank-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 70%;
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 218, 0, .28), transparent 70%);
  pointer-events: none;
}
.tank-rays {
  position: absolute;
  inset: -12% -6% auto -6%;
  height: 96%;
  background:
    linear-gradient(102deg, transparent 12%, rgba(255,255,255,.55) 16%, transparent 21%),
    linear-gradient(96deg, transparent 32%, rgba(255,255,255,.42) 37%, transparent 43%),
    linear-gradient(88deg, transparent 58%, rgba(255,255,255,.4) 63%, transparent 69%),
    linear-gradient(80deg, transparent 78%, rgba(255,255,255,.32) 83%, transparent 88%);
  mix-blend-mode: screen;
  animation: rays 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes rays {
  from { transform: translateX(-10px) scaleY(1); opacity: .75; }
  to { transform: translateX(12px) scaleY(1.04); opacity: 1; }
}
.drift {
  position: absolute;
  opacity: .5;
  filter: drop-shadow(0 8px 14px rgba(16, 17, 20, .08));
  animation: driftFloat 18s ease-in-out infinite;
}
.drift svg { width: 100%; height: 100%; display: block; }
.drift.d1 { width: 52px; height: 52px; left: 12%; top: 24%; animation-delay: -2s; }
.drift.d2 { width: 42px; height: 42px; right: 16%; top: 20%; animation-delay: -7s; opacity: .42; }
.drift.d3 { width: 46px; height: 46px; right: 26%; bottom: 26%; animation-delay: -12s; opacity: .38; }
@keyframes driftFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(5deg); }
}
.tank-caustic {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.5) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(65deg, rgba(255,255,255,.35) 0 2px, transparent 2px 22px);
  opacity: .5;
  mix-blend-mode: soft-light;
  animation: caustic 14s linear infinite;
  pointer-events: none;
}
@keyframes caustic {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(-60px) translateY(-18px); }
}
.tank-sand {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background:
    radial-gradient(60% 120% at 20% 100%, #f6ead2, transparent 70%),
    radial-gradient(50% 120% at 70% 100%, #f3e5c9, transparent 70%),
    linear-gradient(to top, #f7efdd 10%, rgba(247, 239, 221, 0) 92%);
  pointer-events: none;
}
.tank-sand::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(190, 170, 130, .35), transparent 70%);
}
.tank-weed { position: absolute; left: 18px; bottom: 24px; display: flex; align-items: flex-end; gap: 10px; }
.tank-weed span {
  display: block;
  width: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(to top, #a9d7a2, #d8efd0);
  transform-origin: bottom center;
  animation: sway 4.5s ease-in-out infinite;
  opacity: .9;
}
.tank-weed span:nth-child(1) { height: 84px; animation-delay: 0s; }
.tank-weed span:nth-child(2) { height: 122px; animation-delay: .5s; }
.tank-weed span:nth-child(3) { height: 72px; animation-delay: 1s; }
.tank-weed span:nth-child(4) { height: 100px; animation-delay: 1.5s; }
.tank-weed span:nth-child(5) { height: 58px; animation-delay: 2s; opacity: .7; }
@keyframes sway {
  0%, 100% { transform: rotate(-6deg) scaleY(1); }
  50% { transform: rotate(8deg) scaleY(1.04); }
}

/* 游动的鱼 */
.swimmer {
  position: absolute;
  color: #cfd6e2;
  filter: drop-shadow(0 8px 14px rgba(16, 17, 20, .12));
  will-change: transform;
}
.swimmer svg { width: 100%; height: 100%; display: block; overflow: visible; }
.swimmer svg path { stroke: rgba(16, 17, 20, .07); stroke-width: 1; }
/* 摆尾：以尾根为轴心摇摆 */
.swimmer .fish-tail {
  transform-box: fill-box;
  transform-origin: 100% 50%;
  animation: tailWag 1.1s ease-in-out infinite;
}
@keyframes tailWag {
  0%, 100% { transform: rotate(-9deg) scaleX(.92); }
  50% { transform: rotate(9deg) scaleX(1.04); }
}
.swimmer.s1 {
  width: 118px; height: 68px; top: 28%; left: -130px;
  color: #ffd400;
  animation: swim1 13s linear infinite;
}
.swimmer.s1 svg { filter: drop-shadow(0 10px 18px rgba(255, 186, 0, .4)); }
.swimmer.s2 {
  width: 76px; height: 44px; top: 60%; left: -90px;
  color: #bfc9d8;
  animation: swim2 17s linear infinite 2s;
}
.swimmer.s3 {
  width: 56px; height: 32px; top: 16%; left: -70px;
  color: #d6dfec;
  animation: swim3 21s linear infinite 5s;
}
@keyframes swim1 {
  0% { transform: translate(0, 0) scaleX(1) rotate(-3deg); }
  25% { transform: translate(30vw, -18px) scaleX(1) rotate(4deg); }
  50% { transform: translate(60vw, 10px) scaleX(1) rotate(-2deg); }
  75% { transform: translate(90vw, -12px) scaleX(1) rotate(3deg); }
  100% { transform: translate(120vw, 0) scaleX(1) rotate(-3deg); }
}
@keyframes swim2 {
  0% { transform: translate(0, 0) rotate(2deg); }
  50% { transform: translate(65vw, 26px) rotate(-4deg); }
  100% { transform: translate(130vw, 0) rotate(2deg); }
}
@keyframes swim3 {
  0% { transform: translate(0, 0) } 100% { transform: translate(140vw, -16px) }
}
.tank.boost .swimmer.s1 { animation-duration: 6s; }
.tank.boost .swimmer.s2 { animation-duration: 8s; }
.tank.boost .tank-weed span { animation-duration: 2.4s; }

/* 气泡 */
.tank-bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.98), rgba(198, 222, 255, .55) 55%, rgba(140, 180, 235, .5));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset -2px -3px 6px rgba(120, 160, 220, .25);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) translateX(0) scale(.7); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: translateY(-320px) translateX(16px) scale(1.05); opacity: 0; }
}

.tank-caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  max-width: calc(100% - 28px);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(16, 17, 20, .06);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: 0 6px 18px rgba(16, 17, 20, .08);
}
.tank-caption span { display: inline-block; animation: captionIn .45s var(--ease); }
@keyframes captionIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 日志折叠 */
.log-wrap { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
.log-wrap summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.log-wrap summary::-webkit-details-marker { display: none; }
.log-wrap summary::before { content: "▸"; font-size: 10px; transition: transform .2s var(--ease); }
.log-wrap[open] summary::before { transform: rotate(90deg); }
.wait-tips {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.wait-tips .tip {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  background: var(--bg-soft);
}
.wait-tips .tip b {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.wait-tips .tip span { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
@media (max-width: 760px) {
  .wait-tips { grid-template-columns: 1fr; }
}
.log {
  margin-top: 10px;
  border-radius: var(--r-md);
  background: #14151a;
  color: #c9ccd6;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .work-card { margin-top: 20px; padding: 16px; }
  .tank { height: 260px; }
  .work-pct-wrap b { font-size: 20px; }
  .swimmer.s1 { width: 72px; height: 72px; }
  .tank-caption { font-size: 11.5px; padding: 6px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .swimmer, .bubble, .tank-caustic, .tank-weed span, .track-fish, .work-mark { animation: none !important; }
}

/* ---------------- 其它 ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 10, 13, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 14px);
  z-index: 90;
  max-width: min(88vw, 460px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(16, 17, 20, .93);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: .22s var(--ease);
  box-shadow: var(--shadow-md);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.hidden { display: none !important; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .brand-tag { display: none; }
  .page { padding: 0 16px 132px; }
  .topbar-inner { padding: 0 16px; height: 58px; }
}

@media (max-width: 640px) {
  .hero { padding: 34px 0 4px; }
  .hero h1 { font-size: 25px; }
  .hero-sub { font-size: 14px; }
  .paste-card { margin-top: 24px; border-radius: var(--r-lg); }
  .paste-field { padding: 16px 16px 4px; }
  .paste-field textarea { min-height: 64px; font-size: 14.5px; }
  .paste-bar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .paste-hint { width: 100%; order: 3; text-align: center; }
  .paste-bar .btn { flex: 1; }
  .steps { margin-top: 24px; gap: 6px; }
  .step-item { font-size: 11.5px; gap: 0; }
  .step-item i { display: none; }
  .step-line { width: 8px; }
  .drafts { margin-top: 44px; }
  .draft-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .draft-title { font-size: 13px; min-height: 38px; }
  .draft-del { opacity: 1; }
  .draft-over { opacity: 1; transform: none; padding: 18px 8px 8px; }
  .draft-open, .draft-dl { height: 26px; padding: 0 9px; font-size: 11.5px; }
  .card { padding: 16px; border-radius: var(--r-md); }
  .card-head { gap: 8px; }
  .card-head .btn-group { width: 100%; }
  .card-head .btn-group .btn { flex: 1; }
  .lab-row { flex-wrap: wrap; }
  .pair-acts { padding: 8px; }
  .pair-acts .mini { flex: 1; justify-content: center; }
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .pair-grid { grid-template-columns: 1fr; }
  .actionbar { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .actionbar .btn-primary { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
