@import url('../vendor/fonts/fonts.css?v=13');
@import url('../vendor/fonts/cjk/r1/family/Noto-Serif-SC.css?v=1'); /* 质感层（me / site / design.css）的衬线标题在没有系统宋体的机器上用它（按字分片，只下标题里用到的几片）；@import 只能在最前面，所以放这里一份 */
/* 中文字体的 @font-face 不再整份引（cjk-r1.css 两千多条、gzip 后 400 KB）：public/js/fonts.js 用到哪家才插那一家的 cjk/r1/family/<家族>.css，字再按分片下 */

:root {
  --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 32px;
  --f-xs: 11px; --f-sm: 13px; --f-md: 14px; --f-base: 16px; --f-lg: 20px; --f-xl: 24px; /* 2026-11-05 用户：大部分地方字太小——最小的两档各大一号（以前 10 / 12） */
  --lh-sm: 20px; --lh-md: 24px; --lh-base: 28px;
  /* web-v1.1 的圆角和阴影：卡片 16、控件 10；卡片一种长而软的阴影、悬停深一点、弹窗 / 浮层更深。站内页、编辑器、单独的小页都用这几个，别再写死数值 */
  --r-card: 16px; --r-ctl: 10px;
  --sh-card: 0 1px 2px rgba(27, 26, 25, .04), 0 14px 36px -18px rgba(27, 26, 25, .22);
  --sh-card-hover: 0 2px 6px rgba(27, 26, 25, .06), 0 24px 52px -22px rgba(27, 26, 25, .32);
  --sh-pop: 0 2px 8px rgba(27, 26, 25, .06), 0 32px 72px -28px rgba(27, 26, 25, .42);

  --c-text: #1e2124;
  --c-text-mid: #494a4b;
  --c-text-lite: #6e6e6e; /* 12 px 小字在纸色上要到 4.5:1（#767676 只有 4.39） */
  --c-line: #dfdbd3;
  --c-bg: #f4f1ec;
  --c-panel: #fbfaf7;
  --c-accent: #0e7a5f;     /* 唯一强调色：当前态、可生产 */
  --c-accent-soft: #e3f0eb;
  --c-warn: #a86a12;       /* 提醒 */
  --c-warn-soft: #f6ecd9;
  --c-danger: #d93a32;     /* 只给不能生产的问题 */
  --c-danger-soft: #f9e4e2;

  --r: 4px; --r-pill: 9999px;
  --ease-out: cubic-bezier(.215,.61,.355,1);
  --ease-in: cubic-bezier(.55,.055,.675,.19);
  --ease-mv: cubic-bezier(.645,.045,.355,1);
  --t-fast: 100ms; --t-mid: 250ms;
  --shadow: 0 1px 8px rgba(30,33,36,.10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;

  /* 质感层（me.css「我的」/ site.css 站内页 / design.css 编辑器）共用的一套：墨色、纸色、铜金、衬线、光影。design.css 的纸色、线色略不同，在它自己那层覆盖 */
  --ink: #1b1a19;
  --paper: #f7f4ee;
  --paper-2: #fdfcfa;
  --brass: #9a7b4f;
  --brass-ink: #85683f; /* 铜金当小字用：#9a7b4f 在纸色上只有 3.8:1 */
  --brass-soft: #e9dfcf;
  --line-soft: #e8e3da;
  --serif: "Cormorant Garamond", "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif; /* 中文衬线先用系统自带的，没有的（Windows）才用网络字体 Noto Serif SC（按字分片，排在前面时标题里每个汉字都要各拉一片） */
  --shadow-1: 0 1px 2px rgba(27, 26, 25, .05), 0 8px 24px -12px rgba(27, 26, 25, .18);
  --shadow-2: 0 2px 6px rgba(27, 26, 25, .06), 0 24px 48px -20px rgba(27, 26, 25, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: only light; } /* color-scheme：整站只有浅色一套——不声明的话，手机开着深色模式时不少浏览器（安卓 Chrome 的自动深色、微信、国产浏览器）会自己把页面反成一片发灰的深色（2026-11-14 用户：手机打开非常奇怪）；各页 head 里还有一条同样的 meta */ /* iPhone 横过来时不自动把字放大（排好的版面会被撑乱） */
body { background: var(--c-bg); color: var(--c-text); font: var(--f-md)/var(--lh-md) var(--font); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* —— 按钮三档：实心主按钮 / 描边次按钮 / 文字链 —— */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-panel); white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.btn:hover { border-color: var(--c-text-lite); background: #fff; }
.btn:active { transform: translate3d(0,1px,0); }
a.btn { text-decoration: none; color: var(--c-text); }
a.link { color: var(--c-text-mid); }
a.link:hover { color: var(--c-text); }
.btn.primary { background: var(--c-text); border-color: var(--c-text); color: #fff; font-weight: 500; }
.btn.primary:hover { background: #33373b; }
.btn.primary:disabled { background: #b9b6b0; border-color: #b9b6b0; cursor: not-allowed; }
.btn.small { height: 28px; padding: 0 10px; font-size: var(--f-sm); }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--c-text-mid); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-line); }
.link:hover { color: var(--c-text); text-decoration-color: currentColor; }

/* —— 顶栏 —— */
.top { height: 56px; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s3); border-bottom: 1px solid var(--c-line); background: var(--c-panel); }
.brand { font-weight: 600; font-size: var(--f-base); display: flex; align-items: center; gap: 8px; }
.brand-mark { flex: none; width: 20px; height: 20px; background: url(/assets/pitch/brand/mark.svg?v=2) center/contain no-repeat; }
/* 编辑器左上角是层级：‹ 我的 / 商品 / 方案名 */
.crumb-home { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 10px 0 4px; border-radius: var(--r-pill); color: var(--c-text-mid); text-decoration: none; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.crumb-home:hover { background: var(--c-bg); color: var(--c-text); }
.crumb-home svg { display: block; }
body:not(.page) .top .brand::after { content: '/'; margin-left: 12px; color: var(--c-text-lite); font-weight: 400; }
body:not(.page) .top { gap: 12px; }
.title-input { border: 1px solid transparent; background: transparent; border-radius: var(--r); padding: 4px 8px; width: 220px; color: var(--c-text-mid); }
.title-input:hover { border-color: var(--c-line); }
.title-input:focus { outline: none; border-color: var(--c-text-lite); background: #fff; color: var(--c-text); }
.title-btn { display: none; } /* 手机顶栏的方案名（电脑上是上面那个输入框） */
.spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 2px; background: var(--c-bg); }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: var(--r-pill); color: var(--c-text-mid); transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.seg button:hover { color: var(--c-text); background: rgba(255,255,255,.7); }
.seg button.on { background: var(--c-text); color: #fff; font-weight: 500; }
#inspector .seg { max-width: 100%; }
html[lang="en"] #inspector .seg button { padding: 0 8px; white-space: nowrap; } /* 英文四档（Light Regular Semi Bold）在 1280 宽的右栏里排得下，不把最后一档切在栏外 */
.seg-label { color: var(--c-text-lite); font-size: var(--f-sm); margin-right: 4px; }
.variant-seg button { display: inline-flex; align-items: center; gap: 6px; }
.vsw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); flex: none; }
.lang-seg button { height: 24px; padding: 0 8px; font-size: var(--f-sm); } /* 语言开关：中 / EN */
.check-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-panel); font-weight: 500; }
.check-chip:hover { border-color: var(--c-text-lite); }
.check-chip.ok { color: var(--c-accent); border-color: var(--c-accent); background: var(--c-accent-soft); }
.check-chip.bad { color: var(--c-danger); border-color: var(--c-danger); background: var(--c-danger-soft); }
.check-chip.warn { color: var(--c-warn); border-color: #e2c48f; background: var(--c-warn-soft); }
.check-chip.busy { color: var(--c-text-mid); }

/* —— 三栏 —— */
.app { --left-w: 340px; --right-w: 400px; --viewer-h: 360px; display: grid; grid-template-columns: var(--left-w) minmax(0,1fr) var(--right-w); height: calc(100vh - 56px); }
.app.left-collapsed { --left-w: 0px; }
.app.left-collapsed .left, .app.left-collapsed .left-split { display: none; }
/* 三栏各占各的列：收起对话栏时只空出第一列，画布和右栏不跟着错位 */
.app > .left { grid-column: 1; } .app > .center { grid-column: 2; } .app > .right { grid-column: 3; }
.col-split.left-split { left: -3px; right: auto; }
.left-open { position: absolute; left: 0; top: 50%; z-index: 7; transform: translate3d(0,-50%,0); writing-mode: vertical-rl; letter-spacing: .2em; padding: 14px 6px; border: 1px solid var(--c-line); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--c-panel); color: var(--c-text-mid); box-shadow: var(--shadow); transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.left-open:hover { color: var(--c-text); background: #fff; }
.col-split { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; z-index: 9; cursor: col-resize; }
.col-split::after { content: ''; position: absolute; left: 2px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background var(--t-fast) var(--ease-out); }
.col-split:hover::after, .col-split.drag::after { background: var(--c-accent); }
.viewer-split { position: absolute; left: 0; right: 0; bottom: -4px; height: 8px; z-index: 6; cursor: row-resize; }
.viewer-split::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 40px; height: 3px; margin-left: -20px; border-radius: var(--r-pill); background: var(--c-line); transition: background var(--t-fast) var(--ease-out); }
.viewer-split:hover::after, .viewer-split.drag::after { background: var(--c-accent); }
body.resizing, body.resizing * { user-select: none !important; }
.col { min-height: 0; display: flex; flex-direction: column; }
.left { border-right: 1px solid var(--c-line); background: var(--c-panel); }
.right { border-left: 1px solid var(--c-line); background: var(--c-panel); overflow-y: auto; }
.center { position: relative; overflow: hidden; }

.panel { flex: none; border-bottom: 1px solid var(--c-line); padding: var(--s3); }
.panel-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: var(--s2); }
.panel-hd h3 { margin: 0; font-size: var(--f-md); font-weight: 600; }
.panel-hd .sub { color: var(--c-text-lite); font-size: var(--f-sm); }
.panel-hd .act { margin-left: auto; }

