/* color-imp 日常制作页面。
 * 视觉：暖纸底 + 点阵、墨色 2px 描边、硬投影（0 4px 0 墨色）、柠檬绿强调、像素字标签（Silkscreen）、粗黑标题（Bricolage Grotesque）。
 * 例外：放照片的地方（卡片图区、对比器、编辑画布）一律中性深灰，不让纸色 / 绿色影响看色。 */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--paper); color: var(--ink); font: 400 15.5px/1.55 var(--f-sans);
  /* 2026-11-26：去掉点阵底纹（装饰，照片周围不要纹理），纯色背景 */
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--lime-2); }
button, select, input, textarea { font: inherit; color: inherit; }

/* ---------- 按钮 ---------- */
button {
  border: 2px solid var(--edge); background: var(--card); color: var(--ink); border-radius: 10px; padding: 6px 14px;
  min-height: 38px; font-weight: 650; letter-spacing: -.01em; cursor: pointer; box-shadow: var(--shadow-s);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .12s;
}
button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--sh); }
button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--sh); }
button:disabled { opacity: .4; cursor: default; box-shadow: none; }
button.primary { background: var(--ink); color: var(--on-ink); box-shadow: 0 3px 0 0 var(--lime-2); }
button.primary:hover:not(:disabled) { box-shadow: 0 4px 0 0 var(--lime-2); }
button.primary:active:not(:disabled) { box-shadow: 0 1px 0 0 var(--lime-2); }
button.primary:disabled { box-shadow: none; background: var(--muted); border-color: var(--muted); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
button.ghost:hover:not(:disabled) { background: var(--paper-2); box-shadow: none; transform: none; }
button.small { padding: 2px 10px; min-height: 30px; font-size: 13px; border-radius: 9px; }
button.danger { color: var(--bad); }
select, input[type=text], input[type=date], input[type=search], textarea {
  border: 2px solid var(--edge); background: var(--card); border-radius: 10px; padding: 6px 10px; min-height: 38px;
}
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--ink); }

.muted { color: var(--muted); } .small { font-size: 13px; } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .sp { flex: 1; }
.hidden { display: none !important; }
code { font: 12.5px var(--f-mono); }

/* ---------- 文字 ---------- */
h1, h2, h3 { font-weight: 760; letter-spacing: -.035em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(28px, 4.2vw, 44px); }
h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 12px; }
h3 { font-size: 15px; letter-spacing: -.01em; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font: 400 12.5px/1 var(--f-pix); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--c, var(--coral)); box-shadow: inset 0 0 0 1.5px var(--ink); }
.hl { background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); padding: 0 .06em; }
.head { display: grid; gap: 10px; }
.head .row { align-items: flex-end; }
.lede { font-size: 16.5px; color: var(--ink-2); max-width: 46ch; margin: 0; }

/* ---------- 顶栏 ---------- */
.svc { font: 400 11.5px var(--f-pix); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; gap: 7px; align-items: center; text-decoration: none;
  border: 2px solid var(--edge); border-radius: 9px; padding: 5px 10px; background: var(--card); }
.dot { width: 8px; height: 8px; background: var(--muted); display: inline-block; box-shadow: inset 0 0 0 1.5px var(--ink); }
.dot.ok { background: var(--mint); } .dot.bad { background: var(--coral); }

main { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 28px 0 40px; display: grid; gap: 26px; }
main > * { min-width: 0; }
.panel { overflow-x: auto; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }

/* ---------- 首页 ---------- */
.pick { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .pick { grid-template-columns: 1fr; } }
.drop { border: 2px dashed var(--ink); border-radius: var(--r-lg); min-height: 200px; display: grid; place-items: center; text-align: center; padding: 24px;
  color: var(--ink-2); background: var(--card); transition: background .15s, transform .15s var(--ease); }
.drop.over { background: color-mix(in srgb, var(--lime) 35%, var(--card)); transform: scale(1.01); }
.drop .big { font-size: 22px; font-weight: 760; letter-spacing: -.03em; color: var(--ink); margin: 0 0 14px; }
.ref .tag { position: absolute; left: 10px; top: 10px; background: #17121f; color: #fbf8f1; font: 400 11px/1 var(--f-pix); letter-spacing: .05em; padding: 6px 8px; border-radius: 6px; }
.drop .coarse { display: none; }
@media (pointer: coarse) { .drop .fine { display: none; } .drop .coarse { display: inline; } }


/* ---------- 状态条 ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.st { display: inline-flex; gap: 8px; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--card); border: 2px solid var(--edge); font-size: 13px; font-weight: 600; }
.st .dot { width: 8px; height: 8px; }
.st.run .dot { background: var(--sky); animation: blink 1s steps(2, jump-none) infinite; }
.st.done .dot { background: var(--lime); } .st.fail .dot { background: var(--coral); }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .st.run .dot, .card .img .state::before { animation: none; } }

/* ---------- 效果卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }   /* 原图 + 3 个推荐一行放得下 */
.card { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); display: flex; flex-direction: column; min-width: 0; position: relative;
  box-shadow: var(--shadow); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: 0 7px 0 0 var(--sh); }
.card.sel { outline: 3px solid var(--lime-2); }
.card .img { background: var(--stage); aspect-ratio: 4/3; display: grid; place-items: center; position: relative; cursor: zoom-in; border-bottom: 2px solid var(--edge);
  border-radius: calc(var(--r-lg) - 2px) calc(var(--r-lg) - 2px) 0 0; overflow: hidden; }   /* 卡片本身不裁切：「⋯」菜单能伸出卡片 */
