/* MPing 拼豆图纸生成器 · 复刻版设计系统
   纯手写 CSS，依赖均为本地文件（含本地 Three.js），可直接 file:// 打开 */
:root {
  --brand: #df6b43;
  --brand-hover: #c9562f;
  --brand-soft: #fbe9df;
  --ink: #1f2937;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --page: #f5f3ef;
  --card: #fffdf9;
  --white: #ffffff;
  --line: #e7e2dc;
  --line-2: #dcd5cd;
  --dark-btn: #182230;
  --blue: #2563eb;
  --green: #10b981;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(60, 37, 21, .04), 0 8px 24px rgba(60, 37, 21, .05);
  --nav-h: 60px;
}
html[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --ink-3: #94a3b8;
  --page: #14181f;
  --card: #1e242d;
  --white: #232a34;
  --line: #38414d;
  --line-2: #444d5a;
  --dark-btn: #e2e8f0;
  --brand-soft: #3a2a24;
  --shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  border-bottom: 1px solid rgba(231, 214, 199, .7);
  background: rgba(255, 253, 249, .95);
  backdrop-filter: blur(12px);
}
html[data-theme="dark"] .nav { background: rgba(20, 24, 31, .95); border-color: var(--line); }
.nav-inner {
  height: 100%; width: calc(100% - 24px); max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
}
.brand-link { display: flex; align-items: center; gap: 10px; justify-self: start; min-width: 0; }
.brand-mark {
  width: 36px; height: 36px; flex: none; padding: 3px;
  display: block; object-fit: contain;
  border-radius: 10px; background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.08); border: 1px solid var(--line);
}
.brand-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 导航中间的「生成图纸」链接已移除 */
.nav-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.pill {
  height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--white); font-size: 13px; font-weight: 600; transition: .15s;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill svg { width: 15px; height: 15px; }
.theme-pill { width: 38px; padding: 0; }