/* —— 对话 —— */
.chat-hd { padding: var(--s3); border-bottom: 1px solid var(--c-line); }
.chat-title { display: flex; align-items: center; gap: 8px; margin: -4px 0 6px; }
.chat-hd h2 { flex: 1; min-width: 0; margin: 0; font-size: var(--f-base); font-weight: 600; }
.scope:empty { display: none; }
.scope { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--f-sm); color: var(--c-text-mid); }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--c-accent-soft); color: var(--c-accent); font-weight: 500; }
.scope-chip button { position: relative; border: 0; background: none; color: inherit; padding: 0; line-height: 1; font-size: var(--f-md); }
.scope-chip button::after { content: ''; position: absolute; inset: -10px -10px -10px -6px; } /* 字只有 9×14 px：点的范围往外扩到 30 px 上下（手机上是回到整体方案的唯一入口） */
.chat-log { flex: 1; overflow-y: auto; padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.msg { max-width: 92%; padding: 8px 12px; border-radius: var(--r); line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; animation: rise var(--t-mid) var(--ease-out); }
.msg.user { align-self: flex-end; background: var(--c-text); color: #fff; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--c-line); }
.msg.ai.err { border-color: #e7c3b5; background: #fdf6f3; } /* 没办成的那条：和正常回复分开 */
.msg.sys { align-self: center; color: var(--c-text-lite); font-size: var(--f-sm); background: none; padding: 0; }
/* 每段对话一个容器；折起来的旧消息、要点卡、「对话 ▾」 */
.thread { display: flex; flex-direction: column; gap: var(--s2); }
.fold { align-self: stretch; border: 1px dashed var(--c-line); border-radius: var(--r); padding: 6px 10px; color: var(--c-text-lite); font-size: var(--f-sm); }
.fold > summary { cursor: pointer; list-style: none; text-align: center; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover { color: var(--c-text); }
.fold[open] { display: flex; flex-direction: column; gap: var(--s2); padding-bottom: 10px; }
.fold[open] > .msg { opacity: .6; }
.memo { align-self: stretch; border: 1px solid var(--c-accent); background: var(--c-accent-soft); border-radius: var(--r); padding: 8px 12px; }
.memo-hd { display: flex; align-items: center; gap: 12px; font-size: var(--f-sm); color: var(--c-accent); font-weight: 500; }
.memo-hd .spacer { flex: 1; }
.memo-hd .link { font-size: var(--f-sm); font-weight: 400; }
.memo-tx { margin-top: 4px; white-space: pre-wrap; line-height: 22px; }
.memo-edit { width: 100%; border: 1px solid var(--c-line); border-radius: var(--r); padding: 8px 10px; line-height: 22px; resize: vertical; background: #fff; }
.msg .meta { display: block; margin-top: 6px; font-size: var(--f-sm); color: var(--c-text-lite); }
.msg .undo { margin-left: 8px; }
.msg .meta .see { margin-top: 8px; } /* 手机：「去改盒面看看 →」，改好的在另一页 */
.msg .job-wait { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--r); color: var(--c-text); } /* 回复完还在画插画：和等待卡一样的一块（呼吸点、几秒、一般多久、停止） */
.job-wait .wait-sec, .job-wait .wait-ft .link { flex: none; white-space: nowrap; } /* 电脑上对话栏窄：几秒、停止不拆成两行 */
body #chatSend.stop { background: var(--c-panel); border-color: var(--c-line); color: var(--c-text); box-shadow: none; } /* 等的时候「发送」变成「不等了」：描边，不再是主按钮 */
/* 等助手：对话里的等待卡 + 画布上方的状态条（只报已等几秒和张数，不做假进度条） */
.msg.wait { min-width: 220px; }
.wait-hd { display: flex; align-items: center; gap: 8px; }
.wait-sec { margin-left: auto; color: var(--c-text-lite); font-size: var(--f-sm); font-variant-numeric: tabular-nums; }
.wait-ft { display: flex; align-items: center; gap: 8px; margin-top: 2px; padding-left: 16px; color: var(--c-text-lite); font-size: var(--f-sm); }
.wait-ft .link { margin-left: auto; }
.wait-dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--c-accent); animation: breathe 1.4s var(--ease-mv) infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: none; } }
.ai-pill { position: absolute; left: 50%; top: 64px; z-index: 6; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 6px 14px; transform: translate3d(-50%, 0, 0); background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--r-pill); box-shadow: var(--shadow); font-size: var(--f-sm); white-space: nowrap; animation: fade var(--t-mid) var(--ease-out); }
.ai-pill .t { flex: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.ai-pill .s { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--c-text-lite); }
.ai-pill .link { flex: none; }
.ai-pill.done { color: var(--c-accent); border-color: var(--c-accent); background: var(--c-accent-soft); }
@media (prefers-reduced-motion: reduce) { .wait-dot { animation: none; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0,6px,0); } to { opacity: 1; transform: none; } }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--s3) var(--s2); } /* 折行摆、每句都露全（以前一行横着滑，最后一句被栏边切掉一半；更早一条一行太占地方）；电脑上再小一号（下面的 @media） */
.suggest::-webkit-scrollbar { display: none; }
.suggest button { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--c-line); background: #fff; border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--f-sm); color: var(--c-text-mid); transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.suggest button:hover { border-color: var(--c-text-lite); color: var(--c-text); }
.chat-input { border-top: 1px solid var(--c-line); padding: var(--s2) var(--s3) var(--s3); }
.chat-input textarea { width: 100%; resize: none; height: 72px; border: 1px solid var(--c-line); border-radius: var(--r); padding: 8px 10px; background: #fff; line-height: 22px; }
.chat-input textarea:focus { outline: none; border-color: var(--c-text-lite); }
.chat-input .row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chat-input .hint { color: var(--c-text-lite); font-size: var(--f-sm); }
/* 输入框：跟着字变高、顶上一条拖高（双击恢复）、右上角放大成大窗口（chat.js） */
.chat-input { position: relative; }
.chat-grip { position: absolute; left: 0; right: 0; top: -5px; height: 10px; cursor: ns-resize; z-index: 2; touch-action: none; }
.chat-grip::after { content: ''; position: absolute; left: 50%; top: 3px; width: 32px; height: 3px; margin-left: -16px; border-radius: 2px; background: var(--c-text-lite); opacity: 0; transition: opacity var(--t-fast) var(--ease-out); }
.chat-input:hover .chat-grip::after, .chat-grip:active::after { opacity: .5; }
.chat-ta { position: relative; }
.chat-input .chat-ta textarea { display: block; padding-right: 34px; }
.chat-big-btn { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r); background: rgba(255,255,255,.85); color: var(--c-text-lite); cursor: pointer; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.chat-big-btn:hover { background: rgba(30,33,36,.08); color: var(--c-text); }
.big-tip { display: none; color: var(--c-text-lite); font-size: var(--f-sm); white-space: nowrap; }
.chat-input.big { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(880px, calc(100vw - 32px)); height: min(78vh, 720px); display: flex; flex-direction: column; transform: translate3d(-50%, -50%, 0); padding: var(--s3); background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: 0 24px 64px rgba(20,22,24,.22); animation: fade var(--t-mid) var(--ease-out); }
.chat-input.big .chat-grip { display: none; }
.chat-input.big .chat-ta { flex: 1; min-height: 0; display: flex; }
.chat-input.big .chat-ta textarea { flex: 1; height: auto; }
.chat-input.big .big-tip { display: inline; }
.chat-big-mask { position: fixed; inset: 0; z-index: 89; background: rgba(20,22,24,.32); }
/* 在气泡里改自己说过的话（chat.js editInline）；用户的话上面一行小字：当时在改什么 */
.msg-on { display: block; margin-bottom: 2px; font-size: var(--f-sm); color: rgba(255,255,255,.62); }
.msg.user.editing { align-self: stretch; max-width: 100%; background: #fff; color: var(--c-text); border: 1px solid var(--c-text-lite); }
.msg.user.editing .msg-on { color: var(--c-text-lite); }
.msg.user.editing .msg-atts img { border-color: var(--c-line); cursor: default; }
.msg.user.editing .msg-atts { flex-wrap: wrap; }
.msg.user.editing .msg-atts[hidden] { display: none; }
.msg-att { position: relative; display: inline-flex; }
.msg-att.up { width: 56px; height: 56px; align-items: center; justify-content: center; border: 1px dashed var(--c-line); border-radius: var(--r); color: var(--c-text-lite); font-size: var(--f-xs); }
.msg-att button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: #fff; color: var(--c-text-mid); font-size: 14px; line-height: 18px; cursor: pointer; }
.msg-att button:hover { color: var(--c-text); border-color: var(--c-text-lite); }
.msg-edit { display: block; width: 100%; padding: 0; border: 0; resize: none; background: none; color: inherit; font: inherit; line-height: 22px; }
.msg-edit:focus { outline: none; }
.msg-edit-ft { display: flex; align-items: center; gap: 8px; margin-top: 8px; white-space: normal; }
.msg-edit-tip { flex: 1; min-width: 0; color: var(--c-text-lite); font-size: var(--f-sm); }

/* —— 中间画布 —— */
.toolbar { position: absolute; left: 50%; top: var(--s3); transform: translateX(-50%); z-index: 5; display: flex; gap: 4px; padding: 4px; background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--r-pill); box-shadow: var(--shadow); }
.toolbar .btn { border-color: transparent; background: none; }
.toolbar .btn:hover { background: var(--c-bg); }
.toolbar .sep { width: 1px; background: var(--c-line); margin: 4px 2px; }
.facebar { position: absolute; left: var(--s3); bottom: var(--s3); z-index: 5; display: flex; gap: 8px; align-items: center; }
.zoombar { position: absolute; right: var(--s3); bottom: var(--s3); z-index: 5; display: flex; gap: 6px; align-items: center; color: var(--c-text-mid); font-size: var(--f-sm); }
#zoomPct { padding: 2px 6px; border-radius: var(--r-pill); background: rgba(252, 251, 248, .88); } /* 杯子的深色玻璃底上也看得清（以前百分比直接落在深色上） */
.canvas-wrap { position: absolute; inset: 0; }
/* 图例：画布底部那一行（面切换和缩放之间），不压在设计上；放不下就藏起来，点缩放比例的菜单里有 */
.legend { position: absolute; right: 140px; bottom: 24px; z-index: 5; pointer-events: none; font-size: var(--f-sm); line-height: 20px; color: var(--c-text-mid); display: flex; gap: 12px; white-space: nowrap; }
.legend i, .menu-legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.menu-legend { display: flex; flex-direction: column; padding: 4px 10px 6px; font-size: var(--f-sm); line-height: 20px; color: var(--c-text-mid); }
.dropzone { position: absolute; inset: 0; z-index: 20; display: none; pointer-events: none; background: rgba(14,122,95,.05); border: 2px dashed var(--c-accent); }
.dropzone.on { display: block; }
.droplabel { position: fixed; z-index: 70; pointer-events: none; transform: translate3d(14px, 14px, 0); background: var(--c-accent); color: #fff; font-weight: 500; font-size: var(--f-md); padding: 6px 14px; border-radius: var(--r-pill); box-shadow: var(--shadow); white-space: nowrap; }
body.dragging-file .viewer { box-shadow: inset 0 0 0 2px var(--c-accent); }
.ctxmenu { position: fixed; z-index: 70; min-width: 180px; background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: 0 6px 24px rgba(30,33,36,.16); padding: 4px; animation: fade var(--t-mid) var(--ease-out); }
.ctxmenu button { display: flex; width: 100%; justify-content: space-between; gap: 16px; border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: var(--r); color: var(--c-text); }
.ctxmenu button:hover { background: var(--c-bg); }
.ctxmenu button .k { color: var(--c-text-lite); font-size: var(--f-sm); }
.ctxmenu { max-height: calc(100vh - 16px); overflow-y: auto; }
.menu-scrim { display: none; } /* 长菜单（字体列表）在矮屏上能滚 */
.font-pick { max-width: 100%; font-size: var(--f-md); }
.font-note { margin-top: 4px; line-height: 1.6; }
.ctxmenu button.danger { color: var(--c-danger); }
.ctxmenu button.danger:hover { background: var(--c-danger-soft); }
.ctxmenu hr { border: 0; border-top: 1px solid var(--c-line); margin: 4px 0; }
.ctxmenu .menu-label { padding: 4px 10px 2px; color: var(--c-text-lite); font-size: var(--f-sm); } /* 菜单里一组的小标题（「编辑图片」里的滤镜），点不了 */
.tour { position: fixed; inset: 0; z-index: 80; }
.tour-hole { position: fixed; border-radius: var(--r); box-shadow: 0 0 0 9999px rgba(30,33,36,.55); transition: all var(--t-mid) var(--ease-mv); pointer-events: none; }
.tour-card { position: fixed; width: 320px; background: var(--c-panel); border-radius: var(--r); box-shadow: 0 8px 40px rgba(30,33,36,.3); padding: 16px; transition: all var(--t-mid) var(--ease-mv); }
.tour-card h3 { margin: 0 0 6px; font-size: var(--f-base); font-weight: 600; }
.tour-card p { margin: 0; color: var(--c-text-mid); line-height: 22px; }
.tour-card .row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tour-card .dots { color: var(--c-text-lite); font-size: var(--f-sm); }

/* —— 3D —— */
.viewer { flex: none; position: relative; height: var(--viewer-h); border-bottom: 1px solid var(--c-line); background: #c4c0b9; } /* 和 3D 的中灰影棚同色：第一帧画出来之前不闪一下米色 */
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer-ctl { position: absolute; left: var(--s2); right: var(--s2); bottom: var(--s2); display: flex; gap: 6px; align-items: center; }
.viewer-ctl .btn { background: rgba(251,250,247,.92); }
.viewer-tools { position: absolute; right: var(--s2); top: var(--s2); display: flex; gap: 6px; }
.viewer-tools .btn { background: rgba(251,250,247,.92); }
.viewer-badge:empty { display: none; }
.viewer-badge { position: absolute; left: var(--s2); top: var(--s2); font-size: var(--f-sm); color: var(--c-text-mid); background: rgba(251,250,247,.92); border-radius: var(--r-pill); padding: 2px 10px; }
.viewer.dark-stage .viewer-badge { background: rgba(19,22,24,.6); color: rgba(255,255,255,.78); } /* 深色影棚（透明玻璃）上的提示 */
.viewer.full { position: fixed; inset: 56px 0 0 0; height: auto; z-index: 30; }
/* 3D 拿出来：浮在画布上的小窗（只有电脑上），拖顶上那条挪位置、拖四边四角改大小；位置大小由 layout.js 写进 --fx / --fy / --fw / --fh */
.viewer-grip, .viewer-rs { display: none; }
@media (min-width: 1001px), (min-width: 901px) and (min-height: 501px) {
  /* 电脑上建议句小一号、挤一点，四句最多三行 */
  .suggest { gap: 6px; }
  .suggest button { height: 26px; padding: 0 10px; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .viewer-ctl { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; } /* 右栏窄、按钮多（英文的杯子）：视角那几个折到下一行，不挤出框外 */
  .viewer.float { position: fixed; left: var(--fx); top: var(--fy); width: var(--fw); height: var(--fh); z-index: 25; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; box-shadow: 0 16px 48px rgba(30,33,36,.22), 0 2px 6px rgba(30,33,36,.08); animation: fade var(--t-mid) var(--ease-out); }
  .viewer.float .viewer-split, .viewer.float .viewer-badge { display: none; }
  .viewer.float .viewer-grip { display: flex; align-items: center; gap: 8px; position: absolute; left: 0; right: 0; top: 0; height: 44px; padding: 0 12px; z-index: 1; cursor: grab; touch-action: none; user-select: none; font-size: var(--f-sm); font-weight: 500; color: var(--c-text-mid); background: linear-gradient(rgba(251,250,247,.94), rgba(251,250,247,0)); }
  .viewer-grip::before { content: ''; width: 9px; height: 14px; opacity: .55; background: radial-gradient(circle, currentColor 1.1px, transparent 1.6px) 0 0 / 4.5px 4.67px; } /* 六个点：能抓着拖 */
  .viewer.float .viewer-grip.drag { cursor: grabbing; }
  .viewer.dark-stage .viewer-grip { color: rgba(255,255,255,.8); background: linear-gradient(rgba(19,22,24,.72), rgba(19,22,24,0)); }
  .viewer.float .viewer-tools { z-index: 2; }
  .viewer.float .viewer-rs { display: block; position: absolute; z-index: 3; touch-action: none; }
  .viewer-rs[data-d="n"] { top: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
  .viewer-rs[data-d="s"] { bottom: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
  .viewer-rs[data-d="e"] { right: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
  .viewer-rs[data-d="w"] { left: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
  .viewer-rs[data-d="nw"] { left: 0; top: 0; width: 12px; height: 12px; cursor: nwse-resize; }
  .viewer-rs[data-d="se"] { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
  .viewer-rs[data-d="ne"] { right: 0; top: 0; width: 12px; height: 12px; cursor: nesw-resize; }
  .viewer-rs[data-d="sw"] { left: 0; bottom: 0; width: 12px; height: 12px; cursor: nesw-resize; }
  .viewer-rs[data-d="se"]::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px; opacity: .45; background: linear-gradient(135deg, transparent 45%, var(--c-text-mid) 45%, var(--c-text-mid) 55%, transparent 55%, transparent 70%, var(--c-text-mid) 70%, var(--c-text-mid) 80%, transparent 80%); } /* 右下角的斜线：能拉 */
  .viewer.dark-stage .viewer-rs[data-d="se"]::after { filter: invert(1); }
  .right.dock-hint { box-shadow: inset 0 0 0 2px var(--c-accent); } /* 浮窗拖到右栏上：松手就放回去 */
  .viewer.float.full { inset: 56px 0 0 0; width: auto; height: auto; border: 0; border-radius: 0; }
  .viewer.float.full .viewer-grip, .viewer.float.full .viewer-rs { display: none; }
}

/* —— 属性 —— */
.field { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; gap: 8px; margin-bottom: 10px; }
.field > label { color: var(--c-text-mid); font-size: var(--f-sm); }
/* 输入框：32 px 高；悬停边线加深、聚焦再加一圈淡光晕（以前只有一条细线，点进去几乎看不出变化）；下拉是自己画的小箭头，不用系统的 */
.field input[type=text], .field input[type=number], .field select, .field textarea { width: 100%; height: 32px; border: 1px solid var(--c-line); border-radius: var(--r); padding: 0 10px; background: #fff; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.field textarea { height: 72px; padding: 8px 10px; resize: vertical; line-height: 20px; }
.field input[type=text]:hover, .field input[type=number]:hover, .field select:hover, .field textarea:hover { border-color: #c9c2b7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-text-lite); box-shadow: 0 0 0 3px rgba(30, 33, 36, .07); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 28px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23767676' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center / 12px; }
/* 数字格（属性面板「位置与大小」）：字母和单位都在框里——「X 12.5 mm」，数字右对齐、等宽数字、没有上下箭头 */
.nboxes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.nboxes.with-link { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px; }
.nbox { display: flex; align-items: center; gap: 6px; height: 32px; min-width: 0; padding: 0 10px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; cursor: text; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.nbox:hover { border-color: #c9c2b7; }
.nbox:focus-within { border-color: var(--c-text-lite); box-shadow: 0 0 0 3px rgba(30, 33, 36, .07); }
.nbox .pre, .nbox .unit { flex: none; color: var(--c-text-lite); font-size: var(--f-sm); }
.field .nbox input.num-in { flex: 1; width: 100%; min-width: 0; height: 30px; padding: 0; border: 0; background: none; box-shadow: none; text-align: right; -moz-appearance: textfield; }
.nbox input.num-in::-webkit-inner-spin-button, .nbox input.num-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.nbox-angle { width: 88px; }
.btn.link-ratio { width: 28px; height: 28px; border-color: transparent; background: none; color: var(--c-text-lite); }
.btn.link-ratio:hover { background: var(--c-bg); color: var(--c-text); }
.btn.link-ratio.on { color: var(--c-text); background: var(--c-bg); }
.btn.link-ratio .ti, .btn.link-ratio .ti svg { width: 16px; height: 16px; }
.field input[type=range] { width: 100%; accent-color: var(--c-text); }
.field .inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* 排版小样（panels/layouts.js）：这一面换个排法，每个画成这一面的小样；现在用的设计稿描边 + ✓。--ar = 这一面的高 / 宽 */
.lay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.lay { position: relative; display: block; width: 100%; aspect-ratio: 1 / var(--ar, 1); padding: 3px; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-panel); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.lay:hover { border-color: var(--c-text-lite); }
.lay:active { transform: translate3d(0, 1px, 0); }
.lay.on { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.lay-svg, .lay-svg svg { display: block; width: 100%; height: 100%; }
.lay-svg:empty { background: var(--c-bg); } /* 还在算：先占个位 */
.lay-on { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: var(--r-pill); background: var(--c-accent); color: #fff; font-size: var(--f-xs); line-height: 16px; text-align: center; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 22px; height: 22px; border-radius: var(--r-pill); border: 1px solid rgba(0,0,0,.15); cursor: pointer; position: relative; transition: transform var(--t-fast) var(--ease-out); }
.sw:hover { transform: scale(1.12); }
.sw.on { outline: 2px solid var(--c-text); outline-offset: 2px; }
.sw.disabled { opacity: .25; cursor: not-allowed; }
.sw-custom { overflow: hidden; background: conic-gradient(#e5484d, #f2b33d, #46a758, #0e7a5f, #3e63dd, #8e4ec6, #e5484d); }
.sw-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.field .inline > select { flex: 1 1 80px; width: auto; min-width: 0; }
input[type=color] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--c-line); border-radius: var(--r); background: none; cursor: pointer; }
.tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; } /* minmax(0)：英文长名字不把两列撑出右栏 */
.tools .btn { justify-content: flex-start; min-width: 0; }
.tools .btn .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* 放不下的名字出省略号，悬停看全名（title） */
.empty { color: var(--c-text-lite); font-size: var(--f-sm); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.thumb { border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; padding: 0; overflow: hidden; aspect-ratio: 1; position: relative; transition: border-color var(--t-fast) var(--ease-out); }
.thumb:hover { border-color: var(--c-text-lite); }
.thumb.on { border: 2px solid var(--c-text); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; font-size: var(--f-xs); line-height: 16px; background: rgba(251,250,247,.92); text-align: center; }

/* —— 盒内物品 —— */
.items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.item-card { border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; padding: 0; overflow: hidden; text-align: left; position: relative; transition: border-color var(--t-fast) var(--ease-out); }
.item-card:hover { border-color: var(--c-text-lite); }
.item-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.item-card .nm { display: block; font-size: var(--f-xs); line-height: 14px; padding: 4px 4px 5px; }
.item-card .qty { position: absolute; right: 4px; top: 4px; min-width: 18px; height: 18px; border-radius: var(--r-pill); background: var(--c-text); color: #fff; font-size: var(--f-xs); line-height: 18px; text-align: center; padding: 0 4px; }
.item-card.on { border: 2px solid var(--c-text); }
.picked { margin-top: var(--s2); display: flex; flex-direction: column; gap: 6px; }
.picked-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; }
.picked-row .nm { font-weight: 500; }
.picked-row .dim { color: var(--c-text-lite); font-size: var(--f-sm); }
.picked-row .colors { grid-column: 1 / -1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: var(--r-pill); }
.stepper button { width: 26px; height: 24px; border: 0; background: none; }
.stepper button:hover { background: var(--c-bg); border-radius: var(--r-pill); }
.stepper span { min-width: 18px; text-align: center; font-size: var(--f-sm); }
.est { font-size: 12px; color: var(--c-warn); border: 1px solid #e2c48f; border-radius: var(--r-pill); padding: 0 6px; margin-left: 4px; }
.src-tag { font-size: var(--f-xs); color: var(--c-text-lite); border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 0 6px; margin-left: 4px; }
.item-card .dm { display: block; font-size: var(--f-sm); line-height: 16px; padding: 0 4px 5px; margin-top: -3px; color: var(--c-text-mid); font-variant-numeric: tabular-nums; } /* 平放尺寸：看得清，好和盒内尺寸比 */
.item-card .nofit { position: absolute; left: 4px; top: 4px; padding: 0 6px; border-radius: var(--r-pill); background: var(--c-danger); color: #fff; font-size: var(--f-xs); line-height: 18px; }
/* 装得多满：盒内尺寸 / 放了几件 / 最高的离盒顶还剩多少 */
.fill-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin-top: var(--s2); padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; font-size: var(--f-sm); }
.fill-sum .k { color: var(--c-text-lite); }
.fill-sum .v { font-variant-numeric: tabular-nums; }
.fill-sum .v.bad { color: var(--c-danger); }
.fill-sum .v.warn { color: var(--c-warn); } /* 放不下是按照片估的尺寸算的：和校验一样只是提醒 */
/* 帮我挑礼物 */
.gift-entry { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s2); }
.gift-box { border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; padding: 10px; margin-bottom: var(--s2); display: flex; flex-direction: column; gap: 8px; }
.gift-hd { display: flex; align-items: center; justify-content: space-between; }
.gift-ask { display: flex; gap: 6px; }
.gift-in { flex: 1; min-width: 0; height: 28px; border: 1px solid var(--c-line); border-radius: var(--r); padding: 0 8px; background: #fff; }
.gift-in:focus { outline: none; border-color: var(--c-text-lite); }
.gift-wait { display: flex; align-items: center; justify-content: space-between; font-size: var(--f-sm); color: var(--c-text-mid); }
.gift-src { font-size: var(--f-sm); color: var(--c-text-mid); line-height: 20px; }
.gift-card { border: 1px solid var(--c-line); border-radius: var(--r); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; transition: border-color var(--t-fast) var(--ease-out); }
.gift-card:hover { border-color: var(--c-text-lite); }
.gift-top { display: flex; align-items: baseline; gap: 8px; width: 100%; }
.gift-fit { margin-left: auto; font-size: var(--f-xs); white-space: nowrap; }
.gift-fit.ok { color: var(--c-accent); }
.gift-fit.bad { color: var(--c-warn); }
.gift-items { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--f-sm); }
.gift-it { display: inline-flex; align-items: center; gap: 4px; }
.gift-it img { width: 24px; height: 24px; border-radius: var(--r); object-fit: cover; }
.gift-it .dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.gift-why { font-size: var(--f-sm); color: var(--c-text-mid); line-height: 20px; }

/* —— 校验 —— */
.issues { display: flex; flex-direction: column; gap: 6px; }
.issue { border: 1px solid var(--c-line); border-left-width: 3px; border-radius: var(--r); padding: 8px 10px; background: #fff; cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.issue:hover { background: var(--c-panel); }
.issue.error { border-left-color: var(--c-danger); }
.issue.warn { border-left-color: var(--c-warn); }
.issue.busy { border-left-color: var(--c-text-lite); }
.issue .t { font-weight: 500; }
.issue.error .t { color: var(--c-danger); }
.issue .w { color: var(--c-text-mid); font-size: var(--f-sm); line-height: 20px; margin-top: 2px; }
.issue .row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.allgood { display: flex; align-items: center; gap: 8px; color: var(--c-accent); font-weight: 500; }
details.fold summary { cursor: pointer; color: var(--c-text-mid); font-size: var(--f-sm); }
details.fold summary:hover { color: var(--c-text); }
details.fold .body { font-size: var(--f-sm); color: var(--c-text-mid); line-height: 20px; margin-top: 6px; }

/* —— 弹窗 —— */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(30,33,36,.35); display: flex; align-items: center; justify-content: center; animation: fade var(--t-mid) var(--ease-out); }
.modal { background: var(--c-panel); border-radius: var(--r); box-shadow: 0 8px 40px rgba(30,33,36,.25); width: min(1100px, 94vw); height: min(760px, 92vh); display: flex; flex-direction: column; overflow: hidden; }
.modal-hd { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--c-line); }
.modal-hd h3 { margin: 0; font-size: var(--f-base); font-weight: 600; }
/* 标题一行写完；说明小字放右边、竖线隔开（以前说明一长就把标题挤成两行）。编辑器、站内页同一条；手机上标题可以两行（下面 ≤900 那段） */
.modal-hd h3 { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-hd h3 + .empty { flex: 1 1 0; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line-soft); font-size: 14px; line-height: 20px; }
/* 弹窗 web-v1.1：编辑器和顾客页同一套（工厂端 body.fx 不跟，它是密集的工作台）——圆角 20、长而软的阴影、标题衬线 26；
   正文 dlg-body 和标题左右对齐；内容比窗口高时正文自己滚，底部按钮一直在；弹窗里的分区小标题衬线；输入框 44 高 */
body:not(.fx) .modal { background: var(--paper-2); border-radius: 20px; box-shadow: var(--sh-pop); }
body:not(.fx) .modal-hd { padding: 22px 28px 18px; border-color: var(--line-soft); }
body:not(.fx) .modal-hd h3 { font: 600 26px/1.25 var(--serif); letter-spacing: .02em; color: var(--ink); }
body:not(.fx) .modal-hd .btn.icon { width: 36px; height: 36px; border-radius: 50%; }
body:not(.fx) .modal-ft { padding: 18px 28px 22px; gap: 10px; border-color: var(--line-soft); }
body:not(.fx) .modal-bd { overflow: auto; }
body:not(.fx) .dlg-body { padding: 20px 28px; line-height: 1.7; }
body:not(.fx) .modal .sec-hd { margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--line-soft); font: 500 17px/1.4 var(--serif); letter-spacing: .02em; color: var(--ink); }
body:not(.fx) .modal .name-input { height: 44px; padding: 0 14px; border-color: var(--line-soft); border-radius: var(--r-ctl); font-size: 15px; }
body:not(.fx) .modal textarea.name-input { height: auto; padding: 10px 14px; }
.modal-bd { flex: 1; min-height: 0; position: relative; }
/* 普通弹窗的正文（表单、说明）：内边距跟着各页面样式层的标题对齐，这里是默认 */
.dlg-body { padding: var(--s3); }
/* 确认框里的危险操作（删掉、清空……）：实心、收敛的深红，一眼看得出是这一步、又不刺眼（以前和「取消」长得一样，弹窗里没有主按钮） */
.modal-ft .btn.danger-text { border-color: #a8322b; background: #a8322b; color: #fff; }
.modal-ft .btn.danger-text:hover { border-color: #8f2a24; background: #8f2a24; }
.modal-ft { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-top: 1px solid var(--c-line); } /* 按钮多（加形状有 6 个）时换行：手机上以前最后一个被裁到弹窗外点不到 */
.modal-ft:empty { display: none; } /* 没有按钮的弹窗（我的方案）不留一条空脚 */

/* —— 下单窗（editor/review.js）：左边成品效果图、右边规格 / 数量 / 价格；印刷稿收在「印刷稿」里。下完单那一下是 .ord-done —— */
.modal.ord-modal { width: min(920px, 94vw); height: auto; max-height: 90vh; }
.ord-modal .modal-bd { padding: 0; overflow: auto; }
.ord { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 100%; }
.ord-view { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--paper); border-right: 1px solid var(--line-soft); min-width: 0; }
.ord-stage { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--r); background: #ebe7e0; }
.ord-stage > img, .ord-stage > canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.ord-stage.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); align-content: start; gap: 12px; padding: 12px; overflow: auto; background: var(--paper-2); border: 1px solid var(--line-soft); }
.ord-file { margin: 0; min-width: 0; }
.ord-stage.files.one { display: flex; }
.ord-stage.files.one .ord-file { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ord-stage.files.one .ord-file > div { flex: 1; min-height: 0; aspect-ratio: auto; }
.ord-file > div { aspect-ratio: 1; display: flex; padding: 8px; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; }
.ord-file.clear > div { background: repeating-conic-gradient(#ece9e4 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.ord-file canvas { display: block; max-width: 100%; max-height: 100%; margin: auto; }
.ord-file figcaption { margin-top: 6px; font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ord-view-ft { display: flex; align-items: center; gap: 12px; font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ord-lock { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; }
.ord-ic { display: inline-flex; flex: none; }
.ord-files-btn { flex: none; padding: 4px 0; border: 0; background: none; font: inherit; color: var(--c-text-mid); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-soft); text-underline-offset: 3px; transition: color var(--t-fast) var(--ease-out), text-decoration-color var(--t-fast) var(--ease-out); }
.ord-files-btn:hover { color: var(--ink); text-decoration-color: currentColor; }
.ord-sum { display: flex; flex-direction: column; gap: 20px; padding: 24px; min-width: 0; }
.ord-eyebrow { font-size: var(--f-sm); line-height: 16px; letter-spacing: .08em; color: var(--brass-ink); }
.ord-title { margin: 4px 0 0; font: 500 22px/28px var(--serif); letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; }
.ord-specs { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: var(--f-md); line-height: 20px; }
.ord-specs dt { color: var(--c-text-lite); }
.ord-specs dt[data-ic]::before, .ord-qty-row > span[data-ic]::before, .ord-sec-hd > span[data-ic]::before { opacity: .55; }
.ord-specs { grid-template-columns: max-content minmax(0, 1fr); } /* 名字前多了图标：这一列按字宽，不折成「规 / 格」 */
.ord-specs dt, .ord-qty-row > span[data-ic], .ord-sec-hd > span[data-ic] { white-space: nowrap; }
.ord-qty-row > span[data-ic] { display: grid; grid-template-columns: 24px auto; align-items: center; } /* 图标一列，「数量」和「几件起订」叠在右边 */
.ord-qty-row > span[data-ic]::before { grid-row: 1 / span 2; margin: 0; }
.ord-specs dd { margin: 0; color: var(--ink); }
.ord-specs:empty { display: none; }
.ord-sec { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.ord-sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink); }
.ord-sec-hd small { font-size: var(--f-sm); color: var(--c-text-lite); }
.ord-step { flex: none; display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: #fff; transition: border-color var(--t-fast) var(--ease-out); }
.ord-step:focus-within { border-color: var(--ink); }
.ord-step button { width: 40px; height: 38px; border: 0; border-radius: var(--r-pill); background: none; font-size: var(--f-base); color: var(--c-text-mid); cursor: pointer; transition: color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.ord-step button:hover:not(:disabled) { color: var(--ink); background: var(--paper); }
.ord-step button:disabled { opacity: .3; cursor: default; }
.ord-step input { width: 56px; height: 38px; padding: 0; border: 0; background: none; text-align: center; font: 500 var(--f-base)/1 var(--font); color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.ord-step input:focus, .ord-step input:focus-visible { outline: none; box-shadow: none; border-color: transparent; } /* 焦点看外面那圈（:focus-within 描黑），数字框自己不再套一个方框（「我的」多选下单里也是） */
.ord-step input::-webkit-inner-spin-button, .ord-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ord-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); }
.ord-qty-row > span { display: grid; gap: 2px; }
.ord-qty-row small { font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ord-sizes { display: grid; gap: 12px; }
.ord-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ord-chip { min-width: 48px; height: 36px; padding: 0 12px; border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: #fff; font: inherit; color: var(--c-text-mid); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.ord-chip:hover { border-color: var(--c-text-lite); color: var(--ink); }
.ord-chip.on { border-color: var(--ink); background: var(--ink); color: #f7f3ec; }
.ord-rows { display: grid; gap: 8px; }
.ord-rows:empty { display: none; }
.ord-rows .ord-qty-row { padding: 4px 0 4px 4px; animation: ordIn 200ms var(--ease-out); }
.ord-rows .ord-step { height: 36px; }
.ord-rows .ord-step button, .ord-rows .ord-step input { height: 34px; }
@keyframes ordIn { from { opacity: 0; transform: translate3d(0, -4px, 0); } }
.ord-tiers { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.ord-tier { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--r); background: none; font: inherit; text-align: left; color: var(--c-text-mid); transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
button.ord-tier { cursor: pointer; }
button.ord-tier:hover { border-color: var(--c-text-lite); }
.ord-tier small { font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ord-tier b { font-weight: 500; font-size: var(--f-md); line-height: 20px; white-space: nowrap; }
.ord-tier.on { border-color: var(--ink); background: #fff; color: var(--ink); }
.ord-err { font-size: var(--f-sm); line-height: 16px; color: var(--c-warn); }
.ord-err:empty { display: none; }
.ord-err.shake { animation: ordShake 300ms var(--ease-mv); }
@keyframes ordShake { 25% { transform: translate3d(-4px, 0, 0); } 75% { transform: translate3d(4px, 0, 0); } }
/* 再多几件就到下一档：一条铜金浅底的小签，右边「加到 n 件」一点就改件数 */
.ord-more:empty { display: none; }
.ord-more { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(154, 123, 79, .1); color: var(--brass-ink); font-size: var(--f-md); line-height: 20px; }
.ord-more .link { flex: none; color: var(--ink); font-weight: 500; }
.ord-saved > span:last-child { color: var(--brass-ink); font-weight: 500; }
.ord-bill { display: grid; gap: 8px; font-size: var(--f-md); line-height: 20px; }
.ord-bill > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ord-bill > div > span:first-child { color: var(--c-text-mid); }
.ord-off { margin-right: 8px; font-style: normal; font-size: var(--f-sm); color: var(--brass-ink); }
.ord-total { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--ink); }
.ord-total > span:first-child { color: var(--ink) !important; }
.ord-total b { font: 500 28px/32px var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); white-space: nowrap; }
.ord-warn { font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ord-warn summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; transition: color var(--t-fast) var(--ease-out); }
.ord-warn summary::-webkit-details-marker { display: none; }
.ord-warn summary::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-warn); }
.ord-warn summary:hover { color: var(--ink); }
.ord-warn ul { margin: 8px 0 0; padding-left: 18px; color: var(--c-text-mid); }
.ord-again { margin-top: auto; padding: 10px 12px; border-radius: var(--r); background: var(--c-warn-soft); color: var(--c-warn); font-size: var(--f-sm); line-height: 18px; }
.ord-again .link { color: inherit; }
.ord-again + .ord-acts { margin-top: 0; }
.ord-acts { margin-top: auto; display: grid; gap: 8px; padding-top: 4px; }
.ord-acts > .btn { justify-content: center; height: 44px; font-size: var(--f-md); }
.ord-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; }
.modal .btn.quiet, .modal .btn.quiet:hover { height: 32px; padding: 0 4px; border-color: transparent; background: transparent; color: var(--c-text-mid); }
.modal .btn.quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ord-modal .modal-ft { display: none; }
.ord-done .modal-ft { padding: 12px 24px; }
.modal.ord-done { width: min(440px, 94vw); height: auto; }
.ord-done .modal-hd { display: none; }
.ord-done .modal-bd { padding: 36px 28px 8px; text-align: center; }
.ord-x { position: absolute; top: 12px; right: 12px; }
.ord-done-ic { width: 52px; height: 52px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent); animation: ordPop 300ms var(--ease-out); }
.ord-done-ic svg { width: 26px; height: 26px; }
@keyframes ordPop { from { opacity: 0; transform: scale(.6); } }
.ord-done h2 { margin: 0; font: 500 24px/32px var(--serif); letter-spacing: .02em; color: var(--ink); }
.ord-done-id { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: var(--f-sm); color: var(--c-text-lite); font-variant-numeric: tabular-nums; }
.ord-copy { padding: 0; border: 0; background: none; font: inherit; color: var(--c-text-mid); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-soft); text-underline-offset: 3px; }
.ord-copy:hover { color: var(--ink); text-decoration-color: currentColor; }
.ord-line { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; text-align: left; }
.ord-line img, .ord-line .ph { flex: none; width: 56px; height: 56px; border-radius: var(--r); object-fit: cover; background: #ebe7e0; }
.ord-line .tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ord-line b { overflow: hidden; font-weight: 500; font-size: var(--f-md); line-height: 20px; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.ord-line small { font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ord-done-note { margin-top: 12px; font-size: var(--f-sm); color: var(--c-text-lite); white-space: pre-line; } /* 车里几样 · 合计，下一行还差多少免运费 */
.ord-done-admin { margin-top: 12px; display: flex; justify-content: center; gap: 16px; font-size: var(--f-sm); }
.ord-done .modal-ft { justify-content: center; border-top: 0; padding-bottom: 24px; }
.ord-done .modal-ft .spacer { display: none; }
.ord-addr { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; font: inherit; text-align: left; color: var(--c-text-mid); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out); }
.ord-addr:hover { border-color: var(--ink); }
.ord-addr b { display: flex; gap: 8px; align-items: baseline; font-weight: 500; font-size: var(--f-md); color: var(--ink); }
.ord-addr b small { font-weight: 400; font-size: var(--f-sm); color: var(--c-text-lite); }
.ord-addr span { font-size: var(--f-sm); line-height: 18px; }
.ord-addr.add { place-items: center; height: 44px; border-style: dashed; color: var(--c-text-mid); }
/* —— 收货信息表单（addresses.js 的 addressForm / pickAddress）：粘贴一整段自动识别、澳洲地址补全、挑地址的卡片 —— */
.ad-form { display: grid; gap: 14px; }
.ad-paste-box { display: grid; gap: 6px; }
.ad-paste { width: 100%; min-height: 64px; padding: 12px 14px; border-radius: 12px; line-height: 22px; font-size: 14px; resize: vertical; border-style: dashed !important; background: var(--paper-2, #fdfcfa); }
.ad-note { font-size: var(--f-sm); line-height: 16px; color: var(--c-text-lite); }
.ad-note:empty { display: none; }
.ad-host { position: relative; }
.ad-sug { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin-top: 4px; padding: 4px; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-2, 0 8px 24px rgba(0,0,0,.12)); }
.ad-sug[hidden] { display: none; }
.ad-opt { display: grid; gap: 1px; padding: 6px 8px; border-radius: var(--r); cursor: pointer; letter-spacing: 0; }
.ad-opt b { font-weight: 500; font-size: var(--f-md); color: var(--ink); }
.ad-opt span { font-size: var(--f-sm); color: var(--c-text-lite); }
.ad-opt:hover, .ad-opt.on { background: var(--paper); }
.ad-filled { animation: adFill 900ms var(--ease-out); }
@keyframes adFill { from { background: var(--c-accent-soft); } }
.ad-pick { display: grid; gap: 14px; padding: 16px; }
.ad-cards { display: grid; gap: 8px; }
.ad-card { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--r); background: #fff; font: inherit; text-align: left; color: var(--c-text-mid); font-size: var(--f-sm); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out); }
.ad-card:hover { border-color: var(--c-text-lite); }
.ad-card.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ad-card b { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: var(--f-md); color: var(--ink); }
.ad-card small { color: var(--c-text-lite); }
.ad-new { justify-self: start; }
/* 编辑器里没有 shop.css：下单窗挑地址时，表单的几格照结算页的样子 */
.ad-pick .co-form { display: grid; gap: 14px; align-content: start; }
.ad-pick .co-field { display: grid; gap: 6px; font-size: 13px; color: var(--c-text-lite); letter-spacing: .02em; }
.ad-pick .co-field .name-input { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 15px; color: var(--ink); background: #fff; }
.ad-pick .co-field .name-input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(27, 26, 25, .06); outline: none; }
.ad-pick .ab-form-acts .btn { height: 40px; padding: 0 20px; }
.ad-pick { padding: 20px 24px; gap: 16px; }
.ad-pick .co-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ad-pick .co-row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.ad-pick .co-err { padding: 10px 12px; border-radius: var(--r); background: var(--c-warn-soft); color: var(--c-warn); font-size: 13px; }
.ad-pick .co-err[hidden] { display: none; }
.ad-pick .co-def { padding: 0 6px; border-radius: var(--r-pill); background: var(--paper); color: var(--brass-ink); font-size: 11px; font-weight: 400; line-height: 18px; }
.ad-pick .ab-form-acts { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 520px) { .ad-pick .co-row2, .ad-pick .co-row3 { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .ad-filled { animation: none; } }
@media (max-width: 720px) {
  .ord { grid-template-columns: minmax(0, 1fr); }
  .ord-view { padding: 16px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .ord-stage:not(.files) { aspect-ratio: auto; height: min(34vh, 260px); }
  .ord-stage.files { aspect-ratio: auto; max-height: 50vh; }
  .ord-sum { gap: 16px; padding: 16px; }
  .ord-sec { padding-top: 16px; }
  .ord-acts { position: sticky; bottom: 0; margin: 0 -16px -16px; padding: 12px 16px; background: var(--paper-2); border-top: 1px solid var(--line-soft); }
  .ord-acts > .btn { height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ord-done-ic, .ord-err.shake, .ord-rows .ord-qty-row { animation: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toasts { position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; } /* 占满宽再居中：以前 left 50% + 平移，容器最宽只有半屏，手机上一句提示折成四行压在画面中间 */
.toast { background: var(--c-text); color: #fff; padding: 8px 16px; border-radius: 18px; display: flex; gap: 12px; align-items: center; animation: rise var(--t-mid) var(--ease-out); pointer-events: auto; max-width: min(640px, calc(100vw - 24px)); } /* 圆角 18：一行时是胶囊，字多折行时是圆角矩形（全圆角会鼓成一团） */
.toast .link { color: #fff; text-decoration-color: rgba(255,255,255,.5); }
/* 「我的」多选发给工厂：编辑器顶上一条写着第几个、在做什么（editor/batch.js） */
.batch-bar { position: fixed; left: 50%; top: 12px; transform: translate3d(-50%, 0, 0); z-index: 70; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px; border-radius: 9999px; background: var(--c-text); color: #fff; font-size: 14px; line-height: 20px; box-shadow: var(--shadow, 0 1px 8px rgba(5,7,53,.16)); animation: rise var(--t-mid) var(--ease-out); }
.batch-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-bar .btn.small { flex: none; background: #fff; color: var(--c-text); border-color: #fff; } /* 写在 .btn 前面：要比 .btn.small 具体 */
/* 键盘操作看得见焦点（鼠标点不显示） */
:focus-visible { outline: 2px solid var(--c-accent, #0e7a5f); outline-offset: 2px; }
button:focus:not(:focus-visible), input:focus:not(:focus-visible) { outline: none; }
/* 顶栏保存状态 */
/* 顶栏「保存」：状态 + 点开改名/另存；手机上只剩图标 */
.save-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: var(--c-panel); color: var(--c-text-mid); font-size: var(--f-sm); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.save-btn:hover { border-color: var(--c-text-lite); color: var(--c-text); }
.save-btn .ic { font-size: var(--f-sm); line-height: 1; }
.save-btn[data-state="saved"] .ic { color: var(--c-accent); }
.save-btn[data-state="error"], .save-btn[data-state="conflict"] { color: var(--c-danger); border-color: var(--c-danger); background: var(--c-danger-soft); }
.save-btn.compact { width: 28px; padding: 0; justify-content: center; }
.save-btn.compact .lbl { display: none; }
.name-input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; font-size: var(--f-base); color: var(--c-text); }
.name-input:focus { outline: none; border-color: var(--c-text-lite); }
textarea.name-input { height: auto; padding: 8px 12px; line-height: 22px; resize: vertical; }
.save-dlg { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.save-lbl { display: flex; flex-direction: column; gap: 6px; font-size: var(--f-sm); color: var(--c-text-mid); }
.save-where { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--c-accent-soft); color: var(--c-text); font-size: var(--f-md); line-height: 1.7; }
.save-where .ic { color: var(--c-accent); }
.save-dlg .empty { margin: 0; line-height: 1.7; }
.proj-find { max-width: 320px; margin-bottom: 16px; }
/* 首屏占位：脚本跑起来后由 main.js 移除 */
.boot { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--c-bg); color: var(--c-text-mid); }
/* 工厂端：搜索栏、备注、信息表单；编辑器里下架的物品 */
.f-tools { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.f-search { height: 32px; border: 1px solid var(--c-line); border-radius: var(--r); padding: 0 10px; min-width: 260px; }
.f-note { font-size: var(--f-sm); color: var(--c-text-mid); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-log { font-size: var(--f-xs); }
.f-form { display: grid; gap: 12px; max-width: 560px; margin-top: 16px; }
.f-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.f-attrs .f-field input { width: 100%; min-width: 0; }
.f-photo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-photo { display: grid; gap: 4px; width: 96px; font-size: var(--f-sm); }
.f-photo img { width: 96px; height: 96px; object-fit: contain; background: #efece6; border-radius: var(--r); }
.f-photo .acts { display: flex; justify-content: space-between; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { padding: 0 8px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: #f1eee8; color: var(--c-text-mid); font-size: var(--f-sm); line-height: 20px; } /* 校验 / 工厂端 / 商品标签共用的小标签（以前写了两份，这是合并后生效的那份） */
.pick-list { display: grid; gap: 4px; margin-top: 12px; }
.pick-row { display: flex; gap: 12px; align-items: center; padding: 6px 8px; border: 0; background: none; border-radius: var(--r); text-align: left; cursor: pointer; }
.pick-row:hover { background: #f7f5f0; }
.f-field { display: grid; gap: 4px; font-size: var(--f-sm); color: var(--c-text-mid); }
.f-field input, .f-field textarea { border: 1px solid var(--c-line); border-radius: var(--r); padding: 6px 10px; font: inherit; color: var(--c-text); }
.item-card.off { opacity: .45; cursor: not-allowed; }
/* 最近删除 */
.trash-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--c-line); }
.trash-row .nm { flex: 1; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* —— 附图 / 概念卡片 / 浮动工具条 —— */
.attach-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 2px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: #fff; font-size: var(--f-sm); color: var(--c-text-mid); }
.attach-chip img { width: 26px; height: 26px; border-radius: var(--r-pill); object-fit: cover; }
.attach-chip button { border: 0; background: none; color: var(--c-text-lite); padding: 0 6px; line-height: 1; }
.attach-chip button:hover { color: var(--c-text); }
/* 附了图时的「按图复刻」开关、输入框下面的「增强」开关（public/js/chat.js）：开着是强调色，关着是普通按钮 */
.attach-mode { display: flex; align-items: center; gap: 8px; margin: -2px 0 8px; font-size: var(--f-sm); color: var(--c-text-lite); }
.mode-sw { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: #fff; color: var(--c-text-mid); font-size: var(--f-sm); flex: none; }
.mode-sw i { width: 22px; height: 12px; border-radius: 6px; background: var(--c-line); position: relative; transition: background .15s; }
.mode-sw i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mode-sw.on { border-color: var(--c-accent); color: var(--c-accent); font-weight: 500; }
.mode-sw.on i { background: var(--c-accent); }
.mode-sw.on i::after { transform: translateX(10px); }
.mode-tip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.boost-sw.on { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent); font-weight: 500; }
.msg-atts { display: flex; gap: 6px; margin-top: 6px; }
.msg-atts img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r); border: 1px solid rgba(255,255,255,.4); cursor: zoom-in; }
.lb-back { position: fixed; inset: 0; z-index: 60; background: rgba(20,22,24,.86); display: flex; align-items: center; justify-content: center; animation: fade var(--t-mid) var(--ease-out); }
.lb-img { max-width: 92vw; max-height: calc(100vh - 120px); object-fit: contain; border-radius: var(--r); background: #fff; }
.lb-bar { position: absolute; left: 50%; bottom: 20px; transform: translate3d(-50%, 0, 0); display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r); background: var(--c-panel); }
.lb-n { padding: 0 6px; font-size: 12px; color: var(--c-text-mid, #494a4b); white-space: nowrap; }
.lb-nav { position: absolute; top: 50%; transform: translate3d(0, -50%, 0); width: 44px; height: 64px; border: 0; border-radius: var(--r); background: rgba(255,255,255,.12); color: #fff; font-size: 32px; cursor: pointer; transition: background var(--t-fast) var(--ease-out); }
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.left.drop-on { box-shadow: inset 0 0 0 2px var(--c-accent); }
.btn.strong { border-color: var(--c-accent); color: var(--c-accent); font-weight: 500; } /* 「来 3 版挑一挑」：输入框下面那一个，建议里不再重复 */
.btn.strong:hover { background: var(--c-accent-soft); }
.suggest button.strong { border-color: var(--c-accent); color: var(--c-accent); font-weight: 500; } /* 「帮我挑礼物」：建议里第一个，醒目一点 */
.msg.wide { max-width: 100%; align-self: stretch; }
.concepts { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.cc { border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-panel); padding: 8px 10px; display: grid; gap: 6px; transition: border-color var(--t-fast) var(--ease-out); }
.cc:hover { border-color: var(--c-text-lite); }
.cc.on { border: 2px solid var(--c-accent); padding: 7px 9px; }
.cc-hd { font-weight: 600; font-size: var(--f-sm); color: var(--c-text-mid); }
.cc-text { font-size: var(--f-base); line-height: 22px; white-space: pre-wrap; background: #fff; border-radius: var(--r); padding: 8px; }
.cc-img { height: 132px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/12px 12px; border-radius: var(--r); overflow: hidden; }
.cc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cc-why { font-size: var(--f-sm); color: var(--c-text-lite); line-height: 18px; white-space: normal; }
.cc .btn { justify-self: start; }
.selbar { position: absolute; z-index: 6; display: flex; gap: 4px; padding: 4px; background: var(--c-panel); border: 1px solid var(--c-line); border-radius: var(--r-pill); box-shadow: var(--shadow); transform: translate3d(-50%, 0, 0); animation: fade var(--t-mid) var(--ease-out); }
.selbar .btn { border-color: transparent; background: none; }
.selrand { padding: 2px; z-index: 5; } /* 选中文字时框旁边的「随机字体」：小一点，不抢画面 */
.selrand .btn { height: 26px; padding: 0 10px; font-size: 12px; }
.selbar .btn:hover { background: var(--c-bg); }
/* 电脑：选中后画布上方的常用设置（和「＋ 文字 / 上传…」同一个位置、同一个样子） */
.ctxbar { align-items: center; }
.ctxbar .ti, .ctxbar .ti svg { display: block; width: 18px; height: 18px; }
.ctxbar .btn.small:not(.icon) { gap: 4px; }
.ctxbar .btn.on { background: var(--c-accent-soft); color: var(--c-accent); } /* 开着的（加粗）：当前态用强调色 */
.ctxbar .caret { color: var(--c-text-lite); font-size: var(--f-xs); }
.ctxbar .danger-text { color: var(--c-danger); }
.ctxbar .cb-more { font-size: var(--f-base); }
.ctxbar .cb-locked { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; color: var(--c-text-mid); font-size: var(--f-sm); }
/* 锁定的：属性面板只放这一条（改不了，先解锁） */
.lock-note { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-panel); color: var(--c-text-mid); font-size: var(--f-sm); line-height: 20px; }
.lock-note .ti, .lock-note .ti svg { flex: none; width: 18px; height: 18px; }
.lock-note .tx { flex: 1; min-width: 0; }
/* 画布那一栏窄了：先收「来 3 版 / 跟它说」的字，再窄就都只留图标（悬停有说明），不靠横滑藏后半截 */
@container (max-width: 759px) { .ctxbar .cb-ai .lbl { display: none; } }
@container (max-width: 599px) { .ctxbar .btn .lbl, .ctxbar .btn .caret { display: none; } .ctxbar .btn.small:not(.icon) { padding: 0 8px; } }
.ctxbar.mid .btn:not(.keep) .lbl, .ctxbar.mid .btn:not(.keep) .caret { display: none; } /* 中间一档：只留最常用两个的字 */
.ctxbar.mid .btn.small:not(.icon):not(.keep) { padding: 0 8px; }
.ctxbar.tight .cb-ai .lbl, .ctxbar.icons .btn .lbl, .ctxbar.icons .btn .caret { display: none; } /* 量出来放不下（panels/ctxbar.js fitBar） */
.ctxbar.icons .btn.small:not(.icon) { padding: 0 8px; }
.cb-font { max-width: 240px; min-width: 84px; flex-shrink: 0; } /* 窄了也留得下四五个字：以前被挤到 45px，字体名叠成一团（随机换字体后唯一看得到是哪款的地方） */
.cb-font .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-font .fxk { flex: none; margin-left: 4px; color: var(--c-text-lite); font-size: var(--f-sm); white-space: nowrap; } /* 字体按钮后半截：现在的字效（没有就写「艺术字」），量出来放不下时收起 */
.ctxbar.icons .cb-font .fxk { display: none; }
@container (max-width: 599px) { .ctxbar .cb-font .fxk { display: none; } }
.cb-size { display: inline-flex; align-items: center; height: 28px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: #fff; }
.cb-size .btn.icon { width: 26px; height: 26px; }
.cb-size .num-in { width: 40px; height: 26px; padding: 0; border: 0; background: none; text-align: center; -moz-appearance: textfield; }
.cb-size .num-in::-webkit-inner-spin-button, .cb-size .num-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cb-color .tl-sw { display: block; width: 18px; height: 18px; border-radius: var(--r-pill); border: 1px solid rgba(0,0,0,.18); }
.menu-swatches { padding: 8px 10px; }
.menu-swatches .swatches { max-width: 236px; }
.cb-redraw { display: grid; gap: 8px; width: 320px; padding: 8px 10px; }
.cb-redraw textarea { width: 100%; padding: 6px 8px; border: 1px solid var(--c-line); border-radius: var(--r); font: inherit; line-height: 20px; resize: vertical; }
.cb-redraw .inline { display: flex; gap: 6px; }
/* 放进菜单里的色块、按钮：不吃菜单项那套整行样式 */
.ctxmenu .menu-swatches .sw { display: block; width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0,0,0,.15); border-radius: var(--r-pill); }
.ctxmenu .menu-swatches .sw:hover { background-color: inherit; }
.ctxmenu .cb-redraw .btn { display: inline-flex; width: auto; height: 28px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: var(--c-panel); }
.ctxmenu .cb-redraw .btn.primary { background: var(--c-text); border-color: var(--c-text); color: #fff; }

/* —— 案例库 —— */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gal-card { border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; padding: 0; overflow: hidden; text-align: left; transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.gal-card:hover { border-color: var(--c-text-lite); transform: translate3d(0,-2px,0); }
.gal-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #efece6; }
.gal-card .nm { display: block; padding: 8px 12px; font-weight: 500; }
/* 我的方案：缩略图 + 名字 + 尺寸/时间 + 复制/删除；正在改的描边强调 */
.gallery.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery.small .nm { padding: 6px 10px; font-size: var(--f-sm); }
/* 发布到创意工坊：挑封面 */
/* 发布窗的场合（编辑器、「我的」、工坊都会弹这个窗：以前放在 workshop.css，别处打开是没样式的方框） */
.pub-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-tags button { height: 32px; padding: 0 14px; border: 1px solid var(--line-soft); border-radius: 9999px; background: var(--paper-2); font: inherit; font-size: 14px; color: var(--c-text-mid); cursor: pointer; transition: all var(--t-fast) var(--ease-out); }
.pub-tags button:hover { border-color: var(--ink); color: var(--ink); }
.pub-tags button.on { border-color: var(--ink); background: var(--ink); color: #f7f3ec; }
.pub-covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.pub-cover { aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; overflow: hidden; color: var(--c-text-mid); font-size: 13px; line-height: 20px; text-align: center; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.pub-cover:hover { border-color: #cfc7ba; }
.pub-cover img { width: calc(100% + 24px); height: 100%; object-fit: cover; display: block; }
/* 选中的封面：和结算页的选项卡同一种——墨色细框 */
.pub-cover.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--ink); }
.pub-cover { position: relative; }
.pub-cover span[data-ic] { display: grid; justify-items: center; gap: 8px; }
.pub-cover span[data-ic]::before { width: 22px; height: 22px; margin: 0; opacity: .65; }
/* 选中的右上角一个墨色小勾（照 codex 参考图） */
.pub-cover.on::after { content: ''; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat; }
.proj-h { margin: 20px 0 10px; font-size: var(--f-sm); font-weight: 600; color: var(--c-text-mid); }
.proj-card { position: relative; cursor: pointer; display: flex; flex-direction: column; }
.proj-card.on { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.proj-card .nm { padding-bottom: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-card .sub { padding: 0 12px; font-size: var(--f-xs); color: var(--c-text-lite); }
/* 「我的」多选发给工厂（me.js renderPick）：卡片左上角一个勾，底下一条「选了 n 个 · 发给工厂」；核对窗一行一个设计，衣服填每个尺码几件 */
.proj-card .pv { position: relative; }
.proj-card .pick-mark { position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; border-radius: 9999px; border: 2px solid #fff; background: rgba(27,26,25,.28); color: #fff; font-size: 14px; line-height: 20px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: background var(--t-fast) var(--ease-out); }
.proj-card.picked .pick-mark { background: var(--c-accent); }
.proj-card.picked img, .proj-card.picked .proj-ph { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.me-pick { margin-left: auto; }
.me-pickbar { position: fixed; left: 50%; bottom: calc(var(--tabs-h, env(safe-area-inset-bottom)) + 16px); transform: translate3d(-50%, 0, 0); z-index: 50; display: flex; gap: 8px; align-items: center; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px; border-radius: 9999px; background: #fff; border: 1px solid var(--c-line); box-shadow: 0 1px 8px rgba(5,7,53,.16); font-size: 14px; animation: rise var(--t-mid) var(--ease-out); }
.me-pickbar[hidden] { display: none; }
.me-pickbar span { margin-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-list { display: flex; flex-direction: column; gap: 12px; }
.bs-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; }
.bs-row img, .bs-row .proj-ph { width: 72px; height: 58px; object-fit: cover; border-radius: var(--r); background: #eeeae2; }
.bs-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bs-tx b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-tx .sub, .bs-res .sub { color: var(--c-text-lite); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 一行写完，窄了省略（手机上以前折成「腰封礼品盒 · 小 / 号」） */
.bs-row.one { grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; }
.bs-tx .ord-sizes { margin-top: 8px; }
.bs-note { margin: 4px 0 0; font-size: 12px; line-height: 18px; }
.bs-res { display: flex; flex-direction: column; gap: 2px; }
.bs-res b { font-weight: 500; }
.bs-skip { margin-top: 4px; color: var(--c-text-mid); }
.proj-ph { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: #efece6; color: var(--c-text-lite); font-size: var(--f-xl); }
.proj-badge { position: absolute; left: 8px; top: 8px; padding: 0 8px; border-radius: var(--r-pill); background: var(--c-accent); color: #fff; font-size: var(--f-xs); line-height: 20px; }
.proj-acts { display: flex; gap: 12px; padding: 4px 12px 8px; font-size: var(--f-sm); }
.link.danger-link:hover { color: var(--c-danger); }
.modal .btn.danger { color: var(--c-danger); } /* 弹窗里会丢东西的按钮（收回分享链接）：红字 */

/* —— 属性面板分组、勾选、图层 —— */
.sec-hd { margin: 16px 0 10px; padding-top: 12px; border-top: 1px solid var(--c-line); font-size: var(--f-sm); font-weight: 600; color: var(--c-text-mid); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-sm); color: var(--c-text-mid); cursor: pointer; }
.chk input { accent-color: var(--c-accent); }
.layers summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; }
.layers summary::-webkit-details-marker { display: none; }
.layers summary h3 { margin: 0; font-size: var(--f-md); font-weight: 600; }
.layers summary h3::before { content: '▸ '; color: var(--c-text-lite); }
.layers[open] summary h3::before { content: '▾ '; }
.layers summary .sub { color: var(--c-text-lite); font-size: var(--f-sm); }
.ly-face { display: flex; justify-content: space-between; margin: 12px 0 4px; font-size: var(--f-xs); color: var(--c-text-lite); text-transform: none; }
.ly-face .n { color: var(--c-text-lite); }
.ly-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--r); cursor: pointer; transition: background var(--t-fast) var(--ease-out); }
.ly-row:hover { background: var(--c-bg); }
.ly-row.on { background: var(--c-accent-soft); }
.ly-row.off .ly-name { color: var(--c-text-lite); text-decoration: line-through; }
.ly-tag { width: 22px; height: 22px; border-radius: var(--r); background: var(--c-bg); color: var(--c-text-mid); font-size: var(--f-xs); display: inline-flex; align-items: center; justify-content: center; }
.ly-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--f-sm); }
.ly-name .tag { margin-left: 6px; }
.ly-acts { display: inline-flex; gap: 2px; opacity: .55; transition: opacity var(--t-fast) var(--ease-out); }
.ly-row:hover .ly-acts, .ly-row.on .ly-acts { opacity: 1; }
.ly-acts button { border: 0; background: none; padding: 2px 6px; border-radius: var(--r); font-size: var(--f-xs); color: var(--c-text-mid); }
.ly-acts button:hover { background: #fff; color: var(--c-text); }
.ly-acts button.del:hover { color: var(--c-danger); }

/* —— AI 宣传图 —— */
.promo { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 0; height: 100%; }
.promo-side { padding: 16px; border-right: 1px solid var(--c-line); overflow: auto; }
.promo-main { display: flex; flex-direction: column; min-height: 0; padding: 16px; gap: 12px; }
.promo-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #efece6; border-radius: var(--r); padding: 12px; }
.promo-stage img { max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; border-radius: var(--r); box-shadow: var(--shadow); }
.promo-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.promo-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.promo.drop-on { box-shadow: inset 0 0 0 2px var(--c-accent); }
.promo-thumbs .thumb { width: 96px; flex: none; aspect-ratio: 3 / 2; }
/* 「出 3 张应景的」：三格各自显示进度，画好的可点开 */
.promo-set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.promo-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 3 / 2; border: 1px dashed var(--c-line); border-radius: var(--r); background: var(--c-panel); padding: 8px; text-align: center; overflow: hidden; }
.promo-cell img { width: 100%; min-height: 0; flex: 1; object-fit: contain; border-radius: var(--r); box-shadow: none; max-height: none; } /* 整张看得到：衣服的宣传图是方的，按 3:2 铺满会裁掉头和下摆 */
.promo-cell.pick { cursor: pointer; border-style: solid; transition: border-color var(--t-fast) var(--ease-out); }
.promo-cell.pick:hover { border-color: var(--c-accent); }
/* 贺卡 */
.card-dlg .promo-stage { overflow: hidden; }
.card-dlg .promo-stage canvas { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: var(--shadow); border-radius: var(--r); }
.card-styles { flex-wrap: wrap; border-radius: var(--r); }
.card-styles button { display: inline-flex; align-items: center; gap: 6px; }
.card-styles i { width: 12px; height: 12px; border-radius: var(--r-pill); border: 2px solid; }
.card-field { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 8px; margin-bottom: 8px; }
.card-field span { color: var(--c-text-mid); line-height: 32px; }
html[lang="en"] .card-field { grid-template-columns: 76px minmax(0, 1fr); }
.card-field input, .card-field textarea { width: 100%; border: 1px solid var(--c-line); border-radius: var(--r); padding: 6px 10px; font: inherit; background: #fff; }
.card-field textarea { resize: vertical; line-height: 22px; }
.card-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.card-share { margin-top: 12px; }
.card-share input { width: 100%; border: 1px solid var(--c-line); border-radius: var(--r); padding: 6px 10px; font: inherit; color: var(--c-text-mid); background: var(--c-bg); }
@media (max-width: 900px), (max-height: 500px) and (max-width: 1000px) {
  .promo { display: flex; flex-direction: column; height: 100%; overflow: auto; }
  .promo > * { flex: none; }
  .promo-side { border-right: 0; border-bottom: 1px solid var(--c-line); overflow: visible; }
  .promo-main { min-height: 420px; }
  .promo-set { grid-template-columns: minmax(0, 1fr); }
  .card-dlg .promo-main { min-height: 0; order: -1; } /* 手机：预览在上，边看边改 */
  .card-dlg .promo-stage { flex: none; overflow: visible; }
  .card-dlg .promo-stage canvas { width: min(100%, 280px); height: auto; max-height: none; }
}

/* —— 素材库抽屉 —— */
.libdrawer { position: absolute; left: 0; top: 0; bottom: 0; width: 320px; z-index: 8; background: var(--c-panel); border-right: 1px solid var(--c-line); box-shadow: 4px 0 16px rgba(30,33,36,.08); display: flex; flex-direction: column; padding: 12px 14px; gap: 8px; animation: libIn var(--t-mid) var(--ease-out); }
@keyframes libIn { from { transform: translate3d(-16px,0,0); opacity: 0; } to { transform: none; opacity: 1; } }
.lib-hd { display: flex; align-items: baseline; gap: 8px; }
.lib-hd h3 { margin: 0; font-size: var(--f-base); font-weight: 600; }
.lib-hd .sub { color: var(--c-text-lite); font-size: var(--f-sm); }
.lib-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.lib-filters button { border: 1px solid var(--c-line); background: #fff; border-radius: var(--r-pill); padding: 2px 10px; font-size: var(--f-sm); color: var(--c-text-mid); transition: border-color var(--t-fast) var(--ease-out); }
.lib-filters button:hover { border-color: var(--c-text-lite); }
.lib-filters button.on { background: var(--c-text); border-color: var(--c-text); color: #fff; }
.lib-q { height: 30px; border: 1px solid var(--c-line); border-radius: var(--r); padding: 0 10px; background: #fff; }
.lib-q:focus { outline: none; border-color: var(--c-text-lite); }
.lib-tip { font-size: var(--f-xs); color: var(--c-text-lite); line-height: 16px; }
.lib-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: max-content; gap: 8px; align-content: start; } /* 行高按内容：卡片 overflow:hidden 时最小高度算 0，格子一多整列被压成一条一条（只露图的上沿） */
.lib-card { position: relative; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; overflow: hidden; cursor: grab; transition: border-color var(--t-fast) var(--ease-out); }
.lib-card:hover { border-color: var(--c-text-lite); }
.lib-img { display: block; width: 100%; aspect-ratio: 1; padding: 6px; border: 0; background: repeating-conic-gradient(#f1efea 0 25%, #fff 0 50%) 0 0/12px 12px; cursor: pointer; }
.lib-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lib-kind { position: absolute; left: 6px; top: 6px; font-size: var(--f-xs); line-height: 16px; padding: 0 6px; border-radius: var(--r-pill); background: rgba(30,33,36,.7); color: #fff; }
.lib-acts { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-top: 1px solid var(--c-line); }
.lib-acts button, .lib-acts a { border: 0; background: none; padding: 2px 6px; border-radius: var(--r); font-size: var(--f-xs); color: var(--c-text-mid); text-decoration: none; cursor: pointer; }
.lib-acts button:hover, .lib-acts a:hover { background: var(--c-bg); color: var(--c-text); }
.lib-acts .del:hover { color: var(--c-danger); }

/* —— 数值输入、配色点、快捷键表、菜单提示、开关态 —— */
.num-in { height: 28px; border: 1px solid var(--c-line); border-radius: var(--r); padding: 0 6px; background: #fff; font-variant-numeric: tabular-nums; }
.num-in:focus { outline: none; border-color: var(--c-text-lite); }
.theme-dots { display: inline-flex; margin-right: 6px; }
.theme-dots i { width: 10px; height: 10px; border-radius: var(--r-pill); border: 1px solid rgba(0,0,0,.12); margin-right: -3px; }
table.kbd { width: 100%; border-collapse: collapse; }
table.kbd td { padding: 8px 4px; border-bottom: 1px solid var(--c-line); }
table.kbd td:last-child { text-align: right; }
kbd { font-family: inherit; font-size: var(--f-sm); background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--r); padding: 2px 8px; }
.menu-tip { padding: 4px 10px 6px; font-size: var(--f-xs); color: var(--c-text-lite); }
/* 字效 / 一键艺术字的格子（panels/wordart.js）：每格是这段字照那种效果画的小样，菜单、属性面板、手机托盘共用 */
.fx-grid { display: grid; grid-template-columns: repeat(3, 88px); gap: 4px; padding: 0 6px 6px; }
.fx-tile, .ctxmenu .fx-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 88px; padding: 2px 0; border: 1px solid transparent; border-radius: var(--r); background: none; color: var(--c-text-mid); font-size: var(--f-xs); line-height: 14px; cursor: pointer; }
.fx-tile:hover, .ctxmenu .fx-tile:hover { background: var(--c-bg); }
.fx-tile.on, .ctxmenu .fx-tile.on { border-color: var(--c-text); color: var(--c-text); }
.fx-tile > span { max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[lang="en"] .fx-tile > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; text-align: center; line-height: 12px; } /* 英文名字长（Brush graffiti、Kiss-cut sticker）：折两行，不截成「Brush gra…」 */
.fx-cv { display: block; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.fx-more b { display: flex; align-items: center; justify-content: center; width: 86px; height: 46px; border-radius: 4px; background: var(--c-bg); color: var(--c-text-mid); font-weight: 500; }
.fx-extras, .chip-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 6px; }
.ctxmenu .chip-row { max-width: 296px; } /* 和下面的格子一样宽，多了折行，菜单不被撑宽 */
.ctxmenu .chip-row .chip { width: auto; padding: 0 12px; justify-content: center; border: 1px solid var(--c-line); background: #fff; } /* 「艺术字」菜单里 AI 照字画、3D 立体字各一排 */
.fx-tabs { display: flex; gap: 6px; padding: 0 6px 6px; }
/* 「字体与艺术字」面板（panels/type.js）：页签字体 / 模板 / 字效 / 装饰 / AI 画字；弹出来的固定宽（换页签不跳宽），属性面板里摊开、格子按栏宽排；字体列表一行一款、太长在框里滚 */
.type-panel .fx-tabs { flex-wrap: wrap; gap: 4px; }
.ctxmenu .type-panel .fx-tabs .chip { padding: 0 10px; }
.type-menu { width: 296px; }
.type-menu .fx-body { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; } /* 菜单里格子多（字效 58 个、按氛围筛的模板几十个）：在菜单里滚，不伸出屏幕（伸出去的那几排点不到） */
.type-fonts { max-height: min(56vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.type-panel .font-find { display: block; width: 100%; box-sizing: border-box; height: 32px; margin: 0 0 6px; } /* 字体一百多款：按名字找 */
.type-panel .font-none { padding: 8px 4px; }
.type-side .type-fonts { border: 1px solid var(--c-line); border-radius: var(--r); padding: 4px; }
.type-side .fx-tabs { padding: 0 0 8px; }
.type-side .fx-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); justify-items: center; padding: 0 0 6px; }
.type-side .chip-row, .type-side .fx-extras { padding: 0 0 6px; }
.type-side .chip-row .chip, .type-side .fx-extras .chip, .type-side .fx-tabs .chip { width: auto; padding: 0 12px; justify-content: center; border: 1px solid var(--c-line); background: #fff; }
.type-side .menu-tip { padding: 4px 2px 6px; }
.type-side .font-row { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: var(--r); color: var(--c-text); cursor: pointer; }
.type-side .font-row:hover { background: var(--c-bg); }
.type-side .font-row.on { background: var(--c-bg); }
.type-side .font-row .k { color: var(--c-text-lite); font-size: var(--f-sm); }
.type-side { margin-bottom: 12px; }
/* 字体页签：顶上一行按属性筛（简约 / 优雅 / 手写……，横滑），每款后面一行小字写属性、能不能当正文 */
.font-filters .chip { flex: none; }
/* 手机托盘里横着划；电脑上（右栏、右键菜单）折行全摊开——鼠标横着滚不了，选中靠后的一个、行滚过去以后前面几个就点不回来了（反馈第 9 批） */
.tray .font-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
/* 筛选那排比上面的页签小一档、不描边（以前和页签同一种胶囊，叠成两三排分不出哪排是哪排）：选中的是一块墨色小胶囊。手机上按得到的高度留着 */
.type-panel .font-filters { gap: 2px 2px; }
.type-panel .font-filters .chip { width: auto; height: 24px; min-height: 0; line-height: 24px; padding: 0 9px; border: 0; background: none; box-shadow: none; color: var(--c-text-mid); font-size: 12px; }
.type-panel .font-filters .chip:hover { color: var(--c-text); background: var(--c-bg); }
.type-panel .font-filters .chip.on { background: var(--c-text); color: #fff; border: 0; box-shadow: none; }
@media (pointer: coarse) { .type-panel .font-filters .chip { height: 32px; padding: 0 12px; font-size: 13px; } }
.font-row .k { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.font-row .ft { color: var(--c-text-lite); font-size: var(--f-xs); line-height: 14px; }
.ctxmenu .fx-tabs .chip { width: auto; padding: 0 12px; justify-content: center; border: 1px solid var(--c-line); background: #fff; }
.fx-tabs .chip.on, .ctxmenu .fx-tabs .chip.on { border-color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-text); }
.ctxmenu .fx-extras .chip { width: auto; padding: 0 12px; justify-content: center; border: 1px solid var(--c-line); background: #fff; }
.ctxmenu .fx-extras .chip.on { border-color: var(--c-text); }
.ctxmenu button.redo { color: var(--c-text-lite); }
.menu-now { display: flex; align-items: center; gap: 8px; padding: 2px 10px; font-size: var(--f-xs); color: var(--c-accent); }
.menu-now::after { content: ''; flex: 1; border-top: 1px solid var(--c-accent); }
.btn.on { background: var(--c-text); border-color: var(--c-text); color: #fff; }
/* 顶栏不折行：方案名可以缩，其他保持一行；放不下的收进「更多」 */
@media (max-width: 1360px) { #sizeDims { display: none; } }
@media (max-width: 1400px) { #histBtn, #helpBtn, #projBtn { display: none; } } /* 账号积分按钮占了位置：历史、怎么用、我的方案收进「更多」 */
@media (max-width: 1300px) and (min-width: 901px) { .acct .ac-user { display: none; } .top > .title-input { flex-basis: 160px; } } /* 编辑器的商品名放不下时由 fitTop 收起 */
.top > * { flex: none; white-space: nowrap; }
.top > .spacer { flex: 1 1 auto; } /* 把右边那组推到最右 */
.top > .title-input { flex: 0 1 220px; min-width: 96px; }
.toolbar { white-space: nowrap; max-width: calc(100% - 32px); overflow-x: auto; scrollbar-width: none; }
/* 窄的时候让位：3D 区的操作提示、画布底部的网格/看选中（右键菜单里也有） */
.viewer { container-type: inline-size; }
@container (max-width: 560px) { .viewer-badge { display: none; } }
.center { container-type: inline-size; }
@container (max-width: 640px) { #gridBtn, #zoomSel { display: none; } }
@container (max-width: 520px) { .zoombar { bottom: calc(var(--s3) + 42px); } } /* 画布很窄（1280 宽下「成品放大」）：缩放挪到面切换上面，不叠在一起 */

/* —— 手机 / 窄屏（≤900px）：底部切换「改盒面 / 看成品 / 和助手说」；属性是底部抽屉；改盒面时右上角 3D 小窗实时跟着变 —— */
.mtabs, .sheet-head, .pip-hit, .m-size, .m-show, .m-pill { display: none; }
@media (max-width: 900px), (max-height: 500px) and (max-width: 1000px) { /* 手机条件和 dom.js 的 MOBILE_MQ 一字不差（横着拿的手机也按手机排）；电脑那几块是它的反面 */
  :root { --top-h: 52px; --tab-h: calc(56px + env(safe-area-inset-bottom)); --peek-h: 64px; --pip: 90px; --band: calc(var(--pip) + 16px); --cpip: clamp(88px, 14vh, 112px); }
  @supports (height: 1dvh) { :root { --cpip: clamp(88px, 14dvh, 112px); } } /* 老一点的手机浏览器（Chromium 108 以前，不少国产浏览器）不认 dvh：下面用到 dvh 的都先写一份 vh 的，不然那条整个作废——3D 小窗、看成品的 3D 没了高度 */ /* --pip：3D 小窗的边长 = 画布上方两排（工具条 + 面切换）的高度 */
  body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
  input, textarea, select { font-size: 16px; } /* iOS 小于 16px 的输入框一聚焦就放大整页 */
  .m-hide { display: none !important; }
  .m-show { display: inline; }
  .btn { height: 36px; }
  .btn.small { height: 32px; padding: 0 12px; }
  .btn.icon { width: 36px; }
  .btn.small.icon { width: 32px; }

  /* 顶栏：标志 / 方案名 / 撤销重做 / 校验 / 提交 / ⋯，其余收进 ⋯ */
  .top, body:not(.page) .top { height: var(--top-h); gap: 4px; padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); } /* 和上面 body:not(.page) .top 一样重：以前手机上间距一直是 12，320 / 360 宽顶栏挤出屏幕 */
  .top .brand { display: none; } /* 方案名比标志要紧：手机上把位置让给方案名 */
  /* 方案名：撤销 / 重做右边，放不下就截断，点了弹改名框（「⋯」最上面也有「改名」） */
  .title-btn { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-text); font-size: var(--f-md); transition: background var(--t-fast) var(--ease-out); }
  .title-btn:hover, .title-btn:active { background: var(--c-panel); }
  .title-btn .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .title-btn.empty .nm { color: var(--c-text-lite); }
  .title-btn .ic { flex: none; width: 14px; height: 14px; color: var(--c-text-lite); }
  #sizeSeg, #variantSeg, #sizeDims, #histBtn, #helpBtn, body:not(.page) #acctBtn { display: none; } /* 尺寸、颜色款（徽章的金 / 银 / 玫瑰金）在「看成品」页，挨着 3D；积分、历史、怎么用在 ⋯ 里。颜色款以前留在顶栏，三个色块把顶栏撑出屏幕、整页变宽 */
  .crumb-home { width: 32px; height: 32px; padding: 0; justify-content: center; } /* 只留「‹」回「我的」 */
  .crumb-home .lbl { display: none; }
  .top > .spacer { order: 1; } /* 左：返回、撤销、重做；右：⋯、校验、提交 */
  #moreBtn, #checkChip, #exportBtn, .save-btn { order: 2; }
  .save-btn:is([data-state="saved"], [data-state="saving"], [data-state="dirty"]) { display: none; } /* 存好了不占位置；没存上、有冲突才出来 */
  .top > .title-input { flex: 1 1 auto; width: auto; min-width: 0; padding: 4px 6px; }
  .save-btn { width: 32px; height: 32px; padding: 0; justify-content: center; flex: none; }
  .save-btn .lbl { display: none; }
  .save-btn .ic { font-size: var(--f-base); }
  #moreBtn { width: 32px; height: 32px; font-size: var(--f-lg); text-decoration: none; color: var(--c-text); }
  .check-chip { padding: 0 10px; }
  #exportBtn { padding: 0 14px; }

  /* 三个页面叠在一起，只显示当前那个（不改尺寸，切回来画布和 3D 保持原样） */
  .app { display: block; position: relative; margin: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); height: calc(100vh - var(--top-h) - var(--tab-h)); }
  @supports (height: 1dvh) { .app { height: calc(100dvh - var(--top-h) - var(--tab-h)); } } /* dvh 的单独圈起来：声明里带 var() 时，不认 dvh 的浏览器（Chromium 108 以前）解析时照收、算值时才作废，写在同一条里前面那份 vh 兜不住——整个编辑器没了高度 */
  .app > .col { position: absolute; inset: 0; visibility: hidden; border: 0; }
  .app.left-collapsed .left { display: flex; }
  body[data-mtab="edit"] .app > .center, body[data-mtab="chat"] .app > .left, body[data-mtab="view"] .app > .right { visibility: visible; }
  .chat-collapse, .left-open, .col-split, .viewer-split, .legend, .zoombar, .dropzone, #viewBig, #viewFull, #viewPop, .viewer-badge { display: none !important; }
  .viewer-ctl { overflow-x: auto; scrollbar-width: none; } /* 3D 下面一排（预览开关 + 视角）放不下就横滑 */
  .viewer-ctl > * { flex: none; }

  /* 改盒面 */
  .app > .center { bottom: var(--peek-h); } /* 按「只露一排工具」留位：展开的那一项更高时盖在画布上，画布不跟着变尺寸重排 */
  .toolbar { left: 8px; right: 8px; top: 8px; transform: none; max-width: none; }
  #aiPill { display: none !important; } /* 手机用底部那条 #mPill（三页都看得到），见下面「AI 在忙」 */
  .toolbar .btn.small { padding: 0 9px; }
  #toolbar:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); } /* 右边淡出：提示还能往左滑 */
  /* 画布上方两排：「＋ 文字…」/ 选中状态条，下面一排面切换；右边是 3D 小窗（同高）。画布从这两排下面开始摆（editor/mobile.js canvasInsets） */
  #toolbar, .facebar { right: calc(var(--pip) + 16px); }
  .center::before { content: ''; position: absolute; left: 0; right: 0; top: 0; z-index: 4; height: var(--band); background: var(--c-table, #f4f1ec); border-bottom: 1px solid var(--c-line); } /* 这两排垫一块实底：画布拖上去的内容不从按钮缝里透出来，缝里也点不到画布 */
  .facebar { left: 8px; top: 56px; bottom: auto; overflow-x: auto; scrollbar-width: none; }
  .facebar:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  body.m-sel .facebar { right: 8px; } /* 选中时小窗收起（下面），面切换和状态条都占满一行 */
  .facebar .seg { flex: none; background: var(--c-panel); }
  .facebar .seg button { height: 36px; } /* 手指点：面切换以前 28 px 高，点不准 */
  .selbar { max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
  /* 选中状态条（panels/tools.js renderSelBar）：「＋ 文字」那条的位置，取消选中 · 名字 · 复制 · 锁定 · 删除 · ⋯；改它的工具在底部 */
  .canvas-wrap { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } /* 长按画布是弹编辑器自己的菜单（editor2d.js），别再出系统的选字放大镜 */
  #ctxbar { overflow: hidden; }
  #ctxbar .btn .lbl { display: inline; } /* 画布那栏窄于 600 时电脑设置条只留图标（上面的 @container）；手机这条字要留着，「取消选中」只剩 × 会被当成删除 */
  #ctxbar .btn.small:not(.icon) { padding: 0 10px; }
  #ctxbar .sb-name { flex: 1 1 auto; min-width: 0; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text-lite); font-size: var(--f-sm); }
  #ctxbar .sb-done { border-color: var(--c-line); }
  .libdrawer { width: 100%; border-right: 0; }

  /* 属性抽屉：平时只露一条（点开看全部），选中谁就显示谁 */
  body[data-mtab="edit"] .app > .right { visibility: visible; position: fixed; inset: auto env(safe-area-inset-right) var(--tab-h) env(safe-area-inset-left); height: var(--peek-h); overflow: hidden; z-index: 20; border-top: 1px solid var(--c-line); box-shadow: 0 -4px 16px rgba(30,33,36,.08); transition: height var(--t-mid) var(--ease-out); }
  body[data-mtab="edit"].sheet-open .app > .right { height: min(56vh, 520px); height: min(56dvh, 520px); overflow-y: auto; overscroll-behavior: contain; }
  body.sheet-open .sheet-quick { display: none; } /* 展开后下面就是全部选项，那排工具重复了 */
  body:not(.sheet-open) .sheet-bar { display: none; } /* 没拉起时只露工具；拉起后这一条是标题 + 收起 */
  body[data-mtab="edit"].tray-tall:not(.sheet-open) .app > .right { height: auto; }
  body[data-mtab="edit"]:not(.sheet-open) .right > .panel { display: none; } /* 没拉起时高度只算工具那一条 */
  body[data-mtab="edit"].tray-tall .viewer { visibility: hidden; } /* 改字、写画面描述时画布只剩上面一截，小窗别挡着 */
  body[data-mtab="edit"] .right > .panel:not(#inspector):not(#layersPanel) { display: none; }
  body[data-mtab="edit"] .sheet-head { display: block; }
  body[data-mtab="edit"] #inspector > .panel-hd h3 { display: none; } /* 抽屉头上已经写了名字 */
  .sheet-head { position: sticky; top: 0; z-index: 3; flex: none; background: var(--c-panel); border-bottom: 1px solid var(--c-line); touch-action: pan-x; } /* 横着滑翻工具；竖着划交给脚本：拉起 / 收起 */
  .sheet-bar { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 48px; padding: 6px 16px 0; border: 0; background: none; text-align: left; font-weight: 600; }
  body:not(.sheet-open) .sheet-head::before { content: ''; position: absolute; left: 50%; top: 4px; width: 32px; height: 3px; margin-left: -16px; border-radius: var(--r-pill); background: var(--c-line); z-index: 1; } /* 上划拉起全部设置 */
  /* 底部工具：图标 + 短名字，横滑；右端「全部设置」固定 */
  .tl-row, .tray { display: flex; align-items: stretch; height: 64px; }
  .tl-x { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; padding: 0 4px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; } /* 它自己是横滑容器，竖着划要在这里也让出来 */
  .tl-x::-webkit-scrollbar { display: none; }
  .tl { flex: none; min-width: 56px; height: 56px; padding: 0 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: var(--r); background: none; color: var(--c-text); font-size: var(--f-sm); line-height: 16px; transition: background var(--t-fast) var(--ease-out); }
  .tl > span:last-child { white-space: nowrap; }
  .tl:active { background: var(--c-bg); }
  .tl.danger { color: var(--c-danger); }
  .tl .ti { display: block; width: 22px; height: 22px; }
  .tl .ti svg { display: block; }
  .tl-sw { display: block; width: 20px; height: 20px; margin: 1px; border-radius: var(--r-pill); border: 1px solid rgba(0,0,0,.18); }
  .tl.all, .tray .back { height: auto; margin: 10px 0; border-radius: 0; }
  .tl.all { padding: 0 10px; border-left: 1px solid var(--c-line); }
  .tl-note { flex: 1; padding: 0 12px; color: var(--c-text-lite); font-size: var(--f-sm); line-height: 20px; }
  .tray .lay-grid { display: flex; align-items: center; gap: 8px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; } /* 手机底部「版式」：小样横着一排，横滑 */
  .tray .lay { flex: none; width: auto; height: 52px; }
  .tray .back { min-width: 60px; border-right: 1px solid var(--c-line); color: var(--c-text-mid); }
  .tray .tl-x { gap: 8px; padding: 0 12px; }
  .font-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 38vh; max-height: 38dvh; overflow-y: auto; overscroll-behavior: contain; }
  .font-grid .fg-hd { grid-column: 1 / -1; padding: 6px 2px 0; color: var(--c-text-lite); font-size: var(--f-sm); }
  .font-grid .chip { justify-content: flex-start; min-width: 0; overflow: hidden; }
  .font-grid .chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 手机字体托盘：样子在上、名字小字在下（以前挤在一行，样子只露两三个字母，看不出字形） */
  .font-grid .chip.font-row { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; height: auto; min-height: 52px; padding: 6px 12px; border-radius: 16px; }
  .font-grid .chip.font-row > span:first-child { max-width: 100%; }
  .font-grid .chip.font-row .k { font-size: 12px; line-height: 16px; color: var(--c-text-lite); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tl-x:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); } /* 同工具栏：右边淡出提示还能往左滑 */
  .tray .chip { height: 36px; padding: 0 14px; font-size: var(--f-md); }
  /* 「字体·艺术字」托盘（panels/type.js 的 tray）：上面一排页签，下面字体两列 / 格子折行排开，竖着滑 */
  .tray .type-panel { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
  .tray .type-panel .fx-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 0; gap: 6px; }
  .tray .type-panel .fx-tabs .chip { flex: none; }
  .tray .type-panel .fx-tabs .chip.on { border-color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-text); }
  .tray .type-panel .fx-body { max-height: 38vh; max-height: 38dvh; overflow-y: auto; overscroll-behavior: contain; }
  .tray .type-panel .font-grid { max-height: none; overflow: visible; }
  .tray .type-panel .fx-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); justify-items: center; padding: 0; }
  .tray .type-panel .fx-extras, .tray .type-panel .chip-row { padding: 0 0 6px; }
  .tray .fx-tile { flex: none; padding: 1px 0; }
  .tray .menu-tip { flex: none; white-space: nowrap; }
  .ctxmenu .fx-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); justify-items: center; }
  .ctxmenu .type-menu { width: auto; } /* 手机上菜单从底部弹出、占满宽 */
  .tray .swatches { flex-wrap: nowrap; gap: 10px; padding: 0 2px; }
  .tray .sw { flex: none; width: 32px; height: 32px; }
  .tray-range { flex: 1 0 120px; accent-color: var(--c-text); }
  .tray-range-wrap { display: flex; flex: 1 0 120px; align-items: center; touch-action: none; } /* 手势在这层：横拖改值、竖划交给抽屉（panels/tools.js touchRange） */
  .tray-range-wrap .tray-range { flex: 1 1 auto; min-width: 0; }
  @media (pointer: coarse) { .tray-range-wrap .tray-range { pointer-events: none; } }
  .tray-val { flex: none; min-width: 52px; color: var(--c-text-lite); font-size: var(--f-sm); text-align: right; font-variant-numeric: tabular-nums; }
  .tray.tall { height: auto; }
  .tray.tall .tl-x { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; overflow: visible; }
  .tray.tall textarea { width: 100%; height: 68px; padding: 8px 10px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; line-height: 24px; resize: none; }
  .tray.tall textarea:focus { outline: none; border-color: var(--c-text-lite); }
  .tray-acts { display: flex; gap: 8px; }
  .btn.danger-text { color: var(--c-danger); }
  .sheet-bar::before { content: ''; position: absolute; left: 50%; top: 6px; width: 32px; height: 3px; margin-left: -16px; border-radius: var(--r-pill); background: var(--c-line); }
  .sheet-bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet-bar .sub { flex: none; color: var(--c-text-lite); font-size: var(--f-sm); font-weight: 400; }
  .sheet-bar .chev { flex: none; margin-left: auto; color: var(--c-text-mid); font-size: var(--f-sm); font-weight: 500; }

  /* 3D 小窗：改盒面时在右上角跟着变，点一下看大图 */
  body[data-mtab="edit"] .viewer { position: fixed; right: 8px; top: calc(var(--top-h) + 12px); width: var(--pip); height: var(--pip); z-index: 15; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
  body[data-mtab="edit"] .viewer > :not(canvas):not(.pip-hit) { display: none !important; }
  body[data-mtab="edit"] .pip-hit { display: block; position: absolute; inset: 0; z-index: 2; border: 0; background: none; }
  body[data-mtab="edit"].sheet-open .viewer { visibility: hidden; } /* 抽屉拉起来后画布只剩一截，小窗别再挡住选中的东西 */
  body[data-mtab="edit"].pip-left .viewer { right: auto; left: 8px; } /* 选中的东西在右上：小窗让到左上（editor/top.js placePip） */
  body[data-mtab="edit"].pip-hide .viewer, body[data-mtab="edit"].m-sel .viewer { visibility: hidden; } /* 左右都挡、或正在打字；选中了东西：上面那排换成选中状态条（取消选中 · 名字 · 复制…）要整行，小窗先收起，取消选中就回来 */
  /* 和助手说：同一个 3D 小窗浮在对话右上角，说完马上看到改成什么样；点一下看大图，按住拖着走、松手贴到左边或右边（editor/mobile.js mountChatPip 记住位置） */
  body[data-mtab="chat"] .viewer { visibility: visible; position: fixed; right: 8px; top: var(--cpip-y, calc(var(--top-h) + 61px)); width: var(--cpip); height: var(--cpip); z-index: 15; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
  body[data-mtab="chat"].cpip-left .viewer { right: auto; left: 8px; }
  body[data-mtab="chat"] .viewer > :not(canvas):not(.pip-hit) { display: none !important; }
  body[data-mtab="chat"] .pip-hit { display: block; position: absolute; inset: 0; z-index: 2; border: 0; background: none; touch-action: none; cursor: grab; }
  body[data-mtab="chat"] .viewer.dragging { box-shadow: 0 12px 32px rgba(30,33,36,.28); transition: none; }
  body[data-mtab="chat"].cpip-low .chat-log { padding-bottom: calc(var(--cpip) + 16px); }
  body[data-mtab="chat"]:not(.cpip-low) .chat-log { padding-top: calc(var(--cpip) + 16px); }
  body[data-mtab="chat"].cpip-low:not(.cpip-left) .chat-log .starters { padding-right: calc(var(--cpip) + 8px); } /* 矮的手机上「可以这样说」那几句排到小窗底下：让出它那一列 */
  body[data-mtab="chat"].cpip-low.cpip-left .chat-log .starters { padding-left: calc(var(--cpip) + 8px); }
  body:not(.page) .chat-log .starters button { border-radius: 18px; } /* 句子长、折成两行时是圆角框，不是一根两头圆的药丸 */

  /* 看成品：大 3D + 尺寸 + 盒里放什么 + 能不能生产 */
  body[data-mtab="view"] .viewer { height: min(56vh, 120vw); height: min(56dvh, 120vw); }
  body[data-mtab="view"] #inspector, body[data-mtab="view"] #layersPanel { display: none; }
  body[data-mtab="view"] .m-size { display: block; }
  /* 尺寸、颜色（editor/top.js）：一个尺寸一颗，字不折行，放不下整颗换到下一行；颜色色块全摆出来 */
  .m-opts { display: flex; flex-wrap: wrap; gap: 8px; }
  .m-opts .chip { height: 36px; padding: 0 14px; font-size: var(--f-md); }
  body:not(.page) .m-opts .chip.on { background: var(--c-text); border-color: var(--c-text); box-shadow: none; color: #fff; } /* 单选：选中的实心，一眼看出是哪个（压过 design.css 的描边式） */
  .m-size .dims { margin: 8px 0 0; color: var(--c-text-lite); font-size: var(--f-sm); line-height: 18px; text-wrap: pretty; }
  .m-size .panel-hd:not(:first-child) { margin-top: var(--s4); }
  .m-vars { gap: 12px; }
  .m-vars .sw { width: 32px; height: 32px; }

  /* 底部切换 */
  .mtabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom); background: var(--c-panel); border-top: 1px solid var(--c-line); }
  .mtabs button { flex: 1; position: relative; border: 0; background: none; color: var(--c-text-lite); font-size: var(--f-md); transition: color var(--t-fast) var(--ease-out); }
  .mtabs button.on { color: var(--c-text); font-weight: 600; }
  .mtabs button.on::before { content: ''; position: absolute; left: 32%; right: 32%; top: -1px; height: 2px; background: var(--c-accent); }
  .mtabs button .dot { position: absolute; top: 14px; width: 6px; height: 6px; margin-left: 2px; border-radius: var(--r-pill); background: var(--c-accent); }

  /* 浮层避开底部切换、别超出屏幕 */
  .toasts { bottom: calc(var(--tab-h) + var(--peek-h) + 12px); } /* 贴着底部工具上面 */
  body.ai-busy .toasts { bottom: calc(var(--tab-h) + var(--peek-h) + 80px); } /* AI 在忙那条在的时候，排在它上面 */
  body[data-mtab="chat"] .toasts, body.ai-busy[data-mtab="chat"] .toasts { top: calc(var(--top-h) + 8px); bottom: auto; } /* 对话页：从上面出，不再压住输入框 */
  /* AI 在忙（editor/jobs.js renderPill）：在想 / 在画几张、已等几秒、一般多久、「不等了」。改盒面、看成品两页都在底部同一个地方；对话页里有等待卡，不重复 */
  .m-pill:not([hidden]) { display: flex; position: fixed; left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--peek-h) + 8px); z-index: 18; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 8px 14px; border-radius: var(--r); white-space: normal; transform: none; max-width: none; top: auto; }
  #mPill { background: var(--c-panel); border-color: var(--c-line); } /* 实底：压在画布 / 物品上，字不透 */
  #mPill.done { border-color: var(--c-accent); }
  .m-pill .t { flex: 1 1 auto; min-width: 0; }
  .m-pill .link { order: 1; }
  .m-pill .s { order: 2; flex-basis: 100%; padding-left: 16px; white-space: normal; }
  body[data-mtab="view"] .m-pill { bottom: calc(var(--tab-h) + 8px); }
  body[data-mtab="chat"] .m-pill, body[data-mtab="edit"].sheet-open .m-pill { display: none !important; } /* 对话页有等待卡；抽屉拉起时在抽屉后面 */
  .modal { max-width: calc(100vw - 16px); max-height: calc(100vh - 16px) !important; max-height: calc(100dvh - 16px) !important; }
  .modal-hd h3 { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; } /* 标题长时最多两行再省略（问句一行截断看不出在问什么），× 不被挤出屏幕 */
  .modal-hd > .btn, .modal-hd > button { flex: none; }
  .modal-hd .empty, .modal-hd .imt-hd-hint { display: none; } /* 手机上标题旁的说明小字收起（图片工具的说明是 imt-hd-hint） */
  .gallery, .gallery.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tour-card { width: min(320px, calc(100vw - 16px)); }
  /* 菜单（长按、⋯、更多 ▾、顶栏 ⋯）在手机上从底部弹出：拇指够得着，长按弹的不压在手指底下；项多了在里面滚 */
  .ctxmenu { left: 0 !important; right: 0; top: auto !important; bottom: 0; min-width: 0; max-height: 72vh; max-height: 72dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: 0; box-shadow: 0 -8px 32px rgba(30,33,36,.18); animation: sheetUp var(--t-mid) var(--ease-out); }
  .ctxmenu button { padding: 12px; font-size: var(--f-base); }
  .menu-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(30,33,36,.24); animation: fade var(--t-mid) var(--ease-out); } /* dom.js showMenu：点它只关菜单 */
  .items { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; } /* 一行三个（最窄的两个）：一行四个时英文名折成三行 */
  .item-card .nm { font-size: var(--f-sm); line-height: 16px; padding: 4px 6px 6px; } /* 「看成品」页盒里物品的名字：10px 在手机上看不清 */
  .item-card .nofit { font-size: var(--f-sm); }
  details.fold > summary { padding: 8px 0; } /* 「校验依据」这类折叠条：手指点的，以前 24 px 高 */
  /* 对话页头：底部页签已经写着「和助手说」，标题不再重复；范围和「对话 ▾」并成一行，矮的手机上开场白不被挤出去 */
  .chat-hd { display: flex; align-items: center; gap: 8px; padding: 8px 16px; }
  .chat-hd .chat-title { order: 2; flex: none; margin: 0; }
  .chat-hd h2 { display: none; }
  .chat-hd .scope { order: 1; flex: 1 1 auto; min-width: 0; }
}
/* 横着拿的手机（矮）：三个页签挪到顶栏中间（那里本来空着），画布上方两排并成一排、3D 小窗先收起（「看成品」一点就到）——
   740×360 下画布从 78 px 高变成 190 上下；「看成品」页的 3D 占满一屏，往下划是尺寸和物品 */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1000px) {
  :root { --tab-h: 0px; --band: 58px; }
  .title-btn { max-width: 140px; } /* 页签在顶栏正中：方案名不压过去 */
  html body:not(.page) .mtabs { top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); height: var(--top-h); padding: 0; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; } /* 压过 design.css 那条毛玻璃底 */
  .mtabs button { flex: none; padding: 0 12px; }
  .mtabs button.on::before { top: auto; bottom: 6px; left: 12px; right: 12px; }
  .mtabs button .dot { top: 10px; }
  body[data-mtab="edit"] .viewer, body[data-mtab="chat"] .viewer { visibility: hidden; } /* 对话只剩一百多 px 高，小窗会压着字；「看成品」在顶栏一点就到 */
  body[data-mtab="chat"].cpip-low .chat-log, body[data-mtab="chat"]:not(.cpip-low) .chat-log { padding: var(--s3); } /* 小窗收起了：不再给它留位置 */
  body[data-mtab="chat"].cpip-low .chat-log .starters { padding: 0; }
  #toolbar, #ctxbar { right: auto; max-width: calc(58% - 12px); }
  .facebar, body.m-sel .facebar { top: 8px; left: auto; right: 8px; max-width: calc(42% - 12px); }
  body[data-mtab="view"] .viewer { height: calc(100vh - var(--top-h) - 64px); }
  @supports (height: 1dvh) { body[data-mtab="view"] .viewer { height: calc(100dvh - var(--top-h) - 64px); } }
  .ctxmenu { max-width: 480px; margin: 0 auto; border-width: 1px 1px 0; border-radius: 12px 12px 0 0; } /* 从底部弹出的菜单：横屏太宽，居中一块 */
}
@keyframes sheetUp { from { transform: translate3d(0, 24px, 0); opacity: 0; } to { transform: none; opacity: 1; } }
#exportBtn { gap: 0; } /* 按钮文字拆成了几段（手机上藏一段），段间不要留空 */
body[data-mtab] img, body[data-mtab] a { -webkit-touch-callout: none; } /* 编辑器里长按图片/链接不弹系统菜单 */

/* —— 快速摆放：九宫格 + 大小档 —— */
.quick-row { display: flex; gap: 12px; align-items: flex-start; }
.nine { flex: none; display: grid; grid-template-columns: repeat(3, 24px); gap: 3px; padding: 3px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; }
.nine button { width: 24px; height: 24px; border: 0; border-radius: var(--r); background: var(--c-bg); display: flex; align-items: center; justify-content: center; transition: background var(--t-fast) var(--ease-out); }
.nine button i { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--c-text-lite); transition: background var(--t-fast) var(--ease-out); }
.nine button:hover { background: var(--c-accent-soft); }
.nine button:hover i { background: var(--c-accent); }
.quick-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (max-width: 359px) { #ctxbar [data-act="copy"] .lbl, #ctxbar [data-act="del"] .lbl { display: none; } } /* 320 宽放不下：复制、删除只留图标，「取消选中」的字不收 */
@media (max-width: 900px), (max-height: 500px) and (max-width: 1000px) { .chat-input.big { left: 0; top: 0; width: 100%; height: 100%; transform: none; border: 0; border-radius: 0; padding-top: max(var(--s3), env(safe-area-inset-top)); } } /* 手机：放大编辑占满屏 */
@media (max-width: 900px), (max-height: 500px) and (max-width: 1000px) { .nine { grid-template-columns: repeat(3, 32px); } .nine button { width: 32px; height: 32px; } }

/* 顶栏账号按钮：账号名 + 积分 */
.acct { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: var(--c-panel); font-size: var(--f-sm); max-width: 220px; }
.acct:hover { border-color: var(--c-text-lite); }
/* 站内消息（public/js/notices.js）：顶栏铃铛 + 菜单弹层里的消息 */
.nt-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: 4px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-text-mid); cursor: pointer; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.nt-bell:hover { background: rgba(27, 26, 25, .05); color: var(--c-text); }
.nt-bell[hidden] { display: none; }
.nt-bell .n:not(:empty) { position: absolute; top: 1px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ink); color: #f7f3ec; font-size: 10px; line-height: 16px; text-align: center; } /* 和购物车的数同一种墨色：红色只给真出了问题的 */
.ctxmenu .nt-hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 10px 8px; border-bottom: 1px solid var(--c-line); margin-bottom: 4px; font-size: var(--f-md); }
.ctxmenu .nt-hd .link { display: inline; width: auto; padding: 0; font-size: var(--f-sm); }
.ctxmenu .nt-item { width: min(380px, 100%); align-items: baseline; padding: 8px 10px 8px 20px; position: relative; }
.ctxmenu .nt-item > span:first-child { white-space: normal; line-height: 20px; color: var(--c-text-mid); }
.ctxmenu .nt-item.unread > span:first-child { color: var(--c-text); }
.ctxmenu .nt-item.unread::before { content: ''; position: absolute; left: 8px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.ctxmenu .nt-item .k { flex: none; white-space: nowrap; }
.ctxmenu .nt-empty { padding: 12px 10px; color: var(--c-text-lite); font-size: var(--f-md); }
.acct .ac-face { width: 20px; height: 20px; margin-left: -6px; border-radius: 50%; object-fit: cover; flex: none; } /* 账号设置里传了头像 */
/* 编辑器顶栏的购物车：只放图标和件数（字在提示里），挨着「加入购物车」 */
.top-cart { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: var(--r-pill); color: var(--c-text-mid); text-decoration: none; transition: background var(--t-fast, 100ms) ease-out, color var(--t-fast, 100ms) ease-out; }
.top-cart:hover { background: rgba(30, 33, 36, .06); color: var(--c-text); }
.top-cart[hidden] { display: none; }
.top-cart .n:not(:empty) { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--c-text); color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.acct .ac-user { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .ac-credits { color: var(--c-accent); white-space: nowrap; }
@media (max-width: 900px) { .acct .ac-user { display: none; } }
/* 积分明细 */
.credits .w-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.credits .stat { border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-panel); padding: 8px 12px; }
.credits .stat b { display: block; font-size: var(--f-lg); line-height: 28px; }
.credits .stat span { color: var(--c-text-mid); font-size: var(--f-xs); }
.credits .how { margin: 0; padding-left: 18px; color: var(--c-text-mid); line-height: 22px; }
.credits .ledger td.plus { color: var(--c-ok, #2e7d32); text-align: right; }
.credits .ledger td.minus { color: var(--c-text-mid); text-align: right; }
.credits .ledger td.empty { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .credits .w-stats { grid-template-columns: repeat(2, 1fr); } }

/* v0.1 详略：不常用的收起来（DOM 还在、功能不变），从「更多」「⋯」菜单进；顶栏收起的在「更多」里自动列出 */
.tuck { display: none !important; }
/* 属性面板的「更多设置」：不常改的收在这里，开合记在浏览器里 */
.more-fold { margin-top: var(--s2); border-top: 1px solid var(--c-line); }
.more-fold > summary { display: flex; align-items: baseline; gap: 8px; padding: 12px 0 4px; cursor: pointer; list-style: none; color: var(--c-text-mid); white-space: nowrap; }
.more-fold > summary::-webkit-details-marker { display: none; }
.more-fold > summary::before { content: '▸'; color: var(--c-text-lite); }
.more-fold[open] > summary::before { content: '▾'; }
.more-fold > summary:hover { color: var(--c-text); }
.more-fold > summary .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--c-text-lite); font-size: var(--f-sm); } /* 放不下就省略，标题不折行 */
.more-fold > .body { padding-top: 8px; }
@media (max-width: 900px), (max-height: 500px) and (max-width: 1000px) { .top .title-input { display: none; } } /* 手机顶栏不放输入框（只剩一个字宽，还一点就弹键盘）：放 #titleBtn，点了弹改名框 */
@media (max-width: 359px) { .top .title-btn { display: none; } } /* 320 宽顶栏放不下：只在「⋯」最上面 */

/* —— 小圆角选项（手机工具条展开的那一项、「我的」页按商品筛）—— */
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: #fff; font-size: var(--f-sm); white-space: nowrap; transition: border-color var(--t-fast) var(--ease-out); }
.chip:hover { border-color: var(--c-text-lite); }
.chip.on { border-color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-text); }
.chip .k, .chip .n { color: var(--c-text-lite); font: var(--f-sm)/16px var(--font); }

/* —— 站内页顶栏（我的 / 创意工坊）：品牌回主页，导航，右边语言、账号 —— */
.site-top .brand { color: var(--c-text); text-decoration: none; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-pill); color: var(--c-text-mid); text-decoration: none; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.site-nav a:hover { background: var(--c-bg); color: var(--c-text); }
.site-nav a.on { background: var(--c-bg); color: var(--c-text); font-weight: 600; }
@media (max-width: 900px) { .site-top .brand { display: flex; } }
@media (max-width: 600px) {
  .site-top { gap: 8px; padding: 0 12px; }
  .site-top .brand-t { display: none; }
  .site-top .acct .ac-user { display: inline; max-width: 64px; }
  .site-nav { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { padding: 0 8px; }
}

/* —— 几个数的一条（「我的」、创意工坊「我发布的」、积分明细、工厂端订单；dom.js 的 statRow / statItems）：底版一份在这里，质感层一份在 site.css —— */
.me-stats, .w-stats, .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.stats { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 10px 14px; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-panel); text-align: left; transition: border-color var(--t-fast) var(--ease-out); }
.stat:hover { border-color: var(--c-text-lite); }
.stat.on { border: 2px solid var(--c-text); padding: 11px 15px; }
.stat b { display: block; font-size: var(--f-xl); line-height: 32px; font-weight: 600; }
.stat span { color: var(--c-text-mid); font-size: var(--f-sm); }
@media (max-width: 700px) { .me-stats, .w-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 工厂端、分享页、分享弹窗里的小字（factory.html 以前自己写一份，分享页也在用，放到这里） */
.lite { color: var(--c-text-lite); font-size: var(--f-sm); line-height: 20px; }
/* 「我的」页和工厂端共用的几条（其余「我的」页的结构样式在 css/me.css 顶上） */
a.btn.primary { color: #fff; }
.me-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.me-prod img.cut, .thumb-s.cut { object-fit: contain; padding: 10px 0; background: radial-gradient(circle at 50% 42%, #4b4f56 0%, #2a2c30 62%, #1d1f22 100%); } /* 抠好背景的商品照片：整个放进来，金属在深色底上更亮 */
.thumb-s.cut { padding: 3px 0; }

/* 右栏页签（电脑）：属性 / 图层 / 物品 / 校验一次只看一块（public/js/editor/side.js 的 showSide）；手机抽屉照旧按页面分（上面 ≤900 的规则） */
.side-tabs { display: none; }
@media (min-width: 1001px), (min-width: 901px) and (min-height: 501px) {
  .side-tabs { position: sticky; top: 0; z-index: 3; display: flex; padding: 0 var(--s3); border-bottom: 1px solid var(--c-line); background: var(--c-panel); }
  .side-tabs button { position: relative; height: 40px; padding: 0 2px; margin-right: 18px; border: 0; background: none; color: var(--c-text-mid); font-size: var(--f-sm); white-space: nowrap; }
  .side-tabs button:hover { color: var(--c-text); }
  .side-tabs button.on { color: var(--c-text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--c-text); }
  .side-tabs .badge { display: inline-block; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px; border-radius: var(--r-pill); background: var(--c-warn); color: #fff; font-size: var(--f-xs); line-height: 16px; text-align: center; font-style: normal; vertical-align: 1px; }
  .side-tabs .badge.bad { background: var(--c-danger); }
  .side-tabs .badge:empty { display: none; }
  .right[data-side] > .panel { display: none; }
  .right[data-side="inspector"] > #inspector, .right[data-side="layersPanel"] > #layersPanel, .right[data-side="contentsPanel"] > #contentsPanel, .right[data-side="checksPanel"] > #checksPanel { display: block; }
  /* 图层单独一页时就是展开的：标题不再能点（以前点一下整页收成空的） */
  #layersPanel > .layers > summary { pointer-events: none; }
  #layersPanel > .layers > summary h3::before { content: none; }
}

/* 账号菜单「改密码」对话框 */
.pw-form { display: grid; gap: 12px; }
.pw-row { display: grid; gap: 6px; font-size: var(--f-small, 12px); color: var(--c-text-lite); }
.pw-form + .empty:not(:empty) { margin-top: 10px; color: #b3261e; }

/* 二维码：加二维码的弹窗和属性面板共用（public/js/qr.js、panels/props-qr.js） */
.qr-k { margin: 12px 0 6px; font-size: var(--f-sm); color: var(--c-text-lite); }
.qr-props > .qr-k:first-child, .qr-dialog > .qr-k:first-of-type { margin-top: 0; }
.qr-in { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; font: var(--f-md)/var(--lh-md) var(--font); }
textarea.qr-in { height: auto; padding: 6px 10px; resize: vertical; }
.qr-kinds { margin-bottom: 8px; }
.qr-fields { display: grid; gap: 8px; }
.qr-style { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.qr-preview { width: 132px; height: 132px; padding: 6px; border: 1px solid var(--c-line); border-radius: var(--r); }
.qr-look-box { display: grid; gap: 10px; min-width: 0; }
.qr-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.qr-look { display: grid; justify-items: center; gap: 2px; padding: 6px 4px 4px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; font-size: var(--f-sm); color: var(--c-text-mid); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out); }
.qr-look:hover { border-color: var(--c-text-lite); }
.qr-look.on { border-color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-text); color: var(--c-text); font-weight: 500; }
.qr-look img { width: 48px; height: 48px; }
.qr-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qr-color { display: inline-flex; align-items: center; gap: 6px; font-size: var(--f-sm); color: var(--c-text-mid); cursor: pointer; }
.qr-color input[type=color] { width: 28px; height: 22px; padding: 0; border: 1px solid var(--c-line); border-radius: var(--r); background: none; cursor: pointer; }
.qr-color input[type=color]:hover { border-color: var(--c-text-lite); }
.qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qr-row .qr-k { margin: 0; }
.qr-motifs { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-motifs .chip { height: 28px; padding: 0 8px; }
.qr-motifs .chip img { display: block; }
.qr-motifs .qr-mono { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; } /* 中间放名字首字母的那一格 */
.qr-warn { margin-bottom: 10px; padding: 6px 10px; border-radius: var(--r); background: var(--c-danger-soft); color: var(--c-danger); font-size: var(--f-sm); }
.qr-apply { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.qr-props .qr-looks { margin-bottom: 10px; }
@media (max-width: 600px) { .qr-style { grid-template-columns: 1fr; } .qr-preview { justify-self: center; } }

/* 一键复制（dom.js 的 copyBtn / promptBox）：提示词框右上角；自己说过的话下面一排小图标（复制、放回输入框改一改再发） */
.copy-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--c-text-lite); cursor: pointer; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.copy-btn:hover { background: rgba(30,33,36,.08); color: var(--c-text); }
.prompt-box { position: relative; }
.prompt-box > textarea { padding-right: 32px !important; }
.prompt-box > .copy-btn { position: absolute; top: 3px; right: 3px; background: rgba(255,255,255,.85); }
.ctxmenu .prompt-box > .copy-btn, body:not(.page) .ctxmenu .prompt-box > .copy-btn { display: inline-grid; width: 26px; height: 26px; min-height: 0; padding: 0; } /* 菜单里的 button 都是整行的菜单项：设置条「重画」弹出的提示词框里，复制按钮被拉成一整行盖住第一行字 */
#inspector .inline.align6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } /* 多选的六个对齐：左中右一排、上中下一排（右栏窄时以前折成 5 + 1） */
#inspector .inline.align6 .btn { min-width: 0; padding-inline: 4px; justify-content: center; }
.msg-acts { display: flex; justify-content: flex-end; gap: 2px; margin: 4px -6px -4px 0; }
.msg.user .copy-btn { width: 24px; height: 24px; color: rgba(255,255,255,.6); }
.msg.user .copy-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
@media (hover: hover) and (pointer: fine) { .msg.user .msg-acts { opacity: 0; transition: opacity var(--t-fast) var(--ease-out); } .msg.user:hover .msg-acts, .msg.user:focus-within .msg-acts { opacity: 1; } }

/* —— 细线小图标（web-v1.1，照 codex 参考图：菜单项、下单窗的规格 / 数量 / 寄到、订单信息、运费方式、封面选项前一个 16px 线条图标）——
   用法：元素上写 data-ic="名字"，图标画在 ::before（颜色跟着字、浅一点）；加图标就在这里加一行 —— */
[data-ic]::before { content: ''; display: inline-block; flex: none; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; background: currentColor; opacity: .7; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.btn[data-ic]::before { margin-right: 0; opacity: .85; } /* 按钮本身有 6px 间距，图标不再另加 */
.ctxmenu button[data-ic] { justify-content: flex-start; gap: 0; }
.ctxmenu button > .ti:first-child { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 12px; color: var(--c-text-mid); } /* 编辑器右键 / ⋯ 菜单：前面一格线条图标（panels/ui.js 的 icon） */
.ctxmenu button > .ti:first-child svg { width: 18px; height: 18px; }
.ctxmenu button:has(> .ti:first-child) { justify-content: flex-start; gap: 0; align-items: center; }
.ctxmenu button:has(> .ti:first-child) .k { margin-left: auto; padding-left: 20px; }
.ctxmenu button.danger > .ti:first-child { color: inherit; }
.ctxmenu button[data-ic]::before { margin-right: 12px; align-self: center; }
.ctxmenu button[data-ic] .k { margin-left: auto; padding-left: 16px; }
[data-ic="bell"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M6 9a6 6 0 0 1 12 0c0 6.5 2.5 8 2.5 8h-17S6 15.5 6 9z%22/%3E%3Cpath d=%22M10.3 20.5a1.9 1.9 0 0 0 3.4 0%22/%3E%3C/svg%3E"); }
[data-ic="receipt"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M6 3h12v18l-3-2-3 2-3-2-3 2z%22/%3E%3Cpath d=%22M9 8h6M9 12h6%22/%3E%3C/svg%3E"); }
[data-ic="user"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21c0-4 3.6-6 8-6s8 2 8 6%22/%3E%3C/svg%3E"); }
[data-ic="card"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%225%22 width=%2218%22 height=%2214%22 rx=%222%22/%3E%3Cpath d=%22M3 10h18M7 15h4%22/%3E%3C/svg%3E"); }
[data-ic="coins"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cellipse cx=%2212%22 cy=%226%22 rx=%227%22 ry=%223%22/%3E%3Cpath d=%22M5 6v6c0 1.7 3.1 3 7 3s7-1.3 7-3V6%22/%3E%3Cpath d=%22M5 12v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6%22/%3E%3C/svg%3E"); }
[data-ic="grid"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%224%22 y=%224%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%2213%22 y=%224%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%224%22 y=%2213%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%2213%22 y=%2213%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3C/svg%3E"); }
[data-ic="upload"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 16V4M7 9l5-5 5 5M5 20h14%22/%3E%3C/svg%3E"); }
[data-ic="factory"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 21V10l6 3V9l6 3V5h6v16z%22/%3E%3Cpath d=%22M8 17h2M14 17h2%22/%3E%3C/svg%3E"); }
[data-ic="users"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%229%22 cy=%228%22 r=%223.5%22/%3E%3Cpath d=%22M2.5 20c0-3.5 3-5.5 6.5-5.5s6.5 2 6.5 5.5%22/%3E%3Cpath d=%22M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14.7c2 .7 3.5 2.4 3.5 5.3%22/%3E%3C/svg%3E"); }
[data-ic="help"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223.5%22/%3E%3Cpath d=%22M5.6 5.6l4 4M14.4 14.4l4 4M18.4 5.6l-4 4M9.6 14.4l-4 4%22/%3E%3C/svg%3E"); }
[data-ic="logout"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9%22/%3E%3C/svg%3E"); }
[data-ic="cube"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l8 4.5v9L12 21l-8-4.5v-9z%22/%3E%3Cpath d=%22M4 7.5l8 4.5 8-4.5M12 12v9%22/%3E%3C/svg%3E"); }
[data-ic="layers"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l9 5-9 5-9-5z%22/%3E%3Cpath d=%22M3 13l9 5 9-5%22/%3E%3C/svg%3E"); }
[data-ic="pin"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 21s7-6.2 7-11.5a7 7 0 0 0-14 0C5 14.8 12 21 12 21z%22/%3E%3Ccircle cx=%2212%22 cy=%229.5%22 r=%222.5%22/%3E%3C/svg%3E"); }
[data-ic="truck"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2.5 6h11v10h-11zM13.5 10h4l3 3v3h-7%22/%3E%3Ccircle cx=%227%22 cy=%2218%22 r=%222%22/%3E%3Ccircle cx=%2217%22 cy=%2218%22 r=%222%22/%3E%3C/svg%3E"); }
[data-ic="store"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 10v10h16V10M3 10l2-6h14l2 6%22/%3E%3Cpath d=%22M3 10a3 3 0 0 0 6 0 3 3 0 0 0 6 0 3 3 0 0 0 6 0M10 20v-5h4v5%22/%3E%3C/svg%3E"); }
[data-ic="sparkle"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z%22/%3E%3Cpath d=%22M19 3v4M17 5h4%22/%3E%3C/svg%3E"); }
[data-ic="sliders"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 7h10M18 7h2M4 17h4M12 17h8%22/%3E%3Ccircle cx=%2216%22 cy=%227%22 r=%222%22/%3E%3Ccircle cx=%2210%22 cy=%2217%22 r=%222%22/%3E%3C/svg%3E"); }
[data-ic="check"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228.5%22/%3E%3Cpath d=%22M8.5 12.3l2.4 2.4 4.6-5%22/%3E%3C/svg%3E"); }
[data-ic="type"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 7V5h14v2M12 5v14M9 19h6%22/%3E%3C/svg%3E"); }
[data-ic="image"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%224%22 width=%2218%22 height=%2216%22 rx=%222.5%22/%3E%3Ccircle cx=%229%22 cy=%2210%22 r=%221.8%22/%3E%3Cpath d=%22M21 15.5l-5-5L6 20%22/%3E%3C/svg%3E"); }
[data-ic="wand"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 20L15 9M13 7l4 4%22/%3E%3Cpath d=%22M18 2.5v3M16.5 4h3M8 3.5v2M7 4.5h2M20 12v2M19 13h2%22/%3E%3C/svg%3E"); }
[data-ic="send"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 19V5M6 11l6-6 6 6%22/%3E%3C/svg%3E"); }
[data-ic="ruler"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 17L17 3l4 4L7 21z%22/%3E%3Cpath d=%22M7 13l2 2M10 10l2 2M13 7l2 2%22/%3E%3C/svg%3E"); }
[data-ic="eye"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223%22/%3E%3C/svg%3E"); }
[data-ic="chat"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 5h16v11H9l-5 4z%22/%3E%3C/svg%3E"); }
[data-ic="clock"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M12 7v5l3 2%22/%3E%3C/svg%3E"); }
[data-ic="hash"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 9h14M5 15h14M10 4L8 20M16 4l-2 16%22/%3E%3C/svg%3E"); }
[data-ic="swatch"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3s6 6.4 6 10.5A6 6 0 0 1 6 13.5C6 9.4 12 3 12 3z%22/%3E%3C/svg%3E"); }
[data-ic="shirt"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 3l-5 3 2 5 2-1v11h10V10l2 1 2-5-5-3c0 1.7-1.3 3-3 3S8 4.7 8 3z%22/%3E%3C/svg%3E"); }
[data-ic="headset"] { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 15v-3a8 8 0 0 1 16 0v3%22/%3E%3Cpath d=%22M4 14h3v6H5a1 1 0 0 1-1-1zM20 14h-3v6h2a1 1 0 0 0 1-1z%22/%3E%3C/svg%3E"); }

/* 手指点的屏幕：弹窗里的分段选择、小按钮高 36；几个很小的图标按钮（展开输入框、复制、购物车）点按区域往外扩 8px——样子不变，不另写一套手机版 */
@media (pointer: coarse) {
  .modal .seg button, .modal .btn.small { min-height: 36px; }
  .ord-copy, .top-cart { position: relative; }
  .chat-big-btn::after, .prompt-box > .copy-btn::after, .ord-copy::after, .top-cart::after { content: ''; position: absolute; inset: -8px; }
  /* 挨在一起、点错了有后果的小按钮放大（2026-11-10 用户：手机上用得小心翼翼）：气泡下「复制 | 改」（点到「改」气泡就变成编辑框）、
     图层行「锁 | 藏 | 上 | 下 | 删」、等待卡上的「停止」 */
  .msg-acts { gap: 8px; }
  .msg-acts .copy-btn, .msg.user .msg-acts .copy-btn { width: 36px; height: 36px; }
  .stop-link { position: relative; }
  .stop-link::after { content: ''; position: absolute; inset: -10px; }
}


.starters[hidden] { display: none !important; } /* 选中了东西时收起开场那组建议（chat.js renderScope） */

/* —— 手机打磨（2026-11-11）：只在手机上生效 —— */
@media (max-width: 900px), (max-height: 500px) and (max-width: 1000px) {
  /* 「字体·艺术字」托盘：返回从左边一整列挪到顶上一行，整屏的宽都给字体 / 模板格子（以前那一列占掉两成宽，格子里的名字、样子被截） */
  .tray.tall:has(.type-panel) { flex-direction: column; }
  .tray.tall:has(.type-panel) > .back { flex: none; flex-direction: row; justify-content: flex-start; gap: 6px; min-width: 0; height: 40px; margin: 4px 0 0; padding: 0 12px; border-right: 0; font-size: var(--f-md); }
  .tray.tall:has(.type-panel) > .tl-x { padding-top: 2px; }
  /* 看成品：3D 下面那排放不下时右边淡出（同工具栏、面切换），看得出还能滑；看哪一面的小圆按钮手指点得准 */
  .viewer-ctl:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  body:not(.page) .viewer-ctl .btn.small.icon { width: 36px; min-width: 36px; }
  /* 顶栏：还没改动（什么都没存、也没什么可存）时那个空心圆不占位置，同「已保存」；位置让给方案名（以前 390 宽只露两个字） */
  .save-btn[data-state="new"] { display: none; }
}

/* —— 电脑右栏「属性」打磨（2026-11-11）：只在电脑上生效 —— */
@media (min-width: 1001px), (min-width: 901px) and (min-height: 501px) {
  /* 不在字段行里的一排按钮（按描述重画那排、最下面复制 / 层级 / 删除、多选的全部…）：以前按钮之间没有缝、挤成一串 */
  #inspector .inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  /* 数字格：框里左右少留一点，数字本身不被切（以前 1280 宽「字号 16.2」只露出半个数） */
  #inspector .nbox { gap: 4px; padding: 0 8px; }
  #inspector .nbox input.num-in { flex: 1 1 auto; font-variant-numeric: tabular-nums; }
  #inspector .nboxes .nbox .unit { display: none; } /* 这一组的标题已经写了（毫米），四个格子里不再各写一遍 mm，位置让给数字 */
  /* 旋转：角度格按剩下的宽伸缩，和三个按钮排成一行 */
  #inspector .rot-row { flex-wrap: nowrap; }
  #inspector .rot-row .nbox-angle { flex: 1 1 52px; width: auto; min-width: 52px; max-width: 88px; }
  #inspector .rot-row .btn.small { flex: none; padding: 0 8px; }
  /* 滑杆旁的数：点一下直接填 */
  #inspector .range-val { flex: none; padding: 2px 4px; margin-right: -4px; border-radius: var(--r); color: var(--c-text-mid); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: text; transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
  #inspector .range-val:hover { background: rgba(30, 33, 36, .06); color: var(--c-text); }
  #inspector .range-val:has(input) { padding: 0; background: none; }
  #inspector .field .range-val input { width: 64px; height: 26px; padding: 0 6px; text-align: right; font-size: var(--f-sm); -moz-appearance: textfield; }
  #inspector .range-val input::-webkit-inner-spin-button, #inspector .range-val input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  /* 「更多设置」里的摆放那块和上面的设置分开（以前直接接在上一组后面，看不出是另一组） */
  #inspector .more-fold > .body > .quick-layout:not(:first-child) { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); }
}

/* 右栏色板：两排匀开（以前按宽度折成 9 + 4，下面一排只有半截）。按行内块排、text-wrap: balance 让浏览器把几排排得一样长——色板多少个、右栏多宽都成立 */
#inspector .swatches { display: block; text-wrap: balance; font-size: 0; line-height: 0; margin-bottom: -6px; }
#inspector .swatches .sw { display: inline-block; vertical-align: top; margin: 0 6px 6px 0; }