.card .img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .img .state { color: #ddd; font-size: 13px; text-align: center; padding: 10px; }
.card .img .state::before { content: ""; display: block; width: 12px; height: 12px; margin: 0 auto 10px; background: #888; animation: blink 1s steps(2, jump-none) infinite; }
.card .img .state.wait::before { content: none; }
.card .img .state.wait { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card .img .state.wait .pxl { display: grid; width: max-content; margin: 0 auto 10px; --px: 6px; }
.card .no { position: absolute; left: 10px; top: 10px; font: 400 11px/1 var(--f-pix); letter-spacing: .06em; background: #fbf8f1; color: #17121f; border: 2px solid #17121f; padding: 4px 7px; border-radius: 6px; z-index: 1; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .name { font-weight: 760; font-size: 16.5px; letter-spacing: -.02em; line-height: 1.25; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card .reason { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 4px; }   /* 贴底：几张卡的按钮行对齐 */
/* 「⋯」更多操作 */
details.more { position: relative; margin-left: auto; }
details.more > summary { list-style: none; cursor: pointer; display: inline-grid; place-items: center; min-width: 38px; min-height: 30px; padding: 0 8px;
  border: 2px solid var(--edge); border-radius: 9px; background: var(--card); font-weight: 800; letter-spacing: .08em; box-shadow: var(--shadow-s); user-select: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { background: var(--paper-2); box-shadow: none; transform: translateY(2px); }
details.more .menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 25; display: grid; min-width: 168px; padding: 6px;
  background: var(--card); border: 2px solid var(--edge); border-radius: 12px; box-shadow: var(--shadow); }
details.more .menu button { border: 0; box-shadow: none; text-align: left; font-weight: 600; min-height: 36px; border-radius: 8px; }
details.more .menu button:hover:not(:disabled) { background: var(--paper-2); transform: none; box-shadow: none; }
.card .acts a { text-decoration: none; }
.badge { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--edge); color: var(--ink-2); font-weight: 600; letter-spacing: 0; white-space: nowrap; background: var(--paper); }
.badge.saved { background: var(--lime); color: #17121f; }
details.tech summary { cursor: pointer; font: 400 11.5px var(--f-pix); letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
details.tech table { font-size: 12.5px; border-collapse: collapse; width: 100%; margin-top: 6px; }
details.tech td { border-top: 1.5px dashed var(--line-2); padding: 4px 4px; vertical-align: top; }
details.tech td:first-child { color: var(--muted); white-space: nowrap; }
.notes { font-size: 13.5px; color: var(--ink-2); margin: 6px 0 0; padding-left: 1.2em; }
.notes li::marker { content: "▪ "; color: var(--coral); }

/* ---------- 对比托盘 ---------- */
.tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; background: var(--card); border: 2px solid var(--edge);
  border-radius: 16px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; box-shadow: 0 5px 0 0 var(--lime-2); max-width: calc(100vw - 24px); }
.tray > .small { font: 400 11px var(--f-pix); letter-spacing: .06em; }
.slot { width: 74px; height: 52px; border-radius: 8px; border: 2px solid var(--edge); background: var(--stage); position: relative; overflow: hidden; display: grid; place-items: center; color: #aaa; font-size: 11px; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot b { position: absolute; left: 3px; top: 2px; color: #17121f; background: var(--lime); font: 400 10px/1 var(--f-pix); padding: 2px 3px; }

/* ---------- 编辑器外壳（里面是 ImgKit.tuner） ---------- */
.editor { position: fixed; inset: 0; z-index: 40; background: var(--paper); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.editor .ehead { display: flex; gap: 8px; align-items: center; padding: 10px max(14px, calc((100vw - 1400px) / 2)); background: var(--card); border-bottom: 2px solid var(--edge); flex-wrap: wrap; }
.editor .ehead strong { font-weight: 760; letter-spacing: -.02em; }
.editor .exec { flex-basis: 100%; color: var(--muted); }
.editor .exec details { display: inline; margin-left: 8px; }
.editor .exec summary { display: inline; cursor: pointer; text-decoration: underline dotted; }
.editor .exec table { font-size: 12px; border-collapse: collapse; margin-top: 6px; }
.editor .exec td { padding: 2px 8px 2px 0; border-top: 1px dashed var(--line-2); }
.editor .ebody { overflow: auto; padding: 14px max(14px, calc((100vw - 1400px) / 2)); }
.unsaved { color: var(--bad); font-size: 13px; font-weight: 650; }
@media (max-width: 820px) {
  .editor .ehead { gap: 4px; padding: 6px 8px; }
  .editor .ehead strong { flex-basis: 100%; order: -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
  .editor .ehead button { padding: 2px 8px; min-height: 30px; font-size: 12.5px; }
  .editor .ebody { padding: 10px; }
}

/* ---------- ImgKit 组件换成本页的样子（组件本身是工作台的深色样式） ---------- */
.editor { --panel: var(--card); --text: var(--ink); --accent: var(--lime-2); }
.editor .ik-panel { border: 2px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-s); padding: 12px 14px; }
.editor .ik-panel strong, .editor .ik-head strong { font-weight: 760; letter-spacing: -.02em; font-size: 14px; }
.editor .ik-seg { border: 2px solid var(--edge); border-radius: 10px; background: var(--card); }
.editor .ik-seg button { box-shadow: none; min-height: 26px; border: 0; border-radius: 7px; color: var(--ink-2); font-weight: 600; }
.editor .ik-seg button:hover:not(:disabled):not(.on) { transform: none; box-shadow: none; background: var(--paper-2); }
.editor .ik-seg button.on { background: var(--ink); color: var(--on-ink); }
.editor .ik-tune button:not(.ik-seg button):not(.tacts button):not(.tbands button):not(.tplist button):not(.tchev) { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.editor .ik-tune :is(.tacts, .tbands, .tplist) button, .editor .ik-tune .tchev { box-shadow: none; transform: none; }
.editor .ik-tune .tbands button { border: 1.5px solid var(--ink-2); }
.editor .ik-tune .tbands button.on { border-color: var(--ink); background: var(--paper-2); }
.editor .ik-tune .tp span { color: var(--ink-2); }
.editor .ik-tune { --panel-2: transparent; }
/* 编辑器里舞台和参数栏跟着可用高度走（标题栏换行、出现「未保存」时不溢出） */
@media (min-width: 901px) {
  .editor .ebody { display: flex; flex-direction: column; overflow: hidden; }
  .editor .tunehost { flex: 1; min-height: 0; }
  .editor .ik-tune { height: 100%; align-items: stretch; }
  .editor .ik-tune .tleft { height: 100%; min-height: 0; }
  .editor .ik-tune .tright { max-height: none; height: 100%; }
}
.editor .ik-tune .tview { border: 2px solid var(--edge); border-radius: var(--r); background: var(--stage); box-shadow: var(--shadow); }
.editor .ik-tune .tstage { box-shadow: 0 2px 18px #0008; }
.editor .ik-tune .tright { gap: 12px; padding: 0 4px 6px 0; }
.editor .ik-tune .tleft { top: 0; }
.editor .ik-tune .tstep { background: var(--card); border-color: var(--ink); border-left-width: 6px; border-left-color: var(--gc, var(--ink)); }
.editor .ik-tune .tpick { background: var(--card); border-color: var(--ink); }
.editor .ik-tune input[data-r="name"] { min-height: 32px; }
.editor .ik-pill { background: var(--paper-2); color: var(--ink-2); border: 1.5px solid var(--edge); }
.editor svg.ik-hist, .editor svg.ik-curve { border: 2px solid var(--edge); border-radius: 8px; }
.editor .ik-tune pre { background: #17121f; color: #f3eee3; }
/* 对比器：保持中性深色（看色用），只换按钮和标签的形状 */
.ik-cmp { --line: #2a2c31; --panel: #17181b; --muted: #9a988f; --text: #e8e6e1; z-index: 55; font-family: var(--f-sans); }
.ik-cmp button { background: #2a2a2a; border: 2px solid #555; color: #eee; box-shadow: 0 2px 0 0 #000; min-height: 30px; padding: 2px 10px; font-size: 13px; border-radius: 9px; }
.ik-cmp .ik-seg { background: #17181b; border-color: #444; }
.ik-cmp .ik-seg button { border: 0; box-shadow: none; background: transparent; color: #aaa; }
.ik-cmp .ik-seg button.on { background: var(--lime); color: #17121f; }
.ik-cmp select { background: #2a2a2a; color: #eee; border-color: #555; min-height: 30px; max-width: 240px; }
.ik-cmp #cTitle { font-weight: 760; letter-spacing: -.02em; }
.ik-cmp #stage { touch-action: none; }

/* ---------- 历史 / 考试 / 实验室 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px; }
.hcard { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; display: grid; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
/* 历史页「选择」模式：左上角勾选框，选中的卡片描边 */
.hcard.selecting { position: relative; cursor: pointer; }
.hcard .hpick { position: absolute; top: 8px; left: 8px; z-index: 1; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--edge);
  background: var(--card); display: grid; place-items: center; font-weight: 800; }
.hcard.picked { outline: 3px solid var(--coral); outline-offset: -3px; }
.hcard.picked .hpick { background: var(--coral); color: #fff; }
.hcard:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 7px 0 0 var(--sh); }
.hcard img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--stage); border-bottom: 2px solid var(--edge); }
.hcard .b { padding: 10px 12px 12px; display: grid; gap: 3px; font-size: 13px; }
.hcard .b strong { font-size: 15px; font-weight: 760; letter-spacing: -.02em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters a { text-decoration: none; }
.filters label { display: inline-flex; align-items: center; gap: 6px; min-height: 39px; }   /* 勾选框和日期框一样高，同排对齐 */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; border: 2px solid currentColor; }
.exam { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.exam img { width: 100%; height: 100%; object-fit: cover; background: var(--stage); min-height: 130px; border-right: 2px solid var(--edge); }
.exam .b { padding: 14px 16px 14px 0; display: grid; gap: 8px; align-content: start; }
.exam h2 { font-size: 18px; }
.exam a { text-decoration: none; }
@media (max-width: 600px) { .exam { grid-template-columns: 1fr; } .exam img { border-right: 0; border-bottom: 2px solid var(--edge); } .exam .b { padding: 0 14px 14px; } }
.bar2 { height: 10px; border-radius: 3px; background: var(--paper-2); border: 1.5px solid var(--edge); overflow: hidden; } .bar2 i { display: block; height: 100%; background: var(--lime); }
table.cap { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.cap td, table.cap th { padding: 8px 8px; border-bottom: 1.5px dashed var(--line-2); text-align: left; vertical-align: top; }
table.cap th { font: 400 11px var(--f-pix); letter-spacing: .05em; color: var(--muted); text-transform: uppercase; border-bottom: 2px solid var(--edge); }
.scroll { overflow-x: auto; }
pre { font: 12px/1.5 var(--f-mono); background: #17121f; color: #f3eee3; padding: 12px; border-radius: var(--r); overflow: auto; max-height: 360px; margin: 0; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(23, 18, 31, .45); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal .box { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r-lg); padding: 18px; width: min(780px, 100%); max-height: 86vh; overflow: auto; display: grid; gap: 14px; box-shadow: 0 6px 0 0 var(--sh); }
/* 批量同步：多选图块、批次页 */
.libgrid.pick button { position: relative; border: 2px solid transparent; }
.libgrid.pick button.on { border-color: var(--ink); box-shadow: 0 3px 0 0 var(--sh); }
.libgrid.pick button i { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center;
  background: var(--lime); color: #17121f; border: 2px solid #17121f; font-style: normal; font-weight: 800; font-size: 12px; }
.libgrid.pick button.on i { display: grid; }
.libgrid.pick:empty { display: none; }
.sticky-foot { position: sticky; bottom: -18px; background: var(--card); padding: 10px 0 0; border-top: 1.5px dashed var(--line-2); }
.batch-src { display: flex; gap: 14px; align-items: center; }
.batch-src img { height: 96px; border-radius: 8px; border: 2px solid var(--edge); }
.bitem .bstate { position: relative; aspect-ratio: 4/3; border-bottom: 2px solid var(--edge); background: var(--stage); }
.bitem .bstate img { width: 100%; height: 100%; object-fit: cover; opacity: .35; border: 0; }
.bitem .bstate span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 400 12px var(--f-pix); letter-spacing: .05em; }
/* 导出选项（editor.js exportDialog） */
.xopt { display: grid; gap: 12px; }
.xrow { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 10px; align-items: center; }
.xrow[hidden] { display: none; }
.xl { font: 400 11px var(--f-pix); letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { display: grid; gap: 1px; padding: 7px 11px; border: 2px solid var(--line-2); border-radius: 10px; cursor: pointer; background: var(--card); min-width: 64px; }
.seg label:hover { border-color: var(--ink); }
.seg label.on { border-color: var(--ink); background: var(--lime); color: #17121f; box-shadow: 0 3px 0 0 var(--sh); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg b { font-size: 13.5px; }
.seg small { font-size: 11.5px; opacity: .75; }
.xq { display: flex; gap: 10px; align-items: center; }
.xq input { flex: 1; max-width: 280px; }
.xq output { font: 600 13px var(--f-mono); min-width: 3ch; }
@media (max-width: 560px) { .xrow { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.libgrid button { padding: 0; overflow: hidden; border-radius: 10px; aspect-ratio: 4/3; background: var(--stage); }
.libgrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.toast { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70; background: #17121f; color: #fbf8f1; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; border: 2px solid #17121f; box-shadow: 0 4px 0 0 var(--lime-2); }
.err { color: var(--bad); font-weight: 600; }
.empty { padding: 36px; text-align: center; color: var(--muted); border: 2px dashed var(--line-2); border-radius: var(--r-lg); }

/* 开发者控制台（/dev/）：原始记录、外部入口 */
pre.raw { white-space: pre-wrap; word-break: break-all; }

/* 套餐菜单 */
.pkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 10px; max-height: 62vh; overflow: auto; padding: 4px 4px 8px; }
.pkg { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: var(--r); white-space: normal; height: auto; min-height: max-content; align-content: start; }
.pkg b { font-size: 15px; }
.pkg[disabled] { opacity: .45; }
.editor .ik-panel output { min-width: 3.5em; text-align: right; font: 12px var(--f-mono); }

/* 处理页：输入图 + 推荐摘要并成一块，效果卡尽量上到首屏 */
.sess-sum { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.sess-sum > .row { flex: none; }
.sess-sum .sum { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.sess-sum .sum-text { margin: 0; font-size: 15.5px; }
.sess-sum .steps { margin-bottom: 2px; }

/* 触控屏：按钮至少 44 / 40px 高（小按钮），手指点得准 */
@media (pointer: coarse) {
  button, details.more > summary { min-height: 44px; }
  button.small, details.more > summary.small { min-height: 40px; padding-left: 12px; padding-right: 12px; }
  header.top nav a { padding-top: 10px; padding-bottom: 10px; }
}
.empty-cta { grid-column: 1 / -1; display: grid; gap: 12px; justify-items: center; text-align: center; padding: 28px 16px; }
.empty-cta p { margin: 0; max-width: 40ch; }
.empty-cta a { text-decoration: none; }
.pkg .small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 像素字（Silkscreen）没有中文：标签里的中文单独用正文字体，字号略放大、去掉字距，和像素字的基线 / 视觉高度对齐 */
.eyebrow .zh, .stepno .zh { font-family: var(--f-sans); font-size: 1.08em; letter-spacing: 0; text-transform: none; font-weight: 500; }
/* 骨架屏 */
.skel { display: grid; gap: 12px; padding: 8px 0; }
.skel i { display: block; height: 54px; border-radius: var(--r); background: linear-gradient(90deg, var(--paper-2) 25%, var(--card) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.skel i.h { height: 46px; width: min(360px, 70%); }
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
/* 能力库 / 套餐表：各分组同一套列宽，上下对齐 */
table.cap.fixed { table-layout: fixed; width: 100%; }
/* 套餐页的效果预览 */
.pkprev { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pkprev figure { margin: 0; display: grid; gap: 4px; }
.pkprev img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--stage); border-radius: var(--r); border: 2px solid var(--edge); cursor: zoom-in; }
.pkprev .ph { aspect-ratio: 4 / 3; border-radius: var(--r); background: var(--stage); display: grid; place-items: center; color: #bbb; font-size: 13px; }

/* 拼图下载弹窗：原图 + 可勾选的效果缩略图 */
.sheetpick { display:grid; grid-template-columns:repeat(auto-fill, minmax(118px, 1fr)); gap:10px; margin:12px 0; max-height:min(56vh, 520px); overflow:auto; padding:2px; }
.sheetpick figure, .sheetpick label { margin:0; display:flex; flex-direction:column; gap:4px; position:relative; font-size:12px; cursor:pointer; min-width:0; }
.sheetpick figure { cursor:default; }
.sheetpick img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:8px; background:var(--stage); border:2px solid transparent; }
.sheetpick label:has(input:checked) img { border-color:var(--ink); }
.sheetpick label:not(:has(input:checked)) img { opacity:.45; }
.sheetpick input { position:absolute; top:6px; left:6px; width:18px; height:18px; margin:0; accent-color:var(--ink); }
.sheetpick span, .sheetpick figcaption { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sheetpick figcaption { font-weight:600; }

/* ---------- 筛选条（开发者控制台 · 套餐编排） ---------- */
.pfilter { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 30px; padding: 3px 11px; font-size: 13px; font-weight: 600; border-radius: 999px; box-shadow: none; }
.chip b { font-weight: 500; color: var(--muted); margin-left: 2px; }
.chip.on { background: var(--ink); color: var(--on-ink); }
.chip.on b { color: inherit; opacity: .7; }
.tagx { display: inline-block; padding: 0 7px; border: 1.5px solid var(--line-2); border-radius: 999px; font-size: 11.5px; white-space: nowrap; margin: 1px 0; }
.wall .ph { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--stage); color: #bbb; font-size: 12px; border-bottom: 2px solid var(--edge); padding: 8px; text-align: center; }
.wall .ph.err { color: var(--coral); }
.wall .hcard img { object-fit: contain; }   /* 效果墙看整张，不裁 */

/* 手机上的编辑器（2026-11-25）：竖屏时预览固定在上面、参数在下面滚，边调边看；用 dvh，地址栏收起 / 展开不跳。
   横屏手机高度只有 ~375px，固定预览会把参数挤没，所以只在竖屏且够高时固定 */
@media (max-width: 900px) and (orientation: portrait) and (min-height: 560px) {
  .editor .ik-tune .tleft { position: sticky; top: -10px; z-index: 3; height: 44vh; height: 44dvh; min-height: 240px; background: var(--paper); padding-top: 10px; margin-top: -10px; }
}

/* ================= 统一字体与层级（2026-11-25 设计整理） =================
 * 问题：英文像素字（Silkscreen）+ Bricolage 拉丁字 + 系统中文字三套混排，字号从 11 到 15.5 散了七八档，
 *       顶栏账号文字换行、会话页一行里五种按钮样式。
 * 做法：使用者版只用一套系统字体（中文优先，不再加载 Google Fonts，弱网首屏不卡），
 *       字号收成 4 档：标题 / 正文 15 / 次要 13 / 标签 12；小标签改成同一字体的小号字距字。 */
:root {
  --f-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC",
            "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --f-pix: var(--f-sans);
  --fs-body: 15px; --fs-2: 13px; --fs-3: 12px;
}
body { font: 400 var(--fs-body)/1.6 var(--f-sans); letter-spacing: 0; }
h1 { font-weight: 750; letter-spacing: -.01em; }
.small { font-size: var(--fs-2); }
.badge, .tagx, .seg small, .slot { font-size: var(--fs-3); }
.eyebrow, .stepno, .tray > .small { font: 600 var(--fs-3)/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; }
.eyebrow .zh, .stepno .zh { font-size: 1em; letter-spacing: .02em; font-weight: 600; }

/* 按钮：只留三种——主按钮（实心）、次按钮（描边）、文字按钮（ghost）；危险操作用描边红字，不用裸红字 */
button.small { font-size: var(--fs-2); min-height: 34px; padding: 4px 12px; }
button.ghost.danger, button.danger { color: var(--bad); }
button.ghost.danger { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
button.ghost.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 10%, transparent); }

/* 顶栏：账号收进一个按钮（下拉菜单），不在顶栏里换行 */
#who { position: relative; flex: none; }
#who .acct { min-height: 34px; padding: 4px 10px; font-size: var(--fs-2); box-shadow: none; display: inline-flex; gap: 6px; align-items: center; }
#who .acct i { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-style: normal;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; text-transform: uppercase; }
#who .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px; background: var(--card); border: 2px solid var(--edge);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; z-index: 30; }
#who .menu[hidden] { display: none; }
#who .menu .who-name { padding: 6px 10px; color: var(--muted); font-size: var(--fs-2); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
#who .menu button { box-shadow: none; border-color: transparent; background: transparent; text-align: left; font-size: var(--fs-2); min-height: 36px; }
#who .menu button:hover { background: var(--paper-2); transform: none; }
@media (max-width: 520px) { #who .acct span { display: none; } }

/* 默认密码提醒：一行、和内容同宽的边距 */
#pwWarn { font-size: var(--fs-2) !important; padding: 8px max(16px, calc((100vw - 1180px) / 2)) !important; line-height: 1.5; }

/* 会话页标题区：标题一行，日期放下面一行小字，操作按钮成组、同一种样式 */
.head .meta { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-2); }
.head .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.head h1 { margin: 0; }
@media (max-width: 640px) {
  .head > .row { flex-wrap: wrap; row-gap: 10px; }
  .head .acts { width: 100%; }
  .head .acts .sp { display: none; }
}

/* 历史筛选：手机上搜索框整行，其余两两一行 */
.filters input[type=search] { min-width: 0; }
@media (max-width: 640px) {
  .filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .filters input[type=search] { grid-column: 1 / -1; width: 100%; }
  .filters label { display: flex; align-items: center; gap: 6px; }
  .filters input[type=date] { flex: 1; min-width: 0; }
}
@media (max-width: 640px) { .filters button { justify-self: start; } }
/* 首页风格标签：替代原来的滚动彩条（深色底 + 动画 + 三色块），一行静态标签 */

/* 等待体验（2026-11-26）：进度条 + 已等秒数；推荐中先放占位卡片；渲染中的图区闪动，表示在动 */
.waitbar { display: grid; gap: 6px; padding: 10px 0 4px; }
.waitbar .wb-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.waitbar .wb-track { height: 8px; border-radius: 99px; background: var(--paper-2); border: 1.5px solid var(--edge); overflow: hidden; }
.waitbar .wb-track i { display: block; height: 100%; background: var(--lime); transition: width .8s var(--ease); }
.card .state.wait, .ghost-card .img { background: linear-gradient(100deg, var(--stage) 30%, #3a3a3a 50%, var(--stage) 70%); background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite; color: #ddd; }
.ghost-card .bar { display: block; height: 12px; width: 60%; border-radius: 6px; background: var(--paper-2); }
.ghost-card .bar.s { width: 85%; height: 10px; margin-top: 6px; }
@keyframes shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .card .state.wait, .ghost-card .img { animation: none; } }

/* ---------- 魔法像素加载（ui.js pxl()）：3×3 像素格按螺旋顺序逐格点亮、换色，中心一格一直闪；steps 跳变保持像素感 ---------- */
.pxl { --px: 4px; display: inline-grid; grid-template-columns: repeat(3, var(--px)); gap: 1px; vertical-align: -2px; flex: none; }
.pxl i { width: var(--px); height: var(--px); background: currentColor; opacity: .14; animation: pxl 1.6s steps(1, end) infinite; }
.pxl i:nth-child(1) { animation-delay: 0s; }    .pxl i:nth-child(2) { animation-delay: .2s; }  .pxl i:nth-child(3) { animation-delay: .4s; }
.pxl i:nth-child(6) { animation-delay: .6s; }   .pxl i:nth-child(9) { animation-delay: .8s; }  .pxl i:nth-child(8) { animation-delay: 1s; }
.pxl i:nth-child(7) { animation-delay: 1.2s; }  .pxl i:nth-child(4) { animation-delay: 1.4s; }
.pxl i:nth-child(5) { animation: pxl-core .8s steps(1, end) infinite; }
@keyframes pxl { 0% { opacity: 1; background: var(--lime); } 12% { opacity: 1; background: var(--sky); } 25% { opacity: .55; background: var(--coral); } 38% { opacity: .14; background: currentColor; } }
@keyframes pxl-core { 0% { opacity: 1; background: var(--sun, #ffd23f); } 50% { opacity: .3; background: currentColor; } }
.pxl-row { display: inline-flex; align-items: center; gap: 8px; }
#busy { display: inline-flex; opacity: 0; transition: opacity .2s; color: var(--ink); } #busy.on { opacity: 1; } #busy .pxl { --px: 4px; }
.drop { position: relative; }
.drop-wait { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--card) 82%, transparent); border-radius: inherit; font-weight: 700; }
.drop-wait .pxl { --px: 7px; gap: 2px; }
.drop.busy { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pxl i, .pxl i:nth-child(5) { animation: none; opacity: .6; background: var(--lime); } }

/* ---------- 首页（2026-11-26 重排）：一行标题 + 一张主卡（上传区 / 预览 + 底栏：参考图缩略 · 开始）+ 风格名一行 ---------- */
.hm { display: grid; gap: 18px; }
/* 平时收窄；鼠标移上去 / 拖文件进来 / 键盘聚焦时展开 */
button.linkish { background: none; border: 0; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); padding: 6px 8px; }
button.linkish:hover:not(:disabled) { background: none; box-shadow: none; color: var(--ink); }
@media (max-width: 760px) {
}
/* 上传区（2026-11-26）：图标 + 「将图片拖到此处或上传文件」一行，整块可点 */
.coarse-only { display: none; }
@media (pointer: coarse) { .coarse-only { display: inline-block; margin-top: 10px; } }
/* 选好的照片：两边空白用同一张图的模糊放大版铺满（参考 Instagram）；压暗 + 降饱和，减少周围颜色对看色的影响 */

/* ---------- 结果页（2026-11-26）：去掉总结 / 编号 / 理由，图按原图比例完整显示、单张更大 ---------- */
.ss-head .row { align-items: center; gap: 10px; }
.ss-head h1 { font-size: 22px; margin: 0; cursor: text; }
#first, #picked, #mine, #synced, section[data-n] .cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.card .img { aspect-ratio: var(--ar, 4/3); }
.card .body { padding: 10px 12px 12px; gap: 8px; }

/* 同一排的卡片不能因为悬停上下错位 */
.card:hover { transform: none; }
/* 结果页：原图是输入，不和效果卡并排；标题左边一个小缩略图，点开和效果对比 */
.ss-orig { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--edge); background: var(--stage); box-shadow: none; flex: none; cursor: zoom-in; }
.ss-orig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-orig:hover:not(:disabled) { box-shadow: none; outline: 2px solid var(--lime-2); }

/* 页脚：隐私告知（所有页面底部） */
.foot { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 18px 0 110px;   /* 底部留出对比槽位 / 手机固定按钮的位置 */ border-top: 1px solid var(--line); font-size: var(--fs-3); color: var(--muted); text-align: center; }
.foot a { color: inherit; }

/* ====================================================================================
 * 2026-11-27 改版：滑卡挑选（deck.js）。中性灰界面，照片是唯一的彩色；
 * 去掉墨色粗描边、硬阴影、柠檬绿强调（docs/DESIGN.md 第 2–4 节）。令牌只在使用者版覆盖，theme.css 共用不动。
 * ==================================================================================== */
:root {
  --paper: #efefee; --paper-2: #e6e6e4; --card: #fafafa; --ink: #18181b; --ink-2: #3a3a3f; --muted: #737379;
  --line: #dededb; --line-2: #cfcfcb; --edge: var(--line-2); --sh: transparent; --on-ink: #fafafa;
  --stage: var(--paper); --keep: #1f9d55; --skip: #c2412d; --lime: #dcdcd6; --lime-2: #a1a1aa;
  --shadow: 0 1px 2px rgba(0,0,0,.06); --shadow-s: none; --shadow-card: 0 14px 40px rgba(20,20,25,.16);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #161617; --paper-2: #202022; --card: #1e1e20; --ink: #ececef; --ink-2: #c9c9cf; --muted: #9a9aa1;
  --line: #2e2e31; --line-2: #3d3d41; --edge: var(--line-2); --on-ink: #161617; --stage: #0f0f10; --keep: #3fbf74; --skip: #e2624c;
  --lime: #d4d4d8; --lime-2: #71717a; --shadow-card: 0 14px 40px rgba(0,0,0,.5); color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #161617; --paper-2: #202022; --card: #1e1e20; --ink: #ececef; --ink-2: #c9c9cf; --muted: #9a9aa1;
  --line: #2e2e31; --line-2: #3d3d41; --edge: var(--line-2); --on-ink: #161617; --stage: #0f0f10; --keep: #3fbf74; --skip: #e2624c;
  --lime: #d4d4d8; --lime-2: #71717a; --shadow-card: 0 14px 40px rgba(0,0,0,.5); color-scheme: dark; }
:focus-visible { box-shadow: none; }
header.top { border-bottom: 1px solid var(--line); }
.logo { background: transparent; }
button { border-width: 1px; box-shadow: none; font-weight: 550; }
button:hover:not(:disabled), button:active:not(:disabled) { transform: none; box-shadow: none; background: var(--paper-2); }
button.primary, button.primary:hover:not(:disabled), button.primary:active:not(:disabled) { box-shadow: none; background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
select, input[type=text], input[type=date], input[type=search], textarea { border-width: 1px; }
.hcard, .card, .panel { border-width: 1px !important; border-color: var(--line) !important; box-shadow: none !important; }

/* 牌桌页撑满一屏 */
body:has(.sw) { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body:has(.sw) main { width: 100%; max-width: none; padding: 0; flex: 1; min-height: 0; display: block; }
body:has(.sw) .foot { padding: 8px 0 10px; border-top: 0; flex: none; }
.sw { height: 100%; display: grid; grid-template-columns: 240px minmax(0, 1fr) 272px; }
.sw-list, .sw-kept { background: var(--paper-2); overflow: auto; padding: 14px 12px; display: grid; align-content: start; gap: 6px; }
.sw-list { border-right: 1px solid var(--line); } .sw-kept { border-left: 1px solid var(--line); }
.sw-h { display: flex; align-items: center; justify-content: space-between; margin: 0 6px 6px; font-size: 12px; color: var(--muted); font-weight: 600; min-height: 30px; }
.sw-h a { color: var(--muted); }
.sw-it { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; cursor: pointer; }
.sw-it:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.sw-it.on { background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.sw-it img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: block; background: var(--stage); }
.sw-it b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-it span { font-size: 12px; color: var(--muted); }
.sw-del { min-height: 0; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--muted); opacity: 0; }
.sw-it:hover .sw-del, .sw-it.on .sw-del, .sw-del:focus-visible { opacity: 1; }
.sw-del:hover:not(:disabled) { color: var(--skip); }
.sw-ask { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; font-size: 12.5px; flex-wrap: wrap; }

.sw-table { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; justify-items: center; padding: 14px 20px 10px; min-height: 0; overflow: hidden; }
.sw-head { justify-self: stretch; display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sw-head b { font-size: 15px; font-weight: 600; }
.sw-deck { position: relative; height: 100%; max-height: 640px; aspect-ratio: 3 / 4; max-width: 100%; align-self: center; z-index: 2; }
.sw-card { position: absolute; inset: 0; border-radius: 18px; background: var(--card); padding: 10px 10px 0; box-shadow: var(--shadow-card);
  display: grid; grid-template-rows: minmax(0, 1fr) 50px; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .3s var(--ease), opacity .3s; will-change: transform; cursor: grab; }
.sw-card:active { cursor: grabbing; }
.sw-card.back1 { transform: translateY(26px) scale(.94); opacity: .85; pointer-events: none; }
.sw-card.back2 { transform: translateY(50px) scale(.88); opacity: .6; pointer-events: none; }
.sw-card .ph { position: relative; border-radius: 12px; overflow: hidden; background: var(--stage); }
.sw-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sw-card .ph img.o { opacity: 0; transition: opacity .1s; }
.sw-card.peek .ph img.o { opacity: 1; }
.peeklab { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; border-radius: 6px; padding: 2px 8px; opacity: 0; }
.sw-card.peek .peeklab { opacity: 1; }
.sw-card.wait .ph { animation: sw-breathe 1.6s ease-in-out infinite; }
@keyframes sw-breathe { 50% { filter: brightness(1.12) saturate(1.1); } }
.sw-card .meta { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.sw-card .meta b { font-size: 16px; font-weight: 650; }
.sw-card .meta .n { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stamp { position: absolute; top: 24px; padding: 3px 12px; border: 3px solid; border-radius: 8px; font-weight: 800; font-size: 18px; opacity: 0; letter-spacing: .06em; background: rgba(255,255,255,.85); }
.stamp.keep { left: 24px; color: var(--keep); transform: rotate(-12deg); }
.stamp.skip { right: 24px; color: var(--skip); transform: rotate(12deg); }
.sw-fail { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; color: #fff; background: rgba(0,0,0,.35); }
.sw-end { position: absolute; inset: 0; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 20px; }
.sw-end b { display: block; font-size: 17px; margin: 6px 0 12px; }
.sw-stack { display: flex; justify-content: center; }
.sw-stack img { width: 56px; height: 74px; object-fit: cover; border-radius: 8px; border: 3px solid var(--card); margin: 0 -8px; box-shadow: 0 4px 12px rgba(0,0,0,.15); background: var(--stage); }
.sw-acts { display: flex; gap: 22px; align-items: center; justify-content: center; margin-top: 18px; min-height: 58px; z-index: 2; }
.sw-acts button { width: 58px; height: 58px; min-height: 0; border-radius: 50%; padding: 0; background: var(--card); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.08); font-size: 22px; }
.sw-acts button:active:not(:disabled) { transform: scale(.92); }
.sw-acts .sw-x { color: var(--skip); } .sw-acts .sw-k { color: var(--keep); }
.sw-acts .sw-o { width: 46px; height: 46px; font-size: 12px; font-weight: 650; }
.sw-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.sw-hint kbd { font: inherit; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: var(--card); }

/* 首页：上传卡浮在循环色块上 */
.sw-reel { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); overflow: hidden; pointer-events: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.sw-track { display: flex; gap: 16px; width: max-content; animation: sw-roll 50s linear infinite; }
.sw-track i { display: block; height: min(46vh, 340px); aspect-ratio: 3 / 4; border-radius: 14px; }
.sw-track i:nth-child(odd) { transform: translateY(18px); }
@keyframes sw-roll { to { transform: translateX(-50%); } }
.sw-table:has(.sw-reel) { grid-template-rows: minmax(0, 1fr) auto; }
.sw-table:has(.sw-reel) .sw-deck { max-height: 520px; }
.sw-drop { position: absolute; inset: 0; border-radius: 18px; border: 2px dashed var(--line-2); display: grid; place-items: center; text-align: center; cursor: pointer;
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color .2s, background .2s; }
.sw-drop:hover, .sw-drop.over { border-color: var(--ink); background: var(--card); }
.sw-drop.busy { pointer-events: none; }
.sw-drop b { display: block; font-size: 17px; margin: 12px 0 4px; }
.sw-ico { width: 72px; color: var(--ink); }

/* 右栏已留 */
.sw-kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sw-kgrid > p { grid-column: 1 / -1; margin: 0 6px; }
.sw-k { position: relative; border-radius: 10px; overflow: hidden; background: var(--stage); aspect-ratio: 3 / 4; cursor: zoom-in; animation: sw-pop .3s var(--ease); }
.sw-k img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-k > span { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 5px; padding: 1px 6px; max-width: calc(100% - 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-kacts { position: absolute; inset: 6px 6px auto; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.sw-k:hover .sw-kacts, .sw-k:focus-within .sw-kacts { opacity: 1; }
.sw-kacts button { min-height: 26px; padding: 0 8px; font-size: 12px; background: rgba(255,255,255,.92); color: #18181b; border: 0; }
.sw-kacts button:last-child { margin-left: auto; }
@keyframes sw-pop { from { transform: scale(.85); opacity: 0; } }

/* 手机 */
.sw-mkept, .sw-sheet { display: none; }
@media (max-width: 899px) {
  .sw { grid-template-columns: minmax(0, 1fr); }
  .sw-list, .sw-kept, .sw-hint { display: none; }
  .sw-table { padding: 8px 14px 0; }
  .sw-deck { height: auto; width: min(100%, calc((100dvh - 290px) * .75)); }
  .sw-acts { gap: 28px; margin: 14px 0 10px; }
  .sw-mkept { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--paper-2); min-height: 60px; flex: none; }
  .sw-mkept .sw-k { width: 38px; flex: none; border-radius: 7px; }
  .sw-mkept .small.muted { flex: none; }
  .sw-mkept button { flex: none; }
  .sw-sheet:not(.hidden) { display: grid; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.35); align-items: end; }
  .sw-panel { background: var(--paper); border-radius: 18px 18px 0 0; padding: 10px 12px calc(16px + env(safe-area-inset-bottom)); max-height: 72%; overflow: auto; display: grid; gap: 4px; }
  .sw-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 2px auto 8px; }
  .sw-del { opacity: 1; }
  body:has(.sw) { display: flex; }
  body:has(.sw) main { display: flex; flex-direction: column; }
  body:has(.sw) .sw { flex: 1; min-height: 0; }
  .sw-track i { height: 32vh; }
}
@media (prefers-reduced-motion: reduce) { .sw-card, .sw-k { transition: none; animation: none; } .sw-card.wait .ph, .sw-track { animation: none; } }

.ik-cmp.nohist .ik-muted.ik-hint-short { display: none; }
/* 手机：牌宽按照片比例算，不压住按钮；首页上传卡小一点，背后的色块露出来 */
@media (max-width: 899px) {
  .sw-deck { width: min(100%, calc((100dvh - 300px) * var(--ar, .7))); }
  .sw-table:has(.sw-reel) .sw-deck { width: 78%; max-height: 62%; }
  .sw-table:has(.sw-reel) .sw-drop { background: color-mix(in srgb, var(--card) 70%, transparent); }
}
.sw-menu { display: grid; gap: 8px; } .sw-menu button { min-height: 44px; }

/* 桌面处理页：大图 + 胶片条（≥ 900px；手机仍是滑卡） */
.sw.sw-film { grid-template-columns: 240px minmax(0, 1fr); }
.fs { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
.fs-bar { display: flex; align-items: center; gap: 8px; padding: 12px 24px; flex-wrap: wrap; }
.fs-bar > b { font-size: 17px; font-weight: 600; }
.fs-bar button { height: 34px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.fs-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--paper-2); }
.fs-seg button { height: 28px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); box-shadow: none; }
.fs-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.fs-keep.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.fs-stage { min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0 24px; }
.fs-img, .fs-split { max-width: 100%; max-height: 100%; border-radius: 6px; }
.fs-stage { padding-bottom: 4px; }
.fs-img { object-fit: contain; }
.fs-split { position: relative; height: 100%; max-width: 100%; overflow: hidden; touch-action: none; cursor: ew-resize; --p: 50%; }
.fs-split img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.fs-split img.o { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.fs-split i { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.4); }
.fs-tag { position: absolute; left: 12px; top: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; }
.fs-side { display: flex; justify-content: center; gap: 12px; width: 100%; height: 100%; }
.fs-side figure { margin: 0; height: 100%; min-width: 0; max-width: calc(50% - 6px); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fs-side img { display: block; height: calc(100% - 26px); width: auto; max-width: 100%; object-fit: contain; border-radius: 6px; }
.fs-side figcaption { font-size: 13px; color: var(--muted); }
.fs-ph { width: min(100%, 720px); aspect-ratio: 3 / 2; border-radius: 6px; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; }
.fs-strip { display: flex; gap: 10px; padding: 14px 24px 18px; overflow-x: auto; align-items: flex-start; }
.fs-th { flex: none; width: 112px; padding: 0; border: 0; background: none; box-shadow: none; display: grid; gap: 6px; text-align: left; }
.fs-tb { position: relative; display: block; height: 76px; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.fs-tb img { width: 100%; height: 100%; object-fit: cover; }
.fs-th.on .fs-tb { outline: 2px solid var(--ink); outline-offset: 2px; }
.fs-heart { position: absolute; right: 5px; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font: 11px/20px sans-serif; text-align: center; font-style: normal; }
.fs-tn { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-th.on .fs-tn { color: var(--ink); font-weight: 500; }
.fs-more { flex: none; width: 112px; height: 76px; border: 1.5px dashed var(--line-2); border-radius: 8px; background: transparent; font-size: 13px; }
.fs-loading { border: 0; display: grid; gap: 6px; height: auto; }
.fs-loading .fs-tb { height: 76px; background: linear-gradient(90deg, var(--paper-2) 25%, var(--line) 50%, var(--paper-2) 75%) 0 0 / 200% 100%; animation: fs-shim 1.2s linear infinite; }
@keyframes fs-shim { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .fs-loading .fs-tb { animation: none; } }

/* 看图区再大一点：左栏可收起（默认收起）、页脚 / 留白压缩、胶片条变矮、并列的名字压在图上 */
.sw.sw-film.sw-wide { grid-template-columns: minmax(0, 1fr); }
.sw.sw-wide .sw-list { display: none; }
body:has(.sw-film) .foot { display: none; }
.fs-list { width: 34px; padding: 0 !important; font-size: 16px !important; }
.fs-list[aria-pressed="true"] { background: var(--paper-2); }
.fs-bar { padding: 8px 16px; }
.fs-stage { padding: 0 16px; }
.fs-strip { gap: 8px; padding: 10px 16px 12px; }
.fs-th, .fs-more { width: 92px; }
.fs-tb, .fs-more { height: 60px; }
.fs-loading .fs-tb { height: 60px; }
.fs-tn { font-size: 11px; }
.fs-side figure { position: relative; display: block; }
.fs-side img { height: 100%; }
.fs-side figcaption { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; }
/* 胶片条放到右侧竖排：竖图左右有空，上下的高度全给大图 */
.fs { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
.fs-bar { grid-column: 1 / -1; }
.fs-stage { grid-column: 1; grid-row: 2; padding: 0 12px 12px 16px; }
.fs-strip { grid-column: 2; grid-row: 2; flex-direction: column; align-items: stretch; overflow-x: hidden; overflow-y: auto; width: 116px; padding: 0 16px 12px 4px; }
.fs-th, .fs-more { width: 100%; }
.fs-tb, .fs-more, .fs-loading .fs-tb { height: 64px; }
.fs-more { flex: none; }

/* 首页：色块带在上（不挡操作），下面一条实心上传栏；整个区域都能拖入 */
.sw-table:has(.hm) { display: flex; padding: 0; }
.hm { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 24px 0; overflow: hidden; }
.hm-reel { overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.hm-reel .sw-track i { height: min(38vh, 300px); }
.hm-drop { align-self: center; width: min(560px, calc(100% - 32px)); box-sizing: border-box; display: flex; align-items: center; gap: 16px; padding: 16px 16px 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hm-drop:hover { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.09); }
.hm-drop.over { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 10%, transparent); transform: scale(1.01); }
.hm-drop:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hm-drop.busy { pointer-events: none; opacity: .8; }
.hm-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; color: var(--ink); }
.hm-ico svg { width: 20px; height: 20px; }
.hm-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.hm-txt b { font-size: 15px; font-weight: 600; }
.hm-txt span { font-size: 13px; color: var(--muted); }
.hm-btn { flex: none; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-size: 14px; font-weight: 500; display: flex; align-items: center; }
@media (max-width: 899px) {
  .hm { gap: 24px; }
  .hm-reel .sw-track i { height: 30vh; }
  .hm-drop { flex-wrap: wrap; }
  .hm-btn { width: 100%; justify-content: center; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .hm-drop { transition: none; } }
.sw.sw-home { grid-template-columns: 240px minmax(0, 1fr); }
.hm-reel { padding: 0 0 20px; }
@media (max-width: 899px) { .sw.sw-home { grid-template-columns: minmax(0, 1fr); } }

/* 看图区：中性灰衬底（周围颜色会影响对色彩的判断），图片小圆角 + 一圈细内描边 */
/* 照片边缘：像一张放在桌上的相纸——圆角 8、外面一圈极淡的描边 + 两层阴影（贴近的实影 + 远处的软影），
   里面一圈内高光（上沿亮一点）让边缘有厚度；不改背景色 */
.fs-stage { padding: 4px 12px 16px 16px !important; }
.fs-side figure, .fs-split { border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08), 0 14px 32px -10px rgba(0,0,0,.35); }
.fs-side img, .fs-split, .fs-img { border-radius: 8px; }
.fs-side figure::after, .fs-split::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.28); }
.fs-tools button { width: 34px; display: grid; place-items: center; padding: 0 !important; }
/* 手电筒：整页关灯，只有光圈里亮；放大镜：跟着鼠标的圆形局部放大 */
.fs-dark { position: fixed; inset: 0; z-index: 40; pointer-events: none; background: rgba(0,0,0,.86);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.fs-stage.lens-loupe, .fs-stage.lens-loupe .fs-split { cursor: none; }   /* 放大镜本身就是指针；手电筒保留鼠标，关灯后也找得到 */
.fs-stage.lens-torch, .fs-stage.lens-torch .fs-split { cursor: crosshair; }
.fs-loupe { position: fixed; z-index: 40; pointer-events: none; border-radius: 50%; background-repeat: no-repeat; background-color: #000;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4); }

/* 照片边缘流光：一圈彩色光沿边缘转（画在照片框的 ::before 上、照片后面，只从边缘透出 3px） */
@property --fx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.fx-flow .fs-side figure, .fx-flow .fs-split { isolation: isolate; }
.fx-flow .fs-split { overflow: visible; }
.fx-flow .fs-split img { border-radius: 8px; }
.fx-flow .fs-side figure::before, .fx-flow .fs-split::before { content: ''; position: absolute; z-index: -1; pointer-events: none; inset: -3px; border-radius: 11px; filter: blur(4px);
  background: conic-gradient(from var(--fx-a), #22d3ee, #a78bfa, #f472b6, #fbbf24, #34d399, #22d3ee); animation: fx-spin 4s linear infinite; }
.fx-flow .fs-side { gap: 16px; }
.fx-flow .fs-side figure { max-width: calc(50% - 8px); }
@keyframes fx-spin { to { --fx-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { .fx-flow figure::before, .fx-flow .fs-split::before { animation: none; } }
/* 关灯后的拉线开关（在关灯遮罩之上） */
.fs-cord { position: fixed; top: 0; right: 180px; z-index: 41; display: flex; flex-direction: column; align-items: center; --pull: 0px; transform-origin: top center;
  animation: cord-drop .45s cubic-bezier(.3,1.5,.5,1), cord-sway 3.2s ease-in-out .45s infinite; }
.fs-cord:hover { animation-play-state: paused; }
@keyframes cord-sway { 25% { transform: rotate(2.5deg); } 75% { transform: rotate(-2.5deg); } }
.fs-cord i { width: 2px; height: calc(150px + var(--pull)); background: linear-gradient(#bbb, #eee); box-shadow: 0 0 6px rgba(255,255,255,.25); }
.fs-cord button { width: 22px; height: 30px; margin-top: -1px; padding: 0; border: 0; border-radius: 11px 11px 9px 9px; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 35% 30%, #fff, #e6e6e6 45%, #a8a8a8); box-shadow: 0 0 18px 4px rgba(255,236,180,.55), 0 3px 8px rgba(0,0,0,.5); animation: cord-glow 1.6s ease-in-out infinite; }
@keyframes cord-glow { 50% { box-shadow: 0 0 28px 8px rgba(255,236,180,.8), 0 3px 8px rgba(0,0,0,.5); } }
.fs-cord button:active { cursor: grabbing; }
.fs-cord button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.fs-cord.pulled i { animation: cord-pull .26s ease-in-out; }
@keyframes cord-drop { from { transform: translateY(-100%); } }
@keyframes cord-pull { 50% { height: 200px; } }
@media (prefers-reduced-motion: reduce) { .fs-cord, .fs-cord.pulled i { animation: none; } }
/* 处理页工具条进顶栏 */
.hd-slot { flex: 1 1 auto; min-width: 0; display: flex; }
.hd-slot:not(:empty) + .sp { display: none; }
.fs-bar.fs-head { flex: 1; min-width: 0; padding: 0 0 0 12px; flex-wrap: nowrap; }
.fs-bar.fs-head > b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs { grid-template-rows: minmax(0, 1fr) !important; }
.fs-stage, .fs-strip { grid-row: 1 !important; padding-top: 12px !important; }
/* 处理页顶栏左侧：logo 就是回首页，不再放「首页」按钮；竖线分隔，☰ 改成无边框图标，标题 + 灰色计数 */
header.top:has(.hd-slot:not(:empty)) nav { display: none; }
.fs-bar.fs-head { gap: 8px; padding-left: 4px; }
.fs-bar.fs-head::before { content: ''; width: 1px; height: 20px; background: var(--line); margin-right: 4px; flex: none; }
.fs-head .fs-list { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: var(--ink-2); font-size: 16px; }
.fs-head .fs-list:hover, .fs-head .fs-list[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); }
.fs-head > b { font-weight: 600; }
.fs-head > b + .muted { font-variant-numeric: tabular-nums; }
/* 不再显示「首页」导航按钮：logo 就是首页 */
header.top nav { display: none; }
/* 处理历史：按天分组的缩略图网格，照片是主角 */
.hl-g h4 { margin: 8px 4px 8px; font-size: 12px; font-weight: 600; color: var(--ink-3, #888); }
.hl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hl-it { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--stage); }
.hl-it img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease-out; }
.hl-it:hover img { transform: scale(1.04); }
.hl-it.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.hl-meta { position: absolute; inset: auto 0 0 0; display: flex; gap: 6px; align-items: center; padding: 16px 8px 6px; font-size: 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.hl-meta span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-meta i { font-style: normal; flex: none; }
.hl-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; font-size: 11px;
  background: rgba(0,0,0,.5); color: #fff; opacity: 0; transition: opacity .15s; }
.hl-it:hover .hl-del, .hl-del:focus-visible { opacity: 1; }
@media (hover: none) { .hl-del { opacity: 1; } }
.hl-ask { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 13px; text-align: center; }
/* ☰ 放到顶栏最左（logo 前），像侧栏开关；工具条拆进顶栏同一行 */
.hd-slot:not(:empty), .hd-slot .fs-bar.fs-head { display: contents; }
.fs-bar.fs-head::before { content: none; }
.fs-head .fs-list { order: -1; margin-right: -6px; }
.fs-head > b { padding-left: 16px; border-left: 1px solid var(--line); line-height: 20px; }
.fs-head > b + .muted { margin-left: -8px; }
/* 处理历史放在首页上传条下面（不再有左栏） */
.sw.sw-home { grid-template-columns: minmax(0, 1fr) !important; }
.sw-home .hm { justify-content: flex-start; overflow: auto; padding-top: 40px; }
.hm-hist { align-self: center; width: min(960px, calc(100% - 32px)); padding-bottom: 32px; }
.hm-hist .hl-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.hm-hist .hl-g h4 { margin: 16px 0 8px; }
.sw-home .hm > * { flex: none; }
/* 编辑后生成中：先用编辑器预览顶上，模糊 + 一道光扫过（像生图），渲染好后从上到下显影成清晰图 */
.fs-gen { overflow: hidden; }
.fs-gen img { filter: blur(14px) saturate(1.1); transform: scale(1.06); animation: gen-breathe 2.4s ease-in-out infinite; }
.fs-gen::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%) 0 -100% / 100% 50% no-repeat; animation: gen-scan 1.8s linear infinite; }
.fs-genth { filter: blur(4px); opacity: .8; }
@keyframes gen-breathe { 50% { filter: blur(10px) saturate(1.15); } }
@keyframes gen-scan { to { background-position: 0 200%; } }
.fs-reveal .fs-side figure:last-child img, .fs-reveal .fs-split img:last-of-type { animation: gen-reveal 1.1s ease-out; }
@keyframes gen-reveal { from { filter: blur(14px); transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .fs-gen img, .fs-gen::after, .fs-reveal img { animation: none !important; } }
/* 看图区不用灰底：编辑器 / 对比器的画布和页面同色，照片自己带边缘（圆角 + 阴影） */
.editor .ik-tune .tview { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.editor .ik-tune .tview img, .editor .ik-tune .tview canvas { border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 14px 32px -10px rgba(0,0,0,.35); }
/* 渲染中：色带上一道光反复扫过 + 大号像素加载，比单行文字明显 */
.fs-ph.fs-busy { position: relative; overflow: hidden; animation: gen-breathe-bg 2.4s ease-in-out infinite; }
.fs-ph.fs-busy::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%) -150% 0 / 60% 100% no-repeat; animation: ph-sweep 1.6s ease-in-out infinite; }
.fs-ph.fs-busy .pxl { --px: 12px; gap: 3px; }
@keyframes ph-sweep { to { background-position: 250% 0; } }
@keyframes gen-breathe-bg { 50% { filter: brightness(1.12) saturate(1.15); } }
@media (prefers-reduced-motion: reduce) { .fs-ph.fs-busy, .fs-ph.fs-busy::after { animation: none; } }
/* 切换套餐：新大图没下载完前，旧图上盖一层（稍等 120ms 再出，缓存命中不闪）：变暗 + 扫光 + 像素加载 */
.fs-stage { position: relative; }
.fs-waitfx { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; color: #fff;
  opacity: 0; animation: fs-wait-in .2s ease-out .12s forwards; }
.fs-wait:has(.fs-side) .fs-waitfx { left: 50%; }          /* 并列：只盖右边的效果图 */
.fs-waitfx .pxl { --px: 12px; gap: 3px; padding: 14px; border-radius: 12px; background: rgba(0,0,0,.45); }
.fs-wait .fs-side figure:last-child, .fs-wait .fs-split { position: relative; }
.fs-wait .fs-side figure:last-child img, .fs-wait .fs-img, .fs-wait .fs-split img:first-child { filter: blur(6px) brightness(.85); transition: filter .2s .12s; }
@keyframes fs-wait-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fs-waitfx { animation: fs-wait-in .01s .12s forwards; } }