/* ---------- 通用按钮 ---------- */
.btn {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-dark { background: var(--dark-btn); color: #fff; }
html[data-theme="dark"] .btn-dark { color: #111827; }
.btn-dark:hover { opacity: .88; }
.btn-ghost { background: var(--white); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表单控件 ---------- */
.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.input, .select {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2);
  border-radius: 11px; background: var(--white); font-size: 13px;
}
.input:focus, .select:focus { border-color: var(--brand); outline: none; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: #d6d3d1; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
html[data-theme="dark"] input[type="range"] { background: #4b5563; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row .num { flex: none; width: 56px; height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.switch { width: 42px; height: 24px; border-radius: 99px; background: #cbd5e1; border: 0; position: relative; flex: none; transition: .2s; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { left: 21px; }

/* ---------- 落地页 ---------- */
.landing { padding-top: var(--nav-h); }
.hero { text-align: center; padding: 58px 16px 26px; background: radial-gradient(900px 420px at 50% 10%, #fff6ee 0%, rgba(255,246,238,0) 75%); }
html[data-theme="dark"] .hero { background: radial-gradient(900px 420px at 50% 10%, #2a211d 0%, rgba(42,33,29,0) 75%); }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 900; letter-spacing: -.5px; margin: 0; }
.hero h1 .hl { color: var(--brand); }
.hero .eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--brand); margin-bottom: 12px; }
.hero p.sub { max-width: 760px; margin: 14px auto 0; color: var(--ink-2); font-size: 15px; line-height: 1.9; }
.section { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.section-title { font-size: 13px; font-weight: 900; color: var(--brand); letter-spacing: .1em; margin: 0 0 8px; }
.section h2 { font-size: 27px; font-weight: 900; margin: 0 0 12px; letter-spacing: -.3px; }
.section-desc { color: var(--ink-2); margin: 0 0 24px; }
.dropzone {
  margin: 26px auto 0; max-width: 680px; min-height: 250px;
  border: 2px dashed #f0b79c; border-radius: 26px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 30px; text-align: center; cursor: pointer; transition: .2s; box-shadow: var(--shadow);
}
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }
.drop-icon { width: 52px; height: 52px; border-radius: 15px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.drop-icon svg { width: 26px; height: 26px; }
.dropzone h3 { margin: 0; font-size: 19px; font-weight: 900; }
.dropzone .hint { color: var(--ink-2); font-size: 13px; }
.dropzone .btn { margin-top: 12px; min-width: 220px; }
.dropzone .fine { color: var(--ink-3); font-size: 12px; margin-top: 6px; }
.tip {
  max-width: 680px; margin: 16px auto 0; display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: 12px; background: #edf9f3; border: 1px solid #cbeedd; color: #16634a; font-size: 12px; line-height: 1.7;
}
html[data-theme="dark"] .tip { background: #14291f; border-color: #24513a; color: #a7e5c5; }
.tip svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.steps { margin-top: 60px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: 22px; }
.step .n { font-size: 30px; font-weight: 900; color: var(--brand); opacity: .35; }
.step h3 { margin: 6px 0; font-size: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 13px; }
.size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.size { border-radius: 16px; border: 1px solid var(--line); background: var(--card); padding: 18px; text-align: center; }
.size strong { display: block; font-size: 20px; color: var(--brand); }
.size span { font-size: 12px; color: var(--ink-2); }
.cta-band { margin: 56px auto 0; text-align: center; }
.section + .section { margin-top: 60px; }

/* ---------- 页脚：仅一个图片 logo ---------- */
.footer-min { margin-top: 64px; border-top: 1px solid var(--line); padding: 34px 20px 40px; text-align: center; background: transparent; }
.footer-logo { display: inline-flex; }
.footer-logo .brand-mark { width: 46px; height: 46px; padding: 4px; transition: transform .2s, box-shadow .2s; }
.footer-logo:hover .brand-mark { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }

/* ---------- 工作台 ---------- */
.studio { padding-top: calc(var(--nav-h) + 18px); }
.studio-wrap { max-width: 1440px; margin: 0 auto; padding: 0 16px 30px; }
.ws-head {
  border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 12px;
}
.ws-head-top { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ws-title { font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--brand); }
.ws-summary { font-size: 14px; font-weight: 800; }
.ws-meta { font-size: 11px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.ws-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ws-actions .btn { min-height: 38px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.main-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.main-tab {
  border: 0; border-radius: 13px; background: #eaf0f7; padding: 9px 6px; text-align: center; transition: .15s;
}
html[data-theme="dark"] .main-tab { background: #2a323d; }
.main-tab strong { display: block; font-size: 14px; }
.main-tab small { display: block; font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.main-tab.active { background: var(--brand); color: #fff; }
.main-tab.active small { color: rgba(255,255,255,.85); }
.sub-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.sub-tab { border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 9px; font-size: 13px; font-weight: 700; }
.sub-tab.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.panel {
  border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); padding: 16px;
  min-width: 0; max-width: 100%;
}
.panel h2 { font-size: 15px; margin: 0 0 4px; font-weight: 900; }
.panel .sub { font-size: 11px; color: var(--ink-3); margin: 0 0 14px; }
.panel-block { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 13px; }
.panel-block:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.three-col { display: grid; grid-template-columns: 244px minmax(0, 1fr) 244px; gap: 12px; align-items: start; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field .hint { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.switch-row .label { font-size: 12px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 11px; font-weight: 700; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
/* 门禁标记样式已移除：全部功能免费开放 */
.canvas-panel { padding: 10px; position: relative; }
.canvas-toolbar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 0 10px; flex-wrap: wrap; }
.canvas-toolbar .hint { font-size: 11px; color: var(--ink-3); margin-right: auto; padding-left: 6px; }
.zoom-ctl { display: flex; align-items: center; gap: 6px; }
.zoom-ctl button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--white); font-weight: 900; }
.zoom-ctl .val { min-width: 42px; text-align: center; font-size: 12px; font-weight: 700; }
.zoom-ctl .fit { width: auto; padding: 0 10px; background: var(--blue); color: #fff; border-color: var(--blue); font-size: 12px; }
.canvas-scroll { height: 620px; overflow: auto; background: #e9e6ee; border-radius: 12px; position: relative; min-width: 0; max-width: 100%; }
html[data-theme="dark"] .canvas-scroll { background: #2a3039; }
.canvas-scroll canvas { display: block; margin: 18px auto; box-shadow: 0 8px 30px rgba(45,35,55,.18); }
#refineScroll { background: #eef1f7; }
html[data-theme="dark"] #refineScroll { background: #2a3039; }
#refineScroll canvas { box-shadow: none; margin: 0 auto; }
#patternCanvas { display: block; transform-origin: 0 0; cursor: crosshair; image-rendering: pixelated; }
.magnifier { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.magnifier .mg-title { font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.mg-grid { display: grid; grid-template-columns: repeat(3, 62px); gap: 4px; }
.mg-grid div { height: 42px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mg-grid div.center { outline: 2px solid var(--brand); outline-offset: 1px; }
.color-panel { margin-top: 12px; }
.color-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.color-panel-head .sub { margin: 0 0 10px; }
.color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.color-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 8px 10px; }
.color-item.hl { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.color-swatch { width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.color-item .code { font-weight: 800; font-size: 13px; }
.color-item .count { font-size: 11px; color: var(--ink-3); }
.color-item .spacer { flex: 1; }
.color-item button { border: 0; border-radius: 8px; background: #f1f5f9; padding: 5px 9px; font-size: 11px; font-weight: 700; color: var(--ink-2); }
html[data-theme="dark"] .color-item button { background: #343d49; }
.color-item button:hover { color: var(--brand); }
.excluded-bar { margin-top: 10px; font-size: 12px; color: var(--ink-2); }

/* 精修 */
.refine-layout { display: grid; grid-template-columns: 68px minmax(0, 1fr) 244px; gap: 12px; align-items: start; }
.tool-rail { border-radius: 18px; border: 1px solid var(--line); background: var(--card); padding: 10px 6px; display: flex; flex-direction: column; gap: 4px; }
.tool-rail button { border: 0; background: transparent; border-radius: 12px; padding: 9px 2px; font-size: 11px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tool-rail button svg { width: 18px; height: 18px; }
.tool-rail button.active { background: var(--brand); color: #fff; }
.tool-rail .sep { height: 1px; background: var(--line); margin: 4px 0; }
.refine-hint { font-size: 11px; color: var(--ink-3); padding: 0 6px 8px; }
.palette-mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-height: 380px; overflow: auto; }
.palette-mini button { aspect-ratio: 1; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); font-size: 9px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); padding: 0; overflow: hidden; }
.palette-mini button.off { opacity: .35; }
.palette-mini button.active { outline: 2px solid var(--brand); outline-offset: 1px; }
.current-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.current-colors button { width: 38px; height: 38px; border-radius: 10px; border: 2px solid transparent; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.current-colors button.active { border-color: var(--ink); }
.undo-row { display: flex; gap: 6px; margin-top: 10px; }

/* 熨烫 / 跟做 */
.two-col { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; align-items: start; }
.iron-preview { min-height: 480px; display: flex; align-items: center; justify-content: center; background: #fffdf8; border-radius: 14px; overflow: hidden; }
html[data-theme="dark"] .iron-preview { background: #efe9df; }
.iron-preview canvas { max-width: 100%; border-radius: 10px; }
.iron-face-switch { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.iron-face-switch button { border: 1px solid var(--line-2); background: var(--white); border-radius: 10px; padding: 7px 14px; font-size: 12px; font-weight: 700; }
.iron-face-switch button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.material-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.material-grid button { border: 1px solid var(--line-2); background: var(--white); border-radius: 12px; padding: 10px 6px; font-size: 12px; font-weight: 700; }
.material-grid button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.progress-ring { font-size: 32px; font-weight: 900; color: var(--brand); }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 16px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.follow-list { display: grid; gap: 8px; }
.follow-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 9px 12px; }
.follow-row.done { opacity: .55; }
.follow-row .swatch { width: 26px; height: 26px; border-radius: 8px; }
.follow-row .spacer { flex: 1; }

/* ---------- 弹窗 ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: min(100%, 1040px); max-height: 92vh; overflow: auto; border-radius: 22px; background: var(--card); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 900; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--white); font-size: 18px; line-height: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .status { font-size: 12px; color: var(--ink-2); }
.modal-foot .actions { display: flex; gap: 8px; }
.export-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.export-preview { background: #ece8e2; border-radius: 14px; padding: 14px; max-height: 560px; overflow: auto; }
html[data-theme="dark"] .export-preview { background: #2a3039; }
.export-preview canvas { width: 100%; background: #fff; border-radius: 4px; }
.palette-manager-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-height: 420px; overflow: auto; padding: 2px; }
.palette-manager-grid button { aspect-ratio: 1; border: 1px solid rgba(0,0,0,.08); border-radius: 9px; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.palette-manager-grid button.off { opacity: .3; }
.crop-stage { min-height: 320px; background: #ece8e2; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
html[data-theme="dark"] .crop-stage { background: #2a3039; }
.crop-stage canvas { max-width: 100%; max-height: 420px; }
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: var(--dark-btn); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px;
  z-index: 200; opacity: 0; transition: .25s; pointer-events: none; box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty-note { color: var(--ink-3); font-size: 13px; padding: 30px 0; text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .three-col { grid-template-columns: 220px minmax(0, 1fr); }
  .three-col > .right-panel { grid-column: 1 / -1; }
  .right-panel .chips { max-width: 100%; }
}
@media (max-width: 980px) {
  .step-grid, .size-grid { grid-template-columns: repeat(2, 1fr); }
  .refine-layout { grid-template-columns: 60px minmax(0, 1fr); }
  .refine-layout > .right-panel { grid-column: 1 / -1; }
  .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .three-col, .refine-layout, .two-col { grid-template-columns: minmax(0, 1fr); }
  .three-col > .right-panel, .refine-layout > .right-panel { grid-column: auto; }
  .color-panel-head > div:last-child { width: 100%; }
  .color-panel-head .input { width: 100%; flex: 1 1 100%; }
  .sub-tabs, .main-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-head, .canvas-toolbar { min-width: 0; }
  .tool-rail { flex-direction: row; overflow-x: auto; min-width: 0; }
  .tool-rail .sep { width: 1px; height: auto; margin: 0 4px; }
  .canvas-scroll { height: 440px; }
  .color-grid { grid-template-columns: 1fr; }
  .main-tabs { grid-template-columns: repeat(2, 1fr); }
  .step-grid, .size-grid { grid-template-columns: 1fr; }
  .ws-actions { justify-content: flex-start; }
  .palette-manager-grid { grid-template-columns: repeat(5, 1fr); }
  .hero { padding-top: 34px; }
  .section { padding: 0 14px; }
  .section + .section, .steps { margin-top: 48px; }
}

/* ---------- 熨烫效果：3D 拼豆（按原版） ---------- */
.card3d { border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.card3d:fullscreen { border-radius: 0; display: flex; flex-direction: column; height: 100dvh; }
.c3-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.c3-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 900; }
.c3-head .sub { margin: 0; font-size: 12px; color: var(--ink-3); }
.c3-badge { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--page); font-size: 12px; font-weight: 800; color: var(--ink-2); }
.c3-stage { position: relative; background: #fffdf8; height: 480px; }
@media (min-width: 1100px) { .c3-stage { height: 620px; } }
.card3d:fullscreen .c3-stage { flex: 1; height: auto; min-height: 0; }
.c3-host { width: 100%; height: 100%; touch-action: none; }
.c3-host canvas { display: block; }
.c3-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.85); color: #475569; font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.c3-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.c3-dim { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.c3-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--page); }
.seg button { border: 0; background: transparent; padding: 7px 11px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.seg button.active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- 拼豆：专注制作（按原版） ---------- */
.make-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-radius: 22px; background: #0b1220; color: #fff; padding: 22px 26px 26px; margin-bottom: 14px; overflow: hidden; }
.make-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: #5eead4; margin-bottom: 4px; }
.make-banner h2 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.make-banner .sub { margin: 0; font-size: 12px; color: #cbd5e1; }
.make-pct { text-align: right; }
.make-pct strong { display: block; font-size: 32px; font-weight: 900; color: #34d399; line-height: 1; font-variant-numeric: tabular-nums; }
.make-pct span { font-size: 11px; color: #94a3b8; }
.make-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; margin: 0; border-radius: 0; background: rgba(255,255,255,.10); }
.make-bar > i { background: #34d399; border-radius: 0; }
.make-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: stretch; }
.make-main { display: flex; flex-direction: column; padding: 14px; min-width: 0; }
.make-task { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; flex-wrap: wrap; }
.make-task .field-label { margin: 0 0 2px; }
.make-swatch { flex: none; width: 34px; height: 34px; border-radius: 12px; background: #e2e8f0; border: 1px solid rgba(0,0,0,.06); }
.make-swatch.lg { width: 42px; height: 42px; border-radius: 13px; }
.make-stage { position: relative; flex: 1; min-height: 480px; border-radius: 16px; background: #eef1f7; overflow: auto; display: flex; align-items: center; justify-content: center; }
html[data-theme="dark"] .make-stage { background: #232a34; }
.make-stage canvas { display: block; cursor: crosshair; }
.make-side { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.make-current { border-radius: 16px; background: #e8f1ff; padding: 14px; }
html[data-theme="dark"] .make-current { background: #1c2a3d; }
.make-current-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.make-current-row strong { display: block; font-size: 16px; }
.make-current-row span:not(.make-swatch) { font-size: 12px; color: var(--ink-2); }
.make-choose { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.make-choose strong { font-size: 14px; }
.make-choose .sub { margin: 2px 0 0; font-size: 11px; }
.make-list { display: grid; gap: 8px; }
.make-row { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--white); cursor: pointer; }
.make-row.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,.14); }
.make-row-top { display: flex; align-items: center; gap: 10px; }
.make-row-top strong { font-size: 13px; }
.make-row-top .num { margin-left: auto; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.make-row .mini-bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.make-row .mini-bar > i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.make-reset { margin-top: auto; color: #dc2626; border-color: #fecaca; }
.refine-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
@media (max-width: 980px) { .make-layout { grid-template-columns: minmax(0, 1fr); } .make-stage { min-height: 380px; } }
@media (max-width: 720px) { .c3-stage { height: 380px; } .c3-foot { flex-direction: column; align-items: flex-start; } .make-banner { padding: 18px; } }
